@supernova-studio/model 1.87.10 → 1.87.11

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.js CHANGED
@@ -608,95 +608,6 @@ function isImportedAsset(asset) {
608
608
  return !!asset.originKey;
609
609
  }
610
610
 
611
- // src/dsm/brand.ts
612
-
613
- var Brand = _zod.z.object({
614
- id: _zod.z.string(),
615
- designSystemVersionId: _zod.z.string(),
616
- persistentId: _zod.z.string(),
617
- name: _zod.z.string(),
618
- description: _zod.z.string()
619
- });
620
-
621
- // src/dsm/collection.ts
622
-
623
-
624
- // src/dsm/properties/property-definition.ts
625
-
626
- var ElementPropertyTypeSchema = _zod.z.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
627
- var ElementPropertyTargetType = _zod.z.enum(["Token", "Component", "DocumentationPage"]);
628
- var ElementPropertyLinkType = _zod.z.enum(["FigmaComponent", "DocumentationPage"]);
629
- var ElementPropertyImmutableType = _zod.z.enum(["Collection"]);
630
- var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
631
- var ColorTokenInlineData = _zod.z.object({
632
- value: _zod.z.string()
633
- });
634
- var ElementPropertyDefinitionOption = _zod.z.object({
635
- id: _zod.z.string(),
636
- name: _zod.z.string(),
637
- backgroundColor: ColorTokenInlineData.optional()
638
- });
639
- var ElementPropertyDefinition = _zod.z.object({
640
- id: _zod.z.string(),
641
- designSystemVersionId: _zod.z.string(),
642
- persistentId: _zod.z.string(),
643
- name: _zod.z.string(),
644
- codeName: _zod.z.string().regex(CODE_NAME_REGEX),
645
- description: _zod.z.string(),
646
- type: ElementPropertyTypeSchema,
647
- targetElementType: ElementPropertyTargetType,
648
- options: _zod.z.array(ElementPropertyDefinitionOption).optional(),
649
- linkElementType: ElementPropertyLinkType.optional()
650
- });
651
- var ElementPropertyType = ElementPropertyTypeSchema.enum;
652
-
653
- // src/dsm/properties/property-value.ts
654
-
655
- var ElementPropertyValue = _zod.z.object({
656
- id: _zod.z.string(),
657
- designSystemVersionId: _zod.z.string(),
658
- targetElementPersistentId: _zod.z.string(),
659
- definitionPersistentId: _zod.z.string(),
660
- stringValue: _zod.z.string().nullish(),
661
- numberValue: _zod.z.number().nullish(),
662
- booleanValue: _zod.z.boolean().nullish(),
663
- referenceValue: _zod.z.string().nullish(),
664
- referenceValuePreview: _zod.z.string().optional()
665
- });
666
-
667
- // src/dsm/collection.ts
668
- var CollectionOrigin = _zod.z.object({
669
- id: _zod.z.string(),
670
- parentId: _zod.z.string().optional(),
671
- sourceIds: _zod.z.string().array(),
672
- collectionKeyMigrated: _zod.z.boolean()
673
- });
674
- var Collection = _zod.z.object({
675
- id: _zod.z.string(),
676
- persistentId: _zod.z.string(),
677
- designSystemVersionId: _zod.z.string(),
678
- name: _zod.z.string(),
679
- description: _zod.z.string(),
680
- backgroundColor: ColorTokenInlineData.optional(),
681
- parentPersistentId: _zod.z.string().optional(),
682
- /**
683
- * ID of Select element property definition's option that corresponds to this collection.
684
- *
685
- * Each collection is represented by an option in a special kind of element property that
686
- * is present in each design system where a collections are present. The property is maintained
687
- * automatically and is not available to the user (see immutable element properties).
688
- *
689
- * Collections have an immutable element property that allows bridging places where element properites
690
- * can be selected (e.g. documentation blocks) with the concept of collection without having to add
691
- * specific logic for collection selection.
692
- */
693
- elementPropertyOptionId: _zod.z.string(),
694
- createdAt: _zod.z.coerce.date(),
695
- updatedAt: _zod.z.coerce.date(),
696
- sortOrder: _zod.z.string(),
697
- origin: CollectionOrigin.optional()
698
- });
699
-
700
611
  // src/dsm/components/asset-rendering.ts
701
612
 
702
613
 
@@ -1879,6 +1790,49 @@ function isSlugReserved(slug) {
1879
1790
  // src/utils/validation.ts
1880
1791
  var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
1881
1792
 
1793
+ // src/dsm/properties/property-definition.ts
1794
+
1795
+ var ElementPropertyTypeSchema = _zod.z.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
1796
+ var ElementPropertyTargetType = _zod.z.enum(["Token", "Component", "DocumentationPage"]);
1797
+ var ElementPropertyLinkType = _zod.z.enum(["FigmaComponent", "DocumentationPage"]);
1798
+ var ElementPropertyImmutableType = _zod.z.enum(["Collection"]);
1799
+ var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
1800
+ var ColorTokenInlineData = _zod.z.object({
1801
+ value: _zod.z.string()
1802
+ });
1803
+ var ElementPropertyDefinitionOption = _zod.z.object({
1804
+ id: _zod.z.string(),
1805
+ name: _zod.z.string(),
1806
+ backgroundColor: ColorTokenInlineData.optional()
1807
+ });
1808
+ var ElementPropertyDefinition = _zod.z.object({
1809
+ id: _zod.z.string(),
1810
+ designSystemVersionId: _zod.z.string(),
1811
+ persistentId: _zod.z.string(),
1812
+ name: _zod.z.string(),
1813
+ codeName: _zod.z.string().regex(CODE_NAME_REGEX),
1814
+ description: _zod.z.string(),
1815
+ type: ElementPropertyTypeSchema,
1816
+ targetElementType: ElementPropertyTargetType,
1817
+ options: _zod.z.array(ElementPropertyDefinitionOption).optional(),
1818
+ linkElementType: ElementPropertyLinkType.optional()
1819
+ });
1820
+ var ElementPropertyType = ElementPropertyTypeSchema.enum;
1821
+
1822
+ // src/dsm/properties/property-value.ts
1823
+
1824
+ var ElementPropertyValue = _zod.z.object({
1825
+ id: _zod.z.string(),
1826
+ designSystemVersionId: _zod.z.string(),
1827
+ targetElementPersistentId: _zod.z.string(),
1828
+ definitionPersistentId: _zod.z.string(),
1829
+ stringValue: _zod.z.string().nullish(),
1830
+ numberValue: _zod.z.number().nullish(),
1831
+ booleanValue: _zod.z.boolean().nullish(),
1832
+ referenceValue: _zod.z.string().nullish(),
1833
+ referenceValuePreview: _zod.z.string().optional()
1834
+ });
1835
+
1882
1836
  // src/dsm/elements/primitives/point.ts
1883
1837
 
1884
1838
  var Point2D = _zod.z.object({
@@ -4070,6 +4024,42 @@ var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.ex
4070
4024
 
4071
4025
  // src/dsm/import/collection.ts
4072
4026
 
4027
+
4028
+ // src/dsm/collection.ts
4029
+
4030
+ var CollectionOrigin = _zod.z.object({
4031
+ id: _zod.z.string(),
4032
+ parentId: _zod.z.string().optional(),
4033
+ sourceIds: _zod.z.string().array(),
4034
+ collectionKeyMigrated: _zod.z.boolean()
4035
+ });
4036
+ var Collection = _zod.z.object({
4037
+ id: _zod.z.string(),
4038
+ persistentId: _zod.z.string(),
4039
+ designSystemVersionId: _zod.z.string(),
4040
+ name: _zod.z.string(),
4041
+ description: _zod.z.string(),
4042
+ backgroundColor: ColorTokenInlineData.optional(),
4043
+ parentPersistentId: _zod.z.string().optional(),
4044
+ /**
4045
+ * ID of Select element property definition's option that corresponds to this collection.
4046
+ *
4047
+ * Each collection is represented by an option in a special kind of element property that
4048
+ * is present in each design system where a collections are present. The property is maintained
4049
+ * automatically and is not available to the user (see immutable element properties).
4050
+ *
4051
+ * Collections have an immutable element property that allows bridging places where element properites
4052
+ * can be selected (e.g. documentation blocks) with the concept of collection without having to add
4053
+ * specific logic for collection selection.
4054
+ */
4055
+ elementPropertyOptionId: _zod.z.string(),
4056
+ createdAt: _zod.z.coerce.date(),
4057
+ updatedAt: _zod.z.coerce.date(),
4058
+ sortOrder: _zod.z.string(),
4059
+ origin: CollectionOrigin.optional()
4060
+ });
4061
+
4062
+ // src/dsm/import/collection.ts
4073
4063
  var CollectionImportModelInput = _zod.z.object({
4074
4064
  id: _zod.z.string(),
4075
4065
  name: _zod.z.string(),
@@ -4321,35 +4311,6 @@ var RenderedAssetFile = _zod.z.object({
4321
4311
  settings: AssetRenderConfiguration
4322
4312
  });
4323
4313
 
4324
- // src/dsm/design-system.ts
4325
-
4326
- var DesignSystemAccessMode = _zod.z.enum(["Open", "InviteOnly"]);
4327
- var DesignSystemSwitcher = _zod.z.object({
4328
- isEnabled: _zod.z.boolean(),
4329
- designSystemIds: _zod.z.array(_zod.z.string())
4330
- });
4331
- var DesignSystem = _zod.z.object({
4332
- id: _zod.z.string(),
4333
- workspaceId: _zod.z.string(),
4334
- name: _zod.z.string(),
4335
- description: _zod.z.string(),
4336
- docExporterId: nullishToOptional(_zod.z.string()),
4337
- docSlug: _zod.z.string(),
4338
- docUserSlug: nullishToOptional(_zod.z.string()),
4339
- docSlugDeprecated: _zod.z.string(),
4340
- isMultibrand: _zod.z.boolean(),
4341
- docViewUrl: nullishToOptional(_zod.z.string()),
4342
- basePrefixes: _zod.z.array(_zod.z.string()),
4343
- designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
4344
- isApprovalFeatureEnabled: _zod.z.boolean(),
4345
- approvalRequiredForPublishing: _zod.z.boolean(),
4346
- accessMode: DesignSystemAccessMode,
4347
- membersGenerated: _zod.z.boolean(),
4348
- sharedDraftId: _zod.z.string().optional(),
4349
- createdAt: _zod.z.coerce.date(),
4350
- updatedAt: _zod.z.coerce.date()
4351
- });
4352
-
4353
4314
  // src/dsm/documentation/approvals/approval-state.ts
4354
4315
 
4355
4316
  var DocumentationPageApprovalState = _zod.z.enum(["ReadyForReview", "ChangesRequested", "Approved"]);
@@ -4640,31 +4601,6 @@ function pickLatestGroupSnapshots(snapshots) {
4640
4601
  return pickLatestSnapshots(snapshots, (s) => s.group.id);
4641
4602
  }
4642
4603
 
4643
- // src/dsm/exporter-property-values-collection.ts
4644
-
4645
- var ExporterPropertyImageValue = _zod.z.object({
4646
- asset: PageBlockAsset.optional(),
4647
- assetId: _zod.z.string().optional(),
4648
- assetUrl: _zod.z.string().optional()
4649
- });
4650
- var ExporterConfigurationPropertyValue = _zod.z.object({
4651
- key: _zod.z.string(),
4652
- value: _zod.z.union([
4653
- _zod.z.number(),
4654
- _zod.z.string(),
4655
- _zod.z.boolean(),
4656
- ExporterPropertyImageValue,
4657
- ColorTokenData,
4658
- TypographyTokenData
4659
- ])
4660
- });
4661
- var ExporterPropertyValuesCollection = _zod.z.object({
4662
- id: _zod.z.string(),
4663
- designSystemId: _zod.z.string(),
4664
- exporterId: _zod.z.string(),
4665
- values: _zod.z.array(ExporterConfigurationPropertyValue)
4666
- });
4667
-
4668
4604
  // src/dsm/figma-exporter/figma-exporter.ts
4669
4605
 
4670
4606
  var FigmaExporterProcessedStylesSchema = _zod.z.object({
@@ -5810,29 +5746,126 @@ var PipelineExporterQuery = _zod.z.object({
5810
5746
  exporterId: _zod.z.string().optional()
5811
5747
  });
5812
5748
 
5813
- // src/dsm/published-doc.ts
5749
+ // src/dsm/views/column.ts
5814
5750
 
5815
- var publishedDocEnvironments = ["Live", "Preview"];
5816
- var PublishedDocEnvironment = _zod.z.enum(publishedDocEnvironments);
5817
- var PublishedDocsChecksums = _zod.z.record(_zod.z.string());
5818
- var PublishedDocRoutingVersion = _zod.z.enum(["1", "2"]);
5819
- var PublishedDoc = _zod.z.object({
5751
+ var ElementViewBaseColumnType = _zod.z.enum(["Name", "Description", "Value", "UpdatedAt"]);
5752
+ var ElementViewColumnType = _zod.z.union([
5753
+ _zod.z.literal("BaseProperty"),
5754
+ _zod.z.literal("PropertyDefinition"),
5755
+ _zod.z.literal("Theme")
5756
+ ]);
5757
+ var ElementViewColumnSharedAttributes = _zod.z.object({
5758
+ id: _zod.z.string(),
5759
+ persistentId: _zod.z.string(),
5760
+ elementDataViewId: _zod.z.string(),
5761
+ sortPosition: _zod.z.number(),
5762
+ width: _zod.z.number()
5763
+ });
5764
+ var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
5765
+ type: _zod.z.literal("BaseProperty"),
5766
+ basePropertyType: ElementViewBaseColumnType
5767
+ });
5768
+ var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
5769
+ type: _zod.z.literal("PropertyDefinition"),
5770
+ propertyDefinitionId: _zod.z.string()
5771
+ });
5772
+ var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
5773
+ type: _zod.z.literal("Theme"),
5774
+ themeId: _zod.z.string()
5775
+ });
5776
+ var ElementViewColumn = _zod.z.discriminatedUnion("type", [
5777
+ ElementViewBasePropertyColumn,
5778
+ ElementViewPropertyDefinitionColumn,
5779
+ ElementViewThemeColumn
5780
+ ]);
5781
+
5782
+ // src/dsm/views/view.ts
5783
+
5784
+ var ElementView = _zod.z.object({
5785
+ id: _zod.z.string(),
5786
+ persistentId: _zod.z.string(),
5787
+ designSystemVersionId: _zod.z.string(),
5788
+ name: _zod.z.string(),
5789
+ description: _zod.z.string(),
5790
+ targetElementType: ElementPropertyTargetType,
5791
+ isDefault: _zod.z.boolean()
5792
+ });
5793
+
5794
+ // src/dsm/brand.ts
5795
+
5796
+ var Brand = _zod.z.object({
5820
5797
  id: _zod.z.string(),
5821
5798
  designSystemVersionId: _zod.z.string(),
5799
+ persistentId: _zod.z.string(),
5800
+ name: _zod.z.string(),
5801
+ description: _zod.z.string()
5802
+ });
5803
+
5804
+ // src/dsm/design-system.ts
5805
+
5806
+ var DesignSystemAccessMode = _zod.z.enum(["Open", "InviteOnly"]);
5807
+ var DesignSystemSwitcher = _zod.z.object({
5808
+ isEnabled: _zod.z.boolean(),
5809
+ designSystemIds: _zod.z.array(_zod.z.string())
5810
+ });
5811
+ var DesignSystem = _zod.z.object({
5812
+ id: _zod.z.string(),
5813
+ workspaceId: _zod.z.string(),
5814
+ name: _zod.z.string(),
5815
+ description: _zod.z.string(),
5816
+ docExporterId: nullishToOptional(_zod.z.string()),
5817
+ docSlug: _zod.z.string(),
5818
+ docUserSlug: nullishToOptional(_zod.z.string()),
5819
+ docSlugDeprecated: _zod.z.string(),
5820
+ isMultibrand: _zod.z.boolean(),
5821
+ docViewUrl: nullishToOptional(_zod.z.string()),
5822
+ basePrefixes: _zod.z.array(_zod.z.string()),
5823
+ designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
5824
+ isApprovalFeatureEnabled: _zod.z.boolean(),
5825
+ approvalRequiredForPublishing: _zod.z.boolean(),
5826
+ accessMode: DesignSystemAccessMode,
5827
+ membersGenerated: _zod.z.boolean(),
5828
+ sharedDraftId: _zod.z.string().optional(),
5822
5829
  createdAt: _zod.z.coerce.date(),
5823
- updatedAt: _zod.z.coerce.date(),
5824
- lastPublishedAt: _zod.z.coerce.date(),
5825
- isDefault: _zod.z.boolean(),
5826
- isPublic: _zod.z.boolean(),
5827
- environment: PublishedDocEnvironment,
5828
- checksums: PublishedDocsChecksums,
5829
- storagePath: _zod.z.string(),
5830
- wasMigrated: _zod.z.boolean(),
5831
- routingVersion: PublishedDocRoutingVersion,
5832
- usesLocalizations: _zod.z.boolean(),
5833
- wasPublishedWithLocalizations: _zod.z.boolean(),
5834
- tokenCount: _zod.z.number(),
5835
- assetCount: _zod.z.number()
5830
+ updatedAt: _zod.z.coerce.date()
5831
+ });
5832
+
5833
+ // src/dsm/exporter-property-values-collection.ts
5834
+
5835
+ var ExporterPropertyImageValue = _zod.z.object({
5836
+ asset: PageBlockAsset.optional(),
5837
+ assetId: _zod.z.string().optional(),
5838
+ assetUrl: _zod.z.string().optional()
5839
+ });
5840
+ var ExporterConfigurationPropertyValue = _zod.z.object({
5841
+ key: _zod.z.string(),
5842
+ value: _zod.z.union([
5843
+ _zod.z.number(),
5844
+ _zod.z.string(),
5845
+ _zod.z.boolean(),
5846
+ ExporterPropertyImageValue,
5847
+ ColorTokenData,
5848
+ TypographyTokenData
5849
+ ])
5850
+ });
5851
+ var ExporterPropertyValuesCollection = _zod.z.object({
5852
+ id: _zod.z.string(),
5853
+ designSystemId: _zod.z.string(),
5854
+ exporterId: _zod.z.string(),
5855
+ values: _zod.z.array(ExporterConfigurationPropertyValue)
5856
+ });
5857
+
5858
+ // src/dsm/published-doc-page-visits.ts
5859
+
5860
+ var PublishedDocPageVisitsEntry = _zod.z.object({
5861
+ id: _zod.z.string(),
5862
+ versionId: _zod.z.string(),
5863
+ pagePersistentId: _zod.z.string(),
5864
+ locale: _zod.z.string().optional(),
5865
+ timestamp: _zod.z.coerce.date(),
5866
+ visits: _zod.z.number(),
5867
+ userId: nullishToOptional(_zod.z.string()),
5868
+ anonymousId: nullishToOptional(_zod.z.string())
5836
5869
  });
5837
5870
 
5838
5871
  // src/dsm/published-doc-page.ts
@@ -5858,17 +5891,29 @@ var PublishedDocPage = _zod.z.object({
5858
5891
  updatedAt: _zod.z.coerce.date()
5859
5892
  });
5860
5893
 
5861
- // src/dsm/published-doc-page-visits.ts
5894
+ // src/dsm/published-doc.ts
5862
5895
 
5863
- var PublishedDocPageVisitsEntry = _zod.z.object({
5896
+ var publishedDocEnvironments = ["Live", "Preview"];
5897
+ var PublishedDocEnvironment = _zod.z.enum(publishedDocEnvironments);
5898
+ var PublishedDocsChecksums = _zod.z.record(_zod.z.string());
5899
+ var PublishedDocRoutingVersion = _zod.z.enum(["1", "2"]);
5900
+ var PublishedDoc = _zod.z.object({
5864
5901
  id: _zod.z.string(),
5865
- versionId: _zod.z.string(),
5866
- pagePersistentId: _zod.z.string(),
5867
- locale: _zod.z.string().optional(),
5868
- timestamp: _zod.z.coerce.date(),
5869
- visits: _zod.z.number(),
5870
- userId: nullishToOptional(_zod.z.string()),
5871
- anonymousId: nullishToOptional(_zod.z.string())
5902
+ designSystemVersionId: _zod.z.string(),
5903
+ createdAt: _zod.z.coerce.date(),
5904
+ updatedAt: _zod.z.coerce.date(),
5905
+ lastPublishedAt: _zod.z.coerce.date(),
5906
+ isDefault: _zod.z.boolean(),
5907
+ isPublic: _zod.z.boolean(),
5908
+ environment: PublishedDocEnvironment,
5909
+ checksums: PublishedDocsChecksums,
5910
+ storagePath: _zod.z.string(),
5911
+ wasMigrated: _zod.z.boolean(),
5912
+ routingVersion: PublishedDocRoutingVersion,
5913
+ usesLocalizations: _zod.z.boolean(),
5914
+ wasPublishedWithLocalizations: _zod.z.boolean(),
5915
+ tokenCount: _zod.z.number(),
5916
+ assetCount: _zod.z.number()
5872
5917
  });
5873
5918
 
5874
5919
  // src/dsm/storybook-entry.ts
@@ -5929,51 +5974,6 @@ var VersionCreationJob = _zod.z.object({
5929
5974
  errorMessage: nullishToOptional(_zod.z.string())
5930
5975
  });
5931
5976
 
5932
- // src/dsm/views/column.ts
5933
-
5934
- var ElementViewBaseColumnType = _zod.z.enum(["Name", "Description", "Value", "UpdatedAt"]);
5935
- var ElementViewColumnType = _zod.z.union([
5936
- _zod.z.literal("BaseProperty"),
5937
- _zod.z.literal("PropertyDefinition"),
5938
- _zod.z.literal("Theme")
5939
- ]);
5940
- var ElementViewColumnSharedAttributes = _zod.z.object({
5941
- id: _zod.z.string(),
5942
- persistentId: _zod.z.string(),
5943
- elementDataViewId: _zod.z.string(),
5944
- sortPosition: _zod.z.number(),
5945
- width: _zod.z.number()
5946
- });
5947
- var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
5948
- type: _zod.z.literal("BaseProperty"),
5949
- basePropertyType: ElementViewBaseColumnType
5950
- });
5951
- var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
5952
- type: _zod.z.literal("PropertyDefinition"),
5953
- propertyDefinitionId: _zod.z.string()
5954
- });
5955
- var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
5956
- type: _zod.z.literal("Theme"),
5957
- themeId: _zod.z.string()
5958
- });
5959
- var ElementViewColumn = _zod.z.discriminatedUnion("type", [
5960
- ElementViewBasePropertyColumn,
5961
- ElementViewPropertyDefinitionColumn,
5962
- ElementViewThemeColumn
5963
- ]);
5964
-
5965
- // src/dsm/views/view.ts
5966
-
5967
- var ElementView = _zod.z.object({
5968
- id: _zod.z.string(),
5969
- persistentId: _zod.z.string(),
5970
- designSystemVersionId: _zod.z.string(),
5971
- name: _zod.z.string(),
5972
- description: _zod.z.string(),
5973
- targetElementType: ElementPropertyTargetType,
5974
- isDefault: _zod.z.boolean()
5975
- });
5976
-
5977
5977
  // src/export/export-destinations.ts
5978
5978
  var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
5979
5979
  var BITBUCKET_MAX_LENGTH = 64;