@supernova-studio/client 0.39.0 → 0.40.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.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +20 -18
package/dist/index.js
CHANGED
|
@@ -5351,6 +5351,9 @@ var newSchema = {
|
|
|
5351
5351
|
};
|
|
5352
5352
|
var pmSchema = new (0, _prosemirrormodel.Schema)(newSchema);
|
|
5353
5353
|
|
|
5354
|
+
// src/yjs/docs-editor/blocks-to-prosemirror.ts
|
|
5355
|
+
var _yprosemirror = require('y-prosemirror');
|
|
5356
|
+
|
|
5354
5357
|
// src/yjs/docs-editor/utils.ts
|
|
5355
5358
|
var BlockParsingUtils = {
|
|
5356
5359
|
singleBlockItem(block) {
|
|
@@ -5436,9 +5439,6 @@ var BlockDefinitionUtils = {
|
|
|
5436
5439
|
}
|
|
5437
5440
|
};
|
|
5438
5441
|
|
|
5439
|
-
// src/yjs/docs-editor/blocks-to-prosemirror.ts
|
|
5440
|
-
var _yprosemirror = require('y-prosemirror');
|
|
5441
|
-
|
|
5442
5442
|
// src/yjs/docs-editor/list-tree-builder.ts
|
|
5443
5443
|
var ListTreeBuilder = class {
|
|
5444
5444
|
addWithProperty(block, multiRichTextProperty) {
|
|
@@ -5543,7 +5543,9 @@ function pageToProsemirrorDoc(page, definitions) {
|
|
|
5543
5543
|
};
|
|
5544
5544
|
}
|
|
5545
5545
|
function blockToProsemirrorNode(block, definition) {
|
|
5546
|
-
|
|
5546
|
+
const definitionsMap = /* @__PURE__ */ new Map([[definition.id, definition]]);
|
|
5547
|
+
const nodes = internalBlocksToProsemirrorNodes([block], definitionsMap);
|
|
5548
|
+
return _nullishCoalesce(nodes[0], () => ( null));
|
|
5547
5549
|
}
|
|
5548
5550
|
function internalSectionToProsemirrorNode(section, definitionsMap) {
|
|
5549
5551
|
return {
|