From daad2efe5e4e7fe10be835eb619f811e743ec6c9 Mon Sep 17 00:00:00 2001 From: Bradley Shellnut Date: Wed, 27 Jul 2022 17:05:54 -0700 Subject: [PATCH] Format prettier and type checking. --- .vscode/launch.json | 6 +- package.json | 18 +- pnpm-lock.yaml | 319 +++++++++--------- src/lib/components/Icon.svelte | 19 +- src/lib/components/game/index.svelte | 17 +- src/lib/components/preferences/themes.svelte | 2 +- src/lib/components/random/index.svelte | 12 +- .../search/advancedSearch/index.svelte | 3 - src/lib/components/search/random/index.svelte | 7 - src/lib/components/toast/Toast.svelte | 27 +- src/lib/components/toast/ToastMessage.svelte | 3 +- src/lib/components/toast/toast.ts | 13 +- src/lib/components/transition/index.svelte | 12 +- src/lib/stores/boredState.ts | 33 +- src/lib/stores/collectionStore.ts | 22 +- src/lib/stores/gameSearchStore.ts | 22 +- src/lib/types.ts | 8 +- src/lib/util/gameMapper.ts | 8 +- src/lib/util/manipulateCollection.ts | 6 +- src/routes/__error.svelte | 2 +- src/routes/__layout.svelte | 2 +- src/routes/api/game/index.ts | 11 +- src/routes/api/games/index.ts | 11 +- src/routes/game/[id].svelte | 21 +- src/routes/game/[id].ts | 8 +- svelte.config.js | 4 +- 26 files changed, 331 insertions(+), 285 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index f5e4f37..15e9668 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,9 +5,7 @@ "name": "Launch Vite DEV server", "request": "launch", "runtimeExecutable": "npx", - "runtimeArgs": [ - "vite", - ], + "runtimeArgs": ["vite"], "type": "node", "serverReadyAction": { "action": "debugWithChrome", @@ -16,4 +14,4 @@ } } ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 9f66076..ac8f5fd 100644 --- a/package.json +++ b/package.json @@ -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": { @@ -49,4 +49,4 @@ "feather-icons": "^4.29.0", "zod": "^3.17.10" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fa79f25..4cc799f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -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 diff --git a/src/lib/components/Icon.svelte b/src/lib/components/Icon.svelte index 9fa5392..cba2228 100644 --- a/src/lib/components/Icon.svelte +++ b/src/lib/components/Icon.svelte @@ -1,27 +1,24 @@ {#if icon} - + {@html icon.contents} @@ -35,4 +32,4 @@ overflow: visible; transform-origin: 50% 50%; } - \ No newline at end of file + diff --git a/src/lib/components/game/index.svelte b/src/lib/components/game/index.svelte index d25bdf7..48927b9 100644 --- a/src/lib/components/game/index.svelte +++ b/src/lib/components/game/index.svelte @@ -3,7 +3,7 @@ import { ToastType, type GameType } from '$lib/types'; import { collectionStore } from '$lib/stores/collectionStore'; import { toast } from '$lib/components/toast/toast'; -import { addToCollection, removeFromCollection } from '$lib/util/manipulateCollection'; + import { addToCollection, removeFromCollection } from '$lib/util/manipulateCollection'; export let game: GameType; export let detailed: boolean = false; @@ -29,16 +29,18 @@ import { addToCollection, removeFromCollection } from '$lib/util/manipulateColle {/if} {#if existsInCollection} - + {:else} - + {/if} -
{#each $toast as toastData (toastData.id)}
toastData.dismissible && toast.remove(toastData.id)} in:fly={{ opacity: 0, x: 100 }} out:fade @@ -19,9 +19,25 @@ > {#if toastData.dismissible && toastData.showButton} - {/if}
@@ -56,7 +72,8 @@ opacity: 1; transition: ease 0.3s; - &:hover, &:focus { + &:hover, + &:focus { transition: ease 0.3s; background-color: #625df5; } diff --git a/src/lib/components/toast/ToastMessage.svelte b/src/lib/components/toast/ToastMessage.svelte index ae6985e..4814252 100644 --- a/src/lib/components/toast/ToastMessage.svelte +++ b/src/lib/components/toast/ToastMessage.svelte @@ -1,10 +1,9 @@ {#if transition.type === 'page'} diff --git a/src/lib/stores/boredState.ts b/src/lib/stores/boredState.ts index 276084d..78f10d3 100644 --- a/src/lib/stores/boredState.ts +++ b/src/lib/stores/boredState.ts @@ -1,28 +1,29 @@ +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({ loading: false }); - // function remove(id: string) { - // update((store) => { - // const newStore = store.filter((item: GameType) => item.id !== id); - // return [...newStore]; - // }); - // } + // function remove(id: string) { + // update((store) => { + // const newStore = store.filter((item: GameType) => item.id !== id); + // return [...newStore]; + // }); + // } - // function removeAll() { - // update(() => { - // return []; - // }); - // } + // function removeAll() { + // update(() => { + // return []; + // }); + // } - function clear() { - set({ loading: false }); - } + function clear() { + set({ loading: false }); + } - return { subscribe, set, update, clear }; + return { subscribe, set, update, clear }; }; export const boredState = state(); diff --git a/src/lib/stores/collectionStore.ts b/src/lib/stores/collectionStore.ts index 4e849bd..b0951bd 100644 --- a/src/lib/stores/collectionStore.ts +++ b/src/lib/stores/collectionStore.ts @@ -3,18 +3,18 @@ import type { GameType } from '$lib/types'; // Custom store const state = () => { - const { subscribe, set, update } = writable([]); + const { subscribe, set, update } = writable([]); - function add(game: GameType) { - update((store) => [...store, game]); - } + function add(game: GameType) { + update((store) => [...store, game]); + } - function remove(id: string) { - update((store) => { - const newStore = store.filter((item: GameType) => item.id !== id); - return [...newStore]; - }); - } + function remove(id: string) { + update((store) => { + const newStore = store.filter((item: GameType) => item.id !== id); + return [...newStore]; + }); + } function removeAll() { update(() => { @@ -22,7 +22,7 @@ const state = () => { }); } - return { subscribe, set, update, add, remove, removeAll }; + return { subscribe, set, update, add, remove, removeAll }; }; export const collectionStore = state(); diff --git a/src/lib/stores/gameSearchStore.ts b/src/lib/stores/gameSearchStore.ts index 55a337e..19c42db 100644 --- a/src/lib/stores/gameSearchStore.ts +++ b/src/lib/stores/gameSearchStore.ts @@ -3,22 +3,22 @@ import type { GameType } from '$lib/types'; // Custom store const newGameStore = () => { - const { subscribe, update } = writable([]); + const { subscribe, update } = writable([]); - function add(game: GameType) { - update((store) => [...store, game]); - } + function add(game: GameType) { + update((store) => [...store, game]); + } function addAll(games: GameType[]) { update((store) => [...store, ...games]); } - function remove(id: string) { - update((store) => { - const newStore = store.filter((item: GameType) => item.id !== id); - return [...newStore]; - }); - } + function remove(id: string) { + update((store) => { + const newStore = store.filter((item: GameType) => item.id !== id); + return [...newStore]; + }); + } function removeAll() { update(() => { @@ -26,7 +26,7 @@ const newGameStore = () => { }); } - return { subscribe, add, addAll, remove, removeAll }; + return { subscribe, add, addAll, remove, removeAll }; }; export const gameStore = newGameStore(); diff --git a/src/lib/types.ts b/src/lib/types.ts index d8c8260..5aa8e26 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -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 = { diff --git a/src/lib/util/gameMapper.ts b/src/lib/util/gameMapper.ts index 6d30554..e7e73ce 100644 --- a/src/lib/util/gameMapper.ts +++ b/src/lib/util/gameMapper.ts @@ -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 }; -} \ No newline at end of file +} diff --git a/src/lib/util/manipulateCollection.ts b/src/lib/util/manipulateCollection.ts index cda3f9c..dff4758 100644 --- a/src/lib/util/manipulateCollection.ts +++ b/src/lib/util/manipulateCollection.ts @@ -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 }); -} \ No newline at end of file +} diff --git a/src/routes/__error.svelte b/src/routes/__error.svelte index 5a8a637..b15ccf6 100644 --- a/src/routes/__error.svelte +++ b/src/routes/__error.svelte @@ -7,4 +7,4 @@ font-size: var(--font-32); text-align: center; } - \ No newline at end of file + diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index 068a4c4..e552509 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -9,7 +9,7 @@ import { toast } from '$lib/components/toast/toast'; // import 'carbon-components-svelte/css/all.css'; import '$root/styles/styles.scss'; -import Toast from '$lib/components/toast/Toast.svelte'; + import Toast from '$lib/components/toast/Toast.svelte'; const dev = process.env.NODE_ENV !== 'production'; diff --git a/src/routes/api/game/index.ts b/src/routes/api/game/index.ts index b337af7..87d7de9 100644 --- a/src/routes/api/game/index.ts +++ b/src/routes/api/game/index.ts @@ -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,8 +25,9 @@ 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', headers: { @@ -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: { diff --git a/src/routes/api/games/index.ts b/src/routes/api/games/index.ts index 0f1bfe8..83ca8a9 100644 --- a/src/routes/api/games/index.ts +++ b/src/routes/api/games/index.ts @@ -77,8 +77,9 @@ 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', headers: { @@ -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 } }; } diff --git a/src/routes/game/[id].svelte b/src/routes/game/[id].svelte index f12a0e0..ef8e9ad 100644 --- a/src/routes/game/[id].svelte +++ b/src/routes/game/[id].svelte @@ -36,11 +36,22 @@

Playtime: {game.playtime} minutes

Minimum Age: {game.min_age}

Price: ${game?.price}

- Board Game Atlas Link + Board Game Atlas Link {#if existsInCollection} - + {:else} - + {/if}
@@ -55,7 +66,9 @@ {@html game?.description?.substring(firstParagraphEnd + 1)} {/if} - + {/if} {/if} diff --git a/src/routes/game/[id].ts b/src/routes/game/[id].ts index fa64a44..bda68fe 100644 --- a/src/routes/game/[id].ts +++ b/src/routes/game/[id].ts @@ -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 }; -} +}; diff --git a/svelte.config.js b/svelte.config.js index 0e36820..d6f36f5 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -15,8 +15,8 @@ const config = { // Override http methods in the Todo forms methodOverride: { allowed: ['PATCH', 'DELETE'] - }, - }, + } + } }; export default config;