@supernova-studio/model 0.54.14 → 0.54.16
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 +7524 -7524
- package/dist/index.d.ts +7524 -7524
- package/dist/index.js +110 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1283 -1283
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/design-system.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -456,43 +456,33 @@ function isImportedAsset(asset) {
|
|
|
456
456
|
return !!asset.originKey;
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
// src/dsm/brand.ts
|
|
460
|
-
import { z as z22 } from "zod";
|
|
461
|
-
var Brand = z22.object({
|
|
462
|
-
id: z22.string(),
|
|
463
|
-
designSystemVersionId: z22.string(),
|
|
464
|
-
persistentId: z22.string(),
|
|
465
|
-
name: z22.string(),
|
|
466
|
-
description: z22.string()
|
|
467
|
-
});
|
|
468
|
-
|
|
469
459
|
// src/dsm/components/asset-rendering.ts
|
|
470
|
-
import { z as
|
|
460
|
+
import { z as z99 } from "zod";
|
|
471
461
|
|
|
472
462
|
// src/dsm/import/support/figma-files.ts
|
|
473
|
-
import { z as
|
|
474
|
-
var FigmaFileDownloadScope =
|
|
475
|
-
styles:
|
|
476
|
-
components:
|
|
477
|
-
componentSets:
|
|
478
|
-
currentVersion:
|
|
479
|
-
publishedVersion:
|
|
480
|
-
downloadChunkSize:
|
|
481
|
-
maxFileDepth:
|
|
463
|
+
import { z as z22 } from "zod";
|
|
464
|
+
var FigmaFileDownloadScope = z22.object({
|
|
465
|
+
styles: z22.boolean(),
|
|
466
|
+
components: z22.boolean(),
|
|
467
|
+
componentSets: z22.boolean(),
|
|
468
|
+
currentVersion: z22.literal("__latest__").nullable(),
|
|
469
|
+
publishedVersion: z22.string().nullable(),
|
|
470
|
+
downloadChunkSize: z22.number().optional(),
|
|
471
|
+
maxFileDepth: z22.number().optional()
|
|
482
472
|
});
|
|
483
|
-
var FigmaFileAccessData =
|
|
484
|
-
accessToken:
|
|
473
|
+
var FigmaFileAccessData = z22.object({
|
|
474
|
+
accessToken: z22.string()
|
|
485
475
|
});
|
|
486
476
|
|
|
487
477
|
// src/dsm/import/support/import-context.ts
|
|
488
|
-
import { z as
|
|
478
|
+
import { z as z90 } from "zod";
|
|
489
479
|
|
|
490
480
|
// src/dsm/data-sources/data-source.ts
|
|
491
|
-
import { z as
|
|
481
|
+
import { z as z88 } from "zod";
|
|
492
482
|
|
|
493
483
|
// src/dsm/import/warning.ts
|
|
494
|
-
import { z as
|
|
495
|
-
var ImportWarningType =
|
|
484
|
+
import { z as z23 } from "zod";
|
|
485
|
+
var ImportWarningType = z23.enum([
|
|
496
486
|
"NoVersionFound",
|
|
497
487
|
"UnsupportedFill",
|
|
498
488
|
"UnsupportedStroke",
|
|
@@ -508,23 +498,23 @@ var ImportWarningType = z24.enum([
|
|
|
508
498
|
"NoUnpublishedStyles",
|
|
509
499
|
"ReferenceResolutionFailed"
|
|
510
500
|
]);
|
|
511
|
-
var ImportWarning =
|
|
501
|
+
var ImportWarning = z23.object({
|
|
512
502
|
warningType: ImportWarningType,
|
|
513
|
-
componentId:
|
|
514
|
-
componentName:
|
|
515
|
-
styleId:
|
|
516
|
-
styleName:
|
|
517
|
-
unsupportedStyleValueType:
|
|
518
|
-
referenceId:
|
|
503
|
+
componentId: z23.string().optional(),
|
|
504
|
+
componentName: z23.string().optional(),
|
|
505
|
+
styleId: z23.string().optional(),
|
|
506
|
+
styleName: z23.string().optional(),
|
|
507
|
+
unsupportedStyleValueType: z23.string().optional(),
|
|
508
|
+
referenceId: z23.string().optional()
|
|
519
509
|
});
|
|
520
510
|
|
|
521
511
|
// src/dsm/data-sources/import-summary.ts
|
|
522
|
-
import { z as
|
|
512
|
+
import { z as z87 } from "zod";
|
|
523
513
|
|
|
524
514
|
// src/dsm/elements/data/base.ts
|
|
525
|
-
import { z as
|
|
526
|
-
var TokenDataAliasSchema =
|
|
527
|
-
aliasTo:
|
|
515
|
+
import { z as z24 } from "zod";
|
|
516
|
+
var TokenDataAliasSchema = z24.object({
|
|
517
|
+
aliasTo: z24.string().optional().nullable().transform((v) => v ?? void 0)
|
|
528
518
|
});
|
|
529
519
|
function tokenAliasOrValue(value) {
|
|
530
520
|
return TokenDataAliasSchema.extend({
|
|
@@ -533,68 +523,68 @@ function tokenAliasOrValue(value) {
|
|
|
533
523
|
}
|
|
534
524
|
|
|
535
525
|
// src/dsm/elements/data/blur.ts
|
|
536
|
-
import { z as
|
|
526
|
+
import { z as z26 } from "zod";
|
|
537
527
|
|
|
538
528
|
// src/dsm/elements/data/dimension.ts
|
|
539
|
-
import { z as
|
|
540
|
-
var DimensionUnit =
|
|
541
|
-
var DimensionValue =
|
|
529
|
+
import { z as z25 } from "zod";
|
|
530
|
+
var DimensionUnit = z25.enum(["Pixels", "Percent", "Rem", "Ms", "Raw", "Points"]);
|
|
531
|
+
var DimensionValue = z25.object({
|
|
542
532
|
unit: DimensionUnit,
|
|
543
|
-
measure:
|
|
533
|
+
measure: z25.number()
|
|
544
534
|
});
|
|
545
535
|
var DimensionTokenData = tokenAliasOrValue(DimensionValue);
|
|
546
536
|
|
|
547
537
|
// src/dsm/elements/data/blur.ts
|
|
548
|
-
var BlurType =
|
|
549
|
-
var BlurValue =
|
|
538
|
+
var BlurType = z26.enum(["Layer", "Background"]);
|
|
539
|
+
var BlurValue = z26.object({
|
|
550
540
|
type: BlurType,
|
|
551
541
|
radius: DimensionTokenData
|
|
552
542
|
});
|
|
553
543
|
var BlurTokenData = tokenAliasOrValue(BlurValue);
|
|
554
544
|
|
|
555
545
|
// src/dsm/elements/data/border-radius.ts
|
|
556
|
-
import { z as
|
|
557
|
-
var BorderRadiusUnit =
|
|
558
|
-
var BorderRadiusValue =
|
|
546
|
+
import { z as z27 } from "zod";
|
|
547
|
+
var BorderRadiusUnit = z27.enum(["Pixels", "Rem", "Percent"]);
|
|
548
|
+
var BorderRadiusValue = z27.object({
|
|
559
549
|
unit: BorderRadiusUnit,
|
|
560
|
-
measure:
|
|
550
|
+
measure: z27.number()
|
|
561
551
|
});
|
|
562
552
|
var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
|
|
563
553
|
|
|
564
554
|
// src/dsm/elements/data/border-width.ts
|
|
565
|
-
import { z as
|
|
566
|
-
var BorderWidthUnit =
|
|
567
|
-
var BorderWidthValue =
|
|
555
|
+
import { z as z28 } from "zod";
|
|
556
|
+
var BorderWidthUnit = z28.enum(["Pixels"]);
|
|
557
|
+
var BorderWidthValue = z28.object({
|
|
568
558
|
unit: BorderWidthUnit,
|
|
569
|
-
measure:
|
|
559
|
+
measure: z28.number()
|
|
570
560
|
});
|
|
571
561
|
var BorderWidthTokenData = tokenAliasOrValue(BorderWidthValue);
|
|
572
562
|
|
|
573
563
|
// src/dsm/elements/data/border.ts
|
|
574
|
-
import { z as
|
|
564
|
+
import { z as z31 } from "zod";
|
|
575
565
|
|
|
576
566
|
// src/dsm/elements/data/color.ts
|
|
577
|
-
import { z as
|
|
567
|
+
import { z as z30 } from "zod";
|
|
578
568
|
|
|
579
569
|
// src/dsm/elements/data/opacity.ts
|
|
580
|
-
import { z as
|
|
581
|
-
var OpacityValue =
|
|
582
|
-
unit:
|
|
583
|
-
measure:
|
|
570
|
+
import { z as z29 } from "zod";
|
|
571
|
+
var OpacityValue = z29.object({
|
|
572
|
+
unit: z29.enum(["Raw", "Pixels"]),
|
|
573
|
+
measure: z29.number()
|
|
584
574
|
});
|
|
585
575
|
var OpacityTokenData = tokenAliasOrValue(OpacityValue);
|
|
586
576
|
|
|
587
577
|
// src/dsm/elements/data/color.ts
|
|
588
|
-
var ColorValue =
|
|
578
|
+
var ColorValue = z30.object({
|
|
589
579
|
opacity: OpacityTokenData,
|
|
590
|
-
color:
|
|
580
|
+
color: z30.string().or(TokenDataAliasSchema)
|
|
591
581
|
});
|
|
592
582
|
var ColorTokenData = tokenAliasOrValue(ColorValue);
|
|
593
583
|
|
|
594
584
|
// src/dsm/elements/data/border.ts
|
|
595
|
-
var BorderPosition =
|
|
596
|
-
var BorderStyle =
|
|
597
|
-
var BorderValue =
|
|
585
|
+
var BorderPosition = z31.enum(["Inside", "Center", "Outside"]);
|
|
586
|
+
var BorderStyle = z31.enum(["Dashed", "Dotted", "Solid", "Groove"]);
|
|
587
|
+
var BorderValue = z31.object({
|
|
598
588
|
color: ColorTokenData,
|
|
599
589
|
width: BorderWidthTokenData,
|
|
600
590
|
position: BorderPosition,
|
|
@@ -603,66 +593,66 @@ var BorderValue = z32.object({
|
|
|
603
593
|
var BorderTokenData = tokenAliasOrValue(BorderValue);
|
|
604
594
|
|
|
605
595
|
// src/dsm/elements/data/component.ts
|
|
606
|
-
import { z as
|
|
596
|
+
import { z as z33 } from "zod";
|
|
607
597
|
|
|
608
598
|
// src/dsm/elements/component-properties.ts
|
|
609
|
-
import { z as
|
|
610
|
-
var FigmaComponentPropertyType =
|
|
611
|
-
var FigmaComponentPropertyOrigin =
|
|
612
|
-
id:
|
|
599
|
+
import { z as z32 } from "zod";
|
|
600
|
+
var FigmaComponentPropertyType = z32.enum(["Boolean", "InstanceSwap", "Variant", "Text"]);
|
|
601
|
+
var FigmaComponentPropertyOrigin = z32.object({
|
|
602
|
+
id: z32.string()
|
|
613
603
|
});
|
|
614
|
-
var FigmaComponentPropertyBase =
|
|
615
|
-
id:
|
|
616
|
-
name:
|
|
604
|
+
var FigmaComponentPropertyBase = z32.object({
|
|
605
|
+
id: z32.string(),
|
|
606
|
+
name: z32.string()
|
|
617
607
|
});
|
|
618
608
|
var FigmaComponentBooleanProperty = FigmaComponentPropertyBase.extend({
|
|
619
|
-
type:
|
|
620
|
-
defaultValue:
|
|
609
|
+
type: z32.literal(FigmaComponentPropertyType.enum.Boolean),
|
|
610
|
+
defaultValue: z32.boolean()
|
|
621
611
|
});
|
|
622
612
|
var FigmaComponentInstanceSwapProperty = FigmaComponentPropertyBase.extend({
|
|
623
|
-
type:
|
|
624
|
-
defaultValue:
|
|
613
|
+
type: z32.literal(FigmaComponentPropertyType.enum.InstanceSwap),
|
|
614
|
+
defaultValue: z32.string()
|
|
625
615
|
});
|
|
626
616
|
var FigmaComponentVariantProperty = FigmaComponentPropertyBase.extend({
|
|
627
|
-
type:
|
|
628
|
-
defaultValue:
|
|
629
|
-
options:
|
|
617
|
+
type: z32.literal(FigmaComponentPropertyType.enum.Variant),
|
|
618
|
+
defaultValue: z32.string(),
|
|
619
|
+
options: z32.array(z32.string())
|
|
630
620
|
});
|
|
631
621
|
var FigmaComponentTextProperty = FigmaComponentPropertyBase.extend({
|
|
632
|
-
type:
|
|
633
|
-
id:
|
|
634
|
-
defaultValue:
|
|
622
|
+
type: z32.literal(FigmaComponentPropertyType.enum.Text),
|
|
623
|
+
id: z32.string(),
|
|
624
|
+
defaultValue: z32.string()
|
|
635
625
|
});
|
|
636
|
-
var FigmaComponentProperty =
|
|
626
|
+
var FigmaComponentProperty = z32.discriminatedUnion("type", [
|
|
637
627
|
FigmaComponentBooleanProperty,
|
|
638
628
|
FigmaComponentInstanceSwapProperty,
|
|
639
629
|
FigmaComponentTextProperty,
|
|
640
630
|
FigmaComponentVariantProperty
|
|
641
631
|
]);
|
|
642
|
-
var FigmaComponentPropertyMap =
|
|
632
|
+
var FigmaComponentPropertyMap = z32.record(z32.string(), FigmaComponentProperty);
|
|
643
633
|
|
|
644
634
|
// src/dsm/elements/data/component.ts
|
|
645
|
-
var ComponentElementData =
|
|
646
|
-
value:
|
|
647
|
-
thumbnailImage:
|
|
648
|
-
value:
|
|
649
|
-
url:
|
|
650
|
-
assetId:
|
|
635
|
+
var ComponentElementData = z33.object({
|
|
636
|
+
value: z33.object({
|
|
637
|
+
thumbnailImage: z33.object({
|
|
638
|
+
value: z33.object({
|
|
639
|
+
url: z33.string(),
|
|
640
|
+
assetId: z33.string()
|
|
651
641
|
})
|
|
652
642
|
}),
|
|
653
|
-
svg:
|
|
654
|
-
value:
|
|
655
|
-
url:
|
|
656
|
-
assetId:
|
|
643
|
+
svg: z33.object({
|
|
644
|
+
value: z33.object({
|
|
645
|
+
url: z33.string(),
|
|
646
|
+
assetId: z33.string()
|
|
657
647
|
})
|
|
658
648
|
}).optional(),
|
|
659
|
-
parentComponentPersistentId: nullishToOptional(
|
|
649
|
+
parentComponentPersistentId: nullishToOptional(z33.string()),
|
|
660
650
|
componentPropertyDefinitions: nullishToOptional(FigmaComponentPropertyMap)
|
|
661
651
|
})
|
|
662
652
|
});
|
|
663
653
|
|
|
664
654
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
665
|
-
import { z as
|
|
655
|
+
import { z as z40 } from "zod";
|
|
666
656
|
|
|
667
657
|
// src/utils/errors.ts
|
|
668
658
|
var SupernovaException = class _SupernovaException extends Error {
|
|
@@ -838,26 +828,26 @@ function areShallowObjectsEqual(lhs, rhs) {
|
|
|
838
828
|
}
|
|
839
829
|
|
|
840
830
|
// src/utils/content-loader-instruction.ts
|
|
841
|
-
import { z as
|
|
842
|
-
var ContentLoadInstruction =
|
|
843
|
-
from:
|
|
844
|
-
to:
|
|
845
|
-
authorizationHeaderKvsId:
|
|
846
|
-
timeout:
|
|
847
|
-
});
|
|
848
|
-
var ContentLoaderPayload =
|
|
849
|
-
type:
|
|
831
|
+
import { z as z34 } from "zod";
|
|
832
|
+
var ContentLoadInstruction = z34.object({
|
|
833
|
+
from: z34.string(),
|
|
834
|
+
to: z34.string(),
|
|
835
|
+
authorizationHeaderKvsId: z34.string().optional(),
|
|
836
|
+
timeout: z34.number().optional()
|
|
837
|
+
});
|
|
838
|
+
var ContentLoaderPayload = z34.object({
|
|
839
|
+
type: z34.literal("Single"),
|
|
850
840
|
instruction: ContentLoadInstruction
|
|
851
841
|
}).or(
|
|
852
|
-
|
|
853
|
-
type:
|
|
854
|
-
loadingChunkSize:
|
|
855
|
-
instructions:
|
|
842
|
+
z34.object({
|
|
843
|
+
type: z34.literal("Multiple"),
|
|
844
|
+
loadingChunkSize: z34.number().optional(),
|
|
845
|
+
instructions: z34.array(ContentLoadInstruction)
|
|
856
846
|
})
|
|
857
847
|
).or(
|
|
858
|
-
|
|
859
|
-
type:
|
|
860
|
-
location:
|
|
848
|
+
z34.object({
|
|
849
|
+
type: z34.literal("S3"),
|
|
850
|
+
location: z34.string()
|
|
861
851
|
})
|
|
862
852
|
);
|
|
863
853
|
|
|
@@ -1557,63 +1547,63 @@ function isSlugReserved(slug) {
|
|
|
1557
1547
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
1558
1548
|
|
|
1559
1549
|
// src/dsm/properties/property-definition.ts
|
|
1560
|
-
import { z as
|
|
1561
|
-
var ElementPropertyTypeSchema =
|
|
1562
|
-
var ElementPropertyTargetType =
|
|
1563
|
-
var ElementPropertyLinkType =
|
|
1550
|
+
import { z as z35 } from "zod";
|
|
1551
|
+
var ElementPropertyTypeSchema = z35.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
1552
|
+
var ElementPropertyTargetType = z35.enum(["Token", "Component", "DocumentationPage"]);
|
|
1553
|
+
var ElementPropertyLinkType = z35.enum(["FigmaComponent", "DocumentationPage"]);
|
|
1564
1554
|
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
1565
|
-
var ColorTokenInlineData =
|
|
1566
|
-
value:
|
|
1555
|
+
var ColorTokenInlineData = z35.object({
|
|
1556
|
+
value: z35.string()
|
|
1567
1557
|
});
|
|
1568
|
-
var ElementPropertyDefinitionOption =
|
|
1569
|
-
id:
|
|
1570
|
-
name:
|
|
1558
|
+
var ElementPropertyDefinitionOption = z35.object({
|
|
1559
|
+
id: z35.string(),
|
|
1560
|
+
name: z35.string(),
|
|
1571
1561
|
backgroundColor: ColorTokenInlineData.optional()
|
|
1572
1562
|
});
|
|
1573
|
-
var ElementPropertyDefinition =
|
|
1574
|
-
id:
|
|
1575
|
-
designSystemVersionId:
|
|
1576
|
-
persistentId:
|
|
1577
|
-
name:
|
|
1578
|
-
codeName:
|
|
1579
|
-
description:
|
|
1563
|
+
var ElementPropertyDefinition = z35.object({
|
|
1564
|
+
id: z35.string(),
|
|
1565
|
+
designSystemVersionId: z35.string(),
|
|
1566
|
+
persistentId: z35.string(),
|
|
1567
|
+
name: z35.string(),
|
|
1568
|
+
codeName: z35.string().regex(CODE_NAME_REGEX),
|
|
1569
|
+
description: z35.string(),
|
|
1580
1570
|
type: ElementPropertyTypeSchema,
|
|
1581
1571
|
targetElementType: ElementPropertyTargetType,
|
|
1582
|
-
options:
|
|
1572
|
+
options: z35.array(ElementPropertyDefinitionOption).optional(),
|
|
1583
1573
|
linkElementType: ElementPropertyLinkType.optional()
|
|
1584
1574
|
});
|
|
1585
1575
|
var ElementPropertyType = ElementPropertyTypeSchema.enum;
|
|
1586
1576
|
|
|
1587
1577
|
// src/dsm/properties/property-value.ts
|
|
1588
|
-
import { z as
|
|
1589
|
-
var ElementPropertyValue =
|
|
1590
|
-
id:
|
|
1591
|
-
designSystemVersionId:
|
|
1592
|
-
targetElementPersistentId:
|
|
1593
|
-
definitionPersistentId:
|
|
1594
|
-
stringValue:
|
|
1595
|
-
numberValue:
|
|
1596
|
-
booleanValue:
|
|
1597
|
-
referenceValue:
|
|
1598
|
-
referenceValuePreview:
|
|
1578
|
+
import { z as z36 } from "zod";
|
|
1579
|
+
var ElementPropertyValue = z36.object({
|
|
1580
|
+
id: z36.string(),
|
|
1581
|
+
designSystemVersionId: z36.string(),
|
|
1582
|
+
targetElementPersistentId: z36.string(),
|
|
1583
|
+
definitionPersistentId: z36.string(),
|
|
1584
|
+
stringValue: z36.string().nullish(),
|
|
1585
|
+
numberValue: z36.number().nullish(),
|
|
1586
|
+
booleanValue: z36.boolean().nullish(),
|
|
1587
|
+
referenceValue: z36.string().nullish(),
|
|
1588
|
+
referenceValuePreview: z36.string().optional()
|
|
1599
1589
|
});
|
|
1600
1590
|
|
|
1601
1591
|
// src/dsm/elements/primitives/point.ts
|
|
1602
|
-
import { z as
|
|
1603
|
-
var Point2D =
|
|
1604
|
-
x:
|
|
1605
|
-
y:
|
|
1592
|
+
import { z as z37 } from "zod";
|
|
1593
|
+
var Point2D = z37.object({
|
|
1594
|
+
x: z37.number(),
|
|
1595
|
+
y: z37.number()
|
|
1606
1596
|
});
|
|
1607
1597
|
|
|
1608
1598
|
// src/dsm/elements/primitives/size.ts
|
|
1609
|
-
import { z as
|
|
1599
|
+
import { z as z38 } from "zod";
|
|
1610
1600
|
var nullSize = { height: -1, width: -1 };
|
|
1611
1601
|
function isNullSize(size) {
|
|
1612
1602
|
return size.height === nullSize.height && size.width === nullSize.width;
|
|
1613
1603
|
}
|
|
1614
|
-
var Size =
|
|
1615
|
-
width:
|
|
1616
|
-
height:
|
|
1604
|
+
var Size = z38.object({
|
|
1605
|
+
width: z38.number().nullish().transform((v) => v ?? nullSize.width),
|
|
1606
|
+
height: z38.number().nullish().transform((v) => v ?? nullSize.height)
|
|
1617
1607
|
});
|
|
1618
1608
|
var SizeOrUndefined = Size.optional().transform((v) => {
|
|
1619
1609
|
if (!v)
|
|
@@ -1624,8 +1614,8 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
1624
1614
|
});
|
|
1625
1615
|
|
|
1626
1616
|
// src/dsm/elements/raw-element.ts
|
|
1627
|
-
import { z as
|
|
1628
|
-
var DesignTokenType =
|
|
1617
|
+
import { z as z39 } from "zod";
|
|
1618
|
+
var DesignTokenType = z39.enum([
|
|
1629
1619
|
"Color",
|
|
1630
1620
|
"Border",
|
|
1631
1621
|
"Gradient",
|
|
@@ -1656,7 +1646,7 @@ var DesignTokenType = z40.enum([
|
|
|
1656
1646
|
]);
|
|
1657
1647
|
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
1658
1648
|
var DesignElementType = DesignTokenType.or(
|
|
1659
|
-
|
|
1649
|
+
z39.enum([
|
|
1660
1650
|
"Component",
|
|
1661
1651
|
"Theme",
|
|
1662
1652
|
"Documentation",
|
|
@@ -1671,7 +1661,7 @@ var DesignElementType = DesignTokenType.or(
|
|
|
1671
1661
|
function isTokenType(type) {
|
|
1672
1662
|
return DesignTokenType.safeParse(type).success;
|
|
1673
1663
|
}
|
|
1674
|
-
var DesignElementCategory =
|
|
1664
|
+
var DesignElementCategory = z39.enum([
|
|
1675
1665
|
"Token",
|
|
1676
1666
|
"Component",
|
|
1677
1667
|
"DesignSystemComponent",
|
|
@@ -1679,39 +1669,39 @@ var DesignElementCategory = z40.enum([
|
|
|
1679
1669
|
"Theme",
|
|
1680
1670
|
"PageBlock"
|
|
1681
1671
|
]);
|
|
1682
|
-
var DesignSystemElementExportProps =
|
|
1683
|
-
isAsset:
|
|
1684
|
-
codeName:
|
|
1685
|
-
});
|
|
1686
|
-
var ShallowDesignElement =
|
|
1687
|
-
id:
|
|
1688
|
-
persistentId:
|
|
1689
|
-
designSystemVersionId:
|
|
1672
|
+
var DesignSystemElementExportProps = z39.object({
|
|
1673
|
+
isAsset: z39.boolean().nullish().transform((v) => v ?? false),
|
|
1674
|
+
codeName: z39.string().nullish()
|
|
1675
|
+
});
|
|
1676
|
+
var ShallowDesignElement = z39.object({
|
|
1677
|
+
id: z39.string(),
|
|
1678
|
+
persistentId: z39.string(),
|
|
1679
|
+
designSystemVersionId: z39.string(),
|
|
1690
1680
|
type: DesignElementType,
|
|
1691
|
-
brandPersistentId:
|
|
1692
|
-
parentPersistentId:
|
|
1693
|
-
shortPersistentId:
|
|
1681
|
+
brandPersistentId: z39.string().optional(),
|
|
1682
|
+
parentPersistentId: z39.string().optional(),
|
|
1683
|
+
shortPersistentId: z39.string().optional(),
|
|
1694
1684
|
childType: DesignElementType.optional(),
|
|
1695
|
-
sortOrder:
|
|
1696
|
-
origin:
|
|
1697
|
-
createdAt:
|
|
1698
|
-
updatedAt:
|
|
1685
|
+
sortOrder: z39.number(),
|
|
1686
|
+
origin: z39.record(z39.any()).optional(),
|
|
1687
|
+
createdAt: z39.coerce.date(),
|
|
1688
|
+
updatedAt: z39.coerce.date()
|
|
1699
1689
|
});
|
|
1700
1690
|
var DesignElement = ShallowDesignElement.extend({
|
|
1701
1691
|
meta: ObjectMeta,
|
|
1702
|
-
slug:
|
|
1703
|
-
userSlug:
|
|
1692
|
+
slug: z39.string().optional(),
|
|
1693
|
+
userSlug: z39.string().optional(),
|
|
1704
1694
|
exportProperties: DesignSystemElementExportProps.optional(),
|
|
1705
|
-
data:
|
|
1706
|
-
origin:
|
|
1695
|
+
data: z39.record(z39.any()),
|
|
1696
|
+
origin: z39.record(z39.any()).optional()
|
|
1707
1697
|
});
|
|
1708
1698
|
var HierarchicalElements = DesignTokenType.or(
|
|
1709
|
-
|
|
1699
|
+
z39.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
1710
1700
|
);
|
|
1711
1701
|
|
|
1712
1702
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
1713
|
-
var PageBlockCalloutType =
|
|
1714
|
-
var PageBlockTypeV1 =
|
|
1703
|
+
var PageBlockCalloutType = z40.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
1704
|
+
var PageBlockTypeV1 = z40.enum([
|
|
1715
1705
|
"Text",
|
|
1716
1706
|
"Heading",
|
|
1717
1707
|
"Code",
|
|
@@ -1747,7 +1737,7 @@ var PageBlockTypeV1 = z41.enum([
|
|
|
1747
1737
|
"Guidelines",
|
|
1748
1738
|
"Guideline"
|
|
1749
1739
|
]);
|
|
1750
|
-
var PageBlockCodeLanguage =
|
|
1740
|
+
var PageBlockCodeLanguage = z40.enum([
|
|
1751
1741
|
"Angular",
|
|
1752
1742
|
"Bash",
|
|
1753
1743
|
"C",
|
|
@@ -1781,74 +1771,74 @@ var PageBlockCodeLanguage = z41.enum([
|
|
|
1781
1771
|
"XML",
|
|
1782
1772
|
"YAML"
|
|
1783
1773
|
]);
|
|
1784
|
-
var PageBlockAlignment =
|
|
1785
|
-
var PageBlockThemeType =
|
|
1786
|
-
var PageBlockAssetType =
|
|
1787
|
-
var PageBlockTilesAlignment =
|
|
1788
|
-
var PageBlockTilesLayout =
|
|
1789
|
-
var PageBlockTheme =
|
|
1790
|
-
themeIds:
|
|
1774
|
+
var PageBlockAlignment = z40.enum(["Left", "Center", "Stretch", "Right"]);
|
|
1775
|
+
var PageBlockThemeType = z40.enum(["Override", "Comparison"]);
|
|
1776
|
+
var PageBlockAssetType = z40.enum(["image", "figmaFrame"]);
|
|
1777
|
+
var PageBlockTilesAlignment = z40.enum(["Center", "FrameHeight"]);
|
|
1778
|
+
var PageBlockTilesLayout = z40.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
1779
|
+
var PageBlockTheme = z40.object({
|
|
1780
|
+
themeIds: z40.array(z40.string()),
|
|
1791
1781
|
type: PageBlockThemeType
|
|
1792
1782
|
});
|
|
1793
|
-
var PageBlockSwatch =
|
|
1794
|
-
id:
|
|
1795
|
-
selectedThemeIds:
|
|
1796
|
-
});
|
|
1797
|
-
var PageBlockUrlPreview =
|
|
1798
|
-
title: nullishToOptional(
|
|
1799
|
-
description: nullishToOptional(
|
|
1800
|
-
thumbnailUrl: nullishToOptional(
|
|
1801
|
-
});
|
|
1802
|
-
var PageBlockFrameOrigin =
|
|
1803
|
-
sourceFileName: nullishToOptional(
|
|
1804
|
-
title: nullishToOptional(
|
|
1805
|
-
previewUrl: nullishToOptional(
|
|
1806
|
-
valid: nullishToOptional(
|
|
1807
|
-
referenceId: nullishToOptional(
|
|
1808
|
-
assetId: nullishToOptional(
|
|
1809
|
-
assetScale: nullishToOptional(
|
|
1810
|
-
width: nullishToOptional(
|
|
1811
|
-
height: nullishToOptional(
|
|
1812
|
-
});
|
|
1813
|
-
var PageBlockFrame =
|
|
1814
|
-
persistentId:
|
|
1815
|
-
sourceId:
|
|
1816
|
-
sourceFrameId:
|
|
1817
|
-
title: nullishToOptional(
|
|
1818
|
-
description: nullishToOptional(
|
|
1783
|
+
var PageBlockSwatch = z40.object({
|
|
1784
|
+
id: z40.string(),
|
|
1785
|
+
selectedThemeIds: z40.string().array()
|
|
1786
|
+
});
|
|
1787
|
+
var PageBlockUrlPreview = z40.object({
|
|
1788
|
+
title: nullishToOptional(z40.string()),
|
|
1789
|
+
description: nullishToOptional(z40.string()),
|
|
1790
|
+
thumbnailUrl: nullishToOptional(z40.string())
|
|
1791
|
+
});
|
|
1792
|
+
var PageBlockFrameOrigin = z40.object({
|
|
1793
|
+
sourceFileName: nullishToOptional(z40.string()),
|
|
1794
|
+
title: nullishToOptional(z40.string()),
|
|
1795
|
+
previewUrl: nullishToOptional(z40.string()),
|
|
1796
|
+
valid: nullishToOptional(z40.boolean()),
|
|
1797
|
+
referenceId: nullishToOptional(z40.string()),
|
|
1798
|
+
assetId: nullishToOptional(z40.string()),
|
|
1799
|
+
assetScale: nullishToOptional(z40.number()),
|
|
1800
|
+
width: nullishToOptional(z40.number()),
|
|
1801
|
+
height: nullishToOptional(z40.number())
|
|
1802
|
+
});
|
|
1803
|
+
var PageBlockFrame = z40.object({
|
|
1804
|
+
persistentId: z40.string(),
|
|
1805
|
+
sourceId: z40.string(),
|
|
1806
|
+
sourceFrameId: z40.string(),
|
|
1807
|
+
title: nullishToOptional(z40.string()),
|
|
1808
|
+
description: nullishToOptional(z40.string()),
|
|
1819
1809
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1820
1810
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
1821
1811
|
});
|
|
1822
|
-
var PageBlockAsset =
|
|
1812
|
+
var PageBlockAsset = z40.object({
|
|
1823
1813
|
type: PageBlockAssetType,
|
|
1824
|
-
id: nullishToOptional(
|
|
1825
|
-
url: nullishToOptional(
|
|
1814
|
+
id: nullishToOptional(z40.string()),
|
|
1815
|
+
url: nullishToOptional(z40.string()),
|
|
1826
1816
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
1827
1817
|
});
|
|
1828
|
-
var PageBlockLinkPreview =
|
|
1829
|
-
title: nullishToOptional(
|
|
1830
|
-
valid: nullishToOptional(
|
|
1818
|
+
var PageBlockLinkPreview = z40.object({
|
|
1819
|
+
title: nullishToOptional(z40.string()),
|
|
1820
|
+
valid: nullishToOptional(z40.boolean())
|
|
1831
1821
|
});
|
|
1832
|
-
var PageBlockShortcut =
|
|
1833
|
-
persistentId:
|
|
1834
|
-
title: nullishToOptional(
|
|
1835
|
-
description: nullishToOptional(
|
|
1822
|
+
var PageBlockShortcut = z40.object({
|
|
1823
|
+
persistentId: z40.string(),
|
|
1824
|
+
title: nullishToOptional(z40.string()),
|
|
1825
|
+
description: nullishToOptional(z40.string()),
|
|
1836
1826
|
asset: nullishToOptional(PageBlockAsset),
|
|
1837
|
-
documentationItemId: nullishToOptional(
|
|
1838
|
-
pageHeadingId: nullishToOptional(
|
|
1839
|
-
url: nullishToOptional(
|
|
1840
|
-
openInNewTab: nullishToOptional(
|
|
1827
|
+
documentationItemId: nullishToOptional(z40.string()),
|
|
1828
|
+
pageHeadingId: nullishToOptional(z40.string()),
|
|
1829
|
+
url: nullishToOptional(z40.string()),
|
|
1830
|
+
openInNewTab: nullishToOptional(z40.boolean()),
|
|
1841
1831
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
1842
1832
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
1843
1833
|
});
|
|
1844
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
1834
|
+
var PageBlockCustomBlockPropertyImageValue = z40.object({
|
|
1845
1835
|
asset: nullishToOptional(PageBlockAsset),
|
|
1846
|
-
assetId: nullishToOptional(
|
|
1847
|
-
assetUrl: nullishToOptional(
|
|
1836
|
+
assetId: nullishToOptional(z40.string()),
|
|
1837
|
+
assetUrl: nullishToOptional(z40.string())
|
|
1848
1838
|
});
|
|
1849
|
-
var PageBlockCustomBlockPropertyValue =
|
|
1850
|
-
key:
|
|
1851
|
-
value:
|
|
1839
|
+
var PageBlockCustomBlockPropertyValue = z40.object({
|
|
1840
|
+
key: z40.string(),
|
|
1841
|
+
value: z40.any()
|
|
1852
1842
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
1853
1843
|
// e.g. element id 67451 in the dev db
|
|
1854
1844
|
// value: z
|
|
@@ -1859,119 +1849,119 @@ var PageBlockCustomBlockPropertyValue = z41.object({
|
|
|
1859
1849
|
// .or(TypographyTokenData)
|
|
1860
1850
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
1861
1851
|
});
|
|
1862
|
-
var PageBlockFigmaFrameProperties =
|
|
1852
|
+
var PageBlockFigmaFrameProperties = z40.object({
|
|
1863
1853
|
color: nullishToOptional(
|
|
1864
|
-
|
|
1865
|
-
value:
|
|
1854
|
+
z40.object({
|
|
1855
|
+
value: z40.string()
|
|
1866
1856
|
})
|
|
1867
1857
|
),
|
|
1868
1858
|
alignment: PageBlockTilesAlignment,
|
|
1869
1859
|
layout: PageBlockTilesLayout,
|
|
1870
1860
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1871
|
-
showTitles:
|
|
1861
|
+
showTitles: z40.boolean()
|
|
1872
1862
|
});
|
|
1873
|
-
var PageBlockRenderCodeProperties =
|
|
1874
|
-
showCode:
|
|
1875
|
-
showControls:
|
|
1863
|
+
var PageBlockRenderCodeProperties = z40.object({
|
|
1864
|
+
showCode: z40.boolean(),
|
|
1865
|
+
showControls: z40.boolean().optional()
|
|
1876
1866
|
});
|
|
1877
|
-
var PageBlockAssetComponent =
|
|
1878
|
-
persistentId:
|
|
1879
|
-
componentAssetId:
|
|
1880
|
-
title: nullishToOptional(
|
|
1881
|
-
description: nullishToOptional(
|
|
1867
|
+
var PageBlockAssetComponent = z40.object({
|
|
1868
|
+
persistentId: z40.string(),
|
|
1869
|
+
componentAssetId: z40.string(),
|
|
1870
|
+
title: nullishToOptional(z40.string()),
|
|
1871
|
+
description: nullishToOptional(z40.string()),
|
|
1882
1872
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
1883
1873
|
});
|
|
1884
|
-
var PageBlockTableColumn =
|
|
1885
|
-
id:
|
|
1874
|
+
var PageBlockTableColumn = z40.object({
|
|
1875
|
+
id: z40.string(),
|
|
1886
1876
|
width: DimensionTokenData
|
|
1887
1877
|
});
|
|
1888
|
-
var PageBlockTableProperties =
|
|
1889
|
-
showBorders:
|
|
1890
|
-
showHeaderRow:
|
|
1891
|
-
showHeaderColumn:
|
|
1892
|
-
columns:
|
|
1878
|
+
var PageBlockTableProperties = z40.object({
|
|
1879
|
+
showBorders: z40.boolean(),
|
|
1880
|
+
showHeaderRow: z40.boolean(),
|
|
1881
|
+
showHeaderColumn: z40.boolean(),
|
|
1882
|
+
columns: z40.array(PageBlockTableColumn)
|
|
1893
1883
|
});
|
|
1894
|
-
var PageBlockTextSpanAttributeType =
|
|
1895
|
-
var PageBlockTextSpanAttribute =
|
|
1884
|
+
var PageBlockTextSpanAttributeType = z40.enum(["Bold", "Italic", "Link", "Strikethrough", "Code", "Comment"]);
|
|
1885
|
+
var PageBlockTextSpanAttribute = z40.object({
|
|
1896
1886
|
type: PageBlockTextSpanAttributeType,
|
|
1897
1887
|
// Link attributes
|
|
1898
|
-
link: nullishToOptional(
|
|
1899
|
-
documentationItemId: nullishToOptional(
|
|
1900
|
-
openInNewWindow: nullishToOptional(
|
|
1888
|
+
link: nullishToOptional(z40.string()),
|
|
1889
|
+
documentationItemId: nullishToOptional(z40.string()),
|
|
1890
|
+
openInNewWindow: nullishToOptional(z40.boolean()),
|
|
1901
1891
|
// deprecated. use openInNewTab
|
|
1902
|
-
openInNewTab: nullishToOptional(
|
|
1892
|
+
openInNewTab: nullishToOptional(z40.boolean()),
|
|
1903
1893
|
// Comment attributes
|
|
1904
|
-
commentHighlightId: nullishToOptional(
|
|
1905
|
-
commentIsResolved: nullishToOptional(
|
|
1894
|
+
commentHighlightId: nullishToOptional(z40.string()),
|
|
1895
|
+
commentIsResolved: nullishToOptional(z40.boolean())
|
|
1906
1896
|
});
|
|
1907
|
-
var PageBlockTextSpan =
|
|
1908
|
-
text:
|
|
1909
|
-
attributes:
|
|
1897
|
+
var PageBlockTextSpan = z40.object({
|
|
1898
|
+
text: z40.string(),
|
|
1899
|
+
attributes: z40.array(PageBlockTextSpanAttribute)
|
|
1910
1900
|
});
|
|
1911
|
-
var PageBlockText =
|
|
1912
|
-
spans:
|
|
1901
|
+
var PageBlockText = z40.object({
|
|
1902
|
+
spans: z40.array(PageBlockTextSpan)
|
|
1913
1903
|
});
|
|
1914
|
-
var PageBlockGuideline =
|
|
1915
|
-
description: nullishToOptional(
|
|
1904
|
+
var PageBlockGuideline = z40.object({
|
|
1905
|
+
description: nullishToOptional(z40.string()),
|
|
1916
1906
|
asset: nullishToOptional(PageBlockAsset),
|
|
1917
|
-
type:
|
|
1918
|
-
imageAlt: nullishToOptional(
|
|
1919
|
-
imageCaption: nullishToOptional(
|
|
1907
|
+
type: z40.string(),
|
|
1908
|
+
imageAlt: nullishToOptional(z40.string()),
|
|
1909
|
+
imageCaption: nullishToOptional(z40.string()),
|
|
1920
1910
|
imageAlignment: nullishToOptional(PageBlockAlignment)
|
|
1921
1911
|
});
|
|
1922
|
-
var PageBlockBaseV1 =
|
|
1923
|
-
persistentId:
|
|
1912
|
+
var PageBlockBaseV1 = z40.object({
|
|
1913
|
+
persistentId: z40.string(),
|
|
1924
1914
|
type: PageBlockTypeV1,
|
|
1925
|
-
numberOfColumns: nullishToOptional(
|
|
1915
|
+
numberOfColumns: nullishToOptional(z40.number()),
|
|
1926
1916
|
// Element linking
|
|
1927
|
-
designObjectId: nullishToOptional(
|
|
1928
|
-
designObjectIds: nullishToOptional(
|
|
1929
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
1930
|
-
showNestedGroups: nullishToOptional(
|
|
1931
|
-
brandId: nullishToOptional(
|
|
1917
|
+
designObjectId: nullishToOptional(z40.string()),
|
|
1918
|
+
designObjectIds: nullishToOptional(z40.array(z40.string())),
|
|
1919
|
+
tokenType: nullishToOptional(DesignTokenType.or(z40.literal("Font"))),
|
|
1920
|
+
showNestedGroups: nullishToOptional(z40.boolean()),
|
|
1921
|
+
brandId: nullishToOptional(z40.string()),
|
|
1932
1922
|
// Rich text
|
|
1933
1923
|
text: nullishToOptional(PageBlockText),
|
|
1934
|
-
caption: nullishToOptional(
|
|
1935
|
-
headingType: nullishToOptional(
|
|
1924
|
+
caption: nullishToOptional(z40.string()),
|
|
1925
|
+
headingType: nullishToOptional(z40.number().min(1).max(3)),
|
|
1936
1926
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
1937
1927
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
1938
|
-
urlInput: nullishToOptional(
|
|
1939
|
-
url: nullishToOptional(
|
|
1928
|
+
urlInput: nullishToOptional(z40.string()),
|
|
1929
|
+
url: nullishToOptional(z40.string()),
|
|
1940
1930
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
1941
1931
|
// Image
|
|
1942
1932
|
asset: nullishToOptional(PageBlockAsset),
|
|
1943
1933
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
1944
|
-
imageAlt: nullishToOptional(
|
|
1934
|
+
imageAlt: nullishToOptional(z40.string()),
|
|
1945
1935
|
// Shortcuts block
|
|
1946
|
-
shortcuts: nullishToOptional(
|
|
1936
|
+
shortcuts: nullishToOptional(z40.array(PageBlockShortcut)),
|
|
1947
1937
|
// Guidelines
|
|
1948
1938
|
guideline: nullishToOptional(PageBlockGuideline),
|
|
1949
1939
|
// Custom blocks
|
|
1950
|
-
customBlockKey: nullishToOptional(
|
|
1951
|
-
customBlockProperties: nullishToOptional(
|
|
1952
|
-
variantKey: nullishToOptional(
|
|
1940
|
+
customBlockKey: nullishToOptional(z40.string()),
|
|
1941
|
+
customBlockProperties: nullishToOptional(z40.array(PageBlockCustomBlockPropertyValue)),
|
|
1942
|
+
variantKey: nullishToOptional(z40.string()),
|
|
1953
1943
|
// Figma frames
|
|
1954
1944
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
1955
|
-
figmaFrames: nullishToOptional(
|
|
1945
|
+
figmaFrames: nullishToOptional(z40.array(PageBlockFrame)),
|
|
1956
1946
|
// Generic
|
|
1957
1947
|
size: nullishToOptional(Size),
|
|
1958
1948
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1959
1949
|
// Render code
|
|
1960
1950
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
1961
1951
|
// Component assets
|
|
1962
|
-
componentAssets: nullishToOptional(
|
|
1952
|
+
componentAssets: nullishToOptional(z40.array(PageBlockAssetComponent)),
|
|
1963
1953
|
// Tables
|
|
1964
1954
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
1965
|
-
columnId: nullishToOptional(
|
|
1955
|
+
columnId: nullishToOptional(z40.string()),
|
|
1966
1956
|
// Token spreadsheet
|
|
1967
1957
|
theme: nullishToOptional(PageBlockTheme),
|
|
1968
1958
|
swatches: nullishToOptional(PageBlockSwatch.array()),
|
|
1969
|
-
blacklistedElementProperties: nullishToOptional(
|
|
1959
|
+
blacklistedElementProperties: nullishToOptional(z40.array(z40.string())),
|
|
1970
1960
|
// Arbitrary
|
|
1971
|
-
userMetadata: nullishToOptional(
|
|
1961
|
+
userMetadata: nullishToOptional(z40.string())
|
|
1972
1962
|
});
|
|
1973
1963
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
1974
|
-
children:
|
|
1964
|
+
children: z40.lazy(
|
|
1975
1965
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
1976
1966
|
)
|
|
1977
1967
|
});
|
|
@@ -2073,49 +2063,49 @@ function sanitizeSpanAttribute(attribute) {
|
|
|
2073
2063
|
}
|
|
2074
2064
|
|
|
2075
2065
|
// src/dsm/elements/data/documentation-block-v2.ts
|
|
2076
|
-
import { z as
|
|
2066
|
+
import { z as z44 } from "zod";
|
|
2077
2067
|
|
|
2078
2068
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2079
|
-
import { z as
|
|
2069
|
+
import { z as z43 } from "zod";
|
|
2080
2070
|
|
|
2081
2071
|
// src/dsm/documentation/block-definitions/aux.ts
|
|
2082
|
-
import { z as
|
|
2083
|
-
var PageBlockDefinitionAppearance =
|
|
2084
|
-
isBordered:
|
|
2085
|
-
hasBackground:
|
|
2086
|
-
isEditorPresentationDifferent:
|
|
2087
|
-
showBlockHeaderInEditor:
|
|
2072
|
+
import { z as z41 } from "zod";
|
|
2073
|
+
var PageBlockDefinitionAppearance = z41.object({
|
|
2074
|
+
isBordered: z41.boolean().optional(),
|
|
2075
|
+
hasBackground: z41.boolean().optional(),
|
|
2076
|
+
isEditorPresentationDifferent: z41.boolean().optional(),
|
|
2077
|
+
showBlockHeaderInEditor: z41.boolean().optional()
|
|
2088
2078
|
});
|
|
2089
2079
|
|
|
2090
2080
|
// src/dsm/documentation/block-definitions/variant.ts
|
|
2091
|
-
import { z as
|
|
2092
|
-
var PageBlockDefinitionLayoutType =
|
|
2093
|
-
var PageBlockDefinitionLayoutGap =
|
|
2094
|
-
var PageBlockDefinitionLayoutAlign =
|
|
2095
|
-
var PageBlockDefinitionLayoutResizing =
|
|
2096
|
-
var PageBlockDefinitionLayoutBase =
|
|
2081
|
+
import { z as z42 } from "zod";
|
|
2082
|
+
var PageBlockDefinitionLayoutType = z42.enum(["Column", "Row"]);
|
|
2083
|
+
var PageBlockDefinitionLayoutGap = z42.enum(["Small", "Medium", "Large", "None"]);
|
|
2084
|
+
var PageBlockDefinitionLayoutAlign = z42.enum(["Start", "Center", "End"]);
|
|
2085
|
+
var PageBlockDefinitionLayoutResizing = z42.enum(["Fill", "Hug"]);
|
|
2086
|
+
var PageBlockDefinitionLayoutBase = z42.object({
|
|
2097
2087
|
type: PageBlockDefinitionLayoutType,
|
|
2098
2088
|
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2099
2089
|
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2100
2090
|
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2101
2091
|
});
|
|
2102
2092
|
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2103
|
-
children:
|
|
2104
|
-
});
|
|
2105
|
-
var PageBlockDefinitionVariant =
|
|
2106
|
-
id:
|
|
2107
|
-
name:
|
|
2108
|
-
image:
|
|
2109
|
-
description:
|
|
2110
|
-
documentationLink:
|
|
2093
|
+
children: z42.lazy(() => z42.array(PageBlockDefinitionLayout.or(z42.string())))
|
|
2094
|
+
});
|
|
2095
|
+
var PageBlockDefinitionVariant = z42.object({
|
|
2096
|
+
id: z42.string(),
|
|
2097
|
+
name: z42.string(),
|
|
2098
|
+
image: z42.string().optional(),
|
|
2099
|
+
description: z42.string().optional(),
|
|
2100
|
+
documentationLink: z42.string().optional(),
|
|
2111
2101
|
layout: PageBlockDefinitionLayout,
|
|
2112
|
-
maxColumns:
|
|
2113
|
-
defaultColumns:
|
|
2102
|
+
maxColumns: z42.number().optional(),
|
|
2103
|
+
defaultColumns: z42.number().optional(),
|
|
2114
2104
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2115
2105
|
});
|
|
2116
2106
|
|
|
2117
2107
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2118
|
-
var PageBlockDefinitionPropertyType =
|
|
2108
|
+
var PageBlockDefinitionPropertyType = z43.enum([
|
|
2119
2109
|
"RichText",
|
|
2120
2110
|
"MultiRichText",
|
|
2121
2111
|
"RichTextEditor",
|
|
@@ -2144,7 +2134,7 @@ var PageBlockDefinitionPropertyType = z44.enum([
|
|
|
2144
2134
|
"Color",
|
|
2145
2135
|
"FigmaComponent"
|
|
2146
2136
|
]);
|
|
2147
|
-
var PageBlockDefinitionRichTextPropertyStyle =
|
|
2137
|
+
var PageBlockDefinitionRichTextPropertyStyle = z43.enum([
|
|
2148
2138
|
"Title1",
|
|
2149
2139
|
"Title2",
|
|
2150
2140
|
"Title3",
|
|
@@ -2154,8 +2144,8 @@ var PageBlockDefinitionRichTextPropertyStyle = z44.enum([
|
|
|
2154
2144
|
"Callout",
|
|
2155
2145
|
"Default"
|
|
2156
2146
|
]);
|
|
2157
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle =
|
|
2158
|
-
var PageBlockDefinitionRichTextEditorPropertyStyle =
|
|
2147
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z43.enum(["OL", "UL"]);
|
|
2148
|
+
var PageBlockDefinitionRichTextEditorPropertyStyle = z43.enum([
|
|
2159
2149
|
"OL",
|
|
2160
2150
|
"UL",
|
|
2161
2151
|
"Bold",
|
|
@@ -2164,7 +2154,7 @@ var PageBlockDefinitionRichTextEditorPropertyStyle = z44.enum([
|
|
|
2164
2154
|
"Strikethrough",
|
|
2165
2155
|
"InlineCode"
|
|
2166
2156
|
]);
|
|
2167
|
-
var PageBlockDefinitionTextPropertyStyle =
|
|
2157
|
+
var PageBlockDefinitionTextPropertyStyle = z43.enum([
|
|
2168
2158
|
"Title1",
|
|
2169
2159
|
"Title2",
|
|
2170
2160
|
"Title3",
|
|
@@ -2178,15 +2168,15 @@ var PageBlockDefinitionTextPropertyStyle = z44.enum([
|
|
|
2178
2168
|
"SmallSemibold",
|
|
2179
2169
|
"Custom"
|
|
2180
2170
|
]);
|
|
2181
|
-
var PageBlockDefinitionTextPropertyColor =
|
|
2182
|
-
var PageBlockDefinitionBooleanPropertyStyle =
|
|
2183
|
-
var PageBlockDefinitionSingleSelectPropertyStyle =
|
|
2171
|
+
var PageBlockDefinitionTextPropertyColor = z43.enum(["Neutral", "NeutralFaded"]);
|
|
2172
|
+
var PageBlockDefinitionBooleanPropertyStyle = z43.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2173
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z43.enum([
|
|
2184
2174
|
"SegmentedControl",
|
|
2185
2175
|
"ToggleButton",
|
|
2186
2176
|
"Select",
|
|
2187
2177
|
"Checkbox"
|
|
2188
2178
|
]);
|
|
2189
|
-
var PageBlockDefinitionSingleSelectPropertyColor =
|
|
2179
|
+
var PageBlockDefinitionSingleSelectPropertyColor = z43.enum([
|
|
2190
2180
|
"Green",
|
|
2191
2181
|
"Red",
|
|
2192
2182
|
"Yellow",
|
|
@@ -2201,367 +2191,367 @@ var PageBlockDefinitionSingleSelectPropertyColor = z44.enum([
|
|
|
2201
2191
|
"Cyan",
|
|
2202
2192
|
"Fuchsia"
|
|
2203
2193
|
]);
|
|
2204
|
-
var IconSet =
|
|
2205
|
-
var PageBlockDefinitionMultiSelectPropertyStyle =
|
|
2206
|
-
var PageBlockDefinitionImageAspectRatio =
|
|
2207
|
-
var PageBlockDefinitionImageWidth =
|
|
2208
|
-
var PageBlockDefinitionSelectChoice =
|
|
2209
|
-
value:
|
|
2210
|
-
name:
|
|
2194
|
+
var IconSet = z43.enum(["CheckCircle", "CrossCircle", "Alert"]);
|
|
2195
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z43.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2196
|
+
var PageBlockDefinitionImageAspectRatio = z43.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2197
|
+
var PageBlockDefinitionImageWidth = z43.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2198
|
+
var PageBlockDefinitionSelectChoice = z43.object({
|
|
2199
|
+
value: z43.string(),
|
|
2200
|
+
name: z43.string(),
|
|
2211
2201
|
icon: IconSet.optional(),
|
|
2212
|
-
customIconUrl:
|
|
2202
|
+
customIconUrl: z43.string().optional(),
|
|
2213
2203
|
color: PageBlockDefinitionSingleSelectPropertyColor.optional()
|
|
2214
2204
|
});
|
|
2215
|
-
var PageBlockDefinitionUntypedPropertyOptions =
|
|
2216
|
-
var PageBlockDefinitionRichTextOptions =
|
|
2205
|
+
var PageBlockDefinitionUntypedPropertyOptions = z43.record(z43.any());
|
|
2206
|
+
var PageBlockDefinitionRichTextOptions = z43.object({
|
|
2217
2207
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
2218
2208
|
});
|
|
2219
|
-
var PageBlockDefinitionMutiRichTextOptions =
|
|
2209
|
+
var PageBlockDefinitionMutiRichTextOptions = z43.object({
|
|
2220
2210
|
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
2221
2211
|
});
|
|
2222
|
-
var PageBlockDefinitionRichTextEditorOptions =
|
|
2223
|
-
placeholder:
|
|
2224
|
-
allowedInlineStyles:
|
|
2212
|
+
var PageBlockDefinitionRichTextEditorOptions = z43.object({
|
|
2213
|
+
placeholder: z43.string().optional(),
|
|
2214
|
+
allowedInlineStyles: z43.array(PageBlockDefinitionRichTextEditorPropertyStyle).optional()
|
|
2225
2215
|
});
|
|
2226
|
-
var PageBlockDefinitionTextOptions =
|
|
2227
|
-
placeholder:
|
|
2228
|
-
defaultValue:
|
|
2216
|
+
var PageBlockDefinitionTextOptions = z43.object({
|
|
2217
|
+
placeholder: z43.string().optional(),
|
|
2218
|
+
defaultValue: z43.string().optional(),
|
|
2229
2219
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2230
2220
|
color: PageBlockDefinitionTextPropertyColor.optional(),
|
|
2231
|
-
allowLineBreaks:
|
|
2221
|
+
allowLineBreaks: z43.boolean().optional()
|
|
2232
2222
|
});
|
|
2233
|
-
var PageBlockDefinitionSelectOptions =
|
|
2223
|
+
var PageBlockDefinitionSelectOptions = z43.object({
|
|
2234
2224
|
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2235
|
-
defaultChoice:
|
|
2236
|
-
choices:
|
|
2225
|
+
defaultChoice: z43.string(),
|
|
2226
|
+
choices: z43.array(PageBlockDefinitionSelectChoice)
|
|
2237
2227
|
});
|
|
2238
|
-
var PageBlockDefinitionImageOptions =
|
|
2228
|
+
var PageBlockDefinitionImageOptions = z43.object({
|
|
2239
2229
|
width: PageBlockDefinitionImageWidth.optional(),
|
|
2240
2230
|
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2241
|
-
allowCaption:
|
|
2242
|
-
recommendation:
|
|
2231
|
+
allowCaption: z43.boolean().optional(),
|
|
2232
|
+
recommendation: z43.string().optional()
|
|
2243
2233
|
});
|
|
2244
|
-
var PageBlockDefinitionBooleanOptions =
|
|
2245
|
-
defaultvalue:
|
|
2234
|
+
var PageBlockDefinitionBooleanOptions = z43.object({
|
|
2235
|
+
defaultvalue: z43.boolean().optional(),
|
|
2246
2236
|
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2247
2237
|
});
|
|
2248
|
-
var PageBlockDefinitionNumberOptions =
|
|
2249
|
-
defaultValue:
|
|
2250
|
-
min:
|
|
2251
|
-
max:
|
|
2252
|
-
step:
|
|
2253
|
-
placeholder:
|
|
2238
|
+
var PageBlockDefinitionNumberOptions = z43.object({
|
|
2239
|
+
defaultValue: z43.number(),
|
|
2240
|
+
min: z43.number().optional(),
|
|
2241
|
+
max: z43.number().optional(),
|
|
2242
|
+
step: z43.number().optional(),
|
|
2243
|
+
placeholder: z43.string().optional()
|
|
2254
2244
|
});
|
|
2255
|
-
var PageBlockDefinitionComponentOptions =
|
|
2256
|
-
renderLayoutAs:
|
|
2257
|
-
allowPropertySelection:
|
|
2245
|
+
var PageBlockDefinitionComponentOptions = z43.object({
|
|
2246
|
+
renderLayoutAs: z43.enum(["List", "Table"]).optional(),
|
|
2247
|
+
allowPropertySelection: z43.boolean().optional()
|
|
2258
2248
|
});
|
|
2259
|
-
var PageBlockDefinitionProperty =
|
|
2260
|
-
id:
|
|
2261
|
-
name:
|
|
2249
|
+
var PageBlockDefinitionProperty = z43.object({
|
|
2250
|
+
id: z43.string(),
|
|
2251
|
+
name: z43.string(),
|
|
2262
2252
|
type: PageBlockDefinitionPropertyType,
|
|
2263
|
-
description:
|
|
2253
|
+
description: z43.string().optional(),
|
|
2264
2254
|
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2265
|
-
variantOptions:
|
|
2255
|
+
variantOptions: z43.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2266
2256
|
});
|
|
2267
|
-
var PageBlockDefinitionItem =
|
|
2268
|
-
properties:
|
|
2257
|
+
var PageBlockDefinitionItem = z43.object({
|
|
2258
|
+
properties: z43.array(PageBlockDefinitionProperty),
|
|
2269
2259
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2270
|
-
variants:
|
|
2271
|
-
defaultVariantKey:
|
|
2260
|
+
variants: z43.array(PageBlockDefinitionVariant),
|
|
2261
|
+
defaultVariantKey: z43.string()
|
|
2272
2262
|
});
|
|
2273
2263
|
|
|
2274
2264
|
// src/dsm/elements/data/documentation-block-v2.ts
|
|
2275
|
-
var PageBlockLinkType =
|
|
2276
|
-
var PageBlockImageType =
|
|
2277
|
-
var PageBlockImageAlignment =
|
|
2278
|
-
var PageBlockTableCellAlignment =
|
|
2279
|
-
var PageBlockPreviewContainerSize =
|
|
2280
|
-
var PageBlockThemeDisplayMode =
|
|
2281
|
-
var PageBlockImageResourceReference =
|
|
2282
|
-
resourceId:
|
|
2283
|
-
url:
|
|
2284
|
-
});
|
|
2285
|
-
var PageBlockResourceFrameNodeReference =
|
|
2286
|
-
sourceId:
|
|
2287
|
-
frameReferenceId:
|
|
2288
|
-
});
|
|
2289
|
-
var PageBlockImageReference =
|
|
2265
|
+
var PageBlockLinkType = z44.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
2266
|
+
var PageBlockImageType = z44.enum(["Resource", "FigmaNode"]);
|
|
2267
|
+
var PageBlockImageAlignment = z44.enum(["Left", "Center", "Stretch"]);
|
|
2268
|
+
var PageBlockTableCellAlignment = z44.enum(["Left", "Center", "Right"]);
|
|
2269
|
+
var PageBlockPreviewContainerSize = z44.enum(["Centered", "NaturalHeight"]);
|
|
2270
|
+
var PageBlockThemeDisplayMode = z44.enum(["Split", "Override"]);
|
|
2271
|
+
var PageBlockImageResourceReference = z44.object({
|
|
2272
|
+
resourceId: z44.string(),
|
|
2273
|
+
url: z44.string()
|
|
2274
|
+
});
|
|
2275
|
+
var PageBlockResourceFrameNodeReference = z44.object({
|
|
2276
|
+
sourceId: z44.string(),
|
|
2277
|
+
frameReferenceId: z44.string()
|
|
2278
|
+
});
|
|
2279
|
+
var PageBlockImageReference = z44.object({
|
|
2290
2280
|
type: PageBlockImageType,
|
|
2291
2281
|
resource: PageBlockImageResourceReference.optional(),
|
|
2292
2282
|
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
2293
2283
|
});
|
|
2294
|
-
var PageBlockColorV2 =
|
|
2295
|
-
value:
|
|
2296
|
-
referencedTokenId:
|
|
2284
|
+
var PageBlockColorV2 = z44.object({
|
|
2285
|
+
value: z44.string(),
|
|
2286
|
+
referencedTokenId: z44.string().optional()
|
|
2297
2287
|
});
|
|
2298
|
-
var PageBlockAssetEntityMeta =
|
|
2299
|
-
title:
|
|
2300
|
-
description:
|
|
2288
|
+
var PageBlockAssetEntityMeta = z44.object({
|
|
2289
|
+
title: z44.string().optional(),
|
|
2290
|
+
description: z44.string().optional(),
|
|
2301
2291
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2302
|
-
showNestedGroups:
|
|
2292
|
+
showNestedGroups: z44.boolean().optional()
|
|
2303
2293
|
});
|
|
2304
|
-
var PageBlockFigmaComponentEntityMeta =
|
|
2305
|
-
title:
|
|
2306
|
-
description:
|
|
2294
|
+
var PageBlockFigmaComponentEntityMeta = z44.object({
|
|
2295
|
+
title: z44.string().optional(),
|
|
2296
|
+
description: z44.string().optional(),
|
|
2307
2297
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2308
|
-
selectedComponentProperties:
|
|
2298
|
+
selectedComponentProperties: z44.array(z44.string()).optional()
|
|
2309
2299
|
});
|
|
2310
|
-
var PageBlockFigmaNodeEntityMeta =
|
|
2311
|
-
title:
|
|
2312
|
-
description:
|
|
2300
|
+
var PageBlockFigmaNodeEntityMeta = z44.object({
|
|
2301
|
+
title: z44.string().optional(),
|
|
2302
|
+
description: z44.string().optional(),
|
|
2313
2303
|
backgroundColor: PageBlockColorV2.optional()
|
|
2314
2304
|
});
|
|
2315
|
-
var PageBlockAppearanceV2 =
|
|
2305
|
+
var PageBlockAppearanceV2 = z44.object({
|
|
2316
2306
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
2317
|
-
numberOfColumns:
|
|
2307
|
+
numberOfColumns: z44.number().optional()
|
|
2318
2308
|
});
|
|
2319
|
-
var PageBlockItemUntypedValue =
|
|
2320
|
-
value:
|
|
2321
|
-
}).and(
|
|
2322
|
-
var PageBlockLinkV2 =
|
|
2309
|
+
var PageBlockItemUntypedValue = z44.object({
|
|
2310
|
+
value: z44.any()
|
|
2311
|
+
}).and(z44.record(z44.any()));
|
|
2312
|
+
var PageBlockLinkV2 = z44.object({
|
|
2323
2313
|
type: PageBlockLinkType,
|
|
2324
|
-
documentationItemId:
|
|
2325
|
-
pageHeadingId:
|
|
2326
|
-
url:
|
|
2327
|
-
openInNewTab:
|
|
2314
|
+
documentationItemId: z44.string().optional(),
|
|
2315
|
+
pageHeadingId: z44.string().optional(),
|
|
2316
|
+
url: z44.string().optional(),
|
|
2317
|
+
openInNewTab: z44.boolean().optional()
|
|
2328
2318
|
});
|
|
2329
|
-
var PageBlockItemV2 =
|
|
2330
|
-
id:
|
|
2319
|
+
var PageBlockItemV2 = z44.object({
|
|
2320
|
+
id: z44.string(),
|
|
2331
2321
|
linksTo: PageBlockLinkV2.optional(),
|
|
2332
|
-
props:
|
|
2322
|
+
props: z44.record(PageBlockItemUntypedValue)
|
|
2333
2323
|
});
|
|
2334
|
-
var PageBlockDataV2 =
|
|
2335
|
-
packageId:
|
|
2336
|
-
variantId:
|
|
2337
|
-
indentLevel:
|
|
2324
|
+
var PageBlockDataV2 = z44.object({
|
|
2325
|
+
packageId: z44.string(),
|
|
2326
|
+
variantId: z44.string().optional(),
|
|
2327
|
+
indentLevel: z44.number(),
|
|
2338
2328
|
appearance: PageBlockAppearanceV2.optional(),
|
|
2339
|
-
items:
|
|
2329
|
+
items: z44.array(PageBlockItemV2)
|
|
2340
2330
|
});
|
|
2341
|
-
var PageBlockItemAssetValue =
|
|
2342
|
-
selectedPropertyIds:
|
|
2343
|
-
showSearch:
|
|
2331
|
+
var PageBlockItemAssetValue = z44.object({
|
|
2332
|
+
selectedPropertyIds: z44.array(z44.string()).optional(),
|
|
2333
|
+
showSearch: z44.boolean().optional(),
|
|
2344
2334
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
2345
2335
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2346
|
-
value:
|
|
2347
|
-
|
|
2348
|
-
entityId:
|
|
2349
|
-
entityType:
|
|
2336
|
+
value: z44.array(
|
|
2337
|
+
z44.object({
|
|
2338
|
+
entityId: z44.string(),
|
|
2339
|
+
entityType: z44.enum(["Asset", "AssetGroup"]),
|
|
2350
2340
|
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
2351
2341
|
})
|
|
2352
2342
|
).default([])
|
|
2353
2343
|
});
|
|
2354
|
-
var PageBlockItemAssetPropertyValue =
|
|
2355
|
-
value:
|
|
2344
|
+
var PageBlockItemAssetPropertyValue = z44.object({
|
|
2345
|
+
value: z44.array(z44.string()).default([])
|
|
2356
2346
|
});
|
|
2357
|
-
var PageBlockItemFigmaComponentValue =
|
|
2358
|
-
showComponentName:
|
|
2359
|
-
showComponentDescription:
|
|
2360
|
-
showPropertyList:
|
|
2347
|
+
var PageBlockItemFigmaComponentValue = z44.object({
|
|
2348
|
+
showComponentName: z44.boolean().optional(),
|
|
2349
|
+
showComponentDescription: z44.boolean().optional(),
|
|
2350
|
+
showPropertyList: z44.boolean().optional(),
|
|
2361
2351
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
2362
2352
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2363
|
-
value:
|
|
2364
|
-
|
|
2365
|
-
entityId:
|
|
2366
|
-
entityType:
|
|
2353
|
+
value: z44.array(
|
|
2354
|
+
z44.object({
|
|
2355
|
+
entityId: z44.string(),
|
|
2356
|
+
entityType: z44.enum(["FigmaComponent"]),
|
|
2367
2357
|
entityMeta: PageBlockFigmaComponentEntityMeta.optional()
|
|
2368
2358
|
})
|
|
2369
2359
|
).default([])
|
|
2370
2360
|
});
|
|
2371
|
-
var PageBlockItemBooleanValue =
|
|
2372
|
-
value:
|
|
2361
|
+
var PageBlockItemBooleanValue = z44.object({
|
|
2362
|
+
value: z44.boolean()
|
|
2373
2363
|
});
|
|
2374
|
-
var PageBlockItemCodeValue =
|
|
2364
|
+
var PageBlockItemCodeValue = z44.object({
|
|
2375
2365
|
format: PageBlockCodeLanguage.optional(),
|
|
2376
|
-
caption:
|
|
2377
|
-
value:
|
|
2378
|
-
});
|
|
2379
|
-
var PageBlockItemSandboxValue =
|
|
2380
|
-
showCode:
|
|
2381
|
-
showControls:
|
|
2382
|
-
backgroundColor:
|
|
2383
|
-
alignPreview:
|
|
2384
|
-
previewHeight:
|
|
2385
|
-
value:
|
|
2386
|
-
});
|
|
2387
|
-
var PageBlockItemColorValue =
|
|
2388
|
-
var PageBlockItemComponentValue =
|
|
2389
|
-
selectedPropertyIds:
|
|
2390
|
-
selectedBrandId:
|
|
2391
|
-
value:
|
|
2392
|
-
|
|
2393
|
-
entityId:
|
|
2394
|
-
entityType:
|
|
2366
|
+
caption: z44.string().optional(),
|
|
2367
|
+
value: z44.string()
|
|
2368
|
+
});
|
|
2369
|
+
var PageBlockItemSandboxValue = z44.object({
|
|
2370
|
+
showCode: z44.boolean().optional(),
|
|
2371
|
+
showControls: z44.boolean().optional(),
|
|
2372
|
+
backgroundColor: z44.string().optional(),
|
|
2373
|
+
alignPreview: z44.enum(["Left", "Center"]).optional(),
|
|
2374
|
+
previewHeight: z44.number().optional(),
|
|
2375
|
+
value: z44.string()
|
|
2376
|
+
});
|
|
2377
|
+
var PageBlockItemColorValue = z44.record(z44.any());
|
|
2378
|
+
var PageBlockItemComponentValue = z44.object({
|
|
2379
|
+
selectedPropertyIds: z44.array(z44.string()).optional(),
|
|
2380
|
+
selectedBrandId: z44.string().optional(),
|
|
2381
|
+
value: z44.array(
|
|
2382
|
+
z44.object({
|
|
2383
|
+
entityId: z44.string(),
|
|
2384
|
+
entityType: z44.enum(["Component", "ComponentGroup"])
|
|
2395
2385
|
})
|
|
2396
2386
|
).default([])
|
|
2397
2387
|
});
|
|
2398
|
-
var PageBlockItemComponentPropertyValue =
|
|
2399
|
-
value:
|
|
2400
|
-
});
|
|
2401
|
-
var PageBlockItemDividerValue =
|
|
2402
|
-
var PageBlockItemEmbedValue =
|
|
2403
|
-
value:
|
|
2404
|
-
caption:
|
|
2405
|
-
height:
|
|
2406
|
-
alt:
|
|
2407
|
-
openGraph:
|
|
2408
|
-
title:
|
|
2409
|
-
description:
|
|
2410
|
-
imageUrl:
|
|
2388
|
+
var PageBlockItemComponentPropertyValue = z44.object({
|
|
2389
|
+
value: z44.string()
|
|
2390
|
+
});
|
|
2391
|
+
var PageBlockItemDividerValue = z44.object({});
|
|
2392
|
+
var PageBlockItemEmbedValue = z44.object({
|
|
2393
|
+
value: z44.string().optional(),
|
|
2394
|
+
caption: z44.string().optional(),
|
|
2395
|
+
height: z44.number().optional(),
|
|
2396
|
+
alt: z44.number().optional(),
|
|
2397
|
+
openGraph: z44.object({
|
|
2398
|
+
title: z44.string().optional(),
|
|
2399
|
+
description: z44.string().optional(),
|
|
2400
|
+
imageUrl: z44.string().optional()
|
|
2411
2401
|
}).optional()
|
|
2412
2402
|
});
|
|
2413
|
-
var PageBlockItemFigmaNodeValue =
|
|
2414
|
-
showSearch:
|
|
2403
|
+
var PageBlockItemFigmaNodeValue = z44.object({
|
|
2404
|
+
showSearch: z44.boolean().optional(),
|
|
2415
2405
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
2416
2406
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2417
|
-
showFrameDetails:
|
|
2418
|
-
value:
|
|
2419
|
-
|
|
2420
|
-
entityId:
|
|
2407
|
+
showFrameDetails: z44.boolean().optional(),
|
|
2408
|
+
value: z44.array(
|
|
2409
|
+
z44.object({
|
|
2410
|
+
entityId: z44.string(),
|
|
2421
2411
|
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
2422
2412
|
})
|
|
2423
2413
|
).default([])
|
|
2424
2414
|
});
|
|
2425
|
-
var PageBlockItemImageValue =
|
|
2426
|
-
alt:
|
|
2427
|
-
caption:
|
|
2415
|
+
var PageBlockItemImageValue = z44.object({
|
|
2416
|
+
alt: z44.string().optional(),
|
|
2417
|
+
caption: z44.string().optional(),
|
|
2428
2418
|
alignment: PageBlockImageAlignment.optional(),
|
|
2429
2419
|
value: PageBlockImageReference.optional()
|
|
2430
2420
|
});
|
|
2431
|
-
var PageBlockItemMarkdownValue =
|
|
2432
|
-
value:
|
|
2421
|
+
var PageBlockItemMarkdownValue = z44.object({
|
|
2422
|
+
value: z44.string()
|
|
2433
2423
|
});
|
|
2434
|
-
var PageBlockItemMultiRichTextValue =
|
|
2424
|
+
var PageBlockItemMultiRichTextValue = z44.object({
|
|
2435
2425
|
value: PageBlockText.array()
|
|
2436
2426
|
});
|
|
2437
|
-
var PageBlockItemMultiSelectValue =
|
|
2438
|
-
value:
|
|
2427
|
+
var PageBlockItemMultiSelectValue = z44.object({
|
|
2428
|
+
value: z44.array(z44.string()).default([])
|
|
2439
2429
|
});
|
|
2440
|
-
var PageBlockItemNumberValue =
|
|
2441
|
-
value:
|
|
2430
|
+
var PageBlockItemNumberValue = z44.object({
|
|
2431
|
+
value: z44.number()
|
|
2442
2432
|
});
|
|
2443
|
-
var PageBlockItemRichTextValue =
|
|
2433
|
+
var PageBlockItemRichTextValue = z44.object({
|
|
2444
2434
|
value: PageBlockText,
|
|
2445
2435
|
calloutType: PageBlockCalloutType.optional()
|
|
2446
2436
|
});
|
|
2447
|
-
var PageBlockItemSingleSelectValue =
|
|
2448
|
-
value:
|
|
2437
|
+
var PageBlockItemSingleSelectValue = z44.object({
|
|
2438
|
+
value: z44.string()
|
|
2449
2439
|
});
|
|
2450
|
-
var PageBlockItemStorybookValue =
|
|
2451
|
-
caption:
|
|
2452
|
-
height:
|
|
2453
|
-
embedUrl:
|
|
2454
|
-
value:
|
|
2440
|
+
var PageBlockItemStorybookValue = z44.object({
|
|
2441
|
+
caption: z44.string().optional(),
|
|
2442
|
+
height: z44.number().optional(),
|
|
2443
|
+
embedUrl: z44.string().optional(),
|
|
2444
|
+
value: z44.string().optional()
|
|
2455
2445
|
});
|
|
2456
|
-
var PageBlockItemTextValue =
|
|
2457
|
-
value:
|
|
2446
|
+
var PageBlockItemTextValue = z44.object({
|
|
2447
|
+
value: z44.string()
|
|
2458
2448
|
});
|
|
2459
|
-
var PageBlockItemSwatch =
|
|
2460
|
-
id:
|
|
2461
|
-
selectedThemeIds:
|
|
2449
|
+
var PageBlockItemSwatch = z44.object({
|
|
2450
|
+
id: z44.string(),
|
|
2451
|
+
selectedThemeIds: z44.string().array()
|
|
2462
2452
|
});
|
|
2463
|
-
var PageBlockItemTokenValue =
|
|
2464
|
-
selectedPropertyIds:
|
|
2465
|
-
selectedThemeIds:
|
|
2466
|
-
swatches:
|
|
2453
|
+
var PageBlockItemTokenValue = z44.object({
|
|
2454
|
+
selectedPropertyIds: z44.array(z44.string()).optional(),
|
|
2455
|
+
selectedThemeIds: z44.array(z44.string()).optional(),
|
|
2456
|
+
swatches: z44.array(PageBlockItemSwatch).optional(),
|
|
2467
2457
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
2468
|
-
value:
|
|
2469
|
-
|
|
2470
|
-
entityId:
|
|
2471
|
-
entityType:
|
|
2472
|
-
entityMeta:
|
|
2473
|
-
showNestedGroups:
|
|
2458
|
+
value: z44.array(
|
|
2459
|
+
z44.object({
|
|
2460
|
+
entityId: z44.string(),
|
|
2461
|
+
entityType: z44.enum(["Token", "TokenGroup"]),
|
|
2462
|
+
entityMeta: z44.object({
|
|
2463
|
+
showNestedGroups: z44.boolean().optional()
|
|
2474
2464
|
}).optional()
|
|
2475
2465
|
})
|
|
2476
2466
|
).default([])
|
|
2477
2467
|
});
|
|
2478
|
-
var PageBlockItemTokenPropertyValue =
|
|
2479
|
-
selectedPropertyIds:
|
|
2480
|
-
selectedThemeIds:
|
|
2481
|
-
value:
|
|
2468
|
+
var PageBlockItemTokenPropertyValue = z44.object({
|
|
2469
|
+
selectedPropertyIds: z44.array(z44.string()).optional(),
|
|
2470
|
+
selectedThemeIds: z44.array(z44.string()).optional(),
|
|
2471
|
+
value: z44.array(z44.string()).default([])
|
|
2482
2472
|
});
|
|
2483
|
-
var PageBlockItemTokenTypeValue =
|
|
2484
|
-
value:
|
|
2473
|
+
var PageBlockItemTokenTypeValue = z44.object({
|
|
2474
|
+
value: z44.array(DesignTokenType).default([])
|
|
2485
2475
|
});
|
|
2486
|
-
var PageBlockItemUrlValue =
|
|
2487
|
-
value:
|
|
2476
|
+
var PageBlockItemUrlValue = z44.object({
|
|
2477
|
+
value: z44.string()
|
|
2488
2478
|
});
|
|
2489
|
-
var PageBlockItemRichTextEditorParagraphNode =
|
|
2490
|
-
type:
|
|
2479
|
+
var PageBlockItemRichTextEditorParagraphNode = z44.object({
|
|
2480
|
+
type: z44.literal("Paragraph"),
|
|
2491
2481
|
value: PageBlockItemRichTextValue.shape.value
|
|
2492
2482
|
});
|
|
2493
|
-
var PageBlockItemRichTextEditorListNode =
|
|
2494
|
-
type:
|
|
2483
|
+
var PageBlockItemRichTextEditorListNode = z44.object({
|
|
2484
|
+
type: z44.literal("List"),
|
|
2495
2485
|
listType: PageBlockDefinitionMultiRichTextPropertyStyle,
|
|
2496
2486
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
2497
2487
|
});
|
|
2498
|
-
var PageBlockItemRichTextEditorNode =
|
|
2488
|
+
var PageBlockItemRichTextEditorNode = z44.discriminatedUnion("type", [
|
|
2499
2489
|
PageBlockItemRichTextEditorParagraphNode,
|
|
2500
2490
|
PageBlockItemRichTextEditorListNode
|
|
2501
2491
|
]);
|
|
2502
|
-
var PageBlockItemRichTextEditorValue =
|
|
2492
|
+
var PageBlockItemRichTextEditorValue = z44.object({
|
|
2503
2493
|
value: PageBlockItemRichTextEditorNode.array()
|
|
2504
2494
|
});
|
|
2505
|
-
var PageBlockItemTableRichTextNode =
|
|
2506
|
-
type:
|
|
2507
|
-
id:
|
|
2495
|
+
var PageBlockItemTableRichTextNode = z44.object({
|
|
2496
|
+
type: z44.literal("RichText"),
|
|
2497
|
+
id: z44.string(),
|
|
2508
2498
|
value: PageBlockItemRichTextValue.shape.value
|
|
2509
2499
|
});
|
|
2510
|
-
var PageBlockItemTableImageNode =
|
|
2511
|
-
type:
|
|
2512
|
-
id:
|
|
2500
|
+
var PageBlockItemTableImageNode = z44.object({
|
|
2501
|
+
type: z44.literal("Image"),
|
|
2502
|
+
id: z44.string(),
|
|
2513
2503
|
caption: PageBlockItemImageValue.shape.caption,
|
|
2514
2504
|
alt: PageBlockItemImageValue.shape.alt,
|
|
2515
2505
|
value: PageBlockItemImageValue.shape.value,
|
|
2516
2506
|
alignment: PageBlockItemImageValue.shape.alignment
|
|
2517
2507
|
});
|
|
2518
|
-
var PageBlockItemTableNode =
|
|
2508
|
+
var PageBlockItemTableNode = z44.discriminatedUnion("type", [
|
|
2519
2509
|
PageBlockItemTableRichTextNode,
|
|
2520
2510
|
PageBlockItemTableImageNode
|
|
2521
2511
|
]);
|
|
2522
|
-
var PageBlockItemTableCell =
|
|
2523
|
-
id:
|
|
2524
|
-
nodes:
|
|
2525
|
-
columnWidth:
|
|
2512
|
+
var PageBlockItemTableCell = z44.object({
|
|
2513
|
+
id: z44.string(),
|
|
2514
|
+
nodes: z44.array(PageBlockItemTableNode),
|
|
2515
|
+
columnWidth: z44.number().optional(),
|
|
2526
2516
|
alignment: PageBlockTableCellAlignment
|
|
2527
2517
|
});
|
|
2528
|
-
var PageBlockItemTableRow =
|
|
2529
|
-
cells:
|
|
2518
|
+
var PageBlockItemTableRow = z44.object({
|
|
2519
|
+
cells: z44.array(PageBlockItemTableCell)
|
|
2530
2520
|
});
|
|
2531
|
-
var PageBlockItemTableValue =
|
|
2532
|
-
highlightHeaderColumn:
|
|
2533
|
-
highlightHeaderRow:
|
|
2534
|
-
showBorder:
|
|
2535
|
-
value:
|
|
2521
|
+
var PageBlockItemTableValue = z44.object({
|
|
2522
|
+
highlightHeaderColumn: z44.boolean().optional(),
|
|
2523
|
+
highlightHeaderRow: z44.boolean().optional(),
|
|
2524
|
+
showBorder: z44.boolean().optional(),
|
|
2525
|
+
value: z44.array(PageBlockItemTableRow).default([])
|
|
2536
2526
|
});
|
|
2537
2527
|
|
|
2538
2528
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
2539
|
-
import { z as
|
|
2529
|
+
import { z as z48 } from "zod";
|
|
2540
2530
|
|
|
2541
2531
|
// src/dsm/elements/data/documentation-v1.ts
|
|
2542
|
-
import { z as
|
|
2532
|
+
import { z as z47 } from "zod";
|
|
2543
2533
|
|
|
2544
2534
|
// src/dsm/elements/data/item-header-v1.ts
|
|
2545
|
-
import { z as
|
|
2535
|
+
import { z as z46 } from "zod";
|
|
2546
2536
|
|
|
2547
2537
|
// src/dsm/elements/data/item-header.ts
|
|
2548
|
-
import { z as
|
|
2549
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
2550
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
2538
|
+
import { z as z45 } from "zod";
|
|
2539
|
+
var DocumentationItemHeaderAlignmentSchema = z45.enum(["Left", "Center"]);
|
|
2540
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z45.enum(["AspectFill", "AspectFit"]);
|
|
2551
2541
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
2552
2542
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
2553
2543
|
|
|
2554
2544
|
// src/dsm/elements/data/item-header-v1.ts
|
|
2555
|
-
var DocumentationItemHeaderV1 =
|
|
2556
|
-
description:
|
|
2545
|
+
var DocumentationItemHeaderV1 = z46.object({
|
|
2546
|
+
description: z46.string(),
|
|
2557
2547
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
2558
2548
|
foregroundColor: ColorTokenData.nullish(),
|
|
2559
2549
|
backgroundColor: ColorTokenData.nullish(),
|
|
2560
2550
|
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
2561
2551
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
2562
|
-
showBackgroundOverlay:
|
|
2563
|
-
showCoverText:
|
|
2564
|
-
minHeight:
|
|
2552
|
+
showBackgroundOverlay: z46.boolean(),
|
|
2553
|
+
showCoverText: z46.boolean(),
|
|
2554
|
+
minHeight: z46.number().nullish()
|
|
2565
2555
|
});
|
|
2566
2556
|
var defaultDocumentationItemHeaderV1 = {
|
|
2567
2557
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -2572,10 +2562,10 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
2572
2562
|
};
|
|
2573
2563
|
|
|
2574
2564
|
// src/dsm/elements/data/documentation-v1.ts
|
|
2575
|
-
var DocumentationItemConfigurationV1 =
|
|
2576
|
-
showSidebar:
|
|
2577
|
-
isPrivate:
|
|
2578
|
-
isHidden:
|
|
2565
|
+
var DocumentationItemConfigurationV1 = z47.object({
|
|
2566
|
+
showSidebar: z47.boolean(),
|
|
2567
|
+
isPrivate: z47.boolean().optional(),
|
|
2568
|
+
isHidden: z47.boolean().optional(),
|
|
2579
2569
|
header: DocumentationItemHeaderV1
|
|
2580
2570
|
});
|
|
2581
2571
|
var defaultDocumentationItemConfigurationV1 = {
|
|
@@ -2584,29 +2574,29 @@ var defaultDocumentationItemConfigurationV1 = {
|
|
|
2584
2574
|
};
|
|
2585
2575
|
|
|
2586
2576
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
2587
|
-
var DocumentationPageDataV1 =
|
|
2588
|
-
blocks:
|
|
2577
|
+
var DocumentationPageDataV1 = z48.object({
|
|
2578
|
+
blocks: z48.array(PageBlockV1),
|
|
2589
2579
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
2590
2580
|
});
|
|
2591
2581
|
|
|
2592
2582
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
2593
|
-
import { z as
|
|
2583
|
+
import { z as z51 } from "zod";
|
|
2594
2584
|
|
|
2595
2585
|
// src/dsm/elements/data/documentation-v2.ts
|
|
2596
|
-
import { z as
|
|
2586
|
+
import { z as z50 } from "zod";
|
|
2597
2587
|
|
|
2598
2588
|
// src/dsm/elements/data/item-header-v2.ts
|
|
2599
|
-
import { z as
|
|
2600
|
-
var DocumentationItemHeaderV2 =
|
|
2601
|
-
description:
|
|
2589
|
+
import { z as z49 } from "zod";
|
|
2590
|
+
var DocumentationItemHeaderV2 = z49.object({
|
|
2591
|
+
description: z49.string(),
|
|
2602
2592
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
2603
2593
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
2604
2594
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
2605
2595
|
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
2606
2596
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
2607
|
-
showBackgroundOverlay:
|
|
2608
|
-
showCoverText:
|
|
2609
|
-
minHeight:
|
|
2597
|
+
showBackgroundOverlay: z49.boolean(),
|
|
2598
|
+
showCoverText: z49.boolean(),
|
|
2599
|
+
minHeight: z49.number().nullish()
|
|
2610
2600
|
});
|
|
2611
2601
|
var defaultDocumentationItemHeaderV2 = {
|
|
2612
2602
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -2617,10 +2607,10 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
2617
2607
|
};
|
|
2618
2608
|
|
|
2619
2609
|
// src/dsm/elements/data/documentation-v2.ts
|
|
2620
|
-
var DocumentationItemConfigurationV2 =
|
|
2621
|
-
showSidebar:
|
|
2622
|
-
isPrivate:
|
|
2623
|
-
isHidden:
|
|
2610
|
+
var DocumentationItemConfigurationV2 = z50.object({
|
|
2611
|
+
showSidebar: z50.boolean(),
|
|
2612
|
+
isPrivate: z50.boolean().optional(),
|
|
2613
|
+
isHidden: z50.boolean().optional(),
|
|
2624
2614
|
header: DocumentationItemHeaderV2
|
|
2625
2615
|
});
|
|
2626
2616
|
var defaultDocumentationItemConfigurationV2 = {
|
|
@@ -2631,122 +2621,122 @@ var defaultDocumentationItemConfigurationV2 = {
|
|
|
2631
2621
|
};
|
|
2632
2622
|
|
|
2633
2623
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
2634
|
-
var DocumentationPageDataV2 =
|
|
2624
|
+
var DocumentationPageDataV2 = z51.object({
|
|
2635
2625
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
2636
2626
|
});
|
|
2637
2627
|
|
|
2638
2628
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
2639
|
-
import { z as
|
|
2629
|
+
import { z as z54 } from "zod";
|
|
2640
2630
|
|
|
2641
2631
|
// src/dsm/elements/page-block-v2.ts
|
|
2642
|
-
import { z as
|
|
2632
|
+
import { z as z53 } from "zod";
|
|
2643
2633
|
|
|
2644
2634
|
// src/dsm/elements/base.ts
|
|
2645
|
-
import { z as
|
|
2646
|
-
var DesignElementOrigin =
|
|
2647
|
-
id:
|
|
2648
|
-
sourceId:
|
|
2649
|
-
name:
|
|
2650
|
-
});
|
|
2651
|
-
var DesignElementBase =
|
|
2652
|
-
id:
|
|
2653
|
-
persistentId:
|
|
2635
|
+
import { z as z52 } from "zod";
|
|
2636
|
+
var DesignElementOrigin = z52.object({
|
|
2637
|
+
id: z52.string(),
|
|
2638
|
+
sourceId: z52.string(),
|
|
2639
|
+
name: z52.string()
|
|
2640
|
+
});
|
|
2641
|
+
var DesignElementBase = z52.object({
|
|
2642
|
+
id: z52.string(),
|
|
2643
|
+
persistentId: z52.string(),
|
|
2654
2644
|
meta: ObjectMeta,
|
|
2655
|
-
designSystemVersionId:
|
|
2656
|
-
createdAt:
|
|
2657
|
-
updatedAt:
|
|
2645
|
+
designSystemVersionId: z52.string(),
|
|
2646
|
+
createdAt: z52.coerce.date(),
|
|
2647
|
+
updatedAt: z52.coerce.date()
|
|
2658
2648
|
});
|
|
2659
2649
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
2660
2650
|
origin: DesignElementOrigin
|
|
2661
2651
|
});
|
|
2662
|
-
var DesignElementGroupablePart =
|
|
2663
|
-
parentPersistentId:
|
|
2664
|
-
sortOrder:
|
|
2652
|
+
var DesignElementGroupablePart = z52.object({
|
|
2653
|
+
parentPersistentId: z52.string().optional(),
|
|
2654
|
+
sortOrder: z52.number()
|
|
2665
2655
|
});
|
|
2666
2656
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
2667
2657
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
2668
|
-
parentPersistentId:
|
|
2658
|
+
parentPersistentId: z52.string()
|
|
2669
2659
|
});
|
|
2670
|
-
var DesignElementBrandedPart =
|
|
2671
|
-
brandPersistentId:
|
|
2660
|
+
var DesignElementBrandedPart = z52.object({
|
|
2661
|
+
brandPersistentId: z52.string()
|
|
2672
2662
|
});
|
|
2673
|
-
var DesignElementSlugPart =
|
|
2674
|
-
slug:
|
|
2675
|
-
userSlug:
|
|
2663
|
+
var DesignElementSlugPart = z52.object({
|
|
2664
|
+
slug: z52.string().optional(),
|
|
2665
|
+
userSlug: z52.string().optional()
|
|
2676
2666
|
});
|
|
2677
2667
|
|
|
2678
2668
|
// src/dsm/elements/page-block-v2.ts
|
|
2679
2669
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
2680
2670
|
data: PageBlockDataV2
|
|
2681
2671
|
});
|
|
2682
|
-
var PageBlockEditorModelV2 =
|
|
2683
|
-
id:
|
|
2684
|
-
type:
|
|
2672
|
+
var PageBlockEditorModelV2 = z53.object({
|
|
2673
|
+
id: z53.string(),
|
|
2674
|
+
type: z53.literal("Block"),
|
|
2685
2675
|
data: PageBlockDataV2
|
|
2686
2676
|
});
|
|
2687
2677
|
|
|
2688
2678
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
2689
|
-
var PageSectionTypeV2 =
|
|
2690
|
-
var PageSectionColumnV2 =
|
|
2691
|
-
id:
|
|
2692
|
-
blocks:
|
|
2693
|
-
});
|
|
2694
|
-
var PageSectionItemV2 =
|
|
2695
|
-
id:
|
|
2696
|
-
title:
|
|
2697
|
-
columns:
|
|
2698
|
-
});
|
|
2699
|
-
var PageSectionPaddingV2 =
|
|
2700
|
-
top:
|
|
2701
|
-
bottom:
|
|
2702
|
-
left:
|
|
2703
|
-
right:
|
|
2704
|
-
});
|
|
2705
|
-
var PageSectionAppearanceV2 =
|
|
2706
|
-
expandToEdges:
|
|
2707
|
-
contentExpandToEdges:
|
|
2679
|
+
var PageSectionTypeV2 = z54.enum(["Tabs"]);
|
|
2680
|
+
var PageSectionColumnV2 = z54.object({
|
|
2681
|
+
id: z54.string(),
|
|
2682
|
+
blocks: z54.array(PageBlockEditorModelV2)
|
|
2683
|
+
});
|
|
2684
|
+
var PageSectionItemV2 = z54.object({
|
|
2685
|
+
id: z54.string(),
|
|
2686
|
+
title: z54.string(),
|
|
2687
|
+
columns: z54.array(PageSectionColumnV2)
|
|
2688
|
+
});
|
|
2689
|
+
var PageSectionPaddingV2 = z54.object({
|
|
2690
|
+
top: z54.number().optional(),
|
|
2691
|
+
bottom: z54.number().optional(),
|
|
2692
|
+
left: z54.number().optional(),
|
|
2693
|
+
right: z54.number().optional()
|
|
2694
|
+
});
|
|
2695
|
+
var PageSectionAppearanceV2 = z54.object({
|
|
2696
|
+
expandToEdges: z54.boolean(),
|
|
2697
|
+
contentExpandToEdges: z54.boolean(),
|
|
2708
2698
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2709
2699
|
foregroundColor: PageBlockColorV2.optional(),
|
|
2710
2700
|
padding: PageSectionPaddingV2.optional()
|
|
2711
2701
|
});
|
|
2712
|
-
var PageSectionEditorModelV2 =
|
|
2713
|
-
id:
|
|
2714
|
-
type:
|
|
2715
|
-
variantId:
|
|
2702
|
+
var PageSectionEditorModelV2 = z54.object({
|
|
2703
|
+
id: z54.string(),
|
|
2704
|
+
type: z54.literal("Section"),
|
|
2705
|
+
variantId: z54.string().optional(),
|
|
2716
2706
|
sectionType: PageSectionTypeV2,
|
|
2717
2707
|
appearance: PageSectionAppearanceV2,
|
|
2718
|
-
items:
|
|
2708
|
+
items: z54.array(PageSectionItemV2)
|
|
2719
2709
|
});
|
|
2720
2710
|
|
|
2721
2711
|
// src/dsm/elements/data/duration.ts
|
|
2722
|
-
import { z as
|
|
2723
|
-
var DurationUnit =
|
|
2724
|
-
var DurationValue =
|
|
2712
|
+
import { z as z55 } from "zod";
|
|
2713
|
+
var DurationUnit = z55.enum(["Ms"]);
|
|
2714
|
+
var DurationValue = z55.object({
|
|
2725
2715
|
unit: DurationUnit,
|
|
2726
|
-
measure:
|
|
2716
|
+
measure: z55.number()
|
|
2727
2717
|
});
|
|
2728
2718
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
2729
2719
|
|
|
2730
2720
|
// src/dsm/elements/data/figma-file-structure.ts
|
|
2731
|
-
import { z as
|
|
2732
|
-
var FigmaFileStructureNodeType =
|
|
2733
|
-
var FigmaFileStructureNodeBase =
|
|
2734
|
-
id:
|
|
2735
|
-
name:
|
|
2721
|
+
import { z as z56 } from "zod";
|
|
2722
|
+
var FigmaFileStructureNodeType = z56.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
2723
|
+
var FigmaFileStructureNodeBase = z56.object({
|
|
2724
|
+
id: z56.string(),
|
|
2725
|
+
name: z56.string(),
|
|
2736
2726
|
type: FigmaFileStructureNodeType,
|
|
2737
2727
|
size: SizeOrUndefined,
|
|
2738
|
-
parentComponentSetId:
|
|
2728
|
+
parentComponentSetId: z56.string().optional()
|
|
2739
2729
|
});
|
|
2740
2730
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
2741
|
-
children:
|
|
2731
|
+
children: z56.lazy(() => FigmaFileStructureNode.array())
|
|
2742
2732
|
});
|
|
2743
|
-
var FigmaFileStructureStatistics =
|
|
2744
|
-
frames:
|
|
2745
|
-
components:
|
|
2746
|
-
componentSets:
|
|
2733
|
+
var FigmaFileStructureStatistics = z56.object({
|
|
2734
|
+
frames: z56.number().nullable().optional().transform((v) => v ?? 0),
|
|
2735
|
+
components: z56.number().nullable().optional().transform((v) => v ?? 0),
|
|
2736
|
+
componentSets: z56.number().nullable().optional().transform((v) => v ?? 0)
|
|
2747
2737
|
});
|
|
2748
|
-
var FigmaFileStructureElementData =
|
|
2749
|
-
value:
|
|
2738
|
+
var FigmaFileStructureElementData = z56.object({
|
|
2739
|
+
value: z56.object({
|
|
2750
2740
|
structure: FigmaFileStructureNode,
|
|
2751
2741
|
assetsInFile: FigmaFileStructureStatistics
|
|
2752
2742
|
})
|
|
@@ -2763,126 +2753,126 @@ function recursiveFigmaFileStructureToMap(node, map) {
|
|
|
2763
2753
|
}
|
|
2764
2754
|
|
|
2765
2755
|
// src/dsm/elements/data/figma-node-reference.ts
|
|
2766
|
-
import { z as
|
|
2767
|
-
var FigmaNodeRenderFormat =
|
|
2768
|
-
var FigmaNodeReferenceData =
|
|
2769
|
-
structureElementId:
|
|
2770
|
-
nodeId:
|
|
2771
|
-
fileId:
|
|
2772
|
-
valid:
|
|
2756
|
+
import { z as z57 } from "zod";
|
|
2757
|
+
var FigmaNodeRenderFormat = z57.enum(["Png", "Svg"]);
|
|
2758
|
+
var FigmaNodeReferenceData = z57.object({
|
|
2759
|
+
structureElementId: z57.string(),
|
|
2760
|
+
nodeId: z57.string(),
|
|
2761
|
+
fileId: z57.string().optional(),
|
|
2762
|
+
valid: z57.boolean(),
|
|
2773
2763
|
format: FigmaNodeRenderFormat.default("Png"),
|
|
2774
2764
|
// Asset data
|
|
2775
|
-
assetId:
|
|
2776
|
-
assetScale:
|
|
2777
|
-
assetWidth:
|
|
2778
|
-
assetHeight:
|
|
2779
|
-
assetUrl:
|
|
2780
|
-
assetOriginKey:
|
|
2781
|
-
});
|
|
2782
|
-
var FigmaNodeReferenceElementData =
|
|
2765
|
+
assetId: z57.string().optional(),
|
|
2766
|
+
assetScale: z57.number().optional(),
|
|
2767
|
+
assetWidth: z57.number().optional(),
|
|
2768
|
+
assetHeight: z57.number().optional(),
|
|
2769
|
+
assetUrl: z57.string().optional(),
|
|
2770
|
+
assetOriginKey: z57.string().optional()
|
|
2771
|
+
});
|
|
2772
|
+
var FigmaNodeReferenceElementData = z57.object({
|
|
2783
2773
|
value: FigmaNodeReferenceData
|
|
2784
2774
|
});
|
|
2785
2775
|
|
|
2786
2776
|
// src/dsm/elements/data/font-family.ts
|
|
2787
|
-
import { z as
|
|
2788
|
-
var FontFamilyValue =
|
|
2777
|
+
import { z as z58 } from "zod";
|
|
2778
|
+
var FontFamilyValue = z58.string();
|
|
2789
2779
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
2790
2780
|
|
|
2791
2781
|
// src/dsm/elements/data/font-size.ts
|
|
2792
|
-
import { z as
|
|
2793
|
-
var FontSizeUnit =
|
|
2794
|
-
var FontSizeValue =
|
|
2782
|
+
import { z as z59 } from "zod";
|
|
2783
|
+
var FontSizeUnit = z59.enum(["Pixels", "Rem", "Percent"]);
|
|
2784
|
+
var FontSizeValue = z59.object({
|
|
2795
2785
|
unit: FontSizeUnit,
|
|
2796
|
-
measure:
|
|
2786
|
+
measure: z59.number()
|
|
2797
2787
|
});
|
|
2798
2788
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
2799
2789
|
|
|
2800
2790
|
// src/dsm/elements/data/font-weight.ts
|
|
2801
|
-
import { z as
|
|
2802
|
-
var FontWeightValue =
|
|
2791
|
+
import { z as z60 } from "zod";
|
|
2792
|
+
var FontWeightValue = z60.string();
|
|
2803
2793
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
2804
2794
|
|
|
2805
2795
|
// src/dsm/elements/data/font.ts
|
|
2806
|
-
import { z as
|
|
2807
|
-
var FontValue =
|
|
2796
|
+
import { z as z61 } from "zod";
|
|
2797
|
+
var FontValue = z61.unknown();
|
|
2808
2798
|
var FontTokenData = tokenAliasOrValue(FontValue);
|
|
2809
2799
|
|
|
2810
2800
|
// src/dsm/elements/data/gradient.ts
|
|
2811
|
-
import { z as
|
|
2812
|
-
var GradientType =
|
|
2813
|
-
var GradientStop =
|
|
2814
|
-
position:
|
|
2801
|
+
import { z as z62 } from "zod";
|
|
2802
|
+
var GradientType = z62.enum(["Linear", "Radial", "Angular"]);
|
|
2803
|
+
var GradientStop = z62.object({
|
|
2804
|
+
position: z62.number(),
|
|
2815
2805
|
color: ColorTokenData
|
|
2816
2806
|
});
|
|
2817
|
-
var GradientLayerValue =
|
|
2807
|
+
var GradientLayerValue = z62.object({
|
|
2818
2808
|
from: Point2D,
|
|
2819
2809
|
to: Point2D,
|
|
2820
2810
|
type: GradientType,
|
|
2821
|
-
aspectRatio: nullishToOptional(
|
|
2811
|
+
aspectRatio: nullishToOptional(z62.number()),
|
|
2822
2812
|
// z.number(),
|
|
2823
|
-
stops:
|
|
2813
|
+
stops: z62.array(GradientStop).min(2)
|
|
2824
2814
|
});
|
|
2825
2815
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
2826
|
-
var GradientTokenValue =
|
|
2816
|
+
var GradientTokenValue = z62.array(GradientLayerData);
|
|
2827
2817
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
2828
2818
|
|
|
2829
2819
|
// src/dsm/elements/data/group.ts
|
|
2830
|
-
import { z as
|
|
2831
|
-
var DocumentationGroupBehavior =
|
|
2832
|
-
var ElementGroupDataV1 =
|
|
2820
|
+
import { z as z63 } from "zod";
|
|
2821
|
+
var DocumentationGroupBehavior = z63.enum(["Group", "Tabs"]);
|
|
2822
|
+
var ElementGroupDataV1 = z63.object({
|
|
2833
2823
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
2834
2824
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
2835
2825
|
});
|
|
2836
|
-
var ElementGroupDataV2 =
|
|
2826
|
+
var ElementGroupDataV2 = z63.object({
|
|
2837
2827
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
2838
2828
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
2839
2829
|
});
|
|
2840
2830
|
|
|
2841
2831
|
// src/dsm/elements/data/letter-spacing.ts
|
|
2842
|
-
import { z as
|
|
2843
|
-
var LetterSpacingUnit =
|
|
2844
|
-
var LetterSpacingValue =
|
|
2832
|
+
import { z as z64 } from "zod";
|
|
2833
|
+
var LetterSpacingUnit = z64.enum(["Pixels", "Rem", "Percent"]);
|
|
2834
|
+
var LetterSpacingValue = z64.object({
|
|
2845
2835
|
unit: LetterSpacingUnit,
|
|
2846
|
-
measure:
|
|
2836
|
+
measure: z64.number()
|
|
2847
2837
|
});
|
|
2848
2838
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
2849
2839
|
|
|
2850
2840
|
// src/dsm/elements/data/line-height.ts
|
|
2851
|
-
import { z as
|
|
2852
|
-
var LineHeightUnit =
|
|
2853
|
-
var LineHeightValue =
|
|
2841
|
+
import { z as z65 } from "zod";
|
|
2842
|
+
var LineHeightUnit = z65.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
2843
|
+
var LineHeightValue = z65.object({
|
|
2854
2844
|
unit: LineHeightUnit,
|
|
2855
|
-
measure:
|
|
2845
|
+
measure: z65.number()
|
|
2856
2846
|
});
|
|
2857
2847
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
2858
2848
|
|
|
2859
2849
|
// src/dsm/elements/data/paragraph-indent.ts
|
|
2860
|
-
import { z as
|
|
2861
|
-
var ParagraphIndentUnit =
|
|
2862
|
-
var ParagraphIndentValue =
|
|
2850
|
+
import { z as z66 } from "zod";
|
|
2851
|
+
var ParagraphIndentUnit = z66.enum(["Pixels", "Rem", "Percent"]);
|
|
2852
|
+
var ParagraphIndentValue = z66.object({
|
|
2863
2853
|
unit: ParagraphIndentUnit,
|
|
2864
|
-
measure:
|
|
2854
|
+
measure: z66.number()
|
|
2865
2855
|
});
|
|
2866
2856
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
2867
2857
|
|
|
2868
2858
|
// src/dsm/elements/data/paragraph-spacing.ts
|
|
2869
|
-
import { z as
|
|
2870
|
-
var ParagraphSpacingUnit =
|
|
2871
|
-
var ParagraphSpacingValue =
|
|
2859
|
+
import { z as z67 } from "zod";
|
|
2860
|
+
var ParagraphSpacingUnit = z67.enum(["Pixels", "Rem", "Percent"]);
|
|
2861
|
+
var ParagraphSpacingValue = z67.object({
|
|
2872
2862
|
unit: ParagraphSpacingUnit,
|
|
2873
|
-
measure:
|
|
2863
|
+
measure: z67.number()
|
|
2874
2864
|
});
|
|
2875
2865
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
2876
2866
|
|
|
2877
2867
|
// src/dsm/elements/data/product-copy.ts
|
|
2878
|
-
import { z as
|
|
2879
|
-
var ProductCopyValue =
|
|
2868
|
+
import { z as z68 } from "zod";
|
|
2869
|
+
var ProductCopyValue = z68.string();
|
|
2880
2870
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
2881
2871
|
|
|
2882
2872
|
// src/dsm/elements/data/safe-id.ts
|
|
2883
|
-
import { z as
|
|
2873
|
+
import { z as z69 } from "zod";
|
|
2884
2874
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
2885
|
-
var SafeIdSchema =
|
|
2875
|
+
var SafeIdSchema = z69.string().refine(
|
|
2886
2876
|
(value) => {
|
|
2887
2877
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
2888
2878
|
},
|
|
@@ -2892,58 +2882,58 @@ var SafeIdSchema = z70.string().refine(
|
|
|
2892
2882
|
);
|
|
2893
2883
|
|
|
2894
2884
|
// src/dsm/elements/data/shadow.ts
|
|
2895
|
-
import { z as
|
|
2896
|
-
var ShadowType =
|
|
2897
|
-
var ShadowLayerValue =
|
|
2885
|
+
import { z as z70 } from "zod";
|
|
2886
|
+
var ShadowType = z70.enum(["Drop", "Inner"]);
|
|
2887
|
+
var ShadowLayerValue = z70.object({
|
|
2898
2888
|
color: ColorTokenData,
|
|
2899
|
-
x:
|
|
2900
|
-
y:
|
|
2901
|
-
radius:
|
|
2902
|
-
spread:
|
|
2889
|
+
x: z70.number(),
|
|
2890
|
+
y: z70.number(),
|
|
2891
|
+
radius: z70.number(),
|
|
2892
|
+
spread: z70.number(),
|
|
2903
2893
|
opacity: OpacityTokenData.optional(),
|
|
2904
2894
|
type: ShadowType
|
|
2905
2895
|
});
|
|
2906
2896
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
2907
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
2897
|
+
var ShadowTokenData = tokenAliasOrValue(z70.array(ShadowTokenDataBase));
|
|
2908
2898
|
|
|
2909
2899
|
// src/dsm/elements/data/size.ts
|
|
2910
|
-
import { z as
|
|
2911
|
-
var SizeUnit =
|
|
2912
|
-
var SizeValue =
|
|
2900
|
+
import { z as z71 } from "zod";
|
|
2901
|
+
var SizeUnit = z71.enum(["Pixels", "Rem", "Percent"]);
|
|
2902
|
+
var SizeValue = z71.object({
|
|
2913
2903
|
unit: SizeUnit,
|
|
2914
|
-
measure:
|
|
2904
|
+
measure: z71.number()
|
|
2915
2905
|
});
|
|
2916
2906
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
2917
2907
|
|
|
2918
2908
|
// src/dsm/elements/data/space.ts
|
|
2919
|
-
import { z as
|
|
2920
|
-
var SpaceUnit =
|
|
2921
|
-
var SpaceValue =
|
|
2909
|
+
import { z as z72 } from "zod";
|
|
2910
|
+
var SpaceUnit = z72.enum(["Pixels", "Rem", "Percent"]);
|
|
2911
|
+
var SpaceValue = z72.object({
|
|
2922
2912
|
unit: SpaceUnit,
|
|
2923
|
-
measure:
|
|
2913
|
+
measure: z72.number()
|
|
2924
2914
|
});
|
|
2925
2915
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
2926
2916
|
|
|
2927
2917
|
// src/dsm/elements/data/string.ts
|
|
2928
|
-
import { z as
|
|
2929
|
-
var StringValue =
|
|
2918
|
+
import { z as z73 } from "zod";
|
|
2919
|
+
var StringValue = z73.string();
|
|
2930
2920
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
2931
2921
|
|
|
2932
2922
|
// src/dsm/elements/data/text-case.ts
|
|
2933
|
-
import { z as
|
|
2934
|
-
var TextCase =
|
|
2923
|
+
import { z as z74 } from "zod";
|
|
2924
|
+
var TextCase = z74.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
2935
2925
|
var TextCaseValue = TextCase;
|
|
2936
2926
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
2937
2927
|
|
|
2938
2928
|
// src/dsm/elements/data/text-decoration.ts
|
|
2939
|
-
import { z as
|
|
2940
|
-
var TextDecoration =
|
|
2929
|
+
import { z as z75 } from "zod";
|
|
2930
|
+
var TextDecoration = z75.enum(["None", "Underline", "Strikethrough"]);
|
|
2941
2931
|
var TextDecorationValue = TextDecoration;
|
|
2942
2932
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
2943
2933
|
|
|
2944
2934
|
// src/dsm/elements/data/typography.ts
|
|
2945
|
-
import { z as
|
|
2946
|
-
var TypographyValue =
|
|
2935
|
+
import { z as z76 } from "zod";
|
|
2936
|
+
var TypographyValue = z76.object({
|
|
2947
2937
|
fontSize: FontSizeTokenData,
|
|
2948
2938
|
fontFamily: FontFamilyTokenData,
|
|
2949
2939
|
fontWeight: FontWeightTokenData,
|
|
@@ -2957,27 +2947,27 @@ var TypographyValue = z77.object({
|
|
|
2957
2947
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
2958
2948
|
|
|
2959
2949
|
// src/dsm/elements/data/visibility.ts
|
|
2960
|
-
import { z as
|
|
2961
|
-
var Visibility =
|
|
2950
|
+
import { z as z77 } from "zod";
|
|
2951
|
+
var Visibility = z77.enum(["Hidden", "Visible"]);
|
|
2962
2952
|
var VisibilityValue = Visibility;
|
|
2963
2953
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
2964
2954
|
|
|
2965
2955
|
// src/dsm/elements/data/z-index.ts
|
|
2966
|
-
import { z as
|
|
2967
|
-
var ZIndexUnit =
|
|
2968
|
-
var ZIndexValue =
|
|
2956
|
+
import { z as z78 } from "zod";
|
|
2957
|
+
var ZIndexUnit = z78.enum(["Raw"]);
|
|
2958
|
+
var ZIndexValue = z78.object({
|
|
2969
2959
|
unit: ZIndexUnit,
|
|
2970
|
-
measure:
|
|
2960
|
+
measure: z78.number()
|
|
2971
2961
|
});
|
|
2972
2962
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
2973
2963
|
|
|
2974
2964
|
// src/dsm/elements/documentation-page-v1.ts
|
|
2975
|
-
import { z as
|
|
2965
|
+
import { z as z80 } from "zod";
|
|
2976
2966
|
|
|
2977
2967
|
// src/dsm/elements/group.ts
|
|
2978
|
-
import { z as
|
|
2968
|
+
import { z as z79 } from "zod";
|
|
2979
2969
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
2980
|
-
shortPersistentId:
|
|
2970
|
+
shortPersistentId: z79.string().optional(),
|
|
2981
2971
|
childType: DesignElementType,
|
|
2982
2972
|
data: ElementGroupDataV2.optional()
|
|
2983
2973
|
});
|
|
@@ -2985,7 +2975,7 @@ var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
|
2985
2975
|
|
|
2986
2976
|
// src/dsm/elements/documentation-page-v1.ts
|
|
2987
2977
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
2988
|
-
shortPersistentId:
|
|
2978
|
+
shortPersistentId: z80.string(),
|
|
2989
2979
|
data: DocumentationPageDataV1
|
|
2990
2980
|
});
|
|
2991
2981
|
var DocumentationGroupV1 = ElementGroup.omit({
|
|
@@ -2995,24 +2985,24 @@ var DocumentationGroupV1 = ElementGroup.omit({
|
|
|
2995
2985
|
});
|
|
2996
2986
|
|
|
2997
2987
|
// src/dsm/elements/documentation-page-v2.ts
|
|
2998
|
-
import { z as
|
|
2988
|
+
import { z as z81 } from "zod";
|
|
2999
2989
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
3000
|
-
shortPersistentId:
|
|
2990
|
+
shortPersistentId: z81.string(),
|
|
3001
2991
|
data: DocumentationPageDataV2.extend({
|
|
3002
|
-
oldBlocks:
|
|
2992
|
+
oldBlocks: z81.array(PageBlockV1).optional()
|
|
3003
2993
|
})
|
|
3004
2994
|
});
|
|
3005
2995
|
|
|
3006
2996
|
// src/dsm/elements/figma-component.ts
|
|
3007
|
-
import { z as
|
|
3008
|
-
var FigmaComponentOriginPart =
|
|
3009
|
-
nodeId:
|
|
3010
|
-
width:
|
|
3011
|
-
height:
|
|
2997
|
+
import { z as z82 } from "zod";
|
|
2998
|
+
var FigmaComponentOriginPart = z82.object({
|
|
2999
|
+
nodeId: z82.string().optional(),
|
|
3000
|
+
width: z82.number().optional(),
|
|
3001
|
+
height: z82.number().optional()
|
|
3012
3002
|
});
|
|
3013
|
-
var FigmaComponentAsset =
|
|
3014
|
-
assetId:
|
|
3015
|
-
assetPath:
|
|
3003
|
+
var FigmaComponentAsset = z82.object({
|
|
3004
|
+
assetId: z82.string(),
|
|
3005
|
+
assetPath: z82.string()
|
|
3016
3006
|
});
|
|
3017
3007
|
var FigmaComponentOrigin = DesignElementOrigin.extend(FigmaComponentOriginPart.shape);
|
|
3018
3008
|
var FigmaComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -3020,20 +3010,20 @@ var FigmaComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart
|
|
|
3020
3010
|
thumbnail: FigmaComponentAsset,
|
|
3021
3011
|
componentPropertyDefinitions: FigmaComponentPropertyMap.optional(),
|
|
3022
3012
|
svg: FigmaComponentAsset.optional(),
|
|
3023
|
-
isAsset:
|
|
3024
|
-
parentComponentPersistentId: nullishToOptional(
|
|
3013
|
+
isAsset: z82.boolean(),
|
|
3014
|
+
parentComponentPersistentId: nullishToOptional(z82.string())
|
|
3025
3015
|
});
|
|
3026
3016
|
function isImportedFigmaComponent(component) {
|
|
3027
3017
|
return !!component.origin;
|
|
3028
3018
|
}
|
|
3029
3019
|
|
|
3030
3020
|
// src/dsm/elements/figma-file-structures.ts
|
|
3031
|
-
import { z as
|
|
3032
|
-
var FigmaFileStructureOrigin =
|
|
3033
|
-
sourceId:
|
|
3034
|
-
fileId:
|
|
3021
|
+
import { z as z83 } from "zod";
|
|
3022
|
+
var FigmaFileStructureOrigin = z83.object({
|
|
3023
|
+
sourceId: z83.string(),
|
|
3024
|
+
fileId: z83.string().optional()
|
|
3035
3025
|
});
|
|
3036
|
-
var FigmaFileStructureData =
|
|
3026
|
+
var FigmaFileStructureData = z83.object({
|
|
3037
3027
|
rootNode: FigmaFileStructureNode,
|
|
3038
3028
|
assetsInFile: FigmaFileStructureStatistics
|
|
3039
3029
|
});
|
|
@@ -3049,10 +3039,10 @@ function traverseStructure(node, action) {
|
|
|
3049
3039
|
}
|
|
3050
3040
|
|
|
3051
3041
|
// src/dsm/elements/figma-node-reference.ts
|
|
3052
|
-
import { z as
|
|
3053
|
-
var FigmaNodeReferenceOrigin =
|
|
3054
|
-
sourceId:
|
|
3055
|
-
parentName:
|
|
3042
|
+
import { z as z84 } from "zod";
|
|
3043
|
+
var FigmaNodeReferenceOrigin = z84.object({
|
|
3044
|
+
sourceId: z84.string(),
|
|
3045
|
+
parentName: z84.string().optional()
|
|
3056
3046
|
});
|
|
3057
3047
|
var FigmaNodeReference = DesignElementBase.extend({
|
|
3058
3048
|
data: FigmaNodeReferenceData,
|
|
@@ -3060,18 +3050,18 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
3060
3050
|
});
|
|
3061
3051
|
|
|
3062
3052
|
// src/dsm/elements/theme.ts
|
|
3063
|
-
import { z as
|
|
3053
|
+
import { z as z86 } from "zod";
|
|
3064
3054
|
|
|
3065
3055
|
// src/dsm/elements/tokens.ts
|
|
3066
|
-
import { z as
|
|
3067
|
-
var DesignTokenOriginPart =
|
|
3068
|
-
referenceOriginId:
|
|
3069
|
-
referenceOriginKey:
|
|
3070
|
-
referenceOriginName:
|
|
3071
|
-
referenceOriginRemote:
|
|
3072
|
-
referencePersistentId:
|
|
3073
|
-
referenceResolutionFailed:
|
|
3074
|
-
key:
|
|
3056
|
+
import { z as z85 } from "zod";
|
|
3057
|
+
var DesignTokenOriginPart = z85.object({
|
|
3058
|
+
referenceOriginId: z85.string().optional(),
|
|
3059
|
+
referenceOriginKey: z85.string().optional(),
|
|
3060
|
+
referenceOriginName: z85.string().optional(),
|
|
3061
|
+
referenceOriginRemote: z85.boolean().optional(),
|
|
3062
|
+
referencePersistentId: z85.string().optional(),
|
|
3063
|
+
referenceResolutionFailed: z85.boolean().optional(),
|
|
3064
|
+
key: z85.string().optional()
|
|
3075
3065
|
});
|
|
3076
3066
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
3077
3067
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -3083,111 +3073,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
3083
3073
|
brandPersistentId: true,
|
|
3084
3074
|
designSystemVersionId: true
|
|
3085
3075
|
});
|
|
3086
|
-
var BlurTokenTypedData =
|
|
3087
|
-
type:
|
|
3076
|
+
var BlurTokenTypedData = z85.object({
|
|
3077
|
+
type: z85.literal("Blur"),
|
|
3088
3078
|
data: BlurTokenData
|
|
3089
3079
|
});
|
|
3090
|
-
var ColorTokenTypedData =
|
|
3091
|
-
type:
|
|
3080
|
+
var ColorTokenTypedData = z85.object({
|
|
3081
|
+
type: z85.literal("Color"),
|
|
3092
3082
|
data: ColorTokenData
|
|
3093
3083
|
});
|
|
3094
|
-
var GradientTokenTypedData =
|
|
3095
|
-
type:
|
|
3084
|
+
var GradientTokenTypedData = z85.object({
|
|
3085
|
+
type: z85.literal("Gradient"),
|
|
3096
3086
|
data: GradientTokenData
|
|
3097
3087
|
});
|
|
3098
|
-
var OpacityTokenTypedData =
|
|
3099
|
-
type:
|
|
3088
|
+
var OpacityTokenTypedData = z85.object({
|
|
3089
|
+
type: z85.literal("Opacity"),
|
|
3100
3090
|
data: OpacityTokenData
|
|
3101
3091
|
});
|
|
3102
|
-
var ShadowTokenTypedData =
|
|
3103
|
-
type:
|
|
3092
|
+
var ShadowTokenTypedData = z85.object({
|
|
3093
|
+
type: z85.literal("Shadow"),
|
|
3104
3094
|
data: ShadowTokenData
|
|
3105
3095
|
});
|
|
3106
|
-
var TypographyTokenTypedData =
|
|
3107
|
-
type:
|
|
3096
|
+
var TypographyTokenTypedData = z85.object({
|
|
3097
|
+
type: z85.literal("Typography"),
|
|
3108
3098
|
data: TypographyTokenData
|
|
3109
3099
|
});
|
|
3110
|
-
var StringTokenTypedData =
|
|
3111
|
-
type:
|
|
3100
|
+
var StringTokenTypedData = z85.object({
|
|
3101
|
+
type: z85.literal("String"),
|
|
3112
3102
|
data: StringTokenData
|
|
3113
3103
|
});
|
|
3114
|
-
var DimensionTokenTypedData =
|
|
3115
|
-
type:
|
|
3104
|
+
var DimensionTokenTypedData = z85.object({
|
|
3105
|
+
type: z85.literal("Dimension"),
|
|
3116
3106
|
data: DimensionTokenData
|
|
3117
3107
|
});
|
|
3118
|
-
var FontSizeTokenTypedData =
|
|
3119
|
-
type:
|
|
3108
|
+
var FontSizeTokenTypedData = z85.object({
|
|
3109
|
+
type: z85.literal("FontSize"),
|
|
3120
3110
|
data: FontSizeTokenData
|
|
3121
3111
|
});
|
|
3122
|
-
var FontFamilyTokenTypedData =
|
|
3123
|
-
type:
|
|
3112
|
+
var FontFamilyTokenTypedData = z85.object({
|
|
3113
|
+
type: z85.literal("FontFamily"),
|
|
3124
3114
|
data: FontFamilyTokenData
|
|
3125
3115
|
});
|
|
3126
|
-
var FontWeightTokenTypedData =
|
|
3127
|
-
type:
|
|
3116
|
+
var FontWeightTokenTypedData = z85.object({
|
|
3117
|
+
type: z85.literal("FontWeight"),
|
|
3128
3118
|
data: FontWeightTokenData
|
|
3129
3119
|
});
|
|
3130
|
-
var LetterSpacingTokenTypedData =
|
|
3131
|
-
type:
|
|
3120
|
+
var LetterSpacingTokenTypedData = z85.object({
|
|
3121
|
+
type: z85.literal("LetterSpacing"),
|
|
3132
3122
|
data: LetterSpacingTokenData
|
|
3133
3123
|
});
|
|
3134
|
-
var LineHeightTokenTypedData =
|
|
3135
|
-
type:
|
|
3124
|
+
var LineHeightTokenTypedData = z85.object({
|
|
3125
|
+
type: z85.literal("LineHeight"),
|
|
3136
3126
|
data: LineHeightTokenData
|
|
3137
3127
|
});
|
|
3138
|
-
var ParagraphSpacingTokenTypedData =
|
|
3139
|
-
type:
|
|
3128
|
+
var ParagraphSpacingTokenTypedData = z85.object({
|
|
3129
|
+
type: z85.literal("ParagraphSpacing"),
|
|
3140
3130
|
data: ParagraphSpacingTokenData
|
|
3141
3131
|
});
|
|
3142
|
-
var TextCaseTokenTypedData =
|
|
3143
|
-
type:
|
|
3132
|
+
var TextCaseTokenTypedData = z85.object({
|
|
3133
|
+
type: z85.literal("TextCase"),
|
|
3144
3134
|
data: TextCaseTokenData
|
|
3145
3135
|
});
|
|
3146
|
-
var TextDecorationTokenTypedData =
|
|
3147
|
-
type:
|
|
3136
|
+
var TextDecorationTokenTypedData = z85.object({
|
|
3137
|
+
type: z85.literal("TextDecoration"),
|
|
3148
3138
|
data: TextDecorationTokenData
|
|
3149
3139
|
});
|
|
3150
|
-
var BorderRadiusTokenTypedData =
|
|
3151
|
-
type:
|
|
3140
|
+
var BorderRadiusTokenTypedData = z85.object({
|
|
3141
|
+
type: z85.literal("BorderRadius"),
|
|
3152
3142
|
data: BorderRadiusTokenData
|
|
3153
3143
|
});
|
|
3154
|
-
var BorderWidthTokenTypedData =
|
|
3155
|
-
type:
|
|
3144
|
+
var BorderWidthTokenTypedData = z85.object({
|
|
3145
|
+
type: z85.literal("BorderWidth"),
|
|
3156
3146
|
data: BorderWidthTokenData
|
|
3157
3147
|
});
|
|
3158
|
-
var BorderTypedData =
|
|
3159
|
-
type:
|
|
3148
|
+
var BorderTypedData = z85.object({
|
|
3149
|
+
type: z85.literal("Border"),
|
|
3160
3150
|
data: BorderTokenData
|
|
3161
3151
|
});
|
|
3162
|
-
var ProductCopyTypedData =
|
|
3163
|
-
type:
|
|
3152
|
+
var ProductCopyTypedData = z85.object({
|
|
3153
|
+
type: z85.literal("ProductCopy"),
|
|
3164
3154
|
data: ProductCopyTokenData
|
|
3165
3155
|
});
|
|
3166
|
-
var SizeTypedData =
|
|
3167
|
-
type:
|
|
3156
|
+
var SizeTypedData = z85.object({
|
|
3157
|
+
type: z85.literal("Size"),
|
|
3168
3158
|
data: SizeTokenData
|
|
3169
3159
|
});
|
|
3170
|
-
var SpaceTypedData =
|
|
3171
|
-
type:
|
|
3160
|
+
var SpaceTypedData = z85.object({
|
|
3161
|
+
type: z85.literal("Space"),
|
|
3172
3162
|
data: SpaceTokenData
|
|
3173
3163
|
});
|
|
3174
|
-
var VisibilityTypedData =
|
|
3175
|
-
type:
|
|
3164
|
+
var VisibilityTypedData = z85.object({
|
|
3165
|
+
type: z85.literal("Visibility"),
|
|
3176
3166
|
data: VisibilityTokenData
|
|
3177
3167
|
});
|
|
3178
|
-
var ZIndexTypedData =
|
|
3179
|
-
type:
|
|
3168
|
+
var ZIndexTypedData = z85.object({
|
|
3169
|
+
type: z85.literal("ZIndex"),
|
|
3180
3170
|
data: ZIndexTokenData
|
|
3181
3171
|
});
|
|
3182
|
-
var DurationTypedData =
|
|
3183
|
-
type:
|
|
3172
|
+
var DurationTypedData = z85.object({
|
|
3173
|
+
type: z85.literal("Duration"),
|
|
3184
3174
|
data: DurationTokenData
|
|
3185
3175
|
});
|
|
3186
|
-
var FontTypedData =
|
|
3187
|
-
type:
|
|
3176
|
+
var FontTypedData = z85.object({
|
|
3177
|
+
type: z85.literal("Font"),
|
|
3188
3178
|
data: FontTokenData
|
|
3189
3179
|
});
|
|
3190
|
-
var DesignTokenTypedData =
|
|
3180
|
+
var DesignTokenTypedData = z85.discriminatedUnion("type", [
|
|
3191
3181
|
BlurTokenTypedData,
|
|
3192
3182
|
BorderRadiusTokenTypedData,
|
|
3193
3183
|
BorderWidthTokenTypedData,
|
|
@@ -3237,32 +3227,32 @@ function designTokenTypeFilter(type) {
|
|
|
3237
3227
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
3238
3228
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
3239
3229
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
3240
|
-
|
|
3241
|
-
tokenPersistentId:
|
|
3230
|
+
z86.object({
|
|
3231
|
+
tokenPersistentId: z86.string(),
|
|
3242
3232
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
3243
3233
|
})
|
|
3244
3234
|
);
|
|
3245
|
-
var ThemeElementData =
|
|
3246
|
-
value:
|
|
3247
|
-
overrides:
|
|
3235
|
+
var ThemeElementData = z86.object({
|
|
3236
|
+
value: z86.object({
|
|
3237
|
+
overrides: z86.array(ThemeOverride)
|
|
3248
3238
|
})
|
|
3249
3239
|
});
|
|
3250
|
-
var ThemeOriginPart =
|
|
3251
|
-
var ThemeOriginObject =
|
|
3252
|
-
id:
|
|
3253
|
-
name:
|
|
3240
|
+
var ThemeOriginPart = z86.object({});
|
|
3241
|
+
var ThemeOriginObject = z86.object({
|
|
3242
|
+
id: z86.string(),
|
|
3243
|
+
name: z86.string()
|
|
3254
3244
|
});
|
|
3255
|
-
var ThemeOriginSource =
|
|
3256
|
-
sourceId:
|
|
3257
|
-
sourceObjects:
|
|
3245
|
+
var ThemeOriginSource = z86.object({
|
|
3246
|
+
sourceId: z86.string(),
|
|
3247
|
+
sourceObjects: z86.array(ThemeOriginObject)
|
|
3258
3248
|
});
|
|
3259
|
-
var ThemeOrigin =
|
|
3260
|
-
sources:
|
|
3249
|
+
var ThemeOrigin = z86.object({
|
|
3250
|
+
sources: z86.array(ThemeOriginSource)
|
|
3261
3251
|
});
|
|
3262
3252
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
3263
3253
|
origin: ThemeOrigin.optional(),
|
|
3264
|
-
overrides:
|
|
3265
|
-
codeName:
|
|
3254
|
+
overrides: z86.array(ThemeOverride),
|
|
3255
|
+
codeName: z86.string()
|
|
3266
3256
|
});
|
|
3267
3257
|
|
|
3268
3258
|
// src/dsm/elements/utils.ts
|
|
@@ -3332,17 +3322,17 @@ var PageBlockDefinitionsMap = class {
|
|
|
3332
3322
|
};
|
|
3333
3323
|
|
|
3334
3324
|
// src/dsm/data-sources/import-summary.ts
|
|
3335
|
-
var FileStructureStats =
|
|
3325
|
+
var FileStructureStats = z87.object({
|
|
3336
3326
|
frames: zeroNumberByDefault(),
|
|
3337
3327
|
components: zeroNumberByDefault(),
|
|
3338
3328
|
componentSets: zeroNumberByDefault()
|
|
3339
3329
|
});
|
|
3340
3330
|
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
3341
3331
|
// Backward compatibility
|
|
3342
|
-
|
|
3332
|
+
z87.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
3343
3333
|
);
|
|
3344
|
-
var SourceImportSummaryByTokenType =
|
|
3345
|
-
var SourceImportTokenSummary =
|
|
3334
|
+
var SourceImportSummaryByTokenType = z87.record(SourceImportSummaryByTokenTypeKey, z87.number());
|
|
3335
|
+
var SourceImportTokenSummary = z87.object({
|
|
3346
3336
|
tokensCreated: zeroNumberByDefault(),
|
|
3347
3337
|
tokensUpdated: zeroNumberByDefault(),
|
|
3348
3338
|
tokensDeleted: zeroNumberByDefault(),
|
|
@@ -3350,7 +3340,7 @@ var SourceImportTokenSummary = z88.object({
|
|
|
3350
3340
|
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
3351
3341
|
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
3352
3342
|
});
|
|
3353
|
-
var SourceImportComponentSummary =
|
|
3343
|
+
var SourceImportComponentSummary = z87.object({
|
|
3354
3344
|
componentsCreated: zeroNumberByDefault(),
|
|
3355
3345
|
componentsUpdated: zeroNumberByDefault(),
|
|
3356
3346
|
componentsDeleted: zeroNumberByDefault(),
|
|
@@ -3358,163 +3348,163 @@ var SourceImportComponentSummary = z88.object({
|
|
|
3358
3348
|
componentAssetsUpdated: zeroNumberByDefault(),
|
|
3359
3349
|
componentAssetsDeleted: zeroNumberByDefault()
|
|
3360
3350
|
});
|
|
3361
|
-
var SourceImportFrameSummary =
|
|
3351
|
+
var SourceImportFrameSummary = z87.object({
|
|
3362
3352
|
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
3363
|
-
invalidReferencesCount: nullishToOptional(
|
|
3364
|
-
});
|
|
3365
|
-
var SourceImportSummary =
|
|
3366
|
-
sourceId: nullishToOptional(
|
|
3367
|
-
brandId: nullishToOptional(
|
|
3368
|
-
versionId: nullishToOptional(
|
|
3369
|
-
error: nullishToOptional(
|
|
3370
|
-
isFailed:
|
|
3371
|
-
warnings:
|
|
3353
|
+
invalidReferencesCount: nullishToOptional(z87.number().optional())
|
|
3354
|
+
});
|
|
3355
|
+
var SourceImportSummary = z87.object({
|
|
3356
|
+
sourceId: nullishToOptional(z87.string()),
|
|
3357
|
+
brandId: nullishToOptional(z87.string()),
|
|
3358
|
+
versionId: nullishToOptional(z87.string()),
|
|
3359
|
+
error: nullishToOptional(z87.any()),
|
|
3360
|
+
isFailed: z87.boolean(),
|
|
3361
|
+
warnings: z87.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
3372
3362
|
...SourceImportTokenSummary.shape,
|
|
3373
3363
|
...SourceImportComponentSummary.shape,
|
|
3374
3364
|
...FileStructureStats.shape
|
|
3375
3365
|
});
|
|
3376
3366
|
function zeroNumberByDefault() {
|
|
3377
|
-
return
|
|
3367
|
+
return z87.number().nullish().transform((v) => v ?? 0);
|
|
3378
3368
|
}
|
|
3379
3369
|
|
|
3380
3370
|
// src/dsm/data-sources/data-source.ts
|
|
3381
|
-
var DataSourceRemoteType =
|
|
3382
|
-
var DataSourceUploadRemoteSource =
|
|
3383
|
-
var DataSourceFigmaState =
|
|
3384
|
-
var DataSourceAutoImportMode =
|
|
3385
|
-
var DataSourceStats =
|
|
3371
|
+
var DataSourceRemoteType = z88.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
3372
|
+
var DataSourceUploadRemoteSource = z88.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
3373
|
+
var DataSourceFigmaState = z88.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
3374
|
+
var DataSourceAutoImportMode = z88.enum(["Never", "Hourly"]);
|
|
3375
|
+
var DataSourceStats = z88.object({
|
|
3386
3376
|
tokens: zeroNumberByDefault2(),
|
|
3387
3377
|
components: zeroNumberByDefault2(),
|
|
3388
3378
|
assets: zeroNumberByDefault2(),
|
|
3389
3379
|
frames: zeroNumberByDefault2()
|
|
3390
3380
|
});
|
|
3391
|
-
var DataSourceFigmaFileData =
|
|
3392
|
-
lastUpdatedAt:
|
|
3381
|
+
var DataSourceFigmaFileData = z88.object({
|
|
3382
|
+
lastUpdatedAt: z88.coerce.date()
|
|
3393
3383
|
});
|
|
3394
|
-
var DataSourceFigmaFileVersionData =
|
|
3395
|
-
id:
|
|
3396
|
-
label:
|
|
3397
|
-
description:
|
|
3398
|
-
createdAt:
|
|
3384
|
+
var DataSourceFigmaFileVersionData = z88.object({
|
|
3385
|
+
id: z88.string(),
|
|
3386
|
+
label: z88.string().optional(),
|
|
3387
|
+
description: z88.string().optional(),
|
|
3388
|
+
createdAt: z88.coerce.date()
|
|
3399
3389
|
});
|
|
3400
|
-
var DataSourceFigmaScope =
|
|
3401
|
-
assets:
|
|
3402
|
-
components:
|
|
3403
|
-
documentationFrames:
|
|
3404
|
-
tokens:
|
|
3405
|
-
themePersistentId:
|
|
3406
|
-
isUnpublishedContentFallbackEnabled:
|
|
3390
|
+
var DataSourceFigmaScope = z88.object({
|
|
3391
|
+
assets: z88.boolean(),
|
|
3392
|
+
components: z88.boolean(),
|
|
3393
|
+
documentationFrames: z88.boolean(),
|
|
3394
|
+
tokens: z88.boolean(),
|
|
3395
|
+
themePersistentId: z88.string().optional(),
|
|
3396
|
+
isUnpublishedContentFallbackEnabled: z88.boolean()
|
|
3407
3397
|
});
|
|
3408
|
-
var DataSourceFigmaImportMetadata =
|
|
3398
|
+
var DataSourceFigmaImportMetadata = z88.object({
|
|
3409
3399
|
fileData: DataSourceFigmaFileData.optional(),
|
|
3410
3400
|
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
3411
3401
|
});
|
|
3412
|
-
var DataSourceFigmaRemote =
|
|
3413
|
-
type:
|
|
3414
|
-
fileId:
|
|
3415
|
-
preferredCredentialId:
|
|
3416
|
-
ownerId:
|
|
3402
|
+
var DataSourceFigmaRemote = z88.object({
|
|
3403
|
+
type: z88.literal(DataSourceRemoteType.Enum.Figma),
|
|
3404
|
+
fileId: z88.string(),
|
|
3405
|
+
preferredCredentialId: z88.string().optional(),
|
|
3406
|
+
ownerId: z88.string(),
|
|
3417
3407
|
// todo remove or keep to reference who created data source
|
|
3418
|
-
ownerName:
|
|
3408
|
+
ownerName: z88.string(),
|
|
3419
3409
|
// todo probably remove
|
|
3420
3410
|
scope: DataSourceFigmaScope,
|
|
3421
3411
|
state: DataSourceFigmaState,
|
|
3422
|
-
requiresSync:
|
|
3412
|
+
requiresSync: z88.boolean().optional().transform((v) => v ?? false),
|
|
3423
3413
|
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
3424
|
-
downloadChunkSize:
|
|
3425
|
-
figmaRenderChunkSize:
|
|
3426
|
-
maxFileDepth:
|
|
3414
|
+
downloadChunkSize: z88.number().optional(),
|
|
3415
|
+
figmaRenderChunkSize: z88.number().optional(),
|
|
3416
|
+
maxFileDepth: z88.number().optional()
|
|
3427
3417
|
});
|
|
3428
|
-
var DataSourceTokenStudioRemote =
|
|
3429
|
-
type:
|
|
3418
|
+
var DataSourceTokenStudioRemote = z88.object({
|
|
3419
|
+
type: z88.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
3430
3420
|
});
|
|
3431
|
-
var DataSourceUploadImportMetadata =
|
|
3432
|
-
var DataSourceUploadRemote =
|
|
3433
|
-
type:
|
|
3434
|
-
remoteId:
|
|
3421
|
+
var DataSourceUploadImportMetadata = z88.record(z88.any());
|
|
3422
|
+
var DataSourceUploadRemote = z88.object({
|
|
3423
|
+
type: z88.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
3424
|
+
remoteId: z88.string(),
|
|
3435
3425
|
remoteSourceType: DataSourceUploadRemoteSource,
|
|
3436
3426
|
lastImportMetadata: DataSourceUploadImportMetadata.optional(),
|
|
3437
3427
|
warnings: nullishToOptional(ImportWarning.array())
|
|
3438
3428
|
});
|
|
3439
|
-
var DataSourceRemote =
|
|
3429
|
+
var DataSourceRemote = z88.discriminatedUnion("type", [
|
|
3440
3430
|
DataSourceFigmaRemote,
|
|
3441
3431
|
DataSourceUploadRemote,
|
|
3442
3432
|
DataSourceTokenStudioRemote
|
|
3443
3433
|
]);
|
|
3444
|
-
var DataSource =
|
|
3445
|
-
id:
|
|
3446
|
-
name:
|
|
3447
|
-
thumbnailUrl:
|
|
3448
|
-
createdAt:
|
|
3449
|
-
lastImportedAt:
|
|
3434
|
+
var DataSource = z88.object({
|
|
3435
|
+
id: z88.string(),
|
|
3436
|
+
name: z88.string(),
|
|
3437
|
+
thumbnailUrl: z88.string().optional(),
|
|
3438
|
+
createdAt: z88.coerce.date().optional(),
|
|
3439
|
+
lastImportedAt: z88.coerce.date().optional(),
|
|
3450
3440
|
lastImportSummary: SourceImportSummary.optional(),
|
|
3451
|
-
designSystemId:
|
|
3452
|
-
brandPersistentId:
|
|
3441
|
+
designSystemId: z88.string(),
|
|
3442
|
+
brandPersistentId: z88.string(),
|
|
3453
3443
|
autoImportMode: DataSourceAutoImportMode,
|
|
3454
3444
|
stats: DataSourceStats,
|
|
3455
3445
|
remote: DataSourceRemote,
|
|
3456
|
-
sortOrder:
|
|
3446
|
+
sortOrder: z88.number()
|
|
3457
3447
|
});
|
|
3458
|
-
var DataSourceVersion =
|
|
3459
|
-
id:
|
|
3460
|
-
createdAt:
|
|
3461
|
-
label:
|
|
3462
|
-
description:
|
|
3448
|
+
var DataSourceVersion = z88.object({
|
|
3449
|
+
id: z88.string(),
|
|
3450
|
+
createdAt: z88.coerce.date(),
|
|
3451
|
+
label: z88.string().nullish(),
|
|
3452
|
+
description: z88.string().nullish()
|
|
3463
3453
|
});
|
|
3464
3454
|
function zeroNumberByDefault2() {
|
|
3465
|
-
return
|
|
3455
|
+
return z88.number().nullish().transform((v) => v ?? 0);
|
|
3466
3456
|
}
|
|
3467
3457
|
|
|
3468
3458
|
// src/dsm/data-sources/import-job.ts
|
|
3469
|
-
import { z as
|
|
3470
|
-
var ImportJobState =
|
|
3471
|
-
var ImportJobOperation =
|
|
3459
|
+
import { z as z89 } from "zod";
|
|
3460
|
+
var ImportJobState = z89.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
|
|
3461
|
+
var ImportJobOperation = z89.enum(["Check", "Import"]);
|
|
3472
3462
|
var ImportJob = Entity.extend({
|
|
3473
|
-
designSystemId:
|
|
3474
|
-
designSystemVersionId:
|
|
3475
|
-
sourceIds:
|
|
3463
|
+
designSystemId: z89.string(),
|
|
3464
|
+
designSystemVersionId: z89.string(),
|
|
3465
|
+
sourceIds: z89.array(z89.string()),
|
|
3476
3466
|
state: ImportJobState,
|
|
3477
|
-
createdByUserId:
|
|
3478
|
-
importContextId:
|
|
3479
|
-
error:
|
|
3467
|
+
createdByUserId: z89.string().optional(),
|
|
3468
|
+
importContextId: z89.string(),
|
|
3469
|
+
error: z89.string().optional(),
|
|
3480
3470
|
sourceType: DataSourceRemoteType,
|
|
3481
|
-
importContextCleanedUp:
|
|
3471
|
+
importContextCleanedUp: z89.boolean()
|
|
3482
3472
|
});
|
|
3483
3473
|
|
|
3484
3474
|
// src/dsm/import/support/import-context.ts
|
|
3485
|
-
var ImportFunctionInput =
|
|
3486
|
-
importJobId:
|
|
3487
|
-
importContextId:
|
|
3488
|
-
designSystemId:
|
|
3475
|
+
var ImportFunctionInput = z90.object({
|
|
3476
|
+
importJobId: z90.string(),
|
|
3477
|
+
importContextId: z90.string(),
|
|
3478
|
+
designSystemId: z90.string().optional()
|
|
3489
3479
|
});
|
|
3490
|
-
var ImportedFigmaSourceData =
|
|
3491
|
-
sourceId:
|
|
3480
|
+
var ImportedFigmaSourceData = z90.object({
|
|
3481
|
+
sourceId: z90.string(),
|
|
3492
3482
|
figmaRemote: DataSourceFigmaRemote
|
|
3493
3483
|
});
|
|
3494
|
-
var FigmaImportBaseContext =
|
|
3495
|
-
designSystemId:
|
|
3484
|
+
var FigmaImportBaseContext = z90.object({
|
|
3485
|
+
designSystemId: z90.string(),
|
|
3496
3486
|
/**
|
|
3497
3487
|
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
3498
3488
|
* mentioned in the `importedSourceDataBySourceId`
|
|
3499
3489
|
*
|
|
3500
3490
|
* fileId: file data
|
|
3501
3491
|
*/
|
|
3502
|
-
fileAccessByFileId:
|
|
3492
|
+
fileAccessByFileId: z90.record(FigmaFileAccessData),
|
|
3503
3493
|
/**
|
|
3504
3494
|
* Figma source data for which import was requested
|
|
3505
3495
|
*
|
|
3506
3496
|
* sourceId: source data
|
|
3507
3497
|
*/
|
|
3508
|
-
importedSourceDataBySourceId:
|
|
3498
|
+
importedSourceDataBySourceId: z90.record(ImportedFigmaSourceData),
|
|
3509
3499
|
/**
|
|
3510
3500
|
* Array of warnings that will be written into the import result summary at the end
|
|
3511
3501
|
* of import job execution and displayed by the client.
|
|
3512
3502
|
*/
|
|
3513
|
-
importWarnings:
|
|
3503
|
+
importWarnings: z90.record(ImportWarning.array()).default({})
|
|
3514
3504
|
});
|
|
3515
3505
|
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
3516
|
-
sourcesWithMissingAccess:
|
|
3517
|
-
shadowOpacityOptional:
|
|
3506
|
+
sourcesWithMissingAccess: z90.array(z90.string()).default([]),
|
|
3507
|
+
shadowOpacityOptional: z90.boolean().default(false)
|
|
3518
3508
|
});
|
|
3519
3509
|
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
3520
3510
|
importMetadata: DataSourceFigmaImportMetadata
|
|
@@ -3526,72 +3516,72 @@ var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.ex
|
|
|
3526
3516
|
*
|
|
3527
3517
|
* File id -> file download scope
|
|
3528
3518
|
*/
|
|
3529
|
-
fileDownloadScopesByFileId:
|
|
3519
|
+
fileDownloadScopesByFileId: z90.record(FigmaFileDownloadScope),
|
|
3530
3520
|
/**
|
|
3531
3521
|
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
3532
3522
|
* imported again.
|
|
3533
3523
|
*
|
|
3534
3524
|
* Source id -> import metadata
|
|
3535
3525
|
*/
|
|
3536
|
-
changedImportedSourceDataBySourceId:
|
|
3526
|
+
changedImportedSourceDataBySourceId: z90.record(ChangedImportedFigmaSourceData)
|
|
3537
3527
|
});
|
|
3538
3528
|
|
|
3539
3529
|
// src/dsm/import/support/import-model-collections.ts
|
|
3540
|
-
import { z as
|
|
3530
|
+
import { z as z98 } from "zod";
|
|
3541
3531
|
|
|
3542
3532
|
// src/dsm/import/component.ts
|
|
3543
|
-
import { z as
|
|
3533
|
+
import { z as z93 } from "zod";
|
|
3544
3534
|
|
|
3545
3535
|
// src/dsm/import/base.ts
|
|
3546
|
-
import { z as
|
|
3547
|
-
var ImportModelBase =
|
|
3548
|
-
id:
|
|
3536
|
+
import { z as z91 } from "zod";
|
|
3537
|
+
var ImportModelBase = z91.object({
|
|
3538
|
+
id: z91.string(),
|
|
3549
3539
|
meta: ObjectMeta,
|
|
3550
3540
|
origin: DesignElementOrigin,
|
|
3551
|
-
brandPersistentId:
|
|
3552
|
-
sortOrder:
|
|
3541
|
+
brandPersistentId: z91.string(),
|
|
3542
|
+
sortOrder: z91.number()
|
|
3553
3543
|
});
|
|
3554
3544
|
var ImportModelInputBase = ImportModelBase.omit({
|
|
3555
3545
|
brandPersistentId: true,
|
|
3556
3546
|
origin: true,
|
|
3557
3547
|
sortOrder: true
|
|
3558
3548
|
}).extend({
|
|
3559
|
-
originId:
|
|
3560
|
-
originMetadata:
|
|
3549
|
+
originId: z91.string(),
|
|
3550
|
+
originMetadata: z91.record(z91.any())
|
|
3561
3551
|
});
|
|
3562
3552
|
|
|
3563
3553
|
// src/dsm/import/image.ts
|
|
3564
|
-
import { z as
|
|
3565
|
-
var ImageImportModelType =
|
|
3566
|
-
var ImageImportModelBase =
|
|
3554
|
+
import { z as z92 } from "zod";
|
|
3555
|
+
var ImageImportModelType = z92.enum(["Url", "FigmaRender"]);
|
|
3556
|
+
var ImageImportModelBase = z92.object({
|
|
3567
3557
|
scope: AssetScope
|
|
3568
3558
|
});
|
|
3569
3559
|
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
3570
|
-
type:
|
|
3571
|
-
url:
|
|
3572
|
-
originKey:
|
|
3573
|
-
extension:
|
|
3560
|
+
type: z92.literal(ImageImportModelType.enum.Url),
|
|
3561
|
+
url: z92.string(),
|
|
3562
|
+
originKey: z92.string(),
|
|
3563
|
+
extension: z92.string()
|
|
3574
3564
|
});
|
|
3575
|
-
var FigmaRenderFormat =
|
|
3565
|
+
var FigmaRenderFormat = z92.enum(["Svg", "Png", "Pdf"]);
|
|
3576
3566
|
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
3577
|
-
type:
|
|
3578
|
-
fileId:
|
|
3579
|
-
fileVersionId:
|
|
3580
|
-
nodeId:
|
|
3581
|
-
originKey:
|
|
3567
|
+
type: z92.literal(ImageImportModelType.enum.FigmaRender),
|
|
3568
|
+
fileId: z92.string(),
|
|
3569
|
+
fileVersionId: z92.string().optional(),
|
|
3570
|
+
nodeId: z92.string(),
|
|
3571
|
+
originKey: z92.string()
|
|
3582
3572
|
});
|
|
3583
3573
|
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
3584
|
-
format:
|
|
3585
|
-
scale:
|
|
3574
|
+
format: z92.literal(FigmaRenderFormat.enum.Png),
|
|
3575
|
+
scale: z92.number()
|
|
3586
3576
|
});
|
|
3587
3577
|
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
3588
|
-
format:
|
|
3578
|
+
format: z92.literal(FigmaRenderFormat.enum.Svg)
|
|
3589
3579
|
});
|
|
3590
|
-
var FigmaRenderImportModel =
|
|
3580
|
+
var FigmaRenderImportModel = z92.discriminatedUnion("format", [
|
|
3591
3581
|
FigmaPngRenderImportModel,
|
|
3592
3582
|
FigmaSvgRenderImportModel
|
|
3593
3583
|
]);
|
|
3594
|
-
var ImageImportModel =
|
|
3584
|
+
var ImageImportModel = z92.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
3595
3585
|
function getFigmaRenderFormatFileExtension(format) {
|
|
3596
3586
|
switch (format) {
|
|
3597
3587
|
case "Pdf":
|
|
@@ -3604,13 +3594,13 @@ function getFigmaRenderFormatFileExtension(format) {
|
|
|
3604
3594
|
}
|
|
3605
3595
|
|
|
3606
3596
|
// src/dsm/import/component.ts
|
|
3607
|
-
var FigmaComponentImportModelPart =
|
|
3597
|
+
var FigmaComponentImportModelPart = z93.object({
|
|
3608
3598
|
thumbnail: ImageImportModel,
|
|
3609
|
-
parentComponentId:
|
|
3599
|
+
parentComponentId: z93.string().optional(),
|
|
3610
3600
|
componentPropertyDefinitions: FigmaComponentPropertyMap.optional()
|
|
3611
3601
|
});
|
|
3612
3602
|
var FigmaComponentImportModel = ImportModelBase.extend(FigmaComponentImportModelPart.shape).extend({
|
|
3613
|
-
isAsset:
|
|
3603
|
+
isAsset: z93.boolean(),
|
|
3614
3604
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
3615
3605
|
origin: FigmaComponentOrigin
|
|
3616
3606
|
});
|
|
@@ -3623,24 +3613,24 @@ var AssetImportModelInput = ImportModelInputBase.extend(FigmaComponentImportMode
|
|
|
3623
3613
|
});
|
|
3624
3614
|
|
|
3625
3615
|
// src/dsm/import/data-source.ts
|
|
3626
|
-
import { z as
|
|
3627
|
-
var DataSourceImportModel =
|
|
3628
|
-
id:
|
|
3629
|
-
fileName:
|
|
3630
|
-
thumbnailUrl:
|
|
3616
|
+
import { z as z94 } from "zod";
|
|
3617
|
+
var DataSourceImportModel = z94.object({
|
|
3618
|
+
id: z94.string(),
|
|
3619
|
+
fileName: z94.string().optional(),
|
|
3620
|
+
thumbnailUrl: z94.string().optional()
|
|
3631
3621
|
});
|
|
3632
3622
|
|
|
3633
3623
|
// src/dsm/import/figma-frames.ts
|
|
3634
|
-
import { z as
|
|
3624
|
+
import { z as z95 } from "zod";
|
|
3635
3625
|
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
3636
3626
|
png: FigmaPngRenderImportModel,
|
|
3637
3627
|
svg: FigmaSvgRenderImportModel
|
|
3638
3628
|
});
|
|
3639
3629
|
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
3640
|
-
children:
|
|
3630
|
+
children: z95.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
3641
3631
|
});
|
|
3642
|
-
var FigmaFileStructureImportModelPart =
|
|
3643
|
-
data:
|
|
3632
|
+
var FigmaFileStructureImportModelPart = z95.object({
|
|
3633
|
+
data: z95.object({
|
|
3644
3634
|
rootNode: FigmaFileStructureNodeImportModel,
|
|
3645
3635
|
assetsInFile: FigmaFileStructureStatistics
|
|
3646
3636
|
})
|
|
@@ -3651,7 +3641,7 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
|
|
|
3651
3641
|
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
3652
3642
|
FigmaFileStructureImportModelPart.shape
|
|
3653
3643
|
).extend({
|
|
3654
|
-
fileVersionId:
|
|
3644
|
+
fileVersionId: z95.string()
|
|
3655
3645
|
});
|
|
3656
3646
|
function figmaFileStructureImportModelToMap(root) {
|
|
3657
3647
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -3665,51 +3655,51 @@ function recursiveFigmaFileStructureToMap2(node, map) {
|
|
|
3665
3655
|
}
|
|
3666
3656
|
|
|
3667
3657
|
// src/dsm/import/theme.ts
|
|
3668
|
-
import { z as
|
|
3658
|
+
import { z as z96 } from "zod";
|
|
3669
3659
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
3670
|
-
|
|
3671
|
-
id:
|
|
3660
|
+
z96.object({
|
|
3661
|
+
id: z96.string(),
|
|
3672
3662
|
meta: ObjectMeta
|
|
3673
3663
|
})
|
|
3674
3664
|
);
|
|
3675
3665
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
3676
|
-
|
|
3666
|
+
z96.object({
|
|
3677
3667
|
origin: ThemeOverrideOrigin
|
|
3678
3668
|
})
|
|
3679
3669
|
);
|
|
3680
3670
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
3681
|
-
|
|
3682
|
-
originId:
|
|
3671
|
+
z96.object({
|
|
3672
|
+
originId: z96.string(),
|
|
3683
3673
|
originMetadata: ThemeOverrideOriginPart
|
|
3684
3674
|
})
|
|
3685
3675
|
);
|
|
3686
|
-
var ThemeImportModel =
|
|
3676
|
+
var ThemeImportModel = z96.object({
|
|
3687
3677
|
meta: ObjectMeta,
|
|
3688
|
-
brandPersistentId:
|
|
3678
|
+
brandPersistentId: z96.string(),
|
|
3689
3679
|
originSource: ThemeOriginSource,
|
|
3690
|
-
overrides:
|
|
3691
|
-
sortOrder:
|
|
3680
|
+
overrides: z96.array(ThemeOverrideImportModel),
|
|
3681
|
+
sortOrder: z96.number()
|
|
3692
3682
|
});
|
|
3693
|
-
var ThemeImportModelInput =
|
|
3683
|
+
var ThemeImportModelInput = z96.object({
|
|
3694
3684
|
meta: ObjectMeta,
|
|
3695
|
-
originObjects:
|
|
3696
|
-
overrides:
|
|
3685
|
+
originObjects: z96.array(ThemeOriginObject),
|
|
3686
|
+
overrides: z96.array(ThemeOverrideImportModelInput)
|
|
3697
3687
|
});
|
|
3698
|
-
var ThemeUpdateImportModel =
|
|
3699
|
-
themePersistentId:
|
|
3700
|
-
overrides:
|
|
3688
|
+
var ThemeUpdateImportModel = z96.object({
|
|
3689
|
+
themePersistentId: z96.string(),
|
|
3690
|
+
overrides: z96.array(ThemeOverrideImportModel)
|
|
3701
3691
|
});
|
|
3702
|
-
var ThemeUpdateImportModelInput =
|
|
3703
|
-
themePersistentId:
|
|
3704
|
-
overrides:
|
|
3692
|
+
var ThemeUpdateImportModelInput = z96.object({
|
|
3693
|
+
themePersistentId: z96.string(),
|
|
3694
|
+
overrides: z96.array(ThemeOverrideImportModelInput)
|
|
3705
3695
|
});
|
|
3706
3696
|
|
|
3707
3697
|
// src/dsm/import/tokens.ts
|
|
3708
|
-
import { z as
|
|
3709
|
-
var DesignTokenImportModelPart =
|
|
3710
|
-
collection:
|
|
3711
|
-
codeSyntax:
|
|
3712
|
-
scopes:
|
|
3698
|
+
import { z as z97 } from "zod";
|
|
3699
|
+
var DesignTokenImportModelPart = z97.object({
|
|
3700
|
+
collection: z97.string().optional(),
|
|
3701
|
+
codeSyntax: z97.record(z97.coerce.string()).optional(),
|
|
3702
|
+
scopes: z97.array(z97.string()).optional()
|
|
3713
3703
|
});
|
|
3714
3704
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
3715
3705
|
origin: DesignTokenOrigin
|
|
@@ -3727,22 +3717,22 @@ function designTokenImportModelTypeFilter(type) {
|
|
|
3727
3717
|
}
|
|
3728
3718
|
|
|
3729
3719
|
// src/dsm/import/support/import-model-collections.ts
|
|
3730
|
-
var ImportModelInputCollection =
|
|
3720
|
+
var ImportModelInputCollection = z98.object({
|
|
3731
3721
|
source: DataSourceImportModel,
|
|
3732
|
-
tokens:
|
|
3733
|
-
components:
|
|
3734
|
-
assets:
|
|
3735
|
-
themeUpdates:
|
|
3736
|
-
themes:
|
|
3722
|
+
tokens: z98.array(DesignTokenImportModelInput).default([]),
|
|
3723
|
+
components: z98.array(FigmaComponentImportModelInput).default([]),
|
|
3724
|
+
assets: z98.array(AssetImportModelInput).default([]),
|
|
3725
|
+
themeUpdates: z98.array(ThemeUpdateImportModelInput).default([]),
|
|
3726
|
+
themes: z98.array(ThemeImportModelInput).default([]),
|
|
3737
3727
|
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
3738
3728
|
});
|
|
3739
|
-
var ImportModelCollection =
|
|
3740
|
-
sources:
|
|
3741
|
-
tokens:
|
|
3742
|
-
components:
|
|
3743
|
-
themeUpdates:
|
|
3744
|
-
themes:
|
|
3745
|
-
figmaFileStructures:
|
|
3729
|
+
var ImportModelCollection = z98.object({
|
|
3730
|
+
sources: z98.array(DataSourceImportModel),
|
|
3731
|
+
tokens: z98.array(DesignTokenImportModel).default([]),
|
|
3732
|
+
components: z98.array(FigmaComponentImportModel).default([]),
|
|
3733
|
+
themeUpdates: z98.array(ThemeUpdateImportModel).default([]),
|
|
3734
|
+
themes: z98.array(ThemeImportModel).default([]),
|
|
3735
|
+
figmaFileStructures: z98.array(FigmaFileStructureImportModel)
|
|
3746
3736
|
});
|
|
3747
3737
|
function addImportModelCollections(lhs, rhs) {
|
|
3748
3738
|
return {
|
|
@@ -3756,69 +3746,41 @@ function addImportModelCollections(lhs, rhs) {
|
|
|
3756
3746
|
}
|
|
3757
3747
|
|
|
3758
3748
|
// src/dsm/components/asset-rendering.ts
|
|
3759
|
-
var AssetRenderConfiguration =
|
|
3760
|
-
prefix:
|
|
3761
|
-
suffix:
|
|
3762
|
-
scale:
|
|
3749
|
+
var AssetRenderConfiguration = z99.object({
|
|
3750
|
+
prefix: z99.string().optional(),
|
|
3751
|
+
suffix: z99.string().optional(),
|
|
3752
|
+
scale: z99.number(),
|
|
3763
3753
|
format: FigmaRenderFormat
|
|
3764
3754
|
});
|
|
3765
|
-
var RenderedAssetFile =
|
|
3766
|
-
assetPersistentId:
|
|
3767
|
-
assetName:
|
|
3768
|
-
renderedImageFileName:
|
|
3769
|
-
renderedImageUrl:
|
|
3755
|
+
var RenderedAssetFile = z99.object({
|
|
3756
|
+
assetPersistentId: z99.string(),
|
|
3757
|
+
assetName: z99.string(),
|
|
3758
|
+
renderedImageFileName: z99.string(),
|
|
3759
|
+
renderedImageUrl: z99.string(),
|
|
3770
3760
|
settings: AssetRenderConfiguration
|
|
3771
3761
|
});
|
|
3772
3762
|
|
|
3773
|
-
// src/dsm/design-system.ts
|
|
3774
|
-
import { z as z101 } from "zod";
|
|
3775
|
-
var DesignSystemAccessMode = z101.enum(["Open", "InviteOnly"]);
|
|
3776
|
-
var DesignSystemSwitcher = z101.object({
|
|
3777
|
-
isEnabled: z101.boolean(),
|
|
3778
|
-
designSystemIds: z101.array(z101.string())
|
|
3779
|
-
});
|
|
3780
|
-
var DesignSystem = z101.object({
|
|
3781
|
-
id: z101.string(),
|
|
3782
|
-
workspaceId: z101.string(),
|
|
3783
|
-
name: z101.string(),
|
|
3784
|
-
description: z101.string(),
|
|
3785
|
-
docExporterId: nullishToOptional(z101.string()),
|
|
3786
|
-
docSlug: z101.string(),
|
|
3787
|
-
docUserSlug: nullishToOptional(z101.string()),
|
|
3788
|
-
docSlugDeprecated: z101.string(),
|
|
3789
|
-
isPublic: z101.boolean(),
|
|
3790
|
-
isMultibrand: z101.boolean(),
|
|
3791
|
-
docViewUrl: nullishToOptional(z101.string()),
|
|
3792
|
-
basePrefixes: z101.array(z101.string()),
|
|
3793
|
-
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
3794
|
-
isApprovalFeatureEnabled: z101.boolean(),
|
|
3795
|
-
approvalRequiredForPublishing: z101.boolean(),
|
|
3796
|
-
accessMode: DesignSystemAccessMode,
|
|
3797
|
-
createdAt: z101.coerce.date(),
|
|
3798
|
-
updatedAt: z101.coerce.date()
|
|
3799
|
-
});
|
|
3800
|
-
|
|
3801
3763
|
// src/dsm/documentation/approvals/approval-state.ts
|
|
3802
|
-
import { z as
|
|
3803
|
-
var DocumentationPageApprovalState =
|
|
3764
|
+
import { z as z100 } from "zod";
|
|
3765
|
+
var DocumentationPageApprovalState = z100.enum(["ReadyForReview", "ChangesRequested", "Approved"]);
|
|
3804
3766
|
|
|
3805
3767
|
// src/dsm/documentation/approvals/approval.ts
|
|
3806
|
-
import { z as
|
|
3807
|
-
var DocumentationPageApproval =
|
|
3808
|
-
id:
|
|
3768
|
+
import { z as z101 } from "zod";
|
|
3769
|
+
var DocumentationPageApproval = z101.object({
|
|
3770
|
+
id: z101.string(),
|
|
3809
3771
|
approvalState: DocumentationPageApprovalState,
|
|
3810
|
-
persistentId:
|
|
3811
|
-
pageId:
|
|
3812
|
-
pagePersistentId:
|
|
3813
|
-
updatedByUserId:
|
|
3814
|
-
designSystemVersionId:
|
|
3815
|
-
updatedAt:
|
|
3816
|
-
createdAt:
|
|
3772
|
+
persistentId: z101.string(),
|
|
3773
|
+
pageId: z101.string(),
|
|
3774
|
+
pagePersistentId: z101.string(),
|
|
3775
|
+
updatedByUserId: z101.string(),
|
|
3776
|
+
designSystemVersionId: z101.string(),
|
|
3777
|
+
updatedAt: z101.coerce.date(),
|
|
3778
|
+
createdAt: z101.coerce.date()
|
|
3817
3779
|
});
|
|
3818
3780
|
|
|
3819
3781
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
3820
|
-
import { z as
|
|
3821
|
-
var PageBlockCategory =
|
|
3782
|
+
import { z as z102 } from "zod";
|
|
3783
|
+
var PageBlockCategory = z102.enum([
|
|
3822
3784
|
"Text",
|
|
3823
3785
|
"Layout",
|
|
3824
3786
|
"Media",
|
|
@@ -3832,174 +3794,174 @@ var PageBlockCategory = z104.enum([
|
|
|
3832
3794
|
"Data",
|
|
3833
3795
|
"Other"
|
|
3834
3796
|
]);
|
|
3835
|
-
var PageBlockBehaviorDataType =
|
|
3836
|
-
var PageBlockBehaviorSelectionType =
|
|
3837
|
-
var PageBlockDefinitionBehavior =
|
|
3797
|
+
var PageBlockBehaviorDataType = z102.enum(["Item", "Token", "Asset", "Component", "FigmaNode", "FigmaComponent"]);
|
|
3798
|
+
var PageBlockBehaviorSelectionType = z102.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
3799
|
+
var PageBlockDefinitionBehavior = z102.object({
|
|
3838
3800
|
dataType: PageBlockBehaviorDataType,
|
|
3839
|
-
items:
|
|
3840
|
-
numberOfItems:
|
|
3841
|
-
allowLinks:
|
|
3842
|
-
newItemLabel:
|
|
3801
|
+
items: z102.object({
|
|
3802
|
+
numberOfItems: z102.number(),
|
|
3803
|
+
allowLinks: z102.boolean(),
|
|
3804
|
+
newItemLabel: z102.string().optional()
|
|
3843
3805
|
}).optional(),
|
|
3844
|
-
entities:
|
|
3806
|
+
entities: z102.object({
|
|
3845
3807
|
selectionType: PageBlockBehaviorSelectionType,
|
|
3846
|
-
maxSelected:
|
|
3808
|
+
maxSelected: z102.number()
|
|
3847
3809
|
}).optional()
|
|
3848
3810
|
});
|
|
3849
|
-
var PageBlockDefinitionOnboarding =
|
|
3850
|
-
helpText:
|
|
3851
|
-
documentationLink:
|
|
3811
|
+
var PageBlockDefinitionOnboarding = z102.object({
|
|
3812
|
+
helpText: z102.string(),
|
|
3813
|
+
documentationLink: z102.string().optional()
|
|
3852
3814
|
});
|
|
3853
|
-
var PageBlockDefinition =
|
|
3854
|
-
id:
|
|
3855
|
-
name:
|
|
3856
|
-
description:
|
|
3815
|
+
var PageBlockDefinition = z102.object({
|
|
3816
|
+
id: z102.string(),
|
|
3817
|
+
name: z102.string(),
|
|
3818
|
+
description: z102.string(),
|
|
3857
3819
|
category: PageBlockCategory,
|
|
3858
|
-
icon:
|
|
3859
|
-
documentationLink:
|
|
3860
|
-
searchKeywords:
|
|
3820
|
+
icon: z102.string().optional(),
|
|
3821
|
+
documentationLink: z102.string().optional(),
|
|
3822
|
+
searchKeywords: z102.array(z102.string()).optional(),
|
|
3861
3823
|
item: PageBlockDefinitionItem,
|
|
3862
3824
|
behavior: PageBlockDefinitionBehavior,
|
|
3863
|
-
editorOptions:
|
|
3825
|
+
editorOptions: z102.object({
|
|
3864
3826
|
onboarding: PageBlockDefinitionOnboarding.optional(),
|
|
3865
|
-
newItemLabel:
|
|
3827
|
+
newItemLabel: z102.string().optional()
|
|
3866
3828
|
}),
|
|
3867
3829
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
3868
3830
|
});
|
|
3869
3831
|
|
|
3870
3832
|
// src/dsm/documentation/group.ts
|
|
3871
|
-
import { z as
|
|
3872
|
-
var DocumentationPageGroup =
|
|
3873
|
-
type:
|
|
3874
|
-
childType:
|
|
3875
|
-
id:
|
|
3876
|
-
persistentId:
|
|
3877
|
-
shortPersistentId:
|
|
3878
|
-
designSystemVersionId:
|
|
3879
|
-
parentPersistentId:
|
|
3880
|
-
sortOrder:
|
|
3881
|
-
title:
|
|
3882
|
-
slug:
|
|
3883
|
-
userSlug:
|
|
3884
|
-
createdAt:
|
|
3885
|
-
updatedAt:
|
|
3833
|
+
import { z as z103 } from "zod";
|
|
3834
|
+
var DocumentationPageGroup = z103.object({
|
|
3835
|
+
type: z103.literal("ElementGroup"),
|
|
3836
|
+
childType: z103.literal("DocumentationPage"),
|
|
3837
|
+
id: z103.string(),
|
|
3838
|
+
persistentId: z103.string(),
|
|
3839
|
+
shortPersistentId: z103.string(),
|
|
3840
|
+
designSystemVersionId: z103.string(),
|
|
3841
|
+
parentPersistentId: z103.string().nullish(),
|
|
3842
|
+
sortOrder: z103.number(),
|
|
3843
|
+
title: z103.string(),
|
|
3844
|
+
slug: z103.string(),
|
|
3845
|
+
userSlug: z103.string().nullish(),
|
|
3846
|
+
createdAt: z103.coerce.date(),
|
|
3847
|
+
updatedAt: z103.coerce.date()
|
|
3886
3848
|
});
|
|
3887
3849
|
|
|
3888
3850
|
// src/dsm/documentation/link-preview.ts
|
|
3889
|
-
import { z as
|
|
3890
|
-
var DocumentationLinkPreview =
|
|
3891
|
-
title:
|
|
3892
|
-
description:
|
|
3851
|
+
import { z as z104 } from "zod";
|
|
3852
|
+
var DocumentationLinkPreview = z104.object({
|
|
3853
|
+
title: z104.string().optional(),
|
|
3854
|
+
description: z104.string().optional(),
|
|
3893
3855
|
thumbnail: PageBlockImageReference.optional()
|
|
3894
3856
|
});
|
|
3895
3857
|
|
|
3896
3858
|
// src/dsm/documentation/page-anchor.ts
|
|
3897
|
-
import { z as
|
|
3898
|
-
var DocumentationPageAnchor =
|
|
3899
|
-
blockId:
|
|
3900
|
-
level:
|
|
3901
|
-
text:
|
|
3859
|
+
import { z as z105 } from "zod";
|
|
3860
|
+
var DocumentationPageAnchor = z105.object({
|
|
3861
|
+
blockId: z105.string(),
|
|
3862
|
+
level: z105.number(),
|
|
3863
|
+
text: z105.string()
|
|
3902
3864
|
});
|
|
3903
3865
|
|
|
3904
3866
|
// src/dsm/documentation/page-content-backup.ts
|
|
3905
|
-
import { z as
|
|
3906
|
-
var DocumentationPageContentBackup =
|
|
3907
|
-
id:
|
|
3908
|
-
designSystemVersionId:
|
|
3909
|
-
createdAt:
|
|
3910
|
-
updatedAt:
|
|
3911
|
-
documentationPageId:
|
|
3912
|
-
documentationPageName:
|
|
3913
|
-
storagePath:
|
|
3867
|
+
import { z as z106 } from "zod";
|
|
3868
|
+
var DocumentationPageContentBackup = z106.object({
|
|
3869
|
+
id: z106.string(),
|
|
3870
|
+
designSystemVersionId: z106.string(),
|
|
3871
|
+
createdAt: z106.coerce.date(),
|
|
3872
|
+
updatedAt: z106.coerce.date(),
|
|
3873
|
+
documentationPageId: z106.string(),
|
|
3874
|
+
documentationPageName: z106.string(),
|
|
3875
|
+
storagePath: z106.string()
|
|
3914
3876
|
});
|
|
3915
3877
|
|
|
3916
3878
|
// src/dsm/documentation/page-content.ts
|
|
3917
|
-
import { z as
|
|
3918
|
-
var DocumentationPageContentItem =
|
|
3879
|
+
import { z as z107 } from "zod";
|
|
3880
|
+
var DocumentationPageContentItem = z107.discriminatedUnion("type", [
|
|
3919
3881
|
PageBlockEditorModelV2,
|
|
3920
3882
|
PageSectionEditorModelV2
|
|
3921
3883
|
]);
|
|
3922
|
-
var DocumentationPageContentData =
|
|
3923
|
-
items:
|
|
3884
|
+
var DocumentationPageContentData = z107.object({
|
|
3885
|
+
items: z107.array(DocumentationPageContentItem)
|
|
3886
|
+
});
|
|
3887
|
+
var DocumentationPageContent = z107.object({
|
|
3888
|
+
id: z107.string(),
|
|
3889
|
+
designSystemVersionId: z107.string(),
|
|
3890
|
+
createdAt: z107.coerce.date(),
|
|
3891
|
+
updatedAt: z107.coerce.date(),
|
|
3892
|
+
documentationPageId: z107.string(),
|
|
3893
|
+
data: DocumentationPageContentData
|
|
3924
3894
|
});
|
|
3925
|
-
|
|
3926
|
-
|
|
3895
|
+
|
|
3896
|
+
// src/dsm/documentation/page.ts
|
|
3897
|
+
import { z as z108 } from "zod";
|
|
3898
|
+
var DocumentationPage = z108.object({
|
|
3899
|
+
type: z108.literal("DocumentationPage"),
|
|
3900
|
+
id: z108.string(),
|
|
3901
|
+
persistentId: z108.string(),
|
|
3902
|
+
shortPersistentId: z108.string(),
|
|
3903
|
+
designSystemVersionId: z108.string(),
|
|
3904
|
+
parentPersistentId: z108.string().nullish(),
|
|
3905
|
+
sortOrder: z108.number(),
|
|
3906
|
+
title: z108.string(),
|
|
3907
|
+
slug: z108.string(),
|
|
3908
|
+
userSlug: z108.string().nullish(),
|
|
3909
|
+
createdAt: z108.coerce.date(),
|
|
3910
|
+
updatedAt: z108.coerce.date()
|
|
3911
|
+
});
|
|
3912
|
+
|
|
3913
|
+
// src/dsm/documentation/settings.ts
|
|
3914
|
+
import { z as z109 } from "zod";
|
|
3915
|
+
var DocumentationSettings = z109.object({
|
|
3916
|
+
// Basic
|
|
3927
3917
|
designSystemVersionId: z109.string(),
|
|
3928
3918
|
createdAt: z109.coerce.date(),
|
|
3929
3919
|
updatedAt: z109.coerce.date(),
|
|
3930
|
-
|
|
3931
|
-
|
|
3920
|
+
// Configuration
|
|
3921
|
+
isTabbedLayoutEnabled: z109.boolean(),
|
|
3922
|
+
storybookEmbedErrorMessage: z109.string().optional(),
|
|
3923
|
+
renderCodePackageJson: z109.string().optional(),
|
|
3924
|
+
selectedBrandPersistentId: z109.string().optional(),
|
|
3925
|
+
serveDefaultVersionOnly: z109.boolean(),
|
|
3926
|
+
isPublic: z109.boolean()
|
|
3932
3927
|
});
|
|
3933
3928
|
|
|
3934
|
-
// src/dsm/documentation/
|
|
3929
|
+
// src/dsm/documentation/thread.ts
|
|
3935
3930
|
import { z as z110 } from "zod";
|
|
3936
|
-
var
|
|
3937
|
-
|
|
3931
|
+
var DocumentationComment = z110.object({
|
|
3932
|
+
id: z110.string(),
|
|
3933
|
+
authorId: z110.string(),
|
|
3934
|
+
threadId: z110.string(),
|
|
3935
|
+
roomId: z110.string(),
|
|
3936
|
+
createdAt: z110.coerce.date(),
|
|
3937
|
+
editedAt: z110.coerce.date().optional(),
|
|
3938
|
+
deletedAt: z110.coerce.date().optional(),
|
|
3939
|
+
body: z110.string()
|
|
3940
|
+
});
|
|
3941
|
+
var DocumentationCommentThread = z110.object({
|
|
3938
3942
|
id: z110.string(),
|
|
3939
|
-
|
|
3940
|
-
|
|
3943
|
+
roomId: z110.string(),
|
|
3944
|
+
pagePersistentId: z110.string(),
|
|
3945
|
+
brandId: z110.string(),
|
|
3941
3946
|
designSystemVersionId: z110.string(),
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
slug: z110.string(),
|
|
3946
|
-
userSlug: z110.string().nullish(),
|
|
3947
|
+
designSystemId: z110.string(),
|
|
3948
|
+
blockId: z110.string().optional(),
|
|
3949
|
+
resolved: z110.boolean(),
|
|
3947
3950
|
createdAt: z110.coerce.date(),
|
|
3948
3951
|
updatedAt: z110.coerce.date()
|
|
3949
3952
|
});
|
|
3950
3953
|
|
|
3951
|
-
// src/dsm/
|
|
3954
|
+
// src/dsm/element-snapshots/base.ts
|
|
3952
3955
|
import { z as z111 } from "zod";
|
|
3953
|
-
var
|
|
3954
|
-
|
|
3956
|
+
var DesignElementSnapshotReason = z111.enum(["Publish", "Deletion"]);
|
|
3957
|
+
var DesignElementSnapshotBase = z111.object({
|
|
3958
|
+
id: z111.string(),
|
|
3959
|
+
persistentId: z111.string(),
|
|
3955
3960
|
designSystemVersionId: z111.string(),
|
|
3956
3961
|
createdAt: z111.coerce.date(),
|
|
3957
3962
|
updatedAt: z111.coerce.date(),
|
|
3958
|
-
// Configuration
|
|
3959
|
-
isTabbedLayoutEnabled: z111.boolean(),
|
|
3960
|
-
storybookEmbedErrorMessage: z111.string().optional(),
|
|
3961
|
-
renderCodePackageJson: z111.string().optional(),
|
|
3962
|
-
selectedBrandPersistentId: z111.string().optional(),
|
|
3963
|
-
serveDefaultVersionOnly: z111.boolean(),
|
|
3964
|
-
isPublic: z111.boolean()
|
|
3965
|
-
});
|
|
3966
|
-
|
|
3967
|
-
// src/dsm/documentation/thread.ts
|
|
3968
|
-
import { z as z112 } from "zod";
|
|
3969
|
-
var DocumentationComment = z112.object({
|
|
3970
|
-
id: z112.string(),
|
|
3971
|
-
authorId: z112.string(),
|
|
3972
|
-
threadId: z112.string(),
|
|
3973
|
-
roomId: z112.string(),
|
|
3974
|
-
createdAt: z112.coerce.date(),
|
|
3975
|
-
editedAt: z112.coerce.date().optional(),
|
|
3976
|
-
deletedAt: z112.coerce.date().optional(),
|
|
3977
|
-
body: z112.string()
|
|
3978
|
-
});
|
|
3979
|
-
var DocumentationCommentThread = z112.object({
|
|
3980
|
-
id: z112.string(),
|
|
3981
|
-
roomId: z112.string(),
|
|
3982
|
-
pagePersistentId: z112.string(),
|
|
3983
|
-
brandId: z112.string(),
|
|
3984
|
-
designSystemVersionId: z112.string(),
|
|
3985
|
-
designSystemId: z112.string(),
|
|
3986
|
-
blockId: z112.string().optional(),
|
|
3987
|
-
resolved: z112.boolean(),
|
|
3988
|
-
createdAt: z112.coerce.date(),
|
|
3989
|
-
updatedAt: z112.coerce.date()
|
|
3990
|
-
});
|
|
3991
|
-
|
|
3992
|
-
// src/dsm/element-snapshots/base.ts
|
|
3993
|
-
import { z as z113 } from "zod";
|
|
3994
|
-
var DesignElementSnapshotReason = z113.enum(["Publish", "Deletion"]);
|
|
3995
|
-
var DesignElementSnapshotBase = z113.object({
|
|
3996
|
-
id: z113.string(),
|
|
3997
|
-
persistentId: z113.string(),
|
|
3998
|
-
designSystemVersionId: z113.string(),
|
|
3999
|
-
createdAt: z113.coerce.date(),
|
|
4000
|
-
updatedAt: z113.coerce.date(),
|
|
4001
3963
|
reason: DesignElementSnapshotReason,
|
|
4002
|
-
createdByUserId:
|
|
3964
|
+
createdByUserId: z111.string()
|
|
4003
3965
|
});
|
|
4004
3966
|
function pickLatestSnapshots(snapshots, getSnapshotElementId) {
|
|
4005
3967
|
const groupedSnapshots = groupBy(snapshots, getSnapshotElementId);
|
|
@@ -4010,11 +3972,11 @@ function pickLatestSnapshots(snapshots, getSnapshotElementId) {
|
|
|
4010
3972
|
}
|
|
4011
3973
|
|
|
4012
3974
|
// src/dsm/element-snapshots/documentation-page-snapshot.ts
|
|
4013
|
-
import { z as
|
|
3975
|
+
import { z as z112 } from "zod";
|
|
4014
3976
|
var DocumentationPageSnapshot = DesignElementSnapshotBase.extend({
|
|
4015
3977
|
page: DocumentationPageV2,
|
|
4016
|
-
pageContentHash:
|
|
4017
|
-
pageContentStorageKey:
|
|
3978
|
+
pageContentHash: z112.string(),
|
|
3979
|
+
pageContentStorageKey: z112.string()
|
|
4018
3980
|
});
|
|
4019
3981
|
function pickLatestPageSnapshots(snapshots) {
|
|
4020
3982
|
return pickLatestSnapshots(snapshots, (s) => s.page.id);
|
|
@@ -4028,154 +3990,192 @@ function pickLatestGroupSnapshots(snapshots) {
|
|
|
4028
3990
|
return pickLatestSnapshots(snapshots, (s) => s.group.id);
|
|
4029
3991
|
}
|
|
4030
3992
|
|
|
4031
|
-
// src/dsm/
|
|
4032
|
-
import { z as
|
|
4033
|
-
var
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
3993
|
+
// src/dsm/membership/design-system-membership.ts
|
|
3994
|
+
import { z as z113 } from "zod";
|
|
3995
|
+
var DesignSystemMembership = z113.object({
|
|
3996
|
+
id: z113.string(),
|
|
3997
|
+
userId: z113.string(),
|
|
3998
|
+
designSystemId: z113.string(),
|
|
3999
|
+
workspaceMembershipId: z113.string()
|
|
4000
|
+
});
|
|
4001
|
+
|
|
4002
|
+
// src/dsm/views/column.ts
|
|
4003
|
+
import { z as z114 } from "zod";
|
|
4004
|
+
var ElementViewBaseColumnType = z114.enum(["Name", "Description", "Value", "UpdatedAt"]);
|
|
4005
|
+
var ElementViewColumnType = z114.union([
|
|
4006
|
+
z114.literal("BaseProperty"),
|
|
4007
|
+
z114.literal("PropertyDefinition"),
|
|
4008
|
+
z114.literal("Theme")
|
|
4009
|
+
]);
|
|
4010
|
+
var ElementViewColumnSharedAttributes = z114.object({
|
|
4011
|
+
id: z114.string(),
|
|
4012
|
+
persistentId: z114.string(),
|
|
4013
|
+
elementDataViewId: z114.string(),
|
|
4014
|
+
sortPosition: z114.number(),
|
|
4015
|
+
width: z114.number()
|
|
4048
4016
|
});
|
|
4049
|
-
var
|
|
4017
|
+
var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
|
|
4018
|
+
type: z114.literal("BaseProperty"),
|
|
4019
|
+
basePropertyType: ElementViewBaseColumnType
|
|
4020
|
+
});
|
|
4021
|
+
var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
|
|
4022
|
+
type: z114.literal("PropertyDefinition"),
|
|
4023
|
+
propertyDefinitionId: z114.string()
|
|
4024
|
+
});
|
|
4025
|
+
var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
|
|
4026
|
+
type: z114.literal("Theme"),
|
|
4027
|
+
themeId: z114.string()
|
|
4028
|
+
});
|
|
4029
|
+
var ElementViewColumn = z114.discriminatedUnion("type", [
|
|
4030
|
+
ElementViewBasePropertyColumn,
|
|
4031
|
+
ElementViewPropertyDefinitionColumn,
|
|
4032
|
+
ElementViewThemeColumn
|
|
4033
|
+
]);
|
|
4034
|
+
|
|
4035
|
+
// src/dsm/views/view.ts
|
|
4036
|
+
import { z as z115 } from "zod";
|
|
4037
|
+
var ElementView = z115.object({
|
|
4050
4038
|
id: z115.string(),
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4039
|
+
persistentId: z115.string(),
|
|
4040
|
+
designSystemVersionId: z115.string(),
|
|
4041
|
+
name: z115.string(),
|
|
4042
|
+
description: z115.string(),
|
|
4043
|
+
targetElementType: ElementPropertyTargetType,
|
|
4044
|
+
isDefault: z115.boolean()
|
|
4054
4045
|
});
|
|
4055
4046
|
|
|
4056
|
-
// src/dsm/
|
|
4047
|
+
// src/dsm/brand.ts
|
|
4057
4048
|
import { z as z116 } from "zod";
|
|
4058
|
-
var
|
|
4049
|
+
var Brand = z116.object({
|
|
4059
4050
|
id: z116.string(),
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4051
|
+
designSystemVersionId: z116.string(),
|
|
4052
|
+
persistentId: z116.string(),
|
|
4053
|
+
name: z116.string(),
|
|
4054
|
+
description: z116.string()
|
|
4063
4055
|
});
|
|
4064
4056
|
|
|
4065
|
-
// src/dsm/
|
|
4057
|
+
// src/dsm/design-system.ts
|
|
4066
4058
|
import { z as z117 } from "zod";
|
|
4067
|
-
var
|
|
4068
|
-
var
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4059
|
+
var DesignSystemAccessMode = z117.enum(["Open", "InviteOnly"]);
|
|
4060
|
+
var DesignSystemSwitcher = z117.object({
|
|
4061
|
+
isEnabled: z117.boolean(),
|
|
4062
|
+
designSystemIds: z117.array(z117.string())
|
|
4063
|
+
});
|
|
4064
|
+
var DesignSystem = z117.object({
|
|
4072
4065
|
id: z117.string(),
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4066
|
+
workspaceId: z117.string(),
|
|
4067
|
+
name: z117.string(),
|
|
4068
|
+
description: z117.string(),
|
|
4069
|
+
docExporterId: nullishToOptional(z117.string()),
|
|
4070
|
+
docSlug: z117.string(),
|
|
4071
|
+
docUserSlug: nullishToOptional(z117.string()),
|
|
4072
|
+
docSlugDeprecated: z117.string(),
|
|
4078
4073
|
isPublic: z117.boolean(),
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4074
|
+
isMultibrand: z117.boolean(),
|
|
4075
|
+
docViewUrl: nullishToOptional(z117.string()),
|
|
4076
|
+
basePrefixes: z117.array(z117.string()),
|
|
4077
|
+
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
4078
|
+
isApprovalFeatureEnabled: z117.boolean(),
|
|
4079
|
+
approvalRequiredForPublishing: z117.boolean(),
|
|
4080
|
+
accessMode: DesignSystemAccessMode,
|
|
4081
|
+
createdAt: z117.coerce.date(),
|
|
4082
|
+
updatedAt: z117.coerce.date()
|
|
4088
4083
|
});
|
|
4089
4084
|
|
|
4090
|
-
// src/dsm/
|
|
4085
|
+
// src/dsm/exporter-property-values-collection.ts
|
|
4091
4086
|
import { z as z118 } from "zod";
|
|
4087
|
+
var ExporterPropertyImageValue = z118.object({
|
|
4088
|
+
asset: PageBlockAsset.optional(),
|
|
4089
|
+
assetId: z118.string().optional(),
|
|
4090
|
+
assetUrl: z118.string().optional()
|
|
4091
|
+
});
|
|
4092
|
+
var ExporterPropertyValue = z118.object({
|
|
4093
|
+
key: z118.string(),
|
|
4094
|
+
value: z118.union([
|
|
4095
|
+
z118.number(),
|
|
4096
|
+
z118.string(),
|
|
4097
|
+
z118.boolean(),
|
|
4098
|
+
ExporterPropertyImageValue,
|
|
4099
|
+
ColorTokenData,
|
|
4100
|
+
TypographyTokenData
|
|
4101
|
+
])
|
|
4102
|
+
});
|
|
4103
|
+
var ExporterPropertyValuesCollection = z118.object({
|
|
4104
|
+
id: z118.string(),
|
|
4105
|
+
designSystemId: z118.string(),
|
|
4106
|
+
exporterId: z118.string(),
|
|
4107
|
+
values: z118.array(ExporterPropertyValue)
|
|
4108
|
+
});
|
|
4109
|
+
|
|
4110
|
+
// src/dsm/published-doc-page.ts
|
|
4111
|
+
import { z as z119 } from "zod";
|
|
4092
4112
|
var SHORT_PERSISTENT_ID_LENGTH = 8;
|
|
4093
4113
|
function tryParseShortPersistentId(url = "/") {
|
|
4094
4114
|
const lastUrlPart = url.split("/").pop() || "";
|
|
4095
4115
|
const shortPersistentId = lastUrlPart.split("-").pop()?.replaceAll(".html", "") || null;
|
|
4096
4116
|
return shortPersistentId?.length === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
|
|
4097
4117
|
}
|
|
4098
|
-
var PublishedDocPage =
|
|
4099
|
-
id: z118.string(),
|
|
4100
|
-
publishedDocId: z118.string(),
|
|
4101
|
-
pageShortPersistentId: z118.string(),
|
|
4102
|
-
pathV1: z118.string(),
|
|
4103
|
-
pathV2: z118.string(),
|
|
4104
|
-
storagePath: z118.string(),
|
|
4105
|
-
locale: z118.string().optional(),
|
|
4106
|
-
isPrivate: z118.boolean(),
|
|
4107
|
-
isHidden: z118.boolean(),
|
|
4108
|
-
createdAt: z118.coerce.date(),
|
|
4109
|
-
updatedAt: z118.coerce.date()
|
|
4110
|
-
});
|
|
4111
|
-
|
|
4112
|
-
// src/dsm/version.ts
|
|
4113
|
-
import { z as z119 } from "zod";
|
|
4114
|
-
var DesignSystemVersion = z119.object({
|
|
4118
|
+
var PublishedDocPage = z119.object({
|
|
4115
4119
|
id: z119.string(),
|
|
4116
|
-
|
|
4120
|
+
publishedDocId: z119.string(),
|
|
4121
|
+
pageShortPersistentId: z119.string(),
|
|
4122
|
+
pathV1: z119.string(),
|
|
4123
|
+
pathV2: z119.string(),
|
|
4124
|
+
storagePath: z119.string(),
|
|
4125
|
+
locale: z119.string().optional(),
|
|
4126
|
+
isPrivate: z119.boolean(),
|
|
4127
|
+
isHidden: z119.boolean(),
|
|
4117
4128
|
createdAt: z119.coerce.date(),
|
|
4118
|
-
|
|
4119
|
-
name: z119.string(),
|
|
4120
|
-
comment: z119.string(),
|
|
4121
|
-
isReadonly: z119.boolean(),
|
|
4122
|
-
changeLog: z119.string(),
|
|
4123
|
-
parentId: z119.string().optional(),
|
|
4124
|
-
isDraftsFeatureAdopted: z119.boolean()
|
|
4125
|
-
});
|
|
4126
|
-
var VersionCreationJobStatus = z119.enum(["Success", "InProgress", "Error"]);
|
|
4127
|
-
var VersionCreationJob = z119.object({
|
|
4128
|
-
id: z119.string(),
|
|
4129
|
-
version: z119.string(),
|
|
4130
|
-
designSystemId: z119.string(),
|
|
4131
|
-
designSystemVersionId: nullishToOptional(z119.string()),
|
|
4132
|
-
status: VersionCreationJobStatus,
|
|
4133
|
-
errorMessage: nullishToOptional(z119.string())
|
|
4129
|
+
updatedAt: z119.coerce.date()
|
|
4134
4130
|
});
|
|
4135
4131
|
|
|
4136
|
-
// src/dsm/
|
|
4132
|
+
// src/dsm/published-doc.ts
|
|
4137
4133
|
import { z as z120 } from "zod";
|
|
4138
|
-
var
|
|
4139
|
-
var
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
]);
|
|
4144
|
-
var ElementViewColumnSharedAttributes = z120.object({
|
|
4134
|
+
var publishedDocEnvironments = ["Live", "Preview"];
|
|
4135
|
+
var PublishedDocEnvironment = z120.enum(publishedDocEnvironments);
|
|
4136
|
+
var PublishedDocsChecksums = z120.record(z120.string());
|
|
4137
|
+
var PublishedDocRoutingVersion = z120.enum(["1", "2"]);
|
|
4138
|
+
var PublishedDoc = z120.object({
|
|
4145
4139
|
id: z120.string(),
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
themeId: z120.string()
|
|
4140
|
+
designSystemVersionId: z120.string(),
|
|
4141
|
+
createdAt: z120.coerce.date(),
|
|
4142
|
+
updatedAt: z120.coerce.date(),
|
|
4143
|
+
lastPublishedAt: z120.coerce.date(),
|
|
4144
|
+
isDefault: z120.boolean(),
|
|
4145
|
+
isPublic: z120.boolean(),
|
|
4146
|
+
environment: PublishedDocEnvironment,
|
|
4147
|
+
checksums: PublishedDocsChecksums,
|
|
4148
|
+
storagePath: z120.string(),
|
|
4149
|
+
wasMigrated: z120.boolean(),
|
|
4150
|
+
routingVersion: PublishedDocRoutingVersion,
|
|
4151
|
+
usesLocalizations: z120.boolean(),
|
|
4152
|
+
wasPublishedWithLocalizations: z120.boolean(),
|
|
4153
|
+
tokenCount: z120.number(),
|
|
4154
|
+
assetCount: z120.number()
|
|
4162
4155
|
});
|
|
4163
|
-
var ElementViewColumn = z120.discriminatedUnion("type", [
|
|
4164
|
-
ElementViewBasePropertyColumn,
|
|
4165
|
-
ElementViewPropertyDefinitionColumn,
|
|
4166
|
-
ElementViewThemeColumn
|
|
4167
|
-
]);
|
|
4168
4156
|
|
|
4169
|
-
// src/dsm/
|
|
4157
|
+
// src/dsm/version.ts
|
|
4170
4158
|
import { z as z121 } from "zod";
|
|
4171
|
-
var
|
|
4159
|
+
var DesignSystemVersion = z121.object({
|
|
4172
4160
|
id: z121.string(),
|
|
4173
|
-
|
|
4174
|
-
|
|
4161
|
+
version: z121.string(),
|
|
4162
|
+
createdAt: z121.coerce.date(),
|
|
4163
|
+
designSystemId: z121.string(),
|
|
4175
4164
|
name: z121.string(),
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4165
|
+
comment: z121.string(),
|
|
4166
|
+
isReadonly: z121.boolean(),
|
|
4167
|
+
changeLog: z121.string(),
|
|
4168
|
+
parentId: z121.string().optional(),
|
|
4169
|
+
isDraftsFeatureAdopted: z121.boolean()
|
|
4170
|
+
});
|
|
4171
|
+
var VersionCreationJobStatus = z121.enum(["Success", "InProgress", "Error"]);
|
|
4172
|
+
var VersionCreationJob = z121.object({
|
|
4173
|
+
id: z121.string(),
|
|
4174
|
+
version: z121.string(),
|
|
4175
|
+
designSystemId: z121.string(),
|
|
4176
|
+
designSystemVersionId: nullishToOptional(z121.string()),
|
|
4177
|
+
status: VersionCreationJobStatus,
|
|
4178
|
+
errorMessage: nullishToOptional(z121.string())
|
|
4179
4179
|
});
|
|
4180
4180
|
|
|
4181
4181
|
// src/export/export-destinations.ts
|