{"_id":"@b9g/revise","_rev":"9-945f33e210373966fe73648e06c7af2c","name":"@b9g/revise","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.0":{"name":"@b9g/revise","version":"0.1.0","license":"MIT","_id":"@b9g/revise@0.1.0","maintainers":[{"name":"brainkim","email":"briankimpossible@gmail.com"}],"dist":{"shasum":"d6ed657e4ebf46110a0234e1f2c30f735f624a97","tarball":"https://registry.npmjs.org/@b9g/revise/-/revise-0.1.0.tgz","fileCount":27,"integrity":"sha512-pTWbR05UJ9XFHNygStkiUpujZwY+wEENSBqOQGSRTYI2PJ/asAc0AXAUcFDTI0+v7NeDq239b8k6CJXoJZnZuQ==","signatures":[{"sig":"MEUCIQDe9zXHISU3A+5DLzxqwPJMDUkKIS3Az30xY5etg+oXLwIgbY7AHvgMqhYVHhxG+5W8A4VrfqMIZ2b1DoBgt2Hmat0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291945},"type":"module","exports":{"./edit":{"import":"./edit.js","require":"./edit.cjs"},"./keyer":{"import":"./keyer.js","require":"./keyer.cjs"},"./subseq":{"import":"./subseq.js","require":"./subseq.cjs"},"./edit.js":{"import":"./edit.js","require":"./edit.cjs"},"./history":{"import":"./history.js","require":"./history.cjs"},"./keyer.js":{"import":"./keyer.js","require":"./keyer.cjs"},"./subseq.js":{"import":"./subseq.js","require":"./subseq.cjs"},"./history.js":{"import":"./history.js","require":"./history.cjs"},"./contentarea":{"import":"./contentarea.js","require":"./contentarea.cjs"},"./contentarea.js":{"import":"./contentarea.js","require":"./contentarea.cjs"}},"gitHead":"54e1cfda39392f2ef1e8c6c06733e61cb4180189","_npmUser":{"name":"brainkim","email":"briankimpossible@gmail.com"},"_npmVersion":"8.0.0","description":"Little helpers for writing contenteditable-based text editors.","directories":{},"_nodeVersion":"16.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.3","jest":"^26.6.3","eslint":"^7.18.0","rollup":"^2.38.0","ts-jest":"^26.4.4","ts-node":"^9.1.1","prettier":"^2.2.1","typescript":"^4.1.2","@types/jest":"^26.0.20","magic-string":"^0.25.7","eslint-plugin-jest":"^24.1.3","eslint-plugin-react":"^7.22.0","eslint-config-prettier":"^7.2.0","eslint-plugin-prettier":"^3.3.1","@typescript-eslint/parser":"^4.14.0","rollup-plugin-typescript2":"^0.29.0","@typescript-eslint/eslint-plugin":"^4.14.0"},"_npmOperationalInternal":{"tmp":"tmp/revise_0.1.0_1635364573851_0.897811042300761","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@b9g/revise","version":"0.1.1","license":"MIT","_id":"@b9g/revise@0.1.1","maintainers":[{"name":"brainkim","email":"briankimpossible@gmail.com"}],"dist":{"shasum":"6b596c07c1c3f2c2e0ea94ed2161e9d140781b7c","tarball":"https://registry.npmjs.org/@b9g/revise/-/revise-0.1.1.tgz","fileCount":27,"integrity":"sha512-V0jwrrbtmYUn0lnUW9zUXNGdwTko1iI/WcDAJEtx7Vkmrq3OmTdaJcQgSI68Mac+0lEGeJEt1pi7IR7YzzZZjw==","signatures":[{"sig":"MEQCIGlrCbmDahTNE7gxNfHg2+6C+uWg0xwWuR1pccX4GukVAiB11kkmoLNTOYKwZLFxkXsdZl3aJGwjQKVFs0Q9nGE4Zg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":293747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzHDgCRA9TVsSAnZWagAAoCgP/2i9OJ1aI1FvG9+QXTbb\n9jsMf4xI9Sy5QMTjhdJUdyDmrgGJ6fQv1tz40x+U29q0uOnyAU6ZsQRMoKXN\nMXzNi0QDmrRHpXsUcaDB5QsWINzUC4d6YSMEZvs/Ga8wziMKnSQ3ZLtQhfbQ\ntcl2ofSyBqwK5fSiuJTNbGf4FQ6mTVmTtBNaRhXVnR2ypI0X95XPPNrhu4N8\nBd4maDEBbLDRUjL3hwWuofvorzQAQGrO91fetRvwIo+v8/NK8KAfXq0Wn9+8\nWLyGnka7GfUh0i/pTp5jQvJG+U/GPKcB+GGXM3XtHfHFN/hWgAAk5Tx0L2QY\nJ9i32bTezdJvyvGZGf7Hc2nEJ2zblxZ9jBaAN6MVpF45RAFzKlVRaKuEn428\nMnxxiDE69jz3bH+/g9HIZMAWqemu7YQt5sA7+Im5dfd0uFZBZ1XZXi27ei3e\n5fwhdsqlprQ1qQdLXypaW9NgBOn6CTxd1r7Y0eKA1zv5blQaAyvIsyddnQHj\nlIkwC8gBxrWGXM9F5Kl+bnU39Dd85ZkJXbJVW9+B5GobO2bbM7bIvHPEi6sN\n4y1ZZjM8cCu/kANpVk0UifX7viI7DqLCwPK9DbHKoty9DmidcPMz+ZsnCtLU\nsF4N+7gM2PWI8mpWfbyj82DPaKnz/ePWeY4mschjBiojdP6peV1Tt91idSHy\nQx5e\r\n=N9i3\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","exports":{"./edit":{"import":"./edit.js","require":"./edit.cjs"},"./keyer":{"import":"./keyer.js","require":"./keyer.cjs"},"./subseq":{"import":"./subseq.js","require":"./subseq.cjs"},"./edit.js":{"import":"./edit.js","require":"./edit.cjs"},"./history":{"import":"./history.js","require":"./history.cjs"},"./keyer.js":{"import":"./keyer.js","require":"./keyer.cjs"},"./subseq.js":{"import":"./subseq.js","require":"./subseq.cjs"},"./history.js":{"import":"./history.js","require":"./history.cjs"},"./contentarea":{"import":"./contentarea.js","require":"./contentarea.cjs"},"./contentarea.js":{"import":"./contentarea.js","require":"./contentarea.cjs"}},"gitHead":"12d6176d4ae5df93453786afb6d3949e2cb0bc03","_npmUser":{"name":"brainkim","email":"briankimpossible@gmail.com"},"_npmVersion":"7.24.2","description":"Little helpers for writing contenteditable-based text editors.","directories":{},"_nodeVersion":"16.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.3","jest":"^26.6.3","eslint":"^7.18.0","rollup":"^2.38.0","ts-jest":"^26.4.4","ts-node":"^9.1.1","prettier":"^2.2.1","typescript":"^4.1.2","@types/jest":"^26.0.20","magic-string":"^0.25.7","eslint-plugin-jest":"^24.1.3","eslint-plugin-react":"^7.22.0","eslint-config-prettier":"^7.2.0","eslint-plugin-prettier":"^3.3.1","@typescript-eslint/parser":"^4.14.0","rollup-plugin-typescript2":"^0.29.0","@typescript-eslint/eslint-plugin":"^4.14.0"},"_npmOperationalInternal":{"tmp":"tmp/revise_0.1.1_1636318185286_0.14621491563126","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@b9g/revise","version":"0.1.2","license":"MIT","_id":"@b9g/revise@0.1.2","maintainers":[{"name":"brainkim","email":"briankimpossible@gmail.com"}],"dist":{"shasum":"efefa3a50cd8835fe8aabd626c995c87efa3ee7b","tarball":"https://registry.npmjs.org/@b9g/revise/-/revise-0.1.2.tgz","fileCount":23,"integrity":"sha512-sZJfHyDMmjLMIuPjEOUyE1ML+Y681NfvIaRfoPlj2cwb/kklj3a8ucHKHjbJhApwUkBZ1OrNY8OFiWTC/rT8Bw==","signatures":[{"sig":"MEQCIFU8nq8+jIQiolFq1v1PGapNL3xcoLvBm/ewLj8gzpwnAiArQHW8+eldHfaMosW2yS3OgX5AMSjl54YOSurDvf1/fQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":426416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDHRnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqW8w//UTj2IyCrPAjJZYHWCWf2JOMBo30RPkdBgCoBqYxaT6LoEewQ\r\neGMZmZiBVyuD4aP+fcF05usJE67SE4mF4RyHIeBWM7W9DxBE8/5zegLEQxWC\r\nL+DByM2TSYJ23ZkMU0krzGwKm9q8Re6asw797PNmSU2hPYpEimNY1PAIk4JX\r\nWj9lwAqeoo53pASWLyVoke+VQiAe+gR0yOtGTR58Jon02XrW2EJqQpGasrJc\r\nFGIkqth0q5/XcB3is32NBtJpx7kddMk26tyAd8mI/YQKcYt2/GXCBr6ONDP4\r\nlTE/ToSMu5xwnXjkRyE/j+bP5RvMaJB7mSgCMiyn6HvjpLQa+/Mg2hYaXmLl\r\n5fpIeknAKtmtPp0ganJVOkXYnup6gPf6nQRzj8lvW/Ygy93NJ/NZd3Io9ksj\r\nsvWUHm2HD04bTkhrCQs028D9sXzqX+HmR7bCMOEbijAq5k7HJBV/cNzoyRHV\r\ndG/cM55lJu11HnAsTTrBqouB9zro7tGKNbahKVEMkRZi0IKApVO7719sUKVD\r\nip5hTyjylY8VD+DRGP7ZzLxeO0gJSYXIoSOA9bhDgtpdxKq65g+bKS8M0b+b\r\nKhaF45xbrRhIKuBEIkJzLiK68qC0eeC7/2fpFSIxZ2pPLkkkyY9AI0KvUOu5\r\n8AcT0fvVBQPyFpGjMLVsvudjQOAaqzHXTUI=\r\n=AyhC\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","exports":{"./edit.js":{"import":"./edit.js","require":"./edit.cjs"},"./keyer.js":{"import":"./keyer.js","require":"./keyer.cjs"},"./history.js":{"import":"./history.js","require":"./history.cjs"},"./contentarea.js":{"import":"./contentarea.js","require":"./contentarea.cjs"}},"gitHead":"abd8da8ded88377a88c379dafa8fea4168258bf8","_npmUser":{"name":"brainkim","email":"briankimpossible@gmail.com"},"_npmVersion":"8.19.2","description":"Revise is a JavaScript library for creating [`contenteditable`-based](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable) rich-text editors in the browser. It provides a low-level, web-component based API for translating t","directories":{},"_nodeVersion":"16.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","uvu":"^0.5.6","eslint":"^8.22.0","rollup":"^2.78.0","ts-node":"^10.9.1","prettier":"^2.7.1","typescript":"^4.7.4","magic-string":"^0.26.2","playwright-test":"^8.1.1","eslint-plugin-react":"^7.30.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.33.0","rollup-plugin-typescript2":"^0.32.1","@typescript-eslint/eslint-plugin":"^5.33.0"},"_npmOperationalInternal":{"tmp":"tmp/revise_0.1.2_1678537831596_0.9750290575978462","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"@b9g/revise","version":"0.1.3","license":"MIT","_id":"@b9g/revise@0.1.3","maintainers":[{"name":"brainkim","email":"briankimpossible@gmail.com"}],"dist":{"shasum":"b070f9a142b8e36430627e9f9a9cf2ef91ac74e8","tarball":"https://registry.npmjs.org/@b9g/revise/-/revise-0.1.3.tgz","fileCount":23,"integrity":"sha512-KohPDhyxEEaxTUiU/GhKsj9Lin/mV8Iz4NS0vXIOYeye86p9CvrZaBV9PBQlitSxayoO6iikIGyMMlMADMQ8iQ==","signatures":[{"sig":"MEUCIEwoDOZ5hugq2lq2OilOTaOjxY14KVG5ltNLpW4O00o7AiEA2TsFQmWZgV7s6L6fbcuNf9gLIrX4EKlSFnNpMGDnH9g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":485035},"type":"module","exports":{"./edit.js":{"import":"./edit.js","require":"./edit.cjs"},"./keyer.js":{"import":"./keyer.js","require":"./keyer.cjs"},"./history.js":{"import":"./history.js","require":"./history.cjs"},"./contentarea.js":{"import":"./contentarea.js","require":"./contentarea.cjs"}},"gitHead":"42a9b42950a862cecda330e4f9a358e541bf9053","_npmUser":{"name":"brainkim","email":"briankimpossible@gmail.com"},"_npmVersion":"11.4.2","description":"Revise is a JavaScript library for creating [`contenteditable`-based](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable) rich-text editors in the browser. It provides a low-level, web-component based API for translating t","directories":{},"_nodeVersion":"24.4.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","uvu":"^0.5.6","eslint":"^8.22.0","rollup":"^2.78.0","ts-node":"^10.9.1","prettier":"^2.7.1","typescript":"^4.7.4","magic-string":"^0.26.2","playwright-test":"^8.1.1","eslint-plugin-react":"^7.30.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.33.0","rollup-plugin-typescript2":"^0.32.1","@typescript-eslint/eslint-plugin":"^5.33.0"},"_npmOperationalInternal":{"tmp":"tmp/revise_0.1.3_1755203223651_0.5537344384827467","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@b9g/revise","version":"0.1.4","license":"MIT","_id":"@b9g/revise@0.1.4","maintainers":[{"name":"brainkim","email":"briankimpossible@gmail.com"}],"dist":{"shasum":"7c310981226c31905c282b3428fbe462a2579648","tarball":"https://registry.npmjs.org/@b9g/revise/-/revise-0.1.4.tgz","fileCount":19,"integrity":"sha512-Dc1/KtSgy1P9eAW/gDvXyXuriB5ePFKUo+eTO8RGTgGRf/aqj2ZaIll/OXVEK68hqZipeGJNWYHGxykIJfHIbg==","signatures":[{"sig":"MEUCIFEsEdxn22twGeM+oPu7olBOvj1gmxgsLRpvIu3s/v+wAiEAqFB+H8y7dhCiaGN04VdFTFgTfttPihNjsDzOdsWm4fA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":118756},"main":"src/contentarea.cjs","type":"module","types":"src/contentarea.d.ts","module":"src/contentarea.js","exports":{".":{"types":"./src/contentarea.d.ts","import":"./src/contentarea.js","require":"./src/contentarea.cjs"},"./edit":{"types":"./src/edit.d.ts","import":"./src/edit.js","require":"./src/edit.cjs"},"./keyer":{"types":"./src/keyer.d.ts","import":"./src/keyer.js","require":"./src/keyer.cjs"},"./state":{"types":"./src/state.d.ts","import":"./src/state.js","require":"./src/state.cjs"},"./edit.js":{"types":"./src/edit.d.ts","import":"./src/edit.js","require":"./src/edit.cjs"},"./history":{"types":"./src/history.d.ts","import":"./src/history.js","require":"./src/history.cjs"},"./keyer.js":{"types":"./src/keyer.d.ts","import":"./src/keyer.js","require":"./src/keyer.cjs"},"./state.js":{"types":"./src/state.d.ts","import":"./src/state.js","require":"./src/state.cjs"},"./history.js":{"types":"./src/history.d.ts","import":"./src/history.js","require":"./src/history.cjs"},"./contentarea":{"types":"./src/contentarea.d.ts","import":"./src/contentarea.js","require":"./src/contentarea.cjs"},"./package.json":"./package.json","./contentarea.js":{"types":"./src/contentarea.d.ts","import":"./src/contentarea.js","require":"./src/contentarea.cjs"}},"gitHead":"9da94dbd592f76bc4011d223756a76173a006f20","_npmUser":{"name":"brainkim","email":"briankimpossible@gmail.com"},"_npmVersion":"11.8.0","description":"Revise is a JavaScript library for building rich-text editors on top of [`contenteditable`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable). It provides low-level primitives — a custom element, an edit data structure, ","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@b9g/libuild":"file:../libuild","playwright-test":"^8.1.1"},"_npmOperationalInternal":{"tmp":"tmp/revise_0.1.4_1772277856999_0.8444546928069654","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@b9g/revise","version":"0.1.5","license":"MIT","_id":"@b9g/revise@0.1.5","maintainers":[{"name":"brainkim","email":"briankimpossible@gmail.com"}],"dist":{"shasum":"b8488ad7a506f164d884cb2447a9836dcdff37fb","tarball":"https://registry.npmjs.org/@b9g/revise/-/revise-0.1.5.tgz","fileCount":19,"integrity":"sha512-MQcf1irLvtdgg0yp3kPtucPvLuTNLBhwZ6hCJ5O9/Caaf0bgn7EMj3IUfyaekk9ZF/SCO1E6YS4QxjpVAae83A==","signatures":[{"sig":"MEYCIQD8MFqgVrHB7d9XdCVPrBJYcIk879kP61YOjGvU1jo7QAIhAJltEVsxfVuYpRLX9QJrPc6SYzfi7TboCZndk04QT8Yx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":118748},"main":"src/contentarea.cjs","type":"module","types":"src/contentarea.d.ts","module":"src/contentarea.js","exports":{".":{"types":"./src/contentarea.d.ts","import":"./src/contentarea.js","require":"./src/contentarea.cjs"},"./edit":{"types":"./src/edit.d.ts","import":"./src/edit.js","require":"./src/edit.cjs"},"./keyer":{"types":"./src/keyer.d.ts","import":"./src/keyer.js","require":"./src/keyer.cjs"},"./state":{"types":"./src/state.d.ts","import":"./src/state.js","require":"./src/state.cjs"},"./edit.js":{"types":"./src/edit.d.ts","import":"./src/edit.js","require":"./src/edit.cjs"},"./history":{"types":"./src/history.d.ts","import":"./src/history.js","require":"./src/history.cjs"},"./keyer.js":{"types":"./src/keyer.d.ts","import":"./src/keyer.js","require":"./src/keyer.cjs"},"./state.js":{"types":"./src/state.d.ts","import":"./src/state.js","require":"./src/state.cjs"},"./history.js":{"types":"./src/history.d.ts","import":"./src/history.js","require":"./src/history.cjs"},"./contentarea":{"types":"./src/contentarea.d.ts","import":"./src/contentarea.js","require":"./src/contentarea.cjs"},"./package.json":"./package.json","./contentarea.js":{"types":"./src/contentarea.d.ts","import":"./src/contentarea.js","require":"./src/contentarea.cjs"}},"gitHead":"dd033753706ede466462fee30403108763551c14","_npmUser":{"name":"brainkim","email":"briankimpossible@gmail.com"},"_npmVersion":"11.8.0","description":"Revise is a JavaScript library for building rich-text editors on top of [`contenteditable`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable). It provides low-level primitives — a custom element, an edit data structure, ","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@b9g/libuild":"^0.1.24","playwright-test":"^8.1.1"},"_npmOperationalInternal":{"tmp":"tmp/revise_0.1.5_1772278833500_0.4804742118168037","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@b9g/revise","version":"0.1.6","license":"MIT","devDependencies":{"@b9g/libuild":"^0.1.24","fast-check":"^4.5.3","playwright-test":"^8.1.1","typescript":"^5.0.0","uvu":"^0.5.6"},"type":"module","types":"src/contentarea.d.ts","main":"src/contentarea.cjs","module":"src/contentarea.js","exports":{"./edit.js":{"types":"./src/edit.d.ts","import":"./src/edit.js","require":"./src/edit.cjs"},"./contentarea.js":{"types":"./src/contentarea.d.ts","import":"./src/contentarea.js","require":"./src/contentarea.cjs"},"./keyer.js":{"types":"./src/keyer.d.ts","import":"./src/keyer.js","require":"./src/keyer.cjs"},"./history.js":{"types":"./src/history.d.ts","import":"./src/history.js","require":"./src/history.cjs"},"./state.js":{"types":"./src/state.d.ts","import":"./src/state.js","require":"./src/state.cjs"},".":{"types":"./src/contentarea.d.ts","import":"./src/contentarea.js","require":"./src/contentarea.cjs"},"./contentarea":{"types":"./src/contentarea.d.ts","import":"./src/contentarea.js","require":"./src/contentarea.cjs"},"./edit":{"types":"./src/edit.d.ts","import":"./src/edit.js","require":"./src/edit.cjs"},"./history":{"types":"./src/history.d.ts","import":"./src/history.js","require":"./src/history.cjs"},"./keyer":{"types":"./src/keyer.d.ts","import":"./src/keyer.js","require":"./src/keyer.cjs"},"./state":{"types":"./src/state.d.ts","import":"./src/state.js","require":"./src/state.cjs"},"./package.json":"./package.json"},"gitHead":"fb3c067b96a7fa2ec8b3638c7d961010e8eb2bff","_id":"@b9g/revise@0.1.6","description":"Revise is a JavaScript library for building rich-text editors on top of [`contenteditable`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable). It provides low-level foundations — a custom element, an edit data structure,","_nodeVersion":"25.5.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-uB3NucDi48XGw4oAZhfVVNzaLoBfTUOgtqhMVJl/yXFIsoTGcfSWD073jqHqwTFyd0ivSeisv6SMq08M2K096A==","shasum":"82ccf25f5c7b4a13f3c1f32c8443f84d3c84d7a1","tarball":"https://registry.npmjs.org/@b9g/revise/-/revise-0.1.6.tgz","fileCount":20,"unpackedSize":133650,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFBi3DTAfpu9SwT3kb/TTpilxzvG3VdbdjxsCLpChIlWAiAZSH3BKJZ9ruOWBJPmnG1NxlkbOlrB7krMzeMxB5bUqg=="}]},"_npmUser":{"name":"brainkim","email":"briankimpossible@gmail.com"},"directories":{},"maintainers":[{"name":"brainkim","email":"briankimpossible@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/revise_0.1.6_1773263840325_0.8438045704537014"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-27T19:56:13.780Z","modified":"2026-03-11T21:17:20.620Z","0.1.0":"2021-10-27T19:56:14.046Z","0.1.1":"2021-11-07T20:49:45.464Z","0.1.2":"2023-03-11T12:30:31.843Z","0.1.3":"2025-08-14T20:27:03.856Z","0.1.4":"2026-02-28T11:24:17.172Z","0.1.5":"2026-02-28T11:40:33.683Z","0.1.6":"2026-03-11T21:17:20.483Z"},"license":"MIT","description":"Revise is a JavaScript library for building rich-text editors on top of [`contenteditable`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable). It provides low-level foundations — a custom element, an edit data structure,","maintainers":[{"name":"brainkim","email":"briankimpossible@gmail.com"}],"readme":"# Revise.js\n\nRevise is a JavaScript library for building rich-text editors on top of\n[`contenteditable`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable).\nIt provides low-level foundations — a custom element, an edit data structure,\na keyed reconciler, and a state coordinator — so that any framework can build\nediting experiences without fighting the DOM.\n\n```\nnpm install @b9g/revise\n```\n\n## Status\n\nEarly beta. The API is stabilizing but may still change. Recommended for\ndevelopers who aren’t afraid of stepping through DOM code in a debugger.\n\n## Quick Start\n\nRegister the custom element, create an `EditableState`, and render keyed lines\ninside a `<content-area>`:\n\n```js\nimport {ContentAreaElement} from \"@b9g/revise/contentarea.js\";\nimport {EditableState} from \"@b9g/revise/state.js\";\n\ncustomElements.define(\"content-area\", ContentAreaElement);\n\nconst state = new EditableState({value: \"Hello World!\\n\"});\n```\n\nWhen `<content-area>` detects a user edit, it fires a `contentchange` event\nwith an `Edit` object describing the change. Prevent the default DOM mutation,\napply the edit to state, then re-render:\n\n```js\narea.addEventListener(\"contentchange\", (ev) => {\n  const {edit, source} = ev.detail;\n  if (source === \"render\") return; // ignore our own re-renders\n\n  const selection = area.getSelectionRange();\n  ev.preventDefault();\n  state.applyEdit(edit);\n  // Re-render your UI from state.value, then restore selection\n});\n```\n\nAfter re-rendering, mark the DOM update so the next `contentchange` is tagged\nas a render (not a user edit), and restore the cursor:\n\n```js\narea.source(\"render\");\narea.setSelectionRange(sel.start, sel.end, sel.direction);\n```\n\nUse `state.keyer.keyAt(index)` to get stable keys for each line so your\nframework can reconcile DOM nodes efficiently:\n\n```js\nconst lines = state.value.split(\"\\n\");\nlet cursor = 0;\nfor (const line of lines) {\n  const key = state.keyer.keyAt(cursor);\n  cursor += line.length + 1;\n  // render <div key={key}>{line || <br/>}</div>\n}\n```\n\nUndo/redo is built in:\n\n```js\nstate.undo(); // returns true if there was something to undo\nstate.redo();\nstate.checkpoint(); // break the current edit group (e.g. on cursor move)\n```\n\nSee the [live demos](https://bikeshaving.github.io/revise/) for complete\nexamples with syntax highlighting, rainbow text, and social highlighting.\n\n## Modules\n\n### `@b9g/revise/contentarea.js`\n\n**`ContentAreaElement`** — A custom element (`<content-area>`) with an API\nmodeled after\n[`HTMLTextAreaElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement).\nWraps a `contenteditable` element and translates DOM mutations into `Edit`\nobjects.\n\n- `value: string` — The text content of the element.\n- `selectionStart: number`\n- `selectionEnd: number`\n- `selectionDirection: SelectionDirection`\n- `getSelectionRange(): SelectionRange`\n- `setSelectionRange(start, end, direction?): void`\n- `indexAt(node, offset): number` — Convert a DOM position to a text index.\n- `nodeOffsetAt(index): [Node | null, number]` — Convert a text index to a DOM position.\n- `source(name): boolean` — Tag the next DOM mutation cycle so `contentchange` events include a `source` property. Returns `true` if content changed.\n\n**`ContentEvent`** — The event dispatched on `contentchange`. `event.detail`\ncontains `{edit: Edit, source: string | null}`. Call `event.preventDefault()`\nto revert the DOM mutation and apply the edit to your own state instead.\n\n### `@b9g/revise/edit.js`\n\n**`Edit`** — A compact, composable data structure for representing changes to\nstrings.\n\n- `apply(text): string` — Apply the edit to a string.\n- `invert(): Edit` — Return the inverse edit (for undo).\n- `compose(that): Edit` — Compose two sequential edits into one.\n- `normalize(): Edit` — Normalize the edit (remove no-ops).\n- `operations(): Array<Operation>` — Get the list of retain/insert/delete operations.\n- `hasChangesBetween(start, end): boolean`\n- `Edit.diff(text1, text2, hint?): Edit` — Compute an edit from two strings.\n- `Edit.createBuilder(value): EditBuilder` — Create a builder for constructing edits operation-by-operation.\n\n**`EditBuilder`** — Fluent builder for constructing edits:\n`insert(value)`, `retain(length)`, `delete(length)`, `concat(edit)`, `build()`.\n\n### `@b9g/revise/history.js`\n\n**`EditHistory`** — Undo/redo stack that automatically composes consecutive\nsimple edits into groups.\n\n- `append(edit): void` — Record an edit. Consecutive simple edits are composed; complex edits (multiple operations) trigger a checkpoint.\n- `checkpoint(): void` — Break the current edit group.\n- `undo(): Edit | undefined` — Pop the undo stack and return the inverted edit.\n- `redo(): Edit | undefined` — Pop the redo stack and return the edit.\n- `canUndo(): boolean`\n- `canRedo(): boolean`\n\n### `@b9g/revise/keyer.js`\n\n**`Keyer`** — Assigns stable integer keys to text positions and keeps them in\nsync as edits are applied. Use `keyAt(index)` to get a stable key for the\ncharacter at a given index, then call `transform(edit)` after each edit to\nupdate all key positions.\n\n- `keyAt(index): number` — Get or create a stable key for a text position.\n- `transform(edit): void` — Update all key positions after an edit.\n\n### `@b9g/revise/state.js`\n\n**`EditableState`** — A framework-agnostic state coordinator that ties\ntogether value, keyer, history, and selection.\n\n- `value: string` — The current text.\n- `keyer: Keyer` — The keyer for stable line keys.\n- `history: EditHistory` — The undo/redo history.\n- `selection: SelectionRange | undefined` — Selection computed from the last edit.\n- `applyEdit(edit, options?): void` — Apply an edit, updating value/keyer/history/selection.\n- `setValue(newValue, options?): void` — Set a new value by diffing against the current value.\n- `undo(): boolean` — Undo the last edit group.\n- `redo(): boolean` — Redo the last undone edit group.\n- `canUndo(): boolean`\n- `canRedo(): boolean`\n- `checkpoint(): void` — Break the current edit group.\n- `reset(value?): void` — Reset all state.\n","readmeFilename":"README.md"}