@silurus/ooxml 0.83.2 → 0.84.1
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 +23 -6
- package/dist/assets/render-worker-BWPpayBu.js +10 -0
- package/dist/assets/render-worker-CiEWCh_T.js +11 -0
- package/dist/assets/render-worker-Cpmy3GDF.js +24 -0
- package/dist/{canvas-viewer-mechanics-DVGK-fLT.js → canvas-viewer-mechanics-CIfhCgYA.js} +1 -1
- package/dist/chart-ex.mjs +4 -4
- package/dist/{comment-ui-runtime-DD5a3x3k.js → comment-ui-runtime-C5qimVMD.js} +5 -5
- package/dist/{comment-ui-runtime-BelHJt73.js → comment-ui-runtime-CdMMApEN.js} +5 -5
- package/dist/comment-ui-runtime-aPzHfV_A.js +2 -0
- package/dist/{comments-AAaNnQTi.js → comments-BAlAyIhb.js} +1 -1
- package/dist/{document-pull-client-DSx36ZsB.js → document-pull-client-BXw6AAhY.js} +2409 -2390
- package/dist/{docx-DojUJSZd.js → docx-BA1vB0V-.js} +16 -14
- package/dist/docx.mjs +5 -5
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-CepOlXt6.js → dom-interaction-boundary-DS6BVyHA.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-D7A_wnJg.js → line-distribute-MqInuujx.js} +2 -2
- package/dist/{line-metrics-Bpn7OeZD.js → line-metrics-CXyjyYd5.js} +34 -32
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +9 -9
- package/dist/{plot-area-frame-DHV02PJU.js → plot-area-frame-DuXZzovH.js} +623 -663
- package/dist/{pptx-Wh22eziy.js → pptx-C17oBD8Z.js} +17 -15
- package/dist/pptx.mjs +5 -5
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/region-map.mjs +2 -2
- package/dist/{render-DtbFbO5c.js → render-CVeGktZG.js} +1 -1
- package/dist/{render-worker-host-CmPBviYJ.js → render-worker-host-BWdhjVH_.js} +1 -1
- package/dist/{render-worker-host-DCLyw6UR.js → render-worker-host-BbhwA24Y.js} +1 -1
- package/dist/{render-worker-host-D1jcACJV.js → render-worker-host-CbaQivE7.js} +1 -1
- package/dist/{renderer-CYr9YTXM.js → renderer-Bmky2yBc.js} +3 -3
- package/dist/{renderer-module-contract-DLbb7zY0.js → renderer-module-contract-C6sYZvTV.js} +4 -3
- package/dist/{resource-measurement-DuiFWzam.js → resource-measurement-esyGbzAF.js} +2 -2
- package/dist/{session-CxT-t0BX.js → session-Cl0RVnMs.js} +3 -3
- package/dist/{slide-pull-client-B9rcJdO4.js → slide-pull-client-BS0EeZo2.js} +113 -107
- package/dist/{three-d-7MaVzQuZ.js → three-d-B7LsKeOS.js} +128 -127
- package/dist/three-d.mjs +4 -4
- package/dist/tiff-contract-Xjn3qXqK.js +69 -0
- package/dist/tiff.mjs +124 -0
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +17 -10
- package/dist/types/index.d.ts +26 -16
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +5 -5
- package/dist/types/pptx.d.ts +18 -10
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/tiff.d.ts +9 -0
- package/dist/types/xlsx.d.ts +17 -10
- package/dist/{worksheet-pull-client-DyFsDF4A.js → worksheet-pull-client-B0zfEVau.js} +3 -3
- package/dist/{xlsx-C3beLfwZ.js → xlsx-FyKAiNo-.js} +54 -49
- package/dist/xlsx.mjs +5 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +7 -1
- package/dist/assets/render-worker-4GSYWsM3.js +0 -11
- package/dist/assets/render-worker-DwFpY197.js +0 -10
- package/dist/assets/render-worker-Dw_wQRIh.js +0 -24
- package/dist/comment-ui-runtime-DTGN3Vyy.js +0 -2
- /package/dist/{comment-occurrence-X54si2ob.js → comment-occurrence-C34fWs_F.js} +0 -0
- /package/dist/{highlight-rect-Hes0z_Mj.js → highlight-rect-MaCt0om0.js} +0 -0
- /package/dist/{mathjax-DwIrafQ6.js → mathjax-DPEX346v.js} +0 -0
- /package/dist/{read-only-comment-decoration-DcFevX_Q.js → read-only-comment-decoration-BYCXoSdC.js} +0 -0
- /package/dist/{read-only-comment-margin-DrUX-YrP.js → read-only-comment-margin-C7b3l0ro.js} +0 -0
- /package/dist/{source-key-BklvnEyQ.js → source-key-DORuuFb-.js} +0 -0
- /package/dist/{transfer-R6NjgBKD.js → transfer-vNOFQuvv.js} +0 -0
- /package/dist/{units-BzZ0gAxs.js → units-EJdC96r6.js} +0 -0
- /package/dist/{visible-index-BFE3PWiY.js → visible-index-DwJzuGmJ.js} +0 -0
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ pnpm add @silurus/ooxml
|
|
|
76
76
|
> format-specific application graph. See the current production measurements on
|
|
77
77
|
> the stable [Bundle size](https://ooxml.silurus.dev/bundle-size/) page. Import
|
|
78
78
|
> only the format and optional renderer entries your application needs. In main
|
|
79
|
-
> mode, MathJax, ChartEx, 3-D
|
|
79
|
+
> mode, MathJax, ChartEx, 3-D, Region Map and TIFF implementations remain outside the
|
|
80
80
|
> graph unless imported; the separately loaded worker asset is self-contained.
|
|
81
81
|
|
|
82
82
|
---
|
|
@@ -176,17 +176,19 @@ per-render argument. (Excel stores "Insert > Equation" as OMML inside the shared
|
|
|
176
176
|
DrawingML `<xdr:txBody>` grammar, so `XlsxViewer` renders equations embedded in
|
|
177
177
|
shapes / text boxes the same way.)
|
|
178
178
|
|
|
179
|
-
### Optional
|
|
179
|
+
### Optional rendering modules
|
|
180
180
|
|
|
181
181
|
Classic DrawingML 2-D chart families are included in every format entry.
|
|
182
182
|
Microsoft ChartEx, model-space 3-D charts and offline country-level Region Maps
|
|
183
|
-
are separate entries.
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
are separate entries. TIFF decoding is also a separate entry shared by DOCX,
|
|
184
|
+
XLSX and PPTX. Inject the modules once in the same load options object as
|
|
185
|
+
`math`; omitting one keeps its main-mode implementation out of the ordinary
|
|
186
|
+
format graph. The built-in modules work in both main and worker modes. Without `chartEx`,
|
|
186
187
|
ChartEx families show the standard unsupported-chart placeholder. Without
|
|
187
188
|
`threeD`, 3-D chart groups
|
|
188
189
|
fall back to their canonical 2-D family. Without `regionMap`, Region Maps show
|
|
189
|
-
the standard unsupported-chart placeholder.
|
|
190
|
+
the standard unsupported-chart placeholder. Without `tiff`, TIFF images are
|
|
191
|
+
skipped while the surrounding document continues to render. The code-size boundary applies to
|
|
190
192
|
the default main-mode application graph. The separately loaded render-worker
|
|
191
193
|
asset stays self-contained for broad bundler compatibility and therefore
|
|
192
194
|
contains its built-in optional renderer implementations.
|
|
@@ -196,12 +198,14 @@ import { XlsxViewer } from '@silurus/ooxml/xlsx';
|
|
|
196
198
|
import { threeD } from '@silurus/ooxml/three-d';
|
|
197
199
|
import { regionMap } from '@silurus/ooxml/region-map';
|
|
198
200
|
import { chartEx } from '@silurus/ooxml/chart-ex';
|
|
201
|
+
import { tiff } from '@silurus/ooxml/tiff';
|
|
199
202
|
|
|
200
203
|
const container = document.getElementById('xlsx-container') as HTMLElement;
|
|
201
204
|
const workbookViewer = new XlsxViewer(container, {
|
|
202
205
|
threeD,
|
|
203
206
|
regionMap,
|
|
204
207
|
chartEx,
|
|
208
|
+
tiff,
|
|
205
209
|
mode: 'worker',
|
|
206
210
|
});
|
|
207
211
|
await workbookViewer.load('/workbook-with-advanced-charts.xlsx');
|
|
@@ -215,6 +219,16 @@ represent safely. The specification/Office evidence boundary for automatic
|
|
|
215
219
|
chart behavior is documented in
|
|
216
220
|
[Chart compatibility evidence and scope](docs/chart-compatibility-evidence.md).
|
|
217
221
|
|
|
222
|
+
The initial TIFF codec accepts uncompressed, 8-bit, chunky process-CMYK TIFF
|
|
223
|
+
6.0 images. Other TIFF classes fail closed without aborting the surrounding
|
|
224
|
+
document render. It is not a general-purpose TIFF library, but as a small
|
|
225
|
+
by-product the same `tiff.render()` method can provide a simple preview of a
|
|
226
|
+
supported standalone TIFF file. Try Yours and the VS Code extension enable
|
|
227
|
+
every first-party optional module; library applications can choose only the entries they need.
|
|
228
|
+
See [Production decisions](https://ooxml.silurus.dev/production/) for the full
|
|
229
|
+
module list and [Bundle size](https://ooxml.silurus.dev/bundle-size/) for current
|
|
230
|
+
measurements.
|
|
231
|
+
|
|
218
232
|
### Off-main-thread rendering
|
|
219
233
|
|
|
220
234
|
By default the headless engines parse in a worker but render on the main thread.
|
|
@@ -673,6 +687,7 @@ file without uploading it.
|
|
|
673
687
|
| | ChartEx (waterfall / histogram / Pareto / funnel / box & whisker / treemap / sunburst) | ✅ opt-in |
|
|
674
688
|
| | Math equations (OMML `m:oMath` / `m:oMathPara`, rendered via MathJax — opt-in `@silurus/ooxml/math`) | ✅ |
|
|
675
689
|
| | Images (inline and anchored, with text wrap) | ✅ |
|
|
690
|
+
| | TIFF images (opt-in `@silurus/ooxml/tiff`; uncompressed 8-bit process-CMYK) | ✅ |
|
|
676
691
|
| | SVG images (`asvg:svgBlip` MS-2016 extension — vector drawn from the embedded `.svg`, raster fallback) | ✅ |
|
|
677
692
|
| | Text boxes / drawing shapes (inline and anchored `wps:wsp` / `wps:txbx`, including solid, gradient, and image fills; `a:prstGeom` — 186 preset geometries via the shared engine; connector arrow heads `headEnd` / `tailEnd` (§20.1.8.3) and `prstDash` dash patterns (§20.1.8.48)). Text-box paragraphs run through the **same line-layout engine as body text**, so kinsoku 行頭/行末禁則 (§17.15.1.58–60), UAX#9 bidi (`w:bidi`, §17.3.1.6), justification (§17.18.44) and tab stops (§17.3.1.37) all apply inside a box | ✅ |
|
|
678
693
|
| | WMF **and EMF** metafile images (legacy vector, incl. inside text boxes) — rasterized via a built-in player: window→viewport mapping (MS-EMF map modes, world transform), pens/brushes, poly/rect/ellipse, text-out, path clipping, and embedded DIB blits | ✅ |
|
|
@@ -726,6 +741,7 @@ file without uploading it.
|
|
|
726
741
|
| | Hidden rows / columns | ✅ |
|
|
727
742
|
| | Row / column outline grouping (`outlineLevel` / `collapsed` §18.3.1.73 / .13, `<outlinePr>` — gutter brackets, +/− collapse, numbered level buttons; view-only) | ✅ |
|
|
728
743
|
| **Elements** | Images (`<xdr:twoCellAnchor>`) | ✅ |
|
|
744
|
+
| | TIFF images (opt-in `@silurus/ooxml/tiff`; uncompressed 8-bit process-CMYK) | ✅ |
|
|
729
745
|
| | OLE embedded objects (`<oleObjects>` — the legacy VML `v:imagedata` preview keyed by `oleObject@shapeId` is drawn; an image-typed `objectPr` target is preferred when present, and the embedded app is not run) | ✅ |
|
|
730
746
|
| | SVG images (`asvg:svgBlip` MS-2016 extension — vector drawn from the embedded `.svg`, raster fallback) | ✅ |
|
|
731
747
|
| | Drawing shapes / text boxes (`xdr:sp`, `xdr:txBody` — 186 preset geometries via the shared engine, with `avLst` adjust handles) | ✅ |
|
|
@@ -773,6 +789,7 @@ file without uploading it.
|
|
|
773
789
|
| | Animations / transitions | ❌ Not planned |
|
|
774
790
|
| **Element types** | Shapes (`sp`) | ✅ |
|
|
775
791
|
| | Pictures (`pic`) | ✅ |
|
|
792
|
+
| | TIFF images (opt-in `@silurus/ooxml/tiff`; uncompressed 8-bit process-CMYK) | ✅ |
|
|
776
793
|
| | SVG images (`asvg:svgBlip` MS-2016 extension — vector drawn from the embedded `.svg`, PNG fallback) | ✅ |
|
|
777
794
|
| | Groups (`grpSp`) with nested transforms | ✅ |
|
|
778
795
|
| | Connectors (`cxnSp`) | ✅ |
|