@supernova-studio/client 0.53.7 → 0.53.8

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.53.7",
3
+ "version": "0.53.8",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -558,7 +558,9 @@ function serializeTableNode(node: PageBlockItemTableNode): ProsemirrorNode {
558
558
  id: node.id,
559
559
  props: {
560
560
  image: {
561
- caption: node.caption,
561
+ ...(node.alt && { alt: node.alt }),
562
+ ...(node.caption && { caption: node.caption }),
563
+ ...(node.alignment && { alignment: node.alignment }),
562
564
  value: node.value,
563
565
  } satisfies PageBlockItemImageValue,
564
566
  },
@@ -649,11 +649,15 @@ function parseAsTableNode(prosemirrorNode: ProsemirrorNode): PageBlockItemTableN
649
649
  const imagePropertyValueParseResult = PageBlockItemImageValue.safeParse(rawImagePropertyValue);
650
650
  if (!imagePropertyValueParseResult.success) return null;
651
651
 
652
+ const { value, caption, alt, alignment } = imagePropertyValueParseResult.data;
653
+
652
654
  return {
653
655
  type: "Image",
654
- id: id,
655
- value: imagePropertyValueParseResult.data.value,
656
- caption: imagePropertyValueParseResult.data.caption,
656
+ id,
657
+ value,
658
+ ...(alt && { alt }),
659
+ ...(caption && { caption }),
660
+ ...(alignment && { alignment }),
657
661
  };
658
662
 
659
663
  default: