-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
181 additions
and
107 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,26 @@ | |
"name": "My plugin", | ||
"version": "0.0.1", | ||
"description": "Description of your plugin.", | ||
"summary": "Summary of your plugin", | ||
"releaseNotes": "Release note", | ||
"keywords": [ | ||
], | ||
"languages": [ | ||
"en" | ||
], | ||
"website": "https://mywebsite.com", | ||
"author": "Your Name", | ||
"helpUrl": "https://mywebsite.com/help", | ||
"icons": [ | ||
{ "width": 24, "height": 24, "path": "icons/[email protected]" }, | ||
{ "width": 48, "height": 48, "path": "icons/[email protected]" }, | ||
{ "width": 96, "height": 96, "path": "icons/[email protected]" }, | ||
{ "width": 144, "height": 144, "path": "icons/[email protected]" }, | ||
{ "width": 192, "height": 192, "path": "icons/[email protected]" } | ||
], | ||
"host": { | ||
"app": "XD", | ||
"minVersion": "13.0.0" | ||
"minVersion": "19.0" | ||
}, | ||
"uiEntryPoints": [ | ||
{ | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
import {Artboard, SceneNode} from "./scenegraph"; | ||
|
||
/** | ||
* The `interactions` module represents all document interactions. | ||
* | ||
* **Since:** XD 19 | ||
* | ||
* @example ```javascript | ||
* // Get the home Artboard | ||
const home = interactions.homeArtboard; | ||
console.log(`Home artboard name: ${home.name} guid: ${home.guid}`); | ||
// Get all of the document interactions | ||
const allInter = interactions.allInteractions; | ||
allInter.forEach(inter => { | ||
console.log(`triggerNode guid: ${inter.triggerNode.guid}`); | ||
console.log(`triggerNode Name: ${inter.triggerNode.name}`); | ||
console.log(JSON.stringify(inter.interactions, null, 2)); | ||
}) | ||
``` | ||
*/ | ||
declare class interactions { | ||
/** | ||
* The home artboard of the interaction model. This is a special designation indicating this is the first artboard to display in a shared prototype. | ||
*/ | ||
public static readonly homeArtboard?: Artboard; | ||
|
||
/** | ||
* Get all interactions by serializing the document interactions to JSON. An array of all the interactions is returned. | ||
*/ | ||
public static readonly allInteractions: Array<{ triggerNode: SceneNode, interactions: Array<InteractionData> }>; | ||
} | ||
|
||
/** | ||
* @example ```javascript | ||
* { | ||
trigger: { | ||
type: 'tap' | ||
}, | ||
action: { | ||
type: 'goToArtboard', | ||
destination: | ||
Artboard ('iPhone 6/7/8') { | ||
width: 375, height: 667 | ||
global X,Y: 1040, -14 | ||
parent: RootNode | ||
children: [Group, Group, Group] | ||
fill: ffffffff | ||
}, | ||
preserveScrollPosition: false, | ||
transition: [transitionData] | ||
} | ||
} | ||
* ``` | ||
*/ | ||
type InteractionData = { | ||
trigger: { | ||
/** | ||
* Possible values: `tap`, `voice`, `time`, `drag` | ||
*/ | ||
type: 'tap' | 'voice' | 'time' | 'drag' | ||
} | ||
|
||
action: { | ||
/** | ||
* Possible values: `goToArtboard`, `overlay`, `speak`, `goBack` | ||
*/ | ||
type: 'goToArtboard' | 'overlay' | 'speak' | 'goBack'; | ||
/** | ||
* The destination scenegraph node | ||
*/ | ||
destination: SceneNode; | ||
|
||
/** | ||
* Fixed scroll position indicator | ||
*/ | ||
preserveScrollPosition: boolean; | ||
|
||
/** | ||
* Data about transitions triggered by `trigger` | ||
*/ | ||
transition: Array<TransitionData>; | ||
} | ||
} | ||
|
||
type TransitionData = { | ||
/** | ||
* Possible values: `autoAnimate´, `dissolve`, `push`, `slide`, `none` | ||
*/ | ||
type: 'autoAnimate' | 'dissolve' | 'push' | 'slide' | 'none'; | ||
|
||
/** | ||
* Possible values: `linear`, `ease-in`, `ease-out`, `ease-in-out`, `wind-up`, `bounce`, `snap` | ||
*/ | ||
easing: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'wind-up' | 'bounce' | 'snap'; | ||
} | ||
|
||
export = interactions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters