odf.js 2.6.7 → 2.6.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.
@@ -39,13 +39,15 @@ function readRepeatCount(element, attrName) {
39
39
  function isHidden(element) {
40
40
  return require_xml_query.attrValue(element, "table:visibility") === "collapse";
41
41
  }
42
+ const DEFAULT_COLUMN_WIDTH_PT = 64;
43
+ const DEFAULT_ROW_HEIGHT_PT = 15;
42
44
  function readColumnLayout(columnElement, pkg) {
43
45
  const styleName = require_xml_query.attrValue(columnElement, "table:style-name");
44
46
  const styleElement = styleName === void 0 ? void 0 : require_typed_shared_cascade.findStyleElement(styleName, "table-column", pkg);
45
47
  const properties = styleElement === void 0 ? void 0 : require_xml_query.childrenWithTag(styleElement, "style:table-column-properties")[0];
46
48
  const widthValue = properties === void 0 ? void 0 : require_xml_query.attrValue(properties, "style:column-width");
47
49
  return {
48
- widthPt: widthValue === void 0 ? 0 : require_typed_shared_units.parseOdfLength(widthValue) ?? 0,
50
+ widthPt: widthValue === void 0 ? DEFAULT_COLUMN_WIDTH_PT : require_typed_shared_units.parseOdfLength(widthValue) ?? DEFAULT_COLUMN_WIDTH_PT,
49
51
  manualBreak: (properties === void 0 ? void 0 : require_xml_query.attrValue(properties, "fo:break-before")) === "page"
50
52
  };
51
53
  }
@@ -55,7 +57,7 @@ function readRowLayout(rowElement, pkg) {
55
57
  const properties = styleElement === void 0 ? void 0 : require_xml_query.childrenWithTag(styleElement, "style:table-row-properties")[0];
56
58
  const heightValue = properties === void 0 ? void 0 : require_xml_query.attrValue(properties, "style:row-height");
57
59
  return {
58
- heightPt: heightValue === void 0 ? 0 : require_typed_shared_units.parseOdfLength(heightValue) ?? 0,
60
+ heightPt: heightValue === void 0 ? DEFAULT_ROW_HEIGHT_PT : require_typed_shared_units.parseOdfLength(heightValue) ?? DEFAULT_ROW_HEIGHT_PT,
59
61
  manualBreak: (properties === void 0 ? void 0 : require_xml_query.attrValue(properties, "fo:break-before")) === "page"
60
62
  };
61
63
  }
@@ -38,13 +38,15 @@ function readRepeatCount(element, attrName) {
38
38
  function isHidden(element) {
39
39
  return attrValue(element, "table:visibility") === "collapse";
40
40
  }
41
+ const DEFAULT_COLUMN_WIDTH_PT = 64;
42
+ const DEFAULT_ROW_HEIGHT_PT = 15;
41
43
  function readColumnLayout(columnElement, pkg) {
42
44
  const styleName = attrValue(columnElement, "table:style-name");
43
45
  const styleElement = styleName === void 0 ? void 0 : findStyleElement(styleName, "table-column", pkg);
44
46
  const properties = styleElement === void 0 ? void 0 : childrenWithTag(styleElement, "style:table-column-properties")[0];
45
47
  const widthValue = properties === void 0 ? void 0 : attrValue(properties, "style:column-width");
46
48
  return {
47
- widthPt: widthValue === void 0 ? 0 : parseOdfLength(widthValue) ?? 0,
49
+ widthPt: widthValue === void 0 ? DEFAULT_COLUMN_WIDTH_PT : parseOdfLength(widthValue) ?? DEFAULT_COLUMN_WIDTH_PT,
48
50
  manualBreak: (properties === void 0 ? void 0 : attrValue(properties, "fo:break-before")) === "page"
49
51
  };
50
52
  }
@@ -54,7 +56,7 @@ function readRowLayout(rowElement, pkg) {
54
56
  const properties = styleElement === void 0 ? void 0 : childrenWithTag(styleElement, "style:table-row-properties")[0];
55
57
  const heightValue = properties === void 0 ? void 0 : attrValue(properties, "style:row-height");
56
58
  return {
57
- heightPt: heightValue === void 0 ? 0 : parseOdfLength(heightValue) ?? 0,
59
+ heightPt: heightValue === void 0 ? DEFAULT_ROW_HEIGHT_PT : parseOdfLength(heightValue) ?? DEFAULT_ROW_HEIGHT_PT,
58
60
  manualBreak: (properties === void 0 ? void 0 : attrValue(properties, "fo:break-before")) === "page"
59
61
  };
60
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "odf.js",
3
- "version": "2.6.7",
3
+ "version": "2.6.8",
4
4
  "description": "Type-safe, lossless round-trip conversion between OpenDocument Format packages (odt, ods, odp) and JSON, hand-written and dependency-minimal, built on Zod 4 codecs.",
5
5
  "type": "module",
6
6
  "repository": {