From 2f7ec4fb615fa89341093ae836163761c11a9eee Mon Sep 17 00:00:00 2001 From: userquin Date: Sun, 14 Sep 2025 16:14:03 +0200 Subject: [PATCH 01/13] feat: use nav. api router --- package.json | 2 +- pnpm-lock.yaml | 182 ++++++++++++++++++++++++++---------------------- src/App.vue | 17 +++++ src/main.ts | 41 ++++++----- src/pages/b.vue | 32 +++++++++ 5 files changed, 171 insertions(+), 103 deletions(-) diff --git a/package.json b/package.json index c17fc53..4c15342 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "vue": "^3.5.21", - "vue-router": "^4.5.1" + "vue-router": "https://pkg.pr.new/vue-router@cec1347" }, "devDependencies": { "@antfu/eslint-config": "^5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 665c753..43dbe4b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^3.5.21 version: 3.5.21(typescript@5.9.2) vue-router: - specifier: ^4.5.1 - version: 4.5.1(vue@3.5.21(typescript@5.9.2)) + specifier: https://pkg.pr.new/vue-router@cec1347 + version: https://pkg.pr.new/vue-router@cec1347(vue@3.5.21(typescript@5.9.2)) devDependencies: '@antfu/eslint-config': specifier: ^5.2.2 @@ -38,7 +38,7 @@ importers: version: 5.9.2 unplugin-vue-router: specifier: ^0.15.0 - version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) + version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@cec1347(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) vite: specifier: ^7.1.4 version: 7.1.4(jiti@2.5.1)(yaml@2.8.1) @@ -410,12 +410,12 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@oxc-project/runtime@0.82.3': - resolution: {integrity: sha512-LNh5GlJvYHAnMurO+EyA8jJwN1rki7l3PSHuosDh2I7h00T6/u9rCkUjg/SvPmT1CZzvhuW0y+gf7jcqUy/Usg==} + '@oxc-project/runtime@0.87.0': + resolution: {integrity: sha512-ky2Hqi2q/uGX36UfY79zxMbUqiNIl1RyKKVJfFenG70lbn+/fcaKBVTbhmUwn8a2wPyv2gNtDQxuDytbKX9giQ==} engines: {node: '>=6.9.0'} - '@oxc-project/types@0.82.3': - resolution: {integrity: sha512-6nCUxBnGX0c6qfZW5MaF6/fmu5dHJDMiMPaioKHKs5mi5+8/FHQ7WGjgQIz1zxpmceMYfdIXkOaLYE+ejbuOtA==} + '@oxc-project/types@0.87.0': + resolution: {integrity: sha512-ipZFWVGE9fADBVXXWJWY/cxpysc41Gt5upKDeb32F6WMgFyO7XETUMVq8UuREKCih+Km5E6p2VhEvf6Fuhey6g==} '@pkgr/core@0.2.9': resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} @@ -424,81 +424,94 @@ packages: '@quansync/fs@0.1.5': resolution: {integrity: sha512-lNS9hL2aS2NZgNW7BBj+6EBl4rOf8l+tQ0eRY6JWCI8jI2kc53gSoqbjojU0OnAWhzoXiOjFyGsHcDGePB3lhA==} - '@rolldown/binding-android-arm64@1.0.0-beta.35': - resolution: {integrity: sha512-zVTg0544Ib1ldJSWwjy8URWYHlLFJ98rLnj+2FIj5fRs4KqGKP4VgH/pVUbXNGxeLFjItie6NSK1Un7nJixneQ==} + '@rolldown/binding-android-arm64@1.0.0-beta.37': + resolution: {integrity: sha512-Pdr3USGBdoYzcygfJTSATHd7x476vVF3rnQ6SuUAh4YjhgGoNaI/ZycQ0RsonptwwU5NmQRWxfWv+aUPL6JlJg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.0.0-beta.35': - resolution: {integrity: sha512-WPy0qx22CABTKDldEExfpYHWHulRoPo+m/YpyxP+6ODUPTQexWl8Wp12fn1CVP0xi0rOBj7ugs6+kKMAJW56wQ==} + '@rolldown/binding-darwin-arm64@1.0.0-beta.37': + resolution: {integrity: sha512-iDdmatSgbWhTYOq51G2CkJXwFayiuQpv/ywG7Bv3wKqy31L7d0LltUhWqAdfCl7eBG3gybfUm/iEXiTldH3jYA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-beta.35': - resolution: {integrity: sha512-3k1TabJafF/GgNubXMkfp93d5p30SfIMOmQ5gm1tFwO+baMxxVPwDs3FDvSl+feCWwXxBA+bzemgkaDlInmp1Q==} + '@rolldown/binding-darwin-x64@1.0.0-beta.37': + resolution: {integrity: sha512-LQPpi3YJDtIprj6mwMbVM1gLM4BV2m9oqe9h3Y1UwAd20xs+imnzWJqWFpm4Hw9SiFmefIf3q4EPx2k6Nj2K7A==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-beta.35': - resolution: {integrity: sha512-GAiapN5YyIocnBVNEiOxMfWO9NqIeEKKWohj1sPLGc61P+9N1meXOOCiAPbLU+adXq0grtbYySid+Or7f2q+Mg==} + '@rolldown/binding-freebsd-x64@1.0.0-beta.37': + resolution: {integrity: sha512-9JnfSWfYd/YrZOu4Sj3rb2THBrCj70nJB/2FOSdg0O9ZoRrdTeB8b7Futo6N7HLWZM5uqqnJBX6VTpA0RZD+ow==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.35': - resolution: {integrity: sha512-okPKKIE73qkUMvq7dxDyzD0VIysdV4AirHqjf8tGTjuNoddUAl3WAtMYbuZCEKJwUyI67UINKO1peFVlYEb+8w==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.37': + resolution: {integrity: sha512-eEmQTpvefEtHxc0vg5sOnWCqBcGQB/SIDlPkkzKR9ESKq9BsjQfHxssJWuNMyQ+rpr9CYaogddyQtZ9GHkp8vA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.35': - resolution: {integrity: sha512-Nky8Q2cxyKVkEETntrvcmlzNir5khQbDfX3PflHPbZY7XVZalllRqw7+MW5vn+jTsk5BfKVeLsvrF4344IU55g==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.37': + resolution: {integrity: sha512-Ekv4OjDzQUl0X9kHM7M23N9hVRiYCYr89neLBNITCp7P4IHs1f6SNZiCIvvBVy6NIFzO1w9LZJGEeJYK5cQBVQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.35': - resolution: {integrity: sha512-8aHpWVSfZl3Dy2VNFG9ywmlCPAJx45g0z+qdOeqmYceY7PBAT4QGzii9ig1hPb1pY8K45TXH44UzQwr2fx352Q==} + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.37': + resolution: {integrity: sha512-z8Aa5Kar5mhh0RVZEL+zKJwNz1cgcDISmwUMcTk0w986T8JZJOJCfJ/u9e8pqUTIJjxdM8SZq9/24nMgMlx5ng==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.35': - resolution: {integrity: sha512-1r1Ac/vTcm1q4kRiX/NB6qtorF95PhjdCxKH3Z5pb+bWMDZnmcz18fzFlT/3C6Qpj/ZqUF+EUrG4QEDXtVXGgg==} + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.37': + resolution: {integrity: sha512-e+fNseKhfE/socjOw6VrQcXrbNKfi2V/KZ+ssuLnmeaYNGuJWqPhvML56oYhGb3IgROEEc61lzr3Riy5BIqoMA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-linux-x64-musl@1.0.0-beta.35': - resolution: {integrity: sha512-AFl1LnuhUBDfX2j+cE6DlVGROv4qG7GCPDhR1kJqi2+OuXGDkeEjqRvRQOFErhKz1ckkP/YakvN7JheLJ2PKHQ==} + '@rolldown/binding-linux-x64-musl@1.0.0-beta.37': + resolution: {integrity: sha512-dPZfB396PMIasd19X0ikpdCvjK/7SaJFO8y5/TxnozJEy70vOf4GESe/oKcsJPav/MSTWBYsHjJSO6vX0oAW8g==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-openharmony-arm64@1.0.0-beta.35': - resolution: {integrity: sha512-Tuwb8vPs+TVJlHhyLik+nwln/burvIgaPDgg6wjNZ23F1ttjZi0w0rQSZfAgsX4jaUbylwCETXQmTp3w6vcJMw==} + '@rolldown/binding-openharmony-arm64@1.0.0-beta.37': + resolution: {integrity: sha512-rFjLXoHpRqxJqkSBXHuyt6bhyiIFnvLD9X2iPmCYlfpEkdTbrY1AXg4ZbF8UMO5LM7DAAZm/7vPYPO1TKTA7Sg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-wasm32-wasi@1.0.0-beta.35': - resolution: {integrity: sha512-rG0OozgqNUYcpu50MpICMlJflexRVtQfjlN9QYf6hoel46VvY0FbKGwBKoeUp2K5D4i8lV04DpEMfTZlzRjeiA==} + '@rolldown/binding-wasm32-wasi@1.0.0-beta.37': + resolution: {integrity: sha512-oQAe3lMaBGX6q0GSic0l3Obmd6/rX8R6eHLnRC8kyy/CvPLiCMV82MPGT8fxpPTo/ULFGrupSu2nV1zmOFBt/w==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.35': - resolution: {integrity: sha512-WeOfAZrycFo9+ZqTDp3YDCAOLolymtKGwImrr9n+OW0lpwI2UKyKXbAwGXRhydAYbfrNmuqWyfyoAnLh3X9Hjg==} + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.37': + resolution: {integrity: sha512-ucO6CiZhpkNRiVAk7ybvA9pZaMreCtfHej3BtJcBL5S3aYmp4h0g6TvaXLD5YRJx5sXobp/9A//xU4wPMul3Bg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.35': - resolution: {integrity: sha512-XkLT7ikKGiUDvLh7qtJHRukbyyP1BIrD1xb7A+w4PjIiOKeOH8NqZ+PBaO4plT7JJnLxx+j9g/3B7iylR1nTFQ==} + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.37': + resolution: {integrity: sha512-Ya9DBWJe1EGHwil7ielI8CdE0ELCg6KyDvDQqIFllnTJEYJ1Rb74DK6mvlZo273qz6Mw8WrMm26urfDeZhCc3Q==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.35': - resolution: {integrity: sha512-rftASFKVzjbcQHTCYHaBIDrnQFzbeV50tm4hVugG3tPjd435RHZC2pbeGV5IPdKEqyJSuurM/GfbV3kLQ3LY/A==} + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.37': + resolution: {integrity: sha512-r+RI+wMReoTIF/uXqQWJcD8xGWXzCzUyGdpLmQ8FC+MCyPHlkjEsFRv8OFIYI6HhiGAmbfWVYEGf+aeLJzkHGw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] '@rolldown/pluginutils@1.0.0-beta.29': resolution: {integrity: sha512-NIJgOsMjbxAXvoGq/X0gD7VPMQ8j9g0BiDaNjVNVjvl+iKXxL3Jre0v31RmBYeLEmkbj2s02v8vFTbUXi5XS2Q==} - '@rolldown/pluginutils@1.0.0-beta.35': - resolution: {integrity: sha512-slYrCpoxJUqzFDDNlvrOYRazQUNRvWPjXA17dAOISY3rDMxX6k8K4cj2H+hEYMHF81HO3uNd5rHVigAWRM5dSg==} + '@rolldown/pluginutils@1.0.0-beta.37': + resolution: {integrity: sha512-0taU1HpxFzrukvWIhLRI4YssJX2wOW5q1MxPXWztltsQ13TE51/larZIwhFdpyk7+K43TH7x6GJ8oEqAo+vDbA==} '@rollup/rollup-android-arm-eabi@4.50.1': resolution: {integrity: sha512-HJXwzoZN4eYTdD8bVV22DN8gsPCAj3V20NHKOs8ezfXanGpmVPR7kalUHd+Y31IJp9stdB87VKPFbsGY3H/2ag==} @@ -1725,8 +1738,9 @@ packages: vue-tsc: optional: true - rolldown@1.0.0-beta.35: - resolution: {integrity: sha512-gJATyqcsJe0Cs8RMFO8XgFjfTc0lK1jcSvirDQDSIfsJE+vt53QH/Ob+OBSJsXb98YtZXHfP/bHpELpPwCprow==} + rolldown@1.0.0-beta.37: + resolution: {integrity: sha512-KiTU6z1kHGaLvqaYjgsrv2LshHqNBn74waRZivlK8WbfN1obZeScVkQPKYunB66E/mxZWv/zyZlCv3xF2t0WOQ==} + engines: {node: ^20.19.0 || >=22.12.0} hasBin: true rollup@4.50.1: @@ -1881,6 +1895,7 @@ packages: unplugin-vue-router@0.15.0: resolution: {integrity: sha512-PyGehCjd9Ny9h+Uer4McbBjjib3lHihcyUEILa7pHKl6+rh8N7sFyw4ZkV+N30Oq2zmIUG7iKs3qpL0r+gXAaQ==} + version: 0.15.0 peerDependencies: '@vue/compiler-sfc': ^3.5.17 vue-router: ^4.5.1 @@ -1953,8 +1968,9 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - vue-router@4.5.1: - resolution: {integrity: sha512-ogAF3P97NPm8fJsE4by9dwSYtDwXIY1nFY9T6DyQnGHd1E2Da94w9JIolpe42LJGIl0DwOHBi8TcRPlPGwbTtw==} + vue-router@https://pkg.pr.new/vue-router@cec1347: + resolution: {tarball: https://pkg.pr.new/vue-router@cec1347} + version: 4.5.1 peerDependencies: vue: ^3.2.0 @@ -2316,9 +2332,9 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 - '@oxc-project/runtime@0.82.3': {} + '@oxc-project/runtime@0.87.0': {} - '@oxc-project/types@0.82.3': {} + '@oxc-project/types@0.87.0': {} '@pkgr/core@0.2.9': {} @@ -2326,53 +2342,53 @@ snapshots: dependencies: quansync: 0.2.11 - '@rolldown/binding-android-arm64@1.0.0-beta.35': + '@rolldown/binding-android-arm64@1.0.0-beta.37': optional: true - '@rolldown/binding-darwin-arm64@1.0.0-beta.35': + '@rolldown/binding-darwin-arm64@1.0.0-beta.37': optional: true - '@rolldown/binding-darwin-x64@1.0.0-beta.35': + '@rolldown/binding-darwin-x64@1.0.0-beta.37': optional: true - '@rolldown/binding-freebsd-x64@1.0.0-beta.35': + '@rolldown/binding-freebsd-x64@1.0.0-beta.37': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.35': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.37': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.35': + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.37': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.35': + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.37': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.35': + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.37': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-beta.35': + '@rolldown/binding-linux-x64-musl@1.0.0-beta.37': optional: true - '@rolldown/binding-openharmony-arm64@1.0.0-beta.35': + '@rolldown/binding-openharmony-arm64@1.0.0-beta.37': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-beta.35': + '@rolldown/binding-wasm32-wasi@1.0.0-beta.37': dependencies: '@napi-rs/wasm-runtime': 1.0.3 optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.35': + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.37': optional: true - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.35': + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.37': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.35': + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.37': optional: true '@rolldown/pluginutils@1.0.0-beta.29': {} - '@rolldown/pluginutils@1.0.0-beta.35': {} + '@rolldown/pluginutils@1.0.0-beta.37': {} '@rollup/rollup-android-arm-eabi@4.50.1': optional: true @@ -3779,7 +3795,7 @@ snapshots: reusify@1.1.0: {} - rolldown-plugin-dts@0.15.10(rolldown@1.0.0-beta.35)(typescript@5.9.2)(vue-tsc@3.0.6(typescript@5.9.2)): + rolldown-plugin-dts@0.15.10(rolldown@1.0.0-beta.37)(typescript@5.9.2)(vue-tsc@3.0.6(typescript@5.9.2)): dependencies: '@babel/generator': 7.28.3 '@babel/parser': 7.28.4 @@ -3789,7 +3805,7 @@ snapshots: debug: 4.4.1 dts-resolver: 2.1.2 get-tsconfig: 4.10.1 - rolldown: 1.0.0-beta.35 + rolldown: 1.0.0-beta.37 optionalDependencies: typescript: 5.9.2 vue-tsc: 3.0.6(typescript@5.9.2) @@ -3797,27 +3813,27 @@ snapshots: - oxc-resolver - supports-color - rolldown@1.0.0-beta.35: + rolldown@1.0.0-beta.37: dependencies: - '@oxc-project/runtime': 0.82.3 - '@oxc-project/types': 0.82.3 - '@rolldown/pluginutils': 1.0.0-beta.35 + '@oxc-project/runtime': 0.87.0 + '@oxc-project/types': 0.87.0 + '@rolldown/pluginutils': 1.0.0-beta.37 ansis: 4.1.0 optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-beta.35 - '@rolldown/binding-darwin-arm64': 1.0.0-beta.35 - '@rolldown/binding-darwin-x64': 1.0.0-beta.35 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.35 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.35 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.35 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.35 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.35 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.35 - '@rolldown/binding-openharmony-arm64': 1.0.0-beta.35 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.35 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.35 - '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.35 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.35 + '@rolldown/binding-android-arm64': 1.0.0-beta.37 + '@rolldown/binding-darwin-arm64': 1.0.0-beta.37 + '@rolldown/binding-darwin-x64': 1.0.0-beta.37 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.37 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.37 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.37 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.37 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.37 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.37 + '@rolldown/binding-openharmony-arm64': 1.0.0-beta.37 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.37 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.37 + '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.37 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.37 rollup@4.50.1: dependencies: @@ -3930,8 +3946,8 @@ snapshots: diff: 8.0.2 empathic: 2.0.0 hookable: 5.5.3 - rolldown: 1.0.0-beta.35 - rolldown-plugin-dts: 0.15.10(rolldown@1.0.0-beta.35)(typescript@5.9.2)(vue-tsc@3.0.6(typescript@5.9.2)) + rolldown: 1.0.0-beta.37 + rolldown-plugin-dts: 0.15.10(rolldown@1.0.0-beta.37)(typescript@5.9.2)(vue-tsc@3.0.6(typescript@5.9.2)) semver: 7.7.2 tinyexec: 1.0.1 tinyglobby: 0.2.15 @@ -3987,7 +4003,7 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.3 - unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): + unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@cec1347(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue-macros/common': 3.0.0-beta.16(vue@3.5.21(typescript@5.9.2)) '@vue/compiler-sfc': 3.5.21 @@ -4007,7 +4023,7 @@ snapshots: unplugin-utils: 0.2.5 yaml: 2.8.1 optionalDependencies: - vue-router: 4.5.1(vue@3.5.21(typescript@5.9.2)) + vue-router: https://pkg.pr.new/vue-router@cec1347(vue@3.5.21(typescript@5.9.2)) transitivePeerDependencies: - typescript - vue @@ -4058,7 +4074,7 @@ snapshots: transitivePeerDependencies: - supports-color - vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)): + vue-router@https://pkg.pr.new/vue-router@cec1347(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue/devtools-api': 6.6.4 vue: 3.5.21(typescript@5.9.2) diff --git a/src/App.vue b/src/App.vue index d5890cc..52e8293 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,8 +1,25 @@ + + + + diff --git a/src/main.ts b/src/main.ts index ffb6bf4..539d7b9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,32 +1,57 @@ import { createApp } from 'vue' -import { createNavigationApiRouter, createRouter, createWebHistory } from 'vue-router' +import { createClientRouter, createRouter, createWebHistory } from 'vue-router' import { routes } from 'vue-router/auto-routes' import App from './App.vue' // eslint-disable-next-line no-console console.log(window.navigation) -const router = /* false && */window.navigation - ? createNavigationApiRouter({ - location: '', - routes, - }) - : createRouter({ +const router = createClientRouter({ + legacy: { + factory: () => createRouter({ history: createWebHistory(), routes, - }) + }), + }, + navigationApi: { + options: { + location: '', + routes, + }, + }, + viewTransition: true, +}) -createApp(App).use(router).mount('#app') +router.enableViewTransition({ + onStart(transition) { + // eslint-disable-next-line no-console + console.log('View transition started', transition) + }, + onFinished(transition) { + // eslint-disable-next-line no-console + console.log('View transition finished', transition) + }, + onAborted(transition) { + // eslint-disable-next-line no-console + console.log('View transition aborted', transition) + }, +}) +const app = createApp(App) +app.use(router) + +router.afterEach((to, from) => { + // eslint-disable-next-line no-console + console.log(`AfterEach to ${to.fullPath} from ${from?.fullPath}`) +}) + +app.mount('#app') + +/* router.beforeEach((to, from, _) => { + // eslint-disable-next-line no-console + console.log(`BeforeEach to ${to.fullPath} from ${from?.fullPath}`) +}) */ router.isReady().then(() => { // eslint-disable-next-line no-console console.log('router is ready') - /* router.beforeEach((to, from, _) => { - // eslint-disable-next-line no-console - console.log(`BeforeEach to ${to.fullPath} from ${from?.fullPath}`) - }) - router.afterEach((to, from, _) => { - // eslint-disable-next-line no-console - console.log(`AfterEach to ${to.fullPath} from ${from?.fullPath}`) - }) */ }) From 58ff3118d02762acd1ff9f1abc926a76e130a761 Mon Sep 17 00:00:00 2001 From: userquin Date: Mon, 15 Sep 2025 22:28:19 +0200 Subject: [PATCH 05/13] chore: update createClientRouter logic --- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- src/main.ts | 10 ++++++---- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index f9136d2..80a5f68 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "vue": "^3.5.21", - "vue-router": "https://pkg.pr.new/vue-router@f577bbf" + "vue-router": "https://pkg.pr.new/vue-router@ce59ba7" }, "devDependencies": { "@antfu/eslint-config": "^5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 201431f..3ab04a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^3.5.21 version: 3.5.21(typescript@5.9.2) vue-router: - specifier: https://pkg.pr.new/vue-router@f577bbf - version: https://pkg.pr.new/vue-router@f577bbf(vue@3.5.21(typescript@5.9.2)) + specifier: https://pkg.pr.new/vue-router@ce59ba7 + version: https://pkg.pr.new/vue-router@ce59ba7(vue@3.5.21(typescript@5.9.2)) devDependencies: '@antfu/eslint-config': specifier: ^5.2.2 @@ -38,7 +38,7 @@ importers: version: 5.9.2 unplugin-vue-router: specifier: ^0.15.0 - version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@f577bbf(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) + version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@ce59ba7(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) vite: specifier: ^7.1.4 version: 7.1.4(jiti@2.5.1)(yaml@2.8.1) @@ -1964,8 +1964,8 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - vue-router@https://pkg.pr.new/vue-router@f577bbf: - resolution: {tarball: https://pkg.pr.new/vue-router@f577bbf} + vue-router@https://pkg.pr.new/vue-router@ce59ba7: + resolution: {tarball: https://pkg.pr.new/vue-router@ce59ba7} version: 4.5.1 peerDependencies: vue: ^3.2.0 @@ -3996,7 +3996,7 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.3 - unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@f577bbf(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): + unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@ce59ba7(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue-macros/common': 3.0.0-beta.16(vue@3.5.21(typescript@5.9.2)) '@vue/compiler-sfc': 3.5.21 @@ -4016,7 +4016,7 @@ snapshots: unplugin-utils: 0.2.5 yaml: 2.8.1 optionalDependencies: - vue-router: https://pkg.pr.new/vue-router@f577bbf(vue@3.5.21(typescript@5.9.2)) + vue-router: https://pkg.pr.new/vue-router@ce59ba7(vue@3.5.21(typescript@5.9.2)) transitivePeerDependencies: - typescript - vue @@ -4067,7 +4067,7 @@ snapshots: transitivePeerDependencies: - supports-color - vue-router@https://pkg.pr.new/vue-router@f577bbf(vue@3.5.21(typescript@5.9.2)): + vue-router@https://pkg.pr.new/vue-router@ce59ba7(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue/devtools-api': 6.6.4 vue: 3.5.21(typescript@5.9.2) diff --git a/src/main.ts b/src/main.ts index 539d7b9..77b6a92 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,10 +8,12 @@ console.log(window.navigation) const router = createClientRouter({ legacy: { - factory: () => createRouter({ - history: createWebHistory(), - routes, - }), + factory(transitionMode) { + return createRouter({ + history: createWebHistory(), + routes, + }, transitionMode) + }, }, navigationApi: { options: { From ca1f33c4edbf1199531a13245e96e760ccab4a2f Mon Sep 17 00:00:00 2001 From: userquin Date: Mon, 15 Sep 2025 22:30:27 +0200 Subject: [PATCH 06/13] docs: update readme file instructions --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f3df43..90f86f3 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,6 @@ This branch using this [feat: add navigation-api router](https://github.com/vuej Now the `vue-router` supports the [Navigation API](https://wicg.github.io/navigation-api/) and you can use the browser back and forward buttons. -To check switch between the transition modes, just add/remove the `viewTransition: true,` line in the `createClientRouter` call, refresh the page and navigate with the header links. +To check switch between the transition modes, just adding or removin the `viewTransition: true,` line in the `createClientRouter` call, refresh the page and navigate with the header links. + +You can also switch between Navigation API and Web History API router by adding or removing the `navigationApi` option or use Firefox or Safari that don't support the Navigation API. From f5088e48af2f7b52a65f4be7a75960d792e1e1ed Mon Sep 17 00:00:00 2001 From: userquin Date: Mon, 15 Sep 2025 22:47:15 +0200 Subject: [PATCH 07/13] docs: . --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 90f86f3..841bf8a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,6 @@ This branch using this [feat: add navigation-api router](https://github.com/vuej Now the `vue-router` supports the [Navigation API](https://wicg.github.io/navigation-api/) and you can use the browser back and forward buttons. -To check switch between the transition modes, just adding or removin the `viewTransition: true,` line in the `createClientRouter` call, refresh the page and navigate with the header links. +Now can can use native view or vue transition, to switch between the transition modes, just add or remove the `viewTransition: true,` line in the `createClientRouter` call, refresh the page and navigate with the header links or back and forward browser buttons. You can also switch between Navigation API and Web History API router by adding or removing the `navigationApi` option or use Firefox or Safari that don't support the Navigation API. From 9ac4e857ef10f61a97789b208ba6a0e59a8f5545 Mon Sep 17 00:00:00 2001 From: userquin Date: Mon, 15 Sep 2025 22:47:52 +0200 Subject: [PATCH 08/13] docs: . --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 841bf8a..7e5f486 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,6 @@ This branch using this [feat: add navigation-api router](https://github.com/vuej Now the `vue-router` supports the [Navigation API](https://wicg.github.io/navigation-api/) and you can use the browser back and forward buttons. -Now can can use native view or vue transition, to switch between the transition modes, just add or remove the `viewTransition: true,` line in the `createClientRouter` call, refresh the page and navigate with the header links or back and forward browser buttons. +Now we can use native view or vue transitions, to switch between the transition modes, just add or remove the `viewTransition: true,` line in the `createClientRouter` call, refresh the page and navigate with the header links or back and forward browser buttons. You can also switch between Navigation API and Web History API router by adding or removing the `navigationApi` option or use Firefox or Safari that don't support the Navigation API. From a5e65c6fd9a283d8b4c40022c6107e6cb0c4688c Mon Sep 17 00:00:00 2001 From: userquin Date: Tue, 16 Sep 2025 01:29:24 +0200 Subject: [PATCH 09/13] chore: add dom-navigation polyfill --- README.md | 4 ++++ index.html | 1 + package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7e5f486..5775e4b 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,7 @@ Now the `vue-router` supports the [Navigation API](https://wicg.github.io/naviga Now we can use native view or vue transitions, to switch between the transition modes, just add or remove the `viewTransition: true,` line in the `createClientRouter` call, refresh the page and navigate with the header links or back and forward browser buttons. You can also switch between Navigation API and Web History API router by adding or removing the `navigationApi` option or use Firefox or Safari that don't support the Navigation API. + +Unexpected result, using the [dom-navigation](https://github.com/virtualstate/navigation?tab=readme-ov-file#polyfill) polyfill, we are able to detect the back and forward buttons in Firefox (Safari not yet tested), but the navigation not being fired, so the view is not changing. + +If you want to disable the `dom-navigation` polyfill, just remove the script module in the index.html page. diff --git a/index.html b/index.html index b614ca9..4bcc160 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ Vite + Vue + TS +
diff --git a/package.json b/package.json index 80a5f68..9de75b2 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "vue": "^3.5.21", - "vue-router": "https://pkg.pr.new/vue-router@ce59ba7" + "vue-router": "https://pkg.pr.new/vue-router@8d3ce6a" }, "devDependencies": { "@antfu/eslint-config": "^5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ab04a9..7a5c66e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^3.5.21 version: 3.5.21(typescript@5.9.2) vue-router: - specifier: https://pkg.pr.new/vue-router@ce59ba7 - version: https://pkg.pr.new/vue-router@ce59ba7(vue@3.5.21(typescript@5.9.2)) + specifier: https://pkg.pr.new/vue-router@8d3ce6a + version: https://pkg.pr.new/vue-router@8d3ce6a(vue@3.5.21(typescript@5.9.2)) devDependencies: '@antfu/eslint-config': specifier: ^5.2.2 @@ -38,7 +38,7 @@ importers: version: 5.9.2 unplugin-vue-router: specifier: ^0.15.0 - version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@ce59ba7(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) + version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@8d3ce6a(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) vite: specifier: ^7.1.4 version: 7.1.4(jiti@2.5.1)(yaml@2.8.1) @@ -1964,8 +1964,8 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - vue-router@https://pkg.pr.new/vue-router@ce59ba7: - resolution: {tarball: https://pkg.pr.new/vue-router@ce59ba7} + vue-router@https://pkg.pr.new/vue-router@8d3ce6a: + resolution: {tarball: https://pkg.pr.new/vue-router@8d3ce6a} version: 4.5.1 peerDependencies: vue: ^3.2.0 @@ -3996,7 +3996,7 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.3 - unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@ce59ba7(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): + unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@8d3ce6a(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue-macros/common': 3.0.0-beta.16(vue@3.5.21(typescript@5.9.2)) '@vue/compiler-sfc': 3.5.21 @@ -4016,7 +4016,7 @@ snapshots: unplugin-utils: 0.2.5 yaml: 2.8.1 optionalDependencies: - vue-router: https://pkg.pr.new/vue-router@ce59ba7(vue@3.5.21(typescript@5.9.2)) + vue-router: https://pkg.pr.new/vue-router@8d3ce6a(vue@3.5.21(typescript@5.9.2)) transitivePeerDependencies: - typescript - vue @@ -4067,7 +4067,7 @@ snapshots: transitivePeerDependencies: - supports-color - vue-router@https://pkg.pr.new/vue-router@ce59ba7(vue@3.5.21(typescript@5.9.2)): + vue-router@https://pkg.pr.new/vue-router@8d3ce6a(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue/devtools-api': 6.6.4 vue: 3.5.21(typescript@5.9.2) From a288b52469b6c1543c7f38bdc684745a4006f798 Mon Sep 17 00:00:00 2001 From: userquin Date: Tue, 16 Sep 2025 02:00:14 +0200 Subject: [PATCH 10/13] chore: don't add dom-navigation polyfill --- README.md | 2 +- index.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5775e4b..4d63dd7 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,4 @@ You can also switch between Navigation API and Web History API router by adding Unexpected result, using the [dom-navigation](https://github.com/virtualstate/navigation?tab=readme-ov-file#polyfill) polyfill, we are able to detect the back and forward buttons in Firefox (Safari not yet tested), but the navigation not being fired, so the view is not changing. -If you want to disable the `dom-navigation` polyfill, just remove the script module in the index.html page. +If you want to enable or disable the `dom-navigation` polyfill, just add or remove the script module in the index.html page. diff --git a/index.html b/index.html index 4bcc160..b5a83dc 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,9 @@ Vite + Vue + TS +
From 8bf5919c7b85fb486a13536a2a9c6e87211efd9f Mon Sep 17 00:00:00 2001 From: userquin Date: Wed, 17 Sep 2025 18:13:36 +0200 Subject: [PATCH 11/13] chore: add scroll restoration page --- package.json | 2 +- pnpm-lock.yaml | 16 ++--- src/App.vue | 3 + src/pages/scroll-restoration.vue | 108 +++++++++++++++++++++++++++++++ typed-router.d.ts | 5 ++ 5 files changed, 125 insertions(+), 9 deletions(-) create mode 100644 src/pages/scroll-restoration.vue diff --git a/package.json b/package.json index 9de75b2..37e449e 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "vue": "^3.5.21", - "vue-router": "https://pkg.pr.new/vue-router@8d3ce6a" + "vue-router": "https://pkg.pr.new/vue-router@b74d264" }, "devDependencies": { "@antfu/eslint-config": "^5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7a5c66e..11f0cd0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^3.5.21 version: 3.5.21(typescript@5.9.2) vue-router: - specifier: https://pkg.pr.new/vue-router@8d3ce6a - version: https://pkg.pr.new/vue-router@8d3ce6a(vue@3.5.21(typescript@5.9.2)) + specifier: https://pkg.pr.new/vue-router@b74d264 + version: https://pkg.pr.new/vue-router@b74d264(vue@3.5.21(typescript@5.9.2)) devDependencies: '@antfu/eslint-config': specifier: ^5.2.2 @@ -38,7 +38,7 @@ importers: version: 5.9.2 unplugin-vue-router: specifier: ^0.15.0 - version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@8d3ce6a(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) + version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@b74d264(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) vite: specifier: ^7.1.4 version: 7.1.4(jiti@2.5.1)(yaml@2.8.1) @@ -1964,8 +1964,8 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - vue-router@https://pkg.pr.new/vue-router@8d3ce6a: - resolution: {tarball: https://pkg.pr.new/vue-router@8d3ce6a} + vue-router@https://pkg.pr.new/vue-router@b74d264: + resolution: {tarball: https://pkg.pr.new/vue-router@b74d264} version: 4.5.1 peerDependencies: vue: ^3.2.0 @@ -3996,7 +3996,7 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.3 - unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@8d3ce6a(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): + unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@b74d264(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue-macros/common': 3.0.0-beta.16(vue@3.5.21(typescript@5.9.2)) '@vue/compiler-sfc': 3.5.21 @@ -4016,7 +4016,7 @@ snapshots: unplugin-utils: 0.2.5 yaml: 2.8.1 optionalDependencies: - vue-router: https://pkg.pr.new/vue-router@8d3ce6a(vue@3.5.21(typescript@5.9.2)) + vue-router: https://pkg.pr.new/vue-router@b74d264(vue@3.5.21(typescript@5.9.2)) transitivePeerDependencies: - typescript - vue @@ -4067,7 +4067,7 @@ snapshots: transitivePeerDependencies: - supports-color - vue-router@https://pkg.pr.new/vue-router@8d3ce6a(vue@3.5.21(typescript@5.9.2)): + vue-router@https://pkg.pr.new/vue-router@b74d264(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue/devtools-api': 6.6.4 vue: 3.5.21(typescript@5.9.2) diff --git a/src/App.vue b/src/App.vue index 47f3aca..728c09e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,6 +27,9 @@ router.beforeEach((to, from, next, info) => { Go to B + + Go to Scrol restoration +
diff --git a/src/pages/scroll-restoration.vue b/src/pages/scroll-restoration.vue new file mode 100644 index 0000000..fed6750 --- /dev/null +++ b/src/pages/scroll-restoration.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/typed-router.d.ts b/typed-router.d.ts index 6e5e9d2..f379ad9 100644 --- a/typed-router.d.ts +++ b/typed-router.d.ts @@ -21,6 +21,7 @@ declare module 'vue-router/auto-routes' { '/': RouteRecordInfo<'/', '/', Record, Record>, '/a': RouteRecordInfo<'/a', '/a', Record, Record>, '/b': RouteRecordInfo<'/b', '/b', Record, Record>, + '/scroll-restoration': RouteRecordInfo<'/scroll-restoration', '/scroll-restoration', Record, Record>, } /** @@ -46,6 +47,10 @@ declare module 'vue-router/auto-routes' { routes: '/b' views: never } + 'src/pages/scroll-restoration.vue': { + routes: '/scroll-restoration' + views: never + } } /** From 4ac1d88d4b756bdadc488bd7258264e21448d2bd Mon Sep 17 00:00:00 2001 From: userquin Date: Wed, 17 Sep 2025 23:03:39 +0200 Subject: [PATCH 12/13] chore: enable focus and scroll management "polyfills" --- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- src/main.ts | 2 ++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 37e449e..cb73109 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "vue": "^3.5.21", - "vue-router": "https://pkg.pr.new/vue-router@b74d264" + "vue-router": "https://pkg.pr.new/vue-router@d282525" }, "devDependencies": { "@antfu/eslint-config": "^5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 11f0cd0..ccc1094 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^3.5.21 version: 3.5.21(typescript@5.9.2) vue-router: - specifier: https://pkg.pr.new/vue-router@b74d264 - version: https://pkg.pr.new/vue-router@b74d264(vue@3.5.21(typescript@5.9.2)) + specifier: https://pkg.pr.new/vue-router@d282525 + version: https://pkg.pr.new/vue-router@d282525(vue@3.5.21(typescript@5.9.2)) devDependencies: '@antfu/eslint-config': specifier: ^5.2.2 @@ -38,7 +38,7 @@ importers: version: 5.9.2 unplugin-vue-router: specifier: ^0.15.0 - version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@b74d264(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) + version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@d282525(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) vite: specifier: ^7.1.4 version: 7.1.4(jiti@2.5.1)(yaml@2.8.1) @@ -1964,8 +1964,8 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - vue-router@https://pkg.pr.new/vue-router@b74d264: - resolution: {tarball: https://pkg.pr.new/vue-router@b74d264} + vue-router@https://pkg.pr.new/vue-router@d282525: + resolution: {tarball: https://pkg.pr.new/vue-router@d282525} version: 4.5.1 peerDependencies: vue: ^3.2.0 @@ -3996,7 +3996,7 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.3 - unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@b74d264(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): + unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@d282525(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue-macros/common': 3.0.0-beta.16(vue@3.5.21(typescript@5.9.2)) '@vue/compiler-sfc': 3.5.21 @@ -4016,7 +4016,7 @@ snapshots: unplugin-utils: 0.2.5 yaml: 2.8.1 optionalDependencies: - vue-router: https://pkg.pr.new/vue-router@b74d264(vue@3.5.21(typescript@5.9.2)) + vue-router: https://pkg.pr.new/vue-router@d282525(vue@3.5.21(typescript@5.9.2)) transitivePeerDependencies: - typescript - vue @@ -4067,7 +4067,7 @@ snapshots: transitivePeerDependencies: - supports-color - vue-router@https://pkg.pr.new/vue-router@b74d264(vue@3.5.21(typescript@5.9.2)): + vue-router@https://pkg.pr.new/vue-router@d282525(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue/devtools-api': 6.6.4 vue: 3.5.21(typescript@5.9.2) diff --git a/src/main.ts b/src/main.ts index 77b6a92..b77eb3d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,6 +10,8 @@ const router = createClientRouter({ legacy: { factory(transitionMode) { return createRouter({ + enableScrollManagement: true, + focusManagement: true, history: createWebHistory(), routes, }, transitionMode) From 0119e8df784e2bbd2f75856104a5fd2084e3e85d Mon Sep 17 00:00:00 2001 From: userquin Date: Wed, 17 Sep 2025 23:45:26 +0200 Subject: [PATCH 13/13] chore: use createModernRouter --- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- src/main.ts | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index cb73109..85f17f6 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "vue": "^3.5.21", - "vue-router": "https://pkg.pr.new/vue-router@d282525" + "vue-router": "https://pkg.pr.new/vue-router@11632e0" }, "devDependencies": { "@antfu/eslint-config": "^5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ccc1094..8ec847d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^3.5.21 version: 3.5.21(typescript@5.9.2) vue-router: - specifier: https://pkg.pr.new/vue-router@d282525 - version: https://pkg.pr.new/vue-router@d282525(vue@3.5.21(typescript@5.9.2)) + specifier: https://pkg.pr.new/vue-router@11632e0 + version: https://pkg.pr.new/vue-router@11632e0(vue@3.5.21(typescript@5.9.2)) devDependencies: '@antfu/eslint-config': specifier: ^5.2.2 @@ -38,7 +38,7 @@ importers: version: 5.9.2 unplugin-vue-router: specifier: ^0.15.0 - version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@d282525(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) + version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@11632e0(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) vite: specifier: ^7.1.4 version: 7.1.4(jiti@2.5.1)(yaml@2.8.1) @@ -1964,8 +1964,8 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - vue-router@https://pkg.pr.new/vue-router@d282525: - resolution: {tarball: https://pkg.pr.new/vue-router@d282525} + vue-router@https://pkg.pr.new/vue-router@11632e0: + resolution: {tarball: https://pkg.pr.new/vue-router@11632e0} version: 4.5.1 peerDependencies: vue: ^3.2.0 @@ -3996,7 +3996,7 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.3 - unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@d282525(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): + unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@https://pkg.pr.new/vue-router@11632e0(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue-macros/common': 3.0.0-beta.16(vue@3.5.21(typescript@5.9.2)) '@vue/compiler-sfc': 3.5.21 @@ -4016,7 +4016,7 @@ snapshots: unplugin-utils: 0.2.5 yaml: 2.8.1 optionalDependencies: - vue-router: https://pkg.pr.new/vue-router@d282525(vue@3.5.21(typescript@5.9.2)) + vue-router: https://pkg.pr.new/vue-router@11632e0(vue@3.5.21(typescript@5.9.2)) transitivePeerDependencies: - typescript - vue @@ -4067,7 +4067,7 @@ snapshots: transitivePeerDependencies: - supports-color - vue-router@https://pkg.pr.new/vue-router@d282525(vue@3.5.21(typescript@5.9.2)): + vue-router@https://pkg.pr.new/vue-router@11632e0(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue/devtools-api': 6.6.4 vue: 3.5.21(typescript@5.9.2) diff --git a/src/main.ts b/src/main.ts index b77eb3d..fa80b48 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,12 +1,12 @@ import { createApp } from 'vue' -import { createClientRouter, createRouter, createWebHistory } from 'vue-router' +import { createModernRouter, createRouter, createWebHistory } from 'vue-router' import { routes } from 'vue-router/auto-routes' import App from './App.vue' // eslint-disable-next-line no-console console.log(window.navigation) -const router = createClientRouter({ +const router = createModernRouter({ legacy: { factory(transitionMode) { return createRouter({