feat(editor): add spell & grammar check engines with decorations

Wire real spell-checking into the editor via hunspell-wasm (bundled en_US
dictionary) and an optional LanguageTool grammar client.

- spell/: HunspellSpellEngine wrapper, pure spell logic, base64 en_US dict
- grammar/: LanguageToolEngine grammar client and pure grammar logic
- decorations/: collectBlock text assembly, offset-mapped CheckService,
  buildCheckDecorations (flat DecorationSet, inline spell/grammar marks)
- export engines and types from editor index; add hunspell-wasm dep

Verified: typecheck (6 pkgs), tests (all pass), lint (6 pkgs), and web
build all green.
This commit is contained in:
Schwitzz
2026-10-27 12:52:29 -05:00
parent b92129b62c
commit d310635b65
13 changed files with 775 additions and 1 deletions
+2 -1
View File
@@ -21,10 +21,11 @@
"dependencies": {
"@pubscript/core": "workspace:*",
"@tiptap/core": "3.32.0",
"@tiptap/extension-text-style": "3.32.0",
"@tiptap/pm": "3.32.0",
"@tiptap/react": "3.32.0",
"@tiptap/starter-kit": "3.32.0",
"@tiptap/extension-text-style": "3.32.0"
"hunspell-wasm": "^0.3.0"
},
"devDependencies": {
"@types/node": "^22.10.2",