@supernova-studio/client 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/client",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,1378 @@
1
+ import { PageBlockDefinition } from "@supernova-studio/model";
2
+
3
+ export async function getMockPageBlockDefinitions(): Promise<PageBlockDefinition[]> {
4
+ // TODO Blocks
5
+ return blocks;
6
+ }
7
+
8
+ const blocks: PageBlockDefinition[] = [
9
+ {
10
+ id: "io.supernova.block.rich-text",
11
+ name: "Text",
12
+ description: "Plain text",
13
+ category: "Text",
14
+ searchKeywords: ["paragraph", "rich text"],
15
+ item: {
16
+ properties: [
17
+ {
18
+ id: "text",
19
+ name: "Text",
20
+ type: "RichText",
21
+ description: undefined,
22
+ options: {
23
+ placeholder: "Start writing with plain text",
24
+ style: "Default",
25
+ },
26
+ variantOptions: undefined,
27
+ },
28
+ ],
29
+ appearance: { isBordered: false, hasBackground: false },
30
+ variants: [
31
+ {
32
+ id: "default",
33
+ name: "Default",
34
+ image: undefined,
35
+ description: undefined,
36
+ documentationLink: undefined,
37
+ layout: { type: "Column", children: ["text"] },
38
+ maxColumns: 1,
39
+ defaultColumns: 1,
40
+ appearance: { isBordered: false, hasBackground: false },
41
+ },
42
+ ],
43
+ defaultVariantKey: "default",
44
+ },
45
+ behavior: {
46
+ dataType: "Item",
47
+ items: { numberOfItems: 1, allowLinks: false },
48
+ entities: undefined,
49
+ },
50
+ editorOptions: {
51
+ onboarding: {
52
+ helpText: "Use rich text block to write text and add additional formatting to it.",
53
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/text-HxZ9ssJR",
54
+ },
55
+ },
56
+ appearance: { isBordered: false, hasBackground: false },
57
+ },
58
+ {
59
+ id: "io.supernova.block.title1",
60
+ name: "Title 1",
61
+ description: "Main sections within the page",
62
+ category: "Text",
63
+ searchKeywords: ["heading"],
64
+ item: {
65
+ properties: [
66
+ {
67
+ id: "text",
68
+ name: "Text",
69
+ type: "RichText",
70
+ options: { placeholder: "Title 1", style: "Title1" },
71
+ },
72
+ ],
73
+ appearance: { isBordered: false, hasBackground: false },
74
+ variants: [
75
+ {
76
+ id: "default",
77
+ name: "Default",
78
+ documentationLink: undefined,
79
+ layout: { type: "Column", children: ["text"] },
80
+ maxColumns: 1,
81
+ defaultColumns: 1,
82
+ appearance: { isBordered: false, hasBackground: false },
83
+ },
84
+ ],
85
+ defaultVariantKey: "default",
86
+ },
87
+ behavior: {
88
+ dataType: "Item",
89
+ items: { numberOfItems: 1, allowLinks: false },
90
+ entities: undefined,
91
+ },
92
+ editorOptions: {
93
+ onboarding: {
94
+ helpText: "Use for main sections within the page, introducing broad topics or themes.",
95
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY",
96
+ },
97
+ },
98
+ appearance: { isBordered: false, hasBackground: false },
99
+ },
100
+ {
101
+ id: "io.supernova.block.title2",
102
+ name: "Title 2",
103
+ description: "Section subheadings",
104
+ category: "Text",
105
+ icon: undefined,
106
+ documentationLink: undefined,
107
+ searchKeywords: ["heading"],
108
+ item: {
109
+ properties: [
110
+ {
111
+ id: "text",
112
+ name: "Text",
113
+ type: "RichText",
114
+ description: undefined,
115
+ options: { placeholder: "Title 2", style: "Title2" },
116
+ variantOptions: undefined,
117
+ },
118
+ ],
119
+ appearance: { isBordered: false, hasBackground: false },
120
+ variants: [
121
+ {
122
+ id: "default",
123
+ name: "Default",
124
+ image: undefined,
125
+ description: undefined,
126
+ documentationLink: undefined,
127
+ layout: { type: "Column", children: ["text"] },
128
+ maxColumns: 1,
129
+ defaultColumns: 1,
130
+ appearance: { isBordered: false, hasBackground: false },
131
+ },
132
+ ],
133
+ defaultVariantKey: "default",
134
+ },
135
+ behavior: {
136
+ dataType: "Item",
137
+ items: { numberOfItems: 1, allowLinks: false },
138
+ entities: undefined,
139
+ },
140
+ editorOptions: {
141
+ onboarding: {
142
+ helpText: "Use for subheadings, indicating major subsections under the main sections.",
143
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY",
144
+ },
145
+ },
146
+ appearance: { isBordered: false, hasBackground: false },
147
+ },
148
+ {
149
+ id: "io.supernova.block.title3",
150
+ name: "Title 3",
151
+ description: "Further subsections",
152
+ category: "Text",
153
+ icon: undefined,
154
+ documentationLink: undefined,
155
+ searchKeywords: ["heading"],
156
+ item: {
157
+ properties: [
158
+ {
159
+ id: "text",
160
+ name: "Text",
161
+ type: "RichText",
162
+ description: undefined,
163
+ options: { placeholder: "Title 3", style: "Title3" },
164
+ variantOptions: undefined,
165
+ },
166
+ ],
167
+ appearance: { isBordered: false, hasBackground: false },
168
+ variants: [
169
+ {
170
+ id: "default",
171
+ name: "Default",
172
+ image: undefined,
173
+ description: undefined,
174
+ documentationLink: undefined,
175
+ layout: { type: "Column", children: ["text"] },
176
+ maxColumns: 1,
177
+ defaultColumns: 1,
178
+ appearance: { isBordered: false, hasBackground: false },
179
+ },
180
+ ],
181
+ defaultVariantKey: "default",
182
+ },
183
+ behavior: {
184
+ dataType: "Item",
185
+ items: { numberOfItems: 1, allowLinks: false },
186
+ entities: undefined,
187
+ },
188
+ editorOptions: {
189
+ onboarding: {
190
+ helpText: "Use for further subsections, detailing specific topics within the major subsections.",
191
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY",
192
+ },
193
+ },
194
+ appearance: { isBordered: false, hasBackground: false },
195
+ },
196
+ {
197
+ id: "io.supernova.block.title4",
198
+ name: "Title 4",
199
+ description: "Details in subsections",
200
+ category: "Text",
201
+ icon: undefined,
202
+ documentationLink: undefined,
203
+ searchKeywords: ["heading"],
204
+ item: {
205
+ properties: [
206
+ {
207
+ id: "text",
208
+ name: "Text",
209
+ type: "RichText",
210
+ description: undefined,
211
+ options: { placeholder: "Title 4", style: "Title4" },
212
+ variantOptions: undefined,
213
+ },
214
+ ],
215
+ appearance: { isBordered: false, hasBackground: false },
216
+ variants: [
217
+ {
218
+ id: "default",
219
+ name: "Default",
220
+ image: undefined,
221
+ description: undefined,
222
+ documentationLink: undefined,
223
+ layout: { type: "Column", children: ["text"] },
224
+ maxColumns: 1,
225
+ defaultColumns: 1,
226
+ appearance: { isBordered: false, hasBackground: false },
227
+ },
228
+ ],
229
+ defaultVariantKey: "default",
230
+ },
231
+ behavior: {
232
+ dataType: "Item",
233
+ items: { numberOfItems: 1, allowLinks: false },
234
+ entities: undefined,
235
+ },
236
+ editorOptions: {
237
+ onboarding: {
238
+ helpText: "Use for sub-divisions, elaborating on details within the subsections.",
239
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY",
240
+ },
241
+ },
242
+ appearance: { isBordered: false, hasBackground: false },
243
+ },
244
+ {
245
+ id: "io.supernova.block.title5",
246
+ name: "Title 5",
247
+ description: "Nuanced details or sub-points",
248
+ category: "Text",
249
+ icon: undefined,
250
+ documentationLink: undefined,
251
+ searchKeywords: ["heading"],
252
+ item: {
253
+ properties: [
254
+ {
255
+ id: "text",
256
+ name: "Text",
257
+ type: "RichText",
258
+ description: undefined,
259
+ options: { placeholder: "Title 5", style: "Title5" },
260
+ variantOptions: undefined,
261
+ },
262
+ ],
263
+ appearance: { isBordered: false, hasBackground: false },
264
+ variants: [
265
+ {
266
+ id: "default",
267
+ name: "Default",
268
+ image: undefined,
269
+ description: undefined,
270
+ documentationLink: undefined,
271
+ layout: { type: "Column", children: ["text"] },
272
+ maxColumns: 1,
273
+ defaultColumns: 1,
274
+ appearance: { isBordered: false, hasBackground: false },
275
+ },
276
+ ],
277
+ defaultVariantKey: "default",
278
+ },
279
+ behavior: {
280
+ dataType: "Item",
281
+ items: { numberOfItems: 1, allowLinks: false },
282
+ entities: undefined,
283
+ },
284
+ editorOptions: {
285
+ onboarding: {
286
+ helpText: "Use for nuanced details or specific sub-points within sub-divisions.",
287
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY",
288
+ },
289
+ },
290
+ appearance: { isBordered: false, hasBackground: false },
291
+ },
292
+ {
293
+ id: "io.supernova.block.ordered-list",
294
+ name: "Ordered list",
295
+ description: "A list with numbers",
296
+ category: "Text",
297
+ icon: undefined,
298
+ documentationLink: undefined,
299
+ searchKeywords: ["ol"],
300
+ item: {
301
+ properties: [
302
+ {
303
+ id: "text",
304
+ name: "Text",
305
+ type: "RichText",
306
+ description: undefined,
307
+ options: { style: "OL" },
308
+ variantOptions: undefined,
309
+ },
310
+ ],
311
+ appearance: { isBordered: false, hasBackground: false },
312
+ variants: [
313
+ {
314
+ id: "default",
315
+ name: "Default",
316
+ image: undefined,
317
+ description: undefined,
318
+ documentationLink: undefined,
319
+ layout: { type: "Column", children: ["text"] },
320
+ maxColumns: 1,
321
+ defaultColumns: 1,
322
+ appearance: { isBordered: false, hasBackground: false },
323
+ },
324
+ ],
325
+ defaultVariantKey: "default",
326
+ },
327
+ behavior: {
328
+ dataType: "Item",
329
+ items: { numberOfItems: 1, allowLinks: false },
330
+ entities: undefined,
331
+ },
332
+ editorOptions: {
333
+ onboarding: {
334
+ helpText: "Display a sequence of numbers or letters to indicate order.",
335
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/list-UC5iPZLK",
336
+ },
337
+ },
338
+ appearance: { isBordered: false, hasBackground: false },
339
+ },
340
+ {
341
+ id: "io.supernova.block.unordered-list",
342
+ name: "Unordered list",
343
+ description: "A list with bullet points",
344
+ category: "Text",
345
+ icon: undefined,
346
+ documentationLink: undefined,
347
+ searchKeywords: ["ul"],
348
+ item: {
349
+ properties: [
350
+ {
351
+ id: "text",
352
+ name: "Text",
353
+ type: "RichText",
354
+ description: undefined,
355
+ options: { style: "UL" },
356
+ variantOptions: undefined,
357
+ },
358
+ ],
359
+ appearance: { isBordered: false, hasBackground: false },
360
+ variants: [
361
+ {
362
+ id: "default",
363
+ name: "Default",
364
+ image: undefined,
365
+ description: undefined,
366
+ documentationLink: undefined,
367
+ layout: { type: "Column", children: ["text"] },
368
+ maxColumns: 1,
369
+ defaultColumns: 1,
370
+ appearance: { isBordered: false, hasBackground: false },
371
+ },
372
+ ],
373
+ defaultVariantKey: "default",
374
+ },
375
+ behavior: {
376
+ dataType: "Item",
377
+ items: { numberOfItems: 1, allowLinks: false },
378
+ entities: undefined,
379
+ },
380
+ editorOptions: {
381
+ onboarding: {
382
+ helpText: "A list of items displayed with bullet points without a specific sequence.",
383
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/list-UC5iPZLK",
384
+ },
385
+ },
386
+ appearance: { isBordered: false, hasBackground: false },
387
+ },
388
+ {
389
+ id: "io.supernova.block.divider",
390
+ name: "Divider",
391
+ description: "A section divider",
392
+ category: "Layout",
393
+ icon: undefined,
394
+ documentationLink: undefined,
395
+ searchKeywords: ["hr", "line", "rule", "separator"],
396
+ item: {
397
+ properties: [
398
+ {
399
+ id: "divider",
400
+ name: "Divider",
401
+ type: "Divider",
402
+ description: undefined,
403
+ options: {},
404
+ variantOptions: undefined,
405
+ },
406
+ ],
407
+ appearance: { isBordered: false, hasBackground: false },
408
+ variants: [
409
+ {
410
+ id: "default",
411
+ name: "Default",
412
+ image: undefined,
413
+ description: undefined,
414
+ documentationLink: undefined,
415
+ layout: { type: "Column", children: ["divider"] },
416
+ maxColumns: 1,
417
+ defaultColumns: 1,
418
+ appearance: { isBordered: false, hasBackground: false },
419
+ },
420
+ ],
421
+ defaultVariantKey: "default",
422
+ },
423
+ behavior: {
424
+ dataType: "Item",
425
+ items: { numberOfItems: 1, allowLinks: false },
426
+ entities: undefined,
427
+ },
428
+ editorOptions: {
429
+ onboarding: {
430
+ helpText: "A thematic break or horizontal rule, often used to separate content or define a change in topic.",
431
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/divider-tLuxooLH",
432
+ },
433
+ },
434
+ appearance: { isBordered: false, hasBackground: false },
435
+ },
436
+ {
437
+ id: "io.supernova.block.blockquote",
438
+ name: "Blockquote",
439
+ description: "Display a quotation",
440
+ category: "Text",
441
+ icon: undefined,
442
+ documentationLink: undefined,
443
+ searchKeywords: ["cite"],
444
+ item: {
445
+ properties: [
446
+ {
447
+ id: "text",
448
+ name: "Text",
449
+ type: "RichText",
450
+ description: undefined,
451
+ options: { placeholder: "Empty quote", style: "Quote" },
452
+ variantOptions: undefined,
453
+ },
454
+ ],
455
+ appearance: { isBordered: false, hasBackground: false },
456
+ variants: [
457
+ {
458
+ id: "default",
459
+ name: "Default",
460
+ image: undefined,
461
+ description: undefined,
462
+ documentationLink: undefined,
463
+ layout: { type: "Column", children: ["text"] },
464
+ maxColumns: 1,
465
+ defaultColumns: 1,
466
+ appearance: { isBordered: false, hasBackground: false },
467
+ },
468
+ ],
469
+ defaultVariantKey: "default",
470
+ },
471
+ behavior: {
472
+ dataType: "Item",
473
+ items: { numberOfItems: 1, allowLinks: false },
474
+ entities: undefined,
475
+ },
476
+ editorOptions: {
477
+ onboarding: {
478
+ helpText: "Use a blockquote to set off a quotation or cited content from the main text.",
479
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/blockquote-zYWAsb6X",
480
+ },
481
+ },
482
+ appearance: { isBordered: false, hasBackground: false },
483
+ },
484
+ {
485
+ id: "io.supernova.block.callout",
486
+ name: "Callout",
487
+ description: "Highlight a section of text",
488
+ category: "Text",
489
+ icon: undefined,
490
+ documentationLink: undefined,
491
+ searchKeywords: ["banner", "alert", "note", "tip", "warning"],
492
+ item: {
493
+ properties: [
494
+ {
495
+ id: "text",
496
+ name: "Text",
497
+ type: "RichText",
498
+ description: undefined,
499
+ options: { style: "Callout" },
500
+ variantOptions: undefined,
501
+ },
502
+ ],
503
+ appearance: { isBordered: false, hasBackground: false },
504
+ variants: [
505
+ {
506
+ id: "default",
507
+ name: "Default",
508
+ image: undefined,
509
+ description: undefined,
510
+ documentationLink: undefined,
511
+ layout: { type: "Column", children: ["text"] },
512
+ maxColumns: 1,
513
+ defaultColumns: 1,
514
+ appearance: { isBordered: false, hasBackground: false },
515
+ },
516
+ ],
517
+ defaultVariantKey: "default",
518
+ },
519
+ behavior: {
520
+ dataType: "Item",
521
+ items: { numberOfItems: 1, allowLinks: false },
522
+ entities: undefined,
523
+ },
524
+ editorOptions: {
525
+ onboarding: {
526
+ helpText: "Use to highlight a section of text.",
527
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/callout-ZPlZObD1",
528
+ },
529
+ },
530
+ appearance: { isBordered: false, hasBackground: false },
531
+ },
532
+ {
533
+ id: "io.supernova.block.image",
534
+ name: "Image",
535
+ description: "Display an image or Figma frame",
536
+ category: "Media",
537
+ icon: undefined,
538
+ documentationLink: undefined,
539
+ searchKeywords: ["image", "figma", "frame", "picture", "photo"],
540
+ item: {
541
+ properties: [
542
+ {
543
+ id: "image",
544
+ name: "Image",
545
+ type: "Image",
546
+ description: undefined,
547
+ options: { allowCaption: true },
548
+ variantOptions: undefined,
549
+ },
550
+ ],
551
+ appearance: { isBordered: false, hasBackground: false },
552
+ variants: [
553
+ {
554
+ id: "default",
555
+ name: "Default",
556
+ image: undefined,
557
+ description: undefined,
558
+ documentationLink: undefined,
559
+ layout: { type: "Column", children: ["image"] },
560
+ maxColumns: 1,
561
+ defaultColumns: 1,
562
+ appearance: { isBordered: false, hasBackground: false },
563
+ },
564
+ ],
565
+ defaultVariantKey: "default",
566
+ },
567
+ behavior: {
568
+ dataType: "Item",
569
+ items: { numberOfItems: 1, allowLinks: false },
570
+ entities: undefined,
571
+ },
572
+ editorOptions: {
573
+ onboarding: {
574
+ helpText: "Use to display an image or Figma frame.",
575
+ documentationLink:
576
+ "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/image-Ue8VdT8B",
577
+ },
578
+ },
579
+ appearance: { isBordered: false, hasBackground: false },
580
+ },
581
+ {
582
+ id: "io.supernova.block.shortcut-links",
583
+ name: "Shortcut links",
584
+ description: "Link to a page or external URL",
585
+ category: "Media",
586
+ icon: undefined,
587
+ documentationLink: undefined,
588
+ searchKeywords: [],
589
+ item: {
590
+ properties: [
591
+ {
592
+ id: "block.links.property.title",
593
+ name: "Title",
594
+ type: "RichText",
595
+ description: undefined,
596
+ options: { style: "Title5" },
597
+ variantOptions: undefined,
598
+ },
599
+ {
600
+ id: "block.links.property.description",
601
+ name: "Short description",
602
+ type: "RichText",
603
+ description: undefined,
604
+ options: { style: "Default", color: "NeutralFaded" },
605
+ variantOptions: undefined,
606
+ },
607
+ {
608
+ id: "block.links.property.image",
609
+ name: "Image",
610
+ type: "Image",
611
+ description: undefined,
612
+ options: { width: "Medium", aspectRatio: "Landscape", allowCaption: false },
613
+ variantOptions: {
614
+ iconOnTop: { width: "Icon", aspectRatio: "Square" },
615
+ iconOnLeft: { width: "Icon", aspectRatio: "Square" },
616
+ },
617
+ },
618
+ ],
619
+ appearance: { isBordered: false, hasBackground: false },
620
+ variants: [
621
+ {
622
+ id: "imageOnTop",
623
+ name: "Image on top",
624
+ image: "assets/variant-image-on-top.png",
625
+ description: undefined,
626
+ documentationLink: undefined,
627
+ layout: {
628
+ type: "Column",
629
+ children: ["block.links.property.image", "block.links.property.title", "block.links.property.description"],
630
+ },
631
+ maxColumns: 4,
632
+ defaultColumns: 1,
633
+ appearance: { isBordered: false, hasBackground: false },
634
+ },
635
+ {
636
+ id: "imageOnLeft",
637
+ name: "Image on left",
638
+ image: "assets/variant-image-on-left.png",
639
+ description: undefined,
640
+ documentationLink: undefined,
641
+ layout: {
642
+ type: "Row",
643
+ children: [
644
+ {
645
+ type: "Column",
646
+ columnResizing: "Hug",
647
+ children: ["block.links.property.image"],
648
+ },
649
+ {
650
+ type: "Column",
651
+ gap: "Small",
652
+ children: ["block.links.property.title", "block.links.property.description"],
653
+ },
654
+ ],
655
+ },
656
+ maxColumns: 1,
657
+ defaultColumns: 1,
658
+ appearance: { isBordered: false, hasBackground: false },
659
+ },
660
+ {
661
+ id: "iconOnTop",
662
+ name: "Icon on top",
663
+ image: "assets/variant-icon-on-top.png",
664
+ description: undefined,
665
+ documentationLink: undefined,
666
+ layout: {
667
+ type: "Column",
668
+ children: ["block.links.property.image", "block.links.property.title", "block.links.property.description"],
669
+ },
670
+ maxColumns: 4,
671
+ defaultColumns: 1,
672
+ appearance: { isBordered: false, hasBackground: false },
673
+ },
674
+ {
675
+ id: "iconOnLeft",
676
+ name: "Icon on left",
677
+ image: "assets/variant-icon-on-left.png",
678
+ description: undefined,
679
+ documentationLink: undefined,
680
+ layout: {
681
+ type: "Row",
682
+ children: [
683
+ {
684
+ type: "Column",
685
+ columnResizing: "Hug",
686
+ children: ["block.links.property.image"],
687
+ },
688
+ {
689
+ type: "Column",
690
+ gap: "Small",
691
+ children: ["block.links.property.title", "block.links.property.description"],
692
+ },
693
+ ],
694
+ },
695
+ maxColumns: 2,
696
+ defaultColumns: 1,
697
+ appearance: { isBordered: false, hasBackground: false },
698
+ },
699
+ ],
700
+ defaultVariantKey: "imageOnTop",
701
+ },
702
+ behavior: {
703
+ dataType: "Item",
704
+ items: { numberOfItems: -1, allowLinks: true },
705
+ entities: undefined,
706
+ },
707
+ editorOptions: {
708
+ onboarding: {
709
+ helpText: "Use link block to create single or multiple links to places in or out of your documentation.",
710
+ documentationLink:
711
+ "https://learn.supernova.io/latest/documentation/types-of-blocks/links/shortcuts/general-jVfNifo4",
712
+ },
713
+ },
714
+ appearance: { isBordered: false, hasBackground: false },
715
+ },
716
+ {
717
+ id: "io.supernova.block.color-accessibility-grid",
718
+ name: "Accessibility Color Grid",
719
+ description: "Visualize accessibility of your color tokens.",
720
+ category: "Tokens",
721
+ icon: undefined,
722
+ documentationLink: undefined,
723
+ searchKeywords: ["color", "accessibility", "grid", "contrast", "blind", "impairment"],
724
+ item: {
725
+ properties: [
726
+ {
727
+ id: "tokens",
728
+ name: "Tokens",
729
+ type: "Token",
730
+ description: undefined,
731
+ options: { allowedTypes: ["Color"], allowPropertySelection: false, allowThemeSelection: false },
732
+ variantOptions: undefined,
733
+ },
734
+ ],
735
+ appearance: { isBordered: false, hasBackground: false },
736
+ variants: [
737
+ {
738
+ id: "default",
739
+ name: "Default",
740
+ image: undefined,
741
+ description: undefined,
742
+ documentationLink: undefined,
743
+ layout: { type: "Column", children: ["tokens"] },
744
+ maxColumns: 1,
745
+ defaultColumns: 1,
746
+ appearance: { isBordered: false, hasBackground: false },
747
+ },
748
+ ],
749
+ defaultVariantKey: "default",
750
+ },
751
+ behavior: {
752
+ dataType: "Token",
753
+ items: undefined,
754
+ entities: { selectionType: "Group", maxSelected: 2 },
755
+ },
756
+ editorOptions: {
757
+ onboarding: {
758
+ helpText: "Visualize accessibility of your colors and compare token groups to one another.",
759
+ documentationLink: "https://learn.supernova.io",
760
+ },
761
+ },
762
+ appearance: { isBordered: false, hasBackground: false },
763
+ },
764
+ {
765
+ id: "io.supernova.block.embed",
766
+ name: "Embed",
767
+ description: "Embed a generic URL",
768
+ category: "Media",
769
+ icon: undefined,
770
+ documentationLink: undefined,
771
+ searchKeywords: ["embed", "url", "iframe", "site", "import"],
772
+ item: {
773
+ properties: [
774
+ {
775
+ id: "embedUrl",
776
+ name: "Embed URL",
777
+ type: "EmbedURL",
778
+ description: undefined,
779
+ options: {
780
+ allowCaption: true,
781
+ allowResize: true,
782
+ defaultHeight: 400,
783
+ urlValidationRegex: "^(https?://)?(www.)?.+$",
784
+ },
785
+ variantOptions: undefined,
786
+ },
787
+ ],
788
+ appearance: { isBordered: false, hasBackground: false },
789
+ variants: [
790
+ {
791
+ id: "default",
792
+ name: "Default",
793
+ image: undefined,
794
+ description: undefined,
795
+ documentationLink: undefined,
796
+ layout: { type: "Column", children: ["embedUrl"] },
797
+ maxColumns: 1,
798
+ defaultColumns: 1,
799
+ appearance: { isBordered: false, hasBackground: false },
800
+ },
801
+ ],
802
+ defaultVariantKey: "default",
803
+ },
804
+ behavior: {
805
+ dataType: "Item",
806
+ items: { numberOfItems: 1, allowLinks: false },
807
+ entities: undefined,
808
+ },
809
+ editorOptions: {
810
+ onboarding: {
811
+ helpText: "Embed any page to your documentation as an iframe.",
812
+ documentationLink:
813
+ "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/embed/public-url-2ZeRQ332",
814
+ },
815
+ },
816
+ appearance: { isBordered: false, hasBackground: false },
817
+ },
818
+ {
819
+ id: "io.supernova.block.embed-youtube",
820
+ name: "YouTube",
821
+ description: "Embed a Youtube video",
822
+ category: "Media",
823
+ icon: undefined,
824
+ documentationLink: undefined,
825
+ searchKeywords: ["embed", "video", "player", "upload"],
826
+ item: {
827
+ properties: [
828
+ {
829
+ id: "embed",
830
+ name: "Youtube URL",
831
+ type: "EmbedURL",
832
+ description: undefined,
833
+ options: {
834
+ allowCaption: false,
835
+ allowResize: false,
836
+ defaultHeight: 400,
837
+ urlValidationRegex: "^(https?://)?(www.)?(youtube.com|youtu.?be)/.+$",
838
+ },
839
+ variantOptions: undefined,
840
+ },
841
+ ],
842
+ appearance: { isBordered: false, hasBackground: false },
843
+ variants: [
844
+ {
845
+ id: "default",
846
+ name: "Default",
847
+ image: undefined,
848
+ description: undefined,
849
+ documentationLink: undefined,
850
+ layout: { type: "Column", children: ["embed"] },
851
+ maxColumns: 1,
852
+ defaultColumns: 1,
853
+ appearance: { isBordered: false, hasBackground: false },
854
+ },
855
+ ],
856
+ defaultVariantKey: "default",
857
+ },
858
+ behavior: {
859
+ dataType: "Item",
860
+ items: { numberOfItems: 1, allowLinks: false },
861
+ entities: undefined,
862
+ },
863
+ editorOptions: {
864
+ onboarding: {
865
+ helpText: "Embed a YouTube video to your documentation.",
866
+ documentationLink:
867
+ "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/youtube-Gh8VUrSF",
868
+ },
869
+ },
870
+ appearance: { isBordered: false, hasBackground: false },
871
+ },
872
+ {
873
+ id: "io.supernova.block.embed-lottie",
874
+ name: "Lottie animation",
875
+ description: "Preview a Lottie animation",
876
+ category: "Media",
877
+ icon: undefined,
878
+ documentationLink: undefined,
879
+ searchKeywords: ["embed", "lottie", "animation", "rive", "json"],
880
+ item: {
881
+ properties: [
882
+ {
883
+ id: "embed",
884
+ name: "Lottie URL",
885
+ type: "EmbedURL",
886
+ description: undefined,
887
+ options: {
888
+ allowCaption: false,
889
+ allowResize: true,
890
+ defaultHeight: 400,
891
+ urlValidationRegex:
892
+ "^(https?:\\/\\/)?([\\w\\d\\-\\.]+)\\.([\\w]+)(\\/[\\w\\d_\\-\\.\\/]*)?(\\.json|\\.lottie)$\n",
893
+ },
894
+ variantOptions: undefined,
895
+ },
896
+ {
897
+ id: "autoplay",
898
+ name: "Autoplay",
899
+ type: "Boolean",
900
+ description: undefined,
901
+ options: { defaultValue: true },
902
+ variantOptions: undefined,
903
+ },
904
+ {
905
+ id: "loop",
906
+ name: "Loop",
907
+ type: "Boolean",
908
+ description: undefined,
909
+ options: { defaultValue: true },
910
+ variantOptions: undefined,
911
+ },
912
+ ],
913
+ appearance: { isBordered: false, hasBackground: false },
914
+ variants: [
915
+ {
916
+ id: "default",
917
+ name: "Default",
918
+ image: undefined,
919
+ description: undefined,
920
+ documentationLink: undefined,
921
+ layout: { type: "Column", children: ["embed", "autoplay", "loop"] },
922
+ maxColumns: 1,
923
+ defaultColumns: 1,
924
+ appearance: { isBordered: false, hasBackground: false },
925
+ },
926
+ ],
927
+ defaultVariantKey: "default",
928
+ },
929
+ behavior: {
930
+ dataType: "Item",
931
+ items: { numberOfItems: 1, allowLinks: false },
932
+ entities: undefined,
933
+ },
934
+ editorOptions: {
935
+ onboarding: {
936
+ helpText: "Embed a Lottie animation to your documentation.",
937
+ documentationLink:
938
+ "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/lottie-preview-7CqFdGv9",
939
+ },
940
+ },
941
+ appearance: { isBordered: false, hasBackground: false },
942
+ },
943
+ {
944
+ id: "io.supernova.block.storybook",
945
+ name: "Storybook",
946
+ description: "Embed Storybook canvas",
947
+ category: "Media",
948
+ icon: undefined,
949
+ documentationLink: undefined,
950
+ searchKeywords: ["storybook", "story", "stories", "example", "preview", "code", "react"],
951
+ item: {
952
+ properties: [
953
+ {
954
+ id: "embed",
955
+ name: "Storybook URL",
956
+ type: "Storybook",
957
+ description: undefined,
958
+ options: {},
959
+ variantOptions: undefined,
960
+ },
961
+ ],
962
+ appearance: { isBordered: false, hasBackground: false },
963
+ variants: [
964
+ {
965
+ id: "default",
966
+ name: "Default",
967
+ image: undefined,
968
+ description: undefined,
969
+ documentationLink: undefined,
970
+ layout: { type: "Column", children: ["embed"] },
971
+ maxColumns: 1,
972
+ defaultColumns: 1,
973
+ appearance: { isBordered: false, hasBackground: false },
974
+ },
975
+ ],
976
+ defaultVariantKey: "default",
977
+ },
978
+ behavior: {
979
+ dataType: "Item",
980
+ items: { numberOfItems: 1, allowLinks: false },
981
+ entities: undefined,
982
+ },
983
+ editorOptions: {
984
+ onboarding: {
985
+ helpText: "Embed a Storybook story to your documentation.",
986
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/code/storybook-1EGPhwBl",
987
+ },
988
+ },
989
+ appearance: { isBordered: false, hasBackground: false },
990
+ },
991
+ {
992
+ id: "io.supernova.block.embed-figma",
993
+ name: "Figma embed",
994
+ description: "Embed a Figma canvas or prototype",
995
+ category: "Media",
996
+ icon: undefined,
997
+ documentationLink: undefined,
998
+ searchKeywords: ["embed", "figma", "design", "prototype", "canvas"],
999
+ item: {
1000
+ properties: [
1001
+ {
1002
+ id: "embed",
1003
+ name: "Figma URl",
1004
+ type: "EmbedURL",
1005
+ description: undefined,
1006
+ options: {
1007
+ allowCaption: false,
1008
+ allowResize: true,
1009
+ defaultHeight: 400,
1010
+ urlValidationRegex: "^(https?://)?(www.)?(figma.com)/.+$",
1011
+ },
1012
+ variantOptions: undefined,
1013
+ },
1014
+ ],
1015
+ appearance: { isBordered: false, hasBackground: false },
1016
+ variants: [
1017
+ {
1018
+ id: "default",
1019
+ name: "Default",
1020
+ image: undefined,
1021
+ description: undefined,
1022
+ documentationLink: undefined,
1023
+ layout: { type: "Column", children: ["embed"] },
1024
+ maxColumns: 1,
1025
+ defaultColumns: 1,
1026
+ appearance: { isBordered: false, hasBackground: false },
1027
+ },
1028
+ ],
1029
+ defaultVariantKey: "default",
1030
+ },
1031
+ behavior: {
1032
+ dataType: "Item",
1033
+ items: { numberOfItems: 1, allowLinks: false },
1034
+ entities: undefined,
1035
+ },
1036
+ editorOptions: {
1037
+ onboarding: {
1038
+ helpText: "Embed a Figma canvas or prototype to your documentation.",
1039
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/figma/embed-figma-GPNJsT8A",
1040
+ },
1041
+ },
1042
+ appearance: { isBordered: false, hasBackground: false },
1043
+ },
1044
+ {
1045
+ id: "io.supernova.block.markdown",
1046
+ name: "Markdown",
1047
+ description: "Render Markdown URL",
1048
+ category: "Other",
1049
+ icon: undefined,
1050
+ documentationLink: undefined,
1051
+ searchKeywords: ["md", "embed", "api", "table", "mdx"],
1052
+ item: {
1053
+ properties: [
1054
+ {
1055
+ id: "markdownUrl",
1056
+ name: "Markdown URL",
1057
+ type: "Markdown",
1058
+ description: undefined,
1059
+ options: {},
1060
+ variantOptions: undefined,
1061
+ },
1062
+ ],
1063
+ appearance: { isBordered: false, hasBackground: false },
1064
+ variants: [
1065
+ {
1066
+ id: "default",
1067
+ name: "Default",
1068
+ image: undefined,
1069
+ description: undefined,
1070
+ documentationLink: undefined,
1071
+ layout: { type: "Column", children: ["markdownUrl"] },
1072
+ maxColumns: 1,
1073
+ defaultColumns: 1,
1074
+ appearance: { isBordered: false, hasBackground: false },
1075
+ },
1076
+ ],
1077
+ defaultVariantKey: "default",
1078
+ },
1079
+ behavior: {
1080
+ dataType: "Item",
1081
+ items: { numberOfItems: 1, allowLinks: false },
1082
+ entities: undefined,
1083
+ },
1084
+ editorOptions: {
1085
+ onboarding: {
1086
+ helpText: "Embed and process markdown from URL.",
1087
+ documentationLink:
1088
+ "https://learn.supernova.io/latest/documentation/types-of-blocks/code/markdown/general-B8wQVOem",
1089
+ },
1090
+ },
1091
+ appearance: { isBordered: false, hasBackground: false },
1092
+ },
1093
+ {
1094
+ id: "io.supernova.block.table",
1095
+ name: "Table",
1096
+ description: "Display a simple table",
1097
+ category: "Layout",
1098
+ icon: undefined,
1099
+ documentationLink: undefined,
1100
+ searchKeywords: ["grid", "data", "spreadsheet", "api"],
1101
+ item: {
1102
+ properties: [
1103
+ {
1104
+ id: "table",
1105
+ name: "Table",
1106
+ type: "Table",
1107
+ description: undefined,
1108
+ options: {},
1109
+ variantOptions: undefined,
1110
+ },
1111
+ ],
1112
+ appearance: { isBordered: false, hasBackground: false },
1113
+ variants: [
1114
+ {
1115
+ id: "default",
1116
+ name: "Default",
1117
+ image: undefined,
1118
+ description: undefined,
1119
+ documentationLink: undefined,
1120
+ layout: { type: "Column", children: ["table"] },
1121
+ maxColumns: 1,
1122
+ defaultColumns: 1,
1123
+ appearance: { isBordered: false, hasBackground: false },
1124
+ },
1125
+ ],
1126
+ defaultVariantKey: "default",
1127
+ },
1128
+ behavior: {
1129
+ dataType: "Item",
1130
+ items: { numberOfItems: 1, allowLinks: false },
1131
+ entities: undefined,
1132
+ },
1133
+ editorOptions: {
1134
+ onboarding: {
1135
+ helpText: "Use for displaying data in a tabular format.",
1136
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/layout/table-R8KGnxej",
1137
+ },
1138
+ },
1139
+ appearance: { isBordered: false, hasBackground: false },
1140
+ },
1141
+ {
1142
+ id: "io.supernova.block.token-detail",
1143
+ name: "Token detail",
1144
+ description: "Show a single design tokens",
1145
+ category: "Tokens",
1146
+ icon: undefined,
1147
+ documentationLink: undefined,
1148
+ searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
1149
+ item: {
1150
+ properties: [
1151
+ {
1152
+ id: "tokens",
1153
+ name: "Tokens",
1154
+ type: "Token",
1155
+ description: undefined,
1156
+ options: {},
1157
+ variantOptions: undefined,
1158
+ },
1159
+ ],
1160
+ appearance: { isBordered: false, hasBackground: false },
1161
+ variants: [
1162
+ {
1163
+ id: "table",
1164
+ name: "Table Row",
1165
+ image: "assets/variant-table.png",
1166
+ description: undefined,
1167
+ documentationLink: undefined,
1168
+ layout: { type: "Column", children: ["tokens"] },
1169
+ maxColumns: 1,
1170
+ defaultColumns: 1,
1171
+ appearance: { isBordered: false, hasBackground: false },
1172
+ },
1173
+ {
1174
+ id: "grid",
1175
+ name: "Grid Item",
1176
+ image: "assets/variant-grid.png",
1177
+ description: undefined,
1178
+ documentationLink: undefined,
1179
+ layout: { type: "Column", children: ["tokens"] },
1180
+ maxColumns: 1,
1181
+ defaultColumns: 1,
1182
+ appearance: { isBordered: false, hasBackground: false },
1183
+ },
1184
+ {
1185
+ id: "color-stack",
1186
+ name: "Color stack item",
1187
+ image: "assets/variant-color-stack.png",
1188
+ description: undefined,
1189
+ documentationLink: undefined,
1190
+ layout: { type: "Column", children: ["tokens"] },
1191
+ maxColumns: 1,
1192
+ defaultColumns: 1,
1193
+ appearance: { isBordered: false, hasBackground: false },
1194
+ },
1195
+ ],
1196
+ defaultVariantKey: "table",
1197
+ },
1198
+ behavior: {
1199
+ dataType: "Token",
1200
+ items: undefined,
1201
+ entities: { selectionType: "Entity", maxSelected: 1 },
1202
+ },
1203
+ editorOptions: {
1204
+ onboarding: {
1205
+ helpText: "Show a single design token.",
1206
+ documentationLink:
1207
+ "https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-detail-04",
1208
+ },
1209
+ },
1210
+ appearance: { isBordered: false, hasBackground: false },
1211
+ },
1212
+ {
1213
+ id: "io.supernova.block.token-list",
1214
+ name: "Token list",
1215
+ description: "Show a list of design tokens",
1216
+ category: "Tokens",
1217
+ icon: undefined,
1218
+ documentationLink: undefined,
1219
+ searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme", "accessibility", "contrast"],
1220
+ item: {
1221
+ properties: [
1222
+ {
1223
+ id: "tokens",
1224
+ name: "Tokens",
1225
+ type: "Token",
1226
+ description: undefined,
1227
+ options: {},
1228
+ variantOptions: undefined,
1229
+ },
1230
+ ],
1231
+ appearance: { isBordered: false, hasBackground: false },
1232
+ variants: [
1233
+ {
1234
+ id: "table",
1235
+ name: "Table",
1236
+ image: "assets/variant-table.png",
1237
+ description: undefined,
1238
+ documentationLink: undefined,
1239
+ layout: { type: "Column", children: ["tokens"] },
1240
+ maxColumns: 1,
1241
+ defaultColumns: 1,
1242
+ appearance: { isBordered: false, hasBackground: false },
1243
+ },
1244
+ {
1245
+ id: "grid",
1246
+ name: "Grid",
1247
+ image: "assets/variant-grid.png",
1248
+ description: undefined,
1249
+ documentationLink: undefined,
1250
+ layout: { type: "Column", children: ["tokens"] },
1251
+ maxColumns: 4,
1252
+ defaultColumns: 1,
1253
+ appearance: { isBordered: false, hasBackground: false },
1254
+ },
1255
+ {
1256
+ id: "color-stack",
1257
+ name: "Color stack",
1258
+ image: "assets/variant-color-stack.png",
1259
+ description: undefined,
1260
+ documentationLink: undefined,
1261
+ layout: { type: "Column", children: ["tokens"] },
1262
+ maxColumns: 1,
1263
+ defaultColumns: 1,
1264
+ appearance: { isBordered: false, hasBackground: false },
1265
+ },
1266
+ {
1267
+ id: "color-contrast-grid",
1268
+ name: "Color contrast grid",
1269
+ image: "assets/variant-color-contrast-grid.png",
1270
+ description: undefined,
1271
+ documentationLink: undefined,
1272
+ layout: { type: "Column", children: ["tokens"] },
1273
+ maxColumns: 1,
1274
+ defaultColumns: 1,
1275
+ appearance: { isBordered: false, hasBackground: false },
1276
+ },
1277
+ ],
1278
+ defaultVariantKey: "table",
1279
+ },
1280
+ behavior: {
1281
+ dataType: "Token",
1282
+ items: undefined,
1283
+ entities: { selectionType: "Entity", maxSelected: 0 },
1284
+ },
1285
+ editorOptions: {
1286
+ onboarding: {
1287
+ helpText:
1288
+ "Show a list of design tokens. You can use this block to create a list of colors, typography, spacing, grid, or any other token type.",
1289
+ documentationLink:
1290
+ "https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-list-06",
1291
+ },
1292
+ },
1293
+ appearance: { isBordered: false, hasBackground: false },
1294
+ },
1295
+ {
1296
+ id: "io.supernova.block.token-group",
1297
+ name: "Token group",
1298
+ description: "Show a group of design tokens",
1299
+ category: "Tokens",
1300
+ icon: undefined,
1301
+ documentationLink: undefined,
1302
+ searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme", "accessibility", "contrast"],
1303
+ item: {
1304
+ properties: [
1305
+ {
1306
+ id: "tokens",
1307
+ name: "Tokens",
1308
+ type: "Token",
1309
+ description: undefined,
1310
+ options: {},
1311
+ variantOptions: undefined,
1312
+ },
1313
+ ],
1314
+ appearance: { isBordered: false, hasBackground: false },
1315
+ variants: [
1316
+ {
1317
+ id: "table",
1318
+ name: "Table",
1319
+ image: "assets/variant-table.png",
1320
+ description: undefined,
1321
+ documentationLink: undefined,
1322
+ layout: { type: "Column", children: ["tokens"] },
1323
+ maxColumns: 1,
1324
+ defaultColumns: 1,
1325
+ appearance: { isBordered: false, hasBackground: false },
1326
+ },
1327
+ {
1328
+ id: "grid",
1329
+ name: "Grid",
1330
+ image: "assets/variant-grid.png",
1331
+ description: undefined,
1332
+ documentationLink: undefined,
1333
+ layout: { type: "Column", children: ["tokens"] },
1334
+ maxColumns: 4,
1335
+ defaultColumns: 1,
1336
+ appearance: { isBordered: false, hasBackground: false },
1337
+ },
1338
+ {
1339
+ id: "color-stack",
1340
+ name: "Color stack",
1341
+ image: "assets/variant-color-stack.png",
1342
+ description: undefined,
1343
+ documentationLink: undefined,
1344
+ layout: { type: "Column", children: ["tokens"] },
1345
+ maxColumns: 2,
1346
+ defaultColumns: 1,
1347
+ appearance: { isBordered: false, hasBackground: false },
1348
+ },
1349
+ {
1350
+ id: "color-contrast-grid",
1351
+ name: "Color contrast grid",
1352
+ image: "assets/variant-color-contrast-grid.png",
1353
+ description: undefined,
1354
+ documentationLink: undefined,
1355
+ layout: { type: "Column", children: ["tokens"] },
1356
+ maxColumns: 1,
1357
+ defaultColumns: 1,
1358
+ appearance: { isBordered: false, hasBackground: false },
1359
+ },
1360
+ ],
1361
+ defaultVariantKey: "table",
1362
+ },
1363
+ behavior: {
1364
+ dataType: "Token",
1365
+ items: undefined,
1366
+ entities: { selectionType: "Group", maxSelected: 1 },
1367
+ },
1368
+ editorOptions: {
1369
+ onboarding: {
1370
+ helpText:
1371
+ "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.",
1372
+ documentationLink:
1373
+ "https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-group-09",
1374
+ },
1375
+ },
1376
+ appearance: { isBordered: false, hasBackground: false },
1377
+ },
1378
+ ];