@supernova-studio/client 0.31.0 → 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(),
@@ -2594,13 +2596,13 @@ var PulsarContributionVariant = z118.object({
2594
2596
  thumbnailURL: nullishToOptional(z118.string())
2595
2597
  });
2596
2598
  var PulsarCustomBlock = z118.object({
2597
- title: z118.string(),
2599
+ title: nullishToOptional(z118.string()),
2598
2600
  key: z118.string(),
2599
- category: z118.string(),
2601
+ category: nullishToOptional(z118.string()),
2600
2602
  description: nullishToOptional(z118.string()),
2601
- iconURL: z118.string(),
2602
- mode: z118.enum(["array", "block"]),
2603
- 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 ?? [])
2604
2606
  });
2605
2607
  var ExporterType = z119.enum(["code", "documentation"]);
2606
2608
  var ExporterSource = z119.enum(["git", "upload"]);
@@ -3760,8 +3762,9 @@ var DTODuplicateDocumentationGroupInput = z135.object({
3760
3762
  var DTOCreateDocumentationTabInput = z135.object({
3761
3763
  // New group persistent id
3762
3764
  persistentId: z135.string().uuid(),
3763
- // Page that will become first tab of the tab group
3764
- 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(),
3765
3768
  tabName: z135.string()
3766
3769
  });
3767
3770
  var DTODeleteDocumentationTabGroupInput = z135.object({
@@ -4613,6 +4616,9 @@ var newSchema = {
4613
4616
  attrs: {
4614
4617
  id: {
4615
4618
  default: null
4619
+ },
4620
+ variantId: {
4621
+ default: null
4616
4622
  }
4617
4623
  },
4618
4624
  parseDOM: [
@@ -5011,35 +5017,166 @@ var BlockDefinitionUtils = {
5011
5017
 
5012
5018
  // src/yjs/docs-editor/blocks-to-prosemirror.ts
5013
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
5014
5153
  function pageToYXmlFragment(page, definitions, fragment) {
5015
5154
  const doc = pageToProsemirrorDoc(page, definitions);
5016
5155
  return prosemirrorJSONToYXmlFragment(pmSchema, doc, fragment);
5017
5156
  }
5018
5157
  function pageToProsemirrorDoc(page, definitions) {
5019
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
+ }
5020
5175
  return {
5021
5176
  type: "doc",
5022
- content: page.blocks.map((b) => {
5023
- switch (b.type) {
5024
- case "Block":
5025
- return blockToProsemirrorNode(b, blockDefinitionForBlock(b, definitions));
5026
- case "Section":
5027
- return internalSectionToProsemirrorNode(b, definitionsMap);
5028
- }
5029
- }).filter(nonNullFilter)
5177
+ content: children
5030
5178
  };
5031
5179
  }
5032
- function blockDefinitionForBlock(block, definitions) {
5033
- const definition = definitions.find((d) => d.id === block.data.packageId);
5034
- if (!definition) {
5035
- throw new Error(`Could not find definition for ${block.id} (${block.data.packageId})`);
5036
- }
5037
- return definition;
5038
- }
5039
- function sectionToProsemirrorNode(section, definitions) {
5040
- const definitionsMap = mapByUnique(definitions, (d) => d.id);
5041
- return internalSectionToProsemirrorNode(section, definitionsMap);
5042
- }
5043
5180
  function internalSectionToProsemirrorNode(section, definitionsMap) {
5044
5181
  return {
5045
5182
  type: "tabsSection",
@@ -5061,9 +5198,7 @@ function sectionItemToProsemirrorNode(sectionItem, definitionsMap) {
5061
5198
  };
5062
5199
  }
5063
5200
  function sectionColumnToProsemirrorNode(sectionColumn, definitionsMap) {
5064
- const blocks2 = sectionColumn.blocks.map((block) => {
5065
- return internalBlockToProsemirrorNode(block, definitionsMap);
5066
- }).filter(nonNullFilter);
5201
+ const blocks2 = blocksToProsemirrorNodes(sectionColumn.blocks, definitionsMap);
5067
5202
  if (!blocks2.length) {
5068
5203
  blocks2.push({
5069
5204
  type: "paragraph",
@@ -5081,12 +5216,35 @@ function sectionColumnToProsemirrorNode(sectionColumn, definitionsMap) {
5081
5216
  content: blocks2
5082
5217
  };
5083
5218
  }
5084
- function internalBlockToProsemirrorNode(block, definitionsMap) {
5085
- const definition = definitionsMap.get(block.data.packageId);
5086
- if (!definition) {
5087
- 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));
5088
5246
  }
5089
- return blockToProsemirrorNode(block, definition);
5247
+ return result;
5090
5248
  }
5091
5249
  function blockToProsemirrorNode(block, definition) {
5092
5250
  const richTextProperty = BlockDefinitionUtils.firstRichTextProperty(definition);
@@ -5097,14 +5255,6 @@ function blockToProsemirrorNode(block, definition) {
5097
5255
  property: richTextProperty
5098
5256
  });
5099
5257
  }
5100
- const multiRichTextProperty = BlockDefinitionUtils.firstMultiRichTextProperty(definition);
5101
- if (multiRichTextProperty) {
5102
- return serializeAsMultiRichTextBlock({
5103
- block,
5104
- definition,
5105
- property: multiRichTextProperty
5106
- });
5107
- }
5108
5258
  const tableProperty = BlockDefinitionUtils.firstTableProperty(definition);
5109
5259
  if (tableProperty) {
5110
5260
  return serializeAsTable({
@@ -5146,7 +5296,7 @@ function serializeAsRichTextBlock(input) {
5146
5296
  function serializeAsParagraph(input) {
5147
5297
  return {
5148
5298
  type: "paragraph",
5149
- attrs: serializeBlockNodeAttributes(input),
5299
+ attrs: serializeBlockNodeAttributes(input.block),
5150
5300
  ...serializeRichTextNodePart(input.richTextPropertyValue.value)
5151
5301
  };
5152
5302
  }
@@ -5154,7 +5304,7 @@ function serializeAsHeading(input) {
5154
5304
  return {
5155
5305
  type: "heading",
5156
5306
  attrs: {
5157
- ...serializeBlockNodeAttributes(input),
5307
+ ...serializeBlockNodeAttributes(input.block),
5158
5308
  level: richTextHeadingLevel(input.property)
5159
5309
  },
5160
5310
  ...serializeRichTextNodePart(input.richTextPropertyValue.value)
@@ -5163,7 +5313,7 @@ function serializeAsHeading(input) {
5163
5313
  function serializeAsBlockquote(input) {
5164
5314
  return {
5165
5315
  type: "blockquote",
5166
- attrs: serializeBlockNodeAttributes(input),
5316
+ attrs: serializeBlockNodeAttributes(input.block),
5167
5317
  ...serializeRichTextNodePart(input.richTextPropertyValue.value)
5168
5318
  };
5169
5319
  }
@@ -5172,62 +5322,70 @@ function serializeAsCallout(input) {
5172
5322
  return {
5173
5323
  type: "callout",
5174
5324
  attrs: {
5175
- ...serializeBlockNodeAttributes(input),
5325
+ ...serializeBlockNodeAttributes(input.block),
5176
5326
  type: serializeCalloutType(calloutType)
5177
5327
  },
5178
5328
  ...serializeRichTextNodePart(input.richTextPropertyValue.value)
5179
5329
  };
5180
5330
  }
5181
- function serializeAsMultiRichTextBlock(input) {
5182
- const { block, definition, property: multiRichTextProperty } = input;
5183
- const blockItem = BlockParsingUtils.singleBlockItem(block);
5184
- const textPropertyValue = BlockParsingUtils.multiRichTextPropertyValue(blockItem, multiRichTextProperty.id);
5185
- const enrichedInput = { ...input, multiRichTextPropertyValue: textPropertyValue };
5186
- const parsedOptions = PageBlockDefinitionMutiRichTextOptions.optional().parse(multiRichTextProperty.options);
5187
- const style = parsedOptions?.multiRichTextStyle ?? "Default";
5188
- switch (style) {
5189
- case "Default":
5190
- return serializeAsMultiParagraph(enrichedInput);
5191
- case "OL":
5192
- return serializeAsOrderedList(enrichedInput);
5193
- case "UL":
5194
- 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);
5195
5337
  }
5196
5338
  }
5197
- function serializeAsMultiParagraph(input) {
5198
- return {
5199
- type: "bulletList",
5200
- attrs: {
5201
- ...serializeBlockNodeAttributes(input)
5202
- },
5203
- content: input.multiRichTextPropertyValue.value.map(serializeAsListItem)
5204
- };
5205
- }
5206
- function serializeAsOrderedList(input) {
5339
+ function serializeAsOrderedList(tree) {
5207
5340
  return {
5208
5341
  type: "orderedList",
5209
5342
  attrs: {
5210
- ...serializeBlockNodeAttributes(input),
5343
+ ...serializeBlockNodeAttributes(tree.block),
5211
5344
  start: "1"
5212
5345
  },
5213
- content: input.multiRichTextPropertyValue.value.map(serializeAsListItem)
5346
+ content: serializeListContent(tree)
5214
5347
  };
5215
5348
  }
5216
- function serializeAsUnorderedList(input) {
5349
+ function serializeAsUnorderedList(tree) {
5217
5350
  return {
5218
5351
  type: "bulletList",
5219
5352
  attrs: {
5220
- ...serializeBlockNodeAttributes(input)
5353
+ ...serializeBlockNodeAttributes(tree.block)
5221
5354
  },
5222
- content: input.multiRichTextPropertyValue.value.map(serializeAsListItem)
5355
+ content: serializeListContent(tree)
5223
5356
  };
5224
5357
  }
5225
- 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) {
5226
5380
  return {
5227
5381
  type: "listItem",
5228
5382
  content: [
5229
5383
  {
5230
5384
  type: "paragraph",
5385
+ attrs: {
5386
+ definitionId: "io.supernova.block.rich-text",
5387
+ variantId: "default"
5388
+ },
5231
5389
  content: serializeRichText(text)
5232
5390
  }
5233
5391
  ]
@@ -5240,7 +5398,7 @@ function serializeAsTable(input) {
5240
5398
  return {
5241
5399
  type: "tableContainer",
5242
5400
  attrs: {
5243
- ...serializeBlockNodeAttributes(input),
5401
+ ...serializeBlockNodeAttributes(input.block),
5244
5402
  hasBorder: table.showBorder ?? true
5245
5403
  },
5246
5404
  content: [
@@ -5329,11 +5487,10 @@ function serializeTableNode(node) {
5329
5487
  function serializeAsDivider(input) {
5330
5488
  return {
5331
5489
  type: "horizontalRule",
5332
- attrs: serializeBlockNodeAttributes(input)
5490
+ attrs: serializeBlockNodeAttributes(input.block)
5333
5491
  };
5334
5492
  }
5335
- function serializeBlockNodeAttributes(input) {
5336
- const { block } = input;
5493
+ function serializeBlockNodeAttributes(block) {
5337
5494
  return {
5338
5495
  id: block.id,
5339
5496
  definitionId: block.data.packageId,
@@ -5385,6 +5542,7 @@ function serializeRichText(richText) {
5385
5542
  return richText.spans.map(serializeTextSpan).flat();
5386
5543
  }
5387
5544
  function serializeTextSpan(span) {
5545
+ const hardBreakType = "hardBreak";
5388
5546
  const marks = span.attributes.map(serializeTextSpanAttribute);
5389
5547
  const textParts = span.text.split("\n");
5390
5548
  const interspersed = [
@@ -5397,7 +5555,7 @@ function serializeTextSpan(span) {
5397
5555
  for (let i = 1; i < textParts.length; i++) {
5398
5556
  interspersed.push(
5399
5557
  {
5400
- type: "hardBreak"
5558
+ type: hardBreakType
5401
5559
  },
5402
5560
  {
5403
5561
  type: "text",
@@ -5406,7 +5564,7 @@ function serializeTextSpan(span) {
5406
5564
  }
5407
5565
  );
5408
5566
  }
5409
- return interspersed.filter((t) => !!t.text);
5567
+ return interspersed.filter((t) => t.type === hardBreakType || !!t.text);
5410
5568
  }
5411
5569
  function serializeTextSpanAttribute(spanAttribute) {
5412
5570
  switch (spanAttribute.type) {
@@ -5415,7 +5573,7 @@ function serializeTextSpanAttribute(spanAttribute) {
5415
5573
  case "Italic":
5416
5574
  return { type: "italic", attrs: {} };
5417
5575
  case "Strikethrough":
5418
- return { type: "strikethrough", attrs: {} };
5576
+ return { type: "strike", attrs: {} };
5419
5577
  case "Code":
5420
5578
  return { type: "code", attrs: {} };
5421
5579
  case "Link":
@@ -5468,9 +5626,6 @@ function serializeCustomBlockNodeType(block, definition) {
5468
5626
  return "blockNode";
5469
5627
  }
5470
5628
  }
5471
- function nonNullFilter(item) {
5472
- return !!item;
5473
- }
5474
5629
 
5475
5630
  // src/yjs/docs-editor/mock.ts
5476
5631
  function getMockPageBlockDefinitions() {
@@ -7003,7 +7158,7 @@ function internalProsemirrorNodeToSection(prosemirrorNode, definitionsMap) {
7003
7158
  contentExpandToEdges: true,
7004
7159
  expandToEdges: true
7005
7160
  },
7006
- 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)
7007
7162
  };
7008
7163
  }
7009
7164
  function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
@@ -7013,7 +7168,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
7013
7168
  return {
7014
7169
  id,
7015
7170
  title: getProsemirrorAttribute(prosemirrorNode, "title", z152.string()) ?? "",
7016
- 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)
7017
7172
  };
7018
7173
  }
7019
7174
  function prosemirrorNodeToSectionColumns(prosemirrorNode, definitionsMap) {
@@ -7036,12 +7191,12 @@ function internalProsemirrorNodesToPageItems(prosemirrorNodes, definitionsMap) {
7036
7191
  } else {
7037
7192
  return internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap);
7038
7193
  }
7039
- }).filter(nonNullFilter2);
7194
+ }).filter(nonNullFilter);
7040
7195
  }
7041
7196
  function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap) {
7042
7197
  return prosemirrorNodes.map((prosemirrorNode) => {
7043
7198
  return internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap);
7044
- }).filter(nonNullFilter2);
7199
+ }).filter(nonNullFilter);
7045
7200
  }
7046
7201
  function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap) {
7047
7202
  let definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z152.string());
@@ -7154,7 +7309,7 @@ function parseAsMultiRichText(prosemirrorNode, definition, property) {
7154
7309
  if (paragraph.type !== "paragraph")
7155
7310
  return parseRichText([]);
7156
7311
  return parseRichText(paragraph.content ?? []);
7157
- }).filter(nonNullFilter2)
7312
+ }).filter(nonNullFilter)
7158
7313
  }
7159
7314
  }
7160
7315
  }
@@ -7164,7 +7319,7 @@ function parseAsMultiRichText(prosemirrorNode, definition, property) {
7164
7319
  }
7165
7320
  function parseRichText(spans) {
7166
7321
  return {
7167
- spans: spans.map(parseRichTextSpan).filter(nonNullFilter2)
7322
+ spans: spans.map(parseRichTextSpan).filter(nonNullFilter)
7168
7323
  };
7169
7324
  }
7170
7325
  function parseRichTextSpan(span) {
@@ -7173,7 +7328,7 @@ function parseRichTextSpan(span) {
7173
7328
  const marks = span.marks ?? [];
7174
7329
  return {
7175
7330
  text: span.text,
7176
- attributes: marks.map(parseRichTextAttribute).filter(nonNullFilter2)
7331
+ attributes: marks.map(parseRichTextAttribute).filter(nonNullFilter)
7177
7332
  };
7178
7333
  }
7179
7334
  function parseRichTextAttribute(mark) {
@@ -7182,7 +7337,7 @@ function parseRichTextAttribute(mark) {
7182
7337
  return { type: "Bold" };
7183
7338
  case "italic":
7184
7339
  return { type: "Italic" };
7185
- case "strikethrough":
7340
+ case "strike":
7186
7341
  return { type: "Strikethrough" };
7187
7342
  case "code":
7188
7343
  return { type: "Code" };
@@ -7237,7 +7392,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
7237
7392
  };
7238
7393
  tableValue.value = rows.map((row) => {
7239
7394
  return {
7240
- cells: (row.content ?? []).map(parseAsTableCell).filter(nonNullFilter2)
7395
+ cells: (row.content ?? []).map(parseAsTableCell).filter(nonNullFilter)
7241
7396
  };
7242
7397
  });
7243
7398
  return {
@@ -7269,7 +7424,7 @@ function parseAsTableCell(prosemirrorNode) {
7269
7424
  if (columnWidthArray) {
7270
7425
  columnWidth = columnWidthArray[0];
7271
7426
  }
7272
- const tableNodes = (prosemirrorNode.content ?? []).map(parseAsTableNode).filter(nonNullFilter2);
7427
+ const tableNodes = (prosemirrorNode.content ?? []).map(parseAsTableNode).filter(nonNullFilter);
7273
7428
  return {
7274
7429
  id,
7275
7430
  alignment: parseTableCellAlignment(textAlign),
@@ -7416,7 +7571,7 @@ function parseBlockItems(prosemirrorNode, definition) {
7416
7571
  console.error("Block `items` property must be a json array");
7417
7572
  return null;
7418
7573
  }
7419
- return itemsJson.map((i) => parseItem(i, definition)).filter(nonNullFilter2);
7574
+ return itemsJson.map((i) => parseItem(i, definition)).filter(nonNullFilter);
7420
7575
  }
7421
7576
  function parseAppearance(prosemirrorNode) {
7422
7577
  let appearance = {};
@@ -7540,7 +7695,7 @@ function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchem
7540
7695
  return void 0;
7541
7696
  }
7542
7697
  }
7543
- function nonNullFilter2(item) {
7698
+ function nonNullFilter(item) {
7544
7699
  return item !== null;
7545
7700
  }
7546
7701
  function mapByUnique2(items, keyFn) {
@@ -7622,8 +7777,6 @@ export {
7622
7777
  PageBlockEditorModel,
7623
7778
  PageSectionEditorModel,
7624
7779
  WorkspaceConfigurationPayload,
7625
- blockDefinitionForBlock,
7626
- blockToProsemirrorNode,
7627
7780
  buildDocPagePublishPaths,
7628
7781
  calculateElementParentChain,
7629
7782
  documentationElementsToHierarchyDto,
@@ -7642,7 +7795,6 @@ export {
7642
7795
  prosemirrorNodeToBlock,
7643
7796
  prosemirrorNodeToSection,
7644
7797
  prosemirrorNodesToBlocks,
7645
- sectionToProsemirrorNode,
7646
7798
  serializeAsCustomBlock,
7647
7799
  validateSsoPayload,
7648
7800
  yDocToPage,