@figma/plugin-typings
Advanced tools
Comparing version 1.36.0 to 1.37.0
@@ -1,2 +0,2 @@ | ||
// Figma Plugin API version 1, update 35 | ||
// Figma Plugin API version 1, update 37 | ||
@@ -24,2 +24,5 @@ declare global { | ||
readonly currentUser: User | null | ||
readonly activeUsers: ActiveUser[] | ||
closePlugin(message?: string): void | ||
@@ -139,2 +142,3 @@ | ||
height?: number | ||
position?: { x: number; y: number } | ||
} | ||
@@ -480,3 +484,4 @@ | ||
{ readonly type: "URL", url: string } | | ||
{ readonly type: "NODE" | ||
{ | ||
readonly type: "NODE" | ||
readonly destinationId: string | null | ||
@@ -512,23 +517,23 @@ readonly navigation: Navigation | ||
| { | ||
readonly type: "AFTER_TIMEOUT"; | ||
readonly timeout: number; | ||
} | ||
readonly type: "AFTER_TIMEOUT"; | ||
readonly timeout: number; | ||
} | ||
| { | ||
readonly type: | ||
| "MOUSE_ENTER" | ||
| "MOUSE_LEAVE" | ||
| "MOUSE_UP" | ||
| "MOUSE_DOWN"; | ||
readonly delay: number; | ||
} | ||
readonly type: | ||
| "MOUSE_ENTER" | ||
| "MOUSE_LEAVE" | ||
| "MOUSE_UP" | ||
| "MOUSE_DOWN"; | ||
readonly delay: number; | ||
} | ||
| { | ||
readonly type: "ON_KEY_DOWN"; | ||
readonly device: | ||
| "KEYBOARD" | ||
| "XBOX_ONE" | ||
| "PS4" | ||
| "SWITCH_PRO" | ||
| "UNKNOWN_CONTROLLER"; | ||
readonly keyCodes: ReadonlyArray<number>; | ||
}; | ||
readonly type: "ON_KEY_DOWN"; | ||
readonly device: | ||
| "KEYBOARD" | ||
| "XBOX_ONE" | ||
| "PS4" | ||
| "SWITCH_PRO" | ||
| "UNKNOWN_CONTROLLER"; | ||
readonly keyCodes: ReadonlyArray<number>; | ||
}; | ||
@@ -766,5 +771,5 @@ type Navigation = "NAVIGATE" | "SWAP" | "OVERLAY" | "SCROLL_TO" | "CHANGE_TO" | ||
FramePrototypingMixin, | ||
ReactionMixin {} | ||
ReactionMixin { } | ||
interface OpaqueNodeMixin extends BaseNodeMixin { | ||
interface OpaqueNodeMixin extends BaseNodeMixin { | ||
readonly absoluteTransform: Transform | ||
@@ -784,3 +789,3 @@ relativeTransform: Transform | ||
interface VariantMixin { | ||
readonly variantProperties: {[property: string]: string} | null | ||
readonly variantProperties: { [property: string]: string } | null | ||
} | ||
@@ -951,3 +956,3 @@ | ||
readonly defaultVariant: ComponentNode | ||
readonly variantGroupProperties: {[property: string]: {values: string[]}} | ||
readonly variantGroupProperties: { [property: string]: { values: string[] } } | ||
} | ||
@@ -966,3 +971,3 @@ | ||
swapComponent(componentNode: ComponentNode): void | ||
setProperties(properties: {[property: string]: string}): void | ||
setProperties(properties: { [property: string]: string }): void | ||
detachInstance(): FrameNode | ||
@@ -1014,2 +1019,9 @@ scaleFactor: number | ||
interface WidgetNode extends OpaqueNodeMixin, SceneNodeMixin { | ||
readonly type: 'WIDGET' | ||
readonly widgetSyncedState: { [key: string]: any } | ||
clone(): WidgetNode | ||
cloneWidget(overrides: { [key: string]: any }): WidgetNode | ||
} | ||
type BaseNode = | ||
@@ -1038,3 +1050,4 @@ DocumentNode | | ||
ShapeWithTextNode | | ||
StampNode | ||
StampNode | | ||
WidgetNode | ||
@@ -1104,4 +1117,21 @@ type NodeType = BaseNode['type'] | ||
} // declare global | ||
interface User { | ||
readonly id: string | null | ||
readonly name: string | ||
readonly photoUrl: string | null | ||
export {} | ||
// The current user's multiplayer color. This will match the color of their | ||
// dot stamps and cursor. | ||
readonly color: string | ||
readonly sessionId: number | ||
} | ||
interface ActiveUser extends User { | ||
readonly position: Vector | null | ||
readonly viewport: Rect | ||
readonly selection: string[] | ||
} | ||
} // declare global | ||
export { } |
{ | ||
"name": "@figma/plugin-typings", | ||
"version": "1.36.0", | ||
"version": "1.37.0", | ||
"description": "Typings for the Figma Plugin API", | ||
@@ -24,2 +24,2 @@ "main": "", | ||
"homepage": "https://github.com/figma/plugin-typings#readme" | ||
} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
38080
921
0