@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.d.mts +33 -107
- package/dist/index.d.ts +33 -107
- package/dist/index.js +273 -121
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +261 -109
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/elements/documentation/group.ts +3 -2
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +125 -105
- package/src/yjs/docs-editor/list-tree-builder.ts +194 -0
- package/src/yjs/docs-editor/prosemirror/schema.ts +3 -0
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -914,16 +914,18 @@ var PageBlockImageAlignment = _zod.z.enum(["Left", "Center", "Stretch"]);
|
|
|
914
914
|
var PageBlockTableCellAlignment = _zod.z.enum(["Left", "Center", "Right"]);
|
|
915
915
|
var PageBlockPreviewContainerSize = _zod.z.enum(["Centered", "NaturalHeight"]);
|
|
916
916
|
var PageBlockThemeDisplayMode = _zod.z.enum(["Split", "Override"]);
|
|
917
|
+
var PageBlockImageResourceReference = _zod.z.object({
|
|
918
|
+
resourceId: _zod.z.string(),
|
|
919
|
+
url: _zod.z.string()
|
|
920
|
+
});
|
|
921
|
+
var PageBlockResourceFrameNodeReference = _zod.z.object({
|
|
922
|
+
sourceId: _zod.z.string(),
|
|
923
|
+
frameReferenceId: _zod.z.string()
|
|
924
|
+
});
|
|
917
925
|
var PageBlockImageReference = _zod.z.object({
|
|
918
926
|
type: PageBlockImageType,
|
|
919
|
-
resource:
|
|
920
|
-
|
|
921
|
-
resourceId: _zod.z.string()
|
|
922
|
-
}).optional(),
|
|
923
|
-
figmaFile: _zod.z.object({
|
|
924
|
-
sourceId: _zod.z.string(),
|
|
925
|
-
frameReferenceId: _zod.z.string()
|
|
926
|
-
}).optional()
|
|
927
|
+
resource: PageBlockImageResourceReference.optional(),
|
|
928
|
+
figmaFile: PageBlockResourceFrameNodeReference.optional()
|
|
927
929
|
});
|
|
928
930
|
var PageBlockColorV2 = _zod.z.object({
|
|
929
931
|
value: _zod.z.string(),
|
|
@@ -2594,13 +2596,13 @@ var PulsarContributionVariant = _zod.z.object({
|
|
|
2594
2596
|
thumbnailURL: nullishToOptional(_zod.z.string())
|
|
2595
2597
|
});
|
|
2596
2598
|
var PulsarCustomBlock = _zod.z.object({
|
|
2597
|
-
title: _zod.z.string(),
|
|
2599
|
+
title: nullishToOptional(_zod.z.string()),
|
|
2598
2600
|
key: _zod.z.string(),
|
|
2599
|
-
category: _zod.z.string(),
|
|
2601
|
+
category: nullishToOptional(_zod.z.string()),
|
|
2600
2602
|
description: nullishToOptional(_zod.z.string()),
|
|
2601
|
-
iconURL: _zod.z.string(),
|
|
2602
|
-
mode: _zod.z.enum(["array", "block"]),
|
|
2603
|
-
properties: _zod.z.array(PulsarBaseProperty)
|
|
2603
|
+
iconURL: nullishToOptional(_zod.z.string()),
|
|
2604
|
+
mode: nullishToOptional(_zod.z.enum(["array", "block"])),
|
|
2605
|
+
properties: nullishToOptional(_zod.z.array(PulsarBaseProperty)).transform((v) => _nullishCoalesce(v, () => ( [])))
|
|
2604
2606
|
});
|
|
2605
2607
|
var ExporterType = _zod.z.enum(["code", "documentation"]);
|
|
2606
2608
|
var ExporterSource = _zod.z.enum(["git", "upload"]);
|
|
@@ -3760,8 +3762,9 @@ var DTODuplicateDocumentationGroupInput = _zod.z.object({
|
|
|
3760
3762
|
var DTOCreateDocumentationTabInput = _zod.z.object({
|
|
3761
3763
|
// New group persistent id
|
|
3762
3764
|
persistentId: _zod.z.string().uuid(),
|
|
3763
|
-
//
|
|
3764
|
-
|
|
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: _zod.z.string(),
|
|
3765
3768
|
tabName: _zod.z.string()
|
|
3766
3769
|
});
|
|
3767
3770
|
var DTODeleteDocumentationTabGroupInput = _zod.z.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
|
var _yprosemirror = require('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 (_optionalChain([lastChild, 'optionalAccess', _12 => _12.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 = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _13 => _13.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 _yprosemirror.prosemirrorJSONToYXmlFragment.call(void 0, 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:
|
|
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
|
|
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
|
|
5085
|
-
const
|
|
5086
|
-
|
|
5087
|
-
|
|
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
|
|
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({
|
|
@@ -5127,7 +5277,7 @@ function serializeAsRichTextBlock(input) {
|
|
|
5127
5277
|
const textPropertyValue = BlockParsingUtils.richTextPropertyValue(blockItem, richTextProperty.id);
|
|
5128
5278
|
const enrichedInput = { ...input, richTextPropertyValue: textPropertyValue };
|
|
5129
5279
|
const parsedOptions = PageBlockDefinitionRichTextOptions.optional().parse(richTextProperty.options);
|
|
5130
|
-
const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess',
|
|
5280
|
+
const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _14 => _14.richTextStyle]), () => ( "Default"));
|
|
5131
5281
|
switch (style) {
|
|
5132
5282
|
case "Callout":
|
|
5133
5283
|
return serializeAsCallout(enrichedInput);
|
|
@@ -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(
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _13 => _13.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
|
|
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(
|
|
5343
|
+
...serializeBlockNodeAttributes(tree.block),
|
|
5211
5344
|
start: "1"
|
|
5212
5345
|
},
|
|
5213
|
-
content:
|
|
5346
|
+
content: serializeListContent(tree)
|
|
5214
5347
|
};
|
|
5215
5348
|
}
|
|
5216
|
-
function serializeAsUnorderedList(
|
|
5349
|
+
function serializeAsUnorderedList(tree) {
|
|
5217
5350
|
return {
|
|
5218
5351
|
type: "bulletList",
|
|
5219
5352
|
attrs: {
|
|
5220
|
-
...serializeBlockNodeAttributes(
|
|
5353
|
+
...serializeBlockNodeAttributes(tree.block)
|
|
5221
5354
|
},
|
|
5222
|
-
content:
|
|
5355
|
+
content: serializeListContent(tree)
|
|
5223
5356
|
};
|
|
5224
5357
|
}
|
|
5225
|
-
function
|
|
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: _nullishCoalesce(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(
|
|
5336
|
-
const { block } = input;
|
|
5493
|
+
function serializeBlockNodeAttributes(block) {
|
|
5337
5494
|
return {
|
|
5338
5495
|
id: block.id,
|
|
5339
5496
|
definitionId: block.data.packageId,
|
|
@@ -5341,7 +5498,7 @@ function serializeBlockNodeAttributes(input) {
|
|
|
5341
5498
|
};
|
|
5342
5499
|
}
|
|
5343
5500
|
function richTextHeadingLevel(property) {
|
|
5344
|
-
const style = _optionalChain([property, 'access',
|
|
5501
|
+
const style = _optionalChain([property, 'access', _15 => _15.options, 'optionalAccess', _16 => _16.richTextStyle]);
|
|
5345
5502
|
if (!style)
|
|
5346
5503
|
return void 0;
|
|
5347
5504
|
switch (style) {
|
|
@@ -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:
|
|
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: "
|
|
5576
|
+
return { type: "strike", attrs: {} };
|
|
5419
5577
|
case "Code":
|
|
5420
5578
|
return { type: "code", attrs: {} };
|
|
5421
5579
|
case "Link":
|
|
@@ -5447,7 +5605,7 @@ function serializeAsCustomBlock(block, definition) {
|
|
|
5447
5605
|
linksTo: i.linksTo
|
|
5448
5606
|
};
|
|
5449
5607
|
});
|
|
5450
|
-
const columns = _optionalChain([block, 'access',
|
|
5608
|
+
const columns = _optionalChain([block, 'access', _17 => _17.data, 'access', _18 => _18.appearance, 'optionalAccess', _19 => _19.numberOfColumns]);
|
|
5451
5609
|
return {
|
|
5452
5610
|
type: serializeCustomBlockNodeType(block, definition),
|
|
5453
5611
|
attrs: {
|
|
@@ -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: (_nullishCoalesce(prosemirrorNode.content, () => ( []))).filter((c) => c.type === "sectionItem").map((c) => prosemirrorNodeToSectionItem(c, definitionsMap)).filter(
|
|
7161
|
+
items: (_nullishCoalesce(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: _nullishCoalesce(getProsemirrorAttribute(prosemirrorNode, "title", _zod.z.string()), () => ( "")),
|
|
7016
|
-
columns: (_nullishCoalesce(prosemirrorNode.content, () => ( []))).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(
|
|
7171
|
+
columns: (_nullishCoalesce(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(
|
|
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(
|
|
7199
|
+
}).filter(nonNullFilter);
|
|
7045
7200
|
}
|
|
7046
7201
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap) {
|
|
7047
7202
|
let definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", _zod.z.string());
|
|
@@ -7148,13 +7303,13 @@ function parseAsMultiRichText(prosemirrorNode, definition, property) {
|
|
|
7148
7303
|
value: (_nullishCoalesce(prosemirrorNode.content, () => ( []))).map((listItem) => {
|
|
7149
7304
|
if (listItem.type !== "listItem")
|
|
7150
7305
|
return null;
|
|
7151
|
-
if (!_optionalChain([listItem, 'access',
|
|
7306
|
+
if (!_optionalChain([listItem, 'access', _20 => _20.content, 'optionalAccess', _21 => _21.length]))
|
|
7152
7307
|
return parseRichText([]);
|
|
7153
7308
|
const paragraph = listItem.content[0];
|
|
7154
7309
|
if (paragraph.type !== "paragraph")
|
|
7155
7310
|
return parseRichText([]);
|
|
7156
7311
|
return parseRichText(_nullishCoalesce(paragraph.content, () => ( [])));
|
|
7157
|
-
}).filter(
|
|
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(
|
|
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 = _nullishCoalesce(span.marks, () => ( []));
|
|
7174
7329
|
return {
|
|
7175
7330
|
text: span.text,
|
|
7176
|
-
attributes: marks.map(parseRichTextAttribute).filter(
|
|
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 "
|
|
7340
|
+
case "strike":
|
|
7186
7341
|
return { type: "Strikethrough" };
|
|
7187
7342
|
case "code":
|
|
7188
7343
|
return { type: "Code" };
|
|
@@ -7217,17 +7372,17 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
7217
7372
|
return null;
|
|
7218
7373
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
7219
7374
|
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", _zod.z.boolean().optional()) !== false;
|
|
7220
|
-
const tableChild = _optionalChain([prosemirrorNode, 'access',
|
|
7375
|
+
const tableChild = _optionalChain([prosemirrorNode, 'access', _22 => _22.content, 'optionalAccess', _23 => _23.find, 'call', _24 => _24((c) => c.type === "table")]);
|
|
7221
7376
|
if (!tableChild) {
|
|
7222
7377
|
return emptyTable(id, variantId, 0);
|
|
7223
7378
|
}
|
|
7224
|
-
const rows = _nullishCoalesce(_optionalChain([tableChild, 'access',
|
|
7379
|
+
const rows = _nullishCoalesce(_optionalChain([tableChild, 'access', _25 => _25.content, 'optionalAccess', _26 => _26.filter, 'call', _27 => _27((c) => c.type === "tableRow" && !!_optionalChain([c, 'access', _28 => _28.content, 'optionalAccess', _29 => _29.length]))]), () => ( []));
|
|
7225
7380
|
if (!rows.length) {
|
|
7226
7381
|
return emptyTable(id, variantId, 0);
|
|
7227
7382
|
}
|
|
7228
|
-
const rowHeaderCells = _nullishCoalesce(_optionalChain([rows, 'access',
|
|
7229
|
-
const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access',
|
|
7230
|
-
const hasHeaderRow = _optionalChain([rows, 'access',
|
|
7383
|
+
const rowHeaderCells = _nullishCoalesce(_optionalChain([rows, 'access', _30 => _30[0], 'access', _31 => _31.content, 'optionalAccess', _32 => _32.filter, 'call', _33 => _33((c) => c.type === "tableHeader"), 'access', _34 => _34.length]), () => ( 0));
|
|
7384
|
+
const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _35 => _35.content, 'optionalAccess', _36 => _36[0], 'optionalAccess', _37 => _37.type]) === "tableHeader").length;
|
|
7385
|
+
const hasHeaderRow = _optionalChain([rows, 'access', _38 => _38[0], 'access', _39 => _39.content, 'optionalAccess', _40 => _40.length]) === rowHeaderCells;
|
|
7231
7386
|
const hasHeaderColumn = rows.length === columnHeaderCells;
|
|
7232
7387
|
const tableValue = {
|
|
7233
7388
|
showBorder: hasBorder,
|
|
@@ -7237,7 +7392,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
7237
7392
|
};
|
|
7238
7393
|
tableValue.value = rows.map((row) => {
|
|
7239
7394
|
return {
|
|
7240
|
-
cells: (_nullishCoalesce(row.content, () => ( []))).map(parseAsTableCell).filter(
|
|
7395
|
+
cells: (_nullishCoalesce(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 = (_nullishCoalesce(prosemirrorNode.content, () => ( []))).map(parseAsTableNode).filter(
|
|
7427
|
+
const tableNodes = (_nullishCoalesce(prosemirrorNode.content, () => ( []))).map(parseAsTableNode).filter(nonNullFilter);
|
|
7273
7428
|
return {
|
|
7274
7429
|
id,
|
|
7275
7430
|
alignment: parseTableCellAlignment(textAlign),
|
|
@@ -7309,7 +7464,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
7309
7464
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
7310
7465
|
if (!parsedItems.success)
|
|
7311
7466
|
return null;
|
|
7312
|
-
const rawImagePropertyValue = _optionalChain([parsedItems, 'access',
|
|
7467
|
+
const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _41 => _41.data, 'access', _42 => _42[0], 'optionalAccess', _43 => _43.props, 'access', _44 => _44.image]);
|
|
7313
7468
|
if (!rawImagePropertyValue)
|
|
7314
7469
|
return null;
|
|
7315
7470
|
const imagePropertyValueParseResult = PageBlockItemImageValue.safeParse(rawImagePropertyValue);
|
|
@@ -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(
|
|
7574
|
+
return itemsJson.map((i) => parseItem(i, definition)).filter(nonNullFilter);
|
|
7420
7575
|
}
|
|
7421
7576
|
function parseAppearance(prosemirrorNode) {
|
|
7422
7577
|
let appearance = {};
|
|
@@ -7531,7 +7686,7 @@ function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
|
7531
7686
|
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(_zod.z.string()));
|
|
7532
7687
|
}
|
|
7533
7688
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
7534
|
-
const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access',
|
|
7689
|
+
const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _45 => _45.attrs, 'optionalAccess', _46 => _46[attributeName]]));
|
|
7535
7690
|
if (parsedAttr.success) {
|
|
7536
7691
|
return parsedAttr.data;
|
|
7537
7692
|
} else {
|
|
@@ -7540,7 +7695,7 @@ function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchem
|
|
|
7540
7695
|
return void 0;
|
|
7541
7696
|
}
|
|
7542
7697
|
}
|
|
7543
|
-
function
|
|
7698
|
+
function nonNullFilter(item) {
|
|
7544
7699
|
return item !== null;
|
|
7545
7700
|
}
|
|
7546
7701
|
function mapByUnique2(items, keyFn) {
|
|
@@ -7646,8 +7801,5 @@ function mapByUnique2(items, keyFn) {
|
|
|
7646
7801
|
|
|
7647
7802
|
|
|
7648
7803
|
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
exports.BlockDefinitionUtils = BlockDefinitionUtils; exports.BlockParsingUtils = BlockParsingUtils; exports.DTOCreateDocumentationGroupInput = DTOCreateDocumentationGroupInput; exports.DTOCreateDocumentationPageInputV2 = DTOCreateDocumentationPageInputV2; exports.DTOCreateDocumentationTabInput = DTOCreateDocumentationTabInput; exports.DTODeleteDocumentationGroupInput = DTODeleteDocumentationGroupInput; exports.DTODeleteDocumentationPageInputV2 = DTODeleteDocumentationPageInputV2; exports.DTODeleteDocumentationTabGroupInput = DTODeleteDocumentationTabGroupInput; exports.DTODesignSystem = DTODesignSystem; exports.DTODocumentationGroupCreateActionInputV2 = DTODocumentationGroupCreateActionInputV2; exports.DTODocumentationGroupCreateActionOutputV2 = DTODocumentationGroupCreateActionOutputV2; exports.DTODocumentationGroupDeleteActionInputV2 = DTODocumentationGroupDeleteActionInputV2; exports.DTODocumentationGroupDeleteActionOutputV2 = DTODocumentationGroupDeleteActionOutputV2; exports.DTODocumentationGroupDuplicateActionInputV2 = DTODocumentationGroupDuplicateActionInputV2; exports.DTODocumentationGroupDuplicateActionOutputV2 = DTODocumentationGroupDuplicateActionOutputV2; exports.DTODocumentationGroupMoveActionInputV2 = DTODocumentationGroupMoveActionInputV2; exports.DTODocumentationGroupMoveActionOutputV2 = DTODocumentationGroupMoveActionOutputV2; exports.DTODocumentationGroupStructureV2 = DTODocumentationGroupStructureV2; exports.DTODocumentationGroupUpdateActionInputV2 = DTODocumentationGroupUpdateActionInputV2; exports.DTODocumentationGroupUpdateActionOutputV2 = DTODocumentationGroupUpdateActionOutputV2; exports.DTODocumentationGroupV2 = DTODocumentationGroupV2; exports.DTODocumentationHierarchyV2 = DTODocumentationHierarchyV2; exports.DTODocumentationLinkPreviewRequest = DTODocumentationLinkPreviewRequest; exports.DTODocumentationLinkPreviewResponse = DTODocumentationLinkPreviewResponse; exports.DTODocumentationPageCreateActionInputV2 = DTODocumentationPageCreateActionInputV2; exports.DTODocumentationPageCreateActionOutputV2 = DTODocumentationPageCreateActionOutputV2; exports.DTODocumentationPageDeleteActionInputV2 = DTODocumentationPageDeleteActionInputV2; exports.DTODocumentationPageDeleteActionOutputV2 = DTODocumentationPageDeleteActionOutputV2; exports.DTODocumentationPageDuplicateActionInputV2 = DTODocumentationPageDuplicateActionInputV2; exports.DTODocumentationPageDuplicateActionOutputV2 = DTODocumentationPageDuplicateActionOutputV2; exports.DTODocumentationPageMoveActionInputV2 = DTODocumentationPageMoveActionInputV2; exports.DTODocumentationPageMoveActionOutputV2 = DTODocumentationPageMoveActionOutputV2; exports.DTODocumentationPageRoomHeaderData = DTODocumentationPageRoomHeaderData; exports.DTODocumentationPageRoomHeaderDataUpdate = DTODocumentationPageRoomHeaderDataUpdate; exports.DTODocumentationPageStructureV2 = DTODocumentationPageStructureV2; exports.DTODocumentationPageUpdateActionInputV2 = DTODocumentationPageUpdateActionInputV2; exports.DTODocumentationPageUpdateActionOutputV2 = DTODocumentationPageUpdateActionOutputV2; exports.DTODocumentationPageV2 = DTODocumentationPageV2; exports.DTODocumentationTabCreateActionInputV2 = DTODocumentationTabCreateActionInputV2; exports.DTODocumentationTabCreateActionOutputV2 = DTODocumentationTabCreateActionOutputV2; exports.DTODocumentationTabGroupDeleteActionInputV2 = DTODocumentationTabGroupDeleteActionInputV2; exports.DTODocumentationTabGroupDeleteActionOutputV2 = DTODocumentationTabGroupDeleteActionOutputV2; exports.DTODuplicateDocumentationGroupInput = DTODuplicateDocumentationGroupInput; exports.DTODuplicateDocumentationPageInputV2 = DTODuplicateDocumentationPageInputV2; exports.DTOElementActionInput = DTOElementActionInput; exports.DTOElementActionOutput = DTOElementActionOutput; exports.DTOElementsGetOutput = DTOElementsGetOutput; exports.DTOElementsGetQuerySchema = DTOElementsGetQuerySchema; exports.DTOElementsGetTypeFilter = DTOElementsGetTypeFilter; exports.DTOFigmaNode = DTOFigmaNode; exports.DTOFigmaNodeData = DTOFigmaNodeData; exports.DTOFigmaNodeRenderActionInput = DTOFigmaNodeRenderActionInput; exports.DTOFigmaNodeRenderActionOutput = DTOFigmaNodeRenderActionOutput; exports.DTOFigmaNodeRenderInput = DTOFigmaNodeRenderInput; exports.DTOGetBlockDefinitionsOutput = DTOGetBlockDefinitionsOutput; exports.DTOLiveblocksAuthRequest = DTOLiveblocksAuthRequest; exports.DTOMoveDocumentationGroupInput = DTOMoveDocumentationGroupInput; exports.DTOMoveDocumentationPageInputV2 = DTOMoveDocumentationPageInputV2; exports.DTONpmRegistryConfig = DTONpmRegistryConfig; exports.DTOUpdateDocumentationGroupInput = DTOUpdateDocumentationGroupInput; exports.DTOUpdateDocumentationPageInputV2 = DTOUpdateDocumentationPageInputV2; exports.DTOUserWorkspaceMembership = DTOUserWorkspaceMembership; exports.DTOUserWorkspaceMembershipsResponse = DTOUserWorkspaceMembershipsResponse; exports.DTOWorkspace = DTOWorkspace; exports.DTOWorkspaceRole = DTOWorkspaceRole; exports.DocumentationPageEditorModel = DocumentationPageEditorModel; exports.DocumentationPageV1DTO = DocumentationPageV1DTO; exports.NpmRegistryInput = NpmRegistryInput; exports.PageBlockEditorModel = PageBlockEditorModel; exports.PageSectionEditorModel = PageSectionEditorModel; exports.WorkspaceConfigurationPayload = WorkspaceConfigurationPayload; exports.blockDefinitionForBlock = blockDefinitionForBlock; exports.blockToProsemirrorNode = blockToProsemirrorNode; exports.buildDocPagePublishPaths = buildDocPagePublishPaths; exports.calculateElementParentChain = calculateElementParentChain; exports.documentationElementsToHierarchyDto = documentationElementsToHierarchyDto; exports.documentationHierarchyToYjs = documentationHierarchyToYjs; exports.documentationPagesToDTOV1 = documentationPagesToDTOV1; exports.documentationPagesToDTOV2 = documentationPagesToDTOV2; exports.documentationPagesToStructureDTOV2 = documentationPagesToStructureDTOV2; exports.elementGroupsToDocumentationGroupDTO = elementGroupsToDocumentationGroupDTO; exports.elementGroupsToDocumentationGroupStructureDTO = elementGroupsToDocumentationGroupStructureDTO; exports.getMockPageBlockDefinitions = getMockPageBlockDefinitions; exports.itemConfigurationToYjs = itemConfigurationToYjs; exports.pageToProsemirrorDoc = pageToProsemirrorDoc; exports.pageToYXmlFragment = pageToYXmlFragment; exports.pmSchema = pmSchema; exports.prosemirrorDocToPage = prosemirrorDocToPage; exports.prosemirrorNodeToBlock = prosemirrorNodeToBlock; exports.prosemirrorNodeToSection = prosemirrorNodeToSection; exports.prosemirrorNodesToBlocks = prosemirrorNodesToBlocks; exports.sectionToProsemirrorNode = sectionToProsemirrorNode; exports.serializeAsCustomBlock = serializeAsCustomBlock; exports.validateSsoPayload = validateSsoPayload; exports.yDocToPage = yDocToPage; exports.yXmlFragmentToPage = yXmlFragmentToPage; exports.yjsToDocumentationHierarchy = yjsToDocumentationHierarchy; exports.yjsToItemConfiguration = yjsToItemConfiguration;
|
|
7804
|
+
exports.BlockDefinitionUtils = BlockDefinitionUtils; exports.BlockParsingUtils = BlockParsingUtils; exports.DTOCreateDocumentationGroupInput = DTOCreateDocumentationGroupInput; exports.DTOCreateDocumentationPageInputV2 = DTOCreateDocumentationPageInputV2; exports.DTOCreateDocumentationTabInput = DTOCreateDocumentationTabInput; exports.DTODeleteDocumentationGroupInput = DTODeleteDocumentationGroupInput; exports.DTODeleteDocumentationPageInputV2 = DTODeleteDocumentationPageInputV2; exports.DTODeleteDocumentationTabGroupInput = DTODeleteDocumentationTabGroupInput; exports.DTODesignSystem = DTODesignSystem; exports.DTODocumentationGroupCreateActionInputV2 = DTODocumentationGroupCreateActionInputV2; exports.DTODocumentationGroupCreateActionOutputV2 = DTODocumentationGroupCreateActionOutputV2; exports.DTODocumentationGroupDeleteActionInputV2 = DTODocumentationGroupDeleteActionInputV2; exports.DTODocumentationGroupDeleteActionOutputV2 = DTODocumentationGroupDeleteActionOutputV2; exports.DTODocumentationGroupDuplicateActionInputV2 = DTODocumentationGroupDuplicateActionInputV2; exports.DTODocumentationGroupDuplicateActionOutputV2 = DTODocumentationGroupDuplicateActionOutputV2; exports.DTODocumentationGroupMoveActionInputV2 = DTODocumentationGroupMoveActionInputV2; exports.DTODocumentationGroupMoveActionOutputV2 = DTODocumentationGroupMoveActionOutputV2; exports.DTODocumentationGroupStructureV2 = DTODocumentationGroupStructureV2; exports.DTODocumentationGroupUpdateActionInputV2 = DTODocumentationGroupUpdateActionInputV2; exports.DTODocumentationGroupUpdateActionOutputV2 = DTODocumentationGroupUpdateActionOutputV2; exports.DTODocumentationGroupV2 = DTODocumentationGroupV2; exports.DTODocumentationHierarchyV2 = DTODocumentationHierarchyV2; exports.DTODocumentationLinkPreviewRequest = DTODocumentationLinkPreviewRequest; exports.DTODocumentationLinkPreviewResponse = DTODocumentationLinkPreviewResponse; exports.DTODocumentationPageCreateActionInputV2 = DTODocumentationPageCreateActionInputV2; exports.DTODocumentationPageCreateActionOutputV2 = DTODocumentationPageCreateActionOutputV2; exports.DTODocumentationPageDeleteActionInputV2 = DTODocumentationPageDeleteActionInputV2; exports.DTODocumentationPageDeleteActionOutputV2 = DTODocumentationPageDeleteActionOutputV2; exports.DTODocumentationPageDuplicateActionInputV2 = DTODocumentationPageDuplicateActionInputV2; exports.DTODocumentationPageDuplicateActionOutputV2 = DTODocumentationPageDuplicateActionOutputV2; exports.DTODocumentationPageMoveActionInputV2 = DTODocumentationPageMoveActionInputV2; exports.DTODocumentationPageMoveActionOutputV2 = DTODocumentationPageMoveActionOutputV2; exports.DTODocumentationPageRoomHeaderData = DTODocumentationPageRoomHeaderData; exports.DTODocumentationPageRoomHeaderDataUpdate = DTODocumentationPageRoomHeaderDataUpdate; exports.DTODocumentationPageStructureV2 = DTODocumentationPageStructureV2; exports.DTODocumentationPageUpdateActionInputV2 = DTODocumentationPageUpdateActionInputV2; exports.DTODocumentationPageUpdateActionOutputV2 = DTODocumentationPageUpdateActionOutputV2; exports.DTODocumentationPageV2 = DTODocumentationPageV2; exports.DTODocumentationTabCreateActionInputV2 = DTODocumentationTabCreateActionInputV2; exports.DTODocumentationTabCreateActionOutputV2 = DTODocumentationTabCreateActionOutputV2; exports.DTODocumentationTabGroupDeleteActionInputV2 = DTODocumentationTabGroupDeleteActionInputV2; exports.DTODocumentationTabGroupDeleteActionOutputV2 = DTODocumentationTabGroupDeleteActionOutputV2; exports.DTODuplicateDocumentationGroupInput = DTODuplicateDocumentationGroupInput; exports.DTODuplicateDocumentationPageInputV2 = DTODuplicateDocumentationPageInputV2; exports.DTOElementActionInput = DTOElementActionInput; exports.DTOElementActionOutput = DTOElementActionOutput; exports.DTOElementsGetOutput = DTOElementsGetOutput; exports.DTOElementsGetQuerySchema = DTOElementsGetQuerySchema; exports.DTOElementsGetTypeFilter = DTOElementsGetTypeFilter; exports.DTOFigmaNode = DTOFigmaNode; exports.DTOFigmaNodeData = DTOFigmaNodeData; exports.DTOFigmaNodeRenderActionInput = DTOFigmaNodeRenderActionInput; exports.DTOFigmaNodeRenderActionOutput = DTOFigmaNodeRenderActionOutput; exports.DTOFigmaNodeRenderInput = DTOFigmaNodeRenderInput; exports.DTOGetBlockDefinitionsOutput = DTOGetBlockDefinitionsOutput; exports.DTOLiveblocksAuthRequest = DTOLiveblocksAuthRequest; exports.DTOMoveDocumentationGroupInput = DTOMoveDocumentationGroupInput; exports.DTOMoveDocumentationPageInputV2 = DTOMoveDocumentationPageInputV2; exports.DTONpmRegistryConfig = DTONpmRegistryConfig; exports.DTOUpdateDocumentationGroupInput = DTOUpdateDocumentationGroupInput; exports.DTOUpdateDocumentationPageInputV2 = DTOUpdateDocumentationPageInputV2; exports.DTOUserWorkspaceMembership = DTOUserWorkspaceMembership; exports.DTOUserWorkspaceMembershipsResponse = DTOUserWorkspaceMembershipsResponse; exports.DTOWorkspace = DTOWorkspace; exports.DTOWorkspaceRole = DTOWorkspaceRole; exports.DocumentationPageEditorModel = DocumentationPageEditorModel; exports.DocumentationPageV1DTO = DocumentationPageV1DTO; exports.NpmRegistryInput = NpmRegistryInput; exports.PageBlockEditorModel = PageBlockEditorModel; exports.PageSectionEditorModel = PageSectionEditorModel; exports.WorkspaceConfigurationPayload = WorkspaceConfigurationPayload; exports.buildDocPagePublishPaths = buildDocPagePublishPaths; exports.calculateElementParentChain = calculateElementParentChain; exports.documentationElementsToHierarchyDto = documentationElementsToHierarchyDto; exports.documentationHierarchyToYjs = documentationHierarchyToYjs; exports.documentationPagesToDTOV1 = documentationPagesToDTOV1; exports.documentationPagesToDTOV2 = documentationPagesToDTOV2; exports.documentationPagesToStructureDTOV2 = documentationPagesToStructureDTOV2; exports.elementGroupsToDocumentationGroupDTO = elementGroupsToDocumentationGroupDTO; exports.elementGroupsToDocumentationGroupStructureDTO = elementGroupsToDocumentationGroupStructureDTO; exports.getMockPageBlockDefinitions = getMockPageBlockDefinitions; exports.itemConfigurationToYjs = itemConfigurationToYjs; exports.pageToProsemirrorDoc = pageToProsemirrorDoc; exports.pageToYXmlFragment = pageToYXmlFragment; exports.pmSchema = pmSchema; exports.prosemirrorDocToPage = prosemirrorDocToPage; exports.prosemirrorNodeToBlock = prosemirrorNodeToBlock; exports.prosemirrorNodeToSection = prosemirrorNodeToSection; exports.prosemirrorNodesToBlocks = prosemirrorNodesToBlocks; exports.serializeAsCustomBlock = serializeAsCustomBlock; exports.validateSsoPayload = validateSsoPayload; exports.yDocToPage = yDocToPage; exports.yXmlFragmentToPage = yXmlFragmentToPage; exports.yjsToDocumentationHierarchy = yjsToDocumentationHierarchy; exports.yjsToItemConfiguration = yjsToItemConfiguration;
|
|
7653
7805
|
//# sourceMappingURL=index.js.map
|