-
Notifications
You must be signed in to change notification settings - Fork 11
/
api_types.ts
7114 lines (6065 loc) · 156 KB
/
api_types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
export type IsLayerTrait = {
/**
* A string uniquely identifying this node within the document.
*/
id: string
/**
* The name given to the node by the user in the tool.
*/
name: string
/**
* The type of the node
*/
type: string
/**
* Whether or not the node is visible on the canvas.
*/
visible?: boolean
/**
* If true, layer is locked and cannot be edited
*/
locked?: boolean
/**
* Whether the layer is fixed while the parent is scrolling
*
* @deprecated
*/
isFixed?: boolean
/**
* How layer should be treated when the frame is resized
*/
scrollBehavior: 'SCROLLS' | 'FIXED' | 'STICKY_SCROLLS'
/**
* The rotation of the node, if not 0.
*/
rotation?: number
/**
* A mapping of a layer's property to component property name of component properties attached to
* this node. The component property name can be used to look up more information on the
* corresponding component's or component set's componentPropertyDefinitions.
*/
componentPropertyReferences?: { [key: string]: string }
/**
* Data written by plugins that is visible only to the plugin that wrote it. Requires the
* `pluginData` to include the ID of the plugin.
*/
pluginData?: unknown
/**
* Data written by plugins that is visible to all plugins. Requires the `pluginData` parameter to
* include the string "shared".
*/
sharedPluginData?: unknown
/**
* A mapping of field to the variables applied to this field. Most fields will only map to a single
* `VariableAlias`. However, for properties like `fills`, `strokes`, `size`, `componentProperties`,
* and `textRangeFills`, it is possible to have multiple variables bound to the field.
*/
boundVariables?: {
size?: {
x?: VariableAlias
y?: VariableAlias
}
individualStrokeWeights?: {
top?: VariableAlias
bottom?: VariableAlias
left?: VariableAlias
right?: VariableAlias
}
characters?: VariableAlias
itemSpacing?: VariableAlias
paddingLeft?: VariableAlias
paddingRight?: VariableAlias
paddingTop?: VariableAlias
paddingBottom?: VariableAlias
visible?: VariableAlias
topLeftRadius?: VariableAlias
topRightRadius?: VariableAlias
bottomLeftRadius?: VariableAlias
bottomRightRadius?: VariableAlias
minWidth?: VariableAlias
maxWidth?: VariableAlias
minHeight?: VariableAlias
maxHeight?: VariableAlias
counterAxisSpacing?: VariableAlias
opacity?: VariableAlias
fontFamily?: VariableAlias[]
fontSize?: VariableAlias[]
fontStyle?: VariableAlias[]
fontWeight?: VariableAlias[]
letterSpacing?: VariableAlias[]
lineHeight?: VariableAlias[]
paragraphSpacing?: VariableAlias[]
paragraphIndent?: VariableAlias[]
fills?: VariableAlias[]
strokes?: VariableAlias[]
componentProperties?: { [key: string]: VariableAlias }
textRangeFills?: VariableAlias[]
effects?: VariableAlias[]
layoutGrids?: VariableAlias[]
}
/**
* A mapping of variable collection ID to mode ID representing the explicitly set modes for this
* node.
*/
explicitVariableModes?: { [key: string]: string }
}
export type HasChildrenTrait = {
/**
* An array of nodes that are direct children of this node
*/
children: SubcanvasNode[]
}
export type HasLayoutTrait = {
/**
* Bounding box of the node in absolute space coordinates.
*/
absoluteBoundingBox: Rectangle | null
/**
* The actual bounds of a node accounting for drop shadows, thick strokes, and anything else that
* may fall outside the node's regular bounding box defined in `x`, `y`, `width`, and `height`. The
* `x` and `y` inside this property represent the absolute position of the node on the page. This
* value will be `null` if the node is invisible.
*/
absoluteRenderBounds: Rectangle | null
/**
* Keep height and width constrained to same ratio.
*/
preserveRatio?: boolean
/**
* Horizontal and vertical layout constraints for node.
*/
constraints?: LayoutConstraint
/**
* The top two rows of a matrix that represents the 2D transform of this node relative to its
* parent. The bottom row of the matrix is implicitly always (0, 0, 1). Use to transform coordinates
* in geometry. Only present if `geometry=paths` is passed.
*/
relativeTransform?: Transform
/**
* Width and height of element. This is different from the width and height of the bounding box in
* that the absolute bounding box represents the element after scaling and rotation. Only present if
* `geometry=paths` is passed.
*/
size?: Vector
/**
* Determines if the layer should stretch along the parent's counter axis. This property is only
* provided for direct children of auto-layout frames.
*
* - `INHERIT`
* - `STRETCH`
*
* In previous versions of auto layout, determined how the layer is aligned inside an auto-layout
* frame. This property is only provided for direct children of auto-layout frames.
*
* - `MIN`
* - `CENTER`
* - `MAX`
* - `STRETCH`
*
* In horizontal auto-layout frames, "MIN" and "MAX" correspond to "TOP" and "BOTTOM". In vertical
* auto-layout frames, "MIN" and "MAX" correspond to "LEFT" and "RIGHT".
*/
layoutAlign?: 'INHERIT' | 'STRETCH' | 'MIN' | 'CENTER' | 'MAX'
/**
* This property is applicable only for direct children of auto-layout frames, ignored otherwise.
* Determines whether a layer should stretch along the parent's primary axis. A `0` corresponds to a
* fixed size and `1` corresponds to stretch.
*/
layoutGrow?: 0 | 1
/**
* Determines whether a layer's size and position should be determined by auto-layout settings or
* manually adjustable.
*/
layoutPositioning?: 'AUTO' | 'ABSOLUTE'
/**
* The minimum width of the frame. This property is only applicable for auto-layout frames or direct
* children of auto-layout frames.
*/
minWidth?: number
/**
* The maximum width of the frame. This property is only applicable for auto-layout frames or direct
* children of auto-layout frames.
*/
maxWidth?: number
/**
* The minimum height of the frame. This property is only applicable for auto-layout frames or
* direct children of auto-layout frames.
*/
minHeight?: number
/**
* The maximum height of the frame. This property is only applicable for auto-layout frames or
* direct children of auto-layout frames.
*/
maxHeight?: number
/**
* The horizontal sizing setting on this auto-layout frame or frame child.
*
* - `FIXED`
* - `HUG`: only valid on auto-layout frames and text nodes
* - `FILL`: only valid on auto-layout frame children
*/
layoutSizingHorizontal?: 'FIXED' | 'HUG' | 'FILL'
/**
* The vertical sizing setting on this auto-layout frame or frame child.
*
* - `FIXED`
* - `HUG`: only valid on auto-layout frames and text nodes
* - `FILL`: only valid on auto-layout frame children
*/
layoutSizingVertical?: 'FIXED' | 'HUG' | 'FILL'
}
export type HasFramePropertiesTrait = {
/**
* Whether or not this node clip content outside of its bounds
*/
clipsContent: boolean
/**
* Background of the node. This is deprecated, as backgrounds for frames are now in the `fills`
* field.
*
* @deprecated
*/
background?: Paint[]
/**
* Background color of the node. This is deprecated, as frames now support more than a solid color
* as a background. Please use the `fills` field instead.
*
* @deprecated
*/
backgroundColor?: RGBA
/**
* An array of layout grids attached to this node (see layout grids section for more details). GROUP
* nodes do not have this attribute
*/
layoutGrids?: LayoutGrid[]
/**
* Whether a node has primary axis scrolling, horizontal or vertical.
*/
overflowDirection?:
| 'HORIZONTAL_SCROLLING'
| 'VERTICAL_SCROLLING'
| 'HORIZONTAL_AND_VERTICAL_SCROLLING'
| 'NONE'
/**
* Whether this layer uses auto-layout to position its children.
*/
layoutMode?: 'NONE' | 'HORIZONTAL' | 'VERTICAL'
/**
* Whether the primary axis has a fixed length (determined by the user) or an automatic length
* (determined by the layout engine). This property is only applicable for auto-layout frames.
*/
primaryAxisSizingMode?: 'FIXED' | 'AUTO'
/**
* Whether the counter axis has a fixed length (determined by the user) or an automatic length
* (determined by the layout engine). This property is only applicable for auto-layout frames.
*/
counterAxisSizingMode?: 'FIXED' | 'AUTO'
/**
* 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.
*/
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.
*/
counterAxisAlignItems?: 'MIN' | 'CENTER' | 'MAX' | 'BASELINE'
/**
* The padding between the left border of the frame and its children. This property is only
* applicable for auto-layout frames.
*/
paddingLeft?: number
/**
* The padding between the right border of the frame and its children. This property is only
* applicable for auto-layout frames.
*/
paddingRight?: number
/**
* The padding between the top border of the frame and its children. This property is only
* applicable for auto-layout frames.
*/
paddingTop?: number
/**
* The padding between the bottom border of the frame and its children. This property is only
* applicable for auto-layout frames.
*/
paddingBottom?: number
/**
* The distance between children of the frame. Can be negative. This property is only applicable for
* auto-layout frames.
*/
itemSpacing?: number
/**
* Determines the canvas stacking order of layers in this frame. When true, the first layer will be
* draw on top. This property is only applicable for auto-layout frames.
*/
itemReverseZIndex?: boolean
/**
* Determines whether strokes are included in layout calculations. When true, auto-layout frames
* behave like css "box-sizing: border-box". This property is only applicable for auto-layout
* frames.
*/
strokesIncludedInLayout?: boolean
/**
* Whether this auto-layout frame has wrapping enabled.
*/
layoutWrap?: 'NO_WRAP' | 'WRAP'
/**
* The distance between wrapped tracks of an auto-layout frame. This property is only applicable for
* auto-layout frames with `layoutWrap: "WRAP"`
*/
counterAxisSpacing?: number
/**
* Determines how the auto-layout frame’s wrapped tracks should be aligned in the counter axis
* direction. This property is only applicable for auto-layout frames with `layoutWrap: "WRAP"`.
*/
counterAxisAlignContent?: 'AUTO' | 'SPACE_BETWEEN'
}
export type HasBlendModeAndOpacityTrait = {
/**
* How this node blends with nodes behind it in the scene (see blend mode section for more details)
*/
blendMode: BlendMode
/**
* Opacity of the node
*/
opacity?: number
}
export type HasExportSettingsTrait = {
/**
* An array of export settings representing images to export from the node.
*/
exportSettings?: ExportSetting[]
}
export type HasGeometryTrait = MinimalFillsTrait &
MinimalStrokesTrait & {
/**
* Map from ID to PaintOverride for looking up fill overrides. To see which regions are overriden,
* you must use the `geometry=paths` option. Each path returned may have an `overrideID` which maps
* to this table.
*/
fillOverrideTable?: { [key: string]: PaintOverride | null }
/**
* Only specified if parameter `geometry=paths` is used. An array of paths representing the object
* fill.
*/
fillGeometry?: Path[]
/**
* Only specified if parameter `geometry=paths` is used. An array of paths representing the object
* stroke.
*/
strokeGeometry?: Path[]
/**
* A string enum describing the end caps of vector paths.
*/
strokeCap?:
| 'NONE'
| 'ROUND'
| 'SQUARE'
| 'LINE_ARROW'
| 'TRIANGLE_ARROW'
| 'DIAMOND_FILLED'
| 'CIRCLE_FILLED'
| 'TRIANGLE_FILLED'
| 'WASHI_TAPE_1'
| 'WASHI_TAPE_2'
| 'WASHI_TAPE_3'
| 'WASHI_TAPE_4'
| 'WASHI_TAPE_5'
| 'WASHI_TAPE_6'
/**
* Only valid if `strokeJoin` is "MITER". The corner angle, in degrees, below which `strokeJoin`
* will be set to "BEVEL" to avoid super sharp corners. By default this is 28.96 degrees.
*/
strokeMiterAngle?: number
}
export type MinimalFillsTrait = {
/**
* An array of fill paints applied to the node.
*/
fills: Paint[]
/**
* 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?: { [key: string]: string }
}
export type MinimalStrokesTrait = {
/**
* An array of stroke paints applied to the node.
*/
strokes?: Paint[]
/**
* The weight of strokes on the node.
*/
strokeWeight?: number
/**
* Position of stroke relative to vector outline, as a string enum
*
* - `INSIDE`: stroke drawn inside the shape boundary
* - `OUTSIDE`: stroke drawn outside the shape boundary
* - `CENTER`: stroke drawn centered along the shape boundary
*/
strokeAlign?: 'INSIDE' | 'OUTSIDE' | 'CENTER'
/**
* A string enum with value of "MITER", "BEVEL", or "ROUND", describing how corners in vector paths
* are rendered.
*/
strokeJoin?: 'MITER' | 'BEVEL' | 'ROUND'
/**
* An array of floating point numbers describing the pattern of dash length and gap lengths that the
* vector stroke will use when drawn.
*
* For example a value of [1, 2] indicates that the stroke will be drawn with a dash of length 1
* followed by a gap of length 2, repeated.
*/
strokeDashes?: number[]
}
export type IndividualStrokesTrait = {
/**
* An object including the top, bottom, left, and right stroke weights. Only returned if individual
* stroke weights are used.
*/
individualStrokeWeights?: StrokeWeights
}
export type CornerTrait = {
/**
* Radius of each corner if a single radius is set for all corners
*/
cornerRadius?: number
/**
* A value that lets you control how "smooth" the corners are. Ranges from 0 to 1. 0 is the default
* and means that the corner is perfectly circular. A value of 0.6 means the corner matches the iOS
* 7 "squircle" icon shape. Other values produce various other curves.
*/
cornerSmoothing?: number
/**
* Array of length 4 of the radius of each corner of the frame, starting in the top left and
* proceeding clockwise.
*
* Values are given in the order top-left, top-right, bottom-right, bottom-left.
*/
rectangleCornerRadii?: number[]
}
export type HasEffectsTrait = {
/**
* An array of effects attached to this node (see effects section for more details)
*/
effects: Effect[]
}
export type HasMaskTrait = {
/**
* Does this node mask sibling nodes in front of it?
*/
isMask?: boolean
/**
* If this layer is a mask, this property describes the operation used to mask the layer's siblings.
* The value may be one of the following:
*
* - ALPHA: the mask node's alpha channel will be used to determine the opacity of each pixel in the
* masked result.
* - VECTOR: if the mask node has visible fill paints, every pixel inside the node's fill regions will
* be fully visible in the masked result. If the mask has visible stroke paints, every pixel
* inside the node's stroke regions will be fully visible in the masked result.
* - LUMINANCE: the luminance value of each pixel of the mask node will be used to determine the
* opacity of that pixel in the masked result.
*/
maskType?: 'ALPHA' | 'VECTOR' | 'LUMINANCE'
/**
* True if maskType is VECTOR. This field is deprecated; use maskType instead.
*
* @deprecated
*/
isMaskOutline?: boolean
}
export type ComponentPropertiesTrait = {
/**
* A mapping of name to `ComponentPropertyDefinition` for every component property on this
* component. Each property has a type, defaultValue, and other optional values.
*/
componentPropertyDefinitions?: { [key: string]: ComponentPropertyDefinition }
}
export type TypePropertiesTrait = {
/**
* The raw characters in the text node.
*/
characters: string
/**
* Style of text including font family and weight.
*/
style: TypeStyle
/**
* The array corresponds to characters in the text box, where each element references the
* 'styleOverrideTable' to apply specific styles to each character. The array's length can be less
* than or equal to the number of characters due to the removal of trailing zeros. Elements with a
* value of 0 indicate characters that use the default type style. If the array is shorter than the
* total number of characters, the characters beyond the array's length also use the default style.
*/
characterStyleOverrides: number[]
/**
* Internal property, preserved for backward compatibility. Avoid using this value.
*/
layoutVersion?: number
/**
* Map from ID to TypeStyle for looking up style overrides.
*/
styleOverrideTable: { [key: string]: TypeStyle }
/**
* An array with the same number of elements as lines in the text node, where lines are delimited by
* newline or paragraph separator characters. Each element in the array corresponds to the list type
* of a specific line. List types are represented as string enums with one of these possible
* values:
*
* - `NONE`: Not a list item.
* - `ORDERED`: Text is an ordered list (numbered).
* - `UNORDERED`: Text is an unordered list (bulleted).
*/
lineTypes: ('NONE' | 'ORDERED' | 'UNORDERED')[]
/**
* An array with the same number of elements as lines in the text node, where lines are delimited by
* newline or paragraph separator characters. Each element in the array corresponds to the
* indentation level of a specific line.
*/
lineIndentations: number[]
}
export type HasTextSublayerTrait = {
/**
* Text contained within a text box.
*/
characters: string
}
export type TransitionSourceTrait = {
/**
* Node ID of node to transition to in prototyping
*/
transitionNodeID?: string
/**
* The duration of the prototyping transition on this node (in milliseconds). This will override the
* default transition duration on the prototype, for this node.
*/
transitionDuration?: number
/**
* The easing curve used in the prototyping transition on this node.
*/
transitionEasing?: EasingType
interactions?: Interaction[]
}
export type DevStatusTrait = {
/**
* Represents whether or not a node has a particular handoff (or dev) status applied to it.
*/
devStatus?: {
type: 'NONE' | 'READY_FOR_DEV' | 'COMPLETED'
/**
* An optional field where the designer can add more information about the design and what has
* changed.
*/
description?: string
}
}
export type AnnotationsTrait = object
export type FrameTraits = IsLayerTrait &
HasBlendModeAndOpacityTrait &
HasChildrenTrait &
HasLayoutTrait &
HasFramePropertiesTrait &
CornerTrait &
HasGeometryTrait &
HasExportSettingsTrait &
HasEffectsTrait &
HasMaskTrait &
TransitionSourceTrait &
IndividualStrokesTrait &
DevStatusTrait &
AnnotationsTrait
export type DefaultShapeTraits = IsLayerTrait &
HasBlendModeAndOpacityTrait &
HasLayoutTrait &
HasGeometryTrait &
HasExportSettingsTrait &
HasEffectsTrait &
HasMaskTrait &
TransitionSourceTrait
export type CornerRadiusShapeTraits = DefaultShapeTraits & CornerTrait
export type RectangularShapeTraits = DefaultShapeTraits &
CornerTrait &
IndividualStrokesTrait &
AnnotationsTrait
export type Node =
| BooleanOperationNode
| ComponentNode
| ComponentSetNode
| ConnectorNode
| EllipseNode
| EmbedNode
| FrameNode
| GroupNode
| InstanceNode
| LineNode
| LinkUnfurlNode
| RectangleNode
| RegularPolygonNode
| SectionNode
| ShapeWithTextNode
| SliceNode
| StarNode
| StickyNode
| TableNode
| TableCellNode
| TextNode
| VectorNode
| WashiTapeNode
| WidgetNode
| DocumentNode
| CanvasNode
export type DocumentNode = {
type: 'DOCUMENT'
children: CanvasNode[]
} & IsLayerTrait
export type CanvasNode = {
type: 'CANVAS'
children: SubcanvasNode[]
/**
* Background color of the canvas.
*/
backgroundColor: RGBA
/**
* Node ID that corresponds to the start frame for prototypes. This is deprecated with the
* introduction of multiple flows. Please use the `flowStartingPoints` field.
*
* @deprecated
*/
prototypeStartNodeID: string | null
/**
* An array of flow starting points sorted by its position in the prototype settings panel.
*/
flowStartingPoints: FlowStartingPoint[]
/**
* The device used to view a prototype.
*/
prototypeDevice: PrototypeDevice
measurements?: Measurement[]
} & IsLayerTrait &
HasExportSettingsTrait
export type SubcanvasNode =
| BooleanOperationNode
| ComponentNode
| ComponentSetNode
| ConnectorNode
| EllipseNode
| EmbedNode
| FrameNode
| GroupNode
| InstanceNode
| LineNode
| LinkUnfurlNode
| RectangleNode
| RegularPolygonNode
| SectionNode
| ShapeWithTextNode
| SliceNode
| StarNode
| StickyNode
| TableNode
| TableCellNode
| TextNode
| VectorNode
| WashiTapeNode
| WidgetNode
export type BooleanOperationNode = {
/**
* The type of this node, represented by the string literal "BOOLEAN_OPERATION"
*/
type: 'BOOLEAN_OPERATION'
/**
* A string enum indicating the type of boolean operation applied.
*/
booleanOperation: 'UNION' | 'INTERSECT' | 'SUBTRACT' | 'EXCLUDE'
} & IsLayerTrait &
HasBlendModeAndOpacityTrait &
HasChildrenTrait &
HasLayoutTrait &
HasGeometryTrait &
HasExportSettingsTrait &
HasEffectsTrait &
HasMaskTrait &
TransitionSourceTrait
export type SectionNode = {
/**
* The type of this node, represented by the string literal "SECTION"
*/
type: 'SECTION'
/**
* Whether the contents of the section are visible
*/
sectionContentsHidden: boolean
} & IsLayerTrait &
HasGeometryTrait &
HasChildrenTrait &
HasLayoutTrait &
DevStatusTrait
export type FrameNode = {
/**
* The type of this node, represented by the string literal "FRAME"
*/
type: 'FRAME'
} & FrameTraits
export type GroupNode = {
/**
* The type of this node, represented by the string literal "GROUP"
*/
type: 'GROUP'
} & FrameTraits
export type ComponentNode = {
/**
* The type of this node, represented by the string literal "COMPONENT"
*/
type: 'COMPONENT'
} & FrameTraits &
ComponentPropertiesTrait
export type ComponentSetNode = {
/**
* The type of this node, represented by the string literal "COMPONENT_SET"
*/
type: 'COMPONENT_SET'
} & FrameTraits &
ComponentPropertiesTrait
export type VectorNode = {
/**
* The type of this node, represented by the string literal "VECTOR"
*/
type: 'VECTOR'
} & CornerRadiusShapeTraits &
AnnotationsTrait
export type StarNode = {
/**
* The type of this node, represented by the string literal "STAR"
*/
type: 'STAR'
} & CornerRadiusShapeTraits &
AnnotationsTrait
export type LineNode = {
/**
* The type of this node, represented by the string literal "LINE"
*/
type: 'LINE'
} & DefaultShapeTraits &
AnnotationsTrait
export type EllipseNode = {
/**
* The type of this node, represented by the string literal "ELLIPSE"
*/
type: 'ELLIPSE'
arcData: ArcData
} & DefaultShapeTraits &
AnnotationsTrait
export type RegularPolygonNode = {
/**
* The type of this node, represented by the string literal "REGULAR_POLYGON"
*/
type: 'REGULAR_POLYGON'
} & CornerRadiusShapeTraits &
AnnotationsTrait
export type RectangleNode = {
/**
* The type of this node, represented by the string literal "RECTANGLE"
*/
type: 'RECTANGLE'
} & RectangularShapeTraits
export type TextNode = {
/**
* The type of this node, represented by the string literal "TEXT"
*/
type: 'TEXT'
} & DefaultShapeTraits &
TypePropertiesTrait &
AnnotationsTrait
export type TableNode = {
/**
* The type of this node, represented by the string literal "TABLE"
*/
type: 'TABLE'
} & IsLayerTrait &
HasChildrenTrait &
HasLayoutTrait &
MinimalStrokesTrait &
HasEffectsTrait &
HasBlendModeAndOpacityTrait &
HasExportSettingsTrait
export type TableCellNode = {
/**
* The type of this node, represented by the string literal "TABLE_CELL"
*/
type: 'TABLE_CELL'
} & IsLayerTrait &
MinimalFillsTrait &
HasLayoutTrait &
HasTextSublayerTrait
export type SliceNode = {
/**
* The type of this node, represented by the string literal "SLICE"
*/
type: 'SLICE'
} & IsLayerTrait
export type InstanceNode = {
/**
* The type of this node, represented by the string literal "INSTANCE"
*/
type: 'INSTANCE'
/**
* ID of component that this instance came from.
*/
componentId: string
/**
* If true, this node has been marked as exposed to its containing component or component set.
*/
isExposedInstance?: boolean
/**
* IDs of instances that have been exposed to this node's level.
*/
exposedInstances?: string[]
/**
* A mapping of name to `ComponentProperty` for all component properties on this instance. Each
* property has a type, value, and other optional values.
*/
componentProperties?: { [key: string]: ComponentProperty }
/**
* An array of all of the fields directly overridden on this instance. Inherited overrides are not
* included.
*/
overrides: Overrides[]
} & FrameTraits
export type EmbedNode = {
/**
* The type of this node, represented by the string literal "EMBED"
*/
type: 'EMBED'