{"_id":"@bayonai/rich-text-editor","_rev":"5-daa2471c5d5a0593d2d748ca9f83dc2b","name":"@bayonai/rich-text-editor","dist-tags":{"latest":"1.0.3"},"versions":{"0.1.2":{"name":"@bayonai/rich-text-editor","version":"0.1.2","license":"MIT","_id":"@bayonai/rich-text-editor@0.1.2","maintainers":[{"name":"toledoroy","email":"toledoroy@gmail.com"}],"dist":{"shasum":"af1bc79e1eb74f4d80b7b0c2b240e917d3766e2d","tarball":"https://registry.npmjs.org/@bayonai/rich-text-editor/-/rich-text-editor-0.1.2.tgz","fileCount":91,"integrity":"sha512-fUaaE4M/hroTVU6LHwb1ZZnlfZOOkhzcv9UdTsOyzADbLDQ08XOnQ47vpbI5KnETBw3g2kVAfCbMcM4tuXl66w==","signatures":[{"sig":"MEQCIGHw4LS6ApDfk7YDeg4E8d8fVpaf9S3ku+8tqXDsK43gAiAeZGOXebkIvXJ7IjMBPO0kFv4SRVpbEyZGZf2AazPl9Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":269477},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist-cjs/index.js"},"./react":{"types":"./dist/react/index.d.ts","import":"./dist/react/index.js","require":"./dist-cjs/react/index.js"}},"gitHead":"9938b7a39c37a727ff17c731381bd53dbb3685db","scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run","build":"tsc -p tsconfig.json && node scripts/write-esm-extensions.mjs && tsc -p tsconfig.cjs.json && node scripts/write-cjs.mjs"},"_npmUser":{"name":"toledoroy","email":"toledoroy@gmail.com"},"_npmVersion":"10.9.4","description":"Reusable rich text editing, rendering, and unsaved-change session controls.","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"react":"19.2.4","vitest":"^4.1.6","react-dom":"19.2.4","typescript":"^5","@types/react":"^19","@types/react-dom":"^19"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rich-text-editor_0.1.2_1782282107211_0.4938555412893495","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@bayonai/rich-text-editor","version":"1.0.0","license":"MIT","_id":"@bayonai/rich-text-editor@1.0.0","maintainers":[{"name":"toledoroy","email":"toledoroy@gmail.com"}],"dist":{"shasum":"65419a38db685b3fced5be310d70e739063285dd","tarball":"https://registry.npmjs.org/@bayonai/rich-text-editor/-/rich-text-editor-1.0.0.tgz","fileCount":123,"integrity":"sha512-0OAz3xhDUJTtjpv1Ee6swzecoa4Mb7VpHrGAtD+da/gU/DdOfLuP/+8tzFrz5G0ZbB25ecxv6Pzc4LbcFZzbZg==","signatures":[{"sig":"MEUCIQD3eUl3ZBydo38nM3ityIePLl9kDs222JzKTox76FTaJwIgSCkp4d1a5ZmOg+KWsXS0FJ4mql8lo7wDOmrvo1dwPBU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":667312},"main":"./dist-cjs/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist-cjs/index.js"},"./react":{"types":"./dist/react/index.d.ts","import":"./dist/react/index.js","require":"./dist-cjs/react/index.js"}},"gitHead":"536e1ef782bdc37fe48f1bd5994a7a39f258b312","scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run","build":"tsc -p tsconfig.json && node scripts/write-esm-extensions.mjs && tsc -p tsconfig.cjs.json && node scripts/write-cjs.mjs"},"_npmUser":{"name":"toledoroy","email":"toledoroy@gmail.com"},"_npmVersion":"11.17.0","description":"Reusable rich text editing, rendering, and unsaved-change session controls.","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"react":"19.2.4","vitest":"^4.1.6","react-dom":"19.2.4","typescript":"^5","@types/react":"^19","@types/react-dom":"^19"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rich-text-editor_1.0.0_1783138229546_0.8784715897421562","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bayonai/rich-text-editor","version":"1.0.1","license":"MIT","_id":"@bayonai/rich-text-editor@1.0.1","maintainers":[{"name":"toledoroy","email":"toledoroy@gmail.com"}],"dist":{"shasum":"0736f61d77917d892145030f59eb4a7f1d1c5666","tarball":"https://registry.npmjs.org/@bayonai/rich-text-editor/-/rich-text-editor-1.0.1.tgz","fileCount":119,"integrity":"sha512-cR5Nk9tUKukOvOZTUc1Ejz6TEn64h2A/dGe5sgQ39ogcUujL9kHxKhS5jT35x4u/0krpR3vBi5OsZd3foJLg8A==","signatures":[{"sig":"MEUCIFqWsbxm+R5ceZ5/wQb+4MD3/2PH8C56/ga8O97sF9OsAiEAnl9uNn3dQyq3LtJuj4mRNzAXUkx30yDu02jEx9QUF08=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":701144},"main":"./dist-cjs/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist-cjs/index.js"},"./react":{"types":"./dist/react/index.d.ts","import":"./dist/react/index.js","require":"./dist-cjs/react/index.js"}},"gitHead":"5269de08b23ea0936076aaffd128acdb37ab569b","scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run","build":"tsc -p tsconfig.json && node scripts/write-esm-extensions.mjs && tsc -p tsconfig.cjs.json && node scripts/write-cjs.mjs","coverage":"vitest run --coverage"},"_npmUser":{"name":"toledoroy","email":"toledoroy@gmail.com"},"_npmVersion":"10.9.8","description":"Reusable rich text editing, rendering, and unsaved-change session controls.","directories":{},"_nodeVersion":"22.23.1","_hasShrinkwrap":false,"devDependencies":{"react":"19.2.4","vitest":"^4.1.6","react-dom":"19.2.4","typescript":"^5","@types/react":"^19","@types/react-dom":"^19"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rich-text-editor_1.0.1_1783730585882_0.44837009183796783","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bayonai/rich-text-editor","version":"1.0.2","license":"MIT","_id":"@bayonai/rich-text-editor@1.0.2","maintainers":[{"name":"toledoroy","email":"toledoroy@gmail.com"}],"dist":{"shasum":"1af2f1b52ffb2338450887a8b5331fd37e35adef","tarball":"https://registry.npmjs.org/@bayonai/rich-text-editor/-/rich-text-editor-1.0.2.tgz","fileCount":119,"integrity":"sha512-DrO9O/XY5TIxPHg0fc6gRJNfEqbV3US4IrZsHZxtUnZeZv8vdrz+5sipZUOYyd0Yko96dDIOI4MHuEVljCvqUA==","signatures":[{"sig":"MEQCIB/p/J273jAQ64Fvq4f+volL/Lm4jveSElSOg9hJzNukAiA4s2c4R/J+trbLHtXWHyvPi2M1Fg6WGxJWcVTjLJz7oA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":767036},"main":"./dist-cjs/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist-cjs/index.js"},"./react":{"types":"./dist/react/index.d.ts","import":"./dist/react/index.js","require":"./dist-cjs/react/index.js"}},"gitHead":"1f0ac67d5b6f581f74a97947d1575489a7ef7a46","scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run","build":"tsc -p tsconfig.json && node scripts/write-esm-extensions.mjs && tsc -p tsconfig.cjs.json && node scripts/write-cjs.mjs","prepack":"corepack pnpm run build","coverage":"vitest run --coverage","pack:smoke":"corepack pnpm run build && npm pack --dry-run --access public"},"_npmUser":{"name":"toledoroy","email":"toledoroy@gmail.com"},"_npmVersion":"10.9.8","description":"Reusable rich text editing, rendering, and unsaved-change session controls.","directories":{},"_nodeVersion":"22.23.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"19.2.4","vitest":"^4.1.6","react-dom":"19.2.4","typescript":"^5","@types/react":"^19","@types/react-dom":"^19"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rich-text-editor_1.0.2_1784429968496_0.03319075683458306","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bayonai/rich-text-editor","version":"1.0.3","description":"Reusable rich text editing, rendering, and unsaved-change session controls.","license":"MIT","type":"module","main":"./dist-cjs/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist-cjs/index.js"},"./react":{"types":"./dist/react/index.d.ts","import":"./dist/react/index.js","require":"./dist-cjs/react/index.js"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.json && node scripts/write-esm-extensions.mjs && tsc -p tsconfig.cjs.json && node scripts/write-cjs.mjs","coverage":"vitest run --coverage","lint":"tsc --noEmit -p tsconfig.json","pack:smoke":"corepack pnpm run build && npm pack --dry-run --access public","prepack":"corepack pnpm run build","test":"vitest run","test:coverage":"vitest run --coverage"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"devDependencies":{"@types/react":"^19","@types/react-dom":"^19","react":"19.2.4","react-dom":"19.2.4","typescript":"^5","vitest":"^4.1.6"},"_id":"@bayonai/rich-text-editor@1.0.3","gitHead":"3d4b1cd5aa8c39c1b7cc7834fc970a4d9d1363ce","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-o9U43YEfm/pBM3idA83gEtY+QINAORwO5gq/ed9yIlLzIcDWWm0SOLwgecwdzDby1JGn7WzR/MIbWM7D4u21Kw==","shasum":"d0ff20797f5db3bd966000e35f598abf038f6de7","tarball":"https://registry.npmjs.org/@bayonai/rich-text-editor/-/rich-text-editor-1.0.3.tgz","fileCount":131,"unpackedSize":983600,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCVYmXwO9PWAYLSnQ9SuUXDE9PFNJm7DrKQ/Rc6Q7M1iAIgYOvl3l3Stc6aY6zC5FbnPXcsaaEX+obCCMN9p6TprIA="}]},"_npmUser":{"name":"toledoroy","email":"toledoroy@gmail.com"},"directories":{},"maintainers":[{"name":"toledoroy","email":"toledoroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rich-text-editor_1.0.3_1787044405111_0.11623870231347522"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-24T06:21:46.925Z","modified":"2026-08-18T09:13:25.411Z","0.1.2":"2026-06-24T06:21:47.344Z","1.0.0":"2026-07-04T04:10:29.698Z","1.0.1":"2026-07-11T00:43:06.012Z","1.0.2":"2026-07-19T02:59:28.629Z","1.0.3":"2026-08-18T09:13:25.255Z"},"license":"MIT","description":"Reusable rich text editing, rendering, and unsaved-change session controls.","maintainers":[{"name":"toledoroy","email":"toledoroy@gmail.com"}],"readme":"# @bayonai/rich-text-editor\n\nReusable rich-text document utilities, native React editing components, and\nunsaved-change session controls.\n\n## Exports\n\n- `@bayonai/rich-text-editor` provides document types, sanitization,\n  serialization, Markdown/JSON import-export adapters, comparison, statistics,\n  and session controllers.\n- `@bayonai/rich-text-editor/react` provides the editor, renderer,\n  `EditorSessionProvider`, session hooks, and the Save/Discard/Stay dialog.\n\nThe package has no Next.js, Firebase, or application-domain dependencies.\nHosts provide controlled document values, optional metadata, persistence\ncallbacks, and navigation adapters.\n\n## Save Contract\n\n`EditorSessionOptions.onSave` receives the controlled\n`{ document, metadata }` session value and returns a promise. The package marks\nthe saved snapshot clean only after that promise resolves; rejected saves leave\nthe session dirty so the host can show the unchanged editor and offer retry.\nThe package does not define transport or persistence fields such as entry IDs,\n`blockIds`, callable names, offline queues, or partial-update payloads. Hosts\nown that mapping at their application save boundary. This contract is part of\nthe versioned `1.0.1` release notes in [`CHANGELOG.md`](./CHANGELOG.md).\n\n## Maintainer Notes\n\nInternal structure and behavior contracts are documented in\n[`BEHAVIOR.md`](./BEHAVIOR.md). Read that file before changing tree-row,\ntoggle, cursor, clipboard, or persistence behavior.\n\n## Editor Capabilities\n\n- Native rich-text body editing with headings, quotes, code, dividers,\n  bullets, ordered bullets, checkboxes, toggles, image placeholders, and\n  Markdown-compatible text storage.\n- Empty, undesignated blocks expose the special block insertion tool.\n- Typing `/` at the start of an otherwise empty root text block opens a\n  keyboard-accessible command list for inserting core blocks, images, and\n  embedded HTML.\n- Non-empty top-level blocks expose a compact gutter handle for block actions.\n- Dragging a block handle reorders blocks with a visible drop indicator.\n- Clicking a block handle opens icon actions for copy, cut, delete, and close.\n- Finishing a text selection across multiple blocks converts it into a\n  Notion-style block selection with a restrained highlight and one group action\n  handle. The selection supports copy, cut, delete, and drag/reorder while\n  preserving nested subtrees and visual order.\n- Cmd/Ctrl+C, Cmd/Ctrl+X, Backspace, and Delete operate on a block selection;\n  Escape or a normal click returns to caret editing. Same-block selections keep\n  the inline formatting toolbar.\n- Selections containing a view-only referenced block disable destructive and\n  clipboard-cut actions. Referenced roots can still be reordered at the top\n  level; a selected parent containing a referenced descendant cannot move.\n- Copy and cut write readable plain text to the clipboard; cut removes the\n  block only after the clipboard write succeeds.\n- Deleting the last block preserves one empty paragraph so the editor remains\n  writable.\n- Checkbox rows can be created with the `[]` shortcut, reordered individually,\n  copied, cut, and deleted. Pressing Enter from a checkbox creates the next\n  checkbox, and Backspace at the start of a checkbox row converts that row back\n  to a paragraph.\n- Bullet rows can be created with the `* ` shortcut, and ordered rows can be\n  created with the `1. ` shortcut. Empty list-like rows show placeholders\n  instead of selecting placeholder text.\n- Bullet, ordered, checkbox, and toggle rows can hold nested children. Pressing\n  Tab indents a nestable row under the previous compatible row, and Shift+Tab\n  promotes it one level. Paragraph, heading, quote, code, divider, and image\n  blocks remain flat. Editable and read-only nested rows render as recursive\n  `ul`/`ol` plus `li` trees so list-like content keeps semantic list structure.\n- Toggle rows render as collapsible sections in read-only output and preserve\n  their collapsed state in the stored block. Editable toggles can also be\n  collapsed and expanded without dropping child content.\n- Browser-native transcription can be enabled by hosts with the editor's\n  `transcriptionEnabled` option. It defaults to enabled, uses the browser\n  `SpeechRecognition` or `webkitSpeechRecognition` API when available, inserts\n  final transcript text into the current editor body, and never uploads or\n  stores audio. Mobile Safari is treated as unavailable because its prefixed\n  recognition sessions can get stuck and leave the editor unusable.\n","readmeFilename":"README.md"}