{"_id":"@auroratide/playing-card","_rev":"2-d0973509206124d6b9c23ec5123e8230","name":"@auroratide/playing-card","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@auroratide/playing-card","version":"0.1.0","description":"Web component for a playing card","keywords":["web-component","element","card","poker","casino"],"main":"lib/index.js","module":"lib/index.js","type":"module","scripts":{"start":"wds --node-resolve -p 3000","clean":"rm -rf lib","build":"npm run clean && tsc","dev":"npm-run-all --parallel 'build -- --watch' 'start -- --watch'","test":"npm run build && wtr --node-resolve 'lib/**/*.spec.js'","prepublishOnly":"npm run test"},"author":{"name":"Timothy Foster","url":"https://auroratide.com"},"license":"ISC","devDependencies":{"@open-wc/testing":"^3.0.3","@web/dev-server":"^0.1.28","@web/test-runner":"^0.13.22","npm-run-all":"^4.1.5","typescript":"^4.5.2"},"types":"./lib/index.d.ts","gitHead":"85a4b02013d595cf91392d375c588eb1fca8c9cf","_id":"@auroratide/playing-card@0.1.0","_nodeVersion":"17.0.1","_npmVersion":"8.1.3","dist":{"integrity":"sha512-i8zqqWCNX0yeSD2zWigEjW3uGoCs6esTV/LoW0QL5PQt6PaPd44VwDRCjXrDDbgUHOBzoyuAwxHv/fPgYpaPgA==","shasum":"ac1e79a42e4f2f4beb61f50a9e0c2563f77ed5bd","tarball":"https://registry.npmjs.org/@auroratide/playing-card/-/playing-card-0.1.0.tgz","fileCount":16,"unpackedSize":16452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhroDsCRA9TVsSAnZWagAAmW8P/je1478T3w8LbNKvDnM5\n6rdKmJElMFvEaLBWRjMwdKBEvr5L+RPdxXWzEzjT3JYOmFSHcp/V21mhLO0s\nFNRo5SbznfiG9fojZRTzhlqlP79GCCw9H0GrSIZGqmGRhz7OD26ckvVPc08D\nF5GzlzX9+yjbqmT+prJoplH0jfzA28btHQnnncxiYqP5fwllO0ParcFO4Gen\n0VPBNL84Z8T8HCQ5rwkBYENMA7yhcX0tDE5sNgTQ1NfSsKK54xP6G+SLgJQU\nV+9F2WlBU1Z1DmtwxhqU/nkCCS94qXhpD9cJPONxwxGxIkB7lV/tRHHUYe4P\nDW2sM57sTGjQwOE4iBPAkHQaI4RrheMGV3pfF12qRrYN+4/+0a9lN7yJNR12\nBsyNvw8rL58RclSjBk3Ya2VVr2tHWZJv8tIt0oi6dsfP3TNKuAEAUCBTJuRg\nVmgxMyyKdRECnWsxqSf815k+1Al1TJO8oGTWodfoPhloceIfQ+v69IECqo2g\nzKkqLG263cBgcQhERaTyNdTGYkRXvXtMOVAQ0F5lJkPtfVx3SAowIDAHxLoQ\ndWzfetgu36H0Hba0Oz4+uJ7sTTv0aKiRPtZxajo68p+sN6oZ2bkJfUqStv0U\nkwsmP9WQ/sWItuT0lDkHif/Lqm87PJRD/wB5buN30RvplTYTx5IHBjpuE5HE\nmtj5\r\n=k+N7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDebGbvYD+duzeTdcZopbPchMEb8zuULG3uMyi8ef3G6gIhANRLXJuJuQgFphVB4/F0Pgqf7wsIRuQ2z1D6+LNEqsoK"}]},"_npmUser":{"name":"auroratide","email":"tf.auroratide@gmail.com"},"directories":{},"maintainers":[{"name":"auroratide","email":"tf.auroratide@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/playing-card_0.1.0_1638826220214_0.2890444236966576"},"_hasShrinkwrap":false},"0.1.1":{"name":"@auroratide/playing-card","version":"0.1.1","description":"Web component for a playing card","keywords":["web-component","element","card","poker","casino"],"main":"lib/index.js","module":"lib/index.js","type":"module","scripts":{"start":"wds --node-resolve -p 3000","clean":"rm -rf lib","build":"npm run clean && tsc","dev":"npm-run-all --parallel 'build -- --watch' 'start -- --watch'","test":"npm run build && wtr --node-resolve 'lib/**/*.spec.js'","prepublishOnly":"npm run test"},"author":{"name":"Timothy Foster","url":"https://auroratide.com"},"license":"ISC","devDependencies":{"@open-wc/testing":"^3.0.3","@web/dev-server":"^0.1.28","@web/test-runner":"^0.13.22","npm-run-all":"^4.1.5","typescript":"^4.5.2"},"types":"./lib/index.d.ts","gitHead":"5adbc7651b257fc3d94b11aa809405a81543eb08","_id":"@auroratide/playing-card@0.1.1","_nodeVersion":"17.0.1","_npmVersion":"8.1.3","dist":{"integrity":"sha512-DYTYAFzyw/B6wiZggQe8+I9RyfjRSWLCMV5Xh+PT3HTL5EMzoYXlHi4opOtX6mD88WEc/JGHTOMW2W1GEqz2lw==","shasum":"f6928b7c75cf48cdbe325c27bb290edee2019fde","tarball":"https://registry.npmjs.org/@auroratide/playing-card/-/playing-card-0.1.1.tgz","fileCount":16,"unpackedSize":16517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/F6rCRA9TVsSAnZWagAAOgQP/3iIFTDuptNtRNdOJUfz\neuM6oU8IuJqm64cEasDHokPLyMesL/eJVNoPqAVlKRctFu+XuebCOzYTXp/u\nzCOFVtStXzGxyEhdqwkhBkjHpPp5kRlJz2l1f5m4Lq5kMbFrxrYKera3HpD9\n742VZESW6Van5tSQ/qOg2SGJEUPIwJ/5ZOKWGnlaqe4aZO1zBbhtYD1QeewB\nlQXswWsSFmwYQwXkqrfRM+jE3gqjelxm04v0K0IEGuoDMeZC2yJ/zTwZ09DZ\njPKhz745yQJI4tnjLwH4ZnB8LiQLZQdjo/V9yVBvZCieJW8Ej5mgRsR/36A1\nuJozCxywG2xS01fS41rgjq8VvYttRxAJmskdc4YLzMcne8PTojDzuoFrJJpn\n11npymxIJ6XPobJtq0S4p3En4jXQbgNVWKS5FbJ88WawXawe6MH4saVBtNz7\neosQZUhdLp7HPtNonLXpQIH7cU5jMOxjrcrxyD/ARCg/xp6FN3Qc2aVeYWUU\n0ltc5yOG4RllXYWUWMfGRqHyfRbFDfrYg75qsAqpykIGcdfx4fHegDRzCbgV\nk6N66pH+bhoYc8cz7HWvXyHQV9ay6Q9rX8yqF4wEqL+bkkuf752KYSOMk9Vc\n4UyXX/kxrNUfzLsiqmiPrLuwQicijdxnAqad3AvoXTO59iN2bWe0cwc6g2nJ\nyvNn\r\n=sZ+n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHDfW+tPNmB3pYp6VJ7X3tjVFTQMtvg72FIh2ImUytk+AiEAreTW8OXE0pxppLPd0FxJU4j6x7s7YnLJFEvilQt6m1o="}]},"_npmUser":{"name":"auroratide","email":"tf.auroratide@gmail.com"},"directories":{},"maintainers":[{"name":"auroratide","email":"tf.auroratide@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/playing-card_0.1.1_1643929259598_0.37154868583578327"},"_hasShrinkwrap":false}},"time":{"created":"2021-12-06T21:30:20.155Z","0.1.0":"2021-12-06T21:30:20.361Z","modified":"2022-04-04T16:29:01.723Z","0.1.1":"2022-02-03T23:00:59.743Z"},"maintainers":[{"name":"auroratide","email":"tf.auroratide@gmail.com"}],"description":"Web component for a playing card","keywords":["web-component","element","card","poker","casino"],"author":{"name":"Timothy Foster","url":"https://auroratide.com"},"license":"ISC","readme":"# &lt;playing-card&gt; Element\n\nRepresents a standard playing card.\n\n## Installation\n\nYou can import through CDN:\n\n```html\n<script type=\"module\" src=\"https://unpkg.com/@auroratide/playing-card/lib/define.js\"></script>\n```\n\nOr, you may install through [NPM](https://www.npmjs.com/package/@auroratide/playing-card) and include it as part of your build process:\n\n```\n$ npm i @auroratide/playing-card\n```\n\n```js\nimport '@auroratide/playing-card/lib/define.js'\n```\n\n## Usage\n\n`<playing-card>` is a **markup element** that you can use in your HTML document.\n\n```html\n<playing-card value=\"7\" suit=\"s\"></playing-card>\n```\n\nThe card can be made face down as well:\n\n```html\n<playing-card facedown value=\"q\" suit=\"h\"></playing-card>\n```\n\n### All Attributes\n\n**value**\n* Represents the value of the card\n* Can be numerical values \"2\" through \"10\"\n* Or a face card value:\n  * \"j\" for Jack\n  * \"q\" for Queen\n  * \"k\" for King\n  * \"a\" for Ace\n\n**suit**\n* Represents the suit of the card\n* \"s\" for Spades\n* \"h\" for Hearts\n* \"d\" for Diamonds\n* \"c\" for Clubs\n\n**facedown**\n* Whether the card is faced downward, hiding its value\n* When toggled, the card has a flipping animation\n\n## Style API\n\nSince `toggle-switch` is Just HTML<sup>TM</sup>, you can style it the same way you style any HTML tag.\n\n```css\nplaying-card {\n    --playing-card-width: 10rem;\n}\n```\n\n### Variables\n\n| Variable | Default | Description |\n| ------------- | --------- | ------------- |\n| `--playing-card-width` | `5em` | Width of the card; use this to keep all elements of the card proportional |\n| `--playing-card-diamonds-color` | `hsl(0, 100%, 50%)` | Color of the diamonds suit |\n| `--playing-card-hearts-color` | `hsl(0, 100%, 50%)` | Color of the hearts suit |\n| `--playing-card-spades-color` | `hsl(0, 0%, 0%)` | Color of the spades suit |\n| `--playing-card-clubs-color` | `hsl(0, 0%, 0%)` | Color of the clubs suit |\n| `--playing-card-bg` | `hsl(0, 0%, 100%)` | Color of the card background |\n| `--playing-card-back-bg` | `hsl(350, 100%, 50%)` | Color of the pattern on the card's back |\n\n## Javascript API\n\nThe element exposes a function to programmatically toggle its state:\n\n| Method | Description |\n| ------------- | ------------- |\n| `flip()` | Flips the card over |\n\n### Properties\n\nEach attribute can be accessed as a Javascript property.\n\n* `elem.value`\n* `elem.suit`\n* `elem.facedown`\n\n## Accessibility\n\nThis custom element is built with accessibility in mind!\n\n* The element uses the `img` role with a label indicating its value and suit\n* When the card is face down, the value and suit are not included in the label\n","readmeFilename":"README.md"}