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