@tinkoff/router 0.5.115 → 0.5.198
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/lib/components/react/context.d.ts +1 -0
- package/lib/components/react/providers/transitions.browser.js +14 -3
- package/lib/components/react/providers/transitions.es.js +14 -3
- package/lib/components/react/providers/transitions.js +14 -3
- package/lib/components/react/useViewTransition.browser.js +9 -3
- package/lib/components/react/useViewTransition.d.ts +6 -1
- package/lib/components/react/useViewTransition.es.js +9 -3
- package/lib/components/react/useViewTransition.js +9 -3
- package/lib/history/base.browser.js +3 -0
- package/lib/history/base.d.ts +14 -1
- package/lib/history/base.es.js +3 -0
- package/lib/history/base.js +3 -0
- package/lib/history/client.browser.js +22 -2
- package/lib/history/client.d.ts +4 -8
- package/lib/history/client.es.js +22 -2
- package/lib/history/client.js +22 -2
- package/lib/history/server.d.ts +1 -0
- package/lib/history/server.es.js +7 -0
- package/lib/history/server.js +7 -0
- package/lib/history/wrapper.browser.js +8 -3
- package/lib/history/wrapper.d.ts +2 -1
- package/lib/history/wrapper.es.js +8 -3
- package/lib/history/wrapper.js +8 -3
- package/lib/router/abstract.browser.js +38 -13
- package/lib/router/abstract.d.ts +1 -0
- package/lib/router/abstract.es.js +38 -13
- package/lib/router/abstract.js +38 -13
- package/lib/router/browser.browser.js +67 -26
- package/lib/router/browser.d.ts +3 -1
- package/lib/router/client.browser.js +8 -3
- package/lib/router/client.d.ts +1 -0
- package/lib/router/client.es.js +8 -3
- package/lib/router/client.js +8 -3
- package/lib/router/constants.browser.js +6 -0
- package/lib/router/constants.d.ts +5 -0
- package/lib/router/constants.es.js +6 -0
- package/lib/router/constants.js +10 -0
- package/lib/router/server.es.js +3 -1
- package/lib/router/server.js +3 -1
- package/lib/tree/tree.browser.js +1 -0
- package/lib/tree/tree.es.js +1 -0
- package/lib/tree/tree.js +1 -0
- package/lib/types.d.ts +17 -1
- package/package.json +6 -6
package/lib/tree/tree.es.js
CHANGED
package/lib/tree/tree.js
CHANGED
package/lib/types.d.ts
CHANGED
|
@@ -27,12 +27,17 @@ export interface BaseNavigateOptions {
|
|
|
27
27
|
}
|
|
28
28
|
export interface NavigateOptions extends BaseNavigateOptions {
|
|
29
29
|
url?: string;
|
|
30
|
+
isBack?: boolean;
|
|
30
31
|
viewTransition?: boolean;
|
|
32
|
+
viewTransitionTypes?: string[];
|
|
33
|
+
hasUAVisualTransition?: boolean;
|
|
31
34
|
}
|
|
32
35
|
export type UpdateCurrentRouteOptions = BaseNavigateOptions;
|
|
33
36
|
export interface HistoryOptions {
|
|
34
|
-
historyFallback
|
|
37
|
+
historyFallback?: string;
|
|
35
38
|
replace?: boolean;
|
|
39
|
+
viewTransition?: boolean;
|
|
40
|
+
viewTransitionTypes?: string[];
|
|
36
41
|
}
|
|
37
42
|
export type NavigationType = 'navigate' | 'updateCurrentRoute';
|
|
38
43
|
export interface Navigation {
|
|
@@ -47,6 +52,7 @@ export interface Navigation {
|
|
|
47
52
|
cancelled?: boolean;
|
|
48
53
|
skipped?: boolean;
|
|
49
54
|
code?: number;
|
|
55
|
+
isBack?: boolean;
|
|
50
56
|
redirect?: boolean;
|
|
51
57
|
redirectFrom?: NavigationRoute;
|
|
52
58
|
/**
|
|
@@ -58,6 +64,8 @@ export interface Navigation {
|
|
|
58
64
|
* Activates View Transition to this navigation
|
|
59
65
|
*/
|
|
60
66
|
viewTransition?: boolean;
|
|
67
|
+
viewTransitionTypes?: string[];
|
|
68
|
+
hasUAVisualTransition?: boolean;
|
|
61
69
|
}
|
|
62
70
|
export type NavigationGuard = (navigation: Navigation) => Promise<void | NavigateOptions | string | boolean>;
|
|
63
71
|
export type NavigationHook = (navigation: Navigation) => Promise<void>;
|
|
@@ -67,4 +75,12 @@ export type SyncHookName = 'change';
|
|
|
67
75
|
export type RouterPlugin = {
|
|
68
76
|
apply(router: AbstractRouter): void;
|
|
69
77
|
};
|
|
78
|
+
export interface HistoryState {
|
|
79
|
+
key: string;
|
|
80
|
+
type: NavigationType;
|
|
81
|
+
navigateState?: any;
|
|
82
|
+
index: number;
|
|
83
|
+
viewTransition?: boolean;
|
|
84
|
+
viewTransitionTypes?: string[];
|
|
85
|
+
}
|
|
70
86
|
//# sourceMappingURL=types.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinkoff/router",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.198",
|
|
4
4
|
"description": "router",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"module": "lib/index.es.js",
|
|
8
8
|
"browser": {
|
|
9
|
-
"./lib/
|
|
10
|
-
"./lib/
|
|
9
|
+
"./lib/index.es.js": "./lib/index.browser.js",
|
|
10
|
+
"./lib/router/server.js": "./lib/router/browser.js"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"lib"
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"watch": "tsc -w"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
+
"@tinkoff/hook-runner": "0.7.4",
|
|
24
25
|
"@tinkoff/react-hooks": "0.4.2",
|
|
25
|
-
"@tinkoff/url": "0.11.
|
|
26
|
+
"@tinkoff/url": "0.11.3",
|
|
26
27
|
"@tinkoff/utils": "^2.1.2",
|
|
27
|
-
"@tinkoff/hook-runner": "0.7.3",
|
|
28
28
|
"use-sync-external-store": "^1.4.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@tramvai/core": "5.
|
|
31
|
+
"@tramvai/core": "5.53.74",
|
|
32
32
|
"react": ">=16.14.0",
|
|
33
33
|
"tslib": "^2.4.0"
|
|
34
34
|
},
|