From 597399ecfe89ed0b408fe2d6408d14d24c4b0212 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 28 Oct 2022 13:35:36 +0200 Subject: [PATCH] perf: fix types and slightly reduce payload (#804) --- nuxt.config.ts | 8 + package.json | 12 +- pnpm-lock.yaml | 542 +++++++++++++++-------- src/app.vue | 2 +- src/composables/{prefetch.ts => data.ts} | 38 +- src/composables/onIdle.ts | 21 + src/pages/blog/[article].vue | 10 +- src/pages/blog/index.vue | 2 +- src/pages/index.vue | 2 +- src/pages/talks.vue | 2 +- src/pages/uses.vue | 2 +- src/plugins/auth.ts | 4 +- src/plugins/polyfill.ts | 24 - 13 files changed, 410 insertions(+), 259 deletions(-) rename src/composables/{prefetch.ts => data.ts} (69%) delete mode 100644 src/plugins/polyfill.ts diff --git a/nuxt.config.ts b/nuxt.config.ts index b701776f..2658ff21 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,3 +1,5 @@ +import { useNuxt } from '@nuxt/kit' + export default defineNuxtConfig({ runtimeConfig: { // JWT claims @@ -145,6 +147,12 @@ export default defineNuxtConfig({ modules: [ 'magic-regexp/nuxt', '@nuxt/image-edge', + function () { + // Hotfix for tailwind + const nuxt = useNuxt() + // @ts-expect-error Nuxt 2 types + nuxt.options.watch = nuxt.options.watch || [] + }, '@nuxtjs/tailwindcss', '@nuxtjs/color-mode', '@nuxt/content', diff --git a/package.json b/package.json index bcd8c001..104ac68c 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "dependencies": { "@nuxt/content": "npm:@nuxt/content-edge@2.2.0-27777064.6463e46", "@nuxt/image-edge": "1.0.0-27769790.4b27db3", - "@nuxt/kit": "npm:@nuxt/kit-edge@3.0.0-rc.13-27777092.59d8c51", + "@nuxt/kit": "npm:@nuxt/kit-edge@3.0.0-rc.13-27781436.1f6b3be", "@nuxtjs/fontaine": "0.2.2", "gray-matter": "4.0.3", "jose": "4.10.3", @@ -41,19 +41,19 @@ "@nuxtjs/eslint-module": "3.1.0", "@nuxtjs/tailwindcss": "6.1.1", "@playwright/test": "1.27.1", - "@types/node": "18.11.5", - "@vitejs/plugin-vue": "3.1.2", + "@types/node": "18.11.7", + "@vitejs/plugin-vue": "3.2.0", "@vue/test-utils": "2.2.0", "c8": "7.12.0", "eslint": "8.26.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-nuxt": "4.0.0", "eslint-plugin-prettier": "4.2.1", - "happy-dom": "7.6.3", + "happy-dom": "7.6.6", "husky": "8.0.1", "lint-staged": "13.0.3", - "magic-regexp": "0.5.0", - "nuxt": "npm:nuxt3@3.0.0-rc.13-27777092.59d8c51", + "magic-regexp": "0.6.0", + "nuxt": "npm:nuxt3@3.0.0-rc.13-27781436.1f6b3be", "playwright": "1.27.1", "postcss-html": "1.5.0", "prettier": "2.7.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 67bfb4df..83e1068c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,7 +8,7 @@ specifiers: '@commitlint/config-conventional': 17.1.0 '@nuxt/content': npm:@nuxt/content-edge@2.2.0-27777064.6463e46 '@nuxt/image-edge': 1.0.0-27769790.4b27db3 - '@nuxt/kit': npm:@nuxt/kit-edge@3.0.0-rc.13-27777092.59d8c51 + '@nuxt/kit': npm:@nuxt/kit-edge@3.0.0-rc.13-27781436.1f6b3be '@nuxtjs/color-mode': 3.1.8 '@nuxtjs/eslint-config': 11.0.0 '@nuxtjs/eslint-config-typescript': 11.0.0 @@ -17,7 +17,7 @@ specifiers: '@nuxtjs/tailwindcss': 6.1.1 '@playwright/test': 1.27.1 '@types/node': 18.11.5 - '@vitejs/plugin-vue': 3.1.2 + '@vitejs/plugin-vue': 3.2.0 '@vue/test-utils': 2.2.0 c8: 7.12.0 eslint: 8.26.0 @@ -25,12 +25,12 @@ specifiers: eslint-plugin-nuxt: 4.0.0 eslint-plugin-prettier: 4.2.1 gray-matter: 4.0.3 - happy-dom: 7.6.3 + happy-dom: 7.6.6 husky: 8.0.1 jose: 4.10.3 lint-staged: 13.0.3 - magic-regexp: 0.5.0 - nuxt: npm:nuxt3@3.0.0-rc.13-27777092.59d8c51 + magic-regexp: 0.6.0 + nuxt: npm:nuxt3@3.0.0-rc.13-27781436.1f6b3be nuxt-plausible: 0.1.1 playwright: 1.27.1 postcss-html: 1.5.0 @@ -46,7 +46,7 @@ specifiers: dependencies: '@nuxt/content': /@nuxt/content-edge/2.2.0-27777064.6463e46 '@nuxt/image-edge': 1.0.0-27769790.4b27db3 - '@nuxt/kit': /@nuxt/kit-edge/3.0.0-rc.13-27777092.59d8c51 + '@nuxt/kit': /@nuxt/kit-edge/3.0.0-rc.13-27781436.1f6b3be '@nuxtjs/fontaine': 0.2.2 gray-matter: 4.0.3 jose: 4.10.3 @@ -64,18 +64,18 @@ devDependencies: '@nuxtjs/tailwindcss': 6.1.1 '@playwright/test': 1.27.1 '@types/node': 18.11.5 - '@vitejs/plugin-vue': 3.1.2 + '@vitejs/plugin-vue': 3.2.0 '@vue/test-utils': 2.2.0 c8: 7.12.0 eslint: 8.26.0 eslint-config-prettier: 8.5.0_eslint@8.26.0 eslint-plugin-nuxt: 4.0.0_eslint@8.26.0 eslint-plugin-prettier: 4.2.1_aniwkeyvlpmwkidetuytnokvcm - happy-dom: 7.6.3 + happy-dom: 7.6.6 husky: 8.0.1 lint-staged: 13.0.3 - magic-regexp: 0.5.0 - nuxt: /nuxt3/3.0.0-rc.13-27777092.59d8c51_eslint@8.26.0 + magic-regexp: 0.6.0 + nuxt: /nuxt3/3.0.0-rc.13-27781436.1f6b3be_eslint@8.26.0 playwright: 1.27.1 postcss-html: 1.5.0 prettier: 2.7.1 @@ -83,7 +83,7 @@ devDependencies: stylelint-config-prettier: 9.0.3_stylelint@14.14.0 stylelint-config-recommended-vue: 1.4.0_2wb2ag3ubchp7fdo72hd6rkeve stylelint-config-standard: 29.0.0_stylelint@14.14.0 - vitest: 0.24.3_happy-dom@7.6.3 + vitest: 0.24.3_happy-dom@7.6.6 packages: @@ -100,8 +100,8 @@ packages: dependencies: '@babel/highlight': 7.18.6 - /@babel/compat-data/7.19.4: - resolution: {integrity: sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==} + /@babel/compat-data/7.20.0: + resolution: {integrity: sha512-Gt9jszFJYq7qzXVK4slhc6NzJXnOVmRECWcVjF/T23rNXD9NtWQ0W3qxdg+p9wWIB+VQw3GYV/U2Ha9bRTfs4w==} engines: {node: '>=6.9.0'} /@babel/core/7.19.6: @@ -110,14 +110,14 @@ packages: dependencies: '@ampproject/remapping': 2.2.0 '@babel/code-frame': 7.18.6 - '@babel/generator': 7.19.6 - '@babel/helper-compilation-targets': 7.19.3_@babel+core@7.19.6 + '@babel/generator': 7.20.0 + '@babel/helper-compilation-targets': 7.20.0_@babel+core@7.19.6 '@babel/helper-module-transforms': 7.19.6 - '@babel/helpers': 7.19.4 - '@babel/parser': 7.19.6 + '@babel/helpers': 7.20.0 + '@babel/parser': 7.20.0 '@babel/template': 7.18.10 - '@babel/traverse': 7.19.6 - '@babel/types': 7.19.4 + '@babel/traverse': 7.20.0 + '@babel/types': 7.20.0 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -126,11 +126,11 @@ packages: transitivePeerDependencies: - supports-color - /@babel/generator/7.19.6: - resolution: {integrity: sha512-oHGRUQeoX1QrKeJIKVe0hwjGqNnVYsM5Nep5zo0uE0m42sLH+Fsd2pStJ5sRM1bNyTUUoz0pe2lTeMJrb/taTA==} + /@babel/generator/7.20.0: + resolution: {integrity: sha512-GUPcXxWibClgmYJuIwC2Bc2Lg+8b9VjaJ+HlNdACEVt+Wlr1eoU1OPZjZRm7Hzl0gaTsUZNQfeihvZJhG7oc3w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.4 + '@babel/types': 7.20.0 '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 @@ -138,16 +138,16 @@ packages: resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.4 + '@babel/types': 7.20.0 dev: true - /@babel/helper-compilation-targets/7.19.3_@babel+core@7.19.6: - resolution: {integrity: sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==} + /@babel/helper-compilation-targets/7.20.0_@babel+core@7.19.6: + resolution: {integrity: sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.19.4 + '@babel/compat-data': 7.20.0 '@babel/core': 7.19.6 '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.4 @@ -180,26 +180,26 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.18.10 - '@babel/types': 7.19.4 + '@babel/types': 7.20.0 /@babel/helper-hoist-variables/7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.4 + '@babel/types': 7.20.0 /@babel/helper-member-expression-to-functions/7.18.9: resolution: {integrity: sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.4 + '@babel/types': 7.20.0 dev: true /@babel/helper-module-imports/7.18.6: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.4 + '@babel/types': 7.20.0 /@babel/helper-module-transforms/7.19.6: resolution: {integrity: sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw==} @@ -211,8 +211,8 @@ packages: '@babel/helper-split-export-declaration': 7.18.6 '@babel/helper-validator-identifier': 7.19.1 '@babel/template': 7.18.10 - '@babel/traverse': 7.19.6 - '@babel/types': 7.19.4 + '@babel/traverse': 7.20.0 + '@babel/types': 7.20.0 transitivePeerDependencies: - supports-color @@ -220,7 +220,7 @@ packages: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.4 + '@babel/types': 7.20.0 dev: true /@babel/helper-plugin-utils/7.19.0: @@ -235,8 +235,8 @@ packages: '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-member-expression-to-functions': 7.18.9 '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/traverse': 7.19.6 - '@babel/types': 7.19.4 + '@babel/traverse': 7.20.0 + '@babel/types': 7.20.0 transitivePeerDependencies: - supports-color dev: true @@ -245,13 +245,13 @@ packages: resolution: {integrity: sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.4 + '@babel/types': 7.20.0 /@babel/helper-split-export-declaration/7.18.6: resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.4 + '@babel/types': 7.20.0 /@babel/helper-string-parser/7.19.4: resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} @@ -265,13 +265,13 @@ packages: resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} engines: {node: '>=6.9.0'} - /@babel/helpers/7.19.4: - resolution: {integrity: sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==} + /@babel/helpers/7.20.0: + resolution: {integrity: sha512-aGMjYraN0zosCEthoGLdqot1oRsmxVTQRHadsUPz5QM44Zej2PYRz7XiDE7GqnkZnNtLbOuxqoZw42vkU7+XEQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.18.10 - '@babel/traverse': 7.19.6 - '@babel/types': 7.19.4 + '@babel/traverse': 7.20.0 + '@babel/types': 7.20.0 transitivePeerDependencies: - supports-color @@ -283,21 +283,12 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser/7.19.6: - resolution: {integrity: sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA==} + /@babel/parser/7.20.0: + resolution: {integrity: sha512-G9VgAhEaICnz8iiJeGJQyVl6J2nTjbW0xeisva0PK6XcKsga7BIaqm4ZF8Rg1Wbaqmy6znspNqhPaPkyukujzg==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.19.4 - - /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.19.6: - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.6 - '@babel/helper-plugin-utils': 7.19.0 - dev: true + '@babel/types': 7.20.0 /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.19.6: resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} @@ -309,8 +300,8 @@ packages: '@babel/helper-plugin-utils': 7.19.0 dev: true - /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.19.6: - resolution: {integrity: sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==} + /@babel/plugin-syntax-typescript/7.20.0_@babel+core@7.19.6: + resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -319,8 +310,8 @@ packages: '@babel/helper-plugin-utils': 7.19.0 dev: true - /@babel/plugin-transform-typescript/7.19.3_@babel+core@7.19.6: - resolution: {integrity: sha512-z6fnuK9ve9u/0X0rRvI9MY0xg+DOUaABDYOe+/SQTxtlptaBB/V9JIUxJn6xp3lMBeb9qe8xSFmHU35oZDXD+w==} + /@babel/plugin-transform-typescript/7.20.0_@babel+core@7.19.6: + resolution: {integrity: sha512-xOAsAFaun3t9hCwZ13Qe7gq423UgMZ6zAgmLxeGGapFqlT/X3L5qT2btjiVLlFn7gWtMaVyceS5VxGAuKbgizw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -328,13 +319,13 @@ packages: '@babel/core': 7.19.6 '@babel/helper-create-class-features-plugin': 7.19.0_@babel+core@7.19.6 '@babel/helper-plugin-utils': 7.19.0 - '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.19.6 + '@babel/plugin-syntax-typescript': 7.20.0_@babel+core@7.19.6 transitivePeerDependencies: - supports-color dev: true - /@babel/standalone/7.19.6: - resolution: {integrity: sha512-SUOBMtHlxGpXf14X85c1vtHyxYgIODBUdclntETSEGkgI274MNPBUkOVWpvFmRhMuLokK3CL07qJoK2e5CIToA==} + /@babel/standalone/7.20.0: + resolution: {integrity: sha512-8toFReoMyknVN538KZYS9HJLUlpvibQiPQqt8TYFeyV+FlZUmM8TG2zcS8q4vAijCRLoAKT1EzeBVvbxjMfi9A==} engines: {node: '>=6.9.0'} /@babel/template/7.18.10: @@ -342,28 +333,28 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/parser': 7.19.6 - '@babel/types': 7.19.4 + '@babel/parser': 7.20.0 + '@babel/types': 7.20.0 - /@babel/traverse/7.19.6: - resolution: {integrity: sha512-6l5HrUCzFM04mfbG09AagtYyR2P0B71B1wN7PfSPiksDPz2k5H9CBC1tcZpz2M8OxbKTPccByoOJ22rUKbpmQQ==} + /@babel/traverse/7.20.0: + resolution: {integrity: sha512-5+cAXQNARgjRUK0JWu2UBwja4JLSO/rBMPJzpsKb+oBF5xlUuCfljQepS4XypBQoiigL0VQjTZy6WiONtUdScQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/generator': 7.19.6 + '@babel/generator': 7.20.0 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-function-name': 7.19.0 '@babel/helper-hoist-variables': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.19.6 - '@babel/types': 7.19.4 + '@babel/parser': 7.20.0 + '@babel/types': 7.20.0 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color - /@babel/types/7.19.4: - resolution: {integrity: sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==} + /@babel/types/7.20.0: + resolution: {integrity: sha512-Jlgt3H0TajCW164wkTOTzHkZb075tMQMULzrLUoUeKmO7eFL96GgDxf7/Axhc5CAuKE3KFyVW1p6ysKsi2oXAg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.19.4 @@ -763,7 +754,7 @@ packages: rehype-sort-attributes: 4.0.0 remark-emoji: 3.0.2 remark-gfm: 3.0.1 - remark-mdc: 1.0.8 + remark-mdc: 1.1.0 remark-parse: 10.0.1 remark-rehype: 10.1.0 remark-squeeze-paragraphs: 5.0.1 @@ -777,7 +768,7 @@ packages: unist-util-position: 4.0.3 unist-util-visit: 4.1.1 unstorage: 0.6.0 - ws: 8.9.0 + ws: 8.10.0 transitivePeerDependencies: - bufferutil - supports-color @@ -807,11 +798,11 @@ packages: - supports-color dev: false - /@nuxt/kit-edge/3.0.0-rc.13-27777092.59d8c51: - resolution: {integrity: sha512-qz99ygNMr1pNmIMPD5Cw6IxIDPV/NSoAWhn/+6KhKeCW2K6hlWo3KF7D9CChnN5DzXhvv/hPHxnEnNEj77jMoQ==} + /@nuxt/kit-edge/3.0.0-rc.13-27781436.1f6b3be: + resolution: {integrity: sha512-FNAMMGvmRK4rous0T5RPLirGGFCNDSWNpLRTBOBGAqZ+BFcX/oU3jmlE5bzZIhbNdvMZSEDH7pkBvXRsnCWmNA==} engines: {node: ^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0} dependencies: - '@nuxt/schema': /@nuxt/schema-edge/3.0.0-rc.13-27777092.59d8c51 + '@nuxt/schema': /@nuxt/schema-edge/3.0.0-rc.13-27781436.1f6b3be c12: 0.2.13 consola: 2.15.3 defu: 6.1.0 @@ -823,14 +814,42 @@ packages: lodash.template: 4.5.0 mlly: 0.5.16 pathe: 0.3.9 - pkg-types: 0.3.5 + pkg-types: 0.3.6 scule: 0.3.2 semver: 7.3.8 unctx: 2.0.2 - unimport: 0.6.8 + unimport: 0.7.0 + untyped: 0.5.0 + transitivePeerDependencies: + - rollup + - supports-color + + /@nuxt/kit-edge/3.0.0-rc.13-27781436.1f6b3be_rollup@2.79.1: + resolution: {integrity: sha512-FNAMMGvmRK4rous0T5RPLirGGFCNDSWNpLRTBOBGAqZ+BFcX/oU3jmlE5bzZIhbNdvMZSEDH7pkBvXRsnCWmNA==} + engines: {node: ^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0} + dependencies: + '@nuxt/schema': /@nuxt/schema-edge/3.0.0-rc.13-27781436.1f6b3be_rollup@2.79.1 + c12: 0.2.13 + consola: 2.15.3 + defu: 6.1.0 + globby: 13.1.2 + hash-sum: 2.0.0 + ignore: 5.2.0 + jiti: 1.16.0 + knitwork: 0.1.2 + lodash.template: 4.5.0 + mlly: 0.5.16 + pathe: 0.3.9 + pkg-types: 0.3.6 + scule: 0.3.2 + semver: 7.3.8 + unctx: 2.0.2 + unimport: 0.7.0_rollup@2.79.1 untyped: 0.5.0 transitivePeerDependencies: + - rollup - supports-color + dev: true /@nuxt/kit/3.0.0-rc.11: resolution: {integrity: sha512-o0E/k635Lzcxp4K5t0ToHC6WwQ1wyN0EIqMAQEzgiUexoAhzdURr21QI0D6e6U461u4KP7x92wYM87VxhMFXmQ==} @@ -874,7 +893,7 @@ packages: lodash.template: 4.5.0 mlly: 0.5.16 pathe: 0.3.9 - pkg-types: 0.3.5 + pkg-types: 0.3.6 scule: 0.3.2 semver: 7.3.8 unctx: 2.0.2 @@ -898,8 +917,8 @@ packages: - webpack dev: true - /@nuxt/schema-edge/3.0.0-rc.13-27777092.59d8c51: - resolution: {integrity: sha512-bcvZh3zkQd0xmahcM/Q0avUHz51jk/81SWr9LMKeiPWql1BGzUkBn+u3YhMqGFvq1fHHdfu+9j/aYVAVxppCfQ==} + /@nuxt/schema-edge/3.0.0-rc.13-27781436.1f6b3be: + resolution: {integrity: sha512-llsTFM0Dkrs/3QSCtKCloDBp6VWsO6pbeg7QSZu5DH27xY1Olfvh8hKeyOnlC+IG2Sn9MB05M2plFNvNZ77Czg==} engines: {node: ^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0} dependencies: c12: 0.2.13 @@ -907,16 +926,38 @@ packages: defu: 6.1.0 jiti: 1.16.0 pathe: 0.3.9 - pkg-types: 0.3.5 + pkg-types: 0.3.6 postcss-import-resolver: 2.0.0 scule: 0.3.2 std-env: 3.3.0 ufo: 0.8.6 - unimport: 0.6.8 + unimport: 0.7.0 untyped: 0.5.0 transitivePeerDependencies: + - rollup - supports-color + /@nuxt/schema-edge/3.0.0-rc.13-27781436.1f6b3be_rollup@2.79.1: + resolution: {integrity: sha512-llsTFM0Dkrs/3QSCtKCloDBp6VWsO6pbeg7QSZu5DH27xY1Olfvh8hKeyOnlC+IG2Sn9MB05M2plFNvNZ77Czg==} + engines: {node: ^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0} + dependencies: + c12: 0.2.13 + create-require: 1.1.1 + defu: 6.1.0 + jiti: 1.16.0 + pathe: 0.3.9 + pkg-types: 0.3.6 + postcss-import-resolver: 2.0.0 + scule: 0.3.2 + std-env: 3.3.0 + ufo: 0.8.6 + unimport: 0.7.0_rollup@2.79.1 + untyped: 0.5.0 + transitivePeerDependencies: + - rollup + - supports-color + dev: true + /@nuxt/schema/3.0.0-rc.11: resolution: {integrity: sha512-EIBYQeBxJ+JZ8RjPRGaXM9+vtWMHQ4HsqZIw5a+p6hqRLGf53fHANT4vjMQZA4fAYBnJZJI7dB/OXkfyb/kikA==} engines: {node: ^14.16.0 || ^16.11.0 || ^17.0.0 || ^18.0.0} @@ -926,7 +967,7 @@ packages: defu: 6.1.0 jiti: 1.16.0 pathe: 0.3.9 - pkg-types: 0.3.5 + pkg-types: 0.3.6 postcss-import-resolver: 2.0.0 scule: 0.3.2 std-env: 3.3.0 @@ -943,7 +984,7 @@ packages: defu: 6.1.0 jiti: 1.16.0 pathe: 0.3.9 - pkg-types: 0.3.5 + pkg-types: 0.3.6 postcss-import-resolver: 2.0.0 scule: 0.3.2 std-env: 3.3.0 @@ -985,17 +1026,17 @@ packages: resolution: {integrity: sha512-oFjUfn9r9U4vNljd5uU08+6M3mF6OSxZfCrfqJQaN5TtqVTcZmZFzOZ4H866Lq+Eaugv/Vte225kuaZCB3FR/g==} dev: true - /@nuxt/vite-builder-edge/3.0.0-rc.13-27777092.59d8c51_eslint@8.26.0+vue@3.2.41: - resolution: {integrity: sha512-5gDVb7c0RuyKWlkjDPoHehbcs/dIe1t2Fln5Dz8D6zn8xdFzmq7Eu+NeDq5xl6AOsNJggiZWNyUPAKwBeihKPQ==} + /@nuxt/vite-builder-edge/3.0.0-rc.13-27781436.1f6b3be_eslint@8.26.0+vue@3.2.41: + resolution: {integrity: sha512-7vyYHxlNrU2iroZAW1oMDO0iLln0mmfjJtRE4tcu8vT/WuL2ZHwifvUviBY8H4zVwFgyNDLQCas6BRJaKiIvvg==} engines: {node: ^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0} peerDependencies: vue: ^3.2.41 dependencies: - '@nuxt/kit': /@nuxt/kit-edge/3.0.0-rc.13-27777092.59d8c51 + '@nuxt/kit': /@nuxt/kit-edge/3.0.0-rc.13-27781436.1f6b3be_rollup@2.79.1 '@rollup/plugin-replace': 5.0.1_rollup@2.79.1 - '@vitejs/plugin-vue': 3.1.2_vite@3.1.8+vue@3.2.41 - '@vitejs/plugin-vue-jsx': 2.0.1_vite@3.1.8+vue@3.2.41 - autoprefixer: 10.4.12_postcss@8.4.18 + '@vitejs/plugin-vue': 3.2.0_vite@3.2.1+vue@3.2.41 + '@vitejs/plugin-vue-jsx': 2.1.0_vite@3.2.1+vue@3.2.41 + autoprefixer: 10.4.13_postcss@8.4.18 chokidar: 3.5.3 cssnano: 5.1.13_postcss@8.4.18 defu: 6.1.0 @@ -1005,14 +1046,14 @@ packages: externality: 0.2.2 fs-extra: 10.1.0 get-port-please: 2.6.1 - h3: 0.8.5 + h3: 0.8.6 knitwork: 0.1.2 magic-string: 0.26.7 mlly: 0.5.16 ohash: 0.1.5 pathe: 0.3.9 perfect-debounce: 0.1.3 - pkg-types: 0.3.5 + pkg-types: 0.3.6 postcss: 8.4.18 postcss-import: 15.0.0_postcss@8.4.18 postcss-url: 10.1.3_postcss@8.4.18 @@ -1020,9 +1061,9 @@ packages: rollup-plugin-visualizer: 5.8.3_rollup@2.79.1 ufo: 0.8.6 unplugin: 0.10.2 - vite: 3.1.8 + vite: 3.2.1 vite-node: 0.24.3 - vite-plugin-checker: 0.5.1_eslint@8.26.0+vite@3.1.8 + vite-plugin-checker: 0.5.1_eslint@8.26.0+vite@3.2.1 vue: 3.2.41 vue-bundle-renderer: 0.4.4 transitivePeerDependencies: @@ -1030,6 +1071,7 @@ packages: - less - sass - stylus + - sugarss - supports-color - terser - typescript @@ -1284,6 +1326,19 @@ packages: estree-walker: 2.0.2 picomatch: 2.3.1 + /@rollup/pluginutils/5.0.2: + resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.0 + estree-walker: 2.0.2 + picomatch: 2.3.1 + /@rollup/pluginutils/5.0.2_rollup@2.79.1: resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} engines: {node: '>=14.0.0'} @@ -1361,10 +1416,9 @@ packages: /@types/estree/1.0.0: resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} - dev: true /@types/form-data/0.0.33: - resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} + resolution: {integrity: sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=} dependencies: '@types/node': 18.11.5 dev: true @@ -1556,7 +1610,7 @@ packages: hasBin: true dependencies: '@mapbox/node-pre-gyp': 1.0.10 - acorn: 8.8.0 + acorn: 8.8.1 async-sema: 3.1.1 bindings: 1.5.0 estree-walker: 2.0.2 @@ -1571,39 +1625,38 @@ packages: - supports-color dev: true - /@vitejs/plugin-vue-jsx/2.0.1_vite@3.1.8+vue@3.2.41: - resolution: {integrity: sha512-lmiR1k9+lrF7LMczO0pxtQ8mOn6XeppJDHxnpxkJQpT5SiKz4SKhKdeNstXaTNuR8qZhUo5X0pJlcocn72Y4Jg==} + /@vitejs/plugin-vue-jsx/2.1.0_vite@3.2.1+vue@3.2.41: + resolution: {integrity: sha512-vvL8MHKN0hUf5LE+/rCk1rduwzW6NihD6xEfM4s1gGCSWQFYd5zLdxBs++z3S7AV/ynr7Yig5Xp1Bm0wlB4IAA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^3.0.0 vue: ^3.0.0 dependencies: '@babel/core': 7.19.6 - '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.19.6 - '@babel/plugin-transform-typescript': 7.19.3_@babel+core@7.19.6 + '@babel/plugin-transform-typescript': 7.20.0_@babel+core@7.19.6 '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.19.6 - vite: 3.1.8 + vite: 3.2.1 vue: 3.2.41 transitivePeerDependencies: - supports-color dev: true - /@vitejs/plugin-vue/3.1.2: - resolution: {integrity: sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==} + /@vitejs/plugin-vue/3.2.0: + resolution: {integrity: sha512-E0tnaL4fr+qkdCNxJ+Xd0yM31UwMkQje76fsDVBBUCoGOUPexu2VDUYHL8P4CwV+zMvWw6nlRw19OnRKmYAJpw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^3.0.0 vue: ^3.2.25 dev: true - /@vitejs/plugin-vue/3.1.2_vite@3.1.8+vue@3.2.41: - resolution: {integrity: sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==} + /@vitejs/plugin-vue/3.2.0_vite@3.2.1+vue@3.2.41: + resolution: {integrity: sha512-E0tnaL4fr+qkdCNxJ+Xd0yM31UwMkQje76fsDVBBUCoGOUPexu2VDUYHL8P4CwV+zMvWw6nlRw19OnRKmYAJpw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^3.0.0 vue: ^3.2.25 dependencies: - vite: 3.1.8 + vite: 3.2.1 vue: 3.2.41 dev: true @@ -1617,8 +1670,8 @@ packages: '@babel/helper-module-imports': 7.18.6 '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.19.6 '@babel/template': 7.18.10 - '@babel/traverse': 7.19.6 - '@babel/types': 7.19.4 + '@babel/traverse': 7.20.0 + '@babel/types': 7.20.0 '@vue/babel-helper-vue-transform-on': 1.0.2 camelcase: 6.3.0 html-tags: 3.2.0 @@ -1631,7 +1684,7 @@ packages: /@vue/compiler-core/3.2.41: resolution: {integrity: sha512-oA4mH6SA78DT+96/nsi4p9DX97PHcNROxs51lYk7gb9Z4BPKQ3Mh+BLn6CQZBw857Iuhu28BfMSRHAlPvD4vlw==} dependencies: - '@babel/parser': 7.19.6 + '@babel/parser': 7.20.0 '@vue/shared': 3.2.41 estree-walker: 2.0.2 source-map: 0.6.1 @@ -1647,7 +1700,7 @@ packages: /@vue/compiler-sfc/3.2.41: resolution: {integrity: sha512-+1P2m5kxOeaxVmJNXnBskAn3BenbTmbxBxWOtBq3mQTCokIreuMULFantBUclP0+KnzNCMOvcnKinqQZmiOF8w==} dependencies: - '@babel/parser': 7.19.6 + '@babel/parser': 7.20.0 '@vue/compiler-core': 3.2.41 '@vue/compiler-dom': 3.2.41 '@vue/compiler-ssr': 3.2.41 @@ -1673,7 +1726,7 @@ packages: /@vue/reactivity-transform/3.2.41: resolution: {integrity: sha512-mK5+BNMsL4hHi+IR3Ft/ho6Za+L3FA5j8WvreJ7XzHrqkPq8jtF/SMo7tuc9gHjLDwKZX1nP1JQOKo9IEAn54A==} dependencies: - '@babel/parser': 7.19.6 + '@babel/parser': 7.20.0 '@vue/compiler-core': 3.2.41 '@vue/shared': 3.2.41 estree-walker: 2.0.2 @@ -1721,12 +1774,12 @@ packages: vue: ^3.0.1 dev: true - /@vueuse/head/1.0.0-rc.12_vue@3.2.41: - resolution: {integrity: sha512-J1U54lKeelgM123G7SojcOu002muUp58H2wMjI6WNgb5wag6Tt+CiSp7cFO+ZSG5bJFdsgoc1pwZPVazGbnimQ==} + /@vueuse/head/1.0.0-rc.14_vue@3.2.41: + resolution: {integrity: sha512-3DtOfSE1141IKPIq4AR5UXQZPWQFSd7E5f3M+HkBRyxWsyxbNBBmK5hqkSYc2ENoFXa3xPhLYZXJPKuxqfJmiA==} peerDependencies: vue: '>=2.7 || >=3' dependencies: - '@vueuse/shared': 9.3.1_vue@3.2.41 + '@vueuse/shared': 9.4.0_vue@3.2.41 '@zhead/schema': 0.9.9 '@zhead/schema-vue': 0.9.9_vue@3.2.41 vue: 3.2.41 @@ -1734,8 +1787,8 @@ packages: - '@vue/composition-api' dev: true - /@vueuse/shared/9.3.1_vue@3.2.41: - resolution: {integrity: sha512-YFu3qcnVeu0S2L4XdQJtBpDcjz6xwqHZtTv/XRhu66/yge1XVhxskUcc7VZbX52xF9A34V6KCfwncP9YDqYFiw==} + /@vueuse/shared/9.4.0_vue@3.2.41: + resolution: {integrity: sha512-fTuem51KwMCnqUKkI8B57qAIMcFovtGgsCtAeqxIzH3i6nE9VYge+gVfneNHAAy7lj8twbkNfqQSygOPJTm4tQ==} dependencies: vue-demi: 0.13.11_vue@3.2.41 transitivePeerDependencies: @@ -1748,7 +1801,7 @@ packages: peerDependencies: vue: '>=2.7 || >=3' dependencies: - '@vueuse/shared': 9.3.1_vue@3.2.41 + '@vueuse/shared': 9.4.0_vue@3.2.41 '@zhead/schema': 0.9.9 vue: 3.2.41 transitivePeerDependencies: @@ -1815,6 +1868,12 @@ packages: resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==} engines: {node: '>=0.4.0'} hasBin: true + dev: true + + /acorn/8.8.1: + resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==} + engines: {node: '>=0.4.0'} + hasBin: true /agent-base/6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} @@ -2061,6 +2120,22 @@ packages: postcss-value-parser: 4.2.0 dev: true + /autoprefixer/10.4.13_postcss@8.4.18: + resolution: {integrity: sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + dependencies: + browserslist: 4.21.4 + caniuse-lite: 1.0.30001426 + fraction.js: 4.2.0 + normalize-range: 0.1.2 + picocolors: 1.0.0 + postcss: 8.4.18 + postcss-value-parser: 4.2.0 + dev: true + /available-typed-arrays/1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} @@ -2200,7 +2275,7 @@ packages: jiti: 1.16.0 mlly: 0.5.16 pathe: 0.3.9 - pkg-types: 0.3.5 + pkg-types: 0.3.6 rc9: 1.2.2 /c8/7.12.0: @@ -2269,7 +2344,7 @@ packages: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} dependencies: browserslist: 4.21.4 - caniuse-lite: 1.0.30001422 + caniuse-lite: 1.0.30001426 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 dev: true @@ -2277,6 +2352,10 @@ packages: /caniuse-lite/1.0.30001422: resolution: {integrity: sha512-hSesn02u1QacQHhaxl/kNMZwqVG35Sz/8DgvmgedxSH8z9UUpcDYSPYgsj3x5dQNRcNp6BwpSfQfVzYUTm+fog==} + /caniuse-lite/1.0.30001426: + resolution: {integrity: sha512-n7cosrHLl8AWt0wwZw/PJZgUg3lV0gk9LMI7ikGJwhyhgsd2Nb65vKvmSexCqq/J7rbH3mFG6yZZiPR5dLPW5A==} + dev: true + /caseless/0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} dev: true @@ -4463,8 +4542,8 @@ packages: dev: false optional: true - /github-slugger/1.4.0: - resolution: {integrity: sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ==} + /github-slugger/1.5.0: + resolution: {integrity: sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==} dev: false /gittar/0.1.1: @@ -4609,8 +4688,16 @@ packages: radix3: 0.2.1 ufo: 0.8.6 - /happy-dom/7.6.3: - resolution: {integrity: sha512-hPHyFzBbICaY9ptOfdiEUBUc9f6Lp8g8rVrN+uwJkXFg7JA+xQ8V6n+NUSxU8AistrVlS4BdLjo3oea14fQQ3w==} + /h3/0.8.6: + resolution: {integrity: sha512-CSWNOKa3QGo67rFU2PhbFTp0uPJtilNji2Z0pMiSRQt3+OkIW0u3E1WMJqIycLqaTgb9JyFqH/S4mcTyyGtvyQ==} + dependencies: + cookie-es: 0.5.0 + destr: 1.2.0 + radix3: 0.2.1 + ufo: 0.8.6 + + /happy-dom/7.6.6: + resolution: {integrity: sha512-28NxRiHXjzhr+BGciLNUoQW4OaBnQPRT/LPYLufh0Fj3Iwh1j9qJaozjBm/Uqdj5Ps4cukevQ7ERieA6Ddwf1g==} dependencies: css.escape: 1.5.1 he: 1.2.0 @@ -5782,22 +5869,27 @@ packages: resolution: {integrity: sha512-zP6wG5tnDX2FYgnFco4KEG+Qg2ujBIgO1VP+d6ScabRndZAyvR34PdwmRPnDqXiXLCReNXH406NyKyXgrWqTqQ==} dependencies: estree-walker: 3.0.1 - magic-string: 0.26.4 + magic-string: 0.26.7 mlly: 0.5.16 - ufo: 0.8.5 + ufo: 0.8.6 unplugin: 0.9.6 + dev: false - /magic-string/0.25.9: - resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} + /magic-regexp/0.6.0: + resolution: {integrity: sha512-7zscmuLhvaP7+t0qfnArw6h2QLoduJ3zTHFMY9LdD+M9ZrCmBrDg20ML+XRjkzCHGqst1cnqfS6eQcVsjwSX8Q==} dependencies: - sourcemap-codec: 1.4.8 + estree-walker: 3.0.1 + magic-string: 0.26.7 + mlly: 0.5.16 + ufo: 0.8.6 + unplugin: 0.10.2 dev: true - /magic-string/0.26.4: - resolution: {integrity: sha512-e5uXtVJ22aEpK9u1+eQf0fSxHeqwyV19K+uGnlROCxUhzwRip9tBsaMViK/0vC3viyPd5Gtucp3UmEp/Q2cPTQ==} - engines: {node: '>=12'} + /magic-string/0.25.9: + resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} dependencies: sourcemap-codec: 1.4.8 + dev: true /magic-string/0.26.7: resolution: {integrity: sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==} @@ -6420,9 +6512,9 @@ packages: /mlly/0.5.16: resolution: {integrity: sha512-LaJ8yuh4v0zEmge/g3c7jjFlhoCPfQn6RCjXgm9A0Qiuochq4BcuOxVfWmdnCoLTlg2MV+hqhOek+W2OhG0Lwg==} dependencies: - acorn: 8.8.0 + acorn: 8.8.1 pathe: 0.3.9 - pkg-types: 0.3.5 + pkg-types: 0.3.6 ufo: 0.8.6 /mri/1.2.0: @@ -6470,8 +6562,8 @@ packages: engines: {node: '>= 0.6'} dev: true - /nitropack-edge/0.6.1-27778247.5a75f37: - resolution: {integrity: sha512-10nxGb2+HnrQw+MT4QQy/DFcQOHgySsJkC2+1S+6HNUycjpjKiqr5i0VvLU2ezFRYgh6XsuLO98PaCzdx5YOFA==} + /nitropack-edge/0.6.1-27781459.72c912e: + resolution: {integrity: sha512-yas6Njw+lRG+c3f5AUz00BIzV3DHrJ3QubNU4vEROD9L1rh8FQh0iId3Rt/iGL5yV3mP9L4y4SYwG0cgnQ8n/w==} engines: {node: ^14.16.0 || ^16.11.0 || ^17.0.0 || ^18.0.0} hasBin: true dependencies: @@ -6501,7 +6593,7 @@ packages: fs-extra: 10.1.0 globby: 13.1.2 gzip-size: 7.0.0 - h3: 0.8.5 + h3: 0.8.6 hookable: 5.4.1 http-proxy: 1.18.1 is-primitive: 3.0.1 @@ -6517,7 +6609,7 @@ packages: ohmyfetch: 0.4.20 pathe: 0.3.9 perfect-debounce: 0.1.3 - pkg-types: 0.3.5 + pkg-types: 0.3.6 pretty-bytes: 6.0.0 radix3: 0.2.1 rollup: 2.79.1 @@ -6531,7 +6623,7 @@ packages: std-env: 3.3.0 ufo: 0.8.6 unenv: 0.6.2 - unimport: 0.6.8 + unimport: 0.7.0_rollup@2.79.1 unstorage: 0.6.0 transitivePeerDependencies: - bufferutil @@ -6669,8 +6761,8 @@ packages: boolbase: 1.0.0 dev: true - /nuxi-edge/3.0.0-rc.13-27777092.59d8c51: - resolution: {integrity: sha512-WRaZTJpaZNAzZOolV1NfI2kz3eZ/g6tD+SeSDA3XkUoo4Lhf27yKjmN2RQKBWdnaaXnyWVIS5MVKLVJ+bx0Heg==} + /nuxi-edge/3.0.0-rc.13-27781436.1f6b3be: + resolution: {integrity: sha512-Nb8+qwHQQsnBxHbD53Vz/XsoZkykJYZSsc4dZC9lnZinTkHU+TDHHJnEJHpZNcCsAmT0yMQJaagGdnjfK54K0g==} engines: {node: ^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0} hasBin: true optionalDependencies: @@ -6688,20 +6780,20 @@ packages: - supports-color dev: false - /nuxt3/3.0.0-rc.13-27777092.59d8c51_eslint@8.26.0: - resolution: {integrity: sha512-IJ+ftVR2YwjuFFLLWrL927qsH3Zl6vWKwYF+YrpGOAP5UKhkoDshaWgaTQwp1YsIEoOJGj1wa4Gln659EBEYKg==} + /nuxt3/3.0.0-rc.13-27781436.1f6b3be_eslint@8.26.0: + resolution: {integrity: sha512-MJAZK+dXNqaGLty/yJW/x0epmGdjO8H9jxDU80O0N+Zgt8YVPkSCGjHscqIjJDTrH02XBjZz36OcQ2GRyyDFbg==} engines: {node: ^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0} hasBin: true dependencies: '@nuxt/devalue': 2.0.0 - '@nuxt/kit': /@nuxt/kit-edge/3.0.0-rc.13-27777092.59d8c51 - '@nuxt/schema': /@nuxt/schema-edge/3.0.0-rc.13-27777092.59d8c51 + '@nuxt/kit': /@nuxt/kit-edge/3.0.0-rc.13-27781436.1f6b3be + '@nuxt/schema': /@nuxt/schema-edge/3.0.0-rc.13-27781436.1f6b3be '@nuxt/telemetry': 2.1.6 '@nuxt/ui-templates': 0.4.0 - '@nuxt/vite-builder': /@nuxt/vite-builder-edge/3.0.0-rc.13-27777092.59d8c51_eslint@8.26.0+vue@3.2.41 + '@nuxt/vite-builder': /@nuxt/vite-builder-edge/3.0.0-rc.13-27781436.1f6b3be_eslint@8.26.0+vue@3.2.41 '@vue/reactivity': 3.2.41 '@vue/shared': 3.2.41 - '@vueuse/head': 1.0.0-rc.12_vue@3.2.41 + '@vueuse/head': 1.0.0-rc.14_vue@3.2.41 chokidar: 3.5.3 cookie-es: 0.5.0 defu: 6.1.0 @@ -6709,14 +6801,14 @@ packages: escape-string-regexp: 5.0.0 fs-extra: 10.1.0 globby: 13.1.2 - h3: 0.8.5 + h3: 0.8.6 hash-sum: 2.0.0 hookable: 5.4.1 knitwork: 0.1.2 magic-string: 0.26.7 mlly: 0.5.16 - nitropack: /nitropack-edge/0.6.1-27778247.5a75f37 - nuxi: /nuxi-edge/3.0.0-rc.13-27777092.59d8c51 + nitropack: /nitropack-edge/0.6.1-27781459.72c912e + nuxi: /nuxi-edge/3.0.0-rc.13-27781436.1f6b3be ohash: 0.1.5 ohmyfetch: 0.4.20 pathe: 0.3.9 @@ -6727,13 +6819,13 @@ packages: ultrahtml: 0.4.0 unctx: 2.0.2 unenv: 0.6.2 - unimport: 0.6.8 + unimport: 0.7.0 unplugin: 0.10.2 untyped: 0.5.0 vue: 3.2.41 vue-bundle-renderer: 0.4.4 vue-devtools-stub: 0.1.0 - vue-router: 4.1.5_vue@3.2.41 + vue-router: 4.1.6_vue@3.2.41 transitivePeerDependencies: - '@vue/composition-api' - bufferutil @@ -6741,8 +6833,10 @@ packages: - encoding - eslint - less + - rollup - sass - stylus + - sugarss - supports-color - terser - typescript @@ -6803,7 +6897,7 @@ packages: destr: 1.2.0 node-fetch-native: 0.1.8 ufo: 0.8.6 - undici: 5.11.0 + undici: 5.12.0 /on-finished/2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} @@ -7067,6 +7161,14 @@ packages: jsonc-parser: 3.2.0 mlly: 0.5.16 pathe: 0.3.9 + dev: false + + /pkg-types/0.3.6: + resolution: {integrity: sha512-uQZutkkh6axl1GxDm5/+8ivVdwuJ5pyDGqJeSiIWIUWIqYiK3p9QKozN/Rv6eVvFoeSWkN1uoYeSDBwwBJBtbg==} + dependencies: + jsonc-parser: 3.2.0 + mlly: 0.5.16 + pathe: 0.3.9 /plausible-tracker/0.3.8: resolution: {integrity: sha512-lmOWYQ7s9KOUJ1R+YTOR3HrjdbxIS2Z4de0P/Jx2dQPteznJl2eX3tXxKClpvbfyGP59B5bbhW8ftN59HbbFSg==} @@ -7670,8 +7772,8 @@ packages: /process-nextick-args/2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - /promise/8.2.0: - resolution: {integrity: sha512-+CMAlLHqwRYwBMXKCP+o8ns7DN+xHDUiI+0nArsiJ9y+kJVPLFxEaSw6Ha9s9H0tftxg2Yzl25wqj9G7m5wLZg==} + /promise/8.3.0: + resolution: {integrity: sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==} dependencies: asap: 2.0.6 dev: true @@ -7872,7 +7974,7 @@ packages: resolution: {integrity: sha512-X5v3wV/meuOX9NFcGhJvUpEjIvQl2gDvjg3z40RVprYFt7q3th4qMmYLULiu3gXvbNX1ppx+oaa6JyY1W67pTA==} dependencies: '@types/hast': 2.3.4 - github-slugger: 1.4.0 + github-slugger: 1.5.0 hast-util-has-property: 2.0.0 hast-util-heading-rank: 2.1.0 hast-util-to-string: 2.0.0 @@ -7917,8 +8019,8 @@ packages: - supports-color dev: false - /remark-mdc/1.0.8: - resolution: {integrity: sha512-pg2KtOem9cZd0PHyPvlamDdk+eXeKAOGq5UzPIa0I7Mqi74lqqprAksjgtrKQpEaDULiLh6Yh48HPcAxdeL5Uw==} + /remark-mdc/1.1.0: + resolution: {integrity: sha512-mUGNjzOqT6bBk4MyQjGHQzLWMmjEaxnomB5ZM8FFL7uSlPzUlQsVnwv9NpG4+usU6BA6YJoGNnSAws840+oq9A==} dependencies: flat: 5.0.2 js-yaml: 4.1.0 @@ -7930,7 +8032,7 @@ packages: micromark-factory-whitespace: 1.0.0 micromark-util-character: 1.1.0 parse-entities: 4.0.0 - scule: 0.2.1 + scule: 0.3.2 stringify-entities: 4.0.3 unist-util-visit: 4.1.1 unist-util-visit-parents: 5.1.1 @@ -8163,10 +8265,6 @@ packages: ajv-keywords: 3.5.2_ajv@6.12.6 dev: true - /scule/0.2.1: - resolution: {integrity: sha512-M9gnWtn3J0W+UhJOHmBxBTwv8mZCan5i1Himp60t6vvZcor0wr+IM0URKmIglsWJ7bRujNAVVN77fp+uZaWoKg==} - dev: false - /scule/0.3.2: resolution: {integrity: sha512-zIvPdjOH8fv8CgrPT5eqtxHQXmPNnV/vHJYffZhE43KZkvULvpCTvOt1HPlFaCZx287INL9qaqrZg34e8NgI4g==} @@ -8586,7 +8684,7 @@ packages: /strip-literal/0.4.2: resolution: {integrity: sha512-pv48ybn4iE1O9RLgCAN0iU4Xv7RlBTiit6DKmMiErbs9x1wH6vXBs45tWc0H5wUIF6TLTrKweqkmYF/iraQKNw==} dependencies: - acorn: 8.8.0 + acorn: 8.8.1 /style-search/0.1.0: resolution: {integrity: sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==} @@ -8903,7 +9001,7 @@ packages: hasBin: true dependencies: '@jridgewell/source-map': 0.3.2 - acorn: 8.8.0 + acorn: 8.8.1 commander: 2.20.3 source-map-support: 0.5.21 dev: true @@ -8939,7 +9037,7 @@ packages: form-data: 2.5.1 http-basic: 8.1.3 http-response-object: 3.0.2 - promise: 8.2.0 + promise: 8.3.0 qs: 6.11.0 dev: true @@ -9040,7 +9138,7 @@ packages: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 '@types/node': 18.11.5 - acorn: 8.8.0 + acorn: 8.8.1 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 @@ -9153,9 +9251,6 @@ packages: hasBin: true dev: true - /ufo/0.8.5: - resolution: {integrity: sha512-e4+UtA5IRO+ha6hYklwj6r7BjiGMxS0O+UaSg9HbaTefg4kMkzj4tXzEBajRR+wkxf+golgAWKzLbytCUDMJAA==} - /ufo/0.8.6: resolution: {integrity: sha512-fk6CmUgwKCfX79EzcDQQpSCMxrHstvbLswFChHS0Vump+kFkw7nJBfTZoC1j0bOGoY9I7R3n2DGek5ajbcYnOw==} @@ -9174,13 +9269,13 @@ packages: /unctx/2.0.2: resolution: {integrity: sha512-3lcXTlDoOaguRVC1GqG3mrawy17yoycSAQDDnUayQYZ17v9to+Gn6Zyssroc/GD2ppJ0wF5V8adOcKkrNKVWow==} dependencies: - acorn: 8.8.0 + acorn: 8.8.1 estree-walker: 3.0.1 magic-string: 0.26.7 unplugin: 0.9.6 - /undici/5.11.0: - resolution: {integrity: sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==} + /undici/5.12.0: + resolution: {integrity: sha512-zMLamCG62PGjd9HHMpo05bSLvvwWOZgGeiWlN/vlqu3+lRo3elxktVGEyLMX+IO7c2eflLjcW74AlkhEZm15mg==} engines: {node: '>=12.18'} dependencies: busboy: 1.6.0 @@ -9234,6 +9329,41 @@ packages: strip-literal: 0.4.2 unplugin: 0.9.6 + /unimport/0.7.0: + resolution: {integrity: sha512-Cr0whz4toYVid3JHlni/uThwavDVVCk6Zw0Gxnol1c7DprTA+Isr4T+asO6rDGkhkgV7r3vSdSs5Ym8F15JA+w==} + dependencies: + '@rollup/pluginutils': 5.0.2 + escape-string-regexp: 5.0.0 + fast-glob: 3.2.12 + local-pkg: 0.4.2 + magic-string: 0.26.7 + mlly: 0.5.16 + pathe: 0.3.9 + pkg-types: 0.3.6 + scule: 0.3.2 + strip-literal: 0.4.2 + unplugin: 0.10.2 + transitivePeerDependencies: + - rollup + + /unimport/0.7.0_rollup@2.79.1: + resolution: {integrity: sha512-Cr0whz4toYVid3JHlni/uThwavDVVCk6Zw0Gxnol1c7DprTA+Isr4T+asO6rDGkhkgV7r3vSdSs5Ym8F15JA+w==} + dependencies: + '@rollup/pluginutils': 5.0.2_rollup@2.79.1 + escape-string-regexp: 5.0.0 + fast-glob: 3.2.12 + local-pkg: 0.4.2 + magic-string: 0.26.7 + mlly: 0.5.16 + pathe: 0.3.9 + pkg-types: 0.3.6 + scule: 0.3.2 + strip-literal: 0.4.2 + unplugin: 0.10.2 + transitivePeerDependencies: + - rollup + dev: true + /unist-builder/3.0.0: resolution: {integrity: sha512-GFxmfEAa0vi9i5sd0R2kcrI9ks0r82NasRq5QHh2ysGngrc6GiqD5CDf1FjPenY4vApmFASBIIlk/jj5J5YbmQ==} dependencies: @@ -9291,16 +9421,15 @@ packages: /unplugin/0.10.2: resolution: {integrity: sha512-6rk7GUa4ICYjae5PrAllvcDeuT8pA9+j5J5EkxbMFaV+SalHhxZ7X2dohMzu6C3XzsMT+6jwR/+pwPNR3uK9MA==} dependencies: - acorn: 8.8.0 + acorn: 8.8.1 chokidar: 3.5.3 webpack-sources: 3.2.3 webpack-virtual-modules: 0.4.5 - dev: true /unplugin/0.9.6: resolution: {integrity: sha512-YYLtfoNiie/lxswy1GOsKXgnLJTE27la/PeCGznSItk+8METYZErO+zzV9KQ/hXhPwzIJsfJ4s0m1Rl7ZCWZ4Q==} dependencies: - acorn: 8.8.0 + acorn: 8.8.1 chokidar: 3.5.3 webpack-sources: 3.2.3 webpack-virtual-modules: 0.4.5 @@ -9311,14 +9440,14 @@ packages: anymatch: 3.1.2 chokidar: 3.5.3 destr: 1.2.0 - h3: 0.8.5 + h3: 0.8.6 ioredis: 5.2.3 listhen: 0.3.4 mkdir: 0.0.2 mri: 1.2.0 ohmyfetch: 0.4.20 ufo: 0.8.6 - ws: 8.9.0 + ws: 8.10.0 transitivePeerDependencies: - bufferutil - supports-color @@ -9328,8 +9457,8 @@ packages: resolution: {integrity: sha512-2Sre5A1a7G61bjaAKZnSFaVgbJMwwbbYQpJFH69hAYcDfN7kIaktlSphS02XJilz4+/jR1tsJ5MHo1oMoCezxg==} dependencies: '@babel/core': 7.19.6 - '@babel/standalone': 7.19.6 - '@babel/types': 7.19.4 + '@babel/standalone': 7.20.0 + '@babel/types': 7.20.0 scule: 0.3.2 transitivePeerDependencies: - supports-color @@ -9424,16 +9553,17 @@ packages: debug: 4.3.4 mlly: 0.5.16 pathe: 0.2.0 - vite: 3.1.8 + vite: 3.2.1 transitivePeerDependencies: - less - sass - stylus + - sugarss - supports-color - terser dev: true - /vite-plugin-checker/0.5.1_eslint@8.26.0+vite@3.1.8: + /vite-plugin-checker/0.5.1_eslint@8.26.0+vite@3.2.1: resolution: {integrity: sha512-NFiO1PyK9yGuaeSnJ7Whw9fnxLc1AlELnZoyFURnauBYhbIkx9n+PmIXxSFUuC9iFyACtbJQUAEuQi6yHs2Adg==} engines: {node: '>=14.16'} peerDependencies: @@ -9464,7 +9594,7 @@ packages: npm-run-path: 4.0.1 strip-ansi: 6.0.1 tiny-invariant: 1.3.1 - vite: 3.1.8 + vite: 3.2.1 vscode-languageclient: 7.0.0 vscode-languageserver: 7.0.0 vscode-languageserver-textdocument: 1.0.7 @@ -9498,7 +9628,37 @@ packages: fsevents: 2.3.2 dev: true - /vitest/0.24.3_happy-dom@7.6.3: + /vite/3.2.1: + resolution: {integrity: sha512-ADtMkfHuWq4tskJsri2n2FZkORO8ZyhI+zIz7zTrDAgDEtct1jdxOg3YsZBfHhKjmMoWLOSCr+64qrEDGo/DbQ==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + less: '*' + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + less: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.15.12 + postcss: 8.4.18 + resolve: 1.22.1 + rollup: 2.79.1 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /vitest/0.24.3_happy-dom@7.6.6: resolution: {integrity: sha512-aM0auuPPgMSstWvr851hB74g/LKaKBzSxcG3da7ejfZbx08Y21JpZmbmDYrMTCGhVZKqTGwzcnLMwyfz2WzkhQ==} engines: {node: '>=v14.16.0'} hasBin: true @@ -9525,7 +9685,7 @@ packages: '@types/node': 18.11.5 chai: 4.3.6 debug: 4.3.4 - happy-dom: 7.6.3 + happy-dom: 7.6.6 local-pkg: 0.4.2 strip-literal: 0.4.2 tinybench: 2.3.1 @@ -9623,8 +9783,8 @@ packages: - supports-color dev: true - /vue-router/4.1.5_vue@3.2.41: - resolution: {integrity: sha512-IsvoF5D2GQ/EGTs/Th4NQms9gd2NSqV+yylxIyp/OYp8xOwxmU8Kj/74E9DTSYAyH5LX7idVUngN3JSj1X4xcQ==} + /vue-router/4.1.6_vue@3.2.41: + resolution: {integrity: sha512-DYWYwsG6xNPmLq/FmZn8Ip+qrhFEzA14EI12MsMgVxvHFDYvlr4NXpVF5hrRH1wVcDP8fGi5F4rxuJSl8/r+EQ==} peerDependencies: vue: ^3.2.0 dependencies: @@ -9783,8 +9943,8 @@ packages: signal-exit: 3.0.7 dev: true - /ws/8.2.3: - resolution: {integrity: sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==} + /ws/8.10.0: + resolution: {integrity: sha512-+s49uSmZpvtAsd2h37vIPy1RBusaLawVe8of+GyEPsaJTCMpj/2v8NpeK1SHXjBlQ95lQTmQofOJnFiLoaN3yw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -9794,10 +9954,9 @@ packages: optional: true utf-8-validate: optional: true - dev: false - /ws/8.9.0: - resolution: {integrity: sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==} + /ws/8.2.3: + resolution: {integrity: sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -9807,6 +9966,7 @@ packages: optional: true utf-8-validate: optional: true + dev: false /xml-name-validator/4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} diff --git a/src/app.vue b/src/app.vue index e587101e..f192b5e3 100644 --- a/src/app.vue +++ b/src/app.vue @@ -15,7 +15,7 @@ const PATH_RE = createRegExp( .at.lineEnd() ) -const { path = '/' } = (route.fullPath as string).match(PATH_RE)?.groups ?? {} +const { path = '/' } = route.fullPath.match(PATH_RE)?.groups ?? {} const url = `https://roe.dev${path}` useHead({ diff --git a/src/composables/prefetch.ts b/src/composables/data.ts similarity index 69% rename from src/composables/prefetch.ts rename to src/composables/data.ts index 0897eda4..fd337c72 100644 --- a/src/composables/prefetch.ts +++ b/src/composables/data.ts @@ -1,48 +1,30 @@ const normalizeVercelResponse = async (r: unknown) => process.client && r instanceof Blob ? JSON.parse(await r.text()) : r -export const usePageData = (path = useRoute().path) => { - path = path.replace(/(index)?\.json$/, '').replace(/\/$/, '') - switch (path) { - case '/': - return useAsyncHome() - case '/work': - return - case '/talks': - return useAsyncTalks() - case '/blog': - return useAsyncBlogIndex() - case '/uses': - return useAsyncUses() - default: - return useAsyncBlogArticle(path) - } -} - -const useAsyncHome = () => +export const useAsyncHome = () => useAsyncData( () => - (process.server || process.dev) && + ((process.server || process.dev) as true) && queryContent('/') .only(['title', 'type', 'body']) .findOne() .then(normalizeVercelResponse) ) -const useAsyncUses = () => +export const useAsyncUses = () => useAsyncData( () => - (process.server || process.dev) && + ((process.server || process.dev) as true) && queryContent('/uses') .only(['title', 'type', 'body']) .findOne() .then(normalizeVercelResponse) ) -const useAsyncBlogIndex = () => +export const useAsyncBlogIndex = () => useAsyncData( () => - (process.server || process.dev) && + ((process.server || process.dev) as true) && queryContent('/blog') .only(['title', 'date', '_path']) .find() @@ -73,11 +55,11 @@ interface Talk { date: string formattedDate: string } -const useAsyncTalks = () => +export const useAsyncTalks = () => useAsyncData( () => ( - (process.server || process.dev) && + ((process.server || process.dev) as true) && import('../data/talks.json').then(r => r.default) ).then(async r => process.client && r instanceof Blob ? JSON.parse(await r.text()) : r @@ -95,11 +77,11 @@ const useAsyncTalks = () => } ) -const useAsyncBlogArticle = (path: string) => +export const useAsyncBlogArticle = (path: string) => useAsyncData( path, () => - (process.server || process.dev) && + ((process.server || process.dev) as true) && queryContent(path) .only(['title', 'type', 'body', 'date', 'tags']) .findOne() diff --git a/src/composables/onIdle.ts b/src/composables/onIdle.ts index 4dd04c2f..cfaa7abd 100644 --- a/src/composables/onIdle.ts +++ b/src/composables/onIdle.ts @@ -1,3 +1,24 @@ +const requestIdleCallback = + globalThis.requestIdleCallback || + function (cb) { + const start = Date.now() + const idleDeadline = { + didTimeout: false, + timeRemaining () { + return Math.max(0, 50 - (Date.now() - start)) + }, + } + return setTimeout(function () { + cb(idleDeadline) + }, 1) + } + +const cancelIdleCallback = + globalThis.cancelIdleCallback || + function (id) { + clearTimeout(id) + } + export const onIdle = (fn: () => any) => { let id: number onBeforeMount(() => { diff --git a/src/pages/blog/[article].vue b/src/pages/blog/[article].vue index 0d0e3420..b945737e 100644 --- a/src/pages/blog/[article].vue +++ b/src/pages/blog/[article].vue @@ -29,7 +29,11 @@ const route = useRoute() const slug = route.params.article if (!slug) navigateTo('/blog') -const { data: page } = await usePageData() +const { data: page } = await useAsyncBlogArticle( + useRoute() + .path.replace(/(index)?\.json$/, '') + .replace(/\/$/, '') +) const d = new Date(page.value.date) const formattedDate = `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}` @@ -40,7 +44,7 @@ const SLUG_RE = createRegExp( .at.lineEnd() ) -const { slug: ogSlug } = (route.fullPath as string).match(SLUG_RE)?.groups ?? {} +const { slug: ogSlug } = route.fullPath.match(SLUG_RE)?.groups ?? {} useHead({ title: page.value.title, meta: [ @@ -61,7 +65,7 @@ useHead({ }) if (process.server) { appendHeader( - nuxtApp.ssrContext.event, + nuxtApp.ssrContext!.event, 'x-nitro-prerender', `/og/${ogSlug}.jpg` ) diff --git a/src/pages/blog/index.vue b/src/pages/blog/index.vue index 1387f2af..fa9829f0 100644 --- a/src/pages/blog/index.vue +++ b/src/pages/blog/index.vue @@ -28,5 +28,5 @@ diff --git a/src/pages/index.vue b/src/pages/index.vue index efaa9aaf..43e93269 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -46,7 +46,7 @@ useHead({ meta: [{ hid: 'og:title', property: 'og:title', content: `Daniel Roe` }], }) -const { data: page } = await usePageData() +const { data: page } = await useAsyncHome()