{"_id":"@airstate/use-shared-state","_rev":"3-f2e5cd96192105b84cdfce2955734d00","name":"@airstate/use-shared-state","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@airstate/use-shared-state","version":"0.0.1","keywords":["state","sync","realtime"],"license":"MIT","_id":"@airstate/use-shared-state@0.0.1","maintainers":[{"name":"omranjamal","email":"o.jamal97@gmail.com"}],"contributors":[{"url":"https://airstate.dev","name":"AirState","email":"hello@airstate.dev"}],"homepage":"https://github.com/airstate/use-shared-state#readme","bugs":{"url":"https://github.com/airstate/use-shared-state/issues"},"dist":{"shasum":"eb4a1ff66383662b9170380e1782d7462b161e5b","tarball":"https://registry.npmjs.org/@airstate/use-shared-state/-/use-shared-state-0.0.1.tgz","fileCount":17,"integrity":"sha512-NLdZegDa7/0EYtug1lt1UiMMGYiuBfkA++PFi21DRPxnuYOmwL9/iPWmLOgXNXhsYzdFKjF98RpXaHoI8BzVGw==","signatures":[{"sig":"MEYCIQCJSc1zSkOgCBpQZ4iE4SQDx+M+2DQPLeWmw6t7cu07PAIhAKKp9vfF79B91BRjxI+qz3HmAVH7tfWOFEFzz1ubXstg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67409},"main":"dist/index.mjs","type":"module","_from":"file:airstate-use-shared-state-0.0.1.tgz","types":"dist/index.d.mts","include":["dist/**/*"],"scripts":{"test":"jest","build":"tsc --project tsconfig.build.json","build:watch":"tsc --project tsconfig.build.json --watch --preserveWatchOutput"},"_npmUser":{"name":"omranjamal","email":"o.jamal97@gmail.com"},"_resolved":"/tmp/b4254e8c5a4e8a04e2fbfa7ac00b6c15/airstate-use-shared-state-0.0.1.tgz","_integrity":"sha512-NLdZegDa7/0EYtug1lt1UiMMGYiuBfkA++PFi21DRPxnuYOmwL9/iPWmLOgXNXhsYzdFKjF98RpXaHoI8BzVGw==","repository":{"url":"git+https://github.com/airstate/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"[BETA] useState but instantly syncs across clients in realtime","directories":{},"_nodeVersion":"20.19.0","dependencies":{"yjs":"13.6.24"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.1.2","prettier":"3.5.3","typescript":"5.8.2","@types/jest":"29.5.12","@types/react":">=17"},"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_0.0.1_1743767575927_0.6558668876940708","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@airstate/use-shared-state","version":"0.0.2","keywords":["state","sync","realtime"],"license":"MIT","_id":"@airstate/use-shared-state@0.0.2","maintainers":[{"name":"omranjamal","email":"o.jamal97@gmail.com"}],"contributors":[{"url":"https://airstate.dev","name":"AirState","email":"hello@airstate.dev"}],"homepage":"https://github.com/airstate/use-shared-state#readme","bugs":{"url":"https://github.com/airstate/use-shared-state/issues"},"dist":{"shasum":"2388e1956c9efd31822f21f9fd6e1f03b882176c","tarball":"https://registry.npmjs.org/@airstate/use-shared-state/-/use-shared-state-0.0.2.tgz","fileCount":21,"integrity":"sha512-NKt9EzBsWUiiZA1QI91Cm+HrbaPv6Gwy8gl9GbbV1Y2G/i0yHughj0Gjp2eX3q3M2RoOS8GuIBCvyDy3YhRthA==","signatures":[{"sig":"MEQCIE0HqMiUi6pJhhqjkrRHgM954Ix1V+EIag1hHDwiUg2gAiB/eHSFFyne7zTu51T4Sd/CeJBgCw10epdTlDC/A3Xfqw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71698},"main":"dist/index.mjs","type":"module","_from":"file:airstate-use-shared-state-0.0.2.tgz","types":"dist/index.d.mts","include":["dist/**/*"],"scripts":{"test":"jest","build":"tsc --project tsconfig.build.json","build:watch":"tsc --project tsconfig.build.json --watch --preserveWatchOutput"},"_npmUser":{"name":"omranjamal","email":"o.jamal97@gmail.com"},"_resolved":"/tmp/6766bdbf1b9ed16291c9901965261139/airstate-use-shared-state-0.0.2.tgz","_integrity":"sha512-NKt9EzBsWUiiZA1QI91Cm+HrbaPv6Gwy8gl9GbbV1Y2G/i0yHughj0Gjp2eX3q3M2RoOS8GuIBCvyDy3YhRthA==","repository":{"url":"git+https://github.com/airstate/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"[BETA] useState but instantly syncs across clients in realtime","directories":{},"_nodeVersion":"20.19.0","dependencies":{"yjs":"13.6.24"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.7.0","ts-jest":"29.1.2","prettier":"3.5.3","typescript":"5.8.2","@types/jest":"29.5.12","@types/react":">=17"},"peerDependencies":{"react":">=17"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_0.0.2_1743770216917_0.8319833251079503","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@airstate/use-shared-state","version":"0.0.4","description":"[BETA] useState but instantly syncs across clients in realtime","main":"dist/index.mjs","types":"dist/index.d.mts","type":"module","dependencies":{"yjs":"13.6.24"},"devDependencies":{"typescript":"5.8.2","jest":"29.7.0","@types/jest":"29.5.12","ts-jest":"29.1.2","prettier":"3.5.3","@types/react":">=17"},"repository":{"type":"git","url":"git+https://github.com/airstate/use-shared-state.git"},"peerDependencies":{"react":">=17"},"keywords":["state","sync","realtime"],"contributors":[{"name":"AirState","email":"hello@airstate.dev","url":"https://airstate.dev"}],"license":"MIT","include":["dist/**/*"],"scripts":{"build":"tsc --project tsconfig.build.json","build:watch":"tsc --project tsconfig.build.json --watch --preserveWatchOutput","dev":"pnpm build:watch","test":"jest"},"_id":"@airstate/use-shared-state@0.0.4","bugs":{"url":"https://github.com/airstate/use-shared-state/issues"},"homepage":"https://github.com/airstate/use-shared-state#readme","_integrity":"sha512-BtTU1m+ZP80rb7mY+6rYotl9QH/FGb+6hE1crg6fmd2SHJvzi/7gMwiUnBlA7h4dA0XpWo3IG1lMPdUvOi/ZaQ==","_resolved":"/tmp/cef55dce56318907ec3e32438fc565d5/airstate-use-shared-state-0.0.4.tgz","_from":"file:airstate-use-shared-state-0.0.4.tgz","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-BtTU1m+ZP80rb7mY+6rYotl9QH/FGb+6hE1crg6fmd2SHJvzi/7gMwiUnBlA7h4dA0XpWo3IG1lMPdUvOi/ZaQ==","shasum":"77af8b734e981c2d73057b4b89f158fcb55cd028","tarball":"https://registry.npmjs.org/@airstate/use-shared-state/-/use-shared-state-0.0.4.tgz","fileCount":20,"unpackedSize":71313,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDlscsDPlaITsSJJFGzwBtSDLXzjfe66d5OkgO1gMAD+AiAfq3vVuNKSReZLlPZ503nmjQHjc2kQ/sg/gV/It4VguQ=="}]},"_npmUser":{"name":"omranjamal","email":"o.jamal97@gmail.com"},"directories":{},"maintainers":[{"name":"omranjamal","email":"o.jamal97@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/use-shared-state_0.0.4_1743779920424_0.20524143664706718"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-04T11:52:55.878Z","modified":"2025-04-04T15:18:40.841Z","0.0.1":"2025-04-04T11:52:56.153Z","0.0.2":"2025-04-04T12:36:57.142Z","0.0.4":"2025-04-04T15:18:40.641Z"},"bugs":{"url":"https://github.com/airstate/use-shared-state/issues"},"license":"MIT","homepage":"https://github.com/airstate/use-shared-state#readme","keywords":["state","sync","realtime"],"repository":{"type":"git","url":"git+https://github.com/airstate/use-shared-state.git"},"description":"[BETA] useState but instantly syncs across clients in realtime","contributors":[{"name":"AirState","email":"hello@airstate.dev","url":"https://airstate.dev"}],"maintainers":[{"name":"omranjamal","email":"o.jamal97@gmail.com"}],"readme":"# @airstate/use-shared-state\n\nA drop-in replacement for React's `useState` for developers who want to build realtime React apps.\n`useSharedState` automatically syncs state across different clients in real-time.\n\n> [BETA] This program is still in beta, and is it active development. Refrain from using it in production\n> as the API is as of yet, unstable.\n\n## Installation\n\n```bash\npnpm install --save @airstate/use-shared-state\n```\n\n## Configure\n\n### AirState Cloud\n\nGet your `appKey` from [console.airstate.dev](https://console.airstate.dev)\n\n```ts\nimport { configure } from '@airstate/use-shared-state';\n\n// Call this before your app starts\n// (safe to call in SSR outside react tree)\n\nconfigure({\n    appKey: '[your app key]',\n});\n```\n\n### Self Hosted\n\n```ts\nimport { configure as configureAirState } from '@airstate/use-shared-state';\n\n// Call this before your app starts\n// (safe to call in SSR outside react tree)\n\nconfigureAirState({\n    server: 'https://[your-server-hostname]:[port]/airstate',\n});\n```\n\n## Telemetry\n\nBy default AirState gathers information about the framework being used only in localhost.\nThis allows us to build better software to help the community.\n\nNote: no identifying information is sent to our servers.\n\n```ts\nconfigureAirState({\n    // ...\n    disableDevelopmentTelemetry: false, // or `true`\n    // ...\n});\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}