Format prettier and type checking.

This commit is contained in:
Bradley Shellnut 2022-07-27 17:05:54 -07:00
parent 1f847c91e7
commit daad2efe5e
26 changed files with 331 additions and 285 deletions

4
.vscode/launch.json vendored
View file

@ -5,9 +5,7 @@
"name": "Launch Vite DEV server",
"request": "launch",
"runtimeExecutable": "npx",
"runtimeArgs": [
"vite",
],
"runtimeArgs": ["vite"],
"type": "node",
"serverReadyAction": {
"action": "debugWithChrome",

View file

@ -14,16 +14,16 @@
"format": "prettier --write --plugin-search-dir=. ."
},
"devDependencies": {
"@playwright/test": "^1.24.0",
"@playwright/test": "^1.24.1",
"@rgossiaux/svelte-headlessui": "1.0.2",
"@rgossiaux/svelte-heroicons": "^0.1.2",
"@sveltejs/adapter-auto": "1.0.0-next.63",
"@sveltejs/kit": "1.0.0-next.392",
"@sveltejs/adapter-auto": "1.0.0-next.64",
"@sveltejs/kit": "1.0.0-next.396",
"@types/cookie": "^0.5.1",
"@types/node": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"carbon-components-svelte": "^0.67.2",
"@types/node": "^18.6.1",
"@typescript-eslint/eslint-plugin": "^5.31.0",
"@typescript-eslint/parser": "^5.31.0",
"carbon-components-svelte": "^0.67.4",
"carbon-icons-svelte": "^11.2.0",
"eslint": "^8.19.0",
"eslint-config-prettier": "^8.1.0",
@ -36,7 +36,7 @@
"svelte-preprocess": "^4.10.7",
"tslib": "^2.0.0",
"typescript": "^4.7.4",
"vite": "^3.0.0"
"vite": "^3.0.3"
},
"type": "module",
"dependencies": {

View file

@ -5,17 +5,17 @@ specifiers:
'@leveluptuts/svelte-side-menu': ^1.0.2
'@leveluptuts/svelte-toy': ^2.0.2
'@lukeed/uuid': ^2.0.0
'@playwright/test': ^1.24.0
'@playwright/test': ^1.24.1
'@rgossiaux/svelte-headlessui': 1.0.2
'@rgossiaux/svelte-heroicons': ^0.1.2
'@sveltejs/adapter-auto': 1.0.0-next.63
'@sveltejs/kit': 1.0.0-next.392
'@sveltejs/adapter-auto': 1.0.0-next.64
'@sveltejs/kit': 1.0.0-next.396
'@types/cookie': ^0.5.1
'@types/feather-icons': ^4.7.0
'@types/node': ^18.0.6
'@typescript-eslint/eslint-plugin': ^5.27.0
'@typescript-eslint/parser': ^5.27.0
carbon-components-svelte: ^0.67.2
'@types/node': ^18.6.1
'@typescript-eslint/eslint-plugin': ^5.31.0
'@typescript-eslint/parser': ^5.31.0
carbon-components-svelte: ^0.67.4
carbon-icons-svelte: ^11.2.0
cookie: ^0.5.0
eslint: ^8.19.0
@ -30,7 +30,7 @@ specifiers:
svelte-preprocess: ^4.10.7
tslib: ^2.0.0
typescript: ^4.7.4
vite: ^3.0.0
vite: ^3.0.3
zod: ^3.17.10
dependencies:
@ -44,16 +44,16 @@ dependencies:
zod: 3.17.10
devDependencies:
'@playwright/test': 1.24.0
'@playwright/test': 1.24.1
'@rgossiaux/svelte-headlessui': 1.0.2_svelte@3.49.0
'@rgossiaux/svelte-heroicons': 0.1.2_svelte@3.49.0
'@sveltejs/adapter-auto': 1.0.0-next.63
'@sveltejs/kit': 1.0.0-next.392_svelte@3.49.0+vite@3.0.2
'@sveltejs/adapter-auto': 1.0.0-next.64
'@sveltejs/kit': 1.0.0-next.396_svelte@3.49.0+vite@3.0.3
'@types/cookie': 0.5.1
'@types/node': 18.0.6
'@typescript-eslint/eslint-plugin': 5.30.7_6wltbjakwuqm7awqswigmiuhd4
'@typescript-eslint/parser': 5.30.7_he2ccbldppg44uulnyq4rwocfa
carbon-components-svelte: 0.67.2
'@types/node': 18.6.1
'@typescript-eslint/eslint-plugin': 5.31.0_d5zwcxr4bwkhmuo464cb3a2puu
'@typescript-eslint/parser': 5.31.0_he2ccbldppg44uulnyq4rwocfa
carbon-components-svelte: 0.67.4
carbon-icons-svelte: 11.2.0
eslint: 8.20.0
eslint-config-prettier: 8.5.0_eslint@8.20.0
@ -66,7 +66,7 @@ devDependencies:
svelte-preprocess: 4.10.7_qqyngjnvpp2z5rj6eppfx7s47e
tslib: 2.4.0
typescript: 4.7.4
vite: 3.0.2_sass@1.54.0
vite: 3.0.3_sass@1.54.0
packages:
@ -191,13 +191,13 @@ packages:
fastq: 1.13.0
dev: true
/@playwright/test/1.24.0:
resolution: {integrity: sha512-sZLH2N6aWN9TtG+vMjNSomSfX0dSVHwWE+GhHQPV+ZeGcuZ/6CgMCGFuGjobgq/hNF9ZkuVOjeyoceZ0owKnHQ==}
/@playwright/test/1.24.1:
resolution: {integrity: sha512-VJ9qekMis7Oze2Q/Vb+w1g2aPaJFRdl5vhTS6h82kG89Jb8trlU2WHY7oYzNRjvFPoVUMcWXiblH2bWcbEax/A==}
engines: {node: '>=14'}
hasBin: true
dependencies:
'@types/node': 18.0.6
playwright-core: 1.24.0
'@types/node': 18.6.1
playwright-core: 1.24.1
dev: true
/@rgossiaux/svelte-headlessui/1.0.2_svelte@3.49.0:
@ -224,63 +224,63 @@ packages:
picomatch: 2.3.1
dev: true
/@sveltejs/adapter-auto/1.0.0-next.63:
resolution: {integrity: sha512-9KguXwROEJMyyoKrsizAilVSmtfWxEDn2Hbxk44SP8Kj5cgN7tFCxzbL2kmmqyV1CO1tOh5iNC2oWbyTfikXmw==}
/@sveltejs/adapter-auto/1.0.0-next.64:
resolution: {integrity: sha512-Q8DwcS6wl1GovzS9JJzaD/WL/Lfk1ur4nAF1HtmsUvZDpsPBVDqnK2AhYU4G3oFNiuHstrjAogMy5th8ptSFGw==}
dependencies:
'@sveltejs/adapter-cloudflare': 1.0.0-next.30
'@sveltejs/adapter-netlify': 1.0.0-next.70
'@sveltejs/adapter-vercel': 1.0.0-next.65
'@sveltejs/adapter-cloudflare': 1.0.0-next.31
'@sveltejs/adapter-netlify': 1.0.0-next.71
'@sveltejs/adapter-vercel': 1.0.0-next.66
transitivePeerDependencies:
- encoding
- supports-color
dev: true
/@sveltejs/adapter-cloudflare/1.0.0-next.30:
resolution: {integrity: sha512-jIclgb58n3Uoo8TTudXSa7wmLP7Rn/ESLQS+zOUe0xsti5DG/eDhELTnSvkoSa2lJY21ym5rej/GSERRyeuBVw==}
/@sveltejs/adapter-cloudflare/1.0.0-next.31:
resolution: {integrity: sha512-HhEFZP72GJ8AZGgFECKIiayDcLaAWi65pI0AnBfiNhCifYSlH/mPNWNVD4AWRDnXnH6XU+FLwhGDnIDwytTyYg==}
dependencies:
'@cloudflare/workers-types': 3.14.1
esbuild: 0.14.49
esbuild: 0.14.50
worktop: 0.8.0-next.14
dev: true
/@sveltejs/adapter-netlify/1.0.0-next.70:
resolution: {integrity: sha512-lIXY6KIgIFBz4+mdvilx9Ny8oFV7T2iVTKLirJayoI/SqPWGAcxklvWvjGfS4QT8rS9pWKDaKRUQM4M/gl8LlA==}
/@sveltejs/adapter-netlify/1.0.0-next.71:
resolution: {integrity: sha512-la1CGtWO1xul1L3zEoFAoc4EX2uxZjrZcOMS3tkKB8drxhbQsNbnTE6fmSSMFiZXhxaikczrBgQwqIaDkLTmZg==}
dependencies:
'@iarna/toml': 2.2.5
esbuild: 0.14.49
set-cookie-parser: 2.5.0
esbuild: 0.14.50
set-cookie-parser: 2.5.1
tiny-glob: 0.2.9
dev: true
/@sveltejs/adapter-vercel/1.0.0-next.65:
resolution: {integrity: sha512-RV3HL7Ic7pGgIoBSHPwN1pBX96Km1X683oHImPHAKX9h/WOvJZ3bY5+IWNRcR8tx9rPB5gfMRg+msvPSBr3RVw==}
/@sveltejs/adapter-vercel/1.0.0-next.66:
resolution: {integrity: sha512-s3Hcxu9nCG/rR3C3cFbdQGjTa5W4K2kRcc6S5Xefx7itbrw+4v3KpO8ZPB6qM55XDwVxuG7260NMHVI6MUGmSA==}
dependencies:
'@vercel/nft': 0.20.1
esbuild: 0.14.49
'@vercel/nft': 0.21.0
esbuild: 0.14.50
transitivePeerDependencies:
- encoding
- supports-color
dev: true
/@sveltejs/kit/1.0.0-next.392_svelte@3.49.0+vite@3.0.2:
resolution: {integrity: sha512-od4rDJ/Soq0I7mda7sTbAnNKERHSDEGNa7QBpLA859xgBkwC1JnEIymYOh9dm+hMyHhB0bUoRoaur0qxKLqOOw==}
/@sveltejs/kit/1.0.0-next.396_svelte@3.49.0+vite@3.0.3:
resolution: {integrity: sha512-bKFpuzp9QxPkOIOEIeNeedvxEMORNqBPxUmoJXDP/Se7MrSfcxYiamjBcKrG+bgGNWmV39nD3EvUox+CXno/Ig==}
engines: {node: '>=16.9'}
hasBin: true
peerDependencies:
svelte: ^3.44.0
vite: ^3.0.0
dependencies:
'@sveltejs/vite-plugin-svelte': 1.0.1_svelte@3.49.0+vite@3.0.2
'@sveltejs/vite-plugin-svelte': 1.0.1_svelte@3.49.0+vite@3.0.3
chokidar: 3.5.3
sade: 1.8.1
svelte: 3.49.0
vite: 3.0.2_sass@1.54.0
vite: 3.0.3_sass@1.54.0
transitivePeerDependencies:
- diff-match-patch
- supports-color
dev: true
/@sveltejs/vite-plugin-svelte/1.0.1_svelte@3.49.0+vite@3.0.2:
/@sveltejs/vite-plugin-svelte/1.0.1_svelte@3.49.0+vite@3.0.3:
resolution: {integrity: sha512-PorCgUounn0VXcpeJu+hOweZODKmGuLHsLomwqSj+p26IwjjGffmYQfVHtiTWq+NqaUuuHWWG7vPge6UFw4Aeg==}
engines: {node: ^14.18.0 || >= 16}
peerDependencies:
@ -298,7 +298,7 @@ packages:
magic-string: 0.26.2
svelte: 3.49.0
svelte-hmr: 0.14.12_svelte@3.49.0
vite: 3.0.2_sass@1.54.0
vite: 3.0.3_sass@1.54.0
transitivePeerDependencies:
- supports-color
dev: true
@ -315,8 +315,8 @@ packages:
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
dev: true
/@types/node/18.0.6:
resolution: {integrity: sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==}
/@types/node/18.6.1:
resolution: {integrity: sha512-z+2vB6yDt1fNwKOeGbckpmirO+VBDuQqecXkgeIqDlaOtmKn6hPR/viQ8cxCfqLU4fTlvM3+YjM367TukWdxpg==}
dev: true
/@types/pug/2.0.6:
@ -326,11 +326,11 @@ packages:
/@types/sass/1.43.1:
resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==}
dependencies:
'@types/node': 18.0.6
'@types/node': 18.6.1
dev: true
/@typescript-eslint/eslint-plugin/5.30.7_6wltbjakwuqm7awqswigmiuhd4:
resolution: {integrity: sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==}
/@typescript-eslint/eslint-plugin/5.31.0_d5zwcxr4bwkhmuo464cb3a2puu:
resolution: {integrity: sha512-VKW4JPHzG5yhYQrQ1AzXgVgX8ZAJEvCz0QI6mLRX4tf7rnFfh5D8SKm0Pq6w5PyNfAWJk6sv313+nEt3ohWMBQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
'@typescript-eslint/parser': ^5.0.0
@ -340,10 +340,10 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.30.7_he2ccbldppg44uulnyq4rwocfa
'@typescript-eslint/scope-manager': 5.30.7
'@typescript-eslint/type-utils': 5.30.7_he2ccbldppg44uulnyq4rwocfa
'@typescript-eslint/utils': 5.30.7_he2ccbldppg44uulnyq4rwocfa
'@typescript-eslint/parser': 5.31.0_he2ccbldppg44uulnyq4rwocfa
'@typescript-eslint/scope-manager': 5.31.0
'@typescript-eslint/type-utils': 5.31.0_he2ccbldppg44uulnyq4rwocfa
'@typescript-eslint/utils': 5.31.0_he2ccbldppg44uulnyq4rwocfa
debug: 4.3.4
eslint: 8.20.0
functional-red-black-tree: 1.0.1
@ -356,8 +356,8 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser/5.30.7_he2ccbldppg44uulnyq4rwocfa:
resolution: {integrity: sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==}
/@typescript-eslint/parser/5.31.0_he2ccbldppg44uulnyq4rwocfa:
resolution: {integrity: sha512-UStjQiZ9OFTFReTrN+iGrC6O/ko9LVDhreEK5S3edmXgR396JGq7CoX2TWIptqt/ESzU2iRKXAHfSF2WJFcWHw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@ -366,9 +366,9 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.30.7
'@typescript-eslint/types': 5.30.7
'@typescript-eslint/typescript-estree': 5.30.7_typescript@4.7.4
'@typescript-eslint/scope-manager': 5.31.0
'@typescript-eslint/types': 5.31.0
'@typescript-eslint/typescript-estree': 5.31.0_typescript@4.7.4
debug: 4.3.4
eslint: 8.20.0
typescript: 4.7.4
@ -376,16 +376,16 @@ packages:
- supports-color
dev: true
/@typescript-eslint/scope-manager/5.30.7:
resolution: {integrity: sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==}
/@typescript-eslint/scope-manager/5.31.0:
resolution: {integrity: sha512-8jfEzBYDBG88rcXFxajdVavGxb5/XKXyvWgvD8Qix3EEJLCFIdVloJw+r9ww0wbyNLOTYyBsR+4ALNGdlalLLg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.30.7
'@typescript-eslint/visitor-keys': 5.30.7
'@typescript-eslint/types': 5.31.0
'@typescript-eslint/visitor-keys': 5.31.0
dev: true
/@typescript-eslint/type-utils/5.30.7_he2ccbldppg44uulnyq4rwocfa:
resolution: {integrity: sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==}
/@typescript-eslint/type-utils/5.31.0_he2ccbldppg44uulnyq4rwocfa:
resolution: {integrity: sha512-7ZYqFbvEvYXFn9ax02GsPcEOmuWNg+14HIf4q+oUuLnMbpJ6eHAivCg7tZMVwzrIuzX3QCeAOqKoyMZCv5xe+w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '*'
@ -394,7 +394,7 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/utils': 5.30.7_he2ccbldppg44uulnyq4rwocfa
'@typescript-eslint/utils': 5.31.0_he2ccbldppg44uulnyq4rwocfa
debug: 4.3.4
eslint: 8.20.0
tsutils: 3.21.0_typescript@4.7.4
@ -403,13 +403,13 @@ packages:
- supports-color
dev: true
/@typescript-eslint/types/5.30.7:
resolution: {integrity: sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==}
/@typescript-eslint/types/5.31.0:
resolution: {integrity: sha512-/f/rMaEseux+I4wmR6mfpM2wvtNZb1p9hAV77hWfuKc3pmaANp5dLAZSiE3/8oXTYTt3uV9KW5yZKJsMievp6g==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@typescript-eslint/typescript-estree/5.30.7_typescript@4.7.4:
resolution: {integrity: sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==}
/@typescript-eslint/typescript-estree/5.31.0_typescript@4.7.4:
resolution: {integrity: sha512-3S625TMcARX71wBc2qubHaoUwMEn+l9TCsaIzYI/ET31Xm2c9YQ+zhGgpydjorwQO9pLfR/6peTzS/0G3J/hDw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
typescript: '*'
@ -417,8 +417,8 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 5.30.7
'@typescript-eslint/visitor-keys': 5.30.7
'@typescript-eslint/types': 5.31.0
'@typescript-eslint/visitor-keys': 5.31.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
@ -429,16 +429,16 @@ packages:
- supports-color
dev: true
/@typescript-eslint/utils/5.30.7_he2ccbldppg44uulnyq4rwocfa:
resolution: {integrity: sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==}
/@typescript-eslint/utils/5.31.0_he2ccbldppg44uulnyq4rwocfa:
resolution: {integrity: sha512-kcVPdQS6VIpVTQ7QnGNKMFtdJdvnStkqS5LeALr4rcwx11G6OWb2HB17NMPnlRHvaZP38hL9iK8DdE9Fne7NYg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
'@types/json-schema': 7.0.11
'@typescript-eslint/scope-manager': 5.30.7
'@typescript-eslint/types': 5.30.7
'@typescript-eslint/typescript-estree': 5.30.7_typescript@4.7.4
'@typescript-eslint/scope-manager': 5.31.0
'@typescript-eslint/types': 5.31.0
'@typescript-eslint/typescript-estree': 5.31.0_typescript@4.7.4
eslint: 8.20.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0_eslint@8.20.0
@ -447,20 +447,21 @@ packages:
- typescript
dev: true
/@typescript-eslint/visitor-keys/5.30.7:
resolution: {integrity: sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==}
/@typescript-eslint/visitor-keys/5.31.0:
resolution: {integrity: sha512-ZK0jVxSjS4gnPirpVjXHz7mgdOsZUHzNYSfTw2yPa3agfbt9YfqaBiBZFSSxeBWnpWkzCxTfUpnzA3Vily/CSg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.30.7
'@typescript-eslint/types': 5.31.0
eslint-visitor-keys: 3.3.0
dev: true
/@vercel/nft/0.20.1:
resolution: {integrity: sha512-hSLcr64KHOkcNiTAlv154K4p4faEFBwYIi2eIgu1QCDhB1qyQYvFuEhtw3eaapNjA4/7x/2jcclfCAjILua/ag==}
/@vercel/nft/0.21.0:
resolution: {integrity: sha512-hFCAETfI5cG8l5iAiLhMC2bReC5K7SIybzrxGorv+eGspIbIFsVw7Vg85GovXm/LxA08pIDrAlrhR6GN36XB/Q==}
hasBin: true
dependencies:
'@mapbox/node-pre-gyp': 1.0.9
acorn: 8.7.1
acorn: 8.8.0
async-sema: 3.1.1
bindings: 1.5.0
estree-walker: 2.0.2
glob: 7.2.3
@ -492,6 +493,12 @@ packages:
hasBin: true
dev: true
/acorn/8.8.0:
resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
/agent-base/6.0.2:
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
engines: {node: '>= 6.0.0'}
@ -551,6 +558,10 @@ packages:
engines: {node: '>=8'}
dev: true
/async-sema/3.1.1:
resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==}
dev: true
/balanced-match/1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
dev: true
@ -589,8 +600,8 @@ packages:
engines: {node: '>=6'}
dev: true
/carbon-components-svelte/0.67.2:
resolution: {integrity: sha512-zu/x4m4cRIzWsY9muu6ctqWOZQg3gB4Ako89hgm+xiyK7cGMf0ySagKUHcIIh/sSnusN4AySR8azivDH2LdyhQ==}
/carbon-components-svelte/0.67.4:
resolution: {integrity: sha512-+YbPAYInOQyT6bAVPPdtZ18Zm6oTHYOl+gTzO517QebDzz+Czf+HJiyJnlAkpz9PMOf3sCAhB9JiojO+auuEMQ==}
dependencies:
flatpickr: 4.6.9
dev: true
@ -731,8 +742,8 @@ packages:
resolution: {integrity: sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=}
dev: true
/esbuild-android-64/0.14.49:
resolution: {integrity: sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==}
/esbuild-android-64/0.14.50:
resolution: {integrity: sha512-H7iUEm7gUJHzidsBlFPGF6FTExazcgXL/46xxLo6i6bMtPim6ZmXyTccS8yOMpy6HAC6dPZ/JCQqrkkin69n6Q==}
engines: {node: '>=12'}
cpu: [x64]
os: [android]
@ -740,8 +751,8 @@ packages:
dev: true
optional: true
/esbuild-android-arm64/0.14.49:
resolution: {integrity: sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==}
/esbuild-android-arm64/0.14.50:
resolution: {integrity: sha512-NFaoqEwa+OYfoYVpQWDMdKII7wZZkAjtJFo1WdnBeCYlYikvUhTnf2aPwPu5qEAw/ie1NYK0yn3cafwP+kP+OQ==}
engines: {node: '>=12'}
cpu: [arm64]
os: [android]
@ -749,8 +760,8 @@ packages:
dev: true
optional: true
/esbuild-darwin-64/0.14.49:
resolution: {integrity: sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==}
/esbuild-darwin-64/0.14.50:
resolution: {integrity: sha512-gDQsCvGnZiJv9cfdO48QqxkRV8oKAXgR2CGp7TdIpccwFdJMHf8hyIJhMW/05b/HJjET/26Us27Jx91BFfEVSA==}
engines: {node: '>=12'}
cpu: [x64]
os: [darwin]
@ -758,8 +769,8 @@ packages:
dev: true
optional: true
/esbuild-darwin-arm64/0.14.49:
resolution: {integrity: sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==}
/esbuild-darwin-arm64/0.14.50:
resolution: {integrity: sha512-36nNs5OjKIb/Q50Sgp8+rYW/PqirRiFN0NFc9hEvgPzNJxeJedktXwzfJSln4EcRFRh5Vz4IlqFRScp+aiBBzA==}
engines: {node: '>=12'}
cpu: [arm64]
os: [darwin]
@ -767,8 +778,8 @@ packages:
dev: true
optional: true
/esbuild-freebsd-64/0.14.49:
resolution: {integrity: sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==}
/esbuild-freebsd-64/0.14.50:
resolution: {integrity: sha512-/1pHHCUem8e/R86/uR+4v5diI2CtBdiWKiqGuPa9b/0x3Nwdh5AOH7lj+8823C6uX1e0ufwkSLkS+aFZiBCWxA==}
engines: {node: '>=12'}
cpu: [x64]
os: [freebsd]
@ -776,8 +787,8 @@ packages:
dev: true
optional: true
/esbuild-freebsd-arm64/0.14.49:
resolution: {integrity: sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==}
/esbuild-freebsd-arm64/0.14.50:
resolution: {integrity: sha512-iKwUVMQztnPZe5pUYHdMkRc9aSpvoV1mkuHlCoPtxZA3V+Kg/ptpzkcSY+fKd0kuom+l6Rc93k0UPVkP7xoqrw==}
engines: {node: '>=12'}
cpu: [arm64]
os: [freebsd]
@ -785,8 +796,8 @@ packages:
dev: true
optional: true
/esbuild-linux-32/0.14.49:
resolution: {integrity: sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==}
/esbuild-linux-32/0.14.50:
resolution: {integrity: sha512-sWUwvf3uz7dFOpLzYuih+WQ7dRycrBWHCdoXJ4I4XdMxEHCECd8b7a9N9u7FzT6XR2gHPk9EzvchQUtiEMRwqw==}
engines: {node: '>=12'}
cpu: [ia32]
os: [linux]
@ -794,8 +805,8 @@ packages:
dev: true
optional: true
/esbuild-linux-64/0.14.49:
resolution: {integrity: sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==}
/esbuild-linux-64/0.14.50:
resolution: {integrity: sha512-u0PQxPhaeI629t4Y3EEcQ0wmWG+tC/LpP2K7yDFvwuPq0jSQ8SIN+ARNYfRjGW15O2we3XJvklbGV0wRuUCPig==}
engines: {node: '>=12'}
cpu: [x64]
os: [linux]
@ -803,8 +814,8 @@ packages:
dev: true
optional: true
/esbuild-linux-arm/0.14.49:
resolution: {integrity: sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==}
/esbuild-linux-arm/0.14.50:
resolution: {integrity: sha512-VALZq13bhmFJYFE/mLEb+9A0w5vo8z+YDVOWeaf9vOTrSC31RohRIwtxXBnVJ7YKLYfEMzcgFYf+OFln3Y0cWg==}
engines: {node: '>=12'}
cpu: [arm]
os: [linux]
@ -812,8 +823,8 @@ packages:
dev: true
optional: true
/esbuild-linux-arm64/0.14.49:
resolution: {integrity: sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==}
/esbuild-linux-arm64/0.14.50:
resolution: {integrity: sha512-ZyfoNgsTftD7Rp5S7La5auomKdNeB3Ck+kSKXC4pp96VnHyYGjHHXWIlcbH8i+efRn9brszo1/Thl1qn8RqmhQ==}
engines: {node: '>=12'}
cpu: [arm64]
os: [linux]
@ -821,8 +832,8 @@ packages:
dev: true
optional: true
/esbuild-linux-mips64le/0.14.49:
resolution: {integrity: sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==}
/esbuild-linux-mips64le/0.14.50:
resolution: {integrity: sha512-ygo31Vxn/WrmjKCHkBoutOlFG5yM9J2UhzHb0oWD9O61dGg+Hzjz9hjf5cmM7FBhAzdpOdEWHIrVOg2YAi6rTw==}
engines: {node: '>=12'}
cpu: [mips64el]
os: [linux]
@ -830,8 +841,8 @@ packages:
dev: true
optional: true
/esbuild-linux-ppc64le/0.14.49:
resolution: {integrity: sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==}
/esbuild-linux-ppc64le/0.14.50:
resolution: {integrity: sha512-xWCKU5UaiTUT6Wz/O7GKP9KWdfbsb7vhfgQzRfX4ahh5NZV4ozZ4+SdzYG8WxetsLy84UzLX3Pi++xpVn1OkFQ==}
engines: {node: '>=12'}
cpu: [ppc64]
os: [linux]
@ -839,8 +850,8 @@ packages:
dev: true
optional: true
/esbuild-linux-riscv64/0.14.49:
resolution: {integrity: sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==}
/esbuild-linux-riscv64/0.14.50:
resolution: {integrity: sha512-0+dsneSEihZTopoO9B6Z6K4j3uI7EdxBP7YSF5rTwUgCID+wHD3vM1gGT0m+pjCW+NOacU9kH/WE9N686FHAJg==}
engines: {node: '>=12'}
cpu: [riscv64]
os: [linux]
@ -848,8 +859,8 @@ packages:
dev: true
optional: true
/esbuild-linux-s390x/0.14.49:
resolution: {integrity: sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==}
/esbuild-linux-s390x/0.14.50:
resolution: {integrity: sha512-tVjqcu8o0P9H4StwbIhL1sQYm5mWATlodKB6dpEZFkcyTI8kfIGWiWcrGmkNGH2i1kBUOsdlBafPxR3nzp3TDA==}
engines: {node: '>=12'}
cpu: [s390x]
os: [linux]
@ -857,8 +868,8 @@ packages:
dev: true
optional: true
/esbuild-netbsd-64/0.14.49:
resolution: {integrity: sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==}
/esbuild-netbsd-64/0.14.50:
resolution: {integrity: sha512-0R/glfqAQ2q6MHDf7YJw/TulibugjizBxyPvZIcorH0Mb7vSimdHy0XF5uCba5CKt+r4wjax1mvO9lZ4jiAhEg==}
engines: {node: '>=12'}
cpu: [x64]
os: [netbsd]
@ -866,8 +877,8 @@ packages:
dev: true
optional: true
/esbuild-openbsd-64/0.14.49:
resolution: {integrity: sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==}
/esbuild-openbsd-64/0.14.50:
resolution: {integrity: sha512-7PAtmrR5mDOFubXIkuxYQ4bdNS6XCK8AIIHUiZxq1kL8cFIH5731jPcXQ4JNy/wbj1C9sZ8rzD8BIM80Tqk29w==}
engines: {node: '>=12'}
cpu: [x64]
os: [openbsd]
@ -875,8 +886,8 @@ packages:
dev: true
optional: true
/esbuild-sunos-64/0.14.49:
resolution: {integrity: sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==}
/esbuild-sunos-64/0.14.50:
resolution: {integrity: sha512-gBxNY/wyptvD7PkHIYcq7se6SQEXcSC8Y7mE0FJB+CGgssEWf6vBPfTTZ2b6BWKnmaP6P6qb7s/KRIV5T2PxsQ==}
engines: {node: '>=12'}
cpu: [x64]
os: [sunos]
@ -884,8 +895,8 @@ packages:
dev: true
optional: true
/esbuild-windows-32/0.14.49:
resolution: {integrity: sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==}
/esbuild-windows-32/0.14.50:
resolution: {integrity: sha512-MOOe6J9cqe/iW1qbIVYSAqzJFh0p2LBLhVUIWdMVnNUNjvg2/4QNX4oT4IzgDeldU+Bym9/Tn6+DxvUHJXL5Zw==}
engines: {node: '>=12'}
cpu: [ia32]
os: [win32]
@ -893,8 +904,8 @@ packages:
dev: true
optional: true
/esbuild-windows-64/0.14.49:
resolution: {integrity: sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==}
/esbuild-windows-64/0.14.50:
resolution: {integrity: sha512-r/qE5Ex3w1jjGv/JlpPoWB365ldkppUlnizhMxJgojp907ZF1PgLTuW207kgzZcSCXyquL9qJkMsY+MRtaZ5yQ==}
engines: {node: '>=12'}
cpu: [x64]
os: [win32]
@ -902,8 +913,8 @@ packages:
dev: true
optional: true
/esbuild-windows-arm64/0.14.49:
resolution: {integrity: sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==}
/esbuild-windows-arm64/0.14.50:
resolution: {integrity: sha512-EMS4lQnsIe12ZyAinOINx7eq2mjpDdhGZZWDwPZE/yUTN9cnc2Ze/xUTYIAyaJqrqQda3LnDpADKpvLvol6ENQ==}
engines: {node: '>=12'}
cpu: [arm64]
os: [win32]
@ -911,32 +922,32 @@ packages:
dev: true
optional: true
/esbuild/0.14.49:
resolution: {integrity: sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==}
/esbuild/0.14.50:
resolution: {integrity: sha512-SbC3k35Ih2IC6trhbMYW7hYeGdjPKf9atTKwBUHqMCYFZZ9z8zhuvfnZihsnJypl74FjiAKjBRqFkBkAd0rS/w==}
engines: {node: '>=12'}
hasBin: true
requiresBuild: true
optionalDependencies:
esbuild-android-64: 0.14.49
esbuild-android-arm64: 0.14.49
esbuild-darwin-64: 0.14.49
esbuild-darwin-arm64: 0.14.49
esbuild-freebsd-64: 0.14.49
esbuild-freebsd-arm64: 0.14.49
esbuild-linux-32: 0.14.49
esbuild-linux-64: 0.14.49
esbuild-linux-arm: 0.14.49
esbuild-linux-arm64: 0.14.49
esbuild-linux-mips64le: 0.14.49
esbuild-linux-ppc64le: 0.14.49
esbuild-linux-riscv64: 0.14.49
esbuild-linux-s390x: 0.14.49
esbuild-netbsd-64: 0.14.49
esbuild-openbsd-64: 0.14.49
esbuild-sunos-64: 0.14.49
esbuild-windows-32: 0.14.49
esbuild-windows-64: 0.14.49
esbuild-windows-arm64: 0.14.49
esbuild-android-64: 0.14.50
esbuild-android-arm64: 0.14.50
esbuild-darwin-64: 0.14.50
esbuild-darwin-arm64: 0.14.50
esbuild-freebsd-64: 0.14.50
esbuild-freebsd-arm64: 0.14.50
esbuild-linux-32: 0.14.50
esbuild-linux-64: 0.14.50
esbuild-linux-arm: 0.14.50
esbuild-linux-arm64: 0.14.50
esbuild-linux-mips64le: 0.14.50
esbuild-linux-ppc64le: 0.14.50
esbuild-linux-riscv64: 0.14.50
esbuild-linux-s390x: 0.14.50
esbuild-netbsd-64: 0.14.50
esbuild-openbsd-64: 0.14.50
esbuild-sunos-64: 0.14.50
esbuild-windows-32: 0.14.50
esbuild-windows-64: 0.14.50
esbuild-windows-arm64: 0.14.50
dev: true
/escape-string-regexp/4.0.0:
@ -1595,8 +1606,8 @@ packages:
engines: {node: '>=8.6'}
dev: true
/playwright-core/1.24.0:
resolution: {integrity: sha512-BkDWdVsoEEC8m2glQlfNu1EN2qvjBsLIg5bD0wjrfwv9zVHktIsp80yYFObAcWreLNYhfRP4PlXE04lr5R4DFQ==}
/playwright-core/1.24.1:
resolution: {integrity: sha512-1RoSDe/oTQS1Ct7Pb8i+vcFKbKYpmVIBXk0IUiD8RvCUMnNl7EJF1OSQ9E8TZ5RYamWkW2Psir9e8Doyz1FnhQ==}
engines: {node: '>=14'}
hasBin: true
dev: true
@ -1710,8 +1721,8 @@ packages:
estree-walker: 0.6.1
dev: true
/rollup/2.77.0:
resolution: {integrity: sha512-vL8xjY4yOQEw79DvyXLijhnhh+R/O9zpF/LEgkCebZFtb6ELeN9H3/2T0r8+mp+fFTBHZ5qGpOpW2ela2zRt3g==}
/rollup/2.77.2:
resolution: {integrity: sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==}
engines: {node: '>=10.0.0'}
hasBin: true
optionalDependencies:
@ -1771,8 +1782,8 @@ packages:
resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
dev: true
/set-cookie-parser/2.5.0:
resolution: {integrity: sha512-cHMAtSXilfyBePduZEBVPTCftTQWz6ehWJD5YNUg4mqvRosrrjKbo4WS8JkB0/RxonMoohHm7cOGH60mDkRQ9w==}
/set-cookie-parser/2.5.1:
resolution: {integrity: sha512-1jeBGaKNGdEq4FgIrORu/N570dwoPYio8lSoYLWmX7sQ//0JY08Xh9o5pBcgmHQ/MbsYp/aZnOe1s1lIsbLprQ==}
dev: true
/shebang-command/2.0.0:
@ -2039,8 +2050,8 @@ packages:
resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==}
dev: true
/vite/3.0.2_sass@1.54.0:
resolution: {integrity: sha512-TAqydxW/w0U5AoL5AsD9DApTvGb2iNbGs3sN4u2VdT1GFkQVUfgUldt+t08TZgi23uIauh1TUOQJALduo9GXqw==}
/vite/3.0.3_sass@1.54.0:
resolution: {integrity: sha512-sDIpIcl3mv1NUaSzZwiXGEy1ZoWwwC2vkxUHY6yiDacR6zf//ZFuBJrozO62gedpE43pmxnLATNR5IYUdAEkMQ==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
@ -2058,10 +2069,10 @@ packages:
terser:
optional: true
dependencies:
esbuild: 0.14.49
esbuild: 0.14.50
postcss: 8.4.14
resolve: 1.22.1
rollup: 2.77.0
rollup: 2.77.2
sass: 1.54.0
optionalDependencies:
fsevents: 2.3.2

View file

@ -1,27 +1,24 @@
<script lang="ts">
import feather from 'feather-icons';
export const directions: string[] = ["n", "ne", "e", "se", "s", "sw", "w", "nw"];
export const directions: string[] = ['n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw'];
export let name: string;
export let direction: string = "n";
export let direction: string = 'n';
export let strokeWidth: string | number;
export let stroke: string | number;
export let width: string = "1em";
export let height: string = "1em";
export let width: string = '1em';
export let height: string = '1em';
$: icon = feather.icons[name];
$: rotation = directions.indexOf(direction) * 45;
$: if (icon) {
if (stroke) icon.attrs["stroke"] = stroke;
if (strokeWidth) icon.attrs["stroke-width"] = strokeWidth;
if (stroke) icon.attrs['stroke'] = stroke;
if (strokeWidth) icon.attrs['stroke-width'] = strokeWidth;
}
</script>
{#if icon}
<svg
{...icon.attrs}
style="width: {width}; height: {height}; transform: rotate({rotation}deg);"
>
<svg {...icon.attrs} style="width: {width}; height: {height}; transform: rotate({rotation}deg);">
<g>
{@html icon.contents}
</g>

View file

@ -29,16 +29,18 @@ import { addToCollection, removeFromCollection } from '$lib/util/manipulateColle
{/if}
</div>
{#if existsInCollection}
<button class="btn" type="button" on:click={() => removeFromCollection(game)}>Remove from collection -</button>
<button class="btn" type="button" on:click={() => removeFromCollection(game)}
>Remove from collection -</button
>
{:else}
<button class="btn" type="button" on:click={() => addToCollection(game)}>Add to collection +</button>
<button class="btn" type="button" on:click={() => addToCollection(game)}
>Add to collection +</button
>
{/if}
</article>
<style lang="scss">
h2
.thumbnail {
h2 .thumbnail {
align-self: start;
}
@ -75,7 +77,8 @@ import { addToCollection, removeFromCollection } from '$lib/util/manipulateColle
}
.game-details {
p, a {
p,
a {
padding: 0.25rem;
}
}

View file

@ -10,7 +10,7 @@
const themes = {
'🌛 Night': { name: '🌛 Night' },
'☀️ Daylight': { name: '☀️ Daylight' },
'☀️ Daylight': { name: '☀️ Daylight' }
};
let selectedTheme = getTheme() ?? themes['🌛 Night'];

View file

@ -11,16 +11,22 @@
let randomNumber: number = Math.round(Math.random() * $collectionStore.length - 1);
if ($collectionStore.at(randomNumber)) {
gameStore.removeAll();
gameStore.add($collectionStore.at(randomNumber));
gameStore.add($collectionStore.at(randomNumber)!);
boredState.set({ loading: false });
} else {
toast.send('Error!', { duration: 3000, type: ToastType.ERROR, dismissible: true });
}
boredState.set({ loading: false });
} else {
toast.send('No items in your collection!', { duration: 3000, type: ToastType.ERROR, dismissible: true });
toast.send('No items in your collection!', {
duration: 3000,
type: ToastType.ERROR,
dismissible: true
});
}
}
</script>
<button class="btn" type="button" on:click={getRandomCollectionGame}>Random from collection 🎲</button>
<button class="btn" type="button" on:click={getRandomCollectionGame}
>Random from collection 🎲</button
>

View file

@ -79,9 +79,6 @@
</form>
<style lang="scss">
h1 {
width: 100%;
}
button {
border-radius: 10px;
margin: 0.5rem;

View file

@ -34,13 +34,6 @@
h1 {
width: 100%;
}
button {
/* border-radius: 10px; */
/* margin: 0.5rem; */
/* padding: 1rem; */
/* color: var(--clr-input-txt); */
/* background-color: var(--color-btn-primary-active); */
}
fieldset {
display: grid;

View file

@ -10,7 +10,7 @@
<div class="toast-wrapper">
{#each $toast as toastData (toastData.id)}
<div
aria-label={toastData.dismissible ? "Click to dismiss" : `${toastData.message}`}
aria-label={toastData.dismissible ? 'Click to dismiss' : `${toastData.message}`}
on:click={() => toastData.dismissible && toast.remove(toastData.id)}
in:fly={{ opacity: 0, x: 100 }}
out:fade
@ -19,9 +19,25 @@
>
<ToastMessage {toastData} />
{#if toastData.dismissible && toastData.showButton}
<button type="button" aria-label="Click to dismiss" on:click={() => toastData.dismissible && toast.remove(toastData.id)}
class="close">
<svg viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>
<button
type="button"
aria-label="Click to dismiss"
on:click={() => toastData.dismissible && toast.remove(toastData.id)}
class="close"
>
<svg
viewBox="0 0 15 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
><path
d="M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z"
fill="currentColor"
fill-rule="evenodd"
clip-rule="evenodd"
/></svg
>
</button>
{/if}
</div>
@ -56,7 +72,8 @@
opacity: 1;
transition: ease 0.3s;
&:hover, &:focus {
&:hover,
&:focus {
transition: ease 0.3s;
background-color: #625df5;
}

View file

@ -1,5 +1,4 @@
<script lang="ts">
import { onMount } from 'svelte';
import { tweened } from 'svelte/motion';
import type { ToastData } from '$lib/types';

View file

@ -6,7 +6,16 @@ import { ToastType } from '$lib/types';
const newToast = () => {
const { subscribe, update } = writable<ToastData[]>([]);
function send(message: string, { duration = 2000, type = ToastType.INFO, autoDismiss = true, dismissible = false, showButton = false } = {}) {
function send(
message: string,
{
duration = 2000,
type = ToastType.INFO,
autoDismiss = true,
dismissible = false,
showButton = false
} = {}
) {
const id = Math.floor(Math.random() * 1000);
const newMessage: ToastData = {

View file

@ -1,14 +1,14 @@
<script lang="ts">
import { fly } from 'svelte/transition'
import { page } from '$app/stores'
import { fly } from 'svelte/transition';
import { page } from '$app/stores';
interface Transition {
type: 'fade' | 'stagger' | 'page'
duration?: number
delay?: number
type: 'fade' | 'stagger' | 'page';
duration?: number;
delay?: number;
}
export let transition: Transition
export let transition: Transition;
</script>
{#if transition.type === 'page'}

View file

@ -1,9 +1,10 @@
import type { BoredStore } from '$lib/types';
import { writable } from 'svelte/store';
// import { BoredStore } from '$lib/types';
// Custom store
const state = () => {
const { subscribe, set, update } = writable({ loading: false });
const { subscribe, set, update } = writable<BoredStore>({ loading: false });
// function remove(id: string) {
// update((store) => {

View file

@ -3,7 +3,7 @@ import type { GameType } from '$lib/types';
// Custom store
const newGameStore = () => {
const { subscribe, update } = writable([]);
const { subscribe, update } = writable<GameType[]>([]);
function add(game: GameType) {
update((store) => [...store, game]);

View file

@ -1,11 +1,11 @@
export type BoredStore = {
loading: boolean;
}
};
export enum ToastType {
INFO = "INFO",
ERROR = "ERROR",
WARNING = "WARNING"
INFO = 'INFO',
ERROR = 'ERROR',
WARNING = 'WARNING'
}
export type ToastData = {

View file

@ -1,4 +1,4 @@
import type { GameType } from "$lib/types";
import type { GameType } from '$lib/types';
export function mapAPIGameToBoredGame(game): GameType {
const {
@ -23,7 +23,7 @@ export function mapAPIGameToBoredGame(game): GameType {
description,
description_preview,
players,
playtime,
playtime
} = game;
return {
id,
@ -47,6 +47,6 @@ export function mapAPIGameToBoredGame(game): GameType {
description,
description_preview,
players,
playtime,
playtime
};
}

View file

@ -3,11 +3,11 @@ import { toast } from '$lib/components/toast/toast';
import { ToastType, type GameType } from '$lib/types';
export function addToCollection(game: GameType) {
collectionStore.add(game)
collectionStore.add(game);
toast.send(`"${game.name}" added to collection!`, { duration: 3000, type: ToastType.INFO });
}
export function removeFromCollection(game: GameType) {
collectionStore.remove(game.id)
collectionStore.remove(game.id);
toast.send(`Removed "${game.name}" from collection!`, { duration: 3000, type: ToastType.INFO });
}

View file

@ -11,7 +11,7 @@ export const POST: RequestHandler = async ({ request }) => {
limit: 20,
client_id: import.meta.env.VITE_PUBLIC_CLIENT_ID,
fuzzy_match: true,
name: '',
name: ''
};
queryParams.name = `${form.get('name')}`;
@ -25,7 +25,8 @@ export const POST: RequestHandler = async ({ request }) => {
const urlQueryParams = new URLSearchParams(newQueryParams);
const url = `https://api.boardgameatlas.com/api/search${urlQueryParams ? `?${urlQueryParams}` : ''
const url = `https://api.boardgameatlas.com/api/search${
urlQueryParams ? `?${urlQueryParams}` : ''
}`;
const response = await fetch(url, {
method: 'get',
@ -48,8 +49,8 @@ export const POST: RequestHandler = async ({ request }) => {
const gameResponse = await response.json();
const gameList = gameResponse?.games;
const games: GameType[] = [];
gameList.forEach(game => {
games.push(mapAPIGameToBoredGame(game))
gameList.forEach((game) => {
games.push(mapAPIGameToBoredGame(game));
});
return {
body: {

View file

@ -77,7 +77,8 @@ export const POST: RequestHandler = async ({ request }) => {
const urlQueryParams = new URLSearchParams(newQueryParams);
const url = `https://api.boardgameatlas.com/api/search${urlQueryParams ? `?${urlQueryParams}` : ''
const url = `https://api.boardgameatlas.com/api/search${
urlQueryParams ? `?${urlQueryParams}` : ''
}`;
const response = await fetch(url, {
method: 'get',
@ -100,13 +101,13 @@ export const POST: RequestHandler = async ({ request }) => {
const gameResponse = await response.json();
const gameList = gameResponse?.games;
const games: GameType[] = [];
gameList.forEach(game => {
games.push(mapAPIGameToBoredGame(game))
gameList.forEach((game) => {
games.push(mapAPIGameToBoredGame(game));
});
console.log('games', games);
return {
body: {
games,
games
}
};
}

View file

@ -36,11 +36,22 @@
<p>Playtime: {game.playtime} minutes</p>
<p>Minimum Age: {game.min_age}</p>
<p>Price: ${game?.price}</p>
<a style="display: flex; gap: 1rem;" href={game.url} target="_blank" rel="noreferrer">Board Game Atlas Link <Icon name="external-link" /></a>
<a
style="display: flex; gap: 1rem;"
href={game.url}
target="_blank"
rel="noreferrer"
aria-label={`Board Game Atlas Link for ${game.name}`}
>Board Game Atlas Link <Icon name="external-link" /></a
>
{#if existsInCollection}
<button class="btn" type="button" on:click={() => removeFromCollection(game)}>Remove from collection -</button>
<button class="btn" type="button" on:click={() => removeFromCollection(game)}
>Remove from collection -</button
>
{:else}
<button class="btn" type="button" on:click={() => addToCollection(game)}>Add to collection +</button>
<button class="btn" type="button" on:click={() => addToCollection(game)}
>Add to collection +</button
>
{/if}
</div>
</section>
@ -55,7 +66,9 @@
{@html game?.description?.substring(firstParagraphEnd + 1)}
</span>
{/if}
<button class="btn" type="button" on:click={() => (seeMore = !seeMore)}>See {!seeMore ? 'More +' : 'Less -'}</button>
<button class="btn" type="button" on:click={() => (seeMore = !seeMore)}
>See {!seeMore ? 'More +' : 'Less -'}</button
>
{/if}
</section>
{/if}

View file

@ -4,8 +4,8 @@ import { boardGameApi } from '../_api';
export const GET: RequestHandler = async ({ params }) => {
// console.log('params', params);
const queryParams = {
ids: `${params?.id}`,
}
ids: `${params?.id}`
};
console.log('queryParams', queryParams);
const response = await boardGameApi('get', `search`, queryParams);
if (response.status === 404) {
@ -23,7 +23,7 @@ export const GET: RequestHandler = async ({ params }) => {
console.log('game', gameResponse?.games[0]);
return {
body: {
game: gameResponse?.games[0],
game: gameResponse?.games[0]
}
};
}
@ -31,4 +31,4 @@ export const GET: RequestHandler = async ({ params }) => {
return {
status: response.status
};
}
};

View file

@ -15,8 +15,8 @@ const config = {
// Override http methods in the Todo forms
methodOverride: {
allowed: ['PATCH', 'DELETE']
},
},
}
}
};
export default config;