@supernova-studio/model 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 +1368 -1368
- package/dist/index.d.ts +1368 -1368
- package/dist/index.js +58 -56
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +582 -580
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -459,66 +459,10 @@ import { z as z82 } from "zod";
|
|
|
459
459
|
// src/dsm/data-sources/import-summary.ts
|
|
460
460
|
import { z as z81 } from "zod";
|
|
461
461
|
|
|
462
|
-
// src/dsm/elements/base.ts
|
|
463
|
-
import { z as z22 } from "zod";
|
|
464
|
-
var DesignElementOrigin = z22.object({
|
|
465
|
-
id: z22.string(),
|
|
466
|
-
sourceId: z22.string(),
|
|
467
|
-
name: z22.string()
|
|
468
|
-
});
|
|
469
|
-
var DesignElementBase = z22.object({
|
|
470
|
-
id: z22.string(),
|
|
471
|
-
persistentId: z22.string(),
|
|
472
|
-
meta: ObjectMeta,
|
|
473
|
-
designSystemVersionId: z22.string(),
|
|
474
|
-
createdAt: z22.coerce.date(),
|
|
475
|
-
updatedAt: z22.coerce.date()
|
|
476
|
-
});
|
|
477
|
-
var DesignElementImportedBase = DesignElementBase.extend({
|
|
478
|
-
origin: DesignElementOrigin
|
|
479
|
-
});
|
|
480
|
-
var DesignElementGroupablePart = z22.object({
|
|
481
|
-
parentPersistentId: z22.string().optional(),
|
|
482
|
-
sortOrder: z22.number()
|
|
483
|
-
});
|
|
484
|
-
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
485
|
-
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
486
|
-
parentPersistentId: z22.string()
|
|
487
|
-
});
|
|
488
|
-
var DesignElementBrandedPart = z22.object({
|
|
489
|
-
brandPersistentId: z22.string()
|
|
490
|
-
});
|
|
491
|
-
var DesignElementSlugPart = z22.object({
|
|
492
|
-
slug: z22.string().optional(),
|
|
493
|
-
userSlug: z22.string().optional()
|
|
494
|
-
});
|
|
495
|
-
|
|
496
|
-
// src/dsm/elements/component.ts
|
|
497
|
-
import { z as z23 } from "zod";
|
|
498
|
-
var ComponentOriginPart = z23.object({
|
|
499
|
-
nodeId: z23.string().optional(),
|
|
500
|
-
width: z23.number().optional(),
|
|
501
|
-
height: z23.number().optional()
|
|
502
|
-
});
|
|
503
|
-
var ComponentAsset = z23.object({
|
|
504
|
-
assetId: z23.string(),
|
|
505
|
-
assetPath: z23.string()
|
|
506
|
-
});
|
|
507
|
-
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
508
|
-
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
509
|
-
origin: ComponentOrigin.optional(),
|
|
510
|
-
thumbnail: ComponentAsset,
|
|
511
|
-
svg: ComponentAsset.optional(),
|
|
512
|
-
isAsset: z23.boolean()
|
|
513
|
-
});
|
|
514
|
-
function isImportedComponent(component) {
|
|
515
|
-
return !!component.origin;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
462
|
// src/dsm/elements/data/base.ts
|
|
519
|
-
import { z as
|
|
520
|
-
var TokenDataAliasSchema =
|
|
521
|
-
aliasTo:
|
|
463
|
+
import { z as z22 } from "zod";
|
|
464
|
+
var TokenDataAliasSchema = z22.object({
|
|
465
|
+
aliasTo: z22.string().optional().nullable().transform((v) => v ?? void 0)
|
|
522
466
|
});
|
|
523
467
|
function tokenAliasOrValue(value) {
|
|
524
468
|
return TokenDataAliasSchema.extend({
|
|
@@ -527,68 +471,68 @@ function tokenAliasOrValue(value) {
|
|
|
527
471
|
}
|
|
528
472
|
|
|
529
473
|
// src/dsm/elements/data/blur.ts
|
|
530
|
-
import { z as
|
|
474
|
+
import { z as z24 } from "zod";
|
|
531
475
|
|
|
532
476
|
// src/dsm/elements/data/dimension.ts
|
|
533
|
-
import { z as
|
|
534
|
-
var DimensionUnit =
|
|
535
|
-
var DimensionValue =
|
|
477
|
+
import { z as z23 } from "zod";
|
|
478
|
+
var DimensionUnit = z23.enum(["Pixels", "Percent", "Rem", "Ms", "Raw", "Points"]);
|
|
479
|
+
var DimensionValue = z23.object({
|
|
536
480
|
unit: DimensionUnit,
|
|
537
|
-
measure:
|
|
481
|
+
measure: z23.number()
|
|
538
482
|
});
|
|
539
483
|
var DimensionTokenData = tokenAliasOrValue(DimensionValue);
|
|
540
484
|
|
|
541
485
|
// src/dsm/elements/data/blur.ts
|
|
542
|
-
var BlurType =
|
|
543
|
-
var BlurValue =
|
|
486
|
+
var BlurType = z24.enum(["Layer", "Background"]);
|
|
487
|
+
var BlurValue = z24.object({
|
|
544
488
|
type: BlurType,
|
|
545
489
|
radius: DimensionTokenData
|
|
546
490
|
});
|
|
547
491
|
var BlurTokenData = tokenAliasOrValue(BlurValue);
|
|
548
492
|
|
|
549
493
|
// src/dsm/elements/data/border-radius.ts
|
|
550
|
-
import { z as
|
|
551
|
-
var BorderRadiusUnit =
|
|
552
|
-
var BorderRadiusValue =
|
|
494
|
+
import { z as z25 } from "zod";
|
|
495
|
+
var BorderRadiusUnit = z25.enum(["Pixels", "Rem", "Percent"]);
|
|
496
|
+
var BorderRadiusValue = z25.object({
|
|
553
497
|
unit: BorderRadiusUnit,
|
|
554
|
-
measure:
|
|
498
|
+
measure: z25.number()
|
|
555
499
|
});
|
|
556
500
|
var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
|
|
557
501
|
|
|
558
502
|
// src/dsm/elements/data/border-width.ts
|
|
559
|
-
import { z as
|
|
560
|
-
var BorderWidthUnit =
|
|
561
|
-
var BorderWidthValue =
|
|
503
|
+
import { z as z26 } from "zod";
|
|
504
|
+
var BorderWidthUnit = z26.enum(["Pixels"]);
|
|
505
|
+
var BorderWidthValue = z26.object({
|
|
562
506
|
unit: BorderWidthUnit,
|
|
563
|
-
measure:
|
|
507
|
+
measure: z26.number()
|
|
564
508
|
});
|
|
565
509
|
var BorderWidthTokenData = tokenAliasOrValue(BorderWidthValue);
|
|
566
510
|
|
|
567
511
|
// src/dsm/elements/data/border.ts
|
|
568
|
-
import { z as
|
|
512
|
+
import { z as z29 } from "zod";
|
|
569
513
|
|
|
570
514
|
// src/dsm/elements/data/color.ts
|
|
571
|
-
import { z as
|
|
515
|
+
import { z as z28 } from "zod";
|
|
572
516
|
|
|
573
517
|
// src/dsm/elements/data/opacity.ts
|
|
574
|
-
import { z as
|
|
575
|
-
var OpacityValue =
|
|
576
|
-
unit:
|
|
577
|
-
measure:
|
|
518
|
+
import { z as z27 } from "zod";
|
|
519
|
+
var OpacityValue = z27.object({
|
|
520
|
+
unit: z27.enum(["Raw", "Pixels"]),
|
|
521
|
+
measure: z27.number()
|
|
578
522
|
});
|
|
579
523
|
var OpacityTokenData = tokenAliasOrValue(OpacityValue);
|
|
580
524
|
|
|
581
525
|
// src/dsm/elements/data/color.ts
|
|
582
|
-
var ColorValue =
|
|
526
|
+
var ColorValue = z28.object({
|
|
583
527
|
opacity: OpacityTokenData,
|
|
584
|
-
color:
|
|
528
|
+
color: z28.string().or(TokenDataAliasSchema)
|
|
585
529
|
});
|
|
586
530
|
var ColorTokenData = tokenAliasOrValue(ColorValue);
|
|
587
531
|
|
|
588
532
|
// src/dsm/elements/data/border.ts
|
|
589
|
-
var BorderPosition =
|
|
590
|
-
var BorderStyle =
|
|
591
|
-
var BorderValue =
|
|
533
|
+
var BorderPosition = z29.enum(["Inside", "Center", "Outside"]);
|
|
534
|
+
var BorderStyle = z29.enum(["Dashed", "Dotted", "Solid", "Groove"]);
|
|
535
|
+
var BorderValue = z29.object({
|
|
592
536
|
color: ColorTokenData,
|
|
593
537
|
width: BorderWidthTokenData,
|
|
594
538
|
position: BorderPosition,
|
|
@@ -597,30 +541,30 @@ var BorderValue = z31.object({
|
|
|
597
541
|
var BorderTokenData = tokenAliasOrValue(BorderValue);
|
|
598
542
|
|
|
599
543
|
// src/dsm/elements/data/component.ts
|
|
600
|
-
import { z as
|
|
601
|
-
var ComponentElementData =
|
|
602
|
-
value:
|
|
603
|
-
thumbnailImage:
|
|
604
|
-
value:
|
|
605
|
-
url:
|
|
606
|
-
assetId:
|
|
544
|
+
import { z as z30 } from "zod";
|
|
545
|
+
var ComponentElementData = z30.object({
|
|
546
|
+
value: z30.object({
|
|
547
|
+
thumbnailImage: z30.object({
|
|
548
|
+
value: z30.object({
|
|
549
|
+
url: z30.string(),
|
|
550
|
+
assetId: z30.string()
|
|
607
551
|
})
|
|
608
552
|
}),
|
|
609
|
-
svg:
|
|
610
|
-
value:
|
|
611
|
-
url:
|
|
612
|
-
assetId:
|
|
553
|
+
svg: z30.object({
|
|
554
|
+
value: z30.object({
|
|
555
|
+
url: z30.string(),
|
|
556
|
+
assetId: z30.string()
|
|
613
557
|
})
|
|
614
558
|
}).optional()
|
|
615
559
|
})
|
|
616
560
|
});
|
|
617
561
|
|
|
618
562
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
619
|
-
import { z as
|
|
563
|
+
import { z as z36 } from "zod";
|
|
620
564
|
|
|
621
565
|
// src/dsm/elements/raw-element.ts
|
|
622
|
-
import { z as
|
|
623
|
-
var DesignTokenType =
|
|
566
|
+
import { z as z31 } from "zod";
|
|
567
|
+
var DesignTokenType = z31.enum([
|
|
624
568
|
"Color",
|
|
625
569
|
"Border",
|
|
626
570
|
"Gradient",
|
|
@@ -652,7 +596,7 @@ var DesignTokenType = z33.enum([
|
|
|
652
596
|
]);
|
|
653
597
|
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
654
598
|
var DesignElementType = DesignTokenType.or(
|
|
655
|
-
|
|
599
|
+
z31.enum([
|
|
656
600
|
"Component",
|
|
657
601
|
"Theme",
|
|
658
602
|
"Documentation",
|
|
@@ -667,7 +611,7 @@ var DesignElementType = DesignTokenType.or(
|
|
|
667
611
|
function isTokenType(type) {
|
|
668
612
|
return DesignTokenType.safeParse(type).success;
|
|
669
613
|
}
|
|
670
|
-
var DesignElementCategory =
|
|
614
|
+
var DesignElementCategory = z31.enum([
|
|
671
615
|
"Token",
|
|
672
616
|
"Component",
|
|
673
617
|
"DesignSystemComponent",
|
|
@@ -675,94 +619,94 @@ var DesignElementCategory = z33.enum([
|
|
|
675
619
|
"Theme",
|
|
676
620
|
"PageBlock"
|
|
677
621
|
]);
|
|
678
|
-
var DesignSystemElementExportProps =
|
|
679
|
-
isAsset:
|
|
680
|
-
codeName:
|
|
681
|
-
});
|
|
682
|
-
var ShallowDesignElement =
|
|
683
|
-
id:
|
|
684
|
-
persistentId:
|
|
685
|
-
designSystemVersionId:
|
|
622
|
+
var DesignSystemElementExportProps = z31.object({
|
|
623
|
+
isAsset: z31.boolean().nullish().transform((v) => v ?? false),
|
|
624
|
+
codeName: z31.string().nullish()
|
|
625
|
+
});
|
|
626
|
+
var ShallowDesignElement = z31.object({
|
|
627
|
+
id: z31.string(),
|
|
628
|
+
persistentId: z31.string(),
|
|
629
|
+
designSystemVersionId: z31.string(),
|
|
686
630
|
type: DesignElementType,
|
|
687
|
-
brandPersistentId:
|
|
688
|
-
parentPersistentId:
|
|
689
|
-
shortPersistentId:
|
|
631
|
+
brandPersistentId: z31.string().optional(),
|
|
632
|
+
parentPersistentId: z31.string().optional(),
|
|
633
|
+
shortPersistentId: z31.string().optional(),
|
|
690
634
|
childType: DesignElementType.optional(),
|
|
691
|
-
sortOrder:
|
|
692
|
-
origin:
|
|
635
|
+
sortOrder: z31.number(),
|
|
636
|
+
origin: z31.record(z31.any()).optional()
|
|
693
637
|
});
|
|
694
638
|
var DesignElement = ShallowDesignElement.extend({
|
|
695
639
|
meta: ObjectMeta,
|
|
696
|
-
slug:
|
|
697
|
-
userSlug:
|
|
698
|
-
createdAt:
|
|
699
|
-
updatedAt:
|
|
640
|
+
slug: z31.string().optional(),
|
|
641
|
+
userSlug: z31.string().optional(),
|
|
642
|
+
createdAt: z31.coerce.date(),
|
|
643
|
+
updatedAt: z31.coerce.date(),
|
|
700
644
|
exportProperties: DesignSystemElementExportProps.optional(),
|
|
701
|
-
data:
|
|
702
|
-
origin:
|
|
645
|
+
data: z31.record(z31.any()),
|
|
646
|
+
origin: z31.record(z31.any()).optional()
|
|
703
647
|
});
|
|
704
648
|
var HierarchicalElements = DesignTokenType.or(
|
|
705
|
-
|
|
649
|
+
z31.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
706
650
|
);
|
|
707
651
|
|
|
708
652
|
// src/dsm/properties/property-definition.ts
|
|
709
|
-
import { z as
|
|
710
|
-
var ElementPropertyTypeSchema =
|
|
711
|
-
var ElementPropertyTargetType =
|
|
712
|
-
var ElementPropertyLinkType =
|
|
653
|
+
import { z as z32 } from "zod";
|
|
654
|
+
var ElementPropertyTypeSchema = z32.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
655
|
+
var ElementPropertyTargetType = z32.enum(["Token", "Component", "DocumentationPage"]);
|
|
656
|
+
var ElementPropertyLinkType = z32.enum(["FigmaComponent", "DocumentationPage"]);
|
|
713
657
|
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
714
|
-
var ColorTokenInlineData =
|
|
715
|
-
value:
|
|
658
|
+
var ColorTokenInlineData = z32.object({
|
|
659
|
+
value: z32.string()
|
|
716
660
|
});
|
|
717
|
-
var ElementPropertyDefinitionOption =
|
|
718
|
-
id:
|
|
719
|
-
name:
|
|
661
|
+
var ElementPropertyDefinitionOption = z32.object({
|
|
662
|
+
id: z32.string(),
|
|
663
|
+
name: z32.string(),
|
|
720
664
|
backgroundColor: ColorTokenInlineData.optional()
|
|
721
665
|
});
|
|
722
|
-
var ElementPropertyDefinition =
|
|
723
|
-
id:
|
|
724
|
-
designSystemVersionId:
|
|
725
|
-
persistentId:
|
|
726
|
-
name:
|
|
727
|
-
codeName:
|
|
728
|
-
description:
|
|
666
|
+
var ElementPropertyDefinition = z32.object({
|
|
667
|
+
id: z32.string(),
|
|
668
|
+
designSystemVersionId: z32.string(),
|
|
669
|
+
persistentId: z32.string(),
|
|
670
|
+
name: z32.string(),
|
|
671
|
+
codeName: z32.string().regex(CODE_NAME_REGEX),
|
|
672
|
+
description: z32.string(),
|
|
729
673
|
type: ElementPropertyTypeSchema,
|
|
730
674
|
targetElementType: ElementPropertyTargetType,
|
|
731
|
-
options:
|
|
675
|
+
options: z32.array(ElementPropertyDefinitionOption).optional(),
|
|
732
676
|
linkElementType: ElementPropertyLinkType.optional()
|
|
733
677
|
});
|
|
734
678
|
var ElementPropertyType = ElementPropertyTypeSchema.enum;
|
|
735
679
|
|
|
736
680
|
// src/dsm/properties/property-value.ts
|
|
737
|
-
import { z as
|
|
738
|
-
var ElementPropertyValue =
|
|
739
|
-
id:
|
|
740
|
-
designSystemVersionId:
|
|
741
|
-
targetElementPersistentId:
|
|
742
|
-
definitionPersistentId:
|
|
743
|
-
stringValue:
|
|
744
|
-
numberValue:
|
|
745
|
-
booleanValue:
|
|
746
|
-
referenceValue:
|
|
747
|
-
referenceValuePreview:
|
|
681
|
+
import { z as z33 } from "zod";
|
|
682
|
+
var ElementPropertyValue = z33.object({
|
|
683
|
+
id: z33.string(),
|
|
684
|
+
designSystemVersionId: z33.string(),
|
|
685
|
+
targetElementPersistentId: z33.string(),
|
|
686
|
+
definitionPersistentId: z33.string(),
|
|
687
|
+
stringValue: z33.string().nullish(),
|
|
688
|
+
numberValue: z33.number().nullish(),
|
|
689
|
+
booleanValue: z33.boolean().nullish(),
|
|
690
|
+
referenceValue: z33.string().nullish(),
|
|
691
|
+
referenceValuePreview: z33.string().optional()
|
|
748
692
|
});
|
|
749
693
|
|
|
750
694
|
// src/dsm/elements/primitives/point.ts
|
|
751
|
-
import { z as
|
|
752
|
-
var Point2D =
|
|
753
|
-
x:
|
|
754
|
-
y:
|
|
695
|
+
import { z as z34 } from "zod";
|
|
696
|
+
var Point2D = z34.object({
|
|
697
|
+
x: z34.number(),
|
|
698
|
+
y: z34.number()
|
|
755
699
|
});
|
|
756
700
|
|
|
757
701
|
// src/dsm/elements/primitives/size.ts
|
|
758
|
-
import { z as
|
|
702
|
+
import { z as z35 } from "zod";
|
|
759
703
|
var nullSize = { height: -1, width: -1 };
|
|
760
704
|
function isNullSize(size) {
|
|
761
705
|
return size.height === nullSize.height && size.width === nullSize.width;
|
|
762
706
|
}
|
|
763
|
-
var Size =
|
|
764
|
-
width:
|
|
765
|
-
height:
|
|
707
|
+
var Size = z35.object({
|
|
708
|
+
width: z35.number().nullish().transform((v) => v ?? nullSize.width),
|
|
709
|
+
height: z35.number().nullish().transform((v) => v ?? nullSize.height)
|
|
766
710
|
});
|
|
767
711
|
var SizeOrUndefined = Size.optional().transform((v) => {
|
|
768
712
|
if (!v)
|
|
@@ -773,8 +717,8 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
773
717
|
});
|
|
774
718
|
|
|
775
719
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
776
|
-
var PageBlockCalloutType =
|
|
777
|
-
var PageBlockTypeV1 =
|
|
720
|
+
var PageBlockCalloutType = z36.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
721
|
+
var PageBlockTypeV1 = z36.enum([
|
|
778
722
|
"Text",
|
|
779
723
|
"Heading",
|
|
780
724
|
"Code",
|
|
@@ -807,7 +751,7 @@ var PageBlockTypeV1 = z38.enum([
|
|
|
807
751
|
"TableRow",
|
|
808
752
|
"TableCell"
|
|
809
753
|
]);
|
|
810
|
-
var PageBlockCodeLanguage =
|
|
754
|
+
var PageBlockCodeLanguage = z36.enum([
|
|
811
755
|
"Angular",
|
|
812
756
|
"Bash",
|
|
813
757
|
"C",
|
|
@@ -841,70 +785,70 @@ var PageBlockCodeLanguage = z38.enum([
|
|
|
841
785
|
"XML",
|
|
842
786
|
"YAML"
|
|
843
787
|
]);
|
|
844
|
-
var PageBlockAlignment =
|
|
845
|
-
var PageBlockThemeType =
|
|
846
|
-
var PageBlockAssetType =
|
|
847
|
-
var PageBlockTilesAlignment =
|
|
848
|
-
var PageBlockTilesLayout =
|
|
849
|
-
var PageBlockTheme =
|
|
850
|
-
themeIds:
|
|
788
|
+
var PageBlockAlignment = z36.enum(["Left", "Center", "Stretch", "Right"]);
|
|
789
|
+
var PageBlockThemeType = z36.enum(["Override", "Comparison"]);
|
|
790
|
+
var PageBlockAssetType = z36.enum(["image", "figmaFrame"]);
|
|
791
|
+
var PageBlockTilesAlignment = z36.enum(["Center", "FrameHeight"]);
|
|
792
|
+
var PageBlockTilesLayout = z36.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
793
|
+
var PageBlockTheme = z36.object({
|
|
794
|
+
themeIds: z36.array(z36.string()),
|
|
851
795
|
type: PageBlockThemeType
|
|
852
796
|
});
|
|
853
|
-
var PageBlockUrlPreview =
|
|
854
|
-
title: nullishToOptional(
|
|
855
|
-
description: nullishToOptional(
|
|
856
|
-
thumbnailUrl: nullishToOptional(
|
|
857
|
-
});
|
|
858
|
-
var PageBlockFrameOrigin =
|
|
859
|
-
sourceFileName: nullishToOptional(
|
|
860
|
-
title: nullishToOptional(
|
|
861
|
-
previewUrl: nullishToOptional(
|
|
862
|
-
valid: nullishToOptional(
|
|
863
|
-
referenceId: nullishToOptional(
|
|
864
|
-
assetId: nullishToOptional(
|
|
865
|
-
assetScale: nullishToOptional(
|
|
866
|
-
width: nullishToOptional(
|
|
867
|
-
height: nullishToOptional(
|
|
868
|
-
});
|
|
869
|
-
var PageBlockFrame =
|
|
870
|
-
persistentId:
|
|
871
|
-
sourceId:
|
|
872
|
-
sourceFrameId:
|
|
873
|
-
title: nullishToOptional(
|
|
874
|
-
description: nullishToOptional(
|
|
797
|
+
var PageBlockUrlPreview = z36.object({
|
|
798
|
+
title: nullishToOptional(z36.string()),
|
|
799
|
+
description: nullishToOptional(z36.string()),
|
|
800
|
+
thumbnailUrl: nullishToOptional(z36.string())
|
|
801
|
+
});
|
|
802
|
+
var PageBlockFrameOrigin = z36.object({
|
|
803
|
+
sourceFileName: nullishToOptional(z36.string()),
|
|
804
|
+
title: nullishToOptional(z36.string()),
|
|
805
|
+
previewUrl: nullishToOptional(z36.string()),
|
|
806
|
+
valid: nullishToOptional(z36.boolean()),
|
|
807
|
+
referenceId: nullishToOptional(z36.string()),
|
|
808
|
+
assetId: nullishToOptional(z36.string()),
|
|
809
|
+
assetScale: nullishToOptional(z36.number()),
|
|
810
|
+
width: nullishToOptional(z36.number()),
|
|
811
|
+
height: nullishToOptional(z36.number())
|
|
812
|
+
});
|
|
813
|
+
var PageBlockFrame = z36.object({
|
|
814
|
+
persistentId: z36.string(),
|
|
815
|
+
sourceId: z36.string(),
|
|
816
|
+
sourceFrameId: z36.string(),
|
|
817
|
+
title: nullishToOptional(z36.string()),
|
|
818
|
+
description: nullishToOptional(z36.string()),
|
|
875
819
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
876
820
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
877
821
|
});
|
|
878
|
-
var PageBlockAsset =
|
|
822
|
+
var PageBlockAsset = z36.object({
|
|
879
823
|
type: PageBlockAssetType,
|
|
880
|
-
id: nullishToOptional(
|
|
881
|
-
url: nullishToOptional(
|
|
824
|
+
id: nullishToOptional(z36.string()),
|
|
825
|
+
url: nullishToOptional(z36.string()),
|
|
882
826
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
883
827
|
});
|
|
884
|
-
var PageBlockLinkPreview =
|
|
885
|
-
title: nullishToOptional(
|
|
886
|
-
valid: nullishToOptional(
|
|
828
|
+
var PageBlockLinkPreview = z36.object({
|
|
829
|
+
title: nullishToOptional(z36.string()),
|
|
830
|
+
valid: nullishToOptional(z36.boolean())
|
|
887
831
|
});
|
|
888
|
-
var PageBlockShortcut =
|
|
889
|
-
persistentId:
|
|
890
|
-
title: nullishToOptional(
|
|
891
|
-
description: nullishToOptional(
|
|
832
|
+
var PageBlockShortcut = z36.object({
|
|
833
|
+
persistentId: z36.string(),
|
|
834
|
+
title: nullishToOptional(z36.string()),
|
|
835
|
+
description: nullishToOptional(z36.string()),
|
|
892
836
|
asset: nullishToOptional(PageBlockAsset),
|
|
893
|
-
documentationItemId: nullishToOptional(
|
|
894
|
-
pageHeadingId: nullishToOptional(
|
|
895
|
-
url: nullishToOptional(
|
|
896
|
-
openInNewTab: nullishToOptional(
|
|
837
|
+
documentationItemId: nullishToOptional(z36.string()),
|
|
838
|
+
pageHeadingId: nullishToOptional(z36.string()),
|
|
839
|
+
url: nullishToOptional(z36.string()),
|
|
840
|
+
openInNewTab: nullishToOptional(z36.boolean()),
|
|
897
841
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
898
842
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
899
843
|
});
|
|
900
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
844
|
+
var PageBlockCustomBlockPropertyImageValue = z36.object({
|
|
901
845
|
asset: nullishToOptional(PageBlockAsset),
|
|
902
|
-
assetId: nullishToOptional(
|
|
903
|
-
assetUrl: nullishToOptional(
|
|
846
|
+
assetId: nullishToOptional(z36.string()),
|
|
847
|
+
assetUrl: nullishToOptional(z36.string())
|
|
904
848
|
});
|
|
905
|
-
var PageBlockCustomBlockPropertyValue =
|
|
906
|
-
key:
|
|
907
|
-
value:
|
|
849
|
+
var PageBlockCustomBlockPropertyValue = z36.object({
|
|
850
|
+
key: z36.string(),
|
|
851
|
+
value: z36.any()
|
|
908
852
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
909
853
|
// e.g. element id 67451 in the dev db
|
|
910
854
|
// value: z
|
|
@@ -915,102 +859,102 @@ var PageBlockCustomBlockPropertyValue = z38.object({
|
|
|
915
859
|
// .or(TypographyTokenData)
|
|
916
860
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
917
861
|
});
|
|
918
|
-
var PageBlockFigmaFrameProperties =
|
|
862
|
+
var PageBlockFigmaFrameProperties = z36.object({
|
|
919
863
|
color: nullishToOptional(
|
|
920
|
-
|
|
921
|
-
value:
|
|
864
|
+
z36.object({
|
|
865
|
+
value: z36.string()
|
|
922
866
|
})
|
|
923
867
|
),
|
|
924
868
|
alignment: PageBlockTilesAlignment,
|
|
925
869
|
layout: PageBlockTilesLayout,
|
|
926
870
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
927
|
-
showTitles:
|
|
871
|
+
showTitles: z36.boolean()
|
|
928
872
|
});
|
|
929
|
-
var PageBlockRenderCodeProperties =
|
|
930
|
-
showCode:
|
|
931
|
-
showControls:
|
|
873
|
+
var PageBlockRenderCodeProperties = z36.object({
|
|
874
|
+
showCode: z36.boolean(),
|
|
875
|
+
showControls: z36.boolean().optional()
|
|
932
876
|
});
|
|
933
|
-
var PageBlockAssetComponent =
|
|
934
|
-
persistentId:
|
|
935
|
-
componentAssetId:
|
|
936
|
-
title: nullishToOptional(
|
|
937
|
-
description: nullishToOptional(
|
|
877
|
+
var PageBlockAssetComponent = z36.object({
|
|
878
|
+
persistentId: z36.string(),
|
|
879
|
+
componentAssetId: z36.string(),
|
|
880
|
+
title: nullishToOptional(z36.string()),
|
|
881
|
+
description: nullishToOptional(z36.string()),
|
|
938
882
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
939
883
|
});
|
|
940
|
-
var PageBlockTableColumn =
|
|
941
|
-
id:
|
|
884
|
+
var PageBlockTableColumn = z36.object({
|
|
885
|
+
id: z36.string(),
|
|
942
886
|
width: DimensionTokenData
|
|
943
887
|
});
|
|
944
|
-
var PageBlockTableProperties =
|
|
945
|
-
showBorders:
|
|
946
|
-
showHeaderRow:
|
|
947
|
-
showHeaderColumn:
|
|
948
|
-
columns:
|
|
888
|
+
var PageBlockTableProperties = z36.object({
|
|
889
|
+
showBorders: z36.boolean(),
|
|
890
|
+
showHeaderRow: z36.boolean(),
|
|
891
|
+
showHeaderColumn: z36.boolean(),
|
|
892
|
+
columns: z36.array(PageBlockTableColumn)
|
|
949
893
|
});
|
|
950
|
-
var PageBlockTextSpanAttributeType =
|
|
951
|
-
var PageBlockTextSpanAttribute =
|
|
894
|
+
var PageBlockTextSpanAttributeType = z36.enum(["Bold", "Italic", "Link", "Strikethrough", "Code"]);
|
|
895
|
+
var PageBlockTextSpanAttribute = z36.object({
|
|
952
896
|
type: PageBlockTextSpanAttributeType,
|
|
953
|
-
link: nullishToOptional(
|
|
954
|
-
documentationItemId: nullishToOptional(
|
|
955
|
-
openInNewWindow: nullishToOptional(
|
|
897
|
+
link: nullishToOptional(z36.string()),
|
|
898
|
+
documentationItemId: nullishToOptional(z36.string()),
|
|
899
|
+
openInNewWindow: nullishToOptional(z36.boolean()),
|
|
956
900
|
// deprecated. use openInNewTab
|
|
957
|
-
openInNewTab: nullishToOptional(
|
|
901
|
+
openInNewTab: nullishToOptional(z36.boolean())
|
|
958
902
|
});
|
|
959
|
-
var PageBlockTextSpan =
|
|
960
|
-
text:
|
|
961
|
-
attributes:
|
|
903
|
+
var PageBlockTextSpan = z36.object({
|
|
904
|
+
text: z36.string(),
|
|
905
|
+
attributes: z36.array(PageBlockTextSpanAttribute)
|
|
962
906
|
});
|
|
963
|
-
var PageBlockText =
|
|
964
|
-
spans:
|
|
907
|
+
var PageBlockText = z36.object({
|
|
908
|
+
spans: z36.array(PageBlockTextSpan)
|
|
965
909
|
});
|
|
966
|
-
var PageBlockBaseV1 =
|
|
967
|
-
persistentId:
|
|
910
|
+
var PageBlockBaseV1 = z36.object({
|
|
911
|
+
persistentId: z36.string(),
|
|
968
912
|
type: PageBlockTypeV1,
|
|
969
913
|
// Element linking
|
|
970
|
-
designObjectId: nullishToOptional(
|
|
971
|
-
designObjectIds: nullishToOptional(
|
|
972
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
973
|
-
showNestedGroups: nullishToOptional(
|
|
974
|
-
brandId: nullishToOptional(
|
|
914
|
+
designObjectId: nullishToOptional(z36.string()),
|
|
915
|
+
designObjectIds: nullishToOptional(z36.array(z36.string())),
|
|
916
|
+
tokenType: nullishToOptional(DesignTokenType.or(z36.literal("Font"))),
|
|
917
|
+
showNestedGroups: nullishToOptional(z36.boolean()),
|
|
918
|
+
brandId: nullishToOptional(z36.string()),
|
|
975
919
|
// Rich text
|
|
976
920
|
text: nullishToOptional(PageBlockText),
|
|
977
|
-
caption: nullishToOptional(
|
|
978
|
-
headingType: nullishToOptional(
|
|
921
|
+
caption: nullishToOptional(z36.string()),
|
|
922
|
+
headingType: nullishToOptional(z36.number().min(1).max(3)),
|
|
979
923
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
980
924
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
981
|
-
urlInput: nullishToOptional(
|
|
982
|
-
url: nullishToOptional(
|
|
925
|
+
urlInput: nullishToOptional(z36.string()),
|
|
926
|
+
url: nullishToOptional(z36.string()),
|
|
983
927
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
984
928
|
// Image
|
|
985
929
|
asset: nullishToOptional(PageBlockAsset),
|
|
986
930
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
987
931
|
// Shortcuts block
|
|
988
|
-
shortcuts: nullishToOptional(
|
|
932
|
+
shortcuts: nullishToOptional(z36.array(PageBlockShortcut)),
|
|
989
933
|
// Custom blocks
|
|
990
|
-
customBlockKey: nullishToOptional(
|
|
991
|
-
customBlockProperties: nullishToOptional(
|
|
992
|
-
variantKey: nullishToOptional(
|
|
934
|
+
customBlockKey: nullishToOptional(z36.string()),
|
|
935
|
+
customBlockProperties: nullishToOptional(z36.array(PageBlockCustomBlockPropertyValue)),
|
|
936
|
+
variantKey: nullishToOptional(z36.string()),
|
|
993
937
|
// Figma frames
|
|
994
938
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
995
|
-
figmaFrames: nullishToOptional(
|
|
939
|
+
figmaFrames: nullishToOptional(z36.array(PageBlockFrame)),
|
|
996
940
|
// Generic
|
|
997
941
|
size: nullishToOptional(Size),
|
|
998
942
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
999
943
|
// Render code
|
|
1000
944
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
1001
945
|
// Component assets
|
|
1002
|
-
componentAssets: nullishToOptional(
|
|
946
|
+
componentAssets: nullishToOptional(z36.array(PageBlockAssetComponent)),
|
|
1003
947
|
// Tables
|
|
1004
948
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
1005
|
-
columnId: nullishToOptional(
|
|
949
|
+
columnId: nullishToOptional(z36.string()),
|
|
1006
950
|
// Token spreadsheet
|
|
1007
951
|
theme: nullishToOptional(PageBlockTheme),
|
|
1008
|
-
blacklistedElementProperties: nullishToOptional(
|
|
952
|
+
blacklistedElementProperties: nullishToOptional(z36.array(z36.string())),
|
|
1009
953
|
// Arbitrary
|
|
1010
|
-
userMetadata: nullishToOptional(
|
|
954
|
+
userMetadata: nullishToOptional(z36.string())
|
|
1011
955
|
});
|
|
1012
956
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
1013
|
-
children:
|
|
957
|
+
children: z36.lazy(
|
|
1014
958
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
1015
959
|
)
|
|
1016
960
|
});
|
|
@@ -1022,276 +966,276 @@ function traversePageBlocksV1(blocks, action) {
|
|
|
1022
966
|
}
|
|
1023
967
|
|
|
1024
968
|
// src/dsm/elements/data/documentation-block-v2.ts
|
|
1025
|
-
import { z as
|
|
1026
|
-
var PageBlockLinkType =
|
|
1027
|
-
var PageBlockImageType =
|
|
1028
|
-
var PageBlockImageAlignment =
|
|
1029
|
-
var PageBlockTableCellAlignment =
|
|
1030
|
-
var PageBlockPreviewContainerSize =
|
|
1031
|
-
var PageBlockThemeDisplayMode =
|
|
1032
|
-
var PageBlockImageResourceReference =
|
|
1033
|
-
resourceId:
|
|
1034
|
-
url:
|
|
1035
|
-
});
|
|
1036
|
-
var PageBlockResourceFrameNodeReference =
|
|
1037
|
-
sourceId:
|
|
1038
|
-
frameReferenceId:
|
|
1039
|
-
});
|
|
1040
|
-
var PageBlockImageReference =
|
|
969
|
+
import { z as z37 } from "zod";
|
|
970
|
+
var PageBlockLinkType = z37.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
971
|
+
var PageBlockImageType = z37.enum(["Resource", "FigmaNode"]);
|
|
972
|
+
var PageBlockImageAlignment = z37.enum(["Left", "Center", "Stretch"]);
|
|
973
|
+
var PageBlockTableCellAlignment = z37.enum(["Left", "Center", "Right"]);
|
|
974
|
+
var PageBlockPreviewContainerSize = z37.enum(["Centered", "NaturalHeight"]);
|
|
975
|
+
var PageBlockThemeDisplayMode = z37.enum(["Split", "Override"]);
|
|
976
|
+
var PageBlockImageResourceReference = z37.object({
|
|
977
|
+
resourceId: z37.string(),
|
|
978
|
+
url: z37.string()
|
|
979
|
+
});
|
|
980
|
+
var PageBlockResourceFrameNodeReference = z37.object({
|
|
981
|
+
sourceId: z37.string(),
|
|
982
|
+
frameReferenceId: z37.string()
|
|
983
|
+
});
|
|
984
|
+
var PageBlockImageReference = z37.object({
|
|
1041
985
|
type: PageBlockImageType,
|
|
1042
986
|
resource: PageBlockImageResourceReference.optional(),
|
|
1043
987
|
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
1044
988
|
});
|
|
1045
|
-
var PageBlockColorV2 =
|
|
1046
|
-
value:
|
|
1047
|
-
referencedTokenId:
|
|
989
|
+
var PageBlockColorV2 = z37.object({
|
|
990
|
+
value: z37.string(),
|
|
991
|
+
referencedTokenId: z37.string().optional()
|
|
1048
992
|
});
|
|
1049
|
-
var PageBlockAssetEntityMeta =
|
|
1050
|
-
title:
|
|
1051
|
-
description:
|
|
993
|
+
var PageBlockAssetEntityMeta = z37.object({
|
|
994
|
+
title: z37.string().optional(),
|
|
995
|
+
description: z37.string().optional(),
|
|
1052
996
|
backgroundColor: PageBlockColorV2.optional()
|
|
1053
997
|
});
|
|
1054
|
-
var PageBlockFigmaComponentEntityMeta =
|
|
1055
|
-
title:
|
|
1056
|
-
description:
|
|
998
|
+
var PageBlockFigmaComponentEntityMeta = z37.object({
|
|
999
|
+
title: z37.string().optional(),
|
|
1000
|
+
description: z37.string().optional(),
|
|
1057
1001
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1058
|
-
selectedComponentProperties:
|
|
1002
|
+
selectedComponentProperties: z37.array(z37.string()).optional()
|
|
1059
1003
|
});
|
|
1060
|
-
var PageBlockFigmaNodeEntityMeta =
|
|
1061
|
-
title:
|
|
1062
|
-
description:
|
|
1004
|
+
var PageBlockFigmaNodeEntityMeta = z37.object({
|
|
1005
|
+
title: z37.string().optional(),
|
|
1006
|
+
description: z37.string().optional(),
|
|
1063
1007
|
backgroundColor: PageBlockColorV2.optional()
|
|
1064
1008
|
});
|
|
1065
|
-
var PageBlockAppearanceV2 =
|
|
1009
|
+
var PageBlockAppearanceV2 = z37.object({
|
|
1066
1010
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
1067
|
-
numberOfColumns:
|
|
1011
|
+
numberOfColumns: z37.number().optional()
|
|
1068
1012
|
});
|
|
1069
|
-
var PageBlockItemUntypedValue =
|
|
1070
|
-
value:
|
|
1071
|
-
}).and(
|
|
1072
|
-
var PageBlockLinkV2 =
|
|
1013
|
+
var PageBlockItemUntypedValue = z37.object({
|
|
1014
|
+
value: z37.any()
|
|
1015
|
+
}).and(z37.record(z37.any()));
|
|
1016
|
+
var PageBlockLinkV2 = z37.object({
|
|
1073
1017
|
type: PageBlockLinkType,
|
|
1074
|
-
documentationItemId:
|
|
1075
|
-
pageHeadingId:
|
|
1076
|
-
url:
|
|
1077
|
-
openInNewTab:
|
|
1018
|
+
documentationItemId: z37.string().optional(),
|
|
1019
|
+
pageHeadingId: z37.string().optional(),
|
|
1020
|
+
url: z37.string().optional(),
|
|
1021
|
+
openInNewTab: z37.boolean().optional()
|
|
1078
1022
|
});
|
|
1079
|
-
var PageBlockItemV2 =
|
|
1080
|
-
id:
|
|
1023
|
+
var PageBlockItemV2 = z37.object({
|
|
1024
|
+
id: z37.string(),
|
|
1081
1025
|
linksTo: PageBlockLinkV2.optional(),
|
|
1082
|
-
props:
|
|
1026
|
+
props: z37.record(PageBlockItemUntypedValue)
|
|
1083
1027
|
});
|
|
1084
|
-
var PageBlockDataV2 =
|
|
1085
|
-
packageId:
|
|
1086
|
-
variantId:
|
|
1087
|
-
indentLevel:
|
|
1028
|
+
var PageBlockDataV2 = z37.object({
|
|
1029
|
+
packageId: z37.string(),
|
|
1030
|
+
variantId: z37.string().optional(),
|
|
1031
|
+
indentLevel: z37.number(),
|
|
1088
1032
|
appearance: PageBlockAppearanceV2.optional(),
|
|
1089
|
-
items:
|
|
1033
|
+
items: z37.array(PageBlockItemV2)
|
|
1090
1034
|
});
|
|
1091
|
-
var PageBlockItemAssetValue =
|
|
1092
|
-
selectedPropertyIds:
|
|
1093
|
-
showSearch:
|
|
1035
|
+
var PageBlockItemAssetValue = z37.object({
|
|
1036
|
+
selectedPropertyIds: z37.array(z37.string()).optional(),
|
|
1037
|
+
showSearch: z37.boolean().optional(),
|
|
1094
1038
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1095
1039
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1096
|
-
value:
|
|
1097
|
-
|
|
1098
|
-
entityId:
|
|
1099
|
-
entityType:
|
|
1040
|
+
value: z37.array(
|
|
1041
|
+
z37.object({
|
|
1042
|
+
entityId: z37.string(),
|
|
1043
|
+
entityType: z37.enum(["Asset", "AssetGroup"]),
|
|
1100
1044
|
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
1101
1045
|
})
|
|
1102
1046
|
).default([])
|
|
1103
1047
|
});
|
|
1104
|
-
var PageBlockItemAssetPropertyValue =
|
|
1105
|
-
value:
|
|
1048
|
+
var PageBlockItemAssetPropertyValue = z37.object({
|
|
1049
|
+
value: z37.array(z37.string()).default([])
|
|
1106
1050
|
});
|
|
1107
|
-
var PageBlockItemFigmaComponentValue =
|
|
1108
|
-
showComponentName:
|
|
1109
|
-
showComponentDescription:
|
|
1110
|
-
showPropertyList:
|
|
1051
|
+
var PageBlockItemFigmaComponentValue = z37.object({
|
|
1052
|
+
showComponentName: z37.boolean().optional(),
|
|
1053
|
+
showComponentDescription: z37.boolean().optional(),
|
|
1054
|
+
showPropertyList: z37.boolean().optional(),
|
|
1111
1055
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1112
1056
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1113
|
-
value:
|
|
1114
|
-
|
|
1115
|
-
entityId:
|
|
1116
|
-
entityType:
|
|
1057
|
+
value: z37.array(
|
|
1058
|
+
z37.object({
|
|
1059
|
+
entityId: z37.string(),
|
|
1060
|
+
entityType: z37.enum(["FigmaComponent"]),
|
|
1117
1061
|
entityMeta: PageBlockFigmaComponentEntityMeta.optional()
|
|
1118
1062
|
})
|
|
1119
1063
|
).default([])
|
|
1120
1064
|
});
|
|
1121
|
-
var PageBlockItemBooleanValue =
|
|
1122
|
-
value:
|
|
1065
|
+
var PageBlockItemBooleanValue = z37.object({
|
|
1066
|
+
value: z37.boolean()
|
|
1123
1067
|
});
|
|
1124
|
-
var PageBlockItemCodeValue =
|
|
1068
|
+
var PageBlockItemCodeValue = z37.object({
|
|
1125
1069
|
format: PageBlockCodeLanguage.optional(),
|
|
1126
|
-
caption:
|
|
1127
|
-
value:
|
|
1128
|
-
});
|
|
1129
|
-
var PageBlockItemSandboxValue =
|
|
1130
|
-
showCode:
|
|
1131
|
-
showControls:
|
|
1132
|
-
backgroundColor:
|
|
1133
|
-
alignPreview:
|
|
1134
|
-
previewHeight:
|
|
1135
|
-
value:
|
|
1136
|
-
});
|
|
1137
|
-
var PageBlockItemColorValue =
|
|
1138
|
-
var PageBlockItemComponentValue =
|
|
1139
|
-
selectedPropertyIds:
|
|
1140
|
-
value:
|
|
1141
|
-
|
|
1142
|
-
entityId:
|
|
1143
|
-
entityType:
|
|
1070
|
+
caption: z37.string().optional(),
|
|
1071
|
+
value: z37.string()
|
|
1072
|
+
});
|
|
1073
|
+
var PageBlockItemSandboxValue = z37.object({
|
|
1074
|
+
showCode: z37.boolean().optional(),
|
|
1075
|
+
showControls: z37.boolean().optional(),
|
|
1076
|
+
backgroundColor: z37.string().optional(),
|
|
1077
|
+
alignPreview: z37.enum(["Left", "Center"]).optional(),
|
|
1078
|
+
previewHeight: z37.number().optional(),
|
|
1079
|
+
value: z37.string()
|
|
1080
|
+
});
|
|
1081
|
+
var PageBlockItemColorValue = z37.record(z37.any());
|
|
1082
|
+
var PageBlockItemComponentValue = z37.object({
|
|
1083
|
+
selectedPropertyIds: z37.array(z37.string()).optional(),
|
|
1084
|
+
value: z37.array(
|
|
1085
|
+
z37.object({
|
|
1086
|
+
entityId: z37.string(),
|
|
1087
|
+
entityType: z37.enum(["Component", "ComponentGroup"])
|
|
1144
1088
|
})
|
|
1145
1089
|
).default([])
|
|
1146
1090
|
});
|
|
1147
|
-
var PageBlockItemComponentPropertyValue =
|
|
1148
|
-
value:
|
|
1149
|
-
});
|
|
1150
|
-
var PageBlockItemDividerValue =
|
|
1151
|
-
var PageBlockItemEmbedValue =
|
|
1152
|
-
value:
|
|
1153
|
-
caption:
|
|
1154
|
-
height:
|
|
1155
|
-
openGraph:
|
|
1156
|
-
title:
|
|
1157
|
-
description:
|
|
1158
|
-
imageUrl:
|
|
1091
|
+
var PageBlockItemComponentPropertyValue = z37.object({
|
|
1092
|
+
value: z37.string()
|
|
1093
|
+
});
|
|
1094
|
+
var PageBlockItemDividerValue = z37.object({});
|
|
1095
|
+
var PageBlockItemEmbedValue = z37.object({
|
|
1096
|
+
value: z37.string().optional(),
|
|
1097
|
+
caption: z37.string().optional(),
|
|
1098
|
+
height: z37.number().optional(),
|
|
1099
|
+
openGraph: z37.object({
|
|
1100
|
+
title: z37.string().optional(),
|
|
1101
|
+
description: z37.string().optional(),
|
|
1102
|
+
imageUrl: z37.string().optional()
|
|
1159
1103
|
}).optional()
|
|
1160
1104
|
});
|
|
1161
|
-
var PageBlockItemFigmaNodeValue =
|
|
1162
|
-
showSearch:
|
|
1105
|
+
var PageBlockItemFigmaNodeValue = z37.object({
|
|
1106
|
+
showSearch: z37.boolean().optional(),
|
|
1163
1107
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1164
1108
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1165
|
-
showFrameDetails:
|
|
1166
|
-
value:
|
|
1167
|
-
|
|
1168
|
-
entityId:
|
|
1109
|
+
showFrameDetails: z37.boolean().optional(),
|
|
1110
|
+
value: z37.array(
|
|
1111
|
+
z37.object({
|
|
1112
|
+
entityId: z37.string(),
|
|
1169
1113
|
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
1170
1114
|
})
|
|
1171
1115
|
).default([])
|
|
1172
1116
|
});
|
|
1173
|
-
var PageBlockItemImageValue =
|
|
1174
|
-
alt:
|
|
1175
|
-
caption:
|
|
1117
|
+
var PageBlockItemImageValue = z37.object({
|
|
1118
|
+
alt: z37.string().optional(),
|
|
1119
|
+
caption: z37.string().optional(),
|
|
1176
1120
|
alignment: PageBlockImageAlignment.optional(),
|
|
1177
1121
|
value: PageBlockImageReference.optional()
|
|
1178
1122
|
});
|
|
1179
|
-
var PageBlockItemMarkdownValue =
|
|
1180
|
-
value:
|
|
1123
|
+
var PageBlockItemMarkdownValue = z37.object({
|
|
1124
|
+
value: z37.string()
|
|
1181
1125
|
});
|
|
1182
|
-
var PageBlockItemMultiRichTextValue =
|
|
1126
|
+
var PageBlockItemMultiRichTextValue = z37.object({
|
|
1183
1127
|
value: PageBlockText.array()
|
|
1184
1128
|
});
|
|
1185
|
-
var PageBlockItemMultiSelectValue =
|
|
1186
|
-
value:
|
|
1129
|
+
var PageBlockItemMultiSelectValue = z37.object({
|
|
1130
|
+
value: z37.array(z37.string()).default([])
|
|
1187
1131
|
});
|
|
1188
|
-
var PageBlockItemNumberValue =
|
|
1189
|
-
value:
|
|
1132
|
+
var PageBlockItemNumberValue = z37.object({
|
|
1133
|
+
value: z37.number()
|
|
1190
1134
|
});
|
|
1191
|
-
var PageBlockItemRichTextValue =
|
|
1135
|
+
var PageBlockItemRichTextValue = z37.object({
|
|
1192
1136
|
value: PageBlockText,
|
|
1193
1137
|
calloutType: PageBlockCalloutType.optional()
|
|
1194
1138
|
});
|
|
1195
|
-
var PageBlockItemSingleSelectValue =
|
|
1196
|
-
value:
|
|
1139
|
+
var PageBlockItemSingleSelectValue = z37.object({
|
|
1140
|
+
value: z37.string()
|
|
1197
1141
|
});
|
|
1198
|
-
var PageBlockItemStorybookValue =
|
|
1199
|
-
caption:
|
|
1200
|
-
height:
|
|
1201
|
-
embedUrl:
|
|
1202
|
-
value:
|
|
1142
|
+
var PageBlockItemStorybookValue = z37.object({
|
|
1143
|
+
caption: z37.string().optional(),
|
|
1144
|
+
height: z37.number().optional(),
|
|
1145
|
+
embedUrl: z37.string().optional(),
|
|
1146
|
+
value: z37.string().optional()
|
|
1203
1147
|
});
|
|
1204
|
-
var PageBlockItemTextValue =
|
|
1205
|
-
value:
|
|
1148
|
+
var PageBlockItemTextValue = z37.object({
|
|
1149
|
+
value: z37.string()
|
|
1206
1150
|
});
|
|
1207
|
-
var PageBlockItemTokenValue =
|
|
1208
|
-
selectedPropertyIds:
|
|
1209
|
-
selectedThemeIds:
|
|
1151
|
+
var PageBlockItemTokenValue = z37.object({
|
|
1152
|
+
selectedPropertyIds: z37.array(z37.string()).optional(),
|
|
1153
|
+
selectedThemeIds: z37.array(z37.string()).optional(),
|
|
1210
1154
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1211
|
-
value:
|
|
1212
|
-
|
|
1213
|
-
entityId:
|
|
1214
|
-
entityType:
|
|
1215
|
-
entityMeta:
|
|
1216
|
-
showNestedGroups:
|
|
1155
|
+
value: z37.array(
|
|
1156
|
+
z37.object({
|
|
1157
|
+
entityId: z37.string(),
|
|
1158
|
+
entityType: z37.enum(["Token", "TokenGroup"]),
|
|
1159
|
+
entityMeta: z37.object({
|
|
1160
|
+
showNestedGroups: z37.boolean().optional()
|
|
1217
1161
|
}).optional()
|
|
1218
1162
|
})
|
|
1219
1163
|
).default([])
|
|
1220
1164
|
});
|
|
1221
|
-
var PageBlockItemTokenPropertyValue =
|
|
1222
|
-
selectedPropertyIds:
|
|
1223
|
-
selectedThemeIds:
|
|
1224
|
-
value:
|
|
1165
|
+
var PageBlockItemTokenPropertyValue = z37.object({
|
|
1166
|
+
selectedPropertyIds: z37.array(z37.string()).optional(),
|
|
1167
|
+
selectedThemeIds: z37.array(z37.string()).optional(),
|
|
1168
|
+
value: z37.array(z37.string()).default([])
|
|
1225
1169
|
});
|
|
1226
|
-
var PageBlockItemTokenTypeValue =
|
|
1227
|
-
value:
|
|
1170
|
+
var PageBlockItemTokenTypeValue = z37.object({
|
|
1171
|
+
value: z37.array(DesignTokenType).default([])
|
|
1228
1172
|
});
|
|
1229
|
-
var PageBlockItemUrlValue =
|
|
1230
|
-
value:
|
|
1173
|
+
var PageBlockItemUrlValue = z37.object({
|
|
1174
|
+
value: z37.string()
|
|
1231
1175
|
});
|
|
1232
|
-
var PageBlockItemTableRichTextNode =
|
|
1233
|
-
type:
|
|
1234
|
-
id:
|
|
1176
|
+
var PageBlockItemTableRichTextNode = z37.object({
|
|
1177
|
+
type: z37.literal("RichText"),
|
|
1178
|
+
id: z37.string(),
|
|
1235
1179
|
value: PageBlockItemRichTextValue.shape.value
|
|
1236
1180
|
});
|
|
1237
|
-
var PageBlockItemTableMultiRichTextNode =
|
|
1238
|
-
type:
|
|
1181
|
+
var PageBlockItemTableMultiRichTextNode = z37.object({
|
|
1182
|
+
type: z37.literal("MultiRichText"),
|
|
1239
1183
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
1240
1184
|
});
|
|
1241
|
-
var PageBlockItemTableImageNode =
|
|
1242
|
-
type:
|
|
1243
|
-
id:
|
|
1185
|
+
var PageBlockItemTableImageNode = z37.object({
|
|
1186
|
+
type: z37.literal("Image"),
|
|
1187
|
+
id: z37.string(),
|
|
1244
1188
|
caption: PageBlockItemImageValue.shape.caption,
|
|
1245
1189
|
value: PageBlockItemImageValue.shape.value
|
|
1246
1190
|
});
|
|
1247
|
-
var PageBlockItemTableNode =
|
|
1191
|
+
var PageBlockItemTableNode = z37.discriminatedUnion("type", [
|
|
1248
1192
|
PageBlockItemTableRichTextNode,
|
|
1249
1193
|
// PageBlockItemTableMultiRichTextNode,
|
|
1250
1194
|
PageBlockItemTableImageNode
|
|
1251
1195
|
]);
|
|
1252
|
-
var PageBlockItemTableCell =
|
|
1253
|
-
id:
|
|
1254
|
-
nodes:
|
|
1255
|
-
columnWidth:
|
|
1196
|
+
var PageBlockItemTableCell = z37.object({
|
|
1197
|
+
id: z37.string(),
|
|
1198
|
+
nodes: z37.array(PageBlockItemTableNode),
|
|
1199
|
+
columnWidth: z37.number().optional(),
|
|
1256
1200
|
alignment: PageBlockTableCellAlignment
|
|
1257
1201
|
});
|
|
1258
|
-
var PageBlockItemTableRow =
|
|
1259
|
-
cells:
|
|
1202
|
+
var PageBlockItemTableRow = z37.object({
|
|
1203
|
+
cells: z37.array(PageBlockItemTableCell)
|
|
1260
1204
|
});
|
|
1261
|
-
var PageBlockItemTableValue =
|
|
1262
|
-
highlightHeaderColumn:
|
|
1263
|
-
highlightHeaderRow:
|
|
1264
|
-
showBorder:
|
|
1265
|
-
value:
|
|
1205
|
+
var PageBlockItemTableValue = z37.object({
|
|
1206
|
+
highlightHeaderColumn: z37.boolean().optional(),
|
|
1207
|
+
highlightHeaderRow: z37.boolean().optional(),
|
|
1208
|
+
showBorder: z37.boolean().optional(),
|
|
1209
|
+
value: z37.array(PageBlockItemTableRow).default([])
|
|
1266
1210
|
});
|
|
1267
1211
|
|
|
1268
1212
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1269
|
-
import { z as
|
|
1213
|
+
import { z as z41 } from "zod";
|
|
1270
1214
|
|
|
1271
1215
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1272
|
-
import { z as
|
|
1216
|
+
import { z as z40 } from "zod";
|
|
1273
1217
|
|
|
1274
1218
|
// src/dsm/elements/data/item-header-v1.ts
|
|
1275
|
-
import { z as
|
|
1219
|
+
import { z as z39 } from "zod";
|
|
1276
1220
|
|
|
1277
1221
|
// src/dsm/elements/data/item-header.ts
|
|
1278
|
-
import { z as
|
|
1279
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
1280
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
1222
|
+
import { z as z38 } from "zod";
|
|
1223
|
+
var DocumentationItemHeaderAlignmentSchema = z38.enum(["Left", "Center"]);
|
|
1224
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z38.enum(["AspectFill", "AspectFit"]);
|
|
1281
1225
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1282
1226
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1283
1227
|
|
|
1284
1228
|
// src/dsm/elements/data/item-header-v1.ts
|
|
1285
|
-
var DocumentationItemHeaderV1 =
|
|
1286
|
-
description:
|
|
1229
|
+
var DocumentationItemHeaderV1 = z39.object({
|
|
1230
|
+
description: z39.string(),
|
|
1287
1231
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1288
1232
|
foregroundColor: ColorTokenData.nullish(),
|
|
1289
1233
|
backgroundColor: ColorTokenData.nullish(),
|
|
1290
1234
|
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
1291
1235
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1292
|
-
showBackgroundOverlay:
|
|
1293
|
-
showCoverText:
|
|
1294
|
-
minHeight:
|
|
1236
|
+
showBackgroundOverlay: z39.boolean(),
|
|
1237
|
+
showCoverText: z39.boolean(),
|
|
1238
|
+
minHeight: z39.number().nullish()
|
|
1295
1239
|
});
|
|
1296
1240
|
var defaultDocumentationItemHeaderV1 = {
|
|
1297
1241
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1302,10 +1246,10 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
1302
1246
|
};
|
|
1303
1247
|
|
|
1304
1248
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1305
|
-
var DocumentationItemConfigurationV1 =
|
|
1306
|
-
showSidebar:
|
|
1307
|
-
isPrivate:
|
|
1308
|
-
isHidden:
|
|
1249
|
+
var DocumentationItemConfigurationV1 = z40.object({
|
|
1250
|
+
showSidebar: z40.boolean(),
|
|
1251
|
+
isPrivate: z40.boolean().optional(),
|
|
1252
|
+
isHidden: z40.boolean().optional(),
|
|
1309
1253
|
header: DocumentationItemHeaderV1
|
|
1310
1254
|
});
|
|
1311
1255
|
var defaultDocumentationItemConfigurationV1 = {
|
|
@@ -1314,29 +1258,29 @@ var defaultDocumentationItemConfigurationV1 = {
|
|
|
1314
1258
|
};
|
|
1315
1259
|
|
|
1316
1260
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1317
|
-
var DocumentationPageDataV1 =
|
|
1318
|
-
blocks:
|
|
1261
|
+
var DocumentationPageDataV1 = z41.object({
|
|
1262
|
+
blocks: z41.array(PageBlockV1),
|
|
1319
1263
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1320
1264
|
});
|
|
1321
1265
|
|
|
1322
1266
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1323
|
-
import { z as
|
|
1267
|
+
import { z as z44 } from "zod";
|
|
1324
1268
|
|
|
1325
1269
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1326
|
-
import { z as
|
|
1270
|
+
import { z as z43 } from "zod";
|
|
1327
1271
|
|
|
1328
1272
|
// src/dsm/elements/data/item-header-v2.ts
|
|
1329
|
-
import { z as
|
|
1330
|
-
var DocumentationItemHeaderV2 =
|
|
1331
|
-
description:
|
|
1273
|
+
import { z as z42 } from "zod";
|
|
1274
|
+
var DocumentationItemHeaderV2 = z42.object({
|
|
1275
|
+
description: z42.string(),
|
|
1332
1276
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1333
1277
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
1334
1278
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
1335
1279
|
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
1336
1280
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1337
|
-
showBackgroundOverlay:
|
|
1338
|
-
showCoverText:
|
|
1339
|
-
minHeight:
|
|
1281
|
+
showBackgroundOverlay: z42.boolean(),
|
|
1282
|
+
showCoverText: z42.boolean(),
|
|
1283
|
+
minHeight: z42.number().nullish()
|
|
1340
1284
|
});
|
|
1341
1285
|
var defaultDocumentationItemHeaderV2 = {
|
|
1342
1286
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1347,10 +1291,10 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1347
1291
|
};
|
|
1348
1292
|
|
|
1349
1293
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1350
|
-
var DocumentationItemConfigurationV2 =
|
|
1351
|
-
showSidebar:
|
|
1352
|
-
isPrivate:
|
|
1353
|
-
isHidden:
|
|
1294
|
+
var DocumentationItemConfigurationV2 = z43.object({
|
|
1295
|
+
showSidebar: z43.boolean(),
|
|
1296
|
+
isPrivate: z43.boolean().optional(),
|
|
1297
|
+
isHidden: z43.boolean().optional(),
|
|
1354
1298
|
header: DocumentationItemHeaderV2
|
|
1355
1299
|
});
|
|
1356
1300
|
var defaultDocumentationItemConfigurationV2 = {
|
|
@@ -1361,86 +1305,122 @@ var defaultDocumentationItemConfigurationV2 = {
|
|
|
1361
1305
|
};
|
|
1362
1306
|
|
|
1363
1307
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1364
|
-
var DocumentationPageDataV2 =
|
|
1308
|
+
var DocumentationPageDataV2 = z44.object({
|
|
1365
1309
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1366
1310
|
});
|
|
1367
1311
|
|
|
1368
1312
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
1369
|
-
import { z as
|
|
1313
|
+
import { z as z47 } from "zod";
|
|
1314
|
+
|
|
1315
|
+
// src/dsm/elements/page-block-v2.ts
|
|
1316
|
+
import { z as z46 } from "zod";
|
|
1317
|
+
|
|
1318
|
+
// src/dsm/elements/base.ts
|
|
1319
|
+
import { z as z45 } from "zod";
|
|
1320
|
+
var DesignElementOrigin = z45.object({
|
|
1321
|
+
id: z45.string(),
|
|
1322
|
+
sourceId: z45.string(),
|
|
1323
|
+
name: z45.string()
|
|
1324
|
+
});
|
|
1325
|
+
var DesignElementBase = z45.object({
|
|
1326
|
+
id: z45.string(),
|
|
1327
|
+
persistentId: z45.string(),
|
|
1328
|
+
meta: ObjectMeta,
|
|
1329
|
+
designSystemVersionId: z45.string(),
|
|
1330
|
+
createdAt: z45.coerce.date(),
|
|
1331
|
+
updatedAt: z45.coerce.date()
|
|
1332
|
+
});
|
|
1333
|
+
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1334
|
+
origin: DesignElementOrigin
|
|
1335
|
+
});
|
|
1336
|
+
var DesignElementGroupablePart = z45.object({
|
|
1337
|
+
parentPersistentId: z45.string().optional(),
|
|
1338
|
+
sortOrder: z45.number()
|
|
1339
|
+
});
|
|
1340
|
+
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1341
|
+
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1342
|
+
parentPersistentId: z45.string()
|
|
1343
|
+
});
|
|
1344
|
+
var DesignElementBrandedPart = z45.object({
|
|
1345
|
+
brandPersistentId: z45.string()
|
|
1346
|
+
});
|
|
1347
|
+
var DesignElementSlugPart = z45.object({
|
|
1348
|
+
slug: z45.string().optional(),
|
|
1349
|
+
userSlug: z45.string().optional()
|
|
1350
|
+
});
|
|
1370
1351
|
|
|
1371
1352
|
// src/dsm/elements/page-block-v2.ts
|
|
1372
|
-
import { z as z47 } from "zod";
|
|
1373
1353
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1374
1354
|
data: PageBlockDataV2
|
|
1375
1355
|
});
|
|
1376
|
-
var PageBlockEditorModelV2 =
|
|
1377
|
-
id:
|
|
1378
|
-
type:
|
|
1356
|
+
var PageBlockEditorModelV2 = z46.object({
|
|
1357
|
+
id: z46.string(),
|
|
1358
|
+
type: z46.literal("Block"),
|
|
1379
1359
|
data: PageBlockDataV2
|
|
1380
1360
|
});
|
|
1381
1361
|
|
|
1382
1362
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
1383
|
-
var PageSectionTypeV2 =
|
|
1384
|
-
var PageSectionColumnV2 =
|
|
1385
|
-
id:
|
|
1386
|
-
blocks:
|
|
1387
|
-
});
|
|
1388
|
-
var PageSectionItemV2 =
|
|
1389
|
-
id:
|
|
1390
|
-
title:
|
|
1391
|
-
columns:
|
|
1392
|
-
});
|
|
1393
|
-
var PageSectionPaddingV2 =
|
|
1394
|
-
top:
|
|
1395
|
-
bottom:
|
|
1396
|
-
left:
|
|
1397
|
-
right:
|
|
1398
|
-
});
|
|
1399
|
-
var PageSectionAppearanceV2 =
|
|
1400
|
-
expandToEdges:
|
|
1401
|
-
contentExpandToEdges:
|
|
1363
|
+
var PageSectionTypeV2 = z47.enum(["Tabs"]);
|
|
1364
|
+
var PageSectionColumnV2 = z47.object({
|
|
1365
|
+
id: z47.string(),
|
|
1366
|
+
blocks: z47.array(PageBlockEditorModelV2)
|
|
1367
|
+
});
|
|
1368
|
+
var PageSectionItemV2 = z47.object({
|
|
1369
|
+
id: z47.string(),
|
|
1370
|
+
title: z47.string(),
|
|
1371
|
+
columns: z47.array(PageSectionColumnV2)
|
|
1372
|
+
});
|
|
1373
|
+
var PageSectionPaddingV2 = z47.object({
|
|
1374
|
+
top: z47.number().optional(),
|
|
1375
|
+
bottom: z47.number().optional(),
|
|
1376
|
+
left: z47.number().optional(),
|
|
1377
|
+
right: z47.number().optional()
|
|
1378
|
+
});
|
|
1379
|
+
var PageSectionAppearanceV2 = z47.object({
|
|
1380
|
+
expandToEdges: z47.boolean(),
|
|
1381
|
+
contentExpandToEdges: z47.boolean(),
|
|
1402
1382
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1403
1383
|
foregroundColor: PageBlockColorV2.optional(),
|
|
1404
1384
|
padding: PageSectionPaddingV2.optional()
|
|
1405
1385
|
});
|
|
1406
|
-
var PageSectionEditorModelV2 =
|
|
1407
|
-
id:
|
|
1408
|
-
type:
|
|
1409
|
-
variantId:
|
|
1386
|
+
var PageSectionEditorModelV2 = z47.object({
|
|
1387
|
+
id: z47.string(),
|
|
1388
|
+
type: z47.literal("Section"),
|
|
1389
|
+
variantId: z47.string().optional(),
|
|
1410
1390
|
sectionType: PageSectionTypeV2,
|
|
1411
1391
|
appearance: PageSectionAppearanceV2,
|
|
1412
|
-
items:
|
|
1392
|
+
items: z47.array(PageSectionItemV2)
|
|
1413
1393
|
});
|
|
1414
1394
|
|
|
1415
1395
|
// src/dsm/elements/data/duration.ts
|
|
1416
|
-
import { z as
|
|
1417
|
-
var DurationUnit =
|
|
1418
|
-
var DurationValue =
|
|
1396
|
+
import { z as z48 } from "zod";
|
|
1397
|
+
var DurationUnit = z48.enum(["Ms"]);
|
|
1398
|
+
var DurationValue = z48.object({
|
|
1419
1399
|
unit: DurationUnit,
|
|
1420
|
-
measure:
|
|
1400
|
+
measure: z48.number()
|
|
1421
1401
|
});
|
|
1422
1402
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1423
1403
|
|
|
1424
1404
|
// src/dsm/elements/data/figma-file-structure.ts
|
|
1425
|
-
import { z as
|
|
1426
|
-
var FigmaFileStructureNodeType =
|
|
1427
|
-
var FigmaFileStructureNodeBase =
|
|
1428
|
-
id:
|
|
1429
|
-
name:
|
|
1405
|
+
import { z as z49 } from "zod";
|
|
1406
|
+
var FigmaFileStructureNodeType = z49.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1407
|
+
var FigmaFileStructureNodeBase = z49.object({
|
|
1408
|
+
id: z49.string(),
|
|
1409
|
+
name: z49.string(),
|
|
1430
1410
|
type: FigmaFileStructureNodeType,
|
|
1431
1411
|
size: SizeOrUndefined,
|
|
1432
|
-
parentComponentSetId:
|
|
1412
|
+
parentComponentSetId: z49.string().optional()
|
|
1433
1413
|
});
|
|
1434
1414
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1435
|
-
children:
|
|
1415
|
+
children: z49.lazy(() => FigmaFileStructureNode.array())
|
|
1436
1416
|
});
|
|
1437
|
-
var FigmaFileStructureStatistics =
|
|
1438
|
-
frames:
|
|
1439
|
-
components:
|
|
1440
|
-
componentSets:
|
|
1417
|
+
var FigmaFileStructureStatistics = z49.object({
|
|
1418
|
+
frames: z49.number().nullable().optional().transform((v) => v ?? 0),
|
|
1419
|
+
components: z49.number().nullable().optional().transform((v) => v ?? 0),
|
|
1420
|
+
componentSets: z49.number().nullable().optional().transform((v) => v ?? 0)
|
|
1441
1421
|
});
|
|
1442
|
-
var FigmaFileStructureElementData =
|
|
1443
|
-
value:
|
|
1422
|
+
var FigmaFileStructureElementData = z49.object({
|
|
1423
|
+
value: z49.object({
|
|
1444
1424
|
structure: FigmaFileStructureNode,
|
|
1445
1425
|
assetsInFile: FigmaFileStructureStatistics
|
|
1446
1426
|
})
|
|
@@ -1457,119 +1437,119 @@ function recursiveFigmaFileStructureToMap(node, map) {
|
|
|
1457
1437
|
}
|
|
1458
1438
|
|
|
1459
1439
|
// src/dsm/elements/data/figma-node-reference.ts
|
|
1460
|
-
import { z as
|
|
1461
|
-
var FigmaNodeReferenceData =
|
|
1462
|
-
structureElementId:
|
|
1463
|
-
nodeId:
|
|
1464
|
-
fileId:
|
|
1465
|
-
valid:
|
|
1440
|
+
import { z as z50 } from "zod";
|
|
1441
|
+
var FigmaNodeReferenceData = z50.object({
|
|
1442
|
+
structureElementId: z50.string(),
|
|
1443
|
+
nodeId: z50.string(),
|
|
1444
|
+
fileId: z50.string().optional(),
|
|
1445
|
+
valid: z50.boolean(),
|
|
1466
1446
|
// Asset data
|
|
1467
|
-
assetId:
|
|
1468
|
-
assetScale:
|
|
1469
|
-
assetWidth:
|
|
1470
|
-
assetHeight:
|
|
1471
|
-
assetUrl:
|
|
1472
|
-
assetOriginKey:
|
|
1473
|
-
});
|
|
1474
|
-
var FigmaNodeReferenceElementData =
|
|
1447
|
+
assetId: z50.string().optional(),
|
|
1448
|
+
assetScale: z50.number().optional(),
|
|
1449
|
+
assetWidth: z50.number().optional(),
|
|
1450
|
+
assetHeight: z50.number().optional(),
|
|
1451
|
+
assetUrl: z50.string().optional(),
|
|
1452
|
+
assetOriginKey: z50.string().optional()
|
|
1453
|
+
});
|
|
1454
|
+
var FigmaNodeReferenceElementData = z50.object({
|
|
1475
1455
|
value: FigmaNodeReferenceData
|
|
1476
1456
|
});
|
|
1477
1457
|
|
|
1478
1458
|
// src/dsm/elements/data/font-family.ts
|
|
1479
|
-
import { z as
|
|
1480
|
-
var FontFamilyValue =
|
|
1459
|
+
import { z as z51 } from "zod";
|
|
1460
|
+
var FontFamilyValue = z51.string();
|
|
1481
1461
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1482
1462
|
|
|
1483
1463
|
// src/dsm/elements/data/font-size.ts
|
|
1484
|
-
import { z as
|
|
1485
|
-
var FontSizeUnit =
|
|
1486
|
-
var FontSizeValue =
|
|
1464
|
+
import { z as z52 } from "zod";
|
|
1465
|
+
var FontSizeUnit = z52.enum(["Pixels", "Rem", "Percent"]);
|
|
1466
|
+
var FontSizeValue = z52.object({
|
|
1487
1467
|
unit: FontSizeUnit,
|
|
1488
|
-
measure:
|
|
1468
|
+
measure: z52.number()
|
|
1489
1469
|
});
|
|
1490
1470
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1491
1471
|
|
|
1492
1472
|
// src/dsm/elements/data/font-weight.ts
|
|
1493
|
-
import { z as
|
|
1494
|
-
var FontWeightValue =
|
|
1473
|
+
import { z as z53 } from "zod";
|
|
1474
|
+
var FontWeightValue = z53.string();
|
|
1495
1475
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1496
1476
|
|
|
1497
1477
|
// src/dsm/elements/data/gradient.ts
|
|
1498
|
-
import { z as
|
|
1499
|
-
var GradientType =
|
|
1500
|
-
var GradientStop =
|
|
1501
|
-
position:
|
|
1478
|
+
import { z as z54 } from "zod";
|
|
1479
|
+
var GradientType = z54.enum(["Linear", "Radial", "Angular"]);
|
|
1480
|
+
var GradientStop = z54.object({
|
|
1481
|
+
position: z54.number(),
|
|
1502
1482
|
color: ColorTokenData
|
|
1503
1483
|
});
|
|
1504
|
-
var GradientLayerValue =
|
|
1484
|
+
var GradientLayerValue = z54.object({
|
|
1505
1485
|
from: Point2D,
|
|
1506
1486
|
to: Point2D,
|
|
1507
1487
|
type: GradientType,
|
|
1508
|
-
aspectRatio: nullishToOptional(
|
|
1488
|
+
aspectRatio: nullishToOptional(z54.number()),
|
|
1509
1489
|
// z.number(),
|
|
1510
|
-
stops:
|
|
1490
|
+
stops: z54.array(GradientStop).min(2)
|
|
1511
1491
|
});
|
|
1512
1492
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1513
|
-
var GradientTokenValue =
|
|
1493
|
+
var GradientTokenValue = z54.array(GradientLayerData);
|
|
1514
1494
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1515
1495
|
|
|
1516
1496
|
// src/dsm/elements/data/group.ts
|
|
1517
|
-
import { z as
|
|
1518
|
-
var DocumentationGroupBehavior =
|
|
1519
|
-
var ElementGroupDataV1 =
|
|
1497
|
+
import { z as z55 } from "zod";
|
|
1498
|
+
var DocumentationGroupBehavior = z55.enum(["Group", "Tabs"]);
|
|
1499
|
+
var ElementGroupDataV1 = z55.object({
|
|
1520
1500
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1521
1501
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1522
1502
|
});
|
|
1523
|
-
var ElementGroupDataV2 =
|
|
1503
|
+
var ElementGroupDataV2 = z55.object({
|
|
1524
1504
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1525
1505
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1526
1506
|
});
|
|
1527
1507
|
|
|
1528
1508
|
// src/dsm/elements/data/letter-spacing.ts
|
|
1529
|
-
import { z as
|
|
1530
|
-
var LetterSpacingUnit =
|
|
1531
|
-
var LetterSpacingValue =
|
|
1509
|
+
import { z as z56 } from "zod";
|
|
1510
|
+
var LetterSpacingUnit = z56.enum(["Pixels", "Rem", "Percent"]);
|
|
1511
|
+
var LetterSpacingValue = z56.object({
|
|
1532
1512
|
unit: LetterSpacingUnit,
|
|
1533
|
-
measure:
|
|
1513
|
+
measure: z56.number()
|
|
1534
1514
|
});
|
|
1535
1515
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1536
1516
|
|
|
1537
1517
|
// src/dsm/elements/data/line-height.ts
|
|
1538
|
-
import { z as
|
|
1539
|
-
var LineHeightUnit =
|
|
1540
|
-
var LineHeightValue =
|
|
1518
|
+
import { z as z57 } from "zod";
|
|
1519
|
+
var LineHeightUnit = z57.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1520
|
+
var LineHeightValue = z57.object({
|
|
1541
1521
|
unit: LineHeightUnit,
|
|
1542
|
-
measure:
|
|
1522
|
+
measure: z57.number()
|
|
1543
1523
|
});
|
|
1544
1524
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1545
1525
|
|
|
1546
1526
|
// src/dsm/elements/data/paragraph-indent.ts
|
|
1547
|
-
import { z as
|
|
1548
|
-
var ParagraphIndentUnit =
|
|
1549
|
-
var ParagraphIndentValue =
|
|
1527
|
+
import { z as z58 } from "zod";
|
|
1528
|
+
var ParagraphIndentUnit = z58.enum(["Pixels", "Rem", "Percent"]);
|
|
1529
|
+
var ParagraphIndentValue = z58.object({
|
|
1550
1530
|
unit: ParagraphIndentUnit,
|
|
1551
|
-
measure:
|
|
1531
|
+
measure: z58.number()
|
|
1552
1532
|
});
|
|
1553
1533
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1554
1534
|
|
|
1555
1535
|
// src/dsm/elements/data/paragraph-spacing.ts
|
|
1556
|
-
import { z as
|
|
1557
|
-
var ParagraphSpacingUnit =
|
|
1558
|
-
var ParagraphSpacingValue =
|
|
1536
|
+
import { z as z59 } from "zod";
|
|
1537
|
+
var ParagraphSpacingUnit = z59.enum(["Pixels", "Rem", "Percent"]);
|
|
1538
|
+
var ParagraphSpacingValue = z59.object({
|
|
1559
1539
|
unit: ParagraphSpacingUnit,
|
|
1560
|
-
measure:
|
|
1540
|
+
measure: z59.number()
|
|
1561
1541
|
});
|
|
1562
1542
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1563
1543
|
|
|
1564
1544
|
// src/dsm/elements/data/product-copy.ts
|
|
1565
|
-
import { z as
|
|
1566
|
-
var ProductCopyValue =
|
|
1545
|
+
import { z as z60 } from "zod";
|
|
1546
|
+
var ProductCopyValue = z60.string();
|
|
1567
1547
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1568
1548
|
|
|
1569
1549
|
// src/dsm/elements/data/safe-id.ts
|
|
1570
|
-
import { z as
|
|
1550
|
+
import { z as z61 } from "zod";
|
|
1571
1551
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
1572
|
-
var SafeIdSchema =
|
|
1552
|
+
var SafeIdSchema = z61.string().refine(
|
|
1573
1553
|
(value) => {
|
|
1574
1554
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1575
1555
|
},
|
|
@@ -1579,58 +1559,58 @@ var SafeIdSchema = z62.string().refine(
|
|
|
1579
1559
|
);
|
|
1580
1560
|
|
|
1581
1561
|
// src/dsm/elements/data/shadow.ts
|
|
1582
|
-
import { z as
|
|
1583
|
-
var ShadowType =
|
|
1584
|
-
var ShadowLayerValue =
|
|
1562
|
+
import { z as z62 } from "zod";
|
|
1563
|
+
var ShadowType = z62.enum(["Drop", "Inner"]);
|
|
1564
|
+
var ShadowLayerValue = z62.object({
|
|
1585
1565
|
color: ColorTokenData,
|
|
1586
|
-
x:
|
|
1587
|
-
y:
|
|
1588
|
-
radius:
|
|
1589
|
-
spread:
|
|
1566
|
+
x: z62.number(),
|
|
1567
|
+
y: z62.number(),
|
|
1568
|
+
radius: z62.number(),
|
|
1569
|
+
spread: z62.number(),
|
|
1590
1570
|
opacity: OpacityTokenData.optional(),
|
|
1591
1571
|
type: ShadowType
|
|
1592
1572
|
});
|
|
1593
1573
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1594
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
1574
|
+
var ShadowTokenData = tokenAliasOrValue(z62.array(ShadowTokenDataBase));
|
|
1595
1575
|
|
|
1596
1576
|
// src/dsm/elements/data/size.ts
|
|
1597
|
-
import { z as
|
|
1598
|
-
var SizeUnit =
|
|
1599
|
-
var SizeValue =
|
|
1577
|
+
import { z as z63 } from "zod";
|
|
1578
|
+
var SizeUnit = z63.enum(["Pixels", "Rem", "Percent"]);
|
|
1579
|
+
var SizeValue = z63.object({
|
|
1600
1580
|
unit: SizeUnit,
|
|
1601
|
-
measure:
|
|
1581
|
+
measure: z63.number()
|
|
1602
1582
|
});
|
|
1603
1583
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1604
1584
|
|
|
1605
1585
|
// src/dsm/elements/data/space.ts
|
|
1606
|
-
import { z as
|
|
1607
|
-
var SpaceUnit =
|
|
1608
|
-
var SpaceValue =
|
|
1586
|
+
import { z as z64 } from "zod";
|
|
1587
|
+
var SpaceUnit = z64.enum(["Pixels", "Rem", "Percent"]);
|
|
1588
|
+
var SpaceValue = z64.object({
|
|
1609
1589
|
unit: SpaceUnit,
|
|
1610
|
-
measure:
|
|
1590
|
+
measure: z64.number()
|
|
1611
1591
|
});
|
|
1612
1592
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1613
1593
|
|
|
1614
1594
|
// src/dsm/elements/data/string.ts
|
|
1615
|
-
import { z as
|
|
1616
|
-
var StringValue =
|
|
1595
|
+
import { z as z65 } from "zod";
|
|
1596
|
+
var StringValue = z65.string();
|
|
1617
1597
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1618
1598
|
|
|
1619
1599
|
// src/dsm/elements/data/text-case.ts
|
|
1620
|
-
import { z as
|
|
1621
|
-
var TextCase =
|
|
1600
|
+
import { z as z66 } from "zod";
|
|
1601
|
+
var TextCase = z66.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1622
1602
|
var TextCaseValue = TextCase;
|
|
1623
1603
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1624
1604
|
|
|
1625
1605
|
// src/dsm/elements/data/text-decoration.ts
|
|
1626
|
-
import { z as
|
|
1627
|
-
var TextDecoration =
|
|
1606
|
+
import { z as z67 } from "zod";
|
|
1607
|
+
var TextDecoration = z67.enum(["None", "Underline", "Strikethrough"]);
|
|
1628
1608
|
var TextDecorationValue = TextDecoration;
|
|
1629
1609
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1630
1610
|
|
|
1631
1611
|
// src/dsm/elements/data/typography.ts
|
|
1632
|
-
import { z as
|
|
1633
|
-
var TypographyValue =
|
|
1612
|
+
import { z as z68 } from "zod";
|
|
1613
|
+
var TypographyValue = z68.object({
|
|
1634
1614
|
fontSize: FontSizeTokenData,
|
|
1635
1615
|
fontFamily: FontFamilyTokenData,
|
|
1636
1616
|
fontWeight: FontWeightTokenData,
|
|
@@ -1644,20 +1624,42 @@ var TypographyValue = z69.object({
|
|
|
1644
1624
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1645
1625
|
|
|
1646
1626
|
// src/dsm/elements/data/visibility.ts
|
|
1647
|
-
import { z as
|
|
1648
|
-
var Visibility =
|
|
1627
|
+
import { z as z69 } from "zod";
|
|
1628
|
+
var Visibility = z69.enum(["Hidden", "Visible"]);
|
|
1649
1629
|
var VisibilityValue = Visibility;
|
|
1650
1630
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1651
1631
|
|
|
1652
1632
|
// src/dsm/elements/data/z-index.ts
|
|
1653
|
-
import { z as
|
|
1654
|
-
var ZIndexUnit =
|
|
1655
|
-
var ZIndexValue =
|
|
1633
|
+
import { z as z70 } from "zod";
|
|
1634
|
+
var ZIndexUnit = z70.enum(["Raw"]);
|
|
1635
|
+
var ZIndexValue = z70.object({
|
|
1656
1636
|
unit: ZIndexUnit,
|
|
1657
|
-
measure:
|
|
1637
|
+
measure: z70.number()
|
|
1658
1638
|
});
|
|
1659
1639
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1660
1640
|
|
|
1641
|
+
// src/dsm/elements/component.ts
|
|
1642
|
+
import { z as z71 } from "zod";
|
|
1643
|
+
var ComponentOriginPart = z71.object({
|
|
1644
|
+
nodeId: z71.string().optional(),
|
|
1645
|
+
width: z71.number().optional(),
|
|
1646
|
+
height: z71.number().optional()
|
|
1647
|
+
});
|
|
1648
|
+
var ComponentAsset = z71.object({
|
|
1649
|
+
assetId: z71.string(),
|
|
1650
|
+
assetPath: z71.string()
|
|
1651
|
+
});
|
|
1652
|
+
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1653
|
+
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1654
|
+
origin: ComponentOrigin.optional(),
|
|
1655
|
+
thumbnail: ComponentAsset,
|
|
1656
|
+
svg: ComponentAsset.optional(),
|
|
1657
|
+
isAsset: z71.boolean()
|
|
1658
|
+
});
|
|
1659
|
+
function isImportedComponent(component) {
|
|
1660
|
+
return !!component.origin;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1661
1663
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1662
1664
|
import { z as z73 } from "zod";
|
|
1663
1665
|
|