@supernova-studio/model 0.52.12 → 0.52.13
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 +1927 -1927
- package/dist/index.d.ts +1927 -1927
- package/dist/index.js +113 -107
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +673 -667
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/documentation/block-definitions/item.ts +10 -6
- package/src/dsm/version.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -511,106 +511,6 @@ var ImportWarning = _zod.z.object({
|
|
|
511
511
|
// src/dsm/data-sources/import-summary.ts
|
|
512
512
|
|
|
513
513
|
|
|
514
|
-
// src/dsm/elements/base.ts
|
|
515
|
-
|
|
516
|
-
var DesignElementOrigin = _zod.z.object({
|
|
517
|
-
id: _zod.z.string(),
|
|
518
|
-
sourceId: _zod.z.string(),
|
|
519
|
-
name: _zod.z.string()
|
|
520
|
-
});
|
|
521
|
-
var DesignElementBase = _zod.z.object({
|
|
522
|
-
id: _zod.z.string(),
|
|
523
|
-
persistentId: _zod.z.string(),
|
|
524
|
-
meta: ObjectMeta,
|
|
525
|
-
designSystemVersionId: _zod.z.string(),
|
|
526
|
-
createdAt: _zod.z.coerce.date(),
|
|
527
|
-
updatedAt: _zod.z.coerce.date()
|
|
528
|
-
});
|
|
529
|
-
var DesignElementImportedBase = DesignElementBase.extend({
|
|
530
|
-
origin: DesignElementOrigin
|
|
531
|
-
});
|
|
532
|
-
var DesignElementGroupablePart = _zod.z.object({
|
|
533
|
-
parentPersistentId: _zod.z.string().optional(),
|
|
534
|
-
sortOrder: _zod.z.number()
|
|
535
|
-
});
|
|
536
|
-
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
537
|
-
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
538
|
-
parentPersistentId: _zod.z.string()
|
|
539
|
-
});
|
|
540
|
-
var DesignElementBrandedPart = _zod.z.object({
|
|
541
|
-
brandPersistentId: _zod.z.string()
|
|
542
|
-
});
|
|
543
|
-
var DesignElementSlugPart = _zod.z.object({
|
|
544
|
-
slug: _zod.z.string().optional(),
|
|
545
|
-
userSlug: _zod.z.string().optional()
|
|
546
|
-
});
|
|
547
|
-
|
|
548
|
-
// src/dsm/elements/figma-component.ts
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
// src/dsm/elements/component-properties.ts
|
|
552
|
-
|
|
553
|
-
var FigmaComponentPropertyType = _zod.z.enum(["Boolean", "InstanceSwap", "Variant", "Text"]);
|
|
554
|
-
var FigmaComponentBooleanProperty = _zod.z.object({
|
|
555
|
-
type: _zod.z.literal(FigmaComponentPropertyType.enum.Boolean),
|
|
556
|
-
defaultValue: _zod.z.boolean()
|
|
557
|
-
});
|
|
558
|
-
var FigmaComponentInstanceSwapProperty = _zod.z.object({
|
|
559
|
-
type: _zod.z.literal(FigmaComponentPropertyType.enum.InstanceSwap),
|
|
560
|
-
defaultValue: _zod.z.string(),
|
|
561
|
-
preferredValues: _zod.z.object({
|
|
562
|
-
type: _zod.z.enum(["Component", "ComponentSet"]),
|
|
563
|
-
key: _zod.z.string()
|
|
564
|
-
}).array()
|
|
565
|
-
});
|
|
566
|
-
var FigmaComponentVariantProperty = _zod.z.object({
|
|
567
|
-
type: _zod.z.literal(FigmaComponentPropertyType.enum.Variant),
|
|
568
|
-
defaultValue: _zod.z.string(),
|
|
569
|
-
options: _zod.z.array(_zod.z.string())
|
|
570
|
-
});
|
|
571
|
-
var FigmaComponentTextProperty = _zod.z.object({
|
|
572
|
-
type: _zod.z.literal(FigmaComponentPropertyType.enum.Text),
|
|
573
|
-
defaultValue: _zod.z.string()
|
|
574
|
-
});
|
|
575
|
-
var FigmaComponentProperty = _zod.z.discriminatedUnion("type", [
|
|
576
|
-
FigmaComponentBooleanProperty,
|
|
577
|
-
FigmaComponentInstanceSwapProperty,
|
|
578
|
-
FigmaComponentTextProperty
|
|
579
|
-
]);
|
|
580
|
-
var FigmaComponentPropertyMap = _zod.z.record(_zod.z.string(), FigmaComponentProperty);
|
|
581
|
-
var FigmaComponentSetProperties = _zod.z.record(
|
|
582
|
-
_zod.z.string(),
|
|
583
|
-
_zod.z.discriminatedUnion("type", [
|
|
584
|
-
FigmaComponentBooleanProperty,
|
|
585
|
-
FigmaComponentInstanceSwapProperty,
|
|
586
|
-
FigmaComponentTextProperty,
|
|
587
|
-
FigmaComponentVariantProperty
|
|
588
|
-
])
|
|
589
|
-
);
|
|
590
|
-
|
|
591
|
-
// src/dsm/elements/figma-component.ts
|
|
592
|
-
var FigmaComponentOriginPart = _zod.z.object({
|
|
593
|
-
nodeId: _zod.z.string().optional(),
|
|
594
|
-
width: _zod.z.number().optional(),
|
|
595
|
-
height: _zod.z.number().optional()
|
|
596
|
-
});
|
|
597
|
-
var FigmaComponentAsset = _zod.z.object({
|
|
598
|
-
assetId: _zod.z.string(),
|
|
599
|
-
assetPath: _zod.z.string()
|
|
600
|
-
});
|
|
601
|
-
var FigmaComponentOrigin = DesignElementOrigin.extend(FigmaComponentOriginPart.shape);
|
|
602
|
-
var FigmaComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
603
|
-
origin: FigmaComponentOrigin.optional(),
|
|
604
|
-
thumbnail: FigmaComponentAsset,
|
|
605
|
-
componentPropertyDefinitions: FigmaComponentPropertyMap.optional(),
|
|
606
|
-
svg: FigmaComponentAsset.optional(),
|
|
607
|
-
isAsset: _zod.z.boolean(),
|
|
608
|
-
parentComponentPersistentId: nullishToOptional(_zod.z.string())
|
|
609
|
-
});
|
|
610
|
-
function isImportedFigmaComponent(component) {
|
|
611
|
-
return !!component.origin;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
514
|
// src/dsm/elements/data/base.ts
|
|
615
515
|
|
|
616
516
|
var TokenDataAliasSchema = _zod.z.object({
|
|
@@ -694,6 +594,48 @@ var BorderTokenData = tokenAliasOrValue(BorderValue);
|
|
|
694
594
|
|
|
695
595
|
// src/dsm/elements/data/component.ts
|
|
696
596
|
|
|
597
|
+
|
|
598
|
+
// src/dsm/elements/component-properties.ts
|
|
599
|
+
|
|
600
|
+
var FigmaComponentPropertyType = _zod.z.enum(["Boolean", "InstanceSwap", "Variant", "Text"]);
|
|
601
|
+
var FigmaComponentBooleanProperty = _zod.z.object({
|
|
602
|
+
type: _zod.z.literal(FigmaComponentPropertyType.enum.Boolean),
|
|
603
|
+
defaultValue: _zod.z.boolean()
|
|
604
|
+
});
|
|
605
|
+
var FigmaComponentInstanceSwapProperty = _zod.z.object({
|
|
606
|
+
type: _zod.z.literal(FigmaComponentPropertyType.enum.InstanceSwap),
|
|
607
|
+
defaultValue: _zod.z.string(),
|
|
608
|
+
preferredValues: _zod.z.object({
|
|
609
|
+
type: _zod.z.enum(["Component", "ComponentSet"]),
|
|
610
|
+
key: _zod.z.string()
|
|
611
|
+
}).array()
|
|
612
|
+
});
|
|
613
|
+
var FigmaComponentVariantProperty = _zod.z.object({
|
|
614
|
+
type: _zod.z.literal(FigmaComponentPropertyType.enum.Variant),
|
|
615
|
+
defaultValue: _zod.z.string(),
|
|
616
|
+
options: _zod.z.array(_zod.z.string())
|
|
617
|
+
});
|
|
618
|
+
var FigmaComponentTextProperty = _zod.z.object({
|
|
619
|
+
type: _zod.z.literal(FigmaComponentPropertyType.enum.Text),
|
|
620
|
+
defaultValue: _zod.z.string()
|
|
621
|
+
});
|
|
622
|
+
var FigmaComponentProperty = _zod.z.discriminatedUnion("type", [
|
|
623
|
+
FigmaComponentBooleanProperty,
|
|
624
|
+
FigmaComponentInstanceSwapProperty,
|
|
625
|
+
FigmaComponentTextProperty
|
|
626
|
+
]);
|
|
627
|
+
var FigmaComponentPropertyMap = _zod.z.record(_zod.z.string(), FigmaComponentProperty);
|
|
628
|
+
var FigmaComponentSetProperties = _zod.z.record(
|
|
629
|
+
_zod.z.string(),
|
|
630
|
+
_zod.z.discriminatedUnion("type", [
|
|
631
|
+
FigmaComponentBooleanProperty,
|
|
632
|
+
FigmaComponentInstanceSwapProperty,
|
|
633
|
+
FigmaComponentTextProperty,
|
|
634
|
+
FigmaComponentVariantProperty
|
|
635
|
+
])
|
|
636
|
+
);
|
|
637
|
+
|
|
638
|
+
// src/dsm/elements/data/component.ts
|
|
697
639
|
var ComponentElementData = _zod.z.object({
|
|
698
640
|
value: _zod.z.object({
|
|
699
641
|
thumbnailImage: _zod.z.object({
|
|
@@ -2450,6 +2392,42 @@ var DocumentationPageDataV2 = _zod.z.object({
|
|
|
2450
2392
|
|
|
2451
2393
|
// src/dsm/elements/page-block-v2.ts
|
|
2452
2394
|
|
|
2395
|
+
|
|
2396
|
+
// src/dsm/elements/base.ts
|
|
2397
|
+
|
|
2398
|
+
var DesignElementOrigin = _zod.z.object({
|
|
2399
|
+
id: _zod.z.string(),
|
|
2400
|
+
sourceId: _zod.z.string(),
|
|
2401
|
+
name: _zod.z.string()
|
|
2402
|
+
});
|
|
2403
|
+
var DesignElementBase = _zod.z.object({
|
|
2404
|
+
id: _zod.z.string(),
|
|
2405
|
+
persistentId: _zod.z.string(),
|
|
2406
|
+
meta: ObjectMeta,
|
|
2407
|
+
designSystemVersionId: _zod.z.string(),
|
|
2408
|
+
createdAt: _zod.z.coerce.date(),
|
|
2409
|
+
updatedAt: _zod.z.coerce.date()
|
|
2410
|
+
});
|
|
2411
|
+
var DesignElementImportedBase = DesignElementBase.extend({
|
|
2412
|
+
origin: DesignElementOrigin
|
|
2413
|
+
});
|
|
2414
|
+
var DesignElementGroupablePart = _zod.z.object({
|
|
2415
|
+
parentPersistentId: _zod.z.string().optional(),
|
|
2416
|
+
sortOrder: _zod.z.number()
|
|
2417
|
+
});
|
|
2418
|
+
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
2419
|
+
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
2420
|
+
parentPersistentId: _zod.z.string()
|
|
2421
|
+
});
|
|
2422
|
+
var DesignElementBrandedPart = _zod.z.object({
|
|
2423
|
+
brandPersistentId: _zod.z.string()
|
|
2424
|
+
});
|
|
2425
|
+
var DesignElementSlugPart = _zod.z.object({
|
|
2426
|
+
slug: _zod.z.string().optional(),
|
|
2427
|
+
userSlug: _zod.z.string().optional()
|
|
2428
|
+
});
|
|
2429
|
+
|
|
2430
|
+
// src/dsm/elements/page-block-v2.ts
|
|
2453
2431
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
2454
2432
|
data: PageBlockDataV2
|
|
2455
2433
|
});
|
|
@@ -2772,6 +2750,30 @@ var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequire
|
|
|
2772
2750
|
})
|
|
2773
2751
|
});
|
|
2774
2752
|
|
|
2753
|
+
// src/dsm/elements/figma-component.ts
|
|
2754
|
+
|
|
2755
|
+
var FigmaComponentOriginPart = _zod.z.object({
|
|
2756
|
+
nodeId: _zod.z.string().optional(),
|
|
2757
|
+
width: _zod.z.number().optional(),
|
|
2758
|
+
height: _zod.z.number().optional()
|
|
2759
|
+
});
|
|
2760
|
+
var FigmaComponentAsset = _zod.z.object({
|
|
2761
|
+
assetId: _zod.z.string(),
|
|
2762
|
+
assetPath: _zod.z.string()
|
|
2763
|
+
});
|
|
2764
|
+
var FigmaComponentOrigin = DesignElementOrigin.extend(FigmaComponentOriginPart.shape);
|
|
2765
|
+
var FigmaComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
2766
|
+
origin: FigmaComponentOrigin.optional(),
|
|
2767
|
+
thumbnail: FigmaComponentAsset,
|
|
2768
|
+
componentPropertyDefinitions: FigmaComponentPropertyMap.optional(),
|
|
2769
|
+
svg: FigmaComponentAsset.optional(),
|
|
2770
|
+
isAsset: _zod.z.boolean(),
|
|
2771
|
+
parentComponentPersistentId: nullishToOptional(_zod.z.string())
|
|
2772
|
+
});
|
|
2773
|
+
function isImportedFigmaComponent(component) {
|
|
2774
|
+
return !!component.origin;
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2775
2777
|
// src/dsm/elements/figma-file-structures.ts
|
|
2776
2778
|
|
|
2777
2779
|
var FigmaFileStructureOrigin = _zod.z.object({
|
|
@@ -3615,7 +3617,15 @@ var PageBlockDefinitionRichTextPropertyStyle = _zod.z.enum([
|
|
|
3615
3617
|
"Default"
|
|
3616
3618
|
]);
|
|
3617
3619
|
var PageBlockDefinitionMultiRichTextPropertyStyle = _zod.z.enum(["OL", "UL", "Default"]);
|
|
3618
|
-
var PageBlockDefinitionRichTextEditorPropertyStyle = _zod.z.enum([
|
|
3620
|
+
var PageBlockDefinitionRichTextEditorPropertyStyle = _zod.z.enum([
|
|
3621
|
+
"OL",
|
|
3622
|
+
"UL",
|
|
3623
|
+
"Bold",
|
|
3624
|
+
"Italic",
|
|
3625
|
+
"Link",
|
|
3626
|
+
"Strikethrough",
|
|
3627
|
+
"InlineCode"
|
|
3628
|
+
]);
|
|
3619
3629
|
var PageBlockDefinitionTextPropertyStyle = _zod.z.enum([
|
|
3620
3630
|
"Title1",
|
|
3621
3631
|
"Title2",
|
|
@@ -3653,11 +3663,7 @@ var PageBlockDefinitionSingleSelectPropertyColor = _zod.z.enum([
|
|
|
3653
3663
|
"Cyan",
|
|
3654
3664
|
"Fuchsia"
|
|
3655
3665
|
]);
|
|
3656
|
-
var IconSet = _zod.z.enum([
|
|
3657
|
-
"CheckCircle",
|
|
3658
|
-
"CrossCircle",
|
|
3659
|
-
"Alert"
|
|
3660
|
-
]);
|
|
3666
|
+
var IconSet = _zod.z.enum(["CheckCircle", "CrossCircle", "Alert"]);
|
|
3661
3667
|
var PageBlockDefinitionMultiSelectPropertyStyle = _zod.z.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
3662
3668
|
var PageBlockDefinitionImageAspectRatio = _zod.z.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
3663
3669
|
var PageBlockDefinitionImageWidth = _zod.z.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
@@ -4235,7 +4241,7 @@ var PublishedDoc = _zod.z.object({
|
|
|
4235
4241
|
var DesignSystemVersion = _zod.z.object({
|
|
4236
4242
|
id: _zod.z.string(),
|
|
4237
4243
|
version: _zod.z.string(),
|
|
4238
|
-
createdAt: _zod.z.date(),
|
|
4244
|
+
createdAt: _zod.z.coerce.date(),
|
|
4239
4245
|
designSystemId: _zod.z.string(),
|
|
4240
4246
|
name: _zod.z.string(),
|
|
4241
4247
|
comment: _zod.z.string(),
|