pptx-ts 3.7.0 → 4.0.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/README.md +116 -269
- package/dist/autopage-odPz7zZO.js +536 -0
- package/dist/autopage-odPz7zZO.js.map +1 -0
- package/dist/binary-string-CKVAYI3M.js +24 -0
- package/dist/binary-string-CKVAYI3M.js.map +1 -0
- package/dist/body-insets-Dw_BeWD_.js +54 -0
- package/dist/body-insets-Dw_BeWD_.js.map +1 -0
- package/dist/browser.d.ts +29 -9
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +41 -14
- package/dist/browser.js.map +1 -1
- package/dist/clip-Bl01BPcN.d.ts +67 -0
- package/dist/clip-Bl01BPcN.d.ts.map +1 -0
- package/dist/diagnostics-D8ot4Ei7.d.ts +244 -0
- package/dist/diagnostics-D8ot4Ei7.d.ts.map +1 -0
- package/dist/embedded-fonts-DarT9aoa.d.ts +20 -0
- package/dist/embedded-fonts-DarT9aoa.d.ts.map +1 -0
- package/dist/entry-compose-DCnvBZz2.d.ts +1046 -0
- package/dist/entry-compose-DCnvBZz2.d.ts.map +1 -0
- package/dist/{enums-CvRYniUA.d.ts → enums-BUKTUB6V.d.ts} +21 -13
- package/dist/{enums-CvRYniUA.d.ts.map → enums-BUKTUB6V.d.ts.map} +1 -1
- package/dist/{errors-Bvln0H-7.js → errors-C4oENPcu.js} +92 -2
- package/dist/errors-C4oENPcu.js.map +1 -0
- package/dist/families.d.ts +260 -0
- package/dist/families.d.ts.map +1 -0
- package/dist/families.js +57 -0
- package/dist/families.js.map +1 -0
- package/dist/{fit-BKs0zxMI.js → fit-Cb7naFj6.js} +249 -167
- package/dist/fit-Cb7naFj6.js.map +1 -0
- package/dist/font-metrics-v5fn7s7e.d.ts +613 -0
- package/dist/font-metrics-v5fn7s7e.d.ts.map +1 -0
- package/dist/grid-DikTjFey.js +187 -0
- package/dist/grid-DikTjFey.js.map +1 -0
- package/dist/{html-dom-B0I0QSbU.js → html-dom-Iuog2wdK.js} +121 -91
- package/dist/html-dom-Iuog2wdK.js.map +1 -0
- package/dist/html.d.ts +6 -6
- package/dist/html.d.ts.map +1 -1
- package/dist/html.js +7 -6
- package/dist/html.js.map +1 -1
- package/dist/image-size-CvN2iCA4.js +1611 -0
- package/dist/image-size-CvN2iCA4.js.map +1 -0
- package/dist/index.d.ts +24 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -11
- package/dist/index.js.map +1 -1
- package/dist/inspect.d.ts +40 -31
- package/dist/inspect.d.ts.map +1 -1
- package/dist/inspect.js +40 -48
- package/dist/inspect.js.map +1 -1
- package/dist/math.d.ts +7 -5
- package/dist/math.d.ts.map +1 -1
- package/dist/math.js +16 -7
- package/dist/math.js.map +1 -1
- package/dist/measure.d.ts +12 -225
- package/dist/measure.d.ts.map +1 -1
- package/dist/measure.js +3 -3
- package/dist/node.d.ts +22 -8
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +27 -7
- package/dist/node.js.map +1 -1
- package/dist/notes-Dh12JAbn.js +3264 -0
- package/dist/notes-Dh12JAbn.js.map +1 -0
- package/dist/options-internal-WqgMf720.js +43 -0
- package/dist/options-internal-WqgMf720.js.map +1 -0
- package/dist/{package-CaOLXSNi.d.ts → package-J49Ck6S2.d.ts} +27 -12
- package/dist/package-J49Ck6S2.d.ts.map +1 -0
- package/dist/playbtn-CUqQdoDf.js +22 -0
- package/dist/playbtn-CUqQdoDf.js.map +1 -0
- package/dist/{slide-ZqAdVvHV.d.ts → pres-C6qgOFAa.d.ts} +1021 -1423
- package/dist/pres-C6qgOFAa.d.ts.map +1 -0
- package/dist/{presentation-DrJtj3-C.js → presentation-DGYlAWhl.js} +3208 -2727
- package/dist/presentation-DGYlAWhl.js.map +1 -0
- package/dist/{presentation-types-CDjScsev.d.ts → presentation-types-8jLQHI4M.d.ts} +1070 -683
- package/dist/presentation-types-8jLQHI4M.d.ts.map +1 -0
- package/dist/read.d.ts +9 -9
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +4 -4
- package/dist/script.d.ts +80 -66
- package/dist/script.d.ts.map +1 -1
- package/dist/script.js +2399 -1139
- package/dist/script.js.map +1 -1
- package/dist/{shapes-BemroU-z.js → shapes-re0KyQk_.js} +2807 -1609
- package/dist/shapes-re0KyQk_.js.map +1 -0
- package/dist/slide-Dx2ZeVZ6.d.ts +1256 -0
- package/dist/slide-Dx2ZeVZ6.d.ts.map +1 -0
- package/dist/slide-size-BalTjFuv.js +88 -0
- package/dist/slide-size-BalTjFuv.js.map +1 -0
- package/dist/{units-internal-Dg95w_YD.js → table-cell-margins-EVg0EwxT.js} +235 -273
- package/dist/table-cell-margins-EVg0EwxT.js.map +1 -0
- package/dist/table-dom-BTDP3lEP.js +21 -0
- package/dist/table-dom-BTDP3lEP.js.map +1 -0
- package/dist/text-KnLOtEEu.js +3980 -0
- package/dist/text-KnLOtEEu.js.map +1 -0
- package/dist/text-anchor-CrYXAfUu.js +176 -0
- package/dist/text-anchor-CrYXAfUu.js.map +1 -0
- package/dist/transition-speed-kUEWDWTx.js +14 -0
- package/dist/transition-speed-kUEWDWTx.js.map +1 -0
- package/dist/units-internal-XJlf-hOl.js +649 -0
- package/dist/units-internal-XJlf-hOl.js.map +1 -0
- package/dist/zip-C0leZZMj.d.ts +67 -0
- package/dist/zip-C0leZZMj.d.ts.map +1 -0
- package/dist/zip-CKd8ihcf.js +177 -0
- package/dist/zip-CKd8ihcf.js.map +1 -0
- package/dist/zip.d.ts +3 -68
- package/dist/zip.js +3 -163
- package/dist/zoom-cX9sllpH.js +8865 -0
- package/dist/zoom-cX9sllpH.js.map +1 -0
- package/package.json +106 -19
- package/skills/ts-pptx-upstream/SKILL.md +58 -57
- package/dist/autopage-DkjYZUFD.js +0 -423
- package/dist/autopage-DkjYZUFD.js.map +0 -1
- package/dist/diagnostics-DfBdDHre.d.ts +0 -829
- package/dist/diagnostics-DfBdDHre.d.ts.map +0 -1
- package/dist/errors-Bvln0H-7.js.map +0 -1
- package/dist/errors-PflMPWBn.d.ts +0 -182
- package/dist/errors-PflMPWBn.d.ts.map +0 -1
- package/dist/fit-BKs0zxMI.js.map +0 -1
- package/dist/html-dom-B0I0QSbU.js.map +0 -1
- package/dist/namespaces-BVnNu7sg.js +0 -666
- package/dist/namespaces-BVnNu7sg.js.map +0 -1
- package/dist/notes-CJFJaG6M.js +0 -1724
- package/dist/notes-CJFJaG6M.js.map +0 -1
- package/dist/package-CaOLXSNi.d.ts.map +0 -1
- package/dist/pres-BcBR3CSM.d.ts +0 -202
- package/dist/pres-BcBR3CSM.d.ts.map +0 -1
- package/dist/presentation-DrJtj3-C.js.map +0 -1
- package/dist/presentation-types-CDjScsev.d.ts.map +0 -1
- package/dist/shapes-BemroU-z.js.map +0 -1
- package/dist/slide-ZqAdVvHV.d.ts.map +0 -1
- package/dist/text-B8SLEaZx.js +0 -11327
- package/dist/text-B8SLEaZx.js.map +0 -1
- package/dist/units-1kRzYShk.js +0 -231
- package/dist/units-1kRzYShk.js.map +0 -1
- package/dist/units-internal-Dg95w_YD.js.map +0 -1
- package/dist/zip.d.ts.map +0 -1
- package/dist/zip.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pptx-ts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "shbernal",
|
|
6
6
|
"url": "https://github.com/shbernal/"
|
|
7
7
|
},
|
|
8
8
|
"description": "Create PowerPoint presentations (.pptx) from TypeScript and modern JavaScript",
|
|
9
|
-
"homepage": "https://github.
|
|
9
|
+
"homepage": "https://shbernal.github.io/ts-pptx/",
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"packageManager": "pnpm@
|
|
11
|
+
"packageManager": "pnpm@12.3.4",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=24"
|
|
@@ -57,6 +57,10 @@
|
|
|
57
57
|
"types": "./dist/html.d.ts",
|
|
58
58
|
"default": "./dist/html.js"
|
|
59
59
|
},
|
|
60
|
+
"./families": {
|
|
61
|
+
"types": "./dist/families.d.ts",
|
|
62
|
+
"default": "./dist/families.js"
|
|
63
|
+
},
|
|
60
64
|
"./node": {
|
|
61
65
|
"types": "./dist/node.d.ts",
|
|
62
66
|
"node": "./dist/node.js",
|
|
@@ -76,6 +80,88 @@
|
|
|
76
80
|
"skills"
|
|
77
81
|
],
|
|
78
82
|
"types": "./dist/index.d.ts",
|
|
83
|
+
"scripts": {
|
|
84
|
+
"build": "tsdown",
|
|
85
|
+
"prepare": "node scripts/install-hooks.mjs && node scripts/ensure-dist.mjs --if-missing",
|
|
86
|
+
"start": "pnpm run watch",
|
|
87
|
+
"watch": "tsdown --watch",
|
|
88
|
+
"watch:dev": "tsdown --config tsdown.dev.config.ts --watch",
|
|
89
|
+
"ensure-dist": "node scripts/ensure-dist.mjs",
|
|
90
|
+
"verify": "node scripts/run-steps.mjs ensure-dist check:core test",
|
|
91
|
+
"verify:full": "node scripts/run-steps.mjs verify docs:build script:roundtrip:all package:lint test:package bundle-size:check bundle-tier:check",
|
|
92
|
+
"check:static": "node scripts/run-steps.mjs ensure-dist lint lint:chars format:check check:core",
|
|
93
|
+
"check:core": "node scripts/run-steps.mjs typecheck typecheck:scripts typecheck:test typecheck:site raw-xml:check ooxml-literals:check path-refs:check docs:check comparison:check",
|
|
94
|
+
"check:package": "node scripts/run-steps.mjs ensure-dist package:lint test:package bundle-size:check bundle-tier:check",
|
|
95
|
+
"test": "pnpm run ensure-dist && vitest run",
|
|
96
|
+
"test:unit": "pnpm run ensure-dist && vitest run test/regression",
|
|
97
|
+
"test:schema": "pnpm run ensure-dist && vitest run test/schema-validation.test.js",
|
|
98
|
+
"schema:versions": "pnpm run ensure-dist && node scripts/ooxml-version-probe.mjs",
|
|
99
|
+
"test:read": "pnpm run ensure-dist && vitest run test/read",
|
|
100
|
+
"test:oracles": "pnpm run ensure-dist && node scripts/font-oracle-probe.mjs && vitest run test/read/autofit-calibration-oracle.test.js test/read/cjk-line-breaking-oracle.test.js test/read/font-metrics-sidecar.test.js",
|
|
101
|
+
"font-metrics:build": "pnpm run ensure-dist && node test/read/fixtures/authoring/build-font-metrics.mjs",
|
|
102
|
+
"test:read:emit": "pnpm run ensure-dist && node scripts/read-emit-roundtrip.mjs",
|
|
103
|
+
"test:read:emit:edits": "pnpm run ensure-dist && node scripts/read-emit-edits.mjs",
|
|
104
|
+
"read:census": "pnpm run ensure-dist && node scripts/read-blindness-census.mjs",
|
|
105
|
+
"exports:reach": "pnpm run ensure-dist && node scripts/export-reach.mjs",
|
|
106
|
+
"read:append-ceiling": "pnpm run ensure-dist && node scripts/append-ceiling.mjs",
|
|
107
|
+
"script:roundtrip": "pnpm run ensure-dist && node scripts/script-roundtrip.mjs",
|
|
108
|
+
"script:roundtrip:a": "pnpm run ensure-dist && node scripts/script-roundtrip.mjs --tier a",
|
|
109
|
+
"script:roundtrip:all": "pnpm run script:roundtrip && pnpm run script:roundtrip:a",
|
|
110
|
+
"script:census": "pnpm run ensure-dist && node scripts/note-census.mjs",
|
|
111
|
+
"test:watch": "vitest --watch test/regression",
|
|
112
|
+
"test:coverage": "pnpm run ensure-dist && vitest run --coverage",
|
|
113
|
+
"coverage:probe": "pnpm run ensure-dist && vitest run --coverage --coverage.reportsDirectory=coverage/probe --coverage.reporter=json --coverage.reporter=json-summary --coverage.reporter=text-summary --coverage.thresholds.statements=0 --coverage.thresholds.branches=0 --coverage.thresholds.functions=0 --coverage.thresholds.lines=0",
|
|
114
|
+
"coverage:merge": "node scripts/coverage-merge.mjs",
|
|
115
|
+
"coverage:gate": "pnpm run coverage:merge && node scripts/coverage-gate.mjs",
|
|
116
|
+
"test:package": "node scripts/package-smoke.mjs",
|
|
117
|
+
"test:browser": "pnpm run docs:build && playwright test",
|
|
118
|
+
"demos:build": "pnpm run ensure-dist && pnpm --dir demos/showcases run build",
|
|
119
|
+
"test:com": "pnpm run ensure-dist && node scripts/powerpoint-com-smoke.mjs",
|
|
120
|
+
"test:lo": "pnpm run ensure-dist && node scripts/libreoffice-render-smoke.mjs",
|
|
121
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
122
|
+
"typecheck:scripts": "tsc -p tsconfig.scripts.json --noEmit",
|
|
123
|
+
"typecheck:test": "tsc -p tsconfig.test.json --noEmit",
|
|
124
|
+
"typecheck:site": "tsc -p docs/tsconfig.json --noEmit",
|
|
125
|
+
"lint": "oxlint . --deny-warnings --report-unused-disable-directives",
|
|
126
|
+
"lint:chars": "charcheck --max-warnings 0",
|
|
127
|
+
"lint:chars:fix": "charcheck --fix --max-warnings 0",
|
|
128
|
+
"format:run": "oxfmt \"src/**/*.ts\" package.json tools/api-docs/package.json .oxfmtrc.jsonc pnpm-workspace.yaml typedoc.docs.json tsconfig.base.json tsconfig.json tsconfig.scripts.json tsconfig.test.json docs/tsconfig.json docs/.vitepress/config.mts \"docs/.vitepress/theme/**/*.ts\" \"www/**/*.ts\" .oxlintrc.jsonc charcheck.config.js tsdown.config.ts tsdown.dev.config.ts vitest.config.ts playwright.config.ts \"scripts/**/*.mjs\" \"test/**/*.mjs\" \"test/**/*.js\" \".github/**/*.yml\"",
|
|
129
|
+
"format": "pnpm run format:run --write",
|
|
130
|
+
"format:check": "pnpm run format:run --check",
|
|
131
|
+
"package:lint": "node scripts/package-lint.mjs",
|
|
132
|
+
"bundle-size:check": "pnpm run ensure-dist && node scripts/bundle-size-ratchet.mjs",
|
|
133
|
+
"bundle-size:freeze": "pnpm run ensure-dist && node scripts/bundle-size-ratchet.mjs --freeze",
|
|
134
|
+
"bundle-size:list": "pnpm run ensure-dist && node scripts/bundle-size-ratchet.mjs --list",
|
|
135
|
+
"bundle-tier:check": "pnpm run ensure-dist && node scripts/bundle-tier-size.mjs",
|
|
136
|
+
"bundle-tier:freeze": "pnpm run ensure-dist && node scripts/bundle-tier-size.mjs --freeze",
|
|
137
|
+
"bundle-tier:list": "pnpm run ensure-dist && node scripts/bundle-tier-size.mjs --list",
|
|
138
|
+
"raw-xml:check": "node scripts/raw-xml-ratchet.mjs",
|
|
139
|
+
"ooxml-literals:check": "node scripts/ooxml-literal-gate.mjs",
|
|
140
|
+
"raw-xml:freeze": "node scripts/raw-xml-ratchet.mjs --freeze",
|
|
141
|
+
"raw-xml:list": "node scripts/raw-xml-ratchet.mjs --list",
|
|
142
|
+
"path-refs:check": "node scripts/path-refs.mjs",
|
|
143
|
+
"path-refs:list": "node scripts/path-refs.mjs --list",
|
|
144
|
+
"media:playbtn": "node scripts/gen-playbtn.mjs",
|
|
145
|
+
"byte-identity:baseline": "node scripts/byte-identity.mjs baseline",
|
|
146
|
+
"byte-identity:check": "node scripts/byte-identity.mjs check",
|
|
147
|
+
"prepack": "pnpm run build",
|
|
148
|
+
"version": "node scripts/sync-version.mjs --stage",
|
|
149
|
+
"version:sync": "node scripts/sync-version.mjs",
|
|
150
|
+
"version:check": "node scripts/sync-version.mjs --check",
|
|
151
|
+
"comparison:measure": "pnpm run ensure-dist && node scripts/comparison/measure.mjs",
|
|
152
|
+
"comparison:render": "node scripts/comparison/render.mjs",
|
|
153
|
+
"comparison:check": "node scripts/comparison/render.mjs --check",
|
|
154
|
+
"docs:list": "node scripts/docs-list.mjs",
|
|
155
|
+
"docs:new": "node scripts/docs-new.mjs",
|
|
156
|
+
"docs:api": "node scripts/docs-api.mjs",
|
|
157
|
+
"docs:llms": "node scripts/generate-llms-docs.mjs",
|
|
158
|
+
"docs:index": "node scripts/docs-index.mjs",
|
|
159
|
+
"docs:check": "pnpm run docs:api && pnpm run docs:index && node scripts/docs-check.mjs",
|
|
160
|
+
"docs:prepare": "pnpm run docs:api && pnpm run docs:index && pnpm run docs:llms",
|
|
161
|
+
"docs:dev": "pnpm run ensure-dist && pnpm run docs:prepare && vitepress dev docs",
|
|
162
|
+
"docs:build": "pnpm run ensure-dist && pnpm run docs:prepare && node scripts/docs-check.mjs && vitepress build docs && node scripts/docs-check.mjs --dist",
|
|
163
|
+
"docs:preview": "vitepress preview docs"
|
|
164
|
+
},
|
|
79
165
|
"dependencies": {
|
|
80
166
|
"@xmldom/xmldom": "^0.9.12",
|
|
81
167
|
"fflate": "^0.8.3",
|
|
@@ -98,39 +184,40 @@
|
|
|
98
184
|
},
|
|
99
185
|
"devDependencies": {
|
|
100
186
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
101
|
-
"@playwright/test": "^1.
|
|
187
|
+
"@playwright/test": "^1.63.0",
|
|
102
188
|
"@types/istanbul-lib-coverage": "^2.0.6",
|
|
103
189
|
"@types/istanbul-lib-report": "^3.0.3",
|
|
104
190
|
"@types/istanbul-reports": "^3.0.4",
|
|
105
|
-
"@types/node": "^26.
|
|
191
|
+
"@types/node": "^26.6.1",
|
|
106
192
|
"@types/opentype.js": "^1.3.10",
|
|
107
|
-
"@vitest/coverage-v8": "^
|
|
108
|
-
"@vue/compiler-sfc": "^3.5.
|
|
109
|
-
"ast-v8-to-istanbul": "^1.0.
|
|
110
|
-
"charcheck": "0.
|
|
193
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
194
|
+
"@vue/compiler-sfc": "^3.5.42",
|
|
195
|
+
"ast-v8-to-istanbul": "^1.0.6",
|
|
196
|
+
"charcheck": "0.4.0",
|
|
111
197
|
"esbuild": "^0.28.2",
|
|
112
|
-
"happy-dom": "^20.
|
|
198
|
+
"happy-dom": "^20.14.5",
|
|
113
199
|
"istanbul-lib-coverage": "^3.2.2",
|
|
114
200
|
"istanbul-lib-report": "^3.0.1",
|
|
115
201
|
"istanbul-reports": "^3.2.0",
|
|
116
|
-
"jszip": "^3.10.
|
|
117
|
-
"lefthook": "^2.1.
|
|
202
|
+
"jszip": "^3.10.2",
|
|
203
|
+
"lefthook": "^2.1.14",
|
|
118
204
|
"mathml2omml": "^0.5.0",
|
|
205
|
+
"mermaid": "^12.0.0",
|
|
119
206
|
"micromark": "^4.0.2",
|
|
120
207
|
"ooxml-validate": "^0.0.3",
|
|
121
|
-
"oxfmt": "^0.
|
|
122
|
-
"oxlint": "^1.
|
|
208
|
+
"oxfmt": "^0.68.0",
|
|
209
|
+
"oxlint": "^1.83.0",
|
|
123
210
|
"oxlint-tsgolint": "7.0.2001",
|
|
124
|
-
"pptx-html": "^0.
|
|
211
|
+
"pptx-html": "^0.2.0",
|
|
125
212
|
"publint": "^0.3.24",
|
|
126
|
-
"temml": "^0.13.
|
|
213
|
+
"temml": "^0.13.5",
|
|
127
214
|
"ts-pptx-demos-showcases": "workspace:*",
|
|
128
|
-
"tsdown": "^0.
|
|
215
|
+
"tsdown": "^0.23.0",
|
|
129
216
|
"typescript": "^7.0.2",
|
|
130
217
|
"typescript-6": "npm:typescript@6.0.3",
|
|
131
218
|
"vitepress": "^1.6.4",
|
|
132
|
-
"vitest": "^
|
|
133
|
-
"vue": "^3.5.
|
|
219
|
+
"vitest": "^5.0.1",
|
|
220
|
+
"vue": "^3.5.42"
|
|
134
221
|
},
|
|
135
222
|
"repository": {
|
|
136
223
|
"type": "git",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ts-pptx-upstream
|
|
3
|
-
description: Report a ts-pptx (
|
|
3
|
+
description: Report a ts-pptx (pptx-ts) bug, gap, or wrong output to its GitHub tracker from a project that depends on it. Use when ts-pptx throws an InternalError or an error whose message points at the issue tracker, when it cannot read a .pptx that opens cleanly in PowerPoint, when it writes a deck PowerPoint repairs or renders wrong, when a construct does not survive a round trip, when its types block correct code, or whenever you are about to write a workaround for ts-pptx behaving incorrectly. Filing the bug is the fix; the workaround is the stopgap.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Reporting a ts-pptx problem upstream
|
|
7
7
|
|
|
8
|
-
You are in a project that *uses*
|
|
8
|
+
You are in a project that *uses* `pptx-ts`, not the project that builds it.
|
|
9
9
|
This skill is how a defect you hit here becomes a permanent regression test there.
|
|
10
10
|
|
|
11
11
|
The library's maintainers turn reports with a minimal reproduction into fixtures and
|
|
12
|
-
regression cases, which is the only
|
|
13
|
-
|
|
12
|
+
regression cases, which is the only way to guarantee the bug never comes back. A report
|
|
13
|
+
without a reproduction is a wish; a report with one is a fix.
|
|
14
14
|
|
|
15
15
|
**The single most valuable thing you can do is reduce the failure to a script that
|
|
16
16
|
builds its own deck.** Everything below is in service of that.
|
|
@@ -18,8 +18,8 @@ builds its own deck.** Everything below is in service of that.
|
|
|
18
18
|
## 1. Decide whether it is actually ours
|
|
19
19
|
|
|
20
20
|
Every failure ts-pptx raises is a `TsPptxError` in one of five classes, and the class
|
|
21
|
-
already answers *whose problem is this*. Catch it and read `err.name` and `err.code
|
|
22
|
-
|
|
21
|
+
already answers *whose problem is this*. Catch it and read `err.name` and `err.code`.
|
|
22
|
+
`code` is a stable `area/condition` string and is API; the message is not, so never
|
|
23
23
|
branch on its wording.
|
|
24
24
|
|
|
25
25
|
| class | whose bug | report it? |
|
|
@@ -41,10 +41,10 @@ Not every defect throws. These are ours too, and are worth reporting:
|
|
|
41
41
|
renders differently than intended.
|
|
42
42
|
- A **round trip that loses a construct**: read a deck, write it back, something is
|
|
43
43
|
gone or changed. If the loss surfaced as a conversion fidelity note, the note has
|
|
44
|
-
already classified it for you
|
|
45
|
-
- The **read side cannot see what the write side authors
|
|
46
|
-
but has no accessor to read back. This is the strongest case a gap can make, and
|
|
47
|
-
has its own form (see step 5).
|
|
44
|
+
already classified it for you. See below.
|
|
45
|
+
- The **read side cannot see what the write side authors**: ts-pptx emits the property
|
|
46
|
+
but has no accessor to read it back. This is the strongest case a gap can make, and
|
|
47
|
+
it has its own form (see step 5).
|
|
48
48
|
- A `Diagnostic` that fires when it should not, does not fire when it should, or
|
|
49
49
|
carries the wrong `code`.
|
|
50
50
|
- Types that make correct code fail to compile, or admit code that throws at runtime.
|
|
@@ -52,15 +52,15 @@ Not every defect throws. These are ours too, and are worth reporting:
|
|
|
52
52
|
|
|
53
53
|
### If you are holding a fidelity note, it already told you
|
|
54
54
|
|
|
55
|
-
Anything that converts a deck through
|
|
55
|
+
Anything that converts a deck through `pptx-ts/script` gets `FidelityNote`s
|
|
56
56
|
back, and `cause` is the library's own verdict on whose gap the loss is. Read it
|
|
57
|
-
before deciding whether to file
|
|
57
|
+
before deciding whether to file. It answers the same question the error table above
|
|
58
58
|
answers for the throwing cases:
|
|
59
59
|
|
|
60
|
-
| `cause` | what it means | report it?
|
|
61
|
-
| ------------- | ---------------------------------------------------------- |
|
|
62
|
-
| `unread` | nothing on the read side can see it
|
|
63
|
-
| `unwritable` | it is read fine, but no write option can author it back | **Yes
|
|
60
|
+
| `cause` | what it means | report it? |
|
|
61
|
+
| ------------- | ---------------------------------------------------------- | ------------------------------------------------ |
|
|
62
|
+
| `unread` | nothing on the read side can see it, so no reader exists | **Yes**, and `api-gap.yml` is its form. |
|
|
63
|
+
| `unwritable` | it is read fine, but no write option can author it back | **Yes**. A missing option is a gap, not a limit. |
|
|
64
64
|
| `unsupported` | OOXML, or the tier you chose, cannot express it at all | **No**. No amount of converter work closes it. |
|
|
65
65
|
|
|
66
66
|
So a `dropped`/`unread` note is a report waiting to be written, and an `unsupported`
|
|
@@ -70,9 +70,9 @@ the fastest thing a maintainer can search on.
|
|
|
70
70
|
|
|
71
71
|
One more shape worth filing: a note that fires for a construct that **did** survive.
|
|
72
72
|
A declared loss that does not happen is a stale note, and it is a defect in the same
|
|
73
|
-
way a missing one is
|
|
73
|
+
way a missing one is. It teaches every reader to discount the notes that are true.
|
|
74
74
|
|
|
75
|
-
Two things are **out of active maintenance scope** and will usually be closed
|
|
75
|
+
Two things are **out of active maintenance scope** and will usually be closed. Check
|
|
76
76
|
before spending effort on a reproduction:
|
|
77
77
|
|
|
78
78
|
- Live-DOM / browser-layout features, i.e. anything whose answer comes from a
|
|
@@ -86,17 +86,17 @@ Issues and pull requests in those two areas are still welcome; just say so in th
|
|
|
86
86
|
report so nobody triages it as a regression.
|
|
87
87
|
|
|
88
88
|
Also: ts-pptx is **ESM, Node-first**. Reports about `require()`, a CJS build, or an
|
|
89
|
-
IIFE/global browser bundle will be closed
|
|
89
|
+
IIFE/global browser bundle will be closed. Those are deliberately not supported.
|
|
90
90
|
|
|
91
91
|
## 2. Collect the facts
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
node -p "require('
|
|
95
|
-
node -v
|
|
94
|
+
node -p "require('pptx-ts/package.json').version" # exact installed version
|
|
95
|
+
node -v # runtime (>=24 required)
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
Capture, verbatim: `err.name`, `err.code`, the full message, `err.detail` if present,
|
|
99
|
-
and the stack. Do not paraphrase the message
|
|
99
|
+
and the stack. Do not paraphrase the message. The throw site is often identifiable
|
|
100
100
|
from its exact text, and `detail` is the structured context the site chose to attach.
|
|
101
101
|
|
|
102
102
|
If the failure is about how the file *renders* or whether PowerPoint repairs it, note
|
|
@@ -108,14 +108,14 @@ for a render report it is load-bearing.
|
|
|
108
108
|
**Never attach or paste the user's deck.** A presentation in a real project carries
|
|
109
109
|
client names, unreleased strategy, pricing, and internal logos. Treat every `.pptx`
|
|
110
110
|
in this repo as confidential unless the user tells you otherwise, and never upload one
|
|
111
|
-
to a public tracker
|
|
111
|
+
to a public tracker, not even "just a screenshot of the slide". This is the same rule
|
|
112
112
|
the project already applies to its own filings: describe a downstream consumer's need
|
|
113
113
|
anonymously, never its name, its deck or client names, or a path from its tree.
|
|
114
114
|
|
|
115
115
|
Instead, write a self-contained script that *constructs* its input and fails:
|
|
116
116
|
|
|
117
117
|
```ts
|
|
118
|
-
import TsPptx from '
|
|
118
|
+
import TsPptx from 'pptx-ts'
|
|
119
119
|
|
|
120
120
|
// build the smallest deck that shows the problem
|
|
121
121
|
const pptx = new TsPptx()
|
|
@@ -130,7 +130,7 @@ For a read-side or round-trip defect, generate the input with the write side fir
|
|
|
130
130
|
the script still owns everything it touches:
|
|
131
131
|
|
|
132
132
|
```ts
|
|
133
|
-
import { Presentation } from '
|
|
133
|
+
import { Presentation } from 'pptx-ts/read'
|
|
134
134
|
|
|
135
135
|
const pres = await Presentation.load(bytes) // bytes built above, not the user's file
|
|
136
136
|
// ...the accessor that returns the wrong thing, or throws
|
|
@@ -141,7 +141,7 @@ after each cut, until removing anything more makes the failure disappear. What i
|
|
|
141
141
|
is the report.
|
|
142
142
|
|
|
143
143
|
If the failure only reproduces with a *specific deck* you cannot share, do not ask for
|
|
144
|
-
permission to share it
|
|
144
|
+
permission to share it. File without the file. Say exactly that in the report and
|
|
145
145
|
describe the structural feature you believe is responsible (a grouped shape, a chart
|
|
146
146
|
part, a custom table style, a particular namespace prefix, a layout inherited from a
|
|
147
147
|
master). A maintainer can usually author a fixture from that description in PowerPoint;
|
|
@@ -149,7 +149,7 @@ they can never unsee an attachment.
|
|
|
149
149
|
|
|
150
150
|
If you need a file attached, build one: reproduce the *structure* you suspect in a deck
|
|
151
151
|
you generate, with invented values. A synthesized file is always safe to attach. A
|
|
152
|
-
redacted one is not yours to judge
|
|
152
|
+
redacted one is not yours to judge. Redaction fails quietly, and a public tracker is
|
|
153
153
|
permanent.
|
|
154
154
|
|
|
155
155
|
## 4. Check it is not already fixed, or already filed
|
|
@@ -158,7 +158,7 @@ permanent.
|
|
|
158
158
|
not necessarily the current one:
|
|
159
159
|
|
|
160
160
|
```bash
|
|
161
|
-
npm view
|
|
161
|
+
npm view pptx-ts version # latest published
|
|
162
162
|
```
|
|
163
163
|
|
|
164
164
|
If that is ahead of the version you collected in step 2, bump the pin and re-run the
|
|
@@ -173,11 +173,11 @@ gh issue list --repo shbernal/ts-pptx --state all --limit 20 --search "<distinct
|
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
Search the error `code` (`table/invalid-border`, `oxml/node-has-no-document`), the
|
|
176
|
-
fidelity note's `construct` key, or the distinctive part of the message
|
|
176
|
+
fidelity note's `construct` key, or the distinctive part of the message, not your
|
|
177
177
|
description of it. Codes and construct keys are stable and searchable in a way prose is
|
|
178
178
|
not. If an open issue matches, add your reproduction as a comment instead of opening a
|
|
179
179
|
duplicate; if a closed one matches, reopen the conversation there with your version and
|
|
180
|
-
Node version
|
|
180
|
+
Node version. Closed and unreleased is a real state, and so is closed and regressed.
|
|
181
181
|
|
|
182
182
|
## 5. Pick the form, then file it
|
|
183
183
|
|
|
@@ -189,21 +189,21 @@ A bug that is never filed because the moment passed costs everyone, permanently.
|
|
|
189
189
|
|
|
190
190
|
This rests entirely on step 3 holding: the reproduction constructs its own input, and no
|
|
191
191
|
file from this project is attached. When you cannot manage a self-contained reproduction,
|
|
192
|
-
the answer is a thinner report
|
|
192
|
+
the answer is a thinner report, the prose description from step 3. Not a question, and
|
|
193
193
|
not an attachment.
|
|
194
194
|
|
|
195
195
|
Three forms; pick by what you are reporting:
|
|
196
196
|
|
|
197
197
|
| form | for |
|
|
198
198
|
| ------------------ | ------------------------------------------------------------------------- |
|
|
199
|
-
| `agent-report.yml` | you hit this while using the library in another project
|
|
199
|
+
| `agent-report.yml` | you hit this while using the library in another project. Start here. |
|
|
200
200
|
| `bug.yml` | wrong output, a repair prompt, a regression, a fidelity limit |
|
|
201
201
|
| `api-gap.yml` | the OOXML carries it but no accessor reaches it |
|
|
202
202
|
|
|
203
|
-
If none fits, file a blank issue rather than bending one of them
|
|
203
|
+
If none fits, file a blank issue rather than bending one of them. Blank issues are
|
|
204
204
|
enabled deliberately.
|
|
205
205
|
|
|
206
|
-
`gh` defaults to the *current* repository
|
|
206
|
+
`gh` defaults to the *current* repository, which here is the consumer's, not ts-pptx's.
|
|
207
207
|
Always pass `--repo shbernal/ts-pptx` explicitly, or you will file the bug into the wrong
|
|
208
208
|
tracker.
|
|
209
209
|
|
|
@@ -214,7 +214,7 @@ gh issue create --repo shbernal/ts-pptx \
|
|
|
214
214
|
--body-file <a path your repo ignores>/ts-pptx-report.md
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
-
Write the body somewhere the consumer's own `.gitignore` already covers
|
|
217
|
+
Write the body somewhere the consumer's own `.gitignore` already covers: its scratch or
|
|
218
218
|
temp directory, whatever that repo calls it. A report file committed by accident is a
|
|
219
219
|
second copy of the reproduction living in someone else's history.
|
|
220
220
|
|
|
@@ -235,13 +235,13 @@ issue forms, so mirror its sections in the body file so both routes land the sam
|
|
|
235
235
|
<only if the report depends on how PowerPoint renders or repairs the file>
|
|
236
236
|
|
|
237
237
|
### Error class and code
|
|
238
|
-
<InternalError / oxml/node-has-no-document> (or:
|
|
238
|
+
<InternalError / oxml/node-has-no-document> (or: nothing threw, the output is wrong)
|
|
239
239
|
|
|
240
240
|
### What happened
|
|
241
241
|
<observed>
|
|
242
242
|
|
|
243
243
|
### What should have happened
|
|
244
|
-
<expected, and why you believe that
|
|
244
|
+
<expected, and why you believe that: an ECMA-376 clause, what PowerPoint itself does
|
|
245
245
|
with the same input, or what the docs promise>
|
|
246
246
|
|
|
247
247
|
### Minimal reproduction
|
|
@@ -255,10 +255,10 @@ with the same input, or what the docs promise>
|
|
|
255
255
|
```
|
|
256
256
|
|
|
257
257
|
### Attached file
|
|
258
|
-
<none / synthesized
|
|
258
|
+
<none / synthesized, and how it was generated>
|
|
259
259
|
````
|
|
260
260
|
|
|
261
|
-
Tell the user the issue number and URL once it exists
|
|
261
|
+
Tell the user the issue number and URL once it exists. After the fact, as a result, not
|
|
262
262
|
as a request. They should be able to read what you filed and close it if they disagree.
|
|
263
263
|
|
|
264
264
|
## 6. Then, and only then, write the workaround
|
|
@@ -267,18 +267,18 @@ Filing does not unblock the user. Once the issue is open, implement the workarou
|
|
|
267
267
|
this project and mark it, so that whoever bumps the pin later can find it and decide.
|
|
268
268
|
|
|
269
269
|
An issue number alone is not enough of a mark. `remove once fixed upstream` does not say
|
|
270
|
-
what *fixed* looks like, so at bump time it cannot be checked
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
what *fixed* looks like, so at bump time it cannot be checked, only re-investigated,
|
|
271
|
+
which means re-reading the issue and re-deriving the reproduction someone already wrote.
|
|
272
|
+
Write the comment so that verifying the fix is running one line:
|
|
273
273
|
|
|
274
274
|
```ts
|
|
275
|
-
// Workaround for ts-pptx#<N
|
|
275
|
+
// Workaround for ts-pptx#<N>: https://github.com/shbernal/ts-pptx/issues/<N>
|
|
276
276
|
//
|
|
277
277
|
// <what the library does instead, as an observable: the XML it emits, the value the
|
|
278
278
|
// accessor returns, the option it ignores.>
|
|
279
279
|
//
|
|
280
|
-
// Remove when <the exact check
|
|
281
|
-
// containing the right element> holds, and write <the code this becomes> instead.
|
|
280
|
+
// Remove when <the exact check: an accessor returning the right value, or a written
|
|
281
|
+
// part containing the right element> holds, and write <the code this becomes> instead.
|
|
282
282
|
```
|
|
283
283
|
|
|
284
284
|
Keep `ts-pptx#` in that literal spelling wherever you mark one. It is the token that
|
|
@@ -287,18 +287,19 @@ the moment someone needs that list.
|
|
|
287
287
|
|
|
288
288
|
## 7. When the fix ships, delete the workaround
|
|
289
289
|
|
|
290
|
-
|
|
291
|
-
removes becomes indistinguishable from a design decision, and the next
|
|
292
|
-
as one. Do this in one unit of work, on the release that carries the
|
|
290
|
+
This is the other half of the cycle, and the half that quietly does not happen. A
|
|
291
|
+
stopgap nobody removes becomes indistinguishable from a design decision, and the next
|
|
292
|
+
reader inherits it as one. Do this in one unit of work, on the release that carries the
|
|
293
|
+
fix.
|
|
293
294
|
|
|
294
295
|
```bash
|
|
295
|
-
npm view
|
|
296
|
+
npm view pptx-ts version # what is out
|
|
296
297
|
gh issue list --repo shbernal/ts-pptx --state closed --limit 30
|
|
297
|
-
rg 'ts-pptx#'
|
|
298
|
+
rg 'ts-pptx#' # every stopgap here
|
|
298
299
|
```
|
|
299
300
|
|
|
300
301
|
**A closed issue is not a released fix.** A fix can sit merged and unreleased for weeks,
|
|
301
|
-
so the published version
|
|
302
|
+
so check the published version, never the issue state. The repository's
|
|
302
303
|
[`CHANGELOG.md`](https://github.com/shbernal/ts-pptx/blob/master/CHANGELOG.md) and the
|
|
303
304
|
GitHub release notes name the issue numbers each version closes. Bump the pin, reinstall,
|
|
304
305
|
and refresh the installed skill in the same commit. Then, per stopgap:
|
|
@@ -310,9 +311,9 @@ and refresh the installed skill in the same commit. Then, per stopgap:
|
|
|
310
311
|
can hold it. The stopgap was the only thing keeping the defect from being visible; a
|
|
311
312
|
deletion with nothing in its place means the same regression can return unnoticed.
|
|
312
313
|
4. **Replace the comment rather than only deleting it** where the code still looks odd
|
|
313
|
-
without it.
|
|
314
|
-
be X because of Y, which release Z fixed
|
|
315
|
-
trusting the line and re-litigating it.
|
|
314
|
+
without it. Say in one sentence why the shape it has is the shape it has. *This used
|
|
315
|
+
to be X because of Y, which release Z fixed.* That sentence is the difference between
|
|
316
|
+
a reader trusting the line and re-litigating it.
|
|
316
317
|
5. **Close the loop upstream**: comment on the issue with the check that now passes, in
|
|
317
318
|
the same self-contained form as the original reproduction. A maintainer's own tests
|
|
318
319
|
say the fix works; a consumer's say it works *where it was found*, which is the thing
|
|
@@ -327,14 +328,14 @@ Print the assembled report and this URL, and ask the user to paste it in:
|
|
|
327
328
|
## Keeping this skill current
|
|
328
329
|
|
|
329
330
|
This file ships inside the package, so the copy in `node_modules` always matches the
|
|
330
|
-
installed version
|
|
331
|
-
|
|
331
|
+
installed version. The copy in an agent directory is a *copy*, and a version bump does
|
|
332
|
+
not move it. Refresh it in the same commit as the bump, which is step 7's commit:
|
|
332
333
|
|
|
333
334
|
```bash
|
|
334
335
|
npx skills update ts-pptx-upstream
|
|
335
336
|
```
|
|
336
337
|
|
|
337
338
|
If that reports nothing to do but the skill is not loading, the runtime link is missing
|
|
338
|
-
rather than the file
|
|
339
|
+
rather than the file. Reinstall it with the command in the package README, which names
|
|
339
340
|
the runtimes explicitly. `skills experimental_install` and `experimental_sync` restore
|
|
340
341
|
the file from the lock and create no runtime links, so neither is the repair.
|