@real-router/svelte 0.17.0 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dom-utils/link-utils.js +20 -7
- package/package.json +4 -4
|
@@ -114,13 +114,26 @@ export function navigateWithHash(router, routeName, routeParams, routeSearch, ha
|
|
|
114
114
|
opts.hash = hash;
|
|
115
115
|
}
|
|
116
116
|
const current = router.getState();
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
// "Does this link point at where we already are?" is a question the router
|
|
118
|
+
// owns, and asking it here by hand got two things wrong at once (#1555).
|
|
119
|
+
//
|
|
120
|
+
// The hand-rolled version compared with `Object.is` per key, so a link writing
|
|
121
|
+
// `routeSearch={{ page: "2" }}` never matched a state parsed from `?page=2`,
|
|
122
|
+
// where the value is the NUMBER 2 — the bypass silently did not fire, core
|
|
123
|
+
// rejected the navigation as SAME_STATES, and `<Link hash>` looked dead. The
|
|
124
|
+
// predicate carries the provenance-tolerant comparison (#1554) that makes the
|
|
125
|
+
// two forms equal because they print the same URL.
|
|
126
|
+
//
|
|
127
|
+
// It also compared the caller's whole `routeParams` bag against `state.params`,
|
|
128
|
+
// which stopped meaning anything once the channels split (#1548) — the
|
|
129
|
+
// predicate applies the channel rule instead of re-deriving it.
|
|
130
|
+
//
|
|
131
|
+
// `strictEquality: true` — a link to a PARENT route is a different location, so
|
|
132
|
+
// the hierarchical arm must not match. `ignoreQueryParams: false` — the query is
|
|
133
|
+
// part of the location here; ignoring it would fire the bypass across a real
|
|
134
|
+
// query change and let `force: true` smuggle it through as a hash change.
|
|
135
|
+
if (current !== undefined &&
|
|
136
|
+
router.isActiveRoute(routeName, routeParams, routeSearch ?? current.search, true, false)) {
|
|
124
137
|
const currentHash = current.context?.url?.hash ??
|
|
125
138
|
"";
|
|
126
139
|
const newHash = hash ?? currentHash;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@real-router/svelte",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Svelte 5 integration for Real-Router",
|
|
6
6
|
"svelte": "./dist/index.js",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"sideEffects": false,
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@real-router/core": "^0.
|
|
51
|
+
"@real-router/core": "^0.83.0",
|
|
52
52
|
"@real-router/route-utils": "^0.3.0",
|
|
53
|
-
"@real-router/sources": "^0.13.
|
|
53
|
+
"@real-router/sources": "^0.13.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@sveltejs/package": "2.5.8",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"svelte": "~5.56.4",
|
|
64
64
|
"svelte-check": "4.6.0",
|
|
65
65
|
"svelte-eslint-parser": "1.8.0",
|
|
66
|
-
"@real-router/browser-plugin": "^0.19.
|
|
66
|
+
"@real-router/browser-plugin": "^0.19.1"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"svelte": ">=5.7.0"
|