{"_id":"@654356282/react-keepalive","_rev":"4-58cadfd2cb1203127f2262121de9553a","name":"@654356282/react-keepalive","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@654356282/react-keepalive","version":"1.0.0","type":"module","main":"./lib/react-keepalive.umd.cjs","module":"./lib/react-keepalive.js","types":"./lib/src/index.d.ts","author":{"name":"wht","email":"654356282@qq.com"},"repository":{"url":"git+https://github.com/654356282/react-keepalive.git","type":"git"},"license":"ISC","keywords":["react","keepalive"],"bugs":{"url":"https://github.com/654356282/react-keepalive/issues"},"description":"React Keepalive Component","homepage":"https://github.com/654356282/react-keepalive","dependencies":{"react":"^18.2.0","react-dom":"^18.2.0","react-router-dom":"^6.4.3"},"devDependencies":{"@rollup/plugin-typescript":"^9.0.2","@types/node":"^18.11.9","@types/react":"^18.0.24","@types/react-dom":"^18.0.8","@vitejs/plugin-react":"^2.2.0","tslib":"^2.4.1","typescript":"^4.6.4","vite":"^3.2.3"},"exports":{".":{"import":"./lib/react-keepalive.js","require":"./lib/react-keepalive.umd.cjs"}},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_id":"@654356282/react-keepalive@1.0.0","_integrity":"sha512-pMGUIUAcLioBaLOH92r83NkKCOAzNLq8zMNmNs2JT4VEptme2P5g0hpU8HJ7Gau5tv3rrKeGOOlLb15WEKjrmg==","_resolved":"/tmp/7b12aa3c9afad2df9a7b546d6fe1fb17/654356282-react-keepalive-1.0.0.tgz","_from":"file:654356282-react-keepalive-1.0.0.tgz","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-pMGUIUAcLioBaLOH92r83NkKCOAzNLq8zMNmNs2JT4VEptme2P5g0hpU8HJ7Gau5tv3rrKeGOOlLb15WEKjrmg==","shasum":"0c8ae191fcdb4b90b761e9843a4f25ad030b56c7","tarball":"https://registry.npmjs.org/@654356282/react-keepalive/-/react-keepalive-1.0.0.tgz","fileCount":12,"unpackedSize":62167,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnyN6Axx/xQWnF4tNrfSjlrvtnWWBWU8WaMuWTy+NlqAIhAKFRrV7dAdTE0aidRi16ep6VKYGcirx8zZRWn+uW1DpS"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfkTsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCtg//UXTNzQLBkf8GEAfj4dZtPieLDB++d0mPqMpydzgVi0ZI1XAf\r\nE9C3hGk9DiQEU+hxvSXWuJhUhWgll2eTcEhU5qqXUhMCxNz4xl+AwOKJ0fOX\r\nzpa7U+s803Dzl0LS3VFqWbHaD3mldvAD3XfjqZ7fXlt5lM+xZ0OKItkukc5P\r\nYP7zk/Mol2Um7/dXrblvqDYOFMfmW3fabAKP4dXLhZ0+Jf5xm6+ZxLgZG5Uc\r\nMbY8OhK3aeiOBMQMnyYJ4SA/twHy/xjwZL911NJoLATtqUi5csxSofXYbIFL\r\nNp35UZ3/Pj0QAsZjRACoKku4RNZfcl+Lw8vgBzbR6vq/NiREheqcnf/UQJWT\r\ngbT1DqURMmciun8/ApHxlDhOnuEHOCltiBoKb5Y1E8D59heIr2DNnvhC61oC\r\ntwzEAso+tAXFkyIUCqm2VQ7omp8l78EwmAc+ETwD5qWhYTZRA6BXbaWxl0ow\r\n/UCkdGDvKPXQs6ZnN6azEr0irq8uvxJismb1zKZFkPP98FdrWQZRepQBrEe1\r\nc9rFW/Os7b1as0BmKuVVPA/Vi8/UP7hs/Z180qux1oSzn1e4nxgmwXsXnMHm\r\njNxoqA6uTqHmOrP6y1PkPXUabew3orHL3khMw/6MRbE5Gqwlxsdc2mALfJ+J\r\nEl16GTXA+tLkHd5Lw5bC6j5ypaD63nfa18A=\r\n=wSdv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"654356282","email":"654356282@qq.com"},"directories":{},"maintainers":[{"name":"654356282","email":"654356282@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-keepalive_1.0.0_1669219564602_0.5953020050528226"},"_hasShrinkwrap":false},"1.0.1":{"name":"@654356282/react-keepalive","version":"1.0.1","type":"module","main":"./lib/react-keepalive.umd.cjs","module":"./lib/react-keepalive.js","types":"./lib/src/index.d.ts","author":{"name":"wht","email":"654356282@qq.com"},"repository":{"url":"git+https://github.com/654356282/react-keepalive.git","type":"git"},"license":"ISC","keywords":["react","keepalive"],"bugs":{"url":"https://github.com/654356282/react-keepalive/issues"},"description":"React Keepalive Component","homepage":"https://github.com/654356282/react-keepalive","dependencies":{"react-router-dom":"^6.4.3"},"devDependencies":{"@rollup/plugin-typescript":"^9.0.2","@types/node":"^18.11.9","@types/react":"^18.0.24","@types/react-dom":"^18.0.8","@vitejs/plugin-react":"^2.2.0","react":"^18.2.0","react-dom":"^18.2.0","rollup-plugin-visualizer":"^5.8.3","tslib":"^2.4.1","typescript":"^4.6.4","vite":"^3.2.3"},"exports":{".":{"import":"./lib/react-keepalive.js","require":"./lib/react-keepalive.umd.cjs"}},"peerDependencies":{"react":">17.0.0","react-dom":">17.0.0"},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","analyzer":"tsc && vite build --mode analyzer"},"_id":"@654356282/react-keepalive@1.0.1","_integrity":"sha512-/22L3EjWiriVU/xVbFJaihomAE0GNhDtMemYp4p+SmIy3Y7HPs738KxbhCTgpNLadDY0NK+4XG0K/wvT1QrGfg==","_resolved":"/tmp/193190cc5d32cd78b62e7561ecb7965e/654356282-react-keepalive-1.0.1.tgz","_from":"file:654356282-react-keepalive-1.0.1.tgz","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-/22L3EjWiriVU/xVbFJaihomAE0GNhDtMemYp4p+SmIy3Y7HPs738KxbhCTgpNLadDY0NK+4XG0K/wvT1QrGfg==","shasum":"bbd92256c3a1d9f17232752da024e4caf44c4289","tarball":"https://registry.npmjs.org/@654356282/react-keepalive/-/react-keepalive-1.0.1.tgz","fileCount":12,"unpackedSize":13829,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDstMyem5W8h1qZWw/vkvJyEjh25obiP42rNZS31OSuIQIgCDD/t+nTPuwmPITW3HZkiIXTHbjm9DanFHFLusIGKB0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjftOGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmreKg/9HNZ6yDORL6THVYJJp6NU7V9o+Gnr370hbsoGj35TGc5AdWxf\r\nutALXJODeG/1Q0dAn4CiAuCJc8IGLj48PhUHuaLBG1z9ESEpBGUEuQ//+96M\r\nAFDXsGQu2QZW4ILZyn9rti3VtewLz93Vu2YY1vM1guB58t6nnkchxCmeftcv\r\nqmVF9JwKnyfWgdQ1GFeZvwcw2cr2wNgiyMOovGSqYw9ApsNWwriKAr1UpIvg\r\nCwrGQbMZ+kFAHWr/oIMUtky3RatIltt78pZMQ1jBiXDZ2NFKynNrn1fVZJoe\r\nbkw699EwgXY/HdOXQveU4JYau++B4/6nRLcsuf0RmOXgReR5bS1KKnwTZw2H\r\nInoizRSb+ESpLubZn7HkMn8GkCupqSksl+txi7eYJfdqKQ22JHJwf3dXxEjD\r\nVR8537AB7zOIUFQWTy7LqdH862EvHxEP8shexJgeM3ICPkHzt5DqiibP1FMv\r\n1CfgfprtButqFT+G3/NBlnSOqilJfpKqldsjx99uW4CP0QgYKphd1Y20hW5E\r\n0fbgO1o6Iw54JsGxMlx6zmpwA5sV/V5WHjSMjpkJeSMFx6yqJyZUzqCY746n\r\noBGKubqzLnUiyfgWIU6UxYGbE8AfzqO1Uv0dXkkRiklKvWcjZsLd+8gCFVm2\r\n0G0uPjsg4d/tcUvku9XUUqPqig2Ci8y2Vs4=\r\n=/9Ch\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"654356282","email":"654356282@qq.com"},"directories":{},"maintainers":[{"name":"654356282","email":"654356282@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-keepalive_1.0.1_1669256069840_0.09264682712412431"},"_hasShrinkwrap":false},"1.0.2":{"name":"@654356282/react-keepalive","version":"1.0.2","type":"module","main":"./lib/react-keepalive.umd.cjs","module":"./lib/react-keepalive.js","types":"./lib/src/index.d.ts","author":{"name":"wht","email":"654356282@qq.com"},"repository":{"url":"git+https://github.com/654356282/react-keepalive.git","type":"git"},"license":"ISC","keywords":["react","keepalive"],"bugs":{"url":"https://github.com/654356282/react-keepalive/issues"},"description":"React Keepalive Component","homepage":"https://github.com/654356282/react-keepalive","dependencies":{"react-router-dom":"^6.4.3"},"devDependencies":{"@rollup/plugin-typescript":"^9.0.2","@types/node":"^18.11.9","@types/react":"^18.0.24","@types/react-dom":"^18.0.8","@vitejs/plugin-react":"^2.2.0","react":"^18.2.0","react-dom":"^18.2.0","rollup-plugin-visualizer":"^5.8.3","tslib":"^2.4.1","typescript":"^4.6.4","vite":"^3.2.3"},"exports":{".":{"import":"./lib/react-keepalive.js","require":"./lib/react-keepalive.umd.cjs"}},"peerDependencies":{"react":">17.0.0","react-dom":">17.0.0"},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","analyzer":"tsc && vite build --mode analyzer"},"_id":"@654356282/react-keepalive@1.0.2","_integrity":"sha512-rZ/KZQanRQB0lG6jmSKdo75WUkC4j0C4u9G/LkmC3Vcyp8CnsQrARppo864eWA7x5s9H44LG0pHIF7QxC9vdWw==","_resolved":"/tmp/4ce7e47490f6b760efc9e5b37dc85626/654356282-react-keepalive-1.0.2.tgz","_from":"file:654356282-react-keepalive-1.0.2.tgz","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-rZ/KZQanRQB0lG6jmSKdo75WUkC4j0C4u9G/LkmC3Vcyp8CnsQrARppo864eWA7x5s9H44LG0pHIF7QxC9vdWw==","shasum":"cc1bbde27f07e55ed4351edff3e9d08668b788a9","tarball":"https://registry.npmjs.org/@654356282/react-keepalive/-/react-keepalive-1.0.2.tgz","fileCount":12,"unpackedSize":14151,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkj5MqGVOmbOGplhXEZiWJWPy0V7k3mITwblHHtTLLxwIgYNAJtQ3Z1GGZkaD5YkD/ZyiyDv2K32panHQsCF+OlJo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgBuEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpV9w/7BsR5GY9UqvzH58qicT3GaFZOmcJ7BBlxQVkyrdaXBG8rDqjj\r\nV90MkW7Ib8r6a7TkBuTD8GXM9qt/s6LW+hFKm+xI72FPCb6UQuZ9+Hn5uSrM\r\n52g+T146+iZnsyab5KFh32l+DUz4qEqxnRcKPrwkXhGaSxJ9AthW1d0J/XVk\r\npaR97GkFl7fRrA3MSUT3nkXUWadbBOlgqb9D3RiVigdsPvRePbxKeQL8rv31\r\nSeP/l1SPrz3SEO3JOgFDLGt5FewN71Tk9y8XJNNCBxJQe5mD/hmTkv9TcApY\r\n8P7VaIPgEMeU0wQgDe+hSpTmnYiqRgyR753kAHVoQ1FmiA61sKCn4ie9WRFB\r\nTr0baSMPPKFWx9FKCtEl9m3orNpVC/SWCuxgppvn3SQtHwyzQvNum+seanqw\r\nSo0miwIR/YnrcZH0/avrk0gTn90owAdoZ69vvelU0wG+Q40nHDbjBf9FaXKq\r\nffvpxuGQMcdCz2oAA69mxvuDM8F2rthXlNej9nc7gBPbRaFE+l5MYkyirlyq\r\nrOdQSN81YYzq/m1lpLRi6rnwzIwIo2xPuotQYws3WwbVYMklBsDl/DuKFiHK\r\nqDu5gTgV3ARmKOW2BchbBwT34dKruvQnrB8mDqNS0Iz73o8eRe+SareQpopa\r\njdsC0qnkuMILZVTZcQn8+BplKSI81F1P/yU=\r\n=MxOJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"654356282","email":"654356282@qq.com"},"directories":{},"maintainers":[{"name":"654356282","email":"654356282@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-keepalive_1.0.2_1669340036014_0.5502726888961835"},"_hasShrinkwrap":false},"1.1.0":{"name":"@654356282/react-keepalive","version":"1.1.0","type":"module","main":"./lib/react-keepalive.umd.cjs","module":"./lib/react-keepalive.js","types":"./lib/src/index.d.ts","author":{"name":"wht","email":"654356282@qq.com"},"repository":{"url":"git+https://github.com/654356282/react-keepalive.git","type":"git"},"license":"ISC","keywords":["react","keepalive"],"bugs":{"url":"https://github.com/654356282/react-keepalive/issues"},"description":"React Keepalive Component","homepage":"https://github.com/654356282/react-keepalive","dependencies":{"react-router-dom":"^6.4.3"},"devDependencies":{"@rollup/plugin-typescript":"^9.0.2","@types/node":"^18.11.9","@types/react":"^18.0.24","@types/react-dom":"^18.0.8","@vitejs/plugin-react":"^2.2.0","react":"^18.2.0","react-dom":"^18.2.0","rollup-plugin-visualizer":"^5.8.3","tslib":"^2.4.1","typescript":"^4.6.4","vite":"^3.2.3"},"exports":{".":{"import":"./lib/react-keepalive.js","require":"./lib/react-keepalive.umd.cjs"}},"peerDependencies":{"react":">17.0.0","react-dom":">17.0.0"},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","analyzer":"tsc && vite build --mode analyzer"},"_id":"@654356282/react-keepalive@1.1.0","_integrity":"sha512-pLqsxo6mrPy8fpMZxxb6ZQawcSh/YyHRK54zRTlu5Dh0aVxe+AG9WckG1WGFLH1PLE/0YUJXnJCJd4ZKv+KTpQ==","_resolved":"/tmp/c3f0a2bba80b4fd6c88a2bb6311e131d/654356282-react-keepalive-1.1.0.tgz","_from":"file:654356282-react-keepalive-1.1.0.tgz","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-pLqsxo6mrPy8fpMZxxb6ZQawcSh/YyHRK54zRTlu5Dh0aVxe+AG9WckG1WGFLH1PLE/0YUJXnJCJd4ZKv+KTpQ==","shasum":"87cfb2bdfbb10cf77d2efe5801a3ba8ec60ab3b4","tarball":"https://registry.npmjs.org/@654356282/react-keepalive/-/react-keepalive-1.1.0.tgz","fileCount":12,"unpackedSize":17822,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHeC5/NfhWVKjjhKmFQT/7y08mgrIqQLW69NHenYW6prAiBGZjgvCc2rZVf5NXEHr5bteqkEGhv1lQg+H4D4PtMW/g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjCfnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYCxAAodAYO0C4gA/2CgLf91g4PdC4cXSLfRNF8xP+K2WDOPwzbQD0\r\nBfdBehGhW+IWH0z0fmrxmf3Deta/sHzqYvXrFlXW2t13oQNcMlT6oiJiR8o7\r\nGQyVC5LRYzn1Z6rpA6/ZGDepNS0OqOYq/zdDwnosaR+tClt01DTulIrmF/9r\r\n4z+u6S9UQ25ECvVYp6wROP9BC5z39n3NS2F9Be95eUBtkh2psvEqXDl/62A8\r\nLlarjW8d8tmKhEVQAZbvzxER88ZOIwmmhrol7aVPJYJRMKWsJWzupgfUCTbU\r\nSyrjUlc2QZ7bB1LkZu4bb90XLUImf5N+Pz1UgFm9ltqe9ThsAfF1pon0939J\r\n2B/HwD+X9AfSPTacAktUNtzHQoO/DIc9Po8LNEMyGaodNZEZ3YEKqmhy52hZ\r\nCEV2HTC88tgyTl2raS6F3eQiZJ7KZJiQMb6+icocgWXdVDTQwbKQIqwbZSDU\r\n33/I+32rMhXvZO6sScnAhECq7EDka3YyUTuedvfcg1QKgDlybJnMq5+oXsK/\r\nnZUnFq7o3I193ZuOn5yba8+sxwEU/YHw+iVugeeTdOxNlewCoBhG/VPNIs3J\r\nFlVsLsQ9DkSMZArVaZeKMqZPyjdJxXsATkBC6XTqbXTvmQN4kFxGKpGI06eO\r\n1+vgqB45CyMChhq9MJn76hZh3SKWCXjqTzM=\r\n=/Ym3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"654356282","email":"654356282@qq.com"},"directories":{},"maintainers":[{"name":"654356282","email":"654356282@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-keepalive_1.1.0_1670129639546_0.45336115907027863"},"_hasShrinkwrap":false},"2.0.0":{"name":"@654356282/react-keepalive","version":"2.0.0","type":"module","main":"./lib/react-keepalive.umd.cjs","module":"./lib/react-keepalive.js","types":"./lib/src/index.d.ts","author":{"name":"wht","email":"654356282@qq.com"},"repository":{"url":"git+https://github.com/654356282/react-keepalive.git","type":"git"},"license":"ISC","keywords":["react","keepalive"],"bugs":{"url":"https://github.com/654356282/react-keepalive/issues"},"description":"React Keepalive Component","homepage":"https://github.com/654356282/react-keepalive","dependencies":{"react-router-dom":"^6.4.3"},"devDependencies":{"@rollup/plugin-typescript":"^9.0.2","@types/node":"^18.11.9","@types/react":"^18.0.24","@types/react-dom":"^18.0.8","@vitejs/plugin-react":"^2.2.0","react":"^18.2.0","react-dom":"^18.2.0","rollup-plugin-visualizer":"^5.8.3","tslib":"^2.4.1","typescript":"^4.6.4","vite":"^3.2.3"},"exports":{".":{"import":"./lib/react-keepalive.js","require":"./lib/react-keepalive.umd.cjs"}},"peerDependencies":{"react":">17.0.0","react-dom":">17.0.0"},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","analyzer":"tsc && vite build --mode analyzer"},"_id":"@654356282/react-keepalive@2.0.0","_integrity":"sha512-qtu11u5Njcin9/48Mo/kZg6ka9dyeLdwyR76wF//3ZObiwCf06/7s/FAVk2uVI5MHw2vYekKCPVbvJ1J/TQVMA==","_resolved":"/tmp/b8bfc0a98156b9dd5ed7325f93cc6eb3/654356282-react-keepalive-2.0.0.tgz","_from":"file:654356282-react-keepalive-2.0.0.tgz","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-qtu11u5Njcin9/48Mo/kZg6ka9dyeLdwyR76wF//3ZObiwCf06/7s/FAVk2uVI5MHw2vYekKCPVbvJ1J/TQVMA==","shasum":"b545d00fc17c2698dbfe35e94f5e304375e065eb","tarball":"https://registry.npmjs.org/@654356282/react-keepalive/-/react-keepalive-2.0.0.tgz","fileCount":14,"unpackedSize":70177,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE0Yz2QxfmiNKcIBscKqOmfXNU7t64wjHyGAjUeH6Gh8AiBZiUTPZwMUu8ygDmnHdrno5c4FhDcs2a8hHMqEQqd2Lw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj082zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtBA/+IOtZNwValo6CK7gC6ZGDkLhE7XfWdyaMFrzVWYaYy0loPZiI\r\nM4PnnOCY9tLjHA69SrMm9M96NhotLIq4ggx5LoshcWm2qF5OT88aVkojsLnX\r\nV21IIV6FKlGnVwgd09CN+ZXc9uBOuYcOpEnis8AIZE8mLM6QFKtV5SUfStXV\r\nTvQMCBbNsGU6aiR0SwvxLOb0KXTyIoasUdkq3bhs12D0JN3sdwsv5U4hVEX7\r\nJDowfJvzo0k1ObgNw8Z/vmxVRB7M9pF/p+VeFVO8c965MhYawk+KPq25JKyB\r\nHOyiC1MR9jI/8OJN6aKX0zwQCImTSSuu3CUbTL9nDaBzWXQsft38cC36IjH0\r\nXilIJRv6G9zD/1CnwAl139A62bdK1mY0qtdGIhVwFwv2J2Wx72ffP59R2f98\r\nExONdi1vdR4Umzm+N5XhCvtvENwmkar75ky2mOZyvk205mZk6IhvjFpOAyCN\r\nQ57MnaNnRwCMTK7p4PEEZaK8h2uAGLB9bB9BBCSgaUslZg7Ru5TLuSxt6srY\r\nnbodLGPlk37M+QfGteoC9IVpP0+70QaaAlZbyUuS5TUO/bJkXQQZ4ZIkCMU1\r\nOWAP0PmOppGQ0vzU1xZ7n5XoP0iXHcPYOVWO3NLupvXrV1rlQVlw1LL133qU\r\ngqALbrUSJpiHFt2TK2XZA93nBpYEKB2jaSA=\r\n=YasC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"654356282","email":"654356282@qq.com"},"directories":{},"maintainers":[{"name":"654356282","email":"654356282@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-keepalive_2.0.0_1674825139791_0.510432318164076"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-23T16:06:04.530Z","1.0.0":"2022-11-23T16:06:04.756Z","modified":"2023-01-27T13:12:20.088Z","1.0.1":"2022-11-24T02:14:30.024Z","1.0.2":"2022-11-25T01:33:56.168Z","1.1.0":"2022-12-04T04:53:59.706Z","2.0.0":"2023-01-27T13:12:19.953Z"},"maintainers":[{"name":"654356282","email":"654356282@qq.com"}],"description":"React Keepalive Component","homepage":"https://github.com/654356282/react-keepalive","keywords":["react","keepalive"],"repository":{"url":"git+https://github.com/654356282/react-keepalive.git","type":"git"},"author":{"name":"wht","email":"654356282@qq.com"},"bugs":{"url":"https://github.com/654356282/react-keepalive/issues"},"license":"ISC","readme":"# ReactKeepAlive\n\n为组件提供 keepalive 能力，无数据断层！不操作 dom 节点！使用 suspense 作 keepalive!\n\n缓存策略：优先使用 children 的 key 值作为缓存的 key，如果不存在 key 则使用 children 的 type\n\n## Keepalive Props\n\n`excludes: []|Regexp|(key: string|number)=>boolean`: 传入不需要缓存的组件的`key`，或者可传入正则表达式或函数\n\n`includes: []|Regexp|(key: string|number)=>boolean`: 传入需要换的的组件的`key`，或者可传入正则表达式或函数\n\n## Ref\n\n```ts\ntype KeepAliveRef = {\n  controller: {\n    // 丢弃缓存的组件\n    drop: (name: Key) => void;\n  } | null;\n};\n```\n\n## Hooks\n\n`useActived`: 组件从初次渲染或者从隐藏切换到显示时激活\n`useUnactived`: 组件销毁或者从显示切换到隐藏时激活\n`useController`: 获取`ref`中`controller`对象\n\n## usage\n\n组件缓存\n\n```ts\nimport { KeepAlive, useActived, useUnactived } from \"@654356282/react-keepalive\";\nimport React, { useState } from \"react\";\n\nconst Comp1 = () => {\n  const [count, setCount] = useState(0);\n\n  useActived(() => {\n    console.log(\"Comp1 is actived\");\n  });\n\n  useUnactived(() => {\n    console.log(\"Comp1 is unactived\");\n  });\n\n  return (\n    <div>\n      Comp1\n      <button onClick={() => setCount(count + 1)}>+1</button>\n    </div>\n  );\n};\n\nconst Comp2 = () => {\n  const [count, setCount] = useState(0);\n\n  useActived(() => {\n    console.log(\"Comp2 is actived\");\n  });\n\n  useUnactived(() => {\n    console.log(\"Comp2 is unactived\");\n  });\n\n  return (\n    <div>\n      Comp2\n      <button onClick={() => setCount(count + 1)}>+1</button>\n    </div>\n  );\n};\n\n// 此时keepalive中缓存的key值为Comp1和Comp2\nfunction App() {\n  const [toggle, setToggle] = useState(false);\n\n  return (\n    <div>\n      <KeepAlive>{toggle ? <Comp1 /> : <Comp2 />}</KeepAlive>\n      <button onClick={() => setToggle(!toggle)}>change</button>\n    </div>\n  );\n}\n```\n\n与`react-router`集成，使用`createBrowserRouter`\n```ts\nimport { ReactElement, useState } from \"react\";\nimport { KeepAlive, useActived, useUnactived } from \"@654356282/react-keepalive\";\nimport { RouterProvider, createBrowserRouter, NavLink } from \"react-router-dom\";\nimport React from \"react\";\n\nfunction KeepAliveWrapper(props: { children: ReactElement }) {\n  return <KeepAlive excludes={[\"/home\"]}>{props.children}</KeepAlive>;\n}\n\nconst router = createBrowserRouter([\n  {\n    path: \"/\",\n    element: (\n      <KeepAliveWrapper>\n        <Root key=\"/\" />\n      </KeepAliveWrapper>\n    ),\n  },\n  {\n    path: \"/home\",\n    element: (\n      <KeepAliveWrapper>\n        <Home key=\"/home\" />\n      </KeepAliveWrapper>\n    ),\n  },\n]);\n\nfunction Root() {\n  const [count, setCount] = useState(0);\n\n  useActived(() => {\n    console.log(\"Root is actived\");\n  });\n\n  useUnactived(() => {\n    console.log(\"Root is unactived\");\n  });\n\n  return (\n    <div>\n      <div>Root</div>\n      <div>\n        {count}\n        <button onClick={() => setCount(count + 1)}>+1</button>\n      </div>\n      <NavLink to={\"/home\"}>跳转</NavLink>\n    </div>\n  );\n}\n\nfunction Home() {\n  const [count, setCount] = useState(0);\n\n  useActived(() => {\n    console.log(\"Home is actived\");\n  });\n\n  useUnactived(() => {\n    console.log(\"Home is unactived\");\n  });\n\n  return (\n    <div>\n      <div>Home</div>\n      <div>\n        {count}\n        <button onClick={() => setCount(count + 1)}>+1</button>\n      </div>\n      <NavLink to={\"/\"} replace>\n        跳转\n      </NavLink>\n    </div>\n  );\n}\n\nexport default function App() {\n  return <RouterProvider router={router} />;\n}\n\n```\n使用嵌套式路由\n\n```tsx\nimport React, { ReactElement, useState } from \"react\";\nimport {\n  BrowserRouter,\n  NavLink,\n  Outlet,\n  Route,\n  Routes,\n} from \"react-router-dom\";\nimport { KeepAlive, useActived, useUnactived } from \"@654356282/react-keepalive\";\n\nfunction wrapKeepAlive(children: ReactElement) {\n  return <KeepAlive includes={/^\\/home.*/}>{children}</KeepAlive>;\n}\n\nconst Home = () => {\n  useActived(() => {\n    console.log(\"home actived\");\n  });\n\n  useUnactived(() => {\n    console.log(\"home unactived\");\n  });\n  const [count, setCount] = useState(0);\n\n  return (\n    <div>\n      <div>home--{count}</div>\n      <button onClick={() => setCount(count + 1)}>+1</button>\n      <NavLink to=\"/user\">跳转 user</NavLink>\n      <Outlet />\n    </div>\n  );\n};\n\nconst HomeSon = () => {\n  const [count, setCount] = useState(0);\n\n  useActived(() => {\n    console.log(\"home son actived\");\n  });\n\n  useUnactived(() => {\n    console.log(\"home son unactived\");\n  });\n\n  return (\n    <div>\n      <div>home son--{count}</div>\n      <button onClick={() => setCount(count + 1)}>son + 1</button>\n      <NavLink to=\"/user/son\">跳转user son</NavLink>\n    </div>\n  );\n};\n\nconst User = () => {\n  const [count, setCount] = useState(0);\n  useActived(() => {\n    console.log(\"user actived\");\n  });\n\n  useUnactived(() => {\n    console.log(\"user unactived\");\n  });\n\n  return (\n    <div>\n      <div>user--{count}</div>\n      <button onClick={() => setCount(count + 1)}>+1</button>\n      <NavLink to=\"/home\">跳转 home</NavLink>\n      <Outlet />\n    </div>\n  );\n};\n\nconst UserSon = () => {\n  const [count, setCount] = useState(0);\n\n  useActived(() => {\n    console.log(\"user son actived\");\n  });\n\n  useUnactived(() => {\n    console.log(\"user son unactived\");\n  });\n\n  return (\n    <div>\n      <div>user son--{count}</div>\n      <button onClick={() => setCount(count + 1)}>+1</button>\n      <NavLink to=\"/home/son\">跳转home son</NavLink>\n    </div>\n  );\n};\n\nconst App = () => {\n  return (\n    <BrowserRouter>\n      <Routes>\n        <Route path=\"/home\" element={wrapKeepAlive(<Home key=\"/home\" />)}>\n          <Route\n            path=\"son\"\n            element={wrapKeepAlive(<HomeSon key=\"/home/son\"></HomeSon>)}\n          />\n        </Route>\n        <Route path=\"/user\" element={wrapKeepAlive(<User key=\"/user\" />)}>\n          <Route\n            path=\"son\"\n            element={wrapKeepAlive(<UserSon key=\"/user/son\" />)}\n          />\n        </Route>\n      </Routes>\n    </BrowserRouter>\n  );\n};\n\nexport default App;\n\n```\n\n> tips: 如果需要缓存子路由，请保证父级路由需要`keepAlive`","readmeFilename":"README.md"}