{"_id":"@a-morphous/frontispiece-ink-zustand","_rev":"2-08e861059de0fd0e54fb69f952d1e05c","name":"@a-morphous/frontispiece-ink-zustand","dist-tags":{"latest":"5.0.1"},"versions":{"5.0.0":{"name":"@a-morphous/frontispiece-ink-zustand","version":"5.0.0","author":{"url":"https://amorphic.space","name":"Amorphous"},"license":"MPL 2.0","_id":"@a-morphous/frontispiece-ink-zustand@5.0.0","maintainers":[{"name":"amorphous","email":"84998015+a-morphous@users.noreply.github.com"}],"dist":{"shasum":"75eef300ed62e6879b3c791f94f740fe8e9004ed","tarball":"https://registry.npmjs.org/@a-morphous/frontispiece-ink-zustand/-/frontispiece-ink-zustand-5.0.0.tgz","fileCount":6,"integrity":"sha512-DUJ6rWLd20fLqRoTgnAWjenS0Ih/0rIjKEoDd14qpYphqFcswus3fx4K3AraMxTi9Eu8HNBVloFX351sO9SBTA==","signatures":[{"sig":"MEUCIQCuLJsVumfUiCBp612k/Ha6hv/348N7KOzVt1oJiATmQAIgCcg7IZDrd/nAm1z2CTb4FVmeDZ/G1322A7G6DwccK7s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":251403},"main":"dist/ink-zustand.module.js","type":"module","types":"dist/index.d.ts","module":"dist/ink-zustand.module.js","engines":{"node":">=22.0.0"},"gitHead":"e1f0c2b856592ec487aefc614f17aea33f967e68","scripts":{"pub":"pnpm publish --access public","test":"echo \"Error: no test specified\" && exit 1","build":"node build","dryRun":"pnpm publish --dry-run","prepublishOnly":"pnpm build"},"_npmUser":{"name":"amorphous","email":"84998015+a-morphous@users.noreply.github.com"},"_npmVersion":"10.9.3","description":"Ink and Zustand integration.","directories":{},"_nodeVersion":"22.19.0","dependencies":{"immer":"^10.1.1"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.17.11","npm-dts":"^1.3.12","travels":"^0.9.0","zustand":"^5.0.9","minimist":"^1.2.8","mutative":"^1.3.0","zustand-travel":"^0.5.3","@a-morphous/frontispiece-ink-processor":"workspace:^5.0.0"},"peerDependencies":{"travels":"^0.9.0","zustand":"^5.0.9","mutative":"^1.3.0","zustand-travel":"^0.5.3","@a-morphous/frontispiece-ink-processor":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/frontispiece-ink-zustand_5.0.0_1767405629199_0.9674650178075839","host":"s3://npm-registry-packages-npm-production"}},"5.0.1":{"name":"@a-morphous/frontispiece-ink-zustand","version":"5.0.1","description":"Ink and Zustand integration.","main":"dist/ink-zustand.module.js","module":"dist/ink-zustand.module.js","type":"module","types":"dist/index.d.ts","license":"MPL 2.0","engines":{"node":">=22.0.0"},"scripts":{"build":"node build","prepublishOnly":"pnpm build","dryRun":"pnpm publish --dry-run","pub":"pnpm publish --access public","test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Amorphous","url":"https://amorphic.space"},"devDependencies":{"@a-morphous/frontispiece-ink-processor":"workspace:^5.0.0","esbuild":"^0.17.11","minimist":"^1.2.8","mutative":"^1.3.0","npm-dts":"^1.3.12","travels":"^0.9.0","zustand":"^5.0.9","zustand-travel":"^0.5.3"},"peerDependencies":{"@a-morphous/frontispiece-ink-processor":"^5.0.0","mutative":"^1.3.0","travels":"^0.9.0","zustand":"^5.0.9","zustand-travel":"^0.5.3"},"dependencies":{"immer":"^10.1.1"},"_id":"@a-morphous/frontispiece-ink-zustand@5.0.1","gitHead":"5e2350a6be94b7ef58ff61f9bb13c6c481a6e8af","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-HjxiGBOz/AHSd593w9cCEYeEADViQhlVWKLxcxXQ3L/Sgs4wTIF3LEF6837Eo3w39hqUPogaqkOqv8UqTGaskA==","shasum":"316e6e15c3a34492d003767ac3280d7736822f99","tarball":"https://registry.npmjs.org/@a-morphous/frontispiece-ink-zustand/-/frontispiece-ink-zustand-5.0.1.tgz","fileCount":6,"unpackedSize":251931,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAw4Fkw3IPuQBjabnJqQQJUF8/djdZpW1LGzWKIc1jurAiEA2IolK4W69KnHNyvxLl5xkWrSeBhbHffU/5FvlkIIu8k="}]},"_npmUser":{"name":"amorphous","email":"84998015+a-morphous@users.noreply.github.com"},"directories":{},"maintainers":[{"name":"amorphous","email":"84998015+a-morphous@users.noreply.github.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/frontispiece-ink-zustand_5.0.1_1767409868022_0.5993765878970636"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-03T02:00:29.132Z","modified":"2026-01-03T03:11:08.379Z","5.0.0":"2026-01-03T02:00:29.375Z","5.0.1":"2026-01-03T03:11:08.171Z"},"author":{"name":"Amorphous","url":"https://amorphic.space"},"license":"MPL 2.0","description":"Ink and Zustand integration.","maintainers":[{"name":"amorphous","email":"84998015+a-morphous@users.noreply.github.com"}],"readme":"# Ink Zustand\n\nManipulate an `ink-processor` using zustand as a React data-binding.\n\n```tsx\nimport { Story } from 'inkjs'\nimport { createInkZustandState } from '@a-morphous/frontispiece-ink-zustand'\n\nconst story = new Story(/* story JSON */)\n\n// this creates a zustand hook, and can be manipulated both in and out of the React tree.\nconst useInkState = createInkHookState(story)\nconst InkHookStateController = useInkState.getState()\n\nInkHookStateController.registerCommand('pause', Pause)\nInkHookStateController.registerCommand('log', Log)\n\nconst InkViewerComponent = () => {\n    const inkState = useInkState()\n\n    return <div>{inkState.getVisibleLines().map((line) => {\n        return <p>{line.text}</p>\n    })}</div>\n}\n```","readmeFilename":"README.md"}