diff --git a/plugin-api-standalone.d.ts b/plugin-api-standalone.d.ts index 824dc0c..f0b5062 100644 --- a/plugin-api-standalone.d.ts +++ b/plugin-api-standalone.d.ts @@ -6249,6 +6249,13 @@ interface BaseNodeMixin extends PluginDataMixin, DevResourcesMixin { * Note: This property uses a set of heuristics to determine if a node is an asset. At a high level an icon is a small vector graphic and an image is a node with an image fill. */ readonly isAsset: boolean + /** + * Resolves to a JSON object of CSS properties of the node. This is the same CSS that Figma shows in the inspect panel and is helpful if you are building a [plugin for code generation](https://developers.figma.com/docs/plugins/codegen-plugins). + * + */ + getCSSAsync(): Promise<{ + [key: string]: string + }> /** * Returns the top-most frame that contains this node. If the node is not inside a frame, this will return undefined. * diff --git a/plugin-api.d.ts b/plugin-api.d.ts index 96d2b18..f97220e 100644 --- a/plugin-api.d.ts +++ b/plugin-api.d.ts @@ -6249,6 +6249,13 @@ interface BaseNodeMixin extends PluginDataMixin, DevResourcesMixin { * Note: This property uses a set of heuristics to determine if a node is an asset. At a high level an icon is a small vector graphic and an image is a node with an image fill. */ readonly isAsset: boolean + /** + * Resolves to a JSON object of CSS properties of the node. This is the same CSS that Figma shows in the inspect panel and is helpful if you are building a [plugin for code generation](https://developers.figma.com/docs/plugins/codegen-plugins). + * + */ + getCSSAsync(): Promise<{ + [key: string]: string + }> /** * Returns the top-most frame that contains this node. If the node is not inside a frame, this will return undefined. *