@esmx/router 3.0.0-rc.30 → 3.0.0-rc.32
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/navigation.mjs +4 -4
- package/package.json +3 -3
- package/src/navigation.ts +4 -4
package/dist/navigation.mjs
CHANGED
|
@@ -24,20 +24,20 @@ export class Navigation {
|
|
|
24
24
|
return this._history.length;
|
|
25
25
|
}
|
|
26
26
|
_push(history2, data, url) {
|
|
27
|
-
const state =
|
|
27
|
+
const state = {
|
|
28
28
|
...data || {},
|
|
29
29
|
[PAGE_ID_KEY]: PAGE_ID.next()
|
|
30
|
-
}
|
|
30
|
+
};
|
|
31
31
|
history2.pushState(state, "", url);
|
|
32
32
|
return state;
|
|
33
33
|
}
|
|
34
34
|
_replace(history2, data, url) {
|
|
35
35
|
var _a;
|
|
36
36
|
const oldId = (_a = history2.state) == null ? void 0 : _a[PAGE_ID_KEY];
|
|
37
|
-
const state =
|
|
37
|
+
const state = {
|
|
38
38
|
...data || {},
|
|
39
39
|
[PAGE_ID_KEY]: typeof oldId === "number" ? oldId : PAGE_ID.next()
|
|
40
|
-
}
|
|
40
|
+
};
|
|
41
41
|
history2.replaceState(state, "", url);
|
|
42
42
|
return state;
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@biomejs/biome": "1.9.4",
|
|
35
|
-
"@esmx/lint": "3.0.0-rc.
|
|
35
|
+
"@esmx/lint": "3.0.0-rc.32",
|
|
36
36
|
"@types/node": "^24.0.0",
|
|
37
37
|
"@vitest/coverage-v8": "3.2.4",
|
|
38
38
|
"happy-dom": "^18.0.1",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"unbuild": "3.5.0",
|
|
42
42
|
"vitest": "3.2.4"
|
|
43
43
|
},
|
|
44
|
-
"version": "3.0.0-rc.
|
|
44
|
+
"version": "3.0.0-rc.32",
|
|
45
45
|
"type": "module",
|
|
46
46
|
"private": false,
|
|
47
47
|
"exports": {
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"template",
|
|
61
61
|
"public"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "8f7c52dde97c2cf74a783e578328cc72bde78c3b"
|
|
64
64
|
}
|
package/src/navigation.ts
CHANGED
|
@@ -48,10 +48,10 @@ export class Navigation {
|
|
|
48
48
|
data: any,
|
|
49
49
|
url?: string | URL | null
|
|
50
50
|
): RouteState {
|
|
51
|
-
const state =
|
|
51
|
+
const state = {
|
|
52
52
|
...(data || {}),
|
|
53
53
|
[PAGE_ID_KEY]: PAGE_ID.next()
|
|
54
|
-
}
|
|
54
|
+
};
|
|
55
55
|
history.pushState(state, '', url);
|
|
56
56
|
return state;
|
|
57
57
|
}
|
|
@@ -62,10 +62,10 @@ export class Navigation {
|
|
|
62
62
|
url?: string | URL | null
|
|
63
63
|
): RouteState {
|
|
64
64
|
const oldId = history.state?.[PAGE_ID_KEY];
|
|
65
|
-
const state =
|
|
65
|
+
const state = {
|
|
66
66
|
...(data || {}),
|
|
67
67
|
[PAGE_ID_KEY]: typeof oldId === 'number' ? oldId : PAGE_ID.next()
|
|
68
|
-
}
|
|
68
|
+
};
|
|
69
69
|
history.replaceState(state, '', url);
|
|
70
70
|
return state;
|
|
71
71
|
}
|