@supernova-studio/client 0.32.0 → 0.34.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
@@ -925,7 +925,7 @@ var PageBlockResourceFrameNodeReference = z35.object({
925
925
  var PageBlockImageReference = z35.object({
926
926
  type: PageBlockImageType,
927
927
  resource: PageBlockImageResourceReference.optional(),
928
- figmaFile: PageBlockResourceFrameNodeReference.optional()
928
+ figmaNode: PageBlockResourceFrameNodeReference.optional()
929
929
  });
930
930
  var PageBlockColorV2 = z35.object({
931
931
  value: z35.string(),
@@ -2061,7 +2061,6 @@ var PageBlockDefinitionProperty = z91.object({
2061
2061
  name: z91.string(),
2062
2062
  type: PageBlockDefinitionPropertyType,
2063
2063
  description: z91.string().optional(),
2064
- // TODO Docs
2065
2064
  options: PageBlockDefinitionUntypedPropertyOptions.optional(),
2066
2065
  variantOptions: z91.record(PageBlockDefinitionUntypedPropertyOptions).optional()
2067
2066
  });
@@ -3764,7 +3763,7 @@ var DTOCreateDocumentationTabInput = z135.object({
3764
3763
  persistentId: z135.string().uuid(),
3765
3764
  // If this is page, we will attempt to convert it to tab
3766
3765
  // If this is tab group, we will add a new tab to it
3767
- tabContainerPersistentId: z135.string(),
3766
+ fromItemPersistentId: z135.string(),
3768
3767
  tabName: z135.string()
3769
3768
  });
3770
3769
  var DTODeleteDocumentationTabGroupInput = z135.object({
@@ -5020,8 +5019,12 @@ import { prosemirrorJSONToYXmlFragment } from "y-prosemirror";
5020
5019
 
5021
5020
  // src/yjs/docs-editor/list-tree-builder.ts
5022
5021
  var ListTreeBuilder = class {
5023
- add(block, multiRichTextProperty) {
5024
- const list = this.createList(block, multiRichTextProperty);
5022
+ addWithProperty(block, multiRichTextProperty) {
5023
+ const parsedOptions = PageBlockDefinitionMutiRichTextOptions.optional().parse(multiRichTextProperty.options);
5024
+ return this.add(block, multiRichTextProperty.id, parsedOptions?.multiRichTextStyle || "OL");
5025
+ }
5026
+ add(block, multiRichTextPropertyId, multiRichTextPropertyStyle) {
5027
+ const list = this.createList(block, multiRichTextPropertyId, multiRichTextPropertyStyle);
5025
5028
  if (!this.rootNode) {
5026
5029
  this.rootNode = list;
5027
5030
  return void 0;
@@ -5067,69 +5070,9 @@ var ListTreeBuilder = class {
5067
5070
  }
5068
5071
  return currentNode;
5069
5072
  }
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) {
5073
+ createList(block, multiRichTextPropertyId, multiRichTextPropertyStyle) {
5129
5074
  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";
5075
+ const multiRichTextValue = BlockParsingUtils.multiRichTextPropertyValue(blockItem, multiRichTextPropertyId);
5133
5076
  const leadingChildren = multiRichTextValue.value.map((t) => {
5134
5077
  return {
5135
5078
  type: "ListItem",
@@ -5141,7 +5084,7 @@ var ListTreeBuilder = class {
5141
5084
  }
5142
5085
  return {
5143
5086
  type: "List",
5144
- listType: style === "OL" ? "Ordered" : "Unordered",
5087
+ listType: multiRichTextPropertyStyle === "OL" ? "Ordered" : "Unordered",
5145
5088
  leadingChildren,
5146
5089
  block,
5147
5090
  children: []
@@ -5163,20 +5106,25 @@ function pageToProsemirrorDoc(page, definitions) {
5163
5106
  blockBuffer.push(b);
5164
5107
  } else if (b.type === "Section") {
5165
5108
  if (blockBuffer.length) {
5166
- children.push(...blocksToProsemirrorNodes(blockBuffer, definitionsMap));
5109
+ children.push(...internalBlocksToProsemirrorNodes(blockBuffer, definitionsMap));
5167
5110
  blockBuffer = [];
5168
5111
  }
5169
5112
  children.push(internalSectionToProsemirrorNode(b, definitionsMap));
5170
5113
  }
5171
5114
  });
5172
5115
  if (blockBuffer.length) {
5173
- children.push(...blocksToProsemirrorNodes(blockBuffer, definitionsMap));
5116
+ children.push(...internalBlocksToProsemirrorNodes(blockBuffer, definitionsMap));
5174
5117
  }
5175
5118
  return {
5176
5119
  type: "doc",
5177
5120
  content: children
5178
5121
  };
5179
5122
  }
5123
+ function blockToProsemirrorNode(block, definitions) {
5124
+ const definitionsMap = mapByUnique(definitions, (d) => d.id);
5125
+ const nodes = internalBlocksToProsemirrorNodes([block], definitionsMap);
5126
+ return nodes[0] ?? null;
5127
+ }
5180
5128
  function internalSectionToProsemirrorNode(section, definitionsMap) {
5181
5129
  return {
5182
5130
  type: "tabsSection",
@@ -5198,7 +5146,7 @@ function sectionItemToProsemirrorNode(sectionItem, definitionsMap) {
5198
5146
  };
5199
5147
  }
5200
5148
  function sectionColumnToProsemirrorNode(sectionColumn, definitionsMap) {
5201
- const blocks2 = blocksToProsemirrorNodes(sectionColumn.blocks, definitionsMap);
5149
+ const blocks2 = internalBlocksToProsemirrorNodes(sectionColumn.blocks, definitionsMap);
5202
5150
  if (!blocks2.length) {
5203
5151
  blocks2.push({
5204
5152
  type: "paragraph",
@@ -5216,7 +5164,7 @@ function sectionColumnToProsemirrorNode(sectionColumn, definitionsMap) {
5216
5164
  content: blocks2
5217
5165
  };
5218
5166
  }
5219
- function blocksToProsemirrorNodes(blocks2, definitionsMap) {
5167
+ function internalBlocksToProsemirrorNodes(blocks2, definitionsMap) {
5220
5168
  const result = [];
5221
5169
  const listTreeBuilder = new ListTreeBuilder();
5222
5170
  blocks2.forEach((b) => {
@@ -5227,7 +5175,7 @@ function blocksToProsemirrorNodes(blocks2, definitionsMap) {
5227
5175
  }
5228
5176
  const multiRichTextProp = BlockDefinitionUtils.firstMultiRichTextProperty(definition);
5229
5177
  if (multiRichTextProp) {
5230
- const node = listTreeBuilder.add(b, multiRichTextProp);
5178
+ const node = listTreeBuilder.addWithProperty(b, multiRichTextProp);
5231
5179
  if (node) {
5232
5180
  result.push(serializeAsMultiRichTextBlock(node));
5233
5181
  }
@@ -5236,7 +5184,7 @@ function blocksToProsemirrorNodes(blocks2, definitionsMap) {
5236
5184
  if (tree2) {
5237
5185
  result.push(serializeAsMultiRichTextBlock(tree2));
5238
5186
  }
5239
- const node = blockToProsemirrorNode(b, definition);
5187
+ const node = internalBlockToProsemirrorNode(b, definition);
5240
5188
  node && result.push(node);
5241
5189
  }
5242
5190
  });
@@ -5246,7 +5194,7 @@ function blocksToProsemirrorNodes(blocks2, definitionsMap) {
5246
5194
  }
5247
5195
  return result;
5248
5196
  }
5249
- function blockToProsemirrorNode(block, definition) {
5197
+ function internalBlockToProsemirrorNode(block, definition) {
5250
5198
  const richTextProperty = BlockDefinitionUtils.firstRichTextProperty(definition);
5251
5199
  if (richTextProperty) {
5252
5200
  return serializeAsRichTextBlock({
@@ -5665,7 +5613,7 @@ var blocks = [
5665
5613
  layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5666
5614
  maxColumns: 1,
5667
5615
  defaultColumns: 1,
5668
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5616
+ appearance: { isEditorPresentationDifferent: false }
5669
5617
  }
5670
5618
  ],
5671
5619
  defaultVariantKey: "default"
@@ -5677,7 +5625,12 @@ var blocks = [
5677
5625
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/text-HxZ9ssJR"
5678
5626
  }
5679
5627
  },
5680
- appearance: { isBordered: true, hasBackground: false }
5628
+ appearance: {
5629
+ isBordered: true,
5630
+ hasBackground: false,
5631
+ isEditorPresentationDifferent: false,
5632
+ showBlockHeaderInEditor: false
5633
+ }
5681
5634
  },
5682
5635
  {
5683
5636
  id: "io.supernova.block.title1",
@@ -5703,7 +5656,7 @@ var blocks = [
5703
5656
  layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5704
5657
  maxColumns: 1,
5705
5658
  defaultColumns: 1,
5706
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5659
+ appearance: {}
5707
5660
  }
5708
5661
  ],
5709
5662
  defaultVariantKey: "default"
@@ -5715,7 +5668,12 @@ var blocks = [
5715
5668
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY"
5716
5669
  }
5717
5670
  },
5718
- appearance: { isBordered: true, hasBackground: false }
5671
+ appearance: {
5672
+ isBordered: true,
5673
+ hasBackground: false,
5674
+ isEditorPresentationDifferent: false,
5675
+ showBlockHeaderInEditor: false
5676
+ }
5719
5677
  },
5720
5678
  {
5721
5679
  id: "io.supernova.block.title2",
@@ -5741,7 +5699,7 @@ var blocks = [
5741
5699
  layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5742
5700
  maxColumns: 1,
5743
5701
  defaultColumns: 1,
5744
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5702
+ appearance: {}
5745
5703
  }
5746
5704
  ],
5747
5705
  defaultVariantKey: "default"
@@ -5753,7 +5711,12 @@ var blocks = [
5753
5711
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY"
5754
5712
  }
5755
5713
  },
5756
- appearance: { isBordered: true, hasBackground: false }
5714
+ appearance: {
5715
+ isBordered: true,
5716
+ hasBackground: false,
5717
+ isEditorPresentationDifferent: false,
5718
+ showBlockHeaderInEditor: false
5719
+ }
5757
5720
  },
5758
5721
  {
5759
5722
  id: "io.supernova.block.title3",
@@ -5779,7 +5742,7 @@ var blocks = [
5779
5742
  layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5780
5743
  maxColumns: 1,
5781
5744
  defaultColumns: 1,
5782
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5745
+ appearance: {}
5783
5746
  }
5784
5747
  ],
5785
5748
  defaultVariantKey: "default"
@@ -5791,7 +5754,12 @@ var blocks = [
5791
5754
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY"
5792
5755
  }
5793
5756
  },
5794
- appearance: { isBordered: true, hasBackground: false }
5757
+ appearance: {
5758
+ isBordered: true,
5759
+ hasBackground: false,
5760
+ isEditorPresentationDifferent: false,
5761
+ showBlockHeaderInEditor: false
5762
+ }
5795
5763
  },
5796
5764
  {
5797
5765
  id: "io.supernova.block.title4",
@@ -5817,7 +5785,7 @@ var blocks = [
5817
5785
  layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5818
5786
  maxColumns: 1,
5819
5787
  defaultColumns: 1,
5820
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5788
+ appearance: {}
5821
5789
  }
5822
5790
  ],
5823
5791
  defaultVariantKey: "default"
@@ -5829,7 +5797,12 @@ var blocks = [
5829
5797
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY"
5830
5798
  }
5831
5799
  },
5832
- appearance: { isBordered: true, hasBackground: false }
5800
+ appearance: {
5801
+ isBordered: true,
5802
+ hasBackground: false,
5803
+ isEditorPresentationDifferent: false,
5804
+ showBlockHeaderInEditor: false
5805
+ }
5833
5806
  },
5834
5807
  {
5835
5808
  id: "io.supernova.block.title5",
@@ -5855,7 +5828,7 @@ var blocks = [
5855
5828
  layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5856
5829
  maxColumns: 1,
5857
5830
  defaultColumns: 1,
5858
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5831
+ appearance: {}
5859
5832
  }
5860
5833
  ],
5861
5834
  defaultVariantKey: "default"
@@ -5867,7 +5840,12 @@ var blocks = [
5867
5840
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/heading-MUKlJ7dY"
5868
5841
  }
5869
5842
  },
5870
- appearance: { isBordered: true, hasBackground: false }
5843
+ appearance: {
5844
+ isBordered: true,
5845
+ hasBackground: false,
5846
+ isEditorPresentationDifferent: false,
5847
+ showBlockHeaderInEditor: false
5848
+ }
5871
5849
  },
5872
5850
  {
5873
5851
  id: "io.supernova.block.ordered-list",
@@ -5893,7 +5871,7 @@ var blocks = [
5893
5871
  layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5894
5872
  maxColumns: 1,
5895
5873
  defaultColumns: 1,
5896
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5874
+ appearance: {}
5897
5875
  }
5898
5876
  ],
5899
5877
  defaultVariantKey: "default"
@@ -5905,7 +5883,12 @@ var blocks = [
5905
5883
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/list-UC5iPZLK"
5906
5884
  }
5907
5885
  },
5908
- appearance: { isBordered: true, hasBackground: false }
5886
+ appearance: {
5887
+ isBordered: true,
5888
+ hasBackground: false,
5889
+ isEditorPresentationDifferent: false,
5890
+ showBlockHeaderInEditor: false
5891
+ }
5909
5892
  },
5910
5893
  {
5911
5894
  id: "io.supernova.block.unordered-list",
@@ -5931,7 +5914,7 @@ var blocks = [
5931
5914
  layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
5932
5915
  maxColumns: 1,
5933
5916
  defaultColumns: 1,
5934
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5917
+ appearance: {}
5935
5918
  }
5936
5919
  ],
5937
5920
  defaultVariantKey: "default"
@@ -5943,7 +5926,12 @@ var blocks = [
5943
5926
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/list-UC5iPZLK"
5944
5927
  }
5945
5928
  },
5946
- appearance: { isBordered: true, hasBackground: false }
5929
+ appearance: {
5930
+ isBordered: true,
5931
+ hasBackground: false,
5932
+ isEditorPresentationDifferent: false,
5933
+ showBlockHeaderInEditor: false
5934
+ }
5947
5935
  },
5948
5936
  {
5949
5937
  id: "io.supernova.block.divider",
@@ -5968,7 +5956,7 @@ var blocks = [
5968
5956
  },
5969
5957
  maxColumns: 1,
5970
5958
  defaultColumns: 1,
5971
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
5959
+ appearance: {}
5972
5960
  }
5973
5961
  ],
5974
5962
  defaultVariantKey: "default"
@@ -5980,7 +5968,12 @@ var blocks = [
5980
5968
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/divider-tLuxooLH"
5981
5969
  }
5982
5970
  },
5983
- appearance: { isBordered: true, hasBackground: false }
5971
+ appearance: {
5972
+ isBordered: true,
5973
+ hasBackground: false,
5974
+ isEditorPresentationDifferent: false,
5975
+ showBlockHeaderInEditor: false
5976
+ }
5984
5977
  },
5985
5978
  {
5986
5979
  id: "io.supernova.block.blockquote",
@@ -6006,7 +5999,7 @@ var blocks = [
6006
5999
  layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6007
6000
  maxColumns: 1,
6008
6001
  defaultColumns: 1,
6009
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6002
+ appearance: {}
6010
6003
  }
6011
6004
  ],
6012
6005
  defaultVariantKey: "default"
@@ -6018,14 +6011,19 @@ var blocks = [
6018
6011
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/blockquote-zYWAsb6X"
6019
6012
  }
6020
6013
  },
6021
- appearance: { isBordered: true, hasBackground: false }
6014
+ appearance: {
6015
+ isBordered: true,
6016
+ hasBackground: false,
6017
+ isEditorPresentationDifferent: false,
6018
+ showBlockHeaderInEditor: false
6019
+ }
6022
6020
  },
6023
6021
  {
6024
6022
  id: "io.supernova.block.callout",
6025
6023
  name: "Callout",
6026
6024
  description: "Highlight a section of text",
6027
6025
  category: "Text",
6028
- icon: "https://cdn-assets.supernova.io/blocks/icons/v2/callout.svg",
6026
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v3/callout.svg",
6029
6027
  searchKeywords: ["banner", "alert", "note", "tip", "warning"],
6030
6028
  item: {
6031
6029
  properties: [
@@ -6044,7 +6042,7 @@ var blocks = [
6044
6042
  layout: { type: "Column", children: ["text"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6045
6043
  maxColumns: 1,
6046
6044
  defaultColumns: 1,
6047
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6045
+ appearance: {}
6048
6046
  }
6049
6047
  ],
6050
6048
  defaultVariantKey: "default"
@@ -6056,7 +6054,12 @@ var blocks = [
6056
6054
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/text/callout-ZPlZObD1"
6057
6055
  }
6058
6056
  },
6059
- appearance: { isBordered: true, hasBackground: false }
6057
+ appearance: {
6058
+ isBordered: true,
6059
+ hasBackground: false,
6060
+ isEditorPresentationDifferent: false,
6061
+ showBlockHeaderInEditor: false
6062
+ }
6060
6063
  },
6061
6064
  {
6062
6065
  id: "io.supernova.block.image",
@@ -6082,7 +6085,7 @@ var blocks = [
6082
6085
  layout: { type: "Column", children: ["image"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6083
6086
  maxColumns: 1,
6084
6087
  defaultColumns: 1,
6085
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6088
+ appearance: {}
6086
6089
  }
6087
6090
  ],
6088
6091
  defaultVariantKey: "default"
@@ -6094,7 +6097,12 @@ var blocks = [
6094
6097
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/image-Ue8VdT8B"
6095
6098
  }
6096
6099
  },
6097
- appearance: { isBordered: false, hasBackground: false }
6100
+ appearance: {
6101
+ isBordered: false,
6102
+ hasBackground: false,
6103
+ isEditorPresentationDifferent: false,
6104
+ showBlockHeaderInEditor: false
6105
+ }
6098
6106
  },
6099
6107
  {
6100
6108
  id: "io.supernova.block.shortcut-links",
@@ -6144,7 +6152,7 @@ var blocks = [
6144
6152
  },
6145
6153
  maxColumns: 4,
6146
6154
  defaultColumns: 1,
6147
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6155
+ appearance: {}
6148
6156
  },
6149
6157
  {
6150
6158
  id: "imageOnLeft",
@@ -6174,7 +6182,7 @@ var blocks = [
6174
6182
  },
6175
6183
  maxColumns: 1,
6176
6184
  defaultColumns: 1,
6177
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6185
+ appearance: {}
6178
6186
  },
6179
6187
  {
6180
6188
  id: "iconOnTop",
@@ -6189,7 +6197,7 @@ var blocks = [
6189
6197
  },
6190
6198
  maxColumns: 4,
6191
6199
  defaultColumns: 1,
6192
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6200
+ appearance: {}
6193
6201
  },
6194
6202
  {
6195
6203
  id: "iconOnLeft",
@@ -6219,7 +6227,7 @@ var blocks = [
6219
6227
  },
6220
6228
  maxColumns: 2,
6221
6229
  defaultColumns: 1,
6222
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6230
+ appearance: {}
6223
6231
  }
6224
6232
  ],
6225
6233
  defaultVariantKey: "imageOnTop"
@@ -6231,26 +6239,31 @@ var blocks = [
6231
6239
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/links/shortcuts/general-jVfNifo4"
6232
6240
  }
6233
6241
  },
6234
- appearance: { isBordered: true, hasBackground: false }
6242
+ appearance: {
6243
+ isBordered: true,
6244
+ hasBackground: false,
6245
+ isEditorPresentationDifferent: false,
6246
+ showBlockHeaderInEditor: false
6247
+ }
6235
6248
  },
6236
6249
  {
6237
- id: "io.supernova.block.embed",
6238
- name: "Embed",
6239
- description: "Embed a generic URL",
6250
+ id: "io.supernova.block.embed-figma",
6251
+ name: "Figma embed",
6252
+ description: "Embed a Figma canvas or prototype",
6240
6253
  category: "Media",
6241
- icon: "https://cdn-assets.supernova.io/blocks/icons/embed.svg",
6242
- searchKeywords: ["embed", "url", "iframe", "site", "import"],
6254
+ icon: "https://cdn-assets.supernova.io/blocks/icons/embed-figma.svg",
6255
+ searchKeywords: ["embed", "figma", "design", "prototype", "canvas"],
6243
6256
  item: {
6244
6257
  properties: [
6245
6258
  {
6246
- id: "embedUrl",
6247
- name: "Embed URL",
6259
+ id: "embed",
6260
+ name: "Figma URL",
6248
6261
  type: "EmbedURL",
6249
6262
  options: {
6250
- allowCaption: true,
6263
+ allowCaption: false,
6251
6264
  allowResize: true,
6252
6265
  defaultHeight: 400,
6253
- urlValidationRegex: "^(https?://)?(www.)?.+$"
6266
+ urlValidationRegex: "^(https?://)?(www.)?(figma.com)/.+$"
6254
6267
  }
6255
6268
  }
6256
6269
  ],
@@ -6259,16 +6272,10 @@ var blocks = [
6259
6272
  {
6260
6273
  id: "default",
6261
6274
  name: "Default",
6262
- layout: {
6263
- type: "Column",
6264
- children: ["embedUrl"],
6265
- columnAlign: "Start",
6266
- columnResizing: "Fill",
6267
- gap: "Medium"
6268
- },
6275
+ layout: { type: "Column", children: ["embed"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6269
6276
  maxColumns: 1,
6270
6277
  defaultColumns: 1,
6271
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6278
+ appearance: {}
6272
6279
  }
6273
6280
  ],
6274
6281
  defaultVariantKey: "default"
@@ -6276,11 +6283,59 @@ var blocks = [
6276
6283
  behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6277
6284
  editorOptions: {
6278
6285
  onboarding: {
6279
- helpText: "Embed any page to your documentation as an iframe.",
6280
- documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/embed/public-url-2ZeRQ332"
6286
+ helpText: "Embed a Figma canvas or prototype to your documentation.",
6287
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/figma/embed-figma-GPNJsT8A"
6288
+ }
6289
+ },
6290
+ appearance: {
6291
+ isBordered: true,
6292
+ hasBackground: false,
6293
+ isEditorPresentationDifferent: false,
6294
+ showBlockHeaderInEditor: false
6295
+ }
6296
+ },
6297
+ {
6298
+ id: "io.supernova.block.storybook",
6299
+ name: "Storybook",
6300
+ description: "Embed Storybook canvas",
6301
+ category: "Media",
6302
+ icon: "https://cdn-assets.supernova.io/blocks/icons/storybook.svg",
6303
+ searchKeywords: ["storybook", "story", "stories", "example", "preview", "code", "react"],
6304
+ item: {
6305
+ properties: [
6306
+ {
6307
+ id: "embed",
6308
+ name: "Storybook URL",
6309
+ type: "Storybook",
6310
+ options: { allowCaption: true, allowResize: true, defaultHeight: 400 }
6311
+ }
6312
+ ],
6313
+ appearance: { isBordered: true, hasBackground: false },
6314
+ variants: [
6315
+ {
6316
+ id: "default",
6317
+ name: "Default",
6318
+ layout: { type: "Column", children: ["embed"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6319
+ maxColumns: 1,
6320
+ defaultColumns: 1,
6321
+ appearance: {}
6322
+ }
6323
+ ],
6324
+ defaultVariantKey: "default"
6325
+ },
6326
+ behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6327
+ editorOptions: {
6328
+ onboarding: {
6329
+ helpText: "Embed a Storybook story to your documentation.",
6330
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/code/storybook-1EGPhwBl"
6281
6331
  }
6282
6332
  },
6283
- appearance: { isBordered: true, hasBackground: false }
6333
+ appearance: {
6334
+ isBordered: true,
6335
+ hasBackground: false,
6336
+ isEditorPresentationDifferent: false,
6337
+ showBlockHeaderInEditor: false
6338
+ }
6284
6339
  },
6285
6340
  {
6286
6341
  id: "io.supernova.block.embed-youtube",
@@ -6311,7 +6366,7 @@ var blocks = [
6311
6366
  layout: { type: "Column", children: ["embed"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6312
6367
  maxColumns: 1,
6313
6368
  defaultColumns: 1,
6314
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6369
+ appearance: {}
6315
6370
  }
6316
6371
  ],
6317
6372
  defaultVariantKey: "default"
@@ -6323,7 +6378,12 @@ var blocks = [
6323
6378
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/youtube-Gh8VUrSF"
6324
6379
  }
6325
6380
  },
6326
- appearance: { isBordered: true, hasBackground: false }
6381
+ appearance: {
6382
+ isBordered: true,
6383
+ hasBackground: false,
6384
+ isEditorPresentationDifferent: false,
6385
+ showBlockHeaderInEditor: false
6386
+ }
6327
6387
  },
6328
6388
  {
6329
6389
  id: "io.supernova.block.embed-lottie",
@@ -6377,7 +6437,8 @@ var blocks = [
6377
6437
  {
6378
6438
  id: "default",
6379
6439
  name: "Default",
6380
- image: "https://cdn-assets.supernova.io/blocks/variants/lottie.svg",
6440
+ image: "https://cdn-assets.supernova.io/blocks/variants/lottie-player.svg",
6441
+ description: "Embed a Lottie animation to your documentation.",
6381
6442
  layout: {
6382
6443
  type: "Column",
6383
6444
  children: ["url", "height", "width", "autoplay", "loop", "playerControls"],
@@ -6387,7 +6448,7 @@ var blocks = [
6387
6448
  },
6388
6449
  maxColumns: 1,
6389
6450
  defaultColumns: 1,
6390
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
6451
+ appearance: {}
6391
6452
  }
6392
6453
  ],
6393
6454
  defaultVariantKey: "default"
@@ -6399,64 +6460,31 @@ var blocks = [
6399
6460
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/lottie-preview-7CqFdGv9"
6400
6461
  }
6401
6462
  },
6402
- appearance: { isBordered: true, hasBackground: false }
6403
- },
6404
- {
6405
- id: "io.supernova.block.storybook",
6406
- name: "Storybook",
6407
- description: "Embed Storybook canvas",
6408
- category: "Media",
6409
- icon: "https://cdn-assets.supernova.io/blocks/icons/storybook.svg",
6410
- searchKeywords: ["storybook", "story", "stories", "example", "preview", "code", "react"],
6411
- item: {
6412
- properties: [
6413
- {
6414
- id: "embed",
6415
- name: "Storybook URL",
6416
- type: "Storybook",
6417
- options: { allowCaption: true, allowResize: true, defaultHeight: 400 }
6418
- }
6419
- ],
6420
- appearance: { isBordered: true, hasBackground: false },
6421
- variants: [
6422
- {
6423
- id: "default",
6424
- name: "Default",
6425
- layout: { type: "Column", children: ["embed"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6426
- maxColumns: 1,
6427
- defaultColumns: 1,
6428
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6429
- }
6430
- ],
6431
- defaultVariantKey: "default"
6432
- },
6433
- behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6434
- editorOptions: {
6435
- onboarding: {
6436
- helpText: "Embed a Storybook story to your documentation.",
6437
- documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/code/storybook-1EGPhwBl"
6438
- }
6439
- },
6440
- appearance: { isBordered: true, hasBackground: false }
6463
+ appearance: {
6464
+ isBordered: true,
6465
+ hasBackground: false,
6466
+ isEditorPresentationDifferent: true,
6467
+ showBlockHeaderInEditor: true
6468
+ }
6441
6469
  },
6442
6470
  {
6443
- id: "io.supernova.block.embed-figma",
6444
- name: "Figma embed",
6445
- description: "Embed a Figma canvas or prototype",
6471
+ id: "io.supernova.block.embed",
6472
+ name: "Embed",
6473
+ description: "Embed a generic URL",
6446
6474
  category: "Media",
6447
- icon: "https://cdn-assets.supernova.io/blocks/icons/embed-figma.svg",
6448
- searchKeywords: ["embed", "figma", "design", "prototype", "canvas"],
6475
+ icon: "https://cdn-assets.supernova.io/blocks/icons/embed.svg",
6476
+ searchKeywords: ["embed", "url", "iframe", "site", "import"],
6449
6477
  item: {
6450
6478
  properties: [
6451
6479
  {
6452
- id: "embed",
6453
- name: "Figma URL",
6480
+ id: "embedUrl",
6481
+ name: "Embed URL",
6454
6482
  type: "EmbedURL",
6455
6483
  options: {
6456
- allowCaption: false,
6484
+ allowCaption: true,
6457
6485
  allowResize: true,
6458
6486
  defaultHeight: 400,
6459
- urlValidationRegex: "^(https?://)?(www.)?(figma.com)/.+$"
6487
+ urlValidationRegex: "^(https?://)?(www.)?.+$"
6460
6488
  }
6461
6489
  }
6462
6490
  ],
@@ -6465,10 +6493,16 @@ var blocks = [
6465
6493
  {
6466
6494
  id: "default",
6467
6495
  name: "Default",
6468
- layout: { type: "Column", children: ["embed"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6496
+ layout: {
6497
+ type: "Column",
6498
+ children: ["embedUrl"],
6499
+ columnAlign: "Start",
6500
+ columnResizing: "Fill",
6501
+ gap: "Medium"
6502
+ },
6469
6503
  maxColumns: 1,
6470
6504
  defaultColumns: 1,
6471
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6505
+ appearance: {}
6472
6506
  }
6473
6507
  ],
6474
6508
  defaultVariantKey: "default"
@@ -6476,11 +6510,16 @@ var blocks = [
6476
6510
  behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6477
6511
  editorOptions: {
6478
6512
  onboarding: {
6479
- helpText: "Embed a Figma canvas or prototype to your documentation.",
6480
- documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/figma/embed-figma-GPNJsT8A"
6513
+ helpText: "Embed any page to your documentation as an iframe.",
6514
+ documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/embed/public-url-2ZeRQ332"
6481
6515
  }
6482
6516
  },
6483
- appearance: { isBordered: true, hasBackground: false }
6517
+ appearance: {
6518
+ isBordered: true,
6519
+ hasBackground: false,
6520
+ isEditorPresentationDifferent: false,
6521
+ showBlockHeaderInEditor: false
6522
+ }
6484
6523
  },
6485
6524
  {
6486
6525
  id: "io.supernova.block.markdown",
@@ -6513,7 +6552,7 @@ var blocks = [
6513
6552
  },
6514
6553
  maxColumns: 1,
6515
6554
  defaultColumns: 1,
6516
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
6555
+ appearance: {}
6517
6556
  },
6518
6557
  {
6519
6558
  id: "bordered",
@@ -6528,7 +6567,7 @@ var blocks = [
6528
6567
  },
6529
6568
  maxColumns: 1,
6530
6569
  defaultColumns: 1,
6531
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
6570
+ appearance: {}
6532
6571
  },
6533
6572
  {
6534
6573
  id: "boxed",
@@ -6543,7 +6582,7 @@ var blocks = [
6543
6582
  },
6544
6583
  maxColumns: 1,
6545
6584
  defaultColumns: 1,
6546
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
6585
+ appearance: {}
6547
6586
  }
6548
6587
  ],
6549
6588
  defaultVariantKey: "plain"
@@ -6555,7 +6594,12 @@ var blocks = [
6555
6594
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/code/markdown/general-B8wQVOem"
6556
6595
  }
6557
6596
  },
6558
- appearance: { isBordered: true, hasBackground: false }
6597
+ appearance: {
6598
+ isBordered: true,
6599
+ hasBackground: false,
6600
+ isEditorPresentationDifferent: true,
6601
+ showBlockHeaderInEditor: false
6602
+ }
6559
6603
  },
6560
6604
  {
6561
6605
  id: "io.supernova.block.table",
@@ -6574,7 +6618,7 @@ var blocks = [
6574
6618
  layout: { type: "Column", children: ["table"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6575
6619
  maxColumns: 1,
6576
6620
  defaultColumns: 1,
6577
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6621
+ appearance: {}
6578
6622
  }
6579
6623
  ],
6580
6624
  defaultVariantKey: "default"
@@ -6586,7 +6630,12 @@ var blocks = [
6586
6630
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/layout/table-R8KGnxej"
6587
6631
  }
6588
6632
  },
6589
- appearance: { isBordered: true, hasBackground: false }
6633
+ appearance: {
6634
+ isBordered: true,
6635
+ hasBackground: false,
6636
+ isEditorPresentationDifferent: false,
6637
+ showBlockHeaderInEditor: false
6638
+ }
6590
6639
  },
6591
6640
  {
6592
6641
  id: "io.supernova.block.design-tokens",
@@ -6624,7 +6673,7 @@ var blocks = [
6624
6673
  layout: { type: "Column", children: ["tokens"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6625
6674
  maxColumns: 1,
6626
6675
  defaultColumns: 1,
6627
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6676
+ appearance: {}
6628
6677
  },
6629
6678
  {
6630
6679
  id: "grid",
@@ -6633,7 +6682,7 @@ var blocks = [
6633
6682
  layout: { type: "Column", children: ["tokens"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6634
6683
  maxColumns: 4,
6635
6684
  defaultColumns: 1,
6636
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6685
+ appearance: {}
6637
6686
  }
6638
6687
  ],
6639
6688
  defaultVariantKey: "table"
@@ -6645,14 +6694,19 @@ var blocks = [
6645
6694
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-group-09"
6646
6695
  }
6647
6696
  },
6648
- appearance: { isBordered: true, hasBackground: false }
6697
+ appearance: {
6698
+ isBordered: true,
6699
+ hasBackground: false,
6700
+ isEditorPresentationDifferent: false,
6701
+ showBlockHeaderInEditor: false
6702
+ }
6649
6703
  },
6650
6704
  {
6651
6705
  id: "io.supernova.block.token-color-ramps",
6652
6706
  name: "Color ramps",
6653
6707
  description: "The best way to display colors",
6654
6708
  category: "Tokens",
6655
- icon: "https://cdn-assets.supernova.io/blocks/icons/token-list.svg",
6709
+ icon: "https://cdn-assets.supernova.io/blocks/icons/color-ramp.svg",
6656
6710
  searchKeywords: ["tokens", "ramp", "shades", "palette", "spectrum", "stack", "range", "swatch"],
6657
6711
  item: {
6658
6712
  properties: [
@@ -6672,7 +6726,7 @@ var blocks = [
6672
6726
  layout: { type: "Column", children: ["tokens"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6673
6727
  maxColumns: 2,
6674
6728
  defaultColumns: 1,
6675
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
6729
+ appearance: { isEditorPresentationDifferent: true }
6676
6730
  }
6677
6731
  ],
6678
6732
  defaultVariantKey: "default"
@@ -6681,14 +6735,19 @@ var blocks = [
6681
6735
  editorOptions: {
6682
6736
  onboarding: { helpText: "The best way to display colors", documentationLink: "https://learn.supernova.io" }
6683
6737
  },
6684
- appearance: { isBordered: true, hasBackground: false }
6738
+ appearance: {
6739
+ isBordered: true,
6740
+ hasBackground: false,
6741
+ isEditorPresentationDifferent: false,
6742
+ showBlockHeaderInEditor: false
6743
+ }
6685
6744
  },
6686
6745
  {
6687
6746
  id: "io.supernova.block.color-accessibility-grid",
6688
6747
  name: "Accessibility color grid",
6689
6748
  description: "Visualize accessibility of your color tokens",
6690
6749
  category: "Tokens",
6691
- icon: "https://cdn-assets.supernova.io/blocks/icons/token-accessibility-grid.svg",
6750
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v3/token-accessibility-grid.svg",
6692
6751
  searchKeywords: ["tokens", "color", "accessibility", "grid", "contrast"],
6693
6752
  item: {
6694
6753
  properties: [
@@ -6709,7 +6768,7 @@ var blocks = [
6709
6768
  layout: { type: "Column", children: ["tokens"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6710
6769
  maxColumns: 1,
6711
6770
  defaultColumns: 1,
6712
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
6771
+ appearance: { isEditorPresentationDifferent: true }
6713
6772
  }
6714
6773
  ],
6715
6774
  defaultVariantKey: "default"
@@ -6721,7 +6780,12 @@ var blocks = [
6721
6780
  documentationLink: "https://learn.supernova.io"
6722
6781
  }
6723
6782
  },
6724
- appearance: { isBordered: true, hasBackground: false }
6783
+ appearance: {
6784
+ isBordered: true,
6785
+ hasBackground: false,
6786
+ isEditorPresentationDifferent: false,
6787
+ showBlockHeaderInEditor: false
6788
+ }
6725
6789
  },
6726
6790
  {
6727
6791
  id: "io.supernova.block.code",
@@ -6740,21 +6804,26 @@ var blocks = [
6740
6804
  layout: { type: "Column", children: ["code"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6741
6805
  maxColumns: 1,
6742
6806
  defaultColumns: 1,
6743
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6807
+ appearance: {}
6744
6808
  }
6745
6809
  ],
6746
6810
  defaultVariantKey: "default"
6747
6811
  },
6748
6812
  behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6749
6813
  editorOptions: { onboarding: { helpText: "Code descriptor." } },
6750
- appearance: { isBordered: true, hasBackground: false }
6814
+ appearance: {
6815
+ isBordered: true,
6816
+ hasBackground: false,
6817
+ isEditorPresentationDifferent: false,
6818
+ showBlockHeaderInEditor: false
6819
+ }
6751
6820
  },
6752
6821
  {
6753
6822
  id: "io.supernova.block.code-react",
6754
6823
  name: "React code",
6755
6824
  description: "Render a code snippet",
6756
6825
  category: "Code",
6757
- icon: "https://cdn-assets.supernova.io/blocks/icons/v2/code-react.svg",
6826
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v3/code-react.svg",
6758
6827
  searchKeywords: ["code", "react", "snippet", "storybook", "editor", "example", "sandbox"],
6759
6828
  item: {
6760
6829
  properties: [
@@ -6780,7 +6849,7 @@ var blocks = [
6780
6849
  layout: { type: "Column", children: ["code"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6781
6850
  maxColumns: 1,
6782
6851
  defaultColumns: 1,
6783
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6852
+ appearance: {}
6784
6853
  },
6785
6854
  {
6786
6855
  id: "codeTop",
@@ -6790,7 +6859,7 @@ var blocks = [
6790
6859
  layout: { type: "Column", children: ["code"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6791
6860
  maxColumns: 1,
6792
6861
  defaultColumns: 1,
6793
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6862
+ appearance: {}
6794
6863
  },
6795
6864
  {
6796
6865
  id: "codeLeft",
@@ -6800,7 +6869,7 @@ var blocks = [
6800
6869
  layout: { type: "Column", children: ["code"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6801
6870
  maxColumns: 1,
6802
6871
  defaultColumns: 1,
6803
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6872
+ appearance: {}
6804
6873
  },
6805
6874
  {
6806
6875
  id: "codeRight",
@@ -6810,7 +6879,7 @@ var blocks = [
6810
6879
  layout: { type: "Column", children: ["code"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6811
6880
  maxColumns: 1,
6812
6881
  defaultColumns: 1,
6813
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6882
+ appearance: {}
6814
6883
  }
6815
6884
  ],
6816
6885
  defaultVariantKey: "codeBottom"
@@ -6822,7 +6891,12 @@ var blocks = [
6822
6891
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/code/render-react-code-vxufnkFm"
6823
6892
  }
6824
6893
  },
6825
- appearance: { isBordered: false, hasBackground: false }
6894
+ appearance: {
6895
+ isBordered: false,
6896
+ hasBackground: false,
6897
+ isEditorPresentationDifferent: false,
6898
+ showBlockHeaderInEditor: false
6899
+ }
6826
6900
  },
6827
6901
  {
6828
6902
  id: "io.supernova.block.assets",
@@ -6843,7 +6917,7 @@ var blocks = [
6843
6917
  layout: { type: "Column", children: ["assets"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6844
6918
  maxColumns: 8,
6845
6919
  defaultColumns: 1,
6846
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6920
+ appearance: { isEditorPresentationDifferent: false }
6847
6921
  },
6848
6922
  {
6849
6923
  id: "square-grid",
@@ -6853,7 +6927,7 @@ var blocks = [
6853
6927
  layout: { type: "Column", children: ["assets"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6854
6928
  maxColumns: 8,
6855
6929
  defaultColumns: 1,
6856
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6930
+ appearance: { isEditorPresentationDifferent: false }
6857
6931
  },
6858
6932
  {
6859
6933
  id: "borderless-grid",
@@ -6863,7 +6937,7 @@ var blocks = [
6863
6937
  layout: { type: "Column", children: ["assets"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6864
6938
  maxColumns: 8,
6865
6939
  defaultColumns: 1,
6866
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6940
+ appearance: { isEditorPresentationDifferent: false }
6867
6941
  }
6868
6942
  ],
6869
6943
  defaultVariantKey: "default"
@@ -6875,7 +6949,12 @@ var blocks = [
6875
6949
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/asset/general-xa6EgXb2"
6876
6950
  }
6877
6951
  },
6878
- appearance: { isBordered: true, hasBackground: false }
6952
+ appearance: {
6953
+ isBordered: true,
6954
+ hasBackground: false,
6955
+ isEditorPresentationDifferent: false,
6956
+ showBlockHeaderInEditor: false
6957
+ }
6879
6958
  },
6880
6959
  {
6881
6960
  id: "io.supernova.block.figma-frames",
@@ -6909,7 +6988,7 @@ var blocks = [
6909
6988
  },
6910
6989
  maxColumns: 1,
6911
6990
  defaultColumns: 1,
6912
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
6991
+ appearance: {}
6913
6992
  },
6914
6993
  {
6915
6994
  id: "plain",
@@ -6925,7 +7004,7 @@ var blocks = [
6925
7004
  },
6926
7005
  maxColumns: 1,
6927
7006
  defaultColumns: 1,
6928
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: false }
7007
+ appearance: {}
6929
7008
  }
6930
7009
  ],
6931
7010
  defaultVariantKey: "bordered"
@@ -6937,7 +7016,12 @@ var blocks = [
6937
7016
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/figma/figma-frames/general-f3IYC5dg"
6938
7017
  }
6939
7018
  },
6940
- appearance: { isBordered: true, hasBackground: false }
7019
+ appearance: {
7020
+ isBordered: true,
7021
+ hasBackground: false,
7022
+ isEditorPresentationDifferent: false,
7023
+ showBlockHeaderInEditor: false
7024
+ }
6941
7025
  },
6942
7026
  {
6943
7027
  id: "io.supernova.block.release-notes",
@@ -6953,11 +7037,12 @@ var blocks = [
6953
7037
  {
6954
7038
  id: "default",
6955
7039
  name: "Default",
6956
- image: "https://cdn-assets.supernova.io/blocks/variants/release-notes.svg",
7040
+ image: "https://cdn-assets.supernova.io/blocks/variants/release-notes-2.svg",
7041
+ description: "Show formatted release notes from all previously released versions.",
6957
7042
  layout: { type: "Column", children: [], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
6958
7043
  maxColumns: 1,
6959
7044
  defaultColumns: 1,
6960
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
7045
+ appearance: {}
6961
7046
  }
6962
7047
  ],
6963
7048
  defaultVariantKey: "default"
@@ -6965,10 +7050,15 @@ var blocks = [
6965
7050
  behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
6966
7051
  editorOptions: {
6967
7052
  onboarding: {
6968
- helpText: "Show formatted release notes from all previous released versions."
7053
+ helpText: "Show formatted release notes from all previously released versions."
6969
7054
  }
6970
7055
  },
6971
- appearance: { isBordered: true, hasBackground: false }
7056
+ appearance: {
7057
+ isBordered: true,
7058
+ hasBackground: false,
7059
+ isEditorPresentationDifferent: true,
7060
+ showBlockHeaderInEditor: true
7061
+ }
6972
7062
  },
6973
7063
  {
6974
7064
  id: "io.supernova.block.component-checklist",
@@ -7013,7 +7103,7 @@ var blocks = [
7013
7103
  },
7014
7104
  maxColumns: 1,
7015
7105
  defaultColumns: 1,
7016
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
7106
+ appearance: { isEditorPresentationDifferent: true }
7017
7107
  }
7018
7108
  ],
7019
7109
  defaultVariantKey: "default"
@@ -7025,7 +7115,12 @@ var blocks = [
7025
7115
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/component/component-checklist-NXepPIpZ"
7026
7116
  }
7027
7117
  },
7028
- appearance: { isBordered: true, hasBackground: false }
7118
+ appearance: {
7119
+ isBordered: true,
7120
+ hasBackground: false,
7121
+ isEditorPresentationDifferent: false,
7122
+ showBlockHeaderInEditor: false
7123
+ }
7029
7124
  },
7030
7125
  {
7031
7126
  id: "io.supernova.block.component-checklist-all",
@@ -7064,7 +7159,7 @@ var blocks = [
7064
7159
  },
7065
7160
  maxColumns: 1,
7066
7161
  defaultColumns: 1,
7067
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
7162
+ appearance: { isEditorPresentationDifferent: true }
7068
7163
  }
7069
7164
  ],
7070
7165
  defaultVariantKey: "default"
@@ -7076,7 +7171,12 @@ var blocks = [
7076
7171
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/component/component-overview-table-W8eOtJ5t"
7077
7172
  }
7078
7173
  },
7079
- appearance: { isBordered: true, hasBackground: false }
7174
+ appearance: {
7175
+ isBordered: true,
7176
+ hasBackground: false,
7177
+ isEditorPresentationDifferent: false,
7178
+ showBlockHeaderInEditor: false
7179
+ }
7080
7180
  },
7081
7181
  {
7082
7182
  id: "io.supernova.block.component-health",
@@ -7109,7 +7209,7 @@ var blocks = [
7109
7209
  },
7110
7210
  maxColumns: 1,
7111
7211
  defaultColumns: 1,
7112
- appearance: { isBordered: true, hasBackground: false, isEditorPresentationDifferent: true }
7212
+ appearance: { isEditorPresentationDifferent: true }
7113
7213
  }
7114
7214
  ],
7115
7215
  defaultVariantKey: "default"
@@ -7121,7 +7221,12 @@ var blocks = [
7121
7221
  documentationLink: "https://learn.supernova.io/latest/documentation/types-of-blocks/component/component-health-sezSxEED"
7122
7222
  }
7123
7223
  },
7124
- appearance: { isBordered: true, hasBackground: false }
7224
+ appearance: {
7225
+ isBordered: true,
7226
+ hasBackground: false,
7227
+ isEditorPresentationDifferent: false,
7228
+ showBlockHeaderInEditor: false
7229
+ }
7125
7230
  }
7126
7231
  ];
7127
7232
 
@@ -7141,6 +7246,11 @@ function prosemirrorDocToPage(prosemirrorDoc, definitions) {
7141
7246
  blocks: internalProsemirrorNodesToPageItems(prosemirrorDoc.content ?? [], definitionsById)
7142
7247
  };
7143
7248
  }
7249
+ function prosemirrorNodeToBlock(prosemirrorNode, definitions) {
7250
+ const definitionsById = mapByUnique2(definitions, (d) => d.id);
7251
+ const block = internalProsemirrorNodeToBlock(prosemirrorNode, definitionsById, 0);
7252
+ return block[0] ?? null;
7253
+ }
7144
7254
  function prosemirrorNodeToSection(prosemirrorNode, definitions) {
7145
7255
  const definitionsById = mapByUnique2(definitions, (d) => d.id);
7146
7256
  return internalProsemirrorNodeToSection(prosemirrorNode, definitionsById);
@@ -7177,35 +7287,35 @@ function prosemirrorNodeToSectionColumns(prosemirrorNode, definitionsMap) {
7177
7287
  return null;
7178
7288
  return {
7179
7289
  id,
7180
- blocks: internalProsemirrorNodesToBlocks(prosemirrorNode.content ?? [], definitionsMap)
7290
+ blocks: internalProsemirrorNodesToBlocks(prosemirrorNode.content ?? [], definitionsMap, 0)
7181
7291
  };
7182
7292
  }
7183
7293
  function prosemirrorNodesToBlocks(prosemirrorNodes, definitions) {
7184
7294
  const definitionsById = mapByUnique2(definitions, (d) => d.id);
7185
- return internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsById);
7295
+ return internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsById, 0);
7186
7296
  }
7187
7297
  function internalProsemirrorNodesToPageItems(prosemirrorNodes, definitionsMap) {
7188
- return prosemirrorNodes.map((prosemirrorNode) => {
7298
+ const result = [];
7299
+ for (const prosemirrorNode of prosemirrorNodes) {
7189
7300
  if (prosemirrorNode.type === "tabsSection") {
7190
- return prosemirrorNodeToSection(prosemirrorNode, Array.from(definitionsMap.values()));
7301
+ const section = prosemirrorNodeToSection(prosemirrorNode, Array.from(definitionsMap.values()));
7302
+ section && result.push(section);
7191
7303
  } else {
7192
- return internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap);
7304
+ result.push(...internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, 0));
7193
7305
  }
7194
- }).filter(nonNullFilter);
7306
+ }
7307
+ return result;
7195
7308
  }
7196
- function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap) {
7197
- return prosemirrorNodes.map((prosemirrorNode) => {
7198
- return internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap);
7199
- }).filter(nonNullFilter);
7309
+ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, depth) {
7310
+ return prosemirrorNodes.flatMap((prosemirrorNode) => {
7311
+ return internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth);
7312
+ });
7200
7313
  }
7201
- function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap) {
7202
- let definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z152.string());
7314
+ function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
7315
+ const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z152.string());
7203
7316
  if (!definitionId) {
7204
7317
  console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
7205
- return null;
7206
- }
7207
- if (definitionId === "io.supernova.block.token-detail") {
7208
- definitionId = "io.supernova.block.token-list";
7318
+ return [];
7209
7319
  }
7210
7320
  const definition = definitionsMap.get(definitionId);
7211
7321
  if (!definition) {
@@ -7213,27 +7323,31 @@ function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap) {
7213
7323
  `Block definitionId "${definitionId}" (prosemirror node ${prosemirrorNode.type}) is not among available definitions`
7214
7324
  );
7215
7325
  console.warn(prosemirrorNode);
7216
- return null;
7326
+ return [];
7217
7327
  }
7218
- return prosemirrorNodeToBlock(prosemirrorNode, definition);
7328
+ return prosemirrorNodeAndDefinitionToBlock(prosemirrorNode, definition, definitionsMap, depth);
7219
7329
  }
7220
- function prosemirrorNodeToBlock(prosemirrorNode, definition) {
7330
+ function prosemirrorNodeAndDefinitionToBlock(prosemirrorNode, definition, definitionsMap, depth) {
7221
7331
  const richTextProperty = BlockDefinitionUtils.firstRichTextProperty(definition);
7222
7332
  if (richTextProperty) {
7223
- return parseAsRichText(prosemirrorNode, definition, richTextProperty);
7333
+ const block2 = parseAsRichText(prosemirrorNode, definition, richTextProperty);
7334
+ return block2 ? [block2] : [];
7224
7335
  }
7225
7336
  const multiRichTextProperty = BlockDefinitionUtils.firstMultiRichTextProperty(definition);
7226
7337
  if (multiRichTextProperty) {
7227
- return parseAsMultiRichText(prosemirrorNode, definition, multiRichTextProperty);
7338
+ return parseAsMultiRichText(prosemirrorNode, definition, multiRichTextProperty, definitionsMap, depth);
7228
7339
  }
7229
7340
  const tableProperty = BlockDefinitionUtils.firstTableProperty(definition);
7230
7341
  if (tableProperty) {
7231
- return parseAsTable(prosemirrorNode, definition, tableProperty);
7342
+ const block2 = parseAsTable(prosemirrorNode, definition, tableProperty);
7343
+ return block2 ? [block2] : [];
7232
7344
  }
7233
7345
  if (definition.id === "io.supernova.block.divider") {
7234
- return parseAsDivider(prosemirrorNode, definition);
7346
+ const block2 = parseAsDivider(prosemirrorNode, definition);
7347
+ return block2 ? [block2] : [];
7235
7348
  }
7236
- return parseAsCustomBlock(prosemirrorNode, definition);
7349
+ const block = parseAsCustomBlock(prosemirrorNode, definition);
7350
+ return block ? [block] : [];
7237
7351
  }
7238
7352
  function parseAsRichText(prosemirrorNode, definition, property) {
7239
7353
  const id = getProsemirrorBlockId(prosemirrorNode);
@@ -7281,41 +7395,58 @@ function parseCalloutType(prosemirrorCalloutType) {
7281
7395
  return "Primary";
7282
7396
  }
7283
7397
  }
7284
- function parseAsMultiRichText(prosemirrorNode, definition, property) {
7398
+ function parseAsMultiRichText(prosemirrorNode, definition, property, definitionsMap, depth) {
7285
7399
  const id = getProsemirrorBlockId(prosemirrorNode);
7286
7400
  if (!id)
7287
- return null;
7401
+ return [];
7288
7402
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
7289
- return {
7290
- // TODO Artem: indent
7291
- id,
7292
- type: "Block",
7293
- data: {
7294
- packageId: definition.id,
7295
- indentLevel: 0,
7296
- ...variantId && { variantId },
7297
- items: [
7298
- {
7299
- id,
7300
- props: {
7301
- [property.id]: {
7302
- // Required
7303
- value: (prosemirrorNode.content ?? []).map((listItem) => {
7304
- if (listItem.type !== "listItem")
7305
- return null;
7306
- if (!listItem.content?.length)
7307
- return parseRichText([]);
7308
- const paragraph = listItem.content[0];
7309
- if (paragraph.type !== "paragraph")
7310
- return parseRichText([]);
7311
- return parseRichText(paragraph.content ?? []);
7312
- }).filter(nonNullFilter)
7403
+ const result = [];
7404
+ const listItems = [];
7405
+ prosemirrorNode.content?.forEach((c) => {
7406
+ if (c.type !== "listItem")
7407
+ return;
7408
+ c.content?.forEach((cc) => {
7409
+ listItems.push(cc);
7410
+ });
7411
+ });
7412
+ let bufferedTextItems = [];
7413
+ function flushBufferedTextItems() {
7414
+ if (!bufferedTextItems.length)
7415
+ return;
7416
+ const idSuffix = result.length ? `-${result.length}` : "";
7417
+ result.push({
7418
+ id: id + idSuffix,
7419
+ type: "Block",
7420
+ data: {
7421
+ packageId: definition.id,
7422
+ indentLevel: depth,
7423
+ ...variantId && { variantId },
7424
+ items: [
7425
+ {
7426
+ id: id + idSuffix,
7427
+ props: {
7428
+ [property.id]: {
7429
+ value: bufferedTextItems.map((paragraph) => {
7430
+ return parseRichText(paragraph.content ?? []);
7431
+ })
7432
+ }
7313
7433
  }
7314
7434
  }
7315
- }
7316
- ]
7435
+ ]
7436
+ }
7437
+ });
7438
+ bufferedTextItems = [];
7439
+ }
7440
+ listItems.forEach((item) => {
7441
+ if (item.type === "paragraph") {
7442
+ bufferedTextItems.push(item);
7443
+ return;
7317
7444
  }
7318
- };
7445
+ flushBufferedTextItems();
7446
+ result.push(...internalProsemirrorNodeToBlock(item, definitionsMap, depth + 1));
7447
+ });
7448
+ flushBufferedTextItems();
7449
+ return result;
7319
7450
  }
7320
7451
  function parseRichText(spans) {
7321
7452
  return {
@@ -7773,10 +7904,12 @@ export {
7773
7904
  DTOWorkspaceRole,
7774
7905
  DocumentationPageEditorModel,
7775
7906
  DocumentationPageV1DTO,
7907
+ ListTreeBuilder,
7776
7908
  NpmRegistryInput,
7777
7909
  PageBlockEditorModel,
7778
7910
  PageSectionEditorModel,
7779
7911
  WorkspaceConfigurationPayload,
7912
+ blockToProsemirrorNode,
7780
7913
  buildDocPagePublishPaths,
7781
7914
  calculateElementParentChain,
7782
7915
  documentationElementsToHierarchyDto,