@react-navigation/routers 8.0.0-alpha.2 → 8.0.0-alpha.20
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/module/BaseRouter.js +64 -61
- package/lib/module/BaseRouter.js.map +1 -1
- package/lib/module/CommonActions.js +9 -21
- package/lib/module/CommonActions.js.map +1 -1
- package/lib/module/DrawerRouter.js +15 -14
- package/lib/module/DrawerRouter.js.map +1 -1
- package/lib/module/StackRouter.js +287 -166
- package/lib/module/StackRouter.js.map +1 -1
- package/lib/module/SwitchRouter.js +426 -0
- package/lib/module/SwitchRouter.js.map +1 -0
- package/lib/module/TabRouter.js +14 -290
- package/lib/module/TabRouter.js.map +1 -1
- package/lib/typescript/src/BaseRouter.d.ts +10 -8
- package/lib/typescript/src/BaseRouter.d.ts.map +1 -1
- package/lib/typescript/src/CommonActions.d.ts +42 -39
- package/lib/typescript/src/CommonActions.d.ts.map +1 -1
- package/lib/typescript/src/DrawerRouter.d.ts +6 -5
- package/lib/typescript/src/DrawerRouter.d.ts.map +1 -1
- package/lib/typescript/src/StackRouter.d.ts +70 -24
- package/lib/typescript/src/StackRouter.d.ts.map +1 -1
- package/lib/typescript/src/SwitchRouter.d.ts +69 -0
- package/lib/typescript/src/SwitchRouter.d.ts.map +1 -0
- package/lib/typescript/src/TabRouter.d.ts +4 -24
- package/lib/typescript/src/TabRouter.d.ts.map +1 -1
- package/lib/typescript/src/createParamsFromAction.d.ts +2 -2
- package/lib/typescript/src/createParamsFromAction.d.ts.map +1 -1
- package/lib/typescript/src/createRouteFromAction.d.ts +2 -2
- package/lib/typescript/src/createRouteFromAction.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +9 -9
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +20 -30
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/BaseRouter.tsx +93 -80
- package/src/CommonActions.tsx +44 -66
- package/src/DrawerRouter.tsx +28 -22
- package/src/StackRouter.tsx +551 -238
- package/src/SwitchRouter.tsx +718 -0
- package/src/TabRouter.tsx +24 -463
- package/src/createParamsFromAction.tsx +1 -1
- package/src/createRouteFromAction.tsx +1 -1
- package/src/types.tsx +39 -41
|
@@ -1,40 +1,54 @@
|
|
|
1
|
-
import type { DefaultRouterOptions,
|
|
1
|
+
import type { DefaultRouterOptions, NavigationState, ParamListBase, Router } from './types.js';
|
|
2
2
|
export type StackActionType = {
|
|
3
3
|
type: 'REPLACE';
|
|
4
4
|
payload: {
|
|
5
5
|
name: string;
|
|
6
|
-
params?: object;
|
|
6
|
+
params?: object | undefined;
|
|
7
7
|
};
|
|
8
|
-
source?: string;
|
|
9
|
-
target?: string;
|
|
8
|
+
source?: string | undefined;
|
|
9
|
+
target?: string | undefined;
|
|
10
10
|
} | {
|
|
11
11
|
type: 'PUSH';
|
|
12
12
|
payload: {
|
|
13
13
|
name: string;
|
|
14
|
-
params?: object;
|
|
14
|
+
params?: object | undefined;
|
|
15
15
|
};
|
|
16
|
-
source?: string;
|
|
17
|
-
target?: string;
|
|
16
|
+
source?: string | undefined;
|
|
17
|
+
target?: string | undefined;
|
|
18
18
|
} | {
|
|
19
19
|
type: 'POP';
|
|
20
20
|
payload: {
|
|
21
21
|
count: number;
|
|
22
22
|
};
|
|
23
|
-
source?: string;
|
|
24
|
-
target?: string;
|
|
23
|
+
source?: string | undefined;
|
|
24
|
+
target?: string | undefined;
|
|
25
25
|
} | {
|
|
26
26
|
type: 'POP_TO_TOP';
|
|
27
|
-
source?: string;
|
|
28
|
-
target?: string;
|
|
27
|
+
source?: string | undefined;
|
|
28
|
+
target?: string | undefined;
|
|
29
29
|
} | {
|
|
30
30
|
type: 'POP_TO';
|
|
31
31
|
payload: {
|
|
32
32
|
name: string;
|
|
33
|
-
params?: object;
|
|
34
|
-
merge?: boolean;
|
|
33
|
+
params?: object | undefined;
|
|
34
|
+
merge?: boolean | undefined;
|
|
35
35
|
};
|
|
36
|
-
source?: string;
|
|
37
|
-
target?: string;
|
|
36
|
+
source?: string | undefined;
|
|
37
|
+
target?: string | undefined;
|
|
38
|
+
} | {
|
|
39
|
+
type: 'RETAIN';
|
|
40
|
+
payload: {
|
|
41
|
+
enable: boolean;
|
|
42
|
+
};
|
|
43
|
+
source?: string | undefined;
|
|
44
|
+
target?: string | undefined;
|
|
45
|
+
} | {
|
|
46
|
+
type: 'DISMISS';
|
|
47
|
+
payload: {
|
|
48
|
+
count: number;
|
|
49
|
+
};
|
|
50
|
+
source?: string | undefined;
|
|
51
|
+
target?: string | undefined;
|
|
38
52
|
};
|
|
39
53
|
export type StackRouterOptions = DefaultRouterOptions;
|
|
40
54
|
export type StackNavigationState<ParamList extends ParamListBase> = NavigationState<ParamList> & {
|
|
@@ -43,13 +57,15 @@ export type StackNavigationState<ParamList extends ParamListBase> = NavigationSt
|
|
|
43
57
|
*/
|
|
44
58
|
type: 'stack';
|
|
45
59
|
/**
|
|
46
|
-
* List of
|
|
60
|
+
* List of route keys to retain in the stack.
|
|
61
|
+
* When a retained route gets removed from the stack,
|
|
62
|
+
* it'll be kept in routes and can be navigated to again.
|
|
47
63
|
*/
|
|
48
|
-
|
|
64
|
+
retainedRouteKeys: string[];
|
|
49
65
|
};
|
|
50
66
|
export type StackActionHelpers<ParamList extends ParamListBase> = {
|
|
51
67
|
/**
|
|
52
|
-
* Replace the current
|
|
68
|
+
* Replace the current screen with a new one.
|
|
53
69
|
*
|
|
54
70
|
* @param screen Name of the new route that will replace the current one.
|
|
55
71
|
* @param [params] Params object for the new route.
|
|
@@ -63,11 +79,14 @@ export type StackActionHelpers<ParamList extends ParamListBase> = {
|
|
|
63
79
|
*/
|
|
64
80
|
push<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName, params?: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void;
|
|
65
81
|
/**
|
|
66
|
-
* Pop a
|
|
82
|
+
* Pop a history entry from the stack.
|
|
83
|
+
* Also dismisses any screens above the current one.
|
|
84
|
+
*
|
|
85
|
+
* @param [count=1] Number of history entries to pop. Defaults to 1.
|
|
67
86
|
*/
|
|
68
87
|
pop(count?: number): void;
|
|
69
88
|
/**
|
|
70
|
-
* Pop to the first
|
|
89
|
+
* Pop to the first screen in the stack, dismissing all other screens.
|
|
71
90
|
*/
|
|
72
91
|
popToTop(): void;
|
|
73
92
|
/**
|
|
@@ -82,15 +101,30 @@ export type StackActionHelpers<ParamList extends ParamListBase> = {
|
|
|
82
101
|
screen: RouteName,
|
|
83
102
|
params?: ParamList[RouteName],
|
|
84
103
|
options?: {
|
|
85
|
-
merge?: boolean;
|
|
104
|
+
merge?: boolean | undefined;
|
|
86
105
|
}
|
|
87
106
|
] : [
|
|
88
107
|
screen: RouteName,
|
|
89
108
|
params: ParamList[RouteName],
|
|
90
109
|
options?: {
|
|
91
|
-
merge?: boolean;
|
|
110
|
+
merge?: boolean | undefined;
|
|
92
111
|
}
|
|
93
112
|
] : never): void;
|
|
113
|
+
/**
|
|
114
|
+
* Enable or disable retaining the current screen in the stack.
|
|
115
|
+
*
|
|
116
|
+
* When a retained route gets removed from the stack,
|
|
117
|
+
* it'll be kept in routes and can be navigated to again.
|
|
118
|
+
*
|
|
119
|
+
* @param enable Whether to retain the current route in the stack or not.
|
|
120
|
+
*/
|
|
121
|
+
retain(enable: boolean): void;
|
|
122
|
+
/**
|
|
123
|
+
* Dismiss a screen from the stack.
|
|
124
|
+
*
|
|
125
|
+
* @param [count=1] Number of screens to dismiss. Defaults to 1.
|
|
126
|
+
*/
|
|
127
|
+
dismiss(count?: number): void;
|
|
94
128
|
};
|
|
95
129
|
export declare const StackActions: {
|
|
96
130
|
replace(name: string, params?: object): {
|
|
@@ -117,7 +151,7 @@ export declare const StackActions: {
|
|
|
117
151
|
readonly type: "POP_TO_TOP";
|
|
118
152
|
};
|
|
119
153
|
popTo(name: string, params?: object, options?: {
|
|
120
|
-
merge?: boolean;
|
|
154
|
+
merge?: boolean | undefined;
|
|
121
155
|
}): {
|
|
122
156
|
readonly type: "POP_TO";
|
|
123
157
|
readonly payload: {
|
|
@@ -126,6 +160,18 @@ export declare const StackActions: {
|
|
|
126
160
|
readonly merge: boolean | undefined;
|
|
127
161
|
};
|
|
128
162
|
};
|
|
163
|
+
retain(enable: boolean): {
|
|
164
|
+
readonly type: "RETAIN";
|
|
165
|
+
readonly payload: {
|
|
166
|
+
readonly enable: boolean;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
dismiss(count?: number): {
|
|
170
|
+
readonly type: "DISMISS";
|
|
171
|
+
readonly payload: {
|
|
172
|
+
readonly count: number;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
129
175
|
};
|
|
130
|
-
export declare function StackRouter(options: StackRouterOptions): Router<StackNavigationState<ParamListBase>, import("./CommonActions").Action | StackActionType>;
|
|
176
|
+
export declare function StackRouter(options: StackRouterOptions): Router<StackNavigationState<ParamListBase>, import("./CommonActions.js").Action | StackActionType>;
|
|
131
177
|
//# sourceMappingURL=StackRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackRouter.d.ts","sourceRoot":"","sources":["../../../src/StackRouter.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,oBAAoB,EACpB,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"StackRouter.d.ts","sourceRoot":"","sources":["../../../src/StackRouter.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,oBAAoB,EACpB,eAAe,EACf,aAAa,EAEb,MAAM,EACP,MAAM,YAAS,CAAC;AAEjB,MAAM,MAAM,eAAe,GACvB;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM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,MAAM,SAAS,EACrC,GAAG,IAAI,EAAE,SAAS,SAAS,OAAO,GAC9B,SAAS,SAAS,SAAS,CAAC,SAAS,CAAC,GACpC;QACE,MAAM,EAAE,SAAS;QACjB,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC;QAC7B,OAAO,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;SAAE;KAC1C,GACD;QACE,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC;QAC5B,OAAO,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;SAAE;KAC1C,GACH,KAAK,GACR,IAAI,CAAC;IAER;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAE9B;;;;OAIG;IACH,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,YAAY;kBACT,MAAM,WAAW,MAAM;;;;;;;eAM1B,MAAM,WAAW,MAAM;;;;;;;gBAMvB,MAAM;;;;;;;;;gBAUT,MAAM,WACH,MAAM,YACL;QAAE,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAE;;;;;;;;mBAW5B,OAAO;;;;;;oBAMP,MAAM;;;;;;CAMtB,CAAC;AA6FF,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,sGAkxBtD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { CommonNavigationAction, DefaultRouterOptions, NavigationState, PartialState, RouterConfigOptions } from './types.js';
|
|
2
|
+
export type SwitchActionType = {
|
|
3
|
+
type: 'JUMP_TO';
|
|
4
|
+
payload: {
|
|
5
|
+
name: string;
|
|
6
|
+
params?: object | undefined;
|
|
7
|
+
};
|
|
8
|
+
source?: string | undefined;
|
|
9
|
+
target?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type SwitchRouterOptions = DefaultRouterOptions & {
|
|
12
|
+
/**
|
|
13
|
+
* Control how going back should behave
|
|
14
|
+
* - `firstRoute` - return to the first defined route
|
|
15
|
+
* - `initialRoute` - return to the route from `initialRouteName`
|
|
16
|
+
* - `order` - return to the route defined before the focused route
|
|
17
|
+
* - `history` - return to last visited route; if the same route is visited multiple times, the older entries are dropped from the history
|
|
18
|
+
* - `fullHistory` - return to last visited route; doesn't drop duplicate entries unlike `history` - matches behavior of web pages
|
|
19
|
+
* - `none` - do not handle going back
|
|
20
|
+
*/
|
|
21
|
+
backBehavior?: BackBehavior | undefined;
|
|
22
|
+
};
|
|
23
|
+
type BackBehavior = 'firstRoute' | 'initialRoute' | 'order' | 'history' | 'fullHistory' | 'none';
|
|
24
|
+
type RouteHistory = {
|
|
25
|
+
type: 'route';
|
|
26
|
+
key: string;
|
|
27
|
+
params?: object | undefined;
|
|
28
|
+
};
|
|
29
|
+
type DrawerHistory = {
|
|
30
|
+
type: 'drawer';
|
|
31
|
+
status: 'open' | 'closed';
|
|
32
|
+
};
|
|
33
|
+
type SwitchRouterState<History> = Omit<NavigationState, 'history' | 'type'> & {
|
|
34
|
+
history: History[];
|
|
35
|
+
preloadedRouteKeys: string[];
|
|
36
|
+
};
|
|
37
|
+
type SwitchRouterStateMap = {
|
|
38
|
+
tab: SwitchRouterState<RouteHistory> & {
|
|
39
|
+
type: 'tab';
|
|
40
|
+
};
|
|
41
|
+
drawer: SwitchRouterState<RouteHistory | DrawerHistory> & {
|
|
42
|
+
type: 'drawer';
|
|
43
|
+
default: DrawerHistory['status'];
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
type SwitchRouterType = 'tab' | 'drawer';
|
|
47
|
+
export declare function SwitchRouter<Type extends SwitchRouterType>({ initialRouteName, backBehavior, }: SwitchRouterOptions): {
|
|
48
|
+
getInitialState({ routeNames, routeParamList, }: RouterConfigOptions): SwitchRouterState<RouteHistory>;
|
|
49
|
+
getRehydratedState(state: PartialState<SwitchRouterStateMap[Type]>, { routeNames, routeParamList }: RouterConfigOptions): SwitchRouterState<RouteHistory>;
|
|
50
|
+
getStateForRouteNamesChange(state: SwitchRouterStateMap[Type], { routeNames, routeParamList, routeKeyChanges, }: RouterConfigOptions & {
|
|
51
|
+
routeKeyChanges: string[];
|
|
52
|
+
}): SwitchRouterStateMap[Type];
|
|
53
|
+
getStateForRouteFocus(state: SwitchRouterStateMap[Type], key: string): SwitchRouterStateMap[Type];
|
|
54
|
+
getStateForAction(state: SwitchRouterStateMap[Type], action: SwitchActionType | CommonNavigationAction, { routeParamList, routeGetIdList }: RouterConfigOptions): SwitchRouterStateMap[Type] | PartialState<SwitchRouterStateMap[Type]> | null;
|
|
55
|
+
shouldActionChangeFocus(action: CommonNavigationAction): action is {
|
|
56
|
+
type: "NAVIGATE";
|
|
57
|
+
payload: {
|
|
58
|
+
name: string;
|
|
59
|
+
params?: object | undefined;
|
|
60
|
+
path?: string | undefined;
|
|
61
|
+
merge?: boolean | undefined;
|
|
62
|
+
pop?: boolean | undefined;
|
|
63
|
+
};
|
|
64
|
+
source?: string | undefined;
|
|
65
|
+
target?: string | undefined;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=SwitchRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchRouter.d.ts","sourceRoot":"","sources":["../../../src/SwitchRouter.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,YAAY,EAEZ,mBAAmB,EACpB,MAAM,YAAS,CAAC;AAEjB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS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AO,kCACM,mBAAmB,GAClD,iBAAiB,CAAC,YAAY,CAAC;qHA8D7B,mBAAmB,GAAG;QAAE,eAAe,EAAE,MAAM,EAAE,CAAA;KAAE;kEAwDf,MAAM;iEAerC,gBAAgB,GAAG,sBAAsB,sCACb,mBAAmB,GACtD,6BAAQ,YAAY,4BAAO,GAAG,IAAI;;;;;kBA1Y5B,CAAC;gBACD,CAAC;iBAGJ,CAAC;eAA8B,CAAC;;;;;EAyrBzC"}
|
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
payload: {
|
|
5
|
-
name: string;
|
|
6
|
-
params?: object;
|
|
7
|
-
};
|
|
8
|
-
source?: string;
|
|
9
|
-
target?: string;
|
|
10
|
-
};
|
|
11
|
-
export type BackBehavior = 'firstRoute' | 'initialRoute' | 'order' | 'history' | 'fullHistory' | 'none';
|
|
12
|
-
export type TabRouterOptions = DefaultRouterOptions & {
|
|
13
|
-
/**
|
|
14
|
-
* Control how going back should behave
|
|
15
|
-
* - `firstRoute` - return to the first defined route
|
|
16
|
-
* - `initialRoute` - return to the route from `initialRouteName`
|
|
17
|
-
* - `order` - return to the route defined before the focused route
|
|
18
|
-
* - `history` - return to last visited route; if the same route is visited multiple times, the older entries are dropped from the history
|
|
19
|
-
* - `fullHistory` - return to last visited route; doesn't drop duplicate entries unlike `history` - matches behavior of web pages
|
|
20
|
-
* - `none` - do not handle going back
|
|
21
|
-
*/
|
|
22
|
-
backBehavior?: BackBehavior;
|
|
23
|
-
};
|
|
1
|
+
import { type SwitchActionType as TabActionType, type SwitchRouterOptions as TabRouterOptions } from './SwitchRouter.js';
|
|
2
|
+
import type { CommonNavigationAction, NavigationState, ParamListBase, Router } from './types.js';
|
|
3
|
+
export type { TabActionType, TabRouterOptions };
|
|
24
4
|
export type TabNavigationState<ParamList extends ParamListBase> = Omit<NavigationState<ParamList>, 'history'> & {
|
|
25
5
|
/**
|
|
26
6
|
* Type of the router, in this case, it's tab.
|
|
@@ -57,5 +37,5 @@ export declare const TabActions: {
|
|
|
57
37
|
};
|
|
58
38
|
};
|
|
59
39
|
};
|
|
60
|
-
export declare function TabRouter(
|
|
40
|
+
export declare function TabRouter(options: TabRouterOptions): Router<TabNavigationState<ParamListBase>, TabActionType | CommonNavigationAction>;
|
|
61
41
|
//# sourceMappingURL=TabRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabRouter.d.ts","sourceRoot":"","sources":["../../../src/TabRouter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabRouter.d.ts","sourceRoot":"","sources":["../../../src/TabRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,IAAI,aAAa,EAEtC,KAAK,mBAAmB,IAAI,gBAAgB,EAC7C,MAAM,mBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,MAAM,EACP,MAAM,YAAS,CAAC;AAEjB,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC;AAEhD,MAAM,MAAM,kBAAkB,CAAC,SAAS,SAAS,aAAa,IAAI,IAAI,CACpE,eAAe,CAAC,SAAS,CAAC,EAC1B,SAAS,CACV,GAAG;IACF;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IACZ;;OAEG;IACH,OAAO,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,EAAE,CAAC;IACvE;;OAEG;IACH,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,SAAS,SAAS,aAAa,IAAI;IAC9D;;;;;OAKG;IACH,MAAM,CAAC,SAAS,SAAS,MAAM,SAAS,EACtC,GAAG,IAAI,EAAE,SAAS,SAAS,OAAO,GAC9B,SAAS,SAAS,SAAS,CAAC,SAAS,CAAC,GACpC,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,GAClD,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,GACnD,KAAK,GACR,IAAI,CAAC;CACT,CAAC;AAEF,eAAO,MAAM,UAAU;iBACR,MAAM,WAAW,MAAM;;;;;;;CAMrC,CAAC;AAEF,wBAAgB,SAAS,CACvB,OAAO,EAAE,gBAAgB,GACxB,MAAM,CACP,kBAAkB,CAAC,aAAa,CAAC,EACjC,aAAa,GAAG,sBAAsB,CACvC,CAkCA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createParamsFromAction.d.ts","sourceRoot":"","sources":["../../../src/createParamsFromAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"createParamsFromAction.d.ts","sourceRoot":"","sources":["../../../src/createParamsFromAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAS,CAAC;AAE7C,KAAK,OAAO,GAAG;IACb,MAAM,EAAE;QACN,OAAO,EAAE;YACP,IAAI,EAAE,MAAM,CAAC;YACb,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAC7B,CAAC;KACH,CAAC;IACF,cAAc,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,OAAO,sBASzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRouteFromAction.d.ts","sourceRoot":"","sources":["../../../src/createRouteFromAction.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"createRouteFromAction.d.ts","sourceRoot":"","sources":["../../../src/createRouteFromAction.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAS,CAAC;AAE7C,KAAK,OAAO,GAAG;IACb,MAAM,EAAE;QACN,OAAO,EAAE;YACP,IAAI,EAAE,MAAM,CAAC;YACb,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAC7B,CAAC;KACH,CAAC;IACF,cAAc,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,OAAO;;;;EAQxE"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as CommonActions from './CommonActions';
|
|
1
|
+
import * as CommonActions from './CommonActions.js';
|
|
2
2
|
export { CommonActions };
|
|
3
|
-
export { BaseRouter } from './BaseRouter';
|
|
4
|
-
export type { DrawerActionHelpers, DrawerActionType, DrawerNavigationState, DrawerRouterOptions, DrawerStatus, } from './DrawerRouter';
|
|
5
|
-
export { DrawerActions, DrawerRouter } from './DrawerRouter';
|
|
6
|
-
export type { StackActionHelpers, StackActionType, StackNavigationState, StackRouterOptions, } from './StackRouter';
|
|
7
|
-
export { StackActions, StackRouter } from './StackRouter';
|
|
8
|
-
export type { TabActionHelpers, TabActionType, TabNavigationState, TabRouterOptions, } from './TabRouter';
|
|
9
|
-
export { TabActions, TabRouter } from './TabRouter';
|
|
10
|
-
export * from './types';
|
|
3
|
+
export { BaseRouter } from './BaseRouter.js';
|
|
4
|
+
export type { DrawerActionHelpers, DrawerActionType, DrawerNavigationState, DrawerRouterOptions, DrawerStatus, } from './DrawerRouter.js';
|
|
5
|
+
export { DrawerActions, DrawerRouter } from './DrawerRouter.js';
|
|
6
|
+
export type { StackActionHelpers, StackActionType, StackNavigationState, StackRouterOptions, } from './StackRouter.js';
|
|
7
|
+
export { StackActions, StackRouter } from './StackRouter.js';
|
|
8
|
+
export type { TabActionHelpers, TabActionType, TabNavigationState, TabRouterOptions, } from './TabRouter.js';
|
|
9
|
+
export { TabActions, TabRouter } from './TabRouter.js';
|
|
10
|
+
export * from './types.js';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,oBAAiB,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAc,CAAC;AAC1C,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,GACb,MAAM,mBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAgB,CAAC;AAC7D,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,kBAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAe,CAAC;AAC1D,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,gBAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAa,CAAC;AACpD,cAAc,YAAS,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type * as CommonActions from './CommonActions';
|
|
1
|
+
import type * as CommonActions from './CommonActions.js';
|
|
2
2
|
export type CommonNavigationAction = CommonActions.Action;
|
|
3
3
|
export type NavigationRoute<ParamList extends ParamListBase, RouteName extends keyof ParamList> = Route<Extract<RouteName, string>, ParamList[RouteName]> & {
|
|
4
|
-
state?: NavigationState | PartialState<NavigationState
|
|
4
|
+
state?: NavigationState | PartialState<NavigationState> | undefined;
|
|
5
5
|
};
|
|
6
6
|
export type NavigationState<ParamList extends ParamListBase = ParamListBase> = Readonly<{
|
|
7
7
|
/**
|
|
@@ -19,13 +19,13 @@ export type NavigationState<ParamList extends ParamListBase = ParamListBase> = R
|
|
|
19
19
|
/**
|
|
20
20
|
* Alternative entries for history.
|
|
21
21
|
*/
|
|
22
|
-
history?: unknown[];
|
|
22
|
+
history?: unknown[] | undefined;
|
|
23
23
|
/**
|
|
24
24
|
* List of rendered routes.
|
|
25
25
|
*/
|
|
26
26
|
routes: NavigationRoute<ParamList, keyof ParamList>[];
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* The type of the state, i.e., whether it's for tab, stack, drawer etc.
|
|
29
29
|
* During rehydration, the state will be discarded if type doesn't match with router type.
|
|
30
30
|
* It can also be used to detect the type of the navigator we're dealing with.
|
|
31
31
|
*/
|
|
@@ -37,16 +37,16 @@ export type NavigationState<ParamList extends ParamListBase = ParamListBase> = R
|
|
|
37
37
|
}>;
|
|
38
38
|
export type InitialState = Readonly<Partial<Omit<NavigationState, 'stale' | 'routes'>> & {
|
|
39
39
|
routes: (Omit<Route<string>, 'key'> & {
|
|
40
|
-
state?: InitialState;
|
|
40
|
+
state?: InitialState | undefined;
|
|
41
41
|
})[];
|
|
42
42
|
}>;
|
|
43
43
|
export type PartialRoute<R extends Route<string>> = Omit<R, 'key'> & {
|
|
44
|
-
key?: string;
|
|
45
|
-
state?: PartialState<NavigationState
|
|
44
|
+
key?: string | undefined;
|
|
45
|
+
state?: NavigationState | PartialState<NavigationState> | undefined;
|
|
46
46
|
};
|
|
47
47
|
export type PartialState<State extends NavigationState> = Partial<Omit<State, 'stale' | 'routes'>> & Readonly<{
|
|
48
|
-
stale?: true;
|
|
49
|
-
routes: PartialRoute<
|
|
48
|
+
stale?: true | undefined;
|
|
49
|
+
routes: PartialRoute<State['routes'][number]>[];
|
|
50
50
|
}>;
|
|
51
51
|
export type Route<RouteName extends string, Params extends unknown | object | undefined = object | undefined> = Readonly<{
|
|
52
52
|
/**
|
|
@@ -61,25 +61,25 @@ export type Route<RouteName extends string, Params extends unknown | object | un
|
|
|
61
61
|
* Path associated with the route.
|
|
62
62
|
* Usually present when the screen was opened from a deep link.
|
|
63
63
|
*/
|
|
64
|
-
path?: string;
|
|
64
|
+
path?: string | undefined;
|
|
65
65
|
/**
|
|
66
66
|
* History of param changes for this route.
|
|
67
67
|
*/
|
|
68
68
|
history?: {
|
|
69
69
|
type: 'params';
|
|
70
|
-
params:
|
|
71
|
-
}[];
|
|
72
|
-
} &
|
|
70
|
+
params: undefined extends Params ? Readonly<Params> | undefined : Readonly<Params>;
|
|
71
|
+
}[] | undefined;
|
|
72
|
+
} & (undefined extends Params ? {
|
|
73
73
|
/**
|
|
74
74
|
* Params for this route
|
|
75
75
|
*/
|
|
76
|
-
params?: Readonly<Params
|
|
76
|
+
params?: Readonly<Params> | undefined;
|
|
77
77
|
} : {
|
|
78
78
|
/**
|
|
79
79
|
* Params for this route
|
|
80
80
|
*/
|
|
81
81
|
params: Readonly<Params>;
|
|
82
|
-
}
|
|
82
|
+
})>;
|
|
83
83
|
export type ParamListBase = Record<string, object | undefined>;
|
|
84
84
|
export type NavigationAction = Readonly<{
|
|
85
85
|
/**
|
|
@@ -89,15 +89,15 @@ export type NavigationAction = Readonly<{
|
|
|
89
89
|
/**
|
|
90
90
|
* Additional data for the action
|
|
91
91
|
*/
|
|
92
|
-
payload?: object;
|
|
92
|
+
payload?: object | undefined;
|
|
93
93
|
/**
|
|
94
94
|
* Key of the route which dispatched this action.
|
|
95
95
|
*/
|
|
96
|
-
source?: string;
|
|
96
|
+
source?: string | undefined;
|
|
97
97
|
/**
|
|
98
98
|
* Key of the navigator which should handle this action.
|
|
99
99
|
*/
|
|
100
|
-
target?: string;
|
|
100
|
+
target?: string | undefined;
|
|
101
101
|
}>;
|
|
102
102
|
export type ActionCreators<Action extends NavigationAction> = {
|
|
103
103
|
[key: string]: (...args: any) => Action;
|
|
@@ -107,14 +107,14 @@ export type DefaultRouterOptions<RouteName extends string = string> = {
|
|
|
107
107
|
* Name of the route to focus by on initial render.
|
|
108
108
|
* If not specified, usually the first route is used.
|
|
109
109
|
*/
|
|
110
|
-
initialRouteName?: RouteName;
|
|
110
|
+
initialRouteName?: RouteName | undefined;
|
|
111
111
|
};
|
|
112
112
|
export type RouterFactory<State extends NavigationState, Action extends NavigationAction, RouterOptions extends DefaultRouterOptions> = (options: RouterOptions) => Router<State, Action>;
|
|
113
113
|
export type RouterConfigOptions = {
|
|
114
114
|
routeNames: string[];
|
|
115
115
|
routeParamList: ParamListBase;
|
|
116
116
|
routeGetIdList: Record<string, ((options: {
|
|
117
|
-
params?: Record<string, any
|
|
117
|
+
params?: Record<string, any> | undefined;
|
|
118
118
|
}) => string | undefined) | undefined>;
|
|
119
119
|
};
|
|
120
120
|
export type Router<State extends NavigationState, Action extends NavigationAction> = {
|
|
@@ -175,16 +175,6 @@ export type Router<State extends NavigationState, Action extends NavigationActio
|
|
|
175
175
|
* @param action Action object to check.
|
|
176
176
|
*/
|
|
177
177
|
shouldActionChangeFocus(action: NavigationAction): boolean;
|
|
178
|
-
/**
|
|
179
|
-
* Get the list of routes from the navigation state.
|
|
180
|
-
*
|
|
181
|
-
* By default, `state.routes` is used.
|
|
182
|
-
* But in some cases (like `preloadedRoutes` in stack),
|
|
183
|
-
* the actual list of routes may be different.
|
|
184
|
-
*
|
|
185
|
-
* @param state Navigation state to get the routes from.
|
|
186
|
-
*/
|
|
187
|
-
getRoutesFromState?(state: State): Route<string>[];
|
|
188
178
|
/**
|
|
189
179
|
* Action creators for the router.
|
|
190
180
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"m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GG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEpB;;;;;OAKG;IACH,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,KAAK,CAAC;IAErD;;;;;;OAMG;IACH,kBAAkB,CAChB,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC,GAAG,KAAK,EACzC,OAAO,EAAE,mBAAmB,GAC3B,KAAK,CAAC;IAET;;;;;;OAMG;IACH,2BAA2B,CACzB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,mBAAmB,GAAG;QAC7B;;;WAGG;QACH,eAAe,EAAE,MAAM,EAAE,CAAC;KAC3B,GACA,KAAK,CAAC;IAET;;;;;OAKG;IACH,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC;IAExD;;;;;;;;OAQG;IACH,iBAAiB,CACf,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,mBAAmB,GAC3B,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAEtC;;;;OAIG;IACH,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC;IAE3D;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;CACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/routers",
|
|
3
3
|
"description": "Routers to help build custom navigators",
|
|
4
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.20",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
7
7
|
"react-native",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"types": "./lib/typescript/src/index.d.ts",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
-
"source": "./src/index.tsx",
|
|
24
|
+
"@react-navigation/source": "./src/index.tsx",
|
|
25
25
|
"types": "./lib/typescript/src/index.d.ts",
|
|
26
26
|
"default": "./lib/module/index.js"
|
|
27
27
|
},
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"clean": "del lib"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"nanoid": "^
|
|
44
|
+
"nanoid": "^5.1.11"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@jest/globals": "^30.
|
|
48
|
-
"del-cli": "^
|
|
49
|
-
"react-native-builder-bob": "^0.
|
|
50
|
-
"typescript": "^
|
|
47
|
+
"@jest/globals": "^30.4.1",
|
|
48
|
+
"del-cli": "^7.0.0",
|
|
49
|
+
"react-native-builder-bob": "^0.43.0",
|
|
50
|
+
"typescript": "^6.0.3"
|
|
51
51
|
},
|
|
52
52
|
"react-native-builder-bob": {
|
|
53
53
|
"source": "src",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
]
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "201473e290e52fc2847cd61025cf068f7ec1a54d"
|
|
71
71
|
}
|