docx 9.9.0 → 9.11.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/layout.cjs CHANGED
@@ -45182,12 +45182,7 @@ var partsOfFile = (context) => {
45182
45182
  headersAndFooters: new Map([...file.Headers, ...file.Footers].map((wrapper) => [`rId${wrapper.View.ReferenceId}`, Object.values(format(wrapper))[0]])),
45183
45183
  footnotes: format(file.FootNotes),
45184
45184
  endnotes: format(file.Endnotes),
45185
- fonts: facesOf(file.FontTable.options.map(({ name, data }) => ({
45186
- name,
45187
- data,
45188
- bold: false,
45189
- italic: false
45190
- })))
45185
+ fonts: facesOf(file.FontTable.files)
45191
45186
  };
45192
45187
  };
45193
45188
  /**
@@ -45183,12 +45183,7 @@ var docxLayout = (function(exports) {
45183
45183
  headersAndFooters: new Map([...file.Headers, ...file.Footers].map((wrapper) => [`rId${wrapper.View.ReferenceId}`, Object.values(format(wrapper))[0]])),
45184
45184
  footnotes: format(file.FootNotes),
45185
45185
  endnotes: format(file.Endnotes),
45186
- fonts: facesOf(file.FontTable.options.map(({ name, data }) => ({
45187
- name,
45188
- data,
45189
- bold: false,
45190
- italic: false
45191
- })))
45186
+ fonts: facesOf(file.FontTable.files)
45192
45187
  };
45193
45188
  };
45194
45189
  /**
package/dist/layout.mjs CHANGED
@@ -45181,12 +45181,7 @@ var partsOfFile = (context) => {
45181
45181
  headersAndFooters: new Map([...file.Headers, ...file.Footers].map((wrapper) => [`rId${wrapper.View.ReferenceId}`, Object.values(format(wrapper))[0]])),
45182
45182
  footnotes: format(file.FootNotes),
45183
45183
  endnotes: format(file.Endnotes),
45184
- fonts: facesOf(file.FontTable.options.map(({ name, data }) => ({
45185
- name,
45186
- data,
45187
- bold: false,
45188
- italic: false
45189
- })))
45184
+ fonts: facesOf(file.FontTable.files)
45190
45185
  };
45191
45186
  };
45192
45187
  /**
@@ -45185,12 +45185,7 @@
45185
45185
  headersAndFooters: new Map([...file.Headers, ...file.Footers].map((wrapper) => [`rId${wrapper.View.ReferenceId}`, Object.values(format(wrapper))[0]])),
45186
45186
  footnotes: format(file.FootNotes),
45187
45187
  endnotes: format(file.Endnotes),
45188
- fonts: facesOf(file.FontTable.options.map(({ name, data }) => ({
45189
- name,
45190
- data,
45191
- bold: false,
45192
- italic: false
45193
- })))
45188
+ fonts: facesOf(file.FontTable.files)
45194
45189
  };
45195
45190
  };
45196
45191
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docx",
3
- "version": "9.9.0",
3
+ "version": "9.11.0",
4
4
  "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.cjs",
@@ -66,6 +66,16 @@
66
66
  "types": "./dist/layout.d.cts",
67
67
  "default": "./dist/layout.cjs"
68
68
  }
69
+ },
70
+ "./html": {
71
+ "import": {
72
+ "types": "./dist/html.d.ts",
73
+ "default": "./dist/html.mjs"
74
+ },
75
+ "require": {
76
+ "types": "./dist/html.d.cts",
77
+ "default": "./dist/html.cjs"
78
+ }
69
79
  }
70
80
  },
71
81
  "typesVersions": {
@@ -84,6 +94,9 @@
84
94
  ],
85
95
  "layout": [
86
96
  "./dist/layout.d.ts"
97
+ ],
98
+ "html": [
99
+ "./dist/html.d.ts"
87
100
  ]
88
101
  }
89
102
  },
@@ -91,14 +104,14 @@
91
104
  "dist"
92
105
  ],
93
106
  "scripts": {
94
- "build": "tsc && vite build && vite build --config vite.entries.config.ts --mode shapes && vite build --config vite.entries.config.ts --mode watermarks && vite build --config vite.entries.config.ts --mode charts && vite build --config vite.entries.config.ts --mode math && vite build --config vite.entries.config.ts --mode layout",
107
+ "build": "tsc && vite build && vite build --config vite.entries.config.ts --mode shapes && vite build --config vite.entries.config.ts --mode watermarks && vite build --config vite.entries.config.ts --mode charts && vite build --config vite.entries.config.ts --mode math && vite build --config vite.entries.config.ts --mode layout && vite build --config vite.entries.config.ts --mode html",
95
108
  "test": "vitest --ui --coverage",
96
109
  "test:ci": "vitest run --coverage",
97
110
  "prepublishOnly": "npm run build --omit=dev",
98
111
  "lint": "eslint --config eslint.config.ts",
99
112
  "predemo": "npm run build",
100
113
  "demo": "tsx ./demo/index.ts",
101
- "typedoc": "typedoc src/index.ts src/shapes/index.ts src/watermarks/index.ts src/charts/index.ts src/math/index.ts src/layout/index.ts --tsconfig tsconfig.typedoc.json",
114
+ "typedoc": "typedoc src/index.ts src/shapes/index.ts src/watermarks/index.ts src/charts/index.ts src/math/index.ts src/layout/index.ts src/html/index.ts --tsconfig tsconfig.typedoc.json",
102
115
  "prettier": "prettier -l \"{src,scripts,demo,docs}/**/*.{ts,html,md}\"",
103
116
  "prettier:fix": "npm run prettier -- --write",
104
117
  "cspell": "cspell \"{src,demo,docs,scripts}/**/*.{ts,scss,html,md}\" && cspell \"./*.*\"",
@@ -150,10 +163,14 @@
150
163
  "@types/xml": "^1.0.8",
151
164
  "@typescript-eslint/eslint-plugin": "^8.8.1",
152
165
  "@typescript-eslint/parser": "^8.8.1",
166
+ "@typescript/native": "npm:typescript@7.0.2",
153
167
  "@vitest/coverage-v8": "^5.0.2",
154
168
  "@vitest/ui": "^5.0.2",
155
169
  "cspell": "^10.0.0",
170
+ "css-select": "^7.0.0",
171
+ "css-what": "^8.0.0",
156
172
  "docsify-cli": "^5.0.0",
173
+ "domhandler": "^6.0.1",
157
174
  "eslint": "^10.11.0",
158
175
  "eslint-import-resolver-typescript": "^4.3.2",
159
176
  "eslint-plugin-functional": "^10.0.1",
@@ -168,14 +185,16 @@
168
185
  "inquirer": "^14.0.0",
169
186
  "jiti": "^2.3.3",
170
187
  "jsdom": "^30.1.0",
171
- "pixelmatch": "^7.2.0",
188
+ "parse5": "^8.0.1",
189
+ "parse5-htmlparser2-tree-adapter": "^8.0.1",
190
+ "pixelmatch": "^8.0.0",
172
191
  "pngjs": "^7.0.0",
173
192
  "pre-commit": "^2.0.0",
174
193
  "prettier": "^3.1.1",
175
194
  "tsconfig-paths": "^4.0.0",
176
195
  "tsx": "^4.7.0",
177
196
  "typedoc": "^0.28.2",
178
- "typescript": "5.9.3",
197
+ "typescript": "npm:@typescript/typescript6@6.0.2",
179
198
  "typescript-eslint": "^8.10.0",
180
199
  "unzipper": "^0.12.3",
181
200
  "vite": "^8.0.0",