@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/client",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -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: "horizontalrule",
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
- appearance: JSON.stringify(block.data.appearance),
559
+
560
+ ...(columns && { columns: columns }),
564
561
  },
565
562
  };
566
563
  }