@supernova-studio/client 0.7.0 → 0.8.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 +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +1565 -418
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1558 -411
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/docs-editor/blocks-to-prosemirror.ts +5 -8
- package/src/docs-editor/mock.ts +2891 -384
- package/src/docs-editor/prosemirror-to-blocks.ts +4 -3
package/package.json
CHANGED
|
@@ -372,12 +372,6 @@ function serializeTableNode(node: PageBlockItemTableNode): ProsemirrorNode {
|
|
|
372
372
|
src: node.value?.url,
|
|
373
373
|
},
|
|
374
374
|
};
|
|
375
|
-
|
|
376
|
-
case "MultiRichText":
|
|
377
|
-
// TODO
|
|
378
|
-
return {
|
|
379
|
-
type: "paragraph",
|
|
380
|
-
};
|
|
381
375
|
}
|
|
382
376
|
}
|
|
383
377
|
|
|
@@ -422,7 +416,7 @@ function serializeEmbedType(blockDefinitionId: string): string | undefined {
|
|
|
422
416
|
|
|
423
417
|
function serializeAsDivider(input: BaseInput): ProsemirrorNode {
|
|
424
418
|
return {
|
|
425
|
-
type: "
|
|
419
|
+
type: "horizontalRule",
|
|
426
420
|
attrs: serializeBlockNodeAttributes(input),
|
|
427
421
|
};
|
|
428
422
|
}
|
|
@@ -553,6 +547,8 @@ export function serializeAsCustomBlock(block: PageBlockEditorModel, definition:
|
|
|
553
547
|
};
|
|
554
548
|
});
|
|
555
549
|
|
|
550
|
+
const columns = block.data.appearance?.numberOfColumns;
|
|
551
|
+
|
|
556
552
|
return {
|
|
557
553
|
type: "blockNode",
|
|
558
554
|
attrs: {
|
|
@@ -560,7 +556,8 @@ export function serializeAsCustomBlock(block: PageBlockEditorModel, definition:
|
|
|
560
556
|
definitionId: block.data.packageId,
|
|
561
557
|
variantId: block.data.variantId,
|
|
562
558
|
items: JSON.stringify(items),
|
|
563
|
-
|
|
559
|
+
|
|
560
|
+
...(columns && { columns: columns }),
|
|
564
561
|
},
|
|
565
562
|
};
|
|
566
563
|
}
|