@supernova-studio/client 0.23.0 → 0.25.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
@@ -2,8 +2,10 @@
2
2
  import { z } from "zod";
3
3
  import { z as z2 } from "zod";
4
4
  import { z as z3 } from "zod";
5
- import { z as z4 } from "zod";
6
5
  import { z as z5 } from "zod";
6
+ import {
7
+ z as z4
8
+ } from "zod";
7
9
  import { z as z6 } from "zod";
8
10
  import { z as z7 } from "zod";
9
11
  import { z as z8 } from "zod";
@@ -13,28 +15,26 @@ import { z as z11 } from "zod";
13
15
  import { z as z12 } from "zod";
14
16
  import { z as z13 } from "zod";
15
17
  import { z as z14 } from "zod";
16
- import { z as z17 } from "zod";
17
18
  import { z as z15 } from "zod";
19
+ import { z as z18 } from "zod";
18
20
  import { z as z16 } from "zod";
21
+ import { z as z17 } from "zod";
19
22
  import { z as z87 } from "zod";
20
- import { z as z18 } from "zod";
21
- import { z as z20 } from "zod";
22
23
  import { z as z19 } from "zod";
23
24
  import { z as z21 } from "zod";
25
+ import { z as z20 } from "zod";
24
26
  import { z as z22 } from "zod";
25
- import { z as z25 } from "zod";
26
- import { z as z24 } from "zod";
27
27
  import { z as z23 } from "zod";
28
28
  import { z as z26 } from "zod";
29
- import { z as z33 } from "zod";
29
+ import { z as z25 } from "zod";
30
+ import { z as z24 } from "zod";
30
31
  import { z as z27 } from "zod";
32
+ import { z as z33 } from "zod";
31
33
  import { z as z28 } from "zod";
32
34
  import { z as z29 } from "zod";
33
35
  import { z as z30 } from "zod";
34
36
  import { z as z31 } from "zod";
35
- import {
36
- z as z32
37
- } from "zod";
37
+ import { z as z32 } from "zod";
38
38
  import { z as z34 } from "zod";
39
39
  import { z as z40 } from "zod";
40
40
  import { z as z39 } from "zod";
@@ -159,41 +159,59 @@ var PostStripeCheckoutOutputSchema = z3.object({
159
159
  id: z3.string(),
160
160
  url: z3.string().nullish()
161
161
  });
162
- var Customer = z4.object({
163
- id: z4.string()
164
- });
165
- var Address = z4.object({
166
- street1: z4.string().optional(),
167
- street2: z4.string().optional(),
168
- city: z4.string().optional(),
169
- postal: z4.string().optional(),
170
- country: z4.string().optional(),
171
- state: z4.string().optional()
172
- });
173
- var BillingDetails = z4.object({
174
- address: Address.optional(),
175
- email: z4.string().optional(),
176
- companyName: z4.string().optional(),
177
- companyId: z4.string().optional(),
178
- notes: z4.string().optional(),
179
- vat: z4.string().optional(),
180
- poNumber: z4.string().optional()
181
- });
182
- var featureLimitedSchema = z5.object({
183
- max: z5.number(),
184
- errorMessage: z5.string(),
185
- errorReason: z5.string()
186
- });
187
- var featureToggleSchema = z5.object({
188
- enabled: z5.boolean(),
189
- errorMessage: z5.string(),
190
- errorReason: z5.string()
162
+ function zodCreateInputOmit() {
163
+ return {
164
+ id: true,
165
+ createdAt: true,
166
+ updatedAt: true
167
+ };
168
+ }
169
+ function zodUpdateInputOmit() {
170
+ return {
171
+ id: true,
172
+ createdAt: true,
173
+ updatedAt: true,
174
+ persistentId: true
175
+ };
176
+ }
177
+ function nullishToOptional(type) {
178
+ return type.nullish().transform((t) => t ?? void 0);
179
+ }
180
+ var Customer = z5.object({
181
+ id: z5.string()
182
+ });
183
+ var Address = z5.object({
184
+ street1: nullishToOptional(z5.string()),
185
+ street2: nullishToOptional(z5.string()),
186
+ city: nullishToOptional(z5.string()),
187
+ postal: nullishToOptional(z5.string()),
188
+ country: nullishToOptional(z5.string()),
189
+ state: nullishToOptional(z5.string())
190
+ });
191
+ var BillingDetails = z5.object({
192
+ address: nullishToOptional(Address),
193
+ email: nullishToOptional(z5.string()),
194
+ companyName: nullishToOptional(z5.string()),
195
+ companyId: nullishToOptional(z5.string()),
196
+ notes: nullishToOptional(z5.string()),
197
+ vat: nullishToOptional(z5.string()),
198
+ poNumber: nullishToOptional(z5.string())
199
+ });
200
+ var featureLimitedSchema = z6.object({
201
+ max: z6.number(),
202
+ errorMessage: z6.string(),
203
+ errorReason: z6.string()
204
+ });
205
+ var featureToggleSchema = z6.object({
206
+ enabled: z6.boolean(),
207
+ errorMessage: z6.string(),
208
+ errorReason: z6.string()
191
209
  });
192
210
  var featureWithImportJobsSchema = featureLimitedSchema.extend({
193
- noImportJobsErrorMessage: z5.string(),
194
- noImportJobsErrorReason: z5.string()
211
+ noImportJobsErrorMessage: z6.string(),
212
+ noImportJobsErrorReason: z6.string()
195
213
  });
196
- var FeaturesSummary = z5.object({
214
+ var FeaturesSummary = z6.object({
197
215
  designSystems: featureLimitedSchema,
198
216
  designSystemSources: featureWithImportJobsSchema,
199
217
  designSystemVersions: featureLimitedSchema,
@@ -212,64 +230,64 @@ var FeaturesSummary = z5.object({
212
230
  workspaceViewers: featureLimitedSchema,
213
231
  customDocumentationExporter: featureToggleSchema
214
232
  });
215
- var InvoiceSchema = z6.object({
216
- id: z6.string(),
217
- number: z6.string(),
218
- amount_due: z6.number(),
219
- date: z6.coerce.date(),
220
- hostedUrl: z6.string().url(),
233
+ var InvoiceSchema = z7.object({
234
+ id: z7.string(),
235
+ number: z7.string(),
236
+ amount_due: z7.number(),
237
+ date: z7.coerce.date(),
238
+ hostedUrl: z7.string().url(),
221
239
  card: CardSchema.nullish()
222
240
  });
223
- var PeriodSchema = z6.object({
224
- start: z6.coerce.date(),
225
- end: z6.coerce.date()
241
+ var PeriodSchema = z7.object({
242
+ start: z7.coerce.date(),
243
+ end: z7.coerce.date()
226
244
  });
227
- var InvoiceLineSchema = z6.object({
228
- amount: z6.number(),
245
+ var InvoiceLineSchema = z7.object({
246
+ amount: z7.number(),
229
247
  period: PeriodSchema,
230
- proration: z6.boolean(),
231
- description: z6.string(),
232
- type: z6.string()
248
+ proration: z7.boolean(),
249
+ description: z7.string(),
250
+ type: z7.string()
233
251
  });
234
- var InvoiceCouponSchema = z6.object({
235
- amount_off: z6.number(),
236
- percent_off: z6.number(),
237
- name: z6.string()
252
+ var InvoiceCouponSchema = z7.object({
253
+ amount_off: z7.number(),
254
+ percent_off: z7.number(),
255
+ name: z7.string()
238
256
  });
239
- var PostStripePortalUpdateSessionBodyInputSchema = z7.object({
240
- priceId: z7.string(),
241
- numberOfSeats: z7.number().int()
257
+ var PostStripePortalUpdateSessionBodyInputSchema = z8.object({
258
+ priceId: z8.string(),
259
+ numberOfSeats: z8.number().int()
242
260
  });
243
- var PostStripePortalSessionBodyInputSchema = z7.object({
244
- returnUrl: z7.string().url(),
261
+ var PostStripePortalSessionBodyInputSchema = z8.object({
262
+ returnUrl: z8.string().url(),
245
263
  update: PostStripePortalUpdateSessionBodyInputSchema.optional(),
246
- cancel: z7.boolean().optional()
247
- });
248
- var PostStripePortalSessionOutputSchema = z7.object({
249
- id: z7.string(),
250
- url: z7.string().nullish()
251
- });
252
- var BillingIntervalSchema = z8.enum(["daily", "monthly", "weekly", "yearly"]);
253
- var PriceSchema = z8.object({
254
- stripePriceId: z8.string(),
255
- stripeProductId: z8.string(),
256
- stripeProductName: z8.string().optional(),
257
- stripeProductDescription: z8.string().optional(),
258
- active: z8.boolean(),
259
- amount: z8.number(),
264
+ cancel: z8.boolean().optional()
265
+ });
266
+ var PostStripePortalSessionOutputSchema = z8.object({
267
+ id: z8.string(),
268
+ url: z8.string().nullish()
269
+ });
270
+ var BillingIntervalSchema = z9.enum(["daily", "monthly", "weekly", "yearly"]);
271
+ var PriceSchema = z9.object({
272
+ stripePriceId: z9.string(),
273
+ stripeProductId: z9.string(),
274
+ stripeProductName: z9.string().optional(),
275
+ stripeProductDescription: z9.string().optional(),
276
+ active: z9.boolean(),
277
+ amount: z9.number(),
260
278
  interval: BillingIntervalSchema,
261
- isPricePerCreator: z8.boolean().optional(),
262
- isTrial: z8.boolean().optional(),
263
- isHidden: z8.boolean().optional(),
264
- minimumSeats: z8.number().optional(),
265
- legacyVersion: z8.string().optional(),
266
- featuresSet: z8.string().optional(),
267
- stripeProductFeatures: z8.array(z8.string()).optional(),
268
- stripeProductAdditionalFeatures: z8.array(z8.string()).optional()
269
- });
270
- var ProductCodeSchema = z9.enum(["free", "team", "team_test", "company", "enterprise"]);
279
+ isPricePerCreator: z9.boolean().optional(),
280
+ isTrial: z9.boolean().optional(),
281
+ isHidden: z9.boolean().optional(),
282
+ minimumSeats: z9.number().optional(),
283
+ legacyVersion: z9.string().optional(),
284
+ featuresSet: z9.string().optional(),
285
+ stripeProductFeatures: z9.array(z9.string()).optional(),
286
+ stripeProductAdditionalFeatures: z9.array(z9.string()).optional()
287
+ });
288
+ var ProductCodeSchema = z10.enum(["free", "team", "team_test", "company", "enterprise"]);
271
289
  var ProductCode = ProductCodeSchema.enum;
272
- var StripeSubscriptionStatusSchema = z10.enum([
290
+ var StripeSubscriptionStatusSchema = z11.enum([
273
291
  "trialing",
274
292
  "active",
275
293
  "past_due",
@@ -279,14 +297,14 @@ var StripeSubscriptionStatusSchema = z10.enum([
279
297
  "incomplete",
280
298
  "unknown"
281
299
  ]);
282
- var InternalStatusSchema = z10.enum(["active", "suspended", "gracePeriod", "cancelled", "downgraded_to_free"]);
283
- var BillingTypeSchema = z10.enum(["Auto", "Invoice"]);
300
+ var InternalStatusSchema = z11.enum(["active", "suspended", "gracePeriod", "cancelled", "downgraded_to_free"]);
301
+ var BillingTypeSchema = z11.enum(["Auto", "Invoice"]);
284
302
  var StripeSubscriptionStatus = StripeSubscriptionStatusSchema.enum;
285
303
  var InternalStatus = InternalStatusSchema.enum;
286
304
  var BillingType = BillingTypeSchema.enum;
287
- var Subscription = z10.object({
288
- stripeSubscriptionId: z10.string().nullish(),
289
- stripeCustomerId: z10.string().nullish(),
305
+ var Subscription = z11.object({
306
+ stripeSubscriptionId: z11.string().nullish(),
307
+ stripeCustomerId: z11.string().nullish(),
290
308
  status: InternalStatusSchema.optional(),
291
309
  subscriptionStatus: StripeSubscriptionStatusSchema.optional(),
292
310
  // the stripe API official status
@@ -294,212 +312,212 @@ var Subscription = z10.object({
294
312
  // TODO: delete when create/get workspace will stop using it in the former API
295
313
  product: ProductCodeSchema,
296
314
  featuresSummary: FeaturesSummary.optional(),
297
- stripeProductDescription: z10.string().optional(),
298
- stripeProductFeatures: z10.array(z10.string()).optional(),
299
- stripeProductAdditionalFeatures: z10.array(z10.string()).optional(),
300
- stripeSubscriptionMainItemId: z10.string().optional(),
301
- planPriceId: z10.string(),
315
+ stripeProductDescription: z11.string().optional(),
316
+ stripeProductFeatures: z11.array(z11.string()).optional(),
317
+ stripeProductAdditionalFeatures: z11.array(z11.string()).optional(),
318
+ stripeSubscriptionMainItemId: z11.string().optional(),
319
+ planPriceId: z11.string(),
302
320
  planInterval: BillingIntervalSchema,
303
- isPricePerCreator: z10.boolean().optional(),
304
- legacyVersion: z10.string().optional(),
305
- seats: z10.number(),
306
- seatLimit: z10.number(),
307
- currentPeriodStart: z10.string().optional(),
308
- currentPeriodEnd: z10.string().optional(),
309
- subscriptionStatusUpdatedAt: z10.string().optional(),
310
- cancelAt: z10.string().nullish(),
321
+ isPricePerCreator: z11.boolean().optional(),
322
+ legacyVersion: z11.string().optional(),
323
+ seats: z11.number(),
324
+ seatLimit: z11.number(),
325
+ currentPeriodStart: z11.string().optional(),
326
+ currentPeriodEnd: z11.string().optional(),
327
+ subscriptionStatusUpdatedAt: z11.string().optional(),
328
+ cancelAt: z11.string().nullish(),
311
329
  card: CardSchema.optional(),
312
330
  // New
313
- amount: z10.number().nullish(),
314
- isTrial: z10.boolean().optional(),
331
+ amount: z11.number().nullish(),
332
+ isTrial: z11.boolean().optional(),
315
333
  billingType: BillingTypeSchema.optional(),
316
- daysUntilDue: z10.number().optional()
317
- });
318
- var AssetReference = z11.object({
319
- id: z11.string(),
320
- designSystemVersionId: z11.string(),
321
- assetId: z11.string(),
322
- persistentId: z11.string()
323
- });
324
- var AssetValue = z12.object({});
325
- var AssetType = z13.enum(["Image", "Font"]);
326
- var AssetScope = z13.enum(["DocumentationFrame", "ComponentThumbnail", "DesignSystem", "Documentation"]);
327
- var AssetFontProperties = z13.object({
328
- family: z13.string(),
329
- subfamily: z13.string()
330
- });
331
- var AssetProperties = z13.object({
332
- fontProperties: z13.array(AssetFontProperties)
333
- });
334
- var AssetOrigin = z13.object({
335
- originKey: z13.string()
336
- });
337
- var Asset = z13.object({
338
- id: z13.string(),
339
- designSystemId: z13.string().nullish(),
334
+ daysUntilDue: z11.number().optional()
335
+ });
336
+ var AssetReference = z12.object({
337
+ id: z12.string(),
338
+ designSystemVersionId: z12.string(),
339
+ assetId: z12.string(),
340
+ persistentId: z12.string()
341
+ });
342
+ var AssetValue = z13.object({});
343
+ var AssetType = z14.enum(["Image", "Font"]);
344
+ var AssetScope = z14.enum(["DocumentationFrame", "ComponentThumbnail", "DesignSystem", "Documentation"]);
345
+ var AssetFontProperties = z14.object({
346
+ family: z14.string(),
347
+ subfamily: z14.string()
348
+ });
349
+ var AssetProperties = z14.object({
350
+ fontProperties: z14.array(AssetFontProperties)
351
+ });
352
+ var AssetOrigin = z14.object({
353
+ originKey: z14.string()
354
+ });
355
+ var Asset = z14.object({
356
+ id: z14.string(),
357
+ designSystemId: z14.string().nullish(),
340
358
  type: AssetType,
341
- originalFileName: z13.string().nullish(),
342
- filePath: z13.string(),
359
+ originalFileName: z14.string().nullish(),
360
+ filePath: z14.string(),
343
361
  scope: AssetScope,
344
362
  properties: AssetProperties.nullish(),
345
363
  origin: AssetOrigin.optional(),
346
- originKey: z13.string().optional()
364
+ originKey: z14.string().optional()
347
365
  });
348
- var DataSourceRemoteType = z14.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
349
- var DataSourceUploadRemoteSource = z14.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
350
- var DataSourceFigmaState = z14.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
351
- var DataSourceAutoImportMode = z14.enum(["Never", "Hourly"]);
352
- var DataSourceStats = z14.object({
366
+ var DataSourceRemoteType = z15.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
367
+ var DataSourceUploadRemoteSource = z15.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
368
+ var DataSourceFigmaState = z15.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
369
+ var DataSourceAutoImportMode = z15.enum(["Never", "Hourly"]);
370
+ var DataSourceStats = z15.object({
353
371
  tokens: zeroNumberByDefault(),
354
372
  components: zeroNumberByDefault(),
355
373
  assets: zeroNumberByDefault(),
356
374
  frames: zeroNumberByDefault()
357
375
  });
358
- var DataSourceFigmaFileData = z14.object({
359
- lastUpdatedAt: z14.coerce.date()
376
+ var DataSourceFigmaFileData = z15.object({
377
+ lastUpdatedAt: z15.coerce.date()
360
378
  });
361
- var DataSourceFigmaFileVersionData = z14.object({
362
- id: z14.string(),
363
- label: z14.string().optional(),
364
- description: z14.string().optional(),
365
- createdAt: z14.coerce.date()
366
- });
367
- var DataSourceFigmaScope = z14.object({
368
- assets: z14.boolean(),
369
- components: z14.boolean(),
370
- documentationFrames: z14.boolean(),
371
- tokens: z14.boolean(),
372
- themePersistentId: z14.string().optional()
373
- });
374
- var DataSourceFigmaImportMetadata = z14.object({
379
+ var DataSourceFigmaFileVersionData = z15.object({
380
+ id: z15.string(),
381
+ label: z15.string().optional(),
382
+ description: z15.string().optional(),
383
+ createdAt: z15.coerce.date()
384
+ });
385
+ var DataSourceFigmaScope = z15.object({
386
+ assets: z15.boolean(),
387
+ components: z15.boolean(),
388
+ documentationFrames: z15.boolean(),
389
+ tokens: z15.boolean(),
390
+ themePersistentId: z15.string().optional()
391
+ });
392
+ var DataSourceFigmaImportMetadata = z15.object({
375
393
  fileData: DataSourceFigmaFileData.optional(),
376
394
  importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
377
395
  });
378
- var DataSourceFigmaRemote = z14.object({
379
- type: z14.literal(DataSourceRemoteType.Enum.Figma),
380
- fileId: z14.string(),
381
- ownerId: z14.string(),
382
- ownerName: z14.string(),
396
+ var DataSourceFigmaRemote = z15.object({
397
+ type: z15.literal(DataSourceRemoteType.Enum.Figma),
398
+ fileId: z15.string(),
399
+ ownerId: z15.string(),
400
+ ownerName: z15.string(),
383
401
  scope: DataSourceFigmaScope,
384
402
  state: DataSourceFigmaState,
385
403
  lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
386
- downloadChunkSize: z14.number().optional(),
387
- figmaRenderChunkSize: z14.number().optional()
404
+ downloadChunkSize: z15.number().optional(),
405
+ figmaRenderChunkSize: z15.number().optional()
388
406
  });
389
- var DataSourceTokenStudioRemote = z14.object({
390
- type: z14.literal(DataSourceRemoteType.Enum.TokenStudio)
407
+ var DataSourceTokenStudioRemote = z15.object({
408
+ type: z15.literal(DataSourceRemoteType.Enum.TokenStudio)
391
409
  });
392
- var DataSourceUploadImportMetadata = z14.record(z14.any());
393
- var DataSourceUploadRemote = z14.object({
394
- type: z14.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
395
- remoteId: z14.string(),
410
+ var DataSourceUploadImportMetadata = z15.record(z15.any());
411
+ var DataSourceUploadRemote = z15.object({
412
+ type: z15.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
413
+ remoteId: z15.string(),
396
414
  remoteSourceType: DataSourceUploadRemoteSource,
397
415
  lastImportMetadata: DataSourceUploadImportMetadata.optional()
398
416
  });
399
- var DataSourceRemote = z14.discriminatedUnion("type", [
417
+ var DataSourceRemote = z15.discriminatedUnion("type", [
400
418
  DataSourceFigmaRemote,
401
419
  DataSourceUploadRemote,
402
420
  DataSourceTokenStudioRemote
403
421
  ]);
404
- var DataSourceVersion = z14.object({
405
- id: z14.string(),
406
- createdAt: z14.coerce.date(),
407
- label: z14.string().nullish(),
408
- description: z14.string().nullish()
422
+ var DataSourceVersion = z15.object({
423
+ id: z15.string(),
424
+ createdAt: z15.coerce.date(),
425
+ label: z15.string().nullish(),
426
+ description: z15.string().nullish()
409
427
  });
410
428
  function zeroNumberByDefault() {
411
- return z14.number().nullish().transform((v) => v ?? 0);
429
+ return z15.number().nullish().transform((v) => v ?? 0);
412
430
  }
413
- var Entity = z15.object({
414
- id: z15.string(),
415
- createdAt: z15.coerce.date(),
416
- updatedAt: z15.coerce.date()
431
+ var Entity = z16.object({
432
+ id: z16.string(),
433
+ createdAt: z16.coerce.date(),
434
+ updatedAt: z16.coerce.date()
417
435
  });
418
- var ObjectMeta = z16.object({
419
- name: z16.string(),
420
- description: z16.string().optional()
436
+ var ObjectMeta = z17.object({
437
+ name: z17.string(),
438
+ description: z17.string().optional()
421
439
  });
422
- var ImportJobState = z17.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
423
- var ImportJobOperation = z17.enum(["Check", "Import"]);
440
+ var ImportJobState = z18.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
441
+ var ImportJobOperation = z18.enum(["Check", "Import"]);
424
442
  var ImportJob = Entity.extend({
425
- designSystemId: z17.string(),
426
- designSystemVersionId: z17.string(),
427
- sourceIds: z17.array(z17.string()),
443
+ designSystemId: z18.string(),
444
+ designSystemVersionId: z18.string(),
445
+ sourceIds: z18.array(z18.string()),
428
446
  state: ImportJobState,
429
- createdByUserId: z17.string().optional(),
430
- importContextId: z17.string(),
431
- error: z17.string().optional(),
447
+ createdByUserId: z18.string().optional(),
448
+ importContextId: z18.string(),
449
+ error: z18.string().optional(),
432
450
  sourceType: DataSourceRemoteType,
433
- importContextCleanedUp: z17.boolean()
451
+ importContextCleanedUp: z18.boolean()
434
452
  });
435
- var TokenDataAliasSchema = z18.object({
436
- aliasTo: z18.string().optional().nullable().transform((v) => v ?? void 0)
453
+ var TokenDataAliasSchema = z19.object({
454
+ aliasTo: z19.string().optional().nullable().transform((v) => v ?? void 0)
437
455
  });
438
456
  function tokenAliasOrValue(value) {
439
457
  return TokenDataAliasSchema.extend({
440
458
  value: value.optional().nullable().transform((v) => v ?? void 0)
441
459
  });
442
460
  }
443
- var DimensionUnit = z19.enum(["Pixels", "Percent", "Rem", "Ms", "Raw", "Points"]);
444
- var DimensionValue = z19.object({
461
+ var DimensionUnit = z20.enum(["Pixels", "Percent", "Rem", "Ms", "Raw", "Points"]);
462
+ var DimensionValue = z20.object({
445
463
  unit: DimensionUnit,
446
- measure: z19.number()
464
+ measure: z20.number()
447
465
  });
448
466
  var DimensionTokenData = tokenAliasOrValue(DimensionValue);
449
- var BlurType = z20.enum(["Layer", "Background"]);
450
- var BlurValue = z20.object({
467
+ var BlurType = z21.enum(["Layer", "Background"]);
468
+ var BlurValue = z21.object({
451
469
  type: BlurType,
452
470
  radius: DimensionTokenData
453
471
  });
454
472
  var BlurTokenData = tokenAliasOrValue(BlurValue);
455
- var BorderRadiusUnit = z21.enum(["Pixels", "Rem", "Percent"]);
456
- var BorderRadiusValue = z21.object({
473
+ var BorderRadiusUnit = z22.enum(["Pixels", "Rem", "Percent"]);
474
+ var BorderRadiusValue = z22.object({
457
475
  unit: BorderRadiusUnit,
458
- measure: z21.number()
476
+ measure: z22.number()
459
477
  });
460
478
  var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
461
- var BorderWidthUnit = z22.enum(["Pixels"]);
462
- var BorderWidthValue = z22.object({
479
+ var BorderWidthUnit = z23.enum(["Pixels"]);
480
+ var BorderWidthValue = z23.object({
463
481
  unit: BorderWidthUnit,
464
- measure: z22.number()
482
+ measure: z23.number()
465
483
  });
466
484
  var BorderWidthTokenData = tokenAliasOrValue(BorderWidthValue);
467
- var OpacityValue = z23.object({
468
- unit: z23.enum(["Raw", "Pixels"]),
469
- measure: z23.number()
485
+ var OpacityValue = z24.object({
486
+ unit: z24.enum(["Raw", "Pixels"]),
487
+ measure: z24.number()
470
488
  });
471
489
  var OpacityTokenData = tokenAliasOrValue(OpacityValue);
472
- var ColorValue = z24.object({
490
+ var ColorValue = z25.object({
473
491
  opacity: OpacityTokenData,
474
- color: z24.string().or(TokenDataAliasSchema)
492
+ color: z25.string().or(TokenDataAliasSchema)
475
493
  });
476
494
  var ColorTokenData = tokenAliasOrValue(ColorValue);
477
- var BorderPosition = z25.enum(["Inside", "Center", "Outside"]);
478
- var BorderStyle = z25.enum(["Dashed", "Dotted", "Solid", "Groove"]);
479
- var BorderValue = z25.object({
495
+ var BorderPosition = z26.enum(["Inside", "Center", "Outside"]);
496
+ var BorderStyle = z26.enum(["Dashed", "Dotted", "Solid", "Groove"]);
497
+ var BorderValue = z26.object({
480
498
  color: ColorTokenData,
481
499
  width: BorderWidthTokenData,
482
500
  position: BorderPosition,
483
501
  style: BorderStyle.optional()
484
502
  });
485
503
  var BorderTokenData = tokenAliasOrValue(BorderValue);
486
- var ComponentElementData = z26.object({
487
- value: z26.object({
488
- thumbnailImage: z26.object({
489
- value: z26.object({
490
- url: z26.string(),
491
- assetId: z26.string()
504
+ var ComponentElementData = z27.object({
505
+ value: z27.object({
506
+ thumbnailImage: z27.object({
507
+ value: z27.object({
508
+ url: z27.string(),
509
+ assetId: z27.string()
492
510
  })
493
511
  }),
494
- svg: z26.object({
495
- value: z26.object({
496
- url: z26.string(),
497
- assetId: z26.string()
512
+ svg: z27.object({
513
+ value: z27.object({
514
+ url: z27.string(),
515
+ assetId: z27.string()
498
516
  })
499
517
  }).optional()
500
518
  })
501
519
  });
502
- var DesignTokenType = z27.enum([
520
+ var DesignTokenType = z28.enum([
503
521
  "Color",
504
522
  "Border",
505
523
  "Gradient",
@@ -531,7 +549,7 @@ var DesignTokenType = z27.enum([
531
549
  ]);
532
550
  var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
533
551
  var DesignElementType = DesignTokenType.or(
534
- z27.enum([
552
+ z28.enum([
535
553
  "Component",
536
554
  "Theme",
537
555
  "Documentation",
@@ -543,7 +561,7 @@ var DesignElementType = DesignTokenType.or(
543
561
  "PageBlock"
544
562
  ])
545
563
  );
546
- var DesignElementCategory = z27.enum([
564
+ var DesignElementCategory = z28.enum([
547
565
  "Token",
548
566
  "Component",
549
567
  "DesignSystemComponent",
@@ -551,80 +569,80 @@ var DesignElementCategory = z27.enum([
551
569
  "Theme",
552
570
  "PageBlock"
553
571
  ]);
554
- var DesignSystemElementExportProps = z27.object({
555
- isAsset: z27.boolean().nullish().transform((v) => v ?? false),
556
- codeName: z27.string().nullish()
557
- });
558
- var ShallowDesignElement = z27.object({
559
- id: z27.string(),
560
- persistentId: z27.string(),
561
- designSystemVersionId: z27.string(),
572
+ var DesignSystemElementExportProps = z28.object({
573
+ isAsset: z28.boolean().nullish().transform((v) => v ?? false),
574
+ codeName: z28.string().nullish()
575
+ });
576
+ var ShallowDesignElement = z28.object({
577
+ id: z28.string(),
578
+ persistentId: z28.string(),
579
+ designSystemVersionId: z28.string(),
562
580
  type: DesignElementType,
563
- brandPersistentId: z27.string().optional(),
564
- parentPersistentId: z27.string().optional(),
565
- shortPersistentId: z27.string().optional(),
581
+ brandPersistentId: z28.string().optional(),
582
+ parentPersistentId: z28.string().optional(),
583
+ shortPersistentId: z28.string().optional(),
566
584
  childType: DesignElementType.optional(),
567
- sortOrder: z27.number(),
568
- origin: z27.record(z27.any()).optional()
585
+ sortOrder: z28.number(),
586
+ origin: z28.record(z28.any()).optional()
569
587
  });
570
588
  var DesignElement = ShallowDesignElement.extend({
571
589
  meta: ObjectMeta,
572
- slug: z27.string().optional(),
573
- userSlug: z27.string().optional(),
574
- createdAt: z27.coerce.date(),
575
- updatedAt: z27.coerce.date(),
590
+ slug: z28.string().optional(),
591
+ userSlug: z28.string().optional(),
592
+ createdAt: z28.coerce.date(),
593
+ updatedAt: z28.coerce.date(),
576
594
  exportProperties: DesignSystemElementExportProps.optional(),
577
- data: z27.record(z27.any()),
578
- origin: z27.record(z27.any()).optional()
595
+ data: z28.record(z28.any()),
596
+ origin: z28.record(z28.any()).optional()
579
597
  });
580
598
  var HierarchicalElements = DesignTokenType.or(
581
- z27.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
599
+ z28.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
582
600
  );
583
- var ElementPropertyType = z28.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
584
- var ElementPropertyTargetType = z28.enum(["Token", "Component", "DocumentationPage"]);
585
- var ElementPropertyLinkType = z28.enum(["FigmaComponent", "DocumentationPage"]);
586
- var ColorTokenInlineData = z28.object({
587
- value: z28.string()
601
+ var ElementPropertyType = z29.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
602
+ var ElementPropertyTargetType = z29.enum(["Token", "Component", "DocumentationPage"]);
603
+ var ElementPropertyLinkType = z29.enum(["FigmaComponent", "DocumentationPage"]);
604
+ var ColorTokenInlineData = z29.object({
605
+ value: z29.string()
588
606
  });
589
- var ElementPropertyDefinitionOption = z28.object({
590
- id: z28.string(),
591
- name: z28.string(),
607
+ var ElementPropertyDefinitionOption = z29.object({
608
+ id: z29.string(),
609
+ name: z29.string(),
592
610
  backgroundColor: ColorTokenInlineData.optional()
593
611
  });
594
- var ElementPropertyDefinition = z28.object({
595
- id: z28.string(),
596
- designSystemVersionId: z28.string(),
597
- persistentId: z28.string(),
598
- name: z28.string(),
599
- codeName: z28.string(),
600
- description: z28.string(),
612
+ var ElementPropertyDefinition = z29.object({
613
+ id: z29.string(),
614
+ designSystemVersionId: z29.string(),
615
+ persistentId: z29.string(),
616
+ name: z29.string(),
617
+ codeName: z29.string(),
618
+ description: z29.string(),
601
619
  type: ElementPropertyType,
602
620
  targetElementType: ElementPropertyTargetType,
603
- options: z28.array(ElementPropertyDefinitionOption).nullish(),
621
+ options: z29.array(ElementPropertyDefinitionOption).nullish(),
604
622
  linkElementType: ElementPropertyLinkType.nullish()
605
623
  });
606
- var ElementPropertyValue = z29.object({
607
- id: z29.string(),
608
- designSystemVersionId: z29.string(),
609
- targetElementPersistentId: z29.string(),
610
- definitionPersistentId: z29.string(),
611
- stringValue: z29.string().nullish(),
612
- numberValue: z29.number().nullish(),
613
- booleanValue: z29.boolean().nullish(),
614
- referenceValue: z29.string().nullish(),
615
- referenceValuePreview: z29.string().nullish()
616
- });
617
- var Point2D = z30.object({
618
- x: z30.number(),
619
- y: z30.number()
624
+ var ElementPropertyValue = z30.object({
625
+ id: z30.string(),
626
+ designSystemVersionId: z30.string(),
627
+ targetElementPersistentId: z30.string(),
628
+ definitionPersistentId: z30.string(),
629
+ stringValue: z30.string().nullish(),
630
+ numberValue: z30.number().nullish(),
631
+ booleanValue: z30.boolean().nullish(),
632
+ referenceValue: z30.string().nullish(),
633
+ referenceValuePreview: z30.string().nullish()
634
+ });
635
+ var Point2D = z31.object({
636
+ x: z31.number(),
637
+ y: z31.number()
620
638
  });
621
639
  var nullSize = { height: -1, width: -1 };
622
640
  function isNullSize(size) {
623
641
  return size.height === nullSize.height && size.width === nullSize.width;
624
642
  }
625
- var Size = z31.object({
626
- width: z31.number().nullish().transform((v) => v ?? nullSize.width),
627
- height: z31.number().nullish().transform((v) => v ?? nullSize.height)
643
+ var Size = z32.object({
644
+ width: z32.number().nullish().transform((v) => v ?? nullSize.width),
645
+ height: z32.number().nullish().transform((v) => v ?? nullSize.height)
628
646
  });
629
647
  var SizeOrUndefined = Size.optional().transform((v) => {
630
648
  if (!v)
@@ -633,24 +651,6 @@ var SizeOrUndefined = Size.optional().transform((v) => {
633
651
  return void 0;
634
652
  return v;
635
653
  });
636
- function zodCreateInputOmit() {
637
- return {
638
- id: true,
639
- createdAt: true,
640
- updatedAt: true
641
- };
642
- }
643
- function zodUpdateInputOmit() {
644
- return {
645
- id: true,
646
- createdAt: true,
647
- updatedAt: true,
648
- persistentId: true
649
- };
650
- }
651
- function nullishToOptional(type) {
652
- return type.nullish().transform((t) => t ?? void 0);
653
- }
654
654
  var PageBlockCalloutType = z33.enum(["Info", "Primary", "Success", "Warning", "Error"]);
655
655
  var PageBlockTypeV1 = z33.enum([
656
656
  "Text",
@@ -908,6 +908,16 @@ var PageBlockColorV2 = z34.object({
908
908
  value: z34.string(),
909
909
  referencedTokenId: z34.string().optional()
910
910
  });
911
+ var PageBlockAssetEntityMeta = z34.object({
912
+ title: z34.string().optional(),
913
+ description: z34.string().optional(),
914
+ backgroundColor: PageBlockColorV2.optional()
915
+ });
916
+ var PageBlockFigmaNodeEntityMeta = z34.object({
917
+ title: z34.string().optional(),
918
+ description: z34.string().optional(),
919
+ backgroundColor: PageBlockColorV2.optional()
920
+ });
911
921
  var PageBlockAppearanceV2 = z34.object({
912
922
  itemBackgroundColor: PageBlockColorV2.optional(),
913
923
  numberOfColumns: z34.number().optional()
@@ -943,10 +953,7 @@ var PageBlockItemAssetValue = z34.object({
943
953
  z34.object({
944
954
  entityId: z34.string(),
945
955
  entityType: z34.enum(["Asset", "AssetGroup"]),
946
- entityMeta: z34.object({
947
- title: z34.string().optional(),
948
- description: z34.string().optional()
949
- }).optional()
956
+ entityMeta: PageBlockAssetEntityMeta.optional()
950
957
  })
951
958
  )
952
959
  });
@@ -963,6 +970,7 @@ var PageBlockItemCodeValue = z34.object({
963
970
  });
964
971
  var PageBlockItemSandboxValue = z34.object({
965
972
  showCode: z34.boolean().optional(),
973
+ showControls: z34.boolean().optional(),
966
974
  backgroundColor: z34.string().optional(),
967
975
  alignPreview: z34.enum(["Left", "Center"]).optional(),
968
976
  previewHeight: z34.number().optional(),
@@ -996,14 +1004,11 @@ var PageBlockItemFigmaNodeValue = z34.object({
996
1004
  selectedPropertyIds: z34.array(z34.string()).optional(),
997
1005
  showSearch: z34.boolean().optional(),
998
1006
  previewContainerSize: PageBlockPreviewContainerSize.optional(),
999
- backgroundColor: z34.string().optional(),
1007
+ backgroundColor: PageBlockColorV2.optional(),
1000
1008
  value: z34.array(
1001
1009
  z34.object({
1002
1010
  entityId: z34.string(),
1003
- entityMeta: z34.object({
1004
- title: z34.string().optional(),
1005
- description: z34.string().optional()
1006
- }).optional()
1011
+ entityMeta: PageBlockFigmaNodeEntityMeta.optional()
1007
1012
  })
1008
1013
  )
1009
1014
  });
@@ -1068,6 +1073,7 @@ var PageBlockItemUrlValue = z34.object({
1068
1073
  });
1069
1074
  var PageBlockItemTableRichTextNode = z34.object({
1070
1075
  type: z34.literal("RichText"),
1076
+ id: z34.string(),
1071
1077
  value: PageBlockItemRichTextValue.shape.value
1072
1078
  });
1073
1079
  var PageBlockItemTableMultiRichTextNode = z34.object({
@@ -1076,6 +1082,7 @@ var PageBlockItemTableMultiRichTextNode = z34.object({
1076
1082
  });
1077
1083
  var PageBlockItemTableImageNode = z34.object({
1078
1084
  type: z34.literal("Image"),
1085
+ id: z34.string(),
1079
1086
  caption: PageBlockItemImageValue.shape.caption,
1080
1087
  value: PageBlockItemImageValue.shape.value
1081
1088
  });
@@ -2180,8 +2187,8 @@ var WorkspaceProfile = z98.object({
2180
2187
  name: z98.string(),
2181
2188
  handle: z98.string(),
2182
2189
  color: z98.string(),
2183
- avatar: z98.string().optional(),
2184
- billingDetails: BillingDetails.optional()
2190
+ avatar: nullishToOptional(z98.string()),
2191
+ billingDetails: nullishToOptional(BillingDetails)
2185
2192
  });
2186
2193
  var Workspace = z98.object({
2187
2194
  id: z98.string(),
@@ -3657,14 +3664,14 @@ var DTOCreateDocumentationGroupInput = z130.object({
3657
3664
  });
3658
3665
  var DTOUpdateDocumentationGroupInput = z130.object({
3659
3666
  // Identifier of the group to update
3660
- id: z130.string().uuid(),
3667
+ id: z130.string(),
3661
3668
  // Group properties
3662
3669
  title: z130.string().optional(),
3663
3670
  configuration: DocumentationItemConfigurationV2.optional()
3664
3671
  });
3665
3672
  var DTOMoveDocumentationGroupInput = z130.object({
3666
3673
  // Identifier of the group to update
3667
- id: z130.string().uuid(),
3674
+ id: z130.string(),
3668
3675
  // Group placement properties
3669
3676
  parentPersistentId: z130.string().uuid(),
3670
3677
  afterPersistentId: z130.string().uuid().optional()
@@ -3894,7 +3901,7 @@ var DTOFigmaNode = FigmaFileStructure.omit({
3894
3901
  }).extend({
3895
3902
  data: DTOFigmaNodeData
3896
3903
  });
3897
- var DTOFigmaNodeCreateInput = z135.object({
3904
+ var DTOFigmaNodeRenderInput = z135.object({
3898
3905
  // Id of a design system's data source representing a linked Figma file
3899
3906
  sourceId: z135.string(),
3900
3907
  // Id of a node within the Figma file
@@ -3903,13 +3910,13 @@ var DTOFigmaNodeCreateInput = z135.object({
3903
3910
 
3904
3911
  // src/api/dto/elements/figma-nodes/node-actions-v2.ts
3905
3912
  import { z as z136 } from "zod";
3906
- var DTOFigmaNodeActionOutput = z136.object({
3913
+ var DTOFigmaNodeRenderActionOutput = z136.object({
3907
3914
  type: z136.literal("FigmaNodeRender"),
3908
3915
  figmaNodes: z136.array(DTOFigmaNode)
3909
3916
  });
3910
- var DTOFigmaNodeActionInput = z136.object({
3917
+ var DTOFigmaNodeRenderActionInput = z136.object({
3911
3918
  type: z136.literal("FigmaNodeRender"),
3912
- input: DTOFigmaNodeCreateInput.array()
3919
+ input: DTOFigmaNodeRenderInput.array()
3913
3920
  });
3914
3921
 
3915
3922
  // src/api/dto/elements/elements-action-v2.ts
@@ -3930,7 +3937,7 @@ var DTOElementActionOutput = z137.discriminatedUnion("type", [
3930
3937
  DTODocumentationGroupDeleteActionOutputV2,
3931
3938
  DTODocumentationTabGroupDeleteActionOutputV2,
3932
3939
  // // Figma frames
3933
- DTOFigmaNodeActionOutput
3940
+ DTOFigmaNodeRenderActionOutput
3934
3941
  ]);
3935
3942
  var DTOElementActionInput = z137.discriminatedUnion("type", [
3936
3943
  // Documentation pages
@@ -3948,29 +3955,80 @@ var DTOElementActionInput = z137.discriminatedUnion("type", [
3948
3955
  DTODocumentationGroupDeleteActionInputV2,
3949
3956
  DTODocumentationTabGroupDeleteActionInputV2,
3950
3957
  // Figma frames
3951
- DTOFigmaNodeActionInput
3958
+ DTOFigmaNodeRenderActionInput
3952
3959
  ]);
3953
3960
 
3954
3961
  // src/api/dto/elements/get-elements-v2.ts
3955
3962
  import { z as z138 } from "zod";
3956
- var DTOElementGetTypeFilter = z138.enum(["FigmaNode"]);
3957
- var DTOElementGetQuerySchema = z138.object({
3958
- types: z138.string().transform((val) => val.split(",").map((v) => DTOElementGetTypeFilter.parse(v)))
3963
+ var DTOElementsGetTypeFilter = z138.enum(["FigmaNode"]);
3964
+ var DTOElementsGetQuerySchema = z138.object({
3965
+ types: z138.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
3959
3966
  });
3960
3967
  var DTOElementsGetOutput = z138.object({
3961
3968
  figmaNodes: z138.array(DTOFigmaNode).optional()
3962
3969
  });
3963
3970
 
3964
- // src/api/payloads/documentation/block-definitions.ts
3971
+ // src/api/dto/workspaces/membership.ts
3972
+ import { z as z141 } from "zod";
3973
+
3974
+ // src/api/dto/workspaces/workspace.ts
3975
+ import { z as z140 } from "zod";
3976
+
3977
+ // src/api/dto/workspaces/npm-registry.ts
3965
3978
  import { z as z139 } from "zod";
3966
- var DTOGetBlockDefinitionsOutput = z139.object({
3967
- definitions: z139.array(PageBlockDefinition)
3979
+ var DTONpmRegistryConfig = z139.object({
3980
+ // Registry basic configuration
3981
+ registryType: NpmRegistryType,
3982
+ registryUrl: z139.string(),
3983
+ customRegistryUrl: z139.string().optional(),
3984
+ // URL of Supernova NPM packages proxy
3985
+ proxyUrl: z139.string(),
3986
+ // Auth configuration
3987
+ authType: NpmRegistryAuthType,
3988
+ accessToken: z139.literal("redacted").optional(),
3989
+ username: z139.string().optional(),
3990
+ password: z139.literal("redacted").optional(),
3991
+ // NPM package scopes for whih the proxy should be enabled
3992
+ enabledScopes: z139.array(z139.string()),
3993
+ // True if client should bypass Supernova proxy and connect directly to the registry
3994
+ // (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
3995
+ bypassProxy: z139.boolean()
3996
+ });
3997
+
3998
+ // src/api/dto/workspaces/workspace.ts
3999
+ var DTOWorkspace = z140.object({
4000
+ id: z140.string(),
4001
+ profile: WorkspaceProfile,
4002
+ subscription: Subscription,
4003
+ npmRegistry: DTONpmRegistryConfig.optional()
4004
+ });
4005
+
4006
+ // src/api/dto/workspaces/membership.ts
4007
+ var DTOWorkspaceRole = z141.enum(["Owner", "Admin", "Creator", "Viewer", "Billing"]);
4008
+ var DTOUserWorkspaceMembership = z141.object({
4009
+ // Workspace the user is a member of
4010
+ workspace: DTOWorkspace,
4011
+ // Assigned role the user has in the workspace
4012
+ role: DTOWorkspaceRole,
4013
+ // Role that determines actual permissions the user has in the workspace
4014
+ // E.g. this is different from the default role when editors are downgraded to viewers
4015
+ // when a workspace's subscription is downgraded to free tier
4016
+ effectiveRole: DTOWorkspaceRole
4017
+ });
4018
+ var DTOUserWorkspaceMembershipsResponse = z141.object({
4019
+ membership: z141.array(DTOUserWorkspaceMembership)
4020
+ });
4021
+
4022
+ // src/api/payloads/documentation/block-definitions.ts
4023
+ import { z as z142 } from "zod";
4024
+ var DTOGetBlockDefinitionsOutput = z142.object({
4025
+ definitions: z142.array(PageBlockDefinition)
3968
4026
  });
3969
4027
 
3970
4028
  // src/api/payloads/liveblocks/auth.ts
3971
- import { z as z140 } from "zod";
3972
- var DTOLiveblocksAuthRequest = z140.object({
3973
- room: z140.string()
4029
+ import { z as z143 } from "zod";
4030
+ var DTOLiveblocksAuthRequest = z143.object({
4031
+ room: z143.string()
3974
4032
  });
3975
4033
 
3976
4034
  // src/yjs/design-system-content/documentation-hierarchy.ts
@@ -4023,13 +4081,13 @@ function getGroupsYMap(doc) {
4023
4081
  }
4024
4082
 
4025
4083
  // src/yjs/design-system-content/item-configuration.ts
4026
- import { z as z141 } from "zod";
4027
- var DTODocumentationPageRoomHeaderData = z141.object({
4028
- title: z141.string(),
4084
+ import { z as z144 } from "zod";
4085
+ var DTODocumentationPageRoomHeaderData = z144.object({
4086
+ title: z144.string(),
4029
4087
  configuration: DocumentationItemConfigurationV2
4030
4088
  });
4031
- var DTODocumentationPageRoomHeaderDataUpdate = z141.object({
4032
- title: z141.string().optional(),
4089
+ var DTODocumentationPageRoomHeaderDataUpdate = z144.object({
4090
+ title: z144.string().optional(),
4033
4091
  configuration: DocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
4034
4092
  });
4035
4093
  function itemConfigurationToYjs(yDoc, item) {
@@ -4078,7 +4136,7 @@ function yjsToItemConfiguration(yDoc) {
4078
4136
  header: rawHeader
4079
4137
  };
4080
4138
  return {
4081
- title: z141.string().parse(title),
4139
+ title: z144.string().parse(title),
4082
4140
  configuration: DocumentationItemConfigurationV2.parse(rawConfig)
4083
4141
  };
4084
4142
  }
@@ -4087,9 +4145,9 @@ function yjsToItemConfiguration(yDoc) {
4087
4145
  var PageBlockEditorModel2 = PageBlockEditorModel;
4088
4146
 
4089
4147
  // src/yjs/docs-editor/model/page.ts
4090
- import { z as z142 } from "zod";
4091
- var DocumentationPageEditorModel = z142.object({
4092
- blocks: z142.array(PageBlockEditorModel2)
4148
+ import { z as z145 } from "zod";
4149
+ var DocumentationPageEditorModel = z145.object({
4150
+ blocks: z145.array(PageBlockEditorModel2)
4093
4151
  });
4094
4152
 
4095
4153
  // src/yjs/docs-editor/prosemirror/schema.ts
@@ -5087,13 +5145,28 @@ function serializeTableNode(node) {
5087
5145
  case "RichText":
5088
5146
  return {
5089
5147
  type: "paragraph",
5148
+ attrs: {
5149
+ id: node.id,
5150
+ definitionId: "io.supernova.block.rich-text"
5151
+ },
5090
5152
  ...serializeRichTextNodePart(node.value)
5091
5153
  };
5092
5154
  case "Image":
5093
5155
  return {
5094
5156
  type: "image",
5095
5157
  attrs: {
5096
- src: node.value?.resource?.url
5158
+ id: node.id,
5159
+ definitionId: "io.supernova.block.image",
5160
+ items: JSON.stringify([
5161
+ {
5162
+ id: node.id,
5163
+ props: {
5164
+ image: {
5165
+ value: node.value
5166
+ }
5167
+ }
5168
+ }
5169
+ ])
5097
5170
  }
5098
5171
  };
5099
5172
  }
@@ -5245,7 +5318,6 @@ var blocks = [
5245
5318
  name: "Text",
5246
5319
  type: "RichText",
5247
5320
  options: {
5248
- placeholder: "Start writing with plain text",
5249
5321
  richTextStyle: "Default"
5250
5322
  }
5251
5323
  }
@@ -5299,7 +5371,7 @@ var blocks = [
5299
5371
  name: "Title 1",
5300
5372
  description: "Main sections within the page",
5301
5373
  category: "Text",
5302
- searchKeywords: ["heading"],
5374
+ searchKeywords: ["heading", "h1"],
5303
5375
  item: {
5304
5376
  properties: [
5305
5377
  {
@@ -5361,7 +5433,7 @@ var blocks = [
5361
5433
  name: "Title 2",
5362
5434
  description: "Section subheadings",
5363
5435
  category: "Text",
5364
- searchKeywords: ["heading"],
5436
+ searchKeywords: ["heading", "h2"],
5365
5437
  item: {
5366
5438
  properties: [
5367
5439
  {
@@ -5423,7 +5495,7 @@ var blocks = [
5423
5495
  name: "Title 3",
5424
5496
  description: "Further subsections",
5425
5497
  category: "Text",
5426
- searchKeywords: ["heading"],
5498
+ searchKeywords: ["heading", "h3"],
5427
5499
  item: {
5428
5500
  properties: [
5429
5501
  {
@@ -5485,7 +5557,7 @@ var blocks = [
5485
5557
  name: "Title 4",
5486
5558
  description: "Details in subsections",
5487
5559
  category: "Text",
5488
- searchKeywords: ["heading"],
5560
+ searchKeywords: ["heading", "h4"],
5489
5561
  item: {
5490
5562
  properties: [
5491
5563
  {
@@ -5547,7 +5619,7 @@ var blocks = [
5547
5619
  name: "Title 5",
5548
5620
  description: "Nuanced details or sub-points",
5549
5621
  category: "Text",
5550
- searchKeywords: ["heading"],
5622
+ searchKeywords: ["heading", "h5"],
5551
5623
  item: {
5552
5624
  properties: [
5553
5625
  {
@@ -5670,7 +5742,7 @@ var blocks = [
5670
5742
  name: "Unordered list",
5671
5743
  description: "A list with bullet points",
5672
5744
  category: "Text",
5673
- searchKeywords: ["ul"],
5745
+ searchKeywords: ["ul", "bullet points"],
5674
5746
  item: {
5675
5747
  properties: [
5676
5748
  {
@@ -5798,7 +5870,7 @@ var blocks = [
5798
5870
  name: "Text",
5799
5871
  type: "RichText",
5800
5872
  options: {
5801
- placeholder: "Empty quote",
5873
+ placeholder: "Write a quote...",
5802
5874
  richTextStyle: "Quote"
5803
5875
  }
5804
5876
  }
@@ -5860,6 +5932,7 @@ var blocks = [
5860
5932
  name: "Text",
5861
5933
  type: "RichText",
5862
5934
  options: {
5935
+ placeholder: "Highlight some information...",
5863
5936
  richTextStyle: "Callout"
5864
5937
  }
5865
5938
  }
@@ -5977,29 +6050,11 @@ var blocks = [
5977
6050
  searchKeywords: [],
5978
6051
  item: {
5979
6052
  properties: [
5980
- {
5981
- id: "block.links.property.title",
5982
- name: "Title",
5983
- type: "Text",
5984
- options: {
5985
- textStyle: "Title5"
5986
- }
5987
- },
5988
- {
5989
- id: "block.links.property.description",
5990
- name: "Short description",
5991
- type: "Text",
5992
- options: {
5993
- textStyle: "Default",
5994
- color: "NeutralFaded"
5995
- }
5996
- },
5997
6053
  {
5998
6054
  id: "block.links.property.image",
5999
6055
  name: "Image",
6000
6056
  type: "Image",
6001
6057
  options: {
6002
- width: "Medium",
6003
6058
  aspectRatio: "Landscape",
6004
6059
  allowCaption: false
6005
6060
  },
@@ -6013,6 +6068,25 @@ var blocks = [
6013
6068
  aspectRatio: "Square"
6014
6069
  }
6015
6070
  }
6071
+ },
6072
+ {
6073
+ id: "block.links.property.title",
6074
+ name: "Title",
6075
+ type: "Text",
6076
+ options: {
6077
+ textStyle: "Title5",
6078
+ placeholder: "Add title"
6079
+ }
6080
+ },
6081
+ {
6082
+ id: "block.links.property.description",
6083
+ name: "Short description",
6084
+ type: "Text",
6085
+ options: {
6086
+ textStyle: "Default",
6087
+ color: "NeutralFaded",
6088
+ placeholder: "Add description"
6089
+ }
6016
6090
  }
6017
6091
  ],
6018
6092
  appearance: {
@@ -6023,7 +6097,7 @@ var blocks = [
6023
6097
  {
6024
6098
  id: "imageOnTop",
6025
6099
  name: "Image on top",
6026
- image: "assets/variant-image-on-top.png",
6100
+ image: "https://cdn-assets.supernova.io/blocks/variants/shortcuts-image-on-top.svg",
6027
6101
  layout: {
6028
6102
  type: "Column",
6029
6103
  children: ["block.links.property.image", "block.links.property.title", "block.links.property.description"],
@@ -6042,7 +6116,7 @@ var blocks = [
6042
6116
  {
6043
6117
  id: "imageOnLeft",
6044
6118
  name: "Image on left",
6045
- image: "assets/variant-image-on-left.png",
6119
+ image: "https://cdn-assets.supernova.io/blocks/variants/shortcuts-leading-image.svg",
6046
6120
  layout: {
6047
6121
  type: "Row",
6048
6122
  children: [
@@ -6076,7 +6150,7 @@ var blocks = [
6076
6150
  {
6077
6151
  id: "iconOnTop",
6078
6152
  name: "Icon on top",
6079
- image: "assets/variant-icon-on-top.png",
6153
+ image: "https://cdn-assets.supernova.io/blocks/variants/shortcuts-icon-on-top.svg",
6080
6154
  layout: {
6081
6155
  type: "Column",
6082
6156
  children: ["block.links.property.image", "block.links.property.title", "block.links.property.description"],
@@ -6095,7 +6169,7 @@ var blocks = [
6095
6169
  {
6096
6170
  id: "iconOnLeft",
6097
6171
  name: "Icon on left",
6098
- image: "assets/variant-icon-on-left.png",
6172
+ image: "https://cdn-assets.supernova.io/blocks/variants/shortcuts-leading-icon.svg",
6099
6173
  layout: {
6100
6174
  type: "Row",
6101
6175
  children: [
@@ -6195,8 +6269,8 @@ var blocks = [
6195
6269
  behavior: {
6196
6270
  dataType: "Token",
6197
6271
  entities: {
6198
- selectionType: "Group",
6199
- maxSelected: 2
6272
+ selectionType: "EntityAndGroup",
6273
+ maxSelected: 0
6200
6274
  }
6201
6275
  },
6202
6276
  editorOptions: {
@@ -6351,7 +6425,23 @@ var blocks = [
6351
6425
  name: "Lottie URL",
6352
6426
  type: "URL",
6353
6427
  options: {
6354
- urlValidationRegex: "^(https?:\\/\\/)?([\\w\\d\\-\\.]+)\\.([\\w]+)(\\/[\\w\\d_\\-\\.\\/]*)?(\\.json|\\.lottie)$\n"
6428
+ urlValidationRegex: "^(http|https)://.*.(json|lottie)$"
6429
+ }
6430
+ },
6431
+ {
6432
+ id: "height",
6433
+ name: "Height",
6434
+ type: "Number",
6435
+ options: {
6436
+ defaultValue: 270
6437
+ }
6438
+ },
6439
+ {
6440
+ id: "width",
6441
+ name: "Width",
6442
+ type: "Number",
6443
+ options: {
6444
+ defaultValue: 400
6355
6445
  }
6356
6446
  },
6357
6447
  {
@@ -6369,6 +6459,14 @@ var blocks = [
6369
6459
  options: {
6370
6460
  defaultValue: true
6371
6461
  }
6462
+ },
6463
+ {
6464
+ id: "playerControls",
6465
+ name: "Show player controls",
6466
+ type: "Boolean",
6467
+ options: {
6468
+ defaultValue: true
6469
+ }
6372
6470
  }
6373
6471
  ],
6374
6472
  appearance: {
@@ -6379,9 +6477,10 @@ var blocks = [
6379
6477
  {
6380
6478
  id: "default",
6381
6479
  name: "Default",
6480
+ image: "https://cdn-assets.supernova.io/blocks/variants/lottie.svg",
6382
6481
  layout: {
6383
6482
  type: "Column",
6384
- children: ["url", "autoplay", "loop"],
6483
+ children: ["url", "height", "width", "autoplay", "loop", "playerControls"],
6385
6484
  columnAlign: "Start",
6386
6485
  columnResizing: "Fill",
6387
6486
  gap: "Medium"
@@ -6391,7 +6490,7 @@ var blocks = [
6391
6490
  appearance: {
6392
6491
  isBordered: false,
6393
6492
  hasBackground: false,
6394
- isEditorPresentationDifferent: false
6493
+ isEditorPresentationDifferent: true
6395
6494
  }
6396
6495
  }
6397
6496
  ],
@@ -6554,7 +6653,9 @@ var blocks = [
6554
6653
  id: "markdownUrl",
6555
6654
  name: "Markdown URL",
6556
6655
  type: "Markdown",
6557
- options: {}
6656
+ options: {
6657
+ urlValidationRegex: "^(https?://)?(www.)?.+.md$"
6658
+ }
6558
6659
  }
6559
6660
  ],
6560
6661
  appearance: {
@@ -6565,7 +6666,7 @@ var blocks = [
6565
6666
  {
6566
6667
  id: "plain",
6567
6668
  name: "Plain",
6568
- image: "assets/variant-plain.png",
6669
+ image: "https://cdn-assets.supernova.io/blocks/variants/markdown-plain.svg",
6569
6670
  layout: {
6570
6671
  type: "Column",
6571
6672
  children: ["markdownUrl"],
@@ -6584,7 +6685,7 @@ var blocks = [
6584
6685
  {
6585
6686
  id: "bordered",
6586
6687
  name: "Bordered",
6587
- image: "assets/variant-Bordered.png",
6688
+ image: "https://cdn-assets.supernova.io/blocks/variants/markdown-bordered.svg",
6588
6689
  layout: {
6589
6690
  type: "Column",
6590
6691
  children: ["markdownUrl"],
@@ -6603,7 +6704,7 @@ var blocks = [
6603
6704
  {
6604
6705
  id: "boxed",
6605
6706
  name: "Boxed",
6606
- image: "assets/variant-boxed.png",
6707
+ image: "https://cdn-assets.supernova.io/blocks/variants/markdown-boxed.svg",
6607
6708
  layout: {
6608
6709
  type: "Column",
6609
6710
  children: ["markdownUrl"],
@@ -6714,7 +6815,7 @@ var blocks = [
6714
6815
  options: {
6715
6816
  renderLayoutAs: "List",
6716
6817
  defaultTheme: "none",
6717
- defaultValuePreview: "splitView"
6818
+ defaultValuePreview: "Split"
6718
6819
  }
6719
6820
  }
6720
6821
  ],
@@ -6725,8 +6826,8 @@ var blocks = [
6725
6826
  variants: [
6726
6827
  {
6727
6828
  id: "table",
6728
- name: "Table Row",
6729
- image: "assets/variant-table.png",
6829
+ name: "Table row",
6830
+ image: "https://cdn-assets.supernova.io/blocks/variants/tokens-table.svg",
6730
6831
  layout: {
6731
6832
  type: "Column",
6732
6833
  children: ["tokens"],
@@ -6744,8 +6845,8 @@ var blocks = [
6744
6845
  },
6745
6846
  {
6746
6847
  id: "grid",
6747
- name: "Grid Item",
6748
- image: "assets/variant-grid.png",
6848
+ name: "Grid item",
6849
+ image: "https://cdn-assets.supernova.io/blocks/variants/tokens-grid.svg",
6749
6850
  layout: {
6750
6851
  type: "Column",
6751
6852
  children: ["tokens"],
@@ -6764,7 +6865,7 @@ var blocks = [
6764
6865
  {
6765
6866
  id: "color-stack",
6766
6867
  name: "Color stack item",
6767
- image: "assets/variant-color-stack.png",
6868
+ image: "https://cdn-assets.supernova.io/blocks/variants/tokens-color-stack.svg",
6768
6869
  layout: {
6769
6870
  type: "Column",
6770
6871
  children: ["tokens"],
@@ -6806,7 +6907,7 @@ var blocks = [
6806
6907
  name: "Token list",
6807
6908
  description: "Show a list of design tokens",
6808
6909
  category: "Tokens",
6809
- searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme", "accessibility", "contrast"],
6910
+ searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
6810
6911
  item: {
6811
6912
  properties: [
6812
6913
  {
@@ -6816,7 +6917,7 @@ var blocks = [
6816
6917
  options: {
6817
6918
  renderLayoutAs: "List",
6818
6919
  defaultTheme: "none",
6819
- defaultValuePreview: "splitView"
6920
+ defaultValuePreview: "Split"
6820
6921
  },
6821
6922
  variantOptions: {
6822
6923
  grid: {
@@ -6833,7 +6934,7 @@ var blocks = [
6833
6934
  {
6834
6935
  id: "table",
6835
6936
  name: "Table",
6836
- image: "assets/variant-table.png",
6937
+ image: "https://cdn-assets.supernova.io/blocks/variants/tokens-table.svg",
6837
6938
  layout: {
6838
6939
  type: "Column",
6839
6940
  children: ["tokens"],
@@ -6852,7 +6953,7 @@ var blocks = [
6852
6953
  {
6853
6954
  id: "grid",
6854
6955
  name: "Grid",
6855
- image: "assets/variant-grid.png",
6956
+ image: "https://cdn-assets.supernova.io/blocks/variants/tokens-grid.svg",
6856
6957
  layout: {
6857
6958
  type: "Column",
6858
6959
  children: ["tokens"],
@@ -6871,26 +6972,7 @@ var blocks = [
6871
6972
  {
6872
6973
  id: "color-stack",
6873
6974
  name: "Color stack",
6874
- image: "assets/variant-color-stack.png",
6875
- layout: {
6876
- type: "Column",
6877
- children: ["tokens"],
6878
- columnAlign: "Start",
6879
- columnResizing: "Fill",
6880
- gap: "Medium"
6881
- },
6882
- maxColumns: 1,
6883
- defaultColumns: 1,
6884
- appearance: {
6885
- isBordered: false,
6886
- hasBackground: false,
6887
- isEditorPresentationDifferent: false
6888
- }
6889
- },
6890
- {
6891
- id: "color-contrast-grid",
6892
- name: "Color contrast grid",
6893
- image: "assets/variant-color-contrast-grid.png",
6975
+ image: "https://cdn-assets.supernova.io/blocks/variants/tokens-color-stack.svg",
6894
6976
  layout: {
6895
6977
  type: "Column",
6896
6978
  children: ["tokens"],
@@ -6932,7 +7014,7 @@ var blocks = [
6932
7014
  name: "Token group",
6933
7015
  description: "Show a group of design tokens",
6934
7016
  category: "Tokens",
6935
- searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme", "accessibility", "contrast"],
7017
+ searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
6936
7018
  item: {
6937
7019
  properties: [
6938
7020
  {
@@ -6942,7 +7024,7 @@ var blocks = [
6942
7024
  options: {
6943
7025
  renderLayoutAs: "List",
6944
7026
  defaultTheme: "none",
6945
- defaultValuePreview: "splitView"
7027
+ defaultValuePreview: "Split"
6946
7028
  },
6947
7029
  variantOptions: {
6948
7030
  grid: {
@@ -6959,7 +7041,7 @@ var blocks = [
6959
7041
  {
6960
7042
  id: "table",
6961
7043
  name: "Table",
6962
- image: "assets/variant-table.png",
7044
+ image: "https://cdn-assets.supernova.io/blocks/variants/tokens-table.svg",
6963
7045
  layout: {
6964
7046
  type: "Column",
6965
7047
  children: ["tokens"],
@@ -6978,7 +7060,7 @@ var blocks = [
6978
7060
  {
6979
7061
  id: "grid",
6980
7062
  name: "Grid",
6981
- image: "assets/variant-grid.png",
7063
+ image: "https://cdn-assets.supernova.io/blocks/variants/tokens-grid.svg",
6982
7064
  layout: {
6983
7065
  type: "Column",
6984
7066
  children: ["tokens"],
@@ -6997,7 +7079,7 @@ var blocks = [
6997
7079
  {
6998
7080
  id: "color-stack",
6999
7081
  name: "Color stack",
7000
- image: "assets/variant-color-stack.png",
7082
+ image: "https://cdn-assets.supernova.io/blocks/variants/tokens-color-stack.svg",
7001
7083
  layout: {
7002
7084
  type: "Column",
7003
7085
  children: ["tokens"],
@@ -7012,25 +7094,6 @@ var blocks = [
7012
7094
  hasBackground: false,
7013
7095
  isEditorPresentationDifferent: false
7014
7096
  }
7015
- },
7016
- {
7017
- id: "color-contrast-grid",
7018
- name: "Color contrast grid",
7019
- image: "assets/variant-color-contrast-grid.png",
7020
- layout: {
7021
- type: "Column",
7022
- children: ["tokens"],
7023
- columnAlign: "Start",
7024
- columnResizing: "Fill",
7025
- gap: "Medium"
7026
- },
7027
- maxColumns: 1,
7028
- defaultColumns: 1,
7029
- appearance: {
7030
- isBordered: false,
7031
- hasBackground: false,
7032
- isEditorPresentationDifferent: false
7033
- }
7034
7097
  }
7035
7098
  ],
7036
7099
  defaultVariantKey: "table"
@@ -7044,7 +7107,7 @@ var blocks = [
7044
7107
  },
7045
7108
  editorOptions: {
7046
7109
  onboarding: {
7047
- helpText: "Show a group of design tokens. You can use this block to create a list of colors, typography, spacing, grid, or any other token type.",
7110
+ helpText: "Show a group of design tokens. Automatically display all subgroups too.",
7048
7111
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-group-09"
7049
7112
  }
7050
7113
  },
@@ -7147,7 +7210,7 @@ var blocks = [
7147
7210
  {
7148
7211
  id: "codeBottom",
7149
7212
  name: "Full width, code bottom",
7150
- image: "thumbnails/RenderCode_CodeBottom.png",
7213
+ image: "https://cdn-assets.supernova.io/blocks/variants/react-code-bottom.svg",
7151
7214
  description: "Full-width block of code, with a preview on top.",
7152
7215
  layout: {
7153
7216
  type: "Column",
@@ -7167,7 +7230,7 @@ var blocks = [
7167
7230
  {
7168
7231
  id: "codeTop",
7169
7232
  name: "Full width, code top",
7170
- image: "thumbnails/RenderCode_CodeTop.png",
7233
+ image: "https://cdn-assets.supernova.io/blocks/variants/react-code-top.svg",
7171
7234
  description: "Full-width block of code, with a preview on bottom.",
7172
7235
  layout: {
7173
7236
  type: "Column",
@@ -7187,7 +7250,7 @@ var blocks = [
7187
7250
  {
7188
7251
  id: "codeLeft",
7189
7252
  name: "Side by side, code left",
7190
- image: "thumbnails/RenderCode_CodeLeft.png",
7253
+ image: "https://cdn-assets.supernova.io/blocks/variants/react-code-left.svg",
7191
7254
  description: "Side-by-side preview and code, with code on the left.",
7192
7255
  layout: {
7193
7256
  type: "Column",
@@ -7207,7 +7270,7 @@ var blocks = [
7207
7270
  {
7208
7271
  id: "codeRight",
7209
7272
  name: "Side by side, code right",
7210
- image: "thumbnails/RenderCode_CodeRight.png",
7273
+ image: "https://cdn-assets.supernova.io/blocks/variants/react-code-right.svg",
7211
7274
  description: "Side-by-side preview and code, with code on the right.",
7212
7275
  layout: {
7213
7276
  type: "Column",
@@ -7325,7 +7388,7 @@ var blocks = [
7325
7388
  {
7326
7389
  id: "default",
7327
7390
  name: "Simple grid",
7328
- image: "assets/variant-default.png",
7391
+ image: "https://cdn-assets.supernova.io/blocks/variants/assets-simple-grid.svg",
7329
7392
  description: "A simple grid of assets. Both the title and description are displayed below the preview.",
7330
7393
  layout: {
7331
7394
  type: "Column",
@@ -7345,7 +7408,7 @@ var blocks = [
7345
7408
  {
7346
7409
  id: "square-grid",
7347
7410
  name: "Square grid",
7348
- image: "assets/variant-square-grid.png",
7411
+ image: "https://cdn-assets.supernova.io/blocks/variants/assets-square-grid.svg",
7349
7412
  description: "Bordered square grid tailored for displaying icon assets. Only the title is displayed.",
7350
7413
  layout: {
7351
7414
  type: "Column",
@@ -7365,7 +7428,7 @@ var blocks = [
7365
7428
  {
7366
7429
  id: "borderless-grid",
7367
7430
  name: "Borderless grid",
7368
- image: "assets/variant-color-stack.png",
7431
+ image: "https://cdn-assets.supernova.io/blocks/variants/assets-borderless-grid.svg",
7369
7432
  description: "Borderless grid, perfect for displaying assets of the same height. Only the title is visible.",
7370
7433
  layout: {
7371
7434
  type: "Column",
@@ -7388,7 +7451,7 @@ var blocks = [
7388
7451
  behavior: {
7389
7452
  dataType: "Asset",
7390
7453
  entities: {
7391
- selectionType: "Entity",
7454
+ selectionType: "EntityAndGroup",
7392
7455
  maxSelected: 0
7393
7456
  }
7394
7457
  },
@@ -7404,7 +7467,7 @@ var blocks = [
7404
7467
  }
7405
7468
  },
7406
7469
  {
7407
- id: "io.supernova.block.figma-nodes",
7470
+ id: "io.supernova.block.figma-frames",
7408
7471
  name: "Figma frames",
7409
7472
  description: "Display Figma frames as images",
7410
7473
  category: "Figma",
@@ -7412,9 +7475,9 @@ var blocks = [
7412
7475
  item: {
7413
7476
  properties: [
7414
7477
  {
7415
- id: "figmaFrames",
7416
- name: "Figma Frames (tbd)",
7417
- type: "Asset",
7478
+ id: "figmaNodes",
7479
+ name: "Figma Frames",
7480
+ type: "FigmaNode",
7418
7481
  options: {}
7419
7482
  }
7420
7483
  ],
@@ -7426,11 +7489,11 @@ var blocks = [
7426
7489
  {
7427
7490
  id: "bordered",
7428
7491
  name: "Bordered",
7429
- image: "assets/variant-default.png",
7492
+ image: "https://cdn-assets.supernova.io/blocks/variants/figma-nodes-boxed.svg",
7430
7493
  description: "Tiles with background and border, great for larger sets of frames.",
7431
7494
  layout: {
7432
7495
  type: "Column",
7433
- children: ["figmaFrames"],
7496
+ children: ["figmaNodes"],
7434
7497
  columnAlign: "Start",
7435
7498
  columnResizing: "Fill",
7436
7499
  gap: "Medium"
@@ -7446,11 +7509,11 @@ var blocks = [
7446
7509
  {
7447
7510
  id: "plain",
7448
7511
  name: "Plain",
7449
- image: "assets/variant-square-grid.png",
7512
+ image: "https://cdn-assets.supernova.io/blocks/variants/figma-nodes-plain.svg",
7450
7513
  description: "Frame as it is in Figma with no extra formatting, great for single images.",
7451
7514
  layout: {
7452
7515
  type: "Column",
7453
- children: ["figmaFrames"],
7516
+ children: ["figmaNodes"],
7454
7517
  columnAlign: "Start",
7455
7518
  columnResizing: "Fill",
7456
7519
  gap: "Medium"
@@ -7500,6 +7563,7 @@ var blocks = [
7500
7563
  {
7501
7564
  id: "default",
7502
7565
  name: "Default",
7566
+ image: "https://cdn-assets.supernova.io/blocks/variants/release-notes.svg",
7503
7567
  layout: {
7504
7568
  type: "Column",
7505
7569
  children: [],
@@ -7512,7 +7576,7 @@ var blocks = [
7512
7576
  appearance: {
7513
7577
  isBordered: false,
7514
7578
  hasBackground: false,
7515
- isEditorPresentationDifferent: false
7579
+ isEditorPresentationDifferent: true
7516
7580
  }
7517
7581
  }
7518
7582
  ],
@@ -7550,6 +7614,22 @@ var blocks = [
7550
7614
  options: {
7551
7615
  renderLayoutAs: "List"
7552
7616
  }
7617
+ },
7618
+ {
7619
+ id: "showDescription",
7620
+ name: "Show description",
7621
+ type: "Boolean",
7622
+ options: {
7623
+ defaultValue: true
7624
+ }
7625
+ },
7626
+ {
7627
+ id: "title",
7628
+ name: "Title",
7629
+ type: "Text",
7630
+ options: {
7631
+ defaultValue: "Component checklist"
7632
+ }
7553
7633
  }
7554
7634
  ],
7555
7635
  appearance: {
@@ -7560,9 +7640,10 @@ var blocks = [
7560
7640
  {
7561
7641
  id: "default",
7562
7642
  name: "Default",
7643
+ image: "https://cdn-assets.supernova.io/blocks/variants/component-checklist.svg",
7563
7644
  layout: {
7564
7645
  type: "Column",
7565
- children: ["components"],
7646
+ children: ["components", "showDescription", "title"],
7566
7647
  columnAlign: "Start",
7567
7648
  columnResizing: "Fill",
7568
7649
  gap: "Medium"
@@ -7572,7 +7653,7 @@ var blocks = [
7572
7653
  appearance: {
7573
7654
  isBordered: false,
7574
7655
  hasBackground: false,
7575
- isEditorPresentationDifferent: false
7656
+ isEditorPresentationDifferent: true
7576
7657
  }
7577
7658
  }
7578
7659
  ],
@@ -7609,7 +7690,15 @@ var blocks = [
7609
7690
  name: "Components",
7610
7691
  type: "Component",
7611
7692
  options: {
7612
- renderLayoutAs: "List"
7693
+ renderLayoutAs: "Table"
7694
+ }
7695
+ },
7696
+ {
7697
+ id: "showLastUpdatedColumn",
7698
+ name: "Show last updated column",
7699
+ type: "Boolean",
7700
+ options: {
7701
+ defaultValue: true
7613
7702
  }
7614
7703
  }
7615
7704
  ],
@@ -7621,9 +7710,10 @@ var blocks = [
7621
7710
  {
7622
7711
  id: "default",
7623
7712
  name: "Default",
7713
+ image: "https://cdn-assets.supernova.io/blocks/variants/component-overview-table.svg",
7624
7714
  layout: {
7625
7715
  type: "Column",
7626
- children: ["components"],
7716
+ children: ["components", "showLastUpdatedColumn"],
7627
7717
  columnAlign: "Start",
7628
7718
  columnResizing: "Fill",
7629
7719
  gap: "Medium"
@@ -7633,7 +7723,7 @@ var blocks = [
7633
7723
  appearance: {
7634
7724
  isBordered: false,
7635
7725
  hasBackground: false,
7636
- isEditorPresentationDifferent: false
7726
+ isEditorPresentationDifferent: true
7637
7727
  }
7638
7728
  }
7639
7729
  ],
@@ -7682,6 +7772,7 @@ var blocks = [
7682
7772
  {
7683
7773
  id: "default",
7684
7774
  name: "Default",
7775
+ image: "https://cdn-assets.supernova.io/blocks/variants/component-health.svg",
7685
7776
  layout: {
7686
7777
  type: "Column",
7687
7778
  children: ["components"],
@@ -7694,7 +7785,7 @@ var blocks = [
7694
7785
  appearance: {
7695
7786
  isBordered: false,
7696
7787
  hasBackground: false,
7697
- isEditorPresentationDifferent: false
7788
+ isEditorPresentationDifferent: true
7698
7789
  }
7699
7790
  }
7700
7791
  ],
@@ -7722,7 +7813,7 @@ var blocks = [
7722
7813
 
7723
7814
  // src/yjs/docs-editor/prosemirror-to-blocks.ts
7724
7815
  import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
7725
- import { z as z143 } from "zod";
7816
+ import { z as z146 } from "zod";
7726
7817
  function yDocToPage(yDoc, definitions) {
7727
7818
  return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
7728
7819
  }
@@ -7734,7 +7825,7 @@ function prosemirrorDocToPage(prosemirrorDoc, definitions) {
7734
7825
  const definitionsById = mapByUnique2(definitions, (d) => d.id);
7735
7826
  return {
7736
7827
  blocks: (prosemirrorDoc.content ?? []).map((prosemirrorNode) => {
7737
- const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z143.string());
7828
+ const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z146.string());
7738
7829
  if (!definitionId) {
7739
7830
  console.warn(
7740
7831
  `definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`
@@ -7776,7 +7867,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
7776
7867
  if (!id)
7777
7868
  return null;
7778
7869
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
7779
- const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z143.string().optional()));
7870
+ const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z146.string().optional()));
7780
7871
  return {
7781
7872
  // TODO Artem: indent
7782
7873
  id,
@@ -7876,8 +7967,8 @@ function parseRichTextAttribute(mark) {
7876
7967
  case "code":
7877
7968
  return { type: "Code" };
7878
7969
  case "link":
7879
- const itemId = getProsemirrorAttribute(mark, "itemId", z143.string().optional());
7880
- const href = getProsemirrorAttribute(mark, "href", z143.string().optional());
7970
+ const itemId = getProsemirrorAttribute(mark, "itemId", z146.string().optional());
7971
+ const href = getProsemirrorAttribute(mark, "href", z146.string().optional());
7881
7972
  return {
7882
7973
  type: "Link",
7883
7974
  openInNewWindow: mark.attrs?.target !== "_self",
@@ -7892,7 +7983,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
7892
7983
  if (!id)
7893
7984
  return null;
7894
7985
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
7895
- const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z143.boolean().optional()) !== false;
7986
+ const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z146.boolean().optional()) !== false;
7896
7987
  const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
7897
7988
  if (!tableChild) {
7898
7989
  return emptyTable(id, variantId, 0);
@@ -7938,9 +8029,9 @@ function parseAsTableCell(prosemirrorNode) {
7938
8029
  const id = getProsemirrorBlockId(prosemirrorNode);
7939
8030
  if (!id)
7940
8031
  return null;
7941
- const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z143.string().optional());
8032
+ const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z146.string().optional());
7942
8033
  let columnWidth;
7943
- const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z143.array(z143.number()).optional());
8034
+ const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z146.array(z146.number()).optional());
7944
8035
  if (columnWidthArray) {
7945
8036
  columnWidth = columnWidthArray[0];
7946
8037
  }
@@ -7967,25 +8058,33 @@ function parseTableCellAlignment(alignment) {
7967
8058
  }
7968
8059
  }
7969
8060
  function parseAsTableNode(prosemirrorNode) {
8061
+ const id = getProsemirrorBlockId(prosemirrorNode);
8062
+ if (!id)
8063
+ return null;
7970
8064
  switch (prosemirrorNode.type) {
7971
8065
  case "paragraph":
7972
8066
  return {
7973
8067
  type: "RichText",
8068
+ id,
7974
8069
  value: parseRichText(prosemirrorNode.content ?? [])
7975
8070
  };
7976
8071
  case "image":
7977
- const url = getProsemirrorAttribute(prosemirrorNode, "src", z143.string().optional());
7978
- if (!url)
8072
+ const items = getProsemirrorAttribute(prosemirrorNode, "items", z146.string());
8073
+ if (!items)
8074
+ return null;
8075
+ const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
8076
+ if (!parsedItems.success)
8077
+ return null;
8078
+ const rawImagePropertyValue = parsedItems.data[0]?.props.image;
8079
+ if (!rawImagePropertyValue)
8080
+ return null;
8081
+ const imagePropertyValueParseResult = PageBlockItemImageValue.safeParse(rawImagePropertyValue);
8082
+ if (!imagePropertyValueParseResult.success)
7979
8083
  return null;
7980
8084
  return {
7981
8085
  type: "Image",
7982
- value: {
7983
- type: "Resource",
7984
- resource: {
7985
- resourceId: "",
7986
- url
7987
- }
7988
- }
8086
+ id,
8087
+ value: imagePropertyValueParseResult.data.value
7989
8088
  };
7990
8089
  default:
7991
8090
  return null;
@@ -8031,6 +8130,7 @@ function emptyTableCellContent() {
8031
8130
  return [
8032
8131
  {
8033
8132
  type: "RichText",
8133
+ id: "",
8034
8134
  value: { spans: [] }
8035
8135
  }
8036
8136
  ];
@@ -8071,7 +8171,7 @@ function parseAsCustomBlock(prosemirrorNode, definition) {
8071
8171
  };
8072
8172
  }
8073
8173
  function parseBlockItems(prosemirrorNode, definition) {
8074
- const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z143.string());
8174
+ const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z146.string());
8075
8175
  if (!itemsString)
8076
8176
  return null;
8077
8177
  const itemsJson = JSON.parse(itemsString);
@@ -8083,11 +8183,11 @@ function parseBlockItems(prosemirrorNode, definition) {
8083
8183
  }
8084
8184
  function parseAppearance(prosemirrorNode) {
8085
8185
  const appearance = {};
8086
- const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z143.number().optional());
8186
+ const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z146.number().optional());
8087
8187
  if (columns) {
8088
8188
  appearance.numberOfColumns = columns;
8089
8189
  }
8090
- const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z143.string().optional());
8190
+ const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z146.string().optional());
8091
8191
  if (backgroundColor) {
8092
8192
  const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
8093
8193
  if (parsedColor.success) {
@@ -8178,13 +8278,13 @@ function valueSchemaForPropertyType(type) {
8178
8278
  }
8179
8279
  }
8180
8280
  function getProsemirrorBlockId(prosemirrorNode) {
8181
- const id = getProsemirrorAttribute(prosemirrorNode, "id", z143.string());
8281
+ const id = getProsemirrorAttribute(prosemirrorNode, "id", z146.string());
8182
8282
  if (!id)
8183
8283
  console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
8184
8284
  return id;
8185
8285
  }
8186
8286
  function getProsemirrorBlockVariantId(prosemirrorNode) {
8187
- return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z143.string()));
8287
+ return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z146.string()));
8188
8288
  }
8189
8289
  function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
8190
8290
  const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
@@ -8251,20 +8351,25 @@ export {
8251
8351
  DTODuplicateDocumentationPageInputV2,
8252
8352
  DTOElementActionInput,
8253
8353
  DTOElementActionOutput,
8254
- DTOElementGetQuerySchema,
8255
- DTOElementGetTypeFilter,
8256
8354
  DTOElementsGetOutput,
8355
+ DTOElementsGetQuerySchema,
8356
+ DTOElementsGetTypeFilter,
8257
8357
  DTOFigmaNode,
8258
- DTOFigmaNodeActionInput,
8259
- DTOFigmaNodeActionOutput,
8260
- DTOFigmaNodeCreateInput,
8261
8358
  DTOFigmaNodeData,
8359
+ DTOFigmaNodeRenderActionInput,
8360
+ DTOFigmaNodeRenderActionOutput,
8361
+ DTOFigmaNodeRenderInput,
8262
8362
  DTOGetBlockDefinitionsOutput,
8263
8363
  DTOLiveblocksAuthRequest,
8264
8364
  DTOMoveDocumentationGroupInput,
8265
8365
  DTOMoveDocumentationPageInputV2,
8366
+ DTONpmRegistryConfig,
8266
8367
  DTOUpdateDocumentationGroupInput,
8267
8368
  DTOUpdateDocumentationPageInputV2,
8369
+ DTOUserWorkspaceMembership,
8370
+ DTOUserWorkspaceMembershipsResponse,
8371
+ DTOWorkspace,
8372
+ DTOWorkspaceRole,
8268
8373
  DocumentationPageEditorModel,
8269
8374
  DocumentationPageV1DTO,
8270
8375
  PageBlockEditorModel2 as PageBlockEditorModel,