@supernova-studio/model 0.47.46 → 0.47.48
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 +2453 -1496
- package/dist/index.d.ts +2453 -1496
- package/dist/index.js +382 -376
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1223 -1217
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/data-sources/data-source.ts +3 -1
- package/src/dsm/elements/tokens.ts +22 -20
- package/src/dsm/import/tokens.ts +2 -2
- package/src/dsm/import/warning.ts +3 -0
- package/src/dsm/properties/property-value.ts +1 -0
- package/src/utils/common.ts +3 -0
package/dist/index.mjs
CHANGED
|
@@ -454,15 +454,148 @@ function isImportedAsset(asset) {
|
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
// src/dsm/data-sources/data-source.ts
|
|
457
|
-
import { z as
|
|
457
|
+
import { z as z91 } from "zod";
|
|
458
458
|
|
|
459
|
-
// src/dsm/
|
|
460
|
-
import { z as
|
|
459
|
+
// src/dsm/import/support/figma-files.ts
|
|
460
|
+
import { z as z22 } from "zod";
|
|
461
|
+
var FigmaFileDownloadScope = z22.object({
|
|
462
|
+
styles: z22.boolean(),
|
|
463
|
+
components: z22.boolean(),
|
|
464
|
+
currentVersion: z22.literal("__latest__").nullable(),
|
|
465
|
+
publishedVersion: z22.string().nullable(),
|
|
466
|
+
downloadChunkSize: z22.number().optional(),
|
|
467
|
+
maxFileDepth: z22.number().optional()
|
|
468
|
+
});
|
|
469
|
+
var FigmaFileAccessData = z22.object({
|
|
470
|
+
accessToken: z22.string()
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
// src/dsm/import/support/import-context.ts
|
|
474
|
+
import { z as z24 } from "zod";
|
|
475
|
+
|
|
476
|
+
// src/dsm/import/warning.ts
|
|
477
|
+
import { z as z23 } from "zod";
|
|
478
|
+
var ImportWarningType = z23.enum([
|
|
479
|
+
"NoVersionFound",
|
|
480
|
+
"UnsupportedFill",
|
|
481
|
+
"UnsupportedStroke",
|
|
482
|
+
"UnsupportedEffect",
|
|
483
|
+
"NoPublishedElements",
|
|
484
|
+
"NoPublishedStyles",
|
|
485
|
+
"NoPublishedComponents",
|
|
486
|
+
"NoPublishedAssets",
|
|
487
|
+
"StyleNotApplied",
|
|
488
|
+
"ComponentHasNoThumbnail",
|
|
489
|
+
"DuplicateImportedStyleId",
|
|
490
|
+
"DuplicateImportedStylePath",
|
|
491
|
+
"NoUnpublishedStyles",
|
|
492
|
+
"ReferenceResolutionFailed"
|
|
493
|
+
]);
|
|
494
|
+
var ImportWarning = z23.object({
|
|
495
|
+
warningType: ImportWarningType,
|
|
496
|
+
componentId: z23.string().optional(),
|
|
497
|
+
componentName: z23.string().optional(),
|
|
498
|
+
styleId: z23.string().optional(),
|
|
499
|
+
styleName: z23.string().optional(),
|
|
500
|
+
unsupportedStyleValueType: z23.string().optional(),
|
|
501
|
+
referenceId: z23.string().optional()
|
|
502
|
+
});
|
|
503
|
+
|
|
504
|
+
// src/dsm/import/support/import-context.ts
|
|
505
|
+
var ImportFunctionInput = z24.object({
|
|
506
|
+
importJobId: z24.string(),
|
|
507
|
+
importContextId: z24.string(),
|
|
508
|
+
designSystemId: z24.string().optional()
|
|
509
|
+
});
|
|
510
|
+
var ImportedFigmaSourceData = z24.object({
|
|
511
|
+
sourceId: z24.string(),
|
|
512
|
+
figmaRemote: DataSourceFigmaRemote
|
|
513
|
+
});
|
|
514
|
+
var FigmaImportBaseContext = z24.object({
|
|
515
|
+
designSystemId: z24.string(),
|
|
516
|
+
/**
|
|
517
|
+
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
518
|
+
* mentioned in the `importedSourceDataBySourceId`
|
|
519
|
+
*
|
|
520
|
+
* fileId: file data
|
|
521
|
+
*/
|
|
522
|
+
fileAccessByFileId: z24.record(FigmaFileAccessData),
|
|
523
|
+
/**
|
|
524
|
+
* Figma source data for which import was requested
|
|
525
|
+
*
|
|
526
|
+
* sourceId: source data
|
|
527
|
+
*/
|
|
528
|
+
importedSourceDataBySourceId: z24.record(ImportedFigmaSourceData),
|
|
529
|
+
/**
|
|
530
|
+
* Array of warnings that will be written into the import result summary at the end
|
|
531
|
+
* of import job execution and displayed by the client.
|
|
532
|
+
*/
|
|
533
|
+
importWarnings: z24.record(ImportWarning.array()).default({})
|
|
534
|
+
});
|
|
535
|
+
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
536
|
+
sourcesWithMissingAccess: z24.array(z24.string()).default([]),
|
|
537
|
+
shadowOpacityOptional: z24.boolean().default(false)
|
|
538
|
+
});
|
|
539
|
+
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
540
|
+
importMetadata: DataSourceFigmaImportMetadata
|
|
541
|
+
});
|
|
542
|
+
var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.extend({
|
|
543
|
+
/**
|
|
544
|
+
* Describes what to download from each file, this should contain all file id mentioned in
|
|
545
|
+
* importMetadataBySourceId.
|
|
546
|
+
*
|
|
547
|
+
* File id -> file download scope
|
|
548
|
+
*/
|
|
549
|
+
fileDownloadScopesByFileId: z24.record(FigmaFileDownloadScope),
|
|
550
|
+
/**
|
|
551
|
+
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
552
|
+
* imported again.
|
|
553
|
+
*
|
|
554
|
+
* Source id -> import metadata
|
|
555
|
+
*/
|
|
556
|
+
changedImportedSourceDataBySourceId: z24.record(ChangedImportedFigmaSourceData)
|
|
557
|
+
});
|
|
558
|
+
|
|
559
|
+
// src/dsm/import/support/import-model-collections.ts
|
|
560
|
+
import { z as z89 } from "zod";
|
|
561
|
+
|
|
562
|
+
// src/dsm/import/image.ts
|
|
563
|
+
import { z as z25 } from "zod";
|
|
564
|
+
var ImageImportModelType = z25.enum(["Url", "FigmaRender"]);
|
|
565
|
+
var ImageImportModelBase = z25.object({
|
|
566
|
+
scope: AssetScope
|
|
567
|
+
});
|
|
568
|
+
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
569
|
+
type: z25.literal(ImageImportModelType.enum.Url),
|
|
570
|
+
url: z25.string(),
|
|
571
|
+
originKey: z25.string(),
|
|
572
|
+
extension: z25.string()
|
|
573
|
+
});
|
|
574
|
+
var FigmaRenderFormat = z25.enum(["Svg", "Png"]);
|
|
575
|
+
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
576
|
+
type: z25.literal(ImageImportModelType.enum.FigmaRender),
|
|
577
|
+
fileId: z25.string(),
|
|
578
|
+
fileVersionId: z25.string().optional(),
|
|
579
|
+
nodeId: z25.string(),
|
|
580
|
+
originKey: z25.string()
|
|
581
|
+
});
|
|
582
|
+
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
583
|
+
format: z25.literal(FigmaRenderFormat.enum.Png),
|
|
584
|
+
scale: z25.number()
|
|
585
|
+
});
|
|
586
|
+
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
587
|
+
format: z25.literal(FigmaRenderFormat.enum.Svg)
|
|
588
|
+
});
|
|
589
|
+
var FigmaRenderImportModel = z25.discriminatedUnion("format", [
|
|
590
|
+
FigmaPngRenderImportModel,
|
|
591
|
+
FigmaSvgRenderImportModel
|
|
592
|
+
]);
|
|
593
|
+
var ImageImportModel = z25.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
461
594
|
|
|
462
595
|
// src/dsm/elements/data/base.ts
|
|
463
|
-
import { z as
|
|
464
|
-
var TokenDataAliasSchema =
|
|
465
|
-
aliasTo:
|
|
596
|
+
import { z as z26 } from "zod";
|
|
597
|
+
var TokenDataAliasSchema = z26.object({
|
|
598
|
+
aliasTo: z26.string().optional().nullable().transform((v) => v ?? void 0)
|
|
466
599
|
});
|
|
467
600
|
function tokenAliasOrValue(value) {
|
|
468
601
|
return TokenDataAliasSchema.extend({
|
|
@@ -471,68 +604,68 @@ function tokenAliasOrValue(value) {
|
|
|
471
604
|
}
|
|
472
605
|
|
|
473
606
|
// src/dsm/elements/data/blur.ts
|
|
474
|
-
import { z as
|
|
607
|
+
import { z as z28 } from "zod";
|
|
475
608
|
|
|
476
609
|
// src/dsm/elements/data/dimension.ts
|
|
477
|
-
import { z as
|
|
478
|
-
var DimensionUnit =
|
|
479
|
-
var DimensionValue =
|
|
610
|
+
import { z as z27 } from "zod";
|
|
611
|
+
var DimensionUnit = z27.enum(["Pixels", "Percent", "Rem", "Ms", "Raw", "Points"]);
|
|
612
|
+
var DimensionValue = z27.object({
|
|
480
613
|
unit: DimensionUnit,
|
|
481
|
-
measure:
|
|
614
|
+
measure: z27.number()
|
|
482
615
|
});
|
|
483
616
|
var DimensionTokenData = tokenAliasOrValue(DimensionValue);
|
|
484
617
|
|
|
485
618
|
// src/dsm/elements/data/blur.ts
|
|
486
|
-
var BlurType =
|
|
487
|
-
var BlurValue =
|
|
619
|
+
var BlurType = z28.enum(["Layer", "Background"]);
|
|
620
|
+
var BlurValue = z28.object({
|
|
488
621
|
type: BlurType,
|
|
489
622
|
radius: DimensionTokenData
|
|
490
623
|
});
|
|
491
624
|
var BlurTokenData = tokenAliasOrValue(BlurValue);
|
|
492
625
|
|
|
493
626
|
// src/dsm/elements/data/border-radius.ts
|
|
494
|
-
import { z as
|
|
495
|
-
var BorderRadiusUnit =
|
|
496
|
-
var BorderRadiusValue =
|
|
627
|
+
import { z as z29 } from "zod";
|
|
628
|
+
var BorderRadiusUnit = z29.enum(["Pixels", "Rem", "Percent"]);
|
|
629
|
+
var BorderRadiusValue = z29.object({
|
|
497
630
|
unit: BorderRadiusUnit,
|
|
498
|
-
measure:
|
|
631
|
+
measure: z29.number()
|
|
499
632
|
});
|
|
500
633
|
var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
|
|
501
634
|
|
|
502
635
|
// src/dsm/elements/data/border-width.ts
|
|
503
|
-
import { z as
|
|
504
|
-
var BorderWidthUnit =
|
|
505
|
-
var BorderWidthValue =
|
|
636
|
+
import { z as z30 } from "zod";
|
|
637
|
+
var BorderWidthUnit = z30.enum(["Pixels"]);
|
|
638
|
+
var BorderWidthValue = z30.object({
|
|
506
639
|
unit: BorderWidthUnit,
|
|
507
|
-
measure:
|
|
640
|
+
measure: z30.number()
|
|
508
641
|
});
|
|
509
642
|
var BorderWidthTokenData = tokenAliasOrValue(BorderWidthValue);
|
|
510
643
|
|
|
511
644
|
// src/dsm/elements/data/border.ts
|
|
512
|
-
import { z as
|
|
645
|
+
import { z as z33 } from "zod";
|
|
513
646
|
|
|
514
647
|
// src/dsm/elements/data/color.ts
|
|
515
|
-
import { z as
|
|
648
|
+
import { z as z32 } from "zod";
|
|
516
649
|
|
|
517
650
|
// src/dsm/elements/data/opacity.ts
|
|
518
|
-
import { z as
|
|
519
|
-
var OpacityValue =
|
|
520
|
-
unit:
|
|
521
|
-
measure:
|
|
651
|
+
import { z as z31 } from "zod";
|
|
652
|
+
var OpacityValue = z31.object({
|
|
653
|
+
unit: z31.enum(["Raw", "Pixels"]),
|
|
654
|
+
measure: z31.number()
|
|
522
655
|
});
|
|
523
656
|
var OpacityTokenData = tokenAliasOrValue(OpacityValue);
|
|
524
657
|
|
|
525
658
|
// src/dsm/elements/data/color.ts
|
|
526
|
-
var ColorValue =
|
|
659
|
+
var ColorValue = z32.object({
|
|
527
660
|
opacity: OpacityTokenData,
|
|
528
|
-
color:
|
|
661
|
+
color: z32.string().or(TokenDataAliasSchema)
|
|
529
662
|
});
|
|
530
663
|
var ColorTokenData = tokenAliasOrValue(ColorValue);
|
|
531
664
|
|
|
532
665
|
// src/dsm/elements/data/border.ts
|
|
533
|
-
var BorderPosition =
|
|
534
|
-
var BorderStyle =
|
|
535
|
-
var BorderValue =
|
|
666
|
+
var BorderPosition = z33.enum(["Inside", "Center", "Outside"]);
|
|
667
|
+
var BorderStyle = z33.enum(["Dashed", "Dotted", "Solid", "Groove"]);
|
|
668
|
+
var BorderValue = z33.object({
|
|
536
669
|
color: ColorTokenData,
|
|
537
670
|
width: BorderWidthTokenData,
|
|
538
671
|
position: BorderPosition,
|
|
@@ -541,30 +674,30 @@ var BorderValue = z29.object({
|
|
|
541
674
|
var BorderTokenData = tokenAliasOrValue(BorderValue);
|
|
542
675
|
|
|
543
676
|
// src/dsm/elements/data/component.ts
|
|
544
|
-
import { z as
|
|
545
|
-
var ComponentElementData =
|
|
546
|
-
value:
|
|
547
|
-
thumbnailImage:
|
|
548
|
-
value:
|
|
549
|
-
url:
|
|
550
|
-
assetId:
|
|
677
|
+
import { z as z34 } from "zod";
|
|
678
|
+
var ComponentElementData = z34.object({
|
|
679
|
+
value: z34.object({
|
|
680
|
+
thumbnailImage: z34.object({
|
|
681
|
+
value: z34.object({
|
|
682
|
+
url: z34.string(),
|
|
683
|
+
assetId: z34.string()
|
|
551
684
|
})
|
|
552
685
|
}),
|
|
553
|
-
svg:
|
|
554
|
-
value:
|
|
555
|
-
url:
|
|
556
|
-
assetId:
|
|
686
|
+
svg: z34.object({
|
|
687
|
+
value: z34.object({
|
|
688
|
+
url: z34.string(),
|
|
689
|
+
assetId: z34.string()
|
|
557
690
|
})
|
|
558
691
|
}).optional()
|
|
559
692
|
})
|
|
560
693
|
});
|
|
561
694
|
|
|
562
695
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
563
|
-
import { z as
|
|
696
|
+
import { z as z40 } from "zod";
|
|
564
697
|
|
|
565
698
|
// src/dsm/elements/raw-element.ts
|
|
566
|
-
import { z as
|
|
567
|
-
var DesignTokenType =
|
|
699
|
+
import { z as z35 } from "zod";
|
|
700
|
+
var DesignTokenType = z35.enum([
|
|
568
701
|
"Color",
|
|
569
702
|
"Border",
|
|
570
703
|
"Gradient",
|
|
@@ -596,7 +729,7 @@ var DesignTokenType = z31.enum([
|
|
|
596
729
|
]);
|
|
597
730
|
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
598
731
|
var DesignElementType = DesignTokenType.or(
|
|
599
|
-
|
|
732
|
+
z35.enum([
|
|
600
733
|
"Component",
|
|
601
734
|
"Theme",
|
|
602
735
|
"Documentation",
|
|
@@ -611,7 +744,7 @@ var DesignElementType = DesignTokenType.or(
|
|
|
611
744
|
function isTokenType(type) {
|
|
612
745
|
return DesignTokenType.safeParse(type).success;
|
|
613
746
|
}
|
|
614
|
-
var DesignElementCategory =
|
|
747
|
+
var DesignElementCategory = z35.enum([
|
|
615
748
|
"Token",
|
|
616
749
|
"Component",
|
|
617
750
|
"DesignSystemComponent",
|
|
@@ -619,94 +752,94 @@ var DesignElementCategory = z31.enum([
|
|
|
619
752
|
"Theme",
|
|
620
753
|
"PageBlock"
|
|
621
754
|
]);
|
|
622
|
-
var DesignSystemElementExportProps =
|
|
623
|
-
isAsset:
|
|
624
|
-
codeName:
|
|
625
|
-
});
|
|
626
|
-
var ShallowDesignElement =
|
|
627
|
-
id:
|
|
628
|
-
persistentId:
|
|
629
|
-
designSystemVersionId:
|
|
755
|
+
var DesignSystemElementExportProps = z35.object({
|
|
756
|
+
isAsset: z35.boolean().nullish().transform((v) => v ?? false),
|
|
757
|
+
codeName: z35.string().nullish()
|
|
758
|
+
});
|
|
759
|
+
var ShallowDesignElement = z35.object({
|
|
760
|
+
id: z35.string(),
|
|
761
|
+
persistentId: z35.string(),
|
|
762
|
+
designSystemVersionId: z35.string(),
|
|
630
763
|
type: DesignElementType,
|
|
631
|
-
brandPersistentId:
|
|
632
|
-
parentPersistentId:
|
|
633
|
-
shortPersistentId:
|
|
764
|
+
brandPersistentId: z35.string().optional(),
|
|
765
|
+
parentPersistentId: z35.string().optional(),
|
|
766
|
+
shortPersistentId: z35.string().optional(),
|
|
634
767
|
childType: DesignElementType.optional(),
|
|
635
|
-
sortOrder:
|
|
636
|
-
origin:
|
|
768
|
+
sortOrder: z35.number(),
|
|
769
|
+
origin: z35.record(z35.any()).optional()
|
|
637
770
|
});
|
|
638
771
|
var DesignElement = ShallowDesignElement.extend({
|
|
639
772
|
meta: ObjectMeta,
|
|
640
|
-
slug:
|
|
641
|
-
userSlug:
|
|
642
|
-
createdAt:
|
|
643
|
-
updatedAt:
|
|
773
|
+
slug: z35.string().optional(),
|
|
774
|
+
userSlug: z35.string().optional(),
|
|
775
|
+
createdAt: z35.coerce.date(),
|
|
776
|
+
updatedAt: z35.coerce.date(),
|
|
644
777
|
exportProperties: DesignSystemElementExportProps.optional(),
|
|
645
|
-
data:
|
|
646
|
-
origin:
|
|
778
|
+
data: z35.record(z35.any()),
|
|
779
|
+
origin: z35.record(z35.any()).optional()
|
|
647
780
|
});
|
|
648
781
|
var HierarchicalElements = DesignTokenType.or(
|
|
649
|
-
|
|
782
|
+
z35.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
650
783
|
);
|
|
651
784
|
|
|
652
785
|
// src/dsm/properties/property-definition.ts
|
|
653
|
-
import { z as
|
|
654
|
-
var ElementPropertyTypeSchema =
|
|
655
|
-
var ElementPropertyTargetType =
|
|
656
|
-
var ElementPropertyLinkType =
|
|
786
|
+
import { z as z36 } from "zod";
|
|
787
|
+
var ElementPropertyTypeSchema = z36.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
788
|
+
var ElementPropertyTargetType = z36.enum(["Token", "Component", "DocumentationPage"]);
|
|
789
|
+
var ElementPropertyLinkType = z36.enum(["FigmaComponent", "DocumentationPage"]);
|
|
657
790
|
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
658
|
-
var ColorTokenInlineData =
|
|
659
|
-
value:
|
|
791
|
+
var ColorTokenInlineData = z36.object({
|
|
792
|
+
value: z36.string()
|
|
660
793
|
});
|
|
661
|
-
var ElementPropertyDefinitionOption =
|
|
662
|
-
id:
|
|
663
|
-
name:
|
|
794
|
+
var ElementPropertyDefinitionOption = z36.object({
|
|
795
|
+
id: z36.string(),
|
|
796
|
+
name: z36.string(),
|
|
664
797
|
backgroundColor: ColorTokenInlineData.optional()
|
|
665
798
|
});
|
|
666
|
-
var ElementPropertyDefinition =
|
|
667
|
-
id:
|
|
668
|
-
designSystemVersionId:
|
|
669
|
-
persistentId:
|
|
670
|
-
name:
|
|
671
|
-
codeName:
|
|
672
|
-
description:
|
|
799
|
+
var ElementPropertyDefinition = z36.object({
|
|
800
|
+
id: z36.string(),
|
|
801
|
+
designSystemVersionId: z36.string(),
|
|
802
|
+
persistentId: z36.string(),
|
|
803
|
+
name: z36.string(),
|
|
804
|
+
codeName: z36.string().regex(CODE_NAME_REGEX),
|
|
805
|
+
description: z36.string(),
|
|
673
806
|
type: ElementPropertyTypeSchema,
|
|
674
807
|
targetElementType: ElementPropertyTargetType,
|
|
675
|
-
options:
|
|
808
|
+
options: z36.array(ElementPropertyDefinitionOption).optional(),
|
|
676
809
|
linkElementType: ElementPropertyLinkType.optional()
|
|
677
810
|
});
|
|
678
811
|
var ElementPropertyType = ElementPropertyTypeSchema.enum;
|
|
679
812
|
|
|
680
813
|
// src/dsm/properties/property-value.ts
|
|
681
|
-
import { z as
|
|
682
|
-
var ElementPropertyValue =
|
|
683
|
-
id:
|
|
684
|
-
designSystemVersionId:
|
|
685
|
-
targetElementPersistentId:
|
|
686
|
-
definitionPersistentId:
|
|
687
|
-
stringValue:
|
|
688
|
-
numberValue:
|
|
689
|
-
booleanValue:
|
|
690
|
-
referenceValue:
|
|
691
|
-
referenceValuePreview:
|
|
814
|
+
import { z as z37 } from "zod";
|
|
815
|
+
var ElementPropertyValue = z37.object({
|
|
816
|
+
id: z37.string(),
|
|
817
|
+
designSystemVersionId: z37.string(),
|
|
818
|
+
targetElementPersistentId: z37.string(),
|
|
819
|
+
definitionPersistentId: z37.string(),
|
|
820
|
+
stringValue: z37.string().nullish(),
|
|
821
|
+
numberValue: z37.number().nullish(),
|
|
822
|
+
booleanValue: z37.boolean().nullish(),
|
|
823
|
+
referenceValue: z37.string().nullish(),
|
|
824
|
+
referenceValuePreview: z37.string().optional()
|
|
692
825
|
});
|
|
693
826
|
|
|
694
827
|
// src/dsm/elements/primitives/point.ts
|
|
695
|
-
import { z as
|
|
696
|
-
var Point2D =
|
|
697
|
-
x:
|
|
698
|
-
y:
|
|
828
|
+
import { z as z38 } from "zod";
|
|
829
|
+
var Point2D = z38.object({
|
|
830
|
+
x: z38.number(),
|
|
831
|
+
y: z38.number()
|
|
699
832
|
});
|
|
700
833
|
|
|
701
834
|
// src/dsm/elements/primitives/size.ts
|
|
702
|
-
import { z as
|
|
835
|
+
import { z as z39 } from "zod";
|
|
703
836
|
var nullSize = { height: -1, width: -1 };
|
|
704
837
|
function isNullSize(size) {
|
|
705
838
|
return size.height === nullSize.height && size.width === nullSize.width;
|
|
706
839
|
}
|
|
707
|
-
var Size =
|
|
708
|
-
width:
|
|
709
|
-
height:
|
|
840
|
+
var Size = z39.object({
|
|
841
|
+
width: z39.number().nullish().transform((v) => v ?? nullSize.width),
|
|
842
|
+
height: z39.number().nullish().transform((v) => v ?? nullSize.height)
|
|
710
843
|
});
|
|
711
844
|
var SizeOrUndefined = Size.optional().transform((v) => {
|
|
712
845
|
if (!v)
|
|
@@ -717,8 +850,8 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
717
850
|
});
|
|
718
851
|
|
|
719
852
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
720
|
-
var PageBlockCalloutType =
|
|
721
|
-
var PageBlockTypeV1 =
|
|
853
|
+
var PageBlockCalloutType = z40.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
854
|
+
var PageBlockTypeV1 = z40.enum([
|
|
722
855
|
"Text",
|
|
723
856
|
"Heading",
|
|
724
857
|
"Code",
|
|
@@ -751,7 +884,7 @@ var PageBlockTypeV1 = z36.enum([
|
|
|
751
884
|
"TableRow",
|
|
752
885
|
"TableCell"
|
|
753
886
|
]);
|
|
754
|
-
var PageBlockCodeLanguage =
|
|
887
|
+
var PageBlockCodeLanguage = z40.enum([
|
|
755
888
|
"Angular",
|
|
756
889
|
"Bash",
|
|
757
890
|
"C",
|
|
@@ -785,70 +918,70 @@ var PageBlockCodeLanguage = z36.enum([
|
|
|
785
918
|
"XML",
|
|
786
919
|
"YAML"
|
|
787
920
|
]);
|
|
788
|
-
var PageBlockAlignment =
|
|
789
|
-
var PageBlockThemeType =
|
|
790
|
-
var PageBlockAssetType =
|
|
791
|
-
var PageBlockTilesAlignment =
|
|
792
|
-
var PageBlockTilesLayout =
|
|
793
|
-
var PageBlockTheme =
|
|
794
|
-
themeIds:
|
|
921
|
+
var PageBlockAlignment = z40.enum(["Left", "Center", "Stretch", "Right"]);
|
|
922
|
+
var PageBlockThemeType = z40.enum(["Override", "Comparison"]);
|
|
923
|
+
var PageBlockAssetType = z40.enum(["image", "figmaFrame"]);
|
|
924
|
+
var PageBlockTilesAlignment = z40.enum(["Center", "FrameHeight"]);
|
|
925
|
+
var PageBlockTilesLayout = z40.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
926
|
+
var PageBlockTheme = z40.object({
|
|
927
|
+
themeIds: z40.array(z40.string()),
|
|
795
928
|
type: PageBlockThemeType
|
|
796
929
|
});
|
|
797
|
-
var PageBlockUrlPreview =
|
|
798
|
-
title: nullishToOptional(
|
|
799
|
-
description: nullishToOptional(
|
|
800
|
-
thumbnailUrl: nullishToOptional(
|
|
801
|
-
});
|
|
802
|
-
var PageBlockFrameOrigin =
|
|
803
|
-
sourceFileName: nullishToOptional(
|
|
804
|
-
title: nullishToOptional(
|
|
805
|
-
previewUrl: nullishToOptional(
|
|
806
|
-
valid: nullishToOptional(
|
|
807
|
-
referenceId: nullishToOptional(
|
|
808
|
-
assetId: nullishToOptional(
|
|
809
|
-
assetScale: nullishToOptional(
|
|
810
|
-
width: nullishToOptional(
|
|
811
|
-
height: nullishToOptional(
|
|
812
|
-
});
|
|
813
|
-
var PageBlockFrame =
|
|
814
|
-
persistentId:
|
|
815
|
-
sourceId:
|
|
816
|
-
sourceFrameId:
|
|
817
|
-
title: nullishToOptional(
|
|
818
|
-
description: nullishToOptional(
|
|
930
|
+
var PageBlockUrlPreview = z40.object({
|
|
931
|
+
title: nullishToOptional(z40.string()),
|
|
932
|
+
description: nullishToOptional(z40.string()),
|
|
933
|
+
thumbnailUrl: nullishToOptional(z40.string())
|
|
934
|
+
});
|
|
935
|
+
var PageBlockFrameOrigin = z40.object({
|
|
936
|
+
sourceFileName: nullishToOptional(z40.string()),
|
|
937
|
+
title: nullishToOptional(z40.string()),
|
|
938
|
+
previewUrl: nullishToOptional(z40.string()),
|
|
939
|
+
valid: nullishToOptional(z40.boolean()),
|
|
940
|
+
referenceId: nullishToOptional(z40.string()),
|
|
941
|
+
assetId: nullishToOptional(z40.string()),
|
|
942
|
+
assetScale: nullishToOptional(z40.number()),
|
|
943
|
+
width: nullishToOptional(z40.number()),
|
|
944
|
+
height: nullishToOptional(z40.number())
|
|
945
|
+
});
|
|
946
|
+
var PageBlockFrame = z40.object({
|
|
947
|
+
persistentId: z40.string(),
|
|
948
|
+
sourceId: z40.string(),
|
|
949
|
+
sourceFrameId: z40.string(),
|
|
950
|
+
title: nullishToOptional(z40.string()),
|
|
951
|
+
description: nullishToOptional(z40.string()),
|
|
819
952
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
820
953
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
821
954
|
});
|
|
822
|
-
var PageBlockAsset =
|
|
955
|
+
var PageBlockAsset = z40.object({
|
|
823
956
|
type: PageBlockAssetType,
|
|
824
|
-
id: nullishToOptional(
|
|
825
|
-
url: nullishToOptional(
|
|
957
|
+
id: nullishToOptional(z40.string()),
|
|
958
|
+
url: nullishToOptional(z40.string()),
|
|
826
959
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
827
960
|
});
|
|
828
|
-
var PageBlockLinkPreview =
|
|
829
|
-
title: nullishToOptional(
|
|
830
|
-
valid: nullishToOptional(
|
|
961
|
+
var PageBlockLinkPreview = z40.object({
|
|
962
|
+
title: nullishToOptional(z40.string()),
|
|
963
|
+
valid: nullishToOptional(z40.boolean())
|
|
831
964
|
});
|
|
832
|
-
var PageBlockShortcut =
|
|
833
|
-
persistentId:
|
|
834
|
-
title: nullishToOptional(
|
|
835
|
-
description: nullishToOptional(
|
|
965
|
+
var PageBlockShortcut = z40.object({
|
|
966
|
+
persistentId: z40.string(),
|
|
967
|
+
title: nullishToOptional(z40.string()),
|
|
968
|
+
description: nullishToOptional(z40.string()),
|
|
836
969
|
asset: nullishToOptional(PageBlockAsset),
|
|
837
|
-
documentationItemId: nullishToOptional(
|
|
838
|
-
pageHeadingId: nullishToOptional(
|
|
839
|
-
url: nullishToOptional(
|
|
840
|
-
openInNewTab: nullishToOptional(
|
|
970
|
+
documentationItemId: nullishToOptional(z40.string()),
|
|
971
|
+
pageHeadingId: nullishToOptional(z40.string()),
|
|
972
|
+
url: nullishToOptional(z40.string()),
|
|
973
|
+
openInNewTab: nullishToOptional(z40.boolean()),
|
|
841
974
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
842
975
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
843
976
|
});
|
|
844
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
977
|
+
var PageBlockCustomBlockPropertyImageValue = z40.object({
|
|
845
978
|
asset: nullishToOptional(PageBlockAsset),
|
|
846
|
-
assetId: nullishToOptional(
|
|
847
|
-
assetUrl: nullishToOptional(
|
|
979
|
+
assetId: nullishToOptional(z40.string()),
|
|
980
|
+
assetUrl: nullishToOptional(z40.string())
|
|
848
981
|
});
|
|
849
|
-
var PageBlockCustomBlockPropertyValue =
|
|
850
|
-
key:
|
|
851
|
-
value:
|
|
982
|
+
var PageBlockCustomBlockPropertyValue = z40.object({
|
|
983
|
+
key: z40.string(),
|
|
984
|
+
value: z40.any()
|
|
852
985
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
853
986
|
// e.g. element id 67451 in the dev db
|
|
854
987
|
// value: z
|
|
@@ -859,102 +992,102 @@ var PageBlockCustomBlockPropertyValue = z36.object({
|
|
|
859
992
|
// .or(TypographyTokenData)
|
|
860
993
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
861
994
|
});
|
|
862
|
-
var PageBlockFigmaFrameProperties =
|
|
995
|
+
var PageBlockFigmaFrameProperties = z40.object({
|
|
863
996
|
color: nullishToOptional(
|
|
864
|
-
|
|
865
|
-
value:
|
|
997
|
+
z40.object({
|
|
998
|
+
value: z40.string()
|
|
866
999
|
})
|
|
867
1000
|
),
|
|
868
1001
|
alignment: PageBlockTilesAlignment,
|
|
869
1002
|
layout: PageBlockTilesLayout,
|
|
870
1003
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
871
|
-
showTitles:
|
|
1004
|
+
showTitles: z40.boolean()
|
|
872
1005
|
});
|
|
873
|
-
var PageBlockRenderCodeProperties =
|
|
874
|
-
showCode:
|
|
875
|
-
showControls:
|
|
1006
|
+
var PageBlockRenderCodeProperties = z40.object({
|
|
1007
|
+
showCode: z40.boolean(),
|
|
1008
|
+
showControls: z40.boolean().optional()
|
|
876
1009
|
});
|
|
877
|
-
var PageBlockAssetComponent =
|
|
878
|
-
persistentId:
|
|
879
|
-
componentAssetId:
|
|
880
|
-
title: nullishToOptional(
|
|
881
|
-
description: nullishToOptional(
|
|
1010
|
+
var PageBlockAssetComponent = z40.object({
|
|
1011
|
+
persistentId: z40.string(),
|
|
1012
|
+
componentAssetId: z40.string(),
|
|
1013
|
+
title: nullishToOptional(z40.string()),
|
|
1014
|
+
description: nullishToOptional(z40.string()),
|
|
882
1015
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
883
1016
|
});
|
|
884
|
-
var PageBlockTableColumn =
|
|
885
|
-
id:
|
|
1017
|
+
var PageBlockTableColumn = z40.object({
|
|
1018
|
+
id: z40.string(),
|
|
886
1019
|
width: DimensionTokenData
|
|
887
1020
|
});
|
|
888
|
-
var PageBlockTableProperties =
|
|
889
|
-
showBorders:
|
|
890
|
-
showHeaderRow:
|
|
891
|
-
showHeaderColumn:
|
|
892
|
-
columns:
|
|
1021
|
+
var PageBlockTableProperties = z40.object({
|
|
1022
|
+
showBorders: z40.boolean(),
|
|
1023
|
+
showHeaderRow: z40.boolean(),
|
|
1024
|
+
showHeaderColumn: z40.boolean(),
|
|
1025
|
+
columns: z40.array(PageBlockTableColumn)
|
|
893
1026
|
});
|
|
894
|
-
var PageBlockTextSpanAttributeType =
|
|
895
|
-
var PageBlockTextSpanAttribute =
|
|
1027
|
+
var PageBlockTextSpanAttributeType = z40.enum(["Bold", "Italic", "Link", "Strikethrough", "Code"]);
|
|
1028
|
+
var PageBlockTextSpanAttribute = z40.object({
|
|
896
1029
|
type: PageBlockTextSpanAttributeType,
|
|
897
|
-
link: nullishToOptional(
|
|
898
|
-
documentationItemId: nullishToOptional(
|
|
899
|
-
openInNewWindow: nullishToOptional(
|
|
1030
|
+
link: nullishToOptional(z40.string()),
|
|
1031
|
+
documentationItemId: nullishToOptional(z40.string()),
|
|
1032
|
+
openInNewWindow: nullishToOptional(z40.boolean()),
|
|
900
1033
|
// deprecated. use openInNewTab
|
|
901
|
-
openInNewTab: nullishToOptional(
|
|
1034
|
+
openInNewTab: nullishToOptional(z40.boolean())
|
|
902
1035
|
});
|
|
903
|
-
var PageBlockTextSpan =
|
|
904
|
-
text:
|
|
905
|
-
attributes:
|
|
1036
|
+
var PageBlockTextSpan = z40.object({
|
|
1037
|
+
text: z40.string(),
|
|
1038
|
+
attributes: z40.array(PageBlockTextSpanAttribute)
|
|
906
1039
|
});
|
|
907
|
-
var PageBlockText =
|
|
908
|
-
spans:
|
|
1040
|
+
var PageBlockText = z40.object({
|
|
1041
|
+
spans: z40.array(PageBlockTextSpan)
|
|
909
1042
|
});
|
|
910
|
-
var PageBlockBaseV1 =
|
|
911
|
-
persistentId:
|
|
1043
|
+
var PageBlockBaseV1 = z40.object({
|
|
1044
|
+
persistentId: z40.string(),
|
|
912
1045
|
type: PageBlockTypeV1,
|
|
913
1046
|
// Element linking
|
|
914
|
-
designObjectId: nullishToOptional(
|
|
915
|
-
designObjectIds: nullishToOptional(
|
|
916
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
917
|
-
showNestedGroups: nullishToOptional(
|
|
918
|
-
brandId: nullishToOptional(
|
|
1047
|
+
designObjectId: nullishToOptional(z40.string()),
|
|
1048
|
+
designObjectIds: nullishToOptional(z40.array(z40.string())),
|
|
1049
|
+
tokenType: nullishToOptional(DesignTokenType.or(z40.literal("Font"))),
|
|
1050
|
+
showNestedGroups: nullishToOptional(z40.boolean()),
|
|
1051
|
+
brandId: nullishToOptional(z40.string()),
|
|
919
1052
|
// Rich text
|
|
920
1053
|
text: nullishToOptional(PageBlockText),
|
|
921
|
-
caption: nullishToOptional(
|
|
922
|
-
headingType: nullishToOptional(
|
|
1054
|
+
caption: nullishToOptional(z40.string()),
|
|
1055
|
+
headingType: nullishToOptional(z40.number().min(1).max(3)),
|
|
923
1056
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
924
1057
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
925
|
-
urlInput: nullishToOptional(
|
|
926
|
-
url: nullishToOptional(
|
|
1058
|
+
urlInput: nullishToOptional(z40.string()),
|
|
1059
|
+
url: nullishToOptional(z40.string()),
|
|
927
1060
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
928
1061
|
// Image
|
|
929
1062
|
asset: nullishToOptional(PageBlockAsset),
|
|
930
1063
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
931
1064
|
// Shortcuts block
|
|
932
|
-
shortcuts: nullishToOptional(
|
|
1065
|
+
shortcuts: nullishToOptional(z40.array(PageBlockShortcut)),
|
|
933
1066
|
// Custom blocks
|
|
934
|
-
customBlockKey: nullishToOptional(
|
|
935
|
-
customBlockProperties: nullishToOptional(
|
|
936
|
-
variantKey: nullishToOptional(
|
|
1067
|
+
customBlockKey: nullishToOptional(z40.string()),
|
|
1068
|
+
customBlockProperties: nullishToOptional(z40.array(PageBlockCustomBlockPropertyValue)),
|
|
1069
|
+
variantKey: nullishToOptional(z40.string()),
|
|
937
1070
|
// Figma frames
|
|
938
1071
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
939
|
-
figmaFrames: nullishToOptional(
|
|
1072
|
+
figmaFrames: nullishToOptional(z40.array(PageBlockFrame)),
|
|
940
1073
|
// Generic
|
|
941
1074
|
size: nullishToOptional(Size),
|
|
942
1075
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
943
1076
|
// Render code
|
|
944
1077
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
945
1078
|
// Component assets
|
|
946
|
-
componentAssets: nullishToOptional(
|
|
1079
|
+
componentAssets: nullishToOptional(z40.array(PageBlockAssetComponent)),
|
|
947
1080
|
// Tables
|
|
948
1081
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
949
|
-
columnId: nullishToOptional(
|
|
1082
|
+
columnId: nullishToOptional(z40.string()),
|
|
950
1083
|
// Token spreadsheet
|
|
951
1084
|
theme: nullishToOptional(PageBlockTheme),
|
|
952
|
-
blacklistedElementProperties: nullishToOptional(
|
|
1085
|
+
blacklistedElementProperties: nullishToOptional(z40.array(z40.string())),
|
|
953
1086
|
// Arbitrary
|
|
954
|
-
userMetadata: nullishToOptional(
|
|
1087
|
+
userMetadata: nullishToOptional(z40.string())
|
|
955
1088
|
});
|
|
956
1089
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
957
|
-
children:
|
|
1090
|
+
children: z40.lazy(
|
|
958
1091
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
959
1092
|
)
|
|
960
1093
|
});
|
|
@@ -966,276 +1099,276 @@ function traversePageBlocksV1(blocks, action) {
|
|
|
966
1099
|
}
|
|
967
1100
|
|
|
968
1101
|
// src/dsm/elements/data/documentation-block-v2.ts
|
|
969
|
-
import { z as
|
|
970
|
-
var PageBlockLinkType =
|
|
971
|
-
var PageBlockImageType =
|
|
972
|
-
var PageBlockImageAlignment =
|
|
973
|
-
var PageBlockTableCellAlignment =
|
|
974
|
-
var PageBlockPreviewContainerSize =
|
|
975
|
-
var PageBlockThemeDisplayMode =
|
|
976
|
-
var PageBlockImageResourceReference =
|
|
977
|
-
resourceId:
|
|
978
|
-
url:
|
|
979
|
-
});
|
|
980
|
-
var PageBlockResourceFrameNodeReference =
|
|
981
|
-
sourceId:
|
|
982
|
-
frameReferenceId:
|
|
983
|
-
});
|
|
984
|
-
var PageBlockImageReference =
|
|
1102
|
+
import { z as z41 } from "zod";
|
|
1103
|
+
var PageBlockLinkType = z41.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
1104
|
+
var PageBlockImageType = z41.enum(["Resource", "FigmaNode"]);
|
|
1105
|
+
var PageBlockImageAlignment = z41.enum(["Left", "Center", "Stretch"]);
|
|
1106
|
+
var PageBlockTableCellAlignment = z41.enum(["Left", "Center", "Right"]);
|
|
1107
|
+
var PageBlockPreviewContainerSize = z41.enum(["Centered", "NaturalHeight"]);
|
|
1108
|
+
var PageBlockThemeDisplayMode = z41.enum(["Split", "Override"]);
|
|
1109
|
+
var PageBlockImageResourceReference = z41.object({
|
|
1110
|
+
resourceId: z41.string(),
|
|
1111
|
+
url: z41.string()
|
|
1112
|
+
});
|
|
1113
|
+
var PageBlockResourceFrameNodeReference = z41.object({
|
|
1114
|
+
sourceId: z41.string(),
|
|
1115
|
+
frameReferenceId: z41.string()
|
|
1116
|
+
});
|
|
1117
|
+
var PageBlockImageReference = z41.object({
|
|
985
1118
|
type: PageBlockImageType,
|
|
986
1119
|
resource: PageBlockImageResourceReference.optional(),
|
|
987
1120
|
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
988
1121
|
});
|
|
989
|
-
var PageBlockColorV2 =
|
|
990
|
-
value:
|
|
991
|
-
referencedTokenId:
|
|
1122
|
+
var PageBlockColorV2 = z41.object({
|
|
1123
|
+
value: z41.string(),
|
|
1124
|
+
referencedTokenId: z41.string().optional()
|
|
992
1125
|
});
|
|
993
|
-
var PageBlockAssetEntityMeta =
|
|
994
|
-
title:
|
|
995
|
-
description:
|
|
1126
|
+
var PageBlockAssetEntityMeta = z41.object({
|
|
1127
|
+
title: z41.string().optional(),
|
|
1128
|
+
description: z41.string().optional(),
|
|
996
1129
|
backgroundColor: PageBlockColorV2.optional()
|
|
997
1130
|
});
|
|
998
|
-
var PageBlockFigmaComponentEntityMeta =
|
|
999
|
-
title:
|
|
1000
|
-
description:
|
|
1131
|
+
var PageBlockFigmaComponentEntityMeta = z41.object({
|
|
1132
|
+
title: z41.string().optional(),
|
|
1133
|
+
description: z41.string().optional(),
|
|
1001
1134
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1002
|
-
selectedComponentProperties:
|
|
1135
|
+
selectedComponentProperties: z41.array(z41.string()).optional()
|
|
1003
1136
|
});
|
|
1004
|
-
var PageBlockFigmaNodeEntityMeta =
|
|
1005
|
-
title:
|
|
1006
|
-
description:
|
|
1137
|
+
var PageBlockFigmaNodeEntityMeta = z41.object({
|
|
1138
|
+
title: z41.string().optional(),
|
|
1139
|
+
description: z41.string().optional(),
|
|
1007
1140
|
backgroundColor: PageBlockColorV2.optional()
|
|
1008
1141
|
});
|
|
1009
|
-
var PageBlockAppearanceV2 =
|
|
1142
|
+
var PageBlockAppearanceV2 = z41.object({
|
|
1010
1143
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
1011
|
-
numberOfColumns:
|
|
1144
|
+
numberOfColumns: z41.number().optional()
|
|
1012
1145
|
});
|
|
1013
|
-
var PageBlockItemUntypedValue =
|
|
1014
|
-
value:
|
|
1015
|
-
}).and(
|
|
1016
|
-
var PageBlockLinkV2 =
|
|
1146
|
+
var PageBlockItemUntypedValue = z41.object({
|
|
1147
|
+
value: z41.any()
|
|
1148
|
+
}).and(z41.record(z41.any()));
|
|
1149
|
+
var PageBlockLinkV2 = z41.object({
|
|
1017
1150
|
type: PageBlockLinkType,
|
|
1018
|
-
documentationItemId:
|
|
1019
|
-
pageHeadingId:
|
|
1020
|
-
url:
|
|
1021
|
-
openInNewTab:
|
|
1151
|
+
documentationItemId: z41.string().optional(),
|
|
1152
|
+
pageHeadingId: z41.string().optional(),
|
|
1153
|
+
url: z41.string().optional(),
|
|
1154
|
+
openInNewTab: z41.boolean().optional()
|
|
1022
1155
|
});
|
|
1023
|
-
var PageBlockItemV2 =
|
|
1024
|
-
id:
|
|
1156
|
+
var PageBlockItemV2 = z41.object({
|
|
1157
|
+
id: z41.string(),
|
|
1025
1158
|
linksTo: PageBlockLinkV2.optional(),
|
|
1026
|
-
props:
|
|
1159
|
+
props: z41.record(PageBlockItemUntypedValue)
|
|
1027
1160
|
});
|
|
1028
|
-
var PageBlockDataV2 =
|
|
1029
|
-
packageId:
|
|
1030
|
-
variantId:
|
|
1031
|
-
indentLevel:
|
|
1161
|
+
var PageBlockDataV2 = z41.object({
|
|
1162
|
+
packageId: z41.string(),
|
|
1163
|
+
variantId: z41.string().optional(),
|
|
1164
|
+
indentLevel: z41.number(),
|
|
1032
1165
|
appearance: PageBlockAppearanceV2.optional(),
|
|
1033
|
-
items:
|
|
1166
|
+
items: z41.array(PageBlockItemV2)
|
|
1034
1167
|
});
|
|
1035
|
-
var PageBlockItemAssetValue =
|
|
1036
|
-
selectedPropertyIds:
|
|
1037
|
-
showSearch:
|
|
1168
|
+
var PageBlockItemAssetValue = z41.object({
|
|
1169
|
+
selectedPropertyIds: z41.array(z41.string()).optional(),
|
|
1170
|
+
showSearch: z41.boolean().optional(),
|
|
1038
1171
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1039
1172
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1040
|
-
value:
|
|
1041
|
-
|
|
1042
|
-
entityId:
|
|
1043
|
-
entityType:
|
|
1173
|
+
value: z41.array(
|
|
1174
|
+
z41.object({
|
|
1175
|
+
entityId: z41.string(),
|
|
1176
|
+
entityType: z41.enum(["Asset", "AssetGroup"]),
|
|
1044
1177
|
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
1045
1178
|
})
|
|
1046
1179
|
).default([])
|
|
1047
1180
|
});
|
|
1048
|
-
var PageBlockItemAssetPropertyValue =
|
|
1049
|
-
value:
|
|
1181
|
+
var PageBlockItemAssetPropertyValue = z41.object({
|
|
1182
|
+
value: z41.array(z41.string()).default([])
|
|
1050
1183
|
});
|
|
1051
|
-
var PageBlockItemFigmaComponentValue =
|
|
1052
|
-
showComponentName:
|
|
1053
|
-
showComponentDescription:
|
|
1054
|
-
showPropertyList:
|
|
1184
|
+
var PageBlockItemFigmaComponentValue = z41.object({
|
|
1185
|
+
showComponentName: z41.boolean().optional(),
|
|
1186
|
+
showComponentDescription: z41.boolean().optional(),
|
|
1187
|
+
showPropertyList: z41.boolean().optional(),
|
|
1055
1188
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1056
1189
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1057
|
-
value:
|
|
1058
|
-
|
|
1059
|
-
entityId:
|
|
1060
|
-
entityType:
|
|
1190
|
+
value: z41.array(
|
|
1191
|
+
z41.object({
|
|
1192
|
+
entityId: z41.string(),
|
|
1193
|
+
entityType: z41.enum(["FigmaComponent"]),
|
|
1061
1194
|
entityMeta: PageBlockFigmaComponentEntityMeta.optional()
|
|
1062
1195
|
})
|
|
1063
1196
|
).default([])
|
|
1064
1197
|
});
|
|
1065
|
-
var PageBlockItemBooleanValue =
|
|
1066
|
-
value:
|
|
1198
|
+
var PageBlockItemBooleanValue = z41.object({
|
|
1199
|
+
value: z41.boolean()
|
|
1067
1200
|
});
|
|
1068
|
-
var PageBlockItemCodeValue =
|
|
1201
|
+
var PageBlockItemCodeValue = z41.object({
|
|
1069
1202
|
format: PageBlockCodeLanguage.optional(),
|
|
1070
|
-
caption:
|
|
1071
|
-
value:
|
|
1072
|
-
});
|
|
1073
|
-
var PageBlockItemSandboxValue =
|
|
1074
|
-
showCode:
|
|
1075
|
-
showControls:
|
|
1076
|
-
backgroundColor:
|
|
1077
|
-
alignPreview:
|
|
1078
|
-
previewHeight:
|
|
1079
|
-
value:
|
|
1080
|
-
});
|
|
1081
|
-
var PageBlockItemColorValue =
|
|
1082
|
-
var PageBlockItemComponentValue =
|
|
1083
|
-
selectedPropertyIds:
|
|
1084
|
-
value:
|
|
1085
|
-
|
|
1086
|
-
entityId:
|
|
1087
|
-
entityType:
|
|
1203
|
+
caption: z41.string().optional(),
|
|
1204
|
+
value: z41.string()
|
|
1205
|
+
});
|
|
1206
|
+
var PageBlockItemSandboxValue = z41.object({
|
|
1207
|
+
showCode: z41.boolean().optional(),
|
|
1208
|
+
showControls: z41.boolean().optional(),
|
|
1209
|
+
backgroundColor: z41.string().optional(),
|
|
1210
|
+
alignPreview: z41.enum(["Left", "Center"]).optional(),
|
|
1211
|
+
previewHeight: z41.number().optional(),
|
|
1212
|
+
value: z41.string()
|
|
1213
|
+
});
|
|
1214
|
+
var PageBlockItemColorValue = z41.record(z41.any());
|
|
1215
|
+
var PageBlockItemComponentValue = z41.object({
|
|
1216
|
+
selectedPropertyIds: z41.array(z41.string()).optional(),
|
|
1217
|
+
value: z41.array(
|
|
1218
|
+
z41.object({
|
|
1219
|
+
entityId: z41.string(),
|
|
1220
|
+
entityType: z41.enum(["Component", "ComponentGroup"])
|
|
1088
1221
|
})
|
|
1089
1222
|
).default([])
|
|
1090
1223
|
});
|
|
1091
|
-
var PageBlockItemComponentPropertyValue =
|
|
1092
|
-
value:
|
|
1093
|
-
});
|
|
1094
|
-
var PageBlockItemDividerValue =
|
|
1095
|
-
var PageBlockItemEmbedValue =
|
|
1096
|
-
value:
|
|
1097
|
-
caption:
|
|
1098
|
-
height:
|
|
1099
|
-
openGraph:
|
|
1100
|
-
title:
|
|
1101
|
-
description:
|
|
1102
|
-
imageUrl:
|
|
1224
|
+
var PageBlockItemComponentPropertyValue = z41.object({
|
|
1225
|
+
value: z41.string()
|
|
1226
|
+
});
|
|
1227
|
+
var PageBlockItemDividerValue = z41.object({});
|
|
1228
|
+
var PageBlockItemEmbedValue = z41.object({
|
|
1229
|
+
value: z41.string().optional(),
|
|
1230
|
+
caption: z41.string().optional(),
|
|
1231
|
+
height: z41.number().optional(),
|
|
1232
|
+
openGraph: z41.object({
|
|
1233
|
+
title: z41.string().optional(),
|
|
1234
|
+
description: z41.string().optional(),
|
|
1235
|
+
imageUrl: z41.string().optional()
|
|
1103
1236
|
}).optional()
|
|
1104
1237
|
});
|
|
1105
|
-
var PageBlockItemFigmaNodeValue =
|
|
1106
|
-
showSearch:
|
|
1238
|
+
var PageBlockItemFigmaNodeValue = z41.object({
|
|
1239
|
+
showSearch: z41.boolean().optional(),
|
|
1107
1240
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1108
1241
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1109
|
-
showFrameDetails:
|
|
1110
|
-
value:
|
|
1111
|
-
|
|
1112
|
-
entityId:
|
|
1242
|
+
showFrameDetails: z41.boolean().optional(),
|
|
1243
|
+
value: z41.array(
|
|
1244
|
+
z41.object({
|
|
1245
|
+
entityId: z41.string(),
|
|
1113
1246
|
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
1114
1247
|
})
|
|
1115
1248
|
).default([])
|
|
1116
1249
|
});
|
|
1117
|
-
var PageBlockItemImageValue =
|
|
1118
|
-
alt:
|
|
1119
|
-
caption:
|
|
1250
|
+
var PageBlockItemImageValue = z41.object({
|
|
1251
|
+
alt: z41.string().optional(),
|
|
1252
|
+
caption: z41.string().optional(),
|
|
1120
1253
|
alignment: PageBlockImageAlignment.optional(),
|
|
1121
1254
|
value: PageBlockImageReference.optional()
|
|
1122
1255
|
});
|
|
1123
|
-
var PageBlockItemMarkdownValue =
|
|
1124
|
-
value:
|
|
1256
|
+
var PageBlockItemMarkdownValue = z41.object({
|
|
1257
|
+
value: z41.string()
|
|
1125
1258
|
});
|
|
1126
|
-
var PageBlockItemMultiRichTextValue =
|
|
1259
|
+
var PageBlockItemMultiRichTextValue = z41.object({
|
|
1127
1260
|
value: PageBlockText.array()
|
|
1128
1261
|
});
|
|
1129
|
-
var PageBlockItemMultiSelectValue =
|
|
1130
|
-
value:
|
|
1262
|
+
var PageBlockItemMultiSelectValue = z41.object({
|
|
1263
|
+
value: z41.array(z41.string()).default([])
|
|
1131
1264
|
});
|
|
1132
|
-
var PageBlockItemNumberValue =
|
|
1133
|
-
value:
|
|
1265
|
+
var PageBlockItemNumberValue = z41.object({
|
|
1266
|
+
value: z41.number()
|
|
1134
1267
|
});
|
|
1135
|
-
var PageBlockItemRichTextValue =
|
|
1268
|
+
var PageBlockItemRichTextValue = z41.object({
|
|
1136
1269
|
value: PageBlockText,
|
|
1137
1270
|
calloutType: PageBlockCalloutType.optional()
|
|
1138
1271
|
});
|
|
1139
|
-
var PageBlockItemSingleSelectValue =
|
|
1140
|
-
value:
|
|
1272
|
+
var PageBlockItemSingleSelectValue = z41.object({
|
|
1273
|
+
value: z41.string()
|
|
1141
1274
|
});
|
|
1142
|
-
var PageBlockItemStorybookValue =
|
|
1143
|
-
caption:
|
|
1144
|
-
height:
|
|
1145
|
-
embedUrl:
|
|
1146
|
-
value:
|
|
1275
|
+
var PageBlockItemStorybookValue = z41.object({
|
|
1276
|
+
caption: z41.string().optional(),
|
|
1277
|
+
height: z41.number().optional(),
|
|
1278
|
+
embedUrl: z41.string().optional(),
|
|
1279
|
+
value: z41.string().optional()
|
|
1147
1280
|
});
|
|
1148
|
-
var PageBlockItemTextValue =
|
|
1149
|
-
value:
|
|
1281
|
+
var PageBlockItemTextValue = z41.object({
|
|
1282
|
+
value: z41.string()
|
|
1150
1283
|
});
|
|
1151
|
-
var PageBlockItemTokenValue =
|
|
1152
|
-
selectedPropertyIds:
|
|
1153
|
-
selectedThemeIds:
|
|
1284
|
+
var PageBlockItemTokenValue = z41.object({
|
|
1285
|
+
selectedPropertyIds: z41.array(z41.string()).optional(),
|
|
1286
|
+
selectedThemeIds: z41.array(z41.string()).optional(),
|
|
1154
1287
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1155
|
-
value:
|
|
1156
|
-
|
|
1157
|
-
entityId:
|
|
1158
|
-
entityType:
|
|
1159
|
-
entityMeta:
|
|
1160
|
-
showNestedGroups:
|
|
1288
|
+
value: z41.array(
|
|
1289
|
+
z41.object({
|
|
1290
|
+
entityId: z41.string(),
|
|
1291
|
+
entityType: z41.enum(["Token", "TokenGroup"]),
|
|
1292
|
+
entityMeta: z41.object({
|
|
1293
|
+
showNestedGroups: z41.boolean().optional()
|
|
1161
1294
|
}).optional()
|
|
1162
1295
|
})
|
|
1163
1296
|
).default([])
|
|
1164
1297
|
});
|
|
1165
|
-
var PageBlockItemTokenPropertyValue =
|
|
1166
|
-
selectedPropertyIds:
|
|
1167
|
-
selectedThemeIds:
|
|
1168
|
-
value:
|
|
1298
|
+
var PageBlockItemTokenPropertyValue = z41.object({
|
|
1299
|
+
selectedPropertyIds: z41.array(z41.string()).optional(),
|
|
1300
|
+
selectedThemeIds: z41.array(z41.string()).optional(),
|
|
1301
|
+
value: z41.array(z41.string()).default([])
|
|
1169
1302
|
});
|
|
1170
|
-
var PageBlockItemTokenTypeValue =
|
|
1171
|
-
value:
|
|
1303
|
+
var PageBlockItemTokenTypeValue = z41.object({
|
|
1304
|
+
value: z41.array(DesignTokenType).default([])
|
|
1172
1305
|
});
|
|
1173
|
-
var PageBlockItemUrlValue =
|
|
1174
|
-
value:
|
|
1306
|
+
var PageBlockItemUrlValue = z41.object({
|
|
1307
|
+
value: z41.string()
|
|
1175
1308
|
});
|
|
1176
|
-
var PageBlockItemTableRichTextNode =
|
|
1177
|
-
type:
|
|
1178
|
-
id:
|
|
1309
|
+
var PageBlockItemTableRichTextNode = z41.object({
|
|
1310
|
+
type: z41.literal("RichText"),
|
|
1311
|
+
id: z41.string(),
|
|
1179
1312
|
value: PageBlockItemRichTextValue.shape.value
|
|
1180
1313
|
});
|
|
1181
|
-
var PageBlockItemTableMultiRichTextNode =
|
|
1182
|
-
type:
|
|
1314
|
+
var PageBlockItemTableMultiRichTextNode = z41.object({
|
|
1315
|
+
type: z41.literal("MultiRichText"),
|
|
1183
1316
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
1184
1317
|
});
|
|
1185
|
-
var PageBlockItemTableImageNode =
|
|
1186
|
-
type:
|
|
1187
|
-
id:
|
|
1318
|
+
var PageBlockItemTableImageNode = z41.object({
|
|
1319
|
+
type: z41.literal("Image"),
|
|
1320
|
+
id: z41.string(),
|
|
1188
1321
|
caption: PageBlockItemImageValue.shape.caption,
|
|
1189
1322
|
value: PageBlockItemImageValue.shape.value
|
|
1190
1323
|
});
|
|
1191
|
-
var PageBlockItemTableNode =
|
|
1324
|
+
var PageBlockItemTableNode = z41.discriminatedUnion("type", [
|
|
1192
1325
|
PageBlockItemTableRichTextNode,
|
|
1193
1326
|
// PageBlockItemTableMultiRichTextNode,
|
|
1194
1327
|
PageBlockItemTableImageNode
|
|
1195
1328
|
]);
|
|
1196
|
-
var PageBlockItemTableCell =
|
|
1197
|
-
id:
|
|
1198
|
-
nodes:
|
|
1199
|
-
columnWidth:
|
|
1329
|
+
var PageBlockItemTableCell = z41.object({
|
|
1330
|
+
id: z41.string(),
|
|
1331
|
+
nodes: z41.array(PageBlockItemTableNode),
|
|
1332
|
+
columnWidth: z41.number().optional(),
|
|
1200
1333
|
alignment: PageBlockTableCellAlignment
|
|
1201
1334
|
});
|
|
1202
|
-
var PageBlockItemTableRow =
|
|
1203
|
-
cells:
|
|
1335
|
+
var PageBlockItemTableRow = z41.object({
|
|
1336
|
+
cells: z41.array(PageBlockItemTableCell)
|
|
1204
1337
|
});
|
|
1205
|
-
var PageBlockItemTableValue =
|
|
1206
|
-
highlightHeaderColumn:
|
|
1207
|
-
highlightHeaderRow:
|
|
1208
|
-
showBorder:
|
|
1209
|
-
value:
|
|
1338
|
+
var PageBlockItemTableValue = z41.object({
|
|
1339
|
+
highlightHeaderColumn: z41.boolean().optional(),
|
|
1340
|
+
highlightHeaderRow: z41.boolean().optional(),
|
|
1341
|
+
showBorder: z41.boolean().optional(),
|
|
1342
|
+
value: z41.array(PageBlockItemTableRow).default([])
|
|
1210
1343
|
});
|
|
1211
1344
|
|
|
1212
1345
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1213
|
-
import { z as
|
|
1346
|
+
import { z as z45 } from "zod";
|
|
1214
1347
|
|
|
1215
1348
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1216
|
-
import { z as
|
|
1349
|
+
import { z as z44 } from "zod";
|
|
1217
1350
|
|
|
1218
1351
|
// src/dsm/elements/data/item-header-v1.ts
|
|
1219
|
-
import { z as
|
|
1352
|
+
import { z as z43 } from "zod";
|
|
1220
1353
|
|
|
1221
1354
|
// src/dsm/elements/data/item-header.ts
|
|
1222
|
-
import { z as
|
|
1223
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
1224
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
1355
|
+
import { z as z42 } from "zod";
|
|
1356
|
+
var DocumentationItemHeaderAlignmentSchema = z42.enum(["Left", "Center"]);
|
|
1357
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z42.enum(["AspectFill", "AspectFit"]);
|
|
1225
1358
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1226
1359
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1227
1360
|
|
|
1228
1361
|
// src/dsm/elements/data/item-header-v1.ts
|
|
1229
|
-
var DocumentationItemHeaderV1 =
|
|
1230
|
-
description:
|
|
1362
|
+
var DocumentationItemHeaderV1 = z43.object({
|
|
1363
|
+
description: z43.string(),
|
|
1231
1364
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1232
1365
|
foregroundColor: ColorTokenData.nullish(),
|
|
1233
1366
|
backgroundColor: ColorTokenData.nullish(),
|
|
1234
1367
|
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
1235
1368
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1236
|
-
showBackgroundOverlay:
|
|
1237
|
-
showCoverText:
|
|
1238
|
-
minHeight:
|
|
1369
|
+
showBackgroundOverlay: z43.boolean(),
|
|
1370
|
+
showCoverText: z43.boolean(),
|
|
1371
|
+
minHeight: z43.number().nullish()
|
|
1239
1372
|
});
|
|
1240
1373
|
var defaultDocumentationItemHeaderV1 = {
|
|
1241
1374
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1246,10 +1379,10 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
1246
1379
|
};
|
|
1247
1380
|
|
|
1248
1381
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1249
|
-
var DocumentationItemConfigurationV1 =
|
|
1250
|
-
showSidebar:
|
|
1251
|
-
isPrivate:
|
|
1252
|
-
isHidden:
|
|
1382
|
+
var DocumentationItemConfigurationV1 = z44.object({
|
|
1383
|
+
showSidebar: z44.boolean(),
|
|
1384
|
+
isPrivate: z44.boolean().optional(),
|
|
1385
|
+
isHidden: z44.boolean().optional(),
|
|
1253
1386
|
header: DocumentationItemHeaderV1
|
|
1254
1387
|
});
|
|
1255
1388
|
var defaultDocumentationItemConfigurationV1 = {
|
|
@@ -1258,29 +1391,29 @@ var defaultDocumentationItemConfigurationV1 = {
|
|
|
1258
1391
|
};
|
|
1259
1392
|
|
|
1260
1393
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1261
|
-
var DocumentationPageDataV1 =
|
|
1262
|
-
blocks:
|
|
1394
|
+
var DocumentationPageDataV1 = z45.object({
|
|
1395
|
+
blocks: z45.array(PageBlockV1),
|
|
1263
1396
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1264
1397
|
});
|
|
1265
1398
|
|
|
1266
1399
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1267
|
-
import { z as
|
|
1400
|
+
import { z as z48 } from "zod";
|
|
1268
1401
|
|
|
1269
1402
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1270
|
-
import { z as
|
|
1403
|
+
import { z as z47 } from "zod";
|
|
1271
1404
|
|
|
1272
1405
|
// src/dsm/elements/data/item-header-v2.ts
|
|
1273
|
-
import { z as
|
|
1274
|
-
var DocumentationItemHeaderV2 =
|
|
1275
|
-
description:
|
|
1406
|
+
import { z as z46 } from "zod";
|
|
1407
|
+
var DocumentationItemHeaderV2 = z46.object({
|
|
1408
|
+
description: z46.string(),
|
|
1276
1409
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1277
1410
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
1278
1411
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
1279
1412
|
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
1280
1413
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1281
|
-
showBackgroundOverlay:
|
|
1282
|
-
showCoverText:
|
|
1283
|
-
minHeight:
|
|
1414
|
+
showBackgroundOverlay: z46.boolean(),
|
|
1415
|
+
showCoverText: z46.boolean(),
|
|
1416
|
+
minHeight: z46.number().nullish()
|
|
1284
1417
|
});
|
|
1285
1418
|
var defaultDocumentationItemHeaderV2 = {
|
|
1286
1419
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1291,10 +1424,10 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1291
1424
|
};
|
|
1292
1425
|
|
|
1293
1426
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1294
|
-
var DocumentationItemConfigurationV2 =
|
|
1295
|
-
showSidebar:
|
|
1296
|
-
isPrivate:
|
|
1297
|
-
isHidden:
|
|
1427
|
+
var DocumentationItemConfigurationV2 = z47.object({
|
|
1428
|
+
showSidebar: z47.boolean(),
|
|
1429
|
+
isPrivate: z47.boolean().optional(),
|
|
1430
|
+
isHidden: z47.boolean().optional(),
|
|
1298
1431
|
header: DocumentationItemHeaderV2
|
|
1299
1432
|
});
|
|
1300
1433
|
var defaultDocumentationItemConfigurationV2 = {
|
|
@@ -1305,122 +1438,122 @@ var defaultDocumentationItemConfigurationV2 = {
|
|
|
1305
1438
|
};
|
|
1306
1439
|
|
|
1307
1440
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1308
|
-
var DocumentationPageDataV2 =
|
|
1441
|
+
var DocumentationPageDataV2 = z48.object({
|
|
1309
1442
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1310
1443
|
});
|
|
1311
1444
|
|
|
1312
1445
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
1313
|
-
import { z as
|
|
1446
|
+
import { z as z51 } from "zod";
|
|
1314
1447
|
|
|
1315
1448
|
// src/dsm/elements/page-block-v2.ts
|
|
1316
|
-
import { z as
|
|
1449
|
+
import { z as z50 } from "zod";
|
|
1317
1450
|
|
|
1318
1451
|
// src/dsm/elements/base.ts
|
|
1319
|
-
import { z as
|
|
1320
|
-
var DesignElementOrigin =
|
|
1321
|
-
id:
|
|
1322
|
-
sourceId:
|
|
1323
|
-
name:
|
|
1324
|
-
});
|
|
1325
|
-
var DesignElementBase =
|
|
1326
|
-
id:
|
|
1327
|
-
persistentId:
|
|
1452
|
+
import { z as z49 } from "zod";
|
|
1453
|
+
var DesignElementOrigin = z49.object({
|
|
1454
|
+
id: z49.string(),
|
|
1455
|
+
sourceId: z49.string(),
|
|
1456
|
+
name: z49.string()
|
|
1457
|
+
});
|
|
1458
|
+
var DesignElementBase = z49.object({
|
|
1459
|
+
id: z49.string(),
|
|
1460
|
+
persistentId: z49.string(),
|
|
1328
1461
|
meta: ObjectMeta,
|
|
1329
|
-
designSystemVersionId:
|
|
1330
|
-
createdAt:
|
|
1331
|
-
updatedAt:
|
|
1462
|
+
designSystemVersionId: z49.string(),
|
|
1463
|
+
createdAt: z49.coerce.date(),
|
|
1464
|
+
updatedAt: z49.coerce.date()
|
|
1332
1465
|
});
|
|
1333
1466
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1334
1467
|
origin: DesignElementOrigin
|
|
1335
1468
|
});
|
|
1336
|
-
var DesignElementGroupablePart =
|
|
1337
|
-
parentPersistentId:
|
|
1338
|
-
sortOrder:
|
|
1469
|
+
var DesignElementGroupablePart = z49.object({
|
|
1470
|
+
parentPersistentId: z49.string().optional(),
|
|
1471
|
+
sortOrder: z49.number()
|
|
1339
1472
|
});
|
|
1340
1473
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1341
1474
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1342
|
-
parentPersistentId:
|
|
1475
|
+
parentPersistentId: z49.string()
|
|
1343
1476
|
});
|
|
1344
|
-
var DesignElementBrandedPart =
|
|
1345
|
-
brandPersistentId:
|
|
1477
|
+
var DesignElementBrandedPart = z49.object({
|
|
1478
|
+
brandPersistentId: z49.string()
|
|
1346
1479
|
});
|
|
1347
|
-
var DesignElementSlugPart =
|
|
1348
|
-
slug:
|
|
1349
|
-
userSlug:
|
|
1480
|
+
var DesignElementSlugPart = z49.object({
|
|
1481
|
+
slug: z49.string().optional(),
|
|
1482
|
+
userSlug: z49.string().optional()
|
|
1350
1483
|
});
|
|
1351
1484
|
|
|
1352
1485
|
// src/dsm/elements/page-block-v2.ts
|
|
1353
1486
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1354
1487
|
data: PageBlockDataV2
|
|
1355
1488
|
});
|
|
1356
|
-
var PageBlockEditorModelV2 =
|
|
1357
|
-
id:
|
|
1358
|
-
type:
|
|
1489
|
+
var PageBlockEditorModelV2 = z50.object({
|
|
1490
|
+
id: z50.string(),
|
|
1491
|
+
type: z50.literal("Block"),
|
|
1359
1492
|
data: PageBlockDataV2
|
|
1360
1493
|
});
|
|
1361
1494
|
|
|
1362
1495
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
1363
|
-
var PageSectionTypeV2 =
|
|
1364
|
-
var PageSectionColumnV2 =
|
|
1365
|
-
id:
|
|
1366
|
-
blocks:
|
|
1367
|
-
});
|
|
1368
|
-
var PageSectionItemV2 =
|
|
1369
|
-
id:
|
|
1370
|
-
title:
|
|
1371
|
-
columns:
|
|
1372
|
-
});
|
|
1373
|
-
var PageSectionPaddingV2 =
|
|
1374
|
-
top:
|
|
1375
|
-
bottom:
|
|
1376
|
-
left:
|
|
1377
|
-
right:
|
|
1378
|
-
});
|
|
1379
|
-
var PageSectionAppearanceV2 =
|
|
1380
|
-
expandToEdges:
|
|
1381
|
-
contentExpandToEdges:
|
|
1496
|
+
var PageSectionTypeV2 = z51.enum(["Tabs"]);
|
|
1497
|
+
var PageSectionColumnV2 = z51.object({
|
|
1498
|
+
id: z51.string(),
|
|
1499
|
+
blocks: z51.array(PageBlockEditorModelV2)
|
|
1500
|
+
});
|
|
1501
|
+
var PageSectionItemV2 = z51.object({
|
|
1502
|
+
id: z51.string(),
|
|
1503
|
+
title: z51.string(),
|
|
1504
|
+
columns: z51.array(PageSectionColumnV2)
|
|
1505
|
+
});
|
|
1506
|
+
var PageSectionPaddingV2 = z51.object({
|
|
1507
|
+
top: z51.number().optional(),
|
|
1508
|
+
bottom: z51.number().optional(),
|
|
1509
|
+
left: z51.number().optional(),
|
|
1510
|
+
right: z51.number().optional()
|
|
1511
|
+
});
|
|
1512
|
+
var PageSectionAppearanceV2 = z51.object({
|
|
1513
|
+
expandToEdges: z51.boolean(),
|
|
1514
|
+
contentExpandToEdges: z51.boolean(),
|
|
1382
1515
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1383
1516
|
foregroundColor: PageBlockColorV2.optional(),
|
|
1384
1517
|
padding: PageSectionPaddingV2.optional()
|
|
1385
1518
|
});
|
|
1386
|
-
var PageSectionEditorModelV2 =
|
|
1387
|
-
id:
|
|
1388
|
-
type:
|
|
1389
|
-
variantId:
|
|
1519
|
+
var PageSectionEditorModelV2 = z51.object({
|
|
1520
|
+
id: z51.string(),
|
|
1521
|
+
type: z51.literal("Section"),
|
|
1522
|
+
variantId: z51.string().optional(),
|
|
1390
1523
|
sectionType: PageSectionTypeV2,
|
|
1391
1524
|
appearance: PageSectionAppearanceV2,
|
|
1392
|
-
items:
|
|
1525
|
+
items: z51.array(PageSectionItemV2)
|
|
1393
1526
|
});
|
|
1394
1527
|
|
|
1395
1528
|
// src/dsm/elements/data/duration.ts
|
|
1396
|
-
import { z as
|
|
1397
|
-
var DurationUnit =
|
|
1398
|
-
var DurationValue =
|
|
1529
|
+
import { z as z52 } from "zod";
|
|
1530
|
+
var DurationUnit = z52.enum(["Ms"]);
|
|
1531
|
+
var DurationValue = z52.object({
|
|
1399
1532
|
unit: DurationUnit,
|
|
1400
|
-
measure:
|
|
1533
|
+
measure: z52.number()
|
|
1401
1534
|
});
|
|
1402
1535
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1403
1536
|
|
|
1404
1537
|
// src/dsm/elements/data/figma-file-structure.ts
|
|
1405
|
-
import { z as
|
|
1406
|
-
var FigmaFileStructureNodeType =
|
|
1407
|
-
var FigmaFileStructureNodeBase =
|
|
1408
|
-
id:
|
|
1409
|
-
name:
|
|
1538
|
+
import { z as z53 } from "zod";
|
|
1539
|
+
var FigmaFileStructureNodeType = z53.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1540
|
+
var FigmaFileStructureNodeBase = z53.object({
|
|
1541
|
+
id: z53.string(),
|
|
1542
|
+
name: z53.string(),
|
|
1410
1543
|
type: FigmaFileStructureNodeType,
|
|
1411
1544
|
size: SizeOrUndefined,
|
|
1412
|
-
parentComponentSetId:
|
|
1545
|
+
parentComponentSetId: z53.string().optional()
|
|
1413
1546
|
});
|
|
1414
1547
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1415
|
-
children:
|
|
1548
|
+
children: z53.lazy(() => FigmaFileStructureNode.array())
|
|
1416
1549
|
});
|
|
1417
|
-
var FigmaFileStructureStatistics =
|
|
1418
|
-
frames:
|
|
1419
|
-
components:
|
|
1420
|
-
componentSets:
|
|
1550
|
+
var FigmaFileStructureStatistics = z53.object({
|
|
1551
|
+
frames: z53.number().nullable().optional().transform((v) => v ?? 0),
|
|
1552
|
+
components: z53.number().nullable().optional().transform((v) => v ?? 0),
|
|
1553
|
+
componentSets: z53.number().nullable().optional().transform((v) => v ?? 0)
|
|
1421
1554
|
});
|
|
1422
|
-
var FigmaFileStructureElementData =
|
|
1423
|
-
value:
|
|
1555
|
+
var FigmaFileStructureElementData = z53.object({
|
|
1556
|
+
value: z53.object({
|
|
1424
1557
|
structure: FigmaFileStructureNode,
|
|
1425
1558
|
assetsInFile: FigmaFileStructureStatistics
|
|
1426
1559
|
})
|
|
@@ -1437,119 +1570,119 @@ function recursiveFigmaFileStructureToMap(node, map) {
|
|
|
1437
1570
|
}
|
|
1438
1571
|
|
|
1439
1572
|
// src/dsm/elements/data/figma-node-reference.ts
|
|
1440
|
-
import { z as
|
|
1441
|
-
var FigmaNodeReferenceData =
|
|
1442
|
-
structureElementId:
|
|
1443
|
-
nodeId:
|
|
1444
|
-
fileId:
|
|
1445
|
-
valid:
|
|
1573
|
+
import { z as z54 } from "zod";
|
|
1574
|
+
var FigmaNodeReferenceData = z54.object({
|
|
1575
|
+
structureElementId: z54.string(),
|
|
1576
|
+
nodeId: z54.string(),
|
|
1577
|
+
fileId: z54.string().optional(),
|
|
1578
|
+
valid: z54.boolean(),
|
|
1446
1579
|
// Asset data
|
|
1447
|
-
assetId:
|
|
1448
|
-
assetScale:
|
|
1449
|
-
assetWidth:
|
|
1450
|
-
assetHeight:
|
|
1451
|
-
assetUrl:
|
|
1452
|
-
assetOriginKey:
|
|
1453
|
-
});
|
|
1454
|
-
var FigmaNodeReferenceElementData =
|
|
1580
|
+
assetId: z54.string().optional(),
|
|
1581
|
+
assetScale: z54.number().optional(),
|
|
1582
|
+
assetWidth: z54.number().optional(),
|
|
1583
|
+
assetHeight: z54.number().optional(),
|
|
1584
|
+
assetUrl: z54.string().optional(),
|
|
1585
|
+
assetOriginKey: z54.string().optional()
|
|
1586
|
+
});
|
|
1587
|
+
var FigmaNodeReferenceElementData = z54.object({
|
|
1455
1588
|
value: FigmaNodeReferenceData
|
|
1456
1589
|
});
|
|
1457
1590
|
|
|
1458
1591
|
// src/dsm/elements/data/font-family.ts
|
|
1459
|
-
import { z as
|
|
1460
|
-
var FontFamilyValue =
|
|
1592
|
+
import { z as z55 } from "zod";
|
|
1593
|
+
var FontFamilyValue = z55.string();
|
|
1461
1594
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1462
1595
|
|
|
1463
1596
|
// src/dsm/elements/data/font-size.ts
|
|
1464
|
-
import { z as
|
|
1465
|
-
var FontSizeUnit =
|
|
1466
|
-
var FontSizeValue =
|
|
1597
|
+
import { z as z56 } from "zod";
|
|
1598
|
+
var FontSizeUnit = z56.enum(["Pixels", "Rem", "Percent"]);
|
|
1599
|
+
var FontSizeValue = z56.object({
|
|
1467
1600
|
unit: FontSizeUnit,
|
|
1468
|
-
measure:
|
|
1601
|
+
measure: z56.number()
|
|
1469
1602
|
});
|
|
1470
1603
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1471
1604
|
|
|
1472
1605
|
// src/dsm/elements/data/font-weight.ts
|
|
1473
|
-
import { z as
|
|
1474
|
-
var FontWeightValue =
|
|
1606
|
+
import { z as z57 } from "zod";
|
|
1607
|
+
var FontWeightValue = z57.string();
|
|
1475
1608
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1476
1609
|
|
|
1477
1610
|
// src/dsm/elements/data/gradient.ts
|
|
1478
|
-
import { z as
|
|
1479
|
-
var GradientType =
|
|
1480
|
-
var GradientStop =
|
|
1481
|
-
position:
|
|
1611
|
+
import { z as z58 } from "zod";
|
|
1612
|
+
var GradientType = z58.enum(["Linear", "Radial", "Angular"]);
|
|
1613
|
+
var GradientStop = z58.object({
|
|
1614
|
+
position: z58.number(),
|
|
1482
1615
|
color: ColorTokenData
|
|
1483
1616
|
});
|
|
1484
|
-
var GradientLayerValue =
|
|
1617
|
+
var GradientLayerValue = z58.object({
|
|
1485
1618
|
from: Point2D,
|
|
1486
1619
|
to: Point2D,
|
|
1487
1620
|
type: GradientType,
|
|
1488
|
-
aspectRatio: nullishToOptional(
|
|
1621
|
+
aspectRatio: nullishToOptional(z58.number()),
|
|
1489
1622
|
// z.number(),
|
|
1490
|
-
stops:
|
|
1623
|
+
stops: z58.array(GradientStop).min(2)
|
|
1491
1624
|
});
|
|
1492
1625
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1493
|
-
var GradientTokenValue =
|
|
1626
|
+
var GradientTokenValue = z58.array(GradientLayerData);
|
|
1494
1627
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1495
1628
|
|
|
1496
1629
|
// src/dsm/elements/data/group.ts
|
|
1497
|
-
import { z as
|
|
1498
|
-
var DocumentationGroupBehavior =
|
|
1499
|
-
var ElementGroupDataV1 =
|
|
1630
|
+
import { z as z59 } from "zod";
|
|
1631
|
+
var DocumentationGroupBehavior = z59.enum(["Group", "Tabs"]);
|
|
1632
|
+
var ElementGroupDataV1 = z59.object({
|
|
1500
1633
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1501
1634
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1502
1635
|
});
|
|
1503
|
-
var ElementGroupDataV2 =
|
|
1636
|
+
var ElementGroupDataV2 = z59.object({
|
|
1504
1637
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1505
1638
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1506
1639
|
});
|
|
1507
1640
|
|
|
1508
1641
|
// src/dsm/elements/data/letter-spacing.ts
|
|
1509
|
-
import { z as
|
|
1510
|
-
var LetterSpacingUnit =
|
|
1511
|
-
var LetterSpacingValue =
|
|
1642
|
+
import { z as z60 } from "zod";
|
|
1643
|
+
var LetterSpacingUnit = z60.enum(["Pixels", "Rem", "Percent"]);
|
|
1644
|
+
var LetterSpacingValue = z60.object({
|
|
1512
1645
|
unit: LetterSpacingUnit,
|
|
1513
|
-
measure:
|
|
1646
|
+
measure: z60.number()
|
|
1514
1647
|
});
|
|
1515
1648
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1516
1649
|
|
|
1517
1650
|
// src/dsm/elements/data/line-height.ts
|
|
1518
|
-
import { z as
|
|
1519
|
-
var LineHeightUnit =
|
|
1520
|
-
var LineHeightValue =
|
|
1651
|
+
import { z as z61 } from "zod";
|
|
1652
|
+
var LineHeightUnit = z61.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1653
|
+
var LineHeightValue = z61.object({
|
|
1521
1654
|
unit: LineHeightUnit,
|
|
1522
|
-
measure:
|
|
1655
|
+
measure: z61.number()
|
|
1523
1656
|
});
|
|
1524
1657
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1525
1658
|
|
|
1526
1659
|
// src/dsm/elements/data/paragraph-indent.ts
|
|
1527
|
-
import { z as
|
|
1528
|
-
var ParagraphIndentUnit =
|
|
1529
|
-
var ParagraphIndentValue =
|
|
1660
|
+
import { z as z62 } from "zod";
|
|
1661
|
+
var ParagraphIndentUnit = z62.enum(["Pixels", "Rem", "Percent"]);
|
|
1662
|
+
var ParagraphIndentValue = z62.object({
|
|
1530
1663
|
unit: ParagraphIndentUnit,
|
|
1531
|
-
measure:
|
|
1664
|
+
measure: z62.number()
|
|
1532
1665
|
});
|
|
1533
1666
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1534
1667
|
|
|
1535
1668
|
// src/dsm/elements/data/paragraph-spacing.ts
|
|
1536
|
-
import { z as
|
|
1537
|
-
var ParagraphSpacingUnit =
|
|
1538
|
-
var ParagraphSpacingValue =
|
|
1669
|
+
import { z as z63 } from "zod";
|
|
1670
|
+
var ParagraphSpacingUnit = z63.enum(["Pixels", "Rem", "Percent"]);
|
|
1671
|
+
var ParagraphSpacingValue = z63.object({
|
|
1539
1672
|
unit: ParagraphSpacingUnit,
|
|
1540
|
-
measure:
|
|
1673
|
+
measure: z63.number()
|
|
1541
1674
|
});
|
|
1542
1675
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1543
1676
|
|
|
1544
1677
|
// src/dsm/elements/data/product-copy.ts
|
|
1545
|
-
import { z as
|
|
1546
|
-
var ProductCopyValue =
|
|
1678
|
+
import { z as z64 } from "zod";
|
|
1679
|
+
var ProductCopyValue = z64.string();
|
|
1547
1680
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1548
1681
|
|
|
1549
1682
|
// src/dsm/elements/data/safe-id.ts
|
|
1550
|
-
import { z as
|
|
1683
|
+
import { z as z65 } from "zod";
|
|
1551
1684
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
1552
|
-
var SafeIdSchema =
|
|
1685
|
+
var SafeIdSchema = z65.string().refine(
|
|
1553
1686
|
(value) => {
|
|
1554
1687
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1555
1688
|
},
|
|
@@ -1559,58 +1692,58 @@ var SafeIdSchema = z61.string().refine(
|
|
|
1559
1692
|
);
|
|
1560
1693
|
|
|
1561
1694
|
// src/dsm/elements/data/shadow.ts
|
|
1562
|
-
import { z as
|
|
1563
|
-
var ShadowType =
|
|
1564
|
-
var ShadowLayerValue =
|
|
1695
|
+
import { z as z66 } from "zod";
|
|
1696
|
+
var ShadowType = z66.enum(["Drop", "Inner"]);
|
|
1697
|
+
var ShadowLayerValue = z66.object({
|
|
1565
1698
|
color: ColorTokenData,
|
|
1566
|
-
x:
|
|
1567
|
-
y:
|
|
1568
|
-
radius:
|
|
1569
|
-
spread:
|
|
1699
|
+
x: z66.number(),
|
|
1700
|
+
y: z66.number(),
|
|
1701
|
+
radius: z66.number(),
|
|
1702
|
+
spread: z66.number(),
|
|
1570
1703
|
opacity: OpacityTokenData.optional(),
|
|
1571
1704
|
type: ShadowType
|
|
1572
1705
|
});
|
|
1573
1706
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1574
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
1707
|
+
var ShadowTokenData = tokenAliasOrValue(z66.array(ShadowTokenDataBase));
|
|
1575
1708
|
|
|
1576
1709
|
// src/dsm/elements/data/size.ts
|
|
1577
|
-
import { z as
|
|
1578
|
-
var SizeUnit =
|
|
1579
|
-
var SizeValue =
|
|
1710
|
+
import { z as z67 } from "zod";
|
|
1711
|
+
var SizeUnit = z67.enum(["Pixels", "Rem", "Percent"]);
|
|
1712
|
+
var SizeValue = z67.object({
|
|
1580
1713
|
unit: SizeUnit,
|
|
1581
|
-
measure:
|
|
1714
|
+
measure: z67.number()
|
|
1582
1715
|
});
|
|
1583
1716
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1584
1717
|
|
|
1585
1718
|
// src/dsm/elements/data/space.ts
|
|
1586
|
-
import { z as
|
|
1587
|
-
var SpaceUnit =
|
|
1588
|
-
var SpaceValue =
|
|
1719
|
+
import { z as z68 } from "zod";
|
|
1720
|
+
var SpaceUnit = z68.enum(["Pixels", "Rem", "Percent"]);
|
|
1721
|
+
var SpaceValue = z68.object({
|
|
1589
1722
|
unit: SpaceUnit,
|
|
1590
|
-
measure:
|
|
1723
|
+
measure: z68.number()
|
|
1591
1724
|
});
|
|
1592
1725
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1593
1726
|
|
|
1594
1727
|
// src/dsm/elements/data/string.ts
|
|
1595
|
-
import { z as
|
|
1596
|
-
var StringValue =
|
|
1728
|
+
import { z as z69 } from "zod";
|
|
1729
|
+
var StringValue = z69.string();
|
|
1597
1730
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1598
1731
|
|
|
1599
1732
|
// src/dsm/elements/data/text-case.ts
|
|
1600
|
-
import { z as
|
|
1601
|
-
var TextCase =
|
|
1733
|
+
import { z as z70 } from "zod";
|
|
1734
|
+
var TextCase = z70.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1602
1735
|
var TextCaseValue = TextCase;
|
|
1603
1736
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1604
1737
|
|
|
1605
1738
|
// src/dsm/elements/data/text-decoration.ts
|
|
1606
|
-
import { z as
|
|
1607
|
-
var TextDecoration =
|
|
1739
|
+
import { z as z71 } from "zod";
|
|
1740
|
+
var TextDecoration = z71.enum(["None", "Underline", "Strikethrough"]);
|
|
1608
1741
|
var TextDecorationValue = TextDecoration;
|
|
1609
1742
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1610
1743
|
|
|
1611
1744
|
// src/dsm/elements/data/typography.ts
|
|
1612
|
-
import { z as
|
|
1613
|
-
var TypographyValue =
|
|
1745
|
+
import { z as z72 } from "zod";
|
|
1746
|
+
var TypographyValue = z72.object({
|
|
1614
1747
|
fontSize: FontSizeTokenData,
|
|
1615
1748
|
fontFamily: FontFamilyTokenData,
|
|
1616
1749
|
fontWeight: FontWeightTokenData,
|
|
@@ -1624,49 +1757,49 @@ var TypographyValue = z68.object({
|
|
|
1624
1757
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1625
1758
|
|
|
1626
1759
|
// src/dsm/elements/data/visibility.ts
|
|
1627
|
-
import { z as
|
|
1628
|
-
var Visibility =
|
|
1760
|
+
import { z as z73 } from "zod";
|
|
1761
|
+
var Visibility = z73.enum(["Hidden", "Visible"]);
|
|
1629
1762
|
var VisibilityValue = Visibility;
|
|
1630
1763
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1631
1764
|
|
|
1632
1765
|
// src/dsm/elements/data/z-index.ts
|
|
1633
|
-
import { z as
|
|
1634
|
-
var ZIndexUnit =
|
|
1635
|
-
var ZIndexValue =
|
|
1766
|
+
import { z as z74 } from "zod";
|
|
1767
|
+
var ZIndexUnit = z74.enum(["Raw"]);
|
|
1768
|
+
var ZIndexValue = z74.object({
|
|
1636
1769
|
unit: ZIndexUnit,
|
|
1637
|
-
measure:
|
|
1770
|
+
measure: z74.number()
|
|
1638
1771
|
});
|
|
1639
1772
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1640
1773
|
|
|
1641
1774
|
// src/dsm/elements/component.ts
|
|
1642
|
-
import { z as
|
|
1643
|
-
var ComponentOriginPart =
|
|
1644
|
-
nodeId:
|
|
1645
|
-
width:
|
|
1646
|
-
height:
|
|
1775
|
+
import { z as z75 } from "zod";
|
|
1776
|
+
var ComponentOriginPart = z75.object({
|
|
1777
|
+
nodeId: z75.string().optional(),
|
|
1778
|
+
width: z75.number().optional(),
|
|
1779
|
+
height: z75.number().optional()
|
|
1647
1780
|
});
|
|
1648
|
-
var ComponentAsset =
|
|
1649
|
-
assetId:
|
|
1650
|
-
assetPath:
|
|
1781
|
+
var ComponentAsset = z75.object({
|
|
1782
|
+
assetId: z75.string(),
|
|
1783
|
+
assetPath: z75.string()
|
|
1651
1784
|
});
|
|
1652
1785
|
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1653
1786
|
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1654
1787
|
origin: ComponentOrigin.optional(),
|
|
1655
1788
|
thumbnail: ComponentAsset,
|
|
1656
1789
|
svg: ComponentAsset.optional(),
|
|
1657
|
-
isAsset:
|
|
1790
|
+
isAsset: z75.boolean()
|
|
1658
1791
|
});
|
|
1659
1792
|
function isImportedComponent(component) {
|
|
1660
1793
|
return !!component.origin;
|
|
1661
1794
|
}
|
|
1662
1795
|
|
|
1663
1796
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1664
|
-
import { z as
|
|
1797
|
+
import { z as z77 } from "zod";
|
|
1665
1798
|
|
|
1666
1799
|
// src/dsm/elements/group.ts
|
|
1667
|
-
import { z as
|
|
1800
|
+
import { z as z76 } from "zod";
|
|
1668
1801
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1669
|
-
shortPersistentId:
|
|
1802
|
+
shortPersistentId: z76.string().optional(),
|
|
1670
1803
|
childType: DesignElementType,
|
|
1671
1804
|
data: ElementGroupDataV2.optional()
|
|
1672
1805
|
});
|
|
@@ -1674,7 +1807,7 @@ var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
|
1674
1807
|
|
|
1675
1808
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1676
1809
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1677
|
-
shortPersistentId:
|
|
1810
|
+
shortPersistentId: z77.string(),
|
|
1678
1811
|
data: DocumentationPageDataV1
|
|
1679
1812
|
});
|
|
1680
1813
|
var DocumentationGroupV1 = ElementGroup.omit({
|
|
@@ -1684,21 +1817,21 @@ var DocumentationGroupV1 = ElementGroup.omit({
|
|
|
1684
1817
|
});
|
|
1685
1818
|
|
|
1686
1819
|
// src/dsm/elements/documentation-page-v2.ts
|
|
1687
|
-
import { z as
|
|
1820
|
+
import { z as z78 } from "zod";
|
|
1688
1821
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1689
|
-
shortPersistentId:
|
|
1822
|
+
shortPersistentId: z78.string(),
|
|
1690
1823
|
data: DocumentationPageDataV2.extend({
|
|
1691
|
-
oldBlocks:
|
|
1824
|
+
oldBlocks: z78.array(PageBlockV1).optional()
|
|
1692
1825
|
})
|
|
1693
1826
|
});
|
|
1694
1827
|
|
|
1695
1828
|
// src/dsm/elements/figma-file-structures.ts
|
|
1696
|
-
import { z as
|
|
1697
|
-
var FigmaFileStructureOrigin =
|
|
1698
|
-
sourceId:
|
|
1699
|
-
fileId:
|
|
1829
|
+
import { z as z79 } from "zod";
|
|
1830
|
+
var FigmaFileStructureOrigin = z79.object({
|
|
1831
|
+
sourceId: z79.string(),
|
|
1832
|
+
fileId: z79.string().optional()
|
|
1700
1833
|
});
|
|
1701
|
-
var FigmaFileStructureData =
|
|
1834
|
+
var FigmaFileStructureData = z79.object({
|
|
1702
1835
|
rootNode: FigmaFileStructureNode,
|
|
1703
1836
|
assetsInFile: FigmaFileStructureStatistics
|
|
1704
1837
|
});
|
|
@@ -1714,10 +1847,10 @@ function traverseStructure(node, action) {
|
|
|
1714
1847
|
}
|
|
1715
1848
|
|
|
1716
1849
|
// src/dsm/elements/figma-node-reference.ts
|
|
1717
|
-
import { z as
|
|
1718
|
-
var FigmaNodeReferenceOrigin =
|
|
1719
|
-
sourceId:
|
|
1720
|
-
parentName:
|
|
1850
|
+
import { z as z80 } from "zod";
|
|
1851
|
+
var FigmaNodeReferenceOrigin = z80.object({
|
|
1852
|
+
sourceId: z80.string(),
|
|
1853
|
+
parentName: z80.string().optional()
|
|
1721
1854
|
});
|
|
1722
1855
|
var FigmaNodeReference = DesignElementBase.extend({
|
|
1723
1856
|
data: FigmaNodeReferenceData,
|
|
@@ -1725,13 +1858,15 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
1725
1858
|
});
|
|
1726
1859
|
|
|
1727
1860
|
// src/dsm/elements/theme.ts
|
|
1728
|
-
import { z as
|
|
1861
|
+
import { z as z82 } from "zod";
|
|
1729
1862
|
|
|
1730
1863
|
// src/dsm/elements/tokens.ts
|
|
1731
|
-
import { z as
|
|
1732
|
-
var DesignTokenOriginPart =
|
|
1733
|
-
referenceOriginId:
|
|
1734
|
-
referencePersistentId:
|
|
1864
|
+
import { z as z81 } from "zod";
|
|
1865
|
+
var DesignTokenOriginPart = z81.object({
|
|
1866
|
+
referenceOriginId: z81.string().optional(),
|
|
1867
|
+
referencePersistentId: z81.string().optional(),
|
|
1868
|
+
referenceResolutionFailed: z81.boolean().optional(),
|
|
1869
|
+
key: z81.string().optional()
|
|
1735
1870
|
});
|
|
1736
1871
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
1737
1872
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -1743,111 +1878,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
1743
1878
|
brandPersistentId: true,
|
|
1744
1879
|
designSystemVersionId: true
|
|
1745
1880
|
});
|
|
1746
|
-
var BlurTokenTypedData =
|
|
1747
|
-
type:
|
|
1881
|
+
var BlurTokenTypedData = z81.object({
|
|
1882
|
+
type: z81.literal("Blur"),
|
|
1748
1883
|
data: BlurTokenData
|
|
1749
1884
|
});
|
|
1750
|
-
var ColorTokenTypedData =
|
|
1751
|
-
type:
|
|
1885
|
+
var ColorTokenTypedData = z81.object({
|
|
1886
|
+
type: z81.literal("Color"),
|
|
1752
1887
|
data: ColorTokenData
|
|
1753
1888
|
});
|
|
1754
|
-
var GradientTokenTypedData =
|
|
1755
|
-
type:
|
|
1889
|
+
var GradientTokenTypedData = z81.object({
|
|
1890
|
+
type: z81.literal("Gradient"),
|
|
1756
1891
|
data: GradientTokenData
|
|
1757
1892
|
});
|
|
1758
|
-
var OpacityTokenTypedData =
|
|
1759
|
-
type:
|
|
1893
|
+
var OpacityTokenTypedData = z81.object({
|
|
1894
|
+
type: z81.literal("Opacity"),
|
|
1760
1895
|
data: OpacityTokenData
|
|
1761
1896
|
});
|
|
1762
|
-
var ShadowTokenTypedData =
|
|
1763
|
-
type:
|
|
1897
|
+
var ShadowTokenTypedData = z81.object({
|
|
1898
|
+
type: z81.literal("Shadow"),
|
|
1764
1899
|
data: ShadowTokenData
|
|
1765
1900
|
});
|
|
1766
|
-
var TypographyTokenTypedData =
|
|
1767
|
-
type:
|
|
1901
|
+
var TypographyTokenTypedData = z81.object({
|
|
1902
|
+
type: z81.literal("Typography"),
|
|
1768
1903
|
data: TypographyTokenData
|
|
1769
1904
|
});
|
|
1770
|
-
var StringTokenTypedData =
|
|
1771
|
-
type:
|
|
1905
|
+
var StringTokenTypedData = z81.object({
|
|
1906
|
+
type: z81.literal("String"),
|
|
1772
1907
|
data: StringTokenData
|
|
1773
1908
|
});
|
|
1774
|
-
var DimensionTokenTypedData =
|
|
1775
|
-
type:
|
|
1909
|
+
var DimensionTokenTypedData = z81.object({
|
|
1910
|
+
type: z81.literal("Dimension"),
|
|
1776
1911
|
data: DimensionTokenData
|
|
1777
1912
|
});
|
|
1778
|
-
var FontSizeTokenTypedData =
|
|
1779
|
-
type:
|
|
1913
|
+
var FontSizeTokenTypedData = z81.object({
|
|
1914
|
+
type: z81.literal("FontSize"),
|
|
1780
1915
|
data: FontSizeTokenData
|
|
1781
1916
|
});
|
|
1782
|
-
var FontFamilyTokenTypedData =
|
|
1783
|
-
type:
|
|
1917
|
+
var FontFamilyTokenTypedData = z81.object({
|
|
1918
|
+
type: z81.literal("FontFamily"),
|
|
1784
1919
|
data: FontFamilyTokenData
|
|
1785
1920
|
});
|
|
1786
|
-
var FontWeightTokenTypedData =
|
|
1787
|
-
type:
|
|
1921
|
+
var FontWeightTokenTypedData = z81.object({
|
|
1922
|
+
type: z81.literal("FontWeight"),
|
|
1788
1923
|
data: FontWeightTokenData
|
|
1789
1924
|
});
|
|
1790
|
-
var LetterSpacingTokenTypedData =
|
|
1791
|
-
type:
|
|
1925
|
+
var LetterSpacingTokenTypedData = z81.object({
|
|
1926
|
+
type: z81.literal("LetterSpacing"),
|
|
1792
1927
|
data: LetterSpacingTokenData
|
|
1793
1928
|
});
|
|
1794
|
-
var LineHeightTokenTypedData =
|
|
1795
|
-
type:
|
|
1929
|
+
var LineHeightTokenTypedData = z81.object({
|
|
1930
|
+
type: z81.literal("LineHeight"),
|
|
1796
1931
|
data: LineHeightTokenData
|
|
1797
1932
|
});
|
|
1798
|
-
var ParagraphSpacingTokenTypedData =
|
|
1799
|
-
type:
|
|
1933
|
+
var ParagraphSpacingTokenTypedData = z81.object({
|
|
1934
|
+
type: z81.literal("ParagraphSpacing"),
|
|
1800
1935
|
data: ParagraphSpacingTokenData
|
|
1801
1936
|
});
|
|
1802
|
-
var TextCaseTokenTypedData =
|
|
1803
|
-
type:
|
|
1937
|
+
var TextCaseTokenTypedData = z81.object({
|
|
1938
|
+
type: z81.literal("TextCase"),
|
|
1804
1939
|
data: TextCaseTokenData
|
|
1805
1940
|
});
|
|
1806
|
-
var TextDecorationTokenTypedData =
|
|
1807
|
-
type:
|
|
1941
|
+
var TextDecorationTokenTypedData = z81.object({
|
|
1942
|
+
type: z81.literal("TextDecoration"),
|
|
1808
1943
|
data: TextDecorationTokenData
|
|
1809
1944
|
});
|
|
1810
|
-
var BorderRadiusTokenTypedData =
|
|
1811
|
-
type:
|
|
1945
|
+
var BorderRadiusTokenTypedData = z81.object({
|
|
1946
|
+
type: z81.literal("BorderRadius"),
|
|
1812
1947
|
data: BorderRadiusTokenData
|
|
1813
1948
|
});
|
|
1814
|
-
var BorderWidthTokenTypedData =
|
|
1815
|
-
type:
|
|
1949
|
+
var BorderWidthTokenTypedData = z81.object({
|
|
1950
|
+
type: z81.literal("BorderWidth"),
|
|
1816
1951
|
data: BorderWidthTokenData
|
|
1817
1952
|
});
|
|
1818
|
-
var BorderTypedData =
|
|
1819
|
-
type:
|
|
1953
|
+
var BorderTypedData = z81.object({
|
|
1954
|
+
type: z81.literal("Border"),
|
|
1820
1955
|
data: BorderTokenData
|
|
1821
1956
|
});
|
|
1822
|
-
var ProductCopyTypedData =
|
|
1823
|
-
type:
|
|
1957
|
+
var ProductCopyTypedData = z81.object({
|
|
1958
|
+
type: z81.literal("ProductCopy"),
|
|
1824
1959
|
data: ProductCopyTokenData
|
|
1825
1960
|
});
|
|
1826
|
-
var SizeTypedData =
|
|
1827
|
-
type:
|
|
1961
|
+
var SizeTypedData = z81.object({
|
|
1962
|
+
type: z81.literal("Size"),
|
|
1828
1963
|
data: SizeTokenData
|
|
1829
1964
|
});
|
|
1830
|
-
var SpaceTypedData =
|
|
1831
|
-
type:
|
|
1965
|
+
var SpaceTypedData = z81.object({
|
|
1966
|
+
type: z81.literal("Space"),
|
|
1832
1967
|
data: SpaceTokenData
|
|
1833
1968
|
});
|
|
1834
|
-
var VisibilityTypedData =
|
|
1835
|
-
type:
|
|
1969
|
+
var VisibilityTypedData = z81.object({
|
|
1970
|
+
type: z81.literal("Visibility"),
|
|
1836
1971
|
data: VisibilityTokenData
|
|
1837
1972
|
});
|
|
1838
|
-
var ZIndexTypedData =
|
|
1839
|
-
type:
|
|
1973
|
+
var ZIndexTypedData = z81.object({
|
|
1974
|
+
type: z81.literal("ZIndex"),
|
|
1840
1975
|
data: ZIndexTokenData
|
|
1841
1976
|
});
|
|
1842
|
-
var DurationTypedData =
|
|
1843
|
-
type:
|
|
1977
|
+
var DurationTypedData = z81.object({
|
|
1978
|
+
type: z81.literal("Duration"),
|
|
1844
1979
|
data: DurationTokenData
|
|
1845
1980
|
});
|
|
1846
|
-
var FontTypedData =
|
|
1847
|
-
type:
|
|
1848
|
-
data:
|
|
1981
|
+
var FontTypedData = z81.object({
|
|
1982
|
+
type: z81.literal("Font"),
|
|
1983
|
+
data: z81.record(z81.any())
|
|
1849
1984
|
});
|
|
1850
|
-
var DesignTokenTypedData =
|
|
1985
|
+
var DesignTokenTypedData = z81.discriminatedUnion("type", [
|
|
1851
1986
|
BlurTokenTypedData,
|
|
1852
1987
|
BorderRadiusTokenTypedData,
|
|
1853
1988
|
BorderWidthTokenTypedData,
|
|
@@ -1897,32 +2032,32 @@ function designTokenTypeFilter(type) {
|
|
|
1897
2032
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
1898
2033
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
1899
2034
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
1900
|
-
|
|
1901
|
-
tokenPersistentId:
|
|
2035
|
+
z82.object({
|
|
2036
|
+
tokenPersistentId: z82.string(),
|
|
1902
2037
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
1903
2038
|
})
|
|
1904
2039
|
);
|
|
1905
|
-
var ThemeElementData =
|
|
1906
|
-
value:
|
|
1907
|
-
overrides:
|
|
2040
|
+
var ThemeElementData = z82.object({
|
|
2041
|
+
value: z82.object({
|
|
2042
|
+
overrides: z82.array(ThemeOverride)
|
|
1908
2043
|
})
|
|
1909
2044
|
});
|
|
1910
|
-
var ThemeOriginPart =
|
|
1911
|
-
var ThemeOriginObject =
|
|
1912
|
-
id:
|
|
1913
|
-
name:
|
|
2045
|
+
var ThemeOriginPart = z82.object({});
|
|
2046
|
+
var ThemeOriginObject = z82.object({
|
|
2047
|
+
id: z82.string(),
|
|
2048
|
+
name: z82.string()
|
|
1914
2049
|
});
|
|
1915
|
-
var ThemeOriginSource =
|
|
1916
|
-
sourceId:
|
|
1917
|
-
sourceObjects:
|
|
2050
|
+
var ThemeOriginSource = z82.object({
|
|
2051
|
+
sourceId: z82.string(),
|
|
2052
|
+
sourceObjects: z82.array(ThemeOriginObject)
|
|
1918
2053
|
});
|
|
1919
|
-
var ThemeOrigin =
|
|
1920
|
-
sources:
|
|
2054
|
+
var ThemeOrigin = z82.object({
|
|
2055
|
+
sources: z82.array(ThemeOriginSource)
|
|
1921
2056
|
});
|
|
1922
2057
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
1923
2058
|
origin: ThemeOrigin.optional(),
|
|
1924
|
-
overrides:
|
|
1925
|
-
codeName:
|
|
2059
|
+
overrides: z82.array(ThemeOverride),
|
|
2060
|
+
codeName: z82.string()
|
|
1926
2061
|
});
|
|
1927
2062
|
|
|
1928
2063
|
// src/dsm/elements/utils.ts
|
|
@@ -1991,44 +2126,188 @@ var PageBlockDefinitionsMap = class {
|
|
|
1991
2126
|
}
|
|
1992
2127
|
};
|
|
1993
2128
|
|
|
1994
|
-
// src/dsm/import/
|
|
1995
|
-
import { z as
|
|
1996
|
-
var ImportWarningType = z79.enum([
|
|
1997
|
-
"NoVersionFound",
|
|
1998
|
-
"UnsupportedFill",
|
|
1999
|
-
"UnsupportedStroke",
|
|
2000
|
-
"UnsupportedEffect",
|
|
2001
|
-
"NoPublishedElements",
|
|
2002
|
-
"NoPublishedStyles",
|
|
2003
|
-
"NoPublishedComponents",
|
|
2004
|
-
"NoPublishedAssets",
|
|
2005
|
-
"StyleNotApplied",
|
|
2006
|
-
"ComponentHasNoThumbnail",
|
|
2007
|
-
"DuplicateImportedStyleId",
|
|
2008
|
-
"DuplicateImportedStylePath",
|
|
2009
|
-
"NoUnpublishedStyles"
|
|
2010
|
-
]);
|
|
2011
|
-
var ImportWarning = z79.object({
|
|
2012
|
-
warningType: ImportWarningType,
|
|
2013
|
-
componentId: z79.string().optional(),
|
|
2014
|
-
componentName: z79.string().optional(),
|
|
2015
|
-
styleId: z79.string().optional(),
|
|
2016
|
-
styleName: z79.string().optional(),
|
|
2017
|
-
unsupportedStyleValueType: z79.string().optional()
|
|
2018
|
-
});
|
|
2129
|
+
// src/dsm/import/component.ts
|
|
2130
|
+
import { z as z84 } from "zod";
|
|
2019
2131
|
|
|
2020
|
-
// src/dsm/
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2132
|
+
// src/dsm/import/base.ts
|
|
2133
|
+
import { z as z83 } from "zod";
|
|
2134
|
+
var ImportModelBase = z83.object({
|
|
2135
|
+
id: z83.string(),
|
|
2136
|
+
meta: ObjectMeta,
|
|
2137
|
+
origin: DesignElementOrigin,
|
|
2138
|
+
brandPersistentId: z83.string(),
|
|
2139
|
+
sortOrder: z83.number()
|
|
2025
2140
|
});
|
|
2026
|
-
var
|
|
2027
|
-
|
|
2028
|
-
|
|
2141
|
+
var ImportModelInputBase = ImportModelBase.omit({
|
|
2142
|
+
brandPersistentId: true,
|
|
2143
|
+
origin: true,
|
|
2144
|
+
sortOrder: true
|
|
2145
|
+
}).extend({
|
|
2146
|
+
originId: z83.string(),
|
|
2147
|
+
originMetadata: z83.record(z83.any())
|
|
2148
|
+
});
|
|
2149
|
+
|
|
2150
|
+
// src/dsm/import/component.ts
|
|
2151
|
+
var ComponentImportModelPart = z84.object({
|
|
2152
|
+
thumbnail: ImageImportModel
|
|
2153
|
+
});
|
|
2154
|
+
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
2155
|
+
isAsset: z84.boolean(),
|
|
2156
|
+
svg: FigmaSvgRenderImportModel.optional(),
|
|
2157
|
+
origin: ComponentOrigin
|
|
2158
|
+
});
|
|
2159
|
+
var ComponentImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
2160
|
+
originMetadata: ComponentOriginPart
|
|
2161
|
+
});
|
|
2162
|
+
var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
2163
|
+
svg: FigmaSvgRenderImportModel,
|
|
2164
|
+
originMetadata: ComponentOriginPart
|
|
2165
|
+
});
|
|
2166
|
+
|
|
2167
|
+
// src/dsm/import/theme.ts
|
|
2168
|
+
import { z as z85 } from "zod";
|
|
2169
|
+
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
2170
|
+
z85.object({
|
|
2171
|
+
id: z85.string(),
|
|
2172
|
+
meta: ObjectMeta
|
|
2173
|
+
})
|
|
2174
|
+
);
|
|
2175
|
+
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
2176
|
+
z85.object({
|
|
2177
|
+
origin: ThemeOverrideOrigin
|
|
2178
|
+
})
|
|
2179
|
+
);
|
|
2180
|
+
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
2181
|
+
z85.object({
|
|
2182
|
+
originId: z85.string(),
|
|
2183
|
+
originMetadata: ThemeOverrideOriginPart
|
|
2184
|
+
})
|
|
2185
|
+
);
|
|
2186
|
+
var ThemeImportModel = z85.object({
|
|
2187
|
+
meta: ObjectMeta,
|
|
2188
|
+
brandPersistentId: z85.string(),
|
|
2189
|
+
originSource: ThemeOriginSource,
|
|
2190
|
+
overrides: z85.array(ThemeOverrideImportModel),
|
|
2191
|
+
sortOrder: z85.number()
|
|
2192
|
+
});
|
|
2193
|
+
var ThemeImportModelInput = z85.object({
|
|
2194
|
+
meta: ObjectMeta,
|
|
2195
|
+
originObjects: z85.array(ThemeOriginObject),
|
|
2196
|
+
overrides: z85.array(ThemeOverrideImportModelInput)
|
|
2197
|
+
});
|
|
2198
|
+
var ThemeUpdateImportModel = z85.object({
|
|
2199
|
+
themePersistentId: z85.string(),
|
|
2200
|
+
overrides: z85.array(ThemeOverrideImportModel)
|
|
2201
|
+
});
|
|
2202
|
+
var ThemeUpdateImportModelInput = z85.object({
|
|
2203
|
+
themePersistentId: z85.string(),
|
|
2204
|
+
overrides: z85.array(ThemeOverrideImportModelInput)
|
|
2205
|
+
});
|
|
2206
|
+
|
|
2207
|
+
// src/dsm/import/tokens.ts
|
|
2208
|
+
import { z as z86 } from "zod";
|
|
2209
|
+
var DesignTokenImportModelPart = z86.object({
|
|
2210
|
+
collection: z86.string().optional(),
|
|
2211
|
+
codeSyntax: z86.record(z86.coerce.string()).optional()
|
|
2212
|
+
});
|
|
2213
|
+
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2214
|
+
origin: DesignTokenOrigin
|
|
2215
|
+
});
|
|
2216
|
+
var DesignTokenImportModelInputBase = ImportModelInputBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2217
|
+
originMetadata: DesignTokenOriginPart
|
|
2218
|
+
});
|
|
2219
|
+
var DesignTokenImportModel = DesignTokenTypedData.and(DesignTokenImportModelBase);
|
|
2220
|
+
var DesignTokenImportModelInput = DesignTokenTypedData.and(DesignTokenImportModelInputBase);
|
|
2221
|
+
function isDesignTokenImportModelOfType(designToken, type) {
|
|
2222
|
+
return designToken.type === type;
|
|
2223
|
+
}
|
|
2224
|
+
function designTokenImportModelTypeFilter(type) {
|
|
2225
|
+
return (designToken) => isDesignTokenImportModelOfType(designToken, type);
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
// src/dsm/import/figma-frames.ts
|
|
2229
|
+
import { z as z87 } from "zod";
|
|
2230
|
+
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
2231
|
+
image: FigmaPngRenderImportModel
|
|
2232
|
+
});
|
|
2233
|
+
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
2234
|
+
children: z87.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
2235
|
+
});
|
|
2236
|
+
var FigmaFileStructureImportModelPart = z87.object({
|
|
2237
|
+
data: z87.object({
|
|
2238
|
+
rootNode: FigmaFileStructureNodeImportModel,
|
|
2239
|
+
assetsInFile: FigmaFileStructureStatistics
|
|
2240
|
+
})
|
|
2241
|
+
});
|
|
2242
|
+
var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImportModelPart.shape).extend({
|
|
2243
|
+
origin: FigmaFileStructureOrigin
|
|
2244
|
+
});
|
|
2245
|
+
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
2246
|
+
FigmaFileStructureImportModelPart.shape
|
|
2247
|
+
).extend({
|
|
2248
|
+
fileVersionId: z87.string()
|
|
2249
|
+
});
|
|
2250
|
+
function figmaFileStructureImportModelToMap(root) {
|
|
2251
|
+
const map = /* @__PURE__ */ new Map();
|
|
2252
|
+
recursiveFigmaFileStructureToMap2(root, map);
|
|
2253
|
+
return map;
|
|
2254
|
+
}
|
|
2255
|
+
function recursiveFigmaFileStructureToMap2(node, map) {
|
|
2256
|
+
map.set(node.id, node);
|
|
2257
|
+
for (const child of node.children)
|
|
2258
|
+
recursiveFigmaFileStructureToMap2(child, map);
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
// src/dsm/import/data-source.ts
|
|
2262
|
+
import { z as z88 } from "zod";
|
|
2263
|
+
var DataSourceImportModel = z88.object({
|
|
2264
|
+
id: z88.string(),
|
|
2265
|
+
fileName: z88.string().optional(),
|
|
2266
|
+
thumbnailUrl: z88.string().optional()
|
|
2267
|
+
});
|
|
2268
|
+
|
|
2269
|
+
// src/dsm/import/support/import-model-collections.ts
|
|
2270
|
+
var ImportModelInputCollection = z89.object({
|
|
2271
|
+
source: DataSourceImportModel,
|
|
2272
|
+
tokens: z89.array(DesignTokenImportModelInput).default([]),
|
|
2273
|
+
components: z89.array(ComponentImportModelInput).default([]),
|
|
2274
|
+
assets: z89.array(AssetImportModelInput).default([]),
|
|
2275
|
+
themeUpdates: z89.array(ThemeUpdateImportModelInput).default([]),
|
|
2276
|
+
themes: z89.array(ThemeImportModelInput).default([]),
|
|
2277
|
+
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
2278
|
+
});
|
|
2279
|
+
var ImportModelCollection = z89.object({
|
|
2280
|
+
sources: z89.array(DataSourceImportModel),
|
|
2281
|
+
tokens: z89.array(DesignTokenImportModel).default([]),
|
|
2282
|
+
components: z89.array(ComponentImportModel).default([]),
|
|
2283
|
+
themeUpdates: z89.array(ThemeUpdateImportModel).default([]),
|
|
2284
|
+
themes: z89.array(ThemeImportModel).default([]),
|
|
2285
|
+
figmaFileStructures: z89.array(FigmaFileStructureImportModel)
|
|
2286
|
+
});
|
|
2287
|
+
function addImportModelCollections(lhs, rhs) {
|
|
2288
|
+
return {
|
|
2289
|
+
sources: [...lhs.sources, ...rhs.sources],
|
|
2290
|
+
tokens: [...lhs.tokens, ...rhs.tokens],
|
|
2291
|
+
components: [...lhs.components, ...rhs.components],
|
|
2292
|
+
themeUpdates: [...lhs.themeUpdates, ...rhs.themeUpdates],
|
|
2293
|
+
themes: [...lhs.themes, ...rhs.themes],
|
|
2294
|
+
figmaFileStructures: [...lhs.figmaFileStructures, ...rhs.figmaFileStructures]
|
|
2295
|
+
};
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
// src/dsm/data-sources/import-summary.ts
|
|
2299
|
+
import { z as z90 } from "zod";
|
|
2300
|
+
var FileStructureStats = z90.object({
|
|
2301
|
+
frames: zeroNumberByDefault(),
|
|
2302
|
+
components: zeroNumberByDefault(),
|
|
2303
|
+
componentSets: zeroNumberByDefault()
|
|
2304
|
+
});
|
|
2305
|
+
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
2306
|
+
// Backward compatibility
|
|
2307
|
+
z90.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
2029
2308
|
);
|
|
2030
|
-
var SourceImportSummaryByTokenType =
|
|
2031
|
-
var SourceImportTokenSummary =
|
|
2309
|
+
var SourceImportSummaryByTokenType = z90.record(SourceImportSummaryByTokenTypeKey, z90.number());
|
|
2310
|
+
var SourceImportTokenSummary = z90.object({
|
|
2032
2311
|
tokensCreated: zeroNumberByDefault(),
|
|
2033
2312
|
tokensUpdated: zeroNumberByDefault(),
|
|
2034
2313
|
tokensDeleted: zeroNumberByDefault(),
|
|
@@ -2036,7 +2315,7 @@ var SourceImportTokenSummary = z80.object({
|
|
|
2036
2315
|
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
2037
2316
|
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
2038
2317
|
});
|
|
2039
|
-
var SourceImportComponentSummary =
|
|
2318
|
+
var SourceImportComponentSummary = z90.object({
|
|
2040
2319
|
componentsCreated: zeroNumberByDefault(),
|
|
2041
2320
|
componentsUpdated: zeroNumberByDefault(),
|
|
2042
2321
|
componentsDeleted: zeroNumberByDefault(),
|
|
@@ -2044,172 +2323,173 @@ var SourceImportComponentSummary = z80.object({
|
|
|
2044
2323
|
componentAssetsUpdated: zeroNumberByDefault(),
|
|
2045
2324
|
componentAssetsDeleted: zeroNumberByDefault()
|
|
2046
2325
|
});
|
|
2047
|
-
var SourceImportFrameSummary =
|
|
2326
|
+
var SourceImportFrameSummary = z90.object({
|
|
2048
2327
|
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
2049
|
-
invalidReferencesCount: nullishToOptional(
|
|
2050
|
-
});
|
|
2051
|
-
var SourceImportSummary =
|
|
2052
|
-
sourceId: nullishToOptional(
|
|
2053
|
-
brandId: nullishToOptional(
|
|
2054
|
-
versionId: nullishToOptional(
|
|
2055
|
-
error: nullishToOptional(
|
|
2056
|
-
isFailed:
|
|
2057
|
-
warnings:
|
|
2328
|
+
invalidReferencesCount: nullishToOptional(z90.number().optional())
|
|
2329
|
+
});
|
|
2330
|
+
var SourceImportSummary = z90.object({
|
|
2331
|
+
sourceId: nullishToOptional(z90.string()),
|
|
2332
|
+
brandId: nullishToOptional(z90.string()),
|
|
2333
|
+
versionId: nullishToOptional(z90.string()),
|
|
2334
|
+
error: nullishToOptional(z90.any()),
|
|
2335
|
+
isFailed: z90.boolean(),
|
|
2336
|
+
warnings: z90.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
2058
2337
|
...SourceImportTokenSummary.shape,
|
|
2059
2338
|
...SourceImportComponentSummary.shape,
|
|
2060
2339
|
...FileStructureStats.shape
|
|
2061
2340
|
});
|
|
2062
2341
|
function zeroNumberByDefault() {
|
|
2063
|
-
return
|
|
2342
|
+
return z90.number().nullish().transform((v) => v ?? 0);
|
|
2064
2343
|
}
|
|
2065
2344
|
|
|
2066
2345
|
// src/dsm/data-sources/data-source.ts
|
|
2067
|
-
var DataSourceRemoteType =
|
|
2068
|
-
var DataSourceUploadRemoteSource =
|
|
2069
|
-
var DataSourceFigmaState =
|
|
2070
|
-
var DataSourceAutoImportMode =
|
|
2071
|
-
var DataSourceStats =
|
|
2346
|
+
var DataSourceRemoteType = z91.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
2347
|
+
var DataSourceUploadRemoteSource = z91.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
2348
|
+
var DataSourceFigmaState = z91.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
2349
|
+
var DataSourceAutoImportMode = z91.enum(["Never", "Hourly"]);
|
|
2350
|
+
var DataSourceStats = z91.object({
|
|
2072
2351
|
tokens: zeroNumberByDefault2(),
|
|
2073
2352
|
components: zeroNumberByDefault2(),
|
|
2074
2353
|
assets: zeroNumberByDefault2(),
|
|
2075
2354
|
frames: zeroNumberByDefault2()
|
|
2076
2355
|
});
|
|
2077
|
-
var DataSourceFigmaFileData =
|
|
2078
|
-
lastUpdatedAt:
|
|
2079
|
-
});
|
|
2080
|
-
var DataSourceFigmaFileVersionData = z81.object({
|
|
2081
|
-
id: z81.string(),
|
|
2082
|
-
label: z81.string().optional(),
|
|
2083
|
-
description: z81.string().optional(),
|
|
2084
|
-
createdAt: z81.coerce.date()
|
|
2356
|
+
var DataSourceFigmaFileData = z91.object({
|
|
2357
|
+
lastUpdatedAt: z91.coerce.date()
|
|
2085
2358
|
});
|
|
2086
|
-
var
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2359
|
+
var DataSourceFigmaFileVersionData = z91.object({
|
|
2360
|
+
id: z91.string(),
|
|
2361
|
+
label: z91.string().optional(),
|
|
2362
|
+
description: z91.string().optional(),
|
|
2363
|
+
createdAt: z91.coerce.date()
|
|
2364
|
+
});
|
|
2365
|
+
var DataSourceFigmaScope = z91.object({
|
|
2366
|
+
assets: z91.boolean(),
|
|
2367
|
+
components: z91.boolean(),
|
|
2368
|
+
documentationFrames: z91.boolean(),
|
|
2369
|
+
tokens: z91.boolean(),
|
|
2370
|
+
themePersistentId: z91.string().optional(),
|
|
2371
|
+
isUnpublishedContentFallbackEnabled: z91.boolean()
|
|
2372
|
+
});
|
|
2373
|
+
var DataSourceFigmaImportMetadata = z91.object({
|
|
2095
2374
|
fileData: DataSourceFigmaFileData.optional(),
|
|
2096
2375
|
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
2097
2376
|
});
|
|
2098
|
-
var DataSourceFigmaRemote =
|
|
2099
|
-
type:
|
|
2100
|
-
fileId:
|
|
2101
|
-
preferredCredentialId:
|
|
2102
|
-
ownerId:
|
|
2377
|
+
var DataSourceFigmaRemote = z91.object({
|
|
2378
|
+
type: z91.literal(DataSourceRemoteType.Enum.Figma),
|
|
2379
|
+
fileId: z91.string(),
|
|
2380
|
+
preferredCredentialId: z91.string().optional(),
|
|
2381
|
+
ownerId: z91.string(),
|
|
2103
2382
|
// todo remove or keep to reference who created data source
|
|
2104
|
-
ownerName:
|
|
2383
|
+
ownerName: z91.string(),
|
|
2105
2384
|
// todo probably remove
|
|
2106
2385
|
scope: DataSourceFigmaScope,
|
|
2107
2386
|
state: DataSourceFigmaState,
|
|
2108
|
-
requiresSync:
|
|
2387
|
+
requiresSync: z91.boolean().optional().transform((v) => v ?? false),
|
|
2109
2388
|
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
2110
|
-
downloadChunkSize:
|
|
2111
|
-
figmaRenderChunkSize:
|
|
2112
|
-
maxFileDepth:
|
|
2389
|
+
downloadChunkSize: z91.number().optional(),
|
|
2390
|
+
figmaRenderChunkSize: z91.number().optional(),
|
|
2391
|
+
maxFileDepth: z91.number().optional()
|
|
2113
2392
|
});
|
|
2114
|
-
var DataSourceTokenStudioRemote =
|
|
2115
|
-
type:
|
|
2393
|
+
var DataSourceTokenStudioRemote = z91.object({
|
|
2394
|
+
type: z91.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
2116
2395
|
});
|
|
2117
|
-
var DataSourceUploadImportMetadata =
|
|
2118
|
-
var DataSourceUploadRemote =
|
|
2119
|
-
type:
|
|
2120
|
-
remoteId:
|
|
2396
|
+
var DataSourceUploadImportMetadata = z91.record(z91.any());
|
|
2397
|
+
var DataSourceUploadRemote = z91.object({
|
|
2398
|
+
type: z91.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
2399
|
+
remoteId: z91.string(),
|
|
2121
2400
|
remoteSourceType: DataSourceUploadRemoteSource,
|
|
2122
|
-
lastImportMetadata: DataSourceUploadImportMetadata.optional()
|
|
2401
|
+
lastImportMetadata: DataSourceUploadImportMetadata.optional(),
|
|
2402
|
+
warnings: nullishToOptional(ImportWarning.array())
|
|
2123
2403
|
});
|
|
2124
|
-
var DataSourceRemote =
|
|
2404
|
+
var DataSourceRemote = z91.discriminatedUnion("type", [
|
|
2125
2405
|
DataSourceFigmaRemote,
|
|
2126
2406
|
DataSourceUploadRemote,
|
|
2127
2407
|
DataSourceTokenStudioRemote
|
|
2128
2408
|
]);
|
|
2129
|
-
var DataSource =
|
|
2130
|
-
id:
|
|
2131
|
-
name:
|
|
2132
|
-
thumbnailUrl:
|
|
2133
|
-
createdAt:
|
|
2134
|
-
lastImportedAt:
|
|
2409
|
+
var DataSource = z91.object({
|
|
2410
|
+
id: z91.string(),
|
|
2411
|
+
name: z91.string(),
|
|
2412
|
+
thumbnailUrl: z91.string().optional(),
|
|
2413
|
+
createdAt: z91.coerce.date().optional(),
|
|
2414
|
+
lastImportedAt: z91.coerce.date().optional(),
|
|
2135
2415
|
lastImportSummary: SourceImportSummary.optional(),
|
|
2136
|
-
designSystemId:
|
|
2137
|
-
brandPersistentId:
|
|
2416
|
+
designSystemId: z91.string(),
|
|
2417
|
+
brandPersistentId: z91.string(),
|
|
2138
2418
|
autoImportMode: DataSourceAutoImportMode,
|
|
2139
2419
|
stats: DataSourceStats,
|
|
2140
2420
|
remote: DataSourceRemote,
|
|
2141
|
-
sortOrder:
|
|
2421
|
+
sortOrder: z91.number()
|
|
2142
2422
|
});
|
|
2143
|
-
var DataSourceVersion =
|
|
2144
|
-
id:
|
|
2145
|
-
createdAt:
|
|
2146
|
-
label:
|
|
2147
|
-
description:
|
|
2423
|
+
var DataSourceVersion = z91.object({
|
|
2424
|
+
id: z91.string(),
|
|
2425
|
+
createdAt: z91.coerce.date(),
|
|
2426
|
+
label: z91.string().nullish(),
|
|
2427
|
+
description: z91.string().nullish()
|
|
2148
2428
|
});
|
|
2149
2429
|
function zeroNumberByDefault2() {
|
|
2150
|
-
return
|
|
2430
|
+
return z91.number().nullish().transform((v) => v ?? 0);
|
|
2151
2431
|
}
|
|
2152
2432
|
|
|
2153
2433
|
// src/dsm/data-sources/import-job.ts
|
|
2154
|
-
import { z as
|
|
2155
|
-
var ImportJobState =
|
|
2156
|
-
var ImportJobOperation =
|
|
2434
|
+
import { z as z92 } from "zod";
|
|
2435
|
+
var ImportJobState = z92.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
|
|
2436
|
+
var ImportJobOperation = z92.enum(["Check", "Import"]);
|
|
2157
2437
|
var ImportJob = Entity.extend({
|
|
2158
|
-
designSystemId:
|
|
2159
|
-
designSystemVersionId:
|
|
2160
|
-
sourceIds:
|
|
2438
|
+
designSystemId: z92.string(),
|
|
2439
|
+
designSystemVersionId: z92.string(),
|
|
2440
|
+
sourceIds: z92.array(z92.string()),
|
|
2161
2441
|
state: ImportJobState,
|
|
2162
|
-
createdByUserId:
|
|
2163
|
-
importContextId:
|
|
2164
|
-
error:
|
|
2442
|
+
createdByUserId: z92.string().optional(),
|
|
2443
|
+
importContextId: z92.string(),
|
|
2444
|
+
error: z92.string().optional(),
|
|
2165
2445
|
sourceType: DataSourceRemoteType,
|
|
2166
|
-
importContextCleanedUp:
|
|
2446
|
+
importContextCleanedUp: z92.boolean()
|
|
2167
2447
|
});
|
|
2168
2448
|
|
|
2169
2449
|
// src/dsm/documentation/block-definitions/aux.ts
|
|
2170
|
-
import { z as
|
|
2171
|
-
var PageBlockDefinitionAppearance =
|
|
2172
|
-
isBordered:
|
|
2173
|
-
hasBackground:
|
|
2174
|
-
isEditorPresentationDifferent:
|
|
2175
|
-
showBlockHeaderInEditor:
|
|
2450
|
+
import { z as z93 } from "zod";
|
|
2451
|
+
var PageBlockDefinitionAppearance = z93.object({
|
|
2452
|
+
isBordered: z93.boolean().optional(),
|
|
2453
|
+
hasBackground: z93.boolean().optional(),
|
|
2454
|
+
isEditorPresentationDifferent: z93.boolean().optional(),
|
|
2455
|
+
showBlockHeaderInEditor: z93.boolean().optional()
|
|
2176
2456
|
});
|
|
2177
2457
|
|
|
2178
2458
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2179
|
-
import { z as
|
|
2459
|
+
import { z as z96 } from "zod";
|
|
2180
2460
|
|
|
2181
2461
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2182
|
-
import { z as
|
|
2462
|
+
import { z as z95 } from "zod";
|
|
2183
2463
|
|
|
2184
2464
|
// src/dsm/documentation/block-definitions/variant.ts
|
|
2185
|
-
import { z as
|
|
2186
|
-
var PageBlockDefinitionLayoutType =
|
|
2187
|
-
var PageBlockDefinitionLayoutGap =
|
|
2188
|
-
var PageBlockDefinitionLayoutAlign =
|
|
2189
|
-
var PageBlockDefinitionLayoutResizing =
|
|
2190
|
-
var PageBlockDefinitionLayoutBase =
|
|
2465
|
+
import { z as z94 } from "zod";
|
|
2466
|
+
var PageBlockDefinitionLayoutType = z94.enum(["Column", "Row"]);
|
|
2467
|
+
var PageBlockDefinitionLayoutGap = z94.enum(["Small", "Medium", "Large", "None"]);
|
|
2468
|
+
var PageBlockDefinitionLayoutAlign = z94.enum(["Start", "Center", "End"]);
|
|
2469
|
+
var PageBlockDefinitionLayoutResizing = z94.enum(["Fill", "Hug"]);
|
|
2470
|
+
var PageBlockDefinitionLayoutBase = z94.object({
|
|
2191
2471
|
type: PageBlockDefinitionLayoutType,
|
|
2192
2472
|
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2193
2473
|
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2194
2474
|
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2195
2475
|
});
|
|
2196
2476
|
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2197
|
-
children:
|
|
2198
|
-
});
|
|
2199
|
-
var PageBlockDefinitionVariant =
|
|
2200
|
-
id:
|
|
2201
|
-
name:
|
|
2202
|
-
image:
|
|
2203
|
-
description:
|
|
2204
|
-
documentationLink:
|
|
2477
|
+
children: z94.lazy(() => z94.array(PageBlockDefinitionLayout.or(z94.string())))
|
|
2478
|
+
});
|
|
2479
|
+
var PageBlockDefinitionVariant = z94.object({
|
|
2480
|
+
id: z94.string(),
|
|
2481
|
+
name: z94.string(),
|
|
2482
|
+
image: z94.string().optional(),
|
|
2483
|
+
description: z94.string().optional(),
|
|
2484
|
+
documentationLink: z94.string().optional(),
|
|
2205
2485
|
layout: PageBlockDefinitionLayout,
|
|
2206
|
-
maxColumns:
|
|
2207
|
-
defaultColumns:
|
|
2486
|
+
maxColumns: z94.number().optional(),
|
|
2487
|
+
defaultColumns: z94.number().optional(),
|
|
2208
2488
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2209
2489
|
});
|
|
2210
2490
|
|
|
2211
2491
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2212
|
-
var PageBlockDefinitionPropertyType =
|
|
2492
|
+
var PageBlockDefinitionPropertyType = z95.enum([
|
|
2213
2493
|
"RichText",
|
|
2214
2494
|
"MultiRichText",
|
|
2215
2495
|
"Text",
|
|
@@ -2237,7 +2517,7 @@ var PageBlockDefinitionPropertyType = z85.enum([
|
|
|
2237
2517
|
"Color",
|
|
2238
2518
|
"FigmaComponent"
|
|
2239
2519
|
]);
|
|
2240
|
-
var PageBlockDefinitionRichTextPropertyStyle =
|
|
2520
|
+
var PageBlockDefinitionRichTextPropertyStyle = z95.enum([
|
|
2241
2521
|
"Title1",
|
|
2242
2522
|
"Title2",
|
|
2243
2523
|
"Title3",
|
|
@@ -2247,8 +2527,8 @@ var PageBlockDefinitionRichTextPropertyStyle = z85.enum([
|
|
|
2247
2527
|
"Callout",
|
|
2248
2528
|
"Default"
|
|
2249
2529
|
]);
|
|
2250
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle =
|
|
2251
|
-
var PageBlockDefinitionTextPropertyStyle =
|
|
2530
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z95.enum(["OL", "UL", "Default"]);
|
|
2531
|
+
var PageBlockDefinitionTextPropertyStyle = z95.enum([
|
|
2252
2532
|
"Title1",
|
|
2253
2533
|
"Title2",
|
|
2254
2534
|
"Title3",
|
|
@@ -2262,15 +2542,15 @@ var PageBlockDefinitionTextPropertyStyle = z85.enum([
|
|
|
2262
2542
|
"SmallSemibold",
|
|
2263
2543
|
"Custom"
|
|
2264
2544
|
]);
|
|
2265
|
-
var PageBlockDefinitionTextPropertyColor =
|
|
2266
|
-
var PageBlockDefinitionBooleanPropertyStyle =
|
|
2267
|
-
var PageBlockDefinitionSingleSelectPropertyStyle =
|
|
2545
|
+
var PageBlockDefinitionTextPropertyColor = z95.enum(["Neutral", "NeutralFaded"]);
|
|
2546
|
+
var PageBlockDefinitionBooleanPropertyStyle = z95.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2547
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z95.enum([
|
|
2268
2548
|
"SegmentedControl",
|
|
2269
2549
|
"ToggleButton",
|
|
2270
2550
|
"Select",
|
|
2271
2551
|
"Checkbox"
|
|
2272
2552
|
]);
|
|
2273
|
-
var PageBlockDefinitionSingleSelectPropertyColor =
|
|
2553
|
+
var PageBlockDefinitionSingleSelectPropertyColor = z95.enum([
|
|
2274
2554
|
"Green",
|
|
2275
2555
|
"Red",
|
|
2276
2556
|
"Yellow",
|
|
@@ -2285,78 +2565,78 @@ var PageBlockDefinitionSingleSelectPropertyColor = z85.enum([
|
|
|
2285
2565
|
"Cyan",
|
|
2286
2566
|
"Fuchsia"
|
|
2287
2567
|
]);
|
|
2288
|
-
var IconSet =
|
|
2568
|
+
var IconSet = z95.enum([
|
|
2289
2569
|
"CheckCircle",
|
|
2290
2570
|
"CrossCircle",
|
|
2291
2571
|
"Alert"
|
|
2292
2572
|
]);
|
|
2293
|
-
var PageBlockDefinitionMultiSelectPropertyStyle =
|
|
2294
|
-
var PageBlockDefinitionImageAspectRatio =
|
|
2295
|
-
var PageBlockDefinitionImageWidth =
|
|
2296
|
-
var PageBlockDefinitionSelectChoice =
|
|
2297
|
-
value:
|
|
2298
|
-
name:
|
|
2573
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z95.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2574
|
+
var PageBlockDefinitionImageAspectRatio = z95.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2575
|
+
var PageBlockDefinitionImageWidth = z95.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2576
|
+
var PageBlockDefinitionSelectChoice = z95.object({
|
|
2577
|
+
value: z95.string(),
|
|
2578
|
+
name: z95.string(),
|
|
2299
2579
|
icon: IconSet.optional(),
|
|
2300
|
-
customIconUrl:
|
|
2580
|
+
customIconUrl: z95.string().optional(),
|
|
2301
2581
|
color: PageBlockDefinitionSingleSelectPropertyColor.optional()
|
|
2302
2582
|
});
|
|
2303
|
-
var PageBlockDefinitionUntypedPropertyOptions =
|
|
2304
|
-
var PageBlockDefinitionRichTextOptions =
|
|
2583
|
+
var PageBlockDefinitionUntypedPropertyOptions = z95.record(z95.any());
|
|
2584
|
+
var PageBlockDefinitionRichTextOptions = z95.object({
|
|
2305
2585
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
2306
2586
|
});
|
|
2307
|
-
var PageBlockDefinitionMutiRichTextOptions =
|
|
2587
|
+
var PageBlockDefinitionMutiRichTextOptions = z95.object({
|
|
2308
2588
|
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
2309
2589
|
});
|
|
2310
|
-
var PageBlockDefinitionTextOptions =
|
|
2311
|
-
placeholder:
|
|
2312
|
-
defaultValue:
|
|
2590
|
+
var PageBlockDefinitionTextOptions = z95.object({
|
|
2591
|
+
placeholder: z95.string().optional(),
|
|
2592
|
+
defaultValue: z95.string().optional(),
|
|
2313
2593
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2314
2594
|
color: PageBlockDefinitionTextPropertyColor.optional(),
|
|
2315
|
-
allowLineBreaks:
|
|
2595
|
+
allowLineBreaks: z95.boolean().optional()
|
|
2316
2596
|
});
|
|
2317
|
-
var PageBlockDefinitionSelectOptions =
|
|
2597
|
+
var PageBlockDefinitionSelectOptions = z95.object({
|
|
2318
2598
|
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2319
|
-
defaultChoice:
|
|
2320
|
-
choices:
|
|
2599
|
+
defaultChoice: z95.string(),
|
|
2600
|
+
choices: z95.array(PageBlockDefinitionSelectChoice)
|
|
2321
2601
|
});
|
|
2322
|
-
var PageBlockDefinitionImageOptions =
|
|
2602
|
+
var PageBlockDefinitionImageOptions = z95.object({
|
|
2323
2603
|
width: PageBlockDefinitionImageWidth.optional(),
|
|
2324
2604
|
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2325
|
-
allowCaption:
|
|
2326
|
-
recommendation:
|
|
2605
|
+
allowCaption: z95.boolean().optional(),
|
|
2606
|
+
recommendation: z95.string().optional()
|
|
2327
2607
|
});
|
|
2328
|
-
var PageBlockDefinitionBooleanOptions =
|
|
2329
|
-
defaultvalue:
|
|
2608
|
+
var PageBlockDefinitionBooleanOptions = z95.object({
|
|
2609
|
+
defaultvalue: z95.boolean().optional(),
|
|
2330
2610
|
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2331
2611
|
});
|
|
2332
|
-
var PageBlockDefinitionNumberOptions =
|
|
2333
|
-
defaultValue:
|
|
2334
|
-
min:
|
|
2335
|
-
max:
|
|
2336
|
-
step:
|
|
2337
|
-
placeholder:
|
|
2612
|
+
var PageBlockDefinitionNumberOptions = z95.object({
|
|
2613
|
+
defaultValue: z95.number(),
|
|
2614
|
+
min: z95.number().optional(),
|
|
2615
|
+
max: z95.number().optional(),
|
|
2616
|
+
step: z95.number().optional(),
|
|
2617
|
+
placeholder: z95.string().optional()
|
|
2338
2618
|
});
|
|
2339
|
-
var PageBlockDefinitionComponentOptions =
|
|
2340
|
-
renderLayoutAs:
|
|
2341
|
-
allowPropertySelection:
|
|
2619
|
+
var PageBlockDefinitionComponentOptions = z95.object({
|
|
2620
|
+
renderLayoutAs: z95.enum(["List", "Table"]).optional(),
|
|
2621
|
+
allowPropertySelection: z95.boolean().optional()
|
|
2342
2622
|
});
|
|
2343
|
-
var PageBlockDefinitionProperty =
|
|
2344
|
-
id:
|
|
2345
|
-
name:
|
|
2623
|
+
var PageBlockDefinitionProperty = z95.object({
|
|
2624
|
+
id: z95.string(),
|
|
2625
|
+
name: z95.string(),
|
|
2346
2626
|
type: PageBlockDefinitionPropertyType,
|
|
2347
|
-
description:
|
|
2627
|
+
description: z95.string().optional(),
|
|
2348
2628
|
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2349
|
-
variantOptions:
|
|
2629
|
+
variantOptions: z95.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2350
2630
|
});
|
|
2351
|
-
var PageBlockDefinitionItem =
|
|
2352
|
-
properties:
|
|
2631
|
+
var PageBlockDefinitionItem = z95.object({
|
|
2632
|
+
properties: z95.array(PageBlockDefinitionProperty),
|
|
2353
2633
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2354
|
-
variants:
|
|
2355
|
-
defaultVariantKey:
|
|
2634
|
+
variants: z95.array(PageBlockDefinitionVariant),
|
|
2635
|
+
defaultVariantKey: z95.string()
|
|
2356
2636
|
});
|
|
2357
2637
|
|
|
2358
2638
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2359
|
-
var PageBlockCategory =
|
|
2639
|
+
var PageBlockCategory = z96.enum([
|
|
2360
2640
|
"Text",
|
|
2361
2641
|
"Layout",
|
|
2362
2642
|
"Media",
|
|
@@ -2370,162 +2650,162 @@ var PageBlockCategory = z86.enum([
|
|
|
2370
2650
|
"Data",
|
|
2371
2651
|
"Other"
|
|
2372
2652
|
]);
|
|
2373
|
-
var PageBlockBehaviorDataType =
|
|
2374
|
-
var PageBlockBehaviorSelectionType =
|
|
2375
|
-
var PageBlockDefinitionBehavior =
|
|
2653
|
+
var PageBlockBehaviorDataType = z96.enum(["Item", "Token", "Asset", "Component", "FigmaNode", "FigmaComponent"]);
|
|
2654
|
+
var PageBlockBehaviorSelectionType = z96.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
2655
|
+
var PageBlockDefinitionBehavior = z96.object({
|
|
2376
2656
|
dataType: PageBlockBehaviorDataType,
|
|
2377
|
-
items:
|
|
2378
|
-
numberOfItems:
|
|
2379
|
-
allowLinks:
|
|
2380
|
-
newItemLabel:
|
|
2657
|
+
items: z96.object({
|
|
2658
|
+
numberOfItems: z96.number(),
|
|
2659
|
+
allowLinks: z96.boolean(),
|
|
2660
|
+
newItemLabel: z96.string().optional()
|
|
2381
2661
|
}).optional(),
|
|
2382
|
-
entities:
|
|
2662
|
+
entities: z96.object({
|
|
2383
2663
|
selectionType: PageBlockBehaviorSelectionType,
|
|
2384
|
-
maxSelected:
|
|
2664
|
+
maxSelected: z96.number()
|
|
2385
2665
|
}).optional()
|
|
2386
2666
|
});
|
|
2387
|
-
var PageBlockDefinitionOnboarding =
|
|
2388
|
-
helpText:
|
|
2389
|
-
documentationLink:
|
|
2667
|
+
var PageBlockDefinitionOnboarding = z96.object({
|
|
2668
|
+
helpText: z96.string(),
|
|
2669
|
+
documentationLink: z96.string().optional()
|
|
2390
2670
|
});
|
|
2391
|
-
var PageBlockDefinition =
|
|
2392
|
-
id:
|
|
2393
|
-
name:
|
|
2394
|
-
description:
|
|
2671
|
+
var PageBlockDefinition = z96.object({
|
|
2672
|
+
id: z96.string(),
|
|
2673
|
+
name: z96.string(),
|
|
2674
|
+
description: z96.string(),
|
|
2395
2675
|
category: PageBlockCategory,
|
|
2396
|
-
icon:
|
|
2397
|
-
documentationLink:
|
|
2398
|
-
searchKeywords:
|
|
2676
|
+
icon: z96.string().optional(),
|
|
2677
|
+
documentationLink: z96.string().optional(),
|
|
2678
|
+
searchKeywords: z96.array(z96.string()).optional(),
|
|
2399
2679
|
item: PageBlockDefinitionItem,
|
|
2400
2680
|
behavior: PageBlockDefinitionBehavior,
|
|
2401
|
-
editorOptions:
|
|
2681
|
+
editorOptions: z96.object({
|
|
2402
2682
|
onboarding: PageBlockDefinitionOnboarding.optional()
|
|
2403
2683
|
}),
|
|
2404
2684
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2405
2685
|
});
|
|
2406
2686
|
|
|
2407
2687
|
// src/dsm/documentation/group.ts
|
|
2408
|
-
import { z as
|
|
2409
|
-
var DocumentationPageGroup =
|
|
2410
|
-
type:
|
|
2411
|
-
childType:
|
|
2412
|
-
id:
|
|
2413
|
-
persistentId:
|
|
2414
|
-
shortPersistentId:
|
|
2415
|
-
designSystemVersionId:
|
|
2416
|
-
parentPersistentId:
|
|
2417
|
-
sortOrder:
|
|
2418
|
-
title:
|
|
2419
|
-
slug:
|
|
2420
|
-
userSlug:
|
|
2421
|
-
createdAt:
|
|
2422
|
-
updatedAt:
|
|
2688
|
+
import { z as z97 } from "zod";
|
|
2689
|
+
var DocumentationPageGroup = z97.object({
|
|
2690
|
+
type: z97.literal("ElementGroup"),
|
|
2691
|
+
childType: z97.literal("DocumentationPage"),
|
|
2692
|
+
id: z97.string(),
|
|
2693
|
+
persistentId: z97.string(),
|
|
2694
|
+
shortPersistentId: z97.string(),
|
|
2695
|
+
designSystemVersionId: z97.string(),
|
|
2696
|
+
parentPersistentId: z97.string().nullish(),
|
|
2697
|
+
sortOrder: z97.number(),
|
|
2698
|
+
title: z97.string(),
|
|
2699
|
+
slug: z97.string(),
|
|
2700
|
+
userSlug: z97.string().nullish(),
|
|
2701
|
+
createdAt: z97.coerce.date(),
|
|
2702
|
+
updatedAt: z97.coerce.date()
|
|
2423
2703
|
});
|
|
2424
2704
|
|
|
2425
2705
|
// src/dsm/documentation/link-preview.ts
|
|
2426
|
-
import { z as
|
|
2427
|
-
var DocumentationLinkPreview =
|
|
2428
|
-
title:
|
|
2429
|
-
description:
|
|
2706
|
+
import { z as z98 } from "zod";
|
|
2707
|
+
var DocumentationLinkPreview = z98.object({
|
|
2708
|
+
title: z98.string().optional(),
|
|
2709
|
+
description: z98.string().optional(),
|
|
2430
2710
|
thumbnail: PageBlockImageReference.optional()
|
|
2431
2711
|
});
|
|
2432
2712
|
|
|
2433
2713
|
// src/dsm/documentation/page-anchor.ts
|
|
2434
|
-
import { z as
|
|
2435
|
-
var DocumentationPageAnchor =
|
|
2436
|
-
blockId:
|
|
2437
|
-
level:
|
|
2438
|
-
text:
|
|
2714
|
+
import { z as z99 } from "zod";
|
|
2715
|
+
var DocumentationPageAnchor = z99.object({
|
|
2716
|
+
blockId: z99.string(),
|
|
2717
|
+
level: z99.number(),
|
|
2718
|
+
text: z99.string()
|
|
2439
2719
|
});
|
|
2440
2720
|
|
|
2441
2721
|
// src/dsm/documentation/page-content-backup.ts
|
|
2442
|
-
import { z as
|
|
2443
|
-
var DocumentationPageContentBackup =
|
|
2444
|
-
id:
|
|
2445
|
-
designSystemVersionId:
|
|
2446
|
-
createdAt:
|
|
2447
|
-
updatedAt:
|
|
2448
|
-
documentationPageId:
|
|
2449
|
-
documentationPageName:
|
|
2450
|
-
storagePath:
|
|
2722
|
+
import { z as z100 } from "zod";
|
|
2723
|
+
var DocumentationPageContentBackup = z100.object({
|
|
2724
|
+
id: z100.string(),
|
|
2725
|
+
designSystemVersionId: z100.string(),
|
|
2726
|
+
createdAt: z100.coerce.date(),
|
|
2727
|
+
updatedAt: z100.coerce.date(),
|
|
2728
|
+
documentationPageId: z100.string(),
|
|
2729
|
+
documentationPageName: z100.string(),
|
|
2730
|
+
storagePath: z100.string()
|
|
2451
2731
|
});
|
|
2452
2732
|
|
|
2453
2733
|
// src/dsm/documentation/page-content.ts
|
|
2454
|
-
import { z as
|
|
2455
|
-
var DocumentationPageContentItem =
|
|
2734
|
+
import { z as z101 } from "zod";
|
|
2735
|
+
var DocumentationPageContentItem = z101.discriminatedUnion("type", [
|
|
2456
2736
|
PageBlockEditorModelV2,
|
|
2457
2737
|
PageSectionEditorModelV2
|
|
2458
2738
|
]);
|
|
2459
|
-
var DocumentationPageContentData =
|
|
2460
|
-
items:
|
|
2461
|
-
});
|
|
2462
|
-
var DocumentationPageContent =
|
|
2463
|
-
id:
|
|
2464
|
-
designSystemVersionId:
|
|
2465
|
-
createdAt:
|
|
2466
|
-
updatedAt:
|
|
2467
|
-
documentationPageId:
|
|
2739
|
+
var DocumentationPageContentData = z101.object({
|
|
2740
|
+
items: z101.array(DocumentationPageContentItem)
|
|
2741
|
+
});
|
|
2742
|
+
var DocumentationPageContent = z101.object({
|
|
2743
|
+
id: z101.string(),
|
|
2744
|
+
designSystemVersionId: z101.string(),
|
|
2745
|
+
createdAt: z101.coerce.date(),
|
|
2746
|
+
updatedAt: z101.coerce.date(),
|
|
2747
|
+
documentationPageId: z101.string(),
|
|
2468
2748
|
data: DocumentationPageContentData
|
|
2469
2749
|
});
|
|
2470
2750
|
|
|
2471
2751
|
// src/dsm/documentation/page.ts
|
|
2472
|
-
import { z as
|
|
2473
|
-
var DocumentationPage =
|
|
2474
|
-
type:
|
|
2475
|
-
id:
|
|
2476
|
-
persistentId:
|
|
2477
|
-
shortPersistentId:
|
|
2478
|
-
designSystemVersionId:
|
|
2479
|
-
parentPersistentId:
|
|
2480
|
-
sortOrder:
|
|
2481
|
-
title:
|
|
2482
|
-
slug:
|
|
2483
|
-
userSlug:
|
|
2484
|
-
createdAt:
|
|
2485
|
-
updatedAt:
|
|
2752
|
+
import { z as z102 } from "zod";
|
|
2753
|
+
var DocumentationPage = z102.object({
|
|
2754
|
+
type: z102.literal("DocumentationPage"),
|
|
2755
|
+
id: z102.string(),
|
|
2756
|
+
persistentId: z102.string(),
|
|
2757
|
+
shortPersistentId: z102.string(),
|
|
2758
|
+
designSystemVersionId: z102.string(),
|
|
2759
|
+
parentPersistentId: z102.string().nullish(),
|
|
2760
|
+
sortOrder: z102.number(),
|
|
2761
|
+
title: z102.string(),
|
|
2762
|
+
slug: z102.string(),
|
|
2763
|
+
userSlug: z102.string().nullish(),
|
|
2764
|
+
createdAt: z102.coerce.date(),
|
|
2765
|
+
updatedAt: z102.coerce.date()
|
|
2486
2766
|
});
|
|
2487
2767
|
|
|
2488
2768
|
// src/dsm/documentation/thread.ts
|
|
2489
|
-
import { z as
|
|
2490
|
-
var DocumentationComment =
|
|
2491
|
-
id:
|
|
2492
|
-
authorId:
|
|
2493
|
-
threadId:
|
|
2494
|
-
roomId:
|
|
2495
|
-
createdAt:
|
|
2496
|
-
editedAt:
|
|
2497
|
-
deletedAt:
|
|
2498
|
-
body:
|
|
2499
|
-
});
|
|
2500
|
-
var DocumentationCommentThread =
|
|
2501
|
-
id:
|
|
2502
|
-
roomId:
|
|
2503
|
-
pagePersistentId:
|
|
2504
|
-
brandId:
|
|
2505
|
-
designSystemVersionId:
|
|
2506
|
-
designSystemId:
|
|
2507
|
-
blockId:
|
|
2508
|
-
resolved:
|
|
2509
|
-
createdAt:
|
|
2510
|
-
updatedAt:
|
|
2769
|
+
import { z as z103 } from "zod";
|
|
2770
|
+
var DocumentationComment = z103.object({
|
|
2771
|
+
id: z103.string(),
|
|
2772
|
+
authorId: z103.string(),
|
|
2773
|
+
threadId: z103.string(),
|
|
2774
|
+
roomId: z103.string(),
|
|
2775
|
+
createdAt: z103.coerce.date(),
|
|
2776
|
+
editedAt: z103.coerce.date().optional(),
|
|
2777
|
+
deletedAt: z103.coerce.date().optional(),
|
|
2778
|
+
body: z103.string()
|
|
2779
|
+
});
|
|
2780
|
+
var DocumentationCommentThread = z103.object({
|
|
2781
|
+
id: z103.string(),
|
|
2782
|
+
roomId: z103.string(),
|
|
2783
|
+
pagePersistentId: z103.string(),
|
|
2784
|
+
brandId: z103.string(),
|
|
2785
|
+
designSystemVersionId: z103.string(),
|
|
2786
|
+
designSystemId: z103.string(),
|
|
2787
|
+
blockId: z103.string().optional(),
|
|
2788
|
+
resolved: z103.boolean(),
|
|
2789
|
+
createdAt: z103.coerce.date(),
|
|
2790
|
+
updatedAt: z103.coerce.date()
|
|
2511
2791
|
});
|
|
2512
2792
|
|
|
2513
2793
|
// src/dsm/element-snapshots/base.ts
|
|
2514
|
-
import { z as
|
|
2515
|
-
var DesignElementSnapshotReason =
|
|
2516
|
-
var DesignElementSnapshotBase =
|
|
2517
|
-
id:
|
|
2518
|
-
designSystemVersionId:
|
|
2519
|
-
createdAt:
|
|
2520
|
-
updatedAt:
|
|
2794
|
+
import { z as z104 } from "zod";
|
|
2795
|
+
var DesignElementSnapshotReason = z104.enum(["Publish", "Deletion"]);
|
|
2796
|
+
var DesignElementSnapshotBase = z104.object({
|
|
2797
|
+
id: z104.string(),
|
|
2798
|
+
designSystemVersionId: z104.string(),
|
|
2799
|
+
createdAt: z104.coerce.date(),
|
|
2800
|
+
updatedAt: z104.coerce.date(),
|
|
2521
2801
|
reason: DesignElementSnapshotReason
|
|
2522
2802
|
});
|
|
2523
2803
|
|
|
2524
2804
|
// src/dsm/element-snapshots/documentation-page-snapshot.ts
|
|
2525
|
-
import { z as
|
|
2805
|
+
import { z as z105 } from "zod";
|
|
2526
2806
|
var DocumentationPageSnapshot = DesignElementSnapshotBase.extend({
|
|
2527
2807
|
page: DocumentationPageV2,
|
|
2528
|
-
pageContentHash:
|
|
2808
|
+
pageContentHash: z105.string()
|
|
2529
2809
|
});
|
|
2530
2810
|
|
|
2531
2811
|
// src/dsm/element-snapshots/group-snapshot.ts
|
|
@@ -2533,280 +2813,6 @@ var ElementGroupSnapshot = DesignElementSnapshotBase.extend({
|
|
|
2533
2813
|
group: ElementGroup
|
|
2534
2814
|
});
|
|
2535
2815
|
|
|
2536
|
-
// src/dsm/import/support/figma-files.ts
|
|
2537
|
-
import { z as z96 } from "zod";
|
|
2538
|
-
var FigmaFileDownloadScope = z96.object({
|
|
2539
|
-
styles: z96.boolean(),
|
|
2540
|
-
components: z96.boolean(),
|
|
2541
|
-
currentVersion: z96.literal("__latest__").nullable(),
|
|
2542
|
-
publishedVersion: z96.string().nullable(),
|
|
2543
|
-
downloadChunkSize: z96.number().optional(),
|
|
2544
|
-
maxFileDepth: z96.number().optional()
|
|
2545
|
-
});
|
|
2546
|
-
var FigmaFileAccessData = z96.object({
|
|
2547
|
-
accessToken: z96.string()
|
|
2548
|
-
});
|
|
2549
|
-
|
|
2550
|
-
// src/dsm/import/support/import-context.ts
|
|
2551
|
-
import { z as z97 } from "zod";
|
|
2552
|
-
var ImportFunctionInput = z97.object({
|
|
2553
|
-
importJobId: z97.string(),
|
|
2554
|
-
importContextId: z97.string(),
|
|
2555
|
-
designSystemId: z97.string().optional()
|
|
2556
|
-
});
|
|
2557
|
-
var ImportedFigmaSourceData = z97.object({
|
|
2558
|
-
sourceId: z97.string(),
|
|
2559
|
-
figmaRemote: DataSourceFigmaRemote
|
|
2560
|
-
});
|
|
2561
|
-
var FigmaImportBaseContext = z97.object({
|
|
2562
|
-
designSystemId: z97.string(),
|
|
2563
|
-
/**
|
|
2564
|
-
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
2565
|
-
* mentioned in the `importedSourceDataBySourceId`
|
|
2566
|
-
*
|
|
2567
|
-
* fileId: file data
|
|
2568
|
-
*/
|
|
2569
|
-
fileAccessByFileId: z97.record(FigmaFileAccessData),
|
|
2570
|
-
/**
|
|
2571
|
-
* Figma source data for which import was requested
|
|
2572
|
-
*
|
|
2573
|
-
* sourceId: source data
|
|
2574
|
-
*/
|
|
2575
|
-
importedSourceDataBySourceId: z97.record(ImportedFigmaSourceData),
|
|
2576
|
-
/**
|
|
2577
|
-
* Array of warnings that will be written into the import result summary at the end
|
|
2578
|
-
* of import job execution and displayed by the client.
|
|
2579
|
-
*/
|
|
2580
|
-
importWarnings: z97.record(ImportWarning.array()).default({})
|
|
2581
|
-
});
|
|
2582
|
-
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
2583
|
-
sourcesWithMissingAccess: z97.array(z97.string()).default([]),
|
|
2584
|
-
shadowOpacityOptional: z97.boolean().default(false)
|
|
2585
|
-
});
|
|
2586
|
-
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
2587
|
-
importMetadata: DataSourceFigmaImportMetadata
|
|
2588
|
-
});
|
|
2589
|
-
var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.extend({
|
|
2590
|
-
/**
|
|
2591
|
-
* Describes what to download from each file, this should contain all file id mentioned in
|
|
2592
|
-
* importMetadataBySourceId.
|
|
2593
|
-
*
|
|
2594
|
-
* File id -> file download scope
|
|
2595
|
-
*/
|
|
2596
|
-
fileDownloadScopesByFileId: z97.record(FigmaFileDownloadScope),
|
|
2597
|
-
/**
|
|
2598
|
-
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
2599
|
-
* imported again.
|
|
2600
|
-
*
|
|
2601
|
-
* Source id -> import metadata
|
|
2602
|
-
*/
|
|
2603
|
-
changedImportedSourceDataBySourceId: z97.record(ChangedImportedFigmaSourceData)
|
|
2604
|
-
});
|
|
2605
|
-
|
|
2606
|
-
// src/dsm/import/support/import-model-collections.ts
|
|
2607
|
-
import { z as z105 } from "zod";
|
|
2608
|
-
|
|
2609
|
-
// src/dsm/import/image.ts
|
|
2610
|
-
import { z as z98 } from "zod";
|
|
2611
|
-
var ImageImportModelType = z98.enum(["Url", "FigmaRender"]);
|
|
2612
|
-
var ImageImportModelBase = z98.object({
|
|
2613
|
-
scope: AssetScope
|
|
2614
|
-
});
|
|
2615
|
-
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
2616
|
-
type: z98.literal(ImageImportModelType.enum.Url),
|
|
2617
|
-
url: z98.string(),
|
|
2618
|
-
originKey: z98.string(),
|
|
2619
|
-
extension: z98.string()
|
|
2620
|
-
});
|
|
2621
|
-
var FigmaRenderFormat = z98.enum(["Svg", "Png"]);
|
|
2622
|
-
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
2623
|
-
type: z98.literal(ImageImportModelType.enum.FigmaRender),
|
|
2624
|
-
fileId: z98.string(),
|
|
2625
|
-
fileVersionId: z98.string().optional(),
|
|
2626
|
-
nodeId: z98.string(),
|
|
2627
|
-
originKey: z98.string()
|
|
2628
|
-
});
|
|
2629
|
-
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
2630
|
-
format: z98.literal(FigmaRenderFormat.enum.Png),
|
|
2631
|
-
scale: z98.number()
|
|
2632
|
-
});
|
|
2633
|
-
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
2634
|
-
format: z98.literal(FigmaRenderFormat.enum.Svg)
|
|
2635
|
-
});
|
|
2636
|
-
var FigmaRenderImportModel = z98.discriminatedUnion("format", [
|
|
2637
|
-
FigmaPngRenderImportModel,
|
|
2638
|
-
FigmaSvgRenderImportModel
|
|
2639
|
-
]);
|
|
2640
|
-
var ImageImportModel = z98.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
2641
|
-
|
|
2642
|
-
// src/dsm/import/component.ts
|
|
2643
|
-
import { z as z100 } from "zod";
|
|
2644
|
-
|
|
2645
|
-
// src/dsm/import/base.ts
|
|
2646
|
-
import { z as z99 } from "zod";
|
|
2647
|
-
var ImportModelBase = z99.object({
|
|
2648
|
-
id: z99.string(),
|
|
2649
|
-
meta: ObjectMeta,
|
|
2650
|
-
origin: DesignElementOrigin,
|
|
2651
|
-
brandPersistentId: z99.string(),
|
|
2652
|
-
sortOrder: z99.number()
|
|
2653
|
-
});
|
|
2654
|
-
var ImportModelInputBase = ImportModelBase.omit({
|
|
2655
|
-
brandPersistentId: true,
|
|
2656
|
-
origin: true,
|
|
2657
|
-
sortOrder: true
|
|
2658
|
-
}).extend({
|
|
2659
|
-
originId: z99.string(),
|
|
2660
|
-
originMetadata: z99.record(z99.any())
|
|
2661
|
-
});
|
|
2662
|
-
|
|
2663
|
-
// src/dsm/import/component.ts
|
|
2664
|
-
var ComponentImportModelPart = z100.object({
|
|
2665
|
-
thumbnail: ImageImportModel
|
|
2666
|
-
});
|
|
2667
|
-
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
2668
|
-
isAsset: z100.boolean(),
|
|
2669
|
-
svg: FigmaSvgRenderImportModel.optional(),
|
|
2670
|
-
origin: ComponentOrigin
|
|
2671
|
-
});
|
|
2672
|
-
var ComponentImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
2673
|
-
originMetadata: ComponentOriginPart
|
|
2674
|
-
});
|
|
2675
|
-
var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart.shape).extend({
|
|
2676
|
-
svg: FigmaSvgRenderImportModel,
|
|
2677
|
-
originMetadata: ComponentOriginPart
|
|
2678
|
-
});
|
|
2679
|
-
|
|
2680
|
-
// src/dsm/import/theme.ts
|
|
2681
|
-
import { z as z101 } from "zod";
|
|
2682
|
-
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
2683
|
-
z101.object({
|
|
2684
|
-
id: z101.string(),
|
|
2685
|
-
meta: ObjectMeta
|
|
2686
|
-
})
|
|
2687
|
-
);
|
|
2688
|
-
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
2689
|
-
z101.object({
|
|
2690
|
-
origin: ThemeOverrideOrigin
|
|
2691
|
-
})
|
|
2692
|
-
);
|
|
2693
|
-
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
2694
|
-
z101.object({
|
|
2695
|
-
originId: z101.string(),
|
|
2696
|
-
originMetadata: ThemeOverrideOriginPart
|
|
2697
|
-
})
|
|
2698
|
-
);
|
|
2699
|
-
var ThemeImportModel = z101.object({
|
|
2700
|
-
meta: ObjectMeta,
|
|
2701
|
-
brandPersistentId: z101.string(),
|
|
2702
|
-
originSource: ThemeOriginSource,
|
|
2703
|
-
overrides: z101.array(ThemeOverrideImportModel),
|
|
2704
|
-
sortOrder: z101.number()
|
|
2705
|
-
});
|
|
2706
|
-
var ThemeImportModelInput = z101.object({
|
|
2707
|
-
meta: ObjectMeta,
|
|
2708
|
-
originObjects: z101.array(ThemeOriginObject),
|
|
2709
|
-
overrides: z101.array(ThemeOverrideImportModelInput)
|
|
2710
|
-
});
|
|
2711
|
-
var ThemeUpdateImportModel = z101.object({
|
|
2712
|
-
themePersistentId: z101.string(),
|
|
2713
|
-
overrides: z101.array(ThemeOverrideImportModel)
|
|
2714
|
-
});
|
|
2715
|
-
var ThemeUpdateImportModelInput = z101.object({
|
|
2716
|
-
themePersistentId: z101.string(),
|
|
2717
|
-
overrides: z101.array(ThemeOverrideImportModelInput)
|
|
2718
|
-
});
|
|
2719
|
-
|
|
2720
|
-
// src/dsm/import/tokens.ts
|
|
2721
|
-
import { z as z102 } from "zod";
|
|
2722
|
-
var DesignTokenImportModelPart = z102.object({
|
|
2723
|
-
collection: z102.string().optional()
|
|
2724
|
-
});
|
|
2725
|
-
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2726
|
-
origin: DesignTokenOrigin
|
|
2727
|
-
});
|
|
2728
|
-
var DesignTokenImportModelInputBase = ImportModelInputBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2729
|
-
originMetadata: DesignTokenOriginPart
|
|
2730
|
-
});
|
|
2731
|
-
var DesignTokenImportModel = DesignTokenTypedData.and(DesignTokenImportModelBase);
|
|
2732
|
-
var DesignTokenImportModelInput = DesignTokenTypedData.and(DesignTokenImportModelInputBase);
|
|
2733
|
-
function isDesignTokenImportModelOfType(designToken, type) {
|
|
2734
|
-
return designToken.type === type;
|
|
2735
|
-
}
|
|
2736
|
-
function designTokenImportModelTypeFilter(type) {
|
|
2737
|
-
return (designToken) => isDesignTokenImportModelOfType(designToken, type);
|
|
2738
|
-
}
|
|
2739
|
-
|
|
2740
|
-
// src/dsm/import/figma-frames.ts
|
|
2741
|
-
import { z as z103 } from "zod";
|
|
2742
|
-
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
2743
|
-
image: FigmaPngRenderImportModel
|
|
2744
|
-
});
|
|
2745
|
-
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
2746
|
-
children: z103.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
2747
|
-
});
|
|
2748
|
-
var FigmaFileStructureImportModelPart = z103.object({
|
|
2749
|
-
data: z103.object({
|
|
2750
|
-
rootNode: FigmaFileStructureNodeImportModel,
|
|
2751
|
-
assetsInFile: FigmaFileStructureStatistics
|
|
2752
|
-
})
|
|
2753
|
-
});
|
|
2754
|
-
var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImportModelPart.shape).extend({
|
|
2755
|
-
origin: FigmaFileStructureOrigin
|
|
2756
|
-
});
|
|
2757
|
-
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
2758
|
-
FigmaFileStructureImportModelPart.shape
|
|
2759
|
-
).extend({
|
|
2760
|
-
fileVersionId: z103.string()
|
|
2761
|
-
});
|
|
2762
|
-
function figmaFileStructureImportModelToMap(root) {
|
|
2763
|
-
const map = /* @__PURE__ */ new Map();
|
|
2764
|
-
recursiveFigmaFileStructureToMap2(root, map);
|
|
2765
|
-
return map;
|
|
2766
|
-
}
|
|
2767
|
-
function recursiveFigmaFileStructureToMap2(node, map) {
|
|
2768
|
-
map.set(node.id, node);
|
|
2769
|
-
for (const child of node.children)
|
|
2770
|
-
recursiveFigmaFileStructureToMap2(child, map);
|
|
2771
|
-
}
|
|
2772
|
-
|
|
2773
|
-
// src/dsm/import/data-source.ts
|
|
2774
|
-
import { z as z104 } from "zod";
|
|
2775
|
-
var DataSourceImportModel = z104.object({
|
|
2776
|
-
id: z104.string(),
|
|
2777
|
-
fileName: z104.string().optional(),
|
|
2778
|
-
thumbnailUrl: z104.string().optional()
|
|
2779
|
-
});
|
|
2780
|
-
|
|
2781
|
-
// src/dsm/import/support/import-model-collections.ts
|
|
2782
|
-
var ImportModelInputCollection = z105.object({
|
|
2783
|
-
source: DataSourceImportModel,
|
|
2784
|
-
tokens: z105.array(DesignTokenImportModelInput).default([]),
|
|
2785
|
-
components: z105.array(ComponentImportModelInput).default([]),
|
|
2786
|
-
assets: z105.array(AssetImportModelInput).default([]),
|
|
2787
|
-
themeUpdates: z105.array(ThemeUpdateImportModelInput).default([]),
|
|
2788
|
-
themes: z105.array(ThemeImportModelInput).default([]),
|
|
2789
|
-
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
2790
|
-
});
|
|
2791
|
-
var ImportModelCollection = z105.object({
|
|
2792
|
-
sources: z105.array(DataSourceImportModel),
|
|
2793
|
-
tokens: z105.array(DesignTokenImportModel).default([]),
|
|
2794
|
-
components: z105.array(ComponentImportModel).default([]),
|
|
2795
|
-
themeUpdates: z105.array(ThemeUpdateImportModel).default([]),
|
|
2796
|
-
themes: z105.array(ThemeImportModel).default([]),
|
|
2797
|
-
figmaFileStructures: z105.array(FigmaFileStructureImportModel)
|
|
2798
|
-
});
|
|
2799
|
-
function addImportModelCollections(lhs, rhs) {
|
|
2800
|
-
return {
|
|
2801
|
-
sources: [...lhs.sources, ...rhs.sources],
|
|
2802
|
-
tokens: [...lhs.tokens, ...rhs.tokens],
|
|
2803
|
-
components: [...lhs.components, ...rhs.components],
|
|
2804
|
-
themeUpdates: [...lhs.themeUpdates, ...rhs.themeUpdates],
|
|
2805
|
-
themes: [...lhs.themes, ...rhs.themes],
|
|
2806
|
-
figmaFileStructures: [...lhs.figmaFileStructures, ...rhs.figmaFileStructures]
|
|
2807
|
-
};
|
|
2808
|
-
}
|
|
2809
|
-
|
|
2810
2816
|
// src/dsm/views/column.ts
|
|
2811
2817
|
import { z as z106 } from "zod";
|
|
2812
2818
|
var ElementViewBaseColumnType = z106.enum(["Name", "Description", "Value", "UpdatedAt"]);
|