@supernova-studio/client 0.47.39 → 0.47.41
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.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +97 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +584 -535
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/utils/hash.ts +52 -0
- package/src/utils/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -33,32 +33,32 @@ import { z as z21 } from "zod";
|
|
|
33
33
|
import { z as z82 } from "zod";
|
|
34
34
|
import { z as z81 } from "zod";
|
|
35
35
|
import { z as z22 } from "zod";
|
|
36
|
-
import { z as z23 } from "zod";
|
|
37
36
|
import { z as z24 } from "zod";
|
|
38
|
-
import { z as
|
|
37
|
+
import { z as z23 } from "zod";
|
|
39
38
|
import { z as z25 } from "zod";
|
|
40
|
-
import { z as
|
|
39
|
+
import { z as z26 } from "zod";
|
|
40
|
+
import { z as z29 } from "zod";
|
|
41
41
|
import { z as z28 } from "zod";
|
|
42
|
-
import { z as
|
|
42
|
+
import { z as z27 } from "zod";
|
|
43
43
|
import { z as z30 } from "zod";
|
|
44
|
-
import { z as
|
|
44
|
+
import { z as z36 } from "zod";
|
|
45
|
+
import { z as z31 } from "zod";
|
|
45
46
|
import { z as z32 } from "zod";
|
|
46
|
-
import { z as z38 } from "zod";
|
|
47
47
|
import { z as z33 } from "zod";
|
|
48
48
|
import { z as z34 } from "zod";
|
|
49
49
|
import { z as z35 } from "zod";
|
|
50
|
-
import { z as z36 } from "zod";
|
|
51
50
|
import { z as z37 } from "zod";
|
|
51
|
+
import { z as z41 } from "zod";
|
|
52
|
+
import { z as z40 } from "zod";
|
|
52
53
|
import { z as z39 } from "zod";
|
|
54
|
+
import { z as z38 } from "zod";
|
|
55
|
+
import { z as z44 } from "zod";
|
|
53
56
|
import { z as z43 } from "zod";
|
|
54
57
|
import { z as z42 } from "zod";
|
|
55
|
-
import { z as
|
|
56
|
-
import { z as z40 } from "zod";
|
|
58
|
+
import { z as z47 } from "zod";
|
|
57
59
|
import { z as z46 } from "zod";
|
|
58
60
|
import { z as z45 } from "zod";
|
|
59
|
-
import { z as z44 } from "zod";
|
|
60
61
|
import { z as z48 } from "zod";
|
|
61
|
-
import { z as z47 } from "zod";
|
|
62
62
|
import { z as z49 } from "zod";
|
|
63
63
|
import { z as z50 } from "zod";
|
|
64
64
|
import { z as z51 } from "zod";
|
|
@@ -535,121 +535,74 @@ var Asset = z21.object({
|
|
|
535
535
|
var ResolvedAsset = Asset.extend({
|
|
536
536
|
url: z21.string()
|
|
537
537
|
});
|
|
538
|
-
var
|
|
539
|
-
|
|
540
|
-
sourceId: z22.string(),
|
|
541
|
-
name: z22.string()
|
|
542
|
-
});
|
|
543
|
-
var DesignElementBase = z22.object({
|
|
544
|
-
id: z22.string(),
|
|
545
|
-
persistentId: z22.string(),
|
|
546
|
-
meta: ObjectMeta,
|
|
547
|
-
designSystemVersionId: z22.string(),
|
|
548
|
-
createdAt: z22.coerce.date(),
|
|
549
|
-
updatedAt: z22.coerce.date()
|
|
550
|
-
});
|
|
551
|
-
var DesignElementImportedBase = DesignElementBase.extend({
|
|
552
|
-
origin: DesignElementOrigin
|
|
553
|
-
});
|
|
554
|
-
var DesignElementGroupablePart = z22.object({
|
|
555
|
-
parentPersistentId: z22.string().optional(),
|
|
556
|
-
sortOrder: z22.number()
|
|
557
|
-
});
|
|
558
|
-
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
559
|
-
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
560
|
-
parentPersistentId: z22.string()
|
|
561
|
-
});
|
|
562
|
-
var DesignElementBrandedPart = z22.object({
|
|
563
|
-
brandPersistentId: z22.string()
|
|
564
|
-
});
|
|
565
|
-
var DesignElementSlugPart = z22.object({
|
|
566
|
-
slug: z22.string().optional(),
|
|
567
|
-
userSlug: z22.string().optional()
|
|
568
|
-
});
|
|
569
|
-
var ComponentOriginPart = z23.object({
|
|
570
|
-
nodeId: z23.string().optional(),
|
|
571
|
-
width: z23.number().optional(),
|
|
572
|
-
height: z23.number().optional()
|
|
573
|
-
});
|
|
574
|
-
var ComponentAsset = z23.object({
|
|
575
|
-
assetId: z23.string(),
|
|
576
|
-
assetPath: z23.string()
|
|
577
|
-
});
|
|
578
|
-
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
579
|
-
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
580
|
-
origin: ComponentOrigin.optional(),
|
|
581
|
-
thumbnail: ComponentAsset,
|
|
582
|
-
svg: ComponentAsset.optional(),
|
|
583
|
-
isAsset: z23.boolean()
|
|
584
|
-
});
|
|
585
|
-
var TokenDataAliasSchema = z24.object({
|
|
586
|
-
aliasTo: z24.string().optional().nullable().transform((v) => v ?? void 0)
|
|
538
|
+
var TokenDataAliasSchema = z22.object({
|
|
539
|
+
aliasTo: z22.string().optional().nullable().transform((v) => v ?? void 0)
|
|
587
540
|
});
|
|
588
541
|
function tokenAliasOrValue(value) {
|
|
589
542
|
return TokenDataAliasSchema.extend({
|
|
590
543
|
value: value.optional().nullable().transform((v) => v ?? void 0)
|
|
591
544
|
});
|
|
592
545
|
}
|
|
593
|
-
var DimensionUnit =
|
|
594
|
-
var DimensionValue =
|
|
546
|
+
var DimensionUnit = z23.enum(["Pixels", "Percent", "Rem", "Ms", "Raw", "Points"]);
|
|
547
|
+
var DimensionValue = z23.object({
|
|
595
548
|
unit: DimensionUnit,
|
|
596
|
-
measure:
|
|
549
|
+
measure: z23.number()
|
|
597
550
|
});
|
|
598
551
|
var DimensionTokenData = tokenAliasOrValue(DimensionValue);
|
|
599
|
-
var BlurType =
|
|
600
|
-
var BlurValue =
|
|
552
|
+
var BlurType = z24.enum(["Layer", "Background"]);
|
|
553
|
+
var BlurValue = z24.object({
|
|
601
554
|
type: BlurType,
|
|
602
555
|
radius: DimensionTokenData
|
|
603
556
|
});
|
|
604
557
|
var BlurTokenData = tokenAliasOrValue(BlurValue);
|
|
605
|
-
var BorderRadiusUnit =
|
|
606
|
-
var BorderRadiusValue =
|
|
558
|
+
var BorderRadiusUnit = z25.enum(["Pixels", "Rem", "Percent"]);
|
|
559
|
+
var BorderRadiusValue = z25.object({
|
|
607
560
|
unit: BorderRadiusUnit,
|
|
608
|
-
measure:
|
|
561
|
+
measure: z25.number()
|
|
609
562
|
});
|
|
610
563
|
var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
|
|
611
|
-
var BorderWidthUnit =
|
|
612
|
-
var BorderWidthValue =
|
|
564
|
+
var BorderWidthUnit = z26.enum(["Pixels"]);
|
|
565
|
+
var BorderWidthValue = z26.object({
|
|
613
566
|
unit: BorderWidthUnit,
|
|
614
|
-
measure:
|
|
567
|
+
measure: z26.number()
|
|
615
568
|
});
|
|
616
569
|
var BorderWidthTokenData = tokenAliasOrValue(BorderWidthValue);
|
|
617
|
-
var OpacityValue =
|
|
618
|
-
unit:
|
|
619
|
-
measure:
|
|
570
|
+
var OpacityValue = z27.object({
|
|
571
|
+
unit: z27.enum(["Raw", "Pixels"]),
|
|
572
|
+
measure: z27.number()
|
|
620
573
|
});
|
|
621
574
|
var OpacityTokenData = tokenAliasOrValue(OpacityValue);
|
|
622
|
-
var ColorValue =
|
|
575
|
+
var ColorValue = z28.object({
|
|
623
576
|
opacity: OpacityTokenData,
|
|
624
|
-
color:
|
|
577
|
+
color: z28.string().or(TokenDataAliasSchema)
|
|
625
578
|
});
|
|
626
579
|
var ColorTokenData = tokenAliasOrValue(ColorValue);
|
|
627
|
-
var BorderPosition =
|
|
628
|
-
var BorderStyle =
|
|
629
|
-
var BorderValue =
|
|
580
|
+
var BorderPosition = z29.enum(["Inside", "Center", "Outside"]);
|
|
581
|
+
var BorderStyle = z29.enum(["Dashed", "Dotted", "Solid", "Groove"]);
|
|
582
|
+
var BorderValue = z29.object({
|
|
630
583
|
color: ColorTokenData,
|
|
631
584
|
width: BorderWidthTokenData,
|
|
632
585
|
position: BorderPosition,
|
|
633
586
|
style: BorderStyle.optional()
|
|
634
587
|
});
|
|
635
588
|
var BorderTokenData = tokenAliasOrValue(BorderValue);
|
|
636
|
-
var ComponentElementData =
|
|
637
|
-
value:
|
|
638
|
-
thumbnailImage:
|
|
639
|
-
value:
|
|
640
|
-
url:
|
|
641
|
-
assetId:
|
|
589
|
+
var ComponentElementData = z30.object({
|
|
590
|
+
value: z30.object({
|
|
591
|
+
thumbnailImage: z30.object({
|
|
592
|
+
value: z30.object({
|
|
593
|
+
url: z30.string(),
|
|
594
|
+
assetId: z30.string()
|
|
642
595
|
})
|
|
643
596
|
}),
|
|
644
|
-
svg:
|
|
645
|
-
value:
|
|
646
|
-
url:
|
|
647
|
-
assetId:
|
|
597
|
+
svg: z30.object({
|
|
598
|
+
value: z30.object({
|
|
599
|
+
url: z30.string(),
|
|
600
|
+
assetId: z30.string()
|
|
648
601
|
})
|
|
649
602
|
}).optional()
|
|
650
603
|
})
|
|
651
604
|
});
|
|
652
|
-
var DesignTokenType =
|
|
605
|
+
var DesignTokenType = z31.enum([
|
|
653
606
|
"Color",
|
|
654
607
|
"Border",
|
|
655
608
|
"Gradient",
|
|
@@ -681,7 +634,7 @@ var DesignTokenType = z33.enum([
|
|
|
681
634
|
]);
|
|
682
635
|
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
683
636
|
var DesignElementType = DesignTokenType.or(
|
|
684
|
-
|
|
637
|
+
z31.enum([
|
|
685
638
|
"Component",
|
|
686
639
|
"Theme",
|
|
687
640
|
"Documentation",
|
|
@@ -693,7 +646,7 @@ var DesignElementType = DesignTokenType.or(
|
|
|
693
646
|
"PageBlock"
|
|
694
647
|
])
|
|
695
648
|
);
|
|
696
|
-
var DesignElementCategory =
|
|
649
|
+
var DesignElementCategory = z31.enum([
|
|
697
650
|
"Token",
|
|
698
651
|
"Component",
|
|
699
652
|
"DesignSystemComponent",
|
|
@@ -701,82 +654,82 @@ var DesignElementCategory = z33.enum([
|
|
|
701
654
|
"Theme",
|
|
702
655
|
"PageBlock"
|
|
703
656
|
]);
|
|
704
|
-
var DesignSystemElementExportProps =
|
|
705
|
-
isAsset:
|
|
706
|
-
codeName:
|
|
707
|
-
});
|
|
708
|
-
var ShallowDesignElement =
|
|
709
|
-
id:
|
|
710
|
-
persistentId:
|
|
711
|
-
designSystemVersionId:
|
|
657
|
+
var DesignSystemElementExportProps = z31.object({
|
|
658
|
+
isAsset: z31.boolean().nullish().transform((v) => v ?? false),
|
|
659
|
+
codeName: z31.string().nullish()
|
|
660
|
+
});
|
|
661
|
+
var ShallowDesignElement = z31.object({
|
|
662
|
+
id: z31.string(),
|
|
663
|
+
persistentId: z31.string(),
|
|
664
|
+
designSystemVersionId: z31.string(),
|
|
712
665
|
type: DesignElementType,
|
|
713
|
-
brandPersistentId:
|
|
714
|
-
parentPersistentId:
|
|
715
|
-
shortPersistentId:
|
|
666
|
+
brandPersistentId: z31.string().optional(),
|
|
667
|
+
parentPersistentId: z31.string().optional(),
|
|
668
|
+
shortPersistentId: z31.string().optional(),
|
|
716
669
|
childType: DesignElementType.optional(),
|
|
717
|
-
sortOrder:
|
|
718
|
-
origin:
|
|
670
|
+
sortOrder: z31.number(),
|
|
671
|
+
origin: z31.record(z31.any()).optional()
|
|
719
672
|
});
|
|
720
673
|
var DesignElement = ShallowDesignElement.extend({
|
|
721
674
|
meta: ObjectMeta,
|
|
722
|
-
slug:
|
|
723
|
-
userSlug:
|
|
724
|
-
createdAt:
|
|
725
|
-
updatedAt:
|
|
675
|
+
slug: z31.string().optional(),
|
|
676
|
+
userSlug: z31.string().optional(),
|
|
677
|
+
createdAt: z31.coerce.date(),
|
|
678
|
+
updatedAt: z31.coerce.date(),
|
|
726
679
|
exportProperties: DesignSystemElementExportProps.optional(),
|
|
727
|
-
data:
|
|
728
|
-
origin:
|
|
680
|
+
data: z31.record(z31.any()),
|
|
681
|
+
origin: z31.record(z31.any()).optional()
|
|
729
682
|
});
|
|
730
683
|
var HierarchicalElements = DesignTokenType.or(
|
|
731
|
-
|
|
684
|
+
z31.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
732
685
|
);
|
|
733
|
-
var ElementPropertyTypeSchema =
|
|
734
|
-
var ElementPropertyTargetType =
|
|
735
|
-
var ElementPropertyLinkType =
|
|
686
|
+
var ElementPropertyTypeSchema = z32.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
687
|
+
var ElementPropertyTargetType = z32.enum(["Token", "Component", "DocumentationPage"]);
|
|
688
|
+
var ElementPropertyLinkType = z32.enum(["FigmaComponent", "DocumentationPage"]);
|
|
736
689
|
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
737
|
-
var ColorTokenInlineData =
|
|
738
|
-
value:
|
|
690
|
+
var ColorTokenInlineData = z32.object({
|
|
691
|
+
value: z32.string()
|
|
739
692
|
});
|
|
740
|
-
var ElementPropertyDefinitionOption =
|
|
741
|
-
id:
|
|
742
|
-
name:
|
|
693
|
+
var ElementPropertyDefinitionOption = z32.object({
|
|
694
|
+
id: z32.string(),
|
|
695
|
+
name: z32.string(),
|
|
743
696
|
backgroundColor: ColorTokenInlineData.optional()
|
|
744
697
|
});
|
|
745
|
-
var ElementPropertyDefinition =
|
|
746
|
-
id:
|
|
747
|
-
designSystemVersionId:
|
|
748
|
-
persistentId:
|
|
749
|
-
name:
|
|
750
|
-
codeName:
|
|
751
|
-
description:
|
|
698
|
+
var ElementPropertyDefinition = z32.object({
|
|
699
|
+
id: z32.string(),
|
|
700
|
+
designSystemVersionId: z32.string(),
|
|
701
|
+
persistentId: z32.string(),
|
|
702
|
+
name: z32.string(),
|
|
703
|
+
codeName: z32.string().regex(CODE_NAME_REGEX),
|
|
704
|
+
description: z32.string(),
|
|
752
705
|
type: ElementPropertyTypeSchema,
|
|
753
706
|
targetElementType: ElementPropertyTargetType,
|
|
754
|
-
options:
|
|
707
|
+
options: z32.array(ElementPropertyDefinitionOption).optional(),
|
|
755
708
|
linkElementType: ElementPropertyLinkType.optional()
|
|
756
709
|
});
|
|
757
710
|
var ElementPropertyType = ElementPropertyTypeSchema.enum;
|
|
758
|
-
var ElementPropertyValue =
|
|
759
|
-
id:
|
|
760
|
-
designSystemVersionId:
|
|
761
|
-
targetElementPersistentId:
|
|
762
|
-
definitionPersistentId:
|
|
763
|
-
stringValue:
|
|
764
|
-
numberValue:
|
|
765
|
-
booleanValue:
|
|
766
|
-
referenceValue:
|
|
767
|
-
referenceValuePreview:
|
|
768
|
-
});
|
|
769
|
-
var Point2D =
|
|
770
|
-
x:
|
|
771
|
-
y:
|
|
711
|
+
var ElementPropertyValue = z33.object({
|
|
712
|
+
id: z33.string(),
|
|
713
|
+
designSystemVersionId: z33.string(),
|
|
714
|
+
targetElementPersistentId: z33.string(),
|
|
715
|
+
definitionPersistentId: z33.string(),
|
|
716
|
+
stringValue: z33.string().nullish(),
|
|
717
|
+
numberValue: z33.number().nullish(),
|
|
718
|
+
booleanValue: z33.boolean().nullish(),
|
|
719
|
+
referenceValue: z33.string().nullish(),
|
|
720
|
+
referenceValuePreview: z33.string().optional()
|
|
721
|
+
});
|
|
722
|
+
var Point2D = z34.object({
|
|
723
|
+
x: z34.number(),
|
|
724
|
+
y: z34.number()
|
|
772
725
|
});
|
|
773
726
|
var nullSize = { height: -1, width: -1 };
|
|
774
727
|
function isNullSize(size) {
|
|
775
728
|
return size.height === nullSize.height && size.width === nullSize.width;
|
|
776
729
|
}
|
|
777
|
-
var Size =
|
|
778
|
-
width:
|
|
779
|
-
height:
|
|
730
|
+
var Size = z35.object({
|
|
731
|
+
width: z35.number().nullish().transform((v) => v ?? nullSize.width),
|
|
732
|
+
height: z35.number().nullish().transform((v) => v ?? nullSize.height)
|
|
780
733
|
});
|
|
781
734
|
var SizeOrUndefined = Size.optional().transform((v) => {
|
|
782
735
|
if (!v)
|
|
@@ -785,8 +738,8 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
785
738
|
return void 0;
|
|
786
739
|
return v;
|
|
787
740
|
});
|
|
788
|
-
var PageBlockCalloutType =
|
|
789
|
-
var PageBlockTypeV1 =
|
|
741
|
+
var PageBlockCalloutType = z36.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
742
|
+
var PageBlockTypeV1 = z36.enum([
|
|
790
743
|
"Text",
|
|
791
744
|
"Heading",
|
|
792
745
|
"Code",
|
|
@@ -819,7 +772,7 @@ var PageBlockTypeV1 = z38.enum([
|
|
|
819
772
|
"TableRow",
|
|
820
773
|
"TableCell"
|
|
821
774
|
]);
|
|
822
|
-
var PageBlockCodeLanguage =
|
|
775
|
+
var PageBlockCodeLanguage = z36.enum([
|
|
823
776
|
"Angular",
|
|
824
777
|
"Bash",
|
|
825
778
|
"C",
|
|
@@ -853,70 +806,70 @@ var PageBlockCodeLanguage = z38.enum([
|
|
|
853
806
|
"XML",
|
|
854
807
|
"YAML"
|
|
855
808
|
]);
|
|
856
|
-
var PageBlockAlignment =
|
|
857
|
-
var PageBlockThemeType =
|
|
858
|
-
var PageBlockAssetType =
|
|
859
|
-
var PageBlockTilesAlignment =
|
|
860
|
-
var PageBlockTilesLayout =
|
|
861
|
-
var PageBlockTheme =
|
|
862
|
-
themeIds:
|
|
809
|
+
var PageBlockAlignment = z36.enum(["Left", "Center", "Stretch", "Right"]);
|
|
810
|
+
var PageBlockThemeType = z36.enum(["Override", "Comparison"]);
|
|
811
|
+
var PageBlockAssetType = z36.enum(["image", "figmaFrame"]);
|
|
812
|
+
var PageBlockTilesAlignment = z36.enum(["Center", "FrameHeight"]);
|
|
813
|
+
var PageBlockTilesLayout = z36.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
814
|
+
var PageBlockTheme = z36.object({
|
|
815
|
+
themeIds: z36.array(z36.string()),
|
|
863
816
|
type: PageBlockThemeType
|
|
864
817
|
});
|
|
865
|
-
var PageBlockUrlPreview =
|
|
866
|
-
title: nullishToOptional(
|
|
867
|
-
description: nullishToOptional(
|
|
868
|
-
thumbnailUrl: nullishToOptional(
|
|
869
|
-
});
|
|
870
|
-
var PageBlockFrameOrigin =
|
|
871
|
-
sourceFileName: nullishToOptional(
|
|
872
|
-
title: nullishToOptional(
|
|
873
|
-
previewUrl: nullishToOptional(
|
|
874
|
-
valid: nullishToOptional(
|
|
875
|
-
referenceId: nullishToOptional(
|
|
876
|
-
assetId: nullishToOptional(
|
|
877
|
-
assetScale: nullishToOptional(
|
|
878
|
-
width: nullishToOptional(
|
|
879
|
-
height: nullishToOptional(
|
|
880
|
-
});
|
|
881
|
-
var PageBlockFrame =
|
|
882
|
-
persistentId:
|
|
883
|
-
sourceId:
|
|
884
|
-
sourceFrameId:
|
|
885
|
-
title: nullishToOptional(
|
|
886
|
-
description: nullishToOptional(
|
|
818
|
+
var PageBlockUrlPreview = z36.object({
|
|
819
|
+
title: nullishToOptional(z36.string()),
|
|
820
|
+
description: nullishToOptional(z36.string()),
|
|
821
|
+
thumbnailUrl: nullishToOptional(z36.string())
|
|
822
|
+
});
|
|
823
|
+
var PageBlockFrameOrigin = z36.object({
|
|
824
|
+
sourceFileName: nullishToOptional(z36.string()),
|
|
825
|
+
title: nullishToOptional(z36.string()),
|
|
826
|
+
previewUrl: nullishToOptional(z36.string()),
|
|
827
|
+
valid: nullishToOptional(z36.boolean()),
|
|
828
|
+
referenceId: nullishToOptional(z36.string()),
|
|
829
|
+
assetId: nullishToOptional(z36.string()),
|
|
830
|
+
assetScale: nullishToOptional(z36.number()),
|
|
831
|
+
width: nullishToOptional(z36.number()),
|
|
832
|
+
height: nullishToOptional(z36.number())
|
|
833
|
+
});
|
|
834
|
+
var PageBlockFrame = z36.object({
|
|
835
|
+
persistentId: z36.string(),
|
|
836
|
+
sourceId: z36.string(),
|
|
837
|
+
sourceFrameId: z36.string(),
|
|
838
|
+
title: nullishToOptional(z36.string()),
|
|
839
|
+
description: nullishToOptional(z36.string()),
|
|
887
840
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
888
841
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
889
842
|
});
|
|
890
|
-
var PageBlockAsset =
|
|
843
|
+
var PageBlockAsset = z36.object({
|
|
891
844
|
type: PageBlockAssetType,
|
|
892
|
-
id: nullishToOptional(
|
|
893
|
-
url: nullishToOptional(
|
|
845
|
+
id: nullishToOptional(z36.string()),
|
|
846
|
+
url: nullishToOptional(z36.string()),
|
|
894
847
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
895
848
|
});
|
|
896
|
-
var PageBlockLinkPreview =
|
|
897
|
-
title: nullishToOptional(
|
|
898
|
-
valid: nullishToOptional(
|
|
849
|
+
var PageBlockLinkPreview = z36.object({
|
|
850
|
+
title: nullishToOptional(z36.string()),
|
|
851
|
+
valid: nullishToOptional(z36.boolean())
|
|
899
852
|
});
|
|
900
|
-
var PageBlockShortcut =
|
|
901
|
-
persistentId:
|
|
902
|
-
title: nullishToOptional(
|
|
903
|
-
description: nullishToOptional(
|
|
853
|
+
var PageBlockShortcut = z36.object({
|
|
854
|
+
persistentId: z36.string(),
|
|
855
|
+
title: nullishToOptional(z36.string()),
|
|
856
|
+
description: nullishToOptional(z36.string()),
|
|
904
857
|
asset: nullishToOptional(PageBlockAsset),
|
|
905
|
-
documentationItemId: nullishToOptional(
|
|
906
|
-
pageHeadingId: nullishToOptional(
|
|
907
|
-
url: nullishToOptional(
|
|
908
|
-
openInNewTab: nullishToOptional(
|
|
858
|
+
documentationItemId: nullishToOptional(z36.string()),
|
|
859
|
+
pageHeadingId: nullishToOptional(z36.string()),
|
|
860
|
+
url: nullishToOptional(z36.string()),
|
|
861
|
+
openInNewTab: nullishToOptional(z36.boolean()),
|
|
909
862
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
910
863
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
911
864
|
});
|
|
912
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
865
|
+
var PageBlockCustomBlockPropertyImageValue = z36.object({
|
|
913
866
|
asset: nullishToOptional(PageBlockAsset),
|
|
914
|
-
assetId: nullishToOptional(
|
|
915
|
-
assetUrl: nullishToOptional(
|
|
867
|
+
assetId: nullishToOptional(z36.string()),
|
|
868
|
+
assetUrl: nullishToOptional(z36.string())
|
|
916
869
|
});
|
|
917
|
-
var PageBlockCustomBlockPropertyValue =
|
|
918
|
-
key:
|
|
919
|
-
value:
|
|
870
|
+
var PageBlockCustomBlockPropertyValue = z36.object({
|
|
871
|
+
key: z36.string(),
|
|
872
|
+
value: z36.any()
|
|
920
873
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
921
874
|
// e.g. element id 67451 in the dev db
|
|
922
875
|
// value: z
|
|
@@ -927,360 +880,360 @@ var PageBlockCustomBlockPropertyValue = z38.object({
|
|
|
927
880
|
// .or(TypographyTokenData)
|
|
928
881
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
929
882
|
});
|
|
930
|
-
var PageBlockFigmaFrameProperties =
|
|
883
|
+
var PageBlockFigmaFrameProperties = z36.object({
|
|
931
884
|
color: nullishToOptional(
|
|
932
|
-
|
|
933
|
-
value:
|
|
885
|
+
z36.object({
|
|
886
|
+
value: z36.string()
|
|
934
887
|
})
|
|
935
888
|
),
|
|
936
889
|
alignment: PageBlockTilesAlignment,
|
|
937
890
|
layout: PageBlockTilesLayout,
|
|
938
891
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
939
|
-
showTitles:
|
|
892
|
+
showTitles: z36.boolean()
|
|
940
893
|
});
|
|
941
|
-
var PageBlockRenderCodeProperties =
|
|
942
|
-
showCode:
|
|
943
|
-
showControls:
|
|
894
|
+
var PageBlockRenderCodeProperties = z36.object({
|
|
895
|
+
showCode: z36.boolean(),
|
|
896
|
+
showControls: z36.boolean().optional()
|
|
944
897
|
});
|
|
945
|
-
var PageBlockAssetComponent =
|
|
946
|
-
persistentId:
|
|
947
|
-
componentAssetId:
|
|
948
|
-
title: nullishToOptional(
|
|
949
|
-
description: nullishToOptional(
|
|
898
|
+
var PageBlockAssetComponent = z36.object({
|
|
899
|
+
persistentId: z36.string(),
|
|
900
|
+
componentAssetId: z36.string(),
|
|
901
|
+
title: nullishToOptional(z36.string()),
|
|
902
|
+
description: nullishToOptional(z36.string()),
|
|
950
903
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
951
904
|
});
|
|
952
|
-
var PageBlockTableColumn =
|
|
953
|
-
id:
|
|
905
|
+
var PageBlockTableColumn = z36.object({
|
|
906
|
+
id: z36.string(),
|
|
954
907
|
width: DimensionTokenData
|
|
955
908
|
});
|
|
956
|
-
var PageBlockTableProperties =
|
|
957
|
-
showBorders:
|
|
958
|
-
showHeaderRow:
|
|
959
|
-
showHeaderColumn:
|
|
960
|
-
columns:
|
|
909
|
+
var PageBlockTableProperties = z36.object({
|
|
910
|
+
showBorders: z36.boolean(),
|
|
911
|
+
showHeaderRow: z36.boolean(),
|
|
912
|
+
showHeaderColumn: z36.boolean(),
|
|
913
|
+
columns: z36.array(PageBlockTableColumn)
|
|
961
914
|
});
|
|
962
|
-
var PageBlockTextSpanAttributeType =
|
|
963
|
-
var PageBlockTextSpanAttribute =
|
|
915
|
+
var PageBlockTextSpanAttributeType = z36.enum(["Bold", "Italic", "Link", "Strikethrough", "Code"]);
|
|
916
|
+
var PageBlockTextSpanAttribute = z36.object({
|
|
964
917
|
type: PageBlockTextSpanAttributeType,
|
|
965
|
-
link: nullishToOptional(
|
|
966
|
-
documentationItemId: nullishToOptional(
|
|
967
|
-
openInNewWindow: nullishToOptional(
|
|
918
|
+
link: nullishToOptional(z36.string()),
|
|
919
|
+
documentationItemId: nullishToOptional(z36.string()),
|
|
920
|
+
openInNewWindow: nullishToOptional(z36.boolean()),
|
|
968
921
|
// deprecated. use openInNewTab
|
|
969
|
-
openInNewTab: nullishToOptional(
|
|
922
|
+
openInNewTab: nullishToOptional(z36.boolean())
|
|
970
923
|
});
|
|
971
|
-
var PageBlockTextSpan =
|
|
972
|
-
text:
|
|
973
|
-
attributes:
|
|
924
|
+
var PageBlockTextSpan = z36.object({
|
|
925
|
+
text: z36.string(),
|
|
926
|
+
attributes: z36.array(PageBlockTextSpanAttribute)
|
|
974
927
|
});
|
|
975
|
-
var PageBlockText =
|
|
976
|
-
spans:
|
|
928
|
+
var PageBlockText = z36.object({
|
|
929
|
+
spans: z36.array(PageBlockTextSpan)
|
|
977
930
|
});
|
|
978
|
-
var PageBlockBaseV1 =
|
|
979
|
-
persistentId:
|
|
931
|
+
var PageBlockBaseV1 = z36.object({
|
|
932
|
+
persistentId: z36.string(),
|
|
980
933
|
type: PageBlockTypeV1,
|
|
981
934
|
// Element linking
|
|
982
|
-
designObjectId: nullishToOptional(
|
|
983
|
-
designObjectIds: nullishToOptional(
|
|
984
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
985
|
-
showNestedGroups: nullishToOptional(
|
|
986
|
-
brandId: nullishToOptional(
|
|
935
|
+
designObjectId: nullishToOptional(z36.string()),
|
|
936
|
+
designObjectIds: nullishToOptional(z36.array(z36.string())),
|
|
937
|
+
tokenType: nullishToOptional(DesignTokenType.or(z36.literal("Font"))),
|
|
938
|
+
showNestedGroups: nullishToOptional(z36.boolean()),
|
|
939
|
+
brandId: nullishToOptional(z36.string()),
|
|
987
940
|
// Rich text
|
|
988
941
|
text: nullishToOptional(PageBlockText),
|
|
989
|
-
caption: nullishToOptional(
|
|
990
|
-
headingType: nullishToOptional(
|
|
942
|
+
caption: nullishToOptional(z36.string()),
|
|
943
|
+
headingType: nullishToOptional(z36.number().min(1).max(3)),
|
|
991
944
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
992
945
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
993
|
-
urlInput: nullishToOptional(
|
|
994
|
-
url: nullishToOptional(
|
|
946
|
+
urlInput: nullishToOptional(z36.string()),
|
|
947
|
+
url: nullishToOptional(z36.string()),
|
|
995
948
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
996
949
|
// Image
|
|
997
950
|
asset: nullishToOptional(PageBlockAsset),
|
|
998
951
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
999
952
|
// Shortcuts block
|
|
1000
|
-
shortcuts: nullishToOptional(
|
|
953
|
+
shortcuts: nullishToOptional(z36.array(PageBlockShortcut)),
|
|
1001
954
|
// Custom blocks
|
|
1002
|
-
customBlockKey: nullishToOptional(
|
|
1003
|
-
customBlockProperties: nullishToOptional(
|
|
1004
|
-
variantKey: nullishToOptional(
|
|
955
|
+
customBlockKey: nullishToOptional(z36.string()),
|
|
956
|
+
customBlockProperties: nullishToOptional(z36.array(PageBlockCustomBlockPropertyValue)),
|
|
957
|
+
variantKey: nullishToOptional(z36.string()),
|
|
1005
958
|
// Figma frames
|
|
1006
959
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
1007
|
-
figmaFrames: nullishToOptional(
|
|
960
|
+
figmaFrames: nullishToOptional(z36.array(PageBlockFrame)),
|
|
1008
961
|
// Generic
|
|
1009
962
|
size: nullishToOptional(Size),
|
|
1010
963
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1011
964
|
// Render code
|
|
1012
965
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
1013
966
|
// Component assets
|
|
1014
|
-
componentAssets: nullishToOptional(
|
|
967
|
+
componentAssets: nullishToOptional(z36.array(PageBlockAssetComponent)),
|
|
1015
968
|
// Tables
|
|
1016
969
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
1017
|
-
columnId: nullishToOptional(
|
|
970
|
+
columnId: nullishToOptional(z36.string()),
|
|
1018
971
|
// Token spreadsheet
|
|
1019
972
|
theme: nullishToOptional(PageBlockTheme),
|
|
1020
|
-
blacklistedElementProperties: nullishToOptional(
|
|
973
|
+
blacklistedElementProperties: nullishToOptional(z36.array(z36.string())),
|
|
1021
974
|
// Arbitrary
|
|
1022
|
-
userMetadata: nullishToOptional(
|
|
975
|
+
userMetadata: nullishToOptional(z36.string())
|
|
1023
976
|
});
|
|
1024
977
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
1025
|
-
children:
|
|
978
|
+
children: z36.lazy(
|
|
1026
979
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
1027
980
|
)
|
|
1028
981
|
});
|
|
1029
|
-
var PageBlockLinkType =
|
|
1030
|
-
var PageBlockImageType =
|
|
1031
|
-
var PageBlockImageAlignment =
|
|
1032
|
-
var PageBlockTableCellAlignment =
|
|
1033
|
-
var PageBlockPreviewContainerSize =
|
|
1034
|
-
var PageBlockThemeDisplayMode =
|
|
1035
|
-
var PageBlockImageResourceReference =
|
|
1036
|
-
resourceId:
|
|
1037
|
-
url:
|
|
1038
|
-
});
|
|
1039
|
-
var PageBlockResourceFrameNodeReference =
|
|
1040
|
-
sourceId:
|
|
1041
|
-
frameReferenceId:
|
|
1042
|
-
});
|
|
1043
|
-
var PageBlockImageReference =
|
|
982
|
+
var PageBlockLinkType = z37.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
983
|
+
var PageBlockImageType = z37.enum(["Resource", "FigmaNode"]);
|
|
984
|
+
var PageBlockImageAlignment = z37.enum(["Left", "Center", "Stretch"]);
|
|
985
|
+
var PageBlockTableCellAlignment = z37.enum(["Left", "Center", "Right"]);
|
|
986
|
+
var PageBlockPreviewContainerSize = z37.enum(["Centered", "NaturalHeight"]);
|
|
987
|
+
var PageBlockThemeDisplayMode = z37.enum(["Split", "Override"]);
|
|
988
|
+
var PageBlockImageResourceReference = z37.object({
|
|
989
|
+
resourceId: z37.string(),
|
|
990
|
+
url: z37.string()
|
|
991
|
+
});
|
|
992
|
+
var PageBlockResourceFrameNodeReference = z37.object({
|
|
993
|
+
sourceId: z37.string(),
|
|
994
|
+
frameReferenceId: z37.string()
|
|
995
|
+
});
|
|
996
|
+
var PageBlockImageReference = z37.object({
|
|
1044
997
|
type: PageBlockImageType,
|
|
1045
998
|
resource: PageBlockImageResourceReference.optional(),
|
|
1046
999
|
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
1047
1000
|
});
|
|
1048
|
-
var PageBlockColorV2 =
|
|
1049
|
-
value:
|
|
1050
|
-
referencedTokenId:
|
|
1001
|
+
var PageBlockColorV2 = z37.object({
|
|
1002
|
+
value: z37.string(),
|
|
1003
|
+
referencedTokenId: z37.string().optional()
|
|
1051
1004
|
});
|
|
1052
|
-
var PageBlockAssetEntityMeta =
|
|
1053
|
-
title:
|
|
1054
|
-
description:
|
|
1005
|
+
var PageBlockAssetEntityMeta = z37.object({
|
|
1006
|
+
title: z37.string().optional(),
|
|
1007
|
+
description: z37.string().optional(),
|
|
1055
1008
|
backgroundColor: PageBlockColorV2.optional()
|
|
1056
1009
|
});
|
|
1057
|
-
var PageBlockFigmaComponentEntityMeta =
|
|
1058
|
-
title:
|
|
1059
|
-
description:
|
|
1010
|
+
var PageBlockFigmaComponentEntityMeta = z37.object({
|
|
1011
|
+
title: z37.string().optional(),
|
|
1012
|
+
description: z37.string().optional(),
|
|
1060
1013
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1061
|
-
selectedComponentProperties:
|
|
1014
|
+
selectedComponentProperties: z37.array(z37.string()).optional()
|
|
1062
1015
|
});
|
|
1063
|
-
var PageBlockFigmaNodeEntityMeta =
|
|
1064
|
-
title:
|
|
1065
|
-
description:
|
|
1016
|
+
var PageBlockFigmaNodeEntityMeta = z37.object({
|
|
1017
|
+
title: z37.string().optional(),
|
|
1018
|
+
description: z37.string().optional(),
|
|
1066
1019
|
backgroundColor: PageBlockColorV2.optional()
|
|
1067
1020
|
});
|
|
1068
|
-
var PageBlockAppearanceV2 =
|
|
1021
|
+
var PageBlockAppearanceV2 = z37.object({
|
|
1069
1022
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
1070
|
-
numberOfColumns:
|
|
1023
|
+
numberOfColumns: z37.number().optional()
|
|
1071
1024
|
});
|
|
1072
|
-
var PageBlockItemUntypedValue =
|
|
1073
|
-
value:
|
|
1074
|
-
}).and(
|
|
1075
|
-
var PageBlockLinkV2 =
|
|
1025
|
+
var PageBlockItemUntypedValue = z37.object({
|
|
1026
|
+
value: z37.any()
|
|
1027
|
+
}).and(z37.record(z37.any()));
|
|
1028
|
+
var PageBlockLinkV2 = z37.object({
|
|
1076
1029
|
type: PageBlockLinkType,
|
|
1077
|
-
documentationItemId:
|
|
1078
|
-
pageHeadingId:
|
|
1079
|
-
url:
|
|
1080
|
-
openInNewTab:
|
|
1030
|
+
documentationItemId: z37.string().optional(),
|
|
1031
|
+
pageHeadingId: z37.string().optional(),
|
|
1032
|
+
url: z37.string().optional(),
|
|
1033
|
+
openInNewTab: z37.boolean().optional()
|
|
1081
1034
|
});
|
|
1082
|
-
var PageBlockItemV2 =
|
|
1083
|
-
id:
|
|
1035
|
+
var PageBlockItemV2 = z37.object({
|
|
1036
|
+
id: z37.string(),
|
|
1084
1037
|
linksTo: PageBlockLinkV2.optional(),
|
|
1085
|
-
props:
|
|
1038
|
+
props: z37.record(PageBlockItemUntypedValue)
|
|
1086
1039
|
});
|
|
1087
|
-
var PageBlockDataV2 =
|
|
1088
|
-
packageId:
|
|
1089
|
-
variantId:
|
|
1090
|
-
indentLevel:
|
|
1040
|
+
var PageBlockDataV2 = z37.object({
|
|
1041
|
+
packageId: z37.string(),
|
|
1042
|
+
variantId: z37.string().optional(),
|
|
1043
|
+
indentLevel: z37.number(),
|
|
1091
1044
|
appearance: PageBlockAppearanceV2.optional(),
|
|
1092
|
-
items:
|
|
1045
|
+
items: z37.array(PageBlockItemV2)
|
|
1093
1046
|
});
|
|
1094
|
-
var PageBlockItemAssetValue =
|
|
1095
|
-
selectedPropertyIds:
|
|
1096
|
-
showSearch:
|
|
1047
|
+
var PageBlockItemAssetValue = z37.object({
|
|
1048
|
+
selectedPropertyIds: z37.array(z37.string()).optional(),
|
|
1049
|
+
showSearch: z37.boolean().optional(),
|
|
1097
1050
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1098
1051
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1099
|
-
value:
|
|
1100
|
-
|
|
1101
|
-
entityId:
|
|
1102
|
-
entityType:
|
|
1052
|
+
value: z37.array(
|
|
1053
|
+
z37.object({
|
|
1054
|
+
entityId: z37.string(),
|
|
1055
|
+
entityType: z37.enum(["Asset", "AssetGroup"]),
|
|
1103
1056
|
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
1104
1057
|
})
|
|
1105
1058
|
).default([])
|
|
1106
1059
|
});
|
|
1107
|
-
var PageBlockItemAssetPropertyValue =
|
|
1108
|
-
value:
|
|
1060
|
+
var PageBlockItemAssetPropertyValue = z37.object({
|
|
1061
|
+
value: z37.array(z37.string()).default([])
|
|
1109
1062
|
});
|
|
1110
|
-
var PageBlockItemFigmaComponentValue =
|
|
1111
|
-
showComponentName:
|
|
1112
|
-
showComponentDescription:
|
|
1113
|
-
showPropertyList:
|
|
1063
|
+
var PageBlockItemFigmaComponentValue = z37.object({
|
|
1064
|
+
showComponentName: z37.boolean().optional(),
|
|
1065
|
+
showComponentDescription: z37.boolean().optional(),
|
|
1066
|
+
showPropertyList: z37.boolean().optional(),
|
|
1114
1067
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1115
1068
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1116
|
-
value:
|
|
1117
|
-
|
|
1118
|
-
entityId:
|
|
1119
|
-
entityType:
|
|
1069
|
+
value: z37.array(
|
|
1070
|
+
z37.object({
|
|
1071
|
+
entityId: z37.string(),
|
|
1072
|
+
entityType: z37.enum(["FigmaComponent"]),
|
|
1120
1073
|
entityMeta: PageBlockFigmaComponentEntityMeta.optional()
|
|
1121
1074
|
})
|
|
1122
1075
|
).default([])
|
|
1123
1076
|
});
|
|
1124
|
-
var PageBlockItemBooleanValue =
|
|
1125
|
-
value:
|
|
1077
|
+
var PageBlockItemBooleanValue = z37.object({
|
|
1078
|
+
value: z37.boolean()
|
|
1126
1079
|
});
|
|
1127
|
-
var PageBlockItemCodeValue =
|
|
1080
|
+
var PageBlockItemCodeValue = z37.object({
|
|
1128
1081
|
format: PageBlockCodeLanguage.optional(),
|
|
1129
|
-
caption:
|
|
1130
|
-
value:
|
|
1131
|
-
});
|
|
1132
|
-
var PageBlockItemSandboxValue =
|
|
1133
|
-
showCode:
|
|
1134
|
-
showControls:
|
|
1135
|
-
backgroundColor:
|
|
1136
|
-
alignPreview:
|
|
1137
|
-
previewHeight:
|
|
1138
|
-
value:
|
|
1139
|
-
});
|
|
1140
|
-
var PageBlockItemColorValue =
|
|
1141
|
-
var PageBlockItemComponentValue =
|
|
1142
|
-
selectedPropertyIds:
|
|
1143
|
-
value:
|
|
1144
|
-
|
|
1145
|
-
entityId:
|
|
1146
|
-
entityType:
|
|
1082
|
+
caption: z37.string().optional(),
|
|
1083
|
+
value: z37.string()
|
|
1084
|
+
});
|
|
1085
|
+
var PageBlockItemSandboxValue = z37.object({
|
|
1086
|
+
showCode: z37.boolean().optional(),
|
|
1087
|
+
showControls: z37.boolean().optional(),
|
|
1088
|
+
backgroundColor: z37.string().optional(),
|
|
1089
|
+
alignPreview: z37.enum(["Left", "Center"]).optional(),
|
|
1090
|
+
previewHeight: z37.number().optional(),
|
|
1091
|
+
value: z37.string()
|
|
1092
|
+
});
|
|
1093
|
+
var PageBlockItemColorValue = z37.record(z37.any());
|
|
1094
|
+
var PageBlockItemComponentValue = z37.object({
|
|
1095
|
+
selectedPropertyIds: z37.array(z37.string()).optional(),
|
|
1096
|
+
value: z37.array(
|
|
1097
|
+
z37.object({
|
|
1098
|
+
entityId: z37.string(),
|
|
1099
|
+
entityType: z37.enum(["Component", "ComponentGroup"])
|
|
1147
1100
|
})
|
|
1148
1101
|
).default([])
|
|
1149
1102
|
});
|
|
1150
|
-
var PageBlockItemComponentPropertyValue =
|
|
1151
|
-
value:
|
|
1152
|
-
});
|
|
1153
|
-
var PageBlockItemDividerValue =
|
|
1154
|
-
var PageBlockItemEmbedValue =
|
|
1155
|
-
value:
|
|
1156
|
-
caption:
|
|
1157
|
-
height:
|
|
1158
|
-
openGraph:
|
|
1159
|
-
title:
|
|
1160
|
-
description:
|
|
1161
|
-
imageUrl:
|
|
1103
|
+
var PageBlockItemComponentPropertyValue = z37.object({
|
|
1104
|
+
value: z37.string()
|
|
1105
|
+
});
|
|
1106
|
+
var PageBlockItemDividerValue = z37.object({});
|
|
1107
|
+
var PageBlockItemEmbedValue = z37.object({
|
|
1108
|
+
value: z37.string().optional(),
|
|
1109
|
+
caption: z37.string().optional(),
|
|
1110
|
+
height: z37.number().optional(),
|
|
1111
|
+
openGraph: z37.object({
|
|
1112
|
+
title: z37.string().optional(),
|
|
1113
|
+
description: z37.string().optional(),
|
|
1114
|
+
imageUrl: z37.string().optional()
|
|
1162
1115
|
}).optional()
|
|
1163
1116
|
});
|
|
1164
|
-
var PageBlockItemFigmaNodeValue =
|
|
1165
|
-
showSearch:
|
|
1117
|
+
var PageBlockItemFigmaNodeValue = z37.object({
|
|
1118
|
+
showSearch: z37.boolean().optional(),
|
|
1166
1119
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1167
1120
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1168
|
-
showFrameDetails:
|
|
1169
|
-
value:
|
|
1170
|
-
|
|
1171
|
-
entityId:
|
|
1121
|
+
showFrameDetails: z37.boolean().optional(),
|
|
1122
|
+
value: z37.array(
|
|
1123
|
+
z37.object({
|
|
1124
|
+
entityId: z37.string(),
|
|
1172
1125
|
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
1173
1126
|
})
|
|
1174
1127
|
).default([])
|
|
1175
1128
|
});
|
|
1176
|
-
var PageBlockItemImageValue =
|
|
1177
|
-
alt:
|
|
1178
|
-
caption:
|
|
1129
|
+
var PageBlockItemImageValue = z37.object({
|
|
1130
|
+
alt: z37.string().optional(),
|
|
1131
|
+
caption: z37.string().optional(),
|
|
1179
1132
|
alignment: PageBlockImageAlignment.optional(),
|
|
1180
1133
|
value: PageBlockImageReference.optional()
|
|
1181
1134
|
});
|
|
1182
|
-
var PageBlockItemMarkdownValue =
|
|
1183
|
-
value:
|
|
1135
|
+
var PageBlockItemMarkdownValue = z37.object({
|
|
1136
|
+
value: z37.string()
|
|
1184
1137
|
});
|
|
1185
|
-
var PageBlockItemMultiRichTextValue =
|
|
1138
|
+
var PageBlockItemMultiRichTextValue = z37.object({
|
|
1186
1139
|
value: PageBlockText.array()
|
|
1187
1140
|
});
|
|
1188
|
-
var PageBlockItemMultiSelectValue =
|
|
1189
|
-
value:
|
|
1141
|
+
var PageBlockItemMultiSelectValue = z37.object({
|
|
1142
|
+
value: z37.array(z37.string()).default([])
|
|
1190
1143
|
});
|
|
1191
|
-
var PageBlockItemNumberValue =
|
|
1192
|
-
value:
|
|
1144
|
+
var PageBlockItemNumberValue = z37.object({
|
|
1145
|
+
value: z37.number()
|
|
1193
1146
|
});
|
|
1194
|
-
var PageBlockItemRichTextValue =
|
|
1147
|
+
var PageBlockItemRichTextValue = z37.object({
|
|
1195
1148
|
value: PageBlockText,
|
|
1196
1149
|
calloutType: PageBlockCalloutType.optional()
|
|
1197
1150
|
});
|
|
1198
|
-
var PageBlockItemSingleSelectValue =
|
|
1199
|
-
value:
|
|
1151
|
+
var PageBlockItemSingleSelectValue = z37.object({
|
|
1152
|
+
value: z37.string()
|
|
1200
1153
|
});
|
|
1201
|
-
var PageBlockItemStorybookValue =
|
|
1202
|
-
caption:
|
|
1203
|
-
height:
|
|
1204
|
-
embedUrl:
|
|
1205
|
-
value:
|
|
1154
|
+
var PageBlockItemStorybookValue = z37.object({
|
|
1155
|
+
caption: z37.string().optional(),
|
|
1156
|
+
height: z37.number().optional(),
|
|
1157
|
+
embedUrl: z37.string().optional(),
|
|
1158
|
+
value: z37.string().optional()
|
|
1206
1159
|
});
|
|
1207
|
-
var PageBlockItemTextValue =
|
|
1208
|
-
value:
|
|
1160
|
+
var PageBlockItemTextValue = z37.object({
|
|
1161
|
+
value: z37.string()
|
|
1209
1162
|
});
|
|
1210
|
-
var PageBlockItemTokenValue =
|
|
1211
|
-
selectedPropertyIds:
|
|
1212
|
-
selectedThemeIds:
|
|
1163
|
+
var PageBlockItemTokenValue = z37.object({
|
|
1164
|
+
selectedPropertyIds: z37.array(z37.string()).optional(),
|
|
1165
|
+
selectedThemeIds: z37.array(z37.string()).optional(),
|
|
1213
1166
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1214
|
-
value:
|
|
1215
|
-
|
|
1216
|
-
entityId:
|
|
1217
|
-
entityType:
|
|
1218
|
-
entityMeta:
|
|
1219
|
-
showNestedGroups:
|
|
1167
|
+
value: z37.array(
|
|
1168
|
+
z37.object({
|
|
1169
|
+
entityId: z37.string(),
|
|
1170
|
+
entityType: z37.enum(["Token", "TokenGroup"]),
|
|
1171
|
+
entityMeta: z37.object({
|
|
1172
|
+
showNestedGroups: z37.boolean().optional()
|
|
1220
1173
|
}).optional()
|
|
1221
1174
|
})
|
|
1222
1175
|
).default([])
|
|
1223
1176
|
});
|
|
1224
|
-
var PageBlockItemTokenPropertyValue =
|
|
1225
|
-
selectedPropertyIds:
|
|
1226
|
-
selectedThemeIds:
|
|
1227
|
-
value:
|
|
1177
|
+
var PageBlockItemTokenPropertyValue = z37.object({
|
|
1178
|
+
selectedPropertyIds: z37.array(z37.string()).optional(),
|
|
1179
|
+
selectedThemeIds: z37.array(z37.string()).optional(),
|
|
1180
|
+
value: z37.array(z37.string()).default([])
|
|
1228
1181
|
});
|
|
1229
|
-
var PageBlockItemTokenTypeValue =
|
|
1230
|
-
value:
|
|
1182
|
+
var PageBlockItemTokenTypeValue = z37.object({
|
|
1183
|
+
value: z37.array(DesignTokenType).default([])
|
|
1231
1184
|
});
|
|
1232
|
-
var PageBlockItemUrlValue =
|
|
1233
|
-
value:
|
|
1185
|
+
var PageBlockItemUrlValue = z37.object({
|
|
1186
|
+
value: z37.string()
|
|
1234
1187
|
});
|
|
1235
|
-
var PageBlockItemTableRichTextNode =
|
|
1236
|
-
type:
|
|
1237
|
-
id:
|
|
1188
|
+
var PageBlockItemTableRichTextNode = z37.object({
|
|
1189
|
+
type: z37.literal("RichText"),
|
|
1190
|
+
id: z37.string(),
|
|
1238
1191
|
value: PageBlockItemRichTextValue.shape.value
|
|
1239
1192
|
});
|
|
1240
|
-
var PageBlockItemTableMultiRichTextNode =
|
|
1241
|
-
type:
|
|
1193
|
+
var PageBlockItemTableMultiRichTextNode = z37.object({
|
|
1194
|
+
type: z37.literal("MultiRichText"),
|
|
1242
1195
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
1243
1196
|
});
|
|
1244
|
-
var PageBlockItemTableImageNode =
|
|
1245
|
-
type:
|
|
1246
|
-
id:
|
|
1197
|
+
var PageBlockItemTableImageNode = z37.object({
|
|
1198
|
+
type: z37.literal("Image"),
|
|
1199
|
+
id: z37.string(),
|
|
1247
1200
|
caption: PageBlockItemImageValue.shape.caption,
|
|
1248
1201
|
value: PageBlockItemImageValue.shape.value
|
|
1249
1202
|
});
|
|
1250
|
-
var PageBlockItemTableNode =
|
|
1203
|
+
var PageBlockItemTableNode = z37.discriminatedUnion("type", [
|
|
1251
1204
|
PageBlockItemTableRichTextNode,
|
|
1252
1205
|
// PageBlockItemTableMultiRichTextNode,
|
|
1253
1206
|
PageBlockItemTableImageNode
|
|
1254
1207
|
]);
|
|
1255
|
-
var PageBlockItemTableCell =
|
|
1256
|
-
id:
|
|
1257
|
-
nodes:
|
|
1258
|
-
columnWidth:
|
|
1208
|
+
var PageBlockItemTableCell = z37.object({
|
|
1209
|
+
id: z37.string(),
|
|
1210
|
+
nodes: z37.array(PageBlockItemTableNode),
|
|
1211
|
+
columnWidth: z37.number().optional(),
|
|
1259
1212
|
alignment: PageBlockTableCellAlignment
|
|
1260
1213
|
});
|
|
1261
|
-
var PageBlockItemTableRow =
|
|
1262
|
-
cells:
|
|
1214
|
+
var PageBlockItemTableRow = z37.object({
|
|
1215
|
+
cells: z37.array(PageBlockItemTableCell)
|
|
1263
1216
|
});
|
|
1264
|
-
var PageBlockItemTableValue =
|
|
1265
|
-
highlightHeaderColumn:
|
|
1266
|
-
highlightHeaderRow:
|
|
1267
|
-
showBorder:
|
|
1268
|
-
value:
|
|
1217
|
+
var PageBlockItemTableValue = z37.object({
|
|
1218
|
+
highlightHeaderColumn: z37.boolean().optional(),
|
|
1219
|
+
highlightHeaderRow: z37.boolean().optional(),
|
|
1220
|
+
showBorder: z37.boolean().optional(),
|
|
1221
|
+
value: z37.array(PageBlockItemTableRow).default([])
|
|
1269
1222
|
});
|
|
1270
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
1271
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
1223
|
+
var DocumentationItemHeaderAlignmentSchema = z38.enum(["Left", "Center"]);
|
|
1224
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z38.enum(["AspectFill", "AspectFit"]);
|
|
1272
1225
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1273
1226
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1274
|
-
var DocumentationItemHeaderV1 =
|
|
1275
|
-
description:
|
|
1227
|
+
var DocumentationItemHeaderV1 = z39.object({
|
|
1228
|
+
description: z39.string(),
|
|
1276
1229
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1277
1230
|
foregroundColor: ColorTokenData.nullish(),
|
|
1278
1231
|
backgroundColor: ColorTokenData.nullish(),
|
|
1279
1232
|
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
1280
1233
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1281
|
-
showBackgroundOverlay:
|
|
1282
|
-
showCoverText:
|
|
1283
|
-
minHeight:
|
|
1234
|
+
showBackgroundOverlay: z39.boolean(),
|
|
1235
|
+
showCoverText: z39.boolean(),
|
|
1236
|
+
minHeight: z39.number().nullish()
|
|
1284
1237
|
});
|
|
1285
1238
|
var defaultDocumentationItemHeaderV1 = {
|
|
1286
1239
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1289,26 +1242,26 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
1289
1242
|
showBackgroundOverlay: false,
|
|
1290
1243
|
showCoverText: true
|
|
1291
1244
|
};
|
|
1292
|
-
var DocumentationItemConfigurationV1 =
|
|
1293
|
-
showSidebar:
|
|
1294
|
-
isPrivate:
|
|
1295
|
-
isHidden:
|
|
1245
|
+
var DocumentationItemConfigurationV1 = z40.object({
|
|
1246
|
+
showSidebar: z40.boolean(),
|
|
1247
|
+
isPrivate: z40.boolean().optional(),
|
|
1248
|
+
isHidden: z40.boolean().optional(),
|
|
1296
1249
|
header: DocumentationItemHeaderV1
|
|
1297
1250
|
});
|
|
1298
|
-
var DocumentationPageDataV1 =
|
|
1299
|
-
blocks:
|
|
1251
|
+
var DocumentationPageDataV1 = z41.object({
|
|
1252
|
+
blocks: z41.array(PageBlockV1),
|
|
1300
1253
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1301
1254
|
});
|
|
1302
|
-
var DocumentationItemHeaderV2 =
|
|
1303
|
-
description:
|
|
1255
|
+
var DocumentationItemHeaderV2 = z42.object({
|
|
1256
|
+
description: z42.string(),
|
|
1304
1257
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1305
1258
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
1306
1259
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
1307
1260
|
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
1308
1261
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1309
|
-
showBackgroundOverlay:
|
|
1310
|
-
showCoverText:
|
|
1311
|
-
minHeight:
|
|
1262
|
+
showBackgroundOverlay: z42.boolean(),
|
|
1263
|
+
showCoverText: z42.boolean(),
|
|
1264
|
+
minHeight: z42.number().nullish()
|
|
1312
1265
|
});
|
|
1313
1266
|
var defaultDocumentationItemHeaderV2 = {
|
|
1314
1267
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1317,161 +1270,192 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1317
1270
|
showBackgroundOverlay: false,
|
|
1318
1271
|
showCoverText: true
|
|
1319
1272
|
};
|
|
1320
|
-
var DocumentationItemConfigurationV2 =
|
|
1321
|
-
showSidebar:
|
|
1322
|
-
isPrivate:
|
|
1323
|
-
isHidden:
|
|
1273
|
+
var DocumentationItemConfigurationV2 = z43.object({
|
|
1274
|
+
showSidebar: z43.boolean(),
|
|
1275
|
+
isPrivate: z43.boolean().optional(),
|
|
1276
|
+
isHidden: z43.boolean().optional(),
|
|
1324
1277
|
header: DocumentationItemHeaderV2
|
|
1325
1278
|
});
|
|
1326
|
-
var DocumentationPageDataV2 =
|
|
1279
|
+
var DocumentationPageDataV2 = z44.object({
|
|
1327
1280
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1328
1281
|
});
|
|
1282
|
+
var DesignElementOrigin = z45.object({
|
|
1283
|
+
id: z45.string(),
|
|
1284
|
+
sourceId: z45.string(),
|
|
1285
|
+
name: z45.string()
|
|
1286
|
+
});
|
|
1287
|
+
var DesignElementBase = z45.object({
|
|
1288
|
+
id: z45.string(),
|
|
1289
|
+
persistentId: z45.string(),
|
|
1290
|
+
meta: ObjectMeta,
|
|
1291
|
+
designSystemVersionId: z45.string(),
|
|
1292
|
+
createdAt: z45.coerce.date(),
|
|
1293
|
+
updatedAt: z45.coerce.date()
|
|
1294
|
+
});
|
|
1295
|
+
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1296
|
+
origin: DesignElementOrigin
|
|
1297
|
+
});
|
|
1298
|
+
var DesignElementGroupablePart = z45.object({
|
|
1299
|
+
parentPersistentId: z45.string().optional(),
|
|
1300
|
+
sortOrder: z45.number()
|
|
1301
|
+
});
|
|
1302
|
+
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1303
|
+
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1304
|
+
parentPersistentId: z45.string()
|
|
1305
|
+
});
|
|
1306
|
+
var DesignElementBrandedPart = z45.object({
|
|
1307
|
+
brandPersistentId: z45.string()
|
|
1308
|
+
});
|
|
1309
|
+
var DesignElementSlugPart = z45.object({
|
|
1310
|
+
slug: z45.string().optional(),
|
|
1311
|
+
userSlug: z45.string().optional()
|
|
1312
|
+
});
|
|
1329
1313
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1330
1314
|
data: PageBlockDataV2
|
|
1331
1315
|
});
|
|
1332
|
-
var PageBlockEditorModelV2 =
|
|
1333
|
-
id:
|
|
1334
|
-
type:
|
|
1316
|
+
var PageBlockEditorModelV2 = z46.object({
|
|
1317
|
+
id: z46.string(),
|
|
1318
|
+
type: z46.literal("Block"),
|
|
1335
1319
|
data: PageBlockDataV2
|
|
1336
1320
|
});
|
|
1337
|
-
var PageSectionTypeV2 =
|
|
1338
|
-
var PageSectionColumnV2 =
|
|
1339
|
-
id:
|
|
1340
|
-
blocks:
|
|
1341
|
-
});
|
|
1342
|
-
var PageSectionItemV2 =
|
|
1343
|
-
id:
|
|
1344
|
-
title:
|
|
1345
|
-
columns:
|
|
1346
|
-
});
|
|
1347
|
-
var PageSectionPaddingV2 =
|
|
1348
|
-
top:
|
|
1349
|
-
bottom:
|
|
1350
|
-
left:
|
|
1351
|
-
right:
|
|
1352
|
-
});
|
|
1353
|
-
var PageSectionAppearanceV2 =
|
|
1354
|
-
expandToEdges:
|
|
1355
|
-
contentExpandToEdges:
|
|
1321
|
+
var PageSectionTypeV2 = z47.enum(["Tabs"]);
|
|
1322
|
+
var PageSectionColumnV2 = z47.object({
|
|
1323
|
+
id: z47.string(),
|
|
1324
|
+
blocks: z47.array(PageBlockEditorModelV2)
|
|
1325
|
+
});
|
|
1326
|
+
var PageSectionItemV2 = z47.object({
|
|
1327
|
+
id: z47.string(),
|
|
1328
|
+
title: z47.string(),
|
|
1329
|
+
columns: z47.array(PageSectionColumnV2)
|
|
1330
|
+
});
|
|
1331
|
+
var PageSectionPaddingV2 = z47.object({
|
|
1332
|
+
top: z47.number().optional(),
|
|
1333
|
+
bottom: z47.number().optional(),
|
|
1334
|
+
left: z47.number().optional(),
|
|
1335
|
+
right: z47.number().optional()
|
|
1336
|
+
});
|
|
1337
|
+
var PageSectionAppearanceV2 = z47.object({
|
|
1338
|
+
expandToEdges: z47.boolean(),
|
|
1339
|
+
contentExpandToEdges: z47.boolean(),
|
|
1356
1340
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1357
1341
|
foregroundColor: PageBlockColorV2.optional(),
|
|
1358
1342
|
padding: PageSectionPaddingV2.optional()
|
|
1359
1343
|
});
|
|
1360
|
-
var PageSectionEditorModelV2 =
|
|
1361
|
-
id:
|
|
1362
|
-
type:
|
|
1363
|
-
variantId:
|
|
1344
|
+
var PageSectionEditorModelV2 = z47.object({
|
|
1345
|
+
id: z47.string(),
|
|
1346
|
+
type: z47.literal("Section"),
|
|
1347
|
+
variantId: z47.string().optional(),
|
|
1364
1348
|
sectionType: PageSectionTypeV2,
|
|
1365
1349
|
appearance: PageSectionAppearanceV2,
|
|
1366
|
-
items:
|
|
1350
|
+
items: z47.array(PageSectionItemV2)
|
|
1367
1351
|
});
|
|
1368
|
-
var DurationUnit =
|
|
1369
|
-
var DurationValue =
|
|
1352
|
+
var DurationUnit = z48.enum(["Ms"]);
|
|
1353
|
+
var DurationValue = z48.object({
|
|
1370
1354
|
unit: DurationUnit,
|
|
1371
|
-
measure:
|
|
1355
|
+
measure: z48.number()
|
|
1372
1356
|
});
|
|
1373
1357
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1374
|
-
var FigmaFileStructureNodeType =
|
|
1375
|
-
var FigmaFileStructureNodeBase =
|
|
1376
|
-
id:
|
|
1377
|
-
name:
|
|
1358
|
+
var FigmaFileStructureNodeType = z49.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1359
|
+
var FigmaFileStructureNodeBase = z49.object({
|
|
1360
|
+
id: z49.string(),
|
|
1361
|
+
name: z49.string(),
|
|
1378
1362
|
type: FigmaFileStructureNodeType,
|
|
1379
1363
|
size: SizeOrUndefined,
|
|
1380
|
-
parentComponentSetId:
|
|
1364
|
+
parentComponentSetId: z49.string().optional()
|
|
1381
1365
|
});
|
|
1382
1366
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1383
|
-
children:
|
|
1367
|
+
children: z49.lazy(() => FigmaFileStructureNode.array())
|
|
1384
1368
|
});
|
|
1385
|
-
var FigmaFileStructureStatistics =
|
|
1386
|
-
frames:
|
|
1387
|
-
components:
|
|
1388
|
-
componentSets:
|
|
1369
|
+
var FigmaFileStructureStatistics = z49.object({
|
|
1370
|
+
frames: z49.number().nullable().optional().transform((v) => v ?? 0),
|
|
1371
|
+
components: z49.number().nullable().optional().transform((v) => v ?? 0),
|
|
1372
|
+
componentSets: z49.number().nullable().optional().transform((v) => v ?? 0)
|
|
1389
1373
|
});
|
|
1390
|
-
var FigmaFileStructureElementData =
|
|
1391
|
-
value:
|
|
1374
|
+
var FigmaFileStructureElementData = z49.object({
|
|
1375
|
+
value: z49.object({
|
|
1392
1376
|
structure: FigmaFileStructureNode,
|
|
1393
1377
|
assetsInFile: FigmaFileStructureStatistics
|
|
1394
1378
|
})
|
|
1395
1379
|
});
|
|
1396
|
-
var FigmaNodeReferenceData =
|
|
1397
|
-
structureElementId:
|
|
1398
|
-
nodeId:
|
|
1399
|
-
fileId:
|
|
1400
|
-
valid:
|
|
1380
|
+
var FigmaNodeReferenceData = z50.object({
|
|
1381
|
+
structureElementId: z50.string(),
|
|
1382
|
+
nodeId: z50.string(),
|
|
1383
|
+
fileId: z50.string().optional(),
|
|
1384
|
+
valid: z50.boolean(),
|
|
1401
1385
|
// Asset data
|
|
1402
|
-
assetId:
|
|
1403
|
-
assetScale:
|
|
1404
|
-
assetWidth:
|
|
1405
|
-
assetHeight:
|
|
1406
|
-
assetUrl:
|
|
1407
|
-
assetOriginKey:
|
|
1408
|
-
});
|
|
1409
|
-
var FigmaNodeReferenceElementData =
|
|
1386
|
+
assetId: z50.string().optional(),
|
|
1387
|
+
assetScale: z50.number().optional(),
|
|
1388
|
+
assetWidth: z50.number().optional(),
|
|
1389
|
+
assetHeight: z50.number().optional(),
|
|
1390
|
+
assetUrl: z50.string().optional(),
|
|
1391
|
+
assetOriginKey: z50.string().optional()
|
|
1392
|
+
});
|
|
1393
|
+
var FigmaNodeReferenceElementData = z50.object({
|
|
1410
1394
|
value: FigmaNodeReferenceData
|
|
1411
1395
|
});
|
|
1412
|
-
var FontFamilyValue =
|
|
1396
|
+
var FontFamilyValue = z51.string();
|
|
1413
1397
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1414
|
-
var FontSizeUnit =
|
|
1415
|
-
var FontSizeValue =
|
|
1398
|
+
var FontSizeUnit = z52.enum(["Pixels", "Rem", "Percent"]);
|
|
1399
|
+
var FontSizeValue = z52.object({
|
|
1416
1400
|
unit: FontSizeUnit,
|
|
1417
|
-
measure:
|
|
1401
|
+
measure: z52.number()
|
|
1418
1402
|
});
|
|
1419
1403
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1420
|
-
var FontWeightValue =
|
|
1404
|
+
var FontWeightValue = z53.string();
|
|
1421
1405
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1422
|
-
var GradientType =
|
|
1423
|
-
var GradientStop =
|
|
1424
|
-
position:
|
|
1406
|
+
var GradientType = z54.enum(["Linear", "Radial", "Angular"]);
|
|
1407
|
+
var GradientStop = z54.object({
|
|
1408
|
+
position: z54.number(),
|
|
1425
1409
|
color: ColorTokenData
|
|
1426
1410
|
});
|
|
1427
|
-
var GradientLayerValue =
|
|
1411
|
+
var GradientLayerValue = z54.object({
|
|
1428
1412
|
from: Point2D,
|
|
1429
1413
|
to: Point2D,
|
|
1430
1414
|
type: GradientType,
|
|
1431
|
-
aspectRatio: nullishToOptional(
|
|
1415
|
+
aspectRatio: nullishToOptional(z54.number()),
|
|
1432
1416
|
// z.number(),
|
|
1433
|
-
stops:
|
|
1417
|
+
stops: z54.array(GradientStop).min(2)
|
|
1434
1418
|
});
|
|
1435
1419
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1436
|
-
var GradientTokenValue =
|
|
1420
|
+
var GradientTokenValue = z54.array(GradientLayerData);
|
|
1437
1421
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1438
|
-
var DocumentationGroupBehavior =
|
|
1439
|
-
var ElementGroupDataV1 =
|
|
1422
|
+
var DocumentationGroupBehavior = z55.enum(["Group", "Tabs"]);
|
|
1423
|
+
var ElementGroupDataV1 = z55.object({
|
|
1440
1424
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1441
1425
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1442
1426
|
});
|
|
1443
|
-
var ElementGroupDataV2 =
|
|
1427
|
+
var ElementGroupDataV2 = z55.object({
|
|
1444
1428
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1445
1429
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1446
1430
|
});
|
|
1447
|
-
var LetterSpacingUnit =
|
|
1448
|
-
var LetterSpacingValue =
|
|
1431
|
+
var LetterSpacingUnit = z56.enum(["Pixels", "Rem", "Percent"]);
|
|
1432
|
+
var LetterSpacingValue = z56.object({
|
|
1449
1433
|
unit: LetterSpacingUnit,
|
|
1450
|
-
measure:
|
|
1434
|
+
measure: z56.number()
|
|
1451
1435
|
});
|
|
1452
1436
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1453
|
-
var LineHeightUnit =
|
|
1454
|
-
var LineHeightValue =
|
|
1437
|
+
var LineHeightUnit = z57.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1438
|
+
var LineHeightValue = z57.object({
|
|
1455
1439
|
unit: LineHeightUnit,
|
|
1456
|
-
measure:
|
|
1440
|
+
measure: z57.number()
|
|
1457
1441
|
});
|
|
1458
1442
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1459
|
-
var ParagraphIndentUnit =
|
|
1460
|
-
var ParagraphIndentValue =
|
|
1443
|
+
var ParagraphIndentUnit = z58.enum(["Pixels", "Rem", "Percent"]);
|
|
1444
|
+
var ParagraphIndentValue = z58.object({
|
|
1461
1445
|
unit: ParagraphIndentUnit,
|
|
1462
|
-
measure:
|
|
1446
|
+
measure: z58.number()
|
|
1463
1447
|
});
|
|
1464
1448
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1465
|
-
var ParagraphSpacingUnit =
|
|
1466
|
-
var ParagraphSpacingValue =
|
|
1449
|
+
var ParagraphSpacingUnit = z59.enum(["Pixels", "Rem", "Percent"]);
|
|
1450
|
+
var ParagraphSpacingValue = z59.object({
|
|
1467
1451
|
unit: ParagraphSpacingUnit,
|
|
1468
|
-
measure:
|
|
1452
|
+
measure: z59.number()
|
|
1469
1453
|
});
|
|
1470
1454
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1471
|
-
var ProductCopyValue =
|
|
1455
|
+
var ProductCopyValue = z60.string();
|
|
1472
1456
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1473
1457
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
1474
|
-
var SafeIdSchema =
|
|
1458
|
+
var SafeIdSchema = z61.string().refine(
|
|
1475
1459
|
(value) => {
|
|
1476
1460
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1477
1461
|
},
|
|
@@ -1479,39 +1463,39 @@ var SafeIdSchema = z62.string().refine(
|
|
|
1479
1463
|
message: `ID value can't start with ${RESERVED_OBJECT_ID_PREFIX}`
|
|
1480
1464
|
}
|
|
1481
1465
|
);
|
|
1482
|
-
var ShadowType =
|
|
1483
|
-
var ShadowLayerValue =
|
|
1466
|
+
var ShadowType = z62.enum(["Drop", "Inner"]);
|
|
1467
|
+
var ShadowLayerValue = z62.object({
|
|
1484
1468
|
color: ColorTokenData,
|
|
1485
|
-
x:
|
|
1486
|
-
y:
|
|
1487
|
-
radius:
|
|
1488
|
-
spread:
|
|
1469
|
+
x: z62.number(),
|
|
1470
|
+
y: z62.number(),
|
|
1471
|
+
radius: z62.number(),
|
|
1472
|
+
spread: z62.number(),
|
|
1489
1473
|
opacity: OpacityTokenData.optional(),
|
|
1490
1474
|
type: ShadowType
|
|
1491
1475
|
});
|
|
1492
1476
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1493
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
1494
|
-
var SizeUnit =
|
|
1495
|
-
var SizeValue =
|
|
1477
|
+
var ShadowTokenData = tokenAliasOrValue(z62.array(ShadowTokenDataBase));
|
|
1478
|
+
var SizeUnit = z63.enum(["Pixels", "Rem", "Percent"]);
|
|
1479
|
+
var SizeValue = z63.object({
|
|
1496
1480
|
unit: SizeUnit,
|
|
1497
|
-
measure:
|
|
1481
|
+
measure: z63.number()
|
|
1498
1482
|
});
|
|
1499
1483
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1500
|
-
var SpaceUnit =
|
|
1501
|
-
var SpaceValue =
|
|
1484
|
+
var SpaceUnit = z64.enum(["Pixels", "Rem", "Percent"]);
|
|
1485
|
+
var SpaceValue = z64.object({
|
|
1502
1486
|
unit: SpaceUnit,
|
|
1503
|
-
measure:
|
|
1487
|
+
measure: z64.number()
|
|
1504
1488
|
});
|
|
1505
1489
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1506
|
-
var StringValue =
|
|
1490
|
+
var StringValue = z65.string();
|
|
1507
1491
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1508
|
-
var TextCase =
|
|
1492
|
+
var TextCase = z66.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1509
1493
|
var TextCaseValue = TextCase;
|
|
1510
1494
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1511
|
-
var TextDecoration =
|
|
1495
|
+
var TextDecoration = z67.enum(["None", "Underline", "Strikethrough"]);
|
|
1512
1496
|
var TextDecorationValue = TextDecoration;
|
|
1513
1497
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1514
|
-
var TypographyValue =
|
|
1498
|
+
var TypographyValue = z68.object({
|
|
1515
1499
|
fontSize: FontSizeTokenData,
|
|
1516
1500
|
fontFamily: FontFamilyTokenData,
|
|
1517
1501
|
fontWeight: FontWeightTokenData,
|
|
@@ -1523,15 +1507,31 @@ var TypographyValue = z69.object({
|
|
|
1523
1507
|
paragraphSpacing: ParagraphSpacingTokenData.optional()
|
|
1524
1508
|
});
|
|
1525
1509
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1526
|
-
var Visibility =
|
|
1510
|
+
var Visibility = z69.enum(["Hidden", "Visible"]);
|
|
1527
1511
|
var VisibilityValue = Visibility;
|
|
1528
1512
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1529
|
-
var ZIndexUnit =
|
|
1530
|
-
var ZIndexValue =
|
|
1513
|
+
var ZIndexUnit = z70.enum(["Raw"]);
|
|
1514
|
+
var ZIndexValue = z70.object({
|
|
1531
1515
|
unit: ZIndexUnit,
|
|
1532
|
-
measure:
|
|
1516
|
+
measure: z70.number()
|
|
1533
1517
|
});
|
|
1534
1518
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1519
|
+
var ComponentOriginPart = z71.object({
|
|
1520
|
+
nodeId: z71.string().optional(),
|
|
1521
|
+
width: z71.number().optional(),
|
|
1522
|
+
height: z71.number().optional()
|
|
1523
|
+
});
|
|
1524
|
+
var ComponentAsset = z71.object({
|
|
1525
|
+
assetId: z71.string(),
|
|
1526
|
+
assetPath: z71.string()
|
|
1527
|
+
});
|
|
1528
|
+
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1529
|
+
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1530
|
+
origin: ComponentOrigin.optional(),
|
|
1531
|
+
thumbnail: ComponentAsset,
|
|
1532
|
+
svg: ComponentAsset.optional(),
|
|
1533
|
+
isAsset: z71.boolean()
|
|
1534
|
+
});
|
|
1535
1535
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1536
1536
|
shortPersistentId: z72.string().optional(),
|
|
1537
1537
|
childType: DesignElementType,
|
|
@@ -5680,6 +5680,54 @@ var DTOUserWorkspaceMembershipsResponse = z204.object({
|
|
|
5680
5680
|
membership: z204.array(DTOUserWorkspaceMembership)
|
|
5681
5681
|
});
|
|
5682
5682
|
|
|
5683
|
+
// src/utils/hash.ts
|
|
5684
|
+
function hash(input) {
|
|
5685
|
+
return farmhash(input).toString(16);
|
|
5686
|
+
}
|
|
5687
|
+
function farmhash(input) {
|
|
5688
|
+
const seed = 2654435769;
|
|
5689
|
+
let hash2 = seed;
|
|
5690
|
+
for (let i = 0; i < input.length; i++) {
|
|
5691
|
+
const charCode = input.charCodeAt(i);
|
|
5692
|
+
hash2 ^= charCode;
|
|
5693
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
5694
|
+
hash2 ^= hash2 >>> 15;
|
|
5695
|
+
}
|
|
5696
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
5697
|
+
hash2 ^= hash2 >>> 13;
|
|
5698
|
+
hash2 = Math.imul(hash2, 1540483477);
|
|
5699
|
+
hash2 ^= hash2 >>> 15;
|
|
5700
|
+
return hash2 >>> 0;
|
|
5701
|
+
}
|
|
5702
|
+
function prepareObject(obj) {
|
|
5703
|
+
if (obj === null || typeof obj !== "object") {
|
|
5704
|
+
return obj;
|
|
5705
|
+
}
|
|
5706
|
+
if (Array.isArray(obj)) {
|
|
5707
|
+
return obj.map(prepareObject);
|
|
5708
|
+
}
|
|
5709
|
+
const sortedObj = {};
|
|
5710
|
+
for (const key of Object.keys(obj).sort()) {
|
|
5711
|
+
if (obj[key] === null || obj[key] === void 0) {
|
|
5712
|
+
continue;
|
|
5713
|
+
}
|
|
5714
|
+
sortedObj[key] = prepareObject(obj[key]);
|
|
5715
|
+
}
|
|
5716
|
+
return sortedObj;
|
|
5717
|
+
}
|
|
5718
|
+
function generateHash(input) {
|
|
5719
|
+
if (typeof input === "object") {
|
|
5720
|
+
return hash(JSON.stringify(prepareObject(input)));
|
|
5721
|
+
} else {
|
|
5722
|
+
try {
|
|
5723
|
+
const obj = JSON.parse(input);
|
|
5724
|
+
return hash(JSON.stringify(prepareObject(obj)));
|
|
5725
|
+
} catch {
|
|
5726
|
+
return hash(input);
|
|
5727
|
+
}
|
|
5728
|
+
}
|
|
5729
|
+
}
|
|
5730
|
+
|
|
5683
5731
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
5684
5732
|
import { z as z205 } from "zod";
|
|
5685
5733
|
var DocumentationHierarchySettings = z205.object({
|
|
@@ -9621,6 +9669,7 @@ export {
|
|
|
9621
9669
|
elementGroupsToDocumentationGroupFixedConfigurationDTOV2,
|
|
9622
9670
|
elementGroupsToDocumentationGroupStructureDTOV1,
|
|
9623
9671
|
elementGroupsToDocumentationGroupStructureDTOV2,
|
|
9672
|
+
generateHash,
|
|
9624
9673
|
getDtoDefaultItemConfigurationV1,
|
|
9625
9674
|
getDtoDefaultItemConfigurationV2,
|
|
9626
9675
|
getMockPageBlockDefinitions,
|