@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.js CHANGED
@@ -456,16 +456,6 @@ function isImportedAsset(asset) {
456
456
  return !!asset.originKey;
457
457
  }
458
458
 
459
- // src/dsm/brand.ts
460
-
461
- var Brand = _zod.z.object({
462
- id: _zod.z.string(),
463
- designSystemVersionId: _zod.z.string(),
464
- persistentId: _zod.z.string(),
465
- name: _zod.z.string(),
466
- description: _zod.z.string()
467
- });
468
-
469
459
  // src/dsm/components/asset-rendering.ts
470
460
 
471
461
 
@@ -3770,34 +3760,6 @@ var RenderedAssetFile = _zod.z.object({
3770
3760
  settings: AssetRenderConfiguration
3771
3761
  });
3772
3762
 
3773
- // src/dsm/design-system.ts
3774
-
3775
- var DesignSystemAccessMode = _zod.z.enum(["Open", "InviteOnly"]);
3776
- var DesignSystemSwitcher = _zod.z.object({
3777
- isEnabled: _zod.z.boolean(),
3778
- designSystemIds: _zod.z.array(_zod.z.string())
3779
- });
3780
- var DesignSystem = _zod.z.object({
3781
- id: _zod.z.string(),
3782
- workspaceId: _zod.z.string(),
3783
- name: _zod.z.string(),
3784
- description: _zod.z.string(),
3785
- docExporterId: nullishToOptional(_zod.z.string()),
3786
- docSlug: _zod.z.string(),
3787
- docUserSlug: nullishToOptional(_zod.z.string()),
3788
- docSlugDeprecated: _zod.z.string(),
3789
- isPublic: _zod.z.boolean(),
3790
- isMultibrand: _zod.z.boolean(),
3791
- docViewUrl: nullishToOptional(_zod.z.string()),
3792
- basePrefixes: _zod.z.array(_zod.z.string()),
3793
- designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
3794
- isApprovalFeatureEnabled: _zod.z.boolean(),
3795
- approvalRequiredForPublishing: _zod.z.boolean(),
3796
- accessMode: DesignSystemAccessMode,
3797
- createdAt: _zod.z.coerce.date(),
3798
- updatedAt: _zod.z.coerce.date()
3799
- });
3800
-
3801
3763
  // src/dsm/documentation/approvals/approval-state.ts
3802
3764
 
3803
3765
  var DocumentationPageApprovalState = _zod.z.enum(["ReadyForReview", "ChangesRequested", "Approved"]);
@@ -4028,6 +3990,98 @@ function pickLatestGroupSnapshots(snapshots) {
4028
3990
  return pickLatestSnapshots(snapshots, (s) => s.group.id);
4029
3991
  }
4030
3992
 
3993
+ // src/dsm/membership/design-system-membership.ts
3994
+
3995
+ var DesignSystemMembership = _zod.z.object({
3996
+ id: _zod.z.string(),
3997
+ userId: _zod.z.string(),
3998
+ designSystemId: _zod.z.string(),
3999
+ workspaceMembershipId: _zod.z.string()
4000
+ });
4001
+
4002
+ // src/dsm/views/column.ts
4003
+
4004
+ var ElementViewBaseColumnType = _zod.z.enum(["Name", "Description", "Value", "UpdatedAt"]);
4005
+ var ElementViewColumnType = _zod.z.union([
4006
+ _zod.z.literal("BaseProperty"),
4007
+ _zod.z.literal("PropertyDefinition"),
4008
+ _zod.z.literal("Theme")
4009
+ ]);
4010
+ var ElementViewColumnSharedAttributes = _zod.z.object({
4011
+ id: _zod.z.string(),
4012
+ persistentId: _zod.z.string(),
4013
+ elementDataViewId: _zod.z.string(),
4014
+ sortPosition: _zod.z.number(),
4015
+ width: _zod.z.number()
4016
+ });
4017
+ var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
4018
+ type: _zod.z.literal("BaseProperty"),
4019
+ basePropertyType: ElementViewBaseColumnType
4020
+ });
4021
+ var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
4022
+ type: _zod.z.literal("PropertyDefinition"),
4023
+ propertyDefinitionId: _zod.z.string()
4024
+ });
4025
+ var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
4026
+ type: _zod.z.literal("Theme"),
4027
+ themeId: _zod.z.string()
4028
+ });
4029
+ var ElementViewColumn = _zod.z.discriminatedUnion("type", [
4030
+ ElementViewBasePropertyColumn,
4031
+ ElementViewPropertyDefinitionColumn,
4032
+ ElementViewThemeColumn
4033
+ ]);
4034
+
4035
+ // src/dsm/views/view.ts
4036
+
4037
+ var ElementView = _zod.z.object({
4038
+ id: _zod.z.string(),
4039
+ persistentId: _zod.z.string(),
4040
+ designSystemVersionId: _zod.z.string(),
4041
+ name: _zod.z.string(),
4042
+ description: _zod.z.string(),
4043
+ targetElementType: ElementPropertyTargetType,
4044
+ isDefault: _zod.z.boolean()
4045
+ });
4046
+
4047
+ // src/dsm/brand.ts
4048
+
4049
+ var Brand = _zod.z.object({
4050
+ id: _zod.z.string(),
4051
+ designSystemVersionId: _zod.z.string(),
4052
+ persistentId: _zod.z.string(),
4053
+ name: _zod.z.string(),
4054
+ description: _zod.z.string()
4055
+ });
4056
+
4057
+ // src/dsm/design-system.ts
4058
+
4059
+ var DesignSystemAccessMode = _zod.z.enum(["Open", "InviteOnly"]);
4060
+ var DesignSystemSwitcher = _zod.z.object({
4061
+ isEnabled: _zod.z.boolean(),
4062
+ designSystemIds: _zod.z.array(_zod.z.string())
4063
+ });
4064
+ var DesignSystem = _zod.z.object({
4065
+ id: _zod.z.string(),
4066
+ workspaceId: _zod.z.string(),
4067
+ name: _zod.z.string(),
4068
+ description: _zod.z.string(),
4069
+ docExporterId: nullishToOptional(_zod.z.string()),
4070
+ docSlug: _zod.z.string(),
4071
+ docUserSlug: nullishToOptional(_zod.z.string()),
4072
+ docSlugDeprecated: _zod.z.string(),
4073
+ isPublic: _zod.z.boolean(),
4074
+ isMultibrand: _zod.z.boolean(),
4075
+ docViewUrl: nullishToOptional(_zod.z.string()),
4076
+ basePrefixes: _zod.z.array(_zod.z.string()),
4077
+ designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
4078
+ isApprovalFeatureEnabled: _zod.z.boolean(),
4079
+ approvalRequiredForPublishing: _zod.z.boolean(),
4080
+ accessMode: DesignSystemAccessMode,
4081
+ createdAt: _zod.z.coerce.date(),
4082
+ updatedAt: _zod.z.coerce.date()
4083
+ });
4084
+
4031
4085
  // src/dsm/exporter-property-values-collection.ts
4032
4086
 
4033
4087
  var ExporterPropertyImageValue = _zod.z.object({
@@ -4053,13 +4107,26 @@ var ExporterPropertyValuesCollection = _zod.z.object({
4053
4107
  values: _zod.z.array(ExporterPropertyValue)
4054
4108
  });
4055
4109
 
4056
- // src/dsm/membership/design-system-membership.ts
4110
+ // src/dsm/published-doc-page.ts
4057
4111
 
4058
- var DesignSystemMembership = _zod.z.object({
4112
+ var SHORT_PERSISTENT_ID_LENGTH = 8;
4113
+ function tryParseShortPersistentId(url = "/") {
4114
+ const lastUrlPart = url.split("/").pop() || "";
4115
+ const shortPersistentId = _optionalChain([lastUrlPart, 'access', _5 => _5.split, 'call', _6 => _6("-"), 'access', _7 => _7.pop, 'call', _8 => _8(), 'optionalAccess', _9 => _9.replaceAll, 'call', _10 => _10(".html", "")]) || null;
4116
+ return _optionalChain([shortPersistentId, 'optionalAccess', _11 => _11.length]) === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
4117
+ }
4118
+ var PublishedDocPage = _zod.z.object({
4059
4119
  id: _zod.z.string(),
4060
- userId: _zod.z.string(),
4061
- designSystemId: _zod.z.string(),
4062
- workspaceMembershipId: _zod.z.string()
4120
+ publishedDocId: _zod.z.string(),
4121
+ pageShortPersistentId: _zod.z.string(),
4122
+ pathV1: _zod.z.string(),
4123
+ pathV2: _zod.z.string(),
4124
+ storagePath: _zod.z.string(),
4125
+ locale: _zod.z.string().optional(),
4126
+ isPrivate: _zod.z.boolean(),
4127
+ isHidden: _zod.z.boolean(),
4128
+ createdAt: _zod.z.coerce.date(),
4129
+ updatedAt: _zod.z.coerce.date()
4063
4130
  });
4064
4131
 
4065
4132
  // src/dsm/published-doc.ts
@@ -4087,28 +4154,6 @@ var PublishedDoc = _zod.z.object({
4087
4154
  assetCount: _zod.z.number()
4088
4155
  });
4089
4156
 
4090
- // src/dsm/published-doc-page.ts
4091
-
4092
- var SHORT_PERSISTENT_ID_LENGTH = 8;
4093
- function tryParseShortPersistentId(url = "/") {
4094
- const lastUrlPart = url.split("/").pop() || "";
4095
- const shortPersistentId = _optionalChain([lastUrlPart, 'access', _5 => _5.split, 'call', _6 => _6("-"), 'access', _7 => _7.pop, 'call', _8 => _8(), 'optionalAccess', _9 => _9.replaceAll, 'call', _10 => _10(".html", "")]) || null;
4096
- return _optionalChain([shortPersistentId, 'optionalAccess', _11 => _11.length]) === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
4097
- }
4098
- var PublishedDocPage = _zod.z.object({
4099
- id: _zod.z.string(),
4100
- publishedDocId: _zod.z.string(),
4101
- pageShortPersistentId: _zod.z.string(),
4102
- pathV1: _zod.z.string(),
4103
- pathV2: _zod.z.string(),
4104
- storagePath: _zod.z.string(),
4105
- locale: _zod.z.string().optional(),
4106
- isPrivate: _zod.z.boolean(),
4107
- isHidden: _zod.z.boolean(),
4108
- createdAt: _zod.z.coerce.date(),
4109
- updatedAt: _zod.z.coerce.date()
4110
- });
4111
-
4112
4157
  // src/dsm/version.ts
4113
4158
 
4114
4159
  var DesignSystemVersion = _zod.z.object({
@@ -4133,51 +4178,6 @@ var VersionCreationJob = _zod.z.object({
4133
4178
  errorMessage: nullishToOptional(_zod.z.string())
4134
4179
  });
4135
4180
 
4136
- // src/dsm/views/column.ts
4137
-
4138
- var ElementViewBaseColumnType = _zod.z.enum(["Name", "Description", "Value", "UpdatedAt"]);
4139
- var ElementViewColumnType = _zod.z.union([
4140
- _zod.z.literal("BaseProperty"),
4141
- _zod.z.literal("PropertyDefinition"),
4142
- _zod.z.literal("Theme")
4143
- ]);
4144
- var ElementViewColumnSharedAttributes = _zod.z.object({
4145
- id: _zod.z.string(),
4146
- persistentId: _zod.z.string(),
4147
- elementDataViewId: _zod.z.string(),
4148
- sortPosition: _zod.z.number(),
4149
- width: _zod.z.number()
4150
- });
4151
- var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
4152
- type: _zod.z.literal("BaseProperty"),
4153
- basePropertyType: ElementViewBaseColumnType
4154
- });
4155
- var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
4156
- type: _zod.z.literal("PropertyDefinition"),
4157
- propertyDefinitionId: _zod.z.string()
4158
- });
4159
- var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
4160
- type: _zod.z.literal("Theme"),
4161
- themeId: _zod.z.string()
4162
- });
4163
- var ElementViewColumn = _zod.z.discriminatedUnion("type", [
4164
- ElementViewBasePropertyColumn,
4165
- ElementViewPropertyDefinitionColumn,
4166
- ElementViewThemeColumn
4167
- ]);
4168
-
4169
- // src/dsm/views/view.ts
4170
-
4171
- var ElementView = _zod.z.object({
4172
- id: _zod.z.string(),
4173
- persistentId: _zod.z.string(),
4174
- designSystemVersionId: _zod.z.string(),
4175
- name: _zod.z.string(),
4176
- description: _zod.z.string(),
4177
- targetElementType: ElementPropertyTargetType,
4178
- isDefault: _zod.z.boolean()
4179
- });
4180
-
4181
4181
  // src/export/export-destinations.ts
4182
4182
  var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
4183
4183
  var BITBUCKET_MAX_LENGTH = 64;