diff options
39 files changed, 472 insertions, 833 deletions
diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3ccf435..22ef032 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,20 +1,20 @@ module.exports = { root: true, - parser: '@typescript-eslint/parser', - extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], - plugins: ['svelte3', '@typescript-eslint'], - ignorePatterns: ['*.cjs'], - overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], + parser: "@typescript-eslint/parser", + extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], + plugins: ["svelte3", "@typescript-eslint"], + ignorePatterns: ["*.cjs"], + overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }], settings: { - 'svelte3/typescript': () => require('typescript') + "svelte3/typescript": () => require("typescript"), }, parserOptions: { - sourceType: 'module', - ecmaVersion: 2020 + sourceType: "module", + ecmaVersion: 2020, }, env: { browser: true, es2017: true, - node: true - } + node: true, + }, }; diff --git a/.prettierignore b/.prettierignore index 3897265..843ba71 100644 --- a/.prettierignore +++ b/.prettierignore @@ -11,3 +11,6 @@ node_modules pnpm-lock.yaml package-lock.json yarn.lock +.vercel +dist +sanity
\ No newline at end of file diff --git a/.typesafe-i18n.json b/.typesafe-i18n.json index d810b76..be4b0c4 100644 --- a/.typesafe-i18n.json +++ b/.typesafe-i18n.json @@ -1,4 +1,4 @@ { - "adapter": "svelte", - "$schema": "https://unpkg.com/typesafe-i18n@5.24.1/schema/typesafe-i18n.json" -}
\ No newline at end of file + "adapter": "svelte", + "$schema": "https://unpkg.com/typesafe-i18n@5.24.1/schema/typesafe-i18n.json" +} diff --git a/package.json b/package.json index 3d190b5..a141b25 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,7 @@ "@playwright/test": "^1.30.0", "@portabletext/svelte": "2.0.0-0", "@sveltejs/adapter-auto": "^2.0.0", - "@sveltejs/adapter-vercel": "^2.0.4", - "@sveltejs/kit": "^1.7.1", - "@sveltejs/package": "^2.0.0", + "@sveltejs/kit": "^1.7.2", "@tailwindcss/aspect-ratio": "^0.4.2", "@typescript-eslint/eslint-plugin": "^5.52.0", "@typescript-eslint/parser": "^5.52.0", @@ -39,7 +37,7 @@ "tailwindcss": "^3.2.7", "tslib": "^2.5.0", "typescript": "^4.9.5", - "vite": "^4.1.1", + "vite": "^4.1.2", "vitest": "^0.28.5" }, "type": "module", diff --git a/playwright.config.ts b/playwright.config.ts index 80731be..55b9989 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,11 +1,11 @@ -import type { PlaywrightTestConfig } from '@playwright/test'; +import type { PlaywrightTestConfig } from "@playwright/test"; const config: PlaywrightTestConfig = { webServer: { - command: 'npm run build && npm run preview', - port: 4173 + command: "npm run build && npm run preview", + port: 4173, }, - testDir: 'tests' + testDir: "tests", }; export default config; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef27fe5..5359bc2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,9 +5,7 @@ specifiers: '@portabletext/svelte': 2.0.0-0 '@sanity/client': ^5.2.1 '@sveltejs/adapter-auto': ^2.0.0 - '@sveltejs/adapter-vercel': ^2.0.4 - '@sveltejs/kit': ^1.7.1 - '@sveltejs/package': ^2.0.0 + '@sveltejs/kit': ^1.7.2 '@tailwindcss/aspect-ratio': ^0.4.2 '@typescript-eslint/eslint-plugin': ^5.52.0 '@typescript-eslint/parser': ^5.52.0 @@ -28,7 +26,7 @@ specifiers: tslib: ^2.5.0 typesafe-i18n: ^5.24.1 typescript: ^4.9.5 - vite: ^4.1.1 + vite: ^4.1.2 vitest: ^0.28.5 dependencies: @@ -38,10 +36,8 @@ dependencies: devDependencies: '@playwright/test': 1.30.0 '@portabletext/svelte': 2.0.0-0_svelte@3.55.1 - '@sveltejs/adapter-auto': 2.0.0_@sveltejs+kit@1.7.1 - '@sveltejs/adapter-vercel': 2.0.4_@sveltejs+kit@1.7.1 - '@sveltejs/kit': 1.7.1_svelte@3.55.1+vite@4.1.1 - '@sveltejs/package': 2.0.0_4x7phaipmicbaooxtnresslofa + '@sveltejs/adapter-auto': 2.0.0_@sveltejs+kit@1.7.2 + '@sveltejs/kit': 1.7.2_svelte@3.55.1+vite@4.1.2 '@tailwindcss/aspect-ratio': 0.4.2_tailwindcss@3.2.7 '@typescript-eslint/eslint-plugin': 5.52.0_6cfvjsbua5ptj65675bqcn6oza '@typescript-eslint/parser': 5.52.0_7kw3g6rralp5ps6mg3uyzz6azm @@ -61,7 +57,7 @@ devDependencies: tailwindcss: 3.2.7_postcss@8.4.21 tslib: 2.5.0 typescript: 4.9.5 - vite: 4.1.1 + vite: 4.1.2 vitest: 0.28.5 packages: @@ -317,24 +313,6 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true - /@mapbox/node-pre-gyp/1.0.10: - resolution: {integrity: sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==} - hasBin: true - dependencies: - detect-libc: 2.0.1 - https-proxy-agent: 5.0.1 - make-dir: 3.1.0 - node-fetch: 2.6.9 - nopt: 5.0.0 - npmlog: 5.0.1 - rimraf: 3.0.2 - semver: 7.3.8 - tar: 6.1.13 - transitivePeerDependencies: - - encoding - - supports-color - dev: true - /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -361,7 +339,7 @@ packages: engines: {node: '>=14'} hasBin: true dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.0 playwright-core: 1.30.0 dev: true @@ -390,14 +368,6 @@ packages: engines: {node: ^14.13.1 || >=16.0.0 || >=18.0.0} dev: true - /@rollup/pluginutils/4.2.1: - resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} - engines: {node: '>= 8.0.0'} - dependencies: - estree-walker: 2.0.2 - picomatch: 2.3.1 - dev: true - /@sanity/client/5.2.1: resolution: {integrity: sha512-fkpVdywu23gPWjNGC+Z2uAM+CFlQuEoDQMc9aVWJQqQwPthD6jCkmTgbwZDscFjTjn6eu6+6s5PHdNM6fPPoDA==} engines: {node: '>=14.18'} @@ -416,30 +386,17 @@ packages: eventsource: 2.0.2 dev: false - /@sveltejs/adapter-auto/2.0.0_@sveltejs+kit@1.7.1: + /@sveltejs/adapter-auto/2.0.0_@sveltejs+kit@1.7.2: resolution: {integrity: sha512-b+gkHFZgD771kgV3aO4avHFd7y1zhmMYy9i6xOK7m/rwmwaRO8gnF5zBc0Rgca80B2PMU1bKNxyBTHA14OzUAQ==} peerDependencies: '@sveltejs/kit': ^1.0.0 dependencies: - '@sveltejs/kit': 1.7.1_svelte@3.55.1+vite@4.1.1 + '@sveltejs/kit': 1.7.2_svelte@3.55.1+vite@4.1.2 import-meta-resolve: 2.2.1 dev: true - /@sveltejs/adapter-vercel/2.0.4_@sveltejs+kit@1.7.1: - resolution: {integrity: sha512-5tN3sCMQtN/ZV7O26hEVpylIZMMPNkDaDmXxDdEyUZGYpO9x9FOa2CN1CbMQBBGAiCuMxgmtjlWFz4GkYXRU+Q==} - peerDependencies: - '@sveltejs/kit': ^1.5.0 - dependencies: - '@sveltejs/kit': 1.7.1_svelte@3.55.1+vite@4.1.1 - '@vercel/nft': 0.22.6 - esbuild: 0.16.17 - transitivePeerDependencies: - - encoding - - supports-color - dev: true - - /@sveltejs/kit/1.7.1_svelte@3.55.1+vite@4.1.1: - resolution: {integrity: sha512-epaQCaZ/D3Qr/SgrRKHv+MpM6rz8JdaXSjOjas8t7PbDJl88KpqYWUvsmyuJQn/yNNGar23kENyy4NueNnjIKQ==} + /@sveltejs/kit/1.7.2_svelte@3.55.1+vite@4.1.2: + resolution: {integrity: sha512-qU/kbupIhsA1JA0GIN4cGa6XrhzPc99Z4agsEDeGPMy7qQqYCuFcIL2MLEH+tfqPUCu4m3FQ6ULVSUIVCnHj+A==} engines: {node: ^16.14 || >=18} hasBin: true requiresBuild: true @@ -447,7 +404,7 @@ packages: svelte: ^3.54.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 2.0.2_svelte@3.55.1+vite@4.1.1 + '@sveltejs/vite-plugin-svelte': 2.0.2_svelte@3.55.1+vite@4.1.2 '@types/cookie': 0.5.1 cookie: 0.5.0 devalue: 4.3.0 @@ -461,28 +418,12 @@ packages: svelte: 3.55.1 tiny-glob: 0.2.9 undici: 5.19.1 - vite: 4.1.1 + vite: 4.1.2 transitivePeerDependencies: - supports-color dev: true - /@sveltejs/package/2.0.0_4x7phaipmicbaooxtnresslofa: - resolution: {integrity: sha512-sANz/dJibOHOe83hl8pFWUSypqefdYwPp6SUr0SmJxTNQFB5dDECEqwAwoy28DWCQFYl7DU+C1hKkTXyuKOdug==} - engines: {node: ^16.14 || >=18} - hasBin: true - peerDependencies: - svelte: ^3.44.0 - dependencies: - chokidar: 3.5.3 - kleur: 4.1.5 - sade: 1.8.1 - svelte: 3.55.1 - svelte2tsx: 0.6.1_4x7phaipmicbaooxtnresslofa - transitivePeerDependencies: - - typescript - dev: true - - /@sveltejs/vite-plugin-svelte/2.0.2_svelte@3.55.1+vite@4.1.1: + /@sveltejs/vite-plugin-svelte/2.0.2_svelte@3.55.1+vite@4.1.2: resolution: {integrity: sha512-xCEan0/NNpQuL0l5aS42FjwQ6wwskdxC3pW1OeFtEKNZwRg7Evro9lac9HesGP6TdFsTv2xMes5ASQVKbCacxg==} engines: {node: ^14.18.0 || >= 16} peerDependencies: @@ -495,8 +436,8 @@ packages: magic-string: 0.27.0 svelte: 3.55.1 svelte-hmr: 0.15.1_svelte@3.55.1 - vite: 4.1.1 - vitefu: 0.2.4_vite@4.1.1 + vite: 4.1.2 + vitefu: 0.2.4_vite@4.1.2 transitivePeerDependencies: - supports-color dev: true @@ -527,8 +468,8 @@ packages: resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} dev: true - /@types/node/18.13.0: - resolution: {integrity: sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==} + /@types/node/18.14.0: + resolution: {integrity: sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==} dev: true /@types/pug/2.0.6: @@ -538,7 +479,7 @@ packages: /@types/sass/1.43.1: resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.0 dev: true /@types/semver/7.3.13: @@ -675,27 +616,6 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /@vercel/nft/0.22.6: - resolution: {integrity: sha512-gTsFnnT4mGxodr4AUlW3/urY+8JKKB452LwF3m477RFUJTAaDmcz2JqFuInzvdybYIeyIv1sSONEJxsxnbQ5JQ==} - engines: {node: '>=14'} - hasBin: true - dependencies: - '@mapbox/node-pre-gyp': 1.0.10 - '@rollup/pluginutils': 4.2.1 - acorn: 8.8.2 - async-sema: 3.1.1 - bindings: 1.5.0 - estree-walker: 2.0.2 - glob: 7.2.3 - graceful-fs: 4.2.10 - micromatch: 4.0.5 - node-gyp-build: 4.6.0 - resolve-from: 5.0.0 - transitivePeerDependencies: - - encoding - - supports-color - dev: true - /@vitest/expect/0.28.5: resolution: {integrity: sha512-gqTZwoUTwepwGIatnw4UKpQfnoyV0Z9Czn9+Lo2/jLIt4/AXLTn+oVZxlQ7Ng8bzcNkR+3DqLJ08kNr8jRmdNQ==} dependencies: @@ -728,10 +648,6 @@ packages: pretty-format: 27.5.1 dev: true - /abbrev/1.1.1: - resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - dev: true - /acorn-jsx/5.3.2_acorn@8.8.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -770,15 +686,6 @@ packages: hasBin: true dev: true - /agent-base/6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - dependencies: - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: true - /ajv/6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -830,18 +737,6 @@ packages: picomatch: 2.3.1 dev: true - /aproba/2.0.0: - resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} - dev: true - - /are-we-there-yet/2.0.0: - resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} - engines: {node: '>=10'} - dependencies: - delegates: 1.0.0 - readable-stream: 3.6.0 - dev: true - /arg/5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} dev: true @@ -859,10 +754,6 @@ packages: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true - /async-sema/3.1.1: - resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==} - dev: true - /autoprefixer/10.4.13_postcss@8.4.21: resolution: {integrity: sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==} engines: {node: ^10 || ^12 || >=14} @@ -871,7 +762,7 @@ packages: postcss: ^8.1.0 dependencies: browserslist: 4.21.5 - caniuse-lite: 1.0.30001454 + caniuse-lite: 1.0.30001456 fraction.js: 4.2.0 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -893,12 +784,6 @@ packages: engines: {node: '>=8'} dev: true - /bindings/1.5.0: - resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - dependencies: - file-uri-to-path: 1.0.0 - dev: true - /brace-expansion/1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -918,8 +803,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001454 - electron-to-chromium: 1.4.300 + caniuse-lite: 1.0.30001456 + electron-to-chromium: 1.4.302 node-releases: 2.0.10 update-browserslist-db: 1.0.10_browserslist@4.21.5 dev: true @@ -961,8 +846,8 @@ packages: engines: {node: '>= 6'} dev: true - /caniuse-lite/1.0.30001454: - resolution: {integrity: sha512-4E63M5TBbgDoA9dQoFRdjL6iAmzTrz3rwYWoKDlvnvyvBxjCZ0rrUoX3THhEMie0/RYuTCeMbeTYLGAWgnLwEg==} + /caniuse-lite/1.0.30001456: + resolution: {integrity: sha512-XFHJY5dUgmpMV25UqaD4kVq2LsiaU5rS8fb0f17pCoXQiQslzmFgnfOxfvo1bTpTqf7dwG/N/05CnLCnOEKmzA==} dev: true /chai/4.3.7: @@ -1014,11 +899,6 @@ packages: fsevents: 2.3.2 dev: true - /chownr/2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} - dev: true - /cli-truncate/3.1.0: resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -1048,19 +928,10 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true - /color-support/1.1.3: - resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} - hasBin: true - dev: true - /concat-map/0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true - /console-control-strings/1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} - dev: true - /cookie/0.5.0: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} @@ -1114,10 +985,6 @@ packages: mimic-response: 3.1.0 dev: false - /dedent-js/1.0.1: - resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} - dev: true - /deep-eql/4.1.3: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} @@ -1146,20 +1013,11 @@ packages: resolution: {integrity: sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==} dev: true - /delegates/1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - dev: true - /detect-indent/6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} dev: true - /detect-libc/2.0.1: - resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==} - engines: {node: '>=8'} - dev: true - /detective/5.2.1: resolution: {integrity: sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==} engines: {node: '>=0.8.0'} @@ -1205,12 +1063,8 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true - /electron-to-chromium/1.4.300: - resolution: {integrity: sha512-tHLIBkKaxvG6NnDWuLgeYrz+LTwAnApHm2R3KBNcRrFn0qLmTrqQeB4X4atfN6YJbkOOOSdRBeQ89OfFUelnEQ==} - dev: true - - /emoji-regex/8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + /electron-to-chromium/1.4.302: + resolution: {integrity: sha512-Uk7C+7aPBryUR1Fwvk9VmipBcN9fVsqBO57jV2ZjTm+IZ6BMNqu7EDVEg2HxCNufk6QcWlFsBkhQyQroB2VWKw==} dev: true /emoji-regex/9.2.2: @@ -1469,10 +1323,6 @@ packages: engines: {node: '>=4.0'} dev: true - /estree-walker/2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: true - /esutils/2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -1523,10 +1373,6 @@ packages: flat-cache: 3.0.4 dev: true - /file-uri-to-path/1.0.0: - resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - dev: true - /fill-range/7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -1583,13 +1429,6 @@ packages: readable-stream: 2.3.7 dev: false - /fs-minipass/2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} - dependencies: - minipass: 3.3.6 - dev: true - /fs.realpath/1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true @@ -1620,21 +1459,6 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true - /gauge/3.0.2: - resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} - engines: {node: '>=10'} - dependencies: - aproba: 2.0.0 - color-support: 1.1.3 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wide-align: 1.1.5 - dev: true - /get-func-name/2.0.0: resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} dev: true @@ -1788,10 +1612,6 @@ packages: has-symbols: 1.0.3 dev: true - /has-unicode/2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - dev: true - /has/1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} @@ -1803,16 +1623,6 @@ packages: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true - /https-proxy-agent/5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} - dependencies: - agent-base: 6.0.2 - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: true - /ignore/5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -1918,11 +1728,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /is-fullwidth-code-point/3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - dev: true - /is-fullwidth-code-point/4.0.0: resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} engines: {node: '>=12'} @@ -2102,12 +1907,6 @@ packages: get-func-name: 2.0.0 dev: true - /lower-case/2.0.2: - resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} - dependencies: - tslib: 2.5.0 - dev: true - /lru-cache/6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} @@ -2129,13 +1928,6 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true - /make-dir/3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} - dependencies: - semver: 6.3.0 - dev: true - /memorystream/0.3.1: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} @@ -2180,26 +1972,6 @@ packages: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true - /minipass/3.3.6: - resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} - engines: {node: '>=8'} - dependencies: - yallist: 4.0.0 - dev: true - - /minipass/4.0.3: - resolution: {integrity: sha512-OW2r4sQ0sI+z5ckEt5c1Tri4xTgZwYDxpE54eqWlQloQRoWtXjqt9udJ5Z4dSv7wK+nfFI7FRXyCpBSft+gpFw==} - engines: {node: '>=8'} - dev: true - - /minizlib/2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} - dependencies: - minipass: 3.3.6 - yallist: 4.0.0 - dev: true - /mkdirp/0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true @@ -2207,19 +1979,13 @@ packages: minimist: 1.2.8 dev: true - /mkdirp/1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - dev: true - - /mlly/1.1.0: - resolution: {integrity: sha512-cwzBrBfwGC1gYJyfcy8TcZU1f+dbH/T+TuOhtYP2wLv/Fb51/uV7HJQfBPtEupZ2ORLRU1EKFS/QfS3eo9+kBQ==} + /mlly/1.1.1: + resolution: {integrity: sha512-Jnlh4W/aI4GySPo6+DyTN17Q75KKbLTyFK8BrGhjNP4rxuUjbRWhE6gHg3bs33URWAF44FRm7gdQA348i3XxRw==} dependencies: acorn: 8.8.2 pathe: 1.1.0 - pkg-types: 1.0.1 - ufo: 1.0.1 + pkg-types: 1.0.2 + ufo: 1.1.0 dev: true /mri/1.2.0: @@ -2253,42 +2019,10 @@ packages: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} dev: true - /no-case/3.0.4: - resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - dependencies: - lower-case: 2.0.2 - tslib: 2.5.0 - dev: true - - /node-fetch/2.6.9: - resolution: {integrity: sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - dependencies: - whatwg-url: 5.0.0 - dev: true - - /node-gyp-build/4.6.0: - resolution: {integrity: sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==} - hasBin: true - dev: true - /node-releases/2.0.10: resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} dev: true - /nopt/5.0.0: - resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} - engines: {node: '>=6'} - hasBin: true - dependencies: - abbrev: 1.1.1 - dev: true - /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -2324,20 +2058,6 @@ packages: string.prototype.padend: 3.1.4 dev: true - /npmlog/5.0.1: - resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} - dependencies: - are-we-there-yet: 2.0.0 - console-control-strings: 1.1.0 - gauge: 3.0.2 - set-blocking: 2.0.0 - dev: true - - /object-assign/4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - dev: true - /object-hash/3.0.0: resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} engines: {node: '>= 6'} @@ -2425,13 +2145,6 @@ packages: json-parse-better-errors: 1.0.2 dev: true - /pascal-case/3.1.2: - resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} - dependencies: - no-case: 3.0.4 - tslib: 2.5.0 - dev: true - /path-exists/4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -2501,11 +2214,11 @@ packages: engines: {node: '>=4'} dev: true - /pkg-types/1.0.1: - resolution: {integrity: sha512-jHv9HB+Ho7dj6ItwppRDDl0iZRYBD0jsakHXtFgoLr+cHSF6xC+QL54sJmWxyGxOLYSHm0afhXhXcQDQqH9z8g==} + /pkg-types/1.0.2: + resolution: {integrity: sha512-hM58GKXOcj8WTqUXnsQyJYXdeAPbythQgEF3nTcEo+nkD49chjQ9IKm/QJy9xf6JakXptz86h7ecP2024rrLaQ==} dependencies: jsonc-parser: 3.2.0 - mlly: 1.1.0 + mlly: 1.1.1 pathe: 1.1.0 dev: true @@ -2688,15 +2401,6 @@ packages: util-deprecate: 1.0.2 dev: false - /readable-stream/3.6.0: - resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} - engines: {node: '>= 6'} - dependencies: - inherits: 2.0.4 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - dev: true - /readdirp/3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -2723,11 +2427,6 @@ packages: engines: {node: '>=4'} dev: true - /resolve-from/5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - dev: true - /resolve/1.22.1: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true @@ -2756,8 +2455,8 @@ packages: glob: 7.2.3 dev: true - /rollup/3.15.0: - resolution: {integrity: sha512-F9hrCAhnp5/zx/7HYmftvsNBkMfLfk/dXUh73hPSM2E3CRgap65orDNJbLetoiUFwSAk6iHPLvBrZ5iHYvzqsg==} + /rollup/3.17.1: + resolution: {integrity: sha512-8RnSms6rNqHmZK+wiqgnPCqen+rRnUHXkciGDirh7B00g1rX1vpKbPDhuxCvAG2bburoI+W4Q9/PlUB/zYkiYA==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: @@ -2785,6 +2484,7 @@ packages: /safe-buffer/5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + dev: false /safe-buffer/5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -2812,11 +2512,6 @@ packages: hasBin: true dev: true - /semver/6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - dev: true - /semver/7.3.8: resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} engines: {node: '>=10'} @@ -2825,10 +2520,6 @@ packages: lru-cache: 6.0.0 dev: true - /set-blocking/2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - dev: true - /set-cookie-parser/2.5.1: resolution: {integrity: sha512-1jeBGaKNGdEq4FgIrORu/N570dwoPYio8lSoYLWmX7sQ//0JY08Xh9o5pBcgmHQ/MbsYp/aZnOe1s1lIsbLprQ==} dev: true @@ -2873,10 +2564,6 @@ packages: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} dev: true - /signal-exit/3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - dev: true - /sirv/2.0.2: resolution: {integrity: sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==} engines: {node: '>= 10'} @@ -2965,15 +2652,6 @@ packages: engines: {node: '>=10.0.0'} dev: true - /string-width/4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - dev: true - /string-width/5.1.2: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} @@ -3012,6 +2690,7 @@ packages: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 + dev: false /strip-ansi/6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} @@ -3160,18 +2839,6 @@ packages: engines: {node: '>= 8'} dev: true - /svelte2tsx/0.6.1_4x7phaipmicbaooxtnresslofa: - resolution: {integrity: sha512-O/1+5UyChfmhp1/GUv8b8iveTrn6eZwHxEXc+rw7LMKRidr9KHk5w/EiliLjDUwHa2VA6CoEty+CQylROVU4Sw==} - peerDependencies: - svelte: ^3.55 - typescript: ^4.9.4 - dependencies: - dedent-js: 1.0.1 - pascal-case: 3.1.2 - svelte: 3.55.1 - typescript: 4.9.5 - dev: true - /tailwindcss/3.2.7_postcss@8.4.21: resolution: {integrity: sha512-B6DLqJzc21x7wntlH/GsZwEXTBttVSl1FtCzC8WP4oBc/NKef7kaax5jeihkkCEWc831/5NDJ9gRNDK6NEioQQ==} engines: {node: '>=12.13.0'} @@ -3206,18 +2873,6 @@ packages: - ts-node dev: true - /tar/6.1.13: - resolution: {integrity: sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==} - engines: {node: '>=10'} - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 4.0.3 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - dev: true - /text-table/0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -3262,10 +2917,6 @@ packages: engines: {node: '>=6'} dev: true - /tr46/0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: true - /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true @@ -3328,8 +2979,8 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - /ufo/1.0.1: - resolution: {integrity: sha512-boAm74ubXHY7KJQZLlXrtMz52qFvpsbOxDcZOnw/Wf+LS4Mmyu7JxmzD4tDLtUQtmZECypJ0FrCz4QIe6dvKRA==} + /ufo/1.1.0: + resolution: {integrity: sha512-LQc2s/ZDMaCN3QLpa+uzHUOQ7SdV0qgv3VBXOolQGXTaaZpIur6PwUclF5nN2hNkiTRcUugXd1zFOW3FLJ135Q==} dev: true /unbox-primitive/1.0.2: @@ -3375,19 +3026,19 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite-node/0.28.5_@types+node@18.13.0: + /vite-node/0.28.5_@types+node@18.14.0: resolution: {integrity: sha512-LmXb9saMGlrMZbXTvOveJKwMTBTNUH66c8rJnQ0ZPNX+myPEol64+szRzXtV5ORb0Hb/91yq+/D3oERoyAt6LA==} engines: {node: '>=v14.16.0'} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.4 - mlly: 1.1.0 + mlly: 1.1.1 pathe: 1.1.0 picocolors: 1.0.0 source-map: 0.6.1 source-map-support: 0.5.21 - vite: 4.1.1_@types+node@18.13.0 + vite: 4.1.2_@types+node@18.14.0 transitivePeerDependencies: - '@types/node' - less @@ -3398,8 +3049,8 @@ packages: - terser dev: true - /vite/4.1.1: - resolution: {integrity: sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==} + /vite/4.1.2: + resolution: {integrity: sha512-MWDb9Rfy3DI8omDQySbMK93nQqStwbsQWejXRY2EBzEWKmLAXWb1mkI9Yw2IJrc+oCvPCI1Os5xSSIBYY6DEAw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -3426,13 +3077,13 @@ packages: esbuild: 0.16.17 postcss: 8.4.21 resolve: 1.22.1 - rollup: 3.15.0 + rollup: 3.17.1 optionalDependencies: fsevents: 2.3.2 dev: true - /vite/4.1.1_@types+node@18.13.0: - resolution: {integrity: sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==} + /vite/4.1.2_@types+node@18.14.0: + resolution: {integrity: sha512-MWDb9Rfy3DI8omDQySbMK93nQqStwbsQWejXRY2EBzEWKmLAXWb1mkI9Yw2IJrc+oCvPCI1Os5xSSIBYY6DEAw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -3456,16 +3107,16 @@ packages: terser: optional: true dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.0 esbuild: 0.16.17 postcss: 8.4.21 resolve: 1.22.1 - rollup: 3.15.0 + rollup: 3.17.1 optionalDependencies: fsevents: 2.3.2 dev: true - /vitefu/0.2.4_vite@4.1.1: + /vitefu/0.2.4_vite@4.1.2: resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} peerDependencies: vite: ^3.0.0 || ^4.0.0 @@ -3473,7 +3124,7 @@ packages: vite: optional: true dependencies: - vite: 4.1.1 + vite: 4.1.2 dev: true /vitest/0.28.5: @@ -3500,7 +3151,7 @@ packages: dependencies: '@types/chai': 4.3.4 '@types/chai-subset': 1.3.3 - '@types/node': 18.13.0 + '@types/node': 18.14.0 '@vitest/expect': 0.28.5 '@vitest/runner': 0.28.5 '@vitest/spy': 0.28.5 @@ -3519,8 +3170,8 @@ packages: tinybench: 2.3.1 tinypool: 0.3.1 tinyspy: 1.1.1 - vite: 4.1.1_@types+node@18.13.0 - vite-node: 0.28.5_@types+node@18.13.0 + vite: 4.1.2_@types+node@18.14.0 + vite-node: 0.28.5_@types+node@18.14.0 why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -3531,17 +3182,6 @@ packages: - terser dev: true - /webidl-conversions/3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: true - - /whatwg-url/5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - dev: true - /which-boxed-primitive/1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: @@ -3588,12 +3228,6 @@ packages: stackback: 0.0.2 dev: true - /wide-align/1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - dependencies: - string-width: 4.2.3 - dev: true - /word-wrap/1.2.3: resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} engines: {node: '>=0.10.0'} diff --git a/postcss.config.cjs b/postcss.config.cjs index fe10e55..0f88ec5 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -1,13 +1,8 @@ -const tailwindcss = require('tailwindcss'); -const autoprefixer = require('autoprefixer'); +const tailwindcss = require("tailwindcss"); +const autoprefixer = require("autoprefixer"); const config = { - plugins: [ - //Some plugins, like tailwindcss/nesting, need to run before Tailwind, - tailwindcss(), - //But others, like autoprefixer, need to run after, - autoprefixer - ] + plugins: [tailwindcss(), autoprefixer()], }; module.exports = config; diff --git a/sanity/package.json b/sanity/package.json index 1782223..e79536c 100644 --- a/sanity/package.json +++ b/sanity/package.json @@ -35,4 +35,4 @@ "bracketSpacing": false, "singleQuote": false } -}
\ No newline at end of file +} diff --git a/sanity/sanity.cli.ts b/sanity/sanity.cli.ts index d4f037d..290d8cd 100644 --- a/sanity/sanity.cli.ts +++ b/sanity/sanity.cli.ts @@ -1,8 +1,8 @@ -import { defineCliConfig } from 'sanity/cli' +import {defineCliConfig} from "sanity/cli"; export default defineCliConfig({ api: { projectId: process.env.SANITY_STUDIO_API_PROJECT_ID ?? "", dataset: process.env.SANITY_STUDIO_API_DATASET ?? "", - } -})
\ No newline at end of file + }, +}); diff --git a/sanity/sanity.config.ts b/sanity/sanity.config.ts index 07c650b..0aa425e 100644 --- a/sanity/sanity.config.ts +++ b/sanity/sanity.config.ts @@ -1,19 +1,19 @@ -import { defineConfig } from 'sanity' -import { visionTool } from '@sanity/vision' -import { schemaTypes } from './schemas' -import { withDocumentI18nPlugin } from '@sanity/document-internationalization' -import { baseLanguage, supportedLanguages } from './schemas/_locales' +import {defineConfig} from "sanity"; +import {visionTool} from "@sanity/vision"; +import {schemaTypes} from "./schemas"; +import {withDocumentI18nPlugin} from "@sanity/document-internationalization"; +import {baseLanguage, supportedLanguages} from "./schemas/_locales"; export default defineConfig({ - name: 'default', - title: 'auroraklinikken.no', + name: "default", + title: "auroraklinikken.no", projectId: process.env.SANITY_STUDIO_API_PROJECT_ID ?? "", dataset: process.env.SANITY_STUDIO_API_DATASET ?? "", plugins: withDocumentI18nPlugin([visionTool()], { - languages: supportedLanguages.map(el => el.iso), - fallbackLanguageSelect: supportedLanguages.find(l => l.isDefault)?.iso as any + languages: supportedLanguages.map((el) => el.iso), + fallbackLanguageSelect: supportedLanguages.find((l) => l.isDefault)?.iso as any, }), schema: { types: schemaTypes, }, -}) +}); diff --git a/sanity/schemas/_locales.ts b/sanity/schemas/_locales.ts index 8baca54..20273bd 100644 --- a/sanity/schemas/_locales.ts +++ b/sanity/schemas/_locales.ts @@ -1,5 +1,5 @@ export const supportedLanguages = [ - { id: 'en', iso: "en-GB", title: 'English' }, - { id: 'nb', iso: "nb-NO", title: 'Norwegian', isDefault: true }, -] -export const baseLanguage = supportedLanguages.find(l => l.isDefault) as { id: string, title: string };
\ No newline at end of file + {id: "en", iso: "en-GB", title: "English"}, + {id: "nb", iso: "nb-NO", title: "Norwegian", isDefault: true}, +]; +export const baseLanguage = supportedLanguages.find((l) => l.isDefault) as {id: string; title: string}; diff --git a/sanity/schemas/contact.ts b/sanity/schemas/contact.ts index 33bda69..1543e07 100644 --- a/sanity/schemas/contact.ts +++ b/sanity/schemas/contact.ts @@ -1,35 +1,35 @@ -import { baseLanguage } from "./_locales"; +import {baseLanguage} from "./_locales"; export default { - name: 'contact', - type: 'document', - title: 'Contact section', - preview: { - select: { - title: `title.${baseLanguage.id}` - } + name: "contact", + type: "document", + title: "Contact section", + preview: { + select: { + title: `title.${baseLanguage.id}`, }, - fields: [ - { - title: "Address lines", - name: 'addressLines', - type: 'array', - of: [{ type: 'localizedString' }] - }, - { - title: "Email", - name: "email", - type: "string", - }, - { - title: "Phone", - name: "phone", - type: "string" - }, - { - title: "Phone hours", - name: "phoneHours", - type: "localizedString" - } - ] -}
\ No newline at end of file + }, + fields: [ + { + title: "Address lines", + name: "addressLines", + type: "array", + of: [{type: "localizedString"}], + }, + { + title: "Email", + name: "email", + type: "string", + }, + { + title: "Phone", + name: "phone", + type: "string", + }, + { + title: "Phone hours", + name: "phoneHours", + type: "localizedString", + }, + ], +}; diff --git a/sanity/schemas/description.ts b/sanity/schemas/description.ts index d5d5ff3..f3fac23 100644 --- a/sanity/schemas/description.ts +++ b/sanity/schemas/description.ts @@ -1,23 +1,21 @@ -import { defineType } from "sanity"; +import {defineType} from "sanity"; export default defineType({ - name: 'description', - type: 'document', - title: 'Description section', - i18n: true, - fields: [ - { - title: "Title", - name: 'title', - type: 'string', - }, - { - title: "Content", - name: "content", - type: "array", - of: [ - { type: "block" } - ] - } - ] -})
\ No newline at end of file + name: "description", + type: "document", + title: "Description section", + i18n: true, + fields: [ + { + title: "Title", + name: "title", + type: "string", + }, + { + title: "Content", + name: "content", + type: "array", + of: [{type: "block"}], + }, + ], +}); diff --git a/sanity/schemas/hero.ts b/sanity/schemas/hero.ts index 8534675..30abd1c 100644 --- a/sanity/schemas/hero.ts +++ b/sanity/schemas/hero.ts @@ -1,33 +1,33 @@ -import { defineType } from "sanity"; +import {defineType} from "sanity"; export default defineType({ - name: 'hero', - type: 'document', - title: 'Hero section', - i18n: true, - fields: [ + name: "hero", + type: "document", + title: "Hero section", + i18n: true, + fields: [ + { + title: "Title", + name: "title", + type: "string", + }, + { + title: "Content", + name: "content", + type: "array", + of: [{type: "block"}], + }, + { + title: "Image", + name: "image", + type: "image", + fields: [ { - title: "Title", - name: 'title', - type: 'string', + title: "Alternative text", + name: "alt", + type: "string", }, - { - title: "Content", - name: "content", - type: "array", - of: [{ type: "block" }] - }, - { - title: "Image", - name: "image", - type: "image", - fields: [ - { - title: "Alternative text", - name: 'alt', - type: 'string', - } - ] - } - ] -})
\ No newline at end of file + ], + }, + ], +}); diff --git a/sanity/schemas/index.ts b/sanity/schemas/index.ts index 9dfc403..76072e5 100644 --- a/sanity/schemas/index.ts +++ b/sanity/schemas/index.ts @@ -3,4 +3,4 @@ import description from "./description"; import hero from "./hero"; import localizedString from "./localized-string"; -export const schemaTypes = [contact, localizedString, description, hero]
\ No newline at end of file +export const schemaTypes = [contact, localizedString, description, hero]; diff --git a/sanity/schemas/localized-string.ts b/sanity/schemas/localized-string.ts index 6ff7424..e4bcff6 100644 --- a/sanity/schemas/localized-string.ts +++ b/sanity/schemas/localized-string.ts @@ -1,20 +1,20 @@ -import { supportedLanguages } from "./_locales"; +import {supportedLanguages} from "./_locales"; export default { - title: 'Localized string', - name: 'localizedString', - type: 'object', - fieldsets: [ - { - title: 'Translations', - name: 'translations', - options: { collapsible: true } - } - ], - fields: supportedLanguages.map(lang => ({ - title: lang.title, - name: lang.id, - type: 'string', - fieldset: lang.isDefault ? null : 'translations' - })) -} + title: "Localized string", + name: "localizedString", + type: "object", + fieldsets: [ + { + title: "Translations", + name: "translations", + options: {collapsible: true}, + }, + ], + fields: supportedLanguages.map((lang) => ({ + title: lang.title, + name: lang.id, + type: "string", + fieldset: lang.isDefault ? null : "translations", + })), +}; diff --git a/sanity/tailwind.config.js b/sanity/tailwind.config.js index 92a1e3a..d05f283 100644 --- a/sanity/tailwind.config.js +++ b/sanity/tailwind.config.js @@ -1,11 +1,7 @@ module.exports = { - content: [ - './pages/**/*.{js,ts,jsx,tsx}', - './components/**/*.{js,ts,jsx,tsx}', - './app/**/*.{js,ts,jsx,tsx}', - ], + content: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}", "./app/**/*.{js,ts,jsx,tsx}"], theme: { extend: {}, }, plugins: [], -} +}; diff --git a/src/app.html b/src/app.html index ef0bfa1..68797f1 100644 --- a/src/app.html +++ b/src/app.html @@ -1,122 +1,121 @@ <!DOCTYPE html> <html lang="%lang%"> -<head> - <meta charset="utf-8" /> - <link rel="icon" href="%sveltekit.assets%/favicon.png" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <style> - /* reset */ - *, - *::after, - *::before { - box-sizing: border-box; - } - - * { - font: inherit; - margin: 0; - padding: 0; - border: 0; - } - - body { - background-color: hsl(0, 0%, 100%); - font-family: system-ui, sans-serif; - color: hsl(230, 7%, 23%); - font-size: 1rem; - } - - h1, - h2, - h3, - h4 { - line-height: 1.2; - color: hsl(230, 13%, 9%); - font-weight: 700; - } - - h1 { - font-size: 2.0736rem; - } - - h2 { - font-size: 1.728rem; - } + <head> + <meta charset="utf-8" /> + <link rel="icon" href="%sveltekit.assets%/favicon.png" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <style> + /* reset */ + *, + *::after, + *::before { + box-sizing: border-box; + } - h3 { - font-size: 1.25rem; - } + * { + font: inherit; + margin: 0; + padding: 0; + border: 0; + } - h4 { - font-size: 1.2rem; - } + body { + background-color: hsl(0, 0%, 100%); + font-family: system-ui, sans-serif; + color: hsl(230, 7%, 23%); + font-size: 1rem; + } - ol, - ul, - menu { - list-style: none; - } + h1, + h2, + h3, + h4 { + line-height: 1.2; + color: hsl(230, 13%, 9%); + font-weight: 700; + } - button, - input, - textarea, - select { - background-color: transparent; - border-radius: 0; - color: inherit; - line-height: inherit; - appearance: none; - } + h1 { + font-size: 2.0736rem; + } - textarea { - resize: vertical; - overflow: auto; - vertical-align: top; - } + h2 { + font-size: 1.728rem; + } - a { - color: hsl(250, 84%, 54%); - } + h3 { + font-size: 1.25rem; + } - table { - border-collapse: collapse; - border-spacing: 0; - } + h4 { + font-size: 1.2rem; + } - img, - video, - svg { - display: block; - max-width: 100%; - } + ol, + ul, + menu { + list-style: none; + } - @media (min-width: 64rem) { - body { - font-size: 1.25rem; + button, + input, + textarea, + select { + background-color: transparent; + border-radius: 0; + color: inherit; + line-height: inherit; + appearance: none; } - h1 { - font-size: 3.051rem; + textarea { + resize: vertical; + overflow: auto; + vertical-align: top; } - h2 { - font-size: 2.44rem; + a { + color: hsl(250, 84%, 54%); } - h3 { - font-size: 1.75rem; + table { + border-collapse: collapse; + border-spacing: 0; } - h4 { - font-size: 1.5625rem; + img, + video, + svg { + display: block; + max-width: 100%; } - } - </style> - %sveltekit.head% -</head> -<body> - <div>%sveltekit.body%</div> -</body> + @media (min-width: 64rem) { + body { + font-size: 1.25rem; + } + + h1 { + font-size: 3.051rem; + } + + h2 { + font-size: 2.44rem; + } + + h3 { + font-size: 1.75rem; + } + + h4 { + font-size: 1.5625rem; + } + } + </style> + %sveltekit.head% + </head> -</html>
\ No newline at end of file + <body> + <div>%sveltekit.body%</div> + </body> +</html> diff --git a/src/components/card-v4.svelte b/src/components/card-v4.svelte index d067357..ff35492 100644 --- a/src/components/card-v4.svelte +++ b/src/components/card-v4.svelte @@ -1,13 +1,20 @@ <script lang="ts"> - export let title; - export let description; + import { PortableText } from "@portabletext/svelte"; + import type { InputValue } from "@portabletext/svelte/ptTypes"; + + export let title: string | undefined; + export let description: string | undefined | InputValue; </script> <div class="card"> <div class="p-6"> - <h3 class="mt-0">I have a dream</h3> + <h3 class="mt-0">{title}</h3> <p class="text-contrast-medium mt-3 mx-0 mb-4"> - Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quia minus culpa commodi. + {#if typeof description === "string"} + {description} + {:else} + <PortableText value={description} /> + {/if} </p> <div class="flex flex-wrap gap-3"> <a href="#0" class="btn btn--subtle">Learn more</a> diff --git a/src/global.d.ts b/src/global.d.ts index e49922a..075c69d 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -1,13 +1,13 @@ /// <reference types="@sveltejs/kit" /> -type Locales = import('$i18n/i18n-types').Locales -type TranslationFunctions = import('$i18n/i18n-types').TranslationFunctions +type Locales = import("$i18n/i18n-types").Locales; +type TranslationFunctions = import("$i18n/i18n-types").TranslationFunctions; declare namespace App { - interface Locals { - locale: Locales - LL: TranslationFunctions - } + interface Locals { + locale: Locales; + LL: TranslationFunctions; + } - // interface Platform { } -}
\ No newline at end of file + // interface Platform { } +} diff --git a/src/hooks.server.ts b/src/hooks.server.ts index ddd9342..1c8c988 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -1,43 +1,41 @@ -import { detectLocale, i18n, isLocale } from '$i18n/i18n-util' -import { loadAllLocales } from '$i18n/i18n-util.sync' -import type { Handle, RequestEvent } from '@sveltejs/kit' -import { initAcceptLanguageHeaderDetector } from 'typesafe-i18n/detectors' +import { detectLocale, i18n, isLocale } from "$i18n/i18n-util"; +import { loadAllLocales } from "$i18n/i18n-util.sync"; +import type { Handle, RequestEvent } from "@sveltejs/kit"; +import { initAcceptLanguageHeaderDetector } from "typesafe-i18n/detectors"; -loadAllLocales() -const L = i18n() +loadAllLocales(); +const L = i18n(); export const handle: Handle = async ({ event, resolve }) => { - // read language slug - const [, lang] = event.url.pathname.split('/') + // read language slug + const [, lang] = event.url.pathname.split("/"); - // redirect to base locale if no locale slug was found - if (!lang) { - const locale = getPreferredLocale(event) + // redirect to base locale if no locale slug was found + if (!lang) { + const locale = getPreferredLocale(event); - return new Response(null, { - status: 302, - headers: { Location: `/${locale}` }, - }) - } + return new Response(null, { + status: 302, + headers: { Location: `/${locale}` }, + }); + } - // if slug is not a locale, use base locale (e.g. api endpoints) - const locale = isLocale(lang) ? (lang as Locales) : getPreferredLocale(event) - const LL = L[locale] + // if slug is not a locale, use base locale (e.g. api endpoints) + const locale = isLocale(lang) ? (lang as Locales) : getPreferredLocale(event); + const LL = L[locale]; - // bind locale and translation functions to current request - event.locals.locale = locale - event.locals.LL = LL + // bind locale and translation functions to current request + event.locals.locale = locale; + event.locals.LL = LL; - console.info(LL.log({ fileName: 'hooks.server.ts' })) - - // replace html lang attribute with correct language - return resolve(event, { transformPageChunk: ({ html }) => html.replace('%lang%', locale) }) -} + // replace html lang attribute with correct language + return resolve(event, { transformPageChunk: ({ html }) => html.replace("%lang%", locale) }); +}; const getPreferredLocale = ({ request }: RequestEvent) => { - // detect the preferred language the user has configured in his browser - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language - const acceptLanguageDetector = initAcceptLanguageHeaderDetector(request) + // detect the preferred language the user has configured in his browser + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language + const acceptLanguageDetector = initAcceptLanguageHeaderDetector(request); - return detectLocale(acceptLanguageDetector) -}
\ No newline at end of file + return detectLocale(acceptLanguageDetector); +}; diff --git a/src/i18n/en/index.ts b/src/i18n/en/index.ts index 796f4a5..a6b79c2 100644 --- a/src/i18n/en/index.ts +++ b/src/i18n/en/index.ts @@ -1,13 +1,13 @@ -import type { BaseTranslation } from '../i18n-types' +import type { BaseTranslation } from "../i18n-types"; const en = { contact: { title: "Contact us", addressTitle: "Address", emailTitle: "Email", - phoneTitle: "Phone" + phoneTitle: "Phone", }, homeTitle: "Home", -} satisfies BaseTranslation +} satisfies BaseTranslation; -export default en +export default en; diff --git a/src/i18n/formatters.ts b/src/i18n/formatters.ts index 78734f9..b1fd5a3 100644 --- a/src/i18n/formatters.ts +++ b/src/i18n/formatters.ts @@ -1,11 +1,10 @@ -import type { FormattersInitializer } from 'typesafe-i18n' -import type { Locales, Formatters } from './i18n-types' +import type { FormattersInitializer } from "typesafe-i18n"; +import type { Locales, Formatters } from "./i18n-types"; export const initFormatters: FormattersInitializer<Locales, Formatters> = (locale: Locales) => { - const formatters: Formatters = { // add your formatter functions here - } + }; - return formatters -} + return formatters; +}; diff --git a/src/i18n/nb/index.ts b/src/i18n/nb/index.ts index 9e13fba..5206b07 100644 --- a/src/i18n/nb/index.ts +++ b/src/i18n/nb/index.ts @@ -1,13 +1,13 @@ -import type { Translation } from '../i18n-types' +import type { Translation } from "../i18n-types"; const nb = { contact: { title: "Kontakt oss", addressTitle: "Adresse", emailTitle: "E-postadresse", - phoneTitle: "Telefon" + phoneTitle: "Telefon", }, homeTitle: "Hjem", -} satisfies Translation +} satisfies Translation; -export default nb +export default nb; diff --git a/src/index.test.ts b/src/index.test.ts index e07cbbd..808401e 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -1,7 +1,7 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from "vitest"; -describe('sum test', () => { - it('adds 1 + 2 to equal 3', () => { +describe("sum test", () => { + it("adds 1 + 2 to equal 3", () => { expect(1 + 2).toBe(3); }); }); diff --git a/src/lib/sanity-client.ts b/src/lib/sanity-client.ts index 96253ca..7aa868b 100644 --- a/src/lib/sanity-client.ts +++ b/src/lib/sanity-client.ts @@ -1,9 +1,9 @@ import { env } from "$env/dynamic/private"; -import createSanityClient from "@sanity/client"; +import { createClient } from "@sanity/client"; -export const sanity = createSanityClient({ - projectId: env.SANITY_STUDIO_API_PROJECT_ID, - dataset: env.SANITY_STUDIO_API_DATASET, - apiVersion: "2022-03-24", - useCdn: true, -});
\ No newline at end of file +export const sanity = createClient({ + projectId: env.SANITY_STUDIO_API_PROJECT_ID, + dataset: env.SANITY_STUDIO_API_DATASET, + apiVersion: "2022-03-24", + useCdn: true, +}); diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 4ec8b01..f7c040d 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -6,22 +6,22 @@ // Otherwise (default) the URL relative to the base is returned. // e.g. https://mywebsite.com/en/blog/article-1 => /de/blog/article-1 export const replaceLocaleInUrl = (url: URL, locale: string, full = false): string => { - const [, , ...rest] = url.pathname.split('/') - const new_pathname = `/${[locale, ...rest].join('/')}` - if (!full) { - return `${new_pathname}${url.search}` - } - const newUrl = new URL(url.toString()) - newUrl.pathname = new_pathname - return newUrl.toString() -} + const [, , ...rest] = url.pathname.split("/"); + const new_pathname = `/${[locale, ...rest].join("/")}`; + if (!full) { + return `${new_pathname}${url.search}`; + } + const newUrl = new URL(url.toString()); + newUrl.pathname = new_pathname; + return newUrl.toString(); +}; export function fromLocalizedString(localizedString: string | object, locale: Locales) { - if (typeof localizedString === "string") return localizedString; - // @ts-ignore - if (localizedString[locale]) return localizedString[locale]; - // @ts-ignore - if (localizedString["nb"]) return localizedString["nb"]; - // @ts-ignore - if (localizedString["en"]) return localizedString["en"]; + if (typeof localizedString === "string") return localizedString; + // @ts-ignore + if (localizedString[locale]) return localizedString[locale]; + // @ts-ignore + if (localizedString["nb"]) return localizedString["nb"]; + // @ts-ignore + if (localizedString["en"]) return localizedString["en"]; } diff --git a/src/params/lang.ts b/src/params/lang.ts index 5f0b857..5f7e2a2 100644 --- a/src/params/lang.ts +++ b/src/params/lang.ts @@ -1,7 +1,7 @@ -import type { ParamMatcher } from '@sveltejs/kit' -import { isLocale } from '$i18n/i18n-util' +import type { ParamMatcher } from "@sveltejs/kit"; +import { isLocale } from "$i18n/i18n-util"; // only accept valid languages as a segment in the URL export const match: ParamMatcher = (param) => { - return isLocale(param) -}
\ No newline at end of file + return isLocale(param); +}; diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts index fc087d8..0eef9d3 100644 --- a/src/routes/+layout.server.ts +++ b/src/routes/+layout.server.ts @@ -1,6 +1,6 @@ -import type { LayoutServerLoad } from './$types' +import type { LayoutServerLoad } from "./$types"; export const load: LayoutServerLoad = ({ locals: { locale, LL } }) => { - // pass locale information from "server-context" to "shared server + client context" - return { locale } -} + // pass locale information from "server-context" to "shared server + client context" + return { locale }; +}; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index af29844..97aa8cf 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,12 +1,9 @@ <script lang="ts"> import { page } from "$app/stores"; import "../app.postcss"; - import type { LayoutData } from "./$types"; import { locales, baseLocale } from "$i18n/i18n-util"; import { replaceLocaleInUrl } from "$lib/utils"; import Header from "./parts/header.svelte"; - - export let data: LayoutData; </script> <svelte:head> diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 5a78ab1..ab3b2cc 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -1,14 +1,14 @@ -import type { LayoutLoad } from './$types' -import { loadLocaleAsync } from '$i18n/i18n-util.async' -import { setLocale } from '$i18n/i18n-svelte' +import type { LayoutLoad } from "./$types"; +import { loadLocaleAsync } from "$i18n/i18n-util.async"; +import { setLocale } from "$i18n/i18n-svelte"; export const load = (async ({ data: { locale } }) => { - // load dictionary into memory - await loadLocaleAsync(locale) + // load dictionary into memory + await loadLocaleAsync(locale); - // if you need to output a localized string in a `load` function, - // you always need to call `setLocale` right before you access the `LL` store - setLocale(locale) - // pass locale to the "rendering context" - return { locale } -}) satisfies LayoutLoad<{ locale: Locales }>;
\ No newline at end of file + // if you need to output a localized string in a `load` function, + // you always need to call `setLocale` right before you access the `LL` store + setLocale(locale); + // pass locale to the "rendering context" + return { locale }; +}) satisfies LayoutLoad<{ locale: Locales }>; diff --git a/src/routes/[lang=lang]/+page.server.ts b/src/routes/[lang=lang]/+page.server.ts index a647cfe..c2284ee 100644 --- a/src/routes/[lang=lang]/+page.server.ts +++ b/src/routes/[lang=lang]/+page.server.ts @@ -1,29 +1,31 @@ -import { sanity } from '$lib/sanity-client'; -import type { PageServerLoad } from './$types'; +import { sanity } from "$lib/sanity-client"; +import type { PageServerLoad } from "./$types"; import groq from "groq"; -import type { ContactModel } from './sections/contact.svelte'; -import { fromLocalizedString } from '$lib/utils'; -import type { HeroModel } from './sections/hero.svelte'; -import type { DescriptionModel } from './sections/description.svelte'; +import type { ContactModel } from "./sections/contact.svelte"; +import { fromLocalizedString } from "$lib/utils"; +import type { HeroModel } from "./sections/hero.svelte"; +import type { DescriptionModel } from "./sections/description.svelte"; export const load = (async ({ locals }) => { - const contactSection = await sanity.fetch(groq`*[_type == "contact"][0]`); - const heroSection = await sanity.fetch(groq`*[_type == "hero"][0]`); - const descriptionSection = await sanity.fetch(groq`*[_type == "description"][0]`); - return { - contact: { - phone: fromLocalizedString(contactSection.phone, locals.locale), - email: fromLocalizedString(contactSection.email, locals.locale), - phoneHours: fromLocalizedString(contactSection.phoneHours, locals.locale), - addressLines: contactSection.addressLines.map((el: string | object) => fromLocalizedString(el, locals.locale)), - } as ContactModel, - hero: { - title: heroSection.title, - content: heroSection.content - } as HeroModel, - description: { - title: descriptionSection.title, - content: descriptionSection.content - } as DescriptionModel - }; -}) satisfies PageServerLoad;
\ No newline at end of file + const contactSection = await sanity.fetch(groq`*[_type == "contact"][0]`); + const heroSection = await sanity.fetch(groq`*[_type == "hero"][0]`); + const descriptionSection = await sanity.fetch(groq`*[_type == "description"][0]`); + const products = await sanity.fetch(groq`*[_type == "product"]`); + return { + contact: { + phone: fromLocalizedString(contactSection.phone, locals.locale), + email: fromLocalizedString(contactSection.email, locals.locale), + phoneHours: fromLocalizedString(contactSection.phoneHours, locals.locale), + addressLines: contactSection.addressLines.map((el: string | object) => fromLocalizedString(el, locals.locale)), + } as ContactModel, + hero: { + title: heroSection.title, + content: heroSection.content, + } as HeroModel, + description: { + title: descriptionSection.title, + content: descriptionSection.content, + } as DescriptionModel, + products: products + }; +}) satisfies PageServerLoad; diff --git a/src/routes/[lang=lang]/+page.svelte b/src/routes/[lang=lang]/+page.svelte index 325f085..f2028c6 100644 --- a/src/routes/[lang=lang]/+page.svelte +++ b/src/routes/[lang=lang]/+page.svelte @@ -12,4 +12,4 @@ <Hero model={data.hero} /> <Description model={data.description} /> <Contact model={data.contact} /> -<Products model={data.products} />
\ No newline at end of file +<Products model={data.products} /> diff --git a/src/routes/[lang=lang]/+page.ts b/src/routes/[lang=lang]/+page.ts index 1ef0b57..fa95472 100644 --- a/src/routes/[lang=lang]/+page.ts +++ b/src/routes/[lang=lang]/+page.ts @@ -1,18 +1,18 @@ -import type { PageLoad } from './$types'; -import LL, { setLocale } from '$i18n/i18n-svelte' -import { get } from 'svelte/store' +import type { PageLoad } from "./$types"; +import LL, { setLocale } from "$i18n/i18n-svelte"; +import { get } from "svelte/store"; export const load = (async ({ parent, data }) => { - // wait for `+layout.ts` to load dictionary and pass locale information - const { locale } = await parent() + // wait for `+layout.ts` to load dictionary and pass locale information + const { locale } = await parent(); - // if you need to output a localized string in a `load` function, - // you always need to call `setLocale` right before you access the `LL` store - setLocale(locale) - // get the translation functions value from the store - const $LL = get(LL) - return { - title: $LL.homeTitle(), - ...data - } -}) satisfies PageLoad;
\ No newline at end of file + // if you need to output a localized string in a `load` function, + // you always need to call `setLocale` right before you access the `LL` store + setLocale(locale); + // get the translation functions value from the store + const $LL = get(LL); + return { + title: $LL.homeTitle(), + ...data, + }; +}) satisfies PageLoad; diff --git a/src/routes/[lang=lang]/sections/products.svelte b/src/routes/[lang=lang]/sections/products.svelte index 4e10b6f..816e276 100644 --- a/src/routes/[lang=lang]/sections/products.svelte +++ b/src/routes/[lang=lang]/sections/products.svelte @@ -13,6 +13,8 @@ </script> <script lang="ts"> + import CardV4 from "$components/card-v4.svelte"; + export let model: ProductsModel; let visible = true; @@ -24,5 +26,16 @@ </script> {#if visible} - -{/if}
\ No newline at end of file + <div class="wrapper"> + {#each model.products as product} + <CardV4 description={product.description} title={product.title} /> + {/each} + </div> +{/if} + +<style lang="postcss"> + .wrapper { + display: grid; + grid-template-columns: repeat(50%); + } +</style> diff --git a/svelte.config.js b/svelte.config.js index e1b8230..e6d4ab9 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,5 +1,5 @@ import preprocess from "svelte-preprocess"; -import adapter from "@sveltejs/adapter-vercel"; +import adapter from "@sveltejs/adapter-auto"; import { vitePreprocess } from "@sveltejs/kit/vite"; /** @type {import('@sveltejs/kit').Config} */ diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 5294834..9555b86 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -114,4 +114,4 @@ module.exports = { }, }, plugins: [require("@tailwindcss/aspect-ratio")], -};
\ No newline at end of file +}; diff --git a/tests/test.ts b/tests/test.ts index 5816be4..5076f52 100644 --- a/tests/test.ts +++ b/tests/test.ts @@ -1,6 +1,6 @@ -import { expect, test } from '@playwright/test'; +import { expect, test } from "@playwright/test"; -test('index page has expected h1', async ({ page }) => { - await page.goto('/'); - await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible(); +test("index page has expected h1", async ({ page }) => { + await page.goto("/"); + await expect(page.getByRole("heading", { name: "Welcome to SvelteKit" })).toBeVisible(); }); diff --git a/vite.config.ts b/vite.config.ts index 37b6a84..08e3ed5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,9 +1,9 @@ -import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vitest/config'; +import { sveltekit } from "@sveltejs/kit/vite"; +import { defineConfig } from "vitest/config"; export default defineConfig({ plugins: [sveltekit()], test: { - include: ['src/**/*.{test,spec}.{js,ts}'] - } + include: ["src/**/*.{test,spec}.{js,ts}"], + }, }); |
