@supernova-studio/client 0.48.4 → 0.48.6

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.48.4",
3
+ "version": "0.48.6",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -526,8 +526,7 @@ function parseAsTableCell(prosemirrorNode: ProsemirrorNode): PageBlockItemTableC
526
526
  let columnWidth: number | undefined;
527
527
  const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z.array(z.number()).optional());
528
528
  if (columnWidthArray) {
529
- columnWidth = columnWidthArray[0];
530
- columnWidth = Math.round(columnWidth * 100) / 100;
529
+ columnWidth = roundDimension(columnWidthArray[0]);
531
530
  }
532
531
 
533
532
  const tableNodes = (prosemirrorNode.content ?? []).map(parseAsTableNode).filter(nonNullFilter);
@@ -895,3 +894,7 @@ function mapByUnique<V, K>(items: V[], keyFn: (item: V) => K): Map<K, V> {
895
894
  }
896
895
  return result;
897
896
  }
897
+
898
+ function roundDimension(dimension: number) {
899
+ return Math.round(dimension * 100) / 100;
900
+ }