@supernova-studio/client 0.30.1 → 0.32.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
@@ -914,16 +914,18 @@ var PageBlockImageAlignment = z35.enum(["Left", "Center", "Stretch"]);
914
914
  var PageBlockTableCellAlignment = z35.enum(["Left", "Center", "Right"]);
915
915
  var PageBlockPreviewContainerSize = z35.enum(["Centered", "NaturalHeight"]);
916
916
  var PageBlockThemeDisplayMode = z35.enum(["Split", "Override"]);
917
+ var PageBlockImageResourceReference = z35.object({
918
+ resourceId: z35.string(),
919
+ url: z35.string()
920
+ });
921
+ var PageBlockResourceFrameNodeReference = z35.object({
922
+ sourceId: z35.string(),
923
+ frameReferenceId: z35.string()
924
+ });
917
925
  var PageBlockImageReference = z35.object({
918
926
  type: PageBlockImageType,
919
- resource: z35.object({
920
- url: z35.string(),
921
- resourceId: z35.string()
922
- }).optional(),
923
- figmaFile: z35.object({
924
- sourceId: z35.string(),
925
- frameReferenceId: z35.string()
926
- }).optional()
927
+ resource: PageBlockImageResourceReference.optional(),
928
+ figmaFile: PageBlockResourceFrameNodeReference.optional()
927
929
  });
928
930
  var PageBlockColorV2 = z35.object({
929
931
  value: z35.string(),
@@ -1022,10 +1024,10 @@ var PageBlockItemEmbedValue = z35.object({
1022
1024
  }).optional()
1023
1025
  });
1024
1026
  var PageBlockItemFigmaNodeValue = z35.object({
1025
- selectedPropertyIds: z35.array(z35.string()).optional(),
1026
1027
  showSearch: z35.boolean().optional(),
1027
1028
  previewContainerSize: PageBlockPreviewContainerSize.optional(),
1028
1029
  backgroundColor: PageBlockColorV2.optional(),
1030
+ showFrameDetails: z35.boolean().optional(),
1029
1031
  value: z35.array(
1030
1032
  z35.object({
1031
1033
  entityId: z35.string(),
@@ -1157,10 +1159,6 @@ var DocumentationPageDataV1 = z39.object({
1157
1159
  blocks: z39.array(PageBlockV1),
1158
1160
  configuration: nullishToOptional(DocumentationItemConfigurationV1)
1159
1161
  });
1160
- var DocumentationPageElementDataV1 = z39.object({
1161
- dataVersion: z39.literal(1).optional().default(1),
1162
- value: DocumentationPageDataV1
1163
- });
1164
1162
  var DocumentationItemHeaderV2 = z40.object({
1165
1163
  description: z40.string(),
1166
1164
  alignment: DocumentationItemHeaderAlignmentSchema,
@@ -1186,10 +1184,6 @@ var DocumentationItemConfigurationV2 = z41.object({
1186
1184
  var DocumentationPageDataV2 = z42.object({
1187
1185
  configuration: nullishToOptional(DocumentationItemConfigurationV2)
1188
1186
  });
1189
- var DocumentationPageElementDataV2 = z42.object({
1190
- value: DocumentationPageDataV1,
1191
- valueV2: DocumentationPageDataV2.optional()
1192
- });
1193
1187
  var DesignElementOrigin = z43.object({
1194
1188
  id: z43.string(),
1195
1189
  sourceId: z43.string(),
@@ -1331,18 +1325,10 @@ var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
1331
1325
  var GradientTokenValue = z52.array(GradientLayerData);
1332
1326
  var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
1333
1327
  var DocumentationGroupBehavior = z53.enum(["Group", "Tabs"]);
1334
- var ElementGroupDataDeprecated = z53.object({
1335
- behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
1336
- configuration: nullishToOptional(DocumentationItemConfigurationV1)
1337
- });
1338
1328
  var ElementGroupDataV2 = z53.object({
1339
1329
  behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
1340
1330
  configuration: nullishToOptional(DocumentationItemConfigurationV2)
1341
1331
  });
1342
- var ElementGroupElementData = z53.object({
1343
- value: ElementGroupDataDeprecated.optional(),
1344
- valueV2: ElementGroupDataV2.optional()
1345
- });
1346
1332
  var LetterSpacingUnit = z54.enum(["Pixels", "Rem", "Percent"]);
1347
1333
  var LetterSpacingValue = z54.object({
1348
1334
  unit: LetterSpacingUnit,
@@ -1936,7 +1922,8 @@ function zeroNumberByDefault2() {
1936
1922
  var PageBlockDefinitionAppearance = z89.object({
1937
1923
  isBordered: z89.boolean().optional(),
1938
1924
  hasBackground: z89.boolean().optional(),
1939
- isEditorPresentationDifferent: z89.boolean().optional()
1925
+ isEditorPresentationDifferent: z89.boolean().optional(),
1926
+ showBlockHeaderInEditor: z89.boolean().optional()
1940
1927
  });
1941
1928
  var PageBlockDefinitionLayoutType = z90.enum(["Column", "Row"]);
1942
1929
  var PageBlockDefinitionLayoutGap = z90.enum(["Small", "Medium", "Large", "None"]);
@@ -2011,7 +1998,8 @@ var PageBlockDefinitionTextPropertyStyle = z91.enum([
2011
1998
  "DefaultSemibold",
2012
1999
  "Small",
2013
2000
  "SmallBold",
2014
- "SmallSemibold"
2001
+ "SmallSemibold",
2002
+ "Custom"
2015
2003
  ]);
2016
2004
  var PageBlockDefinitionTextPropertyColor = z91.enum(["Neutral", "NeutralFaded"]);
2017
2005
  var PageBlockDefinitionBooleanPropertyStyle = z91.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
@@ -2608,13 +2596,13 @@ var PulsarContributionVariant = z118.object({
2608
2596
  thumbnailURL: nullishToOptional(z118.string())
2609
2597
  });
2610
2598
  var PulsarCustomBlock = z118.object({
2611
- title: z118.string(),
2599
+ title: nullishToOptional(z118.string()),
2612
2600
  key: z118.string(),
2613
- category: z118.string(),
2601
+ category: nullishToOptional(z118.string()),
2614
2602
  description: nullishToOptional(z118.string()),
2615
- iconURL: z118.string(),
2616
- mode: z118.enum(["array", "block"]),
2617
- properties: z118.array(PulsarBaseProperty)
2603
+ iconURL: nullishToOptional(z118.string()),
2604
+ mode: nullishToOptional(z118.enum(["array", "block"])),
2605
+ properties: nullishToOptional(z118.array(PulsarBaseProperty)).transform((v) => v ?? [])
2618
2606
  });
2619
2607
  var ExporterType = z119.enum(["code", "documentation"]);
2620
2608
  var ExporterSource = z119.enum(["git", "upload"]);
@@ -3774,8 +3762,9 @@ var DTODuplicateDocumentationGroupInput = z135.object({
3774
3762
  var DTOCreateDocumentationTabInput = z135.object({
3775
3763
  // New group persistent id
3776
3764
  persistentId: z135.string().uuid(),
3777
- // Page that will become first tab of the tab group
3778
- fromPagePersistentId: z135.string(),
3765
+ // If this is page, we will attempt to convert it to tab
3766
+ // If this is tab group, we will add a new tab to it
3767
+ tabContainerPersistentId: z135.string(),
3779
3768
  tabName: z135.string()
3780
3769
  });
3781
3770
  var DTODeleteDocumentationTabGroupInput = z135.object({
@@ -4183,7 +4172,9 @@ function documentationHierarchyToYjs(doc, transaction) {
4183
4172
  transaction.groups.forEach((group) => {
4184
4173
  const sanitizedGroup = {
4185
4174
  ...group,
4186
- data: {}
4175
+ data: {
4176
+ behavior: group.data?.behavior
4177
+ }
4187
4178
  };
4188
4179
  groupsMap.set(group.id, JSON.parse(JSON.stringify(sanitizedGroup)));
4189
4180
  });
@@ -4625,6 +4616,9 @@ var newSchema = {
4625
4616
  attrs: {
4626
4617
  id: {
4627
4618
  default: null
4619
+ },
4620
+ variantId: {
4621
+ default: null
4628
4622
  }
4629
4623
  },
4630
4624
  parseDOM: [
@@ -5023,35 +5017,166 @@ var BlockDefinitionUtils = {
5023
5017
 
5024
5018
  // src/yjs/docs-editor/blocks-to-prosemirror.ts
5025
5019
  import { prosemirrorJSONToYXmlFragment } from "y-prosemirror";
5020
+
5021
+ // src/yjs/docs-editor/list-tree-builder.ts
5022
+ var ListTreeBuilder = class {
5023
+ add(block, multiRichTextProperty) {
5024
+ const list = this.createList(block, multiRichTextProperty);
5025
+ if (!this.rootNode) {
5026
+ this.rootNode = list;
5027
+ return void 0;
5028
+ }
5029
+ if (block.data.indentLevel <= 0) {
5030
+ if (this.rootNode.listType === list.listType) {
5031
+ this.rootNode.children.push(...list.leadingChildren);
5032
+ return;
5033
+ } else {
5034
+ const flushed = this.flush();
5035
+ this.rootNode = list;
5036
+ return flushed;
5037
+ }
5038
+ }
5039
+ const listParent = this.getParentOfDepth(block.data.indentLevel);
5040
+ const lastChild = listParent.children[listParent.children.length - 1];
5041
+ if (lastChild?.type === "List") {
5042
+ lastChild.children.push(...list.leadingChildren);
5043
+ return;
5044
+ } else {
5045
+ listParent.children.push(list);
5046
+ }
5047
+ }
5048
+ flush() {
5049
+ const node = this.rootNode;
5050
+ this.rootNode = void 0;
5051
+ return node;
5052
+ }
5053
+ getParentOfDepth(depth) {
5054
+ if (!this.rootNode || depth <= 0)
5055
+ throw new Error("Invalid state");
5056
+ let currentNode = this.rootNode;
5057
+ let currentDepth = depth - 1;
5058
+ while (currentDepth > 0) {
5059
+ if (currentNode.children.length === 0)
5060
+ return currentNode;
5061
+ const lastChild = currentNode.children[currentNode.children.length - 1];
5062
+ if (lastChild.type !== "List") {
5063
+ return currentNode;
5064
+ }
5065
+ currentNode = lastChild;
5066
+ currentDepth--;
5067
+ }
5068
+ return currentNode;
5069
+ }
5070
+ // next(block: PageBlockEditorModel, multiRichTextProperty: PageBlockDefinitionProperty): ListNode | undefined {
5071
+ // console.log("Next");
5072
+ // const list = this.createList(block, multiRichTextProperty);
5073
+ // if (this.currentList) {
5074
+ // if (this.currentList.listType === list.listType) {
5075
+ // // Merge items into the current list
5076
+ // this.currentList.children.push(...list.leadingChildren);
5077
+ // return undefined;
5078
+ // } else {
5079
+ // // Close the current list and start a new one
5080
+ // if (!this.currentParentList) {
5081
+ // const flushed = this.flush();
5082
+ // this.currentList = list;
5083
+ // return flushed;
5084
+ // } else {
5085
+ // this.currentList = list;
5086
+ // this.currentParentList.children.push(list);
5087
+ // this.parentMap.set(list, this.currentParentList);
5088
+ // return undefined;
5089
+ // }
5090
+ // }
5091
+ // } else {
5092
+ // this.currentList = list;
5093
+ // return undefined;
5094
+ // }
5095
+ // }
5096
+ // stepIn(block: PageBlockEditorModel, multiRichTextProperty: PageBlockDefinitionProperty): void {
5097
+ // console.log("Step in");
5098
+ // if (!this.currentList) {
5099
+ // throw new Error("Cannot step in without a list");
5100
+ // }
5101
+ // const list = this.createList(block, multiRichTextProperty);
5102
+ // this.currentParentList = this.currentList;
5103
+ // this.currentList = list;
5104
+ // this.currentParentList.children.push(list);
5105
+ // this.parentMap.set(list, this.currentParentList);
5106
+ // }
5107
+ // stepOut(block: PageBlockEditorModel, multiRichTextProperty: PageBlockDefinitionProperty): ListNode | undefined {
5108
+ // console.log("Step out");
5109
+ // if (!this.currentList) {
5110
+ // throw new Error("Cannot step out without a list");
5111
+ // }
5112
+ // if (!this.currentParentList) {
5113
+ // throw new Error("Cannot step out without a parent list");
5114
+ // }
5115
+ // const newCurrentList = this.currentParentList;
5116
+ // const newParent = this.parentMap.get(newCurrentList);
5117
+ // this.currentList = newCurrentList;
5118
+ // this.currentParentList = newParent;
5119
+ // return this.next(block, multiRichTextProperty);
5120
+ // }
5121
+ // flush(): ListNode | undefined {
5122
+ // const result = this.currentList;
5123
+ // this.currentList = undefined;
5124
+ // this.currentParentList = undefined;
5125
+ // this.parentMap.clear();
5126
+ // return result;
5127
+ // }
5128
+ createList(block, multiRichTextProperty) {
5129
+ const blockItem = BlockParsingUtils.singleBlockItem(block);
5130
+ const multiRichTextValue = BlockParsingUtils.multiRichTextPropertyValue(blockItem, multiRichTextProperty.id);
5131
+ const parsedOptions = PageBlockDefinitionMutiRichTextOptions.optional().parse(multiRichTextProperty.options);
5132
+ const style = parsedOptions?.multiRichTextStyle ?? "Default";
5133
+ const leadingChildren = multiRichTextValue.value.map((t) => {
5134
+ return {
5135
+ type: "ListItem",
5136
+ text: t
5137
+ };
5138
+ });
5139
+ if (!leadingChildren.length) {
5140
+ leadingChildren.push({ type: "ListItem", text: { spans: [] } });
5141
+ }
5142
+ return {
5143
+ type: "List",
5144
+ listType: style === "OL" ? "Ordered" : "Unordered",
5145
+ leadingChildren,
5146
+ block,
5147
+ children: []
5148
+ };
5149
+ }
5150
+ };
5151
+
5152
+ // src/yjs/docs-editor/blocks-to-prosemirror.ts
5026
5153
  function pageToYXmlFragment(page, definitions, fragment) {
5027
5154
  const doc = pageToProsemirrorDoc(page, definitions);
5028
5155
  return prosemirrorJSONToYXmlFragment(pmSchema, doc, fragment);
5029
5156
  }
5030
5157
  function pageToProsemirrorDoc(page, definitions) {
5031
5158
  const definitionsMap = mapByUnique(definitions, (d) => d.id);
5159
+ const children = [];
5160
+ let blockBuffer = [];
5161
+ page.blocks.forEach((b) => {
5162
+ if (b.type === "Block") {
5163
+ blockBuffer.push(b);
5164
+ } else if (b.type === "Section") {
5165
+ if (blockBuffer.length) {
5166
+ children.push(...blocksToProsemirrorNodes(blockBuffer, definitionsMap));
5167
+ blockBuffer = [];
5168
+ }
5169
+ children.push(internalSectionToProsemirrorNode(b, definitionsMap));
5170
+ }
5171
+ });
5172
+ if (blockBuffer.length) {
5173
+ children.push(...blocksToProsemirrorNodes(blockBuffer, definitionsMap));
5174
+ }
5032
5175
  return {
5033
5176
  type: "doc",
5034
- content: page.blocks.map((b) => {
5035
- switch (b.type) {
5036
- case "Block":
5037
- return blockToProsemirrorNode(b, blockDefinitionForBlock(b, definitions));
5038
- case "Section":
5039
- return internalSectionToProsemirrorNode(b, definitionsMap);
5040
- }
5041
- }).filter(nonNullFilter)
5177
+ content: children
5042
5178
  };
5043
5179
  }
5044
- function blockDefinitionForBlock(block, definitions) {
5045
- const definition = definitions.find((d) => d.id === block.data.packageId);
5046
- if (!definition) {
5047
- throw new Error(`Could not find definition for ${block.id} (${block.data.packageId})`);
5048
- }
5049
- return definition;
5050
- }
5051
- function sectionToProsemirrorNode(section, definitions) {
5052
- const definitionsMap = mapByUnique(definitions, (d) => d.id);
5053
- return internalSectionToProsemirrorNode(section, definitionsMap);
5054
- }
5055
5180
  function internalSectionToProsemirrorNode(section, definitionsMap) {
5056
5181
  return {
5057
5182
  type: "tabsSection",
@@ -5073,9 +5198,7 @@ function sectionItemToProsemirrorNode(sectionItem, definitionsMap) {
5073
5198
  };
5074
5199
  }
5075
5200
  function sectionColumnToProsemirrorNode(sectionColumn, definitionsMap) {
5076
- const blocks2 = sectionColumn.blocks.map((block) => {
5077
- return internalBlockToProsemirrorNode(block, definitionsMap);
5078
- }).filter(nonNullFilter);
5201
+ const blocks2 = blocksToProsemirrorNodes(sectionColumn.blocks, definitionsMap);
5079
5202
  if (!blocks2.length) {
5080
5203
  blocks2.push({
5081
5204
  type: "paragraph",
@@ -5093,12 +5216,35 @@ function sectionColumnToProsemirrorNode(sectionColumn, definitionsMap) {
5093
5216
  content: blocks2
5094
5217
  };
5095
5218
  }
5096
- function internalBlockToProsemirrorNode(block, definitionsMap) {
5097
- const definition = definitionsMap.get(block.data.packageId);
5098
- if (!definition) {
5099
- throw SupernovaException.shouldNotHappen(`Could not find definition for ${block.id} (${block.data.packageId})`);
5219
+ function blocksToProsemirrorNodes(blocks2, definitionsMap) {
5220
+ const result = [];
5221
+ const listTreeBuilder = new ListTreeBuilder();
5222
+ blocks2.forEach((b) => {
5223
+ const definition = definitionsMap.get(b.data.packageId);
5224
+ if (!definition) {
5225
+ console.warn(`Could not find definition for ${b.id} (${b.data.packageId})`);
5226
+ return;
5227
+ }
5228
+ const multiRichTextProp = BlockDefinitionUtils.firstMultiRichTextProperty(definition);
5229
+ if (multiRichTextProp) {
5230
+ const node = listTreeBuilder.add(b, multiRichTextProp);
5231
+ if (node) {
5232
+ result.push(serializeAsMultiRichTextBlock(node));
5233
+ }
5234
+ } else {
5235
+ const tree2 = listTreeBuilder.flush();
5236
+ if (tree2) {
5237
+ result.push(serializeAsMultiRichTextBlock(tree2));
5238
+ }
5239
+ const node = blockToProsemirrorNode(b, definition);
5240
+ node && result.push(node);
5241
+ }
5242
+ });
5243
+ const tree = listTreeBuilder.flush();
5244
+ if (tree) {
5245
+ result.push(serializeAsMultiRichTextBlock(tree));
5100
5246
  }
5101
- return blockToProsemirrorNode(block, definition);
5247
+ return result;
5102
5248
  }
5103
5249
  function blockToProsemirrorNode(block, definition) {
5104
5250
  const richTextProperty = BlockDefinitionUtils.firstRichTextProperty(definition);
@@ -5109,14 +5255,6 @@ function blockToProsemirrorNode(block, definition) {
5109
5255
  property: richTextProperty
5110
5256
  });
5111
5257
  }
5112
- const multiRichTextProperty = BlockDefinitionUtils.firstMultiRichTextProperty(definition);
5113
- if (multiRichTextProperty) {
5114
- return serializeAsMultiRichTextBlock({
5115
- block,
5116
- definition,
5117
- property: multiRichTextProperty
5118
- });
5119
- }
5120
5258
  const tableProperty = BlockDefinitionUtils.firstTableProperty(definition);
5121
5259
  if (tableProperty) {
5122
5260
  return serializeAsTable({
@@ -5158,7 +5296,7 @@ function serializeAsRichTextBlock(input) {
5158
5296
  function serializeAsParagraph(input) {
5159
5297
  return {
5160
5298
  type: "paragraph",
5161
- attrs: serializeBlockNodeAttributes(input),
5299
+ attrs: serializeBlockNodeAttributes(input.block),
5162
5300
  ...serializeRichTextNodePart(input.richTextPropertyValue.value)
5163
5301
  };
5164
5302
  }
@@ -5166,7 +5304,7 @@ function serializeAsHeading(input) {
5166
5304
  return {
5167
5305
  type: "heading",
5168
5306
  attrs: {
5169
- ...serializeBlockNodeAttributes(input),
5307
+ ...serializeBlockNodeAttributes(input.block),
5170
5308
  level: richTextHeadingLevel(input.property)
5171
5309
  },
5172
5310
  ...serializeRichTextNodePart(input.richTextPropertyValue.value)
@@ -5175,7 +5313,7 @@ function serializeAsHeading(input) {
5175
5313
  function serializeAsBlockquote(input) {
5176
5314
  return {
5177
5315
  type: "blockquote",
5178
- attrs: serializeBlockNodeAttributes(input),
5316
+ attrs: serializeBlockNodeAttributes(input.block),
5179
5317
  ...serializeRichTextNodePart(input.richTextPropertyValue.value)
5180
5318
  };
5181
5319
  }
@@ -5184,62 +5322,70 @@ function serializeAsCallout(input) {
5184
5322
  return {
5185
5323
  type: "callout",
5186
5324
  attrs: {
5187
- ...serializeBlockNodeAttributes(input),
5325
+ ...serializeBlockNodeAttributes(input.block),
5188
5326
  type: serializeCalloutType(calloutType)
5189
5327
  },
5190
5328
  ...serializeRichTextNodePart(input.richTextPropertyValue.value)
5191
5329
  };
5192
5330
  }
5193
- function serializeAsMultiRichTextBlock(input) {
5194
- const { block, definition, property: multiRichTextProperty } = input;
5195
- const blockItem = BlockParsingUtils.singleBlockItem(block);
5196
- const textPropertyValue = BlockParsingUtils.multiRichTextPropertyValue(blockItem, multiRichTextProperty.id);
5197
- const enrichedInput = { ...input, multiRichTextPropertyValue: textPropertyValue };
5198
- const parsedOptions = PageBlockDefinitionMutiRichTextOptions.optional().parse(multiRichTextProperty.options);
5199
- const style = parsedOptions?.multiRichTextStyle ?? "Default";
5200
- switch (style) {
5201
- case "Default":
5202
- return serializeAsMultiParagraph(enrichedInput);
5203
- case "OL":
5204
- return serializeAsOrderedList(enrichedInput);
5205
- case "UL":
5206
- return serializeAsUnorderedList(enrichedInput);
5331
+ function serializeAsMultiRichTextBlock(node) {
5332
+ switch (node.listType) {
5333
+ case "Ordered":
5334
+ return serializeAsOrderedList(node);
5335
+ case "Unordered":
5336
+ return serializeAsUnorderedList(node);
5207
5337
  }
5208
5338
  }
5209
- function serializeAsMultiParagraph(input) {
5210
- return {
5211
- type: "bulletList",
5212
- attrs: {
5213
- ...serializeBlockNodeAttributes(input)
5214
- },
5215
- content: input.multiRichTextPropertyValue.value.map(serializeAsListItem)
5216
- };
5217
- }
5218
- function serializeAsOrderedList(input) {
5339
+ function serializeAsOrderedList(tree) {
5219
5340
  return {
5220
5341
  type: "orderedList",
5221
5342
  attrs: {
5222
- ...serializeBlockNodeAttributes(input),
5343
+ ...serializeBlockNodeAttributes(tree.block),
5223
5344
  start: "1"
5224
5345
  },
5225
- content: input.multiRichTextPropertyValue.value.map(serializeAsListItem)
5346
+ content: serializeListContent(tree)
5226
5347
  };
5227
5348
  }
5228
- function serializeAsUnorderedList(input) {
5349
+ function serializeAsUnorderedList(tree) {
5229
5350
  return {
5230
5351
  type: "bulletList",
5231
5352
  attrs: {
5232
- ...serializeBlockNodeAttributes(input)
5353
+ ...serializeBlockNodeAttributes(tree.block)
5233
5354
  },
5234
- content: input.multiRichTextPropertyValue.value.map(serializeAsListItem)
5355
+ content: serializeListContent(tree)
5235
5356
  };
5236
5357
  }
5237
- function serializeAsListItem(text) {
5358
+ function serializeListContent(tree) {
5359
+ const result = tree.leadingChildren.map((i) => serializeAsTextListItem(i.text));
5360
+ for (const child of tree.children) {
5361
+ if (child.type === "ListItem") {
5362
+ result.push(serializeAsTextListItem(child.text));
5363
+ } else if (child.type === "List") {
5364
+ const previousNode = result[result.length - 1];
5365
+ if (!previousNode) {
5366
+ throw SupernovaException.shouldNotHappen("List node without previous node");
5367
+ }
5368
+ if (!previousNode.content) {
5369
+ throw SupernovaException.shouldNotHappen("List item node has no content");
5370
+ }
5371
+ const serializedList = serializeAsMultiRichTextBlock(child);
5372
+ previousNode.content.push(serializedList);
5373
+ } else {
5374
+ throw SupernovaException.shouldNotHappen(`Unknown list node type: ${child}`);
5375
+ }
5376
+ }
5377
+ return result;
5378
+ }
5379
+ function serializeAsTextListItem(text) {
5238
5380
  return {
5239
5381
  type: "listItem",
5240
5382
  content: [
5241
5383
  {
5242
5384
  type: "paragraph",
5385
+ attrs: {
5386
+ definitionId: "io.supernova.block.rich-text",
5387
+ variantId: "default"
5388
+ },
5243
5389
  content: serializeRichText(text)
5244
5390
  }
5245
5391
  ]
@@ -5252,7 +5398,7 @@ function serializeAsTable(input) {
5252
5398
  return {
5253
5399
  type: "tableContainer",
5254
5400
  attrs: {
5255
- ...serializeBlockNodeAttributes(input),
5401
+ ...serializeBlockNodeAttributes(input.block),
5256
5402
  hasBorder: table.showBorder ?? true
5257
5403
  },
5258
5404
  content: [
@@ -5341,11 +5487,10 @@ function serializeTableNode(node) {
5341
5487
  function serializeAsDivider(input) {
5342
5488
  return {
5343
5489
  type: "horizontalRule",
5344
- attrs: serializeBlockNodeAttributes(input)
5490
+ attrs: serializeBlockNodeAttributes(input.block)
5345
5491
  };
5346
5492
  }
5347
- function serializeBlockNodeAttributes(input) {
5348
- const { block } = input;
5493
+ function serializeBlockNodeAttributes(block) {
5349
5494
  return {
5350
5495
  id: block.id,
5351
5496
  definitionId: block.data.packageId,
@@ -5397,6 +5542,7 @@ function serializeRichText(richText) {
5397
5542
  return richText.spans.map(serializeTextSpan).flat();
5398
5543
  }
5399
5544
  function serializeTextSpan(span) {
5545
+ const hardBreakType = "hardBreak";
5400
5546
  const marks = span.attributes.map(serializeTextSpanAttribute);
5401
5547
  const textParts = span.text.split("\n");
5402
5548
  const interspersed = [
@@ -5409,7 +5555,7 @@ function serializeTextSpan(span) {
5409
5555
  for (let i = 1; i < textParts.length; i++) {
5410
5556
  interspersed.push(
5411
5557
  {
5412
- type: "hardBreak"
5558
+ type: hardBreakType
5413
5559
  },
5414
5560
  {
5415
5561
  type: "text",
@@ -5418,7 +5564,7 @@ function serializeTextSpan(span) {
5418
5564
  }
5419
5565
  );
5420
5566
  }
5421
- return interspersed.filter((t) => !!t.text);
5567
+ return interspersed.filter((t) => t.type === hardBreakType || !!t.text);
5422
5568
  }
5423
5569
  function serializeTextSpanAttribute(spanAttribute) {
5424
5570
  switch (spanAttribute.type) {
@@ -5427,7 +5573,7 @@ function serializeTextSpanAttribute(spanAttribute) {
5427
5573
  case "Italic":
5428
5574
  return { type: "italic", attrs: {} };
5429
5575
  case "Strikethrough":
5430
- return { type: "strikethrough", attrs: {} };
5576
+ return { type: "strike", attrs: {} };
5431
5577
  case "Code":
5432
5578
  return { type: "code", attrs: {} };
5433
5579
  case "Link":
@@ -5480,9 +5626,6 @@ function serializeCustomBlockNodeType(block, definition) {
5480
5626
  return "blockNode";
5481
5627
  }
5482
5628
  }
5483
- function nonNullFilter(item) {
5484
- return !!item;
5485
- }
5486
5629
 
5487
5630
  // src/yjs/docs-editor/mock.ts
5488
5631
  function getMockPageBlockDefinitions() {
@@ -5503,7 +5646,7 @@ var blocks = [
5503
5646
  name: "Text",
5504
5647
  description: "Plain text",
5505
5648
  category: "Text",
5506
- icon: "https://cdn-assets.supernova.io/blocks/icons/text.svg",
5649
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/text.svg",
5507
5650
  searchKeywords: ["paragraph", "rich text"],
5508
5651
  item: {
5509
5652
  properties: [
@@ -5511,369 +5654,220 @@ var blocks = [
5511
5654
  id: "text",
5512
5655
  name: "Text",
5513
5656
  type: "RichText",
5514
- options: {
5515
- richTextStyle: "Default"
5516
- }
5657
+ options: { richTextStyle: "Default" }
5517
5658
  }
5518
5659
  ],
5519
- appearance: {
5520
- isBordered: false,
5521
- hasBackground: false
5522
- },
5660
+ appearance: { isBordered: true, hasBackground: false },
5523
5661
  variants: [
5524
5662
  {
5525
5663
  id: "default",
5526
5664
  name: "Default",
5527
- layout: {
5528
- type: "Column",
5529
- children: ["text"],
5530
- columnAlign: "Start",
5531
- columnResizing: "Fill",
5532
- gap: "Medium"
5533
- },
5665
+ layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5534
5666
  maxColumns: 1,
5535
5667
  defaultColumns: 1,
5536
- appearance: {
5537
- isBordered: false,
5538
- hasBackground: false,
5539
- isEditorPresentationDifferent: false
5540
- }
5668
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5541
5669
  }
5542
5670
  ],
5543
5671
  defaultVariantKey: "default"
5544
5672
  },
5545
- behavior: {
5546
- dataType: "Item",
5547
- items: {
5548
- numberOfItems: 1,
5549
- allowLinks: false
5550
- }
5551
- },
5673
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
5552
5674
  editorOptions: {
5553
5675
  onboarding: {
5554
5676
  helpText: "Use rich text block to write text and add additional formatting to it.",
5555
5677
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/text-HxZ9ssJR"
5556
5678
  }
5557
5679
  },
5558
- appearance: {
5559
- isBordered: false,
5560
- hasBackground: false
5561
- }
5680
+ appearance: { isBordered: true, hasBackground: false }
5562
5681
  },
5563
5682
  {
5564
5683
  id: "io.supernova.block.title1",
5565
- name: "Title 1",
5684
+ name: "Heading 1",
5566
5685
  description: "Main sections within the page",
5567
5686
  category: "Text",
5568
- icon: "https://cdn-assets.supernova.io/blocks/icons/title-1.svg",
5569
- searchKeywords: ["heading", "h1"],
5687
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/title-1.svg",
5688
+ searchKeywords: ["title", "h1"],
5570
5689
  item: {
5571
5690
  properties: [
5572
5691
  {
5573
5692
  id: "text",
5574
5693
  name: "Text",
5575
5694
  type: "RichText",
5576
- options: {
5577
- placeholder: "Title 1",
5578
- richTextStyle: "Title1"
5579
- }
5695
+ options: { placeholder: "Heading 1", richTextStyle: "Title1" }
5580
5696
  }
5581
5697
  ],
5582
- appearance: {
5583
- isBordered: false,
5584
- hasBackground: false
5585
- },
5698
+ appearance: { isBordered: true, hasBackground: false },
5586
5699
  variants: [
5587
5700
  {
5588
5701
  id: "default",
5589
5702
  name: "Default",
5590
- layout: {
5591
- type: "Column",
5592
- children: ["text"],
5593
- columnAlign: "Start",
5594
- columnResizing: "Fill",
5595
- gap: "Medium"
5596
- },
5703
+ layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5597
5704
  maxColumns: 1,
5598
5705
  defaultColumns: 1,
5599
- appearance: {
5600
- isBordered: false,
5601
- hasBackground: false,
5602
- isEditorPresentationDifferent: false
5603
- }
5706
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5604
5707
  }
5605
5708
  ],
5606
5709
  defaultVariantKey: "default"
5607
5710
  },
5608
- behavior: {
5609
- dataType: "Item",
5610
- items: {
5611
- numberOfItems: 1,
5612
- allowLinks: false
5613
- }
5614
- },
5711
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
5615
5712
  editorOptions: {
5616
5713
  onboarding: {
5617
5714
  helpText: "Use for main sections within the page, introducing broad topics or themes.",
5618
5715
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY"
5619
5716
  }
5620
5717
  },
5621
- appearance: {
5622
- isBordered: false,
5623
- hasBackground: false
5624
- }
5718
+ appearance: { isBordered: true, hasBackground: false }
5625
5719
  },
5626
5720
  {
5627
5721
  id: "io.supernova.block.title2",
5628
- name: "Title 2",
5722
+ name: "Heading 2",
5629
5723
  description: "Section subheadings",
5630
5724
  category: "Text",
5631
- icon: "https://cdn-assets.supernova.io/blocks/icons/title-2.svg",
5632
- searchKeywords: ["heading", "h2"],
5725
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/title-2.svg",
5726
+ searchKeywords: ["title", "h2"],
5633
5727
  item: {
5634
5728
  properties: [
5635
5729
  {
5636
5730
  id: "text",
5637
5731
  name: "Text",
5638
5732
  type: "RichText",
5639
- options: {
5640
- placeholder: "Title 2",
5641
- richTextStyle: "Title2"
5642
- }
5733
+ options: { placeholder: "Heading 2", richTextStyle: "Title2" }
5643
5734
  }
5644
5735
  ],
5645
- appearance: {
5646
- isBordered: false,
5647
- hasBackground: false
5648
- },
5736
+ appearance: { isBordered: true, hasBackground: false },
5649
5737
  variants: [
5650
5738
  {
5651
5739
  id: "default",
5652
5740
  name: "Default",
5653
- layout: {
5654
- type: "Column",
5655
- children: ["text"],
5656
- columnAlign: "Start",
5657
- columnResizing: "Fill",
5658
- gap: "Medium"
5659
- },
5741
+ layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5660
5742
  maxColumns: 1,
5661
5743
  defaultColumns: 1,
5662
- appearance: {
5663
- isBordered: false,
5664
- hasBackground: false,
5665
- isEditorPresentationDifferent: false
5666
- }
5744
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5667
5745
  }
5668
5746
  ],
5669
5747
  defaultVariantKey: "default"
5670
5748
  },
5671
- behavior: {
5672
- dataType: "Item",
5673
- items: {
5674
- numberOfItems: 1,
5675
- allowLinks: false
5676
- }
5677
- },
5749
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
5678
5750
  editorOptions: {
5679
5751
  onboarding: {
5680
5752
  helpText: "Use for subheadings, indicating major subsections under the main sections.",
5681
5753
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY"
5682
5754
  }
5683
5755
  },
5684
- appearance: {
5685
- isBordered: false,
5686
- hasBackground: false
5687
- }
5756
+ appearance: { isBordered: true, hasBackground: false }
5688
5757
  },
5689
5758
  {
5690
5759
  id: "io.supernova.block.title3",
5691
- name: "Title 3",
5760
+ name: "Heading 3",
5692
5761
  description: "Further subsections",
5693
5762
  category: "Text",
5694
- icon: "https://cdn-assets.supernova.io/blocks/icons/title-3.svg",
5695
- searchKeywords: ["heading", "h3"],
5763
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/title-3.svg",
5764
+ searchKeywords: ["title", "h3"],
5696
5765
  item: {
5697
5766
  properties: [
5698
5767
  {
5699
5768
  id: "text",
5700
5769
  name: "Text",
5701
5770
  type: "RichText",
5702
- options: {
5703
- placeholder: "Title 3",
5704
- richTextStyle: "Title3"
5705
- }
5771
+ options: { placeholder: "Heading 3", richTextStyle: "Title3" }
5706
5772
  }
5707
5773
  ],
5708
- appearance: {
5709
- isBordered: false,
5710
- hasBackground: false
5711
- },
5774
+ appearance: { isBordered: true, hasBackground: false },
5712
5775
  variants: [
5713
5776
  {
5714
5777
  id: "default",
5715
5778
  name: "Default",
5716
- layout: {
5717
- type: "Column",
5718
- children: ["text"],
5719
- columnAlign: "Start",
5720
- columnResizing: "Fill",
5721
- gap: "Medium"
5722
- },
5779
+ layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5723
5780
  maxColumns: 1,
5724
5781
  defaultColumns: 1,
5725
- appearance: {
5726
- isBordered: false,
5727
- hasBackground: false,
5728
- isEditorPresentationDifferent: false
5729
- }
5782
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5730
5783
  }
5731
5784
  ],
5732
5785
  defaultVariantKey: "default"
5733
5786
  },
5734
- behavior: {
5735
- dataType: "Item",
5736
- items: {
5737
- numberOfItems: 1,
5738
- allowLinks: false
5739
- }
5740
- },
5787
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
5741
5788
  editorOptions: {
5742
5789
  onboarding: {
5743
5790
  helpText: "Use for further subsections, detailing specific topics within the major subsections.",
5744
5791
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY"
5745
5792
  }
5746
5793
  },
5747
- appearance: {
5748
- isBordered: false,
5749
- hasBackground: false
5750
- }
5794
+ appearance: { isBordered: true, hasBackground: false }
5751
5795
  },
5752
5796
  {
5753
5797
  id: "io.supernova.block.title4",
5754
- name: "Title 4",
5798
+ name: "Heading 4",
5755
5799
  description: "Details in subsections",
5756
5800
  category: "Text",
5757
- icon: "https://cdn-assets.supernova.io/blocks/icons/title-4.svg",
5758
- searchKeywords: ["heading", "h4"],
5801
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/title-4.svg",
5802
+ searchKeywords: ["title", "h4"],
5759
5803
  item: {
5760
5804
  properties: [
5761
5805
  {
5762
5806
  id: "text",
5763
5807
  name: "Text",
5764
5808
  type: "RichText",
5765
- options: {
5766
- placeholder: "Title 4",
5767
- richTextStyle: "Title4"
5768
- }
5809
+ options: { placeholder: "Heading 4", richTextStyle: "Title4" }
5769
5810
  }
5770
5811
  ],
5771
- appearance: {
5772
- isBordered: false,
5773
- hasBackground: false
5774
- },
5812
+ appearance: { isBordered: true, hasBackground: false },
5775
5813
  variants: [
5776
5814
  {
5777
5815
  id: "default",
5778
5816
  name: "Default",
5779
- layout: {
5780
- type: "Column",
5781
- children: ["text"],
5782
- columnAlign: "Start",
5783
- columnResizing: "Fill",
5784
- gap: "Medium"
5785
- },
5817
+ layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5786
5818
  maxColumns: 1,
5787
5819
  defaultColumns: 1,
5788
- appearance: {
5789
- isBordered: false,
5790
- hasBackground: false,
5791
- isEditorPresentationDifferent: false
5792
- }
5820
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5793
5821
  }
5794
5822
  ],
5795
5823
  defaultVariantKey: "default"
5796
5824
  },
5797
- behavior: {
5798
- dataType: "Item",
5799
- items: {
5800
- numberOfItems: 1,
5801
- allowLinks: false
5802
- }
5803
- },
5825
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
5804
5826
  editorOptions: {
5805
5827
  onboarding: {
5806
5828
  helpText: "Use for sub-divisions, elaborating on details within the subsections.",
5807
5829
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY"
5808
5830
  }
5809
5831
  },
5810
- appearance: {
5811
- isBordered: false,
5812
- hasBackground: false
5813
- }
5832
+ appearance: { isBordered: true, hasBackground: false }
5814
5833
  },
5815
5834
  {
5816
5835
  id: "io.supernova.block.title5",
5817
- name: "Title 5",
5836
+ name: "Heading 5",
5818
5837
  description: "Nuanced details or sub-points",
5819
5838
  category: "Text",
5820
- icon: "https://cdn-assets.supernova.io/blocks/icons/title-5.svg",
5821
- searchKeywords: ["heading", "h5"],
5839
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/title-5.svg",
5840
+ searchKeywords: ["title", "h5"],
5822
5841
  item: {
5823
5842
  properties: [
5824
5843
  {
5825
5844
  id: "text",
5826
5845
  name: "Text",
5827
5846
  type: "RichText",
5828
- options: {
5829
- placeholder: "Title 5",
5830
- richTextStyle: "Title5"
5831
- }
5847
+ options: { placeholder: "Heading 5", richTextStyle: "Title5" }
5832
5848
  }
5833
5849
  ],
5834
- appearance: {
5835
- isBordered: false,
5836
- hasBackground: false
5837
- },
5850
+ appearance: { isBordered: true, hasBackground: false },
5838
5851
  variants: [
5839
5852
  {
5840
5853
  id: "default",
5841
5854
  name: "Default",
5842
- layout: {
5843
- type: "Column",
5844
- children: ["text"],
5845
- columnAlign: "Start",
5846
- columnResizing: "Fill",
5847
- gap: "Medium"
5848
- },
5855
+ layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5849
5856
  maxColumns: 1,
5850
5857
  defaultColumns: 1,
5851
- appearance: {
5852
- isBordered: false,
5853
- hasBackground: false,
5854
- isEditorPresentationDifferent: false
5855
- }
5858
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5856
5859
  }
5857
5860
  ],
5858
5861
  defaultVariantKey: "default"
5859
5862
  },
5860
- behavior: {
5861
- dataType: "Item",
5862
- items: {
5863
- numberOfItems: 1,
5864
- allowLinks: false
5865
- }
5866
- },
5863
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
5867
5864
  editorOptions: {
5868
5865
  onboarding: {
5869
5866
  helpText: "Use for nuanced details or specific sub-points within sub-divisions.",
5870
5867
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY"
5871
5868
  }
5872
5869
  },
5873
- appearance: {
5874
- isBordered: false,
5875
- hasBackground: false
5876
- }
5870
+ appearance: { isBordered: true, hasBackground: false }
5877
5871
  },
5878
5872
  {
5879
5873
  id: "io.supernova.block.ordered-list",
@@ -5888,58 +5882,34 @@ var blocks = [
5888
5882
  id: "text",
5889
5883
  name: "Text",
5890
5884
  type: "MultiRichText",
5891
- options: {
5892
- multiRichTextStyle: "OL"
5893
- }
5885
+ options: { multiRichTextStyle: "OL" }
5894
5886
  }
5895
5887
  ],
5896
- appearance: {
5897
- isBordered: false,
5898
- hasBackground: false
5899
- },
5888
+ appearance: { isBordered: true, hasBackground: false },
5900
5889
  variants: [
5901
5890
  {
5902
5891
  id: "default",
5903
5892
  name: "Default",
5904
- layout: {
5905
- type: "Column",
5906
- children: ["text"],
5907
- columnAlign: "Start",
5908
- columnResizing: "Fill",
5909
- gap: "Medium"
5910
- },
5893
+ layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5911
5894
  maxColumns: 1,
5912
5895
  defaultColumns: 1,
5913
- appearance: {
5914
- isBordered: false,
5915
- hasBackground: false,
5916
- isEditorPresentationDifferent: false
5917
- }
5896
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5918
5897
  }
5919
5898
  ],
5920
5899
  defaultVariantKey: "default"
5921
5900
  },
5922
- behavior: {
5923
- dataType: "Item",
5924
- items: {
5925
- numberOfItems: 1,
5926
- allowLinks: false
5927
- }
5928
- },
5901
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
5929
5902
  editorOptions: {
5930
5903
  onboarding: {
5931
5904
  helpText: "Display a sequence of numbers or letters to indicate order.",
5932
5905
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/list-UC5iPZLK"
5933
5906
  }
5934
5907
  },
5935
- appearance: {
5936
- isBordered: false,
5937
- hasBackground: false
5938
- }
5908
+ appearance: { isBordered: true, hasBackground: false }
5939
5909
  },
5940
5910
  {
5941
5911
  id: "io.supernova.block.unordered-list",
5942
- name: "Unordered list",
5912
+ name: "Bullet list",
5943
5913
  description: "A list with bullet points",
5944
5914
  category: "Text",
5945
5915
  icon: "https://cdn-assets.supernova.io/blocks/icons/list-unordered.svg",
@@ -5950,54 +5920,30 @@ var blocks = [
5950
5920
  id: "text",
5951
5921
  name: "Text",
5952
5922
  type: "MultiRichText",
5953
- options: {
5954
- multiRichTextStyle: "UL"
5955
- }
5923
+ options: { multiRichTextStyle: "UL" }
5956
5924
  }
5957
5925
  ],
5958
- appearance: {
5959
- isBordered: false,
5960
- hasBackground: false
5961
- },
5926
+ appearance: { isBordered: true, hasBackground: false },
5962
5927
  variants: [
5963
5928
  {
5964
5929
  id: "default",
5965
5930
  name: "Default",
5966
- layout: {
5967
- type: "Column",
5968
- children: ["text"],
5969
- columnAlign: "Start",
5970
- columnResizing: "Fill",
5971
- gap: "Medium"
5972
- },
5931
+ layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5973
5932
  maxColumns: 1,
5974
5933
  defaultColumns: 1,
5975
- appearance: {
5976
- isBordered: false,
5977
- hasBackground: false,
5978
- isEditorPresentationDifferent: false
5979
- }
5934
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5980
5935
  }
5981
5936
  ],
5982
5937
  defaultVariantKey: "default"
5983
5938
  },
5984
- behavior: {
5985
- dataType: "Item",
5986
- items: {
5987
- numberOfItems: 1,
5988
- allowLinks: false
5989
- }
5990
- },
5939
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
5991
5940
  editorOptions: {
5992
5941
  onboarding: {
5993
5942
  helpText: "A list of items displayed with bullet points without a specific sequence.",
5994
5943
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/list-UC5iPZLK"
5995
5944
  }
5996
5945
  },
5997
- appearance: {
5998
- isBordered: false,
5999
- hasBackground: false
6000
- }
5946
+ appearance: { isBordered: true, hasBackground: false }
6001
5947
  },
6002
5948
  {
6003
5949
  id: "io.supernova.block.divider",
@@ -6007,18 +5953,8 @@ var blocks = [
6007
5953
  icon: "https://cdn-assets.supernova.io/blocks/icons/divider.svg",
6008
5954
  searchKeywords: ["hr", "line", "rule", "separator"],
6009
5955
  item: {
6010
- properties: [
6011
- {
6012
- id: "divider",
6013
- name: "Divider",
6014
- type: "Divider",
6015
- options: {}
6016
- }
6017
- ],
6018
- appearance: {
6019
- isBordered: false,
6020
- hasBackground: false
6021
- },
5956
+ properties: [{ id: "divider", name: "Divider", type: "Divider", options: {} }],
5957
+ appearance: { isBordered: true, hasBackground: false },
6022
5958
  variants: [
6023
5959
  {
6024
5960
  id: "default",
@@ -6032,102 +5968,64 @@ var blocks = [
6032
5968
  },
6033
5969
  maxColumns: 1,
6034
5970
  defaultColumns: 1,
6035
- appearance: {
6036
- isBordered: false,
6037
- hasBackground: false,
6038
- isEditorPresentationDifferent: false
6039
- }
5971
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6040
5972
  }
6041
5973
  ],
6042
5974
  defaultVariantKey: "default"
6043
5975
  },
6044
- behavior: {
6045
- dataType: "Item",
6046
- items: {
6047
- numberOfItems: 1,
6048
- allowLinks: false
6049
- }
6050
- },
5976
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6051
5977
  editorOptions: {
6052
5978
  onboarding: {
6053
5979
  helpText: "A thematic break or horizontal rule, often used to separate content or define a change in topic.",
6054
5980
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/divider-tLuxooLH"
6055
5981
  }
6056
5982
  },
6057
- appearance: {
6058
- isBordered: false,
6059
- hasBackground: false
6060
- }
5983
+ appearance: { isBordered: true, hasBackground: false }
6061
5984
  },
6062
5985
  {
6063
5986
  id: "io.supernova.block.blockquote",
6064
- name: "Blockquote",
5987
+ name: "Quote",
6065
5988
  description: "Display a quotation",
6066
5989
  category: "Text",
6067
5990
  icon: "https://cdn-assets.supernova.io/blocks/icons/blockquote.svg",
6068
- searchKeywords: ["cite"],
5991
+ searchKeywords: ["cite", "blockquote"],
6069
5992
  item: {
6070
5993
  properties: [
6071
5994
  {
6072
5995
  id: "text",
6073
5996
  name: "Text",
6074
5997
  type: "RichText",
6075
- options: {
6076
- placeholder: "Write a quote...",
6077
- richTextStyle: "Quote"
6078
- }
5998
+ options: { placeholder: "Write a quote...", richTextStyle: "Quote" }
6079
5999
  }
6080
6000
  ],
6081
- appearance: {
6082
- isBordered: false,
6083
- hasBackground: false
6084
- },
6001
+ appearance: { isBordered: true, hasBackground: false },
6085
6002
  variants: [
6086
6003
  {
6087
6004
  id: "default",
6088
6005
  name: "Default",
6089
- layout: {
6090
- type: "Column",
6091
- children: ["text"],
6092
- columnAlign: "Start",
6093
- columnResizing: "Fill",
6094
- gap: "Medium"
6095
- },
6006
+ layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6096
6007
  maxColumns: 1,
6097
6008
  defaultColumns: 1,
6098
- appearance: {
6099
- isBordered: false,
6100
- hasBackground: false,
6101
- isEditorPresentationDifferent: false
6102
- }
6009
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6103
6010
  }
6104
6011
  ],
6105
6012
  defaultVariantKey: "default"
6106
6013
  },
6107
- behavior: {
6108
- dataType: "Item",
6109
- items: {
6110
- numberOfItems: 1,
6111
- allowLinks: false
6112
- }
6113
- },
6014
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6114
6015
  editorOptions: {
6115
6016
  onboarding: {
6116
6017
  helpText: "Use a blockquote to set off a quotation or cited content from the main text.",
6117
6018
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/blockquote-zYWAsb6X"
6118
6019
  }
6119
6020
  },
6120
- appearance: {
6121
- isBordered: false,
6122
- hasBackground: false
6123
- }
6021
+ appearance: { isBordered: true, hasBackground: false }
6124
6022
  },
6125
6023
  {
6126
6024
  id: "io.supernova.block.callout",
6127
6025
  name: "Callout",
6128
6026
  description: "Highlight a section of text",
6129
6027
  category: "Text",
6130
- icon: "https://cdn-assets.supernova.io/blocks/icons/callout.svg",
6028
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/callout.svg",
6131
6029
  searchKeywords: ["banner", "alert", "note", "tip", "warning"],
6132
6030
  item: {
6133
6031
  properties: [
@@ -6135,62 +6033,37 @@ var blocks = [
6135
6033
  id: "text",
6136
6034
  name: "Text",
6137
6035
  type: "RichText",
6138
- options: {
6139
- placeholder: "Highlight some information...",
6140
- richTextStyle: "Callout"
6141
- }
6036
+ options: { placeholder: "Highlight some information...", richTextStyle: "Callout" }
6142
6037
  }
6143
6038
  ],
6144
- appearance: {
6145
- isBordered: false,
6146
- hasBackground: false
6147
- },
6039
+ appearance: { isBordered: true, hasBackground: false },
6148
6040
  variants: [
6149
6041
  {
6150
6042
  id: "default",
6151
6043
  name: "Default",
6152
- layout: {
6153
- type: "Column",
6154
- children: ["text"],
6155
- columnAlign: "Start",
6156
- columnResizing: "Fill",
6157
- gap: "Medium"
6158
- },
6044
+ layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6159
6045
  maxColumns: 1,
6160
6046
  defaultColumns: 1,
6161
- appearance: {
6162
- isBordered: false,
6163
- hasBackground: false,
6164
- isEditorPresentationDifferent: false
6165
- }
6047
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6166
6048
  }
6167
6049
  ],
6168
6050
  defaultVariantKey: "default"
6169
6051
  },
6170
- behavior: {
6171
- dataType: "Item",
6172
- items: {
6173
- numberOfItems: 1,
6174
- allowLinks: false
6175
- }
6176
- },
6052
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6177
6053
  editorOptions: {
6178
6054
  onboarding: {
6179
6055
  helpText: "Use to highlight a section of text.",
6180
6056
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/callout-ZPlZObD1"
6181
6057
  }
6182
6058
  },
6183
- appearance: {
6184
- isBordered: false,
6185
- hasBackground: false
6186
- }
6059
+ appearance: { isBordered: true, hasBackground: false }
6187
6060
  },
6188
6061
  {
6189
6062
  id: "io.supernova.block.image",
6190
6063
  name: "Image",
6191
6064
  description: "Display an image or Figma frame",
6192
6065
  category: "Media",
6193
- icon: "https://cdn-assets.supernova.io/blocks/icons/image.svg",
6066
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/image.svg",
6194
6067
  searchKeywords: ["image", "figma", "frame", "picture", "photo"],
6195
6068
  item: {
6196
6069
  properties: [
@@ -6198,110 +6071,65 @@ var blocks = [
6198
6071
  id: "image",
6199
6072
  name: "Image",
6200
6073
  type: "Image",
6201
- options: {
6202
- allowCaption: true
6203
- }
6074
+ options: { allowCaption: true }
6204
6075
  }
6205
6076
  ],
6206
- appearance: {
6207
- isBordered: false,
6208
- hasBackground: false
6209
- },
6077
+ appearance: { isBordered: true, hasBackground: false },
6210
6078
  variants: [
6211
6079
  {
6212
6080
  id: "default",
6213
6081
  name: "Default",
6214
- layout: {
6215
- type: "Column",
6216
- children: ["image"],
6217
- columnAlign: "Start",
6218
- columnResizing: "Fill",
6219
- gap: "Medium"
6220
- },
6082
+ layout: { type: "Column", children: ["image"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6221
6083
  maxColumns: 1,
6222
6084
  defaultColumns: 1,
6223
- appearance: {
6224
- isBordered: false,
6225
- hasBackground: false,
6226
- isEditorPresentationDifferent: false
6227
- }
6085
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6228
6086
  }
6229
6087
  ],
6230
6088
  defaultVariantKey: "default"
6231
6089
  },
6232
- behavior: {
6233
- dataType: "Item",
6234
- items: {
6235
- numberOfItems: 1,
6236
- allowLinks: false
6237
- }
6238
- },
6090
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6239
6091
  editorOptions: {
6240
6092
  onboarding: {
6241
6093
  helpText: "Use to display an image or Figma frame.",
6242
6094
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/image-Ue8VdT8B"
6243
6095
  }
6244
6096
  },
6245
- appearance: {
6246
- isBordered: false,
6247
- hasBackground: false
6248
- }
6097
+ appearance: { isBordered: false, hasBackground: false }
6249
6098
  },
6250
6099
  {
6251
6100
  id: "io.supernova.block.shortcut-links",
6252
6101
  name: "Shortcut links",
6253
6102
  description: "Link to a page or external URL",
6254
6103
  category: "Media",
6255
- icon: "https://cdn-assets.supernova.io/blocks/icons/shortcuts.svg",
6256
- searchKeywords: [],
6104
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/shortcuts.svg",
6105
+ searchKeywords: ["url", "page", "card"],
6257
6106
  item: {
6258
6107
  properties: [
6259
6108
  {
6260
6109
  id: "block.links.property.image",
6261
6110
  name: "Image",
6262
6111
  type: "Image",
6263
- options: {
6264
- aspectRatio: "Landscape",
6265
- allowCaption: false
6266
- },
6112
+ options: { aspectRatio: "Landscape", allowCaption: false },
6267
6113
  variantOptions: {
6268
- iconOnTop: {
6269
- width: "Icon",
6270
- aspectRatio: "Square"
6271
- },
6272
- imageOnLeft: {
6273
- width: "Medium"
6274
- },
6275
- iconOnLeft: {
6276
- width: "Icon",
6277
- aspectRatio: "Square"
6278
- }
6114
+ iconOnTop: { width: "Icon", aspectRatio: "Square" },
6115
+ imageOnLeft: { width: "Medium" },
6116
+ iconOnLeft: { width: "Icon", aspectRatio: "Square" }
6279
6117
  }
6280
6118
  },
6281
6119
  {
6282
6120
  id: "block.links.property.title",
6283
6121
  name: "Title",
6284
6122
  type: "Text",
6285
- options: {
6286
- textStyle: "Title5",
6287
- placeholder: "Add title"
6288
- }
6123
+ options: { textStyle: "Title5", placeholder: "Add title" }
6289
6124
  },
6290
6125
  {
6291
6126
  id: "block.links.property.description",
6292
6127
  name: "Short description",
6293
6128
  type: "Text",
6294
- options: {
6295
- textStyle: "Default",
6296
- color: "NeutralFaded",
6297
- placeholder: "Add description"
6298
- }
6129
+ options: { textStyle: "Default", color: "NeutralFaded", placeholder: "Add description" }
6299
6130
  }
6300
6131
  ],
6301
- appearance: {
6302
- isBordered: false,
6303
- hasBackground: false
6304
- },
6132
+ appearance: { isBordered: true, hasBackground: false },
6305
6133
  variants: [
6306
6134
  {
6307
6135
  id: "imageOnTop",
@@ -6316,11 +6144,7 @@ var blocks = [
6316
6144
  },
6317
6145
  maxColumns: 4,
6318
6146
  defaultColumns: 1,
6319
- appearance: {
6320
- isBordered: false,
6321
- hasBackground: false,
6322
- isEditorPresentationDifferent: false
6323
- }
6147
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6324
6148
  },
6325
6149
  {
6326
6150
  id: "imageOnLeft",
@@ -6350,11 +6174,7 @@ var blocks = [
6350
6174
  },
6351
6175
  maxColumns: 1,
6352
6176
  defaultColumns: 1,
6353
- appearance: {
6354
- isBordered: false,
6355
- hasBackground: false,
6356
- isEditorPresentationDifferent: false
6357
- }
6177
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6358
6178
  },
6359
6179
  {
6360
6180
  id: "iconOnTop",
@@ -6369,11 +6189,7 @@ var blocks = [
6369
6189
  },
6370
6190
  maxColumns: 4,
6371
6191
  defaultColumns: 1,
6372
- appearance: {
6373
- isBordered: false,
6374
- hasBackground: false,
6375
- isEditorPresentationDifferent: false
6376
- }
6192
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6377
6193
  },
6378
6194
  {
6379
6195
  id: "iconOnLeft",
@@ -6403,96 +6219,19 @@ var blocks = [
6403
6219
  },
6404
6220
  maxColumns: 2,
6405
6221
  defaultColumns: 1,
6406
- appearance: {
6407
- isBordered: false,
6408
- hasBackground: false,
6409
- isEditorPresentationDifferent: false
6410
- }
6222
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6411
6223
  }
6412
6224
  ],
6413
6225
  defaultVariantKey: "imageOnTop"
6414
6226
  },
6415
- behavior: {
6416
- dataType: "Item",
6417
- items: {
6418
- numberOfItems: -1,
6419
- allowLinks: true
6420
- }
6421
- },
6227
+ behavior: { dataType: "Item", items: { numberOfItems: -1, allowLinks: true } },
6422
6228
  editorOptions: {
6423
6229
  onboarding: {
6424
6230
  helpText: "Use link block to create single or multiple links to places in or out of your documentation.",
6425
6231
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/links/shortcuts/general-jVfNifo4"
6426
6232
  }
6427
6233
  },
6428
- appearance: {
6429
- isBordered: false,
6430
- hasBackground: false
6431
- }
6432
- },
6433
- {
6434
- id: "io.supernova.block.color-accessibility-grid",
6435
- name: "Accessibility Color Grid",
6436
- description: "Visualize accessibility of your color tokens.",
6437
- category: "Tokens",
6438
- icon: "https://cdn-assets.supernova.io/blocks/icons/token-a11y-contrast-grid.svg",
6439
- searchKeywords: ["color", "accessibility", "grid", "contrast", "blind", "impairment"],
6440
- item: {
6441
- properties: [
6442
- {
6443
- id: "tokens",
6444
- name: "Tokens",
6445
- type: "Token",
6446
- options: {
6447
- allowedTypes: ["Color"],
6448
- allowPropertySelection: false,
6449
- allowThemeSelection: false
6450
- }
6451
- }
6452
- ],
6453
- appearance: {
6454
- isBordered: false,
6455
- hasBackground: false
6456
- },
6457
- variants: [
6458
- {
6459
- id: "default",
6460
- name: "Default",
6461
- layout: {
6462
- type: "Column",
6463
- children: ["tokens"],
6464
- columnAlign: "Start",
6465
- columnResizing: "Fill",
6466
- gap: "Medium"
6467
- },
6468
- maxColumns: 1,
6469
- defaultColumns: 1,
6470
- appearance: {
6471
- isBordered: false,
6472
- hasBackground: false,
6473
- isEditorPresentationDifferent: false
6474
- }
6475
- }
6476
- ],
6477
- defaultVariantKey: "default"
6478
- },
6479
- behavior: {
6480
- dataType: "Token",
6481
- entities: {
6482
- selectionType: "EntityAndGroup",
6483
- maxSelected: 0
6484
- }
6485
- },
6486
- editorOptions: {
6487
- onboarding: {
6488
- helpText: "Visualize accessibility of your colors and compare token groups to one another.",
6489
- documentationLink: "https://learn.supernova.io"
6490
- }
6491
- },
6492
- appearance: {
6493
- isBordered: false,
6494
- hasBackground: false
6495
- }
6234
+ appearance: { isBordered: true, hasBackground: false }
6496
6235
  },
6497
6236
  {
6498
6237
  id: "io.supernova.block.embed",
@@ -6515,10 +6254,7 @@ var blocks = [
6515
6254
  }
6516
6255
  }
6517
6256
  ],
6518
- appearance: {
6519
- isBordered: false,
6520
- hasBackground: false
6521
- },
6257
+ appearance: { isBordered: true, hasBackground: false },
6522
6258
  variants: [
6523
6259
  {
6524
6260
  id: "default",
@@ -6532,32 +6268,19 @@ var blocks = [
6532
6268
  },
6533
6269
  maxColumns: 1,
6534
6270
  defaultColumns: 1,
6535
- appearance: {
6536
- isBordered: false,
6537
- hasBackground: false,
6538
- isEditorPresentationDifferent: false
6539
- }
6271
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6540
6272
  }
6541
6273
  ],
6542
6274
  defaultVariantKey: "default"
6543
6275
  },
6544
- behavior: {
6545
- dataType: "Item",
6546
- items: {
6547
- numberOfItems: 1,
6548
- allowLinks: false
6549
- }
6550
- },
6276
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6551
6277
  editorOptions: {
6552
6278
  onboarding: {
6553
6279
  helpText: "Embed any page to your documentation as an iframe.",
6554
6280
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/embed/public-url-2ZeRQ332"
6555
6281
  }
6556
6282
  },
6557
- appearance: {
6558
- isBordered: false,
6559
- hasBackground: false
6560
- }
6283
+ appearance: { isBordered: true, hasBackground: false }
6561
6284
  },
6562
6285
  {
6563
6286
  id: "io.supernova.block.embed-youtube",
@@ -6580,49 +6303,27 @@ var blocks = [
6580
6303
  }
6581
6304
  }
6582
6305
  ],
6583
- appearance: {
6584
- isBordered: false,
6585
- hasBackground: false
6586
- },
6306
+ appearance: { isBordered: true, hasBackground: false },
6587
6307
  variants: [
6588
6308
  {
6589
6309
  id: "default",
6590
6310
  name: "Default",
6591
- layout: {
6592
- type: "Column",
6593
- children: ["embed"],
6594
- columnAlign: "Start",
6595
- columnResizing: "Fill",
6596
- gap: "Medium"
6597
- },
6311
+ layout: { type: "Column", children: ["embed"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6598
6312
  maxColumns: 1,
6599
6313
  defaultColumns: 1,
6600
- appearance: {
6601
- isBordered: false,
6602
- hasBackground: false,
6603
- isEditorPresentationDifferent: false
6604
- }
6314
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6605
6315
  }
6606
6316
  ],
6607
6317
  defaultVariantKey: "default"
6608
6318
  },
6609
- behavior: {
6610
- dataType: "Item",
6611
- items: {
6612
- numberOfItems: 1,
6613
- allowLinks: false
6614
- }
6615
- },
6319
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6616
6320
  editorOptions: {
6617
6321
  onboarding: {
6618
6322
  helpText: "Embed a YouTube video to your documentation.",
6619
6323
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/youtube-Gh8VUrSF"
6620
6324
  }
6621
6325
  },
6622
- appearance: {
6623
- isBordered: false,
6624
- hasBackground: false
6625
- }
6326
+ appearance: { isBordered: true, hasBackground: false }
6626
6327
  },
6627
6328
  {
6628
6329
  id: "io.supernova.block.embed-lottie",
@@ -6637,55 +6338,41 @@ var blocks = [
6637
6338
  id: "url",
6638
6339
  name: "Lottie URL",
6639
6340
  type: "URL",
6640
- options: {
6641
- urlValidationRegex: "^(http|https)://.*.(json|lottie)$"
6642
- }
6341
+ description: "Add URL to your Lottie animation file. We support .json and .lottie file extensions.",
6342
+ options: { urlValidationRegex: "^(http|https)://.*.(json|lottie)$" }
6643
6343
  },
6644
6344
  {
6645
6345
  id: "height",
6646
6346
  name: "Height",
6647
6347
  type: "Number",
6648
- options: {
6649
- defaultValue: 270
6650
- }
6348
+ options: { defaultValue: 270 }
6651
6349
  },
6652
6350
  {
6653
6351
  id: "width",
6654
6352
  name: "Width",
6655
6353
  type: "Number",
6656
- options: {
6657
- defaultValue: 400
6658
- }
6354
+ options: { defaultValue: 400 }
6659
6355
  },
6660
6356
  {
6661
6357
  id: "autoplay",
6662
6358
  name: "Autoplay",
6663
6359
  type: "Boolean",
6664
- options: {
6665
- defaultValue: true
6666
- }
6360
+ options: { defaultValue: true }
6667
6361
  },
6668
6362
  {
6669
6363
  id: "loop",
6670
6364
  name: "Loop",
6671
6365
  type: "Boolean",
6672
- options: {
6673
- defaultValue: true
6674
- }
6366
+ options: { defaultValue: true }
6675
6367
  },
6676
6368
  {
6677
6369
  id: "playerControls",
6678
6370
  name: "Show player controls",
6679
6371
  type: "Boolean",
6680
- options: {
6681
- defaultValue: true
6682
- }
6372
+ options: { defaultValue: true }
6683
6373
  }
6684
6374
  ],
6685
- appearance: {
6686
- isBordered: false,
6687
- hasBackground: false
6688
- },
6375
+ appearance: { isBordered: true, hasBackground: false },
6689
6376
  variants: [
6690
6377
  {
6691
6378
  id: "default",
@@ -6700,32 +6387,19 @@ var blocks = [
6700
6387
  },
6701
6388
  maxColumns: 1,
6702
6389
  defaultColumns: 1,
6703
- appearance: {
6704
- isBordered: false,
6705
- hasBackground: false,
6706
- isEditorPresentationDifferent: true
6707
- }
6390
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
6708
6391
  }
6709
6392
  ],
6710
6393
  defaultVariantKey: "default"
6711
6394
  },
6712
- behavior: {
6713
- dataType: "Item",
6714
- items: {
6715
- numberOfItems: 1,
6716
- allowLinks: false
6717
- }
6718
- },
6395
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6719
6396
  editorOptions: {
6720
6397
  onboarding: {
6721
6398
  helpText: "Embed a Lottie animation to your documentation.",
6722
6399
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/lottie-preview-7CqFdGv9"
6723
6400
  }
6724
6401
  },
6725
- appearance: {
6726
- isBordered: false,
6727
- hasBackground: false
6728
- }
6402
+ appearance: { isBordered: true, hasBackground: false }
6729
6403
  },
6730
6404
  {
6731
6405
  id: "io.supernova.block.storybook",
@@ -6740,56 +6414,30 @@ var blocks = [
6740
6414
  id: "embed",
6741
6415
  name: "Storybook URL",
6742
6416
  type: "Storybook",
6743
- options: {
6744
- allowCaption: true,
6745
- allowResize: true,
6746
- defaultHeight: 400
6747
- }
6417
+ options: { allowCaption: true, allowResize: true, defaultHeight: 400 }
6748
6418
  }
6749
6419
  ],
6750
- appearance: {
6751
- isBordered: false,
6752
- hasBackground: false
6753
- },
6420
+ appearance: { isBordered: true, hasBackground: false },
6754
6421
  variants: [
6755
6422
  {
6756
6423
  id: "default",
6757
6424
  name: "Default",
6758
- layout: {
6759
- type: "Column",
6760
- children: ["embed"],
6761
- columnAlign: "Start",
6762
- columnResizing: "Fill",
6763
- gap: "Medium"
6764
- },
6425
+ layout: { type: "Column", children: ["embed"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6765
6426
  maxColumns: 1,
6766
6427
  defaultColumns: 1,
6767
- appearance: {
6768
- isBordered: false,
6769
- hasBackground: false,
6770
- isEditorPresentationDifferent: false
6771
- }
6428
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6772
6429
  }
6773
6430
  ],
6774
6431
  defaultVariantKey: "default"
6775
6432
  },
6776
- behavior: {
6777
- dataType: "Item",
6778
- items: {
6779
- numberOfItems: 1,
6780
- allowLinks: false
6781
- }
6782
- },
6433
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6783
6434
  editorOptions: {
6784
6435
  onboarding: {
6785
6436
  helpText: "Embed a Storybook story to your documentation.",
6786
6437
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/code/storybook-1EGPhwBl"
6787
6438
  }
6788
6439
  },
6789
- appearance: {
6790
- isBordered: false,
6791
- hasBackground: false
6792
- }
6440
+ appearance: { isBordered: true, hasBackground: false }
6793
6441
  },
6794
6442
  {
6795
6443
  id: "io.supernova.block.embed-figma",
@@ -6812,49 +6460,27 @@ var blocks = [
6812
6460
  }
6813
6461
  }
6814
6462
  ],
6815
- appearance: {
6816
- isBordered: false,
6817
- hasBackground: false
6818
- },
6463
+ appearance: { isBordered: true, hasBackground: false },
6819
6464
  variants: [
6820
6465
  {
6821
6466
  id: "default",
6822
6467
  name: "Default",
6823
- layout: {
6824
- type: "Column",
6825
- children: ["embed"],
6826
- columnAlign: "Start",
6827
- columnResizing: "Fill",
6828
- gap: "Medium"
6829
- },
6468
+ layout: { type: "Column", children: ["embed"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6830
6469
  maxColumns: 1,
6831
6470
  defaultColumns: 1,
6832
- appearance: {
6833
- isBordered: false,
6834
- hasBackground: false,
6835
- isEditorPresentationDifferent: false
6836
- }
6471
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6837
6472
  }
6838
6473
  ],
6839
6474
  defaultVariantKey: "default"
6840
6475
  },
6841
- behavior: {
6842
- dataType: "Item",
6843
- items: {
6844
- numberOfItems: 1,
6845
- allowLinks: false
6846
- }
6847
- },
6476
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6848
6477
  editorOptions: {
6849
6478
  onboarding: {
6850
6479
  helpText: "Embed a Figma canvas or prototype to your documentation.",
6851
6480
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/figma/embed-figma-GPNJsT8A"
6852
6481
  }
6853
6482
  },
6854
- appearance: {
6855
- isBordered: false,
6856
- hasBackground: false
6857
- }
6483
+ appearance: { isBordered: true, hasBackground: false }
6858
6484
  },
6859
6485
  {
6860
6486
  id: "io.supernova.block.markdown",
@@ -6862,22 +6488,17 @@ var blocks = [
6862
6488
  description: "Render Markdown URL",
6863
6489
  category: "Other",
6864
6490
  icon: "https://cdn-assets.supernova.io/blocks/icons/markdown.svg",
6865
- searchKeywords: ["md", "embed", "api", "table", "mdx"],
6491
+ searchKeywords: ["md", "embed", "api", "props", "mdx"],
6866
6492
  item: {
6867
6493
  properties: [
6868
6494
  {
6869
6495
  id: "markdownUrl",
6870
6496
  name: "Markdown URL",
6871
6497
  type: "Markdown",
6872
- options: {
6873
- urlValidationRegex: "^(https?://)?(www.)?.+.md$"
6874
- }
6498
+ options: { urlValidationRegex: "^(https?://)?(www\\.)?.+\\.md(\\?.*)?$" }
6875
6499
  }
6876
6500
  ],
6877
- appearance: {
6878
- isBordered: false,
6879
- hasBackground: false
6880
- },
6501
+ appearance: { isBordered: true, hasBackground: false },
6881
6502
  variants: [
6882
6503
  {
6883
6504
  id: "plain",
@@ -6892,11 +6513,7 @@ var blocks = [
6892
6513
  },
6893
6514
  maxColumns: 1,
6894
6515
  defaultColumns: 1,
6895
- appearance: {
6896
- isBordered: false,
6897
- hasBackground: false,
6898
- isEditorPresentationDifferent: true
6899
- }
6516
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
6900
6517
  },
6901
6518
  {
6902
6519
  id: "bordered",
@@ -6911,11 +6528,7 @@ var blocks = [
6911
6528
  },
6912
6529
  maxColumns: 1,
6913
6530
  defaultColumns: 1,
6914
- appearance: {
6915
- isBordered: false,
6916
- hasBackground: false,
6917
- isEditorPresentationDifferent: true
6918
- }
6531
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
6919
6532
  },
6920
6533
  {
6921
6534
  id: "boxed",
@@ -6930,411 +6543,185 @@ var blocks = [
6930
6543
  },
6931
6544
  maxColumns: 1,
6932
6545
  defaultColumns: 1,
6933
- appearance: {
6934
- isBordered: false,
6935
- hasBackground: false,
6936
- isEditorPresentationDifferent: true
6937
- }
6546
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
6938
6547
  }
6939
6548
  ],
6940
6549
  defaultVariantKey: "plain"
6941
6550
  },
6942
- behavior: {
6943
- dataType: "Item",
6944
- items: {
6945
- numberOfItems: 1,
6946
- allowLinks: false
6947
- }
6948
- },
6551
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6949
6552
  editorOptions: {
6950
6553
  onboarding: {
6951
- helpText: "Embed and process markdown from URL.",
6554
+ helpText: "Render any markdown file directly inside of your documentation.",
6952
6555
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/code/markdown/general-B8wQVOem"
6953
6556
  }
6954
6557
  },
6955
- appearance: {
6956
- isBordered: false,
6957
- hasBackground: false
6958
- }
6558
+ appearance: { isBordered: true, hasBackground: false }
6959
6559
  },
6960
6560
  {
6961
6561
  id: "io.supernova.block.table",
6962
6562
  name: "Table",
6963
6563
  description: "Display a simple table",
6964
6564
  category: "Layout",
6965
- icon: "https://cdn-assets.supernova.io/blocks/icons/table.svg",
6565
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/table.svg",
6966
6566
  searchKeywords: ["grid", "data", "spreadsheet", "api"],
6967
6567
  item: {
6968
- properties: [
6969
- {
6970
- id: "table",
6971
- name: "Table",
6972
- type: "Table",
6973
- options: {}
6974
- }
6975
- ],
6976
- appearance: {
6977
- isBordered: false,
6978
- hasBackground: false
6979
- },
6568
+ properties: [{ id: "table", name: "Table", type: "Table", options: {} }],
6569
+ appearance: { isBordered: true, hasBackground: false },
6980
6570
  variants: [
6981
6571
  {
6982
6572
  id: "default",
6983
6573
  name: "Default",
6984
- layout: {
6985
- type: "Column",
6986
- children: ["table"],
6987
- columnAlign: "Start",
6988
- columnResizing: "Fill",
6989
- gap: "Medium"
6990
- },
6574
+ layout: { type: "Column", children: ["table"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6991
6575
  maxColumns: 1,
6992
6576
  defaultColumns: 1,
6993
- appearance: {
6994
- isBordered: false,
6995
- hasBackground: false,
6996
- isEditorPresentationDifferent: false
6997
- }
6577
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6998
6578
  }
6999
6579
  ],
7000
6580
  defaultVariantKey: "default"
7001
6581
  },
7002
- behavior: {
7003
- dataType: "Item",
7004
- items: {
7005
- numberOfItems: 1,
7006
- allowLinks: false
7007
- }
7008
- },
6582
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
7009
6583
  editorOptions: {
7010
6584
  onboarding: {
7011
6585
  helpText: "Use for displaying data in a tabular format.",
7012
6586
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/layout/table-R8KGnxej"
7013
6587
  }
7014
6588
  },
7015
- appearance: {
7016
- isBordered: false,
7017
- hasBackground: false
7018
- }
6589
+ appearance: { isBordered: true, hasBackground: false }
7019
6590
  },
7020
6591
  {
7021
- id: "io.supernova.block.token-detail",
7022
- name: "Token detail",
7023
- description: "Show a single design tokens",
6592
+ id: "io.supernova.block.design-tokens",
6593
+ name: "Design tokens",
6594
+ description: "A list of design tokens",
7024
6595
  category: "Tokens",
7025
- icon: "https://cdn-assets.supernova.io/blocks/icons/token-detail.svg",
7026
- searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
6596
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/design-tokens.svg",
6597
+ searchKeywords: [
6598
+ "tokens",
6599
+ "color",
6600
+ "typography",
6601
+ "spacing",
6602
+ "grid",
6603
+ "material",
6604
+ "theme",
6605
+ "token list",
6606
+ "token group"
6607
+ ],
7027
6608
  item: {
7028
6609
  properties: [
7029
6610
  {
7030
6611
  id: "tokens",
7031
6612
  name: "Tokens",
7032
6613
  type: "Token",
7033
- options: {
7034
- renderLayoutAs: "List",
7035
- defaultTheme: "none",
7036
- defaultValuePreview: "Split"
7037
- }
6614
+ options: { renderLayoutAs: "List", defaultTheme: "none", defaultValuePreview: "Split" },
6615
+ variantOptions: { grid: { renderLayoutAs: "Grid" } }
7038
6616
  }
7039
6617
  ],
7040
- appearance: {
7041
- isBordered: false,
7042
- hasBackground: false
7043
- },
6618
+ appearance: { isBordered: true, hasBackground: false },
7044
6619
  variants: [
7045
6620
  {
7046
6621
  id: "table",
7047
- name: "Table row",
6622
+ name: "Table",
7048
6623
  image: "https://cdn-assets.supernova.io/blocks/variants/tokens-table.svg",
7049
- layout: {
7050
- type: "Column",
7051
- children: ["tokens"],
7052
- columnAlign: "Start",
7053
- columnResizing: "Fill",
7054
- gap: "Medium"
7055
- },
6624
+ layout: { type: "Column", children: ["tokens"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
7056
6625
  maxColumns: 1,
7057
6626
  defaultColumns: 1,
7058
- appearance: {
7059
- isBordered: false,
7060
- hasBackground: false,
7061
- isEditorPresentationDifferent: false
7062
- }
6627
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7063
6628
  },
7064
6629
  {
7065
6630
  id: "grid",
7066
- name: "Grid item",
6631
+ name: "Grid",
7067
6632
  image: "https://cdn-assets.supernova.io/blocks/variants/tokens-grid.svg",
7068
- layout: {
7069
- type: "Column",
7070
- children: ["tokens"],
7071
- columnAlign: "Start",
7072
- columnResizing: "Fill",
7073
- gap: "Medium"
7074
- },
7075
- maxColumns: 1,
7076
- defaultColumns: 1,
7077
- appearance: {
7078
- isBordered: false,
7079
- hasBackground: false,
7080
- isEditorPresentationDifferent: false
7081
- }
7082
- },
7083
- {
7084
- id: "color-stack",
7085
- name: "Color stack item",
7086
- image: "https://cdn-assets.supernova.io/blocks/variants/tokens-color-stack.svg",
7087
- layout: {
7088
- type: "Column",
7089
- children: ["tokens"],
7090
- columnAlign: "Start",
7091
- columnResizing: "Fill",
7092
- gap: "Medium"
7093
- },
7094
- maxColumns: 1,
6633
+ layout: { type: "Column", children: ["tokens"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6634
+ maxColumns: 4,
7095
6635
  defaultColumns: 1,
7096
- appearance: {
7097
- isBordered: false,
7098
- hasBackground: false,
7099
- isEditorPresentationDifferent: false
7100
- }
6636
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7101
6637
  }
7102
6638
  ],
7103
6639
  defaultVariantKey: "table"
7104
6640
  },
7105
- behavior: {
7106
- dataType: "Token",
7107
- entities: {
7108
- selectionType: "Entity",
7109
- maxSelected: 1
7110
- }
7111
- },
6641
+ behavior: { dataType: "Token", entities: { selectionType: "EntityAndGroup", maxSelected: 0 } },
7112
6642
  editorOptions: {
7113
6643
  onboarding: {
7114
- helpText: "Show a single design token.",
7115
- documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-detail-04"
6644
+ helpText: "Show a group of design tokens. Automatically display all subgroups too.",
6645
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-group-09"
7116
6646
  }
7117
6647
  },
7118
- appearance: {
7119
- isBordered: false,
7120
- hasBackground: false
7121
- }
6648
+ appearance: { isBordered: true, hasBackground: false }
7122
6649
  },
7123
6650
  {
7124
- id: "io.supernova.block.token-list",
7125
- name: "Token list",
7126
- description: "Show a list of design tokens",
6651
+ id: "io.supernova.block.token-color-ramps",
6652
+ name: "Color ramps",
6653
+ description: "The best way to display colors",
7127
6654
  category: "Tokens",
7128
6655
  icon: "https://cdn-assets.supernova.io/blocks/icons/token-list.svg",
7129
- searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
6656
+ searchKeywords: ["tokens", "ramp", "shades", "palette", "spectrum", "stack", "range", "swatch"],
7130
6657
  item: {
7131
6658
  properties: [
7132
6659
  {
7133
6660
  id: "tokens",
7134
6661
  name: "Tokens",
7135
6662
  type: "Token",
7136
- options: {
7137
- renderLayoutAs: "List",
7138
- defaultTheme: "none",
7139
- defaultValuePreview: "Split"
7140
- },
7141
- variantOptions: {
7142
- grid: {
7143
- renderLayoutAs: "Grid"
7144
- }
7145
- }
6663
+ options: { allowedTypes: ["Color"], allowPropertySelection: false, allowThemeSelection: true }
7146
6664
  }
7147
6665
  ],
7148
- appearance: {
7149
- isBordered: false,
7150
- hasBackground: false
7151
- },
6666
+ appearance: { isBordered: true, hasBackground: false },
7152
6667
  variants: [
7153
6668
  {
7154
- id: "table",
7155
- name: "Table",
7156
- image: "https://cdn-assets.supernova.io/blocks/variants/tokens-table.svg",
7157
- layout: {
7158
- type: "Column",
7159
- children: ["tokens"],
7160
- columnAlign: "Start",
7161
- columnResizing: "Fill",
7162
- gap: "Medium"
7163
- },
7164
- maxColumns: 1,
7165
- defaultColumns: 1,
7166
- appearance: {
7167
- isBordered: false,
7168
- hasBackground: false,
7169
- isEditorPresentationDifferent: false
7170
- }
7171
- },
7172
- {
7173
- id: "grid",
7174
- name: "Grid",
7175
- image: "https://cdn-assets.supernova.io/blocks/variants/tokens-grid.svg",
7176
- layout: {
7177
- type: "Column",
7178
- children: ["tokens"],
7179
- columnAlign: "Start",
7180
- columnResizing: "Fill",
7181
- gap: "Medium"
7182
- },
7183
- maxColumns: 4,
7184
- defaultColumns: 1,
7185
- appearance: {
7186
- isBordered: false,
7187
- hasBackground: false,
7188
- isEditorPresentationDifferent: false
7189
- }
7190
- },
7191
- {
7192
- id: "color-stack",
7193
- name: "Color stack",
6669
+ id: "default",
6670
+ name: "Default",
7194
6671
  image: "https://cdn-assets.supernova.io/blocks/variants/tokens-color-stack.svg",
7195
- layout: {
7196
- type: "Column",
7197
- children: ["tokens"],
7198
- columnAlign: "Start",
7199
- columnResizing: "Fill",
7200
- gap: "Medium"
7201
- },
7202
- maxColumns: 1,
6672
+ layout: { type: "Column", children: ["tokens"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6673
+ maxColumns: 2,
7203
6674
  defaultColumns: 1,
7204
- appearance: {
7205
- isBordered: false,
7206
- hasBackground: false,
7207
- isEditorPresentationDifferent: false
7208
- }
6675
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
7209
6676
  }
7210
6677
  ],
7211
- defaultVariantKey: "table"
7212
- },
7213
- behavior: {
7214
- dataType: "Token",
7215
- entities: {
7216
- selectionType: "Entity",
7217
- maxSelected: 0
7218
- }
6678
+ defaultVariantKey: "default"
7219
6679
  },
6680
+ behavior: { dataType: "Token", entities: { selectionType: "EntityAndGroup", maxSelected: 0 } },
7220
6681
  editorOptions: {
7221
- onboarding: {
7222
- helpText: "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.",
7223
- documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-list-06"
7224
- }
6682
+ onboarding: { helpText: "The best way to display colors", documentationLink: "https://learn.supernova.io" }
7225
6683
  },
7226
- appearance: {
7227
- isBordered: false,
7228
- hasBackground: false
7229
- }
6684
+ appearance: { isBordered: true, hasBackground: false }
7230
6685
  },
7231
6686
  {
7232
- id: "io.supernova.block.token-group",
7233
- name: "Token group",
7234
- description: "Show a group of design tokens",
6687
+ id: "io.supernova.block.color-accessibility-grid",
6688
+ name: "Accessibility color grid",
6689
+ description: "Visualize accessibility of your color tokens",
7235
6690
  category: "Tokens",
7236
- icon: "https://cdn-assets.supernova.io/blocks/icons/token-list.svg",
7237
- searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
6691
+ icon: "https://cdn-assets.supernova.io/blocks/icons/token-accessibility-grid.svg",
6692
+ searchKeywords: ["tokens", "color", "accessibility", "grid", "contrast"],
7238
6693
  item: {
7239
6694
  properties: [
7240
6695
  {
7241
6696
  id: "tokens",
7242
6697
  name: "Tokens",
7243
6698
  type: "Token",
7244
- options: {
7245
- renderLayoutAs: "List",
7246
- defaultTheme: "none",
7247
- defaultValuePreview: "Split"
7248
- },
7249
- variantOptions: {
7250
- grid: {
7251
- renderLayoutAs: "Grid"
7252
- }
7253
- }
6699
+ options: { allowedTypes: ["Color"], allowPropertySelection: false, allowThemeSelection: false }
7254
6700
  }
7255
6701
  ],
7256
- appearance: {
7257
- isBordered: false,
7258
- hasBackground: false
7259
- },
6702
+ appearance: { isBordered: true, hasBackground: false },
7260
6703
  variants: [
7261
6704
  {
7262
- id: "table",
7263
- name: "Table",
7264
- image: "https://cdn-assets.supernova.io/blocks/variants/tokens-table.svg",
7265
- layout: {
7266
- type: "Column",
7267
- children: ["tokens"],
7268
- columnAlign: "Start",
7269
- columnResizing: "Fill",
7270
- gap: "Medium"
7271
- },
6705
+ id: "default",
6706
+ name: "Default",
6707
+ image: "https://cdn-assets.supernova.io/blocks/variants/contrast-grid-large.svg",
6708
+ description: "Visualize accessibility of your colors by automatically calculating their color contrast ratio.",
6709
+ layout: { type: "Column", children: ["tokens"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
7272
6710
  maxColumns: 1,
7273
6711
  defaultColumns: 1,
7274
- appearance: {
7275
- isBordered: false,
7276
- hasBackground: false,
7277
- isEditorPresentationDifferent: false
7278
- }
7279
- },
7280
- {
7281
- id: "grid",
7282
- name: "Grid",
7283
- image: "https://cdn-assets.supernova.io/blocks/variants/tokens-grid.svg",
7284
- layout: {
7285
- type: "Column",
7286
- children: ["tokens"],
7287
- columnAlign: "Start",
7288
- columnResizing: "Fill",
7289
- gap: "Medium"
7290
- },
7291
- maxColumns: 4,
7292
- defaultColumns: 1,
7293
- appearance: {
7294
- isBordered: false,
7295
- hasBackground: false,
7296
- isEditorPresentationDifferent: false
7297
- }
7298
- },
7299
- {
7300
- id: "color-stack",
7301
- name: "Color stack",
7302
- image: "https://cdn-assets.supernova.io/blocks/variants/tokens-color-stack.svg",
7303
- layout: {
7304
- type: "Column",
7305
- children: ["tokens"],
7306
- columnAlign: "Start",
7307
- columnResizing: "Fill",
7308
- gap: "Medium"
7309
- },
7310
- maxColumns: 2,
7311
- defaultColumns: 1,
7312
- appearance: {
7313
- isBordered: false,
7314
- hasBackground: false,
7315
- isEditorPresentationDifferent: false
7316
- }
6712
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
7317
6713
  }
7318
6714
  ],
7319
- defaultVariantKey: "table"
7320
- },
7321
- behavior: {
7322
- dataType: "Token",
7323
- entities: {
7324
- selectionType: "Group",
7325
- maxSelected: 1
7326
- }
6715
+ defaultVariantKey: "default"
7327
6716
  },
6717
+ behavior: { dataType: "Token", entities: { selectionType: "EntityAndGroup", maxSelected: 0 } },
7328
6718
  editorOptions: {
7329
6719
  onboarding: {
7330
- helpText: "Show a group of design tokens. Automatically display all subgroups too.",
7331
- documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-group-09"
6720
+ helpText: "Visualize accessibility of your colors by automatically calculating their color contrast ratio.",
6721
+ documentationLink: "https://learn.supernova.io"
7332
6722
  }
7333
6723
  },
7334
- appearance: {
7335
- isBordered: false,
7336
- hasBackground: false
7337
- }
6724
+ appearance: { isBordered: true, hasBackground: false }
7338
6725
  },
7339
6726
  {
7340
6727
  id: "io.supernova.block.code",
@@ -7344,358 +6731,158 @@ var blocks = [
7344
6731
  icon: "https://cdn-assets.supernova.io/blocks/icons/code.svg",
7345
6732
  searchKeywords: ["code"],
7346
6733
  item: {
7347
- properties: [
7348
- {
7349
- id: "code",
7350
- name: "Code",
7351
- type: "Code",
7352
- options: {}
7353
- }
7354
- ],
7355
- appearance: {
7356
- isBordered: false,
7357
- hasBackground: false
7358
- },
6734
+ properties: [{ id: "code", name: "Code", type: "Code", options: {} }],
6735
+ appearance: { isBordered: true, hasBackground: false },
7359
6736
  variants: [
7360
6737
  {
7361
6738
  id: "default",
7362
6739
  name: "Default",
7363
- layout: {
7364
- type: "Column",
7365
- children: ["code"],
7366
- columnAlign: "Start",
7367
- columnResizing: "Fill",
7368
- gap: "Medium"
7369
- },
6740
+ layout: { type: "Column", children: ["code"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
7370
6741
  maxColumns: 1,
7371
6742
  defaultColumns: 1,
7372
- appearance: {
7373
- isBordered: false,
7374
- hasBackground: false,
7375
- isEditorPresentationDifferent: false
7376
- }
6743
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7377
6744
  }
7378
6745
  ],
7379
6746
  defaultVariantKey: "default"
7380
6747
  },
7381
- behavior: {
7382
- dataType: "Item",
7383
- items: {
7384
- numberOfItems: 1,
7385
- allowLinks: false
7386
- }
7387
- },
7388
- editorOptions: {
7389
- onboarding: {
7390
- helpText: "Code descriptor."
7391
- }
7392
- },
7393
- appearance: {
7394
- isBordered: false,
7395
- hasBackground: false
7396
- }
6748
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6749
+ editorOptions: { onboarding: { helpText: "Code descriptor." } },
6750
+ appearance: { isBordered: true, hasBackground: false }
7397
6751
  },
7398
6752
  {
7399
6753
  id: "io.supernova.block.code-react",
7400
6754
  name: "React code",
7401
- description: "Render React code",
6755
+ description: "Render a code snippet",
7402
6756
  category: "Code",
7403
- icon: "https://cdn-assets.supernova.io/blocks/icons/code-react.svg",
7404
- searchKeywords: ["code", "react", "snippet", "storybook", "editor", "example"],
6757
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/code-react.svg",
6758
+ searchKeywords: ["code", "react", "snippet", "storybook", "editor", "example", "sandbox"],
7405
6759
  item: {
7406
6760
  properties: [
7407
6761
  {
7408
6762
  id: "code",
7409
6763
  name: "Code",
7410
6764
  type: "CodeSandbox",
7411
- options: {
7412
- renderLayoutAs: "PreviewOnTop"
7413
- },
6765
+ options: { renderLayoutAs: "PreviewOnTop" },
7414
6766
  variantOptions: {
7415
- codeTop: {
7416
- renderLayoutAs: "PreviewOnBottom"
7417
- },
7418
- codeLeft: {
7419
- renderLayoutAs: "PreviewOnRight"
7420
- },
7421
- codeRight: {
7422
- renderLayoutAs: "PreviewOnLeft"
7423
- }
6767
+ codeTop: { renderLayoutAs: "PreviewOnBottom" },
6768
+ codeLeft: { renderLayoutAs: "PreviewOnRight" },
6769
+ codeRight: { renderLayoutAs: "PreviewOnLeft" }
7424
6770
  }
7425
6771
  }
7426
6772
  ],
7427
- appearance: {
7428
- isBordered: false,
7429
- hasBackground: false
7430
- },
6773
+ appearance: { isBordered: true, hasBackground: false },
7431
6774
  variants: [
7432
6775
  {
7433
6776
  id: "codeBottom",
7434
6777
  name: "Full width, code bottom",
7435
6778
  image: "https://cdn-assets.supernova.io/blocks/variants/react-code-bottom.svg",
7436
6779
  description: "Full-width block of code, with a preview on top.",
7437
- layout: {
7438
- type: "Column",
7439
- children: ["code"],
7440
- columnAlign: "Start",
7441
- columnResizing: "Fill",
7442
- gap: "Medium"
7443
- },
6780
+ layout: { type: "Column", children: ["code"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
7444
6781
  maxColumns: 1,
7445
6782
  defaultColumns: 1,
7446
- appearance: {
7447
- isBordered: false,
7448
- hasBackground: false,
7449
- isEditorPresentationDifferent: false
7450
- }
6783
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7451
6784
  },
7452
6785
  {
7453
6786
  id: "codeTop",
7454
6787
  name: "Full width, code top",
7455
6788
  image: "https://cdn-assets.supernova.io/blocks/variants/react-code-top.svg",
7456
6789
  description: "Full-width block of code, with a preview on bottom.",
7457
- layout: {
7458
- type: "Column",
7459
- children: ["code"],
7460
- columnAlign: "Start",
7461
- columnResizing: "Fill",
7462
- gap: "Medium"
7463
- },
6790
+ layout: { type: "Column", children: ["code"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
7464
6791
  maxColumns: 1,
7465
6792
  defaultColumns: 1,
7466
- appearance: {
7467
- isBordered: false,
7468
- hasBackground: false,
7469
- isEditorPresentationDifferent: false
7470
- }
6793
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7471
6794
  },
7472
6795
  {
7473
6796
  id: "codeLeft",
7474
6797
  name: "Side by side, code left",
7475
6798
  image: "https://cdn-assets.supernova.io/blocks/variants/react-code-left.svg",
7476
6799
  description: "Side-by-side preview and code, with code on the left.",
7477
- layout: {
7478
- type: "Column",
7479
- children: ["code"],
7480
- columnAlign: "Start",
7481
- columnResizing: "Fill",
7482
- gap: "Medium"
7483
- },
6800
+ layout: { type: "Column", children: ["code"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
7484
6801
  maxColumns: 1,
7485
6802
  defaultColumns: 1,
7486
- appearance: {
7487
- isBordered: false,
7488
- hasBackground: false,
7489
- isEditorPresentationDifferent: false
7490
- }
6803
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7491
6804
  },
7492
6805
  {
7493
6806
  id: "codeRight",
7494
6807
  name: "Side by side, code right",
7495
6808
  image: "https://cdn-assets.supernova.io/blocks/variants/react-code-right.svg",
7496
6809
  description: "Side-by-side preview and code, with code on the right.",
7497
- layout: {
7498
- type: "Column",
7499
- children: ["code"],
7500
- columnAlign: "Start",
7501
- columnResizing: "Fill",
7502
- gap: "Medium"
7503
- },
6810
+ layout: { type: "Column", children: ["code"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
7504
6811
  maxColumns: 1,
7505
6812
  defaultColumns: 1,
7506
- appearance: {
7507
- isBordered: false,
7508
- hasBackground: false,
7509
- isEditorPresentationDifferent: false
7510
- }
6813
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7511
6814
  }
7512
6815
  ],
7513
6816
  defaultVariantKey: "codeBottom"
7514
6817
  },
7515
- behavior: {
7516
- dataType: "Item",
7517
- items: {
7518
- numberOfItems: 1,
7519
- allowLinks: false
7520
- }
7521
- },
6818
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
7522
6819
  editorOptions: {
7523
6820
  onboarding: {
7524
6821
  helpText: "Display rendered code example",
7525
6822
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/code/render-react-code-vxufnkFm"
7526
6823
  }
7527
6824
  },
7528
- appearance: {
7529
- isBordered: false,
7530
- hasBackground: false
7531
- }
7532
- },
7533
- {
7534
- id: "io.supernova.block.link",
7535
- name: "Link",
7536
- description: "Preview of a link",
7537
- category: "Media",
7538
- icon: "https://cdn-assets.supernova.io/blocks/icons/shortcut-link.svg",
7539
- searchKeywords: [],
7540
- item: {
7541
- properties: [
7542
- {
7543
- id: "block.links.property.url",
7544
- name: "URL",
7545
- type: "EmbedURL",
7546
- options: {
7547
- defaultHeight: 120,
7548
- allowResize: false
7549
- }
7550
- }
7551
- ],
7552
- appearance: {
7553
- isBordered: false,
7554
- hasBackground: false
7555
- },
7556
- variants: [
7557
- {
7558
- id: "default",
7559
- name: "Default",
7560
- layout: {
7561
- type: "Column",
7562
- children: ["block.links.property.url"],
7563
- columnAlign: "Start",
7564
- columnResizing: "Fill",
7565
- gap: "Medium"
7566
- },
7567
- maxColumns: 1,
7568
- defaultColumns: 1,
7569
- appearance: {
7570
- isBordered: false,
7571
- hasBackground: false,
7572
- isEditorPresentationDifferent: false
7573
- }
7574
- }
7575
- ],
7576
- defaultVariantKey: "default"
7577
- },
7578
- behavior: {
7579
- dataType: "Item",
7580
- items: {
7581
- numberOfItems: 1,
7582
- allowLinks: false
7583
- }
7584
- },
7585
- editorOptions: {},
7586
- appearance: {
7587
- isBordered: false,
7588
- hasBackground: false
7589
- }
6825
+ appearance: { isBordered: false, hasBackground: false }
7590
6826
  },
7591
6827
  {
7592
6828
  id: "io.supernova.block.assets",
7593
6829
  name: "Assets",
7594
6830
  description: "Display icons or illustrations",
7595
6831
  category: "Assets",
7596
- icon: "https://cdn-assets.supernova.io/blocks/icons/assets.svg",
7597
- searchKeywords: ["icons", "illustrations", "grid", "svg", "logos", "theme"],
6832
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/assets.svg",
6833
+ searchKeywords: ["icons", "illustrations", "grid", "svg", "logos"],
7598
6834
  item: {
7599
- properties: [
7600
- {
7601
- id: "assets",
7602
- name: "Assets",
7603
- type: "Asset",
7604
- options: {}
7605
- }
7606
- ],
7607
- appearance: {
7608
- isBordered: false,
7609
- hasBackground: false
7610
- },
6835
+ properties: [{ id: "assets", name: "Assets", type: "Asset", options: {} }],
6836
+ appearance: { isBordered: true, hasBackground: false },
7611
6837
  variants: [
7612
6838
  {
7613
6839
  id: "default",
7614
6840
  name: "Simple grid",
7615
6841
  image: "https://cdn-assets.supernova.io/blocks/variants/assets-simple-grid.svg",
7616
6842
  description: "A simple grid of assets. Both the title and description are displayed below the preview.",
7617
- layout: {
7618
- type: "Column",
7619
- children: ["assets"],
7620
- columnAlign: "Start",
7621
- columnResizing: "Fill",
7622
- gap: "Medium"
7623
- },
7624
- maxColumns: 1,
6843
+ layout: { type: "Column", children: ["assets"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6844
+ maxColumns: 8,
7625
6845
  defaultColumns: 1,
7626
- appearance: {
7627
- isBordered: false,
7628
- hasBackground: false,
7629
- isEditorPresentationDifferent: false
7630
- }
6846
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7631
6847
  },
7632
6848
  {
7633
6849
  id: "square-grid",
7634
6850
  name: "Square grid",
7635
6851
  image: "https://cdn-assets.supernova.io/blocks/variants/assets-square-grid.svg",
7636
6852
  description: "Bordered square grid tailored for displaying icon assets. Only the title is displayed.",
7637
- layout: {
7638
- type: "Column",
7639
- children: ["assets"],
7640
- columnAlign: "Start",
7641
- columnResizing: "Fill",
7642
- gap: "Medium"
7643
- },
7644
- maxColumns: 1,
6853
+ layout: { type: "Column", children: ["assets"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6854
+ maxColumns: 8,
7645
6855
  defaultColumns: 1,
7646
- appearance: {
7647
- isBordered: false,
7648
- hasBackground: false,
7649
- isEditorPresentationDifferent: false
7650
- }
6856
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7651
6857
  },
7652
6858
  {
7653
6859
  id: "borderless-grid",
7654
6860
  name: "Borderless grid",
7655
6861
  image: "https://cdn-assets.supernova.io/blocks/variants/assets-borderless-grid.svg",
7656
6862
  description: "Borderless grid, perfect for displaying assets of the same height. Only the title is visible.",
7657
- layout: {
7658
- type: "Column",
7659
- children: ["assets"],
7660
- columnAlign: "Start",
7661
- columnResizing: "Fill",
7662
- gap: "Medium"
7663
- },
7664
- maxColumns: 1,
6863
+ layout: { type: "Column", children: ["assets"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6864
+ maxColumns: 8,
7665
6865
  defaultColumns: 1,
7666
- appearance: {
7667
- isBordered: false,
7668
- hasBackground: false,
7669
- isEditorPresentationDifferent: false
7670
- }
6866
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7671
6867
  }
7672
6868
  ],
7673
6869
  defaultVariantKey: "default"
7674
6870
  },
7675
- behavior: {
7676
- dataType: "Asset",
7677
- entities: {
7678
- selectionType: "EntityAndGroup",
7679
- maxSelected: 0
7680
- }
7681
- },
6871
+ behavior: { dataType: "Asset", entities: { selectionType: "EntityAndGroup", maxSelected: 0 } },
7682
6872
  editorOptions: {
7683
6873
  onboarding: {
7684
6874
  helpText: "Display a grid of icons or illustrations.",
7685
6875
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/asset/general-xa6EgXb2"
7686
6876
  }
7687
6877
  },
7688
- appearance: {
7689
- isBordered: false,
7690
- hasBackground: false
7691
- }
6878
+ appearance: { isBordered: true, hasBackground: false }
7692
6879
  },
7693
6880
  {
7694
6881
  id: "io.supernova.block.figma-frames",
7695
6882
  name: "Figma frames",
7696
6883
  description: "Display Figma frames as images",
7697
6884
  category: "Figma",
7698
- icon: "https://cdn-assets.supernova.io/blocks/icons/figma-frames.svg",
6885
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/figma-frames.svg",
7699
6886
  searchKeywords: ["figma", "frames", "image"],
7700
6887
  item: {
7701
6888
  properties: [
@@ -7706,10 +6893,7 @@ var blocks = [
7706
6893
  options: {}
7707
6894
  }
7708
6895
  ],
7709
- appearance: {
7710
- isBordered: false,
7711
- hasBackground: false
7712
- },
6896
+ appearance: { isBordered: true, hasBackground: false },
7713
6897
  variants: [
7714
6898
  {
7715
6899
  id: "bordered",
@@ -7725,11 +6909,7 @@ var blocks = [
7725
6909
  },
7726
6910
  maxColumns: 1,
7727
6911
  defaultColumns: 1,
7728
- appearance: {
7729
- isBordered: false,
7730
- hasBackground: false,
7731
- isEditorPresentationDifferent: false
7732
- }
6912
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7733
6913
  },
7734
6914
  {
7735
6915
  id: "plain",
@@ -7745,32 +6925,19 @@ var blocks = [
7745
6925
  },
7746
6926
  maxColumns: 1,
7747
6927
  defaultColumns: 1,
7748
- appearance: {
7749
- isBordered: false,
7750
- hasBackground: false,
7751
- isEditorPresentationDifferent: false
7752
- }
6928
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7753
6929
  }
7754
6930
  ],
7755
6931
  defaultVariantKey: "bordered"
7756
6932
  },
7757
- behavior: {
7758
- dataType: "FigmaNode",
7759
- entities: {
7760
- selectionType: "Entity",
7761
- maxSelected: 0
7762
- }
7763
- },
6933
+ behavior: { dataType: "FigmaNode", entities: { selectionType: "Entity", maxSelected: 0 } },
7764
6934
  editorOptions: {
7765
6935
  onboarding: {
7766
6936
  helpText: "Display Figma frames as images.",
7767
6937
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/figma/figma-frames/general-f3IYC5dg"
7768
6938
  }
7769
6939
  },
7770
- appearance: {
7771
- isBordered: false,
7772
- hasBackground: false
7773
- }
6940
+ appearance: { isBordered: true, hasBackground: false }
7774
6941
  },
7775
6942
  {
7776
6943
  id: "io.supernova.block.release-notes",
@@ -7781,54 +6948,32 @@ var blocks = [
7781
6948
  searchKeywords: ["version", "changelog", "history"],
7782
6949
  item: {
7783
6950
  properties: [],
7784
- appearance: {
7785
- isBordered: false,
7786
- hasBackground: false
7787
- },
6951
+ appearance: { isBordered: true, hasBackground: false },
7788
6952
  variants: [
7789
6953
  {
7790
6954
  id: "default",
7791
6955
  name: "Default",
7792
6956
  image: "https://cdn-assets.supernova.io/blocks/variants/release-notes.svg",
7793
- layout: {
7794
- type: "Column",
7795
- children: [],
7796
- columnAlign: "Start",
7797
- columnResizing: "Fill",
7798
- gap: "Medium"
7799
- },
6957
+ layout: { type: "Column", children: [], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
7800
6958
  maxColumns: 1,
7801
6959
  defaultColumns: 1,
7802
- appearance: {
7803
- isBordered: false,
7804
- hasBackground: false,
7805
- isEditorPresentationDifferent: true
7806
- }
6960
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
7807
6961
  }
7808
6962
  ],
7809
6963
  defaultVariantKey: "default"
7810
6964
  },
7811
- behavior: {
7812
- dataType: "Item",
7813
- items: {
7814
- numberOfItems: 1,
7815
- allowLinks: false
7816
- }
7817
- },
6965
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
7818
6966
  editorOptions: {
7819
6967
  onboarding: {
7820
- helpText: "Show formatted release notes from all previous released versions"
6968
+ helpText: "Show formatted release notes from all previous released versions."
7821
6969
  }
7822
6970
  },
7823
- appearance: {
7824
- isBordered: false,
7825
- hasBackground: false
7826
- }
6971
+ appearance: { isBordered: true, hasBackground: false }
7827
6972
  },
7828
6973
  {
7829
6974
  id: "io.supernova.block.component-checklist",
7830
6975
  name: "Component checklist",
7831
- description: "Highlight specific features of your components",
6976
+ description: "Highlight specific component properties",
7832
6977
  category: "Components",
7833
6978
  icon: "https://cdn-assets.supernova.io/blocks/icons/component-checklist.svg",
7834
6979
  searchKeywords: ["components", "health", "properties", "overview", "status"],
@@ -7838,31 +6983,22 @@ var blocks = [
7838
6983
  id: "components",
7839
6984
  name: "Components",
7840
6985
  type: "Component",
7841
- options: {
7842
- renderLayoutAs: "List"
7843
- }
7844
- },
7845
- {
7846
- id: "showDescription",
7847
- name: "Show description",
7848
- type: "Boolean",
7849
- options: {
7850
- defaultValue: true
7851
- }
6986
+ options: { renderLayoutAs: "List" }
7852
6987
  },
7853
6988
  {
7854
6989
  id: "title",
7855
6990
  name: "Title",
7856
6991
  type: "Text",
7857
- options: {
7858
- defaultValue: "Component checklist"
7859
- }
6992
+ options: { defaultValue: "Component checklist" }
6993
+ },
6994
+ {
6995
+ id: "showDescription",
6996
+ name: "Show description",
6997
+ type: "Boolean",
6998
+ options: { defaultValue: true }
7860
6999
  }
7861
7000
  ],
7862
- appearance: {
7863
- isBordered: false,
7864
- hasBackground: false
7865
- },
7001
+ appearance: { isBordered: true, hasBackground: false },
7866
7002
  variants: [
7867
7003
  {
7868
7004
  id: "default",
@@ -7870,70 +7006,50 @@ var blocks = [
7870
7006
  image: "https://cdn-assets.supernova.io/blocks/variants/component-checklist.svg",
7871
7007
  layout: {
7872
7008
  type: "Column",
7873
- children: ["components", "showDescription", "title"],
7009
+ children: ["components", "showDescription"],
7874
7010
  columnAlign: "Start",
7875
7011
  columnResizing: "Fill",
7876
7012
  gap: "Medium"
7877
7013
  },
7878
7014
  maxColumns: 1,
7879
7015
  defaultColumns: 1,
7880
- appearance: {
7881
- isBordered: false,
7882
- hasBackground: false,
7883
- isEditorPresentationDifferent: true
7884
- }
7016
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
7885
7017
  }
7886
7018
  ],
7887
7019
  defaultVariantKey: "default"
7888
7020
  },
7889
- behavior: {
7890
- dataType: "Component",
7891
- entities: {
7892
- selectionType: "Entity",
7893
- maxSelected: 1
7894
- }
7895
- },
7021
+ behavior: { dataType: "Component", entities: { selectionType: "Entity", maxSelected: 1 } },
7896
7022
  editorOptions: {
7897
7023
  onboarding: {
7898
- helpText: "Highlight specific features of your components.",
7024
+ helpText: "Highlight specific component properties",
7899
7025
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/component/component-checklist-NXepPIpZ"
7900
7026
  }
7901
7027
  },
7902
- appearance: {
7903
- isBordered: false,
7904
- hasBackground: false
7905
- }
7028
+ appearance: { isBordered: true, hasBackground: false }
7906
7029
  },
7907
7030
  {
7908
7031
  id: "io.supernova.block.component-checklist-all",
7909
7032
  name: "Component overview table",
7910
- description: "Show the overview of all your components",
7033
+ description: "Show an overview of all components",
7911
7034
  category: "Components",
7912
- icon: "https://cdn-assets.supernova.io/blocks/icons/component-overview-table.svg",
7913
- searchKeywords: ["components", "health", "properties", "overview", "status"],
7035
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/component-checklist-all.svg",
7036
+ searchKeywords: ["components", "health", "overview", "status"],
7914
7037
  item: {
7915
7038
  properties: [
7916
7039
  {
7917
7040
  id: "components",
7918
7041
  name: "Components",
7919
7042
  type: "Component",
7920
- options: {
7921
- renderLayoutAs: "Table"
7922
- }
7043
+ options: { renderLayoutAs: "Table" }
7923
7044
  },
7924
7045
  {
7925
7046
  id: "showLastUpdatedColumn",
7926
7047
  name: "Show last updated column",
7927
7048
  type: "Boolean",
7928
- options: {
7929
- defaultValue: true
7930
- }
7049
+ options: { defaultValue: true }
7931
7050
  }
7932
7051
  ],
7933
- appearance: {
7934
- isBordered: false,
7935
- hasBackground: false
7936
- },
7052
+ appearance: { isBordered: true, hasBackground: false },
7937
7053
  variants: [
7938
7054
  {
7939
7055
  id: "default",
@@ -7948,39 +7064,26 @@ var blocks = [
7948
7064
  },
7949
7065
  maxColumns: 1,
7950
7066
  defaultColumns: 1,
7951
- appearance: {
7952
- isBordered: false,
7953
- hasBackground: false,
7954
- isEditorPresentationDifferent: true
7955
- }
7067
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
7956
7068
  }
7957
7069
  ],
7958
7070
  defaultVariantKey: "default"
7959
7071
  },
7960
- behavior: {
7961
- dataType: "Component",
7962
- entities: {
7963
- selectionType: "Group",
7964
- maxSelected: 1
7965
- }
7966
- },
7072
+ behavior: { dataType: "Component", entities: { selectionType: "Group", maxSelected: 1 } },
7967
7073
  editorOptions: {
7968
7074
  onboarding: {
7969
- helpText: "Show the overview of all your components",
7075
+ helpText: "Show an overview of all your components",
7970
7076
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/component/component-overview-table-W8eOtJ5t"
7971
7077
  }
7972
7078
  },
7973
- appearance: {
7974
- isBordered: false,
7975
- hasBackground: false
7976
- }
7079
+ appearance: { isBordered: true, hasBackground: false }
7977
7080
  },
7978
7081
  {
7979
7082
  id: "io.supernova.block.component-health",
7980
7083
  name: "Component health",
7981
- description: "Show component health and additional attributes",
7084
+ description: "Show component health and other attributes",
7982
7085
  category: "Components",
7983
- icon: "https://cdn-assets.supernova.io/blocks/icons/component-health.svg",
7086
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v2/component-health.svg",
7984
7087
  searchKeywords: ["components", "health", "properties", "overview", "status"],
7985
7088
  item: {
7986
7089
  properties: [
@@ -7988,15 +7091,10 @@ var blocks = [
7988
7091
  id: "components",
7989
7092
  name: "Components",
7990
7093
  type: "Component",
7991
- options: {
7992
- renderLayoutAs: "List"
7993
- }
7094
+ options: { renderLayoutAs: "List" }
7994
7095
  }
7995
7096
  ],
7996
- appearance: {
7997
- isBordered: false,
7998
- hasBackground: false
7999
- },
7097
+ appearance: { isBordered: true, hasBackground: false },
8000
7098
  variants: [
8001
7099
  {
8002
7100
  id: "default",
@@ -8011,32 +7109,19 @@ var blocks = [
8011
7109
  },
8012
7110
  maxColumns: 1,
8013
7111
  defaultColumns: 1,
8014
- appearance: {
8015
- isBordered: false,
8016
- hasBackground: false,
8017
- isEditorPresentationDifferent: true
8018
- }
7112
+ appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
8019
7113
  }
8020
7114
  ],
8021
7115
  defaultVariantKey: "default"
8022
7116
  },
8023
- behavior: {
8024
- dataType: "Component",
8025
- entities: {
8026
- selectionType: "Entity",
8027
- maxSelected: 1
8028
- }
8029
- },
7117
+ behavior: { dataType: "Component", entities: { selectionType: "Entity", maxSelected: 1 } },
8030
7118
  editorOptions: {
8031
7119
  onboarding: {
8032
7120
  helpText: "Show component health and additional attributes",
8033
7121
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/component/component-health-sezSxEED"
8034
7122
  }
8035
7123
  },
8036
- appearance: {
8037
- isBordered: false,
8038
- hasBackground: false
8039
- }
7124
+ appearance: { isBordered: true, hasBackground: false }
8040
7125
  }
8041
7126
  ];
8042
7127
 
@@ -8073,7 +7158,7 @@ function internalProsemirrorNodeToSection(prosemirrorNode, definitionsMap) {
8073
7158
  contentExpandToEdges: true,
8074
7159
  expandToEdges: true
8075
7160
  },
8076
- items: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItem").map((c) => prosemirrorNodeToSectionItem(c, definitionsMap)).filter(nonNullFilter2)
7161
+ items: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItem").map((c) => prosemirrorNodeToSectionItem(c, definitionsMap)).filter(nonNullFilter)
8077
7162
  };
8078
7163
  }
8079
7164
  function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
@@ -8083,7 +7168,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
8083
7168
  return {
8084
7169
  id,
8085
7170
  title: getProsemirrorAttribute(prosemirrorNode, "title", z152.string()) ?? "",
8086
- columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter2)
7171
+ columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
8087
7172
  };
8088
7173
  }
8089
7174
  function prosemirrorNodeToSectionColumns(prosemirrorNode, definitionsMap) {
@@ -8106,12 +7191,12 @@ function internalProsemirrorNodesToPageItems(prosemirrorNodes, definitionsMap) {
8106
7191
  } else {
8107
7192
  return internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap);
8108
7193
  }
8109
- }).filter(nonNullFilter2);
7194
+ }).filter(nonNullFilter);
8110
7195
  }
8111
7196
  function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap) {
8112
7197
  return prosemirrorNodes.map((prosemirrorNode) => {
8113
7198
  return internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap);
8114
- }).filter(nonNullFilter2);
7199
+ }).filter(nonNullFilter);
8115
7200
  }
8116
7201
  function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap) {
8117
7202
  let definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z152.string());
@@ -8224,7 +7309,7 @@ function parseAsMultiRichText(prosemirrorNode, definition, property) {
8224
7309
  if (paragraph.type !== "paragraph")
8225
7310
  return parseRichText([]);
8226
7311
  return parseRichText(paragraph.content ?? []);
8227
- }).filter(nonNullFilter2)
7312
+ }).filter(nonNullFilter)
8228
7313
  }
8229
7314
  }
8230
7315
  }
@@ -8234,7 +7319,7 @@ function parseAsMultiRichText(prosemirrorNode, definition, property) {
8234
7319
  }
8235
7320
  function parseRichText(spans) {
8236
7321
  return {
8237
- spans: spans.map(parseRichTextSpan).filter(nonNullFilter2)
7322
+ spans: spans.map(parseRichTextSpan).filter(nonNullFilter)
8238
7323
  };
8239
7324
  }
8240
7325
  function parseRichTextSpan(span) {
@@ -8243,7 +7328,7 @@ function parseRichTextSpan(span) {
8243
7328
  const marks = span.marks ?? [];
8244
7329
  return {
8245
7330
  text: span.text,
8246
- attributes: marks.map(parseRichTextAttribute).filter(nonNullFilter2)
7331
+ attributes: marks.map(parseRichTextAttribute).filter(nonNullFilter)
8247
7332
  };
8248
7333
  }
8249
7334
  function parseRichTextAttribute(mark) {
@@ -8252,7 +7337,7 @@ function parseRichTextAttribute(mark) {
8252
7337
  return { type: "Bold" };
8253
7338
  case "italic":
8254
7339
  return { type: "Italic" };
8255
- case "strikethrough":
7340
+ case "strike":
8256
7341
  return { type: "Strikethrough" };
8257
7342
  case "code":
8258
7343
  return { type: "Code" };
@@ -8307,7 +7392,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
8307
7392
  };
8308
7393
  tableValue.value = rows.map((row) => {
8309
7394
  return {
8310
- cells: (row.content ?? []).map(parseAsTableCell).filter(nonNullFilter2)
7395
+ cells: (row.content ?? []).map(parseAsTableCell).filter(nonNullFilter)
8311
7396
  };
8312
7397
  });
8313
7398
  return {
@@ -8339,7 +7424,7 @@ function parseAsTableCell(prosemirrorNode) {
8339
7424
  if (columnWidthArray) {
8340
7425
  columnWidth = columnWidthArray[0];
8341
7426
  }
8342
- const tableNodes = (prosemirrorNode.content ?? []).map(parseAsTableNode).filter(nonNullFilter2);
7427
+ const tableNodes = (prosemirrorNode.content ?? []).map(parseAsTableNode).filter(nonNullFilter);
8343
7428
  return {
8344
7429
  id,
8345
7430
  alignment: parseTableCellAlignment(textAlign),
@@ -8486,7 +7571,7 @@ function parseBlockItems(prosemirrorNode, definition) {
8486
7571
  console.error("Block `items` property must be a json array");
8487
7572
  return null;
8488
7573
  }
8489
- return itemsJson.map((i) => parseItem(i, definition)).filter(nonNullFilter2);
7574
+ return itemsJson.map((i) => parseItem(i, definition)).filter(nonNullFilter);
8490
7575
  }
8491
7576
  function parseAppearance(prosemirrorNode) {
8492
7577
  let appearance = {};
@@ -8610,7 +7695,7 @@ function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchem
8610
7695
  return void 0;
8611
7696
  }
8612
7697
  }
8613
- function nonNullFilter2(item) {
7698
+ function nonNullFilter(item) {
8614
7699
  return item !== null;
8615
7700
  }
8616
7701
  function mapByUnique2(items, keyFn) {
@@ -8692,8 +7777,6 @@ export {
8692
7777
  PageBlockEditorModel,
8693
7778
  PageSectionEditorModel,
8694
7779
  WorkspaceConfigurationPayload,
8695
- blockDefinitionForBlock,
8696
- blockToProsemirrorNode,
8697
7780
  buildDocPagePublishPaths,
8698
7781
  calculateElementParentChain,
8699
7782
  documentationElementsToHierarchyDto,
@@ -8712,7 +7795,6 @@ export {
8712
7795
  prosemirrorNodeToBlock,
8713
7796
  prosemirrorNodeToSection,
8714
7797
  prosemirrorNodesToBlocks,
8715
- sectionToProsemirrorNode,
8716
7798
  serializeAsCustomBlock,
8717
7799
  validateSsoPayload,
8718
7800
  yDocToPage,