{"_id":"lexical-code-no-prism","name":"lexical-code-no-prism","dist-tags":{"latest":"0.41.0"},"versions":{"0.41.0":{"name":"lexical-code-no-prism","description":"Fork of @lexical/code with Prism.js syntax highlighting removed. Drop-in replacement for @lexical/code.","keywords":["lexical","editor","rich-text","code"],"license":"MIT","version":"0.41.0","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"peerDependencies":{"@lexical/utils":">=0.28.0","lexical":">=0.28.0"},"devDependencies":{"@lexical/utils":"^0.41.0","lexical":"^0.41.0","tsup":"^8.0.0","typescript":"^5.0.0"},"sideEffects":false,"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit"},"_id":"lexical-code-no-prism@0.41.0","_integrity":"sha512-cFgCC/VMXjch58iod4TIhBHb1bx7Da8IdduUwltua581dhLmugcaFnUvgC0naBaPeYVuirA6cuDsyOdPgEEDLA==","_resolved":"/private/var/folders/j2/0l767d9j63qcv0rxzl_1zvrc0000gn/T/2517e7bd195f7467029967e52d8dc148/lexical-code-no-prism-0.41.0.tgz","_from":"file:lexical-code-no-prism-0.41.0.tgz","_nodeVersion":"22.22.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-cFgCC/VMXjch58iod4TIhBHb1bx7Da8IdduUwltua581dhLmugcaFnUvgC0naBaPeYVuirA6cuDsyOdPgEEDLA==","shasum":"0761e0a5dd9ff4c69e21a7966d34421c9013a365","tarball":"https://registry.npmjs.org/lexical-code-no-prism/-/lexical-code-no-prism-0.41.0.tgz","fileCount":16,"unpackedSize":378322,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAxbw7qGxov8l4l6z9/aL+l32KIvvT8oX5z4MWrlug/pAiEAmjBsORdj8Z0+Wt6Z6lIshb53q1m/2/MyqRWAE4gUk+g="}]},"_npmUser":{"name":"innei","email":"tukon479@gmail.com"},"directories":{},"maintainers":[{"name":"innei","email":"tukon479@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lexical-code-no-prism_0.41.0_1772988640126_0.7436957815366465"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-08T16:50:40.125Z","0.41.0":"2026-03-08T16:50:40.266Z","modified":"2026-03-08T16:50:40.788Z"},"maintainers":[{"name":"innei","email":"tukon479@gmail.com"}],"description":"Fork of @lexical/code with Prism.js syntax highlighting removed. Drop-in replacement for @lexical/code.","keywords":["lexical","editor","rich-text","code"],"license":"MIT","readme":"# @lexical/code (No Prism)\n\nDrop-in replacement for `@lexical/code` with **Prism.js removed**.\n\n## What's preserved\n\n- `CodeNode`, `CodeHighlightNode`, `CodeExtension`\n- Keyboard handlers (Tab/Shift+Tab, Alt+Arrow line movement, Home/End)\n- Gutter line numbers\n- DOM import/export (including GitHub code tables)\n- Language metadata and maps\n- Full API surface — identical exports to upstream `@lexical/code`\n\n## What's removed\n\n- `prismjs` dependency (0 bytes of Prism in your bundle)\n- Syntax highlighting / tokenization (code renders as plain text)\n\n## Merge strategy\n\n**Only `FacadePrism.ts` differs from upstream.** All other source files (`index.ts`, `CodeNode.ts`, `CodeHighlightNode.ts`, `CodeExtension.ts`, `CodeHighlighterPrism.ts`, `FlatStructureUtils.ts`) are byte-identical to upstream `@lexical/code`.\n\nWhen upstream updates, merge conflicts are isolated to `FacadePrism.ts` only.\n\nAdditional fork-only files:\n- `src/shared/invariant.ts` — shim for monorepo-internal `shared/invariant`\n- `tsconfig.json` — `paths` aliases for `shared/invariant` and `@lexical/code`\n- `tsup.config.ts` — esbuild alias for `shared/invariant`\n\n## Usage\n\nOverride `@lexical/code` in your package manager:\n\n### pnpm\n\n```json\n{\n  \"pnpm\": {\n    \"overrides\": {\n      \"@lexical/code\": \"npm:@anthropic/lexical-code-no-prism@^0.41.0\"\n    }\n  }\n}\n```\n\n### npm\n\n```json\n{\n  \"overrides\": {\n    \"@lexical/code\": \"npm:@anthropic/lexical-code-no-prism@^0.41.0\"\n  }\n}\n```\n\n### yarn\n\n```json\n{\n  \"resolutions\": {\n    \"@lexical/code\": \"npm:@anthropic/lexical-code-no-prism@^0.41.0\"\n  }\n}\n```\n\n## Custom Tokenizer\n\nYou can provide your own tokenizer (e.g., Shiki) via the `Tokenizer` interface:\n\n```ts\nimport { registerCodeHighlighting, type Tokenizer } from '@lexical/code';\n\nconst myTokenizer: Tokenizer = {\n  defaultLanguage: 'javascript',\n  tokenize(code, language) { /* return tokens */ },\n  $tokenize(codeNode, language) { /* return LexicalNode[] */ },\n};\n\nregisterCodeHighlighting(editor, myTokenizer);\n```\n\n## License\n\nMIT (forked from [facebook/lexical](https://github.com/facebook/lexical))\n","readmeFilename":"README.md","_rev":"1-c83fe93a4abf26c570911cdd736716a8"}