From 2c3fb5418c0b4db8bff5fd0e97cf91726c30555f Mon Sep 17 00:00:00 2001 From: Sayiddd Date: Sun, 10 May 2026 05:42:31 +0700 Subject: [PATCH 1/9] Migrate to Vue Router 5 --- package.json | 1 - pnpm-lock.yaml | 294 ++++++++++++++++++++++++++---------------- pnpm-workspace.yaml | 3 +- src/auto-imports.d.ts | 5 +- src/components.d.ts | 5 + src/layouts/README.md | 2 +- src/pages/README.md | 2 +- src/route-map.d.ts | 125 ++++++++++++++++++ src/typed-router.d.ts | 27 ---- tsconfig.json | 7 +- vite.config.ts | 8 +- 11 files changed, 329 insertions(+), 150 deletions(-) create mode 100644 src/route-map.d.ts delete mode 100644 src/typed-router.d.ts diff --git a/package.json b/package.json index 9c5d932..c6cb8af 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "unplugin-auto-import": "catalog:build", "unplugin-vue-components": "catalog:build", "unplugin-vue-macros": "catalog:build", - "unplugin-vue-router": "catalog:build", "vite": "catalog:build", "vite-bundle-visualizer": "catalog:build", "vite-plugin-inspect": "catalog:build", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 025eb5a..b025fc3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,9 +36,6 @@ catalogs: unplugin-vue-macros: specifier: ^2.14.5 version: 2.14.5 - unplugin-vue-router: - specifier: ^0.12.0 - version: 0.12.0 vite-bundle-visualizer: specifier: ^1.2.1 version: 1.2.1 @@ -110,9 +107,6 @@ catalogs: vue-i18n: specifier: ^11.1.2 version: 11.3.0 - vue-router: - specifier: ^4.5.0 - version: 4.6.4 types: '@types/node': specifier: ^25.4.0 @@ -149,8 +143,8 @@ importers: specifier: catalog:frontend version: 11.3.0(vue@3.5.30(typescript@5.9.3)) vue-router: - specifier: catalog:frontend - version: 4.6.4(vue@3.5.30(typescript@5.9.3)) + specifier: ^5.0.6 + version: 5.0.6(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)) devDependencies: '@antfu/eslint-config': specifier: catalog:dev @@ -175,7 +169,7 @@ importers: version: 66.6.6(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) '@vitejs/plugin-vue': specifier: catalog:build - version: 5.2.4(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue@3.5.30(typescript@5.9.3)) + version: 5.2.4(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue@3.5.30(typescript@5.9.3)) '@vue-macros/volar': specifier: catalog:dev version: 3.1.2(typescript@5.9.3)(vue-tsc@2.2.12(typescript@5.9.3))(vue@3.5.30(typescript@5.9.3)) @@ -211,37 +205,34 @@ importers: version: 5.9.3 unocss: specifier: catalog:build - version: 66.6.6(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) + version: 66.6.6(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)) unplugin-auto-import: specifier: catalog:build version: 19.3.0(@vueuse/core@13.9.0(vue@3.5.30(typescript@5.9.3))) unplugin-vue-components: specifier: catalog:build - version: 28.8.0(@babel/parser@7.29.0)(vue@3.5.30(typescript@5.9.3)) + version: 28.8.0(@babel/parser@7.29.3)(vue@3.5.30(typescript@5.9.3)) unplugin-vue-macros: specifier: catalog:build - version: 2.14.5(@vueuse/core@13.9.0(vue@3.5.30(typescript@5.9.3)))(esbuild@0.25.12)(rollup@4.59.0)(typescript@5.9.3)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue-tsc@2.2.12(typescript@5.9.3))(vue@3.5.30(typescript@5.9.3)) - unplugin-vue-router: - specifier: catalog:build - version: 0.12.0(vue-router@4.6.4(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)) + version: 2.14.5(@vueuse/core@13.9.0(vue@3.5.30(typescript@5.9.3)))(esbuild@0.25.12)(rollup@4.59.0)(typescript@5.9.3)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue-tsc@2.2.12(typescript@5.9.3))(vue@3.5.30(typescript@5.9.3)) vite: specifier: ^6.2.3 - version: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) + version: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) vite-bundle-visualizer: specifier: catalog:build version: 1.2.1(rollup@4.59.0) vite-plugin-inspect: specifier: ^11.0.0 - version: 11.3.3(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) + version: 11.3.3(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)) vite-plugin-vue-devtools: specifier: catalog:build - version: 7.7.9(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue@3.5.30(typescript@5.9.3)) + version: 7.7.9(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue@3.5.30(typescript@5.9.3)) vite-plugin-vue-layouts: specifier: catalog:build - version: 0.11.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue-router@4.6.4(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)) + version: 0.11.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue-router@5.0.6(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)) vite-ssg: specifier: catalog:build - version: 26.1.1(beasties@0.2.0)(prettier@3.8.1)(unhead@2.1.12)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue-router@4.6.4(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)) + version: 26.1.1(beasties@0.2.0)(prettier@3.8.1)(unhead@2.1.12)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue-router@5.0.6(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)) vite-ssg-sitemap: specifier: catalog:build version: 0.8.1 @@ -401,6 +392,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.29.3': + resolution: {integrity: sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-proposal-decorators@7.29.0': resolution: {integrity: sha512-CVBVv3VY/XRMxRYq5dwr2DS7/MvqPm23cOCjbwNnVrfOqcWlnefua1uUs0sjdKOGjvPUG633o07uWzJq4oI6dA==} engines: {node: '>=6.9.0'} @@ -1802,6 +1798,9 @@ packages: '@vue/devtools-api@6.6.4': resolution: {integrity: sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==} + '@vue/devtools-api@8.1.2': + resolution: {integrity: sha512-vA0O112YqyDuNA1s7Yb2gCgToQ/OxOWiFDO5ThLCcDy0ldHnSd1dUTaSYhOldbqoNgumE4dxtGAoAaSUKUD1Zg==} + '@vue/devtools-core@7.7.9': resolution: {integrity: sha512-48jrBSwG4GVQRvVeeXn9p9+dlx+ISgasM7SxZZKczseohB0cBz+ITKr4YbLWjmJdy45UHL7UMPlR4Y0CWTRcSQ==} peerDependencies: @@ -1810,9 +1809,15 @@ packages: '@vue/devtools-kit@7.7.9': resolution: {integrity: sha512-PyQ6odHSgiDVd4hnTP+aDk2X4gl2HmLDfiyEnn3/oV+ckFDuswRs4IbBT7vacMuGdwY/XemxBoh302ctbsptuA==} + '@vue/devtools-kit@8.1.2': + resolution: {integrity: sha512-f75/upc+GCyjXErpgPGz4582ujS0L/adAltGy+tqXMGUJpgAcfGr6CxnnhpZY8BHuMYt6KpbF8uaFrrQG66rGQ==} + '@vue/devtools-shared@7.7.9': resolution: {integrity: sha512-iWAb0v2WYf0QWmxCGy0seZNDPdO3Sp5+u78ORnyeonS6MT4PC7VPrryX2BpMJrwlDeaZ6BD4vP4XKjK0SZqaeA==} + '@vue/devtools-shared@8.1.2': + resolution: {integrity: sha512-X9RyVFYAdkBe4IUf5v48TxBF/6QPmF8CmWrDAjXzfUHrgQ/HGfTC1A6TqgXqZ03ye66l3AD51BAGD69IvKM9sw==} + '@vue/language-core@2.1.10': resolution: {integrity: sha512-DAI289d0K3AB5TUG3xDp9OuQ71CnrujQwJrQnfuZDwo6eGNf0UoRlPuaVNO+Zrn65PC3j0oB2i7mNmVPggeGeQ==} peerDependencies: @@ -1888,6 +1893,9 @@ packages: ajv@6.14.0: resolution: {integrity: sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==} + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + alien-signals@0.2.2: resolution: {integrity: sha512-cZIRkbERILsBOXTQmMrxc9hgpxglstn69zm+F1ARf4aPAzdAFYd6sBq87ErO0Fj3DV94tglcyHG5kQz9nDC/8A==} @@ -1954,6 +1962,10 @@ packages: resolution: {integrity: sha512-1UWOyC50xI3QZkRuDj6PqDtpm1oHWtYs+NQGwqL/2R11eN3Q81PHAHPM0SWW3BNQm53UDwS//Jv8L4CCVLM1bQ==} engines: {node: '>=16.14.0'} + ast-walker-scope@0.8.3: + resolution: {integrity: sha512-cbdCP0PGOBq0ASG+sjnKIoYkWMKhhz+F/h9pRexUdX2Hd38+WOlBkRKlqkGOSm0YQpcFMQBJeK4WspUAkwsEdg==} + engines: {node: '>=20.19.0'} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -2071,10 +2083,6 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} - chokidar@4.0.3: - resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} - engines: {node: '>= 14.16.0'} - chokidar@5.0.0: resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} engines: {node: '>= 20.19.0'} @@ -3355,6 +3363,9 @@ packages: mlly@1.8.1: resolution: {integrity: sha512-SnL6sNutTwRWWR/vcmCYHSADjiEesp5TGQQ0pXyLhW5IoeibRlF/CbSLailbB3CNqJUk9cVJ9dUDnbD7GrcHBQ==} + mlly@1.8.2: + resolution: {integrity: sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==} + mrmime@2.0.1: resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} engines: {node: '>=10'} @@ -3574,6 +3585,10 @@ packages: resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} engines: {node: '>=12'} + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} + engines: {node: '>=12'} + pidtree@0.6.0: resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} engines: {node: '>=0.10'} @@ -3666,10 +3681,6 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} - readdirp@4.1.2: - resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} - engines: {node: '>= 14.18.0'} - readdirp@5.0.0: resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} engines: {node: '>= 20.19.0'} @@ -3785,6 +3796,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.8.0: + resolution: {integrity: sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==} + engines: {node: '>=10'} + hasBin: true + send@0.19.2: resolution: {integrity: sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==} engines: {node: '>= 0.8.0'} @@ -3972,6 +3988,10 @@ packages: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} + tinyglobby@0.2.16: + resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} + engines: {node: '>=12.0.0'} + tinypool@2.1.0: resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} engines: {node: ^20.0.0 || >=22.0.0} @@ -4053,6 +4073,9 @@ packages: ufo@1.6.3: resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==} + ufo@1.6.4: + resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} + uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} @@ -4182,15 +4205,6 @@ packages: peerDependencies: vue: ^2.7.0 || ^3.2.25 - unplugin-vue-router@0.12.0: - resolution: {integrity: sha512-xjgheKU0MegvXQcy62GVea0LjyOdMxN0/QH+ijN29W62ZlMhG7o7K+0AYqfpprvPwpWtuRjiyC5jnV2SxWye2w==} - deprecated: 'Merged into vuejs/router. Migrate: https://router.vuejs.org/guide/migration/v4-to-v5.html' - peerDependencies: - vue-router: ^4.4.0 - peerDependenciesMeta: - vue-router: - optional: true - unplugin@2.3.11: resolution: {integrity: sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==} engines: {node: '>=18.12.0'} @@ -4340,10 +4354,20 @@ packages: peerDependencies: vue: ^3.0.0 - vue-router@4.6.4: - resolution: {integrity: sha512-Hz9q5sa33Yhduglwz6g9skT8OBPii+4bFn88w6J+J4MfEo4KRRpmiNG/hHHkdbRFlLBOqxN8y8gf2Fb0MTUgVg==} + vue-router@5.0.6: + resolution: {integrity: sha512-9+kmUTGbKMyW9Asoy98IXXYIzrTMT7JDAdpDDeEkorHvybpUvBI2wsrSM5jFOXrFydpzRFJ9vAh+80DN2PGu9w==} peerDependencies: + '@pinia/colada': '>=0.21.2' + '@vue/compiler-sfc': ^3.5.17 + pinia: ^3.0.4 vue: ^3.5.0 + peerDependenciesMeta: + '@pinia/colada': + optional: true + '@vue/compiler-sfc': + optional: true + pinia: + optional: true vue-tsc@2.2.12: resolution: {integrity: sha512-P7OP77b2h/Pmk+lZdJ0YWs+5tJ6J2+uOQPo7tlBnY44QqQSPYvS0qVT4wqDJgwrZaLe47etJLLQRFia71GYITw==} @@ -4450,6 +4474,11 @@ packages: engines: {node: '>= 14.6'} hasBin: true + yaml@2.8.4: + resolution: {integrity: sha512-ml/JPOj9fOQK8RNnWojA67GbZ0ApXAUlN2UQclwv2eVgTgn7O9gg9o7paZWKMp4g0H3nTLtS9LVzhkpOFIKzog==} + engines: {node: '>= 14.6'} + hasBin: true + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -4667,6 +4696,10 @@ snapshots: dependencies: '@babel/types': 7.29.0 + '@babel/parser@7.29.3': + dependencies: + '@babel/types': 7.29.0 + '@babel/plugin-proposal-decorators@7.29.0(@babel/core@7.29.0)': dependencies: '@babel/core': 7.29.0 @@ -5485,11 +5518,11 @@ snapshots: '@typescript-eslint/parser': 8.57.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/typescript-estree': 8.57.0(typescript@5.9.3) '@typescript-eslint/utils': 8.57.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) - ajv: 6.14.0 + ajv: 6.15.0 eslint: 9.39.4(jiti@2.6.1) json-stable-stringify-without-jsonify: 1.0.1 lodash.merge: 4.6.2 - semver: 7.7.4 + semver: 7.8.0 transitivePeerDependencies: - supports-color - typescript @@ -5699,7 +5732,7 @@ snapshots: dependencies: '@unocss/core': 66.6.6 - '@unocss/vite@66.6.6(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))': + '@unocss/vite@66.6.6(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))': dependencies: '@jridgewell/remapping': 2.3.5 '@unocss/config': 66.6.6 @@ -5710,11 +5743,11 @@ snapshots: pathe: 2.0.3 tinyglobby: 0.2.15 unplugin-utils: 0.3.1 - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) - '@vitejs/plugin-vue@5.2.4(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue@3.5.30(typescript@5.9.3))': + '@vitejs/plugin-vue@5.2.4(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue@3.5.30(typescript@5.9.3))': dependencies: - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) vue: 3.5.30(typescript@5.9.3) '@vitest/eslint-plugin@1.6.10(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)': @@ -5880,12 +5913,12 @@ snapshots: transitivePeerDependencies: - vue - '@vue-macros/devtools@0.4.1(typescript@5.9.3)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))': + '@vue-macros/devtools@0.4.1(typescript@5.9.3)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))': dependencies: sirv: 3.0.2 vue: 3.5.30(typescript@5.9.3) optionalDependencies: - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) transitivePeerDependencies: - typescript @@ -6104,14 +6137,18 @@ snapshots: '@vue/devtools-api@6.6.4': {} - '@vue/devtools-core@7.7.9(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue@3.5.30(typescript@5.9.3))': + '@vue/devtools-api@8.1.2': + dependencies: + '@vue/devtools-kit': 8.1.2 + + '@vue/devtools-core@7.7.9(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue@3.5.30(typescript@5.9.3))': dependencies: '@vue/devtools-kit': 7.7.9 '@vue/devtools-shared': 7.7.9 mitt: 3.0.1 nanoid: 5.1.6 pathe: 2.0.3 - vite-hot-client: 2.1.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) + vite-hot-client: 2.1.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)) vue: 3.5.30(typescript@5.9.3) transitivePeerDependencies: - vite @@ -6126,10 +6163,19 @@ snapshots: speakingurl: 14.0.1 superjson: 2.2.6 + '@vue/devtools-kit@8.1.2': + dependencies: + '@vue/devtools-shared': 8.1.2 + birpc: 2.9.0 + hookable: 5.5.3 + perfect-debounce: 2.1.0 + '@vue/devtools-shared@7.7.9': dependencies: rfdc: 1.4.1 + '@vue/devtools-shared@8.1.2': {} + '@vue/language-core@2.1.10(typescript@5.9.3)': dependencies: '@volar/language-core': 2.4.28 @@ -6226,6 +6272,13 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + alien-signals@0.2.2: {} alien-signals@1.0.13: {} @@ -6278,6 +6331,11 @@ snapshots: '@babel/parser': 7.29.0 ast-kit: 1.4.3 + ast-walker-scope@0.8.3: + dependencies: + '@babel/parser': 7.29.3 + ast-kit: 2.2.0 + balanced-match@1.0.2: {} balanced-match@4.0.4: {} @@ -6405,10 +6463,6 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - chokidar@4.0.3: - dependencies: - readdirp: 4.1.2 - chokidar@5.0.0: dependencies: readdirp: 5.0.0 @@ -7121,6 +7175,10 @@ snapshots: optionalDependencies: picomatch: 4.0.3 + fdir@6.5.0(picomatch@4.0.4): + optionalDependencies: + picomatch: 4.0.4 + figures@6.1.0: dependencies: is-unicode-supported: 2.1.0 @@ -7976,6 +8034,13 @@ snapshots: pkg-types: 1.3.1 ufo: 1.6.3 + mlly@1.8.2: + dependencies: + acorn: 8.16.0 + pathe: 2.0.3 + pkg-types: 1.3.1 + ufo: 1.6.4 + mrmime@2.0.1: {} ms@2.0.0: {} @@ -8214,6 +8279,8 @@ snapshots: picomatch@4.0.3: {} + picomatch@4.0.4: {} + pidtree@0.6.0: {} pkg-types@1.3.1: @@ -8309,8 +8376,6 @@ snapshots: dependencies: picomatch: 2.3.1 - readdirp@4.1.2: {} - readdirp@5.0.0: {} refa@0.12.1: @@ -8427,6 +8492,8 @@ snapshots: semver@7.7.4: {} + semver@7.8.0: {} + send@0.19.2: dependencies: debug: 2.6.9 @@ -8663,6 +8730,11 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 + tinyglobby@0.2.16: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + tinypool@2.1.0: {} tldts-core@6.1.86: {} @@ -8729,6 +8801,8 @@ snapshots: ufo@1.6.3: {} + ufo@1.6.4: {} + uglify-js@3.19.3: {} unconfig-core@7.5.0: @@ -8792,7 +8866,7 @@ snapshots: unist-util-is: 6.0.1 unist-util-visit-parents: 6.0.2 - unocss@66.6.6(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)): + unocss@66.6.6(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)): dependencies: '@unocss/cli': 66.6.6 '@unocss/core': 66.6.6 @@ -8810,7 +8884,7 @@ snapshots: '@unocss/transformer-compile-class': 66.6.6 '@unocss/transformer-directives': 66.6.6 '@unocss/transformer-variant-group': 66.6.6 - '@unocss/vite': 66.6.6(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) + '@unocss/vite': 66.6.6(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)) transitivePeerDependencies: - vite @@ -8827,12 +8901,12 @@ snapshots: optionalDependencies: '@vueuse/core': 13.9.0(vue@3.5.30(typescript@5.9.3)) - unplugin-combine@1.2.1(esbuild@0.25.12)(rollup@4.59.0)(unplugin@2.3.11)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)): + unplugin-combine@1.2.1(esbuild@0.25.12)(rollup@4.59.0)(unplugin@2.3.11)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)): optionalDependencies: esbuild: 0.25.12 rollup: 4.59.0 unplugin: 2.3.11 - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) unplugin-utils@0.2.5: dependencies: @@ -8844,7 +8918,7 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.3 - unplugin-vue-components@28.8.0(@babel/parser@7.29.0)(vue@3.5.30(typescript@5.9.3)): + unplugin-vue-components@28.8.0(@babel/parser@7.29.3)(vue@3.5.30(typescript@5.9.3)): dependencies: chokidar: 3.6.0 debug: 4.4.3 @@ -8856,7 +8930,7 @@ snapshots: unplugin-utils: 0.2.5 vue: 3.5.30(typescript@5.9.3) optionalDependencies: - '@babel/parser': 7.29.0 + '@babel/parser': 7.29.3 transitivePeerDependencies: - supports-color @@ -8868,7 +8942,7 @@ snapshots: transitivePeerDependencies: - vue - unplugin-vue-macros@2.14.5(@vueuse/core@13.9.0(vue@3.5.30(typescript@5.9.3)))(esbuild@0.25.12)(rollup@4.59.0)(typescript@5.9.3)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue-tsc@2.2.12(typescript@5.9.3))(vue@3.5.30(typescript@5.9.3)): + unplugin-vue-macros@2.14.5(@vueuse/core@13.9.0(vue@3.5.30(typescript@5.9.3)))(esbuild@0.25.12)(rollup@4.59.0)(typescript@5.9.3)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue-tsc@2.2.12(typescript@5.9.3))(vue@3.5.30(typescript@5.9.3)): dependencies: '@vue-macros/better-define': 1.11.4(vue@3.5.30(typescript@5.9.3)) '@vue-macros/boolean-prop': 0.5.5(vue@3.5.30(typescript@5.9.3)) @@ -8883,7 +8957,7 @@ snapshots: '@vue-macros/define-render': 1.6.6(vue@3.5.30(typescript@5.9.3)) '@vue-macros/define-slots': 1.2.6(vue@3.5.30(typescript@5.9.3)) '@vue-macros/define-stylex': 0.2.3(vue@3.5.30(typescript@5.9.3)) - '@vue-macros/devtools': 0.4.1(typescript@5.9.3)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) + '@vue-macros/devtools': 0.4.1(typescript@5.9.3)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)) '@vue-macros/export-expose': 0.3.5(vue@3.5.30(typescript@5.9.3)) '@vue-macros/export-props': 0.6.5(vue@3.5.30(typescript@5.9.3)) '@vue-macros/export-render': 0.3.5(vue@3.5.30(typescript@5.9.3)) @@ -8900,7 +8974,7 @@ snapshots: '@vue-macros/short-vmodel': 1.5.5(vue@3.5.30(typescript@5.9.3)) '@vue-macros/volar': 0.30.15(typescript@5.9.3)(vue-tsc@2.2.12(typescript@5.9.3))(vue@3.5.30(typescript@5.9.3)) unplugin: 2.3.11 - unplugin-combine: 1.2.1(esbuild@0.25.12)(rollup@4.59.0)(unplugin@2.3.11)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) + unplugin-combine: 1.2.1(esbuild@0.25.12)(rollup@4.59.0)(unplugin@2.3.11)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)) unplugin-vue-define-options: 1.5.5(vue@3.5.30(typescript@5.9.3)) vue: 3.5.30(typescript@5.9.3) transitivePeerDependencies: @@ -8914,28 +8988,6 @@ snapshots: - vue-tsc - webpack - unplugin-vue-router@0.12.0(vue-router@4.6.4(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)): - dependencies: - '@babel/types': 7.29.0 - '@vue-macros/common': 1.16.1(vue@3.5.30(typescript@5.9.3)) - ast-walker-scope: 0.6.2 - chokidar: 4.0.3 - fast-glob: 3.3.3 - json5: 2.2.3 - local-pkg: 1.1.2 - magic-string: 0.30.21 - micromatch: 4.0.8 - mlly: 1.8.1 - pathe: 2.0.3 - scule: 1.3.0 - unplugin: 2.3.11 - unplugin-utils: 0.2.5 - yaml: 2.8.2 - optionalDependencies: - vue-router: 4.6.4(vue@3.5.30(typescript@5.9.3)) - transitivePeerDependencies: - - vue - unplugin@2.3.11: dependencies: '@jridgewell/remapping': 2.3.5 @@ -8980,17 +9032,17 @@ snapshots: - rollup - supports-color - vite-dev-rpc@1.1.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)): + vite-dev-rpc@1.1.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)): dependencies: birpc: 2.9.0 - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) - vite-hot-client: 2.1.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) + vite-hot-client: 2.1.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)) - vite-hot-client@2.1.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)): + vite-hot-client@2.1.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)): dependencies: - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) - vite-plugin-inspect@11.3.3(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)): + vite-plugin-inspect@11.3.3(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)): dependencies: ansis: 4.2.0 debug: 4.4.3 @@ -9000,27 +9052,27 @@ snapshots: perfect-debounce: 2.1.0 sirv: 3.0.2 unplugin-utils: 0.3.1 - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) - vite-dev-rpc: 1.1.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) + vite-dev-rpc: 1.1.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)) transitivePeerDependencies: - supports-color - vite-plugin-vue-devtools@7.7.9(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue@3.5.30(typescript@5.9.3)): + vite-plugin-vue-devtools@7.7.9(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue@3.5.30(typescript@5.9.3)): dependencies: - '@vue/devtools-core': 7.7.9(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue@3.5.30(typescript@5.9.3)) + '@vue/devtools-core': 7.7.9(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue@3.5.30(typescript@5.9.3)) '@vue/devtools-kit': 7.7.9 '@vue/devtools-shared': 7.7.9 execa: 9.6.1 sirv: 3.0.2 - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) - vite-plugin-inspect: 11.3.3(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) - vite-plugin-vue-inspector: 5.3.2(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) + vite-plugin-inspect: 11.3.3(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)) + vite-plugin-vue-inspector: 5.3.2(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)) transitivePeerDependencies: - '@nuxt/kit' - supports-color - vue - vite-plugin-vue-inspector@5.3.2(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)): + vite-plugin-vue-inspector@5.3.2(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4)): dependencies: '@babel/core': 7.29.0 '@babel/plugin-proposal-decorators': 7.29.0(@babel/core@7.29.0) @@ -9031,23 +9083,23 @@ snapshots: '@vue/compiler-dom': 3.5.30 kolorist: 1.8.0 magic-string: 0.30.21 - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) transitivePeerDependencies: - supports-color - vite-plugin-vue-layouts@0.11.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue-router@4.6.4(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)): + vite-plugin-vue-layouts@0.11.0(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue-router@5.0.6(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)): dependencies: debug: 4.4.3 fast-glob: 3.3.3 - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) vue: 3.5.30(typescript@5.9.3) - vue-router: 4.6.4(vue@3.5.30(typescript@5.9.3)) + vue-router: 5.0.6(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)) transitivePeerDependencies: - supports-color vite-ssg-sitemap@0.8.1: {} - vite-ssg@26.1.1(beasties@0.2.0)(prettier@3.8.1)(unhead@2.1.12)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vue-router@4.6.4(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)): + vite-ssg@26.1.1(beasties@0.2.0)(prettier@3.8.1)(unhead@2.1.12)(vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4))(vue-router@5.0.6(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)))(vue@3.5.30(typescript@5.9.3)): dependencies: '@unhead/dom': 2.1.12(unhead@2.1.12) '@unhead/vue': 2.1.12(vue@3.5.30(typescript@5.9.3)) @@ -9056,12 +9108,12 @@ snapshots: html-minifier-terser: 7.2.0 html5parser: 2.0.2 jsdom: 26.1.0 - vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2) + vite: 6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4) vue: 3.5.30(typescript@5.9.3) optionalDependencies: beasties: 0.2.0 prettier: 3.8.1 - vue-router: 4.6.4(vue@3.5.30(typescript@5.9.3)) + vue-router: 5.0.6(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)) transitivePeerDependencies: - bufferutil - canvas @@ -9069,7 +9121,7 @@ snapshots: - unhead - utf-8-validate - vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2): + vite@6.4.1(@types/node@25.4.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.4): dependencies: esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.3) @@ -9082,7 +9134,7 @@ snapshots: fsevents: 2.3.3 jiti: 2.6.1 terser: 5.46.0 - yaml: 2.8.2 + yaml: 2.8.4 vscode-uri@3.1.0: {} @@ -9106,10 +9158,28 @@ snapshots: '@vue/devtools-api': 6.6.4 vue: 3.5.30(typescript@5.9.3) - vue-router@4.6.4(vue@3.5.30(typescript@5.9.3)): + vue-router@5.0.6(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)): dependencies: - '@vue/devtools-api': 6.6.4 + '@babel/generator': 7.29.1 + '@vue-macros/common': 3.1.2(vue@3.5.30(typescript@5.9.3)) + '@vue/devtools-api': 8.1.2 + ast-walker-scope: 0.8.3 + chokidar: 5.0.0 + json5: 2.2.3 + local-pkg: 1.1.2 + magic-string: 0.30.21 + mlly: 1.8.2 + muggle-string: 0.4.1 + pathe: 2.0.3 + picomatch: 4.0.4 + scule: 1.3.0 + tinyglobby: 0.2.16 + unplugin: 2.3.11 + unplugin-utils: 0.3.1 vue: 3.5.30(typescript@5.9.3) + yaml: 2.8.4 + optionalDependencies: + '@vue/compiler-sfc': 3.5.30 vue-tsc@2.2.12(typescript@5.9.3): dependencies: @@ -9196,6 +9266,8 @@ snapshots: yaml@2.8.2: {} + yaml@2.8.4: {} + yargs-parser@21.1.1: {} yargs@17.7.2: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 7bda9c4..99ea7bf 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -14,7 +14,6 @@ catalogs: unplugin-auto-import: ^19.1.2 unplugin-vue-components: ^28.4.1 unplugin-vue-macros: ^2.14.5 - unplugin-vue-router: ^0.12.0 vite: ^6.2.3 vite-bundle-visualizer: ^1.2.1 vite-plugin-inspect: ^11.0.0 @@ -49,6 +48,8 @@ catalogs: types: '@types/node': ^25.4.0 '@types/nprogress': ^0.2.3 + conflicts_frontend_h5_0_6: + vue-router: ^5.0.6 onlyBuiltDependencies: - esbuild diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts index 08c7a0f..81ec7c3 100644 --- a/src/auto-imports.d.ts +++ b/src/auto-imports.d.ts @@ -32,7 +32,7 @@ declare global { const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] const defineComponent: typeof import('vue')['defineComponent'] const defineLoader: typeof import('vue-router/auto')['defineLoader'] - const definePage: typeof import('unplugin-vue-router/runtime')['definePage'] + const definePage: typeof import('vue-router/experimental')['definePage'] const eagerComputed: typeof import('@vueuse/core')['eagerComputed'] const effectScope: typeof import('vue')['effectScope'] const extendRef: typeof import('@vueuse/core')['extendRef'] @@ -246,6 +246,7 @@ declare global { const useScroll: typeof import('@vueuse/core')['useScroll'] const useScrollLock: typeof import('@vueuse/core')['useScrollLock'] const useScrollStore: typeof import('./stores/scroll')['useScrollStore'] + const useScrollbarWidth: typeof import('./composables/useScrollbarWidth')['default'] const useSeoMeta: typeof import('@unhead/vue')['useSeoMeta'] const useServerHead: typeof import('@unhead/vue')['useServerHead'] const useServerHeadSafe: typeof import('@unhead/vue')['useServerHeadSafe'] @@ -350,6 +351,7 @@ declare module 'vue' { readonly debouncedWatch: UnwrapRef readonly defineAsyncComponent: UnwrapRef readonly defineComponent: UnwrapRef + readonly definePage: UnwrapRef readonly eagerComputed: UnwrapRef readonly effectScope: UnwrapRef readonly extendRef: UnwrapRef @@ -561,6 +563,7 @@ declare module 'vue' { readonly useScriptTag: UnwrapRef readonly useScroll: UnwrapRef readonly useScrollLock: UnwrapRef + readonly useScrollbarWidth: UnwrapRef readonly useSeoMeta: UnwrapRef readonly useServerHead: UnwrapRef readonly useServerHeadSafe: UnwrapRef diff --git a/src/components.d.ts b/src/components.d.ts index 96df8f8..5f00b2a 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -34,5 +34,10 @@ declare module 'vue' { SocialCard: typeof import('./components/partials/about/SocialCard.vue')['default'] SocialLink: typeof import('./components/partials/about/SocialLink.vue')['default'] ToggleButton: typeof import('./components/partials/ToggleButton.vue')['default'] + WorkSectionHero: typeof import('./components/partials/work/WorkSectionHero.vue')['default'] + WorkSectionImage: typeof import('./components/partials/work/WorkSectionImage.vue')['default'] + WorkSectionNext: typeof import('./components/partials/work/WorkSectionNext.vue')['default'] + WorkSectionQuote: typeof import('./components/partials/work/WorkSectionQuote.vue')['default'] + WorkSectionText: typeof import('./components/partials/work/WorkSectionText.vue')['default'] } } diff --git a/src/layouts/README.md b/src/layouts/README.md index 94761aa..3d96cea 100644 --- a/src/layouts/README.md +++ b/src/layouts/README.md @@ -4,7 +4,7 @@ Vue components in this dir are used as layouts. By default, `default.vue` will be used unless an alternative is specified in the route meta. -With [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) and [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts), you can specify the layout in the page's SFCs like this: +With [`vue-router`](https://github.com/vuejs/router) and [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts), you can specify the layout in the page's SFCs like this: ```vue diff --git a/src/pages/README.md b/src/pages/README.md index 26b343d..8b48b51 100644 --- a/src/pages/README.md +++ b/src/pages/README.md @@ -1,7 +1,7 @@ ## File-based Routing Routes will be auto-generated for Vue files in this dir with the same file structure. -Check out [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) for more details. +Check out [`vue-router`](https://github.com/vuejs/router) for more details. ### Path Aliasing diff --git a/src/route-map.d.ts b/src/route-map.d.ts new file mode 100644 index 0000000..c9225c6 --- /dev/null +++ b/src/route-map.d.ts @@ -0,0 +1,125 @@ +/* eslint-disable */ +/* prettier-ignore */ +// oxfmt-ignore +// @ts-nocheck +// noinspection ES6UnusedImports +// Generated by vue-router. !! DO NOT MODIFY THIS FILE !! +// It's recommended to commit this file. +// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry. + +import type { + RouteRecordInfo, + ParamValue, + ParamValueOneOrMore, + ParamValueZeroOrMore, + ParamValueZeroOrOne, +} from 'vue-router' +import type { + _ExtractParamParserType, +} from 'vue-router/experimental' + +declare module 'vue-router' { + interface TypesConfig { + ParamParsers: + | never + } +} + +declare module 'vue-router/auto-routes' { + /** + * Route name map generated by vue-router + */ + export interface RouteNamedMap { + '/': RouteRecordInfo< + '/', + '/', + Record, + Record, + | never + >, + '/[...all]': RouteRecordInfo< + '/[...all]', + '/:all(.*)', + { all: ParamValue }, + { all: ParamValue }, + | never + >, + '/about': RouteRecordInfo< + '/about', + '/about', + Record, + Record, + | never + >, + '/resume': RouteRecordInfo< + '/resume', + '/resume', + Record, + Record, + | never + >, + '/work/[slug]': RouteRecordInfo< + '/work/[slug]', + '/work/:slug', + { slug: ParamValue }, + { slug: ParamValue }, + | never + >, + } + + /** + * Route file to route info map by vue-router. + * Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`. + * + * Each key is a file path relative to the project root with 2 properties: + * - routes: union of route names of the possible routes when in this page (passed to useRoute<...>()) + * - views: names of nested views (can be passed to ) + * + * @internal + */ + export interface _RouteFileInfoMap { + 'src/pages/index.vue': { + routes: + | '/' + views: + | never + } + 'src/pages/[...all].vue': { + routes: + | '/[...all]' + views: + | never + } + 'src/pages/about.vue': { + routes: + | '/about' + views: + | never + } + 'src/pages/resume.vue': { + routes: + | '/resume' + views: + | never + } + 'src/pages/work/[slug].vue': { + routes: + | '/work/[slug]' + views: + | never + } + } + + /** + * Get a union of possible route names in a certain route component file. + * Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`. + * + * @internal + */ + export type _RouteNamesForFilePath = + _RouteFileInfoMap extends Record + ? Info['routes'] + : keyof RouteNamedMap +} + +export {} diff --git a/src/typed-router.d.ts b/src/typed-router.d.ts deleted file mode 100644 index 5a558d2..0000000 --- a/src/typed-router.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* eslint-disable */ -/* prettier-ignore */ -// @ts-nocheck -// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️ -// It's recommended to commit this file. -// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry. - -declare module 'vue-router/auto-routes' { - import type { - RouteRecordInfo, - ParamValue, - ParamValueOneOrMore, - ParamValueZeroOrMore, - ParamValueZeroOrOne, - } from 'vue-router' - - /** - * Route name map generated by unplugin-vue-router - */ - export interface RouteNamedMap { - '/': RouteRecordInfo<'/', '/', Record, Record>, - '/[...all]': RouteRecordInfo<'/[...all]', '/:all(.*)', { all: ParamValue }, { all: ParamValue }>, - '/about': RouteRecordInfo<'/about', '/about', Record, Record>, - '/resume': RouteRecordInfo<'/resume', '/resume', Record, Record>, - '/work/[slug]': RouteRecordInfo<'/work/[slug]', '/work/:slug', { slug: ParamValue }, { slug: ParamValue }>, - } -} diff --git a/tsconfig.json b/tsconfig.json index 558f186..04eaac4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,8 +14,7 @@ "node", "vite/client", "vite-plugin-vue-layouts/client", - "unplugin-vue-macros/macros-global", - "unplugin-vue-router/client" + "unplugin-vue-macros/macros-global" ], "allowJs": true, "strict": true, @@ -30,7 +29,9 @@ "vueCompilerOptions": { "plugins": [ "@vue-macros/volar/define-models", - "@vue-macros/volar/define-slots" + "@vue-macros/volar/define-slots", + "vue-router/volar/sfc-typed-router", + "vue-router/volar/sfc-route-blocks" ] }, "exclude": ["dist", "node_modules"] diff --git a/vite.config.ts b/vite.config.ts index b9c0b17..99e61b4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,12 +6,12 @@ import Unocss from 'unocss/vite' import AutoImport from 'unplugin-auto-import/vite' import Components from 'unplugin-vue-components/vite' import VueMacros from 'unplugin-vue-macros/vite' -import { VueRouterAutoImports } from 'unplugin-vue-router' -import VueRouter from 'unplugin-vue-router/vite' import { defineConfig } from 'vite' import VueDevTools from 'vite-plugin-vue-devtools' import Layouts from 'vite-plugin-vue-layouts' import generateSitemap from 'vite-ssg-sitemap' +import { VueRouterAutoImports } from 'vue-router/unplugin' +import VueRouter from 'vue-router/vite' export default defineConfig({ resolve: { @@ -21,10 +21,10 @@ export default defineConfig({ }, plugins: [ - // https://github.com/posva/unplugin-vue-router + // https://github.com/vuejs/router VueRouter({ extensions: ['.vue'], - dts: 'src/typed-router.d.ts', + dts: 'src/route-map.d.ts', }), VueMacros({ From a3c43269651280983942a7364502fe5dc3896a70 Mon Sep 17 00:00:00 2001 From: Sayiddd Date: Sun, 10 May 2026 23:56:24 +0700 Subject: [PATCH 2/9] Major changes to i18n and vue-router config Fuck --- locales/en.json | 167 ++++++++++++++++++++++++++++++++++++++++++ locales/en.yml | 60 --------------- locales/id.json | 167 ++++++++++++++++++++++++++++++++++++++++++ locales/id.yml | 60 --------------- pnpm-lock.yaml | 7 +- pnpm-workspace.yaml | 4 +- src/App.vue | 27 +++++++ src/auto-imports.d.ts | 2 + src/i18n.ts | 66 +++++++++++++++++ src/main.ts | 40 +++++++++- src/modules/i18n.ts | 48 ------------ src/route-map.d.ts | 107 ++++++++++++++++++--------- src/vue-i18n.d.ts | 10 +++ tsconfig.json | 3 +- 14 files changed, 556 insertions(+), 212 deletions(-) create mode 100644 locales/en.json delete mode 100644 locales/en.yml create mode 100644 locales/id.json delete mode 100644 locales/id.yml create mode 100644 src/i18n.ts delete mode 100644 src/modules/i18n.ts create mode 100644 src/vue-i18n.d.ts diff --git a/locales/en.json b/locales/en.json new file mode 100644 index 0000000..8b0d168 --- /dev/null +++ b/locales/en.json @@ -0,0 +1,167 @@ +{ + "scroll": "Scroll down", + "button": { + "about": "About Me", + "resume": "View Resume", + "back": "Back", + "go": "GO", + "up-next": "Up Next", + "home": "Home", + "toggle_theme": { + "_label": "Toggle theme", + "dark": "Dark", + "light": "Light" + }, + "toggle_lang": "Change lang" + }, + "not-found": "Not found", + "footer": { + "copy": { + "mit": "Source code is licensed under", + "cc": "Assets (such as words and images) are licensed under" + }, + "nav": { + "_label": "Navigation", + "home": "Homepage", + "about": "About", + "resume": "Resume" + } + }, + "home": { + "section_1": { + "whoami": "I'm a", + "title": "I build idea, design, and curiosity in the form of code, and turning them into beautifully crafted products" + }, + "section_2": { + "title": "What I've been working on recently", + "subtitle": "And many more" + } + }, + "resume": { + "intro": "Full-stack developer with experience in web application development using frameworks such as Laravel, Next.js, and Vue 3. Capable of building interactive, responsive web applications while maximizing the user experience by ensuring optimal application performance.", + "sectionExperience": [ + { + "companyName": "PT Botika Teknologi Indonesia", + "jobPosition": "Full Stack Developer", + "employmentStatus": "Internship", + "timePeriod": [ + "July 2024", + "June 2025" + ], + "details": [ + "Build the frontend interface according to the structure and format provided by the UI/UX team.", + "Adapting to the development process, for example: using various tools and utilities as needed for the project, and adhering to the team’s coding standards.", + "Use Git as a version control system (VCS) and actively contribute by following best practices for using Git." + ] + }, + { + "companyName": "PT Solusi Karya Technology Indonesia", + "jobPosition": "Full Stack Developer", + "employmentStatus": "Part-Time", + "timePeriod": [ + "April 2025", + "Present" + ], + "details": [ + "Creating a code structure that is consistent, sustainable, and effective without limiting flexibility for other development teams.", + "Conduct testing to ensure that user requests and server responses align with the application workflow." + ] + } + ], + "sectionEducation": [ + { + "institutionName": "SMK Negeri 2 Depok Sleman (Vocational High School)", + "majorName": "Network Information Systems and Applications", + "period": [ + 2021, + 2025 + ], + "details": [ + "Represented at the 2024 provincial-level Student Skills Competition (LKS) in the Web Technology category and placed fifth.", + "Assisting in the development and improvement of school infrastructure in the area of web development." + ] + } + ], + "sectionSkill": { + "softSkill": [ + "Easily adapts to new environments and technologies.", + "Able to identify the root cause of a problem and find effective solutions.", + "Effective teamwork and communication skills.", + "Attention to detail to ensure perfect, high-quality results." + ], + "hardSkill": { + "frontend": "Frontend Development", + "backend": "Backend Development", + "otherProgramming": "Other Programming", + "linux": "Linux Administration", + "ci-cd": "CI/CD" + } + }, + "sectionProject": { + "personal-website": { + "title": "Personal Website", + "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur commodi deserunt dolores ducimus eligendi eum fuga inventore, iste laboriosam maiores nam necessitatibus quos, repudiandae. Eum excepturi in quidem repellat sed?" + }, + "stage-two": { + "title": "GRUB Boot Loader Theme Designer", + "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur commodi deserunt dolores ducimus eligendi eum fuga inventore, iste laboriosam maiores nam necessitatibus quos, repudiandae. Eum excepturi in quidem repellat sed?" + }, + "sim-web": { + "title": "Sistem Informasi Manajemen Sekolah", + "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur commodi deserunt dolores ducimus eligendi eum fuga inventore, iste laboriosam maiores nam necessitatibus quos, repudiandae. Eum excepturi in quidem repellat sed?" + } + } + }, + "about": { + "title": "A full stack developer with experience in website development using various framework and libraries", + "subtitle": "Able to build interactive, responsive web applications, and providing optimal performance to maximize users experience", + "sections": [ + { + "_label": "Profile", + "items": [ + { + "title": "Identity", + "subtitle": [ + "Sajid Muhammad Ikhlas", + "Yogyakarta, Indonesia" + ] + }, + { + "title": "Capability", + "subtitle": [ + "Problem Solving", + "Decision Making", + "Easy to Adapt" + ] + } + ] + }, + { + "_label": "Honor", + "items": [ + { + "title": "Kemendikdasmen", + "subtitle": "Regional LKS Web Technology 2024" + } + ] + }, + { + "_label": "Social", + "items": [ + { + "title": "Instagram", + "subtitle": "say1ddd" + }, + { + "title": "LinkedIn", + "subtitle": "/in/sajid-ikhlas" + }, + { + "title": "Github", + "subtitle": "say1ddd" + } + ] + } + ] + } +} diff --git a/locales/en.yml b/locales/en.yml deleted file mode 100644 index b3da579..0000000 --- a/locales/en.yml +++ /dev/null @@ -1,60 +0,0 @@ -scroll: Scroll down -button: - about: About Me - resume: View Resume - back: Back - go: GO - up-next: Up Next - home: Home - toggle_theme: - _label: Toggle theme - dark: Dark - light: Light - toggle_lang: Change lang -not-found: Not found -footer: - copy: - mit: Source code is licensed under - cc: Assets (such as words and images) are licensed under - nav: - _label: Navigation - home: Homepage - about: About - resume: Resume - misc: Miscellaneous - -# content -home: - section_1: - whoami: I'm a - title: I build idea, design, and curiosity in the form of code, and turning them into beautifully crafted products. - section_2: - title: What I've been working on recently - subtitle: And many more - -about: - title: A full stack developer with experience in website development using various framework and libraries - subtitle: Able to build interactive, responsive web applications, and providing optimal performance to maximize users experience - sections: - - _label: Profile - items: - - title: Identity - subtitle: - - Sajid Muhammad Ikhlas - - Yogyakarta, Indonesia - - title: Capability - subtitle: [Problem Solving, Decision Making, Easy to Adapt] - - - _label: Honor - items: - - title: Kemendikdasmen - subtitle: Regional LKS Web Technology 2024 - - - _label: Social - items: - - title: Instagram - subtitle: say1ddd - - title: LinkedIn - subtitle: /in/sajid-ikhlas - - title: Github - subtitle: say1ddd diff --git a/locales/id.json b/locales/id.json new file mode 100644 index 0000000..f73b8d1 --- /dev/null +++ b/locales/id.json @@ -0,0 +1,167 @@ +{ + "scroll": "Scroll ke bawah", + "button": { + "about": "Tentang Aku", + "resume": "Lihat Resume", + "back": "Kembali", + "go": "Pergi", + "up-next": "Selanjutnya", + "home": "Beranda", + "toggle_theme": { + "_label": "Ubah tema", + "dark": "Gelap", + "light": "Terang" + }, + "toggle_lang": "Ubah bahasa" + }, + "not-found": "Tidak ditemukan", + "footer": { + "copy": { + "mit": "Source code dilisensikan dalam", + "cc": "Aset (seperti kata dan gambar) dilisensikan dalam" + }, + "nav": { + "_label": "Navigasi", + "home": "Beranda", + "about": "Tentang", + "resume": "Resume" + } + }, + "home": { + "section_1": { + "whoami": "Aku", + "title": "Aku mewujudkan ide, desain, dan rasa ingin tahu dalam bentuk code, dan mengubahnya menjadi produk yang sempurna" + }, + "section_2": { + "title": "Karya yang sedang kukerjakan baru-baru ini", + "subtitle": "Dan masih banyak lagi" + } + }, + "resume": { + "intro": "Full stack developer dengan pengalaman dalam pengembangan aplikasi web menggunakan, framework seperti Laravel, Next JS, dan Vue 3. Mampu membangun aplikasi web yang interaktif, responsif, sekaligus memaksimalkan pengalaman pengguna dengan memberikan performa aplikasi yang maksimal.", + "sectionExperience": [ + { + "companyName": "PT Botika Teknologi Indonesia", + "jobPosition": "Full Stack Developer", + "employmentStatus": "Magang", + "timePeriod": [ + "Juli 2024", + "Juni 2025" + ], + "details": [ + "Membangun tampilan frontend sesuai dengan struktur dan format yang disediakan tim UI/UX.", + "Berimprovisasi dalam proses pengembangan, misalnya: menggunakan bermacam tools dan utility sesuai dengan kebutuhan proyek, juga mengikuti format penulisan code oleh tim.", + "Menggunakan Git sebagai sarana manajemen versi Version Control System (VCS) dan berkontribusi secara aktif dengan mengikuti best practice prosedur penggunaan Git." + ] + }, + { + "companyName": "PT Solusi Karya Technology Indonesia", + "jobPosition": "Full Stack Developer", + "employmentStatus": "Paruh Waktu", + "timePeriod": [ + "April 2025", + "Sekarang" + ], + "details": [ + "Menciptakan struktur code yang konsisten, jangka panjang, dan juga efektif tanpa membatasi fleksbilitas bagi tim developer lain.", + "Melakukan testing untuk memastikan permintaan pengguna dan respon dari server sesuai dengan alur aplikasi." + ] + } + ], + "sectionEducation": [ + { + "institutionName": "SMK Negeri 2 Depok Sleman", + "majorName": "Sistem Informasi Jaringan dan Aplikasi", + "period": [ + 2021, + 2025 + ], + "details": [ + "Mewakili cabang Lomba Kompetensi Siswa (LKS) tingkat provinsi Daerah Istimewa Yogyakarta (DIY) tahun 2024 bidang Web Technology dan meraih peringkat ke-5.", + "Membantu dalam pengembangan dan perbaikan infrastruktur sekolah di bidang pengembangan website." + ] + } + ], + "sectionSkill": { + "softSkill": [ + "Mudah beradaptasi terhadap lingkungan dan teknologi baru.", + "Mampu mencari akar penyebab suatu masalah dan cara efektif penyelesaiannya.", + "Keterampilan kerja sama tim dan komunikasi yang efektif.", + "Attention to detail untuk memastikan hasil sempurna dan berkualitas tinggi." + ], + "hardSkill": { + "frontend": "Pengembangan Frontend", + "backend": "Pengembangan Backend", + "otherProgramming": "Pemrograman Lain", + "linux": "Administrasi Linux", + "ci-cd": "CI/CD" + } + }, + "sectionProject": { + "personal-website": { + "title": "Personal Website", + "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur commodi deserunt dolores ducimus eligendi eum fuga inventore, iste laboriosam maiores nam necessitatibus quos, repudiandae. Eum excepturi in quidem repellat sed?" + }, + "stage-two": { + "title": "GRUB Boot Loader Theme Designer", + "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur commodi deserunt dolores ducimus eligendi eum fuga inventore, iste laboriosam maiores nam necessitatibus quos, repudiandae. Eum excepturi in quidem repellat sed?" + }, + "sim-web": { + "title": "Sistem Informasi Manajemen Sekolah", + "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur commodi deserunt dolores ducimus eligendi eum fuga inventore, iste laboriosam maiores nam necessitatibus quos, repudiandae. Eum excepturi in quidem repellat sed?" + } + } + }, + "about": { + "title": "Seorang full stack developer yang memiliki pengalaman dalam pengembangan website menggunakan berbagai macam framework dan library", + "subtitle": "Mampu mengembangkan aplikasi web yang interaktif, responsif, dan memberikan performa yang optimal untuk memaksimalkan pengalaman pengguna", + "sections": [ + { + "_label": "Profil", + "items": [ + { + "title": "Identitas", + "subtitle": [ + "Sajid Muhammad Ikhlas", + "Yogyakarta, Indonesia" + ] + }, + { + "title": "Keahlian", + "subtitle": [ + "Penyelesaian Masalah", + "Pengambilan Keputusan", + "Mudah Beradaptasi" + ] + } + ] + }, + { + "_label": "Penghargaan", + "items": [ + { + "title": "Kemendikdasmen", + "subtitle": "LKS Web Technology Tingkat Provinsi 2024" + } + ] + }, + { + "_label": "Sosial", + "items": [ + { + "title": "Instagram", + "subtitle": "say1ddd" + }, + { + "title": "LinkedIn", + "subtitle": "/in/sajid-ikhlas" + }, + { + "title": "Github", + "subtitle": "say1ddd" + } + ] + } + ] + } +} diff --git a/locales/id.yml b/locales/id.yml deleted file mode 100644 index 567e80d..0000000 --- a/locales/id.yml +++ /dev/null @@ -1,60 +0,0 @@ -scroll: Scroll ke bawah -button: - about: Tentang Aku - resume: Lihat Resume - back: Kembali - go: Pergi - up-next: Selanjutnya - home: Beranda - toggle_theme: - _label: Ubah tema - dark: Gelap - light: Terang - toggle_lang: Ubah bahasa -not-found: Tidak ditemukan -footer: - copy: - mit: Source code dilisensikan dalam - cc: Aset (seperti kata dan gambar) dilisensikan dalam - nav: - _label: Navigasi - home: Beranda - about: Tentang - resume: Resume - misc: Lain-lain - -# content -home: - section_1: - whoami: Aku - title: Aku mewujudkan ide, desain, dan rasa ingin tahu dalam bentuk code, dan mengubahnya menjadi produk yang sempurna. - section_2: - title: Karya yang sedang kukerjakan baru-baru ini - subtitle: Dan masih banyak lagi - -about: - title: Seorang full stack developer yang memiliki pengalaman dalam pengembangan website menggunakan berbagai macam framework dan library - subtitle: Mampu mengembangkan aplikasi web yang interaktif, responsif, dan memberikan performa yang optimal untuk memaksimalkan pengalaman pengguna - sections: - - _label: Profil - items: - - title: Identitas - subtitle: - - Sajid Muhammad Ikhlas - - Yogyakarta, Indonesia - - title: Keahlian - subtitle: [Penyelesaian Masalah, Pengambilan Keputusan, Mudah Beradaptasi] - - - _label: Penghargaan - items: - - title: Kemendikdasmen - subtitle: LKS Web Technology Tingkat Provinsi 2024 - - - _label: Sosial - items: - - title: Instagram - subtitle: say1ddd - - title: LinkedIn - subtitle: /in/sajid-ikhlas - - title: Github - subtitle: say1ddd diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b025fc3..08bef44 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -107,6 +107,9 @@ catalogs: vue-i18n: specifier: ^11.1.2 version: 11.3.0 + vue-router: + specifier: ^5.0.6 + version: 5.0.6 types: '@types/node': specifier: ^25.4.0 @@ -143,7 +146,7 @@ importers: specifier: catalog:frontend version: 11.3.0(vue@3.5.30(typescript@5.9.3)) vue-router: - specifier: ^5.0.6 + specifier: catalog:frontend version: 5.0.6(@vue/compiler-sfc@3.5.30)(vue@3.5.30(typescript@5.9.3)) devDependencies: '@antfu/eslint-config': @@ -4603,7 +4606,7 @@ snapshots: '@babel/generator@7.29.1': dependencies: - '@babel/parser': 7.29.0 + '@babel/parser': 7.29.3 '@babel/types': 7.29.0 '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 99ea7bf..1b0015b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -43,13 +43,11 @@ catalogs: nprogress: ^0.2.0 vue: ^3.5.13 vue-i18n: ^11.1.2 - vue-router: ^4.5.0 + vue-router: ^5.0.6 types: '@types/node': ^25.4.0 '@types/nprogress': ^0.2.3 - conflicts_frontend_h5_0_6: - vue-router: ^5.0.6 onlyBuiltDependencies: - esbuild diff --git a/src/App.vue b/src/App.vue index 1043d38..ddfa3b4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,6 +2,9 @@ // https://github.com/vueuse/head // you can use this to manipulate the document head in any components, // they will be rendered correctly in the html results with vite-ssg +import type { LocaleRouteParams } from '~/types' +import { useLocale } from '~/composables/useLocale' + useHead({ title: 'Sikhlas', meta: [ @@ -22,6 +25,30 @@ useHead({ }, ], }) + +const router = useRouter() +const { currentLocale } = useLocale() + +// sync to switch locale from router locale path +watch(router.currentRoute, (route) => { + const { locale: localeParam } = route.params as LocaleRouteParams + currentLocale.value = localeParam +}) + +/** + * when change the locale, go to locale route + * + * when the changes are detected, load the locale message and set the language via vue-router navigation guard. + * change the vue-i18n locale too. + */ +watch(currentLocale, (val) => { + router.push( + router.currentRoute.value.fullPath.replace( + /^\/[^/]+/, + `/${val}`, + ), + ) +})