odf.js 3.1.0 → 4.0.1

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.
@@ -2,7 +2,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_xml_entities = require("../../xml/entities.cjs");
3
3
  const require_xml_query = require("../../xml/query.cjs");
4
4
  const require_typed_shared_metadata = require("../shared/metadata.cjs");
5
- let document_schema_js = require("document-schema.js");
6
5
  //#region src/typed/formula/read.ts
7
6
  const CONTENT_PART = "content.xml";
8
7
  const MATH_ROOT_TAGS = ["math", "math:math"];
@@ -49,7 +48,6 @@ function readOdfFormulaDocument(pkg) {
49
48
  const { mathml, starMath, metadata } = readOdfFormula(pkg);
50
49
  return {
51
50
  kind: "formula",
52
- formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
53
51
  metadata,
54
52
  formula: starMath === void 0 ? { mathml } : {
55
53
  mathml,
@@ -1,7 +1,6 @@
1
1
  import { decodeXmlText } from "../../xml/entities.js";
2
2
  import { attrValue, elementsWithTag, rootElement } from "../../xml/query.js";
3
3
  import { readOdfMetadata } from "../shared/metadata.js";
4
- import { CONTENT_FORMAT_VERSION } from "document-schema.js";
5
4
  //#region src/typed/formula/read.ts
6
5
  const CONTENT_PART = "content.xml";
7
6
  const MATH_ROOT_TAGS = ["math", "math:math"];
@@ -48,7 +47,6 @@ function readOdfFormulaDocument(pkg) {
48
47
  const { mathml, starMath, metadata } = readOdfFormula(pkg);
49
48
  return {
50
49
  kind: "formula",
51
- formatVersion: CONTENT_FORMAT_VERSION,
52
50
  metadata,
53
51
  formula: starMath === void 0 ? { mathml } : {
54
52
  mathml,
@@ -171,7 +171,6 @@ function readEmbeddedObjectDocument(reference) {
171
171
  const { metadata, sections } = require_typed_odt_read.readOdt(reference.package);
172
172
  return {
173
173
  kind: "wordprocessing",
174
- formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
175
174
  metadata,
176
175
  sections
177
176
  };
@@ -180,7 +179,6 @@ function readEmbeddedObjectDocument(reference) {
180
179
  const { metadata, slides } = require_typed_odp_read.readOdp(reference.package);
181
180
  return {
182
181
  kind: "presentation",
183
- formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
184
182
  metadata,
185
183
  slides
186
184
  };
@@ -189,7 +187,6 @@ function readEmbeddedObjectDocument(reference) {
189
187
  const { metadata, pages } = require_typed_odg_read.readOdg(reference.package);
190
188
  return {
191
189
  kind: "drawing",
192
- formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
193
190
  metadata,
194
191
  pages
195
192
  };
@@ -198,7 +195,6 @@ function readEmbeddedObjectDocument(reference) {
198
195
  const { metadata, sheets } = readOds(reference.package);
199
196
  return {
200
197
  kind: "spreadsheet",
201
- formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
202
198
  metadata,
203
199
  sheets
204
200
  };
@@ -14,7 +14,7 @@ import { readDrawObjectReference } from "../draw/embedded.js";
14
14
  import { readOdp } from "../odp/read.js";
15
15
  import { readOdt } from "../odt/read.js";
16
16
  import { readOdg } from "../odg/read.js";
17
- import { CONTENT_FORMAT_VERSION, PAGE_SIZE_A4 } from "document-schema.js";
17
+ import { PAGE_SIZE_A4 } from "document-schema.js";
18
18
  //#region src/typed/ods/read.ts
19
19
  const CONTENT_PART = "content.xml";
20
20
  function parseKnownOdfLength(value) {
@@ -170,7 +170,6 @@ function readEmbeddedObjectDocument(reference) {
170
170
  const { metadata, sections } = readOdt(reference.package);
171
171
  return {
172
172
  kind: "wordprocessing",
173
- formatVersion: CONTENT_FORMAT_VERSION,
174
173
  metadata,
175
174
  sections
176
175
  };
@@ -179,7 +178,6 @@ function readEmbeddedObjectDocument(reference) {
179
178
  const { metadata, slides } = readOdp(reference.package);
180
179
  return {
181
180
  kind: "presentation",
182
- formatVersion: CONTENT_FORMAT_VERSION,
183
181
  metadata,
184
182
  slides
185
183
  };
@@ -188,7 +186,6 @@ function readEmbeddedObjectDocument(reference) {
188
186
  const { metadata, pages } = readOdg(reference.package);
189
187
  return {
190
188
  kind: "drawing",
191
- formatVersion: CONTENT_FORMAT_VERSION,
192
189
  metadata,
193
190
  pages
194
191
  };
@@ -197,7 +194,6 @@ function readEmbeddedObjectDocument(reference) {
197
194
  const { metadata, sheets } = readOds(reference.package);
198
195
  return {
199
196
  kind: "spreadsheet",
200
- formatVersion: CONTENT_FORMAT_VERSION,
201
197
  metadata,
202
198
  sheets
203
199
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "odf.js",
3
- "version": "3.1.0",
3
+ "version": "4.0.1",
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": {
@@ -77,7 +77,7 @@
77
77
  "license": "MIT",
78
78
  "packageManager": "pnpm@11.6.0",
79
79
  "dependencies": {
80
- "document-schema.js": "^3.3.0",
80
+ "document-schema.js": "^4.1.0",
81
81
  "fast-xml-parser": "^5.10.1",
82
82
  "fflate": "^0.8.3",
83
83
  "zod": "^4.4.3"