Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
990acdc
test(docx): add deterministic DOCX fixture builder
seonghobae Aug 13, 2026
08d2a5e
test(docx): share import contract assertions
seonghobae Aug 13, 2026
24a1203
test(docx): specify bounded open and import contract
seonghobae Aug 13, 2026
f173a43
feat(docx): add public import contracts
seonghobae Aug 13, 2026
532232f
feat(docx): add redacted import failures
seonghobae Aug 13, 2026
6e194e2
feat(docx): enforce bounded import configuration
seonghobae Aug 13, 2026
92f39bd
feat(docx): expose framework-neutral import surface
seonghobae Aug 13, 2026
4f06b66
feat(docx): add atomic import handoff
seonghobae Aug 13, 2026
eebe8d8
feat(docx): add bounded ZIP package reader
seonghobae Aug 13, 2026
cf5fe23
feat(docx): add inert bounded XML parser
seonghobae Aug 13, 2026
c774b0c
feat(docx): centralize OOXML namespace and warning rules
seonghobae Aug 13, 2026
90b51ea
feat(docx): validate OPC manifest and relationships
seonghobae Aug 13, 2026
ed5f45b
feat(docx): classify Word list formats
seonghobae Aug 13, 2026
d55cdc5
feat(docx): parse Word list numbering
seonghobae Aug 13, 2026
2f6ce97
feat(docx): normalize Word heading labels
seonghobae Aug 13, 2026
bf20cfd
feat(docx): map Word heading styles
seonghobae Aug 13, 2026
f2725c2
feat(docx): assemble bounded package metadata
seonghobae Aug 13, 2026
0e07c0b
test(docx): align import contract with editor and binary types
seonghobae Aug 14, 2026
85574e5
fix(docx): type decompression stream input as BufferSource
seonghobae Aug 14, 2026
97de393
feat(docx): assemble bounded OOXML document import
seonghobae Aug 14, 2026
e74006f
fix(docx): clear aggregate parser typecheck blockers
seonghobae Aug 14, 2026
15a7174
fix(docx): support Blob reads across DOM runtimes
seonghobae Aug 14, 2026
95fce7e
test(docx): cover strict parser and configuration boundaries
seonghobae Aug 14, 2026
967b405
test(docx): align XML expectations with parser contract
seonghobae Aug 14, 2026
1f5d2f9
test(docx): restore empty XML limit expectation
seonghobae Aug 14, 2026
779c5df
test(docx): make XML limit failures explicit
seonghobae Aug 14, 2026
8aa21f6
test(docx): cover OOXML package integration paths
seonghobae Aug 14, 2026
0fb29f3
test(docx): close package safety coverage gaps
seonghobae Aug 14, 2026
d788238
test(docx): use ArrayBuffer-backed Blob fixtures
seonghobae Aug 14, 2026
9f842f2
test(docx): repair CI coverage fixtures
seonghobae Aug 14, 2026
24d49da
test(docx): cover remaining importer boundaries
seonghobae Aug 14, 2026
bf8b352
test(docx): close exact importer coverage gaps
seonghobae Aug 14, 2026
cd09faf
test(docx): require packed public import surface
seonghobae Aug 14, 2026
98fca06
build(docx): add standalone import bundle
seonghobae Aug 14, 2026
8aa1bef
test(docx): verify packed standalone consumers
seonghobae Aug 14, 2026
39140cf
build(docx): publish bounded import subpath
seonghobae Aug 14, 2026
5a8fc67
fix(docx): compile the public error constructor contract
seonghobae Aug 14, 2026
7ba1568
docs(docx): publish the bounded import entrypoint
seonghobae Aug 14, 2026
7d137b9
docs(docx): define active import distribution contract
seonghobae Aug 14, 2026
733abe7
test(docx): exercise valid packed consumer import
seonghobae Aug 14, 2026
d103353
test(docx): cover structural fallback branches
seonghobae Aug 14, 2026
8aeec02
test(docx): cover marked text and empty cells
seonghobae Aug 14, 2026
400eb8b
fix(docx): freeze only supported mark shape
seonghobae Aug 14, 2026
f2cf215
test(docx): require intrinsic Blob ingestion authority
seonghobae Aug 14, 2026
27e9696
test(docx): make Blob authority regression type-safe
seonghobae Aug 14, 2026
cfbca36
fix(docx): read intrinsic Blob size
seonghobae Aug 14, 2026
3c716df
fix(docx): read Blob bytes through platform authority
seonghobae Aug 14, 2026
217886d
test(docx): cover intrinsic Blob reader
seonghobae Aug 14, 2026
db3fc7a
test(docx): align Blob subclass coverage with intrinsic reader
seonghobae Aug 14, 2026
00c920e
test(docx): cover Blob data-property override
seonghobae Aug 14, 2026
9597cda
test(docx): exercise intrinsic Blob byte reader
seonghobae Aug 15, 2026
66a5804
fix(docx): preserve generated node type invariant
seonghobae Aug 15, 2026
f221d16
test(docx): reject ambiguous multiple-body packages
seonghobae Aug 15, 2026
9b39df5
fix(docx): reject ambiguous multiple-body documents
seonghobae Aug 15, 2026
8c751ab
test(docx): reject ambiguous content-type overrides
seonghobae Aug 15, 2026
b7ae80e
fix(docx): reject ambiguous content-type overrides
seonghobae Aug 15, 2026
e252a4b
test(docx): reject duplicate paragraph style identifiers
seonghobae Aug 15, 2026
14d9087
fix(docx): reject duplicate paragraph style identifiers
seonghobae Aug 15, 2026
874dc5f
test(docx): expose hostile error normalization boundary
seonghobae Aug 15, 2026
168b900
fix(docx): harden public error normalization
seonghobae Aug 15, 2026
3a2a3aa
test(docx): bypass byte-range accessors
seonghobae Aug 15, 2026
80b0eed
fix(docx): read view ranges through intrinsics
seonghobae Aug 15, 2026
721092d
test(docx): cover intrinsic view branches
seonghobae Aug 15, 2026
8eb8f85
test(docx): reject proxy sources without prototype effects
seonghobae Aug 16, 2026
cf1f657
test(docx): target source-brand prototype trap
seonghobae Aug 16, 2026
2eddea7
fix(docx): brand binary sources without prototype effects
seonghobae Aug 16, 2026
b6d9c69
test(docx): cover blobless source rejection
seonghobae Aug 16, 2026
c7c3b2e
test(docx): contain hostile limit reflection failures
seonghobae Aug 16, 2026
015a9cd
fix(docx): contain hostile limit reflection failures
seonghobae Aug 16, 2026
f3135b0
test(docx): reject hostile FileReader results without reflection
seonghobae Aug 16, 2026
26380af
fix(docx): validate FileReader result without prototype traversal
seonghobae Aug 16, 2026
88e38d2
test(docx): reject Blob prototype interposition
seonghobae Aug 18, 2026
d250b68
fix(docx): capture trusted Blob capabilities
seonghobae Aug 18, 2026
a103245
test(docx): use Blob-safe fixture buffer
seonghobae Aug 18, 2026
0bc6729
fix(docx): avoid Blob accessor interposition
seonghobae Aug 18, 2026
6538d44
test(docx): restore optional Blob byte reader safely
seonghobae Aug 18, 2026
150fe2f
test(docx): pin Blob capability boundary
seonghobae Aug 18, 2026
dd6f4c0
fix(docx): pin Blob platform capabilities
seonghobae Aug 18, 2026
e93520d
test(docx): pin Blob byte-reader value capability
seonghobae Aug 19, 2026
e875499
fix(docx): pin Blob byte-reader capability
seonghobae Aug 19, 2026
8f613b3
test(docx): assert module-init Blob capability capture
seonghobae Aug 19, 2026
f43db4d
test(docx): acquire editor capabilities once
seonghobae Aug 19, 2026
31c00ec
fix(docx): capture editor capabilities once
seonghobae Aug 19, 2026
75e9465
test(docx): expose mutable ArrayBuffer view authority
seonghobae Aug 19, 2026
0c3bd5b
fix(docx): capture ArrayBuffer view classifier
seonghobae Aug 19, 2026
77a9c9d
test(docx): expose mutable TextDecoder authority
seonghobae Aug 19, 2026
d25e013
fix(docx): capture ZIP text decoders
seonghobae Aug 19, 2026
fea6d19
fix(docx): capture XML text decoder
seonghobae Aug 19, 2026
29779fd
test(docx): reject live FileReader authority
seonghobae Aug 19, 2026
440332e
fix(docx): keep Blob reads on captured intrinsic
seonghobae Aug 19, 2026
4b434d8
test(docx): isolate FileReader fallback authority
seonghobae Aug 19, 2026
3549070
fix(docx): capture FileReader fallback authority
seonghobae Aug 19, 2026
9cc7d6b
test(docx): isolate decompression stream authority
seonghobae Aug 19, 2026
b2829c5
fix(docx): capture decompression stream authority
seonghobae Aug 19, 2026
a429a23
test(docx): make fallback capability fixture portable
seonghobae Aug 19, 2026
647cf3d
test(docx): initialize hostile fallback capability before import
seonghobae Aug 19, 2026
235af3d
test(docx): align fallback checks with captured capabilities
seonghobae Aug 19, 2026
c699787
test(docx): isolate deflate copy capability
seonghobae Aug 19, 2026
e4761aa
fix(docx): capture deflate copy intrinsic
seonghobae Aug 19, 2026
bcff73b
test(docx): isolate deflate stream piping capability
seonghobae Aug 19, 2026
b5bee17
fix(docx): capture deflate piping intrinsic
seonghobae Aug 19, 2026
bc49f1f
test(docx): restore inherited Uint8Array.from safely
seonghobae Aug 19, 2026
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ runtime.
| Text-position selector | `@contextualwisdomlab/cwl-editor/text-position-selector` | React-free deterministic W3C `TextPositionSelector` projection core |
| Autosave | `@contextualwisdomlab/cwl-editor/autosave` | Provider-neutral bounded single-flight persistence coordination |
| Headless Markdown | `@contextualwisdomlab/cwl-editor/markdown` | React-free deterministic Markdown/HTML/email/plain-text conversion |
| DOCX import | `@contextualwisdomlab/cwl-editor/docx` | Active-PR bounded, framework-neutral WordprocessingML import into inert Inkspan document data |
| Styles | `@contextualwisdomlab/cwl-editor/styles.css` | Editor layout and theming |
| Full fonts | `@contextualwisdomlab/cwl-editor/fonts.css` | KR/EN/JP/SC/TC/VI offline font bundle |
| Latin fonts | `@contextualwisdomlab/cwl-editor/fonts-latin.css` | Smaller Latin/Vietnamese-only bundle |
Expand Down Expand Up @@ -217,7 +218,6 @@ policy. See [`docs/selection-lifecycle.md`](docs/selection-lifecycle.md) and

Delayed autosave, AI, template, and review results can be applied under the
strong revision from which they started:

```tsx
const result = await editorRef.current?.restoreDocumentEnvelopeIfMatch(
expectedRevision.strongEntityTag,
Expand Down
20 changes: 14 additions & 6 deletions docs/package-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ integrations.
| `@contextualwisdomlab/cwl-editor/autosave` | Framework-independent autosave queue/session APIs for bounded local save ordering and host-owned durable concurrency |
| `@contextualwisdomlab/cwl-editor/collaboration` | Optional Yjs collaboration surface with host-owned transport and lifecycle |
| `@contextualwisdomlab/cwl-editor/converter` | Framework-independent base64 and data-URI utilities |
| `@contextualwisdomlab/cwl-editor/docx` | `implemented_on_active_pr` — framework-independent bounded DOCX/WordprocessingML import into inert Inkspan document data; no transport, credentials, macros, external relationships, or model authority |
| `@contextualwisdomlab/cwl-editor/envelope-identity` | Framework-independent identity-only envelope routing for bounded schema identity inspection; migration remains host-owned |
| `@contextualwisdomlab/cwl-editor/revision-evidence` | Framework-independent revision evidence and document-transition evidence for local content equality/lineage claims |
| `@contextualwisdomlab/cwl-editor/text-position-selector` | `implemented_on_protected_main` — React-free text-position projection core implementing W3C `TextPositionSelector`; interactive capture, revision binding, authorization, persistence, and re-anchoring remain outside this subpath |
Expand Down Expand Up @@ -57,12 +58,19 @@ embedded in the npm tarball.
and collaboration entrypoints. It is declared in Inkspan's package
dependencies so the consumer's package manager installs and resolves it; it
is not merely a type-only dependency.
- The framework-independent autosave, converter, envelope-identity,
- The framework-independent autosave, converter, DOCX, envelope-identity,
revision-evidence, text-position-selector, and Markdown entrypoints do not
require React UI, a mounted editor, naruon, contextual-orchestrator, a
database, provider credentials, or host transport. Their individual
package-consumer gates additionally prevent framework dependencies from
leaking into subpaths whose public contracts exclude them.
- The DOCX subpath accepts bounded local ZIP/Office Open XML bytes and converts
supported WordprocessingML structure into inert Inkspan document data. It
validates OPC content types/relationships, rejects active/external authority,
and performs no network fetch, macro execution, credential lookup, model call,
durable persistence, or host authorization. Unsupported document semantics
fail as bounded import errors rather than being executed or silently granted
authority.
- The Markdown subpath exposes `markdownToHtml`, `htmlToMarkdown`,
`normalizeMarkdown`, `markdownToEmailHtml`, `markdownToPlainText`, and
`htmlToPlainText` plus their option types. It bundles deterministic conversion
Expand Down Expand Up @@ -92,9 +100,9 @@ embedded in the npm tarball.
import it, and bundlers can retain the separate dependency boundary.
- Importing any JavaScript entrypoint in Node.js must not require a browser DOM.
Browser-only work begins when a host mounts the editor or calls APIs that
explicitly consume browser objects such as `File` or `Blob`. The Markdown
conversion surface remains Node-importable; HTML-to-Markdown uses its bounded
non-fetching parser fallback when no browser `document` exists.
explicitly consume browser objects such as `File` or `Blob`. The Markdown and
DOCX conversion surfaces remain Node-importable; HTML-to-Markdown uses its
bounded non-fetching parser fallback when no browser `document` exists.
- CSS and font entrypoints resolve as files and are not executable JavaScript.

## Release verification
Expand All @@ -108,7 +116,7 @@ production library build. The verification chain:
3. confirms required licenses, declarations, styles, and font assets ship;
4. rejects internal source, tests, demos, Office files, coverage output, and
workflow files from the npm tarball;
5. imports the root, collaboration, converter, autosave, envelope-identity,
5. imports the root, collaboration, converter, autosave, DOCX, envelope-identity,
revision-evidence, text-position-selector, and Markdown surfaces through their
dedicated packed-consumer checks, including framework-free isolation where
that is part of the public contract;
Expand Down Expand Up @@ -159,4 +167,4 @@ observable consumer behavior.
- npm `pack`, including dry-run and JSON manifest output:
<https://docs.npmjs.com/cli/v11/commands/npm-pack>
- npm package publication and the `files` allowlist:
<https://docs.npmjs.com/cli/v11/commands/npm-publish>
<https://docs.npmjs.com/cli/v11/commands/npm-publish>
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
"import": "./dist/cwl-converter.js",
"require": "./dist/cwl-converter.cjs"
},
"./docx": {
"types": "./dist/docx/index.d.ts",
"import": "./dist/cwl-docx.js",
"require": "./dist/cwl-docx.cjs"
},
"./envelope-identity": {
"types": "./dist/envelope-identity/index.d.ts",
"import": "./dist/cwl-envelope-identity.js",
Expand Down Expand Up @@ -99,7 +104,7 @@
],
"scripts": {
"dev": "vite",
"build": "tsc --noEmit && vite build && vite build --config vite.collaboration.config.ts && vite build --config vite.converter.config.ts && vite build --config vite.envelope-identity.config.ts && vite build --config vite.revision-evidence.config.ts && vite build --config vite.autosave.config.ts && vite build --config vite.text-position-selector.config.ts && vite build --config vite.markdown.config.ts && node ./scripts/copy-styles.mjs",
"build": "tsc --noEmit && vite build && vite build --config vite.collaboration.config.ts && vite build --config vite.converter.config.ts && vite build --config vite.docx.config.ts && vite build --config vite.envelope-identity.config.ts && vite build --config vite.revision-evidence.config.ts && vite build --config vite.autosave.config.ts && vite build --config vite.text-position-selector.config.ts && vite build --config vite.markdown.config.ts && node ./scripts/copy-styles.mjs",
"build:demo": "vite build --config vite.demo.config.ts",
"fonts": "node ./scripts/fetch-fonts.mjs",
"preview": "vite preview",
Expand All @@ -108,7 +113,7 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"test:package-config": "node --test ./scripts/revision-evidence-consumer-config.test.mjs ./scripts/release-metadata.test.mjs ./scripts/javascript-runtime-authority.test.mjs",
"verify:package": "pnpm run test:package-config && node ./tests/package/verify-package.mjs && node ./tests/package/verify-editor-placeholder-package.mjs && node ./scripts/verify-canonical-envelope-package.mjs && node ./scripts/verify-revision-evidence-package.mjs && node ./scripts/verify-framework-free-revision-evidence-package.mjs && node ./scripts/verify-framework-free-envelope-identity-package.mjs && node ./tests/package/verify-framework-free-autosave-package.mjs && node ./scripts/verify-text-position-selector-package.mjs && node ./scripts/verify-text-position-selector-subpath-package.mjs && node ./scripts/verify-markdown-subpath-package.mjs"
"verify:package": "pnpm run test:package-config && node ./tests/package/verify-package.mjs && node ./tests/package/verify-editor-placeholder-package.mjs && node ./scripts/verify-canonical-envelope-package.mjs && node ./scripts/verify-revision-evidence-package.mjs && node ./scripts/verify-framework-free-revision-evidence-package.mjs && node ./scripts/verify-framework-free-envelope-identity-package.mjs && node ./tests/package/verify-framework-free-autosave-package.mjs && node ./scripts/verify-text-position-selector-package.mjs && node ./scripts/verify-text-position-selector-subpath-package.mjs && node ./scripts/verify-markdown-subpath-package.mjs && node ./scripts/verify-docx-subpath-package.mjs"
},
"peerDependencies": {
"react": "^18.0.0 || ^19.0.0",
Expand Down
Loading
Loading