From f7a745c6cb71b541197fbe7841c0cd85fc0f92f3 Mon Sep 17 00:00:00 2001 From: Soybean Date: Wed, 30 Jul 2025 08:16:00 +0800 Subject: [PATCH] reafctor(projects): use new elegant-router plugin --- .gitignore | 2 + build/plugins/index.ts | 4 +- build/plugins/router.ts | 41 -- er.config.ts | 52 +++ package.json | 2 +- pnpm-lock.yaml | 367 +++++++++--------- src/router/_generated/imports.ts | 31 ++ src/router/_generated/routes.ts | 283 ++++++++++++++ src/router/_generated/shared.ts | 45 +++ src/router/_generated/transformer.ts | 70 ++++ src/router/elegant/imports.ts | 24 -- src/router/elegant/routes.ts | 78 ---- src/router/elegant/transform.ts | 192 --------- src/typings/elegant-router.d.ts | 282 +++++--------- src/typings/router.d.ts | 4 +- src/typings/typed-router.d.ts | 57 +++ .../{_builtin => (builtin)}/403/index.vue | 0 .../{_builtin => (builtin)}/404/index.vue | 0 .../{_builtin => (builtin)}/500/index.vue | 0 .../iframe}/[url].vue | 0 .../{_builtin => (builtin)}/login/index.vue | 0 .../login/modules/bind-wechat.vue | 0 .../login/modules/code-login.vue | 0 .../login/modules/pwd-login.vue | 0 .../login/modules/register.vue | 0 .../login/modules/reset-pwd.vue | 0 src/views/(builtin)/wip/index.vue | 5 + src/views/manage/api/index.vue | 5 + src/views/manage/dictionary/index.vue | 5 + src/views/manage/menu/index.vue | 5 + src/views/manage/organization/index.vue | 5 + src/views/manage/permission/index.vue | 5 + src/views/manage/role/index.vue | 5 + src/views/manage/route/index.vue | 5 + src/views/manage/user/index.vue | 5 + 35 files changed, 859 insertions(+), 720 deletions(-) delete mode 100644 build/plugins/router.ts create mode 100644 er.config.ts create mode 100644 src/router/_generated/imports.ts create mode 100644 src/router/_generated/routes.ts create mode 100644 src/router/_generated/shared.ts create mode 100644 src/router/_generated/transformer.ts delete mode 100644 src/router/elegant/imports.ts delete mode 100644 src/router/elegant/routes.ts delete mode 100644 src/router/elegant/transform.ts create mode 100644 src/typings/typed-router.d.ts rename src/views/{_builtin => (builtin)}/403/index.vue (100%) rename src/views/{_builtin => (builtin)}/404/index.vue (100%) rename src/views/{_builtin => (builtin)}/500/index.vue (100%) rename src/views/{_builtin/iframe-page => (builtin)/iframe}/[url].vue (100%) rename src/views/{_builtin => (builtin)}/login/index.vue (100%) rename src/views/{_builtin => (builtin)}/login/modules/bind-wechat.vue (100%) rename src/views/{_builtin => (builtin)}/login/modules/code-login.vue (100%) rename src/views/{_builtin => (builtin)}/login/modules/pwd-login.vue (100%) rename src/views/{_builtin => (builtin)}/login/modules/register.vue (100%) rename src/views/{_builtin => (builtin)}/login/modules/reset-pwd.vue (100%) create mode 100644 src/views/(builtin)/wip/index.vue create mode 100644 src/views/manage/api/index.vue create mode 100644 src/views/manage/dictionary/index.vue create mode 100644 src/views/manage/menu/index.vue create mode 100644 src/views/manage/organization/index.vue create mode 100644 src/views/manage/permission/index.vue create mode 100644 src/views/manage/role/index.vue create mode 100644 src/views/manage/route/index.vue create mode 100644 src/views/manage/user/index.vue diff --git a/.gitignore b/.gitignore index fdd159a9..506c27f1 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ package-lock.json yarn.lock .VSCodeCounter + +.temp \ No newline at end of file diff --git a/build/plugins/index.ts b/build/plugins/index.ts index 1243fc2f..b3f164c8 100644 --- a/build/plugins/index.ts +++ b/build/plugins/index.ts @@ -2,7 +2,7 @@ import type { PluginOption } from 'vite'; import vue from '@vitejs/plugin-vue'; import vueJsx from '@vitejs/plugin-vue-jsx'; import progress from 'vite-plugin-progress'; -import { setupElegantRouter } from './router'; +import elegantRouter from 'elegant-router/vite'; import { setupUnocss } from './unocss'; import { setupUnplugin } from './unplugin'; import { setupHtmlPlugin } from './html'; @@ -13,7 +13,7 @@ export function setupVitePlugins(viteEnv: Env.ImportMeta, buildTime: string) { vue(), vueJsx(), setupDevtoolsPlugin(viteEnv), - setupElegantRouter(), + elegantRouter(), setupUnocss(viteEnv), ...setupUnplugin(viteEnv), progress(), diff --git a/build/plugins/router.ts b/build/plugins/router.ts deleted file mode 100644 index 3d6917e7..00000000 --- a/build/plugins/router.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { RouteMeta } from 'vue-router'; -import ElegantVueRouter from '@elegant-router/vue/vite'; -import type { RouteKey } from '@elegant-router/types'; - -export function setupElegantRouter() { - return ElegantVueRouter({ - layouts: { - base: 'src/layouts/base-layout/index.vue', - blank: 'src/layouts/blank-layout/index.vue' - }, - routePathTransformer(routeName, routePath) { - const key = routeName as RouteKey; - - if (key === 'login') { - const modules: UnionKey.LoginModule[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat']; - - const moduleReg = modules.join('|'); - - return `/login/:module(${moduleReg})?`; - } - - return routePath; - }, - onRouteMetaGen(routeName) { - const key = routeName as RouteKey; - - const constantRoutes: RouteKey[] = ['login', '403', '404', '500']; - - const meta: Partial = { - title: key, - i18nKey: `route.${key}` as App.I18n.I18nKey - }; - - if (constantRoutes.includes(key)) { - meta.constant = true; - } - - return meta; - } - }); -} diff --git a/er.config.ts b/er.config.ts new file mode 100644 index 00000000..73888918 --- /dev/null +++ b/er.config.ts @@ -0,0 +1,52 @@ +import type { RouteMeta } from 'vue-router'; +import { defineConfig } from 'elegant-router'; +import type { RouteKey } from '@elegant-router/types'; + +export default defineConfig({ + pageDir: ['src/views'], + layouts: { + base: 'src/layouts/base-layout/index.vue', + blank: 'src/layouts/blank-layout/index.vue' + }, + reuseRoutes: [ + '/exception/403', + '/exception/404', + '/exception/500', + '/document/project', + '/document/project-link', + '/document/video', + '/document/vue', + '/document/vite', + '/document/unocss', + '/document/naive', + '/document/pro-naive', + '/document/antd', + '/document/alova' + ], + getRoutePath: node => { + if (node.name === 'Login') { + const modules: UnionKey.LoginModule[] = ['pwd-login', 'code-login', 'register', 'reset-pwd', 'bind-wechat']; + + const moduleReg = modules.join('|'); + + return `/login/:module(${moduleReg})?`; + } + + return node.path; + }, + getRouteMeta: node => { + const constantRoutes: RouteKey[] = ['Login', '403', '404', '500']; + + const name = node.name as RouteKey; + + const meta: Partial = { + title: name + }; + + if (constantRoutes.includes(name)) { + meta.constant = true; + } + + return meta; + } +}); diff --git a/package.json b/package.json index d9284358..756313f8 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,6 @@ "vue-router": "4.5.1" }, "devDependencies": { - "@elegant-router/vue": "0.3.8", "@iconify/json": "2.2.359", "@sa/scripts": "workspace:*", "@sa/uno-preset": "workspace:*", @@ -86,6 +85,7 @@ "@vitejs/plugin-vue": "6.0.0", "@vitejs/plugin-vue-jsx": "5.0.1", "consola": "3.4.2", + "elegant-router": "1.0.4-beta.9", "eslint": "9.31.0", "eslint-plugin-vue": "10.3.0", "kolorist": "1.8.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5299beec..b809137e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,9 +72,6 @@ importers: specifier: 4.5.1 version: 4.5.1(vue@3.5.17(typescript@5.8.3)) devDependencies: - '@elegant-router/vue': - specifier: 0.3.8 - version: 0.3.8 '@iconify/json': specifier: 2.2.359 version: 2.2.359 @@ -86,7 +83,7 @@ importers: version: link:packages/uno-preset '@soybeanjs/eslint-config': specifier: 1.7.1 - version: 1.7.1(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-config@66.3.3(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-vue@10.3.0(@typescript-eslint/parser@8.35.1(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))))(eslint@9.31.0(jiti@2.4.2))(svelte-eslint-parser@1.3.0)(typescript@5.8.3)(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))) + version: 1.7.1(@types/eslint@9.6.1)(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-config@66.3.3(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-vue@10.3.0(@typescript-eslint/parser@8.35.1(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))))(eslint@9.31.0(jiti@2.4.2))(svelte-eslint-parser@1.3.0)(typescript@5.8.3)(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))) '@types/node': specifier: 24.0.15 version: 24.0.15 @@ -110,16 +107,19 @@ importers: version: 66.3.3 '@unocss/vite': specifier: 66.3.3 - version: 66.3.3(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) + version: 66.3.3(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) '@vitejs/plugin-vue': specifier: 6.0.0 - version: 6.0.0(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) + version: 6.0.0(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: 5.0.1 - version: 5.0.1(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) + version: 5.0.1(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) consola: specifier: 3.4.2 version: 3.4.2 + elegant-router: + specifier: 1.0.4-beta.9 + version: 1.0.4-beta.9 eslint: specifier: 9.31.0 version: 9.31.0(jiti@2.4.2) @@ -149,16 +149,16 @@ importers: version: 28.8.0(@babel/parser@7.28.0)(vue@3.5.17(typescript@5.8.3)) vite: specifier: 7.0.5 - version: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0) + version: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) vite-plugin-progress: specifier: 0.0.7 - version: 0.0.7(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0)) + version: 0.0.7(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) vite-plugin-svg-icons: specifier: 2.0.1 - version: 2.0.1(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0)) + version: 2.0.1(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) vite-plugin-vue-devtools: specifier: 7.7.7 - version: 7.7.7(rollup@4.45.1)(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) + version: 7.7.7(rollup@4.45.1)(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) vue-eslint-parser: specifier: 10.2.0 version: 10.2.0(eslint@9.31.0(jiti@2.4.2)) @@ -232,7 +232,7 @@ importers: devDependencies: '@soybeanjs/changelog': specifier: 0.3.24 - version: 0.3.24(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-config@66.3.3(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-vue@10.3.0(@typescript-eslint/parser@8.35.1(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))))(eslint@9.31.0(jiti@2.4.2))(svelte-eslint-parser@1.3.0)(typescript@5.8.3)(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))) + version: 0.3.24(@types/eslint@9.6.1)(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-config@66.3.3(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-vue@10.3.0(@typescript-eslint/parser@8.35.1(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))))(eslint@9.31.0(jiti@2.4.2))(svelte-eslint-parser@1.3.0)(typescript@5.8.3)(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))) bumpp: specifier: 10.2.0 version: 10.2.0 @@ -468,12 +468,6 @@ packages: peerDependencies: vue: ^3.0.11 - '@elegant-router/core@0.3.8': - resolution: {integrity: sha512-q8CihD9la9V2H+/OYIzMLftXSBkbT234UMwhMxDL1Gq7BGKU3kEIEJvifRM7htbiRD77bkQhwMGBY3WZacqw8A==} - - '@elegant-router/vue@0.3.8': - resolution: {integrity: sha512-K9x2275vw9kQB25WnZ7ROTLsT3o8bxu8acvwF09Do8hexIKG2i6elV0+pWxaufNZ4XCuBxT+lKHfHeyBbRhtYQ==} - '@emnapi/core@1.4.5': resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==} @@ -766,6 +760,9 @@ packages: resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} + '@jridgewell/source-map@0.3.10': + resolution: {integrity: sha512-0pPkgz9dY+bijgistcTTJ5mR+ocqRXLuhXHYdzoMmmoJ2C9S46RCm2GMUbatPEUK9Yjy26IrAy8D/M00lLkv+Q==} + '@jridgewell/sourcemap-codec@1.5.4': resolution: {integrity: sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==} @@ -882,6 +879,10 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@pkgr/core@0.2.7': + resolution: {integrity: sha512-YLT9Zo3oNPJoBjBc4q8G2mjU4tqIbf5CEOORbUUr48dCD9q3umJ3IPlVqOqDakPfd2HuwccBaqlGhN4Gmr5OWg==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@pkgr/core@0.2.9': resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -896,8 +897,8 @@ packages: '@rolldown/pluginutils@1.0.0-beta.19': resolution: {integrity: sha512-3FL3mnMbPu0muGOCaKAhhFEYmqv9eTfPSJRJmANrCwtgK8VuxpsZDGK+m0LYAGoyO8+0j5uRe4PeyPDK1yA/hA==} - '@rolldown/pluginutils@1.0.0-beta.28': - resolution: {integrity: sha512-fe3/1HZ3qJmXvkGv1kacKq2b+x9gbcyF1hnmLBVrRFEQWoOcRapQjXf8+hgyxI0EJAbnKEtrp5yhohQCFCjycw==} + '@rolldown/pluginutils@1.0.0-beta.27': + resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} '@rollup/pluginutils@5.2.0': resolution: {integrity: sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==} @@ -1084,12 +1085,18 @@ packages: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} + '@ts-morph/common@0.27.0': + resolution: {integrity: sha512-Wf29UqxWDpc+i61k3oIOzcUfQt79PIT9y/MWfAGlrkjg6lBC1hwDECLXPVJAhWjiGbfBCxZd65F/LIZF3+jeJQ==} + '@tybys/wasm-util@0.10.0': resolution: {integrity: sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==} '@types/crypto-js@4.2.2': resolution: {integrity: sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==} + '@types/eslint@9.6.1': + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} + '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} @@ -1184,6 +1191,10 @@ packages: resolution: {integrity: sha512-q/O04vVnKHfrrhNAscndAn1tuQhIkwqnaW+eu5waD5IPts2eX1dgJxgqcPx5BX109/qAz7IG6VrEPTOYKCNfRQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.36.0': + resolution: {integrity: sha512-xGms6l5cTJKQPZOKM75Dl9yBfNdGeLRsIyufewnxT4vZTrjC0ImQT4fj8QmtJK84F58uSh5HVBSANwcfiXxABQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.37.0': resolution: {integrity: sha512-ax0nv7PUF9NOVPs+lmQ7yIE7IQmAf8LGcXbMvHX5Gm+YJUYNAl340XkGnrimxZ0elXyoQJuN5sbg6C4evKA4SQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1572,10 +1583,6 @@ packages: resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} engines: {node: '>=0.10.0'} - ast-types@0.16.1: - resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==} - engines: {node: '>=4'} - async-function@1.0.0: resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} engines: {node: '>= 0.4'} @@ -1645,6 +1652,9 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + builtin-modules@5.0.0: resolution: {integrity: sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==} engines: {node: '>=18.20'} @@ -1743,6 +1753,9 @@ packages: resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} engines: {node: '>=0.8'} + code-block-writer@13.0.3: + resolution: {integrity: sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==} + collection-visit@1.0.0: resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} engines: {node: '>=0.10.0'} @@ -1764,6 +1777,9 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + commander@7.2.0: resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} engines: {node: '>= 10'} @@ -1784,10 +1800,6 @@ packages: confbox@0.2.2: resolution: {integrity: sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==} - consola@3.2.3: - resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} - engines: {node: ^14.18.0 || >=16.10.0} - consola@3.4.2: resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} engines: {node: ^14.18.0 || >=16.10.0} @@ -2001,6 +2013,10 @@ packages: electron-to-chromium@1.5.187: resolution: {integrity: sha512-cl5Jc9I0KGUoOoSbxvTywTa40uspGJt/BDBoDLoxJRSBpWh4FFXBsjNRHfQrONsV/OoEjDfHUmZQa2d6Ze4YgA==} + elegant-router@1.0.4-beta.9: + resolution: {integrity: sha512-KgtKBbElNQ1hmMFz297ft2lxNYH0ROfzvPc8IaRprgVpgpQxEgkluaSLONYmeHdgslAvW6ZgwOu4sK3N+TiqOA==} + hasBin: true + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -2184,11 +2200,6 @@ packages: resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - esquery@1.6.0: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} @@ -2248,10 +2259,6 @@ packages: fast-diff@1.3.0: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} - engines: {node: '>=8.6.0'} - fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} @@ -2892,15 +2899,9 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - magic-string@0.30.11: - resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} - magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} - magicast@0.3.4: - resolution: {integrity: sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==} - map-cache@0.2.2: resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} engines: {node: '>=0.10.0'} @@ -2931,10 +2932,6 @@ packages: resolution: {integrity: sha512-3StSelAE+hnRvMs8IdVW7Uhk8CVed5tp+kLLGlBP6WiRAXS21GPGu/Nat4WNPXj2Eoc24B02SaeoyozPMfj0/g==} engines: {node: '>=0.10.0'} - micromatch@4.0.7: - resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} - engines: {node: '>=8.6'} - micromatch@4.0.8: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} @@ -3098,8 +3095,8 @@ packages: ohash@2.0.11: resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} - open@10.2.0: - resolution: {integrity: sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==} + open@10.1.2: + resolution: {integrity: sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw==} engines: {node: '>=18'} optionator@0.9.4: @@ -3178,6 +3175,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + picomatch@4.0.3: resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} engines: {node: '>=12'} @@ -3293,11 +3294,6 @@ packages: peerDependencies: prettier: '>=2.0.0' - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} - engines: {node: '>=14'} - hasBin: true - prettier@3.6.2: resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} engines: {node: '>=14'} @@ -3357,10 +3353,6 @@ packages: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} - recast@0.23.9: - resolution: {integrity: sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==} - engines: {node: '>= 4'} - reflect.getprototypeof@1.0.10: resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} @@ -3558,6 +3550,9 @@ packages: resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} deprecated: See https://github.com/lydell/source-map-resolve#deprecated + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + source-map-url@0.4.1: resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==} deprecated: See https://github.com/lydell/source-map-url#deprecated @@ -3645,6 +3640,10 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + strip-json-comments@5.0.2: + resolution: {integrity: sha512-4X2FR3UwhNUE9G49aIsJW5hRRR3GXGTBTZRMfv568O60ojM8HcWjV/VxAxCDW3SUND33O6ZY66ZuRcdkj73q2g==} + engines: {node: '>=14.16'} + superjson@2.2.2: resolution: {integrity: sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==} engines: {node: '>=16'} @@ -3682,6 +3681,10 @@ packages: resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==} engines: {node: ^14.18.0 || >=16.0.0} + synckit@0.11.8: + resolution: {integrity: sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A==} + engines: {node: ^14.18.0 || >=16.0.0} + tailwind-merge@3.3.1: resolution: {integrity: sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g==} @@ -3689,12 +3692,14 @@ packages: resolution: {integrity: sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==} engines: {node: '>=6'} + terser@5.43.1: + resolution: {integrity: sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==} + engines: {node: '>=10'} + hasBin: true + tiny-emitter@2.1.0: resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} - tiny-invariant@1.3.3: - resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} - tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} @@ -3743,6 +3748,9 @@ packages: peerDependencies: typescript: '>=4.0.0' + ts-morph@26.0.0: + resolution: {integrity: sha512-ztMO++owQnz8c/gIENcM9XfCEzgoGphTv+nKpYNM1bgsdOVC/jRZuEBf6N+mLLDNg68Kl+GgUZfOySaRiG1/Ug==} + tslib@2.3.0: resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==} @@ -3853,10 +3861,6 @@ packages: '@nuxt/kit': optional: true - unplugin@1.12.0: - resolution: {integrity: sha512-KeczzHl2sATPQUx1gzo+EnUkmN4VmGBYRRVOZSGvGITE9rGHRDGqft6ONceP3vgXcyJ2XjX5axG5jMWUwNCYLw==} - engines: {node: '>=14.0.0'} - unplugin@2.3.5: resolution: {integrity: sha512-RyWSb5AHmGtjjNQ6gIlA67sHOsWpsbWpwDokLwTcejVdOjEkJZh7QKu14J00gDDVSh8kGH4KYC/TNBceXFZhtw==} engines: {node: '>=18.12.0'} @@ -4043,10 +4047,6 @@ packages: peerDependencies: vue: ^3.0.11 - webpack-sources@3.3.3: - resolution: {integrity: sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==} - engines: {node: '>=10.13.0'} - webpack-virtual-modules@0.6.2: resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} @@ -4083,10 +4083,6 @@ packages: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} - wsl-utils@0.1.0: - resolution: {integrity: sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==} - engines: {node: '>=18'} - xml-name-validator@4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} @@ -4352,25 +4348,6 @@ snapshots: dependencies: vue: 3.5.17(typescript@5.8.3) - '@elegant-router/core@0.3.8': - dependencies: - chokidar: 3.6.0 - consola: 3.2.3 - fast-glob: 3.3.2 - kolorist: 1.8.0 - micromatch: 4.0.7 - - '@elegant-router/vue@0.3.8': - dependencies: - '@elegant-router/core': 0.3.8 - consola: 3.2.3 - kolorist: 1.8.0 - magic-string: 0.30.11 - magicast: 0.3.4 - prettier: 3.3.3 - recast: 0.23.9 - unplugin: 1.12.0 - '@emnapi/core@1.4.5': dependencies: '@emnapi/wasi-threads': 1.0.4 @@ -4598,6 +4575,12 @@ snapshots: '@jridgewell/resolve-uri@3.1.2': {} + '@jridgewell/source-map@0.3.10': + dependencies: + '@jridgewell/gen-mapping': 0.3.12 + '@jridgewell/trace-mapping': 0.3.29 + optional: true + '@jridgewell/sourcemap-codec@1.5.4': {} '@jridgewell/trace-mapping@0.3.29': @@ -4690,6 +4673,8 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@pkgr/core@0.2.7': {} + '@pkgr/core@0.2.9': {} '@polka/url@1.0.0-next.29': {} @@ -4700,7 +4685,7 @@ snapshots: '@rolldown/pluginutils@1.0.0-beta.19': {} - '@rolldown/pluginutils@1.0.0-beta.28': {} + '@rolldown/pluginutils@1.0.0-beta.27': {} '@rollup/pluginutils@5.2.0(rollup@4.45.1)': dependencies: @@ -4774,9 +4759,9 @@ snapshots: '@sindresorhus/merge-streams@4.0.0': {} - '@soybeanjs/changelog@0.3.24(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-config@66.3.3(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-vue@10.3.0(@typescript-eslint/parser@8.35.1(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))))(eslint@9.31.0(jiti@2.4.2))(svelte-eslint-parser@1.3.0)(typescript@5.8.3)(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2)))': + '@soybeanjs/changelog@0.3.24(@types/eslint@9.6.1)(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-config@66.3.3(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-vue@10.3.0(@typescript-eslint/parser@8.35.1(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))))(eslint@9.31.0(jiti@2.4.2))(svelte-eslint-parser@1.3.0)(typescript@5.8.3)(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2)))': dependencies: - '@soybeanjs/eslint-config': 1.7.1(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-config@66.3.3(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-vue@10.3.0(@typescript-eslint/parser@8.35.1(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))))(eslint@9.31.0(jiti@2.4.2))(svelte-eslint-parser@1.3.0)(typescript@5.8.3)(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))) + '@soybeanjs/eslint-config': 1.7.1(@types/eslint@9.6.1)(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-config@66.3.3(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-vue@10.3.0(@typescript-eslint/parser@8.35.1(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))))(eslint@9.31.0(jiti@2.4.2))(svelte-eslint-parser@1.3.0)(typescript@5.8.3)(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))) cli-progress: 3.12.0 convert-gitmoji: 0.1.5 dayjs: 1.11.11 @@ -4806,7 +4791,7 @@ snapshots: - typescript - vue-eslint-parser - '@soybeanjs/eslint-config@1.7.1(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-config@66.3.3(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-vue@10.3.0(@typescript-eslint/parser@8.35.1(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))))(eslint@9.31.0(jiti@2.4.2))(svelte-eslint-parser@1.3.0)(typescript@5.8.3)(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2)))': + '@soybeanjs/eslint-config@1.7.1(@types/eslint@9.6.1)(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(@unocss/eslint-config@66.3.3(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-vue@10.3.0(@typescript-eslint/parser@8.35.1(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2))))(eslint@9.31.0(jiti@2.4.2))(svelte-eslint-parser@1.3.0)(typescript@5.8.3)(vue-eslint-parser@10.2.0(eslint@9.31.0(jiti@2.4.2)))': dependencies: '@antfu/eslint-define-config': 1.23.0-2 '@antfu/install-pkg': 1.1.0 @@ -4820,7 +4805,7 @@ snapshots: eslint-parser-plain: 0.1.1 eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2)) eslint-plugin-n: 17.21.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3) - eslint-plugin-prettier: 5.5.1(eslint-config-prettier@10.1.5(eslint@9.31.0(jiti@2.4.2)))(eslint@9.31.0(jiti@2.4.2))(prettier@3.6.2) + eslint-plugin-prettier: 5.5.1(@types/eslint@9.6.1)(eslint-config-prettier@10.1.5(eslint@9.31.0(jiti@2.4.2)))(eslint@9.31.0(jiti@2.4.2))(prettier@3.6.2) eslint-plugin-unicorn: 59.0.1(eslint@9.31.0(jiti@2.4.2)) globals: 16.3.0 local-pkg: 1.1.1 @@ -4841,6 +4826,12 @@ snapshots: '@trysound/sax@0.2.0': {} + '@ts-morph/common@0.27.0': + dependencies: + fast-glob: 3.3.3 + minimatch: 10.0.3 + path-browserify: 1.0.1 + '@tybys/wasm-util@0.10.0': dependencies: tslib: 2.8.1 @@ -4848,6 +4839,12 @@ snapshots: '@types/crypto-js@4.2.2': {} + '@types/eslint@9.6.1': + dependencies: + '@types/estree': 1.0.8 + '@types/json-schema': 7.0.15 + optional: true + '@types/estree@1.0.8': {} '@types/json-schema@7.0.15': {} @@ -4956,6 +4953,8 @@ snapshots: '@typescript-eslint/types@8.35.1': {} + '@typescript-eslint/types@8.36.0': {} + '@typescript-eslint/types@8.37.0': {} '@typescript-eslint/typescript-estree@8.35.1(typescript@5.8.3)': @@ -5105,7 +5104,7 @@ snapshots: dependencies: '@unocss/core': 66.3.3 - '@unocss/vite@66.3.3(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))': + '@unocss/vite@66.3.3(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))': dependencies: '@ampproject/remapping': 2.3.0 '@unocss/config': 66.3.3 @@ -5116,7 +5115,7 @@ snapshots: pathe: 2.0.3 tinyglobby: 0.2.14 unplugin-utils: 0.2.4 - vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) transitivePeerDependencies: - vue @@ -5179,21 +5178,21 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vitejs/plugin-vue-jsx@5.0.1(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))': + '@vitejs/plugin-vue-jsx@5.0.1(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))': dependencies: '@babel/core': 7.28.0 '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.0) - '@rolldown/pluginutils': 1.0.0-beta.28 + '@rolldown/pluginutils': 1.0.0-beta.27 '@vue/babel-plugin-jsx': 1.4.0(@babel/core@7.28.0) - vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) vue: 3.5.17(typescript@5.8.3) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@6.0.0(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))': + '@vitejs/plugin-vue@6.0.0(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))': dependencies: '@rolldown/pluginutils': 1.0.0-beta.19 - vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) vue: 3.5.17(typescript@5.8.3) '@volar/language-core@2.4.20': @@ -5278,14 +5277,14 @@ snapshots: dependencies: '@vue/devtools-kit': 7.7.7 - '@vue/devtools-core@7.7.7(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))': + '@vue/devtools-core@7.7.7(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))': dependencies: '@vue/devtools-kit': 7.7.7 '@vue/devtools-shared': 7.7.7 mitt: 3.0.1 nanoid: 5.1.5 pathe: 2.0.3 - vite-hot-client: 2.1.0(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0)) + vite-hot-client: 2.1.0(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) vue: 3.5.17(typescript@5.8.3) transitivePeerDependencies: - vite @@ -5426,10 +5425,6 @@ snapshots: assign-symbols@1.0.0: {} - ast-types@0.16.1: - dependencies: - tslib: 2.8.1 - async-function@1.0.0: {} async-validator@4.2.5: {} @@ -5512,6 +5507,9 @@ snapshots: node-releases: 2.0.19 update-browserslist-db: 1.1.3(browserslist@4.25.1) + buffer-from@1.1.2: + optional: true + builtin-modules@5.0.0: {} bumpp@10.2.0: @@ -5650,6 +5648,8 @@ snapshots: clone@2.1.2: {} + code-block-writer@13.0.3: {} + collection-visit@1.0.0: dependencies: map-visit: 1.0.0 @@ -5669,6 +5669,9 @@ snapshots: dependencies: delayed-stream: 1.0.0 + commander@2.20.3: + optional: true + commander@7.2.0: {} comment-parser@1.4.1: {} @@ -5681,8 +5684,6 @@ snapshots: confbox@0.2.2: {} - consola@3.2.3: {} - consola@3.4.2: {} convert-gitmoji@0.1.5: {} @@ -5887,6 +5888,22 @@ snapshots: electron-to-chromium@1.5.187: {} + elegant-router@1.0.4-beta.9: + dependencies: + cac: 6.7.14 + chokidar: 4.0.3 + consola: 3.4.2 + enquirer: 2.4.1 + kolorist: 1.8.0 + pathe: 2.0.3 + picomatch: 4.0.2 + strip-json-comments: 5.0.2 + tinyglobby: 0.2.14 + ts-morph: 26.0.0 + unconfig: 7.3.2 + unplugin: 2.3.5 + unplugin-utils: 0.2.4 + emoji-regex@8.0.0: {} emoji-regex@9.2.2: {} @@ -6056,7 +6073,7 @@ snapshots: eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2)): dependencies: - '@typescript-eslint/types': 8.37.0 + '@typescript-eslint/types': 8.36.0 comment-parser: 1.4.1 debug: 4.4.1 eslint: 9.31.0(jiti@2.4.2) @@ -6086,13 +6103,14 @@ snapshots: transitivePeerDependencies: - typescript - eslint-plugin-prettier@5.5.1(eslint-config-prettier@10.1.5(eslint@9.31.0(jiti@2.4.2)))(eslint@9.31.0(jiti@2.4.2))(prettier@3.6.2): + eslint-plugin-prettier@5.5.1(@types/eslint@9.6.1)(eslint-config-prettier@10.1.5(eslint@9.31.0(jiti@2.4.2)))(eslint@9.31.0(jiti@2.4.2))(prettier@3.6.2): dependencies: eslint: 9.31.0(jiti@2.4.2) prettier: 3.6.2 prettier-linter-helpers: 1.0.0 - synckit: 0.11.11 + synckit: 0.11.8 optionalDependencies: + '@types/eslint': 9.6.1 eslint-config-prettier: 10.1.5(eslint@9.31.0(jiti@2.4.2)) eslint-plugin-unicorn@59.0.1(eslint@9.31.0(jiti@2.4.2)): @@ -6186,8 +6204,6 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.15.0) eslint-visitor-keys: 4.2.1 - esprima@4.0.1: {} - esquery@1.6.0: dependencies: estraverse: 5.3.0 @@ -6276,14 +6292,6 @@ snapshots: fast-diff@1.3.0: {} - fast-glob@3.3.2: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.7 - fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -6882,20 +6890,10 @@ snapshots: dependencies: yallist: 3.1.1 - magic-string@0.30.11: - dependencies: - '@jridgewell/sourcemap-codec': 1.5.4 - magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.4 - magicast@0.3.4: - dependencies: - '@babel/parser': 7.28.0 - '@babel/types': 7.28.1 - source-map-js: 1.2.1 - map-cache@0.2.2: {} map-visit@1.0.0: @@ -6932,11 +6930,6 @@ snapshots: transitivePeerDependencies: - supports-color - micromatch@4.0.7: - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - micromatch@4.0.8: dependencies: braces: 3.0.3 @@ -7114,12 +7107,12 @@ snapshots: ohash@2.0.11: {} - open@10.2.0: + open@10.1.2: dependencies: default-browser: 5.2.1 define-lazy-prop: 3.0.0 is-inside-container: 1.0.0 - wsl-utils: 0.1.0 + is-wsl: 3.1.0 optionator@0.9.4: dependencies: @@ -7186,6 +7179,8 @@ snapshots: picomatch@2.3.1: {} + picomatch@4.0.2: {} + picomatch@4.0.3: {} pinia@3.0.3(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3)): @@ -7300,8 +7295,6 @@ snapshots: dependencies: prettier: 3.6.2 - prettier@3.3.3: {} - prettier@3.6.2: {} pretty-ms@9.2.0: @@ -7355,14 +7348,6 @@ snapshots: readdirp@4.1.2: {} - recast@0.23.9: - dependencies: - ast-types: 0.16.1 - esprima: 4.0.1 - source-map: 0.6.1 - tiny-invariant: 1.3.3 - tslib: 2.8.1 - reflect.getprototypeof@1.0.10: dependencies: call-bind: 1.0.8 @@ -7613,6 +7598,12 @@ snapshots: source-map-url: 0.4.1 urix: 0.1.0 + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + optional: true + source-map-url@0.4.1: {} source-map@0.5.7: {} @@ -7700,6 +7691,8 @@ snapshots: strip-json-comments@3.1.1: {} + strip-json-comments@5.0.2: {} + superjson@2.2.2: dependencies: copy-anything: 3.0.5 @@ -7755,13 +7748,23 @@ snapshots: dependencies: '@pkgr/core': 0.2.9 + synckit@0.11.8: + dependencies: + '@pkgr/core': 0.2.7 + tailwind-merge@3.3.1: {} tapable@2.2.2: {} - tiny-emitter@2.1.0: {} + terser@5.43.1: + dependencies: + '@jridgewell/source-map': 0.3.10 + acorn: 8.15.0 + commander: 2.20.3 + source-map-support: 0.5.21 + optional: true - tiny-invariant@1.3.3: {} + tiny-emitter@2.1.0: {} tinyexec@0.3.2: {} @@ -7811,9 +7814,15 @@ snapshots: picomatch: 4.0.3 typescript: 5.8.3 + ts-morph@26.0.0: + dependencies: + '@ts-morph/common': 0.27.0 + code-block-writer: 13.0.3 + tslib@2.3.0: {} - tslib@2.8.1: {} + tslib@2.8.1: + optional: true tsx@4.20.3: dependencies: @@ -7950,13 +7959,6 @@ snapshots: transitivePeerDependencies: - supports-color - unplugin@1.12.0: - dependencies: - acorn: 8.15.0 - chokidar: 3.6.0 - webpack-sources: 3.3.3 - webpack-virtual-modules: 0.6.2 - unplugin@2.3.5: dependencies: acorn: 8.15.0 @@ -8015,34 +8017,34 @@ snapshots: evtd: 0.2.4 vue: 3.5.17(typescript@5.8.3) - vite-hot-client@2.1.0(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0)): + vite-hot-client@2.1.0(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)): dependencies: - vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) - vite-plugin-inspect@0.8.9(rollup@4.45.1)(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0)): + vite-plugin-inspect@0.8.9(rollup@4.45.1)(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.2.0(rollup@4.45.1) debug: 4.4.1 error-stack-parser-es: 0.1.5 fs-extra: 11.3.0 - open: 10.2.0 + open: 10.1.2 perfect-debounce: 1.0.0 picocolors: 1.1.1 sirv: 3.0.1 - vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) transitivePeerDependencies: - rollup - supports-color - vite-plugin-progress@0.0.7(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0)): + vite-plugin-progress@0.0.7(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)): dependencies: picocolors: 1.1.1 progress: 2.0.3 rd: 2.0.1 - vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) - vite-plugin-svg-icons@2.0.1(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0)): + vite-plugin-svg-icons@2.0.1(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)): dependencies: '@types/svgo': 2.6.4 cors: 2.8.5 @@ -8052,27 +8054,27 @@ snapshots: pathe: 0.2.0 svg-baker: 1.7.0 svgo: 2.8.0 - vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) transitivePeerDependencies: - supports-color - vite-plugin-vue-devtools@7.7.7(rollup@4.45.1)(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)): + vite-plugin-vue-devtools@7.7.7(rollup@4.45.1)(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)): dependencies: - '@vue/devtools-core': 7.7.7(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) + '@vue/devtools-core': 7.7.7(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) '@vue/devtools-kit': 7.7.7 '@vue/devtools-shared': 7.7.7 execa: 9.6.0 sirv: 3.0.1 - vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0) - vite-plugin-inspect: 0.8.9(rollup@4.45.1)(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0)) - vite-plugin-vue-inspector: 5.3.2(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0)) + vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) + vite-plugin-inspect: 0.8.9(rollup@4.45.1)(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) + vite-plugin-vue-inspector: 5.3.2(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) transitivePeerDependencies: - '@nuxt/kit' - rollup - supports-color - vue - vite-plugin-vue-inspector@5.3.2(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0)): + vite-plugin-vue-inspector@5.3.2(vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)): dependencies: '@babel/core': 7.28.0 '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.0) @@ -8083,11 +8085,11 @@ snapshots: '@vue/compiler-dom': 3.5.17 kolorist: 1.8.0 magic-string: 0.30.17 - vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) transitivePeerDependencies: - supports-color - vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(tsx@4.20.3)(yaml@2.8.0): + vite@7.0.5(@types/node@24.0.15)(jiti@2.4.2)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0): dependencies: esbuild: 0.25.7 fdir: 6.4.6(picomatch@4.0.3) @@ -8100,6 +8102,7 @@ snapshots: fsevents: 2.3.3 jiti: 2.4.2 sass: 1.89.2 + terser: 5.43.1 tsx: 4.20.3 yaml: 2.8.0 @@ -8173,8 +8176,6 @@ snapshots: vooks: 0.2.12(vue@3.5.17(typescript@5.8.3)) vue: 3.5.17(typescript@5.8.3) - webpack-sources@3.3.3: {} - webpack-virtual-modules@0.6.2: {} which-boxed-primitive@1.1.1: @@ -8236,10 +8237,6 @@ snapshots: string-width: 5.1.2 strip-ansi: 7.1.0 - wsl-utils@0.1.0: - dependencies: - is-wsl: 3.1.0 - xml-name-validator@4.0.0: {} y18n@5.0.8: {} diff --git a/src/router/_generated/imports.ts b/src/router/_generated/imports.ts new file mode 100644 index 00000000..860640a4 --- /dev/null +++ b/src/router/_generated/imports.ts @@ -0,0 +1,31 @@ +/* eslint-disable */ +/* prettier-ignore */ +/* oxlint-disable */ +// biome-ignore lint: disable +// Generated by elegant-router +// Read more: https://github.com/soybeanjs/elegant-router + +import type { RouteFileKey, RouteLayoutKey, RawRouteComponent } from "@elegant-router/types"; + +export const layouts: Record = { + base: () => import("@/layouts/base-layout/index.vue"), + blank: () => import("@/layouts/blank-layout/index.vue"), +}; + +export const views: Record = { + 403: () => import("@/views/(builtin)/403/index.vue"), + 404: () => import("@/views/(builtin)/404/index.vue"), + 500: () => import("@/views/(builtin)/500/index.vue"), + Home: () => import("@/views/home/index.vue"), + IframeUrl: () => import("@/views/(builtin)/iframe/[url].vue"), + Login: () => import("@/views/(builtin)/login/index.vue"), + ManageApi: () => import("@/views/manage/api/index.vue"), + ManageDictionary: () => import("@/views/manage/dictionary/index.vue"), + ManageMenu: () => import("@/views/manage/menu/index.vue"), + ManageOrganization: () => import("@/views/manage/organization/index.vue"), + ManagePermission: () => import("@/views/manage/permission/index.vue"), + ManageRole: () => import("@/views/manage/role/index.vue"), + ManageRoute: () => import("@/views/manage/route/index.vue"), + ManageUser: () => import("@/views/manage/user/index.vue"), + Wip: () => import("@/views/(builtin)/wip/index.vue"), +}; diff --git a/src/router/_generated/routes.ts b/src/router/_generated/routes.ts new file mode 100644 index 00000000..d0c94c81 --- /dev/null +++ b/src/router/_generated/routes.ts @@ -0,0 +1,283 @@ +/* eslint-disable */ +/* prettier-ignore */ +// biome-ignore lint: disable +// Generated by elegant-router +// Read more: https://github.com/soybeanjs/elegant-router + +import type { AutoRouterRoute } from '@elegant-router/types'; + +export const routes: AutoRouterRoute[] = [ + { + name: 'Root', + path: '/', + redirect: '/home', + meta: { + title: "Root" + }, + }, + { + name: 'NotFound', + path: '/:pathMatch(.*)*', + layout: 'base', + component: '404', + meta: { + title: "NotFound" + }, + }, + { + name: '403', + path: '/403', + layout: 'base', + component: '403', + meta: { + title: "403", + constant: true + }, + }, + { + name: '404', + path: '/404', + layout: 'base', + component: '404', + meta: { + title: "404", + constant: true + }, + }, + { + name: '500', + path: '/500', + layout: 'base', + component: '500', + meta: { + title: "500", + constant: true + }, + }, + { + name: 'DocumentAlova', + path: '/document/alova', + layout: 'base', + component: 'Wip', + meta: { + title: "DocumentAlova" + }, + }, + { + name: 'DocumentAntd', + path: '/document/antd', + layout: 'base', + component: 'Wip', + meta: { + title: "DocumentAntd" + }, + }, + { + name: 'DocumentNaive', + path: '/document/naive', + layout: 'base', + component: 'Wip', + meta: { + title: "DocumentNaive" + }, + }, + { + name: 'DocumentProject', + path: '/document/project', + layout: 'base', + component: 'Wip', + meta: { + title: "DocumentProject" + }, + }, + { + name: 'DocumentProjectLink', + path: '/document/project-link', + layout: 'base', + component: 'Wip', + meta: { + title: "DocumentProjectLink" + }, + }, + { + name: 'DocumentProNaive', + path: '/document/pro-naive', + layout: 'base', + component: 'Wip', + meta: { + title: "DocumentProNaive" + }, + }, + { + name: 'DocumentUnocss', + path: '/document/unocss', + layout: 'base', + component: 'Wip', + meta: { + title: "DocumentUnocss" + }, + }, + { + name: 'DocumentVideo', + path: '/document/video', + layout: 'base', + component: 'Wip', + meta: { + title: "DocumentVideo" + }, + }, + { + name: 'DocumentVite', + path: '/document/vite', + layout: 'base', + component: 'Wip', + meta: { + title: "DocumentVite" + }, + }, + { + name: 'DocumentVue', + path: '/document/vue', + layout: 'base', + component: 'Wip', + meta: { + title: "DocumentVue" + }, + }, + { + name: 'Exception403', + path: '/exception/403', + layout: 'base', + component: 'Wip', + meta: { + title: "Exception403" + }, + }, + { + name: 'Exception404', + path: '/exception/404', + layout: 'base', + component: 'Wip', + meta: { + title: "Exception404" + }, + }, + { + name: 'Exception500', + path: '/exception/500', + layout: 'base', + component: 'Wip', + meta: { + title: "Exception500" + }, + }, + { + name: 'Home', + path: '/home', + layout: 'base', + component: 'Home', + meta: { + title: "Home" + }, + }, + { + name: 'IframeUrl', + path: '/iframe/:url', + layout: 'base', + component: 'IframeUrl', + meta: { + title: "IframeUrl" + } + }, + { + name: 'Login', + path: '/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?', + layout: 'base', + component: 'Login', + meta: { + title: "Login", + constant: true + }, + }, + { + name: 'ManageApi', + path: '/manage/api', + layout: 'base', + component: 'ManageApi', + meta: { + title: "ManageApi" + } + }, + { + name: 'ManageDictionary', + path: '/manage/dictionary', + layout: 'base', + component: 'ManageDictionary', + meta: { + title: "ManageDictionary" + } + }, + { + name: 'ManageMenu', + path: '/manage/menu', + layout: 'base', + component: 'ManageMenu', + meta: { + title: "ManageMenu" + }, + }, + { + name: 'ManageOrganization', + path: '/manage/organization', + layout: 'base', + component: 'ManageOrganization', + meta: { + title: "ManageOrganization" + } + }, + { + name: 'ManagePermission', + path: '/manage/permission', + layout: 'base', + component: 'ManagePermission', + meta: { + title: "ManagePermission" + } + }, + { + name: 'ManageRole', + path: '/manage/role', + layout: 'base', + component: 'ManageRole', + meta: { + title: "ManageRole" + }, + }, + { + name: 'ManageRoute', + path: '/manage/route', + layout: 'base', + component: 'ManageRoute', + meta: { + title: "ManageRoute" + } + }, + { + name: 'ManageUser', + path: '/manage/user', + layout: 'base', + component: 'ManageUser', + meta: { + title: "ManageUser" + }, + }, + { + name: 'Wip', + path: '/wip', + layout: 'base', + component: 'Wip', + meta: { + title: "Wip" + } + } +]; diff --git a/src/router/_generated/shared.ts b/src/router/_generated/shared.ts new file mode 100644 index 00000000..014af18e --- /dev/null +++ b/src/router/_generated/shared.ts @@ -0,0 +1,45 @@ +/* eslint-disable */ +/* prettier-ignore */ +/* oxlint-disable */ +// biome-ignore lint: disable +// Generated by elegant-router +// Read more: https://github.com/soybeanjs/elegant-router + +import type { RouteKey, RoutePathMap } from '@elegant-router/types'; + +const routePathMap: RoutePathMap = { + "Root": "/", + "NotFound": "/:pathMatch(.*)*", + "403": "/403", + "404": "/404", + "500": "/500", + "DocumentAlova": "/document/alova", + "DocumentAntd": "/document/antd", + "DocumentNaive": "/document/naive", + "DocumentProject": "/document/project", + "DocumentProjectLink": "/document/project-link", + "DocumentProNaive": "/document/pro-naive", + "DocumentUnocss": "/document/unocss", + "DocumentVideo": "/document/video", + "DocumentVite": "/document/vite", + "DocumentVue": "/document/vue", + "Exception403": "/exception/403", + "Exception404": "/exception/404", + "Exception500": "/exception/500", + "Home": "/home", + "IframeUrl": "/iframe/:url", + "Login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?", + "ManageApi": "/manage/api", + "ManageDictionary": "/manage/dictionary", + "ManageMenu": "/manage/menu", + "ManageOrganization": "/manage/organization", + "ManagePermission": "/manage/permission", + "ManageRole": "/manage/role", + "ManageRoute": "/manage/route", + "ManageUser": "/manage/user", + "Wip": "/wip", +}; + +export function getRoutePath(key: RouteKey) { + return routePathMap[key]; +} diff --git a/src/router/_generated/transformer.ts b/src/router/_generated/transformer.ts new file mode 100644 index 00000000..257c99c8 --- /dev/null +++ b/src/router/_generated/transformer.ts @@ -0,0 +1,70 @@ +/* eslint-disable */ +/* prettier-ignore */ +/* oxlint-disable */ +// biome-ignore lint: disable +// Generated by elegant-router +// Read more: https://github.com/soybeanjs/elegant-router + +import type { RouteRecordRaw } from 'vue-router'; +import type { + AutoRouterRedirect, + AutoRouterRoute, + AutoRouterSingleView, + RawRouteComponent, + RouteFileKey, + RouteLayoutKey +} from '@elegant-router/types'; + +export function transformToVueRoutes( + routes: AutoRouterRoute[], + layouts: Record, + views: Record +) { + const { redirects, groupedRoutes } = getFormattedRoutes(routes); + + const vueRoutes: RouteRecordRaw[] = [...redirects]; + + groupedRoutes.forEach((items, layout) => { + const layoutRoute: RouteRecordRaw = { + path: `/${layout}-layout`, + component: layouts[layout], + children: items.map(item => { + const { layout: _, component, ...rest } = item; + + return { + component: views[component], + ...rest + }; + }) + }; + + vueRoutes.push(layoutRoute); + }); + + return vueRoutes; +} + +function getFormattedRoutes(routes: AutoRouterRoute[]) { + const groupedRoutes = new Map(); + const redirects: AutoRouterRedirect[] = []; + + routes.forEach(route => { + if (isAutoRouterRedirect(route)) { + redirects.push(route); + return; + } + + const items = groupedRoutes.get(route.layout) || []; + items.push(route); + groupedRoutes.set(route.layout, items); + }); + + return { + redirects, + groupedRoutes + }; +} + +function isAutoRouterRedirect(route: AutoRouterRoute): route is AutoRouterRedirect { + return 'redirect' in route; +} diff --git a/src/router/elegant/imports.ts b/src/router/elegant/imports.ts deleted file mode 100644 index ce1b9d7d..00000000 --- a/src/router/elegant/imports.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* eslint-disable */ -/* prettier-ignore */ -// Generated by elegant-router -// Read more: https://github.com/soybeanjs/elegant-router - -import type { RouteComponent } from "vue-router"; -import type { LastLevelRouteKey, RouteLayout } from "@elegant-router/types"; - -import BaseLayout from "@/layouts/base-layout/index.vue"; -import BlankLayout from "@/layouts/blank-layout/index.vue"; - -export const layouts: Record Promise)> = { - base: BaseLayout, - blank: BlankLayout, -}; - -export const views: Record Promise)> = { - 403: () => import("@/views/_builtin/403/index.vue"), - 404: () => import("@/views/_builtin/404/index.vue"), - 500: () => import("@/views/_builtin/500/index.vue"), - "iframe-page": () => import("@/views/_builtin/iframe-page/[url].vue"), - login: () => import("@/views/_builtin/login/index.vue"), - home: () => import("@/views/home/index.vue"), -}; diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts deleted file mode 100644 index 9566e125..00000000 --- a/src/router/elegant/routes.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* eslint-disable */ -/* prettier-ignore */ -// Generated by elegant-router -// Read more: https://github.com/soybeanjs/elegant-router - -import type { GeneratedRoute } from '@elegant-router/types'; - -export const generatedRoutes: GeneratedRoute[] = [ - { - name: '403', - path: '/403', - component: 'layout.blank$view.403', - meta: { - title: '403', - i18nKey: 'route.403', - constant: true, - hideInMenu: true - } - }, - { - name: '404', - path: '/404', - component: 'layout.blank$view.404', - meta: { - title: '404', - i18nKey: 'route.404', - constant: true, - hideInMenu: true - } - }, - { - name: '500', - path: '/500', - component: 'layout.blank$view.500', - meta: { - title: '500', - i18nKey: 'route.500', - constant: true, - hideInMenu: true - } - }, - { - name: 'home', - path: '/home', - component: 'layout.base$view.home', - meta: { - title: 'home', - i18nKey: 'route.home', - icon: 'mdi:monitor-dashboard', - order: 1 - } - }, - { - name: 'iframe-page', - path: '/iframe-page/:url', - component: 'layout.base$view.iframe-page', - props: true, - meta: { - title: 'iframe-page', - i18nKey: 'route.iframe-page', - constant: true, - hideInMenu: true, - keepAlive: true - } - }, - { - name: 'login', - path: '/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?', - component: 'layout.blank$view.login', - props: true, - meta: { - title: 'login', - i18nKey: 'route.login', - constant: true, - hideInMenu: true - } - } -]; diff --git a/src/router/elegant/transform.ts b/src/router/elegant/transform.ts deleted file mode 100644 index ba892572..00000000 --- a/src/router/elegant/transform.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* eslint-disable */ -/* prettier-ignore */ -// Generated by elegant-router -// Read more: https://github.com/soybeanjs/elegant-router - -import type { RouteRecordRaw, RouteComponent } from 'vue-router'; -import type { ElegantConstRoute } from '@elegant-router/vue'; -import type { RouteMap, RouteKey, RoutePath } from '@elegant-router/types'; - -/** - * transform elegant const routes to vue routes - * @param routes elegant const routes - * @param layouts layout components - * @param views view components - */ -export function transformElegantRoutesToVueRoutes( - routes: ElegantConstRoute[], - layouts: Record Promise)>, - views: Record Promise)> -) { - return routes.flatMap(route => transformElegantRouteToVueRoute(route, layouts, views)); -} - -/** - * transform elegant route to vue route - * @param route elegant const route - * @param layouts layout components - * @param views view components - */ -function transformElegantRouteToVueRoute( - route: ElegantConstRoute, - layouts: Record Promise)>, - views: Record Promise)> -) { - const LAYOUT_PREFIX = 'layout.'; - const VIEW_PREFIX = 'view.'; - const ROUTE_DEGREE_SPLITTER = '_'; - const FIRST_LEVEL_ROUTE_COMPONENT_SPLIT = '$'; - - function isLayout(component: string) { - return component.startsWith(LAYOUT_PREFIX); - } - - function getLayoutName(component: string) { - const layout = component.replace(LAYOUT_PREFIX, ''); - - if(!layouts[layout]) { - throw new Error(`Layout component "${layout}" not found`); - } - - return layout; - } - - function isView(component: string) { - return component.startsWith(VIEW_PREFIX); - } - - function getViewName(component: string) { - const view = component.replace(VIEW_PREFIX, ''); - - if(!views[view]) { - throw new Error(`View component "${view}" not found`); - } - - return view; - } - - function isFirstLevelRoute(item: ElegantConstRoute) { - return !item.name.includes(ROUTE_DEGREE_SPLITTER); - } - - function isSingleLevelRoute(item: ElegantConstRoute) { - return isFirstLevelRoute(item) && !item.children?.length; - } - - function getSingleLevelRouteComponent(component: string) { - const [layout, view] = component.split(FIRST_LEVEL_ROUTE_COMPONENT_SPLIT); - - return { - layout: getLayoutName(layout), - view: getViewName(view) - }; - } - - const vueRoutes: RouteRecordRaw[] = []; - - // add props: true to route - if (route.path.includes(':') && !route.props) { - route.props = true; - } - - const { name, path, component, children, ...rest } = route; - - const vueRoute = { name, path, ...rest } as RouteRecordRaw; - - try { - if (component) { - if (isSingleLevelRoute(route)) { - const { layout, view } = getSingleLevelRouteComponent(component); - - const singleLevelRoute: RouteRecordRaw = { - path, - component: layouts[layout], - meta: { - title: route.meta?.title || '' - }, - children: [ - { - name, - path: '', - component: views[view], - ...rest - } as RouteRecordRaw - ] - }; - - return [singleLevelRoute]; - } - - if (isLayout(component)) { - const layoutName = getLayoutName(component); - - vueRoute.component = layouts[layoutName]; - } - - if (isView(component)) { - const viewName = getViewName(component); - - vueRoute.component = views[viewName]; - } - - } - } catch (error: any) { - console.error(`Error transforming route "${route.name}": ${error.toString()}`); - return []; - } - - // add redirect to child - if (children?.length && !vueRoute.redirect) { - vueRoute.redirect = { - name: children[0].name - }; - } - - if (children?.length) { - const childRoutes = children.flatMap(child => transformElegantRouteToVueRoute(child, layouts, views)); - - if(isFirstLevelRoute(route)) { - vueRoute.children = childRoutes; - } else { - vueRoutes.push(...childRoutes); - } - } - - vueRoutes.unshift(vueRoute); - - return vueRoutes; -} - -/** - * map of route name and route path - */ -const routeMap: RouteMap = { - "root": "/", - "not-found": "/:pathMatch(.*)*", - "403": "/403", - "404": "/404", - "500": "/500", - "home": "/home", - "iframe-page": "/iframe-page/:url", - "login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?" -}; - -/** - * get route path by route name - * @param name route name - */ -export function getRoutePath(name: T) { - return routeMap[name]; -} - -/** - * get route name by route path - * @param path route path - */ -export function getRouteName(path: RoutePath) { - const routeEntries = Object.entries(routeMap) as [RouteKey, RoutePath][]; - - const routeName: RouteKey | null = routeEntries.find(([, routePath]) => routePath === path)?.[0] || null; - - return routeName; -} diff --git a/src/typings/elegant-router.d.ts b/src/typings/elegant-router.d.ts index 63025132..5f9b6afe 100644 --- a/src/typings/elegant-router.d.ts +++ b/src/typings/elegant-router.d.ts @@ -1,240 +1,132 @@ /* eslint-disable */ /* prettier-ignore */ +/* oxlint-disable */ +// biome-ignore lint: disable // Generated by elegant-router // Read more: https://github.com/soybeanjs/elegant-router declare module "@elegant-router/types" { - type ElegantConstRoute = import('@elegant-router/vue').ElegantConstRoute; + type RouteRecordSingleView = import("vue-router").RouteRecordSingleView; + type RouteRecordRedirect = import("vue-router").RouteRecordRedirect; + type RouteComponent = import("vue-router").RouteComponent; + + type Lazy = () => Promise; + + export type RawRouteComponent = RouteComponent | Lazy; /** - * route layout + * route layout key */ - export type RouteLayout = "base" | "blank"; + export type RouteLayoutKey = "base" | "blank"; /** - * route map + * route path map */ - export type RouteMap = { - "root": "/"; - "not-found": "/:pathMatch(.*)*"; + export type RoutePathMap = { + "Root": "/"; + "NotFound": "/:pathMatch(.*)*"; "403": "/403"; "404": "/404"; "500": "/500"; - "home": "/home"; - "iframe-page": "/iframe-page/:url"; - "login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?"; + "DocumentAlova": "/document/alova"; + "DocumentAntd": "/document/antd"; + "DocumentNaive": "/document/naive"; + "DocumentProject": "/document/project"; + "DocumentProjectLink": "/document/project-link"; + "DocumentProNaive": "/document/pro-naive"; + "DocumentUnocss": "/document/unocss"; + "DocumentVideo": "/document/video"; + "DocumentVite": "/document/vite"; + "DocumentVue": "/document/vue"; + "Exception403": "/exception/403"; + "Exception404": "/exception/404"; + "Exception500": "/exception/500"; + "Home": "/home"; + "IframeUrl": "/iframe/:url"; + "Login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?"; + "ManageApi": "/manage/api"; + "ManageDictionary": "/manage/dictionary"; + "ManageMenu": "/manage/menu"; + "ManageOrganization": "/manage/organization"; + "ManagePermission": "/manage/permission"; + "ManageRole": "/manage/role"; + "ManageRoute": "/manage/route"; + "ManageUser": "/manage/user"; + "Wip": "/wip"; }; /** * route key */ - export type RouteKey = keyof RouteMap; + export type RouteKey = keyof RoutePathMap; /** * route path */ - export type RoutePath = RouteMap[RouteKey]; + export type RoutePath = RoutePathMap[RouteKey]; /** - * custom route key + * root route key */ - export type CustomRouteKey = Extract< + export type RootRouteKey = 'Root'; + + /** + * not found route key + */ + export type NotFoundRouteKey = 'NotFound'; + + /** + * builtin route key + */ + export type BuiltinRouteKey = RootRouteKey | NotFoundRouteKey; + + /** + * reuse route key + */ + export type ReuseRouteKey = Extract< RouteKey, - | "root" - | "not-found" + | "DocumentAlova" + | "DocumentAntd" + | "DocumentNaive" + | "DocumentProject" + | "DocumentProjectLink" + | "DocumentProNaive" + | "DocumentUnocss" + | "DocumentVideo" + | "DocumentVite" + | "DocumentVue" + | "Exception403" + | "Exception404" + | "Exception500" >; /** - * the generated route key + * the route file key, which has it's own file */ - export type GeneratedRouteKey = Exclude; + export type RouteFileKey = Exclude; /** - * the first level route key, which contain the layout of the route + * mapped name and path */ - export type FirstLevelRouteKey = Extract< - RouteKey, - | "403" - | "404" - | "500" - | "home" - | "iframe-page" - | "login" - >; + type MappedNamePath = { + [K in RouteKey]: { name: K; path: RoutePathMap[K] }; + }[RouteKey]; /** - * the custom first level route key + * auto router single view */ - export type CustomFirstLevelRouteKey = Extract< - CustomRouteKey, - | "root" - | "not-found" - >; + export type AutoRouterSingleView = Omit & { + component: RouteFileKey; + layout: RouteLayoutKey; + } & MappedNamePath; /** - * the last level route key, which has the page file + * auto router redirect */ - export type LastLevelRouteKey = Extract< - RouteKey, - | "403" - | "404" - | "500" - | "iframe-page" - | "login" - | "home" - >; + export type AutoRouterRedirect = Omit & MappedNamePath; /** - * the custom last level route key + * auto router route */ - export type CustomLastLevelRouteKey = Extract< - CustomRouteKey, - | "root" - | "not-found" - >; - - /** - * the single level route key - */ - export type SingleLevelRouteKey = FirstLevelRouteKey & LastLevelRouteKey; - - /** - * the custom single level route key - */ - export type CustomSingleLevelRouteKey = CustomFirstLevelRouteKey & CustomLastLevelRouteKey; - - /** - * the first level route key, but not the single level - */ - export type FirstLevelRouteNotSingleKey = Exclude; - - /** - * the custom first level route key, but not the single level - */ - export type CustomFirstLevelRouteNotSingleKey = Exclude; - - /** - * the center level route key - */ - export type CenterLevelRouteKey = Exclude; - - /** - * the custom center level route key - */ - export type CustomCenterLevelRouteKey = Exclude; - - /** - * the center level route key - */ - type GetChildRouteKey = T extends `${K}_${infer R}` - ? R extends `${string}_${string}` - ? never - : T - : never; - - /** - * the single level route - */ - type SingleLevelRoute = K extends string - ? Omit & { - name: K; - path: RouteMap[K]; - component: `layout.${RouteLayout}$view.${K}`; - } - : never; - - /** - * the last level route - */ - type LastLevelRoute = K extends LastLevelRouteKey - ? Omit & { - name: K; - path: RouteMap[K]; - component: `view.${K}`; - } - : never; - - /** - * the center level route - */ - type CenterLevelRoute = K extends CenterLevelRouteKey - ? Omit & { - name: K; - path: RouteMap[K]; - children: (CenterLevelRoute> | LastLevelRoute>)[]; - } - : never; - - /** - * the multi level route - */ - type MultiLevelRoute = K extends string - ? ElegantConstRoute & { - name: K; - path: RouteMap[K]; - component: `layout.${RouteLayout}`; - children: (CenterLevelRoute> | LastLevelRoute>)[]; - } - : never; - - /** - * the custom first level route - */ - type CustomSingleLevelRoute = K extends string - ? Omit & { - name: K; - path: RouteMap[K]; - component?: `layout.${RouteLayout}$view.${LastLevelRouteKey}`; - } - : never; - - /** - * the custom last level route - */ - type CustomLastLevelRoute = K extends CustomLastLevelRouteKey - ? Omit & { - name: K; - path: RouteMap[K]; - component?: `view.${LastLevelRouteKey}`; - } - : never; - - /** - * the custom center level route - */ - type CustomCenterLevelRoute = K extends CustomCenterLevelRouteKey - ? Omit & { - name: K; - path: RouteMap[K]; - children: (CustomCenterLevelRoute> | CustomLastLevelRoute>)[]; - } - : never; - - /** - * the custom multi level route - */ - type CustomMultiLevelRoute = - K extends string - ? ElegantConstRoute & { - name: K; - path: RouteMap[K]; - component: `layout.${RouteLayout}`; - children: (CustomCenterLevelRoute> | CustomLastLevelRoute>)[]; - } - : never; - - /** - * the custom route - */ - type CustomRoute = CustomSingleLevelRoute | CustomMultiLevelRoute; - - /** - * the generated route - */ - type GeneratedRoute = SingleLevelRoute | MultiLevelRoute; - - /** - * the elegant route - */ - type ElegantRoute = GeneratedRoute | CustomRoute; + export type AutoRouterRoute = AutoRouterSingleView | AutoRouterRedirect; } diff --git a/src/typings/router.d.ts b/src/typings/router.d.ts index 256e646a..ca3338ed 100644 --- a/src/typings/router.d.ts +++ b/src/typings/router.d.ts @@ -1,7 +1,7 @@ -import 'vue-router'; +export {}; declare module 'vue-router' { - interface RouteMeta { + export interface RouteMeta { /** * Title of the route * diff --git a/src/typings/typed-router.d.ts b/src/typings/typed-router.d.ts new file mode 100644 index 00000000..7056e216 --- /dev/null +++ b/src/typings/typed-router.d.ts @@ -0,0 +1,57 @@ +/* eslint-disable */ +// @ts-nocheck +/* prettier-ignore */ +/* oxlint-disable */ +// biome-ignore lint: disable +// Generated by elegant-router +// Read more: https://github.com/soybeanjs/elegant-router + +export {} + +declare module "vue-router" { + type RouteNamedMap = import("vue-router/auto-routes").RouteNamedMap; + + export interface TypesConfig { + RouteNamedMap: RouteNamedMap; + } +} + +declare module "vue-router/auto-routes" { + import type { RouteParamsRawGeneric, RouteParamsGeneric, RouteMeta, RouteRecordInfo, ParamValue, ParamValueZeroOrOne } from "vue-router"; + + /** + * route named map + */ + export interface RouteNamedMap { + "Root": RouteRecordInfo<"Root", "/", Record, Record>; + "NotFound": RouteRecordInfo<"NotFound", "/:pathMatch(.*)*", Record, Record>; + "403": RouteRecordInfo<"403", "/403", Record, Record>; + "404": RouteRecordInfo<"404", "/404", Record, Record>; + "500": RouteRecordInfo<"500", "/500", Record, Record>; + "DocumentAlova": RouteRecordInfo<"DocumentAlova", "/document/alova", Record, Record>; + "DocumentAntd": RouteRecordInfo<"DocumentAntd", "/document/antd", Record, Record>; + "DocumentNaive": RouteRecordInfo<"DocumentNaive", "/document/naive", Record, Record>; + "DocumentProject": RouteRecordInfo<"DocumentProject", "/document/project", Record, Record>; + "DocumentProjectLink": RouteRecordInfo<"DocumentProjectLink", "/document/project-link", Record, Record>; + "DocumentProNaive": RouteRecordInfo<"DocumentProNaive", "/document/pro-naive", Record, Record>; + "DocumentUnocss": RouteRecordInfo<"DocumentUnocss", "/document/unocss", Record, Record>; + "DocumentVideo": RouteRecordInfo<"DocumentVideo", "/document/video", Record, Record>; + "DocumentVite": RouteRecordInfo<"DocumentVite", "/document/vite", Record, Record>; + "DocumentVue": RouteRecordInfo<"DocumentVue", "/document/vue", Record, Record>; + "Exception403": RouteRecordInfo<"Exception403", "/exception/403", Record, Record>; + "Exception404": RouteRecordInfo<"Exception404", "/exception/404", Record, Record>; + "Exception500": RouteRecordInfo<"Exception500", "/exception/500", Record, Record>; + "Home": RouteRecordInfo<"Home", "/home", Record, Record>; + "IframeUrl": RouteRecordInfo<"IframeUrl", "/iframe/:url", { url: ParamValue }, { url: ParamValue }>; + "Login": RouteRecordInfo<"Login", "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?", { module?: ParamValueZeroOrOne }, { module?: ParamValueZeroOrOne }>; + "ManageApi": RouteRecordInfo<"ManageApi", "/manage/api", Record, Record>; + "ManageDictionary": RouteRecordInfo<"ManageDictionary", "/manage/dictionary", Record, Record>; + "ManageMenu": RouteRecordInfo<"ManageMenu", "/manage/menu", Record, Record>; + "ManageOrganization": RouteRecordInfo<"ManageOrganization", "/manage/organization", Record, Record>; + "ManagePermission": RouteRecordInfo<"ManagePermission", "/manage/permission", Record, Record>; + "ManageRole": RouteRecordInfo<"ManageRole", "/manage/role", Record, Record>; + "ManageRoute": RouteRecordInfo<"ManageRoute", "/manage/route", Record, Record>; + "ManageUser": RouteRecordInfo<"ManageUser", "/manage/user", Record, Record>; + "Wip": RouteRecordInfo<"Wip", "/wip", Record, Record> + } +} diff --git a/src/views/_builtin/403/index.vue b/src/views/(builtin)/403/index.vue similarity index 100% rename from src/views/_builtin/403/index.vue rename to src/views/(builtin)/403/index.vue diff --git a/src/views/_builtin/404/index.vue b/src/views/(builtin)/404/index.vue similarity index 100% rename from src/views/_builtin/404/index.vue rename to src/views/(builtin)/404/index.vue diff --git a/src/views/_builtin/500/index.vue b/src/views/(builtin)/500/index.vue similarity index 100% rename from src/views/_builtin/500/index.vue rename to src/views/(builtin)/500/index.vue diff --git a/src/views/_builtin/iframe-page/[url].vue b/src/views/(builtin)/iframe/[url].vue similarity index 100% rename from src/views/_builtin/iframe-page/[url].vue rename to src/views/(builtin)/iframe/[url].vue diff --git a/src/views/_builtin/login/index.vue b/src/views/(builtin)/login/index.vue similarity index 100% rename from src/views/_builtin/login/index.vue rename to src/views/(builtin)/login/index.vue diff --git a/src/views/_builtin/login/modules/bind-wechat.vue b/src/views/(builtin)/login/modules/bind-wechat.vue similarity index 100% rename from src/views/_builtin/login/modules/bind-wechat.vue rename to src/views/(builtin)/login/modules/bind-wechat.vue diff --git a/src/views/_builtin/login/modules/code-login.vue b/src/views/(builtin)/login/modules/code-login.vue similarity index 100% rename from src/views/_builtin/login/modules/code-login.vue rename to src/views/(builtin)/login/modules/code-login.vue diff --git a/src/views/_builtin/login/modules/pwd-login.vue b/src/views/(builtin)/login/modules/pwd-login.vue similarity index 100% rename from src/views/_builtin/login/modules/pwd-login.vue rename to src/views/(builtin)/login/modules/pwd-login.vue diff --git a/src/views/_builtin/login/modules/register.vue b/src/views/(builtin)/login/modules/register.vue similarity index 100% rename from src/views/_builtin/login/modules/register.vue rename to src/views/(builtin)/login/modules/register.vue diff --git a/src/views/_builtin/login/modules/reset-pwd.vue b/src/views/(builtin)/login/modules/reset-pwd.vue similarity index 100% rename from src/views/_builtin/login/modules/reset-pwd.vue rename to src/views/(builtin)/login/modules/reset-pwd.vue diff --git a/src/views/(builtin)/wip/index.vue b/src/views/(builtin)/wip/index.vue new file mode 100644 index 00000000..35f9fa32 --- /dev/null +++ b/src/views/(builtin)/wip/index.vue @@ -0,0 +1,5 @@ + + + diff --git a/src/views/manage/api/index.vue b/src/views/manage/api/index.vue new file mode 100644 index 00000000..82776d6c --- /dev/null +++ b/src/views/manage/api/index.vue @@ -0,0 +1,5 @@ + + + diff --git a/src/views/manage/dictionary/index.vue b/src/views/manage/dictionary/index.vue new file mode 100644 index 00000000..45fbbfa5 --- /dev/null +++ b/src/views/manage/dictionary/index.vue @@ -0,0 +1,5 @@ + + + diff --git a/src/views/manage/menu/index.vue b/src/views/manage/menu/index.vue new file mode 100644 index 00000000..ec308aaf --- /dev/null +++ b/src/views/manage/menu/index.vue @@ -0,0 +1,5 @@ + + + diff --git a/src/views/manage/organization/index.vue b/src/views/manage/organization/index.vue new file mode 100644 index 00000000..510f5335 --- /dev/null +++ b/src/views/manage/organization/index.vue @@ -0,0 +1,5 @@ + + + diff --git a/src/views/manage/permission/index.vue b/src/views/manage/permission/index.vue new file mode 100644 index 00000000..7b8bd624 --- /dev/null +++ b/src/views/manage/permission/index.vue @@ -0,0 +1,5 @@ + + + diff --git a/src/views/manage/role/index.vue b/src/views/manage/role/index.vue new file mode 100644 index 00000000..9932c3e0 --- /dev/null +++ b/src/views/manage/role/index.vue @@ -0,0 +1,5 @@ + + + diff --git a/src/views/manage/route/index.vue b/src/views/manage/route/index.vue new file mode 100644 index 00000000..13221c64 --- /dev/null +++ b/src/views/manage/route/index.vue @@ -0,0 +1,5 @@ + + + diff --git a/src/views/manage/user/index.vue b/src/views/manage/user/index.vue new file mode 100644 index 00000000..4eefa23a --- /dev/null +++ b/src/views/manage/user/index.vue @@ -0,0 +1,5 @@ + + +