From 7fb0ba8226dbf993706b22937a26951c3178ec65 Mon Sep 17 00:00:00 2001 From: Alex Hurtado Date: Wed, 13 May 2026 13:58:42 -0400 Subject: [PATCH] Updated plugin-typings --- plugin-api-standalone.d.ts | 22 +++++++++++++++++++--- plugin-api.d.ts | 22 +++++++++++++++++++--- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/plugin-api-standalone.d.ts b/plugin-api-standalone.d.ts index cbc2dfc..19cc40b 100644 --- a/plugin-api-standalone.d.ts +++ b/plugin-api-standalone.d.ts @@ -8854,15 +8854,15 @@ interface NonResizableTextMixin extends BaseNonResizableTextMixin { /** * The indentation of paragraphs (offset of the first line from the left). Setting this property requires the font the be loaded. */ - paragraphIndent: number + paragraphIndent: number | PluginAPI['mixed'] /** * The vertical distance between paragraphs. Setting this property requires the font to be loaded. */ - paragraphSpacing: number + paragraphSpacing: number | PluginAPI['mixed'] /** * The vertical distance between lines of a list. */ - listSpacing: number + listSpacing: number | PluginAPI['mixed'] /** * Whether punctuation, like quotation marks, hangs outside the text box. */ @@ -9867,6 +9867,12 @@ interface SlotNode extends DefaultFrameMixin { * The type of this node, represented by the string literal "SLOT" */ readonly type: 'SLOT' + /** + * Create a copy of this node. By default, the duplicate will be parented under `figma.currentPage`. + * The clone is returned as a plain `FrameNode` rather than a `SlotNode`, because slots are + * defined by a component property reference that only makes sense inside their parent component. + */ + clone(): FrameNode /** * Resets a given slot node to the original component slot content. */ @@ -10860,6 +10866,16 @@ interface SectionNode * */ resizeWithoutConstraints(width: number, height: number): void + /** + * Resizes the section node. Sections do not propagate constraints to their + * children, so this behaves equivalently to {@link SectionNode.resizeWithoutConstraints} + * and is provided to match the resize ergonomics of other resizable nodes. + * + * @param width - New width of the node. Must be >= 0.01 + * @param height - New height of the node. Must be >= 0.01 + * + */ + resize(width: number, height: number): void } /** * @see https://developers.figma.com/docs/plugins/api/SlideNode diff --git a/plugin-api.d.ts b/plugin-api.d.ts index d546796..33287c2 100644 --- a/plugin-api.d.ts +++ b/plugin-api.d.ts @@ -8850,15 +8850,15 @@ interface NonResizableTextMixin extends BaseNonResizableTextMixin { /** * The indentation of paragraphs (offset of the first line from the left). Setting this property requires the font the be loaded. */ - paragraphIndent: number + paragraphIndent: number | PluginAPI['mixed'] /** * The vertical distance between paragraphs. Setting this property requires the font to be loaded. */ - paragraphSpacing: number + paragraphSpacing: number | PluginAPI['mixed'] /** * The vertical distance between lines of a list. */ - listSpacing: number + listSpacing: number | PluginAPI['mixed'] /** * Whether punctuation, like quotation marks, hangs outside the text box. */ @@ -9863,6 +9863,12 @@ interface SlotNode extends DefaultFrameMixin { * The type of this node, represented by the string literal "SLOT" */ readonly type: 'SLOT' + /** + * Create a copy of this node. By default, the duplicate will be parented under `figma.currentPage`. + * The clone is returned as a plain `FrameNode` rather than a `SlotNode`, because slots are + * defined by a component property reference that only makes sense inside their parent component. + */ + clone(): FrameNode /** * Resets a given slot node to the original component slot content. */ @@ -10856,6 +10862,16 @@ interface SectionNode * */ resizeWithoutConstraints(width: number, height: number): void + /** + * Resizes the section node. Sections do not propagate constraints to their + * children, so this behaves equivalently to {@link SectionNode.resizeWithoutConstraints} + * and is provided to match the resize ergonomics of other resizable nodes. + * + * @param width - New width of the node. Must be >= 0.01 + * @param height - New height of the node. Must be >= 0.01 + * + */ + resize(width: number, height: number): void } /** * @see https://developers.figma.com/docs/plugins/api/SlideNode