@figma/plugin-typings
Advanced tools
Comparing version 1.28.0 to 1.29.0
@@ -1,2 +0,2 @@ | ||
// Figma Plugin API version 1, update 14 | ||
// Figma Plugin API version 1, update 29 | ||
@@ -27,2 +27,4 @@ declare global { | ||
readonly parameters: ParametersAPI | ||
getNodeById(id: string): BaseNode | null | ||
@@ -34,5 +36,5 @@ getStyleById(id: string): BaseStyle | null | ||
on(type: "selectionchange" | "currentpagechange" | "close", callback: () => void): void | ||
once(type: "selectionchange" | "currentpagechange" | "close", callback: () => void): void | ||
off(type: "selectionchange" | "currentpagechange" | "close", callback: () => void): void | ||
on(type: "selectionchange" | "currentpagechange" | "close" | "run", callback: (event?: RunEvent) => void): void | ||
once(type: "selectionchange" | "currentpagechange" | "close" | "run", callback: (event?: RunEvent) => void): void | ||
off(type: "selectionchange" | "currentpagechange" | "close" | "run", callback: (event?: RunEvent) => void): void | ||
@@ -153,2 +155,23 @@ readonly mixed: unique symbol | ||
interface ParameterValues { | ||
[key: string]: string | ||
} | ||
interface SuggestionResults { | ||
setSuggestions: (suggestions: string[]) => void | ||
} | ||
type ParameterChangeHandler = (parameters: ParameterValues, suggestionKey: string, result: SuggestionResults) => void | ||
interface ParametersAPI { | ||
on(type: "input", callback: ParameterChangeHandler): void | ||
once(type: "input", callback: ParameterChangeHandler): void | ||
off(type: "input", callback: ParameterChangeHandler): void | ||
} | ||
interface RunEvent { | ||
command: string | ||
parameters?: ParameterValues | ||
} | ||
//////////////////////////////////////////////////////////////////////////////// | ||
@@ -155,0 +178,0 @@ // Datatypes |
{ | ||
"name": "@figma/plugin-typings", | ||
"version": "1.28.0", | ||
"version": "1.29.0", | ||
"description": "Typings for the Figma Plugin API", | ||
@@ -5,0 +5,0 @@ "main": "", |
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
32445
789
0