@tramvai/tokens-child-app 2.7.1 → 2.10.2

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ComponentType } from 'react';
2
- import type { Action, Command } from '@tramvai/core';
2
+ import type { Action, Command, TramvaiAction } from '@tramvai/core';
3
3
  import type { StoreClass } from '@tramvai/state';
4
4
  import type { ChildAppLoader, ChildAppDiManager, ChildAppPreloadManager, ChildAppCommandLineRunner, ChildAppRequestConfig, WrapperProps, RootStateSubscription, ChildAppStateManager, ChildAppFinalConfig, ChildAppRenderManager, ChildAppResolutionConfig, ResolutionConfig } from './types';
5
5
  export * from './types';
@@ -8,23 +8,23 @@ export * from './types';
8
8
  * @description CommandLineRunner steps specific for child app
9
9
  */
10
10
  export declare const commandLineListTokens: {
11
- customerStart: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<Command>;
12
- resolveUserDeps: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<Command>;
13
- resolvePageDeps: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<Command>;
14
- clear: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<Command>;
15
- spaTransition: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<Command>;
16
- afterSpaTransition: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<Command>;
11
+ customerStart: import("@tinkoff/dippy").MultiTokenInterface<Command>;
12
+ resolveUserDeps: import("@tinkoff/dippy").MultiTokenInterface<Command>;
13
+ resolvePageDeps: import("@tinkoff/dippy").MultiTokenInterface<Command>;
14
+ clear: import("@tinkoff/dippy").MultiTokenInterface<Command>;
15
+ spaTransition: import("@tinkoff/dippy").MultiTokenInterface<Command>;
16
+ afterSpaTransition: import("@tinkoff/dippy").MultiTokenInterface<Command>;
17
17
  };
18
18
  /**
19
19
  * @public
20
20
  * @description Contains child app configs that was used to figure out how to load child apps
21
21
  */
22
- export declare const CHILD_APP_RESOLUTION_CONFIGS_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<ChildAppResolutionConfig | ChildAppResolutionConfig[] | (() => ChildAppResolutionConfig | ChildAppResolutionConfig[])>;
22
+ export declare const CHILD_APP_RESOLUTION_CONFIGS_TOKEN: import("@tinkoff/dippy").MultiTokenInterface<ChildAppResolutionConfig | ChildAppResolutionConfig[] | (() => ChildAppResolutionConfig | ChildAppResolutionConfig[])>;
23
23
  /**
24
24
  * @public
25
25
  * @description Used to resolve and extend resolution configs for child-apps
26
26
  */
27
- export declare const CHILD_APP_RESOLUTION_CONFIG_MANAGER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<{
27
+ export declare const CHILD_APP_RESOLUTION_CONFIG_MANAGER_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<{
28
28
  resolve(config: ChildAppRequestConfig): ResolutionConfig | null;
29
29
  init(): Promise<void>;
30
30
  }>;
@@ -32,38 +32,38 @@ export declare const CHILD_APP_RESOLUTION_CONFIG_MANAGER_TOKEN: import("@tinkoff
32
32
  * @public
33
33
  * @description Used to resolve external config with urls to external code entries
34
34
  */
35
- export declare const CHILD_APP_RESOLVE_CONFIG_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<(config: ChildAppRequestConfig) => ChildAppFinalConfig>;
35
+ export declare const CHILD_APP_RESOLVE_CONFIG_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<(config: ChildAppRequestConfig) => ChildAppFinalConfig>;
36
36
  /**
37
37
  * @public
38
38
  * @description Base url for external urls for child apps on client
39
39
  */
40
- export declare const CHILD_APP_RESOLVE_BASE_URL_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<string>;
40
+ export declare const CHILD_APP_RESOLVE_BASE_URL_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<string>;
41
41
  /**
42
42
  * @public
43
43
  * @description Allows to preload child app for the specific page
44
44
  */
45
- export declare const CHILD_APP_PRELOAD_MANAGER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ChildAppPreloadManager>;
45
+ export declare const CHILD_APP_PRELOAD_MANAGER_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<ChildAppPreloadManager>;
46
46
  /**
47
47
  * @public
48
48
  * @description Contains child app config that was used to load current child app
49
49
  */
50
- export declare const CHILD_APP_INTERNAL_CONFIG_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ChildAppFinalConfig>;
50
+ export declare const CHILD_APP_INTERNAL_CONFIG_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<ChildAppFinalConfig>;
51
51
  /**
52
52
  * @public
53
53
  * @description Actions of child app
54
54
  */
55
- export declare const CHILD_APP_INTERNAL_ACTION_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<Action<any, any, any> | Action<any, any, any>[]>;
55
+ export declare const CHILD_APP_INTERNAL_ACTION_TOKEN: import("@tinkoff/dippy").MultiTokenInterface<Action<any, any, any> | TramvaiAction<any[], any, any> | (Action<any, any, any> | TramvaiAction<any[], any, any>)[]>;
56
56
  /**
57
57
  * @deprecated use CHILD_APP_INTERNAL_ROOT_STATE_ALLOWED_STORE_TOKEN
58
58
  * @public
59
59
  * @description Subscription on a root state updates
60
60
  */
61
- export declare const CHILD_APP_INTERNAL_ROOT_STATE_SUBSCRIPTION_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<RootStateSubscription>;
61
+ export declare const CHILD_APP_INTERNAL_ROOT_STATE_SUBSCRIPTION_TOKEN: import("@tinkoff/dippy").MultiTokenInterface<RootStateSubscription>;
62
62
  /**
63
63
  * @public
64
64
  * @description Root-app stores that might be used inside child-app
65
65
  */
66
- export declare const CHILD_APP_INTERNAL_ROOT_STATE_ALLOWED_STORE_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<string | StoreClass>;
66
+ export declare const CHILD_APP_INTERNAL_ROOT_STATE_ALLOWED_STORE_TOKEN: import("@tinkoff/dippy").MultiTokenInterface<string | StoreClass>;
67
67
  /**
68
68
  * @public
69
69
  * @description Allows to recreate token implementation the same way as in root di, but specific to child-app di
@@ -73,46 +73,46 @@ export declare const CHILD_APP_INTERNAL_ROOT_DI_BORROW_TOKEN: any;
73
73
  * @private
74
74
  * @description boolean flag indicating that current di if for a child-app
75
75
  */
76
- export declare const IS_CHILD_APP_DI_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<boolean>;
76
+ export declare const IS_CHILD_APP_DI_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<boolean>;
77
77
  /**
78
78
  * @private
79
79
  * @description Manages Singleton-Scope DIs for every child app
80
80
  */
81
- export declare const CHILD_APP_SINGLETON_DI_MANAGER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ChildAppDiManager>;
81
+ export declare const CHILD_APP_SINGLETON_DI_MANAGER_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<ChildAppDiManager>;
82
82
  /**
83
83
  * @private
84
84
  * @description Manages Request-Scope DIs for every child app
85
85
  */
86
- export declare const CHILD_APP_DI_MANAGER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ChildAppDiManager>;
86
+ export declare const CHILD_APP_DI_MANAGER_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<ChildAppDiManager>;
87
87
  /**
88
88
  * @private
89
89
  * @description Bridge from React render to di providers for child apps
90
90
  */
91
- export declare const CHILD_APP_RENDER_MANAGER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ChildAppRenderManager>;
91
+ export declare const CHILD_APP_RENDER_MANAGER_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<ChildAppRenderManager>;
92
92
  /**
93
93
  * @private
94
94
  * @description Manages state dehydration for child-app
95
95
  */
96
- export declare const CHILD_APP_STATE_MANAGER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ChildAppStateManager>;
96
+ export declare const CHILD_APP_STATE_MANAGER_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<ChildAppStateManager>;
97
97
  /**
98
98
  * @private
99
99
  * @description Manages loading child-app resources from the external place
100
100
  */
101
- export declare const CHILD_APP_LOADER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ChildAppLoader>;
101
+ export declare const CHILD_APP_LOADER_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<ChildAppLoader>;
102
102
  /**
103
103
  * @private
104
104
  * @description Implements CommandLineRunner for child apps
105
105
  */
106
- export declare const CHILD_APP_COMMAND_LINE_RUNNER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ChildAppCommandLineRunner>;
106
+ export declare const CHILD_APP_COMMAND_LINE_RUNNER_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<ChildAppCommandLineRunner>;
107
107
  /**
108
108
  * @private
109
109
  * @description Stores the common server-dehydrated state for all of child apps
110
110
  */
111
- export declare const CHILD_APP_COMMON_INITIAL_STATE_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<Record<string, import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<{
111
+ export declare const CHILD_APP_COMMON_INITIAL_STATE_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<Record<string, import("@tinkoff/dippy").BaseTokenInterface<{
112
112
  stores: Record<string, any>;
113
113
  }>>>;
114
114
  /**
115
115
  * @private
116
116
  * @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
117
  */
118
- export declare const CHILD_APP_INTERNAL_RENDER_TOKEN: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ComponentType<WrapperProps<any>>>;
118
+ export declare const CHILD_APP_INTERNAL_RENDER_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<ComponentType<WrapperProps<any>>>;
package/lib/types.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { Container, Provider } from '@tinkoff/dippy';
2
- import type { CommandLines, CommandLineDescription, ModuleType, ExtendedModule, Action } from '@tramvai/core';
2
+ import type { CommandLines, CommandLineDescription, ModuleType, ExtendedModule, Action, TramvaiAction } from '@tramvai/core';
3
3
  export interface ChildApp {
4
4
  name: string;
5
5
  modules?: (ModuleType | ExtendedModule)[];
6
- actions?: Action[];
6
+ actions?: Array<Action | TramvaiAction<any[], any, any>>;
7
7
  providers: Provider[];
8
8
  }
9
9
  export interface ChildAppRequestConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-child-app",
3
- "version": "2.7.1",
3
+ "version": "2.10.2",
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.7.44",
25
- "@tramvai/core": "2.7.1",
26
- "@tramvai/state": "2.7.1",
27
- "@tramvai/tokens-common": "2.7.1",
24
+ "@tinkoff/dippy": "0.7.45",
25
+ "@tramvai/core": "2.10.2",
26
+ "@tramvai/state": "2.10.2",
27
+ "@tramvai/tokens-common": "2.10.2",
28
28
  "react": ">=16.14.0"
29
29
  },
30
30
  "module": "lib/index.es.js"