@silurus/ooxml 0.85.2 → 0.86.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.
Files changed (56) hide show
  1. package/README.md +39 -7
  2. package/dist/assets/render-worker-BCGnuBLj.js +10 -0
  3. package/dist/assets/render-worker-CB4DxjXg.js +31 -0
  4. package/dist/assets/render-worker-CHW0F0n6.js +11 -0
  5. package/dist/{bounded-raw-part-cache-C6ro6Ezf.js → bounded-raw-part-cache-DVx3Camo.js} +12 -10
  6. package/dist/{canvas-viewer-mechanics-CDNMJ-Yz.js → canvas-viewer-mechanics-B3A7KLLi.js} +1 -1
  7. package/dist/{comment-ui-runtime-DAKBCpsM.js → comment-ui-runtime-DEtgcmj7.js} +5 -5
  8. package/dist/comment-ui-runtime-TLHustXJ.js +2 -0
  9. package/dist/{comment-ui-runtime-CAbpuWi_.js → comment-ui-runtime-ssI6IE39.js} +4 -4
  10. package/dist/{comments-Brfxa3hQ.js → comments-CAn2A_Xh.js} +1 -1
  11. package/dist/delimited-text-worker-host-DcHj_JZt.js +27 -0
  12. package/dist/{document-pull-client-BssAk95w.js → document-pull-client-xZrA2IjM.js} +3349 -3347
  13. package/dist/{docx-BY7oyoml.js → docx-DzDiGvqe.js} +67 -64
  14. package/dist/docx.mjs +5 -5
  15. package/dist/docx_parser_bg.wasm +0 -0
  16. package/dist/{dom-interaction-boundary-CDGegIB5.js → dom-interaction-boundary-DK1JLkrz.js} +2 -2
  17. package/dist/{line-metrics-BGtFM-ec.js → hyperlink-enyPbflR.js} +847 -877
  18. package/dist/index.mjs +3 -3
  19. package/dist/line-distribute-BFB575d6.js +1023 -0
  20. package/dist/line-metrics-CBbw80Ko.js +60 -0
  21. package/dist/node.mjs +91 -91
  22. package/dist/{pptx-C4z96sAA.js → pptx-D_U62nl-.js} +75 -72
  23. package/dist/pptx.mjs +5 -5
  24. package/dist/pptx_parser_bg.wasm +0 -0
  25. package/dist/{render-Dxvwes39.js → render-DSn0d35X.js} +1 -1
  26. package/dist/{render-worker-host-BAXcBGq3.js → render-worker-host-BHz9vjxB.js} +1 -1
  27. package/dist/{render-worker-host-CXTCU4PO.js → render-worker-host-CO0UYoQh.js} +1 -1
  28. package/dist/{render-worker-host-CNKQ76tu.js → render-worker-host-CbYDBg7U.js} +1 -1
  29. package/dist/{resource-measurement-D41R-0Bl.js → resource-measurement-Do07ZRcR.js} +7 -7
  30. package/dist/{session-BmP4lcEo.js → session-C1GYhr6n.js} +77 -77
  31. package/dist/{slide-pull-client-RTwQbJiy.js → slide-pull-client-DuEaUxPw.js} +1128 -1120
  32. package/dist/types/chart-ex.d.ts +2 -2
  33. package/dist/types/docx.d.ts +10 -10
  34. package/dist/types/index.d.ts +38 -18
  35. package/dist/types/math.d.ts +1 -1
  36. package/dist/types/node.d.ts +6 -5
  37. package/dist/types/pptx.d.ts +10 -10
  38. package/dist/types/region-map.d.ts +2 -2
  39. package/dist/types/three-d.d.ts +2 -2
  40. package/dist/types/tiff.d.ts +1 -1
  41. package/dist/types/xlsx.d.ts +34 -14
  42. package/dist/{worksheet-pull-client-C9sC36Vu.js → worksheet-pull-client-eDiHHEG2.js} +99 -96
  43. package/dist/{xlsx-DSU6pV1O.js → xlsx-CMHmYTHP.js} +1629 -1469
  44. package/dist/xlsx.mjs +5 -5
  45. package/dist/xlsx_parser_bg.wasm +0 -0
  46. package/package.json +1 -1
  47. package/dist/assets/render-worker-CV9Mg4j9.js +0 -10
  48. package/dist/assets/render-worker-DHP0rgcW.js +0 -24
  49. package/dist/assets/render-worker-DdvOGyrn.js +0 -11
  50. package/dist/comment-ui-runtime-DTaaZdXC.js +0 -2
  51. package/dist/line-distribute-BsV4MVZ2.js +0 -1023
  52. /package/dist/{comment-occurrence-tj54AXXB.js → comment-occurrence-Dhdplprg.js} +0 -0
  53. /package/dist/{highlight-rect-DBcYVJDv.js → highlight-rect-FuUSmL3a.js} +0 -0
  54. /package/dist/{read-only-comment-decoration-Mv_SAiHy.js → read-only-comment-decoration-BTnWEeo5.js} +0 -0
  55. /package/dist/{read-only-comment-margin-Cqu-Ir0C.js → read-only-comment-margin-plStyGfE.js} +0 -0
  56. /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 project its document to GitHub-flavoured markdown for
559
- LLM ingestion, full-text search, or diffing — headings, lists, tables, and (for
560
- docx) footnotes / comments are preserved; layout, fonts, and positioning are
561
- dropped. The projection is compiled into the parser WASM you already ship, so it
562
- adds **zero** bundle weight. `toMarkdown()` works in both `mode: 'main'` and
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 / comments collated) and `XlsxWorkbook.toMarkdown()` (each sheet →
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;