@supernova-studio/model 0.7.1 → 0.9.0

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.mjs CHANGED
@@ -528,11 +528,11 @@ var ShallowDesignElement = z27.object({
528
528
  brandPersistentId: z27.string().optional(),
529
529
  parentPersistentId: z27.string().optional(),
530
530
  shortPersistentId: z27.string().optional(),
531
+ childType: DesignElementType.optional(),
531
532
  sortOrder: z27.number()
532
533
  });
533
534
  var DesignElement = ShallowDesignElement.extend({
534
535
  meta: ObjectMeta,
535
- childType: DesignElementType.optional(),
536
536
  slug: z27.string().optional(),
537
537
  userSlug: z27.string().optional(),
538
538
  createdAt: z27.date(),
@@ -541,6 +541,9 @@ var DesignElement = ShallowDesignElement.extend({
541
541
  data: z27.record(z27.any()),
542
542
  origin: z27.record(z27.any()).optional()
543
543
  });
544
+ var HierarchicalElements = DesignTokenType.or(
545
+ z27.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
546
+ );
544
547
 
545
548
  // src/dsm/properties/property-definition.ts
546
549
  import { z as z28 } from "zod";
@@ -771,6 +774,11 @@ var PageBlockCustomBlockPropertyValue = z32.object({
771
774
  // .or(PageBlockCustomBlockPropertyImageValue),
772
775
  });
773
776
  var PageBlockFigmaFrameProperties = z32.object({
777
+ color: nullishToOptional(
778
+ z32.object({
779
+ value: z32.string()
780
+ })
781
+ ),
774
782
  alignment: PageBlockTilesAlignment,
775
783
  layout: PageBlockTilesLayout,
776
784
  backgroundColor: nullishToOptional(ColorTokenInlineData),
@@ -874,6 +882,8 @@ var PageBlockLinkType = z33.enum(["DocumentationItem", "PageHeading", "Url"]);
874
882
  var PageBlockImageType = z33.enum(["Upload", "Asset", "FigmaFrame"]);
875
883
  var PageBlockImageAlignment = z33.enum(["Left", "Center", "Stretch"]);
876
884
  var PageBlockTableCellAlignment = z33.enum(["Left", "Center", "Right"]);
885
+ var PageBlockPreviewContainerSize = z33.enum(["Centered", "NaturalHeight"]);
886
+ var PageBlockThemeDisplayMode = z33.enum(["Split", "Override"]);
877
887
  var PageBlockAppearanceV2 = z33.object({
878
888
  itemBackgroundColor: ColorValue.optional(),
879
889
  numberOfColumns: z33.number().optional()
@@ -907,18 +917,27 @@ var PageBlockItemImageReference = z33.object({
907
917
  size: Size.optional(),
908
918
  figmaFile: z33.object({
909
919
  sourceId: z33.string(),
910
- frameId: z33.string()
920
+ frameId: z33.string(),
921
+ frameReferenceId: z33.string(),
922
+ origin: z33.object({
923
+ title: z33.string().optional(),
924
+ sourceFileName: z33.string().optional()
925
+ })
911
926
  }).optional()
912
927
  });
913
928
  var PageBlockItemAssetValue = z33.object({
914
929
  selectedPropertyIds: z33.array(z33.string()).optional(),
915
930
  showSearch: z33.boolean().optional(),
916
- previewContainerSize: z33.enum(["Centered", "NaturalHeight"]).optional(),
931
+ previewContainerSize: PageBlockPreviewContainerSize.optional(),
917
932
  backgroundColor: z33.string().optional(),
918
933
  value: z33.array(
919
934
  z33.object({
920
935
  entityId: z33.string(),
921
- entityType: z33.enum(["Asset", "AssetGroup"])
936
+ entityType: z33.enum(["Asset", "AssetGroup"]),
937
+ entityMeta: z33.object({
938
+ title: z33.string().optional(),
939
+ description: z33.string().optional()
940
+ }).optional()
922
941
  })
923
942
  )
924
943
  });
@@ -937,6 +956,7 @@ var PageBlockItemSandboxValue = z33.object({
937
956
  showCode: z33.boolean().optional(),
938
957
  backgroundColor: z33.string().optional(),
939
958
  alignPreview: z33.enum(["Left", "Center"]).optional(),
959
+ previewHeight: z33.number().optional(),
940
960
  value: z33.string()
941
961
  });
942
962
  var PageBlockItemColorValue = z33.record(z33.any());
@@ -995,11 +1015,14 @@ var PageBlockItemTextValue = z33.object({
995
1015
  var PageBlockItemTokenValue = z33.object({
996
1016
  selectedPropertyIds: z33.array(z33.string()).optional(),
997
1017
  selectedThemeIds: z33.array(z33.string()).optional(),
998
- themeDisplayMode: z33.enum(["Split", "Override"]).optional(),
1018
+ themeDisplayMode: PageBlockThemeDisplayMode.optional(),
999
1019
  value: z33.array(
1000
1020
  z33.object({
1001
1021
  entityId: z33.string(),
1002
- entityType: z33.enum(["Token", "TokenGroup"])
1022
+ entityType: z33.enum(["Token", "TokenGroup"]),
1023
+ entityMeta: z33.object({
1024
+ showNestedGroups: z33.boolean().optional()
1025
+ }).optional()
1003
1026
  })
1004
1027
  )
1005
1028
  });
@@ -1024,11 +1047,12 @@ var PageBlockItemTableMultiRichTextNode = z33.object({
1024
1047
  });
1025
1048
  var PageBlockItemTableImageNode = z33.object({
1026
1049
  type: z33.literal("Image"),
1050
+ caption: PageBlockItemImageValue.shape.caption,
1027
1051
  value: PageBlockItemImageValue.shape.value
1028
1052
  });
1029
1053
  var PageBlockItemTableNode = z33.discriminatedUnion("type", [
1030
1054
  PageBlockItemTableRichTextNode,
1031
- PageBlockItemTableMultiRichTextNode,
1055
+ // PageBlockItemTableMultiRichTextNode,
1032
1056
  PageBlockItemTableImageNode
1033
1057
  ]);
1034
1058
  var PageBlockItemTableCell = z33.object({
@@ -2303,15 +2327,51 @@ var UserInvite = z92.object({
2303
2327
  var UserInvites = z92.array(UserInvite).max(MAX_MEMBERS_COUNT);
2304
2328
 
2305
2329
  // src/workspace/workspace-context.ts
2330
+ import { z as z94 } from "zod";
2331
+
2332
+ // src/workspace/workspace.ts
2306
2333
  import { z as z93 } from "zod";
2307
- var WorkspaceContext = z93.object({
2308
- workspaceId: z93.string(),
2334
+ var WorkspaceIpWhitelistEntry = z93.object({
2335
+ isEnabled: z93.boolean(),
2336
+ name: z93.string(),
2337
+ range: z93.string()
2338
+ });
2339
+ var WorkspaceIpSettings = z93.object({
2340
+ isEnabledForCloud: z93.boolean(),
2341
+ isEnabledForDocs: z93.boolean(),
2342
+ entries: z93.array(WorkspaceIpWhitelistEntry)
2343
+ }).nullish();
2344
+ var WorkspaceProfile = z93.object({
2345
+ name: z93.string(),
2346
+ handle: z93.string(),
2347
+ color: z93.string(),
2348
+ avatar: z93.string().optional(),
2349
+ billingDetails: BillingDetails.optional()
2350
+ });
2351
+ var Workspace = z93.object({
2352
+ id: z93.string(),
2353
+ profile: WorkspaceProfile,
2354
+ subscription: Subscription,
2355
+ ipWhitelist: WorkspaceIpSettings,
2356
+ sso: SsoProvider.nullish(),
2357
+ npmRegistrySettings: z93.unknown().optional(),
2358
+ designSystems: z93.array(DesignSystem).nullish()
2359
+ });
2360
+ var WorkspaceWithDesignSystems = z93.object({
2361
+ workspace: Workspace,
2362
+ designSystems: z93.array(DesignSystem)
2363
+ });
2364
+
2365
+ // src/workspace/workspace-context.ts
2366
+ var WorkspaceContext = z94.object({
2367
+ workspaceId: z94.string(),
2309
2368
  product: ProductCodeSchema,
2310
- publicDesignSystem: z93.boolean().optional()
2369
+ ipWhitelist: WorkspaceIpSettings,
2370
+ publicDesignSystem: z94.boolean().optional()
2311
2371
  });
2312
2372
 
2313
2373
  // src/workspace/workspace-create.ts
2314
- import { z as z94 } from "zod";
2374
+ import { z as z95 } from "zod";
2315
2375
 
2316
2376
  // src/utils/validation.ts
2317
2377
  var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
@@ -2321,76 +2381,43 @@ var WORKSPACE_NAME_MIN_LENGTH = 2;
2321
2381
  var WORKSPACE_NAME_MAX_LENGTH = 64;
2322
2382
  var HANDLE_MIN_LENGTH = 2;
2323
2383
  var HANDLE_MAX_LENGTH = 64;
2324
- var CreateWorkspaceInput = z94.object({
2325
- name: z94.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
2384
+ var CreateWorkspaceInput = z95.object({
2385
+ name: z95.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
2326
2386
  product: ProductCodeSchema,
2327
- priceId: z94.string(),
2328
- billingEmail: z94.string().email().optional(),
2329
- handle: z94.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
2387
+ priceId: z95.string(),
2388
+ billingEmail: z95.string().email().optional(),
2389
+ handle: z95.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
2330
2390
  invites: UserInvites.optional(),
2331
- promoCode: z94.string().optional()
2391
+ promoCode: z95.string().optional()
2332
2392
  });
2333
2393
 
2334
2394
  // src/workspace/workspace-invitations.ts
2335
- import { z as z95 } from "zod";
2336
- var WorkspaceInvitation = z95.object({
2337
- id: z95.string(),
2338
- email: z95.string().email(),
2339
- createdAt: z95.date(),
2340
- resentAt: z95.date().nullish(),
2341
- role: z95.nativeEnum(WorkspaceRole),
2342
- workspaceId: z95.string(),
2343
- invitedBy: z95.string()
2344
- });
2345
-
2346
- // src/workspace/workspace-membership.ts
2347
2395
  import { z as z96 } from "zod";
2348
- var WorkspaceMembership = z96.object({
2396
+ var WorkspaceInvitation = z96.object({
2349
2397
  id: z96.string(),
2350
- userId: z96.string(),
2398
+ email: z96.string().email(),
2399
+ createdAt: z96.date(),
2400
+ resentAt: z96.date().nullish(),
2401
+ role: z96.nativeEnum(WorkspaceRole),
2351
2402
  workspaceId: z96.string(),
2352
- workspaceRole: z96.nativeEnum(WorkspaceRole)
2353
- });
2354
- var UpdateMembershipRolesInput = z96.object({
2355
- members: z96.array(
2356
- z96.object({
2357
- userId: z96.string(),
2358
- role: z96.nativeEnum(WorkspaceRole)
2359
- })
2360
- )
2403
+ invitedBy: z96.string()
2361
2404
  });
2362
2405
 
2363
- // src/workspace/workspace.ts
2406
+ // src/workspace/workspace-membership.ts
2364
2407
  import { z as z97 } from "zod";
2365
- var WorkspaceIpWhitelistEntry = z97.object({
2366
- isEnabled: z97.boolean(),
2367
- name: z97.string(),
2368
- range: z97.string()
2369
- });
2370
- var WorkspaceIpSettings = z97.object({
2371
- isEnabledForCloud: z97.boolean(),
2372
- isEnabledForDocs: z97.boolean(),
2373
- entries: z97.array(WorkspaceIpWhitelistEntry)
2374
- }).nullish();
2375
- var WorkspaceProfile = z97.object({
2376
- name: z97.string(),
2377
- handle: z97.string(),
2378
- color: z97.string(),
2379
- avatar: z97.string().optional(),
2380
- billingDetails: BillingDetails.optional()
2381
- });
2382
- var Workspace = z97.object({
2408
+ var WorkspaceMembership = z97.object({
2383
2409
  id: z97.string(),
2384
- profile: WorkspaceProfile,
2385
- subscription: Subscription,
2386
- ipWhitelist: WorkspaceIpSettings,
2387
- sso: SsoProvider.nullish(),
2388
- npmRegistrySettings: z97.unknown().optional(),
2389
- designSystems: z97.array(DesignSystem).nullish()
2390
- });
2391
- var WorkspaceWithDesignSystems = z97.object({
2392
- workspace: Workspace,
2393
- designSystems: z97.array(DesignSystem)
2410
+ userId: z97.string(),
2411
+ workspaceId: z97.string(),
2412
+ workspaceRole: z97.nativeEnum(WorkspaceRole)
2413
+ });
2414
+ var UpdateMembershipRolesInput = z97.object({
2415
+ members: z97.array(
2416
+ z97.object({
2417
+ userId: z97.string(),
2418
+ role: z97.nativeEnum(WorkspaceRole)
2419
+ })
2420
+ )
2394
2421
  });
2395
2422
 
2396
2423
  // src/dsm/design-system.ts
@@ -3052,6 +3079,7 @@ export {
3052
3079
  GradientType,
3053
3080
  HANDLE_MAX_LENGTH,
3054
3081
  HANDLE_MIN_LENGTH,
3082
+ HierarchicalElements,
3055
3083
  ImageImportModel,
3056
3084
  ImageImportModelType,
3057
3085
  ImportFunctionInput,
@@ -3174,6 +3202,7 @@ export {
3174
3202
  PageBlockLinkPreview,
3175
3203
  PageBlockLinkType,
3176
3204
  PageBlockLinkV2,
3205
+ PageBlockPreviewContainerSize,
3177
3206
  PageBlockRenderCodeProperties,
3178
3207
  PageBlockShortcut,
3179
3208
  PageBlockTableCellAlignment,
@@ -3184,6 +3213,7 @@ export {
3184
3213
  PageBlockTextSpanAttribute,
3185
3214
  PageBlockTextSpanAttributeType,
3186
3215
  PageBlockTheme,
3216
+ PageBlockThemeDisplayMode,
3187
3217
  PageBlockThemeType,
3188
3218
  PageBlockTilesAlignment,
3189
3219
  PageBlockTilesLayout,