@mastergo/plugin-typings 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +228 -18
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ declare global {
|
|
|
72
72
|
createComponent(): ComponentNode
|
|
73
73
|
createPage(): PageNode
|
|
74
74
|
createSlice(): SliceNode
|
|
75
|
+
createConnector(): ConnectorNode
|
|
75
76
|
createNodeFromSvgAsync(svg: string): Promise<FrameNode>
|
|
76
77
|
|
|
77
78
|
getHoverLayer(): PageNode | SceneNode
|
|
@@ -208,6 +209,7 @@ declare global {
|
|
|
208
209
|
letterSpacing: LetterSpacing
|
|
209
210
|
lineHeight: LineHeight
|
|
210
211
|
textDecoration: TextDecoration
|
|
212
|
+
textCase: TextCase
|
|
211
213
|
}
|
|
212
214
|
fills: Paint[]
|
|
213
215
|
}
|
|
@@ -225,6 +227,7 @@ declare global {
|
|
|
225
227
|
isExternal: boolean
|
|
226
228
|
letterSpacing: number
|
|
227
229
|
letterSpacingUnit: NumValue['unit']
|
|
230
|
+
textCase: TextCase
|
|
228
231
|
}
|
|
229
232
|
|
|
230
233
|
interface FontAlias {
|
|
@@ -267,6 +270,8 @@ declare global {
|
|
|
267
270
|
readonly style: string
|
|
268
271
|
}
|
|
269
272
|
|
|
273
|
+
type TextCase = 'ORIGINAL' | 'UPPER' | 'LOWER' | 'TITLE';
|
|
274
|
+
|
|
270
275
|
type TextDecoration = 'NONE' | 'UNDERLINE' | 'STRIKETHROUGH'
|
|
271
276
|
|
|
272
277
|
interface ShadowEffect {
|
|
@@ -320,7 +325,7 @@ declare global {
|
|
|
320
325
|
| 'GRADIENT_DIAMOND'
|
|
321
326
|
readonly transform: Transform
|
|
322
327
|
readonly gradientStops: ReadonlyArray<ColorStop>
|
|
323
|
-
readonly gradientHandlePositions
|
|
328
|
+
readonly gradientHandlePositions?: [{ x: number, y: number}, { x: number, y: number}];
|
|
324
329
|
readonly isVisible?: boolean
|
|
325
330
|
readonly alpha?: number
|
|
326
331
|
readonly blendMode?: BlendMode
|
|
@@ -406,7 +411,6 @@ declare global {
|
|
|
406
411
|
readonly parent: (BaseNode & ChildrenMixin) | void
|
|
407
412
|
name: string // Note: setting this also sets \`autoRename\` to false on TextNodes
|
|
408
413
|
removed: boolean
|
|
409
|
-
reactions: Reaction[]
|
|
410
414
|
remove(): void
|
|
411
415
|
getPluginData(key: string): string
|
|
412
416
|
setPluginData(key: string, value: string): void
|
|
@@ -471,11 +475,27 @@ declare global {
|
|
|
471
475
|
effectStyleId: string
|
|
472
476
|
}
|
|
473
477
|
|
|
474
|
-
type StrokeCap = 'NONE' | 'ROUND' | 'SQUARE' | 'LINE_ARROW' | 'TRIANGLE_ARROW'
|
|
478
|
+
type StrokeCap = 'NONE' | 'ROUND' | 'SQUARE' | 'LINE_ARROW' | 'TRIANGLE_ARROW' | 'ROUND_ARROW' | 'RING' | 'DIAMOND' | 'LINE'
|
|
475
479
|
type StrokeJoin = 'MITER' | 'BEVEL' | 'ROUND'
|
|
476
480
|
type StrokeAlign = 'CENTER' | 'INSIDE' | 'OUTSIDE'
|
|
477
481
|
type DashCap = 'NONE' | 'ROUND' | 'SQUARE'
|
|
478
482
|
type StrokeStyle = 'SOLID' | 'DASH' | 'CUSTOM'
|
|
483
|
+
type ConnectorStrokeCap = StrokeCap
|
|
484
|
+
|
|
485
|
+
interface ConnectorEndpointPosition {
|
|
486
|
+
readonly position: { x: number; y: number }
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
interface ConnectorEndpointConnected {
|
|
490
|
+
readonly position: { x: number; y: number }
|
|
491
|
+
readonly endpointNodeId: string
|
|
492
|
+
readonly magnet: 'TOP' | 'LEFT' | 'BOTTOM' | 'RIGHT'
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
type ConnectorEndpoint =
|
|
497
|
+
| ConnectorEndpointPosition
|
|
498
|
+
| ConnectorEndpointConnected
|
|
479
499
|
|
|
480
500
|
interface GeometryMixin {
|
|
481
501
|
fills: ReadonlyArray<Paint>
|
|
@@ -486,7 +506,7 @@ declare global {
|
|
|
486
506
|
strokeJoin: StrokeJoin
|
|
487
507
|
strokeStyle: StrokeStyle
|
|
488
508
|
dashCap: DashCap
|
|
489
|
-
strokeDashes: ReadonlyArray<
|
|
509
|
+
strokeDashes: ReadonlyArray<number>
|
|
490
510
|
fillStyleId: string
|
|
491
511
|
strokeStyleId: string
|
|
492
512
|
/**
|
|
@@ -515,13 +535,14 @@ declare global {
|
|
|
515
535
|
BlendMixin,
|
|
516
536
|
GeometryMixin,
|
|
517
537
|
LayoutMixin,
|
|
538
|
+
ReactionMixin,
|
|
518
539
|
ExportMixin { }
|
|
519
540
|
|
|
520
541
|
interface DefaultContainerMixin
|
|
521
542
|
extends BaseNodeMixin,
|
|
543
|
+
ReactionMixin,
|
|
522
544
|
SceneNodeMixin,
|
|
523
545
|
ChildrenMixin,
|
|
524
|
-
RectangleStrokeWeightMixin,
|
|
525
546
|
RectangleCornerMixin,
|
|
526
547
|
BlendMixin,
|
|
527
548
|
CornerMixin,
|
|
@@ -587,6 +608,41 @@ declare global {
|
|
|
587
608
|
bottomRightRadius: number
|
|
588
609
|
}
|
|
589
610
|
|
|
611
|
+
interface ReactionMixin {
|
|
612
|
+
reactions: ReadonlyArray<Reaction>
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
interface OpaqueNodeMixin extends BaseNodeMixin, SceneNodeMixin, ExportMixin {
|
|
616
|
+
readonly absoluteTransform: Transform
|
|
617
|
+
relativeTransform: Transform
|
|
618
|
+
x: number
|
|
619
|
+
y: number
|
|
620
|
+
readonly width: number
|
|
621
|
+
readonly height: number
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
interface MinimalBlendMixin {
|
|
625
|
+
opacity: number
|
|
626
|
+
blendMode: BlendMode
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
interface MinimalStrokesMixin {
|
|
630
|
+
strokes: ReadonlyArray<Paint>
|
|
631
|
+
strokeStyleId: string
|
|
632
|
+
strokeWeight: number
|
|
633
|
+
strokeJoin: StrokeJoin
|
|
634
|
+
strokeAlign: StrokeAlign
|
|
635
|
+
strokeStyle: StrokeStyle
|
|
636
|
+
strokeCap: StrokeCap
|
|
637
|
+
strokeDashes: ReadonlyArray<number>
|
|
638
|
+
dashCap: DashCap
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
interface MinimalFillsMixin {
|
|
642
|
+
fills: ReadonlyArray<Paint>
|
|
643
|
+
fillStyleId: string
|
|
644
|
+
}
|
|
645
|
+
|
|
590
646
|
/// /////////////////////////////////////////////////////////////////////////////
|
|
591
647
|
// Nodes
|
|
592
648
|
|
|
@@ -621,12 +677,12 @@ declare global {
|
|
|
621
677
|
label:'NONE' | 'BLUE' | 'GREEN' | 'RED' | 'YELLOW' | 'PURPLE' | 'GRAY'
|
|
622
678
|
}
|
|
623
679
|
|
|
624
|
-
interface FrameNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin {
|
|
680
|
+
interface FrameNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin {
|
|
625
681
|
readonly type: 'FRAME'
|
|
626
682
|
clone(): FrameNode
|
|
627
683
|
}
|
|
628
684
|
|
|
629
|
-
interface ComponentSetNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin {
|
|
685
|
+
interface ComponentSetNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin {
|
|
630
686
|
readonly type: 'COMPONENT_SET'
|
|
631
687
|
readonly componentPropertyDefinitions: Array<Record<string, Array<string> | string>>
|
|
632
688
|
clone(): ComponentSetNode
|
|
@@ -756,9 +812,10 @@ declare global {
|
|
|
756
812
|
setRangeLineHeight(start: number, end: number, value: LineHeight): void
|
|
757
813
|
setRangeFills(start: number, end: number, paints: Paint[]): void
|
|
758
814
|
setRangeSuperLink(start: number, end: number, link: string | null): void
|
|
815
|
+
setRangeTextCase(start: number, end: number, textCase: TextCase): void
|
|
759
816
|
}
|
|
760
817
|
|
|
761
|
-
interface ComponentNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin {
|
|
818
|
+
interface ComponentNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin {
|
|
762
819
|
readonly type: 'COMPONENT'
|
|
763
820
|
readonly variantProperties: Array<Record<string, string>>
|
|
764
821
|
description: string
|
|
@@ -767,7 +824,7 @@ declare global {
|
|
|
767
824
|
createInstance(): InstanceNode
|
|
768
825
|
}
|
|
769
826
|
|
|
770
|
-
interface InstanceNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin {
|
|
827
|
+
interface InstanceNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin {
|
|
771
828
|
readonly type: 'INSTANCE'
|
|
772
829
|
readonly variantProperties: Array<Record<string, string>>
|
|
773
830
|
setVariantPropertyValues(property: Record<string, string>): void
|
|
@@ -786,6 +843,51 @@ declare global {
|
|
|
786
843
|
isPreserveRatio: boolean
|
|
787
844
|
}
|
|
788
845
|
|
|
846
|
+
interface ConnectorNode extends OpaqueNodeMixin, Pick<MinimalBlendMixin, 'opacity'>, Omit<MinimalStrokesMixin, 'strokeAlign'> {
|
|
847
|
+
readonly type: 'CONNECTOR'
|
|
848
|
+
createText(): TextSublayerNode
|
|
849
|
+
readonly text: TextSublayerNode | null
|
|
850
|
+
cornerRadius?: number
|
|
851
|
+
connectorStart: ConnectorEndpoint
|
|
852
|
+
connectorEnd: ConnectorEndpoint
|
|
853
|
+
connectorStartStrokeCap: ConnectorStrokeCap
|
|
854
|
+
connectorEndStrokeCap: ConnectorStrokeCap
|
|
855
|
+
readonly strokeAlign: 'CENTER'
|
|
856
|
+
clone(): ConnectorNode
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
interface TextSublayerNode extends MinimalFillsMixin {
|
|
860
|
+
readonly id: string
|
|
861
|
+
readonly hasMissingFont: boolean
|
|
862
|
+
readonly textAlignHorizontal: 'CENTER'
|
|
863
|
+
readonly textAlignVertical: 'CENTER'
|
|
864
|
+
readonly textAutoResize: 'WIDTH_AND_HEIGHT'
|
|
865
|
+
|
|
866
|
+
readonly textStyles: ReadonlyArray<TextSegStyle>
|
|
867
|
+
|
|
868
|
+
paragraphSpacing: number
|
|
869
|
+
|
|
870
|
+
characters: string
|
|
871
|
+
insertCharacters(start: number, characters: string): void
|
|
872
|
+
deleteCharacters(start: number, end: number): void
|
|
873
|
+
|
|
874
|
+
setRangeFontSize(start: number, end: number, fontSize: number): void
|
|
875
|
+
setRangeTextDecoration(
|
|
876
|
+
start: number,
|
|
877
|
+
end: number,
|
|
878
|
+
decoration: TextDecoration
|
|
879
|
+
): void
|
|
880
|
+
setRangeFontName(start: number, end: number, fontName: FontName): void
|
|
881
|
+
setRangeLetterSpacing(
|
|
882
|
+
start: number,
|
|
883
|
+
end: number,
|
|
884
|
+
value: LetterSpacing
|
|
885
|
+
): void
|
|
886
|
+
setRangeLineHeight(start: number, end: number, value: LineHeight): void
|
|
887
|
+
setRangeFills(start: number, end: number, paints: Paint[]): void
|
|
888
|
+
setRangeTextCase(start: number, end: number, textCase: TextCase): void
|
|
889
|
+
}
|
|
890
|
+
|
|
789
891
|
type BaseNode = DocumentNode | PageNode | SceneNode
|
|
790
892
|
|
|
791
893
|
/**
|
|
@@ -802,9 +904,11 @@ declare global {
|
|
|
802
904
|
| RectangleNode
|
|
803
905
|
| TextNode
|
|
804
906
|
| ComponentNode
|
|
907
|
+
| ComponentSetNode
|
|
805
908
|
| InstanceNode
|
|
806
909
|
| BooleanOperationNode
|
|
807
910
|
| SliceNode
|
|
911
|
+
| ConnectorNode
|
|
808
912
|
|
|
809
913
|
type NodeType =
|
|
810
914
|
| 'DOCUMENT'
|
|
@@ -823,6 +927,7 @@ declare global {
|
|
|
823
927
|
| 'INSTANCE'
|
|
824
928
|
| 'BOOLEAN_OPERATION'
|
|
825
929
|
| 'SLICE'
|
|
930
|
+
| 'CONNECTOR'
|
|
826
931
|
}
|
|
827
932
|
|
|
828
933
|
interface CreateStyleConfig {
|
|
@@ -976,6 +1081,7 @@ declare global {
|
|
|
976
1081
|
createComponent(): ComponentNode
|
|
977
1082
|
createPage(): PageNode
|
|
978
1083
|
createSlice(): SliceNode
|
|
1084
|
+
createConnector(): ConnectorNode
|
|
979
1085
|
createNodeFromSvgAsync(svg: string): Promise<FrameNode>
|
|
980
1086
|
|
|
981
1087
|
getHoverLayer(): PageNode | SceneNode
|
|
@@ -1112,6 +1218,7 @@ declare global {
|
|
|
1112
1218
|
letterSpacing: LetterSpacing
|
|
1113
1219
|
lineHeight: LineHeight
|
|
1114
1220
|
textDecoration: TextDecoration
|
|
1221
|
+
textCase: TextCase
|
|
1115
1222
|
}
|
|
1116
1223
|
fills: Paint[]
|
|
1117
1224
|
}
|
|
@@ -1129,6 +1236,7 @@ declare global {
|
|
|
1129
1236
|
isExternal: boolean
|
|
1130
1237
|
letterSpacing: number
|
|
1131
1238
|
letterSpacingUnit: NumValue['unit']
|
|
1239
|
+
textCase: TextCase
|
|
1132
1240
|
}
|
|
1133
1241
|
|
|
1134
1242
|
interface FontAlias {
|
|
@@ -1171,6 +1279,8 @@ declare global {
|
|
|
1171
1279
|
readonly style: string
|
|
1172
1280
|
}
|
|
1173
1281
|
|
|
1282
|
+
type TextCase = 'ORIGINAL' | 'UPPER' | 'LOWER' | 'TITLE';
|
|
1283
|
+
|
|
1174
1284
|
type TextDecoration = 'NONE' | 'UNDERLINE' | 'STRIKETHROUGH'
|
|
1175
1285
|
|
|
1176
1286
|
interface ShadowEffect {
|
|
@@ -1224,7 +1334,7 @@ declare global {
|
|
|
1224
1334
|
| 'GRADIENT_DIAMOND'
|
|
1225
1335
|
readonly transform: Transform
|
|
1226
1336
|
readonly gradientStops: ReadonlyArray<ColorStop>
|
|
1227
|
-
readonly gradientHandlePositions
|
|
1337
|
+
readonly gradientHandlePositions?: [{ x: number, y: number}, { x: number, y: number}];
|
|
1228
1338
|
readonly isVisible?: boolean
|
|
1229
1339
|
readonly alpha?: number
|
|
1230
1340
|
readonly blendMode?: BlendMode
|
|
@@ -1310,7 +1420,6 @@ declare global {
|
|
|
1310
1420
|
readonly parent: (BaseNode & ChildrenMixin) | void
|
|
1311
1421
|
name: string // Note: setting this also sets \`autoRename\` to false on TextNodes
|
|
1312
1422
|
removed: boolean
|
|
1313
|
-
reactions: Reaction[]
|
|
1314
1423
|
remove(): void
|
|
1315
1424
|
getPluginData(key: string): string
|
|
1316
1425
|
setPluginData(key: string, value: string): void
|
|
@@ -1375,11 +1484,27 @@ declare global {
|
|
|
1375
1484
|
effectStyleId: string
|
|
1376
1485
|
}
|
|
1377
1486
|
|
|
1378
|
-
type StrokeCap = 'NONE' | 'ROUND' | 'SQUARE' | 'LINE_ARROW' | 'TRIANGLE_ARROW'
|
|
1487
|
+
type StrokeCap = 'NONE' | 'ROUND' | 'SQUARE' | 'LINE_ARROW' | 'TRIANGLE_ARROW' | 'ROUND_ARROW' | 'RING' | 'DIAMOND' | 'LINE'
|
|
1379
1488
|
type StrokeJoin = 'MITER' | 'BEVEL' | 'ROUND'
|
|
1380
1489
|
type StrokeAlign = 'CENTER' | 'INSIDE' | 'OUTSIDE'
|
|
1381
1490
|
type DashCap = 'NONE' | 'ROUND' | 'SQUARE'
|
|
1382
1491
|
type StrokeStyle = 'SOLID' | 'DASH' | 'CUSTOM'
|
|
1492
|
+
type ConnectorStrokeCap = StrokeCap
|
|
1493
|
+
|
|
1494
|
+
interface ConnectorEndpointPosition {
|
|
1495
|
+
readonly position: { x: number; y: number }
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
interface ConnectorEndpointConnected {
|
|
1499
|
+
readonly position: { x: number; y: number }
|
|
1500
|
+
readonly endpointNodeId: string
|
|
1501
|
+
readonly magnet: 'TOP' | 'LEFT' | 'BOTTOM' | 'RIGHT'
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
type ConnectorEndpoint =
|
|
1506
|
+
| ConnectorEndpointPosition
|
|
1507
|
+
| ConnectorEndpointConnected
|
|
1383
1508
|
|
|
1384
1509
|
interface GeometryMixin {
|
|
1385
1510
|
fills: ReadonlyArray<Paint>
|
|
@@ -1390,7 +1515,7 @@ declare global {
|
|
|
1390
1515
|
strokeJoin: StrokeJoin
|
|
1391
1516
|
strokeStyle: StrokeStyle
|
|
1392
1517
|
dashCap: DashCap
|
|
1393
|
-
strokeDashes: ReadonlyArray<
|
|
1518
|
+
strokeDashes: ReadonlyArray<number>
|
|
1394
1519
|
fillStyleId: string
|
|
1395
1520
|
strokeStyleId: string
|
|
1396
1521
|
/**
|
|
@@ -1419,13 +1544,14 @@ declare global {
|
|
|
1419
1544
|
BlendMixin,
|
|
1420
1545
|
GeometryMixin,
|
|
1421
1546
|
LayoutMixin,
|
|
1547
|
+
ReactionMixin,
|
|
1422
1548
|
ExportMixin { }
|
|
1423
1549
|
|
|
1424
1550
|
interface DefaultContainerMixin
|
|
1425
1551
|
extends BaseNodeMixin,
|
|
1552
|
+
ReactionMixin,
|
|
1426
1553
|
SceneNodeMixin,
|
|
1427
1554
|
ChildrenMixin,
|
|
1428
|
-
RectangleStrokeWeightMixin,
|
|
1429
1555
|
RectangleCornerMixin,
|
|
1430
1556
|
BlendMixin,
|
|
1431
1557
|
CornerMixin,
|
|
@@ -1491,6 +1617,41 @@ declare global {
|
|
|
1491
1617
|
bottomRightRadius: number
|
|
1492
1618
|
}
|
|
1493
1619
|
|
|
1620
|
+
interface ReactionMixin {
|
|
1621
|
+
reactions: ReadonlyArray<Reaction>
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
interface OpaqueNodeMixin extends BaseNodeMixin, SceneNodeMixin, ExportMixin {
|
|
1625
|
+
readonly absoluteTransform: Transform
|
|
1626
|
+
relativeTransform: Transform
|
|
1627
|
+
x: number
|
|
1628
|
+
y: number
|
|
1629
|
+
readonly width: number
|
|
1630
|
+
readonly height: number
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
interface MinimalBlendMixin {
|
|
1634
|
+
opacity: number
|
|
1635
|
+
blendMode: BlendMode
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
interface MinimalStrokesMixin {
|
|
1639
|
+
strokes: ReadonlyArray<Paint>
|
|
1640
|
+
strokeStyleId: string
|
|
1641
|
+
strokeWeight: number
|
|
1642
|
+
strokeJoin: StrokeJoin
|
|
1643
|
+
strokeAlign: StrokeAlign
|
|
1644
|
+
strokeStyle: StrokeStyle
|
|
1645
|
+
strokeCap: StrokeCap
|
|
1646
|
+
strokeDashes: ReadonlyArray<number>
|
|
1647
|
+
dashCap: DashCap
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
interface MinimalFillsMixin {
|
|
1651
|
+
fills: ReadonlyArray<Paint>
|
|
1652
|
+
fillStyleId: string
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1494
1655
|
/// /////////////////////////////////////////////////////////////////////////////
|
|
1495
1656
|
// Nodes
|
|
1496
1657
|
|
|
@@ -1525,12 +1686,12 @@ declare global {
|
|
|
1525
1686
|
label:'NONE' | 'BLUE' | 'GREEN' | 'RED' | 'YELLOW' | 'PURPLE' | 'GRAY'
|
|
1526
1687
|
}
|
|
1527
1688
|
|
|
1528
|
-
interface FrameNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin {
|
|
1689
|
+
interface FrameNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin {
|
|
1529
1690
|
readonly type: 'FRAME'
|
|
1530
1691
|
clone(): FrameNode
|
|
1531
1692
|
}
|
|
1532
1693
|
|
|
1533
|
-
interface ComponentSetNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin {
|
|
1694
|
+
interface ComponentSetNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin {
|
|
1534
1695
|
readonly type: 'COMPONENT_SET'
|
|
1535
1696
|
readonly componentPropertyDefinitions: Array<Record<string, Array<string> | string>>
|
|
1536
1697
|
clone(): ComponentSetNode
|
|
@@ -1660,9 +1821,10 @@ declare global {
|
|
|
1660
1821
|
setRangeLineHeight(start: number, end: number, value: LineHeight): void
|
|
1661
1822
|
setRangeFills(start: number, end: number, paints: Paint[]): void
|
|
1662
1823
|
setRangeSuperLink(start: number, end: number, link: string | null): void
|
|
1824
|
+
setRangeTextCase(start: number, end: number, textCase: TextCase): void
|
|
1663
1825
|
}
|
|
1664
1826
|
|
|
1665
|
-
interface ComponentNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin {
|
|
1827
|
+
interface ComponentNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin {
|
|
1666
1828
|
readonly type: 'COMPONENT'
|
|
1667
1829
|
readonly variantProperties: Array<Record<string, string>>
|
|
1668
1830
|
description: string
|
|
@@ -1671,7 +1833,7 @@ declare global {
|
|
|
1671
1833
|
createInstance(): InstanceNode
|
|
1672
1834
|
}
|
|
1673
1835
|
|
|
1674
|
-
interface InstanceNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin {
|
|
1836
|
+
interface InstanceNode extends DefaultContainerMixin, GeometryMixin, FrameContainerMixin, RectangleStrokeWeightMixin {
|
|
1675
1837
|
readonly type: 'INSTANCE'
|
|
1676
1838
|
readonly variantProperties: Array<Record<string, string>>
|
|
1677
1839
|
setVariantPropertyValues(property: Record<string, string>): void
|
|
@@ -1690,6 +1852,51 @@ declare global {
|
|
|
1690
1852
|
isPreserveRatio: boolean
|
|
1691
1853
|
}
|
|
1692
1854
|
|
|
1855
|
+
interface ConnectorNode extends OpaqueNodeMixin, Pick<MinimalBlendMixin, 'opacity'>, Omit<MinimalStrokesMixin, 'strokeAlign'> {
|
|
1856
|
+
readonly type: 'CONNECTOR'
|
|
1857
|
+
createText(): TextSublayerNode
|
|
1858
|
+
readonly text: TextSublayerNode | null
|
|
1859
|
+
cornerRadius?: number
|
|
1860
|
+
connectorStart: ConnectorEndpoint
|
|
1861
|
+
connectorEnd: ConnectorEndpoint
|
|
1862
|
+
connectorStartStrokeCap: ConnectorStrokeCap
|
|
1863
|
+
connectorEndStrokeCap: ConnectorStrokeCap
|
|
1864
|
+
readonly strokeAlign: 'CENTER'
|
|
1865
|
+
clone(): ConnectorNode
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
interface TextSublayerNode extends MinimalFillsMixin {
|
|
1869
|
+
readonly id: string
|
|
1870
|
+
readonly hasMissingFont: boolean
|
|
1871
|
+
readonly textAlignHorizontal: 'CENTER'
|
|
1872
|
+
readonly textAlignVertical: 'CENTER'
|
|
1873
|
+
readonly textAutoResize: 'WIDTH_AND_HEIGHT'
|
|
1874
|
+
|
|
1875
|
+
readonly textStyles: ReadonlyArray<TextSegStyle>
|
|
1876
|
+
|
|
1877
|
+
paragraphSpacing: number
|
|
1878
|
+
|
|
1879
|
+
characters: string
|
|
1880
|
+
insertCharacters(start: number, characters: string): void
|
|
1881
|
+
deleteCharacters(start: number, end: number): void
|
|
1882
|
+
|
|
1883
|
+
setRangeFontSize(start: number, end: number, fontSize: number): void
|
|
1884
|
+
setRangeTextDecoration(
|
|
1885
|
+
start: number,
|
|
1886
|
+
end: number,
|
|
1887
|
+
decoration: TextDecoration
|
|
1888
|
+
): void
|
|
1889
|
+
setRangeFontName(start: number, end: number, fontName: FontName): void
|
|
1890
|
+
setRangeLetterSpacing(
|
|
1891
|
+
start: number,
|
|
1892
|
+
end: number,
|
|
1893
|
+
value: LetterSpacing
|
|
1894
|
+
): void
|
|
1895
|
+
setRangeLineHeight(start: number, end: number, value: LineHeight): void
|
|
1896
|
+
setRangeFills(start: number, end: number, paints: Paint[]): void
|
|
1897
|
+
setRangeTextCase(start: number, end: number, textCase: TextCase): void
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1693
1900
|
type BaseNode = DocumentNode | PageNode | SceneNode
|
|
1694
1901
|
|
|
1695
1902
|
/**
|
|
@@ -1706,9 +1913,11 @@ declare global {
|
|
|
1706
1913
|
| RectangleNode
|
|
1707
1914
|
| TextNode
|
|
1708
1915
|
| ComponentNode
|
|
1916
|
+
| ComponentSetNode
|
|
1709
1917
|
| InstanceNode
|
|
1710
1918
|
| BooleanOperationNode
|
|
1711
1919
|
| SliceNode
|
|
1920
|
+
| ConnectorNode
|
|
1712
1921
|
|
|
1713
1922
|
type NodeType =
|
|
1714
1923
|
| 'DOCUMENT'
|
|
@@ -1727,6 +1936,7 @@ declare global {
|
|
|
1727
1936
|
| 'INSTANCE'
|
|
1728
1937
|
| 'BOOLEAN_OPERATION'
|
|
1729
1938
|
| 'SLICE'
|
|
1939
|
+
| 'CONNECTOR'
|
|
1730
1940
|
}
|
|
1731
1941
|
|
|
1732
1942
|
export interface CreateStyleConfig {
|