@silurus/ooxml 0.54.0 → 0.56.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 +14 -8
- package/dist/docx-g-cBdnSQ.js +1661 -0
- package/dist/docx.mjs +2 -2
- package/dist/index.mjs +4 -4
- package/dist/math.mjs +1 -1
- package/dist/pptx-DkKGg5bQ.js +23667 -0
- package/dist/pptx.mjs +2 -2
- package/dist/src-CFPOemuW.js +6810 -0
- package/dist/types/docx.d.ts +77 -0
- package/dist/types/index.d.ts +155 -33
- package/dist/types/pptx.d.ts +43 -28
- package/dist/types/xlsx.d.ts +55 -5
- package/dist/xlsx-Bx216pgL.js +3483 -0
- package/dist/xlsx.mjs +2 -2
- package/package.json +1 -1
- package/dist/bridge-BFwyMqvY.js +0 -228
- package/dist/docx-DtI9YHuK.js +0 -1320
- package/dist/pptx-CFkdpZJb.js +0 -23527
- package/dist/preset-D4KAeT8N.js +0 -1276
- package/dist/renderer-C25pbJro.js +0 -1025
- package/dist/xlsx-Bz2w8zCX.js +0 -3445
- /package/dist/{mathjax-DWYWI9GF.js → mathjax-CNh-4Cw1.js} +0 -0
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ pptx.nextSlide();
|
|
|
61
61
|
|
|
62
62
|
### Rendering equations
|
|
63
63
|
|
|
64
|
-
OMML equations (`m:oMath` / `m:oMathPara`) in `.docx`
|
|
64
|
+
OMML equations (`m:oMath` / `m:oMathPara`) in `.docx`, `.pptx` and `.xlsx` are rendered with
|
|
65
65
|
[MathJax](https://www.mathjax.org/) + [STIX Two Math](https://github.com/stipub/stixfonts).
|
|
66
66
|
That engine is ~3 MB, so it is **opt-in**: import the `math` engine from the separate
|
|
67
67
|
`@silurus/ooxml/math` entry and pass it to the viewer. Pass it and equations render;
|
|
@@ -78,12 +78,13 @@ const docx = new DocxViewer(canvas, { math }); // ← equations now render
|
|
|
78
78
|
await docx.load('/paper-with-equations.docx');
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
The same `math` engine works for `
|
|
82
|
-
`
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
The same `math` engine works for every viewer (`DocxViewer`, `PptxViewer`,
|
|
82
|
+
`XlsxViewer`) and every headless engine (`DocxDocument`, `PptxPresentation`,
|
|
83
|
+
`XlsxWorkbook`). You inject it **once** where you create the object — the viewer
|
|
84
|
+
constructor or the `.load()` options — and every render reuses it; it is never a
|
|
85
|
+
per-render argument. (Excel stores "Insert > Equation" as OMML inside the shared
|
|
86
|
+
DrawingML `<xdr:txBody>` grammar, so `XlsxViewer` renders equations embedded in
|
|
87
|
+
shapes / text boxes the same way.)
|
|
87
88
|
|
|
88
89
|
---
|
|
89
90
|
|
|
@@ -410,7 +411,11 @@ export const PptxViewerComponent = component$<{ src: string }>(({ src }) => {
|
|
|
410
411
|
| | Table style borders / shading / banding (`tblStylePr`, `cnfStyle`, §17.4.7) | ✅ |
|
|
411
412
|
| | Table of contents (TOC field) — dot leaders, right-aligned page numbers | ✅ |
|
|
412
413
|
| | keepNext / keepLines / widowControl | ✅ |
|
|
414
|
+
| | Right-to-left text — UAX#9 bidi, `w:bidi` / `w:rtl`, complex-script formatting (`w:szCs` / `w:bCs` / `rFonts@cs`, §17.3.2.26), RTL lists and indents | ✅ |
|
|
415
|
+
| | Japanese kinsoku line breaking (`w:kinsoku`, §17.15.1.58 — 行頭/行末禁則) | ✅ |
|
|
413
416
|
| **Elements** | Tables (with borders, fills, merges, banding, alignment) | ✅ |
|
|
417
|
+
| | Table auto-layout by preferred widths (`w:tblLayout` autofit, §17.4.52; min content width) | ✅ |
|
|
418
|
+
| | Right-to-left table column order (`w:bidiVisual`, §17.4.1) | ✅ |
|
|
414
419
|
| | Math equations (OMML `m:oMath` / `m:oMathPara`, rendered via MathJax — opt-in `@silurus/ooxml/math`) | ✅ |
|
|
415
420
|
| | Images (inline and anchored, with text wrap) | ✅ |
|
|
416
421
|
| | Text boxes / drawing shapes | ✅ |
|
|
@@ -444,6 +449,7 @@ export const PptxViewerComponent = component$<{ src: string }>(({ src }) => {
|
|
|
444
449
|
| | Text wrapping | ✅ |
|
|
445
450
|
| | Number formats (`0.00`, `%`, `#,##0`, custom date/time) | ✅ |
|
|
446
451
|
| **Structure** | Merged cells | ✅ |
|
|
452
|
+
| | Right-to-left sheets (`sheetView rightToLeft`, §18.3.1.87 — mirrored grid, headers, selection, scroll) | ✅ |
|
|
447
453
|
| | Frozen panes | ✅ |
|
|
448
454
|
| | Row / column sizing (custom widths and heights) | ✅ |
|
|
449
455
|
| | Hidden rows / columns | ✅ |
|
|
@@ -532,7 +538,7 @@ export const PptxViewerComponent = component$<{ src: string }>(({ src }) => {
|
|
|
532
538
|
| | Tab stops | ✅ |
|
|
533
539
|
| | Indent / margin | ✅ |
|
|
534
540
|
| | Vertical text (`bodyPr@vert` — vert / vert270 / eaVert) | ✅ |
|
|
535
|
-
| | Right-to-left
|
|
541
|
+
| | Right-to-left text — UAX#9 bidi engine, `pPr@rtl`, RTL bullets, `bodyPr@rtlCol` column order, `tblPr@rtl` tables | ✅ |
|
|
536
542
|
| **Text — body** | Text padding (insets) | ✅ |
|
|
537
543
|
| | normAutoFit (shrink to fit) | ✅ |
|
|
538
544
|
| | spAutoFit (expand box; suppresses wrap when text fits in one line) | ✅ |
|