{"_id":"@arcstudio-labs/electron-system-spellcheck","name":"@arcstudio-labs/electron-system-spellcheck","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@arcstudio-labs/electron-system-spellcheck","version":"0.1.0","description":"Minimal macOS and Windows native system spellchecker addon for Electron","main":"./lib/index.js","types":"./lib/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+https://github.com/arcstudio-labs/electron-system-spellcheck.git"},"publishConfig":{"access":"public"},"scripts":{"install":"node-gyp-build || node-gyp rebuild","build":"node-gyp rebuild","prebuild":"prebuildify --napi --strip","test":"node --test"},"os":["darwin","win32"],"cpu":["x64","arm64"],"dependencies":{"node-addon-api":"^8.3.1","node-gyp-build":"^4.8.4"},"devDependencies":{"node-gyp":"^11.0.0","prebuildify":"^6.0.1"},"engines":{"node":">=18"},"_id":"@arcstudio-labs/electron-system-spellcheck@0.1.0","gitHead":"d23016ac70cf0c57f04fa19812b211e4c0f31631","bugs":{"url":"https://github.com/arcstudio-labs/electron-system-spellcheck/issues"},"homepage":"https://github.com/arcstudio-labs/electron-system-spellcheck#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-ROQYDPS2wxqzE2Nd7BNyeMOZxzceN65maujlihYgBqiPDnhUKpxJmnE3crSWsTb8ahGMpp6/R7yCZzcMqFmlsA==","shasum":"4346d799f3d6db44bad135014749d239e2b78ffd","tarball":"https://registry.npmjs.org/@arcstudio-labs/electron-system-spellcheck/-/electron-system-spellcheck-0.1.0.tgz","fileCount":14,"unpackedSize":97091,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC1qHb0Y4Lw9K5tLWNsiQRluZBTdVuHWVx4t8r1/HxfhwIgUp305QGk8THKlbY9Ym2LCxRIIpX2XygqIlqboAuqOoQ="}]},"_npmUser":{"name":"michihuber","email":"m@michihuber.com"},"directories":{},"maintainers":[{"name":"michihuber","email":"m@michihuber.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/electron-system-spellcheck_0.1.0_1786548942075_0.47632996911145664"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-12T15:35:41.837Z","0.1.0":"2026-08-12T15:35:42.263Z","modified":"2026-08-12T15:35:42.553Z"},"maintainers":[{"name":"michihuber","email":"m@michihuber.com"}],"description":"Minimal macOS and Windows native system spellchecker addon for Electron","homepage":"https://github.com/arcstudio-labs/electron-system-spellcheck#readme","repository":{"type":"git","url":"git+https://github.com/arcstudio-labs/electron-system-spellcheck.git"},"bugs":{"url":"https://github.com/arcstudio-labs/electron-system-spellcheck/issues"},"license":"MIT","readme":"# electron-system-spellcheck\n\nMinimal native system spellchecking addon for Electron/Node.\n\nOriginally forked from Atom's `node-spellchecker`; MIT attribution is preserved in `LICENSE.md`.\n\n## Scope\n\n- macOS: `NSSpellChecker`\n- Windows 10+: Windows Spell Checking API (`ISpellCheckerFactory` / `ISpellChecker`)\n- Node-API via `node-addon-api`\n\nLinux, Hunspell, dictionary downloads/files, DOM/editor integrations, tokenization helpers, and legacy Atom compatibility APIs are intentionally not included.\n\n## API\n\n```ts\ntype SpellingError = { start: number; length: number }\n\nclass SpellChecker {\n  getLanguages(): string[]\n  setLanguage(language: string): boolean\n  check(text: string): SpellingError[]\n  getSuggestions(word: string): string[]\n  addWord(word: string): void\n}\n```\n\n```js\nconst { SpellChecker } = require('@arcstudio-labs/electron-system-spellcheck')\n\nconst checker = new SpellChecker()\nchecker.setLanguage('en-US')\nconsole.log(checker.check('This sentence contains an obviousmisspeling.'))\nconsole.log(checker.getSuggestions('obviousmisspeling'))\n```\n\n`check(text)` passes the complete string to the native OS spellchecker and returns misspelled ranges as JavaScript UTF-16 code-unit `{ start, length }` offsets. The addon does not tokenize text in JavaScript or C++.\n\n## Installation\n\nPublished packages include prebuilt binaries where available. If a matching prebuild is not present for your platform/architecture, installation falls back to `node-gyp rebuild`.\n\n## Platform notes\n\nOn macOS, `NSSpellChecker` is process-shared and has process-global language state. This synchronous wrapper reapplies each instance's selected language before native operations; avoid using one process-global spellchecker concurrently from multiple JS worker threads with different languages.\n\nOn Windows, each `SpellChecker` instance owns the active language-specific `ISpellChecker` and recreates it on `setLanguage()`.\n","readmeFilename":"README.md","_rev":"1-e8819f4f27a6b9a2d506f68aa50bc4e0"}