@shbernal/ts-pptx 3.1.0 → 3.2.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 +39 -3
- package/dist/browser.d.ts +4 -4
- package/dist/browser.js +1 -1
- package/dist/{diagnostics-PMINsVP6.d.ts → diagnostics-Chjz_4_Q.d.ts} +4 -4
- package/dist/{diagnostics-PMINsVP6.d.ts.map → diagnostics-Chjz_4_Q.d.ts.map} +1 -1
- package/dist/{errors-BeUEkNWL.d.ts → errors-BVLCFr-t.d.ts} +2 -2
- package/dist/{errors-BeUEkNWL.d.ts.map → errors-BVLCFr-t.d.ts.map} +1 -1
- package/dist/html.d.ts +3 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/inspect.d.ts +1 -1
- package/dist/inspect.js +2 -2
- package/dist/math.d.ts +1 -1
- package/dist/measure.d.ts +2 -2
- package/dist/node.d.ts +4 -4
- package/dist/node.js +1 -1
- package/dist/{pres-BgvxhQ_m.d.ts → pres-C-EU3SkN.d.ts} +2 -2
- package/dist/{pres-BgvxhQ_m.d.ts.map → pres-C-EU3SkN.d.ts.map} +1 -1
- package/dist/{presentation-BP1B8PCF.js → presentation-CxnUVhK9.js} +100 -24
- package/dist/presentation-CxnUVhK9.js.map +1 -0
- package/dist/{presentation-DyIRDKkp.d.ts → presentation-Osx1cDdJ.d.ts} +128 -31
- package/dist/presentation-Osx1cDdJ.d.ts.map +1 -0
- package/dist/read.d.ts +4 -4
- package/dist/read.js +2 -2
- package/dist/script.d.ts +32 -4
- package/dist/script.d.ts.map +1 -1
- package/dist/script.js +0 -0
- package/dist/script.js.map +1 -1
- package/dist/{shapes-DMThLsZN.js → shapes-DoJBPrwN.js} +79 -61
- package/dist/shapes-DoJBPrwN.js.map +1 -0
- package/dist/{slide-BRAtT8Dl.d.ts → slide-BTfn1Pyp.d.ts} +92 -9
- package/dist/slide-BTfn1Pyp.d.ts.map +1 -0
- package/dist/{text-B6PbMFih.js → text-C4P9MNdf.js} +157 -77
- package/dist/text-C4P9MNdf.js.map +1 -0
- package/dist/zip.d.ts +1 -1
- package/package.json +5 -2
- package/skills/ts-pptx-upstream/SKILL.md +107 -14
- package/dist/presentation-BP1B8PCF.js.map +0 -1
- package/dist/presentation-DyIRDKkp.d.ts.map +0 -1
- package/dist/shapes-DMThLsZN.js.map +0 -1
- package/dist/slide-BRAtT8Dl.d.ts.map +0 -1
- package/dist/text-B6PbMFih.js.map +0 -1
package/dist/zip.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as ZIP_OUTPUT_TYPE } from "./enums-CoXnxiCI.js";
|
|
2
|
-
import { a as TsPptxError, d as InvalidOptionErrorCode, f as MediaErrorCode, h as UnsupportedFeatureErrorCode, i as PackageReadError, l as ErrorCode, m as TsPptxCode, n as InvalidOptionError, o as TsPptxErrorOptions, p as PackageReadErrorCode, r as MediaError, s as UnsupportedFeatureError, t as InternalError, u as InternalErrorCode } from "./errors-
|
|
2
|
+
import { a as TsPptxError, d as InvalidOptionErrorCode, f as MediaErrorCode, h as UnsupportedFeatureErrorCode, i as PackageReadError, l as ErrorCode, m as TsPptxCode, n as InvalidOptionError, o as TsPptxErrorOptions, p as PackageReadErrorCode, r as MediaError, s as UnsupportedFeatureError, t as InternalError, u as InternalErrorCode } from "./errors-BVLCFr-t.js";
|
|
3
3
|
//#region src/zip.d.ts
|
|
4
4
|
declare class ZipWriter {
|
|
5
5
|
#private;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shbernal/ts-pptx",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "shbernal",
|
|
6
6
|
"url": "https://github.com/shbernal/"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"scripts": {
|
|
80
80
|
"build": "tsdown",
|
|
81
81
|
"build:dev": "tsdown --config tsdown.dev.config.ts",
|
|
82
|
-
"prepare": "node scripts/install-hooks.mjs",
|
|
82
|
+
"prepare": "node scripts/install-hooks.mjs && node scripts/ensure-dist.mjs --if-missing",
|
|
83
83
|
"start": "pnpm run watch",
|
|
84
84
|
"watch": "tsdown --watch",
|
|
85
85
|
"watch:dev": "tsdown --config tsdown.dev.config.ts --watch",
|
|
@@ -131,6 +131,9 @@
|
|
|
131
131
|
"byte-identity:baseline": "node scripts/byte-identity.mjs baseline",
|
|
132
132
|
"byte-identity:check": "node scripts/byte-identity.mjs check",
|
|
133
133
|
"prepack": "pnpm run build",
|
|
134
|
+
"version": "node scripts/sync-version.mjs --stage",
|
|
135
|
+
"version:sync": "node scripts/sync-version.mjs",
|
|
136
|
+
"version:check": "node scripts/sync-version.mjs --check",
|
|
134
137
|
"check-validator": "node tools/ooxml-validator/check-updates.js",
|
|
135
138
|
"docs:init": "node scripts/docs-init.mjs",
|
|
136
139
|
"docs:list": "node scripts/docs-list.mjs",
|
|
@@ -40,9 +40,8 @@ Not every defect throws. These are ours too, and are worth reporting:
|
|
|
40
40
|
- Output PowerPoint opens with a **repair prompt** (`0x80070570` and friends), or
|
|
41
41
|
renders differently than intended.
|
|
42
42
|
- A **round trip that loses a construct**: read a deck, write it back, something is
|
|
43
|
-
gone or changed. If the loss
|
|
44
|
-
|
|
45
|
-
fastest thing a maintainer can search on.
|
|
43
|
+
gone or changed. If the loss surfaced as a conversion fidelity note, the note has
|
|
44
|
+
already classified it for you — see below.
|
|
46
45
|
- The **read side cannot see what the write side authors** — a property ts-pptx emits
|
|
47
46
|
but has no accessor to read back. This is the strongest case a gap can make, and it
|
|
48
47
|
has its own form (see step 5).
|
|
@@ -51,6 +50,28 @@ Not every defect throws. These are ours too, and are worth reporting:
|
|
|
51
50
|
- Types that make correct code fail to compile, or admit code that throws at runtime.
|
|
52
51
|
- Documented behaviour that does not match observed behaviour.
|
|
53
52
|
|
|
53
|
+
### If you are holding a fidelity note, it already told you
|
|
54
|
+
|
|
55
|
+
Anything that converts a deck through `@shbernal/ts-pptx/script` gets `FidelityNote`s
|
|
56
|
+
back, and `cause` is the library's own verdict on whose gap the loss is. Read it
|
|
57
|
+
before deciding whether to file — it answers the same question the error table above
|
|
58
|
+
answers for the throwing cases:
|
|
59
|
+
|
|
60
|
+
| `cause` | what it means | report it? |
|
|
61
|
+
| ------------- | ---------------------------------------------------------- | ----------------------------------------------- |
|
|
62
|
+
| `unread` | nothing on the read side can see it — a missing reader | **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
|
+
| `unsupported` | OOXML, or the tier you chose, cannot express it at all | **No**. No amount of converter work closes it. |
|
|
65
|
+
|
|
66
|
+
So a `dropped`/`unread` note is a report waiting to be written, and an `unsupported`
|
|
67
|
+
one is the format's answer rather than ours. Quote `construct` (`line.width`,
|
|
68
|
+
`table.rowAuto`) verbatim: it is a stable dotted key, the form asks for it, and it is
|
|
69
|
+
the fastest thing a maintainer can search on.
|
|
70
|
+
|
|
71
|
+
One more shape worth filing: a note that fires for a construct that **did** survive.
|
|
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 — it teaches every reader to discount the notes that are true.
|
|
74
|
+
|
|
54
75
|
Two things are **out of active maintenance scope** and will usually be closed — check
|
|
55
76
|
before spending effort on a reproduction:
|
|
56
77
|
|
|
@@ -131,17 +152,32 @@ you generate, with invented values. A synthesized file is always safe to attach.
|
|
|
131
152
|
redacted one is not yours to judge — redaction fails quietly, and a public tracker is
|
|
132
153
|
permanent.
|
|
133
154
|
|
|
134
|
-
## 4. Check it is not already filed
|
|
155
|
+
## 4. Check it is not already fixed, or already filed
|
|
156
|
+
|
|
157
|
+
**Fixed first.** The version in `node_modules` is whatever the project pinned, which is
|
|
158
|
+
not necessarily the current one:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
npm view @shbernal/ts-pptx version # latest published
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
If that is ahead of the version you collected in step 2, bump the pin and re-run the
|
|
165
|
+
reproduction from step 3 before writing anything. A report against a stale version costs
|
|
166
|
+
a maintainer the same triage as a real one and ends in a close; the bump costs you one
|
|
167
|
+
command, and you were going to need it anyway once the fix shipped.
|
|
168
|
+
|
|
169
|
+
Then the tracker:
|
|
135
170
|
|
|
136
171
|
```bash
|
|
137
172
|
gh issue list --repo shbernal/ts-pptx --state all --limit 20 --search "<distinctive phrase>"
|
|
138
173
|
```
|
|
139
174
|
|
|
140
|
-
Search the error `code` (`table/invalid-border`, `oxml/node-has-no-document`)
|
|
141
|
-
distinctive part of the message — not your
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
there with your version and
|
|
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 — not your
|
|
177
|
+
description of it. Codes and construct keys are stable and searchable in a way prose is
|
|
178
|
+
not. If an open issue matches, add your reproduction as a comment instead of opening a
|
|
179
|
+
duplicate; if a closed one matches, reopen the conversation there with your version and
|
|
180
|
+
Node version — closed and unreleased is a real state, and so is closed and regressed.
|
|
145
181
|
|
|
146
182
|
## 5. Pick the form, then file it
|
|
147
183
|
|
|
@@ -175,9 +211,13 @@ tracker.
|
|
|
175
211
|
gh issue create --repo shbernal/ts-pptx \
|
|
176
212
|
--title "<InternalError|reads|writes|round-trip|types>: <one specific symptom>" \
|
|
177
213
|
--label agent-reported \
|
|
178
|
-
--body-file
|
|
214
|
+
--body-file <a path your repo ignores>/ts-pptx-report.md
|
|
179
215
|
```
|
|
180
216
|
|
|
217
|
+
Write the body somewhere the consumer's own `.gitignore` already covers — its scratch or
|
|
218
|
+
temp directory, whatever that repo calls it. A report file committed by accident is a
|
|
219
|
+
second copy of the reproduction living in someone else's history.
|
|
220
|
+
|
|
181
221
|
The web form (`agent-report.yml`) is what the error message links to; `gh` does not apply
|
|
182
222
|
issue forms, so mirror its sections in the body file so both routes land the same shape:
|
|
183
223
|
|
|
@@ -224,13 +264,60 @@ as a request. They should be able to read what you filed and close it if they di
|
|
|
224
264
|
## 6. Then, and only then, write the workaround
|
|
225
265
|
|
|
226
266
|
Filing does not unblock the user. Once the issue is open, implement the workaround in
|
|
227
|
-
this project and
|
|
228
|
-
|
|
267
|
+
this project and mark it, so that whoever bumps the pin later can find it and decide.
|
|
268
|
+
|
|
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 — it can only be
|
|
271
|
+
re-investigated, which means re-reading the issue and re-deriving the reproduction
|
|
272
|
+
someone already wrote. Write the comment so that verifying the fix is running one line:
|
|
229
273
|
|
|
230
274
|
```ts
|
|
231
|
-
// Workaround for ts-pptx#<N> —
|
|
275
|
+
// Workaround for ts-pptx#<N> — https://github.com/shbernal/ts-pptx/issues/<N>
|
|
276
|
+
//
|
|
277
|
+
// <what the library does instead, as an observable: the XML it emits, the value the
|
|
278
|
+
// accessor returns, the option it ignores.>
|
|
279
|
+
//
|
|
280
|
+
// Remove when <the exact check — an accessor returning the right value, a written part
|
|
281
|
+
// containing the right element> holds, and write <the code this becomes> instead.
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Keep `ts-pptx#` in that literal spelling wherever you mark one. It is the token that
|
|
285
|
+
makes `rg 'ts-pptx#'` list every stopgap in the project at once, and step 7 is exactly
|
|
286
|
+
the moment someone needs that list.
|
|
287
|
+
|
|
288
|
+
## 7. When the fix ships, delete the workaround
|
|
289
|
+
|
|
290
|
+
The other half of the cycle, and the half that quietly does not happen: a stopgap nobody
|
|
291
|
+
removes becomes indistinguishable from a design decision, and the next reader inherits it
|
|
292
|
+
as one. Do this in one unit of work, on the release that carries the fix.
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
npm view @shbernal/ts-pptx version # what is out
|
|
296
|
+
gh issue list --repo shbernal/ts-pptx --state closed --limit 30
|
|
297
|
+
rg 'ts-pptx#' # every stopgap here
|
|
232
298
|
```
|
|
233
299
|
|
|
300
|
+
**A closed issue is not a released fix.** A fix can sit merged and unreleased for weeks,
|
|
301
|
+
so the published version is what to check, never the issue state — the repository's
|
|
302
|
+
[`CHANGELOG.md`](https://github.com/shbernal/ts-pptx/blob/master/CHANGELOG.md) and the
|
|
303
|
+
GitHub release notes name the issue numbers each version closes. Bump the pin, reinstall,
|
|
304
|
+
and refresh the installed skill in the same commit. Then, per stopgap:
|
|
305
|
+
|
|
306
|
+
1. **Run the check its comment names.** If it does not hold, the release does not carry
|
|
307
|
+
that fix; say so on the issue rather than deleting anything.
|
|
308
|
+
2. **Delete the workaround** and write what the comment told you to write.
|
|
309
|
+
3. **Add the test the workaround was standing in for**, if the project has a layer that
|
|
310
|
+
can hold it. The stopgap was the only thing keeping the defect from being visible; a
|
|
311
|
+
deletion with nothing in its place means the same regression can return unnoticed.
|
|
312
|
+
4. **Replace the comment rather than only deleting it** where the code still looks odd
|
|
313
|
+
without it. One sentence on why the shape it has is the shape it has — *this used to
|
|
314
|
+
be X because of Y, which release Z fixed* — is the difference between a reader
|
|
315
|
+
trusting the line and re-litigating it.
|
|
316
|
+
5. **Close the loop upstream**: comment on the issue with the check that now passes, in
|
|
317
|
+
the same self-contained form as the original reproduction. A maintainer's own tests
|
|
318
|
+
say the fix works; a consumer's say it works *where it was found*, which is the thing
|
|
319
|
+
they cannot write themselves.
|
|
320
|
+
|
|
234
321
|
## If `gh` is unavailable
|
|
235
322
|
|
|
236
323
|
Print the assembled report and this URL, and ask the user to paste it in:
|
|
@@ -240,8 +327,14 @@ Print the assembled report and this URL, and ask the user to paste it in:
|
|
|
240
327
|
## Keeping this skill current
|
|
241
328
|
|
|
242
329
|
This file ships inside the package, so the copy in `node_modules` always matches the
|
|
243
|
-
installed version
|
|
330
|
+
installed version — but the copy in an agent directory is a *copy*, and a version bump
|
|
331
|
+
does not move it. Refresh it in the same commit as the bump, which is step 7's commit:
|
|
244
332
|
|
|
245
333
|
```bash
|
|
246
334
|
npx skills update ts-pptx-upstream
|
|
247
335
|
```
|
|
336
|
+
|
|
337
|
+
If that reports nothing to do but the skill is not loading, the runtime link is missing
|
|
338
|
+
rather than the file — reinstall it with the command in the package README, which names
|
|
339
|
+
the runtimes explicitly. `skills experimental_install` and `experimental_sync` restore
|
|
340
|
+
the file from the lock and create no runtime links, so neither is the repair.
|