@real-router/svelte 0.17.41 → 0.17.43
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.
|
@@ -21,7 +21,7 @@ let announcerRefCount = 0;
|
|
|
21
21
|
// touches the shared refcount / element ONLY if its generation is still current.
|
|
22
22
|
// A stale instance — whose element a host wiped without calling destroy() — must
|
|
23
23
|
// not decrement the new generation's refcount (→ negative) or remove its live
|
|
24
|
-
// element (
|
|
24
|
+
// element (a selector-based removeAnnouncer takes whoever is in the DOM).
|
|
25
25
|
let announcerGeneration = 0;
|
|
26
26
|
export function createRouteAnnouncer(router, options) {
|
|
27
27
|
// Defensive SSR / non-browser guard: in SSR (Node.js) or non-DOM
|
|
@@ -18,7 +18,7 @@ export interface ScrollRestorationOptions {
|
|
|
18
18
|
*/
|
|
19
19
|
behavior?: ScrollBehavior | undefined;
|
|
20
20
|
/**
|
|
21
|
-
* sessionStorage key
|
|
21
|
+
* sessionStorage key for persisting saved scroll positions. Default:
|
|
22
22
|
* `"real-router:scroll"`. Override only when multiple independent
|
|
23
23
|
* `RouterProvider` instances share the same document and you need to
|
|
24
24
|
* isolate their scroll stores (e.g. micro-frontends, embedded widgets,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Captured like the deciding seven, but this one BUILDS the guarantee (#2072). */
|
|
2
|
+
const objectCreate = Object.create;
|
|
1
3
|
/**
|
|
2
4
|
* Intrinsics captured at module load (#1971).
|
|
3
5
|
*
|
|
@@ -71,10 +73,10 @@ export function createScrollRestoration(router, options) {
|
|
|
71
73
|
const parsed = raw
|
|
72
74
|
? JSON.parse(raw)
|
|
73
75
|
: undefined;
|
|
74
|
-
store = Object.assign(
|
|
76
|
+
store = Object.assign(objectCreate(null), parsed);
|
|
75
77
|
}
|
|
76
78
|
catch {
|
|
77
|
-
store =
|
|
79
|
+
store = objectCreate(null);
|
|
78
80
|
}
|
|
79
81
|
return store;
|
|
80
82
|
};
|
|
@@ -448,7 +450,7 @@ function canonicalReplacer(_key, val) {
|
|
|
448
450
|
// implementations are still intentionally divergent (see the doc-block
|
|
449
451
|
// on [[canonicalJson]] above), but prototype-safety is non-negotiable
|
|
450
452
|
// on both. Lock-test: scrollRestoreKey.properties.ts Invariant 11.
|
|
451
|
-
const sorted =
|
|
453
|
+
const sorted = objectCreate(null);
|
|
452
454
|
// eslint-disable-next-line unicorn/no-array-sort -- ng-packagr uses pre-ES2023 lib; toSorted unavailable
|
|
453
455
|
const keys = objectKeys(val).sort((left, right) => left.localeCompare(right));
|
|
454
456
|
for (const key of keys) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@real-router/svelte",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.43",
|
|
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.
|
|
52
|
-
"@real-router/route-utils": "^0.3.
|
|
53
|
-
"@real-router/sources": "^0.14.
|
|
51
|
+
"@real-router/core": "^0.120.1",
|
|
52
|
+
"@real-router/route-utils": "^0.3.1",
|
|
53
|
+
"@real-router/sources": "^0.14.24"
|
|
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.22.
|
|
66
|
+
"@real-router/browser-plugin": "^0.22.6"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"svelte": ">=5.7.0"
|