From 4fdecbe62970a38b398d22fd9da0b4041c912f07 Mon Sep 17 00:00:00 2001 From: upsiflu Date: Wed, 4 Dec 2024 16:25:37 +0100 Subject: [PATCH] fix(ui config): enable vitepress support in editors; upgrade to vue v3.5 This fix enables destructuring for `defineModel` and `defineProps` used in the ui components --- front/package.json | 13 +- front/tsconfig.json | 2 + front/ui-docs/.vitepress/config.ts | 2 +- front/ui-docs/index.md | 28 +- front/ui-docs/vite.config.ts | 12 +- front/vite.config.ts | 10 + front/yarn.lock | 689 +++++++++++++++++------------ 7 files changed, 464 insertions(+), 292 deletions(-) diff --git a/front/package.json b/front/package.json index 07f7feaa2..2a377d1af 100644 --- a/front/package.json +++ b/front/package.json @@ -45,6 +45,7 @@ "jsmediatags": "3.9.7", "lodash-es": "4.17.21", "lru-cache": "10.2.0", + "magic-regexp": "0.8.0", "moment": "2.29.4", "music-metadata-browser": "2.5.10", "nanoid": "5.0.4", @@ -56,7 +57,7 @@ "transliteration": "2.3.5", "universal-cookie": "4.0.4", "vite-plugin-pwa": "0.14.4", - "vue": "3.3.11", + "vue": "3.5.13", "vue-gettext": "2.1.12", "vue-i18n": "9.9.1", "vue-router": "4.2.5", @@ -85,13 +86,13 @@ "@types/showdown": "2.0.6", "@types/vue-virtual-scroller": "npm:@earltp/vue-virtual-scroller", "@typescript-eslint/eslint-plugin": "7.1.0", - "@vitejs/plugin-vue": "5.0.3", + "@vitejs/plugin-vue": "5.1.4", "@vitest/coverage-v8": "1.3.1", - "@vue-macros/volar": "0.13.3", + "@vue-macros/volar": "0.17.2", "@vue/compiler-sfc": "3.3.11", "@vue/eslint-config-standard": "8.0.1", "@vue/eslint-config-typescript": "12.0.0", - "@vue/test-utils": "2.2.7", + "@vue/test-utils": "2.4.1", "@vue/tsconfig": "0.6.0", "cypress": "13.6.4", "eslint": "8.57.0", @@ -108,12 +109,12 @@ "msw-auto-mock": "0.18.0", "patch-package": "8.0.0", "rollup-plugin-visualizer": "5.9.0", - "sass": "1.57.1", + "sass": "1.68.0", "sinon": "15.0.2", "standardized-audio-context-mock": "9.6.32", "typescript": "5.3.3", "unocss": "0.58.0", - "unplugin-vue-macros": "2.4.6", + "unplugin-vue-macros": "2.6.2", "utility-types": "3.10.0", "vite": "5.2.12", "vite-plugin-node-polyfills": "0.17.0", diff --git a/front/tsconfig.json b/front/tsconfig.json index 632c0ed87..598bf55e9 100644 --- a/front/tsconfig.json +++ b/front/tsconfig.json @@ -20,6 +20,7 @@ } }, "include": [ + "**/*.md", "src/**/*.ts", "src/**/*.vue", "vite.config.ts", @@ -28,6 +29,7 @@ "src/docs/**/*.ts" ], "vueCompilerOptions": { + "vitePressExtensions": [".md"], "plugins": [ "@vue-macros/volar/define-options", "@vue-macros/volar/define-models", diff --git a/front/ui-docs/.vitepress/config.ts b/front/ui-docs/.vitepress/config.ts index c400f152d..2e9a50cd8 100644 --- a/front/ui-docs/.vitepress/config.ts +++ b/front/ui-docs/.vitepress/config.ts @@ -51,7 +51,7 @@ export default defineConfig({ }, { text: 'Layout', link: '/components/ui/layout/', - items: [{ text: "Spacer", link: "../../src/components/ui/layout/spacer" }] + items: [{ text: "Spacer", link: "/components/ui/layout/spacer" }] }, { text: 'Loader', link: '/components/ui/loader' }, { text: 'Modal', link: '/components/ui/modal' }, diff --git a/front/ui-docs/index.md b/front/ui-docs/index.md index e95192471..5e597dc69 100644 --- a/front/ui-docs/index.md +++ b/front/ui-docs/index.md @@ -1,6 +1,7 @@