@veripublica/epubsana-wasm 0.11.0 → 0.13.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/epubsana_wasm.d.ts +32 -1
- package/epubsana_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/epubsana_wasm.d.ts
CHANGED
|
@@ -6,7 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export interface Fix {
|
|
8
8
|
/**
|
|
9
|
-
* Index to pass to `Session.apply`.
|
|
9
|
+
* Index to pass to `Session.apply`. **0-based** — it indexes this array.
|
|
10
|
+
*
|
|
11
|
+
* The envelope\'s [`Data::index`], on a report item, is the same fix\'s
|
|
12
|
+
* **1-based** plan position, because that is the handle `epubsana --apply`
|
|
13
|
+
* takes and the two documents have to agree. Do not pass one where the
|
|
14
|
+
* other is wanted.
|
|
10
15
|
*/
|
|
11
16
|
index: number;
|
|
12
17
|
/**
|
|
@@ -96,6 +101,14 @@ export interface Item {
|
|
|
96
101
|
|
|
97
102
|
/**
|
|
98
103
|
* Per-input counts, mirroring the envelope\'s `summary`.
|
|
104
|
+
*
|
|
105
|
+
* Including its naming rule, which is written out on `epubsana::envelope::Summary`:
|
|
106
|
+
* a severity count here is **plural with a tense**, `<severity>s_before` /
|
|
107
|
+
* `<severity>s_after`. Do not follow epubveri\'s singular `summary` keys when
|
|
108
|
+
* adding one — theirs is a histogram of a single report, these are a repair
|
|
109
|
+
* run\'s delta, and mixing the two spellings inside one object is the failure
|
|
110
|
+
* that note exists to prevent. `Plan::warnings_before` is the shipped
|
|
111
|
+
* precedent.
|
|
99
112
|
*/
|
|
100
113
|
export interface Summary {
|
|
101
114
|
fatals_before: number;
|
|
@@ -141,6 +154,24 @@ export interface Plan {
|
|
|
141
154
|
* Tool-specific extras: epubsana\'s tier, and the exact edits.
|
|
142
155
|
*/
|
|
143
156
|
export interface Data {
|
|
157
|
+
/**
|
|
158
|
+
* This fix\'s **1-based** position in the plan, mirroring the CLI
|
|
159
|
+
* envelope\'s `data.index` — the selector `epubsana --apply` accepts.
|
|
160
|
+
*
|
|
161
|
+
* **Not the argument `Session.apply` takes.** That one is [`Fix::index`],
|
|
162
|
+
* which is 0-based because it indexes the `Plan.fixes` array JS already
|
|
163
|
+
* holds. The two differ on purpose: this field exists so a report saved
|
|
164
|
+
* from the browser is the *same document* a plugin gets from the CLI, and
|
|
165
|
+
* silently re-basing it would make the two disagree. Subtract one to cross
|
|
166
|
+
* between them.
|
|
167
|
+
*
|
|
168
|
+
* It was missing until 2026-08-22 — this struct is hand-written to get a
|
|
169
|
+
* TypeScript type out of Tsify rather than built on `epubsana::envelope`,
|
|
170
|
+
* so \"keep them in step\" (see the module docs) was a comment and not a
|
|
171
|
+
* mechanism. epubveri hit the identical gap in its own binding on the same
|
|
172
|
+
* day and told us to look.
|
|
173
|
+
*/
|
|
174
|
+
index: number;
|
|
144
175
|
fix_id: string;
|
|
145
176
|
tier: string;
|
|
146
177
|
changes: ChangeItem[];
|
package/epubsana_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@veripublica/epubsana-wasm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "WebAssembly bindings for epubsana — repair EPUB defects in the browser, no upload.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.13.0",
|
|
6
6
|
"license": "AGPL-3.0-only OR LicenseRef-veripublica-Commercial",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|