docxodus 12.3.0 → 12.4.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 (50) hide show
  1. package/README.md +8 -6
  2. package/dist/editor.bundle.js +1206 -27
  3. package/dist/editor.d.ts +10 -1
  4. package/dist/editor.d.ts.map +1 -1
  5. package/dist/editor.js +48 -16
  6. package/dist/editor.js.map +1 -1
  7. package/dist/embed.bundle.js +649 -57
  8. package/dist/embed.d.ts +5 -2
  9. package/dist/embed.d.ts.map +1 -1
  10. package/dist/embed.iife.js +649 -57
  11. package/dist/embed.js +10 -3
  12. package/dist/embed.js.map +1 -1
  13. package/dist/export-assets.json +5 -5
  14. package/dist/history-checkpoints.d.ts +2 -0
  15. package/dist/history-checkpoints.d.ts.map +1 -1
  16. package/dist/history-checkpoints.js +2 -0
  17. package/dist/history-checkpoints.js.map +1 -1
  18. package/dist/history-controls.d.ts +6 -3
  19. package/dist/history-controls.d.ts.map +1 -1
  20. package/dist/history-controls.js +71 -29
  21. package/dist/history-controls.js.map +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/ribbon-chrome.d.ts +1 -1
  27. package/dist/ribbon-chrome.d.ts.map +1 -1
  28. package/dist/ribbon-chrome.js +6 -3
  29. package/dist/ribbon-chrome.js.map +1 -1
  30. package/dist/ribbon-history.d.ts +85 -0
  31. package/dist/ribbon-history.d.ts.map +1 -0
  32. package/dist/ribbon-history.js +508 -0
  33. package/dist/ribbon-history.js.map +1 -0
  34. package/dist/ribbon.d.ts +6 -0
  35. package/dist/ribbon.d.ts.map +1 -1
  36. package/dist/ribbon.js +47 -18
  37. package/dist/ribbon.js.map +1 -1
  38. package/dist/viewport.d.ts +3 -1
  39. package/dist/viewport.d.ts.map +1 -1
  40. package/dist/viewport.js +14 -0
  41. package/dist/viewport.js.map +1 -1
  42. package/dist/wasm/_framework/Docxodus.wasm +0 -0
  43. package/dist/wasm/_framework/Docxodus.wasm.br +0 -0
  44. package/dist/wasm/_framework/DocxodusWasm.wasm +0 -0
  45. package/dist/wasm/_framework/DocxodusWasm.wasm.br +0 -0
  46. package/dist/wasm/_framework/dotnet.boot.js +4 -4
  47. package/dist/wasm/_framework/dotnet.boot.js.br +0 -0
  48. package/dist/wasm/_framework/dotnet.native.wasm +0 -0
  49. package/dist/wasm/_framework/dotnet.native.wasm.br +0 -0
  50. package/package.json +7 -8
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.2.0/dist/embed.bundle.js';
95
+ import { createRibbonEditor } from 'https://cdn.jsdelivr.net/npm/docxodus@12.3.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.2.0/dist/embed.bundle.js';
583
+ from 'https://cdn.jsdelivr.net/npm/docxodus@12.3.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.2.0/dist/embed.iife.js"></script>
613
+ <script src="https://cdn.jsdelivr.net/npm/docxodus@12.3.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.2.0`, not `@latest`) — CDN responses are
629
+ - **Pin an exact version in production** (`docxodus@12.3.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
@@ -726,8 +726,10 @@ loading, comparison, checkpoint/restore and `.docxhistory` import/export over ho
726
726
  `mountHistoryControls` adds an accessible panel with separate previews, exact checkpoint retries
727
727
  and explicit history sharing. `openIndexedDbHistoryStore` provides optional browser persistence.
728
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.
729
+ The [shared editor example](examples/editor.html) includes an optional **Version history** drawer.
730
+ One `npm run build` produces the library, local editors and deployable site; run `npm run demo:serve`
731
+ and open `http://localhost:8088/editor.html`. In an embed, pass `history: true` to
732
+ `createRibbonEditor`, or `{ history: { workspaceId: "my-document" } }` to resume saved work across reloads.
731
733
 
732
734
  ## License
733
735