@tramvai/tokens-child-app 2.56.1 → 2.56.5
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/index.d.ts +92 -27
- package/package.json +5 -5
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ComponentType } from 'react';
|
|
2
1
|
import type { Action, Command, TramvaiAction } from '@tramvai/core';
|
|
3
2
|
import type { StoreClass } from '@tramvai/state';
|
|
4
3
|
import type { ChildAppLoader, ChildAppDiManager, ChildAppPreloadManager, ChildAppCommandLineRunner, ChildAppRequestConfig, WrapperProps, RootStateSubscription, ChildAppStateManager, ChildAppFinalConfig, ChildAppRenderManager, ChildAppResolutionConfig, ResolutionConfig } from './types';
|
|
@@ -8,62 +7,104 @@ export * from './types';
|
|
|
8
7
|
* @description CommandLineRunner steps specific for child app
|
|
9
8
|
*/
|
|
10
9
|
export declare const commandLineListTokens: {
|
|
11
|
-
customerStart:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
customerStart: Command & {
|
|
11
|
+
__type?: "multi token" | undefined;
|
|
12
|
+
};
|
|
13
|
+
resolveUserDeps: Command & {
|
|
14
|
+
__type?: "multi token" | undefined;
|
|
15
|
+
};
|
|
16
|
+
resolvePageDeps: Command & {
|
|
17
|
+
__type?: "multi token" | undefined;
|
|
18
|
+
};
|
|
19
|
+
clear: Command & {
|
|
20
|
+
__type?: "multi token" | undefined;
|
|
21
|
+
};
|
|
22
|
+
spaTransition: Command & {
|
|
23
|
+
__type?: "multi token" | undefined;
|
|
24
|
+
};
|
|
25
|
+
afterSpaTransition: Command & {
|
|
26
|
+
__type?: "multi token" | undefined;
|
|
27
|
+
};
|
|
17
28
|
};
|
|
18
29
|
/**
|
|
19
30
|
* @public
|
|
20
31
|
* @description Contains child app configs that was used to figure out how to load child apps
|
|
21
32
|
*/
|
|
22
|
-
export declare const CHILD_APP_RESOLUTION_CONFIGS_TOKEN:
|
|
33
|
+
export declare const CHILD_APP_RESOLUTION_CONFIGS_TOKEN: (ChildAppResolutionConfig & {
|
|
34
|
+
__type?: "multi token" | undefined;
|
|
35
|
+
}) | (ChildAppResolutionConfig[] & {
|
|
36
|
+
__type?: "multi token" | undefined;
|
|
37
|
+
}) | ((() => ChildAppResolutionConfig | ChildAppResolutionConfig[]) & {
|
|
38
|
+
__type?: "multi token" | undefined;
|
|
39
|
+
});
|
|
23
40
|
/**
|
|
24
41
|
* @public
|
|
25
42
|
* @description Used to resolve and extend resolution configs for child-apps
|
|
26
43
|
*/
|
|
27
|
-
export declare const CHILD_APP_RESOLUTION_CONFIG_MANAGER_TOKEN:
|
|
44
|
+
export declare const CHILD_APP_RESOLUTION_CONFIG_MANAGER_TOKEN: {
|
|
28
45
|
resolve(config: ChildAppRequestConfig): ResolutionConfig | null;
|
|
29
46
|
init(): Promise<void>;
|
|
30
|
-
}
|
|
47
|
+
} & {
|
|
48
|
+
__type?: "base token" | undefined;
|
|
49
|
+
};
|
|
31
50
|
/**
|
|
32
51
|
* @public
|
|
33
52
|
* @description Used to resolve external config with urls to external code entries
|
|
34
53
|
*/
|
|
35
|
-
export declare const CHILD_APP_RESOLVE_CONFIG_TOKEN:
|
|
54
|
+
export declare const CHILD_APP_RESOLVE_CONFIG_TOKEN: ((config: ChildAppRequestConfig) => ChildAppFinalConfig) & {
|
|
55
|
+
__type?: "base token" | undefined;
|
|
56
|
+
};
|
|
36
57
|
/**
|
|
37
58
|
* @public
|
|
38
59
|
* @description Base url for external urls for child apps on client
|
|
39
60
|
*/
|
|
40
|
-
export declare const CHILD_APP_RESOLVE_BASE_URL_TOKEN:
|
|
61
|
+
export declare const CHILD_APP_RESOLVE_BASE_URL_TOKEN: string & {
|
|
62
|
+
__type?: "base token" | undefined;
|
|
63
|
+
};
|
|
41
64
|
/**
|
|
42
65
|
* @public
|
|
43
66
|
* @description Allows to preload child app for the specific page
|
|
44
67
|
*/
|
|
45
|
-
export declare const CHILD_APP_PRELOAD_MANAGER_TOKEN:
|
|
68
|
+
export declare const CHILD_APP_PRELOAD_MANAGER_TOKEN: ChildAppPreloadManager & {
|
|
69
|
+
__type?: "base token" | undefined;
|
|
70
|
+
};
|
|
46
71
|
/**
|
|
47
72
|
* @public
|
|
48
73
|
* @description Contains child app config that was used to load current child app
|
|
49
74
|
*/
|
|
50
|
-
export declare const CHILD_APP_INTERNAL_CONFIG_TOKEN:
|
|
75
|
+
export declare const CHILD_APP_INTERNAL_CONFIG_TOKEN: ChildAppFinalConfig & {
|
|
76
|
+
__type?: "base token" | undefined;
|
|
77
|
+
};
|
|
51
78
|
/**
|
|
52
79
|
* @public
|
|
53
80
|
* @description Actions of child app
|
|
54
81
|
*/
|
|
55
|
-
export declare const CHILD_APP_INTERNAL_ACTION_TOKEN: import("@
|
|
82
|
+
export declare const CHILD_APP_INTERNAL_ACTION_TOKEN: (((context: import("@tramvai/state").ConsumerContext, payload: any, deps: import("@tinkoff/dippy").ProvideDepsIterator<any>) => any) & {
|
|
83
|
+
__action_parameters__: import("@tramvai/core").ActionParameters<any, any, any>;
|
|
84
|
+
} & {
|
|
85
|
+
__type?: "multi token" | undefined;
|
|
86
|
+
}) | (TramvaiAction<any[], any, any> & {
|
|
87
|
+
__type?: "multi token" | undefined;
|
|
88
|
+
}) | ((Action<any, any, any> | TramvaiAction<any[], any, any>)[] & {
|
|
89
|
+
__type?: "multi token" | undefined;
|
|
90
|
+
});
|
|
56
91
|
/**
|
|
57
92
|
* @deprecated use CHILD_APP_INTERNAL_ROOT_STATE_ALLOWED_STORE_TOKEN
|
|
58
93
|
* @public
|
|
59
94
|
* @description Subscription on a root state updates
|
|
60
95
|
*/
|
|
61
|
-
export declare const CHILD_APP_INTERNAL_ROOT_STATE_SUBSCRIPTION_TOKEN:
|
|
96
|
+
export declare const CHILD_APP_INTERNAL_ROOT_STATE_SUBSCRIPTION_TOKEN: RootStateSubscription & {
|
|
97
|
+
__type?: "multi token" | undefined;
|
|
98
|
+
};
|
|
62
99
|
/**
|
|
63
100
|
* @public
|
|
64
101
|
* @description Root-app stores that might be used inside child-app
|
|
65
102
|
*/
|
|
66
|
-
export declare const CHILD_APP_INTERNAL_ROOT_STATE_ALLOWED_STORE_TOKEN:
|
|
103
|
+
export declare const CHILD_APP_INTERNAL_ROOT_STATE_ALLOWED_STORE_TOKEN: (string & {
|
|
104
|
+
__type?: "multi token" | undefined;
|
|
105
|
+
}) | (StoreClass & {
|
|
106
|
+
__type?: "multi token" | undefined;
|
|
107
|
+
});
|
|
67
108
|
/**
|
|
68
109
|
* @public
|
|
69
110
|
* @description Allows to recreate token implementation the same way as in root di, but specific to child-app di
|
|
@@ -73,46 +114,70 @@ export declare const CHILD_APP_INTERNAL_ROOT_DI_BORROW_TOKEN: any;
|
|
|
73
114
|
* @private
|
|
74
115
|
* @description boolean flag indicating that current di if for a child-app
|
|
75
116
|
*/
|
|
76
|
-
export declare const IS_CHILD_APP_DI_TOKEN:
|
|
117
|
+
export declare const IS_CHILD_APP_DI_TOKEN: (false & {
|
|
118
|
+
__type?: "base token" | undefined;
|
|
119
|
+
}) | (true & {
|
|
120
|
+
__type?: "base token" | undefined;
|
|
121
|
+
});
|
|
77
122
|
/**
|
|
78
123
|
* @private
|
|
79
124
|
* @description Manages Singleton-Scope DIs for every child app
|
|
80
125
|
*/
|
|
81
|
-
export declare const CHILD_APP_SINGLETON_DI_MANAGER_TOKEN:
|
|
126
|
+
export declare const CHILD_APP_SINGLETON_DI_MANAGER_TOKEN: ChildAppDiManager & {
|
|
127
|
+
__type?: "base token" | undefined;
|
|
128
|
+
};
|
|
82
129
|
/**
|
|
83
130
|
* @private
|
|
84
131
|
* @description Manages Request-Scope DIs for every child app
|
|
85
132
|
*/
|
|
86
|
-
export declare const CHILD_APP_DI_MANAGER_TOKEN:
|
|
133
|
+
export declare const CHILD_APP_DI_MANAGER_TOKEN: ChildAppDiManager & {
|
|
134
|
+
__type?: "base token" | undefined;
|
|
135
|
+
};
|
|
87
136
|
/**
|
|
88
137
|
* @private
|
|
89
138
|
* @description Bridge from React render to di providers for child apps
|
|
90
139
|
*/
|
|
91
|
-
export declare const CHILD_APP_RENDER_MANAGER_TOKEN:
|
|
140
|
+
export declare const CHILD_APP_RENDER_MANAGER_TOKEN: ChildAppRenderManager & {
|
|
141
|
+
__type?: "base token" | undefined;
|
|
142
|
+
};
|
|
92
143
|
/**
|
|
93
144
|
* @private
|
|
94
145
|
* @description Manages state dehydration for child-app
|
|
95
146
|
*/
|
|
96
|
-
export declare const CHILD_APP_STATE_MANAGER_TOKEN:
|
|
147
|
+
export declare const CHILD_APP_STATE_MANAGER_TOKEN: ChildAppStateManager & {
|
|
148
|
+
__type?: "base token" | undefined;
|
|
149
|
+
};
|
|
97
150
|
/**
|
|
98
151
|
* @private
|
|
99
152
|
* @description Manages loading child-app resources from the external place
|
|
100
153
|
*/
|
|
101
|
-
export declare const CHILD_APP_LOADER_TOKEN:
|
|
154
|
+
export declare const CHILD_APP_LOADER_TOKEN: ChildAppLoader & {
|
|
155
|
+
__type?: "base token" | undefined;
|
|
156
|
+
};
|
|
102
157
|
/**
|
|
103
158
|
* @private
|
|
104
159
|
* @description Implements CommandLineRunner for child apps
|
|
105
160
|
*/
|
|
106
|
-
export declare const CHILD_APP_COMMAND_LINE_RUNNER_TOKEN:
|
|
161
|
+
export declare const CHILD_APP_COMMAND_LINE_RUNNER_TOKEN: ChildAppCommandLineRunner & {
|
|
162
|
+
__type?: "base token" | undefined;
|
|
163
|
+
};
|
|
107
164
|
/**
|
|
108
165
|
* @private
|
|
109
166
|
* @description Stores the common server-dehydrated state for all of child apps
|
|
110
167
|
*/
|
|
111
|
-
export declare const CHILD_APP_COMMON_INITIAL_STATE_TOKEN:
|
|
168
|
+
export declare const CHILD_APP_COMMON_INITIAL_STATE_TOKEN: Record<string, {
|
|
112
169
|
stores: Record<string, any>;
|
|
113
|
-
}
|
|
170
|
+
} & {
|
|
171
|
+
__type?: "base token" | undefined;
|
|
172
|
+
}> & {
|
|
173
|
+
__type?: "base token" | undefined;
|
|
174
|
+
};
|
|
114
175
|
/**
|
|
115
176
|
* @private
|
|
116
177
|
* @description Used as render function for a child app. Usually implemented as a wrapper over child app render itself with an additional logic for di and connections to root app
|
|
117
178
|
*/
|
|
118
|
-
export declare const CHILD_APP_INTERNAL_RENDER_TOKEN: import("
|
|
179
|
+
export declare const CHILD_APP_INTERNAL_RENDER_TOKEN: (import("react").ComponentClass<WrapperProps<any>, any> & {
|
|
180
|
+
__type?: "base token" | undefined;
|
|
181
|
+
}) | (import("react").FunctionComponent<WrapperProps<any>> & {
|
|
182
|
+
__type?: "base token" | undefined;
|
|
183
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-child-app",
|
|
3
|
-
"version": "2.56.
|
|
3
|
+
"version": "2.56.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"registry": "https://registry.npmjs.org/"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@tinkoff/dippy": "0.8.
|
|
25
|
-
"@tramvai/core": "2.56.
|
|
26
|
-
"@tramvai/state": "2.56.
|
|
27
|
-
"@tramvai/tokens-common": "2.56.
|
|
24
|
+
"@tinkoff/dippy": "0.8.11",
|
|
25
|
+
"@tramvai/core": "2.56.5",
|
|
26
|
+
"@tramvai/state": "2.56.5",
|
|
27
|
+
"@tramvai/tokens-common": "2.56.5",
|
|
28
28
|
"react": ">=16.14.0"
|
|
29
29
|
},
|
|
30
30
|
"module": "lib/index.es.js"
|