@figma/plugin-typings
Advanced tools
{ | ||
"name": "@figma/plugin-typings", | ||
"version": "1.82.0", | ||
"version": "1.83.0", | ||
"description": "Typings for the Figma Plugin API", | ||
@@ -5,0 +5,0 @@ "main": "", |
@@ -495,3 +495,3 @@ /* plugin-typings are auto-generated. Do not update them directly. See plugin-docs/ for instructions. */ | ||
interface BaseStyleChange extends BaseDocumentChange { | ||
style: PaintStyle | TextStyle | GridStyle | EffectStyle | null | ||
style: BaseStyle | null | ||
} | ||
@@ -1448,3 +1448,3 @@ interface StyleCreateChange extends BaseStyleChange { | ||
} | ||
interface SceneNodeMixin { | ||
interface SceneNodeMixin extends ExplicitVariableModesMixin { | ||
visible: boolean | ||
@@ -1481,7 +1481,2 @@ locked: boolean | ||
} | ||
explicitVariableModes: { | ||
[collectionId: string]: string | ||
} | ||
clearExplicitVariableModeForCollection(collectionId: string): void | ||
setExplicitVariableModeForCollection(collectionId: string, modeId: string): void | ||
} | ||
@@ -1514,4 +1509,7 @@ declare type VariableBindableNodeField = | ||
declare type VariableBindablePaintField = 'color' | ||
declare type VariableBindablePaintStyleField = 'paints' | ||
declare type VariableBindableEffectField = 'color' | 'radius' | 'spread' | 'offsetX' | 'offsetY' | ||
declare type VariableBindableEffectStyleField = 'effects' | ||
declare type VariableBindableLayoutGridField = 'sectionSize' | 'count' | 'offset' | 'gutterSize' | ||
declare type VariableBindableGridStyleField = 'layoutGrids' | ||
declare type VariableBindableComponentPropertyField = 'value' | ||
@@ -1834,3 +1832,10 @@ interface StickableMixin { | ||
} | ||
interface PageNode extends BaseNodeMixin, ChildrenMixin, ExportMixin { | ||
interface ExplicitVariableModesMixin { | ||
explicitVariableModes: { | ||
[collectionId: string]: string | ||
} | ||
clearExplicitVariableModeForCollection(collectionId: string): void | ||
setExplicitVariableModeForCollection(collectionId: string, modeId: string): void | ||
} | ||
interface PageNode extends BaseNodeMixin, ChildrenMixin, ExportMixin, ExplicitVariableModesMixin { | ||
readonly type: 'PAGE' | ||
@@ -2300,3 +2305,3 @@ clone(): PageNode | ||
} | ||
interface BaseStyle extends PublishableMixin, PluginDataMixin { | ||
interface BaseStyleMixin extends PublishableMixin, PluginDataMixin { | ||
readonly id: string | ||
@@ -2308,7 +2313,10 @@ readonly type: StyleType | ||
} | ||
interface PaintStyle extends BaseStyle { | ||
interface PaintStyle extends BaseStyleMixin { | ||
type: 'PAINT' | ||
paints: ReadonlyArray<Paint> | ||
readonly boundVariables?: { | ||
readonly [field in VariableBindablePaintStyleField]?: VariableAlias[] | ||
} | ||
} | ||
interface TextStyle extends BaseStyle { | ||
interface TextStyle extends BaseStyleMixin { | ||
type: 'TEXT' | ||
@@ -2328,10 +2336,17 @@ fontSize: number | ||
} | ||
interface EffectStyle extends BaseStyle { | ||
interface EffectStyle extends BaseStyleMixin { | ||
type: 'EFFECT' | ||
effects: ReadonlyArray<Effect> | ||
readonly boundVariables?: { | ||
readonly [field in VariableBindableEffectStyleField]?: VariableAlias[] | ||
} | ||
} | ||
interface GridStyle extends BaseStyle { | ||
interface GridStyle extends BaseStyleMixin { | ||
type: 'GRID' | ||
layoutGrids: ReadonlyArray<LayoutGrid> | ||
readonly boundVariables?: { | ||
readonly [field in VariableBindableGridStyleField]?: VariableAlias[] | ||
} | ||
} | ||
declare type BaseStyle = PaintStyle | TextStyle | EffectStyle | GridStyle | ||
interface Image { | ||
@@ -2338,0 +2353,0 @@ readonly hash: string |
72732
0.92%2439
0.62%