docxodus 12.2.0 → 12.3.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 (38) hide show
  1. package/README.md +9 -4
  2. package/dist/editor.bundle.js +2 -1
  3. package/dist/embed.bundle.js +592 -3
  4. package/dist/embed.d.ts +1 -1
  5. package/dist/embed.iife.js +592 -3
  6. package/dist/embed.js +1 -1
  7. package/dist/export-assets.json +9 -9
  8. package/dist/history-checkpoints.d.ts +48 -0
  9. package/dist/history-checkpoints.d.ts.map +1 -0
  10. package/dist/history-checkpoints.js +100 -0
  11. package/dist/history-checkpoints.js.map +1 -0
  12. package/dist/history-controls.d.ts +30 -0
  13. package/dist/history-controls.d.ts.map +1 -0
  14. package/dist/history-controls.js +333 -0
  15. package/dist/history-controls.js.map +1 -0
  16. package/dist/history-indexeddb.d.ts +12 -0
  17. package/dist/history-indexeddb.d.ts.map +1 -0
  18. package/dist/history-indexeddb.js +154 -0
  19. package/dist/history-indexeddb.js.map +1 -0
  20. package/dist/index.d.ts +3 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +4 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/ribbon.js +3 -1
  25. package/dist/ribbon.js.map +1 -1
  26. package/dist/wasm/_framework/Docxodus.wasm +0 -0
  27. package/dist/wasm/_framework/Docxodus.wasm.br +0 -0
  28. package/dist/wasm/_framework/DocxodusWasm.wasm +0 -0
  29. package/dist/wasm/_framework/DocxodusWasm.wasm.br +0 -0
  30. package/dist/wasm/_framework/System.Private.CoreLib.wasm +0 -0
  31. package/dist/wasm/_framework/System.Private.CoreLib.wasm.br +0 -0
  32. package/dist/wasm/_framework/System.Runtime.InteropServices.JavaScript.wasm +0 -0
  33. package/dist/wasm/_framework/System.Runtime.InteropServices.JavaScript.wasm.br +0 -0
  34. package/dist/wasm/_framework/dotnet.boot.js +6 -6
  35. package/dist/wasm/_framework/dotnet.boot.js.br +0 -0
  36. package/dist/wasm/_framework/dotnet.native.wasm +0 -0
  37. package/dist/wasm/_framework/dotnet.native.wasm.br +0 -0
  38. package/package.json +3 -1
package/README.md CHANGED
@@ -92,7 +92,7 @@ runtime location auto-detected — no build step, no configuration:
92
92
  ```html
93
93
  <div id="doc" style="height: 100dvh"></div>
94
94
  <script type="module">
95
- import { createRibbonEditor } from 'https://cdn.jsdelivr.net/npm/docxodus@12.1.0/dist/embed.bundle.js';
95
+ import { createRibbonEditor } from 'https://cdn.jsdelivr.net/npm/docxodus@12.2.0/dist/embed.bundle.js';
96
96
  const ribbon = await createRibbonEditor('#doc', './contract.docx'); // or bytes / Blob / File
97
97
  // ...later: const editedBytes = ribbon.save();
98
98
  </script>
@@ -580,7 +580,7 @@ so a page can embed a full viewer or editor without hosting anything itself.
580
580
  <div id="app" style="height: 100dvh"></div>
581
581
  <script type="module">
582
582
  import { createViewer, createEditor, createRibbonEditor }
583
- from 'https://cdn.jsdelivr.net/npm/docxodus@12.1.0/dist/embed.bundle.js';
583
+ from 'https://cdn.jsdelivr.net/npm/docxodus@12.2.0/dist/embed.bundle.js';
584
584
 
585
585
  // Choose a factory, or render several into separate containers as shown.
586
586
  // Source may be a URL, Uint8Array, ArrayBuffer, Blob, or File.
@@ -610,7 +610,7 @@ For pages that can't use modules, `dist/embed.iife.js` exposes the same surface
610
610
 
611
611
  ```html
612
612
  <div id="doc"></div>
613
- <script src="https://cdn.jsdelivr.net/npm/docxodus@12.1.0/dist/embed.iife.js"></script>
613
+ <script src="https://cdn.jsdelivr.net/npm/docxodus@12.2.0/dist/embed.iife.js"></script>
614
614
  <script>
615
615
  Docxodus.createRibbonEditor('#doc').then((ribbon) => { /* ... */ });
616
616
  </script>
@@ -626,7 +626,7 @@ first `<bundle dir>/wasm/`, then `<bundle dir>/` as a fallback. On a CDN that re
626
626
 
627
627
  ### CDN caveats
628
628
 
629
- - **Pin an exact version in production** (`docxodus@12.1.0`, not `@latest`) — CDN responses are
629
+ - **Pin an exact version in production** (`docxodus@12.2.0`, not `@latest`) — CDN responses are
630
630
  cached as immutable, and the wire shapes between the JS wrappers and the WASM assemblies must
631
631
  come from the same release.
632
632
  - The build patches the .NET loader to fetch with `credentials: "omit"` — required because the
@@ -723,6 +723,11 @@ Requires WebAssembly SIMD support.
723
723
 
724
724
  See the [concise history-controls API guide](../docs/history-controls.md) for latest/version
725
725
  loading, comparison, checkpoint/restore and `.docxhistory` import/export over host-owned storage.
726
+ `mountHistoryControls` adds an accessible panel with separate previews, exact checkpoint retries
727
+ and explicit history sharing. `openIndexedDbHistoryStore` provides optional browser persistence.
728
+ These controls require `structuredClone` and `crypto.randomUUID`; the optional store also requires IndexedDB.
729
+ The [TypeScript editor example](examples/history.ts) runs with `npm run build:history-example`
730
+ and a local server serving `dist/wasm/history.html` after the WASM build.
726
731
 
727
732
  ## License
728
733
 
@@ -13372,7 +13372,8 @@ span.comment-highlight.docx-comment-active { background: hsl(var(--docx-comment-
13372
13372
  comments: this.options.comments,
13373
13373
  commentAuthor: this.author
13374
13374
  });
13375
- this.require("save").disabled = false;
13375
+ const saveButton = this.control("save");
13376
+ if (saveButton) saveButton.disabled = false;
13376
13377
  this.require("ribbon").setAttribute("aria-disabled", "false");
13377
13378
  this.setState("ready");
13378
13379
  this.setStatus(`Rendered in ${Math.round(performance.now() - started)} ms`);