@silurus/ooxml 0.85.3 → 0.86.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 +39 -7
- package/dist/assets/render-worker-D21h5TGR.js +10 -0
- package/dist/assets/render-worker-Dsfekaht.js +11 -0
- package/dist/assets/render-worker-DxU7IrKo.js +31 -0
- package/dist/bounded-raw-part-cache-BfbSxRIL.js +119 -0
- package/dist/{canvas-viewer-mechanics-CDNMJ-Yz.js → canvas-viewer-mechanics-DN5SqWGS.js} +329 -192
- package/dist/{comment-ui-runtime-DAKBCpsM.js → comment-ui-runtime-DEtgcmj7.js} +5 -5
- package/dist/comment-ui-runtime-TLHustXJ.js +2 -0
- package/dist/{comment-ui-runtime-CAbpuWi_.js → comment-ui-runtime-lXwVOgjW.js} +4 -4
- package/dist/{comments-Brfxa3hQ.js → comments-CAn2A_Xh.js} +1 -1
- package/dist/delimited-text-worker-host-DcHj_JZt.js +27 -0
- package/dist/{document-pull-client-F3ox_VXK.js → document-pull-client-uopDjRde.js} +4477 -4431
- package/dist/{docx-BYvm3TWw.js → docx-wPzeF76A.js} +519 -334
- package/dist/docx.mjs +7 -7
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{dom-interaction-boundary-CDGegIB5.js → dom-interaction-boundary-CswB9Tzi.js} +60 -57
- package/dist/{line-metrics-BGtFM-ec.js → hyperlink-BR1NCO7S.js} +954 -935
- package/dist/index.mjs +4 -4
- package/dist/{line-distribute-BsV4MVZ2.js → line-distribute-IsUGfHXm.js} +10 -10
- package/dist/line-metrics-CBbw80Ko.js +60 -0
- package/dist/node.mjs +266 -266
- package/dist/{pptx-BqpVTP8p.js → pptx-BxJ_RBSY.js} +173 -165
- package/dist/pptx.mjs +5 -5
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{render-DeZpRCfx.js → render-DEiun_AH.js} +1 -1
- package/dist/{render-worker-host-BKtXmlEF.js → render-worker-host-BEfLZvSL.js} +1 -1
- package/dist/{render-worker-host-CNKQ76tu.js → render-worker-host-Ba6Fchqr.js} +1 -1
- package/dist/{render-worker-host-CBcQXsR5.js → render-worker-host-C3xwtHnv.js} +1 -1
- package/dist/{resource-measurement-D41R-0Bl.js → resource-measurement-CclArDRs.js} +10 -10
- package/dist/{session-n2p5_jxV.js → session-BuJL_xcp.js} +87 -87
- package/dist/{slide-pull-client-Dwek7xW8.js → slide-pull-client-Ck8wfRT_.js} +1239 -1165
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +10 -11
- package/dist/types/index.d.ts +38 -19
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +6 -5
- package/dist/types/pptx.d.ts +10 -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 +1 -1
- package/dist/types/xlsx.d.ts +34 -14
- package/dist/{worksheet-pull-client-C9sC36Vu.js → worksheet-pull-client-CAvuf22q.js} +72 -69
- package/dist/{xlsx-DSU6pV1O.js → xlsx-Bblm5r1h.js} +1752 -1592
- package/dist/xlsx.mjs +5 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-D1O73gYW.js +0 -10
- package/dist/assets/render-worker-DHP0rgcW.js +0 -24
- package/dist/assets/render-worker-V2wWYA4O.js +0 -11
- package/dist/bounded-raw-part-cache-C6ro6Ezf.js +0 -254
- package/dist/comment-ui-runtime-DTaaZdXC.js +0 -2
- /package/dist/{comment-occurrence-tj54AXXB.js → comment-occurrence-CqejEuts.js} +0 -0
- /package/dist/{highlight-rect-DBcYVJDv.js → highlight-rect-FuUSmL3a.js} +0 -0
- /package/dist/{read-only-comment-decoration-Mv_SAiHy.js → read-only-comment-decoration-BTnWEeo5.js} +0 -0
- /package/dist/{read-only-comment-margin-Cqu-Ir0C.js → read-only-comment-margin-plStyGfE.js} +0 -0
- /package/dist/{source-key-BkBB3X82.js → source-key-Ktb1GRE5.js} +0 -0
package/README.md
CHANGED
|
@@ -147,6 +147,29 @@ await pptx.load('/deck.pptx');
|
|
|
147
147
|
pptx.nextSlide();
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
+
`XlsxSheetViewer` also offers a deliberately small delimited-text preview convenience
|
|
151
|
+
that reuses the Excel-style sheet surface. It has the same source and ownership
|
|
152
|
+
lifecycle as XLSX loading: a string is fetched as a URL, an `ArrayBuffer` is
|
|
153
|
+
caller-owned, a successful reload replaces and disposes the previous source,
|
|
154
|
+
and `destroy()` releases the active source. There is no format auto-detection or
|
|
155
|
+
general-purpose tabular model, and `XlsxWorkbook` / `XlsxViewer` remain
|
|
156
|
+
OOXML-only. Every delimited field stays text, so leading zeroes, long identifiers,
|
|
157
|
+
dates, and `=...` values are displayed without type or formula inference.
|
|
158
|
+
This convenience covers delimiter-based text regardless of filename extension;
|
|
159
|
+
fixed-width PRN, DIF, and SYLK remain separate formats and are not parsed here.
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
const csvFile = document.querySelector('input[type=file]') as HTMLInputElement;
|
|
163
|
+
const csvBytes = await (csvFile.files?.[0] as File).arrayBuffer();
|
|
164
|
+
await sheet.load(csvBytes, { format: 'csv' });
|
|
165
|
+
|
|
166
|
+
// String sources are URLs, just like sheet.load('/workbook.xlsx').
|
|
167
|
+
await sheet.load('/export.tsv', { format: 'tsv', encoding: 'windows-1252' });
|
|
168
|
+
|
|
169
|
+
// Extensions such as .txt, .dat, and .psv do not imply one delimiter.
|
|
170
|
+
await sheet.load('/report.dat', { format: 'delimited-text', delimiter: '|' });
|
|
171
|
+
```
|
|
172
|
+
|
|
150
173
|
### Rendering equations
|
|
151
174
|
|
|
152
175
|
OMML equations (`m:oMath` / `m:oMathPara`) in `.docx`, `.pptx` and `.xlsx` are rendered with
|
|
@@ -555,11 +578,20 @@ headless engines (`mode`, `useGoogleFonts`, `resourceLimits`, the deprecated
|
|
|
555
578
|
|
|
556
579
|
### Markdown export
|
|
557
580
|
|
|
558
|
-
Every headless engine can
|
|
559
|
-
LLM ingestion, full-text search, or diffing
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
581
|
+
Every headless engine can produce a best-effort, text-focused GitHub-flavoured
|
|
582
|
+
markdown projection for LLM ingestion, full-text search, or diffing. Explicit
|
|
583
|
+
headings, lists, and tables are preserved where available, but visual layout,
|
|
584
|
+
fonts, positioning, and inferred relationships between shapes are intentionally
|
|
585
|
+
dropped. Treat the result as full-text extraction, not an authoritative semantic
|
|
586
|
+
or reading-order representation.
|
|
587
|
+
|
|
588
|
+
Review comments are kept out of the document body and collected in a final
|
|
589
|
+
`## Review comments` appendix. Comment text is quoted, replies use nested quotes,
|
|
590
|
+
and only reliable locations (such as a slide number or worksheet cell) are
|
|
591
|
+
reported. Speaker notes remain separate from review comments.
|
|
592
|
+
|
|
593
|
+
The projection is compiled into each format's existing parser WASM; there is no
|
|
594
|
+
separate markdown WASM to load. `toMarkdown()` works in both `mode: 'main'` and
|
|
563
595
|
`mode: 'worker'` (it runs off the archive opened at `load()`):
|
|
564
596
|
|
|
565
597
|
```typescript
|
|
@@ -570,8 +602,8 @@ const md = await doc.toMarkdown();
|
|
|
570
602
|
```
|
|
571
603
|
|
|
572
604
|
`PptxPresentation.toMarkdown()` (title slides → `#` headings, body → nested
|
|
573
|
-
bullets, notes
|
|
574
|
-
a `## SheetName` pipe table) are the twins.
|
|
605
|
+
bullets, speaker notes kept with their slide) and `XlsxWorkbook.toMarkdown()`
|
|
606
|
+
(each sheet → a `## SheetName` pipe table) are the twins.
|
|
575
607
|
|
|
576
608
|
The repository also contains a low-level adapter and CLI for workspace tooling.
|
|
577
609
|
They are internal implementation utilities, not separately published packages;
|