{"_id":"@toiroakr/read-multiline","_rev":"11-0d86a62f940278cc49e883f24391c95c","name":"@toiroakr/read-multiline","dist-tags":{"latest":"0.4.3"},"versions":{"0.1.0":{"name":"@toiroakr/read-multiline","version":"0.1.0","keywords":["cli","input","multiline","readline","stdin","terminal"],"author":"","license":"MIT","_id":"@toiroakr/read-multiline@0.1.0","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"dist":{"shasum":"cd5cb3d69b7d085bf4148e5c91a8af0246b465e1","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.1.0.tgz","fileCount":4,"integrity":"sha512-T/BjXxRGPviUfmIimdnDwn+EjM3P2eFW0szN9OScBzaN0NDjMkzAUgw690zZg+p1/IWBs50sWle2T2z8dhmXCw==","signatures":[{"sig":"MEUCIQD2nSNTA0KANzHSKyYvX2Av6vDJ3faiQfHF4r63bgA/xgIgf8Y7VWngp30Q3DlWZnQ10TtfcX7/W3SuP4pa1MN5mt8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47099},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"9d8a5f6e9ef0cfe50537d76b349eaaf299eb373d","scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","prepare":"lefthook install","publint":"publint","release":"npm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","prepublishOnly":"npm run build","organize-imports":"organize-imports-cli tsconfig.json"},"_npmUser":{"name":"toiroakr","email":"toiroakr@gmail.com"},"_npmVersion":"11.11.0","description":"Simple multi-line input reader for Node.js terminals","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"knip":"^5.85.0","oxfmt":"^0.35.0","oxlint":"^1.50.0","vitest":"^4.0.18","publint":"^0.3.18","lefthook":"^2.1.1","typescript":"^5.9.3","@types/node":"^25.3.5","@changesets/cli":"^2.29.8","@xterm/headless":"^6.0.0","organize-imports-cli":"^0.10.0"},"_npmOperationalInternal":{"tmp":"tmp/read-multiline_0.1.0_1773071088571_0.057432665707523256","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@toiroakr/read-multiline","version":"0.1.1","keywords":["cli","input","multiline","readline","stdin","terminal"],"author":"","license":"MIT","_id":"@toiroakr/read-multiline@0.1.1","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"homepage":"https://github.com/toiroakr/read-multiline#readme","bugs":{"url":"https://github.com/toiroakr/read-multiline/issues"},"dist":{"shasum":"34f2ed7f538b982b4906886975521457ec7da5b1","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.1.1.tgz","fileCount":4,"integrity":"sha512-+vpo7fZs2mT+QpfHKF+eo/CyIa+9f7ZcGnoWB2ZrUzWvuQ6sp2VS6zQAtfRU39pwZJUZZvqhHdJUG0vBEixWiw==","signatures":[{"sig":"MEUCIErvZE6xD2M74l1s+fyuSjdk+tJk2MXJNOwHI2PD/Ai3AiEA8kuNY52aE9Yt5cwZgLJtIX5+dqLv4ZiDUfXn0rHWZ+A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@toiroakr%2fread-multiline@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47520},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b2fef88ab5d6dba7ea1e201a358126ea8bedd058","scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","prepare":"lefthook install","publint":"publint","release":"npm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","prepublishOnly":"npm run build","organize-imports":"organize-imports-cli tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:716bb647-be0e-43d1-9043-a4d9d32f4a2b"}},"repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"_npmVersion":"11.11.0","description":"Simple multi-line input reader for Node.js terminals","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"knip":"^5.85.0","oxfmt":"^0.35.0","oxlint":"^1.50.0","vitest":"^4.0.18","publint":"^0.3.18","lefthook":"^2.1.1","typescript":"^5.9.3","@types/node":"^25.3.5","@changesets/cli":"^2.29.8","@xterm/headless":"^6.0.0","organize-imports-cli":"^0.10.0"},"_npmOperationalInternal":{"tmp":"tmp/read-multiline_0.1.1_1773107308776_0.6405373171592903","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@toiroakr/read-multiline","version":"0.2.0","keywords":["cli","input","multiline","readline","stdin","terminal"],"author":"","license":"MIT","_id":"@toiroakr/read-multiline@0.2.0","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"homepage":"https://github.com/toiroakr/read-multiline#readme","bugs":{"url":"https://github.com/toiroakr/read-multiline/issues"},"dist":{"shasum":"03270b0d076a8450b0ccecf9fc86c1420e39771a","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.2.0.tgz","fileCount":16,"integrity":"sha512-gQOvNchP7elmHvZzUhTsexHre6A66VapyeuERMIc1MNFETLOE4ZOXQIUnmLrwy02pS56nwlklgHdvDlk6u4dGA==","signatures":[{"sig":"MEUCIQCmek8mPaihcruzEoRcTr/dNOLXpQrsUg05E4YDVJvy9QIgCdtnoN+6eozb3jx+7L80ET+kCkSIxtYAkR2qrGL6yvc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@toiroakr%2fread-multiline@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":58818},"main":"./dist/index.js","type":"module","_from":"file:toiroakr-read-multiline-0.2.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","publint":"publint","release":"pnpm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","organize-imports":"organize-imports-cli tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:716bb647-be0e-43d1-9043-a4d9d32f4a2b"}},"_resolved":"/tmp/910b39252805f6172ff354995fec6b98/toiroakr-read-multiline-0.2.0.tgz","_integrity":"sha512-gQOvNchP7elmHvZzUhTsexHre6A66VapyeuERMIc1MNFETLOE4ZOXQIUnmLrwy02pS56nwlklgHdvDlk6u4dGA==","repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"_npmVersion":"11.11.0","description":"Simple multi-line input reader for Node.js terminals","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"knip":"^5.85.0","oxfmt":"^0.35.0","oxlint":"^1.50.0","vitest":"^4.0.18","publint":"^0.3.18","lefthook":"^2.1.1","typescript":"^5.9.3","@types/node":"^25.3.5","@changesets/cli":"^2.29.8","@xterm/headless":"^6.0.0","organize-imports-cli":"^0.10.0"},"_npmOperationalInternal":{"tmp":"tmp/read-multiline_0.2.0_1773152894682_0.20686702867337603","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@toiroakr/read-multiline","version":"0.2.1","keywords":["cli","input","multiline","readline","stdin","terminal"],"author":"","license":"MIT","_id":"@toiroakr/read-multiline@0.2.1","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"homepage":"https://github.com/toiroakr/read-multiline#readme","bugs":{"url":"https://github.com/toiroakr/read-multiline/issues"},"dist":{"shasum":"3e40d131e8cb2749367f534a542c905e063479da","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.2.1.tgz","fileCount":28,"integrity":"sha512-TZqcJi6kIkdVK6rsCXqosIPP7X+puIEGmZ5JGcBKFJ4xzRTuKWk74Kihn794aYLhoZNjZC1zs38ASiP+geykRQ==","signatures":[{"sig":"MEQCIEfTHV0apudQ6ltWBSJh3oF3fbAhpkMVUMGVU+wuYtUaAiACAr32MErst1qd1JwTGs1gEr4wIHw5hQFF/PGTM2QELw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@toiroakr%2fread-multiline@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":109286},"main":"./dist/index.js","type":"module","_from":"file:toiroakr-read-multiline-0.2.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","publint":"publint","release":"pnpm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","organize-imports":"organize-imports-cli tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:716bb647-be0e-43d1-9043-a4d9d32f4a2b"}},"_resolved":"/tmp/93e6bf26a86580c8509806630f64f7e6/toiroakr-read-multiline-0.2.1.tgz","_integrity":"sha512-TZqcJi6kIkdVK6rsCXqosIPP7X+puIEGmZ5JGcBKFJ4xzRTuKWk74Kihn794aYLhoZNjZC1zs38ASiP+geykRQ==","repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"_npmVersion":"11.9.0","description":"Simple multi-line input reader for Node.js terminals","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"knip":"6.0.1","oxfmt":"0.41.0","oxlint":"1.56.0","vitest":"4.1.0","publint":"0.3.18","lefthook":"2.1.4","typescript":"5.9.3","@types/node":"25.5.0","@clack/prompts":"1.1.0","@changesets/cli":"2.30.0","@xterm/headless":"6.0.0","@inquirer/prompts":"8.3.2","organize-imports-cli":"0.10.0"},"_npmOperationalInternal":{"tmp":"tmp/read-multiline_0.2.1_1774445046486_0.0007522714233596517","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@toiroakr/read-multiline","version":"0.3.0","keywords":["cli","input","multiline","readline","stdin","terminal"],"author":"","license":"MIT","_id":"@toiroakr/read-multiline@0.3.0","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"homepage":"https://github.com/toiroakr/read-multiline#readme","bugs":{"url":"https://github.com/toiroakr/read-multiline/issues"},"dist":{"shasum":"2d9ab1205cb19e0da1c4b00d05dc77ad7934a5be","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.3.0.tgz","fileCount":28,"integrity":"sha512-GbVRYndmdqFJRqME6PvlcWoLBQhZ9bd+ZjupxjiE7mnR2S5zYtIgZeIwwxfv2hcm1UzeUKnrNP5NIW2YcuCNnA==","signatures":[{"sig":"MEQCICItvX2jc/lr2Iq7yTp0yYrq8TDd/DIwViPXmw03l/mAAiBAubKXywxnCZ9IodbFAZ1417dsld+ra+1HD2uFofu7sg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@toiroakr%2fread-multiline@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":116721},"main":"./dist/index.js","type":"module","_from":"file:toiroakr-read-multiline-0.3.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","publint":"publint","release":"pnpm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","organize-imports":"organize-imports-cli tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:716bb647-be0e-43d1-9043-a4d9d32f4a2b"}},"_resolved":"/tmp/963077f69eb741501771c17c8d6ff7d5/toiroakr-read-multiline-0.3.0.tgz","_integrity":"sha512-GbVRYndmdqFJRqME6PvlcWoLBQhZ9bd+ZjupxjiE7mnR2S5zYtIgZeIwwxfv2hcm1UzeUKnrNP5NIW2YcuCNnA==","repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"_npmVersion":"11.9.0","description":"Simple multi-line input reader for Node.js terminals","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"knip":"6.1.0","oxfmt":"0.42.0","shiki":"4.0.2","oxlint":"1.57.0","vitest":"4.1.2","graphql":"16.13.2","publint":"0.3.18","lefthook":"2.1.4","typescript":"6.0.2","@types/node":"25.5.0","sql-highlight":"6.1.0","@clack/prompts":"1.1.0","@changesets/cli":"2.30.0","@xterm/headless":"6.0.0","@inquirer/prompts":"8.3.2","organize-imports-cli":"0.10.0","graphql-language-service-parser":"1.10.4"},"_npmOperationalInternal":{"tmp":"tmp/read-multiline_0.3.0_1774956468710_0.5552663773247479","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@toiroakr/read-multiline","version":"0.3.1","keywords":["cli","input","multiline","readline","stdin","terminal"],"author":"","license":"MIT","_id":"@toiroakr/read-multiline@0.3.1","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"homepage":"https://github.com/toiroakr/read-multiline#readme","bugs":{"url":"https://github.com/toiroakr/read-multiline/issues"},"dist":{"shasum":"1faf43e915e7de39b1adf203fcf1eaf82695a2b4","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.3.1.tgz","fileCount":28,"integrity":"sha512-kWjImhCg3EFZmzQg4ZfVtV6oBHBipvhD4uJibyelUKcQW4P3+467ngn+NHYHtMQ18ciMZFYZePOPjpHQ9kUdbA==","signatures":[{"sig":"MEQCIEj8JoFIvByy0+8/6JjxceFfDUSZQJYqscqwIK9vkFPVAiBL+bcSymTyRwsIpBfKUWTVpN4C7e8LxXv8UmJG+zyzUQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@toiroakr%2fread-multiline@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":123103},"main":"./dist/index.js","type":"module","_from":"file:toiroakr-read-multiline-0.3.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","publint":"publint","release":"pnpm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","organize-imports":"organize-imports-cli tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:716bb647-be0e-43d1-9043-a4d9d32f4a2b"}},"_resolved":"/tmp/f78b2dc1f7bb959e2698453a9e2bd3c6/toiroakr-read-multiline-0.3.1.tgz","_integrity":"sha512-kWjImhCg3EFZmzQg4ZfVtV6oBHBipvhD4uJibyelUKcQW4P3+467ngn+NHYHtMQ18ciMZFYZePOPjpHQ9kUdbA==","repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"_npmVersion":"11.11.0","description":"Simple multi-line input reader for Node.js terminals","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"knip":"6.3.1","oxfmt":"0.44.0","shiki":"4.0.2","oxlint":"1.59.0","vitest":"4.1.4","graphql":"16.13.2","publint":"0.3.18","lefthook":"2.1.5","typescript":"6.0.2","@types/node":"25.6.0","sql-highlight":"6.1.0","@clack/prompts":"1.2.0","@changesets/cli":"2.30.0","@xterm/headless":"6.0.0","@inquirer/prompts":"8.4.1","organize-imports-cli":"0.10.0","graphql-language-service-parser":"1.10.4"},"_npmOperationalInternal":{"tmp":"tmp/read-multiline_0.3.1_1776073435826_0.6871909149154038","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@toiroakr/read-multiline","version":"0.3.2","keywords":["cli","input","multiline","readline","stdin","terminal"],"author":"","license":"MIT","_id":"@toiroakr/read-multiline@0.3.2","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"homepage":"https://github.com/toiroakr/read-multiline#readme","bugs":{"url":"https://github.com/toiroakr/read-multiline/issues"},"dist":{"shasum":"a68b92c9d6e8c37adb1fd1504c5e28a81fe4307c","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.3.2.tgz","fileCount":28,"integrity":"sha512-6mU+J4l2v0SwHNkhppQ4ZK0w5nQiTFm/PjY8ILVyKnYOSgILVDz9aM7v6MJyF5v662h8y7Nc2/V40GeD8Wg9fA==","signatures":[{"sig":"MEQCIC9xEfcJIwD2z4s+TFy7uFeienJAv9AmYGo3Ez0NzRmHAiBOS1YFQkbueLo+neFc5DkjBohsD04YdRNyjXNzJuPQ8w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@toiroakr%2fread-multiline@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":126569},"main":"./dist/index.js","type":"module","_from":"file:toiroakr-read-multiline-0.3.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","publint":"publint","release":"pnpm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","organize-imports":"organize-imports-cli tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:716bb647-be0e-43d1-9043-a4d9d32f4a2b"}},"_resolved":"/tmp/07637b6ed17c405e3a7e3f990470b789/toiroakr-read-multiline-0.3.2.tgz","_integrity":"sha512-6mU+J4l2v0SwHNkhppQ4ZK0w5nQiTFm/PjY8ILVyKnYOSgILVDz9aM7v6MJyF5v662h8y7Nc2/V40GeD8Wg9fA==","repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"_npmVersion":"11.11.0","description":"Simple multi-line input reader for Node.js terminals","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"knip":"6.4.1","oxfmt":"0.45.0","shiki":"4.0.2","oxlint":"1.60.0","vitest":"4.1.4","graphql":"16.13.2","publint":"0.3.18","lefthook":"2.1.6","typescript":"6.0.3","@types/node":"25.6.0","sql-highlight":"6.1.0","@clack/prompts":"1.2.0","@changesets/cli":"2.30.0","@xterm/headless":"6.0.0","@inquirer/prompts":"8.4.1","organize-imports-cli":"0.10.0","graphql-language-service-parser":"1.10.4"},"_npmOperationalInternal":{"tmp":"tmp/read-multiline_0.3.2_1776651756768_0.464547053889778","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@toiroakr/read-multiline","version":"0.4.0","keywords":["cli","input","multiline","readline","stdin","terminal"],"author":"","license":"MIT","_id":"@toiroakr/read-multiline@0.4.0","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"homepage":"https://github.com/toiroakr/read-multiline#readme","bugs":{"url":"https://github.com/toiroakr/read-multiline/issues"},"dist":{"shasum":"7d122da42ef152a8fd1e1a37109082c84c069ab2","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.4.0.tgz","fileCount":28,"integrity":"sha512-6Rf+eP9i+klqiCx9BRPNlvLT+QxbpNGtE+T4Y59VcSRB4rp3/vtHNrcbeOqWjKiG4FBf5Ri8nfCUH7O0/klvKw==","signatures":[{"sig":"MEUCIQC8uLSGH/kdbN+722pHO9IahDU3auSTP9SDDj8LhOr1WQIgB5Z4TtK4a3WVJxmzqqoyHOhB8AXWHWgsf1xtukqr8T4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@toiroakr%2fread-multiline@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":127705},"main":"./dist/index.js","type":"module","_from":"file:toiroakr-read-multiline-0.4.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","publint":"publint","release":"pnpm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","organize-imports":"organize-imports-cli tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:716bb647-be0e-43d1-9043-a4d9d32f4a2b"}},"_resolved":"/tmp/e0fc95eebd4a6e9d3897a1adba6e0f81/toiroakr-read-multiline-0.4.0.tgz","_integrity":"sha512-6Rf+eP9i+klqiCx9BRPNlvLT+QxbpNGtE+T4Y59VcSRB4rp3/vtHNrcbeOqWjKiG4FBf5Ri8nfCUH7O0/klvKw==","repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"_npmVersion":"11.11.0","description":"Simple multi-line input reader for Node.js terminals","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"knip":"6.12.1","oxfmt":"0.48.0","shiki":"4.0.2","oxlint":"1.63.0","vitest":"4.1.5","graphql":"16.14.0","publint":"0.3.20","lefthook":"2.1.6","typescript":"6.0.3","@types/node":"25.6.2","sql-highlight":"6.1.0","@clack/prompts":"1.3.0","@changesets/cli":"2.31.0","@xterm/headless":"6.0.0","@inquirer/prompts":"8.4.2","organize-imports-cli":"1.0.2","graphql-language-service-parser":"1.10.4"},"_npmOperationalInternal":{"tmp":"tmp/read-multiline_0.4.0_1778596821555_0.029469782532366207","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@toiroakr/read-multiline","version":"0.4.1","keywords":["cli","input","multiline","readline","stdin","terminal"],"author":"","license":"MIT","_id":"@toiroakr/read-multiline@0.4.1","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"dist":{"shasum":"652e5bb854d5415a68283dedae6b495883267456","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.4.1.tgz","fileCount":28,"integrity":"sha512-uuNmzOCjn9nYgIGJe1Ztr3VXxQN5wlspFaCWtcW5qr5KZ3UluHiBvxfjKNplmP4zV25kFl1QkkaQEOoHOrjp8g==","signatures":[{"sig":"MEYCIQDo99sTZjWbn5WSyXl3P3LuynmlqNXdj2fOiKVzaPDZmAIhAMEWLEAtfibsdq0m+aqnWEOr8LSoFEeIhn7sL1+HRmz/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@toiroakr%2fread-multiline@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":138204},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","publint":"publint","release":"pnpm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","organize-imports":"organize-imports-cli tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:716bb647-be0e-43d1-9043-a4d9d32f4a2b"}},"repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"description":"Simple multi-line input reader for Node.js terminals","directories":{},"_nodeVersion":"26.0.0","_hasShrinkwrap":false,"devDependencies":{"knip":"6.12.1","oxfmt":"0.48.0","shiki":"4.0.2","oxlint":"1.63.0","vitest":"4.1.5","graphql":"16.14.0","publint":"0.3.20","lefthook":"2.1.6","typescript":"6.0.3","@types/node":"25.6.2","sql-highlight":"6.1.0","@clack/prompts":"1.3.0","@changesets/cli":"2.31.0","@xterm/headless":"6.0.0","@inquirer/prompts":"8.4.2","organize-imports-cli":"1.0.2","graphql-language-service-parser":"1.10.4"},"_npmOperationalInternal":{"tmp":"tmp/read-multiline_0.4.1_1778648725331_0.9274318287285264","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"@toiroakr/read-multiline","version":"0.4.2","keywords":["cli","input","multiline","readline","stdin","terminal"],"author":"","license":"MIT","_id":"@toiroakr/read-multiline@0.4.2","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"dist":{"shasum":"02b7d0723f0fdeddf1d5b31cd3635364d4db1785","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.4.2.tgz","fileCount":30,"integrity":"sha512-NcqAPSrT1WF0mUPgf+UDWfkT525h2MIFxYpUh41+E1qBFJfQK3Z5OnhWpQWFq+WDbIyRIajJ3YYWM/1opyuaEQ==","signatures":[{"sig":"MEUCIGVSEtK5F99WTgDcMvN4YL8KHI4Hirz9eESVWnHSda4UAiEA1SBeCkVfyxwTg5arMB/zBcpg/xOOmzD0QDQ7Gdi7d2w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIGa/n0ETGfKy9MYLUcugoeuUCJZHs8RW40TrNWkybSaOAiEAquCaalSP9mMEyeJ+o8o4yVmPrqCHtbCn1LJ9+cjOUqc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@toiroakr%2fread-multiline@0.4.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":151379},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","publint":"publint","release":"pnpm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","organize-imports":"organize-imports-cli tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"716bb647-be0e-43d1-9043-a4d9d32f4a2b"}},"repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"description":"Simple multi-line input reader for Node.js terminals","directories":{},"_hasShrinkwrap":false,"devDependencies":{"knip":"^6.41.0","oxfmt":"^0.72.0","shiki":"^4.5.0","oxlint":"^1.87.0","vitest":"^5.0.4","graphql":"^17.0.2","publint":"^0.3.25","lefthook":"^2.2.1","typescript":"^7.0.2","@types/node":"^25.9.9","sql-highlight":"^6.1.0","@clack/prompts":"^1.8.1","@changesets/cli":"^3.0.3","@xterm/headless":"^6.0.0","@twinkleplop/sql":"0.1.7","@inquirer/prompts":"^8.7.3","@twinkleplop/graphql":"0.2.1","organize-imports-cli":"^1.0.2","graphql-language-service-parser":"^1.10.4"},"_npmOperationalInternal":{"tmp":"tmp/read-multiline_0.4.2_1792076608481_0.07352966888179258","host":"s3://npm-registry-packages-npm-production"}},"0.4.3":{"_id":"@toiroakr/read-multiline@0.4.3","dist":{"shasum":"da1f8931aa378531459572ad391721b62022f465","tarball":"https://registry.npmjs.org/@toiroakr/read-multiline/-/read-multiline-0.4.3.tgz","fileCount":30,"integrity":"sha512-qvxveKObkZVsnV2aN+rWyE/IitfZtQW42fi8etRKaF5TjZ6tr4sjcit0tSWquq9cTPpU1CF5JywmR4akulisKg==","signatures":[{"sig":"MEQCIDl/N+/mkF4i1M+oOAPojL1rpz5SW1ODzxUPVx2Kcih6AiAu5HKyYms7g2yEbTL2EvwYLkJTj33SadaiorEFO6E+vw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDtNiJQgjp3dmCH992ehc9dbxSyufS7MDmGTeZdiCYUFwIgV0emygqoiidJ2PJO2uwYWgrU7ZCev+sP6BDnSc6XwZc="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@toiroakr%2fread-multiline@0.4.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":154044},"main":"./dist/index.js","name":"@toiroakr/read-multiline","type":"module","types":"./dist/index.d.ts","author":"","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"license":"MIT","scripts":{"knip":"knip","lint":"oxlint -c oxlint.json src","test":"vitest run","build":"tsc","format":"oxfmt src","publint":"publint","release":"pnpm run build && changeset publish","lint:fix":"oxlint -c oxlint.json --fix src","changeset":"changeset","fix:oxfmt":"oxfmt","typecheck":"tsc --noEmit","fix:oxlint":"oxlint -c oxlint.json --fix","test:watch":"vitest","format:check":"oxfmt --check src","organize-imports":"organize-imports-cli tsconfig.json"},"version":"0.4.3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"716bb647-be0e-43d1-9043-a4d9d32f4a2b"}},"keywords":["cli","input","multiline","readline","stdin","terminal"],"repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"description":"Simple multi-line input reader for Node.js terminals","directories":{},"maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"_hasShrinkwrap":false,"devDependencies":{"knip":"^6.41.0","oxfmt":"^0.72.0","shiki":"^4.5.0","oxlint":"^1.87.0","vitest":"^5.0.4","graphql":"^17.0.2","publint":"^0.3.25","lefthook":"^2.2.1","typescript":"^7.0.2","@types/node":"^25.9.9","sql-highlight":"^6.1.0","@clack/prompts":"^1.8.1","@changesets/cli":"^3.0.3","@xterm/headless":"^6.0.0","@twinkleplop/sql":"0.1.7","@inquirer/prompts":"^8.7.3","@twinkleplop/graphql":"0.2.1","organize-imports-cli":"^1.0.2","graphql-language-service-parser":"^1.10.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/read-multiline_0.4.3_1792077768946_0.6302411025205874"}}},"time":{"created":"2026-03-09T15:44:48.503Z","modified":"2026-10-15T15:22:49.430Z","0.1.0":"2026-03-09T15:44:48.759Z","0.1.1":"2026-03-10T01:48:28.928Z","0.2.0":"2026-03-10T14:28:14.833Z","0.2.1":"2026-03-25T13:24:06.642Z","0.3.0":"2026-03-31T11:27:48.895Z","0.3.1":"2026-04-13T09:43:55.967Z","0.3.2":"2026-04-20T02:22:36.920Z","0.4.0":"2026-05-12T14:40:21.759Z","0.4.1":"2026-05-13T05:05:25.483Z","0.4.2":"2026-10-15T15:03:28.563Z","0.4.3":"2026-10-15T15:22:49.045Z"},"license":"MIT","keywords":["cli","input","multiline","readline","stdin","terminal"],"repository":{"url":"git+https://github.com/toiroakr/read-multiline.git","type":"git"},"description":"Simple multi-line input reader for Node.js terminals","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"readme":"# read-multiline\n\nSimple multi-line input reader for Node.js terminals. Solves the limitation of Node.js's built-in `readline` module which only supports single-line input.\n\n## Features\n\n- **Enter** to submit, **Shift+Enter** / **Ctrl+J** to insert newlines (swappable)\n- Arrow key cursor navigation across lines\n- **Alt+Arrow** for word jumping / history, **Ctrl+Arrow** / **Cmd+Arrow** for line/buffer jumping\n- **Delete**, **Ctrl+U**, **Ctrl+K** for forward delete and line editing\n- **Ctrl+W** to delete previous word\n- **Ctrl+Z** / **Ctrl+Y** for undo/redo\n- **Ctrl+L** to clear screen and redraw\n- Full-width (CJK) character support with correct cursor positioning\n- Bracketed paste mode for multi-line paste\n- Input history navigation (Up/Down at boundaries, Alt+Up/Down, Ctrl+P/N, PageUp/PageDown)\n- File-based persistent history with atomic (tmp+rename) save and per-entry `shouldPersist` filter\n- Initial value pre-population\n- Validation with debounced live feedback\n- Max lines / max character length enforcement\n- Terminal resize (SIGWINCH) handling\n- **Ctrl+C** / **Ctrl+D** handling\n- Non-TTY (pipe) input support\n- Theme/style system with state-dependent styling\n- Built-in presets for `@inquirer/prompts` and `@clack/prompts`\n- Optional `inlinePrompt` to render the prompt and the first input line on the same terminal line\n- `createPrompt()` factory for reusable shared configuration\n- Zero dependencies\n\nBest experience with terminals supporting the [kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) (kitty, iTerm2, WezTerm, Ghostty, foot, etc.). **Ctrl+J** always inserts a newline regardless of settings, serving as a universal fallback in all terminals.\n\n## Install\n\n```bash\npnpm add @toiroakr/read-multiline\n```\n\n## Usage\n\n```typescript\nimport { readMultiline } from \"@toiroakr/read-multiline\";\n\nconst [value, error] = await readMultiline(\"Enter your message:\", {\n  history: { filePath: \"./history.json\" },\n  maxLines: 10,\n  maxLength: 1000,\n  validate: (v) => (v.trim() === \"\" ? \"Input cannot be empty\" : undefined),\n});\n\nif (error) {\n  if (error.kind === \"cancel\") console.log(\"Cancelled\");\n  else if (error.kind === \"eof\") console.log(\"EOF\");\n} else {\n  console.log(\"You entered:\", value);\n}\n```\n\n### With presets\n\n```typescript\nimport { createPrompt, presets } from \"@toiroakr/read-multiline\";\n\n// inquirer-style prompt\nconst askInquirer = createPrompt(presets.inquirer);\nconst [name] = await askInquirer(\"What is your name?\");\nconst [bio] = await askInquirer(\"Tell me about yourself:\");\n\n// clack-style prompt\nconst askClack = createPrompt(presets.clack);\nconst [input] = await askClack(\"Enter some text:\");\n```\n\n### Syntax highlighting with Twinkleplop\n\nThe optional [Twinkleplop example](examples/twinkleplop-editor.ts) supports SQL and\nGraphQL using the `highlightLines` callback. The core package still has zero\nruntime dependencies. From a checkout of this repository:\n\n```bash\npnpm install\nnpx tsx examples/twinkleplop-editor.ts sql\nnpx tsx examples/twinkleplop-editor.ts graphql\n```\n\nTo use the adapter in your own application, install `@twinkleplop/sql` or\n`@twinkleplop/graphql`, copy [the ANSI adapter](examples/twinkleplop-highlight.ts),\nand pass a tokenizer to it:\n\n```typescript\nimport { tokenize } from \"@twinkleplop/sql\";\nimport { readMultiline } from \"@toiroakr/read-multiline\";\nimport { createTwinkleplopHighlight } from \"./twinkleplop-highlight.js\";\n\nconst highlight = createTwinkleplopHighlight(tokenize());\nconst [value, error] = await readMultiline(\"SQL:\", {\n  highlightLines: (lines) => highlight(lines.join(\"\\n\")).split(\"\\n\"),\n});\n```\n\nThe adapter preserves the original text, including whitespace and Unicode, and\naccepts incomplete input while typing. It tokenizes the whole buffer, including\nSQL block comments, GraphQL block strings, and context across line boundaries.\nEach colored line resets its ANSI style so prefixes and footers keep their own\ncolors. This example provides highlighting without auto-editing or validation.\n\nSee [benchmark results and methodology](examples/highlighting-benchmark.md) for\nstartup time, ANSI rendering time, memory usage, and the command to reproduce them.\n\n## API\n\n### `readMultiline(prompt, options?): Promise<ReadMultilineResult>`\n\nReturns a `ReadMultilineResult` tuple:\n\n- `[string, null]` on success (submitted input)\n- `[string, { kind: \"cancel\", message: \"Input cancelled\" }]` on Ctrl+C (includes partial input)\n- `[string, { kind: \"eof\", message: \"EOF received on empty input\" }]` on Ctrl+D with empty input\n\n| Parameter | Type     | Description                                   |\n| --------- | -------- | --------------------------------------------- |\n| `prompt`  | `string` | Prompt message on the header line above input |\n\n| Option                   | Type                                             | Default          | Description                                                                                             |\n| ------------------------ | ------------------------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------- |\n| `prefix`                 | `Stateful<string>`                               | `\"> \"`           | Prefix before the prompt message. Can be state-dependent                                                |\n| `linePrefix`             | `Stateful<string>`                               | same as `prefix` | Prefix for each input line. Can be state-dependent                                                      |\n| `theme`                  | `PromptTheme`                                    | `undefined`      | Theme for styling prompt elements                                                                       |\n| `input`                  | `TTYInput`                                       | `process.stdin`  | Input stream                                                                                            |\n| `output`                 | `WritableStream`                                 | `process.stdout` | Output stream                                                                                           |\n| `initialValue`           | `string`                                         | `undefined`      | Pre-populate the input                                                                                  |\n| `history`                | `string[] \\| HistoryOptions`                     | `[]`             | History entries or file-based persistent history                                                        |\n| `historyArrowNavigation` | `\"single\" \\| \"double\" \\| \"disabled\"`             | `\"single\"`       | How Up/Down interacts with history at boundaries                                                        |\n| `maxLines`               | `number`                                         | `undefined`      | Maximum number of lines                                                                                 |\n| `maxLength`              | `number`                                         | `undefined`      | Maximum total character count                                                                           |\n| `validate`               | `(value: string) => string \\| undefined \\| null` | `undefined`      | Validation function (return error message to reject)                                                    |\n| `validateDebounceMs`     | `number`                                         | `300`            | Debounce interval for live validation                                                                   |\n| `preferNewlineOnEnter`   | `boolean`                                        | `false`          | `true`: Enter=newline, `false`: Enter=submit                                                            |\n| `disabledKeys`           | `ModifiedEnterKey[]`                             | `[]`             | Key combos to disable                                                                                   |\n| `clearAfterSubmit`       | `boolean`                                        | `true`           | **Deprecated.** Clear input from terminal after submit. Use `theme.submitRender` instead                |\n| `footer`                 | `string`                                         | `undefined`      | Fixed footer text below the editor                                                                      |\n| `helpFooter`             | `boolean \\| HelpFooterDisplayOptions`            | `true`           | Auto-generated key bindings help footer                                                                 |\n| `inlinePrompt`           | `boolean`                                        | `false`          | Render the prompt header and the first input line on the same line. See [Inline prompt](#inline-prompt) |\n\n### Syntax highlighting callbacks\n\n`highlight(line, lineIndex)` returns one line with ANSI styling. It is suitable\nfor line-local highlighting and keeps the existing rendering behavior.\n\n`highlightLines(lines)` receives a read-only snapshot of all logical input lines\nand returns one ANSI-styled string per input line. Return the same number of lines,\npreserve their text and whitespace, and reset ANSI styling within each line.\nThis callback takes precedence over `highlight` and `theme.input`.\n\nWith `highlightLines`, a content edit redraws the complete buffer so changes to a\ncomment, string delimiter or later context can recolor other lines. The callback\nruns once per redraw, and its result is shared by every line in that redraw.\nBracketed paste is highlighted after the paste completes. Initial content,\nhistory, undo/redo, terminal resize and preserved answers use the same callback;\n`theme.answer`/`theme.cancelAnswer` still take precedence for final answers.\n\nWhen the output stream supplies `rows` and `columns`, input taller than the terminal\nuses a viewport in the terminal’s alternate screen, preserving earlier terminal output.\nThe main screen is restored when the prompt finishes. Cursor movement reveals offscreen lines, footers remain visible,\nand edits repaint visible rows without appending duplicate input to scrollback.\nThe viewport also handles wrapping, history, undo/redo, and terminal resize. Once\nentered, it remains active until the prompt finishes. Custom output streams can\nprovide these dimensions to enable the same behavior.\n\nFull-document highlighting processes the entire buffer for each edit. Use the\nline callback when you do not need cross-line context or want to avoid this cost\nfor large buffers.\n\n### Layout\n\nThe prompt renders as two visual areas: a **header line** and **input lines**.\n\n```\n[prefix][prompt]        ← header line (no input text here)\n[linePrefix][line 1]    ← all input lines use linePrefix\n[linePrefix][line 2]\n```\n\nWhen `prompt` is empty and `prefix` is empty, no header line is shown.\n\n#### Inline prompt\n\nWith `inlinePrompt: true`, the prompt header and the first input line share a single terminal line. Subsequent lines (from `Shift+Enter` / `Ctrl+J`) still use `linePrefix`:\n\n```\n[prefix][prompt][line 1]     ← header and first input on the same line\n[linePrefix][line 2]         ← subsequent lines keep the normal linePrefix\n```\n\nInline mode concatenates `prefix + prompt + input` with no implicit separator — include any desired trailing space in the prompt text. Combine with a `Stateful` `prefix` and `theme.submitRender: \"preserve\"` to get an inline prompt that transitions its prefix on submit. Subsequent lines (inserted via `Shift+Enter` / `Ctrl+J`) are prefixed with `linePrefix`:\n\n```typescript\nawait readMultiline(\"Bio: \", {\n  inlinePrompt: true,\n  prefix: { pending: \"> \", submitted: \"✔ \" },\n  linePrefix: \"  \",\n  theme: { submitRender: \"preserve\" },\n});\n\n// Before typing:\n//   > Bio:\n//\n// While editing (after Shift+Enter between lines):\n//   > Bio: Hello, I'm Tom.\n//     I like TypeScript.\n//\n// After submit:\n//   ✔ Bio: Hello, I'm Tom.\n//     I like TypeScript.\n```\n\n`inlinePrompt` requires the prompt header to render on a single terminal line. If `prefix` or `prompt` (including any `Stateful` prefix variant) contains a newline, `readMultiline` throws at call time. See `examples/inline-prompt.ts` for a full runnable demo.\n\n### `Stateful<T>`\n\nOptions like `prefix`, `linePrefix`, and theme styles accept a `Stateful<T>` value — either a plain value or an object with per-state values:\n\n```typescript\n// Plain value (same in all states)\nprefix: \"> \"\n\n// State-dependent values\nprefix: {\n  pending: \"? \",      // while editing\n  submitted: \"✔ \",    // after submission\n  cancelled: \"✘ \",    // after Ctrl+C (optional, defaults to pending)\n  error: \"! \",        // on validation error (optional, defaults to pending)\n}\n```\n\n### `PromptTheme`\n\n| Property       | Type                        | Description                                            |\n| -------------- | --------------------------- | ------------------------------------------------------ |\n| `prefix`       | `Stateful<StyleTextFormat>` | Style for the prefix text                              |\n| `linePrefix`   | `Stateful<StyleTextFormat>` | Style for the line prefix text                         |\n| `prompt`       | `StyleTextFormat`           | Style for the prompt message                           |\n| `input`        | `StyleTextFormat`           | Style for user input text while editing                |\n| `answer`       | `StyleTextFormat`           | Style for the answer text after submission             |\n| `cancelAnswer` | `StyleTextFormat`           | Style for the answer text after cancellation           |\n| `submitRender` | `\"clear\" \\| \"preserve\"`     | How to render after submission (default: `\"clear\"`)    |\n| `cancelRender` | `\"clear\" \\| \"preserve\"`     | How to render after Ctrl+C or EOF (default: `\"clear\"`) |\n| `error`        | `StyleTextFormat`           | Style for validation error messages                    |\n| `success`      | `StyleTextFormat`           | Style for validation success messages                  |\n| `footer`       | `StyleTextFormat`           | Style for footer text                                  |\n\n`StyleTextFormat` is the format parameter of Node.js's `util.styleText()` — e.g. `\"bold\"`, `\"red\"`, `\"cyan\"`, `[\"strikethrough\", \"dim\"]`.\n\n### `createPrompt(shared)`\n\nCreate a reusable prompt function with shared configuration. Per-call options are shallow-merged over the shared config.\n\n```typescript\nimport { createPrompt, presets } from \"@toiroakr/read-multiline\";\n\nconst ask = createPrompt(presets.inquirer);\nconst [name] = await ask(\"Name:\");\nconst [email] = await ask(\"Email:\");\n```\n\n### Presets\n\n#### `presets.inquirer`\n\nMimics `@inquirer/prompts` visual style:\n\n```\n? Enter name:          (pending)\n  John\n\n✔ Enter name:          (submitted)\n  John\n```\n\n- Blue `?` prefix → green `✔` on submit\n- Bold prompt, cyan answer\n- Inline help footer: **Enter** submit • **Shift+Enter** newline\n- `submitRender: \"preserve\"`, `cancelRender: \"preserve\"`\n\n#### `presets.clack`\n\nMimics `@clack/prompts` visual style:\n\n```\n│                      (pending)\n◆  Enter name:\n│  John\n\n│                      (submitted)\n◇  Enter name:\n│  John\n```\n\n- Cyan `◆` → green `◇` on submit, red `■` on cancel, yellow `▲` on error\n- Gray guide bar, dim answer, strikethrough+dim cancel answer\n- `submitRender: \"preserve\"`, `cancelRender: \"preserve\"`\n\n> **Note:** Ctrl+J (0x0A) always inserts a newline regardless of `preferNewlineOnEnter`.\n> When `preferNewlineOnEnter: true` is set but the kitty keyboard protocol is not supported,\n> the option automatically falls back to `false` to ensure submit (Enter) and newline (Ctrl+J) are always available.\n\n### Key Bindings\n\nThe following table shows all key bindings and their availability across terminal types.\n\n**Legend:** \"All\" = works in all terminals, \"Kitty\" = requires [kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/)\n\n#### Submit / Newline\n\n`preferNewlineOnEnter` (default `false`) swaps the role of Enter and modified Enter keys. Ctrl+J always inserts a newline regardless of this setting.\n\n| Key         | Action (`preferNewlineOnEnter: false`) | Action (`true`) | Terminal      |\n| ----------- | -------------------------------------- | --------------- | ------------- |\n| Enter       | Submit                                 | Newline         | All           |\n| Shift+Enter | Newline                                | Submit          | Kitty         |\n| Ctrl+Enter  | Newline                                | Submit          | Kitty         |\n| Cmd+Enter   | Newline                                | Submit          | Kitty (macOS) |\n| Alt+Enter   | Newline                                | Submit          | All \\*        |\n| Ctrl+J      | Newline                                | Newline         | All           |\n\n\\* Alt+Enter requires \"Use Option as Meta key\" on some macOS terminals. On\nWindows Console Host, Windows Terminal, and PowerShell the attached terminal\nmay intercept Alt+Enter for fullscreen toggle before it reaches the\napplication; if that conflicts with your workflow, pass\n`disabledKeys: [\"alt+enter\"]` to opt out.\n\n#### Editing\n\n| Key                                         | Action                                   | Terminal |\n| ------------------------------------------- | ---------------------------------------- | -------- |\n| Backspace                                   | Delete character backward (merges lines) | All      |\n| Delete                                      | Delete character forward (merges lines)  | All      |\n| Ctrl+U                                      | Delete to line start                     | All      |\n| Ctrl+K                                      | Delete to line end                       | All      |\n| Ctrl+W                                      | Delete previous word                     | All      |\n| Ctrl+Z / Cmd+Z                              | Undo                                     | All \\*\\* |\n| Ctrl+Y / Ctrl+Shift+Z / Cmd+Shift+Z / Cmd+Y | Redo                                     | All \\*\\* |\n| Ctrl+L                                      | Clear screen and redraw                  | All      |\n\n\\*\\* Ctrl+Z/Y work in all terminals. Cmd+Z/Y and Ctrl+Shift+Z require kitty protocol.\n\n#### Cursor Movement\n\n| Key                                  | Action                                     | Terminal      |\n| ------------------------------------ | ------------------------------------------ | ------------- |\n| Left / Right                         | Move cursor (crosses line boundaries)      | All           |\n| Up / Down                            | Move between lines (history at boundaries) | All           |\n| Alt+Left / Alt+Right                 | Word jump                                  | All           |\n| Alt+Up / Alt+Down                    | History prev / next                        | All           |\n| Ctrl+P / Ctrl+N                      | History prev / next                        | All           |\n| PageUp / PageDown                    | History prev / next                        | All           |\n| Ctrl+Left / Ctrl+Right               | Line start / end                           | All           |\n| Ctrl+Up / Ctrl+Down                  | Buffer start / end                         | All           |\n| Option+Left / Option+Right (ESC+b/f) | Word jump                                  | All (macOS)   |\n| Cmd+Left / Cmd+Right                 | Line start / end                           | Kitty (macOS) |\n| Ctrl+A / Ctrl+E                      | Line start / end                           | All           |\n| Cmd+Up / Cmd+Down                    | Buffer start / end                         | Kitty (macOS) |\n| Home / End                           | Line start / end                           | All           |\n\n#### Control\n\n| Key    | Action                                                                          | Terminal |\n| ------ | ------------------------------------------------------------------------------- | -------- |\n| Ctrl+C | Cancel (returns `[input, { kind: \"cancel\", message }]`)                         | All      |\n| Ctrl+D | Delete at cursor, or EOF if empty (returns `[input, { kind: \"eof\", message }]`) | All      |\n\n### Disabling Keys\n\nUse `disabledKeys` to ignore specific key combinations:\n\n```typescript\n// Disable Ctrl+J (e.g., if it conflicts with your app)\nawait readMultiline(\"\", { disabledKeys: [\"ctrl+j\"] });\n\n// Only allow Shift+Enter and Ctrl+J as newline\nawait readMultiline(\"\", { disabledKeys: [\"ctrl+enter\", \"cmd+enter\", \"alt+enter\"] });\n```\n\nValid values: `\"shift+enter\"`, `\"ctrl+enter\"`, `\"cmd+enter\"`, `\"alt+enter\"`, `\"ctrl+j\"`\n\n### History\n\nPass an array for in-memory history, or a `HistoryOptions` object for file-based persistence:\n\n```typescript\n// In-memory history\nawait readMultiline(\"\", { history: [\"previous input\"] });\n\n// File-based persistent history\nawait readMultiline(\"\", {\n  history: { filePath: \"~/.myapp/history.json\", maxEntries: 50 },\n});\n```\n\n| Option          | Type                         | Default     | Description                                                                                        |\n| --------------- | ---------------------------- | ----------- | -------------------------------------------------------------------------------------------------- |\n| `filePath`      | `string`                     | (required)  | JSON file path for persistence                                                                     |\n| `maxEntries`    | `number`                     | `100`       | Maximum entries to keep                                                                            |\n| `shouldPersist` | `(value: string) => boolean` | `undefined` | Predicate that returns `false` to skip persisting a submitted value (it still resolves as success) |\n\nThe file is loaded at startup and updated after each submit via a read-modify-write cycle: the current file is re-read, the new entry appended, and the result written through a sibling temp file plus `fs.rename`. This way readers never observe a partial JSON document, and entries appended by concurrent sessions after this session started are preserved. Errors are silently ignored; the parent directory is created automatically.\n\nBy default, empty submissions (`\"\"`) are not persisted. Pass a custom `shouldPersist` to override this. For example, to also skip whitespace-only submissions or REPL meta commands:\n\n```typescript\nawait readMultiline(\"> \", {\n  history: {\n    filePath: \"~/.myapp/history.json\",\n    shouldPersist: (value) => value.trim() !== \"\" && !value.startsWith(\"\\\\\"),\n  },\n});\n```\n\n#### `historyArrowNavigation`\n\nControls how Up/Down arrow keys interact with history at boundaries:\n\n- `\"single\"` (default): at boundary, one press navigates history\n- `\"double\"`: at boundary, two consecutive presses navigate history\n- `\"disabled\"`: Up/Down never triggers history — use dedicated keys (Alt+Up/Down, Ctrl+P/N, PageUp/PageDown) instead\n\n### Footer\n\nUse `footer` for custom text, `helpFooter` for auto-generated key bindings help:\n\n```typescript\n// Auto-generated help footer (detects terminal capabilities)\nawait readMultiline(\"\", { helpFooter: true });\n\n// Customized help footer\nawait readMultiline(\"\", {\n  helpFooter: {\n    items: [\"submit\", \"newline\", \"undo\"], // Choose actions and order (default: [\"submit\", \"newline\", \"undo\", \"cancel\", \"eof\"])\n    maxKeysPerAction: 3, // Show up to 3 key alternatives per action (default: 2)\n    maxLines: 1, // Limit to 1 line (default: unlimited)\n    style: \"dim\", // Overall style (default: \"dim\", or none when separator is set)\n    keyStyle: \"bold\", // Style for key labels\n    actionStyle: \"dim\", // Style for action descriptions\n    separator: \" • \", // Inline layout with separator (default: grid layout)\n  },\n});\n\n// Custom footer + help footer together\nawait readMultiline(\"\", {\n  footer: \"Type your message below\",\n  helpFooter: true,\n});\n```\n\n`helpFooter` automatically detects [kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) support and only shows keys available in the current terminal. The `preferNewlineOnEnter` and `disabledKeys` options are inherited, and terminal width is auto-calculated.\n\n### Validation\n\nWhen a `validate` function is provided:\n\n1. On submit, the input is validated. If validation fails, a red error message appears below the input and submission is blocked.\n2. After the first validation failure, validation runs on every change (debounced) with live feedback: red for errors, green \"OK\" when valid.\n3. When a theme with error visual state is configured (e.g. `presets.clack`), the prefix and line prefix switch to their error-state appearance during validation errors.\n\n### Limits\n\nWhen `maxLines` or `maxLength` is set, input beyond the limit is silently blocked and a red error message appears below the input.\n\n## License\n\nMIT\n","readmeFilename":""}