{"_id":"@ably-labs/react-hooks","_rev":"35-e2edd2be171459c98393ba6878be1b6c","name":"@ably-labs/react-hooks","dist-tags":{"canary":"3.0.0-canary.1","latest":"2.1.2"},"versions":{"1.1.0":{"name":"@ably-labs/react-hooks","version":"1.1.0","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@1.1.0","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"ad52fc3e5883e12ef0af0287e8d8883da3182a3f","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-1.1.0.tgz","fileCount":29,"integrity":"sha512-+GLgbCLJxUCyMczpqnzRGzZt3klSrUWfQUiZeQs9fFdPbJ5R14YHoI5QzmZY2CdYBgPjG1neB2LXd+15r0Zizw==","signatures":[{"sig":"MEUCIQCFOOfa/m5MNkEh5hIJOlpjONsSxFp/JVs1wHGMw7IlXgIgKFx+j5mNRVTe9x5EGg3l0XqTkVPkOWt8tu4pnm18m6c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24203},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"23df47f0634228b764783e1801382537b9d7c7a4","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.15","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.6","dependencies":{"ably":"^1.2.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","snowpack":"^3.8.8","react-dom":"^17.0.2","typescript":"^4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_1.1.0_1634322304463_0.9765356735882582","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@ably-labs/react-hooks","version":"1.1.1","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@1.1.1","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"5ad5230e9e9a97af53c6956a28d6b66c61dc8cc4","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-1.1.1.tgz","fileCount":29,"integrity":"sha512-GuW9dhDp50zdVs3rLgCSV39rWxbOJxTMDSShFk65jsxw6RSrXjtG/S9De+yMdl0+t+UqrSipXAwuvt4QJKVdBA==","signatures":[{"sig":"MEUCIBSgU2MFuIo1W1UDK4onvD5F+a/+VMYIeKF/0kRYeP2DAiEAlADgi64KBt7vmNqgvqer+lC7C44jhEMqTKZhGC86ewM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24286},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"9771b5ca44f6249b79d92c9e4de7a36eea3c5562","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.15","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.6","dependencies":{"ably":"^1.2.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","snowpack":"^3.8.8","react-dom":"^17.0.2","typescript":"^4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_1.1.1_1634677530188_0.34322769506009254","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@ably-labs/react-hooks","version":"1.1.2","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@1.1.2","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"89623bb1f2cc61f1b2c1700f30195437d6a6b7be","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-1.1.2.tgz","fileCount":29,"integrity":"sha512-JtS3Qddogxh2xdcvjO0D0Dm6q9kH5pYVL0rxLLxsLFHwERODq6MK1T8BBdbDudill3MHRa/buHisSAbGm9eCMg==","signatures":[{"sig":"MEUCIQDX0hevPBZRYOdZVUoLfj4WefNjfOxpHjG83ZLfHe28lwIgL/44wtYbjojw6CUbfisAw7s/nKQT+dAvwSWO29e7Jhs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24286},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7ee4c4025faa30630a18273b5ab4760c1657b823","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.15","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.6","dependencies":{"ably":"^1.2.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","snowpack":"^3.8.8","react-dom":"^17.0.2","typescript":"^4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_1.1.2_1634677598019_0.527941435462808","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"@ably-labs/react-hooks","version":"1.1.3","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@1.1.3","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"3c0c9d1124ed5a701b6da420a5152aa72fec2e7e","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-1.1.3.tgz","fileCount":29,"integrity":"sha512-l08x8clp+ssGhQq1Yjaop34SKt/9lZG6gDqYpoRCH6hDbHFFgx2MXzCfaTK31XU1Nbil8uUSi7eG+En+AZbgXA==","signatures":[{"sig":"MEUCIGzTXDMWM2rjpMyCaGOeYT1hRRkIYL01P6DPIFrr7oTgAiEA+rlh7dmv4isa1m/qNm5U1rMhP77MR0DGQcfXZ283h+U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24296},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"4209df62419a2eaaf489e2777ac9a2b1e6c67da7","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.15","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.7","dependencies":{"ably":"^1.2.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","snowpack":"^3.8.8","react-dom":"^17.0.2","typescript":"^4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_1.1.3_1636115351220_0.10997999101699185","host":"s3://npm-registry-packages"}},"1.1.4":{"name":"@ably-labs/react-hooks","version":"1.1.4","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@1.1.4","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"55d8fd7b0c9a3076d759c30458a09f411d093ab6","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-1.1.4.tgz","fileCount":29,"integrity":"sha512-EYWbzBqyGvVZbVaV0O3umglA/csAT9g8XuuZ/RgAt2kvStkqWoMEPSysIwvLEnE+YBmYBRCnGpprPxkw5gL6Tg==","signatures":[{"sig":"MEQCIHQFNrK5MuFTUAdTVbaTGjh0IExoDL7lgW5QNzLSHvGVAiBI0kC6byWwlzPsa8goqKX5TDyGzje+Jsk6IO1UsPZJlQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24301},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"53fc1165132cbe454860e08f70bc3eff492481f1","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.15","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.7","dependencies":{"ably":"^1.2.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","snowpack":"^3.8.8","react-dom":"^17.0.2","typescript":"^4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_1.1.4_1636134535648_0.3797636248935723","host":"s3://npm-registry-packages"}},"1.1.5":{"name":"@ably-labs/react-hooks","version":"1.1.5","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@1.1.5","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"36294b3688a908da3ddb3514ed67c7281a7fdd79","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-1.1.5.tgz","fileCount":29,"integrity":"sha512-ByALwWlYCcJQQhsHBrW+Jmjb6DRD1XZXNPSpYrYGmNOi7Czd+XATxP0ttN8ejoBcjK2fyaWkR3ulPQRS2/B1zA==","signatures":[{"sig":"MEUCIE36xqohAEXd8hqHY5toUiLDGVgMBVqH2eehdc/Z7S8/AiEA7DQGU19N4r9K2r5lPYe1rYqchXxEqn99s2VOG1ISQUk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhp1LaCRA9TVsSAnZWagAAHygQAJl+Kyndxp6+dK1eU7J/\nAq9stcnPCqiTxzQTfywdsMVxSw0doEguoDf2vggg1uzCUcFf+uyfNEXXLBbq\nahK4+qRFDDKL7vDKBgeK/iMwKiyjaovohdZ7BybKIpxBIabpkGm6uj85fTg1\n/WE2jsX3S2V9+g/f74Tiq+4GPyMcEXnKlbz2BKmlGoq59ETJZ8qAc5uFyxHE\nx8pSnmg/EN8GgzGYQKYaQPOXbT1Con1m9nqtulN3fbr3hhK0q9RlUwDr/MMi\nv7pRCbhfgnoC8XEdwHa5T01pvyDfOmJEUIZCSXrzkwLT15SkJM4osrjFNU6F\nLYHDd4JaxMrkuIydGkjy3xkswsea+xhPk1Yzhacr2t9SqN0BXob/jjOdGiRr\nSBhu0x3bRuYV97qFiOoejci3/8RGMHn3EwxTnuRet2nzZ9YYCo1X7B2j6Gss\nFotfo1Oh8miQWoa44Oiqjsjqfe3BqOp7CyCbE7uQI32Ur91xhSMYoqMFuOdM\nrWO2urxr2+aoHxajlVV8yC1L1jgFFjnXSX2NMH1lM+PEu9d8ODkmcLmx75To\nbhhSibZn5kv6P9Tm+OOgz9WjKf0J4Un/FTF0z/zjZpxdbtNJyNQMc4skqUjs\nU3x+YNcovjDLNKMAh9us99B8WwcVR8Vm3HV/L+KLyKeJVvRIMM+/esOKm2Jw\n55fX\r\n=c/wK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"afd3c44d966f3e2be00abb906696eb9d914715b1","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.15","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.7","dependencies":{"ably":"^1.2.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","snowpack":"^3.8.8","react-dom":"^17.0.2","typescript":"^4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_1.1.5_1638355674163_0.8627591154046359","host":"s3://npm-registry-packages"}},"1.1.6":{"name":"@ably-labs/react-hooks","version":"1.1.6","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@1.1.6","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"70e68691b30cbccdb088d566c5a82f5aa5cc315e","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-1.1.6.tgz","fileCount":29,"integrity":"sha512-dYcogz4w4pypD2mWQjxVMQEvN2YnRV6zwaYchN2Jgn7IQYIclXM16g60Z0bm/zxA2Wrg7bKrxnznBXXNM2nbDQ==","signatures":[{"sig":"MEUCIQC7m8/tfl1sIBJ8LljS+3qTBm33pwtjlXJpVmFeDWcPoAIgGiwCjBgTFE+/H0jAb/Z1Bd39n56OROoNHr1DliQOxJ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYmbGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmorLQ//WENGTrS+gCCStL4aaAU0Gk4uqe3JCDvoBUrnMRLAXH6XEyho\r\nXGwPT21g6yu4qVRHd2+1gXsP0WvDw/SSFDyQcg2hAjGwbDkOGMU04/pWXk3w\r\nsjzJlJvbdE0EvwqN7DZLtWWkUs/NKnrMY6hQCBl3MgD7vHhGdrSzBABxD1Iy\r\nLS2bcaZwoaYPMYxvISclzqOOFaYlVzQ0eyv4AuAAeGtHdlgCdW0QxyJFegFn\r\nJBRJAs2Ripj1Qd1kJhzAjhVO4VQ0DdgQt5YHhHVuv3L+nc7ruDy+aY0UdNqg\r\n+IAR75XE5gTorE7cQ3PFl/CRRxZRF1mpUxEBxKoGBPRxaOv9TR34V7ch+rc6\r\nDRfU8kp/DystNNDIgaWXBuO3JgSRBop3UzOm9BjdeyCqJQTSEKooXu8XhXVP\r\nr6qJ1Yt1lXZLUAJu3rkb+F/YqxrAnHkm4e1dLdT/fLzCXvqmY1vTbFfqy2c/\r\nieoFAQnXf4/NWr6Dp8c6Lv4q4i8cQJ41tYTLzigZYAAxjVmr1p308Fpyibm0\r\n/fQvqY4IMDs33UeptikLLTFdLk2a56rFOUqdgOfE8Dqo6wTZ6ZDZH5PyXPC/\r\nIxVlE8w+6nsw44xo1cqjMmHYMV4sx/T6+/wt4TFQ+Bfz1BzGSiJpMn1M25J0\r\nD+omAg6bAgetQfqVi1cNMBj/JfdSE5M8nnQ=\r\n=nzBw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7baefafb488e623f445ed37ff79738e5fb38e43b","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.16","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.12","dependencies":{"ably":"^1.2.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","snowpack":"^3.8.8","react-dom":"^17.0.2","typescript":"^4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_1.1.6_1650616006011_0.011391607066830511","host":"s3://npm-registry-packages"}},"1.1.7":{"name":"@ably-labs/react-hooks","version":"1.1.7","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@1.1.7","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"ca84dff477b90a37c9e34c6126a17b8ca9672b99","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-1.1.7.tgz","fileCount":29,"integrity":"sha512-NmXRm9P0N1KRcUS+TW8zzfXG7dU1U/ZFPnHv+yYJ7MMIahsJic7j+/4BW315ZGnHsJ+k7EYHVmdVTLuLg9o99Q==","signatures":[{"sig":"MEUCIE6wTGV7KGPL7qM9CqPxj7n8Qn1ioccHBsdEoy50b8QuAiEAjcRNbQ3vc6hjsAoX08vpK3hZRyOTX/OEWcFc/YKsdxw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifj0mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCJw//eeRe/dD4ljwbKDE0F7ieyIf3/szbunHRIIkzfZQOGa7lnMOp\r\nU8tO3BB4oGglZFLdr5iHXwwDIrJhwPbNG5Skwfu/FfiDrWpuXpEZMjUA5KbX\r\nwNw3YQn8E3+yfxa7kKdbKJCqOSjyas+IMl3BozWncfzCB2BXpPPrQQ+HTsbo\r\nz6sUgafuCMYSBI+Oz2sBlslQj6CMGiO8eZ+F214jFrVBUejJDBB4v5WGBSxu\r\nAp+C4d+hW9CKib5pQ7JzzlvCd6mZp44SpgbWSdEVgvr8aMj+Wr1xcQ6TcPhe\r\njwjdeaRiQrj1o7hn6WBpbOdXkxDaEJ3QT4IN5gn7k+mYU7gCjzykL/ObWq40\r\nZ2aRJuXnxB+nshIgxwa8lJUU29Q1GDJLDlfIKRvvXSE9z4dM8724S+ZSlv+P\r\noeEjea5JSwwxdLEZCPPcCRTdOg9Fxk+0mz7bst7QN8ZpvJkvVNs3TjN086W6\r\nOe/OVoY0np2NCChtjcFQiFfifw55gzu7n7oJgHhx9pxE1GqdRqSZqSzebAZt\r\nJHi/d+DuRkxCPJ1fSJdDwNvKM3M4rW7HQpJLunM7l8jkvs9VGgpVzpW3g5H6\r\n4hcHkSZqjH1YHmPjSzQH68m4Y4bVy+zL4xFA2AtLV/ZQHUdc1d3xRg2/NUs3\r\nrCKHjcmCeI1Y6hrxP3VMRWmKbMKxHi7Kf0Q=\r\n=j095\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"e7329b484caa4ec87c78facaa4cf8bfb9372a5b3","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.16","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.12","dependencies":{"ably":"^1.2.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^17.0.2","snowpack":"^3.8.8","react-dom":"^17.0.2","typescript":"^4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_1.1.7_1652440358280_0.38717479950575107","host":"s3://npm-registry-packages"}},"1.1.8":{"name":"@ably-labs/react-hooks","version":"1.1.8","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@1.1.8","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"7fa0b731007353338f05b5bf67476fecd29625cb","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-1.1.8.tgz","fileCount":29,"integrity":"sha512-BQq+SJpcEH9IbwXGOtmhFq8YeikWu1fylD/CzLqxbmUMNW2VZObUBKZKi/lo/oF+MeR1vuoi0qUVAiyLanybew==","signatures":[{"sig":"MEQCIFQOJzIx8vPI9QwvGkHlUyiTpcWROMksztjM3/04TY3BAiBL4VDmFzNAD+8moUWTA6TPOT8HCqQytEwNfAU3VUGd0g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiimfzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq81Q//bpB7+t82jjG8WDMRoZB0Oxqw1p7cI2q3mchQIkU6DLad0D/I\r\nfmVI+x5kXRmSoe7r7M8G1VUlagvpScN7MqvQ2JgsyGO52bkqWuia1dQZs77J\r\njyUeTgjadVvWl49ENK4u82Zt/1bzlShn584WoFGCVb/+4lcfxC8W9w6Y2uJM\r\n3JssSFYaJYCJt/DkYISdhO+AVVbJsmkF9LThm6/MuUQubYKUWjdOy5zuGz/e\r\n5lr+wXc7Cz/942SuETNlDWuHnI83hdkvHX+Mk8jF25ULSKhpzLhgz3mQ+Bd0\r\n9M7icSDvWQ2TQIuKv1Z51qtHQelv78G+ZZRyVGr7kXDFdfIBhA2xkAsE1aGc\r\nt39Sw+3qujzXIKcfD5Dfcbi3kV42IgiqgNkCl8DsqXnGS8bwBt20jevV0fW1\r\nXLKDkCM5gV+yWLzLeeHCyqUIujbU3BIb2Be7gihsMQMWuQUM8TDJ3qEcVRHT\r\nIhjT/tlVBc33aq35DeUatKfG0kzbp0tdbS63IdYtG6jiRyUHhkk9+wtT8OXR\r\nHAHXFksyuDtad+RBDWunjieV1jYCf/fVo93F0/SSP7zqGkA/fq78NOpbKfoy\r\n2iMDXl//jYrHSv3V3SzhtzboctzucrnzOgvSKodrApCDB9fR49xclfMpwuV4\r\nzC3ZqRxWSfAsm7im1ZIENxj75/Z59EaifVY=\r\n=wGXN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"4c0bcecc7866c298c4c99d8d1df43afae788f6af","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.16","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.12","dependencies":{"ably":"^1.2.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":">=17.0.2","snowpack":"^3.8.8","react-dom":">=17.0.2","typescript":">=4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":">=17.0.2","react-dom":">=17.0.2"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_1.1.8_1653237746950_0.1552883102209226","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@ably-labs/react-hooks","version":"2.0.0","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.0.0","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"e44c2b10ffd258a991b8716f5fa16a84ac3e0b03","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.0.0.tgz","fileCount":29,"integrity":"sha512-eeN1P2g03zZ4QpL1JdFJgMgHE4QFFST73LSoA1cWGIqoAytoS2EO6ECwXYOadXDyFDPOArWxTWOu4DynKmu+gQ==","signatures":[{"sig":"MEUCIChbu8fwYrkLv91Eh5ZE8VFbVQ3oqaLQAUb1txv/SS6zAiEA4EcHZKlUCOHVnTcLBJs2Y/COo7b2sBY2UPQtPW9617s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJik7goACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrslw/7Bhi6dfHDhtn89xQr5rqKja9wp5xqDnhdEU599OgnpcN1E8iw\r\nNh+Siyl0jkgTy/qiRZmWWlA5rIYjW3hnjO/0Vtw62R0Ogs0wrLIPlJHMqD++\r\n/otUWQHIj/+0pqor17/4v8fLLXBEs+zXLQ+AObmcmR1O1JbZC8odPGZHAbwY\r\njZr/0f3OzCmGc7anHc5yQfkR0WVENi8RqVQBoRdyhojfXmnqorJtxBQ2ylqH\r\ni/hc8QWrtde30/y6EwhRkzoimuP2540/NIYjZcEoJxq/ocz0RqK0yVU1o96y\r\n7Ohr4uOGgGdmqY6E0fytDy7VUoTq5/nfgh2m2f2k9o1dP9hitU3qb0Hn2Gmt\r\nr3PmbA5vIW2WY2Ldv3BBANI93pWXMmTp0ibrmuuREwd9FZw1vRTo3QPbdOfM\r\nWF0lDGw3f24E26fwsjq8SjzZXOtBWnVuuHgONutuCyRo8cDt8a0UlkvcVt+M\r\n7U0U6ZourMBibwkVjDt0dJb6IdoUtFi51U5tXvz0wu0O6KgQ3jIefAEYH+nR\r\nIqUve7LXxh3EBGIJiwbPujZCYttRN4Son2gs2F5I8Ve1hc7+Zu4ipY6+73V1\r\nU+HNwfuTmLQcHxKDZz8MxWtFOLb7AToI4W+f6hsV7sA1ZUX//UfbSZwJ2P9H\r\nKPgKRzpoR4oiE/UKb9DGJttWR+oVzVhcZNE=\r\n=eUut\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"f29935b1fa13922614b4f3dbea17d50f7be0e8af","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.16","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.12","dependencies":{"ably":"^1.2.14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":">=18.1.0","snowpack":"^3.8.8","react-dom":">=18.1.0","typescript":">=4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.0.0_1653848103896_0.7918316563641157","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@ably-labs/react-hooks","version":"2.0.1","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.0.1","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"d8a65f25ddd5ab078c2c152d6049b573a2a2800c","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.0.1.tgz","fileCount":29,"integrity":"sha512-QyeCE8I80fL9XuFtFepazTZ3mFmFTwe3msmwCPM6wHDs97HMO3tVUlSsMcD9BbxFcaekWlpHm1dQcESxPzVNng==","signatures":[{"sig":"MEUCIAki2O2EZmQ/1r40GnHQB3QayDaDibTyn8KxXt1hHFzkAiEAj+nUUwQ8noPEZ9nsNkuNNDNG8/8N0HhQKM63L/GNrxU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJik7zvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpncw//UZAKCScKL2e+XvrUqWVp4RpQdaTTkkMz4t9Gbfs6sp8N4PiK\r\noA7XGPbKChue/ptNEVqJljOXuIqftnlUOQqr0qhg1bRS0iRV5UIumSWvgoCB\r\nSoQB+DLiq5DTQt2Yvy9Dq7y75FpfGj+8ZMUolLKe3GAqAVEj2dRzMdxHHNeZ\r\nyLI+X/nPxBpOUMB/wUm4X+95sI9uk5LeDwT91Cq+5739KemUgVQoxmAovJCC\r\nlKCMCztUL1PLZk2xu+QoW6il8FARbpwStugGxeYH49g9k2DLyjmdpyLzJ+Xe\r\n6PUBlrK6Y6YMdjCI9BLgedD0DLzi/OHVvES+/7MrGShTP56UhLQ+aJrxrV/N\r\nUWo6ZZ3SM+EhNG6zsAs0FLCY65iQUyd4LNWQYP+uepkop6hGObOxA0jKBcrt\r\n9R1+QMCorNJ6qJnUvWzoZQA7El5T1iwVvw7RyE15j1EVHx6LGUA3oTdiQFar\r\nCC9yrxCkZrt9aYllwBv9nhaRq2NvQ456l8LfW4o+ZUjK7NrlWZa5seThm3jL\r\nxa2ycv6ltWIXEAydY9oU8o770nf/ZPusO8ChdldbwKd6QljFox1bi0yQVmDJ\r\nltM5ZxpU9bF5+VvRAbuIUFWx1NF6eMMUjPKujIgq27YSF2F6oBNMLHzyhWTR\r\nYijPQhgQ5uDus6+FURE+5MSfbyKiMseoVHU=\r\n=Z5wv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"eff7b17476c5082686c1e572e37661a9b71592ee","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.16","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.12","dependencies":{"ably":"^1.2.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":">=18.1.0","snowpack":"^3.8.8","react-dom":">=18.1.0","typescript":">=4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.0.1_1653849327335_0.3085103364320336","host":"s3://npm-registry-packages"}},"2.0.4":{"name":"@ably-labs/react-hooks","version":"2.0.4","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.0.4","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"3cc24fbc9ad88b83ab52ba9dce7b7fa4c6fde9e3","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.0.4.tgz","fileCount":29,"integrity":"sha512-RVOBsqUwRML8snaOibd7laoG2DJym4zMBzEoeeqiQvpQ2ZcEShapfWtnq23sXUxSc/1rJ6ReCiw7XuDg7rF06g==","signatures":[{"sig":"MEUCIGgVllgyteKBHWr7hEyYUhzNDjHVTg09+JACW1rnNficAiEA7AhqWyqj7ot5tzEoSmVqUCL+fNcmvxtFlMdOm1hDsjQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitfMuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3BQ//fSgq3yIorqquLYvvtXR29pNVIfVtqUXnwUisoNcrALm5UPF1\r\nC/VASFB5D8nOXDnnr41x5NTTmVlzHLsz0cUGtEB9I1KeVmPrwbSrcbcSxHsy\r\n/IVrx9rnLt1Glj3zDiKSVVRyhAINuhdcu0KHyxVL2vlaYap4535tMLTje0YA\r\nYHGc0C7NKoWxcTff+YXYJqgY8pjYPPTxxhezXeq1f/gj4oIXrCKi3UeSeIgA\r\nY7nyt7P/6OjbVng7K++mbJ95uBdTl8lSSDqAiq6jnTZ6L00D9ON97xv/W8Qh\r\n7r2C87VZ09bmhS9IoLhr/CVt8qcTZbteH851iTvwcpDS5K9IptSe2asarVQd\r\nK4OHpGKBbM0droJ/9M8cpNyHSucHSMTLSSqU8puTjTk//s2y9H9f1TRuxyvn\r\nRiiPadXTnLeS05DvU9EyZyq0oG8AAkYfJeX+V9FVVw8Otcigar6/FlM5ZFQg\r\nkrRgm6jf/0dMiNsApZ367BA3spDAWula+dYJB+Xm7xzbLDdU20aSnssgH1+A\r\nJ6RlUh9hRo1LTlvAUmv1Sh5yeAwnv/MEDvPu7qoEiA5OLdUY3tPZDCsilxvx\r\nRxdfrNVBiOm4FP5arjYD86ep0ZsRnT/iBwesfvXQjCUPI8xku7I6OBpHnumh\r\nGD4VhCTJl6C1UZXST6aRkicOzUTd2QeBPg4=\r\n=oBsZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"0b3c92e118965a7ae190037cb87f17c79c94ed26","scripts":{"ci":"tsc","build":"npx snowpack build","start":"npx snowpack dev"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"6.14.16","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"12.22.12","dependencies":{"ably":"^1.2.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":">=18.1.0","snowpack":"^3.8.8","react-dom":">=18.1.0","typescript":">=4.4.4","@snowpack/plugin-dotenv":"^2.2.0","@snowpack/plugin-react-refresh":"^2.5.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.0.4_1656091438821_0.3858793450327651","host":"s3://npm-registry-packages"}},"2.0.6":{"name":"@ably-labs/react-hooks","version":"2.0.6","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.0.6","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"e851da2c18ecb2ac1c04b06537a3d053027fca2d","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.0.6.tgz","fileCount":35,"integrity":"sha512-V7942aXx+XJuQpMEUebvanr72sxn/obgDpSL/y9K3lP/Xiyhs3jWd+53Q8PZJ03hVumhJ6TfgkJKEjhtAyrZww==","signatures":[{"sig":"MEYCIQDprLjvdshopNyCeDwF+wTCzgiVYgav5zgN4glyQ1jXygIhANQbzAczTVkcolXpg6NqnRsaOiyvQvcjNLkihsv3cZ2S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47842,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0YQzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLtxAAoU/3GyZQvYETw28GLUI52y3CmYJUY8bPYp6Gf3LYYJjSlvjP\r\nx8lp4MwRpTu/IeQ8eQQ4u6IWqI64KK7NOfCeV47NDP33zAKW4XWeRCpuzOXW\r\n+++7IN9WgCO411Enxvkdn3oynXQXm6+ByT4yLjIeYY0VR67W/RfU2BS9+kwS\r\nCOqdvpaO73feDXcinkidGrRWb42WSidpTq1Lt2vR5yaF9SeBENu+z39ZgqoZ\r\n/9lgdkMdN+9XHmqthW3CA9J4Dt+sOPCLcTK4cGIoLQVZPEWnt/SNWFRR1ufY\r\nlID6xiU5gHRVg6w0CGIu+iiF5x2SchkmaQ65D8y3AL003IrX48TRiGkO+bWA\r\ndG8osgaT52KeOctY/RaAy2JzaObMnUIcR8andVKANQy9cbLqysh+J3BiIYK3\r\nHeLOsTh7Shbkd4bVJsngzGHOvzyJ78NvJQaqp8GMxxs17L88JVQfKBIvy/4y\r\ng8SNwbPZ6d0TyUxVgv3vAJshcjXHSzd0jevNrVqHVFLYgynhhEh1hu0socKq\r\n60N4R7NvcCNLiPbgrHM6Jez1wLoyaHLBP3CkApf87fUMHEDAsuVm+CYmvbdF\r\ntTq0d1ZrvEGLUqOR+eBUVwXwi2fdpkQQ8CXIO3UtPggr1ngC+4OVF7IVpDgz\r\na4xGalTFQexwsm0vIC4NtOlPtcR7E+MM02U=\r\n=hz+M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"f7382082966b6638dd2291a7d72ad9578ed637a6","scripts":{"ci":"npm run test && tsc","test":"vitest run","start":"npx vite serve"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"8.11.0","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"16.16.0","dependencies":{"ably":"^1.2.22"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","vitest":"^0.18.0","react-dom":">=18.1.0","typescript":">=4.4.4","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.0.6_1657898035340_0.48473208229943565","host":"s3://npm-registry-packages"}},"2.0.7":{"name":"@ably-labs/react-hooks","version":"2.0.7","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.0.7","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"7f4ad32d24025e870a33d2ea65a3d5d8a2697439","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.0.7.tgz","fileCount":35,"integrity":"sha512-4g0Neg0rfIceS4/U/W1L8ib/1q5aW9JDPOtjQBZE8zxRvbxwdSu32+BjQEL5oRpALDd06iosPYdDixKDwNwwoA==","signatures":[{"sig":"MEQCIFS2nna5Q79qqJV+eC1e7UgI7ZREIBTBmSgeJA444k7LAiBrMRpPmifYj5LrnFpJ654KUSeRpVcVm8321iL7tyn2Qw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3+QuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq95w/+O/JXpPhjE+zSnl+LGO9GumdQ0BEzkbCHM+C3nILaiO28zBi8\r\nbi/xPqTnwSsL3jzEetXQpj04bqShXzGpDLtM7+xZPYB66IKZTN4pyMX3bpiH\r\naYa28+gcV1h+gs5lxthPdQRrsDpl1DkLCi1mUt8Ax6NeKei1weBKeYlaP7zK\r\npr5Qa4j3S2yQ6vjN2kyD8jx7+/Ltecr6ETNa/4J+gDwAaaL23dSpdCHaZ9uk\r\ni4DcjOZnDU0wQZTlbg2W/x9dlhpBctdVguCDl7WDVFTh46o/FtFg1gSq60bA\r\nWmZ5VXHz7c8O4iMA2Fd/IUwDie0SI5+LMEBG7OM5Z3U17CAJ6e/o+u4MRM92\r\nau3ymZnFbG9fypC3A0bgV39rgPkLz1xlnAx8dwfjGekTN1uu+ADgDRaOjdJh\r\n1CfPryPk8RcmLjiU9qOZDLvN8UeNpExcqY5tqvqb0fpfhorcBxWYyRxz5HwZ\r\nvlO9ej87JHNuwGz0TekKeUWIZJ7OR65wLO+whN14f462R9JnftTmiMHBuIfv\r\nC1xnkUdQiM1XqrBieTT+8HsOl8ftF0ch7YKkNYj+h/1I6G3NRLT5WF33a3VE\r\n+tts1ya8uLsk/4TS/iXz5naFihUHzkXPstyfRNhP2+aWbuiQEBSaaDu38n7h\r\n8A03/y0E2TdGTRnBrS9WRazKU4DgwXFLHtE=\r\n=9ZQc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"ca171da18bd6c4a94d347eb171e4756f3eda91eb","scripts":{"ci":"npm run test && tsc","test":"vitest run","start":"npx vite serve"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"8.11.0","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"16.16.0","dependencies":{"ably":"^1.2.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","vitest":"^0.18.0","react-dom":">=18.1.0","typescript":">=4.4.4","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.0.7_1658840110501_0.13905958978064126","host":"s3://npm-registry-packages"}},"2.0.8":{"name":"@ably-labs/react-hooks","version":"2.0.8","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.0.8","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"db3d57d0a59fa88bb0f12bf1564f058a69224844","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.0.8.tgz","fileCount":35,"integrity":"sha512-zyKdNGAxpCnRLCUvD9/d2Wn2X5+7OwyxDJGDr6ZOujVlTHHn3GnCSy0zk7ilfobu8pqkxHPlKUN/IbORgimyPg==","signatures":[{"sig":"MEUCIQC9yUuwnpUTVvu2J7SxDI+L8rIgWtKm+uTAUvKnAjHGBwIgYQhNsRCMyjVG3t9PaqCMkVdLIaoUa2Ib5stzSSBa0VU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+kIzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrlRw//U581PQAoQV2aaKa1N1KQxZziwbwtv5+dc8xveGQW9IwXSkdV\r\nu45WlJo/6OgccDgha+l+6Bxl7gi9nhn4xNYbMuxyW40kIrZz37Zu6wW53jOd\r\nHl5YbNYQCzOKjuCTk1+woAcd0WpuYYrHseSh34xbHe6t6LvqRDV/O+/EwxUo\r\n2o0bE4uA2PuZMCDplAnfgbA+6z1R90SzYL9TI3EW6MQtXtWkj4Prgkquj+rU\r\nixXVbnBfktLiB70T7g7NyY90KJ1Gs/U/qv42MNkDoq+z9M8UsrWVw9y7vnXa\r\nqcs/eI/ERdvK+yTsVfCHDNpYc0M8ixLSER9ytr6iDnrDb56tRsRflTDVIt44\r\nJD7iZtHZNnaMD/HKSqGvYlfSzJxA/c26LqmxLFAAu+ikNwnHFOaxNuVns2o9\r\nvZDUkxg7OKNOLYF7rV+mmC1WfDSgtWjWMAn7p8wVo1Llp7JcQSYbxvwDl1t0\r\nqkfjwkqTXLmKlzUIPZWzbMoyvA0SwrdWaCJtspL4tZWyUga/4S7ioZtRzIB3\r\n5QshaD2N6ysifsuFnEbMVT0EkK0XQGjZDIOvuE2pgAUfwa7BtCKpZM1MprND\r\nB/IYnt3GFNYYKtGj92W+2TTq5CZGT+mD2uGDMWsyU7HJ7ACUU6x0S7T2eJGD\r\nbRV2miypLko10f79QnKMlerMTQs9pdPi5ZI=\r\n=08sC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"f85a1bfc4166a7f04d87444ede924da3e9ecba84","scripts":{"ci":"npm run test && tsc","test":"vitest run","start":"npx vite serve"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"8.11.0","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"16.16.0","dependencies":{"ably":"^1.2.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","vitest":"^0.18.0","react-dom":">=18.1.0","typescript":">=4.4.4","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.0.8_1660568115085_0.4699096040644417","host":"s3://npm-registry-packages"}},"2.0.9":{"name":"@ably-labs/react-hooks","version":"2.0.9","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.0.9","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"311e8ec66e111ef1fcd69b7e64bd0120e71ea13b","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.0.9.tgz","fileCount":35,"integrity":"sha512-mBTzQhzS4eybKwIC28Vgkikfny/K5pHNhgsyhuFIXUPT5Lv0dqaFG3sbpjlzGsZI+6vVpGp1AuloCP2BQu3zFQ==","signatures":[{"sig":"MEYCIQCK3ozmRe8qUYLa0Yi+NeLpjeNhbUVHHOJkxUXS8wiAkwIhANuieQR/TAp7kNEk/5g7CTzsbD/H0c2b606B6vVqPxeI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+lDJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmowaQ/9E7xHl1/oRCEd0ACithKLyBlNXpz2NQ9ZzgbkahKu7QS7M6IN\r\n09FrncOJJTw07QD0o9uFLJ2FYAJSPEBcseDt/vEGkKmR0pzKj4XlosKB0bBa\r\n51qUQ0Tmd8JtLDX14n1xvJmGTJL7W/cAK0IimiwblxNEtcE74Fxh4f1uPq8S\r\nUBb+NcZ6oV3mJAaSbRBXlXiRUF/nlLmewwD9OEA5k77qHvCAkuVTDH06YHf/\r\ngl7Ddj2Q2xTY3VGj/l74Jf3KBm4Yzrb8iT3z/ZgOj4bTo6Y5gyzcmd3xauYX\r\n/q90jmq1tYGCc+1hFrkZgsQlI8yVkAgdeB3XAfNpnx5Z6dfLmnoPQINkv3/g\r\ngcHtqXPkRbB3qLbBuTjW+8fnToN7eTb2UweH7MKaxNG0zE3SCgNobLudmJdQ\r\nBfuuQy0/C9UBt0rky76hre3BOciza1LzS7wFSf5I0aaQeZ7W5W3YJNHTV4n7\r\noREHNTwbGKcyW/FJEN9eMjRSLusEEVR4ZlAphURbdfcEkcnWq6vAZRjoucBH\r\nRArXkGIInY7dmBNbDwEKmzCWoCdUhkQosYPtCf3H0bgiT785NOqEY/sLVFHr\r\nGhf0XTk/LH+iTkChkHa00VTqLZZCTHbYMMl3SapLYsfZDH4rkHjl/nyUsFsm\r\n1LEpQrR6rO6OLpVrbfbFSs2+p7OsjRmrxKA=\r\n=cVcQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"91ff97af0ea2a26a83483ae0793eb21feda47bb6","scripts":{"ci":"npm run test && tsc","test":"vitest run","start":"npx vite serve"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"8.11.0","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"16.16.0","dependencies":{"ably":"^1.2.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","vitest":"^0.18.0","react-dom":">=18.1.0","typescript":">=4.4.4","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.0.9_1660571849657_0.7705665517121685","host":"s3://npm-registry-packages"}},"2.0.10":{"name":"@ably-labs/react-hooks","version":"2.0.10","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.0.10","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"784b32f7cff74c1dac8210ba08601483f6bf9c45","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.0.10.tgz","fileCount":53,"integrity":"sha512-9wWe+nEAwraMlMop8NRcKQ23X9FvdXh1ZbSl4dCcOk3y1cdiGGsWD/BkyST4IlJtPcWRcEuGl8JyiVolT1UgmA==","signatures":[{"sig":"MEUCIQD0lm36ct1XIo+B02b8XIXw6uefsU14uXL8CWzgiWxjOQIgGnp9IK6phNoBNtzh+uRCCI7rNaeSn1xtphaUu+lphG0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":63449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc6h6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTrw/9EKd9VO+xKGAyzqQdLE9/aArew2/oszNYOrSd0jUTjNvzqld7\r\nQ8lEHcSZZA9Z3fKuSwTuDjKlsakV57UjkgasJ2UUL5uAutCAfzTodlluZh3r\r\nMyWEyCx6K3r7vx2/9GH7vqyntr/jgakZsAJC63MERH9ebuWjca+XfTmKM9/R\r\ny1iXPkDA1eB+Anen4tSH73LkRZiveGv+PS4Qp5aIZWtV3i9AY33n78bhtcQT\r\ngppShjtkXmB1yT3E1PPhPCYyWQKrQkmGsiBoTv5EFrSJOZedNil3nB8TYjCm\r\nqpl0f4qsEufYeaVrq3X0qbxVgFZ9+CiUKv/ihnNQTzhWYW6tUE9Er+mh0Mts\r\nYOgaHRQauf4x1dD4XF259NWPgdTvuhQpDFELws9ZQezhr4S4jRACXyOcYqri\r\nHj4qIvolqlIiaj6W3eAHewxUb+RxMHnAkVxi9HMV75OXxrLxYB/4KpvTunGn\r\nBo1IuOSnrDQD45EkoXimJAMIrwIBor9AI9CDTnDambKet/fiNBCJVEyekDsI\r\nu4/sL9XsMg239FGm6owa6CV6dFRPFBOswHZJlC2X8zowC5tCeDSeUwbGS94U\r\ns4lqh+r7V3Cdtwyg3P6G/q9vsoZVh8oe47RpTleT2J6HwB8N1BpsvFnNrDqr\r\nevzj+Rxq8o0DYKUJ6il7y0Co2kFtKQMjoSo=\r\n=kXcS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/index.d.ts","module":"dist/mjs/index.js","exports":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"},"gitHead":"2e50cf0d92c0d93aa4820b954195d4668bbeb864","scripts":{"ci":"npm run test && npm run build","test":"vitest run","build":"npm run build:cjs && npm run build:mjs","start":"npx vite serve","build:cjs":"tsc --project tsconfig.cjs.json && cp res/package.cjs.json dist/cjs/package.json","build:mjs":"tsc --project tsconfig.mjs.json && cp res/package.mjs.json dist/mjs/package.json"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"8.19.2","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"16.18.0","dependencies":{"ably":"^1.2.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","vitest":"^0.18.0","react-dom":">=18.1.0","typescript":">=4.4.4","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.0.10_1668524154447_0.0353904974831305","host":"s3://npm-registry-packages"}},"2.0.11":{"name":"@ably-labs/react-hooks","version":"2.0.11","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.0.11","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"edb14073d4a472481c8724e35425d1c235ee2f09","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.0.11.tgz","fileCount":53,"integrity":"sha512-KqU8JnKDeTa+bWFImb/ghs6YIXQoYlK6PuLCUOO2hP3yGWsu2Xv3+5P/V3HBuZvA49jo9rxT0SdLQMSk4Uialw==","signatures":[{"sig":"MEUCIDKxhaXMwb9MYIsUrZtz0yY0/SeNxPxNOj+N/Rhn9uk5AiEA92p90TKPYp0CK2mCOVhtPmn5shvLusKT5HUqmfuXtSY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":63452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfmKoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcvxAAgXT8DE/w6/mUojFo+RhYBNR2QU+K+tSP9ZYok8yS/3+FHGHi\r\nscVC712gArpz/hrnzws5/AwoXNP1coxOwcDhcW4NAjV14pPT79u2jBiYfetx\r\n314qC6dEA8kzES9UsxwabfMErp8UP0tlT7ZLcN8BZkrZngJOpQXmrqCF6aYe\r\n6JoREzCGOvewDTOkPefPcEiODfAY23H/gJp56Pcaqtg3oVlhaE3KUsC+lT+z\r\nOuCMbdr0oHQAFseUKzljOK0AoDepjfybcjgBpJ7vG6to2y0IURwmMYmwGfIK\r\npVWwDuv98wiEOn3lnrvejOrTKRBwXoXMOKoRkUcGfFLnASZCBLRhcDGMmOp/\r\neqODaRt+Og7AQ0JAVmjqUuotpcLtVomCXn/WUjPiS3Z9oitRebRHwjzjZKlp\r\nF21zrwPVKirkvQai+f52dI5QJU5K6J4MFWJ7AilAbZvFIhpAalbkZd1F/BBa\r\nSNxsbxei+Ei5Kj1CSI7yWPXIh5Ew0iBbXtTTCuSgCTWRelewCrRiqvbM2UJ9\r\napg+tekcqY/H4AIGGWxjeC66eb2SDYIhPnpmR1okMiZ2bIR+XHjHDx+xKzmk\r\nQdN+kteDXZC1M4cFp4wBQRQKiaRmqWC9mno/Z3hqa5QgF9outscJG0MNzYDr\r\nnYCQ4i8P3r6SqU8/F6GMkN0tLnDkUXWarDU=\r\n=12rn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/mjs/index.d.ts","module":"dist/mjs/index.js","exports":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"},"gitHead":"7fc636109cc440758dd7cd598a1224720727a57a","scripts":{"ci":"npm run test && npm run build","test":"vitest run","build":"npm run build:cjs && npm run build:mjs","start":"npx vite serve","build:cjs":"tsc --project tsconfig.cjs.json && cp res/package.cjs.json dist/cjs/package.json","build:mjs":"tsc --project tsconfig.mjs.json && cp res/package.mjs.json dist/mjs/package.json"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"8.19.2","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"16.18.0","dependencies":{"ably":"^1.2.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","vitest":"^0.18.0","react-dom":">=18.1.0","typescript":">=4.4.4","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.0.11_1669227176445_0.15715133944565163","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@ably-labs/react-hooks","version":"2.1.0","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.1.0","maintainers":[{"name":"ably-labs","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"fefb3106b2b8a2f1d2ecdc97eb51d4f286431003","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.1.0.tgz","fileCount":53,"integrity":"sha512-coOlkoHpqfUzUFXb1cngNlfGGeTTXl6gg3u+Q4gkdXj9+UPWLZ7VKoFBwMJrGTFTmnoh9VIlwNG0PQdw2Avi9Q==","signatures":[{"sig":"MEQCIFg9Is2Pj40Hdg2qu4sTDmMmEMD+J3H+Wr9HBYw9EKkpAiAsrGmfOs58o1SPkwQW+z4nRtRvbhz1p766acWiL4zQDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2VR+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmogzw/+IPUKi6WZXXb8Vk7NHpUMN+xXi+SRLvG1QWph1kAoCwuCW3N9\r\nE8KBl2+jAPF+pQ5LhxWUPmP7EQizB41HR5l3N3HNbjuxre6Whid2YDHhwoRY\r\nd41PtZsspPjmMPhwK7BRsDdvETnp6ODfMUCFR+uOpn2O8fvyfm8WqdIggFob\r\nm64NfEnxaPz3RwX0T4s+i31xjA0UWzn0CWHmouAuByVmYCBHqyZXmGHuGPH3\r\nWfC4p8QKAaoTUGS2t6XGepUMjpe0LABux5e7cgkkQJ6l7JI8HqHZxkG0Smoc\r\njfWZhSOo4T6u8dJUUtk0xBJ8tB+skoExBRjdX5k6tUuEJuOPmMDDzrxDywwB\r\nrMyM2mOPm+Hzq12NYx2jhr/vtOMqaHy+mrz0UgDQekiqnyVQmnf+51z67quK\r\n4XAox0smEMQHEsdwJFwBn5UttOsRpEv0clyMTmLivWmfW7JrhepWxymteN3A\r\nw+eEe36XYpj+HVCaDk9KKX5XQfpl+vcoagCxUJJiJop+l3UTBE0awr7rZkX6\r\nRsII4yvlOCpGNUUEuDL1vV6XoOyPZ1rCZP8F0v4ELmC3mDTEUp+QhQme+BPJ\r\nx08PVzhNxaG7ZSku6Hcd6I7ihfIh6XubENEBT77/4pHCpAVW0MeyoyGxBhR0\r\nVF20nzhhiW5YQAWEgq1l3ht7FFcFqjDyOmY=\r\n=KFex\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/mjs/index.d.ts","module":"dist/mjs/index.js","exports":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"},"gitHead":"934c32cb9af7e0b0aa4732c373294c632423f584","scripts":{"ci":"npm run test && npm run build","test":"vitest run","build":"npm run build:cjs && npm run build:mjs","start":"npx vite serve","build:cjs":"tsc --project tsconfig.cjs.json && cp res/package.cjs.json dist/cjs/package.json","build:mjs":"tsc --project tsconfig.mjs.json && cp res/package.mjs.json dist/mjs/package.json"},"_npmUser":{"name":"ably-labs","email":"devrel@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"8.19.3","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"16.19.0","dependencies":{"ably":"^1.2.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","vitest":"^0.18.0","react-dom":">=18.1.0","typescript":">=4.4.4","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.1.0_1675187326538_0.09617511535035295","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"@ably-labs/react-hooks","version":"2.1.1","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.1.1","maintainers":[{"name":"ably-realtime","email":"account.owners@ably.com"},{"name":"owenpearson","email":"owen.pearson@ably.com"},{"name":"lmars","email":"lewis@lmars.net"},{"name":"ably-labs-user","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"017f07cbe93ff214b08a4815bdce926ff6918365","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.1.1.tgz","fileCount":55,"integrity":"sha512-Bunqu9GDFInZLpFMfWhUboU1g4W5UXzDfeAqI9ueNIF3p9KIMS7LfgjKBfXsC0DtAWkBgCjL22PvNToiHP92Ig==","signatures":[{"sig":"MEYCIQC/3sd/wnk0w9p0sTxXin6aoD0lx59tJ3xzKFKhzNA5nQIhAKdmKyfZJXmFNZdaj7kd2u5YK28avO+41Mk5ZEs8seO/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":71287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNsPlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphoQ//ZBRGrq48PF1ui92IuhuEyhU7Pjd1ifwMiiL4MF6768VUbQre\r\nx+M71xOZz525YknzsFmQsh9a3psiA/s3YyMg1KoIV/KzyZdiONYBitWrR7FW\r\nLgYCzGAgnvCoQVvTt4beltb4uKyyLOmoPzKFS5vs4qNe6rvXCGqfpT0AwmIc\r\nZSUa1xDMdH8NXFMV22Ffpp3gXN8iYVkzhUxEX3HU0Q2GZ7+B8+oysHlgmOLw\r\n8RwttqEt/GTe/vShHeYIbZpTRFPkk+Q77dlz9BOdjbFhjKIUleA6KSoQble0\r\nw0K7q0ti+ya1ksvww+3IAp0QuAY3SrthiKXXzxKiQQV7Hi7q7Xq62ghYxdJ/\r\nxykitk2C1TYKOQ0aSySfotSs+5suU9kTYls4Ng4VFrrtQqnbiGtIYTD7bscl\r\nBajvFRYN272HVD/Z95T6n+EyuvbcZO6r5Gg6lquh0SqwGu42zqX/UMe3ofcc\r\nzYi8/Jru0/nNdbxOk3iVRETUem/sL9mh7GeU6NotjBBA8nOPCcKSpcFw/9bg\r\nYcv1NcuEFT7mmAjfVhMg2UYYIHqHNoNYdYqDLVY/ckBoPNrdtWa03Uxji6JI\r\nHDTJJqmHQfnhZfshVja1qyyo4oBpdRT8QFIr8sqMgYY+PSj0WewYMPYW57qZ\r\nSm4nYwmtDeu4H/xsPOVv6ftDENeLP0er84s=\r\n=i1lw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/mjs/index.d.ts","module":"dist/mjs/index.js","exports":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"},"gitHead":"490b38fd4ccf9252f6e4f02ce21da19ec7794b06","scripts":{"ci":"npm run test && npm run build","test":"vitest run","build":"npm run build:cjs && npm run build:mjs","start":"npx vite serve","build:cjs":"tsc --project tsconfig.cjs.json && cp res/package.cjs.json dist/cjs/package.json","build:mjs":"tsc --project tsconfig.mjs.json && cp res/package.mjs.json dist/mjs/package.json"},"_npmUser":{"name":"owenpearson","email":"owen.pearson@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"8.5.5","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"16.14.0","dependencies":{"ably":"^1.2.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","vitest":"^0.18.0","react-dom":">=18.1.0","typescript":">=4.4.4","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.1.1_1681310693153_0.778069468235808","host":"s3://npm-registry-packages"}},"3.0.0-canary.0":{"name":"@ably-labs/react-hooks","version":"3.0.0-canary.0","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@3.0.0-canary.0","maintainers":[{"name":"ably-realtime","email":"account.owners@ably.com"},{"name":"owenpearson","email":"owen.pearson@ably.com"},{"name":"lmars","email":"lewis@lmars.net"},{"name":"ably-labs-user","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"8b2aef9e957983f6362fa91e90f4fdc7b0bc67c1","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-3.0.0-canary.0.tgz","fileCount":110,"integrity":"sha512-L8y8tYKz0KbxLr+s/Fj0GfDPUqx315qdhvknKcRfE3XFp+dhB53FtjbPUwAmoOGNMtmRSrYKoQcgExsqNNebqw==","signatures":[{"sig":"MEUCIQCvNF4FVuJ8m6rdZZAN/s6JIu1nIP3Cey+Lw3Uo1MB+EwIgQFvA+KaXBY9hiYmgTKYYduONGNxplD60SYsVqh0yv6k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146095},"main":"dist/cjs/index.js","types":"dist/mjs/index.d.ts","module":"dist/mjs/index.js","readme":"# @ably-labs/react-hooks\n\nUse Ably in your React application using idiomatic, easy to use, React Hooks!\n\nUsing this package you can:\n\n- Interact with Ably channels using a react hook.\n- Send messages via Ably using the channel instances the hooks provide\n- Get notifications of user presence on channels\n- Send presence updates\n\nThe hooks provide a simplified syntax for interacting with Ably, and manage the lifecycle of the Ably SDK instances for you taking care to subscribe and unsubscribe to channels and events when your react components re-render.\n\n---\n\n<!-- @import \"[TOC]\" {cmd=\"toc\" depthFrom=2 depthTo=6 orderedList=false} -->\n<!-- code_chunk_output -->\n\n- [Installation](#installation)\n  - [Compatible React Versions](#compatible-react-versions)\n  - [Ably channels and API keys](#ably-channels-and-api-keys)\n- [Usage](#usage)\n  - [useChannel](#usechannel)\n  - [usePresence](#usepresence)\n- [Contributing](./CONTRIBUTING.md)\n\n<!-- /code_chunk_output -->\n---\n\n## Installation\n\nThe hooks ship as an ES6 module, so you can use the `import` syntax in your react code.\n\n```bash\nnpm install --save @ably-labs/react-hooks\n```\n\nThis works out of the box using `create-react-app` - and you can use the package immediately.\n\n### Compatible React Versions\n\nThe latest version of this package tracks the latest version of react.\n\n| React Version | @ably-labs/react-hooks Version |\n|----------|--------------------------------|\n| >=17.0.2 | 1.1.8                          |\n| >=18.1.0 | 2.x.x                          |\n| >=16.8.0 | 3.x.x (current)                |\n\n### Ably channels and API keys\n\nIn order to use these hooks, you will need an Ably API key. If you are not already signed up, you can [sign up now for a free Ably account](https://www.ably.io/signup). Once you have an Ably account:\n\n1. Log into your app dashboard.\n2. Under **“Your apps”**, click on **“Manage app”** for any app you wish to use for this tutorial, or create a new one with the “Create New App” button.\n3. Click on the **“API Keys”** tab.\n4. Copy the secret **“API Key”** value from your Root key, we will use this later when we build our app.\n\nIt is strongly recommended that you use [Token Authentication](https://www.ably.io/documentation/rest/authentication/#token-authentication), this will require server side code that is outside of the scope of this readme. In the examples below we use an API key directly in the markup, this is for ***local development only** and **should not be used for production code** and **should not** be committed to your repositories.\n\n---\n\n## Usage\n\nOnce you've added the package using `npm` to your project, you can use the hooks in your `react` code.\n\nStart by connecting your app to Ably using the `AblyProvider` component. The options provided to the `AblyProvider` are the same options used for the Ably SDK - and requires either a `string` or an `AblyClientOptions`. You can use this configuration object to setup your API keys, or tokenAuthentication as you normally would. If you want to use the `usePresence` hook, you'll need to explicitly provide a `clientId`.\n\nThe `AblyProvider` should be high in your component tree, wrapping every component which needs to access Ably.\n\n\n```jsx\nimport { AblyProvider } from \"@ably-labs/react-hooks\";\n\nconst options = {\n  key: \"your-ably-api-key\",\n  clientId: \"me\",\n}\n\nroot.render(\n  <AblyProvider options={options}>\n    <App />\n  </AblyProvider>\n)\n```\n\nYou may also create your own client and pass it into the context provider.\n\nThe `Realtime` constructor provided by the library matches the method signature of the Ably SDK with promises - and requires either a `string` or an `AblyClientOptions`. You can use this configuration object to setup your API keys, or tokenAuthentication as you normally would. If you want to use the `usePresence` hook, you'll need to explicitly provide a `clientId`.\n\n```jsx\nimport { Realtime } from \"@ably-labs/react-hooks\";\n\nconst client = new Realtime({ key: \"your-ably-api-key\", clientId: 'me' });\n\nroot.render(\n  <AblyProvider client={client}>\n    <App />\n  </AblyProvider>\n)\n```\n\nOnce you've done this, you can use the `hooks` in your code. The simplest example is as follows:\n\n```javascript\nconst { channel } = useChannel(\"your-channel-name\", (message) => {\n    console.log(message);\n});\n```\n\nEvery time a message is sent to `your-channel-name` it'll be logged to the console. You can do whatever you need to with those messages.\n\n---\n\n### useChannel\n\nThe useChannel hook lets you subscribe to a channel and receive messages from it.\n\n```javascript\nconst { channel, ably } = useChannel(\"your-channel-name\", (message) => {\n    console.log(message);\n});\n```\n\n**Both the channel instance, and the Ably JavaScript SDK instance are returned from the useChannel call.**\n\n`useChannel` really shines when combined with a regular react `useState` hook - for example, you could keep a list of messages in your app state, and use the `useChannel` hook to subscribe to a channel, and update the state when new messages arrive.\n\n```javascript\nconst [messages, updateMessages] = useState([]);\nconst { channel } = useChannel(\"your-channel-name\", (message) => {\n    updateMessages((prev) => [...prev, message]);\n});\n\n// Convert the messages to list items to render in a react component\nconst messagePreviews = messages.map((msg, index) => <li key={index}>{msg.data.someProperty}</li>);\n```\n\n`useChannel` supports all of the parameter combinations of a regular call to `channel.subscribe`, so you can filter the messages you subscribe to by providing a `message type` to the `useChannel` function:\n\n```javascript\nconst { channel } = useChannel(\"your-channel-name\", \"test-message\", (message) => {\n    console.log(message); // Only logs messages sent using the `test-message` message type\n});\n```\n\nThe `channel` instance returned by `useChannel` can be used to send messages to the channel. It's just a regular Ably JavaScript SDK `channel` instance.\n\n```javascript\nchannel.publish(\"test-message\", { text: \"message text\" });\n```\n\nBecause we're returning the channel instance, and Ably SDK instance from our `useChannel` hook, you can subsequently use these to perform any operations you like on the channel.\n\nFor example, you could retrieve history like this:\n\n```javascript\nconst { channel } = useChannel(\"your-channel-name\", (message) => {\n    console.log(message);\n});\n\nconst history = channel.history((err, result) => {\n    var lastMessage = resultPage.items[0];\n    console.log('Last message: ' + lastMessage.id + ' - ' + lastMessage.data);\n});\n```\n\nIt's also worth highlighting that the `useChannel` hook supports all of the additional parameters that the regular Ably SDK does as we're simply passing the call along.\nThis means you can use features like `rewind`:\n\n```javascript\nconst { channel } = useChannel(\"[?rewind=100]your-channel-name\", (message) => {\n    // This call will rewind 100 messages\n    console.log(message);\n});\n```\n\nWe support providing [ChannelOptions](https://ably.com/docs/api/realtime-sdk/types#channel-options) to the `useChannel` hook:\n\n```javascript\nconst { channel } = useChannel({ channelName: \"your-channel-name\", options: { ... } }, (message) => {\n    ...\n});\n```\n\n---\n\n### usePresence\n\nThe usePresence hook lets you subscribe to presence events on a channel - this will allow you to get notified when a user joins or leaves the channel.\n\n**Please note** that fetching present members is executed as an effect, so it'll load in *after* your component renders for the first time.\n\n```javascript\nconst { presenceData, updateStatus } = usePresence(\"your-channel-name\");\n\n// Convert presence data to list items to render    \nconst peers = presenceData.map((msg, index) => <li key={index}>{msg.clientId}: {msg.data}</li>);\n```\n\n`usePresence` returns an array of presence messages - again each message is a regular Ably JavaScript SDK `presenceMessage` instance.\n\nYou can optionally provide a string when you `usePresence` to set an initial `presence data` string.\n\n```javascript\nconst { presenceData, updateStatus } = usePresence(\"your-channel-name\", \"initial state\");\n\n// The `updateStatus` function can be used to update the presence data for the current client\nupdateStatus(\"new status\");\n```\n\nThe new state will be sent to the channel, and any other clients subscribed to the channel will be notified of the change immediately.\n\nIf you don't want to use the `presenceData` returned from usePresence, you can configure a callback\n\n```javascript\nconst { updateStatus } = usePresence(\"your-channel-name\", \"initial state\", (presenceUpdate) => {\n    console.log(presenceUpdate);\n});\n```\n\nusePresence supports objects, as well as strings\n\n```javascript\nusePresence(\"your-channel-name\", { foo: \"bar\" });\n```\n\nand if you're using `TypeScript` there are type hints to make sure that updates are of the same `type` as your initial constraint, or a provided generic type parameter:\n\n```tsx\nconst TypedUsePresenceComponent = () => {\n    // In this example MyPresenceType will be checked - if omitted, the shape of the initial \n    // value will be used ...and if that's omitted, `any` will be the default.\n\n    const { val } = usePresence<MyPresenceType>(\"testChannelName\", { foo: \"bar\" });\n\n    return (\n        <div role='presence'>\n            {JSON.stringify(val)}\n        </div>\n    );\n}\n\ninterface MyPresenceType {\n    foo: string;\n}\n```\n\n`PresenceData` is a good way to store synchronised, per-client metadata, so types here are especially valuable.\n\n### useConnectionStateListener\n\nThe `useConnectionStateListener` hook lets you attach a listener to be notified of [connection state changes](https://ably.com/docs/connect/states?lang=javascript). This can be useful for detecting when the client has lost connection.\n\n```javascript\nuseConnectionStateListener((stateChange) => {\n  console.log(stateChange.current) // the new connection state\n  console.log(stateChange.previous) // the previous connection state\n  console.log(stateChange.reason) // if applicable, an error indicating the reason for the connection state change\n})\n```\n\nYou can also pass in a filter to only listen to a set of connection states:\n\n```javascript\nuseConnectionStateListener('failed', listener); // the listener only gets called when the connection state becomes failed\nuseConnectionStateListener(['failed', 'suspended'], listener); // the listener only gets called when the connection state becomes failed or suspended\n```\n\n### useChannelStateListener\n\nThe `useChannelStateListener` hook lets you attach a listener to be notified of [channel state changes](https://ably.com/docs/channels?lang=javascript#states). This can be useful for detecting when a channel error has occured.\n\n```javascript\nuseChannelStateListener((stateChange) => {\n  console.log(stateChange.current) // the new channel state\n  console.log(stateChange.previous) // the previous channel state\n  console.log(stateChange.reason) // if applicable, an error indicating the reason for the channel state change\n})\n```\n\nYou can also pass in a filter to only listen to a set of channel states:\n\n```javascript\nuseChannelStateListener('failed', listener); // the listener only gets called when the channel state becomes failed\nuseChannelStateListener(['failed', 'suspended'], listener); // the listener only gets called when the channel state becomes failed or suspended\n```\n\n### useAbly\n\nThe useAbly hook lets you access the Ably client used by the AblyProvider context. This can be useful if you need to access ably-js APIs which aren't available through our react-hooks library.\n\n```javascript\nconst client = useAbly();\n\nclient.authorize();\n```\n\n### Error Handling\n\nWhen using the Ably react hooks, your Ably client may encounter a variety of errors, for example if it doesn't have permissions to attach to a channel it may encounter a channel error, or if it loses connection from the Ably network it may encounter a connection error.\n\nTo allow you to handle these errors, the `useChannel` and `usePresence` hooks return connection and channel errors so that you can react to them in your components: \n\n```jsx\nconst { connectionError, channelError } = useChannel('my_channel', messageHandler);\n\nif (connectionError) {\n  // TODO: handle connection errors\n} else if (channelError) {\n  // TODO: handle channel errors\n} else {\n  return <AblyChannelComponent />\n}\n```\n\nAlternatively, you can also pass callbacks to the hooks to be called when the client encounters an error:\n\n```js\nuseChannel({\n  channelName: 'my_channel',\n  onConnectionError: (err) => { /* handle connection error */ },\n  onChannelError: (err) => { /* handle channel error */ },\n}, messageHandler);\n```\n\n### Usage with multiple clients\n\nIf you need to use multiple Ably clients on the same page, the easiest way to do so is to keep your clients in separate `AblyProvider` components. However, if you need to nest `AblyProvider`s, you can pass a string id for each client as a prop to the provider.\n\n```jsx\nroot.render(\n  <AblyProvider options={options} id={'providerOne'}>\n    <AblyProvider options={options} id={'providerTwo'}>\n      <App />\n    </AblyProvider>\n  </AblyProvider>\n)\n```\n\nThis id can then be passed in to each hook to specify which client to use.\n\n```javascript\nconst ablyContextId = 'providerOne';\n\nconst client = useAbly(ablyContextId);\n\nuseChannel({ channelName: \"your-channel-name\", id: ablyContextId }, (message) => {\n    console.log(message);\n});\n\nusePresence({ channelName: \"your-channel-name\", id: ablyContextId }, (presenceUpdate) => {\n    ...\n})\n```\n","exports":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"},"gitHead":"17e083c00b56dc4ebbc38c07c58e439e1dfc31bc","scripts":{"ci":"npm run test && npm run build","lint":"eslint \"src/**/*.{js,jsx,ts,tsx}\"","test":"vitest run","build":"npm run build:cjs && npm run build:mjs","start":"npx vite serve","format":"prettier --write \"src/**/*.{js,jsx,ts,tsx,css,md}\" --config ./.prettierrc.json","lint:fix":"eslint --fix \"src/**/*.{js,jsx,ts,tsx}\"","build:cjs":"tsc --project tsconfig.cjs.json && cp res/package.cjs.json dist/cjs/package.json","build:mjs":"tsc --project tsconfig.mjs.json && cp res/package.mjs.json dist/mjs/package.json","format:check":"prettier --check \"src/**/*.{js,jsx,ts,tsx,css,md}\" --config ./.prettierrc.json"},"_npmUser":{"name":"ably-realtime","email":"account.owners@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"9.6.7","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"18.17.0","dependencies":{"ably":"^1.2.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","eslint":"^8.45.0","vitest":"^0.18.0","prettier":"^3.0.0","react-dom":">=18.1.0","typescript":">=4.4.4","eslint-plugin-react":"^7.32.2","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0","@typescript-eslint/parser":"^6.1.0","eslint-plugin-react-hooks":"^4.6.0","@typescript-eslint/eslint-plugin":"^6.1.0"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_3.0.0-canary.0_1692308252303_0.4749761852708123","host":"s3://npm-registry-packages"}},"3.0.0-canary.1":{"name":"@ably-labs/react-hooks","version":"3.0.0-canary.1","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@3.0.0-canary.1","maintainers":[{"name":"ably-realtime","email":"account.owners@ably.com"},{"name":"owenpearson","email":"owen.pearson@ably.com"},{"name":"lmars","email":"lewis@lmars.net"},{"name":"ably-labs-user","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"2563ba0b7260a2f20e5b62aca0fc7f44ee8d899f","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-3.0.0-canary.1.tgz","fileCount":110,"integrity":"sha512-ln2XHNwiZof3xU0jZBd1tb4wzsntmbfonqX9M40V2nlNKW7OkzSSW0e2CbAyy8LtsZPEm6vsHZHVgTcdrBxKBg==","signatures":[{"sig":"MEYCIQDIhCDU576Y8HErSIUUbRFRVmxIV598pxFGOoa91OvFzgIhAJgBL+SK22FjEW/F7AG+XCR/5UWQKo2XSGMnMXpyg3W5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146402},"main":"dist/cjs/index.js","types":"dist/mjs/index.d.ts","module":"dist/mjs/index.js","readme":"# @ably-labs/react-hooks\n\nUse Ably in your React application using idiomatic, easy to use, React Hooks!\n\nUsing this package you can:\n\n- Interact with Ably channels using a react hook.\n- Send messages via Ably using the channel instances the hooks provide\n- Get notifications of user presence on channels\n- Send presence updates\n\nThe hooks provide a simplified syntax for interacting with Ably, and manage the lifecycle of the Ably SDK instances for you taking care to subscribe and unsubscribe to channels and events when your react components re-render.\n\n---\n\n<!-- @import \"[TOC]\" {cmd=\"toc\" depthFrom=2 depthTo=6 orderedList=false} -->\n<!-- code_chunk_output -->\n\n- [Installation](#installation)\n  - [Compatible React Versions](#compatible-react-versions)\n  - [Ably channels and API keys](#ably-channels-and-api-keys)\n- [Usage](#usage)\n  - [useChannel](#usechannel)\n  - [usePresence](#usepresence)\n- [Contributing](./CONTRIBUTING.md)\n\n<!-- /code_chunk_output -->\n---\n\n## Installation\n\nThe hooks ship as an ES6 module, so you can use the `import` syntax in your react code.\n\n```bash\nnpm install --save @ably-labs/react-hooks\n```\n\nThis works out of the box using `create-react-app` - and you can use the package immediately.\n\n### Compatible React Versions\n\nThe latest version of this package tracks the latest version of react.\n\n| React Version | @ably-labs/react-hooks Version |\n|----------|--------------------------------|\n| >=17.0.2 | 1.1.8                          |\n| >=18.1.0 | 2.x.x                          |\n| >=16.8.0 | 3.x.x (current)                |\n\n### Ably channels and API keys\n\nIn order to use these hooks, you will need an Ably API key. If you are not already signed up, you can [sign up now for a free Ably account](https://www.ably.io/signup). Once you have an Ably account:\n\n1. Log into your app dashboard.\n2. Under **“Your apps”**, click on **“Manage app”** for any app you wish to use for this tutorial, or create a new one with the “Create New App” button.\n3. Click on the **“API Keys”** tab.\n4. Copy the secret **“API Key”** value from your Root key, we will use this later when we build our app.\n\nIt is strongly recommended that you use [Token Authentication](https://www.ably.io/documentation/rest/authentication/#token-authentication), this will require server side code that is outside of the scope of this readme. In the examples below we use an API key directly in the markup, this is for ***local development only** and **should not be used for production code** and **should not** be committed to your repositories.\n\n---\n\n## Usage\n\nOnce you've added the package using `npm` to your project, you can use the hooks in your `react` code.\n\nStart by connecting your app to Ably using the `AblyProvider` component. The options provided to the `AblyProvider` are the same options used for the Ably SDK - and requires either a `string` or an `AblyClientOptions`. You can use this configuration object to setup your API keys, or tokenAuthentication as you normally would. If you want to use the `usePresence` hook, you'll need to explicitly provide a `clientId`.\n\nThe `AblyProvider` should be high in your component tree, wrapping every component which needs to access Ably.\n\n\n```jsx\nimport { AblyProvider } from \"@ably-labs/react-hooks\";\n\nconst options = {\n  key: \"your-ably-api-key\",\n  clientId: \"me\",\n}\n\nroot.render(\n  <AblyProvider options={options}>\n    <App />\n  </AblyProvider>\n)\n```\n\nYou may also create your own client and pass it into the context provider.\n\nThe `Realtime` constructor provided by the library matches the method signature of the Ably SDK with promises - and requires either a `string` or an `AblyClientOptions`. You can use this configuration object to setup your API keys, or tokenAuthentication as you normally would. If you want to use the `usePresence` hook, you'll need to explicitly provide a `clientId`.\n\n```jsx\nimport { Realtime } from \"@ably-labs/react-hooks\";\n\nconst client = new Realtime({ key: \"your-ably-api-key\", clientId: 'me' });\n\nroot.render(\n  <AblyProvider client={client}>\n    <App />\n  </AblyProvider>\n)\n```\n\nOnce you've done this, you can use the `hooks` in your code. The simplest example is as follows:\n\n```javascript\nconst { channel } = useChannel(\"your-channel-name\", (message) => {\n    console.log(message);\n});\n```\n\nEvery time a message is sent to `your-channel-name` it'll be logged to the console. You can do whatever you need to with those messages.\n\n---\n\n### useChannel\n\nThe useChannel hook lets you subscribe to a channel and receive messages from it.\n\n```javascript\nconst { channel, ably } = useChannel(\"your-channel-name\", (message) => {\n    console.log(message);\n});\n```\n\n**Both the channel instance, and the Ably JavaScript SDK instance are returned from the useChannel call.**\n\n`useChannel` really shines when combined with a regular react `useState` hook - for example, you could keep a list of messages in your app state, and use the `useChannel` hook to subscribe to a channel, and update the state when new messages arrive.\n\n```javascript\nconst [messages, updateMessages] = useState([]);\nconst { channel } = useChannel(\"your-channel-name\", (message) => {\n    updateMessages((prev) => [...prev, message]);\n});\n\n// Convert the messages to list items to render in a react component\nconst messagePreviews = messages.map((msg, index) => <li key={index}>{msg.data.someProperty}</li>);\n```\n\n`useChannel` supports all of the parameter combinations of a regular call to `channel.subscribe`, so you can filter the messages you subscribe to by providing a `message type` to the `useChannel` function:\n\n```javascript\nconst { channel } = useChannel(\"your-channel-name\", \"test-message\", (message) => {\n    console.log(message); // Only logs messages sent using the `test-message` message type\n});\n```\n\nThe `channel` instance returned by `useChannel` can be used to send messages to the channel. It's just a regular Ably JavaScript SDK `channel` instance.\n\n```javascript\nchannel.publish(\"test-message\", { text: \"message text\" });\n```\n\nBecause we're returning the channel instance, and Ably SDK instance from our `useChannel` hook, you can subsequently use these to perform any operations you like on the channel.\n\nFor example, you could retrieve history like this:\n\n```javascript\nconst { channel } = useChannel(\"your-channel-name\", (message) => {\n    console.log(message);\n});\n\nconst history = channel.history((err, result) => {\n    var lastMessage = resultPage.items[0];\n    console.log('Last message: ' + lastMessage.id + ' - ' + lastMessage.data);\n});\n```\n\nIt's also worth highlighting that the `useChannel` hook supports all of the additional parameters that the regular Ably SDK does as we're simply passing the call along.\nThis means you can use features like `rewind`:\n\n```javascript\nconst { channel } = useChannel(\"[?rewind=100]your-channel-name\", (message) => {\n    // This call will rewind 100 messages\n    console.log(message);\n});\n```\n\nWe support providing [ChannelOptions](https://ably.com/docs/api/realtime-sdk/types#channel-options) to the `useChannel` hook:\n\n```javascript\nconst { channel } = useChannel({ channelName: \"your-channel-name\", options: { ... } }, (message) => {\n    ...\n});\n```\n\n---\n\n### usePresence\n\nThe usePresence hook lets you subscribe to presence events on a channel - this will allow you to get notified when a user joins or leaves the channel.\n\n**Please note** that fetching present members is executed as an effect, so it'll load in *after* your component renders for the first time.\n\n```javascript\nconst { presenceData, updateStatus } = usePresence(\"your-channel-name\");\n\n// Convert presence data to list items to render    \nconst peers = presenceData.map((msg, index) => <li key={index}>{msg.clientId}: {msg.data}</li>);\n```\n\n`usePresence` returns an array of presence messages - again each message is a regular Ably JavaScript SDK `presenceMessage` instance.\n\nYou can optionally provide a string when you `usePresence` to set an initial `presence data` string.\n\n```javascript\nconst { presenceData, updateStatus } = usePresence(\"your-channel-name\", \"initial state\");\n\n// The `updateStatus` function can be used to update the presence data for the current client\nupdateStatus(\"new status\");\n```\n\nThe new state will be sent to the channel, and any other clients subscribed to the channel will be notified of the change immediately.\n\nIf you don't want to use the `presenceData` returned from usePresence, you can configure a callback\n\n```javascript\nconst { updateStatus } = usePresence(\"your-channel-name\", \"initial state\", (presenceUpdate) => {\n    console.log(presenceUpdate);\n});\n```\n\nusePresence supports objects, as well as strings\n\n```javascript\nusePresence(\"your-channel-name\", { foo: \"bar\" });\n```\n\nand if you're using `TypeScript` there are type hints to make sure that updates are of the same `type` as your initial constraint, or a provided generic type parameter:\n\n```tsx\nconst TypedUsePresenceComponent = () => {\n    // In this example MyPresenceType will be checked - if omitted, the shape of the initial \n    // value will be used ...and if that's omitted, `any` will be the default.\n\n    const { val } = usePresence<MyPresenceType>(\"testChannelName\", { foo: \"bar\" });\n\n    return (\n        <div role='presence'>\n            {JSON.stringify(val)}\n        </div>\n    );\n}\n\ninterface MyPresenceType {\n    foo: string;\n}\n```\n\n`PresenceData` is a good way to store synchronised, per-client metadata, so types here are especially valuable.\n\n### useConnectionStateListener\n\nThe `useConnectionStateListener` hook lets you attach a listener to be notified of [connection state changes](https://ably.com/docs/connect/states?lang=javascript). This can be useful for detecting when the client has lost connection.\n\n```javascript\nuseConnectionStateListener((stateChange) => {\n  console.log(stateChange.current) // the new connection state\n  console.log(stateChange.previous) // the previous connection state\n  console.log(stateChange.reason) // if applicable, an error indicating the reason for the connection state change\n})\n```\n\nYou can also pass in a filter to only listen to a set of connection states:\n\n```javascript\nuseConnectionStateListener('failed', listener); // the listener only gets called when the connection state becomes failed\nuseConnectionStateListener(['failed', 'suspended'], listener); // the listener only gets called when the connection state becomes failed or suspended\n```\n\n### useChannelStateListener\n\nThe `useChannelStateListener` hook lets you attach a listener to be notified of [channel state changes](https://ably.com/docs/channels?lang=javascript#states). This can be useful for detecting when a channel error has occured.\n\n```javascript\nuseChannelStateListener((stateChange) => {\n  console.log(stateChange.current) // the new channel state\n  console.log(stateChange.previous) // the previous channel state\n  console.log(stateChange.reason) // if applicable, an error indicating the reason for the channel state change\n})\n```\n\nYou can also pass in a filter to only listen to a set of channel states:\n\n```javascript\nuseChannelStateListener('failed', listener); // the listener only gets called when the channel state becomes failed\nuseChannelStateListener(['failed', 'suspended'], listener); // the listener only gets called when the channel state becomes failed or suspended\n```\n\n### useAbly\n\nThe useAbly hook lets you access the Ably client used by the AblyProvider context. This can be useful if you need to access ably-js APIs which aren't available through our react-hooks library.\n\n```javascript\nconst client = useAbly();\n\nclient.authorize();\n```\n\n### Error Handling\n\nWhen using the Ably react hooks, your Ably client may encounter a variety of errors, for example if it doesn't have permissions to attach to a channel it may encounter a channel error, or if it loses connection from the Ably network it may encounter a connection error.\n\nTo allow you to handle these errors, the `useChannel` and `usePresence` hooks return connection and channel errors so that you can react to them in your components: \n\n```jsx\nconst { connectionError, channelError } = useChannel('my_channel', messageHandler);\n\nif (connectionError) {\n  // TODO: handle connection errors\n} else if (channelError) {\n  // TODO: handle channel errors\n} else {\n  return <AblyChannelComponent />\n}\n```\n\nAlternatively, you can also pass callbacks to the hooks to be called when the client encounters an error:\n\n```js\nuseChannel({\n  channelName: 'my_channel',\n  onConnectionError: (err) => { /* handle connection error */ },\n  onChannelError: (err) => { /* handle channel error */ },\n}, messageHandler);\n```\n\n### Usage with multiple clients\n\nIf you need to use multiple Ably clients on the same page, the easiest way to do so is to keep your clients in separate `AblyProvider` components. However, if you need to nest `AblyProvider`s, you can pass a string id for each client as a prop to the provider.\n\n```jsx\nroot.render(\n  <AblyProvider options={options} id={'providerOne'}>\n    <AblyProvider options={options} id={'providerTwo'}>\n      <App />\n    </AblyProvider>\n  </AblyProvider>\n)\n```\n\nThis id can then be passed in to each hook to specify which client to use.\n\n```javascript\nconst ablyContextId = 'providerOne';\n\nconst client = useAbly(ablyContextId);\n\nuseChannel({ channelName: \"your-channel-name\", id: ablyContextId }, (message) => {\n    console.log(message);\n});\n\nusePresence({ channelName: \"your-channel-name\", id: ablyContextId }, (presenceUpdate) => {\n    ...\n})\n```\n","exports":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"},"gitHead":"17e083c00b56dc4ebbc38c07c58e439e1dfc31bc","scripts":{"ci":"npm run test && npm run build","lint":"eslint \"src/**/*.{js,jsx,ts,tsx}\"","test":"vitest run","build":"npm run build:cjs && npm run build:mjs","start":"npx vite serve","format":"prettier --write \"src/**/*.{js,jsx,ts,tsx,css,md}\" --config ./.prettierrc.json","lint:fix":"eslint --fix \"src/**/*.{js,jsx,ts,tsx}\"","build:cjs":"tsc --project tsconfig.cjs.json && cp res/package.cjs.json dist/cjs/package.json","build:mjs":"tsc --project tsconfig.mjs.json && cp res/package.mjs.json dist/mjs/package.json","format:check":"prettier --check \"src/**/*.{js,jsx,ts,tsx,css,md}\" --config ./.prettierrc.json"},"_npmUser":{"name":"ably-realtime","email":"account.owners@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"9.6.7","description":"Use Ably in your React application using idiomatic, easy to use, React Hooks!","directories":{},"_nodeVersion":"18.17.0","dependencies":{"ably":"^1.2.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","eslint":"^8.45.0","vitest":"^0.18.0","prettier":"^3.0.0","react-dom":">=18.1.0","typescript":">=4.4.4","eslint-plugin-react":"^7.32.2","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0","@typescript-eslint/parser":"^6.1.0","eslint-plugin-react-hooks":"^4.6.0","@typescript-eslint/eslint-plugin":"^6.1.0","eslint-plugin-require-extensions":"^0.1.3"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_3.0.0-canary.1_1692343671833_0.5582349709390673","host":"s3://npm-registry-packages"}},"2.1.2":{"name":"@ably-labs/react-hooks","version":"2.1.2","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","_id":"@ably-labs/react-hooks@2.1.2","maintainers":[{"name":"ably-realtime","email":"account.owners@ably.com"},{"name":"owenpearson","email":"owen.pearson@ably.com"},{"name":"lmars","email":"lewis@lmars.net"},{"name":"ably-labs-user","email":"devrel@ably.com"}],"homepage":"https://github.com/ably-labs/react-hooks#readme","bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"dist":{"shasum":"cb95111ece863e672614e21f2cc108a49a1f27b0","tarball":"https://registry.npmjs.org/@ably-labs/react-hooks/-/react-hooks-2.1.2.tgz","fileCount":55,"integrity":"sha512-WmX1wLIih1dbM86KYkFfWl26pLu80hC7vAihEEF9FXLPZjF90OMuPiED6Ntl4uvRnu3l1P6MydCBxjRMmcR5wg==","signatures":[{"sig":"MEQCIDTfYKPFZoP3ts0PxUy33Kwoh7vp9DDOXjSHNy/mFEngAiBhMPF2Xzvypmos3HOuZu9rtEajWGG7qS5RHcqcSCXFFw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74125},"main":"dist/cjs/index.js","types":"dist/mjs/index.d.ts","module":"dist/mjs/index.js","exports":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"},"gitHead":"72ad0ccd1137b423406dc4aad35b94d17ee48bf6","scripts":{"ci":"npm run test && npm run build","test":"vitest run","build":"npm run build:cjs && npm run build:mjs","start":"npx vite serve","build:cjs":"tsc --project tsconfig.cjs.json && cp res/package.cjs.json dist/cjs/package.json","build:mjs":"tsc --project tsconfig.mjs.json && cp res/package.mjs.json dist/mjs/package.json"},"_npmUser":{"name":"owenpearson","email":"owen.pearson@ably.com"},"deprecated":"This package has moved to `ably/react`, see https://github.com/ably/ably-js/blob/main/docs/react.md for instructions on how to use to the latest version","repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"_npmVersion":"8.11.0","description":"> [!IMPORTANT]   > The release candidate of our 3.0 react hooks library is currently available as a module of ably-js, which includes major improvements such as using a context provider and providing APIs to react to connection errors and channel errors. ","directories":{},"_nodeVersion":"16.16.0","dependencies":{"ably":"^1.2.27"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^20.0.0","react":">=18.1.0","vitest":"^0.18.0","react-dom":">=18.1.0","typescript":">=4.4.4","@vitejs/plugin-react":"^1.3.2","@testing-library/react":"^13.3.0"},"peerDependencies":{"react":">=18.1.0","react-dom":">=18.1.0"},"_npmOperationalInternal":{"tmp":"tmp/react-hooks_2.1.2_1698674074403_0.7372770607559815","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-10-15T18:25:04.417Z","modified":"2024-10-09T11:07:00.798Z","1.1.0":"2021-10-15T18:25:04.605Z","1.1.1":"2021-10-19T21:05:30.355Z","1.1.2":"2021-10-19T21:06:38.178Z","1.1.3":"2021-11-05T12:29:11.618Z","1.1.4":"2021-11-05T17:48:55.801Z","1.1.5":"2021-12-01T10:47:54.361Z","1.1.6":"2022-04-22T08:26:46.169Z","1.1.7":"2022-05-13T11:12:38.478Z","1.1.8":"2022-05-22T16:42:27.149Z","2.0.0":"2022-05-29T18:15:04.148Z","2.0.1":"2022-05-29T18:35:27.510Z","2.0.2":"2022-06-24T16:41:03.268Z","2.0.3":"2022-06-24T16:56:02.668Z","2.0.4":"2022-06-24T17:23:58.964Z","2.0.6":"2022-07-15T15:13:55.552Z","2.0.7":"2022-07-26T12:55:10.683Z","2.0.8":"2022-08-15T12:55:15.304Z","2.0.9":"2022-08-15T13:57:29.807Z","2.0.10":"2022-11-15T14:55:54.656Z","2.0.11":"2022-11-23T18:12:56.644Z","2.1.0":"2023-01-31T17:48:46.681Z","2.1.1":"2023-04-12T14:44:53.326Z","3.0.0-canary.0":"2023-08-17T21:37:32.494Z","3.0.0-canary.1":"2023-08-18T07:27:51.980Z","2.1.2":"2023-10-30T13:54:34.676Z"},"bugs":{"url":"https://github.com/ably-labs/react-hooks/issues"},"author":{"name":"Jo Franchetti, David Whitney"},"license":"ISC","homepage":"https://github.com/ably-labs/react-hooks#readme","keywords":["ably","react","websockets","realtime","hooks","react hooks"],"repository":{"url":"git+https://github.com/ably-labs/react-hooks.git","type":"git"},"description":"> [!IMPORTANT]   > The release candidate of our 3.0 react hooks library is currently available as a module of ably-js, which includes major improvements such as using a context provider and providing APIs to react to connection errors and channel errors. ","maintainers":[{"email":"andrii.bulat@ably.com","name":"andrii.bulat.ably"},{"email":"khokhlov.e.n@gmail.com","name":"ttypic"},{"email":"mike@christensen.codes","name":"mschristensen"},{"email":"account.owners@ably.com","name":"ably-realtime"},{"email":"owen.pearson@ably.com","name":"owenpearson"},{"email":"lewis@lmars.net","name":"lmars"},{"email":"devrel@ably.com","name":"ably-labs-user"}],"readme":"# @ably-labs/react-hooks\n\n> [!IMPORTANT]  \n> The release candidate of our 3.0 react hooks library is currently available as a module of ably-js, which includes major improvements such as using a context provider and providing APIs to react to connection errors and channel errors. Please see the [new react hooks README](https://github.com/ably/ably-js/blob/main/docs/react.md#L1) for installation instructions and usage examples.\n\nUse Ably in your React application using idiomatic, easy to use, React Hooks!\n\nUsing this package you can:\n\n- Interact with Ably channels using a react hook.\n- Send messages via Ably using the channel instances the hooks provide\n- Get notifications of user presence on channels\n- Send presence updates\n\nThe hooks provide a simplified syntax for interacting with Ably, and manage the lifecycle of the Ably SDK instances for you taking care to subscribe and unsubscribe to channels and events when your react components re-render.\n\n---\n\n<!-- @import \"[TOC]\" {cmd=\"toc\" depthFrom=2 depthTo=6 orderedList=false} -->\n<!-- code_chunk_output -->\n\n- [Installation](#installation)\n  - [Compatible React Versions](#compatible-react-versions)\n  - [Ably channels and API keys](#ably-channels-and-api-keys)\n- [Usage](#usage)\n  - [useChannel](#usechannel)\n  - [usePresence](#usepresence)\n- [Developer Notes](#developer-notes)\n\n<!-- /code_chunk_output -->\n---\n\n## Installation\n\nThe hooks ship as an ES6 module, so you can use the `import` syntax in your react code.\n\n```bash\nnpm install --save @ably-labs/react-hooks\n```\n\nThis works out of the box using `create-react-app` - and you can use the package immediately.\n\n### Compatible React Versions\n\nThe latest version of this package tracks the latest version of react.\n\n| React Version | @ably-labs/react-hooks Version |\n|----------|--------|\n| >=17.0.2 |  1.1.8 |\n| >=18.1.0 |  2.0.x (current) |\n\n### Ably channels and API keys\n\nIn order to use these hooks, you will need an Ably API key. If you are not already signed up, you can [sign up now for a free Ably account](https://www.ably.io/signup). Once you have an Ably account:\n\n1. Log into your app dashboard.\n2. Under **“Your apps”**, click on **“Manage app”** for any app you wish to use for this tutorial, or create a new one with the “Create New App” button.\n3. Click on the **“API Keys”** tab.\n4. Copy the secret **“API Key”** value from your Root key, we will use this later when we build our app.\n\nIt is strongly recommended that you use [Token Authentication](https://www.ably.io/documentation/rest/authentication/#token-authentication), this will require server side code that is outside of the scope of this readme. In the examples below we use an API key directly in the markup, this is for ***local development only** and **should not be used for production code** and **should not** be committed to your repositories.\n\n---\n\n## Usage\n\nOnce you've added the package using `npm` to your project, you can use the hooks in your `react` code.\n\nStart by adding a reference to the hooks\n\n```javascript\nimport { configureAbly, useChannel } from \"@ably-labs/react-hooks\";\n```\n\nThen you need to use the `configureAbly` function to create an instance of the `Ably` JavaScript SDK.\n\n```javascript\nconfigureAbly({ key: \"your-ably-api-key\", clientId: generateRandomId() });\n```\n\n`configureAbly` matches the method signature of the Ably SDK - and requires either a `string` or an `AblyClientOptions`. You can use this configuration object to setup your API keys, or tokenAuthentication as you normally would. If you want to use the `usePresence` hook, you'll need to explicitly provide a `clientId`.\n\nOnce you've done this, you can use the `hooks` in your code. The simplest example is as follows:\n\n```javascript\nconst [channel] = useChannel(\"your-channel-name\", (message) => {\n    console.log(message);\n});\n```\n\nEvery time a message is sent to `your-channel-name` it'll be logged to the console. You can do whatever you need to with those messages.\n\n---\n\n### useChannel\n\nThe useChannel hook lets you subscribe to a channel and receive messages from it.\n\n```javascript\nconst [channel, ably] = useChannel(\"your-channel-name\", (message) => {\n    console.log(message);\n});\n```\n\n**Both the channel instance, and the Ably JavaScript SDK instance are returned from the useChannel call.**\n\n`useChannel` really shines when combined with a regular react `useState` hook - for example, you could keep a list of messages in your app state, and use the `useChannel` hook to subscribe to a channel, and update the state when new messages arrive.\n\n```javascript\nconst [messages, updateMessages] = useState([]);\nconst [channel] = useChannel(\"your-channel-name\", (message) => {\n    updateMessages((prev) => [...prev, message]);\n});\n\n// Convert the messages to list items to render in a react component\nconst messagePreviews = messages.map((msg, index) => <li key={index}>{msg.data.someProperty}</li>);\n```\n\n`useChannel` supports all of the parameter combinations of a regular call to `channel.subscribe`, so you can filter the messages you subscribe to by providing a `message type` to the `useChannel` function:\n\n```javascript\nconst [channel] = useChannel(\"your-channel-name\", \"test-message\", (message) => {\n    console.log(message); // Only logs messages sent using the `test-message` message type\n});\n```\n\nThe `channel` instance returned by `useChannel` can be used to send messages to the channel. It's just a regular Ably JavaScript SDK `channel` instance.\n\n```javascript\nchannel.publish(\"test-message\", { text: \"message text\" });\n```\n\nBecause we're returning the channel instance, and Ably SDK instance from our `useChannel` hook, you can subsequently use these to perform any operations you like on the channel.\n\nFor example, you could retrieve history like this:\n\n```javascript\nconst [channel] = useChannel(\"your-channel-name\", (message) => {\n    console.log(message);\n});\n\nconst history = channel.history((err, result) => {\n    var lastMessage = resultPage.items[0];\n    console.log('Last message: ' + lastMessage.id + ' - ' + lastMessage.data);\n});\n```\n\nIt's also worth highlighting that the `useChannel` hook supports all of the additional parameters that the regular Ably SDK does as we're simply passing the call along.\nThis means you can use features like `rewind`:\n\n```javascript\nconst [channel] = useChannel(\"[?rewind=100]your-channel-name\", (message) => {\n    // This call will rewind 100 messages\n    console.log(message);\n});\n```\n\nWe support providing [ChannelOptions](https://ably.com/docs/api/realtime-sdk/types#channel-options) to the `useChannel` hook:\n\n```javascript\nconst [channel] = useChannel({ channelName: \"your-channel-name\", options: { ... } }, (message) => {\n    ...\n});\n```\n\nWe also support providing your own `Realtime` instance to `useChannel`, which may be useful if you need to have more than one Ably client on the same page:\n\n```javascript\nimport { useChannel, Realtime } from '@ably-labs/react-hooks'\n\nconst realtime = new Realtime(options);\n\nuseChannel({ channelName: \"your-channel-name\", realtime: realtime }, (message) => {\n    ...\n})\n```\n\nfor any cases where channel options must be provided (e.g. setting up encryption cypher keys).\n\n---\n\n### usePresence\n\nThe usePresence hook lets you subscribe to presence events on a channel - this will allow you to get notified when a user joins or leaves the channel.\n\n**Please note** that fetching present members is executed as an effect, so it'll load in *after* your component renders for the first time.\n\n```javascript\nconst [presenceData, updateStatus] = usePresence(\"your-channel-name\");\n\n// Convert presence data to list items to render    \nconst peers = presenceData.map((msg, index) => <li key={index}>{msg.clientId}: {msg.data}</li>);\n```\n\n`usePresence` returns an array of presence messages - again each message is a regular Ably JavaScript SDK `presenceMessage` instance.\n\nYou can optionally provide a string when you `usePresence` to set an initial `presence data` string.\n\n```javascript\nconst [presenceData, updateStatus] = usePresence(\"your-channel-name\", \"initial state\");\n\n// The `updateStatus` function can be used to update the presence data for the current client\nupdateStatus(\"new status\");\n```\n\nThe new state will be sent to the channel, and any other clients subscribed to the channel will be notified of the change immediately.\n\nIf you don't want to use the `presenceData` returned from usePresence, you can configure a callback\n\n```javascript\nconst [_, updateStatus] = usePresence(\"your-channel-name\", \"initial state\", (presenceUpdate) => {\n    console.log(presenceUpdate);\n});\n```\n\nusePresence supports objects, as well as strings\n\n```javascript\nusePresence(\"your-channel-name\", { foo: \"bar\" });\n```\n\nand if you're using `TypeScript` there are type hints to make sure that updates are of the same `type` as your initial constraint, or a provided generic type parameter:\n\n```tsx\nconst TypedUsePresenceComponent = () => {\n    // In this example MyPresenceType will be checked - if omitted, the shape of the initial \n    // value will be used ...and if that's omitted, `any` will be the default.\n\n    const [val] = usePresence<MyPresenceType>(\"testChannelName\", { foo: \"bar\" });\n\n    return (\n        <div role='presence'>\n            {JSON.stringify(val)}\n        </div>\n    );\n}\n\ninterface MyPresenceType {\n    foo: string;\n}\n```\n\n`PresenceData` is a good way to store synchronised, per-client metadata, so types here are especially valuable.\n\nWe also support providing your own `Realtime` instance to `usePresence`, which may be useful if you need to have more than one Ably client on the same page:\n\n```javascript\nimport { useChannel, Realtime } from '@ably-labs/react-hooks'\n\nconst realtime = new Realtime(options);\n\nusePresence({ channelName: \"your-channel-name\", realtime: realtime }, (presenceUpdate) => {\n    ...\n})\n```\n","readmeFilename":"README.md"}