Files
tools/vue/writekit/package.json
T
robonen 551b3bd921
Publish to NPM / Check version changes and publish (push) Successful in 10m0s
fix(writekit): a node selection is a real DOM range, not an absence of one
Selecting an atom used to clear every native range and leave the editable
root focused with NO selection. The browser then invents a caret at the
START of the content, `selectionchange` reads it, and the model's node
selection is overwritten by a text caret in the first block — so the
Enter meant to exit the freshly inserted atom split the opening
paragraph, and typing replaced its text. Reproduced live within a minute
of using the slash menu.

- the bridge now writes a node selection as `range.selectNode(blockEl)`;
  the read path maps that range to null, so selectionchange keeps its
  hands off the model
- beforeinput guards the node-selection state: browser edits through the
  element-wrapping range are prevented; delete falls through to
  deleteSelection, insertParagraph to exitAtom
- browser regression test walks the exact race: select atom → DOM range
  exists → selectionchange rewrites nothing → Enter lands a paragraph
  below the atom

writekit 0.0.4.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 05:52:54 +07:00

89 lines
2.1 KiB
JSON

{
"name": "@robonen/writekit",
"version": "0.0.4",
"license": "Apache-2.0",
"description": "Headless block-based rich-text writekit for Vue with a registry-driven schema and pluggable CRDT",
"keywords": [
"writekit",
"rich-text",
"wysiwyg",
"block-writekit",
"crdt",
"collaborative",
"vue",
"tools"
],
"author": "Robonen Andrew <robonenandrew@gmail.com>",
"repository": {
"type": "git",
"url": "git+https://github.com/robonen/tools.git",
"directory": "vue/writekit"
},
"packageManager": "pnpm@11.18.0",
"engines": {
"node": ">=24.16.0"
},
"type": "module",
"sideEffects": false,
"files": [
"dist"
],
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./*": {
"import": {
"types": "./dist/*/index.d.mts",
"default": "./dist/*/index.mjs"
},
"require": {
"types": "./dist/*/index.d.cts",
"default": "./dist/*/index.cjs"
}
}
},
"scripts": {
"lint:check": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest run",
"bench": "vitest bench",
"dev": "vitest dev",
"build": "tsdown"
},
"devDependencies": {
"@robonen/eslint": "workspace:*",
"@robonen/tsconfig": "workspace:*",
"@robonen/tsdown": "workspace:*",
"@vitest/browser": "catalog:",
"@vitest/browser-playwright": "^4.1.10",
"@vue/test-utils": "catalog:",
"eslint": "catalog:",
"jsdom": "catalog:",
"playwright": "^1.62.0",
"tsdown": "catalog:",
"unplugin-vue": "^7.2.0",
"vitest-browser-vue": "^2.1.0",
"vue": "catalog:",
"vue-tsc": "^3.3.8"
},
"dependencies": {
"@robonen/crdt": "workspace:*",
"@robonen/platform": "workspace:*",
"@robonen/primitives": "workspace:*",
"@robonen/stdlib": "workspace:*",
"@robonen/vue": "workspace:*",
"@vue/shared": "catalog:"
},
"peerDependencies": {
"vue": "^3.5"
}
}