@silurus/ooxml 0.34.0 → 0.36.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 CHANGED
@@ -386,7 +386,8 @@ export const PptxViewerComponent = component$<{ src: string }>(({ src }) => {
386
386
  | | Images (inline and anchored, with text wrap) | ✅ |
387
387
  | | Text boxes / drawing shapes | ✅ |
388
388
  | **Advanced** | Footnote / endnote reference markers | ✅ |
389
- | | Track changes / comments | |
389
+ | | Track changes (`w:ins` / `w:del` — author-coloured underline / strikethrough) | |
390
+ | | Comments / footnote bodies (parsed, not yet rendered inline) | ⚠️ |
390
391
  | | Mail merge fields | ❌ Not planned |
391
392
  | **Interaction** | Text selection (transparent overlay, native copy) | ✅ |
392
393
 
@@ -523,6 +524,8 @@ export const PptxViewerComponent = component$<{ src: string }>(({ src }) => {
523
524
 
524
525
  ## Companion packages
525
526
 
527
+ - **[`packages/markdown/`](packages/markdown/)** — `@silurus/ooxml-markdown` and the `ooxml-md` CLI convert `.pptx` / `.docx` / `.xlsx` to GitHub-flavoured markdown via the workspace WASM parsers. Same projection used by the MCP server (~21× smaller than the raw XML on the demo deck, ~8% bigger than a flat-text extractor). Includes a node20-based GitHub Action for bulk repo-wide conversion.
528
+ - **[`packages/node/`](packages/node/)** — Node-side parsers (`@silurus/ooxml-node`) exposing `parsePptx` / `parseDocx` / `parseXlsx` / `parseXlsxAllSheets` against the workspace WASM artifacts, with no DOM or Web Worker dependency. Useful for CI checks, headless rendering pipelines, and CLI tools. Pairs with `@silurus/ooxml-diff` for server-side diffing. Includes an `ooxml-thumbnail` CLI (pptx-only first pass; requires `skia-canvas`).
526
529
  - **[`packages/vscode-extension/`](packages/vscode-extension/)** — VS Code extension (`ooxml-viewer`) that registers `CustomEditorProvider`s for `.docx`, `.xlsx`, and `.pptx`, and (opt-in) auto-installs and registers the `ooxml-mcp-server` so AI coding agents in the same window (Copilot Agent mode, Claude, …) can read those files via dedicated tools.
527
530
  - **[`packages/mcp-server/`](packages/mcp-server/)** — Rust MCP server (`ooxml-mcp-server`) exposing the parsers as tools for AI agents (Claude, Copilot, Codex, etc.). Provides structured queries (`docx_get_structure`, `xlsx_get_cell_range`, `pptx_get_slide_structure`, …) so agents can inspect OOXML files without shelling out to `unzip`. Prebuilt binaries are attached to each [GitHub Release](https://github.com/yukiyokotani/office-open-xml-viewer/releases) for macOS / Linux / Windows; the VS Code extension downloads them on demand.
528
531
 
@@ -563,7 +566,11 @@ cd packages/pptx/parser && wasm-pack build --target web && cp pkg/pptx_parser_bg
563
566
  ## Security & Privacy
564
567
 
565
568
  - **Canvas-only rendering.** Documents are decoded and drawn to an `HTMLCanvasElement`. No script, link, form, or other active content from the source file is executed or injected into the DOM.
566
- - **ZIP decompression cap.** Each entry in the source archive is limited to 512 MiB of uncompressed output to block zip-bomb DoS.
569
+ - **ZIP decompression cap.** Each entry in the source archive is limited to 512 MiB of uncompressed output by default to block zip-bomb DoS. Override per viewer with `maxZipEntryBytes` (bytes) — raise it for legitimate decks with large embedded media, lower it to tighten the budget for untrusted input:
570
+ ```ts
571
+ new PptxViewer(canvas, { maxZipEntryBytes: 64 * 1024 * 1024 }); // 64 MiB
572
+ ```
573
+ Supported uniformly by `DocxViewer`, `PptxViewer`, and `XlsxViewer`. Zero / negative values fall back to the default.
567
574
  - **No network by default.** The library does not send telemetry or analytics, and does not contact third-party services unless you ask it to. In particular, theme webfonts (and Office font metric substitutes for XLSX) are **not** loaded from Google Fonts unless you pass `useGoogleFonts: true` to the relevant `Viewer` / `load(...)` options — supported uniformly by `DocxViewer`, `PptxViewer`, and `XlsxViewer`. Enabling that option causes the end-user's browser to send an HTTP request (IP and User-Agent) to `fonts.googleapis.com`, which may have GDPR implications for your application — consider self-hosting the required fonts via `@font-face` instead.
568
575
  - **XML parsing.** Uses `roxmltree`, which does not resolve external entities (XXE-safe by default).
569
576