@silurus/ooxml 0.85.1 → 0.85.3
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 +3 -2
- package/dist/assets/render-worker-D1O73gYW.js +10 -0
- package/dist/assets/{render-worker-BRKOyWVH.js → render-worker-DHP0rgcW.js} +16 -16
- package/dist/assets/render-worker-V2wWYA4O.js +11 -0
- package/dist/{canvas-viewer-mechanics-CfRzOhz5.js → canvas-viewer-mechanics-CDNMJ-Yz.js} +1 -1
- package/dist/{document-pull-client-BkHHIdR4.js → document-pull-client-F3ox_VXK.js} +3505 -3494
- package/dist/{docx-_uelcAui.js → docx-BYvm3TWw.js} +21 -38
- package/dist/docx.mjs +5 -5
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-CMDDgICk.js → dom-interaction-boundary-CDGegIB5.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/line-distribute-BsV4MVZ2.js +1023 -0
- package/dist/{line-metrics-u87yCAfV.js → line-metrics-BGtFM-ec.js} +650 -607
- package/dist/node.mjs +30 -30
- package/dist/{pptx-WpBbS0mq.js → pptx-BqpVTP8p.js} +27 -24
- package/dist/pptx.mjs +6 -6
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{raster-target-whZhvVMt.js → raster-target-ojDdQizC.js} +11 -7
- package/dist/{render-DrAAZWwH.js → render-DeZpRCfx.js} +1 -1
- package/dist/{render-worker-host-XDMsyVsv.js → render-worker-host-BKtXmlEF.js} +1 -1
- package/dist/{render-worker-host-CBVe8aeD.js → render-worker-host-CBcQXsR5.js} +1 -1
- package/dist/{render-worker-host-CHlwYJdK.js → render-worker-host-CNKQ76tu.js} +1 -1
- package/dist/{resource-measurement-6uR3Huao.js → resource-measurement-D41R-0Bl.js} +4 -4
- package/dist/{session-DoPwA4gv.js → session-n2p5_jxV.js} +6 -6
- package/dist/{slide-pull-client-8i8C4VyD.js → slide-pull-client-Dwek7xW8.js} +462 -444
- package/dist/tiff.mjs +1 -1
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +8 -10
- package/dist/types/index.d.ts +12 -14
- package/dist/types/node.d.ts +5 -5
- package/dist/types/pptx.d.ts +8 -7
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/xlsx.d.ts +8 -7
- package/dist/{worksheet-pull-client-Btydoxto.js → worksheet-pull-client-C9sC36Vu.js} +20 -20
- package/dist/{xlsx-Bd16V4Xx.js → xlsx-DSU6pV1O.js} +1214 -1208
- package/dist/xlsx.mjs +6 -6
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-CtLMFj9r.js +0 -10
- package/dist/assets/render-worker-NZPOUOTU.js +0 -11
- package/dist/line-distribute-CiKeWjBF.js +0 -1023
package/README.md
CHANGED
|
@@ -1052,16 +1052,17 @@ try {
|
|
|
1052
1052
|
|
|
1053
1053
|
The report is content-free by construction: it does not include source URLs, filenames, package paths, document text, passwords, or raw error messages. It still contains document-derived sizes, counts, and timings, so applications remain responsible for consent, retention, and telemetry policy. The initial browser callback covers the underlying document/workbook/presentation factory and does not wait for a Viewer's first canvas paint; use `getResourceMetrics()` for the latest observed package counters. Bounded Node sessions accept both `onResourceMetrics` and `debug`. DOCX/PPTX report successful terminal metrics when their one-pass stream completes or the session is explicitly closed; XLSX reports success when the reusable workbook session is explicitly closed. Open-time and session-operation failures report immediately.
|
|
1054
1054
|
|
|
1055
|
-
Image decoding uses a separate adaptive resource policy shared by all three formats.
|
|
1055
|
+
Image decoding uses a separate adaptive resource policy shared by all three formats. Ordinary browser-decodable rasters are assigned a geometry-weighted share of the default 128 MiB decoded budget before source extraction. Each source can then flow directly from extraction to decode: it keeps native resolution when it fits its share and otherwise uses up to a 2x canvas/DPR grid when that share has headroom, avoiding visibly soft 1x intermediates for small placed artwork. If the complete set of display grids itself exceeds the budget, adaptive mode reduces them by one uniform quality ratio. This avoids an all-paint inspection barrier without making display-sized downsampling the default. Natural-size consumers, pixel effects that require the authored grid, and formats that cannot be decoder-resized remain on their guarded format-specific paths under the hard surface ceilings. Image-bearing paints for the same loaded document are serialized so overlapping paints cannot each consume the full budget, while the admitted paint still runs up to two decodes concurrently. Applications with a known environment can override the aggregate budget on Viewer or per-render options:
|
|
1056
1056
|
```ts
|
|
1057
1057
|
new PptxViewer(canvas, {
|
|
1058
1058
|
imageResources: {
|
|
1059
1059
|
decodedByteBudget: 256 * 1024 * 1024,
|
|
1060
1060
|
strategy: 'adaptive', // or 'strict' to reject instead of reducing quality
|
|
1061
|
+
resolution: 'native-if-fit', // or 'display' to minimize retained pixels
|
|
1061
1062
|
},
|
|
1062
1063
|
});
|
|
1063
1064
|
```
|
|
1064
|
-
`decodedByteBudget` accepts a positive safe integer from 4 bytes through 512 MiB. This configures planned and retained decoded RGBA ownership; it does not measure browser decoder intermediates or disable the encoded-source, per-axis, or per-surface hard safety ceilings. A strict aggregate crossing or any hard-ceiling crossing rejects with `OoxmlDecodedImageLimitError` (`code === 'ooxml-decoded-image-limit'`) instead of silently omitting the image.
|
|
1065
|
+
`resolution` defaults to `'native-if-fit'`. Use `'display'` when minimizing retained raster pixels is more important than preserving source-resolution sampling. `decodedByteBudget` accepts a positive safe integer from 4 bytes through 512 MiB. This configures planned and retained decoded RGBA ownership; it does not measure browser decoder intermediates or disable the encoded-source, per-axis, or per-surface hard safety ceilings. A strict aggregate crossing or any hard-ceiling crossing rejects with `OoxmlDecodedImageLimitError` (`code === 'ooxml-decoded-image-limit'`) instead of silently omitting the image.
|
|
1065
1066
|
|
|
1066
1067
|
The package counters and raster-image guards are deterministic admission limits, not exact JavaScript/WASM process-memory accounting. XML trees, document models, canvas backing stores, browser decoder overhead, renderer state, and browser-managed SVG/vector parse or decoded storage can still require several times the measured input. SVG has no portable decoded-byte measure or explicit browser release primitive; the library count-bounds its cache and revokes owned object URLs, but cannot charge it as RGBA bytes. The defaults therefore reduce risk but cannot promise that an OOM is impossible on every device. Running parse and render work in `mode: 'worker'` can contain many failures away from the main UI thread, but a Worker is not a separate operating-system process or a strict memory sandbox.
|
|
1067
1068
|
|