@types/figma
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -20,3 +20,3 @@ // Type definitions for Figma API 1.0 | ||
interface PluginAPI { | ||
readonly apiVersion: '1.0.0'; | ||
readonly apiVersion: "1.0.0"; | ||
readonly command: string; | ||
@@ -39,5 +39,5 @@ readonly viewport: ViewportAPI; | ||
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", callback: () => void): void; | ||
once(type: "selectionchange" | "currentpagechange" | "close", callback: () => void): void; | ||
off(type: "selectionchange" | "currentpagechange" | "close", callback: () => void): void; | ||
@@ -140,5 +140,5 @@ readonly mixed: unique symbol; | ||
onmessage: MessageEventHandler | undefined; | ||
on(type: 'message', callback: MessageEventHandler): void; | ||
once(type: 'message', callback: MessageEventHandler): void; | ||
off(type: 'message', callback: MessageEventHandler): void; | ||
on(type: "message", callback: MessageEventHandler): void; | ||
once(type: "message", callback: MessageEventHandler): void; | ||
off(type: "message", callback: MessageEventHandler): void; | ||
} | ||
@@ -188,5 +188,5 @@ | ||
type TextCase = 'ORIGINAL' | 'UPPER' | 'LOWER' | 'TITLE'; | ||
type TextCase = "ORIGINAL" | "UPPER" | "LOWER" | "TITLE"; | ||
type TextDecoration = 'NONE' | 'UNDERLINE' | 'STRIKETHROUGH'; | ||
type TextDecoration = "NONE" | "UNDERLINE" | "STRIKETHROUGH"; | ||
@@ -200,3 +200,3 @@ interface ArcData { | ||
interface ShadowEffect { | ||
readonly type: 'DROP_SHADOW' | 'INNER_SHADOW'; | ||
readonly type: "DROP_SHADOW" | "INNER_SHADOW"; | ||
readonly color: RGBA; | ||
@@ -210,3 +210,3 @@ readonly offset: Vector; | ||
interface BlurEffect { | ||
readonly type: 'LAYER_BLUR' | 'BACKGROUND_BLUR'; | ||
readonly type: "LAYER_BLUR" | "BACKGROUND_BLUR"; | ||
readonly radius: number; | ||
@@ -218,3 +218,3 @@ readonly visible: boolean; | ||
type ConstraintType = 'MIN' | 'CENTER' | 'MAX' | 'STRETCH' | 'SCALE'; | ||
type ConstraintType = "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE"; | ||
@@ -242,3 +242,3 @@ interface Constraints { | ||
interface SolidPaint { | ||
readonly type: 'SOLID'; | ||
readonly type: "SOLID"; | ||
readonly color: RGB; | ||
@@ -252,3 +252,3 @@ | ||
interface GradientPaint { | ||
readonly type: 'GRADIENT_LINEAR' | 'GRADIENT_RADIAL' | 'GRADIENT_ANGULAR' | 'GRADIENT_DIAMOND'; | ||
readonly type: "GRADIENT_LINEAR" | "GRADIENT_RADIAL" | "GRADIENT_ANGULAR" | "GRADIENT_DIAMOND"; | ||
readonly gradientTransform: Transform; | ||
@@ -263,4 +263,4 @@ readonly gradientStops: ReadonlyArray<ColorStop>; | ||
interface ImagePaint { | ||
readonly type: 'IMAGE'; | ||
readonly scaleMode: 'FILL' | 'FIT' | 'CROP' | 'TILE'; | ||
readonly type: "IMAGE"; | ||
readonly scaleMode: "FILL" | "FIT" | "CROP" | "TILE"; | ||
readonly imageHash: string | null; | ||
@@ -279,3 +279,3 @@ readonly imageTransform?: Transform | undefined; // setting for "CROP" | ||
interface Guide { | ||
readonly axis: 'X' | 'Y'; | ||
readonly axis: "X" | "Y"; | ||
readonly offset: number; | ||
@@ -285,4 +285,4 @@ } | ||
interface RowsColsLayoutGrid { | ||
readonly pattern: 'ROWS' | 'COLUMNS'; | ||
readonly alignment: 'MIN' | 'MAX' | 'STRETCH' | 'CENTER'; | ||
readonly pattern: "ROWS" | "COLUMNS"; | ||
readonly alignment: "MIN" | "MAX" | "STRETCH" | "CENTER"; | ||
readonly gutterSize: number; | ||
@@ -299,3 +299,3 @@ | ||
interface GridLayoutGrid { | ||
readonly pattern: 'GRID'; | ||
readonly pattern: "GRID"; | ||
readonly sectionSize: number; | ||
@@ -310,3 +310,3 @@ | ||
interface ExportSettingsConstraints { | ||
readonly type: 'SCALE' | 'WIDTH' | 'HEIGHT'; | ||
readonly type: "SCALE" | "WIDTH" | "HEIGHT"; | ||
readonly value: number; | ||
@@ -316,3 +316,3 @@ } | ||
interface ExportSettingsImage { | ||
readonly format: 'JPG' | 'PNG'; | ||
readonly format: "JPG" | "PNG"; | ||
readonly contentsOnly?: boolean | undefined; // defaults to true | ||
@@ -324,3 +324,3 @@ readonly suffix?: string | undefined; | ||
interface ExportSettingsSVG { | ||
readonly format: 'SVG'; | ||
readonly format: "SVG"; | ||
readonly contentsOnly?: boolean | undefined; // defaults to true | ||
@@ -334,3 +334,3 @@ readonly suffix?: string | undefined; | ||
interface ExportSettingsPDF { | ||
readonly format: 'PDF'; | ||
readonly format: "PDF"; | ||
readonly contentsOnly?: boolean | undefined; // defaults to true | ||
@@ -342,3 +342,3 @@ readonly suffix?: string | undefined; | ||
type WindingRule = 'NONZERO' | 'EVENODD'; | ||
type WindingRule = "NONZERO" | "EVENODD"; | ||
@@ -373,3 +373,3 @@ interface VectorVertex { | ||
interface VectorPath { | ||
readonly windingRule: WindingRule | 'NONE'; | ||
readonly windingRule: WindingRule | "NONE"; | ||
readonly data: string; | ||
@@ -382,3 +382,3 @@ } | ||
readonly value: number; | ||
readonly unit: 'PIXELS' | 'PERCENT'; | ||
readonly unit: "PIXELS" | "PERCENT"; | ||
} | ||
@@ -388,29 +388,29 @@ | ||
| { | ||
readonly value: number; | ||
readonly unit: 'PIXELS' | 'PERCENT'; | ||
} | ||
readonly value: number; | ||
readonly unit: "PIXELS" | "PERCENT"; | ||
} | ||
| { | ||
readonly unit: 'AUTO'; | ||
}; | ||
readonly unit: "AUTO"; | ||
}; | ||
type BlendMode = | ||
| 'PASS_THROUGH' | ||
| 'NORMAL' | ||
| 'DARKEN' | ||
| 'MULTIPLY' | ||
| 'LINEAR_BURN' | ||
| 'COLOR_BURN' | ||
| 'LIGHTEN' | ||
| 'SCREEN' | ||
| 'LINEAR_DODGE' | ||
| 'COLOR_DODGE' | ||
| 'OVERLAY' | ||
| 'SOFT_LIGHT' | ||
| 'HARD_LIGHT' | ||
| 'DIFFERENCE' | ||
| 'EXCLUSION' | ||
| 'HUE' | ||
| 'SATURATION' | ||
| 'COLOR' | ||
| 'LUMINOSITY'; | ||
| "PASS_THROUGH" | ||
| "NORMAL" | ||
| "DARKEN" | ||
| "MULTIPLY" | ||
| "LINEAR_BURN" | ||
| "COLOR_BURN" | ||
| "LIGHTEN" | ||
| "SCREEN" | ||
| "LINEAR_DODGE" | ||
| "COLOR_DODGE" | ||
| "OVERLAY" | ||
| "SOFT_LIGHT" | ||
| "HARD_LIGHT" | ||
| "DIFFERENCE" | ||
| "EXCLUSION" | ||
| "HUE" | ||
| "SATURATION" | ||
| "COLOR" | ||
| "LUMINOSITY"; | ||
@@ -427,18 +427,18 @@ interface Font { | ||
type Action = | ||
| { readonly type: 'BACK' | 'CLOSE' } | ||
| { readonly type: 'URL'; url: string } | ||
| { readonly type: "BACK" | "CLOSE" } | ||
| { readonly type: "URL"; url: string } | ||
| { | ||
readonly type: 'NODE'; | ||
readonly destinationId: string | null; | ||
readonly navigation: Navigation; | ||
readonly transition: Transition | null; | ||
readonly preserveScrollPosition: boolean; | ||
readonly type: "NODE"; | ||
readonly destinationId: string | null; | ||
readonly navigation: Navigation; | ||
readonly transition: Transition | null; | ||
readonly preserveScrollPosition: boolean; | ||
// Only present if navigation == "OVERLAY" and the destination uses | ||
// overlay position type "RELATIVE" | ||
readonly overlayRelativePosition?: Vector | undefined; | ||
}; | ||
// Only present if navigation == "OVERLAY" and the destination uses | ||
// overlay position type "RELATIVE" | ||
readonly overlayRelativePosition?: Vector | undefined; | ||
}; | ||
interface SimpleTransition { | ||
readonly type: 'DISSOLVE' | 'SMART_ANIMATE'; | ||
readonly type: "DISSOLVE" | "SMART_ANIMATE"; | ||
readonly easing: Easing; | ||
@@ -449,4 +449,4 @@ readonly duration: number; | ||
interface DirectionalTransition { | ||
readonly type: 'MOVE_IN' | 'MOVE_OUT' | 'PUSH' | 'SLIDE_IN' | 'SLIDE_OUT'; | ||
readonly direction: 'LEFT' | 'RIGHT' | 'TOP' | 'BOTTOM'; | ||
readonly type: "MOVE_IN" | "MOVE_OUT" | "PUSH" | "SLIDE_IN" | "SLIDE_OUT"; | ||
readonly direction: "LEFT" | "RIGHT" | "TOP" | "BOTTOM"; | ||
readonly matchLayers: boolean; | ||
@@ -461,27 +461,27 @@ | ||
type Trigger = | ||
| { readonly type: 'ON_CLICK' | 'ON_HOVER' | 'ON_PRESS' | 'ON_DRAG' } | ||
| { readonly type: 'AFTER_TIMEOUT'; readonly timeout: number } | ||
| { readonly type: 'MOUSE_ENTER' | 'MOUSE_LEAVE' | 'MOUSE_UP' | 'MOUSE_DOWN'; readonly delay: number }; | ||
| { readonly type: "ON_CLICK" | "ON_HOVER" | "ON_PRESS" | "ON_DRAG" } | ||
| { readonly type: "AFTER_TIMEOUT"; readonly timeout: number } | ||
| { readonly type: "MOUSE_ENTER" | "MOUSE_LEAVE" | "MOUSE_UP" | "MOUSE_DOWN"; readonly delay: number }; | ||
type Navigation = 'NAVIGATE' | 'SWAP' | 'OVERLAY'; | ||
type Navigation = "NAVIGATE" | "SWAP" | "OVERLAY"; | ||
interface Easing { | ||
readonly type: 'EASE_IN' | 'EASE_OUT' | 'EASE_IN_AND_OUT' | 'LINEAR'; | ||
readonly type: "EASE_IN" | "EASE_OUT" | "EASE_IN_AND_OUT" | "LINEAR"; | ||
} | ||
type OverflowDirection = 'NONE' | 'HORIZONTAL' | 'VERTICAL' | 'BOTH'; | ||
type OverflowDirection = "NONE" | "HORIZONTAL" | "VERTICAL" | "BOTH"; | ||
type OverlayPositionType = | ||
| 'CENTER' | ||
| 'TOP_LEFT' | ||
| 'TOP_CENTER' | ||
| 'TOP_RIGHT' | ||
| 'BOTTOM_LEFT' | ||
| 'BOTTOM_CENTER' | ||
| 'BOTTOM_RIGHT' | ||
| 'MANUAL'; | ||
| "CENTER" | ||
| "TOP_LEFT" | ||
| "TOP_CENTER" | ||
| "TOP_RIGHT" | ||
| "BOTTOM_LEFT" | ||
| "BOTTOM_CENTER" | ||
| "BOTTOM_RIGHT" | ||
| "MANUAL"; | ||
type OverlayBackground = { readonly type: 'NONE' } | { readonly type: 'SOLID_COLOR'; readonly color: RGBA }; | ||
type OverlayBackground = { readonly type: "NONE" } | { readonly type: "SOLID_COLOR"; readonly color: RGBA }; | ||
type OverlayBackgroundInteraction = 'NONE' | 'CLOSE_ON_CLICK_OUTSIDE'; | ||
type OverlayBackgroundInteraction = "NONE" | "CLOSE_ON_CLICK_OUTSIDE"; | ||
@@ -551,3 +551,3 @@ //////////////////////////////////////////////////////////////////////////////// | ||
layoutAlign: 'MIN' | 'CENTER' | 'MAX' | 'STRETCH'; // applicable only inside auto-layout frames | ||
layoutAlign: "MIN" | "CENTER" | "MAX" | "STRETCH"; // applicable only inside auto-layout frames | ||
@@ -572,16 +572,16 @@ resize(width: number, height: number): void; | ||
type StrokeCap = 'NONE' | 'ROUND' | 'SQUARE' | 'ARROW_LINES' | 'ARROW_EQUILATERAL'; | ||
type StrokeJoin = 'MITER' | 'BEVEL' | 'ROUND'; | ||
type HandleMirroring = 'NONE' | 'ANGLE' | 'ANGLE_AND_LENGTH'; | ||
type StrokeCap = "NONE" | "ROUND" | "SQUARE" | "ARROW_LINES" | "ARROW_EQUILATERAL"; | ||
type StrokeJoin = "MITER" | "BEVEL" | "ROUND"; | ||
type HandleMirroring = "NONE" | "ANGLE" | "ANGLE_AND_LENGTH"; | ||
interface GeometryMixin { | ||
fills: ReadonlyArray<Paint> | PluginAPI['mixed']; | ||
fills: ReadonlyArray<Paint> | PluginAPI["mixed"]; | ||
strokes: ReadonlyArray<Paint>; | ||
strokeWeight: number; | ||
strokeMiterLimit: number; | ||
strokeAlign: 'CENTER' | 'INSIDE' | 'OUTSIDE'; | ||
strokeCap: StrokeCap | PluginAPI['mixed']; | ||
strokeJoin: StrokeJoin | PluginAPI['mixed']; | ||
strokeAlign: "CENTER" | "INSIDE" | "OUTSIDE"; | ||
strokeCap: StrokeCap | PluginAPI["mixed"]; | ||
strokeJoin: StrokeJoin | PluginAPI["mixed"]; | ||
dashPattern: ReadonlyArray<number>; | ||
fillStyleId: string | PluginAPI['mixed']; | ||
fillStyleId: string | PluginAPI["mixed"]; | ||
strokeStyleId: string; | ||
@@ -592,3 +592,3 @@ outlineStroke(): VectorNode | null; | ||
interface CornerMixin { | ||
cornerRadius: number | PluginAPI['mixed']; | ||
cornerRadius: number | PluginAPI["mixed"]; | ||
cornerSmoothing: number; | ||
@@ -614,12 +614,8 @@ } | ||
interface DefaultShapeMixin | ||
extends BaseNodeMixin, | ||
SceneNodeMixin, | ||
ReactionMixin, | ||
BlendMixin, | ||
GeometryMixin, | ||
LayoutMixin, | ||
ExportMixin {} | ||
extends BaseNodeMixin, SceneNodeMixin, ReactionMixin, BlendMixin, GeometryMixin, LayoutMixin, ExportMixin | ||
{} | ||
interface DefaultFrameMixin | ||
extends BaseNodeMixin, | ||
extends | ||
BaseNodeMixin, | ||
SceneNodeMixin, | ||
@@ -635,5 +631,6 @@ ReactionMixin, | ||
LayoutMixin, | ||
ExportMixin { | ||
layoutMode: 'NONE' | 'HORIZONTAL' | 'VERTICAL'; | ||
counterAxisSizingMode: 'FIXED' | 'AUTO'; // applicable only if layoutMode != "NONE" | ||
ExportMixin | ||
{ | ||
layoutMode: "NONE" | "HORIZONTAL" | "VERTICAL"; | ||
counterAxisSizingMode: "FIXED" | "AUTO"; // applicable only if layoutMode != "NONE" | ||
horizontalPadding: number; // applicable only if layoutMode != "NONE" | ||
@@ -660,3 +657,3 @@ verticalPadding: number; // applicable only if layoutMode != "NONE" | ||
interface DocumentNode extends BaseNodeMixin { | ||
readonly type: 'DOCUMENT'; | ||
readonly type: "DOCUMENT"; | ||
@@ -684,3 +681,3 @@ readonly children: ReadonlyArray<PageNode>; | ||
interface PageNode extends BaseNodeMixin, ChildrenMixin, ExportMixin { | ||
readonly type: 'PAGE'; | ||
readonly type: "PAGE"; | ||
clone(): PageNode; | ||
@@ -698,3 +695,3 @@ | ||
interface FrameNode extends DefaultFrameMixin { | ||
readonly type: 'FRAME'; | ||
readonly type: "FRAME"; | ||
clone(): FrameNode; | ||
@@ -704,3 +701,4 @@ } | ||
interface GroupNode | ||
extends BaseNodeMixin, | ||
extends | ||
BaseNodeMixin, | ||
SceneNodeMixin, | ||
@@ -712,4 +710,5 @@ ReactionMixin, | ||
LayoutMixin, | ||
ExportMixin { | ||
readonly type: 'GROUP'; | ||
ExportMixin | ||
{ | ||
readonly type: "GROUP"; | ||
clone(): GroupNode; | ||
@@ -719,3 +718,3 @@ } | ||
interface SliceNode extends BaseNodeMixin, SceneNodeMixin, LayoutMixin, ExportMixin { | ||
readonly type: 'SLICE'; | ||
readonly type: "SLICE"; | ||
clone(): SliceNode; | ||
@@ -725,3 +724,3 @@ } | ||
interface RectangleNode extends DefaultShapeMixin, ConstraintMixin, CornerMixin, RectangleCornerMixin { | ||
readonly type: 'RECTANGLE'; | ||
readonly type: "RECTANGLE"; | ||
clone(): RectangleNode; | ||
@@ -731,3 +730,3 @@ } | ||
interface LineNode extends DefaultShapeMixin, ConstraintMixin { | ||
readonly type: 'LINE'; | ||
readonly type: "LINE"; | ||
clone(): LineNode; | ||
@@ -737,3 +736,3 @@ } | ||
interface EllipseNode extends DefaultShapeMixin, ConstraintMixin, CornerMixin { | ||
readonly type: 'ELLIPSE'; | ||
readonly type: "ELLIPSE"; | ||
clone(): EllipseNode; | ||
@@ -744,3 +743,3 @@ arcData: ArcData; | ||
interface PolygonNode extends DefaultShapeMixin, ConstraintMixin, CornerMixin { | ||
readonly type: 'POLYGON'; | ||
readonly type: "POLYGON"; | ||
clone(): PolygonNode; | ||
@@ -751,3 +750,3 @@ pointCount: number; | ||
interface StarNode extends DefaultShapeMixin, ConstraintMixin, CornerMixin { | ||
readonly type: 'STAR'; | ||
readonly type: "STAR"; | ||
clone(): StarNode; | ||
@@ -759,16 +758,16 @@ pointCount: number; | ||
interface VectorNode extends DefaultShapeMixin, ConstraintMixin, CornerMixin { | ||
readonly type: 'VECTOR'; | ||
readonly type: "VECTOR"; | ||
clone(): VectorNode; | ||
vectorNetwork: VectorNetwork; | ||
vectorPaths: VectorPaths; | ||
handleMirroring: HandleMirroring | PluginAPI['mixed']; | ||
handleMirroring: HandleMirroring | PluginAPI["mixed"]; | ||
} | ||
interface TextNode extends DefaultShapeMixin, ConstraintMixin { | ||
readonly type: 'TEXT'; | ||
readonly type: "TEXT"; | ||
clone(): TextNode; | ||
readonly hasMissingFont: boolean; | ||
textAlignHorizontal: 'LEFT' | 'CENTER' | 'RIGHT' | 'JUSTIFIED'; | ||
textAlignVertical: 'TOP' | 'CENTER' | 'BOTTOM'; | ||
textAutoResize: 'NONE' | 'WIDTH_AND_HEIGHT' | 'HEIGHT'; | ||
textAlignHorizontal: "LEFT" | "CENTER" | "RIGHT" | "JUSTIFIED"; | ||
textAlignVertical: "TOP" | "CENTER" | "BOTTOM"; | ||
textAutoResize: "NONE" | "WIDTH_AND_HEIGHT" | "HEIGHT"; | ||
paragraphIndent: number; | ||
@@ -778,31 +777,31 @@ paragraphSpacing: number; | ||
textStyleId: string | PluginAPI['mixed']; | ||
fontSize: number | PluginAPI['mixed']; | ||
fontName: FontName | PluginAPI['mixed']; | ||
textCase: TextCase | PluginAPI['mixed']; | ||
textDecoration: TextDecoration | PluginAPI['mixed']; | ||
letterSpacing: LetterSpacing | PluginAPI['mixed']; | ||
lineHeight: LineHeight | PluginAPI['mixed']; | ||
textStyleId: string | PluginAPI["mixed"]; | ||
fontSize: number | PluginAPI["mixed"]; | ||
fontName: FontName | PluginAPI["mixed"]; | ||
textCase: TextCase | PluginAPI["mixed"]; | ||
textDecoration: TextDecoration | PluginAPI["mixed"]; | ||
letterSpacing: LetterSpacing | PluginAPI["mixed"]; | ||
lineHeight: LineHeight | PluginAPI["mixed"]; | ||
characters: string; | ||
insertCharacters(start: number, characters: string, useStyle?: 'BEFORE' | 'AFTER'): void; | ||
insertCharacters(start: number, characters: string, useStyle?: "BEFORE" | "AFTER"): void; | ||
deleteCharacters(start: number, end: number): void; | ||
getRangeFontSize(start: number, end: number): number | PluginAPI['mixed']; | ||
getRangeFontSize(start: number, end: number): number | PluginAPI["mixed"]; | ||
setRangeFontSize(start: number, end: number, value: number): void; | ||
getRangeFontName(start: number, end: number): FontName | PluginAPI['mixed']; | ||
getRangeFontName(start: number, end: number): FontName | PluginAPI["mixed"]; | ||
setRangeFontName(start: number, end: number, value: FontName): void; | ||
getRangeTextCase(start: number, end: number): TextCase | PluginAPI['mixed']; | ||
getRangeTextCase(start: number, end: number): TextCase | PluginAPI["mixed"]; | ||
setRangeTextCase(start: number, end: number, value: TextCase): void; | ||
getRangeTextDecoration(start: number, end: number): TextDecoration | PluginAPI['mixed']; | ||
getRangeTextDecoration(start: number, end: number): TextDecoration | PluginAPI["mixed"]; | ||
setRangeTextDecoration(start: number, end: number, value: TextDecoration): void; | ||
getRangeLetterSpacing(start: number, end: number): LetterSpacing | PluginAPI['mixed']; | ||
getRangeLetterSpacing(start: number, end: number): LetterSpacing | PluginAPI["mixed"]; | ||
setRangeLetterSpacing(start: number, end: number, value: LetterSpacing): void; | ||
getRangeLineHeight(start: number, end: number): LineHeight | PluginAPI['mixed']; | ||
getRangeLineHeight(start: number, end: number): LineHeight | PluginAPI["mixed"]; | ||
setRangeLineHeight(start: number, end: number, value: LineHeight): void; | ||
getRangeFills(start: number, end: number): Paint[] | PluginAPI['mixed']; | ||
getRangeFills(start: number, end: number): Paint[] | PluginAPI["mixed"]; | ||
setRangeFills(start: number, end: number, value: Paint[]): void; | ||
getRangeTextStyleId(start: number, end: number): string | PluginAPI['mixed']; | ||
getRangeTextStyleId(start: number, end: number): string | PluginAPI["mixed"]; | ||
setRangeTextStyleId(start: number, end: number, value: string): void; | ||
getRangeFillStyleId(start: number, end: number): string | PluginAPI['mixed']; | ||
getRangeFillStyleId(start: number, end: number): string | PluginAPI["mixed"]; | ||
setRangeFillStyleId(start: number, end: number, value: string): void; | ||
@@ -812,3 +811,3 @@ } | ||
interface ComponentNode extends DefaultFrameMixin { | ||
readonly type: 'COMPONENT'; | ||
readonly type: "COMPONENT"; | ||
clone(): ComponentNode; | ||
@@ -823,3 +822,3 @@ | ||
interface InstanceNode extends DefaultFrameMixin { | ||
readonly type: 'INSTANCE'; | ||
readonly type: "INSTANCE"; | ||
clone(): InstanceNode; | ||
@@ -831,5 +830,5 @@ masterComponent: ComponentNode; | ||
interface BooleanOperationNode extends DefaultShapeMixin, ChildrenMixin, CornerMixin { | ||
readonly type: 'BOOLEAN_OPERATION'; | ||
readonly type: "BOOLEAN_OPERATION"; | ||
clone(): BooleanOperationNode; | ||
booleanOperation: 'UNION' | 'INTERSECT' | 'SUBTRACT' | 'EXCLUDE'; | ||
booleanOperation: "UNION" | "INTERSECT" | "SUBTRACT" | "EXCLUDE"; | ||
@@ -857,21 +856,21 @@ expanded: boolean; | ||
type NodeType = | ||
| 'DOCUMENT' | ||
| 'PAGE' | ||
| 'SLICE' | ||
| 'FRAME' | ||
| 'GROUP' | ||
| 'COMPONENT' | ||
| 'INSTANCE' | ||
| 'BOOLEAN_OPERATION' | ||
| 'VECTOR' | ||
| 'STAR' | ||
| 'LINE' | ||
| 'ELLIPSE' | ||
| 'POLYGON' | ||
| 'RECTANGLE' | ||
| 'TEXT'; | ||
| "DOCUMENT" | ||
| "PAGE" | ||
| "SLICE" | ||
| "FRAME" | ||
| "GROUP" | ||
| "COMPONENT" | ||
| "INSTANCE" | ||
| "BOOLEAN_OPERATION" | ||
| "VECTOR" | ||
| "STAR" | ||
| "LINE" | ||
| "ELLIPSE" | ||
| "POLYGON" | ||
| "RECTANGLE" | ||
| "TEXT"; | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// Styles | ||
type StyleType = 'PAINT' | 'TEXT' | 'EFFECT' | 'GRID'; | ||
type StyleType = "PAINT" | "TEXT" | "EFFECT" | "GRID"; | ||
@@ -889,3 +888,3 @@ interface BaseStyle { | ||
interface PaintStyle extends BaseStyle { | ||
type: 'PAINT'; | ||
type: "PAINT"; | ||
paints: ReadonlyArray<Paint>; | ||
@@ -895,3 +894,3 @@ } | ||
interface TextStyle extends BaseStyle { | ||
type: 'TEXT'; | ||
type: "TEXT"; | ||
fontSize: number; | ||
@@ -908,3 +907,3 @@ textDecoration: TextDecoration; | ||
interface EffectStyle extends BaseStyle { | ||
type: 'EFFECT'; | ||
type: "EFFECT"; | ||
effects: ReadonlyArray<Effect>; | ||
@@ -914,3 +913,3 @@ } | ||
interface GridStyle extends BaseStyle { | ||
type: 'GRID'; | ||
type: "GRID"; | ||
layoutGrids: ReadonlyArray<LayoutGrid>; | ||
@@ -917,0 +916,0 @@ } |
{ | ||
"name": "@types/figma", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "TypeScript definitions for Figma API", | ||
@@ -23,4 +23,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/figma", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "0dcf5f21eabf6e247be49326a8c746b036cabf48bb287c2b475b189bb9afd3b4", | ||
"typeScriptVersion": "3.6" | ||
"typesPublisherContentHash": "558f79c331c5dcc7ecc55637e384e9c9727d85abc37ce8e6430ce9723eaac369", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Thu, 08 Jul 2021 12:01:35 GMT | ||
* Last updated: Thu, 14 Sep 2023 15:26:41 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31279
719