{"_id":"p-cool","_rev":"10-0fac4adfcd7a956cb32dd9d504a33b63","name":"p-cool","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.0":{"name":"p-cool","version":"0.0.0","description":"","main":"./cjs/index.js","scripts":{"build":"npm run cjs && npm run test","cjs":"ascjs esm cjs"},"keywords":[],"author":"","license":"ISC","devDependencies":{"ascjs":"^5.0.1"},"module":"./esm/index.js","type":"module","exports":{".":{"import":"./esm/index.js","default":"./cjs/index.js"},"./package.json":"./package.json"},"_id":"p-cool@0.0.0","_nodeVersion":"16.6.1","_npmVersion":"7.20.3","dist":{"integrity":"sha512-7ZvpRgY1PDDohrLGpJ81GUITBG3EIIiK4ff+FL2jsDfBBeEQtC5NaYjiLrT9C+4XEmVQbZOi4Sh8pQTo2uvqzw==","shasum":"62290cf9763a69f742b4e851575946d06caf6dfd","tarball":"https://registry.npmjs.org/p-cool/-/p-cool-0.0.0.tgz","fileCount":4,"unpackedSize":621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCsfKCRA9TVsSAnZWagAAUXEQAIl4kHX7wFEsTe1bh4o3\nckx3n+Qv3dczM8lJ0cUcoquHN77B+UucbQag1A9MfZG6gYVAIdeMcZP9hIkq\nbZeRsXZq4STLARE/dK+2FCP+3wKwZVkVLS3vvf06jftEvOpp/Wrw5VqJq8pI\nO3aBBMiotzEAXS81tSlG8bciWc/0bkzsTCH1WnOanW7mRNb/7itBub6nRepf\n5jXileWJa0s1FsQd/cA7mkl/sdFUUsHD7sObCkoKJBkvt8lWgO+IMzfrFMzg\nFiM8G51hG6l2uKPhwq7y4jxTeVeVKsrtUxIthSVln4tLaxWeh5/qBT49drSk\nMaJeXI7f0o+gdXUhNjx75185Wd8d6UCE+SZuc2apHMMQOPePN6HvftVXcN8T\nNKDeYLn+XekgrVYsru2kAhAXB7hpPChFiloltGuIZWt5WdYnPj2RMtAfQMF3\n23cVectb4xQXnQILqmCfhYJI6T68yYwgjr7+GYhJdi7CTD6UhRBCKRfbv9F7\nFHUX1VKxEs3HxH/ie21nHlugspFz4Qjs4qbCRnwc0odeHSEWs0Yj91zRDFqt\njTsIqW62TeRnxGbsGZEOOvUAijDdR6qjEMQOS7gWKrGEK+PoO9e5hRaEJPd6\nADO22QIta7k6bwJNKQnO9bZ9QEcCA6dhaJ+RTqETccRfZkCdafROP4KzHg38\ndCQj\r\n=MmF6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWcfbSwEHq5fwM8TSIQBUsZW4X6xTSjZY/wcdyVUH3YgIgezAuybeaLnYEdYGaWS4/O21QhFlbhprenhX35KBeeWg="}]},"_npmUser":{"name":"webreflection","email":"andrea.giammarchi@gmail.com"},"directories":{},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-cool_0.0.0_1628096457981_0.7387841662310122"},"_hasShrinkwrap":false},"0.0.1":{"name":"p-cool","version":"0.0.1","description":"This module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0).","scripts":{"build":"npm run rollup && node copy.js && npm run size","rollup":"rollup --config rollup/index.config.js && rollup --config rollup/poly.config.js && rollup --config rollup/min.config.js","size":"echo 'Default'; cat index.js | brotli | wc -c && echo ''; echo 'Poly'; terser poly.js --module -m -c | brotli | wc -c && echo ''; echo 'Min'; cat min.js | brotli | wc -c"},"keywords":["custom","elements","behavior","builtin"],"author":{"name":"Andrea Giammarchi"},"license":"ISC","devDependencies":{"@rollup/plugin-node-resolve":"^13.0.0","rollup":"^2.53.1","rollup-plugin-includepaths":"^0.2.4","rollup-plugin-terser":"^7.0.2"},"module":"./esm/index.js","type":"module","exports":{".":"./esm/index.js","./behaviors":"./esm/behaviors.js","./min":"./es.js","./poly":"./poly.js","./package.json":"./package.json"},"dependencies":{"vanilla-elements":"^0.2.1"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/p-cool.git"},"bugs":{"url":"https://github.com/WebReflection/p-cool/issues"},"homepage":"https://github.com/WebReflection/p-cool#readme","gitHead":"793085b384d4c7c73fa18ed703246827ce71d716","_id":"p-cool@0.0.1","_nodeVersion":"16.6.1","_npmVersion":"7.20.3","dist":{"integrity":"sha512-XMT8lHwyllAqdzvyuFXgC5JpcK0OaB7nX7B6ednYv2otabWYD801kLTk9lb6R/JhxTomwhRP/c8W37E+VFiF9w==","shasum":"d15390cc7bbfad7f0fb9c0fcf77ff84b54d68403","tarball":"https://registry.npmjs.org/p-cool/-/p-cool-0.0.1.tgz","fileCount":9,"unpackedSize":31524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDViJCRA9TVsSAnZWagAAnjAP/An8UBTzBHZDz2B3NCaf\n9nbdo8aKCLEy1NbE8i5GP7QZKpokM35tsCuZ5eYGyVXe3MBqkl1eNw9MyXta\nlyxYpLXXNXarAI5wbl8ResyYiKVkUedtiuuj2KUJzEniZU+P6GEnlDFQQx8O\nzjyBbsBFeFXGyDTylQ2u6UIvTZ2ovslGgKe253br2quMUv2cJP9aOQlBw17X\nSpdNcGbh745F8s3boqfonN/u6N6CaseXkVs37OCBt7T1K75O7tMUt5PXzBfm\n396SYDY3wdRNj65hiQ77yHhZtiFkD5Int2ma251rKfD/3cdW0w0Nl9fgQgae\naNuYMVyaGbxufNNkoPlfxreD+EJ4lukASgrRUbkDWI5O2z2iQKK7P+JoTFUn\nc1j8squrWaXDkm3xmD6obkyvkezyu4d+iI1MRHlU9qj1qVRJD4bNLL7lIxOV\n/aNbk2KwBzFTD7BZLa4Ij6dLjq+vp3+xIlaYkSnlnYGDmv+fAz5fxGzjsTlB\n80lP/kfqAKghU3lJLRtDB992ylsB4a7BiuGZahqLns/O4TSUp2q8R/Id3OD6\nPEp6uHtVFE7UzXu/7pkf2UTfuySZlhp5boBP1NFHrcHi48dNyaiPsUb0HgPt\nyLwUBooUX2H/lX1TOy8MVxGPbqfDh2pnEDQ1qVDdEBdXF4i5W0SDLs5sV0Na\navG7\r\n=uRMu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjXC1flapR2Cr/hgJ+8XQ6M26sh9xfFbreMRCVF00SEwIgU4gnCAZeX5PUnAwehMtcdgfGHOn1QLa1VFOwfi37jmI="}]},"_npmUser":{"name":"webreflection","email":"andrea.giammarchi@gmail.com"},"directories":{},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-cool_0.0.1_1628264585401_0.789236669292364"},"_hasShrinkwrap":false},"0.1.0":{"name":"p-cool","version":"0.1.0","description":"This module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0).","scripts":{"build":"npm run rollup && node copy.js && npm run size","rollup":"rollup --config rollup/index.config.js && rollup --config rollup/poly.config.js && rollup --config rollup/min.config.js","size":"echo 'Default'; cat index.js | brotli | wc -c && echo ''; echo 'Poly'; terser poly.js --module -m -c | brotli | wc -c && echo ''; echo 'Min'; cat min.js | brotli | wc -c"},"keywords":["custom","elements","behavior","builtin"],"author":{"name":"Andrea Giammarchi"},"license":"ISC","devDependencies":{"@rollup/plugin-node-resolve":"^13.0.4","rollup":"^2.56.0","rollup-plugin-includepaths":"^0.2.4","rollup-plugin-terser":"^7.0.2"},"module":"./esm/index.js","type":"module","unpkg":"./poly.js","exports":{".":"./esm/index.js","./behaviors":"./esm/behaviors.js","./min":"./es.js","./poly":"./poly.js","./package.json":"./package.json"},"dependencies":{"vanilla-elements":"^0.2.2"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/p-cool.git"},"bugs":{"url":"https://github.com/WebReflection/p-cool/issues"},"homepage":"https://github.com/WebReflection/p-cool#readme","gitHead":"a9debf58ee80f73af4f47744a6eaf2e181c5fe32","_id":"p-cool@0.1.0","_nodeVersion":"16.6.1","_npmVersion":"7.20.5","dist":{"integrity":"sha512-+JDfoPBdo2blu56c11T1/Y7xMoSYdwlcOLnUJ1EvQvGTqLoKzA7zKfxcgl2O20YSUiQ4rxvjwu5HkfE8CT9avQ==","shasum":"1641c747d5f969d580221cb1d72689746ebc217e","tarball":"https://registry.npmjs.org/p-cool/-/p-cool-0.1.0.tgz","fileCount":9,"unpackedSize":35033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhD6pYCRA9TVsSAnZWagAAyMEP/3Tlg1fAg6FkpuN1iw02\n04z4oYQJAPGivVdvxQhokeD5+ussgwn7rhoB1S6QI8iU3KMyWN1aBO8NeTrY\nwxJoZ2GCR6mlwLCDbMBb7mvQPQoWzGGDmnKUOcAp80LdSNx4CNK6ULG5QNMS\n9NR0/0MgnSvvTZzBiLR5WDQWO4bFuMN6glJL3Hh/of95jAefkvd6vXfiFCNz\n23pxvu4WK8574VRjB1N4l0NQMHBLIb68qKXkBtQvorP9ub4SeR1Y2IQB+kIy\nZtpJ5Jv9aKKyPgQzUFwNG+ZiWjdFXBPxUiLV3G3TVADKe0YTcWHA8tnigx6m\n/kzw7sAxgOB+AIg09F+0ivLvAC1m6qidduy2jvlhPsIImvReCU0yIp3U+bWI\nm7XtZ0TLqrA5rTQOpA4PyJsi7wvv9QUW4UMm4btvn/rU9r4rBPiduGIpgzrh\nTN4exYwTrYglOeRWvIRdtiohqr8sFAffHYLqfEgFrNxIWZKmY0ish3J+9F5h\n8uN7ZDaiCYqvd6qRLs/GUcSa9Gn5FufVuA9JprRVsY2ZDKHMKwgdnU0aVjmW\noNbvlJX7Dafh7JmT2JlwlxIFBgsjVxLlQa4E+g1uW7dtjVSW1Ur/xb+ZPw+/\n/GRWMOCW++/oFVXt6uCBQhKmt3pEXgtXjJfyYmQPkoLtEa0G7KIk0d2mEAs4\n0rVI\r\n=bNrq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzQaWvdEOC7Ob2BDZ4T5qUAcIzwhQLcFgZHg0/p1gwaQIgdstec7x/ZfkNoeCSL+oLiFiD9YylWTBg9jCFBh+sJeg="}]},"_npmUser":{"name":"webreflection","email":"andrea.giammarchi@gmail.com"},"directories":{},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-cool_0.1.0_1628416600630_0.9619554916078523"},"_hasShrinkwrap":false},"0.1.1":{"name":"p-cool","version":"0.1.1","description":"This module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0).","scripts":{"build":"npm run rollup && node copy.js && npm run size","rollup":"rollup --config rollup/index.config.js && rollup --config rollup/poly.config.js && rollup --config rollup/min.config.js","size":"echo 'Default'; cat index.js | brotli | wc -c && echo ''; echo 'Poly'; terser poly.js --module -m -c | brotli | wc -c && echo ''; echo 'Min'; cat min.js | brotli | wc -c"},"keywords":["custom","elements","behavior","builtin"],"author":{"name":"Andrea Giammarchi"},"license":"ISC","devDependencies":{"@rollup/plugin-node-resolve":"^13.0.4","rollup":"^2.56.0","rollup-plugin-includepaths":"^0.2.4","rollup-plugin-terser":"^7.0.2"},"module":"./esm/index.js","type":"module","unpkg":"./poly.js","exports":{".":"./esm/index.js","./behaviors":"./esm/behaviors.js","./min":"./es.js","./poly":"./poly.js","./package.json":"./package.json"},"dependencies":{"vanilla-elements":"^0.2.2"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/p-cool.git"},"bugs":{"url":"https://github.com/WebReflection/p-cool/issues"},"homepage":"https://github.com/WebReflection/p-cool#readme","gitHead":"226f24ff71435b1fe9bb5cf3ba1d539da9054eab","_id":"p-cool@0.1.1","_nodeVersion":"16.6.1","_npmVersion":"7.20.5","dist":{"integrity":"sha512-P3c1FuOqqJnDKCD+QZ8Fi4VmMCm1IGAKdgU6U8bH9rCDGHWwdeTkKI0ajDjsr5p1W4iS9U484X05jlXc+jjIfA==","shasum":"79f36a76dac0752b4d5ff8c6f81e0ccf9b361538","tarball":"https://registry.npmjs.org/p-cool/-/p-cool-0.1.1.tgz","fileCount":9,"unpackedSize":35128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhD6xFCRA9TVsSAnZWagAAdmoP/jJC67NBi35ogLYm8gqO\nb0sVnKXSb6o4sOESmBBvAojxQii0m4JDNmGbCG+vZXhg/V/A8t6d53XMdoux\nwAy/zFo7WSy580HRJLx1AD5Qy4vKze6c8WRgEqQYAknbVKxy/+00O8VqJJ2K\n/aC6RKbGMutlQOZ2PeqjYo8ZIONa/G0xlkglKv3fcOEB6V1Fdg6Du4AzcoT/\nyb2uW6EXY3UVxtgPG+8KCIXgCobDdyQ2sttQ+WlkDqo2o5LFoPuYbVYVo4by\nGbb3k/tsUDDibJXc2uYpJoC4J1i0hZ7V2rjoYvaoxmzGoRx+TmP7QYiWuxsH\nB5CL4dRj1b4WMrBnX0h5ZExhDGxLld3JOOW1qBA84ybyvGdFK95r1xdtez4X\ny92ML3qNQhvQjon2HDOwTpGtri2mlV4fLOhojib1eXHKBJ2PNU2eTspSO0ht\nkCEbJMqYm2sfUpxaF8zVu3hhDZpxWOE+iNe7aWirkYtfpt8tAUoy9pZzvytN\nOWwgwqveYONFAw+2yeG1NZgf8WP3OFVGVHQgSoAC8s9B/0F0PgsA0YIBjBWP\nUcIxdgAQP3uY4CTSuJIfmWdojMXq3bMgyRDf7spAHjncqPBFgxvbJVMYM3Qf\nb3DZHz/y8i2ZeOhmMRYwBx3ckMFqCPShcT1bBTWycvXWB86MgNWKMZAxFlhI\nxwM7\r\n=8J/D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3BJUS+6LxWSHm3GC807vT8cBjmY3fPCKNzykgJcVN1AIgOKIcguGTC8QRkpanY49uh66I96BsBb7opcN0jc1e/nU="}]},"_npmUser":{"name":"webreflection","email":"andrea.giammarchi@gmail.com"},"directories":{},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-cool_0.1.1_1628417093368_0.24403757645902568"},"_hasShrinkwrap":false},"0.1.2":{"name":"p-cool","version":"0.1.2","description":"This module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0).","scripts":{"build":"npm run rollup && node copy.js && npm run size","rollup":"rollup --config rollup/index.config.js && rollup --config rollup/poly.config.js && rollup --config rollup/min.config.js","size":"echo 'Default'; cat index.js | brotli | wc -c && echo ''; echo 'Poly'; terser poly.js --module -m -c | brotli | wc -c && echo ''; echo 'Min'; cat min.js | brotli | wc -c"},"keywords":["custom","elements","behavior","builtin"],"author":{"name":"Andrea Giammarchi"},"license":"ISC","devDependencies":{"@rollup/plugin-node-resolve":"^13.0.4","rollup":"^2.56.0","rollup-plugin-includepaths":"^0.2.4","rollup-plugin-terser":"^7.0.2"},"module":"./esm/index.js","type":"module","unpkg":"./poly.js","exports":{".":"./esm/index.js","./behaviors":"./esm/behaviors.js","./min":"./es.js","./poly":"./poly.js","./package.json":"./package.json"},"dependencies":{"vanilla-elements":"^0.2.2"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/p-cool.git"},"bugs":{"url":"https://github.com/WebReflection/p-cool/issues"},"homepage":"https://github.com/WebReflection/p-cool#readme","gitHead":"4cdfc190bc6b55640175df67026a25e0af315276","_id":"p-cool@0.1.2","_nodeVersion":"16.6.1","_npmVersion":"7.20.5","dist":{"integrity":"sha512-isAgjdvOCgCByzGevUxQeqdupysiR7jEwmzDndO3JQJsCDf6DwD3HjX3XuoXsJmD6/reUd8r3CwElRKmz1h/IA==","shasum":"9ed1ce05aaa4be1a1a7c922fa0b4e0777abfa6c3","tarball":"https://registry.npmjs.org/p-cool/-/p-cool-0.1.2.tgz","fileCount":9,"unpackedSize":36901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhD7CWCRA9TVsSAnZWagAA040P/0GWDrxT25Y81dvScm+D\nhnVdbAdL4Vxwt4cmG4r3RafTOAnpswFoHePkJKdhxV4aKST1pnXwgJHSEK7+\n6yivlWI07FdhITNF9s0iVgFq5FYsu/pBfB4Hq9epu/N1T6nFIjVXrSWe2nBB\nAh/pc6UtbLXbuKO2nGvgoBXhbrxAYMmw3vZjlpFoRih0No4XvH3ssqtnROOF\nOs9QpUXTO/x9L0MMzTavNQfJv4QkTxpEjeMntxEXJt2uF+vBwavuDDOweql0\npzOFUFfpCCb3xrM3vz2lf8IGZpEXcDBYJcNUyJLyp8Gb7lfmKPJp79jd8Hyb\nmnb1XHLJMYOPSRkJ531LFr6tfRoDRxqCZs6XrZiaJwLikoyPDAcc+s9NZKjG\nmMMuVZ3JD4JwDqZqpjItdhqP/2a6Vrv6ab6ZvwBoE7zJzXXTYXdzISGUl9bo\n2erlRGMYKDuakNDcTGG7bHk8Afu8DR3x33erTupyQ5N6lfSgF9D+1aYIMd9s\n0oHhCn2Tl0REpAyUcTdP5Rs/soTfYcvzcTIg2QiozOoVytSnUJad6+WB4m/N\nevJ6A573Yb1//q5zvyVjn+rNIqL+57Hn3h3Pdrke/bHCzsaNKfcOzqo6aRRc\nbm/XJd+fSClLztqkjvcSGIcENmVvA3F+4cmtDV9GN25p50bp6CL4ztABZbFh\nz3Ay\r\n=3Gko\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCw0ZcavHyZIljPnBpspuEtddg6zIo22FJfERnMmmimIwIgGx/bMuyQ2SnMs3ofR+YtyCr4z6hTCmZBvd4YZNpE97M="}]},"_npmUser":{"name":"webreflection","email":"andrea.giammarchi@gmail.com"},"directories":{},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-cool_0.1.2_1628418198574_0.01147615704723437"},"_hasShrinkwrap":false},"0.1.3":{"name":"p-cool","version":"0.1.3","description":"This module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0).","scripts":{"build":"npm run rollup && node copy.js && npm run size","rollup":"rollup --config rollup/index.config.js && rollup --config rollup/poly.config.js && rollup --config rollup/min.config.js","size":"echo 'Default'; cat index.js | brotli | wc -c && echo ''; echo 'Poly'; terser poly.js --module -m -c | brotli | wc -c && echo ''; echo 'Min'; cat min.js | brotli | wc -c"},"keywords":["custom","elements","behavior","builtin"],"author":{"name":"Andrea Giammarchi"},"license":"ISC","devDependencies":{"@rollup/plugin-node-resolve":"^13.0.4","rollup":"^2.56.0","rollup-plugin-includepaths":"^0.2.4","rollup-plugin-terser":"^7.0.2"},"module":"./esm/index.js","type":"module","unpkg":"./poly.js","exports":{".":"./esm/index.js","./behaviors":"./esm/behaviors.js","./min":"./es.js","./poly":"./poly.js","./package.json":"./package.json"},"dependencies":{"vanilla-elements":"^0.2.2"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/p-cool.git"},"bugs":{"url":"https://github.com/WebReflection/p-cool/issues"},"homepage":"https://github.com/WebReflection/p-cool#readme","gitHead":"9c0c0ae2ebc86c73ecb5ebd2f8ea79fc955471c8","_id":"p-cool@0.1.3","_nodeVersion":"16.6.1","_npmVersion":"7.20.5","dist":{"integrity":"sha512-zoD+eslxWKBtzhfUWFmGdR1HL05j1Evc+5gl5SzkLgjGX3PSwF3gPoZJOpPJiU7nF7CbKVTnC+24qFsFvt6INg==","shasum":"52fd34f4895dc78dd31b7eaaee34d36ca393d2d5","tarball":"https://registry.npmjs.org/p-cool/-/p-cool-0.1.3.tgz","fileCount":9,"unpackedSize":37026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhD7H6CRA9TVsSAnZWagAAJYwP/3xqqdHNmACDSAT2L+sG\neu48oP5f+f9dwur8Ab0x1e+cJ7G7G7/KUAfy4zTo8Zy5wM5vID+b/WxfKICR\ncltNcYQv8GDnVBJeSBF1UsFIWOZ8IWAdP40EY5PcRWUJ2Xug/KAGUrLlYrm4\nYVVpqDkpb5biiGI47rB+D8Fg4wC1yGwrwBAdiIJE04PThbIoaZ5oOx00zgFM\nfYNZgktM45v5BDjLCmZkJG3AJmCnl7mvDmH3uPc/sqtQEhnerEmlPpsZcVJo\nOks0P0xhf9Kj8Y3AuH0fJhJiSeHmK+rFU5zKsMu522WFRRE4K8EhwXq3vxWs\nZMEOHQtWdiCKUnTKkR8BqGAut9Ze4ZKBBOAl59Y4ZuYEy0D/luzwzMDbnCNx\nYi9GbqiHDhXYCg7DFRaZCnht5iu/qkH9IW02bnXZ1RCnEZpAwggk7sRg5ysE\nUAFkhbwbxZGOdE06clKXeS2H0MBtAU5FuhvIqMibpcy+UjOr+4Zt2dClZFMQ\nnidY+YYp84kvzQFtWeQWAxH8Q5BwLK+108moHNbDkkjloqiUNwj7DmBGOxxD\nl+kR7j5TtL1YRO8usuh4knaS5keY6wtAkJLG8PekmEYYsPjs4Fmjvd6wWzoC\nt3WL9oIDwT67l0GweYwedRWd7PmKOiEBJKbDDsLSb1hZJ7n2ERIcc9GTdzsa\nU0a0\r\n=Ai6R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8Q+2DISlq4v99bpXXrCTFoWa2Fy3ksfw8EzDe9KmY3AiANNOccc81ox9UjvgrMZGIIftxpCmqo3NNIsURHfAC9ag=="}]},"_npmUser":{"name":"webreflection","email":"andrea.giammarchi@gmail.com"},"directories":{},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-cool_0.1.3_1628418554175_0.3443188849184986"},"_hasShrinkwrap":false},"0.1.4":{"name":"p-cool","version":"0.1.4","description":"This module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0).","scripts":{"build":"npm run rollup && node copy.js && npm run size","rollup":"rollup --config rollup/index.config.js && rollup --config rollup/poly.config.js && rollup --config rollup/min.config.js","size":"echo 'Default'; cat index.js | brotli | wc -c && echo ''; echo 'Poly'; terser poly.js --module -m -c | brotli | wc -c && echo ''; echo 'Min'; cat min.js | brotli | wc -c"},"keywords":["custom","elements","behavior","builtin"],"author":{"name":"Andrea Giammarchi"},"license":"ISC","devDependencies":{"@rollup/plugin-node-resolve":"^13.0.4","rollup":"^2.56.0","rollup-plugin-includepaths":"^0.2.4","rollup-plugin-terser":"^7.0.2"},"module":"./esm/index.js","type":"module","unpkg":"./poly.js","exports":{".":"./esm/index.js","./behaviors":"./esm/behaviors.js","./min":"./es.js","./poly":"./poly.js","./package.json":"./package.json"},"dependencies":{"vanilla-elements":"^0.2.2"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/p-cool.git"},"bugs":{"url":"https://github.com/WebReflection/p-cool/issues"},"homepage":"https://github.com/WebReflection/p-cool#readme","gitHead":"43839960e9f4e1461b540af1032159cde2b9df01","_id":"p-cool@0.1.4","_nodeVersion":"16.6.1","_npmVersion":"7.20.5","dist":{"integrity":"sha512-IWpryBqO2m7nlhuykfhiRN5R8qB7aV6OQS1YmArBUMCCsyg/5UB4PmEaOeRBpqG8HthddkcA5xF5BIBnGaPvaA==","shasum":"040a8b4fb358680103f98bc8672e43805844057b","tarball":"https://registry.npmjs.org/p-cool/-/p-cool-0.1.4.tgz","fileCount":9,"unpackedSize":37848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhD7h2CRA9TVsSAnZWagAALmAP/jN+j4uyGOVF2wG/HTLV\nZpONFlYAELG8AA2TWBBTlifiGxN6NHD+F4yhZu8JaIe2RzN//FQlSgoH82xr\nBrJpu+h0Bvae2Ih5sWaZ9u+nbzma67RH8wDjCqOoVrRUfJAcmyBhVFGuLa80\nTXnNLVadnviiJ7fgMnQxAflxdth3mNpyADhIUHLRwSSQUBlchPoxKFwM2bMd\ncp/OMuOf7yn2x9RW3x/mEpekU2V63uQ2FDmTirlmgDI8S7rCadmxlU6LGOdf\nmBhWAFd24DOW5gd5xp9PRpVv6acHQLbQA9ZiwcaprviWOXP7PRSvQnw5XMa+\n1XvjSZHymjE+5Ht8M4A5DbQ7vM2GS4hKsa2b2k0XaIi1c2zoo6+LdKoh8um5\nz3tutgZ4i6eyHuCA4tYOc8IUGjfW57apP6Wi2AGnLUc1nEJ2ZPWWrFHlcJzz\nVMPVj0gTyeAPG/djStkCPKx2sgtQAHMdcQMYmH97+cd2pI39bNYgRMYH8NiX\nEkZegIim+MhWqWcfmKPdellf48ePuD4prR2YEr/4XlJcWo2yRDT997WQ+hyE\nAokon86rJV9BFebuYERLqXi8yftGh2HYrX4jCCvJBrP9pB4k+CJuVaQ//KmO\nBmCmEg3m9Jq/yi1LY7DhuTlyRISII+L3zFx/4SuNEB3V8aVTAXLzcOCPQjXM\nFK/5\r\n=zGQ1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC+mU/Wp0Yh+Fq6QGCSI5Qt6E9ZjC/SVnA2iaaK3vY9SAiAwsm4gEZItkwWzJ/M5lKkYMOOujhY/26ZACKTfoS3nmg=="}]},"_npmUser":{"name":"webreflection","email":"andrea.giammarchi@gmail.com"},"directories":{},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-cool_0.1.4_1628420214586_0.7995251249369237"},"_hasShrinkwrap":false},"0.1.5":{"name":"p-cool","version":"0.1.5","description":"This module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0).","scripts":{"build":"npm run rollup && node copy.js && npm run size","rollup":"rollup --config rollup/index.config.js && rollup --config rollup/poly.config.js && rollup --config rollup/min.config.js","size":"echo 'Default'; cat index.js | brotli | wc -c && echo ''; echo 'Poly'; terser poly.js --module -m -c | brotli | wc -c && echo ''; echo 'Min'; cat min.js | brotli | wc -c"},"keywords":["custom","elements","behavior","builtin"],"author":{"name":"Andrea Giammarchi"},"license":"ISC","devDependencies":{"@rollup/plugin-node-resolve":"^13.0.4","rollup":"^2.56.0","rollup-plugin-includepaths":"^0.2.4","rollup-plugin-terser":"^7.0.2"},"module":"./esm/index.js","type":"module","unpkg":"./poly.js","exports":{".":"./esm/index.js","./behaviors":"./esm/behaviors.js","./min":"./es.js","./poly":"./poly.js","./package.json":"./package.json"},"dependencies":{"vanilla-elements":"^0.2.2"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/p-cool.git"},"bugs":{"url":"https://github.com/WebReflection/p-cool/issues"},"homepage":"https://github.com/WebReflection/p-cool#readme","gitHead":"078554833a8ba79076ff1d15f5b8f4536aa6ae89","_id":"p-cool@0.1.5","_nodeVersion":"16.6.1","_npmVersion":"7.20.5","dist":{"integrity":"sha512-mciUcMfZPSLfUxf/5F8kKNx1U046fFmDkI+JF+xSfUuNJflN+fnb8PXydV9yTSh+4lIx6zjRz4L/zQOOb4u2pA==","shasum":"2dfcd4155d5524121710cd3ef6358df82ea19f65","tarball":"https://registry.npmjs.org/p-cool/-/p-cool-0.1.5.tgz","fileCount":9,"unpackedSize":37852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhD7v6CRA9TVsSAnZWagAAC3oP/A8eiQuC71+EWDhhFMkW\nXwz8DHBQy0wODUcBoe+b9Vjocq6d1rhC4vnYPC/+wlUkNqLRx55z9qzFeV3G\nY0P/JfrARvkPb4gEVnHkQFS6oUutXGTlysA/R5zXI48Ox2y/rOzDhfBD7qY5\n/0FMUq733aLpdScc3Qs9QttDgoyXlPxolSasZXrY4E+5X9DFZOhQIOO1qpxp\n3gtN9VwxYMSFUuT+oeyxc5VcYgLnYfGEHZZ3f2kN8GJj3Ug4ApcIjgnSO+GH\nQlQqVxKOYaGkixeX6DprHm2MC6UFmkMiqBtw7tZa2WkuPMs1Jx72qDA6AZn8\nB+L9dGvqfgkk9toDHhEpVn5Qdwcrazt6IeOvd8GTMqlPlV5PeFF9WusWAEmM\nspDGW7ohAE9QnCBARTyVlxHXTrb6XpsqhMaFkaSZRuqhfi1m2LLkeVp71y8U\nrkDVAA4QcgQlLXxYrc9v1CXyjjDvPbL6u5/WYN3Dhe4lLHqU9t2wPq++ArgC\ntlFD+lsgjeT9icZHzE9ltYukrUyf7LfeBDsZ4JFjJ+to9vqRYFo9W9D1N1tC\n2BEg/iFAig6K6p6JGt7NOlwpFB3d3MSws6IkN0UT5owB1NA8DvRBqZML9Tk1\nVRgNto/Do3PaJj6PgszCc0hL5mSWAKuuCLthtmmSwC6tyTTnwPIwHev2HNzG\nrt8O\r\n=nerK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICfa8ByfM5KPBoI0wYfkpcyPTdwx2gm66mYFnGerOBTHAiBQXm6oslRlwDZDYeoa3bFiQPvpPc7Nm7E1l7nWStO47Q=="}]},"_npmUser":{"name":"webreflection","email":"andrea.giammarchi@gmail.com"},"directories":{},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-cool_0.1.5_1628421114763_0.35974294781212257"},"_hasShrinkwrap":false},"0.1.6":{"name":"p-cool","version":"0.1.6","description":"This module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0).","scripts":{"build":"npm run rollup && node copy.js && npm run size","rollup":"rollup --config rollup/index.config.js && rollup --config rollup/poly.config.js && rollup --config rollup/min.config.js","size":"echo 'Default'; cat index.js | brotli | wc -c && echo ''; echo 'Poly'; terser poly.js --module -m -c | brotli | wc -c && echo ''; echo 'Min'; cat min.js | brotli | wc -c"},"keywords":["custom","elements","behavior","builtin"],"author":{"name":"Andrea Giammarchi"},"license":"ISC","devDependencies":{"@rollup/plugin-node-resolve":"^13.0.4","rollup":"^2.56.0","rollup-plugin-includepaths":"^0.2.4","rollup-plugin-terser":"^7.0.2"},"module":"./esm/index.js","type":"module","unpkg":"./poly.js","exports":{".":"./esm/index.js","./behaviors":"./esm/behaviors.js","./min":"./es.js","./poly":"./poly.js","./package.json":"./package.json"},"dependencies":{"vanilla-elements":"^0.2.2"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/p-cool.git"},"bugs":{"url":"https://github.com/WebReflection/p-cool/issues"},"homepage":"https://github.com/WebReflection/p-cool#readme","gitHead":"756a2b63ef102c11a54cf2f4c667bdb20a2773cd","_id":"p-cool@0.1.6","_nodeVersion":"16.6.1","_npmVersion":"7.20.5","dist":{"integrity":"sha512-KiITicZKe4GYoV3Sgd3DWbbIA41YWEjgXOjfEaENVUj50K43bY1egt+Je9HPTH1zZgPZs7E16BIQsq0OA7E5aw==","shasum":"370da7141b03ea573dc12b551e2c0c0a51b66c31","tarball":"https://registry.npmjs.org/p-cool/-/p-cool-0.1.6.tgz","fileCount":9,"unpackedSize":37905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEOhMCRA9TVsSAnZWagAABFQP/RGSk7dLpfykw3bV3a2O\nvTE8YF//A53xsxWzLzDoCRzz+3QeumIUpAw5PlvKcvmtVbLhVJZQWb4Gx7Ru\nsMHeW9Pn3o0MN0QydN7owl9iqWEcR0R4oENf+xk6URRxN8XU+9T9c33P4ZaO\nEwFl58ifm4IYYVlO+hVYjuF/tQz7xKnY5wKFokaJQrYCZPueaq5aWxJD3FmP\nlRurimIAidywROgdhXn3lEFaEPfChBq1tc23JbFhSjGoNLIp144TSwh2Pv7e\nAEJJKutlxQvSAD5GbDRasHM8kn/+xbMt40nS9WeN0fqFXZdm0uM5nETISnhM\noAROni+sF2wd7v/Fw+EUPA3pldenDVCeVaqB7BrTjzn9vNLnYmSV1gTK1EVA\nRdhKylsAlQBVMVBDCMkVxxrcO3dwQLHCICmMjTxECUVyaOl++ItgsCXT3oa4\nmkX0hkARoW+CHU+6F39T08pcrGcxLQ/buBZS2T2Jj24LlUCr6ds1bA/7D6Cn\n6CKB4sTx2nnrYduBdkdXBhU2lDToeYXfv2KuZwFQywi+QT/n/ISJb6aTVQvt\nDsVQBRzTBm1ThKWgdMHup01HnOFN7bqsfb0OucHWEbZVdmCMCiYOJFU7LSru\nAbK0ckRq8NkjfVtKzp+K6PL09thXY2NBJmqNctL5/zIhEbsFPxVYbGwUqXic\np1A1\r\n=aq+o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCim5wOt9A2FZL0S3W5+Fv7xPMR7oakeFNFgejQhE3PzQIhAM5kz2RUNmUCTDxlQ0crQfpQqcAuUxRcF65gu2w6YhBG"}]},"_npmUser":{"name":"webreflection","email":"andrea.giammarchi@gmail.com"},"directories":{},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-cool_0.1.6_1628497996749_0.025964385165421433"},"_hasShrinkwrap":false},"0.2.0":{"name":"p-cool","version":"0.2.0","description":"This module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0).","scripts":{"build":"npm run rollup && node copy.js && npm run size","rollup":"rollup --config rollup/index.config.js && rollup --config rollup/poly.config.js && rollup --config rollup/min.config.js","size":"echo 'Default'; cat index.js | brotli | wc -c && echo ''; echo 'Poly'; terser poly.js --module -m -c | brotli | wc -c && echo ''; echo 'Min'; cat min.js | brotli | wc -c"},"keywords":["custom","elements","behavior","builtin"],"author":{"name":"Andrea Giammarchi"},"license":"ISC","devDependencies":{"@rollup/plugin-node-resolve":"^13.3.0","rollup":"^2.75.6","rollup-plugin-includepaths":"^0.2.4","rollup-plugin-terser":"^7.0.2"},"module":"./esm/index.js","type":"module","unpkg":"./poly.js","exports":{".":"./esm/index.js","./behaviors":"./esm/behaviors.js","./min":"./es.js","./poly":"./poly.js","./package.json":"./package.json"},"dependencies":{"vanilla-elements":"^0.3.6"},"repository":{"type":"git","url":"git+https://github.com/WebReflection/p-cool.git"},"bugs":{"url":"https://github.com/WebReflection/p-cool/issues"},"homepage":"https://github.com/WebReflection/p-cool#readme","gitHead":"037f96ec4cf91f4a49ab0a479684f4d8191441bb","_id":"p-cool@0.2.0","_nodeVersion":"18.1.0","_npmVersion":"8.8.0","dist":{"integrity":"sha512-7Ux+Vz8S3yRdz2ugQt5cSa7LgiTUvvp7JSMm8X63Rv4wwe8NsfrGnoQNY8c5yIHul5DjAAN7tYvDL72HCJ4juA==","shasum":"a2311d6ea7cff602cf201f3c71a1647317c00a03","tarball":"https://registry.npmjs.org/p-cool/-/p-cool-0.2.0.tgz","fileCount":9,"unpackedSize":32151,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDt8MhqP/ohj9zelMbcYqumR8QW5l5UOh6uLSSf/vi9ZAiBgcmOaWlgwtUkXHQGho3NPrzXHEBRv7d0NgsxUSuqdRg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioaB5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxABAAoFGvOYSPPXHGa/90NcwWGWFy8rS8r3auSnX6CIhffzJYiZgX\r\nvslt+kRh2YLN7PFKLwdsm/lSw0TYOj9F12qSKnXMTB62l4hc5KVweYHk92Eu\r\nqXehgGgG/tYrOKdsuqOIvMQcC1WdQkwnUuA4c6yYT0PSpD7ZAWmTZiYWulOD\r\n+EmuoTeUuBoukdEm+z3igqNrSUf6sRXx2PUxdiU/MlDTfOYJvupu2kKO7XMk\r\nkXjxTBGvm3JD3oxHnmrI8xeYDOQR2SYzBpmBgvcUiUcAX43refd29MYmhs8t\r\nvrtaQqYv1crT/mL2Z3OfqBoRUL/UaWFyzzVzVHrLfJP0C6afz97agAJUW/R5\r\n/UlgP9Lwnhl+cmuAE3jRua+kKGj3u+eLjygcZrF4ractWQ9Jcs23W5zocLwf\r\nsPrtw3jEb0+DVCi+hcLLKYe2VVdxGYAqIrjr8dYAKAVytiV4q3P9t403nP3Y\r\nsUmOwVEsv8FJ7eSjvTXrCBCAED4XW95E1qovOmwTmpIH8Ia0bMeRa5ycGU2L\r\nw20jM6FHBY+qChrRkHKCOGjyxzPuJiqoa143+/hjZH7O1GfM7jhajVkadgYb\r\n3o14XNSqefnz2d41ycS5df/CjyNoOzWwfW9NAzk7O6px302qTnaqxQ0c0M7F\r\ndljSVqhdq7o00eqCtS8D9GBQu7jLJFVZ/QI=\r\n=1o1i\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"webreflection","email":"andrea.giammarchi@gmail.com"},"directories":{},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-cool_0.2.0_1654759544786_0.8179222744415815"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-04T17:00:57.981Z","0.0.0":"2021-08-04T17:00:58.143Z","modified":"2022-06-09T07:25:45.118Z","0.0.1":"2021-08-06T15:43:05.553Z","0.1.0":"2021-08-08T09:56:40.834Z","0.1.1":"2021-08-08T10:04:53.529Z","0.1.2":"2021-08-08T10:23:18.794Z","0.1.3":"2021-08-08T10:29:14.307Z","0.1.4":"2021-08-08T10:56:54.708Z","0.1.5":"2021-08-08T11:11:54.958Z","0.1.6":"2021-08-09T08:33:16.927Z","0.2.0":"2022-06-09T07:25:45.054Z"},"maintainers":[{"name":"webreflection","email":"andrea.giammarchi@gmail.com"}],"keywords":["custom","elements","behavior","builtin"],"license":"ISC","readme":"# Pretty Cool Elements\n\n<sup>**Social Media Photo by [Jamison McAndie](https://unsplash.com/@jamomca) on [Unsplash](https://unsplash.com/)**</sup>\n\n\nThis module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0), and it provides element mixins/behaviors, through class names, without names clashing.\n\n\n### Features\n\n  * it addresses every single point touched in the Medium's post:\n    * no name clashing\n    * multiple mixins/behaviors attached/detached at any time\n    * native Custom Elements builtin callbacks, associated to mixins/behaviors\n  * it's **S**erver **S**ide **R**endering compatible out of the box\n  * it uses all the DOM primitives without needing an extra attribute (bloat-free layouts)\n  * it's semantically bound with element's view (their classes and their dedicated style)\n  * it's graceful enchancement out of the box, based on builtin extends\n  * it provides a robust polyfilled version through [vanilla-elements](https://github.com/WebReflection/vanilla-elements#readme)\n\n\n#### Example\n\n```js\nimport {define} from 'p-cool';\n\ndefine('my-div', {\n\n  // to know when a behavior is attached or detached via class\n  attachedCallback(element) {},\n  detachedCallback(element) {}, // see ## About Callbacks\n\n  // to observe connected/disconnected lifecycle\n  connectedCallback(element) {},\n  disconnectedCallback(element) {},\n\n  // to observe specific attributes (omit to observe them all)\n  observedAttributes: ['some-attribute'],\n\n  // to know when observed attributes changed\n  attributeChangedCallback(element, name, oldValue, newValue) {},\n});\n```\n\n```html\n<div is=\"p-cool-div\" class=\"my-div\" some-attribute=\"ok\">\n  Hello Behaviors 👋\n</div>\n```\n\n## About PCool\n\nWith native Custom Elements, we need to reserve a single name in a shared global registry to pass through the upgrade, and callbacks, mechanism.\n\nWith `p-cool` elements, the registry is pre-populated with [vanilla-elements](https://github.com/WebReflection/vanilla-elements#readme) extends through a `p-cool-*` prefix, so that `<div is=\"p-cool-div\">`, and `<p is=\"p-cool-p\">`, or `<main is=\"p-cool-main\">` are all valid, already registered, builtin extends, that brings mixins/behaviors to any element, and through their class name, as long as one, or mixin, is defined/attached, through the `define(name, mixin)` module's export.\n\n```html\n<!doctype html>\n<script type=\"module\">\nimport {define} from '//unpkg.com/p-cool';\n\nimport Hero from './mixins/hero.js';\ndefine('hero', Hero);\n\nimport Bottom from './mixins/bottom.js';\nimport AutoHide from './mixins/auto-hide.js';\ndefine('bottom', Bottom);\ndefine('auto-hide', AutoHide);\n</script>\n<style>\nmain { /* ... */ }\n.hero { /* ... */ }\n.bottom { /* ... */ }\n</style>\n<body is=\"p-cool-body\" class=\"hero\">\n  <main>Hero</main>\n  <footer is=\"p-cool-footer\" class=\"bottom auto-hide\">\n    ...\n  </footer>\n</body>\n```\n\nTo implement an *element extend*, the `<p-cool>` *Custom Element* is registered too, so that a page could be defined by non-builtin extends, with mixins/behaviors attached when, and if, needed.\n\n```html\n<!doctype html>\n<script type=\"module\">\nimport {define} from '//unpkg.com/p-cool';\n\nimport Hero from './mixins/hero.js';\ndefine('hero', Hero);\n\nimport Bottom from './mixins/bottom.js';\nimport AutoHide from './mixins/auto-hide.js';\ndefine('bottom', Bottom);\ndefine('auto-hide', AutoHide);\n</script>\n<body>\n  <p-cool class=\"hero\"></p-cool>\n  <p-cool class=\"bottom auto-hide\">\n    ...\n  </p-cool>\n</body>\n```\n\n\n## About Callbacks\n\n<details>\n  <summary><strong>attachedCallback</strong></summary>\n  <div>\n\nThis callback is granted to be invoked only *once*, and *before* any other callback, whenever a mixin/behavior is attached through the element's class, somehow simulating what a `constructor` would do with Custom Elements.\n\nThis callback is ideal to add related event listeners, setup an element for the specific mixin/behavior, and so on.\n\nPlease note that if a mixin/behavior is detached, and then re-attached, this callback *will* be invoked again.\n\n  </div>\n</details>\n\n<details>\n  <summary><strong>attributeChangedCallback</strong></summary>\n  <div>\n\nIf any `observedAttributes` is specified, or if there is an `attributeChangedCallback`, this is invoked every time observed attributes change.\n\nLike it is for *Custom Elements*, this callback is invoked, after a mixin/behavior is attached, hence *after* `attachedCallback`, but *before* `connectedCallback`.\n\nThis callback is also invoked during the element lifecycle, whenever observed attributes change, providing the `oldValue` and the `newValue`.\n\nBoth values are `null` if there was not attribute, or if the attribute got removed, replicating the native *Custom Element* behavior.\n\n  </div>\n</details>\n\n<details>\n  <summary><strong>connectedCallback</strong></summary>\n  <div>\n\nThis callback is granted to be invoked *after* an element gets a new mixin/behavior, if the element is already live, and every other time the element gets moved or re-appended on the DOM, exactly like it is for native *Custom Elements*.\n\nPlease note that when a mixin/behavior is attached, and there are observed attributes, this callback will be invoked *after* `attributeChangedCallback`.\n\n  </div>\n</details>\n\n<details>\n  <summary><strong>disconnectedCallback</strong></summary>\n  <div>\n\nThis callback is granted to be invoked when an element gets removed from the DOM, and it would never trigger if the `connectedCallback` didn't happen already.\n\nBoth callbacks are the ideal place to attach, on *connected*, and remove, on *disconnected*, timers, animations, or idle related callbacks, as even when elements get trashed, both callbacks are granted to be executed, and in the right order of events.\n\n  </div>\n</details>\n\n<details>\n  <summary><strong>detachedCallback</strong></summary>\n  <div>\n\nThis callback is **not granted to be invoked** if an element get trashed, but it's granted to be invoked *after* `disconnectedCallback`, if a mixin/behavior is removed from an element.\n\nPlease note that this callback is *not* really useful for elements that might be, or may not be, trashed, because there is no way to use a *FinalizationRegistry* and pass along the `element`, but it's very hando for those elements that never leave the DOM, but might change, over time, their classes, hence their mixins/behaviors.\n\n```js\nimport {define} from 'p-cool';\n\ndefine('mixin', {\n  attachedCallback(element) {\n    console.log('mixin attached');\n  },\n  detachedCallback(element) {\n    console.log('mixin detached');\n  }\n});\n\n// example\ndocument.body.innerHTML = `\n  <div id=\"first\" class=\"mixin\">First</div>\n  <div id=\"second\" class=\"mixin\">Second</div>\n`;\n// logs \"mixin attached\" twice\n\n// will **not** \"mixin detached\"\nfirst.remove();\n\n// it **will** log \"mixin detached\"\nsecond.classList.remove('mixin');\n```\n\n  </div>\n</details>\n\n## About Exports\n\nThis module offers the following exports:\n\n  * `p-cool` with a `define(name, mixin)` export that *does not polyfill Safari*\n  * `p-cool/min` with a minified `define(name, mixin)` export that *does not polyfill Safari*\n  * `p-cool/poly` with a minified `define(name, mixin)` export that also *does polyfill Safari*\n  * `p-cool/behaviors` with the internally used `define` and `behaviors` exports, plus constants, useful to potentially create other libraries or utilities on top of the same logic\n\nThe `https://unpkg.com/p-cool` points at the minified `/poly` variant, useful to quickly test, or develop, with this module.\n\n\n## Compatibility\n\nEvery ES2015+ compatible browser out of the box, including Safari/WebKit based browsers in the *poly* version.\n","readmeFilename":"README.md","description":"This module is a follow up of [this Medium post](https://webreflection.medium.com/about-web-components-cc3e8b4035b0).","homepage":"https://github.com/WebReflection/p-cool#readme","repository":{"type":"git","url":"git+https://github.com/WebReflection/p-cool.git"},"author":{"name":"Andrea Giammarchi"},"bugs":{"url":"https://github.com/WebReflection/p-cool/issues"}}