ooxml.js 2.2.5 → 2.3.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.cjs CHANGED
@@ -2032,8 +2032,8 @@ function rangeReference(range) {
2032
2032
  }
2033
2033
  //#endregion
2034
2034
  //#region src/typed/xlsx/defined-names.ts
2035
- const PRINT_AREA_NAME = "_xlnm.Print_Area";
2036
- const PRINT_TITLES_NAME = "_xlnm.Print_Titles";
2035
+ const XLNM_PRINT_AREA = "_xlnm.Print_Area";
2036
+ const XLNM_PRINT_TITLES = "_xlnm.Print_Titles";
2037
2037
  function readDefinedNamesBySheet(pkg) {
2038
2038
  const map = /* @__PURE__ */ new Map();
2039
2039
  const workbook = rootElement(pkg.parts["xl/workbook.xml"]);
@@ -2044,12 +2044,12 @@ function readDefinedNamesBySheet(pkg) {
2044
2044
  const name = attr(definedName, "name");
2045
2045
  const localSheetIdRaw = attr(definedName, "localSheetId");
2046
2046
  if (name === void 0 || localSheetIdRaw === void 0) continue;
2047
- if (name !== PRINT_AREA_NAME && name !== PRINT_TITLES_NAME) continue;
2047
+ if (name !== "_xlnm.Print_Area" && name !== "_xlnm.Print_Titles") continue;
2048
2048
  const sheetIndex = Number.parseInt(localSheetIdRaw, 10);
2049
2049
  if (!Number.isInteger(sheetIndex) || sheetIndex < 0) continue;
2050
2050
  const value = textContent(definedName);
2051
2051
  const existing = map.get(sheetIndex) ?? {};
2052
- if (name === PRINT_AREA_NAME) existing.printArea = value;
2052
+ if (name === "_xlnm.Print_Area") existing.printArea = value;
2053
2053
  else existing.printTitles = value;
2054
2054
  map.set(sheetIndex, existing);
2055
2055
  }
@@ -2110,8 +2110,6 @@ function buildPrintTitlesValue(sheetName, repeatRows, repeatColumns) {
2110
2110
  if (repeatRows !== void 0) segments.push(`${quotedName}!$${repeatRows.start + 1}:$${repeatRows.end + 1}`);
2111
2111
  return segments.length > 0 ? segments.join(",") : void 0;
2112
2112
  }
2113
- const XLNM_PRINT_AREA = PRINT_AREA_NAME;
2114
- const XLNM_PRINT_TITLES = PRINT_TITLES_NAME;
2115
2113
  //#endregion
2116
2114
  //#region src/typed/xlsx/util.ts
2117
2115
  function readXmlBool(value) {
package/dist/index.js CHANGED
@@ -2031,8 +2031,8 @@ function rangeReference(range) {
2031
2031
  }
2032
2032
  //#endregion
2033
2033
  //#region src/typed/xlsx/defined-names.ts
2034
- const PRINT_AREA_NAME = "_xlnm.Print_Area";
2035
- const PRINT_TITLES_NAME = "_xlnm.Print_Titles";
2034
+ const XLNM_PRINT_AREA = "_xlnm.Print_Area";
2035
+ const XLNM_PRINT_TITLES = "_xlnm.Print_Titles";
2036
2036
  function readDefinedNamesBySheet(pkg) {
2037
2037
  const map = /* @__PURE__ */ new Map();
2038
2038
  const workbook = rootElement(pkg.parts["xl/workbook.xml"]);
@@ -2043,12 +2043,12 @@ function readDefinedNamesBySheet(pkg) {
2043
2043
  const name = attr(definedName, "name");
2044
2044
  const localSheetIdRaw = attr(definedName, "localSheetId");
2045
2045
  if (name === void 0 || localSheetIdRaw === void 0) continue;
2046
- if (name !== PRINT_AREA_NAME && name !== PRINT_TITLES_NAME) continue;
2046
+ if (name !== "_xlnm.Print_Area" && name !== "_xlnm.Print_Titles") continue;
2047
2047
  const sheetIndex = Number.parseInt(localSheetIdRaw, 10);
2048
2048
  if (!Number.isInteger(sheetIndex) || sheetIndex < 0) continue;
2049
2049
  const value = textContent(definedName);
2050
2050
  const existing = map.get(sheetIndex) ?? {};
2051
- if (name === PRINT_AREA_NAME) existing.printArea = value;
2051
+ if (name === "_xlnm.Print_Area") existing.printArea = value;
2052
2052
  else existing.printTitles = value;
2053
2053
  map.set(sheetIndex, existing);
2054
2054
  }
@@ -2109,8 +2109,6 @@ function buildPrintTitlesValue(sheetName, repeatRows, repeatColumns) {
2109
2109
  if (repeatRows !== void 0) segments.push(`${quotedName}!$${repeatRows.start + 1}:$${repeatRows.end + 1}`);
2110
2110
  return segments.length > 0 ? segments.join(",") : void 0;
2111
2111
  }
2112
- const XLNM_PRINT_AREA = PRINT_AREA_NAME;
2113
- const XLNM_PRINT_TITLES = PRINT_TITLES_NAME;
2114
2112
  //#endregion
2115
2113
  //#region src/typed/xlsx/util.ts
2116
2114
  function readXmlBool(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ooxml.js",
3
- "version": "2.2.5",
3
+ "version": "2.3.0",
4
4
  "description": "Type-safe, lossless round-trip conversion between OOXML packages (docx, pptx, xlsx) and JSON, built on Zod 4 codecs.",
5
5
  "type": "module",
6
6
  "repository": {