{"_id":"@captaincodeman/redux-connect-element","_rev":"10-c4406174c6aa7b01a942f4a3f23d601a","name":"@captaincodeman/redux-connect-element","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0-beta.0":{"name":"@captaincodeman/redux-connect-element","version":"1.0.0-beta.0","description":"Redux HTMLElement Connector","main":"connect.cjs.js","browser":"connect.min.js","esnext":"connect.js","types":"connect.d.ts","unpkg":"hydra.min.js","scripts":{"build":"npm run build:es && npm run build:js","build:es":"tsc --module es2015 --declaration","build:js":"rollup -c","dev":"rollup -c -w","mypublish":"npm run build && cp readme.md package.json dist && npm publish dist --tag beta --access=public"},"author":{"name":"simon@captaincodeman.com"},"license":"ISC","peerDependencies":{"redux":"^4.0.0"},"devDependencies":{"rollup":"^0.65.0","rollup-plugin-node-resolve":"^3.3.0","rollup-plugin-terser":"^1.0.1","rollup-plugin-typescript":"^0.8.1","typescript":"^3.0.1"},"dependencies":{"redux":"^4.0.0"},"_id":"@captaincodeman/redux-connect-element@1.0.0-beta.0","_npmVersion":"6.4.0","_nodeVersion":"10.1.0","_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"dist":{"integrity":"sha512-bQGhIdcuXpnS3tcdorATCtInEjfDf+Dszi/5jGWkkAshftDWYpRkHsh8Bh/c1GDy9B9nU27StgXo/Fc6QKBxfw==","shasum":"1e1bbab7d3e02fc13e612cf20b3102b2b4b550f8","tarball":"https://registry.npmjs.org/@captaincodeman/redux-connect-element/-/redux-connect-element-1.0.0-beta.0.tgz","fileCount":6,"unpackedSize":8341,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhFYGCRA9TVsSAnZWagAAnqwP/j32XyuLv2/jtm0tWiBm\nbF7/O3IxQQPuavuJSJ8xG/7yJmrenY2Jmtiq11XIBgeMO1xUTod6MrfY3yDb\nqwKpbw71qH368BVK6ntLZy980N6oxgitKFuydkIyzGRaTY7lqweuw4qNFL82\nRQQzobB6pGFV2eTWhy3iUhuCEHALYNCkSToHvwxUox0RKQplB5nTCvOkKtWq\nHGqZIK5y2LKWAWfcPR0+6KoomJEONFZIdmEFxdJVgnvvafc8WXOWlGFHJiNG\nGOv9ilt4lDsfWP2PlGf5gBphBCArBXLai33JU2/8tsiOd7O6IvAz7lVdUaoL\nxKKYo3ZTkds/5m1OyBRc1SI+gg5uXRYSa7Fde377uKmhRYqv/Q4MK95ZQw1H\nxLjji5jcPWdrcl4YiANIM1QBCyb8QQRcDAnJMNyQEFCgmZYnihfWxqySeS2r\nG+91L03WvvCav8YVmmvJXZXZ+SZGpwWW3TDbGktc5yyeyxuHFqOg2DWcP4Tj\nSu4XpSc4OZPt1fgyoDBJpKjwlwHm1Gpl3yFIUdNSsHsXatpElbWCB70LTfmg\n6vCrzkvn+S4tsHbK4tHJN8MPWo46eAa56IGOhNxgIkhYdqWYQ/uzgCYa7jWz\nHfoL5hy6g2I+oXnPToVQzho7GWpEG3qlQd3tDJLc6NddCBUJGNeMzBkZ+pjO\ny7jI\r\n=hwkw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0Vhdav9yxmI3nXmzAfqAarql+34Kvm08jdJAK5ZaVmwIgcgf3LLXc1YiArLd2ijVPL1GCo4WZKT+Zz/hcqvJcELg="}]},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-connect-element_1.0.0-beta.0_1535399429483_0.44870289336153135"},"_hasShrinkwrap":false},"1.0.0":{"name":"@captaincodeman/redux-connect-element","version":"1.0.0","description":"Redux HTMLElement Connector","main":"connect.cjs.js","browser":"connect.min.js","esnext":"connect.js","types":"connect.d.ts","unpkg":"hydra.min.js","scripts":{"build":"npm run build:es && npm run build:js","build:es":"tsc --module es2015 --declaration","build:js":"rollup -c","dev":"rollup -c -w","mypublish":"npm run build && cp readme.md package.json dist && npm publish dist --tag beta --access=public"},"author":{"name":"simon@captaincodeman.com"},"license":"ISC","peerDependencies":{"redux":"^4.0.0"},"devDependencies":{"rollup":"^1.1.2","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-terser":"^4.0.4","rollup-plugin-typescript":"^1.0.0","tslib":"^1.9.3","typescript":"^3.3.3"},"dependencies":{"redux":"^4.0.0"},"readme":"# redux-connect-element\n\nConnect Redux to vanilla HTMLElement (or LitElement) instances, based on this\n[gist by Kevin Schaaf](https://gist.github.com/kevinpschaaf/995c9d1fd0f58fe021b174c4238b38c3)\n\n## Installation\n\n    npm install --save @captaincodeman/redux-connect-element\n\n## Usage\n\nYour WebComponents can be kept 'pure' with no reference to Redux which helps to\nmake them easily testable and reusable. They should accept properties to set their\nstate and raise events to communicate state changes. A great library for writing\nelements is [LitElement](https://github.com/Polymer/lit-element):\n\n```ts\nimport { LitElement, property, html } from '@polymer/lit-element'\n\nexport class MyElement extends LitElement {\n    static get is() { return 'my-element' }\n\n    @property({ type: String })\n    public name: string = 'unknown'\n\n    onChange = (e) => this.dispatchEvent(\n        new CustomEvent('name-changed', { detail: e.target.value })\n    )\n\n    render() {\n        return html`\n<p>Hello ${this.name}</p>\n<input type=\"text\" .value=${this.name} @input=${this.onChange}>\n`\n    }\n}\n```\n\nThis is the class you would import into tests - you can feed it whatever data you\nwant with no need to setup external dependencies (such as Redux).\n\nThe connection to Redux can now be defined separately by subclassing the element\nand providing mapping functions. These map the Redux state to the element properties\n(`_mapStateToProps`) and the dispatch method to the events (`_mapDispatchToEvents`).\n\n```ts\nimport { Dispatch } from 'redux'\nimport { connect } from '@captaincodeman/redux-connect-element'\nimport { store, State } from './store'\nimport { MyElement } from './my-element'\n\nexport class MyElementConnected extends connect(store, MyElement) {\n    _mapStateToProps = (state: State) => ({\n        name: state.name.name\n    })\n\n    _mapDispatchToEvents = (dispatch: Dispatch) => ({\n        'name-changed': (e: CustomEvent) => dispatch({\n            type: 'CHANGE_NAME', \n            payload: { \n                name: e.detail\n            }\n        }) \n    })\n}\n```\n\nRegistering this element will make it 'connected' with it's properties kept in-sync\nwith the Redux store and automatically re-rendered when they change. Mapped events\nare automatically dispatched to the store to mutate the state within Redux.\n\n```ts\nimport { MyElementConnected as MyElement } from './my-element-connected'\n\ncustomElements.define(MyElement.is, MyElement)\n```\n\nOf course if you prefer, you can include the `connect` mixin with the mapping functions\ndirectly in the element  (having the split is entirely optional).","readmeFilename":"readme.md","_id":"@captaincodeman/redux-connect-element@1.0.0","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ZGrLDktdLU4573tVuMoEWUE1QhyK4KKiTAPyG9+dRslE8604q1yKp+CEIktmqeSpJ7XN6ZbyYgseBWj1gHTCxA==","shasum":"1c2ee076aa68812d94c0a5331a3507fe704a0af0","tarball":"https://registry.npmjs.org/@captaincodeman/redux-connect-element/-/redux-connect-element-1.0.0.tgz","fileCount":6,"unpackedSize":8511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZZe+CRA9TVsSAnZWagAA8h4P/0VNqv/3fF3BSPk3aNyP\nHNvY+4JJA2AUUiOQA2OUvOJLVbj9mMY9kqDq8SS4j1PhPsOxlV+/axFAAQgt\n+LYni7CAr9LqwsJV3gGPcwTaIy0VW/kCb0FCzZJk6c/Y7uVfLVa5UD9Q+wim\ni/CLsmA/PLE6hHPFtUns7OQEPO2weaEob/Gos+vq3XYcO5YIxutF65Y8PZc+\norSGjWI1BFceaSlm7nvedvS49cRmxozUcnyFXW1rPB0HITAtANOpz6MGRGNu\nWiMIdWHhZvnXUD+suts1j7kLpO1gvzgqVdnbhjfqJ80WCVLMMsDGp5vNA8NW\nGYp6E2I5HRCMyuRhJX1K9olFi6sgYawHbEVygm1Tk9EIJamVaQLXYJI3eQ6W\nOWLK/zVdA23fysbGadPIAsDOHanD3VjXM+185+lcXLEVvx9ED84VXWCoMgu+\neOWruZrUk2dnOmBG1clQo63iVSyQK2UaM31QXS3MRMQMgQRB6gavTpodj8Hl\n29aTsm8CYGwq2mzhtJIhSu25ygGivyj7ftSVwADwad5aoiqQfcXTiUPB3wf8\nH/IFaHKoVwpnIVkXFu1GYkadGKS/z1m0uUBQoVR9sm6K5Y/nT+GSw+UGjLzL\nA7Ebjcirw1WaS0PIRGV55cxhp8SF2Ipx1MyOl/Np5t+BUdB9OF2IJwFHbWOf\nrWDa\r\n=ZR/c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQNzUHFx53ns+JCMi0tIORMFFTGx84KAQUSmpBp6KlaQIhAM2zP/8C8t7RrN/RFIlL05f6JIjf9CUuiEEd+I/usLFp"}]},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-connect-element_1.0.0_1550161853673_0.9244042513701041"},"_hasShrinkwrap":false},"1.1.0":{"name":"@captaincodeman/redux-connect-element","version":"1.1.0","description":"Redux HTMLElement Connector","main":"connect.cjs.js","browser":"connect.min.js","esnext":"connect.js","types":"connect.d.ts","unpkg":"hydra.min.js","scripts":{"build":"npm run build:es && npm run build:js","build:es":"tsc --module es2015 --declaration","build:js":"rollup -c","dev":"rollup -c -w","mypublish":"npm run build && cp readme.md package.json dist && npm publish dist --tag latest --access=public"},"author":{"name":"simon@captaincodeman.com"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/captaincodeman/redux-connect-element.git"},"peerDependencies":{"redux":"^4.0.0"},"devDependencies":{"rollup":"^1.7.4","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-terser":"^4.0.4","rollup-plugin-typescript":"^1.0.0","tslib":"^1.9.3","typescript":"^3.4.1"},"dependencies":{"redux":"^4.0.0"},"bugs":{"url":"https://github.com/captaincodeman/redux-connect-element/issues"},"homepage":"https://github.com/captaincodeman/redux-connect-element#readme","_id":"@captaincodeman/redux-connect-element@1.1.0","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-s5GMikQGC1hWl5ppWBi9kvwluuXLTTbKL62K+pZby3yOCrgR+m948rjiQDukOZjB+NCOpnnZklD2EdEYRbwvLw==","shasum":"6b75dcd8d3bed64bac86df79fda4ade3ed8ada21","tarball":"https://registry.npmjs.org/@captaincodeman/redux-connect-element/-/redux-connect-element-1.1.0.tgz","fileCount":6,"unpackedSize":12125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoRl+CRA9TVsSAnZWagAA/P4P/Arxkxw6Z3Pn+f+ZP4cb\nupNgyyoBJC3i0CmRbCx0CeIXJ5+Y5z+1sFMhUh/16vxkheEcMWMiGbbX6ukL\nPTeYhVdU5sQeyBDm+hzt4IbbWAIBRF5l8ZZkH61CDGJ2yuZvXb9g4N+95OG9\nQxONheT9JjC6T4W7eGViizCNFEScdXb66k0+D/dBMPvxznmWJmsUlV8PEDbX\n6p6Ztqg1pN2a8KHMWaCllACTaD6BqkuTSlmx3j4bqZ+lhLi1deOOHU4/b8It\n8/bV2MWw5/Sh4FI3HuFIYqeqrsD0JtunE5HTNCW4wvnIo5LkpHGwDbx0hO81\nRYmkJvSjyNlf3zRoSSatQ/abkeRX85Ms3zc7okMDJFuz3MxLNLBwnE8HOFjt\nsW6lgpRt9eyboqIv5WoA17AlILGxGH1xCHYrYM+O0us5W+iht2IO5FWAlxNU\nGrW+zx5y/jikn4wDiZYjNaSuasN7efQJDUryNXD3rImpHBiLCxe6eY+Fdh65\nRgeIkfCasxomkV98uVF86FlJPo1X+CCyRYeF6nKDFsnX1A3bh2/C0jbf7+ul\ngrnVG7zWI60/njjWPANkBD4ihvSKIQwvgvwjCACepILJ6oAiTOhSJPOSAq9m\nUULcKeNR0iyt1IMW6gra2+dKBZyCHD6dMwX97iEEdvNovBZcgELindOtgdxR\nQgIi\r\n=3h+U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAdjmUhYs60ZTDf8ZsfP12uFoIYaBOZQ787EIi1Nb8q1AiB4L8Cq5OaWtTlnFpHo73Ulgwv/KuRlj94b5/exG10OXg=="}]},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-connect-element_1.1.0_1554061693295_0.1552739672162322"},"_hasShrinkwrap":false},"2.0.0-beta.0":{"name":"@captaincodeman/redux-connect-element","version":"2.0.0-beta.0","description":"Redux HTMLElement Connector","main":"connect.cjs","browser":"connect.min.js","module":"connect.js","types":"connect.d.ts","type":"module","unpkg":"hydra.min.js","scripts":{"build":"npm run build:es && npm run build:js","build:es":"tsc --module es2015 --declaration","build:js":"rollup -c","dev":"rollup -c -w","mypublish:pre":"npm run build && cp readme.md package.json dist","mypublish":"npm run mypublish:pre && npm publish dist --tag latest --access=public"},"author":{"name":"simon@captaincodeman.com"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/captaincodeman/redux-connect-element.git"},"peerDependencies":{"redux":"^4.0.0"},"devDependencies":{"rollup":"^1.20.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-size-snapshot":"^0.10.0","rollup-plugin-terser":"^5.1.0","rollup-plugin-typescript":"^1.0.1","tslib":"^1.10.0","typescript":"^3.5.3"},"dependencies":{"redux":"^4.0.0"},"bugs":{"url":"https://github.com/captaincodeman/redux-connect-element/issues"},"homepage":"https://github.com/captaincodeman/redux-connect-element#readme","_id":"@captaincodeman/redux-connect-element@2.0.0-beta.0","_nodeVersion":"12.9.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-DellcNnxq+qKU7ca75fiqR7ayRDw5dzMhSUGNCj2H/BakcoO0gjmjtlh64OQrFoITFuotFTj9siI2Esk+aphTQ==","shasum":"62e9b2ac5095ccb7ec436cf5b37053b74ecafce1","tarball":"https://registry.npmjs.org/@captaincodeman/redux-connect-element/-/redux-connect-element-2.0.0-beta.0.tgz","fileCount":6,"unpackedSize":11495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcBOzCRA9TVsSAnZWagAAzu0P/jl7ba8oJc3POp4lR1xT\nAjHUwYF3rgS1/4jjOYfq2QZq67ucOuzdCUfkyKUUkuRJjDiymBJPKVJmwnsj\nIC0ZpDPm+MBkjrMnIhSVcyIP7tgGAVKt3elNVLvqXt+f8bY3kYBaSqxO+Vgz\nWzT7fd0CZGiW/fSO3OA5EwE/XMfNMFl8b0mi0fjPvNRYmFu7oVj4v84gJHhS\n0+CMjOptq3mdKNxHLNW3ukL5EVcvICkoER9GYbCCJ+RYDYO8nACPRSfZmeoD\nMyNYzvvi/pkyNcPupPp73Ftvfn5LU2BVCC16wzDrV0q8eyFnpInfhZ1x24Dv\n6szUjR1J7S8mWY5qTr+6W8OAo3ugAHmH+kSsAdErH6bG4Yk3Y5IF5b70GSxo\nkhrDcPFdyeWalb5OS0Ly/kllZ2JfYf28YzNvsCgnvS83lxcvxJ/eDHzrDTcV\n+uFpA7kLQahLsySW9vrb8GK1Kz+cvbS0GJ7O1L0+ixdHI3Ate2Y83cIXKnYw\njW3pYhJUERjbaB5BhBUYONcbEYQ+8lsR/LVGbR22XAB5CYwDH2kYJQIQMGa8\nyE00DOb/KU/KtM2N8gm+huVMsPslJ8fK/SIu1/anw+cyQoadGzyDq/fA8owL\no44ODDlRKK+NYQay4Pi6BWVeTcYCRkRIxF6DG+YW/VaobWgnZcMa7VwpTgl9\nFHHQ\r\n=D0E2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUXy7W6PxmRSg5Cj34YpMgJw7kabDBRpp9AEjXjOW1sQIhALKDNUd1NYxorKUJbiKl451pr3wEIv/jLzPUGVMN0yTO"}]},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-connect-element_2.0.0-beta.0_1567626162358_0.46039790782825274"},"_hasShrinkwrap":false},"2.0.0-beta.1":{"name":"@captaincodeman/redux-connect-element","version":"2.0.0-beta.1","description":"Redux HTMLElement Connector","main":"connect.cjs","browser":"connect.min.js","module":"connect.js","types":"connect.d.ts","type":"module","unpkg":"hydra.min.js","scripts":{"build":"npm run build:es && npm run build:js","build:es":"tsc --module es2015 --declaration","build:js":"rollup -c","dev":"rollup -c -w","mypublish:pre":"npm run build && cp readme.md package.json dist","mypublish":"npm run mypublish:pre && npm publish dist --tag latest --access=public"},"author":{"name":"simon@captaincodeman.com"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/captaincodeman/redux-connect-element.git"},"peerDependencies":{"redux":"^4.0.0"},"devDependencies":{"rollup":"^1.20.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-size-snapshot":"^0.10.0","rollup-plugin-terser":"^5.1.0","rollup-plugin-typescript":"^1.0.1","tslib":"^1.10.0","typescript":"^3.5.3"},"dependencies":{"redux":"^4.0.0"},"bugs":{"url":"https://github.com/captaincodeman/redux-connect-element/issues"},"homepage":"https://github.com/captaincodeman/redux-connect-element#readme","_id":"@captaincodeman/redux-connect-element@2.0.0-beta.1","_nodeVersion":"12.9.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-fABSD9AD2XzHePOxZJ3n2Pn52lIZySGnc81yNJ4MXjerFDozQptU1Wj3jR9ImmuTAWlC45nmX1XPSQsAcFjydg==","shasum":"7bfe9ae6e85bd8bfd62f0ca096a7891db9bb23c4","tarball":"https://registry.npmjs.org/@captaincodeman/redux-connect-element/-/redux-connect-element-2.0.0-beta.1.tgz","fileCount":6,"unpackedSize":11954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcEqCCRA9TVsSAnZWagAAhTEP/0laQU0y4u3i9krlnBRI\nSsmU8hKjeAaz2KfiWsTbawHUX3FLa7mU+EF6r4mnp/2oE0allTiMJAOcVS9J\nYXlEn45diMsS3+M9574Qe5fTWrIzvXXJqRT7O9L/qcw9r3xd9V2UdAbJiAiW\nbzOzyF7aGLFLTqr3/o+NJzLWU0lpG1xi1iVHQ4Glevu+TAVlt6K5qhc8ZsaT\n3TCOhnh43ZC5j3H1WI09tduqYZXYxacP5x9umXYDn9JAyhLzki4mvUHDtyr1\nXzL+sjaxzmWNZgeSFEEEeQZB15BIjoJ6SZmjc5qNoLV62TVOEZjjlH9kAfX9\nrUwpej5w41s1y5rvqzIDCx0yoZggFtvUTpJKyB1bpejOSQeT/S6UVLhDNrZo\nUoFUqCGV+bNRZTdqhsndFHJxOrEWkWTNvNIWPEdzwBNLqYOrvF3Uuzq2WCzi\n7wiSeXdQelXYeZe6lkrdage6yFSvfALxpyZc5iP0WXinM/C/O1w3YlTgJZuo\nL9hPEmW0oUbvF4zMMNA/mXYJAXhVNQn0xAuKPBsen1H4fXi/c7M12t/xT0iA\nxhC3EjoqsYVU46ZJclffcIdAJkO2Vqb0PllVyMONNbKVF34karmWe6/FN8yS\nm0CDRICBgyh3XKRlaFqmmGTpxQJLmRwjsv5QQfH9y1YqigO4eBZfjTEFeNEZ\nI9yq\r\n=tTxm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF45nNBzfk9RYcOJKbKtF1hOiGxVD4pxN4n3SsMB2ZoKAiEAlEzDuUGtudhCxT9e7KNcr0akl4KnmzUMaiLesTnKJ1E="}]},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-connect-element_2.0.0-beta.1_1567640193443_0.6698664908491072"},"_hasShrinkwrap":false},"2.0.0-beta.2":{"name":"@captaincodeman/redux-connect-element","version":"2.0.0-beta.2","description":"Redux HTMLElement Connector","main":"connect.cjs","browser":"connect.min.js","module":"connect.js","types":"connect.d.ts","type":"module","unpkg":"hydra.min.js","scripts":{"build":"npm run build:es && npm run build:js","build:es":"tsc --module es2015 --declaration","build:js":"rollup -c","dev":"rollup -c -w","mypublish:pre":"npm run build && cp readme.md package.json dist","mypublish":"npm run mypublish:pre && npm publish dist --tag latest --access=public"},"author":{"name":"simon@captaincodeman.com"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/captaincodeman/redux-connect-element.git"},"peerDependencies":{"redux":"^4.0.0"},"devDependencies":{"rollup":"^1.20.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-size-snapshot":"^0.10.0","rollup-plugin-terser":"^5.1.0","rollup-plugin-typescript":"^1.0.1","tslib":"^1.10.0","typescript":"^3.5.3"},"dependencies":{"redux":"^4.0.0"},"bugs":{"url":"https://github.com/captaincodeman/redux-connect-element/issues"},"homepage":"https://github.com/captaincodeman/redux-connect-element#readme","_id":"@captaincodeman/redux-connect-element@2.0.0-beta.2","_nodeVersion":"12.9.1","_npmVersion":"6.13.1","dist":{"integrity":"sha512-TowE2W2j9ZnkZD7jGqFiez6asiGgZWLixr8HTYljYlAEmLPw5ZeBJOjTPzanGTJZB0L2h6Pkmr7qsLBvs5/trA==","shasum":"847ab00d8afd983e2c0e14a4e96f7eeb2488d2cb","tarball":"https://registry.npmjs.org/@captaincodeman/redux-connect-element/-/redux-connect-element-2.0.0-beta.2.tgz","fileCount":6,"unpackedSize":10963,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4EUJCRA9TVsSAnZWagAA1IQP/3WlUSq598H+CbB22wwD\n2XxQFjJj77QJKB9AnNnu8H6oiSCPwwy15OrGY3sm4MuWs8yslS5vJfTrWcrt\nKBjB8R/A0PK6ZProv+Qhj7O2BP208QPUCRNbLSZO9jpq53q+MjRsiP+KSjKE\n3x/oayKlKQi5Fa8Bwui53LBn0FpXb3fYeoQfNWfCvGORc0nfa8Q1/ZVXhgr+\nE1o2bnChII1lSEP4zLSNdAtVXRDDjyq5BiyIW+joTvZze43FSZhUZXyWh6U7\ndMAuiAMJy9lpntTCK+1eAyeJE5+Arf9ZD/u2NoTc8pm/F940mNdOAILuqFCK\n6tv18u38SpxqOztQqRnl8I5K4/olg72h7v6QimBgJDAaBK96WdxeqpCwpaWd\nM2zJ3C70fDKZn4MX3XJ1eMT5Z3A7l2Imu45QwFovcTZtUn859bwtKxiiGmhZ\nQjp+l+HI11EYcsfEbIg6Y5mPWH6ENKtj2DeVffluIOKV2+RplxocG9O+/ffX\nWUWI1IlRrFPfHr2TqZIQZrFW77m89is01UlXky3RYOvDEXmcOO1DBaPy8zO+\n0gdxKIz6Nqu5umd+XIAxd2QZo/Y8UQkiSn7BKaLTla9vMOMbWFtGq02W/X2q\nDXemLTtipRHEN8ubX45dD96pwoL3kVzAMMW20kbLzR7i0irs+Jl7GqulQF43\n9bqg\r\n=hhO3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCW4bu6Nm2pmmYB7bXyQgBZsTuxK8kAjdhNmr4tTgj04wIgUYNXxq2rQTOGaEe67/KcwBGC8M/92mp4SmtFjcw36r4="}]},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-connect-element_2.0.0-beta.2_1574978824711_0.31705770102878206"},"_hasShrinkwrap":false},"2.0.0-rc.1":{"name":"@captaincodeman/redux-connect-element","version":"2.0.0-rc.1","description":"Redux HTMLElement Connector","main":"connect.cjs","browser":"connect.min.js","module":"connect.js","types":"connect.d.ts","type":"module","unpkg":"hydra.min.js","scripts":{"build":"npm run build:es && npm run build:js","build:es":"tsc --module es2015 --declaration","build:js":"rollup -c","dev":"rollup -c -w","mypublish:pre":"npm run build && cp readme.md package.json dist","mypublish":"npm run mypublish:pre && npm publish dist --tag latest --access=public"},"author":{"name":"simon@captaincodeman.com"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/captaincodeman/redux-connect-element.git"},"peerDependencies":{"redux":"^4.0.0"},"devDependencies":{"rollup":"^1.20.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-size-snapshot":"^0.10.0","rollup-plugin-terser":"^5.1.0","rollup-plugin-typescript":"^1.0.1","tslib":"^1.10.0","typescript":"^3.5.3"},"dependencies":{"redux":"^4.0.0"},"bugs":{"url":"https://github.com/captaincodeman/redux-connect-element/issues"},"homepage":"https://github.com/captaincodeman/redux-connect-element#readme","_id":"@captaincodeman/redux-connect-element@2.0.0-rc.1","_nodeVersion":"12.9.1","_npmVersion":"6.13.1","dist":{"integrity":"sha512-t//jPPZ+dhF0ED9BiO5C4+KE+VKn3CDFZZYN5COr5Cm7kRftTdiRRrds53meu0qQkA0UpLVWgSUcX5gIUcJl2A==","shasum":"2f055fc269848d989fb593814b62efedbfc31f57","tarball":"https://registry.npmjs.org/@captaincodeman/redux-connect-element/-/redux-connect-element-2.0.0-rc.1.tgz","fileCount":6,"unpackedSize":10581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4Uj/CRA9TVsSAnZWagAAQwMP/2MMC67WbPGRUmhpXwPX\nyVpI0kygRbtqQAZ5Z4ZG5icFkYmo79QWQeZDdg/njU64Zflxj5kYZBO7FMe4\nboTeFENrSbsqVGMIQ/4JxGenbXYGi23No7A59EMTH7xYeaLdORjwRrXFbAU4\nePJfZ2sTqlwTr+tJ9KpO2BbHwMxTgA5AFCj6ItJbogBd6jIfiprl6X7Jayiw\nDfiuJeWu3cD9uQIwgZUmYnTC2xmo1AL7VV55QJsP1GeGY1uRSfLmPAHhQGLH\nMrVDqAE8abdaZsh0+P5Q9++2dFXc/wYcaUE8SP+uYvcU65DhJ8YeKRKnx5L4\nU+HA7oGv0ZPDSkg1pi69YjOt2m4xF0d6PY3xJ9ZF3pMySI5cTXQMO8HVLAkq\nb1UjW7S9LYN1smDlpYhOLV8yp0FmUH3U4NkvQXijU1iFtuDLF2rzpYMWeEAO\nuy4v6R2ldACwoeSox9A9LW0SAgQYJ+upnFi5H1VZvpnuvlPopGTlfMUN7azr\nY4iYtAWZtIjGEb+lw0AGbWr0ykBg50skwPAqHr8kjzIgScIaR+GaJIz328rw\nI7DWNogsEE7Qsn6VJ5bs8Kx+TeIqbAkYGcPNhh7o7ft5Trkp1EHMK56kMdF4\nJ7Zhh8XoLI/G1VIu1+LQUqggHphqYgaSTIIQ8HwvGJ318n4TyAVg6yc3k9zC\nNqWQ\r\n=tnFn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuITYl/Xa7Ch8s2SjS9UedS9k8jmt0XwlG+IIeycQrHQIhAOkAVi8vQl7yNeEJLBKVblDs9xR7/ec+ZDdCvtgr1hTl"}]},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-connect-element_2.0.0-rc.1_1575045374613_0.9545212774291147"},"_hasShrinkwrap":false},"2.0.0":{"name":"@captaincodeman/redux-connect-element","version":"2.0.0","description":"Redux HTMLElement Connector","main":"connect.cjs","browser":"connect.min.js","module":"connect.js","types":"connect.d.ts","type":"module","unpkg":"connect.min.js","scripts":{"build":"npm run build:es && npm run build:js","build:es":"tsc --module es2015 --declaration","build:js":"rollup -c","dev":"rollup -c -w","mypublish:pre":"npm run build && cp readme.md package.json dist","mypublish":"npm run mypublish:pre && npm publish dist --tag latest --access=public"},"author":{"name":"simon@captaincodeman.com"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/captaincodeman/redux-connect-element.git"},"peerDependencies":{"redux":"^4.0.0"},"devDependencies":{"rollup":"^1.27.14","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-size-snapshot":"^0.10.0","rollup-plugin-terser":"^5.1.3","rollup-plugin-typescript":"^1.0.1","tslib":"^1.10.0","typescript":"^3.7.4"},"dependencies":{"redux":"^4.0.0"},"bugs":{"url":"https://github.com/captaincodeman/redux-connect-element/issues"},"homepage":"https://github.com/captaincodeman/redux-connect-element#readme","_id":"@captaincodeman/redux-connect-element@2.0.0","_nodeVersion":"12.9.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-ezSzK+cxZ+6XHG6bY0jsq8H6Es/ct5eH4VtfJuXE1C+0L9jVYjz973QCYr5Nrp4FPyhhrer1f9g/v7xSjDzV2w==","shasum":"6ebdb56d7af7172fbf93002e82465dfc69d2b888","tarball":"https://registry.npmjs.org/@captaincodeman/redux-connect-element/-/redux-connect-element-2.0.0.tgz","fileCount":6,"unpackedSize":11510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeA9G/CRA9TVsSAnZWagAAjYUP/RWp6sQoe0XCEI/aSTXY\nCWGUtHM3E0jM85NgEB6vI8QRQUEZtxEmq2IklEHi/LhNj2C/G7hjG5vQr2FD\nBsvgHl9DIgkTnAb1y4JRl2UQrVJaZs6Cq6+1m2HcsHAd3w4Fj+VS49EnegjH\n+uLhVtAuOA4mc3yr/FK7iAcFBJi1y5NhEUlOPX7Z/hOEpTWcx8v/4H9z6EIk\nFH2JFG4FhmWg3gPyCpBZW4/2K3TZX0cBRtzpmHMDKQlZ+RmvVX/FOf2wiuYs\n3uA0wos442ZJfhBp8maaLJvN1waU6a0dNOWJxzEPoLGMoG6o0ok3yDQj/DUl\nY+zuRhovlG0BflYIrciAQYB2QfKauwgf/Y0zvKQuyvYGmtu8SOyNZjpgN5e1\nEPYNoL5N2SuTrqGWPzCA7se3u+6KrZTGYVTy7QXENdlLT4DE8faiL5tWafPh\nSf0gbGLVFSKYbmwk6FWy+A1BFtM4hIdtGorhx7e1E4TcJJP0XDqnT0tZh+I3\nUBCndq/datZGidGN4QKF7q2/ns9jmx+Gwbc73Csk5rfDL+52TMQACyOnoKBF\nphyHGgsylGDLw8l4ib8IMRM13LV4JBWvvV+A0V7HnvCvUGebf5aQjCCM9Xes\ns78mitrGkswUDhhDboJQnoafC1nNaxmT8nGK02yRwXBeeK1u129HUcrl/5Fs\naXoR\r\n=rhiQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBarArlBbSHl9cNWFq5iaIS3c1jmOAeeJn2fohzHWubRAiEAnn8AFWhsdzxa6+d4/yZZQgFLUQxRWB/OJsMaMP1dNHE="}]},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-connect-element_2.0.0_1577308606578_0.2950254005356183"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-27T19:50:29.232Z","1.0.0-beta.0":"2018-08-27T19:50:29.559Z","modified":"2022-04-04T21:46:56.267Z","1.0.0":"2019-02-14T16:30:53.836Z","1.1.0":"2019-03-31T19:48:13.422Z","2.0.0-beta.0":"2019-09-04T19:42:42.572Z","2.0.0-beta.1":"2019-09-04T23:36:33.549Z","2.0.0-beta.2":"2019-11-28T22:07:04.802Z","2.0.0-rc.1":"2019-11-29T16:36:14.758Z","2.0.0":"2019-12-25T21:16:46.698Z"},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"description":"Redux HTMLElement Connector","author":{"name":"simon@captaincodeman.com"},"license":"ISC","readme":"# redux-connect-element\n\nConnect Redux to vanilla HTMLElement (or LitElement) instances, based on this\n[gist by Kevin Schaaf](https://gist.github.com/kevinpschaaf/995c9d1fd0f58fe021b174c4238b38c3).\n\nTypescript friendly and Tiny: 371 bytes (minified and gzipped)\n\n## Installation\n\n    npm install --save @captaincodeman/redux-connect-element\n\n## Usage\n\nYour WebComponents can be kept 'pure' with no reference to Redux which helps to\nmake them easily testable and reusable. They should accept properties to set their\nstate and raise events to communicate their internal state changes.\n\nA great library for writing lightweight custom elements is\n[lit-element](https://github.com/Polymer/lit-element). Here's a very simple example:\n\n```ts\nimport { LitElement, property, html } from 'lit-element'\n\nexport class MyElement extends LitElement {\n  static get is() { return 'my-element' }\n\n  @property({ type: String })\n  public name: string = 'unknown'\n\n  onChange(e: Event) {\n    this.dispatchEvent(\n      new CustomEvent('name-changed', { \n        bubbles: true,\n        composed: trye,\n        detail: e.target.value,\n      })\n    )\n  }\n\n  render() {\n    return html`\n      <p>Hello ${this.name}</p>\n      <input type=\"text\" .value=${this.name} @input=${this.onChange}>\n    `\n  }\n}\n```\n\nThis is the class you would import into tests - you can feed it whatever data you\nwant with no need to setup external dependencies (such as Redux).\n\nThe connection to Redux can now be defined separately by subclassing the element\nand providing mapping functions. These map the Redux State to the element properties\n(`mapState`) and the events to Redux Actions (`mapEvents`).\n\nThe `mapState` method can map properties directly or you can make use of the\n[Reselect](https://github.com/reduxjs/reselect) library to memoize more complex\nprojections.\n\n```ts\nimport { connect } from '@captaincodeman/redux-connect-element'\nimport { store, State } from './store'\nimport { MyElement } from './my-element'\n\nexport class MyConnectedElement extends connect(store, MyElement) {\n  // mapState provides the mapping of state to element properties\n  // this can be direct or via reselect memoized functions\n  mapState(state: State) {\n    return {\n      name: state.name,   \n      // or using a reselecy selector:\n      // name: NameSelector(state),\n    }\n  })\n\n  // mapEvents provides the mapping of DOM events to redux actions\n  // this can again be direct as shown below or using action creators\n  mapEvents() {\n    return {\n      'name-changed': (e: NameChangedEvent) => ({\n        type: 'CHANGE_NAME', \n        payload: { name: e.detail.name }\n      })\n      // or, using an action creator:\n      // 'name-changed': (e: NameChangedEvent) => changeNameAction(e.detail.name)\n    }\n  }\n}\n```\n\nRegistering this element will make it 'connected' with it's properties kept in-sync\nwith the Redux store and automatically re-rendered when they change. Mapped events\nare automatically dispatched to the store to mutate the state within Redux.\n\n```ts\nimport { MyElementConnected } from './my-element-connected'\n\ncustomElements.define(MyElement.is, MyElementConnected)\n```\n\nOf course if you prefer, you can include the `connect` mixin with the mapping functions\ndirectly in the element - having the split is entirely optional and down to personal\nstyle and application architecture.\n\nI prefer to have a separate project for an apps elements which are pure UI components\nthat have state set by properties and communicate with events. The app then consumes \nthese building-block elements and uses connected views to connect the UI to the Redux\nstate store.\n\n## Upgrading\n\nIf upgrading from v1, note that the mapping functions have been renamed and simplified.\n\n### State Mapping\n\nInstead of:\n\n```js\n_mapStateToProps = (state: State) => ({\n  name: NameSelector(state)\n})\n```\n\nUse:\n\n```js\nmapState(state: State) {\n  return {\n    name: NameSelector(state),\n  }\n})\n```\n\nor \n\n```js\nmapState = (state: State) => ({\n  name: NameSelector(state),\n})\n```\n\n### Event Mapping\n\nInstead of:\n```js\n_mapEventsToActions = () => ({\n  'name-changed': (e: NameChangedEvent) => changeNameAction(e.detail.name)\n})\n```\n\nOr\n\n```js\n_mapDispatchToEvents = (dispatch: Dispatch) => ({\n  'name-changed': (e: NameChangedEvent) => dispatch(changeNameAction(e.detail.name))\n})\n```\n\nUse:\n\n```js\nmapEvents() {\n  return {\n    'name-changed': (e: NameChangedEvent) => changeNameAction(e.detail.name)\n  }\n}\n```\n\nOr\n\n```js\nmapEvents = () => ({\n  'name-changed': (e: NameChangedEvent) => changeNameAction(e.detail.name)\n})\n```\n","readmeFilename":"readme.md","homepage":"https://github.com/captaincodeman/redux-connect-element#readme","repository":{"type":"git","url":"git+https://github.com/captaincodeman/redux-connect-element.git"},"bugs":{"url":"https://github.com/captaincodeman/redux-connect-element/issues"}}