@silurus/ooxml 0.70.1 → 0.70.2

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
@@ -29,15 +29,23 @@ pnpm add @silurus/ooxml
29
29
 
30
30
  > **Bundler note**: the Rust parsers ship as real `.wasm` asset files next to the
31
31
  > JavaScript, referenced with the standard `new URL('…', import.meta.url)` form
32
- > and fetched (streaming-compiled) at load time. Vite, webpack 5, Rollup and
33
- > Parcel detect that reference and copy the asset automatically — no extra
34
- > WebAssembly plugin is required. esbuild and the Angular CLI (whose application
35
- > builder is esbuild-based) do **not** process that reference
36
- > ([esbuild#795](https://github.com/evanw/esbuild/issues/795)): copy the `.wasm`
37
- > into your served output yourself and point the viewer at it with the `wasmUrl`
38
- > load option see the [Angular example](#framework-examples) for the two-step
39
- > setup. `wasmUrl` also serves the parser WASM from a CDN or any path you
40
- > control:
32
+ > and fetched (streaming-compiled) at load time. Verified to work with zero
33
+ > config: **webpack 5**, **Next.js** (Turbopack, dev and build), **Vite 8**
34
+ > (dev and build), **Vite 7 production builds**, and a plain
35
+ > `<script type="module">` with no bundler at all. Two setups need a hand:
36
+ >
37
+ > - **Vite 7 dev server**: the dependency optimizer rewrites the asset reference
38
+ > into its own cache path and the load fails (fixed in Vite 8). Add
39
+ > `optimizeDeps: { exclude: ['@silurus/ooxml'] }` to your `vite.config`
40
+ > production builds are unaffected.
41
+ > - **esbuild / Angular CLI** (whose application builder is esbuild-based):
42
+ > `new URL` asset references are not processed
43
+ > ([esbuild#795](https://github.com/evanw/esbuild/issues/795)). Copy the
44
+ > `.wasm` into your served output and point the viewer at it with the
45
+ > `wasmUrl` load option — see the [Angular example](#framework-examples) for
46
+ > the two-step setup.
47
+ >
48
+ > `wasmUrl` also serves the parser WASM from a CDN or any path you control:
41
49
  >
42
50
  > ```typescript
43
51
  > new DocxViewer(canvas, { wasmUrl: 'https://cdn.example.com/docx_parser_bg.wasm' });
@@ -44,7 +44,7 @@ function ue(e) {
44
44
  }
45
45
  //#endregion
46
46
  //#region packages/docx/src/wasm/docx_parser_bg.wasm?url
47
- var de = new URL(new URL("docx_parser_bg.wasm", import.meta.url).href, import.meta.url).href, fe = (e) => {
47
+ var de = new URL("docx_parser_bg.wasm", import.meta.url).href, fe = (e) => {
48
48
  let t = e.text;
49
49
  return typeof t == "string" ? t : void 0;
50
50
  }, pe = (e) => e.rtl === !0, me = (e) => e.digitsAsAN === !0;
package/dist/docx.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import { k as e } from "./line-metrics-DG9p1RvA.js";
2
- import { a as t, i as n, n as r, o as i, r as a } from "./docx-BGWUAYkh.js";
2
+ import { a as t, i as n, n as r, o as i, r as a } from "./docx-BKsYFx78.js";
3
3
  export { i as DocxDocument, a as DocxScrollViewer, n as DocxViewer, e as autoResize, t as buildDocxTextLayer, r as noteText };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./pptx-ECIKr-R_.js";
2
- import { t } from "./xlsx-CCmtIDr_.js";
3
- import { t as n } from "./docx-BGWUAYkh.js";
1
+ import { t as e } from "./pptx-B4xa92BQ.js";
2
+ import { t } from "./xlsx-B1XUgnO7.js";
3
+ import { t as n } from "./docx-BKsYFx78.js";
4
4
  export { n as docx, e as pptx, t as xlsx };
package/dist/math.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as e } from "./mathjax-BRfWlbSJ.js";
2
2
  //#region packages/core/assets/mathjax-stix2.js?url
3
- var t = new URL(new URL("mathjax-stix2.js", import.meta.url).href, import.meta.url).href, n = null;
3
+ var t = new URL("mathjax-stix2.js", import.meta.url).href, n = null;
4
4
  function r() {
5
5
  return new URL(t, import.meta.url).href;
6
6
  }
@@ -2661,7 +2661,7 @@ function sr(e) {
2661
2661
  }
2662
2662
  //#endregion
2663
2663
  //#region packages/pptx/src/wasm/pptx_parser_bg.wasm?url
2664
- var cr = new URL(new URL("pptx_parser_bg.wasm", import.meta.url).href, import.meta.url).href, lr = class e {
2664
+ var cr = new URL("pptx_parser_bg.wasm", import.meta.url).href, lr = class e {
2665
2665
  _worker;
2666
2666
  _bridge;
2667
2667
  _mode = "main";
package/dist/pptx.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import { k as e } from "./line-metrics-DG9p1RvA.js";
2
- import { a as t, i as n, n as r, o as i, r as a } from "./pptx-ECIKr-R_.js";
2
+ import { a as t, i as n, n as r, o as i, r as a } from "./pptx-B4xa92BQ.js";
3
3
  export { n as PptxPresentation, r as PptxScrollViewer, a as PptxViewer, e as autoResize, i as buildPptxTextLayer, t as renderSlide };
@@ -108,7 +108,7 @@ function ae(e) {
108
108
  }
109
109
  //#endregion
110
110
  //#region packages/xlsx/src/wasm/xlsx_parser_bg.wasm?url
111
- var oe = new URL(new URL("xlsx_parser_bg.wasm", import.meta.url).href, import.meta.url).href;
111
+ var oe = new URL("xlsx_parser_bg.wasm", import.meta.url).href;
112
112
  //#endregion
113
113
  //#region packages/xlsx/src/sheet-visibility.ts
114
114
  function se(e, t) {
package/dist/xlsx.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import { k as e } from "./line-metrics-DG9p1RvA.js";
2
- import { n as t, r as n } from "./xlsx-CCmtIDr_.js";
2
+ import { n as t, r as n } from "./xlsx-B1XUgnO7.js";
3
3
  export { t as XlsxViewer, n as XlsxWorkbook, e as autoResize };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silurus/ooxml",
3
- "version": "0.70.1",
3
+ "version": "0.70.2",
4
4
  "description": "Browser-based OOXML viewer (docx/xlsx/pptx) — Rust/WASM parser + Canvas renderer",
5
5
  "license": "MIT",
6
6
  "author": "Yuki Yokotani <silurus.dev@gmail.com>",