Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ dist-demo
dist-ssr
test-results
playwright-report
# Generated benchmark reports and local archives
/docs/benchmarks/
/benchmark-results/
*.local

# Editor directories and files
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## WASM Files

When updating docxodus:
1. Install the explicitly targeted engine version; this integration pins `docxodus@12.6.1` and optional `@docxodus/export@12.6.1`.
1. Install the explicitly targeted engine version; this integration pins `docxodus@12.6.2` and optional `@docxodus/export@12.6.2`.
2. Update matching pins and run `npm run sync:wasm`. Never patch the digest-verified runtime files.
3. Run `npm run check`, `npm run test:browser`, and the eligible-host PDF test.
4. Keep the complete API audit passing; React UI imports `docxodus/core`, not the upstream editor or `docxodus/react`.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# react-docxodus-viewer

React components and hooks for viewing, editing, reviewing, comparing, verifying,
and exporting Word documents with **Docxodus 12.6.1**. The viewer uses the core
and exporting Word documents with **Docxodus 12.6.2**. The viewer uses the core
engine and a React-owned pagination component; it does not load the upstream
browser editor or ribbon.

Expand All @@ -14,7 +14,7 @@ browser editor or ribbon.
Requires React 18+ and an ESM-capable application bundler.

```sh
npm install react-docxodus-viewer docxodus@12.6.1
npm install react-docxodus-viewer docxodus@12.6.2
npx rdv-copy-runtime public/docxodus
```

Expand Down Expand Up @@ -159,7 +159,7 @@ continue to style the viewer controls and panels.
- `/export-browser`: complete upstream browser export contracts/helpers. Keep the
materializer bundle static; use `loadBrowserExporter()` for actual bundled apps.
- `/server`: complete `@docxodus/export` Node/PDF API. Install the optional companion
with `npm install @docxodus/export@12.6.1`.
with `npm install @docxodus/export@12.6.2`.
- `/assets`: Node build helper `copyDocxodusRuntime(directory)`.
- `/styles.css`: viewer, editor, and feature-panel styles.

Expand Down Expand Up @@ -192,7 +192,7 @@ for each opened file. Downloads retain the document name.
npm install
npm run dev # sync verified assets, then start Vite
npm run check # lint, unit tests, types, library/demo builds, API audit
npm run test:browser # actual 12.6.1 WASM workflows
npm run test:browser # actual 12.6.2 WASM workflows
npm run test:performance # NVCA opening, zoom, typing and layout benchmark
npm run test:stress # NVCA editing and independent DOCX integrity checks
npm run test:package # packed consumer imports, types and runtime-copy command
Expand All @@ -203,7 +203,7 @@ Set `DOCXODUS_REQUIRE_PDF=1` to make an unavailable PDF environment fail that te
Set `RDV_TEST_PORT` to run browser checks on a different local port. Use
`RDV_TEST_PREVIEW=1` after building to exercise the production demo. This runs the
studio and module examples; source-only API harness tests remain development checks.
The API audit compares every published export against the installed 12.6.1
The API audit compares every published export against the installed 12.6.2
TypeScript declarations and checks identity of the built runtime exports.
See the [performance campaign](docs/performance.md) for measurements, regression
guards, and the next optimization targets.
Expand Down
10 changes: 5 additions & 5 deletions WASM_CDN_ISSUES.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Docxodus 12.6.1 runtime deployment
# Docxodus 12.6.2 runtime deployment

Deploy runtime files from the same package version as the JavaScript engine. The
React package pins 12.6.1; earlier .NET 8 assets cannot be mixed with its .NET 10
React package pins 12.6.2; earlier .NET 8 assets cannot be mixed with its .NET 10
runtime. This document supersedes the older 3.x CDN workarounds.

## Copy verified static assets

```sh
npm install docxodus@12.6.1
npm install docxodus@12.6.2
npx rdv-copy-runtime public/docxodus
```

Expand Down Expand Up @@ -42,7 +42,7 @@ available for custom hosting layouts.

## Export bundles must remain byte-identical

The 12.6.1 browser materializer fetches its own module and verifies its length and
The 12.6.2 browser materializer fetches its own module and verifies its length and
SHA-256 against `export-assets.json`. Rebundling, minifying, rewriting imports or
appending a source-map comment changes those bytes and causes an explicit runtime
verification failure. Runtime WASM and worker files are also verified.
Expand Down Expand Up @@ -94,7 +94,7 @@ Check the actual response headers, requested URLs and matching package version.

## Node/PDF export

Install `@docxodus/export@12.6.1` and import `/server` only in Node. The companion
Install `@docxodus/export@12.6.2` and import `/server` only in Node. The companion
owns its runtime deployment and browser materialization pipeline. It requires a
non-root host with Chromium's sandbox and, on Linux, permitted user namespaces.
`checkExportEnvironment()` reports deployment findings without rendering a file.
Expand Down
4 changes: 2 additions & 2 deletions demo/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import '../src/styles/DocumentViewer.css';
import './App.css';

const WASM_BASE_PATH = import.meta.env.BASE_URL + 'wasm/';
const FINGERPRINT = 'react-studio-v12.6.1';
const FINGERPRINT = 'react-studio-v12.6.2';
const snapshotBytes = (session: DocxSession) => session.save();
const docxMime = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
type Panel = 'edit' | 'review' | 'comments' | 'annotations' | 'history' | 'verify' | 'export';
Expand Down Expand Up @@ -136,7 +136,7 @@ function Workspace() {
}}>
<nav className="studio-rail" aria-label="Workspace"><a className="studio-mark" href="#" aria-label="Docxodus workspace" onClick={event => { event.preventDefault(); setTab('document'); }}>d<span>.</span></a>
<div className="rail-navigation">{[{ id: 'document', icon: 'document', label: 'Document workspace', short: 'Document' }, { id: 'compare', icon: 'compare', label: 'Compare documents', short: 'Compare' }, { id: 'external', icon: 'label', label: 'External annotations', short: 'Labels' }].map(item => <button type="button" className={`rail-button ${tab === item.id ? 'active' : ''}`} aria-label={item.label} aria-pressed={tab === item.id} title={item.label} key={item.id} onClick={() => setTab(item.id)}><Icon name={item.icon as IconName} size={21} /><span>{item.short}</span></button>)}</div>
<div className="rail-bottom"><a className="rail-button" href="?example=modules" target="_blank" rel="noreferrer" aria-label="Explore embeddable modules" title="Embeddable viewer and editor"><Icon name="code" /><span>Modules</span></a><button className="rail-button" aria-label="Open command menu" title="Commands · Ctrl / ⌘ K" onClick={() => setCommandOpen(true)}><Icon name="command" /><span>Commands</span></button><span className="engine-version" title="Powered by Docxodus 12.6.1">12.6.1</span></div>
<div className="rail-bottom"><a className="rail-button" href="?example=modules" target="_blank" rel="noreferrer" aria-label="Explore embeddable modules" title="Embeddable viewer and editor"><Icon name="code" /><span>Modules</span></a><button className="rail-button" aria-label="Open command menu" title="Commands · Ctrl / ⌘ K" onClick={() => setCommandOpen(true)}><Icon name="command" /><span>Commands</span></button><span className="engine-version" title="Powered by Docxodus 12.6.2">12.6.2</span></div>
</nav>
<div className="studio-main"><header className="studio-header"><div className="document-identity"><span className="document-glyph"><Icon name={tab === 'compare' ? 'compare' : tab === 'external' ? 'label' : 'document'} size={20} /></span><div><p className="breadcrumb">DOCXODUS <span>/</span> {tab === 'document' ? 'WORKSPACE' : tab === 'compare' ? 'COMPARE' : 'ANNOTATIONS'}</p><h1>{tab === 'document' ? (ready ? filename.replace(/\.docx$/i, '') : 'A little space to think.') : tab === 'compare' ? 'Every difference, in context.' : 'Give your document meaning.'}</h1></div></div>
<div className="header-actions"><button className="command-trigger" aria-label="Search workspace commands" onClick={() => setCommandOpen(true)}><Icon name="search" size={15} /><span>Search commands</span><kbd>⌘ K</kbd></button><span className="header-divider" /><button className="icon-button" aria-label="New document" title="New document" disabled={busy} onClick={create}><Icon name="plus" size={20} /></button><button className="quiet-button open-button" disabled={busy} onClick={openFile}><Icon name="open" size={17} />Open DOCX</button><button className="icon-button" aria-label="Download DOCX" title="Download DOCX" disabled={!ready || busy} onClick={download}><Icon name="download" /></button><button className="primary-button" aria-label="export" disabled={!ready || busy} onClick={() => showPanel('export')}>Export<Icon name="arrow" size={16} /></button></div>
Expand Down
3 changes: 3 additions & 0 deletions docs/12.6.1-upgrade.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Docxodus 12.6.1 integration

Historical notes for 12.6.1. The current integration uses
[12.6.2 and its leading-tab insertion fix](12.6.2-upgrade.md).

The browser engine and optional `@docxodus/export` companion are pinned to
12.6.1. Reinstall dependencies and copy the matching runtime with
`npx rdv-copy-runtime public/docxodus` (or `npm run sync:wasm` in this repository).
Expand Down
51 changes: 51 additions & 0 deletions docs/12.6.2-upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Docxodus 12.6.2 integration

The browser engine and optional `@docxodus/export` companion are pinned to
12.6.2. Reinstall dependencies and copy the matching runtime with
`npx rdv-copy-runtime public/docxodus` (or `npm run sync:wasm` in this repository).
Runtime files are copied from npm and digest-verified without modification.

## Formatted typing after leading tabs

[Upstream #802](https://github.com/JSv4/Docxodus/issues/802) is resolved in
12.6.2 by [PR #803](https://github.com/JSv4/Docxodus/pull/803). The supported
`session.replaceMatch(match, text, format)` operation now accepts interior
insertion in a text run with optional leading tabs. The existing integration
already attempts this operation; the NVCA footnote case can now use its atomic
undo/version unit without the outer package transaction and receipt hash.

The native split keeps leading tabs ahead of the original prefix text. Tabs
after text, other mixed run content, fields, inline containers, and positions
inside UTF-16 surrogate pairs remain excluded. The existing fallback remains
available when the native operation refuses a pure insertion without changing
the version. No native runtime or private API is patched.

Browser regression cases cover one and two leading tabs, exact typed formatting,
surrounding runs, marker positions, and one-step undo/redo. The native NVCA
reproduction requires the leading-tab insertion to succeed and verifies text,
formatting, tab/reference positions, one version, and namespace-aware XML
restoration through undo. It fails if that case falls back to the expensive batch.

## Rendering and API compatibility

The live session, changed-block renderer, conservative metadata caches, and
cooperative pagination remain in use. Published upstream APIs remain exposed.
The pagination source is unchanged from 12.6.1 (SHA-256
`2b67cf77f5383db0871647e8c40ca367e1c79cfb3f996120edbf6d7c707e31c0`), and the
native page-map contract is unchanged. The generated adapter is checked against
the installed source and compared with native pagination on the NVCA fixture.

The isolated NVCA footnote insertion takes 29.5–32.7 ms, versus the previous
600.2–621.9 ms fallback. Its production interior-typing phase improves from
816 ms to 32 ms in the final run. Follow-up browser traces also identified
blocking incoming-document setup and full anchor scans during editing. Incoming
preparation now yields to input and uses observed layout readiness; canvas
anchors reuse native formatting reads with conservative alias invalidation.

All five final production NVCA runs pass the 150 ms input-response gate across
all nine phases, with a 144 ms observed maximum. The earlier failed runs remain
in the record; the exact cause of two original 184 ms delays is unproven.
See [performance measurements](performance.md) for the complete history,
validation, and limits, including background layout and unmeasured workloads.
The previous [12.6.1 notes](12.6.1-upgrade.md) remain as historical context for
the leading-tab limitation.
2 changes: 1 addition & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Render errors retain structured diagnostics and any failed render report.
That callback is host-owned; the browser package never imports Node PDF tooling.

```ts
// Node ESM: install @docxodus/export@12.6.1
// Node ESM: install @docxodus/export@12.6.2
import { checkExportEnvironment, convertDocxToPdf, renderDocxArtifacts,
renderDocxFile } from 'react-docxodus-viewer/server';
const environment = await checkExportEnvironment();
Expand Down
Loading