{"_id":"@akutruff/dimmer","_rev":"8-db56e60e75a16deec740c319789c1fa4","name":"@akutruff/dimmer","dist-tags":{"latest":"0.4.3"},"versions":{"0.1.0":{"name":"@akutruff/dimmer","version":"0.1.0","description":"Mutable state management for object graphs and React","homepage":"https://github.com/akutruff/dimmer","repository":{"type":"git","url":"git+https://github.com/akutruff/dimmer.git"},"main":"dist/index","types":"dist/index","dependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"devDependencies":{"@testing-library/dom":"^8.17.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^13.3.0","@testing-library/user-event":"^14.2.1","@jest/types":"~28.1.3","@types/jest":"~28.1.6","@types/node":"^18.6.5","@types/react":"^18.0.17","@types/react-dom":"^18.0.6","jest":"~28.1.3","jest-environment-jsdom":"^28.1.3","rimraf":"~3.0.2","ts-jest":"~28.0.7","ts-node":"^10.9.1","typescript":"~4.7.4"},"scripts":{"build":"pnpm run clean && pnpm run compile","build:inc":"pnpm run compile","clean":"rimraf -rf ./dist","compile":"tsc -p tsconfig.build.json","test":"jest","test:ci":"CI=true jest"},"bugs":{"url":"https://github.com/akutruff/dimmer/issues"},"_id":"@akutruff/dimmer@0.1.0","_integrity":"sha512-Gozefjd2hOQql8bgJMIYaHef7IrfZrEhGzkiimhhVhDkK2bzrf/RHAR5lWOBBnvLTmt7cCYzvLbl3BK5wsSQyQ==","_resolved":"/tmp/1ca821ab5473dc19e0cb175c203e9550/akutruff-dimmer-0.1.0.tgz","_from":"file:akutruff-dimmer-0.1.0.tgz","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-Gozefjd2hOQql8bgJMIYaHef7IrfZrEhGzkiimhhVhDkK2bzrf/RHAR5lWOBBnvLTmt7cCYzvLbl3BK5wsSQyQ==","shasum":"59979a70086980a0c092317d1325e00157467b50","tarball":"https://registry.npmjs.org/@akutruff/dimmer/-/dimmer-0.1.0.tgz","fileCount":70,"unpackedSize":170237,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFTKTgH3kfrLhdcaGp6GPyQ2cHRQsG/lm45aDyP0y05gAiEA2JfS/MxPKdP11AViOoIdx9JEzA0/ner90Se9OjhGdDc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8tFOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5XRAAmaG+Iyu6pD3N+W81dLbhQ3KXu8JnhPYC/LssYppPm1T4gtDZ\r\nCBjNRhGPSkdysudrUUiq5BULJ+XgHMP5jqu4q9T8brFFOwinDcUhIWOqhaWL\r\ncVoSqboQMwEFhAdycZzbYGHPkP+FLcuEsxOSCXEot6E80+vKSCsgavoWs6M0\r\nGHHRExUII9mwtGZv0AQLcCUB7oG4aoZpG5/2A5K12mi/8nDMLo+IoYKmRpht\r\ni2i+0un7YiExUifiR8pgqOaDicb+KFXrXaboGhHqpJkiGOjrPzu/csyRJR7W\r\nzeJnhafZX56RWnibZfOmbuCFxB7prQkYEPvvkts0DPIAmxhOzK6WHCx6hFHf\r\nklQbwdXDvAofAbwOjbhsaMflVdYIjvLBMcWsuqdjg4Z1t0UGIAkfQ1co6Sw7\r\nu4zpcqQYuUPcdVwdeX0S/+2xfxnzCumdrv+QjAms3ihdXfsNfKRDE9gzCA74\r\ngA/QH53FEECZ9gULkVLjGHossY8I6JUj/qwDoHjWvKdRd/jGbgMIrORQ2qhV\r\nZYoIhenMP3Zh5nUoeMySL2CWEQSVT0cEmOSmv5oFB1lmFsLpsX7mnHUk8eVH\r\nracUO0uUKsaca25Qy9v8o6iXw72ckgAormg4HLQ2hqF3Is5ymsfOgbUUiozd\r\ncUcgRrDFX4PKbenh9l37aVFjkV0+JBYnlX4=\r\n=O4xj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akutruff","email":"andy.kutruff@gmail.com"},"directories":{},"maintainers":[{"name":"akutruff","email":"andy.kutruff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dimmer_0.1.0_1660080462486_0.4434360169758338"},"_hasShrinkwrap":false},"0.2.1":{"name":"@akutruff/dimmer","version":"0.2.1","description":"Mutable state management for object graphs and React","homepage":"https://github.com/akutruff/dimmer","repository":{"type":"git","url":"git+https://github.com/akutruff/dimmer.git"},"main":"dist/index","types":"dist/index","dependencies":{},"devDependencies":{"@jest/types":"~28.1.3","@types/jest":"~28.1.6","@types/node":"^18.6.5","jest":"~28.1.3","rimraf":"~3.0.2","ts-jest":"~28.0.7","ts-node":"^10.9.1","typescript":"~4.7.4"},"scripts":{"build":"pnpm run clean && pnpm run compile","build:inc":"pnpm run compile","clean":"rimraf -rf ./dist","compile":"tsc -p tsconfig.build.json","test":"jest","test:ci":"CI=true jest"},"_resolved":"","_integrity":"","_from":"file:akutruff-dimmer-0.2.1.tgz","bugs":{"url":"https://github.com/akutruff/dimmer/issues"},"_id":"@akutruff/dimmer@0.2.1","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-Y/U1sSYQjt8Tqtu2bxFFKPy7zx5MxlT8iP1u5cWnbTMxCRoZElxVotP4hzORpbzgfuFwdVUjg66C8c/cL7HZtA==","shasum":"44b58815bc5d8bf35ad38973aa7200fbf493bd1b","tarball":"https://registry.npmjs.org/@akutruff/dimmer/-/dimmer-0.2.1.tgz","fileCount":62,"unpackedSize":147786,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwmj85mhCzNIeV6dIm4RXtZHh1v7aaoAkYeT8icmgXlgIgEKsI4axB4+s0lCsreHBe2jORQOJ4Mi19xzQXaFFoQKY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi88Q9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBiw/9FyaYt9sWvlAN7eRF2iYUZg7WL2mQ4sV47GkgTQFRw0SgHByY\r\nkbWn1nTBHapQ/peZPxXjhfpeKN3Vfp1fa2b4TKc1ZYCkL3mhDvM3KMCsiFZB\r\nao4Ncgu5v4O8iSgfBp+/u5cr3FQ64cDK66E50PGTSHDd5ewdRvKYPOwOqUog\r\npUTfsi72SXz+H3WqN4/X2PM3Sxv3MAFyuqzO8N0TUIQqGw8bNrbh7lKnhlwr\r\nqPf9VHCTcTqej4TFMepoIOHan9HsHIAhIbibuuLpH+NLzEkgJNfiQ7Qy8jv+\r\nN7FyBkpvlxtxN4NIq8StL9Qa96jN7IVhZKOf8ENnajU3ZCcwnc6rmDZpaVxB\r\n3RxGEFMYeQUMG6S5q9JLdtZyhvKWFKKfjKC/28xlryMC8xq5SP+/P7Y0vZGi\r\nITbsWNp/dMdCh0gjqR19vDWwd9WLuZYDNL4nDy+kexOAQfTZByz+4UThbHTZ\r\nL45qLqLwMQKYzR5YTXGKMH8VJx5bFlLhzhcfIcc/MD5JPn+4qHF7JoUWzNuq\r\nc91MWtb6T1EdSZw35mUZRM9DoqjvcNdnaAaz/6czfnJAvoeDXQwu5oHcYaSE\r\nofCP5GpFD1oVAgMdc3ZAmmVZ59bfC7ea45Q6O7qZWvSOLTF/pxjlNquXiUpn\r\nyuKnr/caJDVCGOgSoXNlPg9WdOykgPjkbvY=\r\n=j9Ub\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akutruff","email":"andy.kutruff@gmail.com"},"directories":{},"maintainers":[{"name":"akutruff","email":"andy.kutruff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dimmer_0.2.1_1660142653608_0.1605132137293217"},"_hasShrinkwrap":false},"0.2.2":{"name":"@akutruff/dimmer","version":"0.2.2","description":"Mutable state management for object graphs and React","homepage":"https://github.com/akutruff/dimmer","repository":{"type":"git","url":"git+https://github.com/akutruff/dimmer.git"},"main":"dist/index","types":"dist/index","dependencies":{},"devDependencies":{"@jest/types":"~28.1.3","@types/jest":"~28.1.6","@types/node":"^18.6.5","jest":"~28.1.3","rimraf":"~3.0.2","ts-jest":"~28.0.7","ts-node":"^10.9.1","typescript":"~4.7.4"},"scripts":{"build":"pnpm run clean && pnpm run compile","build:inc":"pnpm run compile","clean":"rimraf -rf ./dist","compile":"tsc -p tsconfig.build.json","test":"jest","test:ci":"CI=true jest"},"_resolved":"","_integrity":"","_from":"file:akutruff-dimmer-0.2.2.tgz","bugs":{"url":"https://github.com/akutruff/dimmer/issues"},"_id":"@akutruff/dimmer@0.2.2","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-jB+MpUPo1wzFi+HktaYkpPQSecMmrp7kYvtxZN0wqAhDYUnWFSiKk/BzraEHCBYaHyZuY6ze+kX3hv0hgNgoTg==","shasum":"0b7039e3df854bfece1208e41fff2104c82bd451","tarball":"https://registry.npmjs.org/@akutruff/dimmer/-/dimmer-0.2.2.tgz","fileCount":62,"unpackedSize":147786,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDt5UnUwB6fF2ZNJI2oXp8jbOUCBa1VOUalrXYwx4/67wIhAI6O8W8KZO7dJiUlw25ptq0D71Ax3C0BZMkZNU0jNRSk"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi88WnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLHhAAjGD/+Dne+sr+hk3cwTTM7h5QMXKa1w7e2KCRbN9vAc54FpMj\r\nozgPULYkLOkWd7FEu1Hmzj1SnbYjDFgqyyrYiDLz3OKWr31rTflDYvO2gGAg\r\nwss1ThFZzVmBGx7AszvxxwtnqA0ju/AED/6YwBzIf05ogRifoSMddSjpGGUP\r\n6xp9dvlFFtTT3kragDmd3Lzqnsqb2tFwPP4gqoD5vbNX+mN6bgtTExAgNi9h\r\nHK7xZscHyYbnaUgTfWfvqMeqEcY+AzOtSIyaDOVvNGKfrqUmrNxtjSWpR/S7\r\nxWk2WfYt7tWsXC2VDXrGEmeUA1JRUTC7/HBBrKSb3P/yEB1t3TthRgK48hFa\r\nx/4rXPDvkkw6Avu121UPba5Z5rZ5YGe9JxpALnfYXnhbsXLp/aziRiqF3q4j\r\nIAbh2s+G6y3pC7oH5OwPCswG1QYX7ukqHPlC/tukbHX32h2qJMGCe/+iWQUl\r\nYQRhEI/tOYGyDjJt+CrqkVkmKeQN/0zpsLAKtjCi2rZZWZhodjFRNDXajyFk\r\nRO78uXlA8zKTI4pmCdLbJG1EasOElZkXUE4SWBMZZHTkLEQ5a99W7iIyLnuu\r\nqPk6imuaLuT2OMG9NEMX7lLZy/BW1a/ixgmzmuVrGBi5L468oVsdUA8FmBW7\r\nm92ce4Hs1XjUxn7uW99vV/7buXFBgvex5So=\r\n=v4Hs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akutruff","email":"andy.kutruff@gmail.com"},"directories":{},"maintainers":[{"name":"akutruff","email":"andy.kutruff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dimmer_0.2.2_1660143015645_0.2829902443997656"},"_hasShrinkwrap":false},"0.3.1":{"name":"@akutruff/dimmer","version":"0.3.1","description":"Mutable state management for object graphs and React","homepage":"https://github.com/akutruff/dimmer","repository":{"type":"git","url":"git+https://github.com/akutruff/dimmer.git"},"license":"MIT","main":"dist/index","types":"dist/index","dependencies":{},"devDependencies":{"@jest/types":"~28.1.3","@types/jest":"~28.1.6","@types/node":"^18.6.5","jest":"~28.1.3","rimraf":"~3.0.2","ts-jest":"~28.0.7","ts-node":"^10.9.1","typescript":"~4.7.4"},"scripts":{"build":"pnpm run clean && pnpm run compile","build:inc":"pnpm run compile","clean":"rimraf -rf ./dist","compile":"tsc -p tsconfig.build.json","test":"jest","test:ci":"CI=true jest"},"_resolved":"","_integrity":"","_from":"file:akutruff-dimmer-0.3.1.tgz","bugs":{"url":"https://github.com/akutruff/dimmer/issues"},"_id":"@akutruff/dimmer@0.3.1","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-AxBvevL8L03IWpT9YUyRwvVMsyMzkqIKNTETHnZmdkIZiM9gp68JXGqX4vbUzzcjwCrhqz8bj3JQHjkSQgIctw==","shasum":"6c97b7b3bd1df84e7b5326218681533e7edb48d9","tarball":"https://registry.npmjs.org/@akutruff/dimmer/-/dimmer-0.3.1.tgz","fileCount":63,"unpackedSize":162766,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDI1QtBRbmknM+cPohW/QjyPk6rdz83ZisOvI5GPz0nhAIhAKFvUunefvZr96ULp+qYDmQxX7mnfBg4itCAQoH0e++C"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9CMpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqhiw/9FlInctPpi7aLYy4PtWYZkGegtjdNs5ElDXnuGfT+rtEsk1Rw\r\nTYeayHMzY3IH7y0YxGPlVRg4x1sfiFwZeLpodTx4gRRZLktffPrryVRylsdI\r\nGEO9cM9TFSL3+JgNOLb5lSdkKq7JSTSq2xWLuFvENz0MaBwJU7doIXseqnQa\r\nrYuj85jEpUd1h6gdTc8c+hsKTElRXnLv7hc6BR4zdsyMO2jN+dqtyvd01xev\r\nMdxcSU0p4C1mlcB7S1iNREY24RY7FiLoTNfn1Qe8WtOTA+WBc1n0uqhuzmmu\r\nj3tXD1skgHGpkN+wDrOGx63DnKKbPqRSfqdDpDMPmqunE2Z8zLXqTN+c5USp\r\nwWOyryc7BUVAiFe2JUYKsreoUUGjMa3MAwc1R3sPMKVPHDrOB20Uy4rCV2ZY\r\ndYC0IUL4Ky9Qc+UwM0OiIV4j3Bl86NlYqIgTQ+KXTXuaVbzoOfVOmPMhWhlr\r\nzspfMy6jKOW2G8y2m2u6bDb7OyMZB2x8Ngq46SGTd2n6OiJ88kNNMnYhqeot\r\nrTLNTpbOPCfuRYc1zLsWxQupRa6CTcKqFWjqGz3tgASQwwCYbgxeI1/XMCLu\r\nX7QILIO/EPIkLIQ/paZnOzX9HUFwd8Ynq4ZdZ/B2kExlYoT1RuVMn9ps2AXN\r\nNJMoiB1AUi6WdxSS1tQcUlfCJuQ+s0c6KPg=\r\n=Pozj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akutruff","email":"andy.kutruff@gmail.com"},"directories":{},"maintainers":[{"name":"akutruff","email":"andy.kutruff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dimmer_0.3.1_1660166953721_0.4847916179850098"},"_hasShrinkwrap":false},"0.3.3":{"name":"@akutruff/dimmer","version":"0.3.3","description":"Mutable state management for object graphs and React","homepage":"https://github.com/akutruff/dimmer","repository":{"type":"git","url":"git+https://github.com/akutruff/dimmer.git"},"license":"MIT","main":"dist/index","types":"dist/index","dependencies":{},"devDependencies":{"@jest/types":"~28.1.3","@types/jest":"~28.1.6","@types/node":"^18.6.5","jest":"~28.1.3","rimraf":"~3.0.2","ts-jest":"~28.0.7","ts-node":"^10.9.1","typescript":"~4.7.4"},"scripts":{"build":"pnpm run clean && pnpm run compile","build:inc":"pnpm run compile","clean":"rimraf -rf ./dist","compile":"tsc -p tsconfig.build.json","test":"jest","test:ci":"CI=true jest"},"_resolved":"","_integrity":"","_from":"file:akutruff-dimmer-0.3.3.tgz","bugs":{"url":"https://github.com/akutruff/dimmer/issues"},"_id":"@akutruff/dimmer@0.3.3","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-VOVdStwIvsy3HoOKld1+FVIMnY5WNSy1cE4UvqXcKDIojs1MI1NKQ0aZy0gLjDZnt828LhL8XjBUIt8Z5o9vUQ==","shasum":"e7cad2da220abf4d1e7d5b18c4c20283394f50d6","tarball":"https://registry.npmjs.org/@akutruff/dimmer/-/dimmer-0.3.3.tgz","fileCount":63,"unpackedSize":162822,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNef1LfatlQmcgcdWwwna8JF5ptvwKO1N9XetJHhQiAQIhAMlV6JCupdAHjfglhLwl9iibSfjEMxNFC1X9WYCKM4rR"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9CcFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNUw/+I0v1qXnTn/kIjuhJmSzvixYW0Ll2IzHNYyIw633Kq6x0pv3o\r\n5/tF+YGQy5sWpohyswdLXWrrQjiG+Dfy96BNZFnZBQwQ0XDYGpl3BUAyXMD6\r\nnBoqVFLzeFM2gZapWaAQmBivJ8pXDnd1+QE/72nizu7aFq4Rd68aObtWZtUB\r\nQ4nb+oFNO1TiB9NU5PoQX8x6nYwvYRwInHL4uJ+T8QmRFisuriv72LROb7nJ\r\n5DyvfLf2YpckrvjMjt2HRFV1BuibvUYtN5A4vXIXYP7ckeu2UHnUouXWSupH\r\nJX7RDMVK2cwj2Oc94JSkbxq2leM8jKGSuvOaQmQuMKQQXAHxVdRZD0c1xUHq\r\nObUaduOQPS95VU6MZtsT2bFvvmzUwr6BmipBsAdURa/yBBB27fA1rLWo2L7m\r\n6HV2/RsQrWOLWJtWCpJl6Q4v21nBC1xqNteaQ8TqBa9S+TNaZO0njrrP0FU4\r\nG2E5oARaFMb7tXp1ZT0s3u5jwecWFbZ6q19Qv/+NKqg3wLYt7ixqTNMLAoSk\r\nFmaAJ0QuGF44qj/POE91WoGa6oS5uRO8rY+G9ZR9TWYECP/nAj7A96njq/ch\r\nxyTH6O10dSwrD0zUr/12OU7ScZjHxNeS6A+CJ5CKxxOeXERLe+VpWNgYUrzu\r\n0pzjsoSGIktF4glaDSfpI54zTshdqUXFg8Q=\r\n=ZrIX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akutruff","email":"andy.kutruff@gmail.com"},"directories":{},"maintainers":[{"name":"akutruff","email":"andy.kutruff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dimmer_0.3.3_1660167941025_0.6334794611208763"},"_hasShrinkwrap":false},"0.4.0":{"name":"@akutruff/dimmer","version":"0.4.0","description":"Mutable state management for object graphs and React","homepage":"https://github.com/akutruff/dimmer","repository":{"type":"git","url":"git+https://github.com/akutruff/dimmer.git"},"license":"MIT","keywords":["react","state","manager","management","store","mutable"],"main":"dist/index","types":"dist/index","dependencies":{},"devDependencies":{"@jest/types":"~28.1.3","@types/jest":"~28.1.6","@types/node":"^18.6.5","jest":"~28.1.3","rimraf":"~3.0.2","ts-jest":"~28.0.7","ts-node":"^10.9.1","typescript":"~4.7.4"},"scripts":{"build":"pnpm run clean && pnpm run compile","build:inc":"pnpm run compile","clean":"rimraf -rf ./dist","compile":"tsc -p tsconfig.build.json","test":"jest","test:ci":"CI=true jest"},"_resolved":"","_integrity":"","_from":"file:akutruff-dimmer-0.4.0.tgz","bugs":{"url":"https://github.com/akutruff/dimmer/issues"},"_id":"@akutruff/dimmer@0.4.0","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-MJs7v06dvxF4S2idBMWJruyQkTpthqrnN80lUGlzT/bwTWtid8q3WjvOPzBp2q3bZTWhJujqDIrXnSlS5Oj/8A==","shasum":"d38307856ee9815a65f7f18b91b1eb6e4a34a9d2","tarball":"https://registry.npmjs.org/@akutruff/dimmer/-/dimmer-0.4.0.tgz","fileCount":63,"unpackedSize":165369,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpzLKqIHt63HoudJeWxQEz60maPKbeulk3OAvopTU9owIhANZ4Rswt7/xP1l//ce4lFE1s0LbebxttB17fG56A+b1k"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9SpqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrN4Q//dFKLXxArChBuZe02cg5q3o/JoYctgWMz9TynP2Ieoev7H21y\r\n3LsaeTleCbg/90tZVdxA/gIJH3uPAAXPJ1MgfGqhcfUEk5gUOOweni1Lxpn+\r\nkpyrrzXpnLbW/57tt0HxDOI6/DaCuOufMFQXYl0Rk1P/fJeoZ3qsROm9uZSR\r\nbg2bHxKlFMZb2S0SAM3sQcIPH6THMbwtdMLr30+SJpWlNa/etP1Nt2Macrsh\r\n6reGXZUuI4Tf7/1EKv/4kybQVtdrS9oSlW/m3GNfFgWKX2Uo8+hA5gM+jLuU\r\n3hVNOofN3xjQEnaaZLwtKhTjIj1nhe6m+a7i5P8n36KYGiU27aTm76oUOqDY\r\nbGoLtVLucCJ6m/R45Gos/oh/STw4917ztCYN/D32EjlSyXGL5XxRQpmaWmPo\r\nItbTy0j6KxEFj5OWAhV2o8fxmaRwzBCuPj88ADqla9kFaIoNLOYr89D0RgZs\r\nqgXwiKkEvT4T5yx5nLaWrdl5S7nBpmvWp0WQL41ftp+svpMGq5jxlFAzonNS\r\nw2nRwfYPn01x0wWmJSPrQtj3RtTiSUxX2YDEYHaULTekhqcj72Fcw7106EJx\r\n8TBe+ooK9htrTEoKstvPJOYOXQGC9xOrmOQnlpT3uMfvN2eesJgw16G7yI59\r\n0ygxyR177XSUq4J4++hz+abhlTi8QYsxaM8=\r\n=USjz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akutruff","email":"andy.kutruff@gmail.com"},"directories":{},"maintainers":[{"name":"akutruff","email":"andy.kutruff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dimmer_0.4.0_1660234346557_0.36569857746602663"},"_hasShrinkwrap":false},"0.4.1":{"name":"@akutruff/dimmer","version":"0.4.1","description":"Mutable state management for object graphs and React","homepage":"https://github.com/akutruff/dimmer","repository":{"type":"git","url":"git+https://github.com/akutruff/dimmer.git"},"license":"MIT","keywords":["react","state","manager","management","store","mutable"],"main":"dist/index","types":"dist/index","dependencies":{},"devDependencies":{"@jest/types":"~28.1.3","@types/jest":"~28.1.6","@types/node":"^18.6.5","jest":"~28.1.3","rimraf":"~3.0.2","ts-jest":"~28.0.7","ts-node":"^10.9.1","typescript":"~4.7.4"},"scripts":{"build":"pnpm run clean && pnpm run compile","build:inc":"pnpm run compile","clean":"rimraf -rf ./dist","compile":"tsc -p tsconfig.build.json","test":"jest","test:ci":"CI=true jest"},"_resolved":"","_integrity":"","_from":"file:akutruff-dimmer-0.4.1.tgz","bugs":{"url":"https://github.com/akutruff/dimmer/issues"},"_id":"@akutruff/dimmer@0.4.1","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-Izu2Lo3N7P8wrpYj8IwmTWSoS6rKLxp4I1bU3ez4FJN1TEyZ+0ZLDPcHgSngA/kc+pslWCeZyKFnKW4aBqQHZQ==","shasum":"f3ca453ae9ad073d267b49bec6349dd47e2d7868","tarball":"https://registry.npmjs.org/@akutruff/dimmer/-/dimmer-0.4.1.tgz","fileCount":63,"unpackedSize":165369,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2Gt7/3MNL1ZJf2T2L5XDbCfwn5Sl3gLBQdIwfNpObsgIgYfhXIjCzruPbKrnR4XYN4XpWUTDAER7v8s7t6bM3fLY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9T0EACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2ZQ/9EQo0XvddGlVqVtdJOfreiXD7Lal/DtPU2pYFRk0c9RoKD4FK\r\n+abeeoiQbOIMoPqzAW8/aaQ51pQ2ZKJHlV6L05pXjQOQhE4D740YEPL8Ogge\r\nbOF7FcNIp9HOVvq0WC/ykg7A9MhNuXHi0g4fg+MYU6knckr5MTc2ja+Tfdl3\r\n9GImch7m2ZuYaoZ2GzPCcJ2LEHHuFAqxyU90aaZMgw5iuvTFA2mTkWjNwnex\r\nI8HMkfqgwNUIESGJG4XJ7xmIb+/nAX/NJ8iMYFW/13xKpbMFrU6FbffVGhg6\r\nw3qHif0Mqh7hUA6xOJkWJqhRnHBnIcb25vVun1H2SIkgrRzGsGsrtcdHnkeG\r\neBwiBnREr7Is3i7am7CLNl7A1sTafSVdX3eFuAbmBFG9FV5aVtP0DjNoXtLZ\r\nxQRVyZaGPRT2clYcDMixt2dX4lFupW3GuGEOrv5x5rWg/xum1/fCbwyJX8gk\r\nLW6/DYcLwrJcAxyrbowgevDxz/WPBE7pxARQ5nGzRwatp/bX2EzX8SKhMPzK\r\no9fpJ/BD5TMoAD2HB9S1h9026nO2BAe7Dgse5SK/dp9kZwrTZGFmLNLLovRY\r\nH2AcGnNscxw8LBmADN7PFTQJMQSLqkyQZvxTkSb6/00BagtDZTN3fQ732I8H\r\nSjKr5xVxdvjfL2qftrFWPqn1oRfgnaNHPSM=\r\n=xyUv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akutruff","email":"andy.kutruff@gmail.com"},"directories":{},"maintainers":[{"name":"akutruff","email":"andy.kutruff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dimmer_0.4.1_1660239108651_0.6767409859747331"},"_hasShrinkwrap":false},"0.4.2":{"name":"@akutruff/dimmer","version":"0.4.2","description":"Mutable state management for object graphs and React","homepage":"https://github.com/akutruff/dimmer","repository":{"type":"git","url":"git+https://github.com/akutruff/dimmer.git"},"license":"MIT","keywords":["react","state","manager","management","store","mutable"],"main":"dist/index","types":"dist/index","dependencies":{},"devDependencies":{"@jest/types":"~28.1.3","@types/jest":"~28.1.6","@types/node":"^18.6.5","jest":"~28.1.3","rimraf":"~3.0.2","ts-jest":"~28.0.7","ts-node":"^10.9.1","typescript":"~4.7.4"},"scripts":{"build":"pnpm run clean && pnpm run compile","build:inc":"pnpm run compile","clean":"rimraf -rf ./dist","compile":"tsc -p tsconfig.build.json","test":"jest","test:ci":"CI=true jest"},"_resolved":"","_integrity":"","_from":"file:akutruff-dimmer-0.4.2.tgz","bugs":{"url":"https://github.com/akutruff/dimmer/issues"},"_id":"@akutruff/dimmer@0.4.2","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-nJMFeOV7oyidRYPzOIRxvd6Xk5IgNL/9hudbYiYmDqoFxdqrhtV1/G1re75ezX5QuxEL3X1qxk2pRE4/j7elLg==","shasum":"9433144ee4567a6cbfc71d7f3dd124225340581e","tarball":"https://registry.npmjs.org/@akutruff/dimmer/-/dimmer-0.4.2.tgz","fileCount":63,"unpackedSize":165360,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDWnB8h8QtpAT8xidZ7YyZ0AjL0dq+kiglmneStqKL0kAiEA5MPK2m2lbyw110bqv0QCE2pguOIrebsv43DSaQlSP0k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9UZQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmri4A/7BUy/IVhdODTjyzfriOfjj5r+HhrYOLOv1bCeqhDrb1DcsINY\r\ne/qPn5j1lMhmkG8Ggm0Upx2c6o4Knfx0nvwhqFN+nUGR8StdkFPLtrQ6FPFW\r\nE23xWPoNyYdjYRGwSs5eekHYk1I6g1qI8Jf26Gdb1cxJmxjBAtqovFefJGVu\r\nZ20VFcfnHv+1Oj30VWxNNjrMDth8pkVvd8I8Nkzzjnctk1XL1wZ99g2s8IN9\r\n4Y1O5mJFB4Hp3qMkQCMVjvT67k7WnXGFBF1OwTedf7erVpI5YZWrHIuf34+o\r\nUUBe3d9hWz551X+MyL4ZXtpusYOaJIAhD+EvYRfdd2EivwAtKrrfhj2Ub40f\r\nCAMpHAAeqt/2mahwQ9nBc/dCqGHlcatrxhi2Gwh0+apff6Yq5CjQ/wH7ZZjO\r\nba+W5bNrFxJGLES7d2jIBR3wjQ3R2guZhlCvmjo/DqFeyBLFMisDg0DRLf/j\r\nYFZsi7L9Blpxmj5oq0y2LTx3mZfoIGt9Gw9CLXf1s8oUOzFxSrBFw5DzY3p0\r\nIhx9Ld4nQ3zO9R1buen/fP4O6wGkZ2dsM63/cJ+BuBb0hHXwnWPBgV6RKoHi\r\nw2OQsQSkzPQpICxIJIituYIywL2HdsZ9oXnEV1Dje4FbR6Jt5O4x5ZoNNZOp\r\nUAt8LuEziC/PEK1SrEY6J+j6KTy0oMh+6rY=\r\n=L3Ym\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akutruff","email":"andy.kutruff@gmail.com"},"directories":{},"maintainers":[{"name":"akutruff","email":"andy.kutruff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dimmer_0.4.2_1660241488134_0.7505507720789593"},"_hasShrinkwrap":false},"0.4.3":{"name":"@akutruff/dimmer","version":"0.4.3","description":"Mutable state management for object graphs and React","homepage":"https://github.com/akutruff/dimmer","repository":{"type":"git","url":"git+https://github.com/akutruff/dimmer.git"},"license":"MIT","keywords":["react","state","manager","management","store","mutable"],"main":"dist/index","types":"dist/index","dependencies":{},"devDependencies":{"@jest/types":"~28.1.3","@types/jest":"~28.1.6","@types/node":"^18.6.5","jest":"~28.1.3","rimraf":"~3.0.2","ts-jest":"~28.0.7","ts-node":"^10.9.1","typescript":"~4.7.4"},"scripts":{"build":"pnpm run clean && pnpm run compile","build:inc":"pnpm run compile","clean":"rimraf -rf ./dist","compile":"tsc -p tsconfig.build.json","test":"jest","test:ci":"CI=true jest"},"_resolved":"","_integrity":"","_from":"file:akutruff-dimmer-0.4.3.tgz","bugs":{"url":"https://github.com/akutruff/dimmer/issues"},"_id":"@akutruff/dimmer@0.4.3","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-wT3W1dnnAB0dJKopYYUBSMqM86XocLfYfn/ExI/q2dofeh73G+WdlxcPuzW2QFGP/jQvILNas5o0YsKrlr9QYA==","shasum":"c6f9ae68e6a4795ebb0f5605ce790f4271a7777b","tarball":"https://registry.npmjs.org/@akutruff/dimmer/-/dimmer-0.4.3.tgz","fileCount":63,"unpackedSize":166049,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFi5DDm4e33rU8lp2t/8d+2ty/WlY5u+vdKxHjRYe/1CAiAb5fAcFG7WmOt77jClPZoHkIwgD6gzAddm2Sm9kldjcA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9U9yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqqJg//Z0QFKEa8UdUjKLgtXXA2KefGmCsrp5DPQioOWhHktvFbSj+r\r\nauN4ebftNj/SprikbtC2f19BF+fdUlV8S0LQDGTdExiZm7EQwEMrw/E1rm1g\r\nOWu5a+Xispgxux6xi7CnODeTD1h+kAQkf/5FnBgbMMMu0hJXX+EkMSa9Bqmt\r\n8t2uz1aynqhUqNqgMaqwgc8e3WGLvfrtW8kRbxTqAuuL8UCt2IjHvowVVZ8Z\r\nF1wgIoUDAX+WhBco+i/x1YjwY9SvKAQNkcEP7n5tfVqXQwY5nGtrbxi0+ZjV\r\nWTIs8YUJPfLGiDu675FpQzC9pKWAyqGKDXhDbxxmB8QY5H/hK140V9pMhxFV\r\n4GV7SUiI586YoPrAcBeqo8ejuI5u8ObXWZj9rJ6FkZPpr1y88B9G3AQcFrlH\r\n8pggDqIoC9WQNfFbxvWDCRJ2CXDBJ5dAiwsRGHJAdsni73g9AuUHHAAHHgTJ\r\nt9q7Z8fqCgZZZ+yLXm6FP54sjPHc2NwBWslX2ByeX2lbaYVR0YZ4briYN9LZ\r\nDdqpcas48lX5kuvto4kPWilDq+q1LG5xsqo/NcWnYd/PYgRKkrc3Yr5aUFKv\r\nTwmpxuGdBMmrcx2yI6MUQpeHYsM5tTtYBvcvfNfyxs8YxGBcqvLI4O+NnuOI\r\n2ueex2eeShbe5nTz0bHjnGYWAiNZVKRUHQs=\r\n=nocs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akutruff","email":"andy.kutruff@gmail.com"},"directories":{},"maintainers":[{"name":"akutruff","email":"andy.kutruff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dimmer_0.4.3_1660243825861_0.5018043123709697"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-09T21:27:42.406Z","0.1.0":"2022-08-09T21:27:42.678Z","modified":"2022-08-11T18:50:26.146Z","0.2.1":"2022-08-10T14:44:13.759Z","0.2.2":"2022-08-10T14:50:15.855Z","0.3.1":"2022-08-10T21:29:13.871Z","0.3.3":"2022-08-10T21:45:41.177Z","0.4.0":"2022-08-11T16:12:26.749Z","0.4.1":"2022-08-11T17:31:48.876Z","0.4.2":"2022-08-11T18:11:28.389Z","0.4.3":"2022-08-11T18:50:26.062Z"},"maintainers":[{"name":"akutruff","email":"andy.kutruff@gmail.com"}],"description":"Mutable state management for object graphs and React","homepage":"https://github.com/akutruff/dimmer","repository":{"type":"git","url":"git+https://github.com/akutruff/dimmer.git"},"bugs":{"url":"https://github.com/akutruff/dimmer/issues"},"readme":"[![Build Status](https://img.shields.io/github/workflow/status/akutruff/dimmer/tests?style=flat&colorA=000000&colorB=000000)](https://github.com/akutruff/dimmer/actions?query=workflow%3Atest)\n[![Build Size](https://img.shields.io/bundlephobia/minzip/@akutruff/dimmer?label=bundle%20size&style=flat&colorA=000000&colorB=000000)](https://bundlephobia.com/result?p=@akutruff/dimmer)\n[![Version](https://img.shields.io/npm/v/@akutruff/dimmer?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/@akutruff/dimmer)\n[![Downloads](https://img.shields.io/npm/dt/@akutruff/dimmer.svg?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/@akutruff/dimmer)\n\n# *Dimmer*\n\nState-management designed to minimize renders while staying out of your way and letting you write natural mutable code without sacrificing object references. \n\n```bash\nnpm install @akutruff/dimmer @akutruff/dimmer-react # core and react bindings\n```\n\n\nFull React demo [here](https://codesandbox.io/s/github/akutruff/dimmer/tree/master/apps/cra).\n\n#### Features\n\n- [x] Object change recording\n- [x] Mutable coding style \n- [x] Cyclic references\n- [x] Multiple references to same object in state graph\n- [x] Map, Set, and Array support\n- [x] Async mutation with rendering control and state change control\n- [x] Object property change subscriptions\n- [x] Time travel and undo / redo built-in\n- [x] React 18 support with useSyncExternalStore\n- [x] React render batching\n- [ ] React Concurrent Mode (may work but needs testing)\n\n\nDimmer is designed to minimize component re-rendering as much as possible.  In general, almost all your components should be wrapped in `React.Memo` and use dimmers hooks to determine when to trigger re-renders.\n\n## Create a store\n\n```typescript\nimport { createRecordingProxy } from '@akutruff/dimmer';\nimport { useRootState } from '@akutruff/dimmer-react';\n\nexport interface Person {\n    id: number,\n    name: string,\n    age: number,\n\n}\n\nexport interface RootState {\n    selectedPerson: Person,\n    people: Person[],\n    counter: number,\n}\n\nexport function useAppState() {\n    return useRootState() as RootState;\n}\n\nexport function createRootState() {\n    const people = [\n        { id: 0, name: 'Bob', age: 42 },\n        { id: 1, name: 'Alice', age: 40 }\n    ];\n\n    return createRecordingProxy({\n        selectedPerson: people[0],\n        people,\n        counter: 0\n    });\n}\n\n```\n\n`createRecordingProxy` returns a proxy wrapped object that now starts tracking **changes as patches** to your object.  \n\n## Simple Counter App\n```tsx\nconst Incrementor: FC = React.memo(() => {\n  const state = useAppState();\n  \n  const counter = useSnapshot(state, state => state.counter);\n  const increment = useMutator(state, state => state.counter++);\n\n  return (\n    <div>\n      <div>value: {counter}</div>\n      <button type=\"button\" onClick={increment}>Click me</button>\n    </div>\n  );\n});\n\nconst App: FC = () => {  \n  const [state] = useState(() => createRootState());\n\n  const patchTrackerContextValue = usePatchTrackerContextValue({ state, dispatch: () => { } });\n\n  return (\n    <PatchTrackerContext.Provider value={patchTrackerContextValue}>\n      <Incrementor />\n    </PatchTrackerContext.Provider>\n  );\n};\n```\nShows the typical pattern for subscribing to and mutating data while isolating the rendering behavior to just the affected data.  Uses `React.memo` to ensure complete isolation.\n\n## The Recording Proxy\n```typescript\nimport createRecordingProxy from '@akutruff/dimmer'\n\n//Make a proxy for state\nconst state = createRecordingProxy({\n        bob: {\n            name: \"Bob\",\n            age: 42\n        },\n        alice: {\n            name: \"Alice\",\n            age: 40\n        }\n    });\n\n// The object returned is another recording proxy.\nconst bob = state.bob;\n```\n\n`createRecordingProxy()` wraps an object in a proxy that does two things: keep track of property assignments and wrap child objects in proxies when they are accessed.  This proxy is at the core of how dimmer works.\n\nUnlike many other state libraries, you can have multiple references to the same object in your state tree and it all just works automatically.  There's no more need for keeping a table of ids when you normally don't need it. \n\nAs a rule, **you should always be using proxies** when dealing with your objects.  It's best to create a root state object and store all state there as is typical in state stores.  That way, as you access objects in the hierarchy they are automatically setup as proxies for change recording.  Note that you do not need a single state store.  Change tracking will totally work fine with independent trees of objects.\n\nNote that some functions like `recordPatches()` will automatically ensure that a recording proxy exists or is created before calling your code. \n\nsee [caveats](#caveats)\n\n## `useRootState()`\n\nAccesses the topmost state that you gave to the `PatchTrackerContext.Provider` via `usePatchTrackerContextValue`. \n\nIt returns an untyped value, so it is a good idea to have a simple wrapper function around the hook that casts to your root type.\n\n## `useSnaphot()` and Selectors\n\n```typescript\nconst [name, age] = useSnapshot(person, person => [person.name, person.age]);\n```\n\nThis is the main way to accomplish reactivity against your state.  The first parameter is the state you wish to observe, and the second parameter is a selector function.\n\nIn the above example, by accessing `person.name` and `person.age` in the selector, the component will rerender ONLY when the `name` or `age` properties change on the person object.  \n\nThe selector function is special.  When your component is mounted, this function is first used to record the properties you will be accessing from the subscribed state.  This is done by passing an empty proxy object as the parameter to selector you provide.  This means that you should not put any code that does any type of complex logic in the selector.  After the initial selector is run with a proxy, the selector is used with your real state to extract the values from the state.\n\nAlso, there is an optional third parameter that allows you to pass a dependency list that will trigger a re-render and resubscribe to the object tree.  This is helpful for when you have a value from your component params that you wish to use to access your data, such as an id in a `Map` or array index. \n\n#### Deep values\n\n```typescript\nconst [name] = useSnapshot(state, state => [state.person.friend.name]);\n```\nIf any property value in the chain changes the component will re-render. This includes if `state.person` is reassigned.\n\n### `all()`\n```typescript\nconst [person] = useSnapshot(state, state => [all(state.person)]);\n```\nSubscribes to all property changes on the person object only.  Will re-render if any property on the person object changes.  \n\n```typescript\nconst [value] = useSnapshot(state, state => [all(state.person).friend.name]);\n```\nNote that you can also make complicated chains.  Here, any property change on `state.person` will trigger a re-render as well as the subproperty `friend.name`.\n\n### `elements()`\n```typescript\nconst CollectionComponent : FC = () => {\n    const state = useAppState();\n    const [people] = useSnapshot(state, state => [elements(state.people)]);\n}\n```\nSubscribes to the collection as a whole and will re-render if an item is added or removed from the collection.  This should work for arrays, maps, and sets. **Maps and sets may currently have an issue that's being investigated.**\n\nNote: if a property inside the `people` array changes, it will **NOT** trigger a re-render of the component.  This is by design.\n\n#### Subscribe to an array index\n```typescript\nconst [name] = useSnapshot(state, state => [state.people[0].name]);\n```\nIn the above example, the array index is respected.\n\n```typescript\nconst NameComponent : FC<{index: number}> = ({index}) => {\n    const state = useAppState();\n    const [name] = useSnapshot(state, state => [state.people[index].name], [index]);\n}\n```\n\nThe selector depends on an external parameter that is not on the state object.  To make sure it resubscribes, pass in the parameters as a dependency like in typical react hooks\n\n### `map_get()`\n\n```typescript\nconst CollectionComponent : FC = () => {\n    const state = useAppState();\n    const [people] = useSnapshot(state, state => [map_get(state.myMap, \"someKey\")]);\n}\n```\nTo subscribe to changes in `Map<>` objects, you need to use the special `map_get` function to observe a particular key.\n\n## `useProjectedSnapshot()`\n\n```typescript\nconst PersonDetails : FC<{person: Person}> = React.memo(({person}) => {\n    const state = useAppState();\n    const isSelected = useProjectedSnapshot(state, state => state.selectedPerson, state => areSame(state.selectedPerson, person), [person]);\n    return (\n      {isSelected ? 'selected' : 'nope'}  \n    );\n});\n```\nSame usage as `useSnapshot` but allows you to add an additional projection function.  This function can arbitrary or complex values from your state, which is only executed when the object properties in your selector function change.  The result of the projection is memoized, so even if the properties in your selector function change, if the result of your projection equals the previous result, your component won't re-render!\n\nIn the example code, you could have 100 `PersonDetails` components on-screen, but only the previously selected component, and the newly selected component will re-render.  This is a great way to optimize the display of collections.\n\n## `useMutator()`\n\n```tsx\nconst state = useAppState();\n\nconst counter = useSnapshot(state, state => state.counter);\nconst increment = useMutator(state, state => state.counter++);\n\nreturn (\n    <div>\n        <div>value: {counter}</div>\n        <button type=\"button\" onClick={increment}>Click me</button>\n    </div>\n);\n\n```\nAllows you to do mutations on your state and record any changes that happen.  No mutations should be done outside the passed in mutator function and if you need to use additional values from your component props, you should add the prop to the optional dependency list as the third argument to `useMutator`.\n\n## `useMutatorAsync()`\n```tsx\nconst state = useAppState();\n\nconst [isLoading, value] = useSnapshot(state, state => [state.isLoading, state.value]);\n\nconst loadWords = useMutatorAsync(state, async function* asyncFunction(state) {\n    state.isLoading = true;\n    const fetchedValue = await fetchSomething();\n    yield; // starts the change recording process after any awaits \n\n    state.isLoading = false;\n    state.value = fetchedValue;\n});\n\nuseEffect(() => loadWords(), []);\n\nreturn (\n    <div>\n        <div>isLoading: {isLoading}</div>\n        <div>value: {value}</div>        \n    </div>\n);\n\n```\nTo support asynchronous loading and to control change-recording and as well as re-rendering, you use an async generator function with a passed in state.  At the begining of your mutator, you may modify your state and the rendering will not occur until you either `await` something or your function exits.\n\nWhen you `await` inside your function, change recording stops at that moment.  When the await returns you may do additional `await` calls, but you must call `yield` prior to modifying your state.  Calling yield will begin change recording, and will again allow for re-rendering.\n\nThis may seem a bit cumbersome, but it allows you to completely control how a series of multiple async `awaits` can occur without affecting state until all is completed or successful \n\nAgain, there is an optional dependency list parameter as well in order to use props inside your mutator function.\n\n*Warning:* The following applies to any asynchronous code, not just Dimmer. Be careful when using async functions with mutation! You could have multiple async functions executing, or simply some synchronous function modify state while your async process under way!  It is much better to make an object that represents your async call with local state on it that is unique per async operation.  That way if it gets replaced or invalidated you can ignore everything but the latest operation.  \n\n\n### Nested Async Generators\n\n```tsx\nconst state = useAppState();\n\nconst [isLoading, value] = useSnapshot(state, state => [state.isLoading, state.value]);\n\nasync function* myFetcher(state: State) {\n    \n    const fetchedValue = await fetchSomething();\n    yield; // must yield because we awaited.\n\n    state.prop0 = fetchedValue;\n}\n\nconst loadWords = useMutatorAsync(state, async function* asyncFunction(state) {\n    state.isLoading = true;\n    \n    yield* myFetcher(state);    \n    yield; //caveat: You must yield in the caller after the nested function returns\n\n    state.isLoading = false;    \n});\n\nuseEffect(() => loadWords(), []);\n\n```\n# Change recording with patches\n\nDimmer tracks which properties change as your code executes. These changes are stored in patches just like a git commit.\n\n```typescript\nimport recordPatches from '@akutruff/dimmer'\n\nconst state = { counter: 0, otherCounter: 0 };\nconst patches = recordPatches(state => state.counter += 1, state);\n// patches equals: [{\"counter\" => 0}]\n```\n\nRuns the increment function and records any object mutation into a list of `Map<>` objects containing the **original value** of each property.  \n\nThese patches allows you to rewind and undo changes by calling `applyPatch()`.\n\n## Deep Object Hierarchies\n```typescript\n\nconst bob = { favoriteFood: 'tacos' };\nconst alice = { favoriteFood: 'cake',  homie: bob };\nconst fred = { favoriteFood: 'pizza', homie: bob };\n\nconst state = { bob, alice, fred };\n\nconst patches = recordPatches({alice, fred} => {\n    alice.homie = fred;\n    alice.homie.favoriteFood = 'nachos'; // Will now modify fred as you would expect.\n    }, state);\n\n// patches equals: [{\"homie\" => bob}, {\"favoriteFood\" => 'pizza'}]\ngetPatchTarget(patches[0]) // will equal alice\ngetPatchTarget(patches[1]) // will equal fred\n\n```\n\nRuns the increment function and records any object mutation into a list of `Patch` objects that store which properties have changed and the **original value** of each property.  These patches allows you to rewind and undo changes by calling `applyPatch()`.\n\n### Reverse a patch to go the opposite direction in history\n```typescript\nconst reversePatch = createReversePatch(patches[0]);\n// reverse patch: {\"counter\" => 1}\n```\n\n## Undo / Redo:\n```typescript\nconst state = { counter: 0 };\nconst [ backwardsPatch ] = recordPatches(state => state.counter += 1, state);\n//state equals {counter: 1}\n\nconst forwardPatch = createReversePatch(backwardsPatch);\n\n//undo\napplyPatch(backwardsPatch);\n//state equals {counter: 0}\n\n//redo\napplyPatch(forwardPatch);\n//state equals {counter: 1}\n\n```\n\n# Object proxy Utilities\n\n### `isProxy(obj: any): boolean`\n\nReturns whether `obj` is a reference to a recording proxy or not.\n\n### `tryGetProxy<T>(obj: T): T | undefined`\n\nReturns the current recording proxy for `obj` if one exists.  If `obj` is a reference to a proxy, then `obj` is returned.\n\n### `ensureProxy<T extends object>(obj: T) : T`\n\nIf no recording proxy for `obj` exists, then one is created and returned.  If `obj` is a reference to a proxy, then `obj` is returned.\n\n### `asOriginal<T>(obj: T): T`\n\nIf the `obj` parameter is a recording proxy, the underlying object being recorded is returned.  If `obj` is not a proxy, then `obj` is returned.\n\n### `areSame(one: any, two: any): boolean`\n\nReturns if one and two are the same object. If either object is a proxy, the underlying object is used for the comparison.  \n\nEquivalent to `asOriginal(myObject) === asOriginal(otherObject)`\n\n### `getPatchTarget<T>(patch: InferPatchType<T>): T | undefined`\n\nReturns the object from which the `patch` was calculated.\n\n### `doNotTrack<T>(obj: T): T`\n\nDisables proxy generation and change tracking for an object.  This is useful for when you store references to 3rd party instances in your state tree that  don't behave well when proxied.  \n\nUntracked objects in your state tree will not return proxies from their child properties.\n\nUntracked objects will behave differently with some utility functions which will treat the object as its own \"proxy.\"\n- `tryGetProxy` - will return the untracked object.\n- `ensureProxy` - will return the untracked object. No proxy will be generatoed will continue to work with objects that are untracked.  They will simply \n\n`isProxy` will return false for untracked objects.\n\n# Caveats\n\n### Object Reference Comparison\nBe weary of object reference comparisons as you may be trying to compare an original object with its proxy or vice versa. \n\n:x: `myObject === otherObject //either object could be a proxy!` \n\n:white_check_mark: `areSame(myObject, otherObject)` \n\n:white_check_mark: `asOriginal(myObject) === asOriginal(otherObject)` \n\n:white_check_mark: `ensureProxy(myObject) === ensureProxy(otherObject)` \n\n","readmeFilename":"README.md","license":"MIT","keywords":["react","state","manager","management","store","mutable"]}