feat(vue): cherry-pick PR #245 + hardening foundation for vue-editor-robust-implementation#345
Merged
jedrazb merged 4 commits into1.0.0-releasefrom May 4, 2026
Merged
Conversation
Implements a Vue 3 wrapper for the DOCX editor with DocxEditorVue component, BasicToolbar, and useDocxEditor composable. Includes drag-to-select, blinking caret, scroll-aware selection overlay, and working toolbar state updates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ation Adds all Vue components (toolbar, dialogs, context menus, sidebar, overlays), composables (zoom, auto-save, table selection), and i18n support. Fixes toolbar reactivity for font size/family/color by reading marks from first text node in selection range. Fixes page break insertion, style dropdown (with style resolution), page setup re-layout, text color, and clear formatting commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three sets of fixes on top of the cherry-picked Cruiser13 / Lennart Fries commits so the parity build stays green on the hardening branch: 1) Adapter API drift since #245 was authored. The contributor wrote useAutoSave.ts and useTableSelection.ts against an older AutoSaveManager / TableSelectionManager / Subscribable API: - AutoSaveManagerOptions field is `interval` not `intervalMs` - subscribe() takes `() => void`, snapshot is read separately via getSnapshot() (matches React's useSyncExternalStore pattern) - lastSaveTime is `Date | null` not `number | null` - getRecoveryData() returns SavedDocumentData not string - save() is async and takes no args Rewrote both composables to match the current core API while keeping the same Vue-facing return shape. Drop unused `computed` import in i18n/index.ts (causes pre-commit lint trip). 2) Vue package builder: tsup → vite. PR #245 ships .vue SFCs which esbuild (under tsup) can't compile. Switched packages/vue/ to `vite build --lib` with @vitejs/plugin-vue and vite-plugin-dts. External: vue, prosemirror-*, and @eigenpal/docx-editor-core (consumers bring those). Output: index.js (es) + index.cjs + declaration files. Added prosemirror-model to vue's devDeps so the type imports resolve. 3) Core exports map expansion. PR #245 reaches into ~25 deep core subpaths that weren't in the curated exports map after PR #332. Added the missing paths to packages/core/package.json `exports` AND packages/core/tsup.config.ts `entry` so consumers (and the Vue package's build) actually resolve them. New subpaths under: - utils/ (headingCollector, textSelection) - docx/ (parser, rezip) - layout-bridge/ (clickToPositionDom, measuring, toFlowBlocks) - layout-engine/ (types) - layout-painter/ (renderPage) - managers/ (AutoSaveManager, TableSelectionManager, types) - prosemirror/ (commands/{formatting,pageBreak,paragraph}, conversion/fromProseDoc, plugins/selectionTracker, schema, styles) These are framework-adapter integration points the Vue adapter genuinely needs. Audit (post-1.0) should evaluate whether some should fold back into the curated top-level subpaths from #332. Verified: bun run typecheck clean across all 5 packages, bun run build clean, bun run build:parity produces working examples/parity/dist with both /react/ and /vue/ routes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Foundation drop for the vue-editor-robust-implementation OpenSpec change (proposal).
Cherry-picks the three meaningful commits from PR #245 (community Vue 3 implementation) onto a hardening branch off
1.0.0-release, then makes them build cleanly against today's core API.The OpenSpec change documenting the full hardening plan ships in this PR too — proposal, design (22 decisions), specs (vue-adapter, vue-react-parity, framework-isolation-lint), and tasks (~115 items). This PR closes out task §1 (land #245) and §3.4 (audit + reactivity refactor input). Subsequent hardening work continues against this branch.
What's in this PR
Cherry-picked commits (original git authorship preserved)
PR #245 was opened on GitHub by @Cruiser13. The git-author on all three commits is
Lennart Fries <mail@lennartsauter.de>— same person, different name across GitHub username vs gituser.name.389a2643d3370a35117c448026e6d22da52e731ee9git logwill surface these on the merge commit's history once squash-merge happens.Hardening fixes on top (
b77870e, this branch)useAutoSave.tsanduseTableSelection.tsto match today'sAutoSaveManager/TableSelectionManager/SubscribableAPIs. The contributor wrote against an older snapshot —subscribe(() => void)+getSnapshot()(matches React'suseSyncExternalStorepattern),intervalnotintervalMs, etc.tsup/esbuildcan't compile.vueSFCs. Switchedpackages/vue/tovite build --libwith@vitejs/plugin-vueandvite-plugin-dts. Externalized vue, prosemirror-*, and@eigenpal/docx-editor-core. Output: index.js (es) + index.cjs + declarations.packages/core/package.jsonexportsANDtsup.config.tsentry. Audit task tracked in the OpenSpec change.Verification
bun run typecheckclean across all 5 packagesbun run buildcleanbun run build:parityproduces workingexamples/parity/distwith both/react/and/vue/routes1-0-0.docx-editor.dev/vue/once Vercel deploys this branchtasks.md(this is task §1 + §3.4 only; §2-§14 follow on subsequent PRs against this branch)Plumbing
packages/vue/vite.config.ts(replacestsup.config.ts)vite-plugin-dtsandprosemirror-modelto vue devDepspackages/core/package.jsonexports+ matchingtsup.config.tsentriesOut of scope (next PRs)
The full hardening list is in
openspec/changes/vue-editor-robust-implementation/tasks.md:packages/reacttopackages/agent-use/src/react)Attribution
The full Vue implementation foundation comes from PR #245 by @Cruiser13 (git author: Lennart Fries
<mail@lennartsauter.de>). All three commits land on this branch with their original git author metadata intact. The un-stub release notes will credit the community foundation contribution explicitly per task §14.1.🤖 Generated with Claude Code