docxodus 12.3.0 → 12.4.1
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 +31 -6
- package/dist/core.d.ts +924 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +2094 -0
- package/dist/core.js.map +1 -0
- package/dist/editor.bundle.js +1206 -27
- package/dist/editor.d.ts +10 -1
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +48 -16
- package/dist/editor.js.map +1 -1
- package/dist/embed.bundle.js +12371 -11779
- package/dist/embed.d.ts +5 -2
- package/dist/embed.d.ts.map +1 -1
- package/dist/embed.iife.js +12282 -11690
- package/dist/embed.js +10 -3
- package/dist/embed.js.map +1 -1
- package/dist/export-assets.json +39 -39
- package/dist/history-checkpoints.d.ts +2 -0
- package/dist/history-checkpoints.d.ts.map +1 -1
- package/dist/history-checkpoints.js +2 -0
- package/dist/history-checkpoints.js.map +1 -1
- package/dist/history-controls.d.ts +6 -3
- package/dist/history-controls.d.ts.map +1 -1
- package/dist/history-controls.js +71 -29
- package/dist/history-controls.js.map +1 -1
- package/dist/index.d.ts +3 -923
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2093
- package/dist/index.js.map +1 -1
- package/dist/ribbon-chrome.d.ts +1 -1
- package/dist/ribbon-chrome.d.ts.map +1 -1
- package/dist/ribbon-chrome.js +6 -3
- package/dist/ribbon-chrome.js.map +1 -1
- package/dist/ribbon-history.d.ts +85 -0
- package/dist/ribbon-history.d.ts.map +1 -0
- package/dist/ribbon-history.js +508 -0
- package/dist/ribbon-history.js.map +1 -0
- package/dist/ribbon.d.ts +6 -0
- package/dist/ribbon.d.ts.map +1 -1
- package/dist/ribbon.js +47 -18
- package/dist/ribbon.js.map +1 -1
- package/dist/viewport.d.ts +3 -1
- package/dist/viewport.d.ts.map +1 -1
- package/dist/viewport.js +14 -0
- package/dist/viewport.js.map +1 -1
- package/dist/wasm/_framework/Docxodus.wasm +0 -0
- package/dist/wasm/_framework/Docxodus.wasm.br +0 -0
- package/dist/wasm/_framework/DocxodusWasm.wasm +0 -0
- package/dist/wasm/_framework/DocxodusWasm.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.Concurrent.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.Concurrent.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.Immutable.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.Immutable.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.NonGeneric.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.NonGeneric.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.Specialized.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.Specialized.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.wasm.br +0 -0
- package/dist/wasm/_framework/System.ComponentModel.Primitives.wasm +0 -0
- package/dist/wasm/_framework/System.ComponentModel.Primitives.wasm.br +0 -0
- package/dist/wasm/_framework/System.ComponentModel.TypeConverter.wasm +0 -0
- package/dist/wasm/_framework/System.ComponentModel.TypeConverter.wasm.br +0 -0
- package/dist/wasm/_framework/System.ComponentModel.wasm +0 -0
- package/dist/wasm/_framework/System.ComponentModel.wasm.br +0 -0
- package/dist/wasm/_framework/System.Console.wasm +0 -0
- package/dist/wasm/_framework/System.Console.wasm.br +0 -0
- package/dist/wasm/_framework/System.IO.Compression.wasm +0 -0
- package/dist/wasm/_framework/System.IO.Compression.wasm.br +0 -0
- package/dist/wasm/_framework/System.IO.Pipelines.wasm +0 -0
- package/dist/wasm/_framework/System.IO.Pipelines.wasm.br +0 -0
- package/dist/wasm/_framework/System.Linq.Expressions.wasm +0 -0
- package/dist/wasm/_framework/System.Linq.Expressions.wasm.br +0 -0
- package/dist/wasm/_framework/System.Linq.wasm +0 -0
- package/dist/wasm/_framework/System.Linq.wasm.br +0 -0
- package/dist/wasm/_framework/System.Memory.wasm +0 -0
- package/dist/wasm/_framework/System.Memory.wasm.br +0 -0
- package/dist/wasm/_framework/System.Net.Http.wasm +0 -0
- package/dist/wasm/_framework/System.Net.Http.wasm.br +0 -0
- package/dist/wasm/_framework/System.Net.Primitives.wasm +0 -0
- package/dist/wasm/_framework/System.Net.Primitives.wasm.br +0 -0
- package/dist/wasm/_framework/System.ObjectModel.wasm +0 -0
- package/dist/wasm/_framework/System.ObjectModel.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.CoreLib.wasm +0 -0
- package/dist/wasm/_framework/System.Private.CoreLib.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.Uri.wasm +0 -0
- package/dist/wasm/_framework/System.Private.Uri.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.Xml.Linq.wasm +0 -0
- package/dist/wasm/_framework/System.Private.Xml.Linq.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.Xml.wasm +0 -0
- package/dist/wasm/_framework/System.Private.Xml.wasm.br +0 -0
- package/dist/wasm/_framework/System.Runtime.InteropServices.JavaScript.wasm +0 -0
- package/dist/wasm/_framework/System.Runtime.InteropServices.JavaScript.wasm.br +0 -0
- package/dist/wasm/_framework/System.Runtime.wasm +0 -0
- package/dist/wasm/_framework/System.Runtime.wasm.br +0 -0
- package/dist/wasm/_framework/System.Security.Cryptography.wasm +0 -0
- package/dist/wasm/_framework/System.Security.Cryptography.wasm.br +0 -0
- package/dist/wasm/_framework/System.Text.Encodings.Web.wasm +0 -0
- package/dist/wasm/_framework/System.Text.Encodings.Web.wasm.br +0 -0
- package/dist/wasm/_framework/System.Text.Json.wasm +0 -0
- package/dist/wasm/_framework/System.Text.Json.wasm.br +0 -0
- package/dist/wasm/_framework/System.Text.RegularExpressions.wasm +0 -0
- package/dist/wasm/_framework/System.Text.RegularExpressions.wasm.br +0 -0
- package/dist/wasm/_framework/System.Xml.Linq.wasm +0 -0
- package/dist/wasm/_framework/System.Xml.Linq.wasm.br +0 -0
- package/dist/wasm/_framework/System.Xml.XDocument.wasm +0 -0
- package/dist/wasm/_framework/System.Xml.XDocument.wasm.br +0 -0
- package/dist/wasm/_framework/System.wasm +0 -0
- package/dist/wasm/_framework/System.wasm.br +0 -0
- package/dist/wasm/_framework/dotnet.boot.js +34 -34
- package/dist/wasm/_framework/dotnet.boot.js.br +0 -0
- package/dist/wasm/_framework/dotnet.js +1 -1
- package/dist/wasm/_framework/dotnet.js.br +0 -0
- package/dist/wasm/_framework/dotnet.native.js +3 -3
- package/dist/wasm/_framework/dotnet.native.js.br +0 -0
- package/dist/wasm/_framework/dotnet.native.wasm +0 -0
- package/dist/wasm/_framework/dotnet.native.wasm.br +0 -0
- package/dist/wasm/_framework/dotnet.runtime.js +1 -1
- package/dist/wasm/_framework/dotnet.runtime.js.br +0 -0
- package/package.json +14 -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.
|
|
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>
|
|
@@ -275,6 +275,29 @@ function DocumentComparer() {
|
|
|
275
275
|
}
|
|
276
276
|
```
|
|
277
277
|
|
|
278
|
+
## Node.js (ES modules)
|
|
279
|
+
|
|
280
|
+
Import the engine from `docxodus/core` for server-side conversion, comparison, annotations,
|
|
281
|
+
and document sessions. It loads without a bundler or a custom Node loader:
|
|
282
|
+
|
|
283
|
+
```js
|
|
284
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
285
|
+
import { initialize, convertDocxToHtml, compareDocuments } from 'docxodus/core';
|
|
286
|
+
|
|
287
|
+
await initialize(); // Finds the WASM runtime included in the installed package.
|
|
288
|
+
const original = await readFile('original.docx');
|
|
289
|
+
const revised = await readFile('revised.docx');
|
|
290
|
+
await writeFile('original.html', await convertDocxToHtml(original));
|
|
291
|
+
await writeFile('redline.docx', await compareDocuments(original, revised));
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
`docxodus/core` exposes the engine functions, types, enums, annotation helpers, and history
|
|
295
|
+
APIs from `docxodus`, excluding `DocxEditor`, `CommentGutter`, `mountRibbon`, and their editor
|
|
296
|
+
types. The existing `docxodus` entry includes those browser editor APIs and requires a browser
|
|
297
|
+
bundler; use `docxodus/core` in plain Node ESM. Both entries share the same engine state.
|
|
298
|
+
Browser helpers retained in `core`, such as pagination, the document viewport, IndexedDB
|
|
299
|
+
storage, and history controls, still require their browser APIs when called.
|
|
300
|
+
|
|
278
301
|
## API Reference
|
|
279
302
|
|
|
280
303
|
### Package verification
|
|
@@ -580,7 +603,7 @@ so a page can embed a full viewer or editor without hosting anything itself.
|
|
|
580
603
|
<div id="app" style="height: 100dvh"></div>
|
|
581
604
|
<script type="module">
|
|
582
605
|
import { createViewer, createEditor, createRibbonEditor }
|
|
583
|
-
from 'https://cdn.jsdelivr.net/npm/docxodus@12.
|
|
606
|
+
from 'https://cdn.jsdelivr.net/npm/docxodus@12.3.0/dist/embed.bundle.js';
|
|
584
607
|
|
|
585
608
|
// Choose a factory, or render several into separate containers as shown.
|
|
586
609
|
// Source may be a URL, Uint8Array, ArrayBuffer, Blob, or File.
|
|
@@ -610,7 +633,7 @@ For pages that can't use modules, `dist/embed.iife.js` exposes the same surface
|
|
|
610
633
|
|
|
611
634
|
```html
|
|
612
635
|
<div id="doc"></div>
|
|
613
|
-
<script src="https://cdn.jsdelivr.net/npm/docxodus@12.
|
|
636
|
+
<script src="https://cdn.jsdelivr.net/npm/docxodus@12.3.0/dist/embed.iife.js"></script>
|
|
614
637
|
<script>
|
|
615
638
|
Docxodus.createRibbonEditor('#doc').then((ribbon) => { /* ... */ });
|
|
616
639
|
</script>
|
|
@@ -626,7 +649,7 @@ first `<bundle dir>/wasm/`, then `<bundle dir>/` as a fallback. On a CDN that re
|
|
|
626
649
|
|
|
627
650
|
### CDN caveats
|
|
628
651
|
|
|
629
|
-
- **Pin an exact version in production** (`docxodus@12.
|
|
652
|
+
- **Pin an exact version in production** (`docxodus@12.3.0`, not `@latest`) — CDN responses are
|
|
630
653
|
cached as immutable, and the wire shapes between the JS wrappers and the WASM assemblies must
|
|
631
654
|
come from the same release.
|
|
632
655
|
- The build patches the .NET loader to fetch with `credentials: "omit"` — required because the
|
|
@@ -726,8 +749,10 @@ loading, comparison, checkpoint/restore and `.docxhistory` import/export over ho
|
|
|
726
749
|
`mountHistoryControls` adds an accessible panel with separate previews, exact checkpoint retries
|
|
727
750
|
and explicit history sharing. `openIndexedDbHistoryStore` provides optional browser persistence.
|
|
728
751
|
These controls require `structuredClone` and `crypto.randomUUID`; the optional store also requires IndexedDB.
|
|
729
|
-
The [
|
|
730
|
-
|
|
752
|
+
The [shared editor example](examples/editor.html) includes an optional **Version history** drawer.
|
|
753
|
+
One `npm run build` produces the library, local editors and deployable site; run `npm run demo:serve`
|
|
754
|
+
and open `http://localhost:8088/editor.html`. In an embed, pass `history: true` to
|
|
755
|
+
`createRibbonEditor`, or `{ history: { workspaceId: "my-document" } }` to resume saved work across reloads.
|
|
731
756
|
|
|
732
757
|
## License
|
|
733
758
|
|