diff --git a/lib/api-funcs.d.ts b/lib/api-funcs.d.ts index 2de83cc..c9931d2 100644 --- a/lib/api-funcs.d.ts +++ b/lib/api-funcs.d.ts @@ -1,4 +1,4 @@ -import { Vector, FrameOffset } from "./ast-types"; +import { Vector, FrameOffset, NodeType } from "./ast-types"; import { GetFileResult, GetFileNodesResult, GetImageResult, GetImageFillsResult, GetCommentsResult, PostCommentResult, DeleteCommentsResult, GetUserMeResult, GetVersionsResult, GetTeamProjectsResult, GetProjectFilesResult, GetTeamComponentsResult, GetFileComponentsResult, GetComponentResult, GetTeamComponentSetsResult, GetFileComponentSetsResult, GetComponentSetResult, GetTeamStylesResult, GetFileStylesResult, GetStyleResult } from "./api-types"; import { ApiRequestMethod } from "./utils"; declare type ApiClass = { @@ -25,7 +25,7 @@ fileKey: string, opts?: { /** Set to returns branch metadata for the requested file */ branch_data?: boolean; }): Promise; -export declare function getFileNodesApi(this: ApiClass, +export declare function getFileNodesApi(this: ApiClass, /** * File to export JSON from * diff --git a/lib/api-funcs.js.map b/lib/api-funcs.js.map index 2e57910..c77f7a7 100644 --- a/lib/api-funcs.js.map +++ b/lib/api-funcs.js.map @@ -1 +1 @@ -{"version":3,"file":"api-funcs.js","sourceRoot":"","sources":["../src/api-funcs.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mCAA+C;AAwB/C,iCAA0D;AAM1D,cAAc;AACd,oEAAoE;AAEpE,SAAgB,UAAU;AACtB;;;;;GAKG;AACH,OAAe,EACf,IAaC;IAED,IAAM,WAAW,GAAG,qBAAa,cAAM,IAAI,IAAE,GAAG,EAAE,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAG,CAAC;IAC5F,OAAO,IAAI,CAAC,OAAO,CAAmB,mBAAU,SAAI,gBAAO,eAAU,OAAO,SAAI,WAAa,CAAC,CAAC;AACnG,CAAC;AAzBD,gCAyBC;AAED,SAAgB,eAAe;AAC3B;;;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D,OAAe,EACf,IAOM;IAPN,qBAAA,EAAA,SAOM;IAEN,IAAM,WAAW,GAAG,qBAAa,CAAC,IAAI,CAAC,CAAC;IACxC,OAAO,IAAI,CAAC,OAAO,CAAI,mBAAU,SAAI,gBAAO,eAAU,OAAO,wBAAmB,WAAa,CAAC,CAAC;AACnG,CAAC;AAfD,0DAeC;AAED,SAAgB,uBAAuB,CAAiB,QAAgB;IACpE,OAAO,IAAI,CAAC,OAAO,CAAI,mBAAU,SAAI,gBAAO,eAAU,QAAQ,oBAAiB,CAAC,CAAC;AACrF,CAAC;AAFD,0DAEC;AAED,SAAgB,kBAAkB;AAE9B,iDAAiD;AACjD,GAAW;IAEX,OAAO,IAAI,CAAC,OAAO,CAAI,mBAAU,SAAI,gBAAO,wBAAmB,GAAK,CAAC,CAAC;AAC1E,CAAC;AAND,gDAMC;AAED,SAAgB,gBAAgB,CAE5B,OAAe,EACf,IAOM;IAPN,qBAAA,EAAA,SAOM;IAEN,IAAM,WAAW,GAAG,qBAAa,CAAC,IAAI,CAAC,CAAC;IACxC,OAAO,IAAI,CAAC,OAAO,CAAI,mBAAU,SAAI,gBAAO,eAAU,OAAO,gBAAW,WAAa,CAAC,CAAC;AAC3F,CAAC;AAdD,4CAcC;AAED,SAAgB,gBAAgB,CAAiB,QAAgB;IAC7D,OAAO,IAAI,CAAC,OAAO,CAAI,mBAAU,SAAI,gBAAO,eAAU,QAAQ,YAAS,CAAC,CAAC;AAC7E,CAAC;AAFD,4CAEC;AAED,SAAgB,WAAW;AAEvB,yCAAyC;AACzC,GAAW;IAEX,OAAO,IAAI,CAAC,OAAO,CAAI,mBAAU,SAAI,gBAAO,gBAAW,GAAK,CAAC,CAAC;AAClE,CAAC;AAND,kCAMC"} \ No newline at end of file diff --git a/lib/api-types.d.ts b/lib/api-types.d.ts index df2ae2b..aec88ca 100644 --- a/lib/api-types.d.ts +++ b/lib/api-types.d.ts @@ -1,4 +1,4 @@ -import { Vector, FrameOffset, Component, Style, Node, FrameInfo, PageInfo, ContainingStateGroup, StyleType } from "./ast-types"; +import { Vector, FrameOffset, Component, Style, Node, FrameInfo, PageInfo, ContainingStateGroup, StyleType, NodeType } from "./ast-types"; /** A comment or reply left by a user */ export interface Comment { /** Unique identifier for comment */ @@ -153,7 +153,7 @@ export interface GetFileResult { branches?: ProjectFile[]; } /** The `name`, `lastModified`, `thumbnailUrl`, and `version` attributes are all metadata of the specified file. */ -export interface GetFileNodesResult { +export interface GetFileNodesResult { name: string; lastModified: string; thumbnailUrl: string; @@ -161,7 +161,7 @@ export interface GetFileNodesResult { err?: string; nodes: { [nodeId: string]: { - document: Node<'DOCUMENT'>; + document: Node; components: { [nodeId: string]: Component; }; diff --git a/lib/ast-types.d.ts b/lib/ast-types.d.ts index d0ef6c8..a3b5154 100644 --- a/lib/ast-types.d.ts +++ b/lib/ast-types.d.ts @@ -32,7 +32,8 @@ export declare enum StrokeJoin { export declare enum ImageType { JPG = "JPG", PNG = "PNG", - SVG = "SVG" + SVG = "SVG", + PDF = "PDF" } /** A string enum with value, indicating the type of boolean operation applied */ export declare enum BooleanOperationType { @@ -60,7 +61,8 @@ export declare enum TextDecoration { export declare enum TextAutoResize { NONE = "NONE", HEIGHT = "HEIGHT", - WIDTH_AND_HEIGHT = "WIDTH_AND_HEIGHT" + WIDTH_AND_HEIGHT = "WIDTH_AND_HEIGHT", + TRUNCATE = "TRUNCATE" } /** The unit of the line height value specified by the user. */ export declare enum LineHeightUnit { @@ -79,7 +81,7 @@ export declare type StylesMap = { export declare type ExportSetting = { /** File suffix to append to all filenames */ suffix: string; - /** Image type, string enum that supports values "JPG", "PNG", and "SVG" */ + /** Image type, string enum that supports values "JPG", "PNG", "SVG" and "PDF" */ format: ImageType; /** Constraint that determines sizing of exported asset */ constraint: Constrain; @@ -447,7 +449,7 @@ export declare type TypeStyle = { /** Text decoration applied to the node, default is `NONE` */ textDecoration?: TextDecoration; /** Dimensions along which text will auto resize, default is that the text does not auto-resize. Default is `NONE` */ - textAutoResize?: 'NONE' | 'HEIGHT' | 'WIDTH_AND_HEIGHT'; + textAutoResize?: TextAutoResize; /** Horizontal text alignment as string enum */ textAlignHorizontal: 'LEFT' | 'RIGHT' | 'CENTER' | 'JUSTIFIED'; /** Vertical text alignment as string enum */ @@ -512,6 +514,15 @@ export interface Component { name: string; /** The description of the component as entered in the editor */ description: string; + /** The ID of the component set if the component belongs to one */ + componentSetId: string | null; + /** The documentation links for this component */ + documentationLinks: DocumentationLinks[]; +} +/** Represents a link to documentation for a component. */ +export interface DocumentationLinks { + /** Should be a valid URI (e.g. https://www.figma.com). */ + uri: string; } /** A set of properties that can be applied to nodes and published. Styles for a property can be created in the corresponding property's panel while editing a file */ export interface Style { @@ -556,6 +567,13 @@ export interface FRAME { strokes: Paint[]; /** The weight of strokes on the node */ strokeWeight: number; + /** The weight of strokes on different side of the node */ + individualStrokeWeights?: { + top: number; + right: number; + left: number; + bottom: number; + }; /** Position of stroke relative to vector outline, as a string enum */ strokeAlign: StrokeAlign; /** Radius of each corner of the frame if a single radius is set for all corners */ @@ -599,7 +617,7 @@ export interface FRAME { /** Determines how the auto-layout frame’s children should be aligned in the primary axis direction. This property is only applicable for auto-layout frames. Default MIN */ primaryAxisAlignItems: 'MIN' | 'CENTER' | 'MAX' | 'SPACE_BETWEEN'; /** Determines how the auto-layout frame’s children should be aligned in the counter axis direction. This property is only applicable for auto-layout frames. Default MIN */ - counterAxisAlignItems: 'MIN' | 'CENTER' | 'MAX'; + counterAxisAlignItems: 'MIN' | 'CENTER' | 'MAX' | 'BASELINE'; /** default: 0. The padding between the left border of the frame and its children. This property is only applicable for auto-layout frames. */ paddingLeft: number; /** default: 0. The padding between the right border of the frame and its children. This property is only applicable for auto-layout frames. */ @@ -614,6 +632,10 @@ export interface FRAME { verticalPadding: number; /** default: 0. The distance between children of the frame. This property is only applicable for auto-layout frames. */ itemSpacing: number; + /**default: false. Applicable only if layoutMode != "NONE". */ + itemReverseZIndex: boolean; + /**default: false. Applicable only if layoutMode != "NONE". */ + strokesIncludedInLayout: boolean; /** Defines the scrolling behavior of the frame, if there exist contents outside of the frame boundaries. The frame can either scroll vertically, horizontally, or in both directions to the extents of the content contained within it. This behavior can be observed in a prototype. Default NONE */ overflowDirection: 'NONE' | 'HORIZONTAL_SCROLLING' | 'VERTICAL_SCROLLING' | 'HORIZONTAL_AND_VERTICAL_SCROLLING'; /** default: [] An array of layout grids attached to this node (see layout grids section for more details). GROUP nodes do not have this attribute */ @@ -624,6 +646,8 @@ export interface FRAME { isMask: boolean; /** default: false Does this mask ignore fill style (like gradients) and effects? */ isMaskOutline: boolean; + /** default: AUTO */ + layoutPositioning: 'AUTO' | 'ABSOLUTE'; } /** A logical grouping of nodes */ export declare type GROUP = FRAME; @@ -669,6 +693,13 @@ export interface VECTOR { strokes: Paint[]; /** The weight of strokes on the node */ strokeWeight: number; + /** The weight of strokes on different side of the node */ + individualStrokeWeights?: { + top: number; + right: number; + left: number; + bottom: number; + }; /** default: NONE. A string enum with value of "NONE", "ROUND", "SQUARE", "LINE_ARROW", or "TRIANGLE_ARROW", describing the end caps of vector paths. */ strokeCap?: StrokeCap; /** Only specified if parameter geometry=paths is used. An array of paths representing the object stroke */ @@ -686,6 +717,8 @@ export interface VECTOR { strokeMiterAngle?: number; /** A mapping of a StyleType to style ID (see Style) of styles present on this node. The style ID can be used to look up more information about the style in the top-level styles field. */ styles?: StylesMap; + /** default: AUTO */ + layoutPositioning: 'AUTO' | 'ABSOLUTE'; } /** A group that has a boolean operation applied to it */ export declare type BOOLEAN = VECTOR & { diff --git a/lib/ast-types.js b/lib/ast-types.js index 75d04f5..10c119a 100644 --- a/lib/ast-types.js +++ b/lib/ast-types.js @@ -28,6 +28,7 @@ var ImageType; ImageType["JPG"] = "JPG"; ImageType["PNG"] = "PNG"; ImageType["SVG"] = "SVG"; + ImageType["PDF"] = "PDF"; })(ImageType = exports.ImageType || (exports.ImageType = {})); /** A string enum with value, indicating the type of boolean operation applied */ var BooleanOperationType; @@ -60,6 +61,7 @@ var TextAutoResize; TextAutoResize["NONE"] = "NONE"; TextAutoResize["HEIGHT"] = "HEIGHT"; TextAutoResize["WIDTH_AND_HEIGHT"] = "WIDTH_AND_HEIGHT"; + TextAutoResize["TRUNCATE"] = "TRUNCATE"; })(TextAutoResize = exports.TextAutoResize || (exports.TextAutoResize = {})); /** The unit of the line height value specified by the user. */ var LineHeightUnit; diff --git a/lib/ast-types.js.map b/lib/ast-types.js.map index beb8aad..9320d34 100644 --- a/lib/ast-types.js.map +++ b/lib/ast-types.js.map @@ -1 +1 @@ -{"version":3,"file":"ast-types.js","sourceRoot":"","sources":["../src/ast-types.ts"],"names":[],"mappings":";;AAYA,yEAAyE;AACzE,IAAY,SAMX;AAND,WAAY,SAAS;IACjB,0BAAW,CAAA;IACX,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,sCAAuB,CAAA;IACvB,8CAA+B,CAAA;AACnC,CAAC,EANW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMpB;AAED,4EAA4E;AAC5E,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,gCAAe,CAAA;AACnB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAED,qFAAqF;AACrF,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,6BAAa,CAAA;IACb,6BAAa,CAAA;IACb,6BAAa,CAAA;AACjB,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;AACb,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB;AAED,iFAAiF;AACjF,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC5B,uCAAa,CAAA;IACb,+CAAqB,CAAA;IACrB,6CAAmB,CAAA;IACnB,2CAAiB,CAAA;AACrB,CAAC,EALW,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,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,eAAe,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,eAAe,CAAC;AAC1L,CAAC;AAFD,0CAEC;AAED,SAAgB,YAAY,CAAC,KAAY;IACrC,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,KAAK,CAAC;AAC1C,CAAC;AAFD,oCAEC;AAgBD,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;AACvB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AAwWD,oOAAoO;AACpO,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,gCAAmB,CAAA;IACnB,oCAAuB,CAAA;IACvB,0BAAa,CAAA;AACjB,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB;AA0FD,SAAgB,UAAU,CAA0C,IAAe,EAAE,IAAW;IAC5F,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC;AAC9B,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/lib/figma-api.js b/lib/figma-api.js index fb4c9d3..82768d3 100644 --- a/lib/figma-api.js +++ b/lib/figma-api.js @@ -339,6 +339,7 @@ var ImageType; ImageType["JPG"] = "JPG"; ImageType["PNG"] = "PNG"; ImageType["SVG"] = "SVG"; + ImageType["PDF"] = "PDF"; })(ImageType = exports.ImageType || (exports.ImageType = {})); /** A string enum with value, indicating the type of boolean operation applied */ var BooleanOperationType; @@ -371,6 +372,7 @@ var TextAutoResize; TextAutoResize["NONE"] = "NONE"; TextAutoResize["HEIGHT"] = "HEIGHT"; TextAutoResize["WIDTH_AND_HEIGHT"] = "WIDTH_AND_HEIGHT"; + TextAutoResize["TRUNCATE"] = "TRUNCATE"; })(TextAutoResize = exports.TextAutoResize || (exports.TextAutoResize = {})); /** The unit of the line height value specified by the user. */ var LineHeightUnit; diff --git a/lib/figma-api.min.js b/lib/figma-api.min.js index fe3d12c..05ed106 100644 --- a/lib/figma-api.min.js +++ b/lib/figma-api.min.js @@ -5,7 +5,7 @@ "use strict";var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,i=1,s=arguments.length;i