{"_id":"aspen-tree-model","_rev":"7-b3eaebaaa127404bc5e1e50f6a7d1558","time":{"1.0.0":"2019-01-14T04:15:40.288Z","created":"2019-01-16T08:31:44.960Z","1.0.1":"2019-01-16T08:31:45.109Z","modified":"2022-04-11T15:23:14.374Z","1.0.2":"2019-01-17T05:32:19.410Z","1.0.3":"2019-08-05T23:59:31.680Z","1.0.4":"2020-10-23T07:00:39.957Z","1.0.5":"2020-10-23T07:04:48.790Z"},"name":"aspen-tree-model","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.1":{"name":"aspen-tree-model","version":"1.0.1","description":"State container for aspen trees","main":"dist/index.js","typings":"dist/typings/index.d.ts","scripts":{"test":"jest","build":"tsc","watch":"tsc -w","lint":"tslint --project .","prepack":"npm run lint && npm run build && npm run test && npm run generate-docs","postpublish":"npm run publish-docs","generate-docs":"typedoc --mode file --excludePrivate --excludeProtected --excludeNotExported --theme node_modules/typedoc-clarity-theme/bin --out dist/docs ./src","publish-docs":"gh-pages -d dist/docs"},"dependencies":{"aspen-core":"^1.0.1","notificar":"^1.0.1"},"devDependencies":{"@types/jest":"^23.3.11","gh-pages":"^2.0.1","jest":"^23.6.0","ts-jest":"^23.10.5","tslint":"^5.12.1","typedoc":"^0.14.1","typedoc-clarity-theme":"^1.1.0","typescript":"^3.2.2"},"repository":{"type":"git","url":"git+https://github.com/neeksandhu/aspen-tree-model.git"},"keywords":["react","aspen","tree","model","state","container"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/neeksandhu/aspen-tree-model/issues"},"homepage":"https://github.com/neeksandhu/aspen-tree-model#readme","gitHead":"6311a89db223095ac24dd5c66fbe8ab26e86e5c4","_id":"aspen-tree-model@1.0.1","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"dist":{"integrity":"sha512-1wl/cuZpNLpB0YszLjfzB6PMxpzRXFxqjLq251NCqeDSz5S/lCWYYShrb+WlwRIUKCrNW9pW8G63bFWVJ+o6YA==","shasum":"1fa1578b25d60c468b5e63d1329bac1995df8a76","tarball":"https://registry.npmjs.org/aspen-tree-model/-/aspen-tree-model-1.0.1.tgz","fileCount":48,"unpackedSize":2968609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPuvyCRA9TVsSAnZWagAA2ZMP/1EvdsCwiHxC4/fskrn3\n6uYulG+7dqMlgYjzFtYvMEsWOlPzShD4/w39oyZwGIReBdcg8H5Xx6ERPoDp\nfXfgCKTweS4Q1d/5BqE+Hpt+eDfS3GfRXzhn9g3cwUGHIAXnAa+FBDe29xv9\nBCAmg6GuzC0W/qd+WFwlGl5VYl5qJGfZgoshQ8fW9+wKVLmDq1V1idbI/ewI\nwh8T6r4ZrY3nTRNXyLBQvUiszaeCR1NPgFu0yFFi4YK7nusA5dSXHV+Osepr\ndChS+iikwajHYRjWIuYsqi81NE6SfWNfa9nHO+vyrV//FdDoebm6ONTiAeIj\n1FQevcgdWeGIo72lhffnj5Uyh9M+kuKemLJqiRJ4XBFfGTkQ2OwleZRhK+V2\nwe9p6obQS6e60D4ZvrJlj1DZ0JQz7ZT+64f14+kRQGuwhg7EAziMR+h732oX\nv9VeidDjobiuOwMDCHACHawdjfIIhuftdKiwC7Fe/c0tab16NByYglJfV3Vc\nmFfqDDSEXdoe0S6rbrK073ovW57MYasMl7m7QBCp1qUdTLvBB9nYp+Te7but\npn1MKXTrFKG26879Irexga73CPKZhJfvxy0z0JNmvjryE9gLHz3DD3GO+Nz8\n+iI2dKjmtF4Lrsf02tjxUZAtoxlKhFvzfAqe/tvV0zooUu91miSP/cH3CHl7\nEnsD\r\n=de/q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIARIwpL7aQAkr08gdWQ92/nhHPYDjDUIbmLr3HQvzzt6AiBjo1lPo0i1H/9BRB4yEBxlsTRzTNHNDnaIEfWJFW37vg=="}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aspen-tree-model_1.0.1_1547627504961_0.6933733690699095"},"_hasShrinkwrap":false},"1.0.2":{"name":"aspen-tree-model","version":"1.0.2","description":"State container for aspen trees","main":"dist/index.js","typings":"dist/typings/index.d.ts","scripts":{"test":"jest","build":"tsc","watch":"tsc -w","lint":"tslint --project .","prepack":"npm run lint && npm run build && npm run test && npm run generate-docs","postpublish":"npm run publish-docs","generate-docs":"typedoc --mode file --excludePrivate --excludeProtected --excludeNotExported --theme node_modules/typedoc-clarity-theme/bin --out dist/docs ./src","publish-docs":"gh-pages -d dist/docs"},"dependencies":{"aspen-core":"^1.0.2","notificar":"^1.0.1"},"devDependencies":{"@types/jest":"^23.3.11","gh-pages":"^2.0.1","jest":"^23.6.0","ts-jest":"^23.10.5","tslint":"^5.12.1","typedoc":"^0.14.1","typedoc-clarity-theme":"^1.1.0","typescript":"^3.2.2"},"repository":{"type":"git","url":"git+https://github.com/neeksandhu/aspen-tree-model.git"},"keywords":["react","aspen","tree","model","state","container"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/neeksandhu/aspen-tree-model/issues"},"homepage":"https://github.com/neeksandhu/aspen-tree-model#readme","gitHead":"0886c56f2d178b878b06f8b04c34539928ea1d23","_id":"aspen-tree-model@1.0.2","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"dist":{"integrity":"sha512-joW1Ot7oXW2VYBSOI3fu89cPj4u2BE5XvQe9cBaSWq3wWDS/cWQ5do2atAwizpp9JAmfXkpoyAZ4gUDGUE0Sxg==","shasum":"ed989c14ecc1144ea097abdc909980767a99f287","tarball":"https://registry.npmjs.org/aspen-tree-model/-/aspen-tree-model-1.0.2.tgz","fileCount":48,"unpackedSize":2968609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQBNjCRA9TVsSAnZWagAAAu0P+wXZPVDiLnMOT45TVLYB\n8X0Y2SYqzl1ovGRroVYmhEDEyykzhTnI/hWXE3eyafrPFcNVvf8s7ymX6DVj\nVarH4PhcyC5xF/hQdb16OHazH29M6/2iGyuKdJFwVLgy99p16eQBdfP6dnfv\nPferz+3en5ebn9repg2K5dz4YxDi2D6yuhIZ4wmjFIdBdMLk8xzn77BlM12P\nvr61TbW3X5GR/CZyjuBMk5U8DZG0pdMe3d6ybLud8cx5PfFpNqbd6sMECZUF\n23cdfmNlQhVWfyO45lREAyoJsp0Gp0FiCQX3pDMJo8UXsRx2fDE9r/2Q/KOv\npbtGwVSfCrEcR6gZC05WgfQ5yJqG4YpfVAGZyas5KJ6UioT5ss3I8eeQiJnW\n7kUOR///rq58t37edtP9EB59U21MHLcyi0KNwzhyJSTo3ixfcjXQAU5QTuuN\nvjupc7dVxF3EpNclFhLTnSHBlq+Moh0ticlxw/ASPIQu4cdzVlIk1esnstSG\nxa0PQ4oZgLKmStjjch89SROCgvyWW9vqpC0Qt41tQT2SgpcoJf7UloZvuKZH\nTAKnhufqFnly3ObjeS4zSNkgUok41TgKh84YpkTeeZeCTG+ZZxnHVfXYp4v4\nbjKBAuKTFup1rSv0+vO3m01baqsF+kwTEjlNsc1q608OU+Mz28Cqjj0Oag3F\nm1VA\r\n=kuSk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqkEGaP4Kn5eFTi1emZL4n+8BtYxrP/hM0yO8k+CR4lAiEAlVK/2PqtB+9BMVBnTM481lvyxFKrVZdYYwSnl3fvhdo="}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aspen-tree-model_1.0.2_1547703139075_0.42921400464874115"},"_hasShrinkwrap":false},"1.0.3":{"name":"aspen-tree-model","version":"1.0.3","description":"State container for aspen trees","main":"dist/index.js","typings":"dist/typings/index.d.ts","scripts":{"test":"jest","build":"tsc","watch":"tsc -w","lint":"tslint --project .","prepack":"npm run lint && npm run build && npm run test && npm run generate-docs","postpublish":"npm run publish-docs","generate-docs":"typedoc --mode file --excludePrivate --excludeProtected --excludeNotExported --theme node_modules/typedoc-clarity-theme/bin --out dist/docs ./src","publish-docs":"gh-pages -d dist/docs"},"dependencies":{"aspen-core":"^1.0.3","notificar":"^1.0.1"},"devDependencies":{"@types/jest":"^23.3.11","gh-pages":"^2.0.1","jest":"^23.6.0","ts-jest":"^23.10.5","tslint":"^5.12.1","typedoc":"^0.14.1","typedoc-clarity-theme":"^1.1.0","typescript":"^3.2.2"},"repository":{"type":"git","url":"git+https://github.com/neeksandhu/aspen-tree-model.git"},"keywords":["react","aspen","tree","model","state","container"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/neeksandhu/aspen-tree-model/issues"},"homepage":"https://github.com/neeksandhu/aspen-tree-model#readme","gitHead":"0e3366ed3256b7590b2919c9fe6a5c6076cddc99","_id":"aspen-tree-model@1.0.3","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ns+OHKZJBMrolR5ZlE8ahYdLxrHlTmHS2pv0cIw7wK1O7wa5qymT/KihuW9oduQekUjmqnO9wTnPDZvw54YMBw==","shasum":"f93adf9c385cd54b4bfb502d722b38e9605b6a7e","tarball":"https://registry.npmjs.org/aspen-tree-model/-/aspen-tree-model-1.0.3.tgz","fileCount":48,"unpackedSize":2968109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSMLkCRA9TVsSAnZWagAAsPQP/jSlMaD0wb6kNOFubE18\nfnjAUyg6w9D+Nbl2xD7nywh1VfEfpdVu6pcBsPa48jvFv+Obtl7q7gcy9E5X\nLfew4q9155Mp9f/NuVd5/WJm/zib3Cla1oIp8JAZxsWk8omjsDYxh/Y+Ze9J\nVrgexmKpJ1I0lrvqGHu+pXYE4VxVGruhJ0OATZHT/4IfzwkwHXvSljq+pR5U\nQZsa1wJPk5SIj6KfQZpRdnViCEcYqubSZcBRCOCBuMdY6akzsN6K8agX97Do\n79NaSMlepUmFIWvXYFUlWqIlVaEjYz2rSYdg7ev4NQoH8tiYdM8P5AqHbylp\nasJEZV4hs/T127J3hRABDIYBOrkFOq6WFJap1i5+J7Ql/Hzu1RWLM4moFKGH\nIXTpwV+NZC8/Ayka3e3+2TJanJvcX5y+LSdyyUx+u4MYd5UDKMx3e4Bxv90m\npLf/ZzSOvWZzvBpXCxJZi6tmjeua15i/vTN3FgI8RskTQjVRhGtiWzwjbHE7\ntz4fDmQ1TXuD6NHZ29l5xpj9ompG4obNs0r34IpKF3tGme0XLv1NWK4S5FxI\njhORyy7m4AFw26ePPd1moTf28nLQJgXuF3ahNz9wfARgw9SOgo7rIIbiSsx+\nmfZn5VcxZsNbRvsulu84GlPAV5SkYQqdk5psZTaZyl827qKmg2Em+oGWJYMO\nRTqV\r\n=OcTP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG/pnn52aQJL/tC9xFUhAc3dllOoQgb9PMs9357aYY1NAiAKXifxRynD50e2faEtReuom1IB1YM5qd44zmJoWOlYrg=="}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aspen-tree-model_1.0.3_1565049571488_0.9431710634080182"},"_hasShrinkwrap":false},"1.0.4":{"name":"aspen-tree-model","version":"1.0.4","description":"State container for aspen trees","main":"dist/index.js","typings":"dist/typings/index.d.ts","scripts":{"test":"jest","build":"tsc","watch":"tsc -w","lint":"tslint --project .","prepack":"npm run lint && npm run build && npm run test && npm run generate-docs","postpublish":"npm run publish-docs","generate-docs":"typedoc --mode file --excludePrivate --excludeProtected --excludeNotExported --theme node_modules/typedoc-clarity-theme/bin --out dist/docs ./src","publish-docs":"gh-pages -d dist/docs"},"dependencies":{"aspen-core":"^1.0.4","notificar":"^1.0.1"},"devDependencies":{"@types/jest":"^23.3.11","gh-pages":"^2.0.1","jest":"^23.6.0","ts-jest":"^23.10.5","tslint":"^5.12.1","typedoc":"^0.14.1","typedoc-clarity-theme":"^1.1.0","typescript":"^3.2.2"},"repository":{"type":"git","url":"git+https://github.com/neeksandhu/aspen-tree-model.git"},"keywords":["react","aspen","tree","model","state","container"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/neeksandhu/aspen-tree-model/issues"},"homepage":"https://github.com/neeksandhu/aspen-tree-model#readme","gitHead":"df05415b6580f96288d4e056cbdf9543f207758e","_id":"aspen-tree-model@1.0.4","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-WinIuGua9cmK5JaSwBW4OhalTI7c9goJtsYGMkMWFxhsqmOxQ5yUD/OGCO2LXxhAnKd2hgOn5ifTJ7GGRYeAIw==","shasum":"c90f0e9809612f0168c9b4820893c0b87ec8b915","tarball":"https://registry.npmjs.org/aspen-tree-model/-/aspen-tree-model-1.0.4.tgz","fileCount":48,"unpackedSize":2965438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkn+YCRA9TVsSAnZWagAACncP/Rum31Xh5sMOip/FklIZ\nNzqQkN0ILgrMQh6nYMXJs44qfDvIV+DrZ6MkqjfGOZAxovNIODr1QWGmXSTz\nKuMsY9vNZGqxVA3YbC9qxMlg7MeeAaYocRLamyty1MypZohR4URxHg3nFGu3\nqa8tgBts1Of6voPUiLNzX6/budNEpSycDDnP72y+qQlLhnFUSmwmIYCqtK9O\nInAYSQaavuxWuroZPvK+jMJ5G4RrJ9fPe3aidlvH1djoyAAiSO/kMD4QT59e\nBVkp2pNot+AQOkAal2rp2SALC4hRdVVPp1g4YvC49Vi44iDqZHOfs7XpWjtB\nRxjJvwYNg52MYDLjKc2ceG3avDWhllOE0VanMxDHMo3X+eZxG0gDGneJUsBp\ntJw1KOXam63nn3dAacuwW4aSTL75Gi3ejymvs2F/Jg7yXwfUBvmnpgr0e6cb\n+Um6WlfkLAPiruhre9krINbDLgPUdJFmLuWPfyuVOyaD1BeoJVo91ovOrYqq\nsYsFfvHTjI0tXnb8TpWmk9VCeFxAHhwCCB3S/2KszJgGLeq7gn16rvZIIkoM\ngSkMnUrerT0oStsAwW4JaZovNpUBjl9JAzJOZa8mi+PFGZFfxOoJo7JWjdk9\nl4Sp3Gkck3ytJJfolB5+7+bcyWrYcxT3HYwLF6XI2JN7cSSlDuC5H7EhiAPC\nmlMf\r\n=Hj1R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICWBl6GtS40xYMBCsTmjOYb4hYQYHdVSmndLxd9x4HA5AiEAh/QW3HLTHSkH/qJMiU26vfW/7r9P41cfloWTrnbet+g="}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aspen-tree-model_1.0.4_1603436439761_0.15459421928702133"},"_hasShrinkwrap":false},"1.0.5":{"name":"aspen-tree-model","version":"1.0.5","description":"State container for aspen trees","main":"dist/index.js","typings":"dist/typings/index.d.ts","scripts":{"test":"jest","build":"tsc","watch":"tsc -w","lint":"tslint --project .","prepack":"npm run lint && npm run build && npm run test && npm run generate-docs","postpublish":"npm run publish-docs","generate-docs":"typedoc --mode file --excludePrivate --excludeProtected --excludeNotExported --theme node_modules/typedoc-clarity-theme/bin --out dist/docs ./src","publish-docs":"gh-pages -d dist/docs"},"dependencies":{"aspen-core":"^1.0.4","notificar":"^1.0.1"},"devDependencies":{"@types/jest":"^23.3.11","gh-pages":"^2.0.1","jest":"^23.6.0","ts-jest":"^23.10.5","tslint":"^5.12.1","typedoc":"^0.14.1","typedoc-clarity-theme":"^1.1.0","typescript":"^3.2.2"},"repository":{"type":"git","url":"git+https://github.com/neeksandhu/aspen-tree-model.git"},"keywords":["react","aspen","tree","model","state","container"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/neeksandhu/aspen-tree-model/issues"},"homepage":"https://github.com/neeksandhu/aspen-tree-model#readme","gitHead":"5b22bb73001361f8066f5324f9eb9828dfc60ea4","_id":"aspen-tree-model@1.0.5","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-kcdL22iAT1sp1HTQ3wJnQqSeA2ANSQiOZJ86RMk9tKBZjb5EFSs2khEFQ6iYE7bvHcWTarGzD7X8XKfxe/zxXg==","shasum":"23d5ce7a8fb7ab905d37b17b930cc6f92e4d366e","tarball":"https://registry.npmjs.org/aspen-tree-model/-/aspen-tree-model-1.0.5.tgz","fileCount":48,"unpackedSize":2965438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkoCRCRA9TVsSAnZWagAAQaEP/0T23ElO2nFDEAXlZtDB\nixGTJy1Kp3m72BlHMtIVUzY0oLYt2HP7je8KuVXqO3z7RNGE+4+vlInGkx7W\nhUxp7fZ2lvzB5CQ6Sr7s4aX4Qj4rHu2/Z/v6E5SP6cV+BcUBVE2Vx6U6PetR\nhavJc58dDpI5J1otgH44UvZjyCbEQpUOIKtc7+A0uer0mVB1GnZWTez+FvHC\nM1ydk0r31cBHXBSCeRXudja58SjCRjioIUNhNjm3vOpgxgNsrFanC3/gxcM5\nTbOI1cdvlRkRwjubkoRbyLfb4bq0M5JiUeDlAWwclnbspB26Qu5n9tza+uc3\n/3aXYJG++TXBAwthoHXZAuA9IkbfM/YnEjfA2wrbqX20L16H3lUZ/mLrB0XT\ny3KE5qcIO5REPqebjynhy3O6pvyVdVRXR7AXNxQqaPdPQnD99onLX1j2gwP8\nHfkhx7WIW19EncL8/ArRJcKx6CK6WgIhV8oH0QI+XE8tLNEq7qWZWNynVYQb\nAc5++Xgocfe2rDl8iQ2kQQWoeUIYmC+rNwWEm67zhqtllKyNhxgU8zM8xZ74\n4dIv+6qO8ohAcODNvJC0N0cwOLFr5RB7SX83pzk4OzpC1/OFhxwRet6dp7nk\nmwpwvzAbLwRaYlvhx9oFgI21sdEXg9/84fezkQ1ikP1RxtF0JpkvDdIeHLXw\nmuqk\r\n=rPfq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6vZPCYLsNdqEKKEJdeVLnHWiwuawN/3DAKOPLGveeIQIgd/XFtNZyxlTfxuM5uOE824I60Tpzpznh/Rkks+MKhQ4="}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aspen-tree-model_1.0.5_1603436688599_0.26400901190458215"},"_hasShrinkwrap":false}},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"description":"State container for aspen trees","homepage":"https://github.com/neeksandhu/aspen-tree-model#readme","keywords":["react","aspen","tree","model","state","container"],"repository":{"type":"git","url":"git+https://github.com/neeksandhu/aspen-tree-model.git"},"author":{"name":"Neek Sandhu","email":"neek.sandhu@outlook.com"},"bugs":{"url":"https://github.com/neeksandhu/aspen-tree-model/issues"},"license":"MIT","readme":"# State container for Aspen trees\n\nAll the information about a tree. In one place.\n\n*Core component of [`react-aspen`](https://github.com/neeksandhu/react-aspen)*\n\n## So what is it?\n\nView libraries which leverage `aspen-core` for rendering nested trees can leverage this package as a state container for those Trees. Said libraries can\nthen give users the ability to save the tree state to serializable JSON string and then restore from it the next time users comes back to the app.\n\nAs of now, that \"state\" includes expanded directories and precise scroll position. Both of which are available in a serializable format and as \"snapshots\".\n\n## Usage\n\nYou shouldn't have to use this package \"as is\" unless you're porting `react-aspen` to another framework.\n\n```bash\nnpm i aspen-tree-model\n```\n\n> This example assumes you're using this package with `react-aspen` (Other ports shouldn't be much different)\n\nThis package offers `TreeModel`, the thing incharge of stuff. `TreeModel` is exported by `react-aspen` and an instance of it expected by `FileTree` component.\n\n```tsx\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport { FileTree, TreeModel, TreeStateChangeType } from 'react-aspen'\n\nclass FileTreeItem extends React.Component {\n    render() { }\n}\n\nconst host: IBasicFileSystemHost = { pathStyle: 'unix', getItems: async (path) => { /* impl */ }}\n\nconst treeModel: TreeModel = new TreeModel(host, '/')\n\nReactDOM.render(\n    <FileTree width={400} height={700} model={treeModel}>\n        {({item, itemType}) => <FileTreeItem item={item} itemType={itemType} />}\n    </FileTree>\n    , document.getElementById('app'))\n```\n\nHere are some points of interest:\n\n```typescript\n// observe tree state as it changes\nconst tsw = treeModel.getTreeStateWatcher()\n\n// attach a callback (will be called everytime user scrolls or expands/collapses a directory)\n// remember even the slightest scroll will trigger this callback, which can lead to performance issues\n// either throttle your callback or ignore based on `changeType`\ntsw.onChange((changeType: TreeStateChangeType) => {\n    // changeType can be `TreeStateChangeType.ScrollOffset` | `TreeStateChangeType.DirExpansionState` | `TreeStateChangeType.PathsUpdated`\n\n    // take a snapshot (it's not a JSON string, but an object) (expanded directories + scroll position))\n    // restoring this snapshot will bring the tree to this exact state (overiding the alterations made by user)\n    const snapshot = tsw.snapshot()\n\n    // time travel to this snapshot after 5 seconds\n    setTimeout(() => {\n        treeModel.loadTreeState(snapshot)\n    }, 5000)\n\n    // or save to some storage (like `localStorage`) and load it next time the user launches your app\n    // ⚠ WARNING: Use a throttler to ensure you don't do this too often (every scroll will trigger `onChange` callback)\n    const serializedState = tsw.toString()\n\n    // save the state to `localStorage`\n    // When the user launches your app next time, just do `treeModel.loadTreeState(localStorage.get('aspen_tree_state'))`\n    localStorage.set('aspen_tree_state', serializedState) \n})\n\n// If at any point in your app's lifecycle you decide you're done with the watcher, remember to purge it properly\ntsw.dispose()\n\n```\n\n## API\n\nThis package is written in TypeScript. Type definitions are included when you install this package (directly or indirectly through a dependent library).\n\nYou can explore the full API [here](https://neeksandhu.github.io/aspen-tree-model).\n\n## License\n\nThis project is licensed under MIT license. You are free to use, modify, distribute the code as you like (credits although not required, are highly appreciated)\n","readmeFilename":"README.md"}