@tramvai/tokens-render 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.
Files changed (2) hide show
  1. package/lib/index.d.ts +65 -15
  2. package/package.json +2 -2
package/lib/index.d.ts CHANGED
@@ -8,7 +8,11 @@ import * as ResourceSlot from './slots';
8
8
  *
9
9
  * [Usage example](https://tramvai.dev/docs/how-to/render-add-resources)
10
10
  */
11
- export declare const RENDER_SLOTS: import("@tinkoff/dippy").MultiTokenInterface<PageResource | PageResource[]>;
11
+ export declare const RENDER_SLOTS: (PageResource & {
12
+ __type?: "multi token" | undefined;
13
+ }) | (PageResource[] & {
14
+ __type?: "multi token" | undefined;
15
+ });
12
16
  /**
13
17
  * @description
14
18
  * Token for defining additional attributes for html, body and app container. Keep in mind that:
@@ -30,23 +34,31 @@ export declare const RENDER_SLOTS: import("@tinkoff/dippy").MultiTokenInterface<
30
34
  },
31
35
  ```
32
36
  */
33
- export declare const HTML_ATTRS: import("@tinkoff/dippy").MultiTokenInterface<HtmlAttrs>;
37
+ export declare const HTML_ATTRS: HtmlAttrs & {
38
+ __type?: "multi token" | undefined;
39
+ };
34
40
  /**
35
41
  * @description
36
42
  * Add node-style callback on render event in browser.
37
43
  * Passes error instance as first argument if there was an error
38
44
  */
39
- export declare const RENDERER_CALLBACK: import("@tinkoff/dippy").MultiTokenInterface<(e?: Error) => void>;
45
+ export declare const RENDERER_CALLBACK: ((e?: Error) => void) & {
46
+ __type?: "multi token" | undefined;
47
+ };
40
48
  /**
41
49
  * @description
42
50
  * Used as async function which overrides app render. This function may define render parameters or override render result.
43
51
  */
44
- export declare const CUSTOM_RENDER: import("@tinkoff/dippy").BaseTokenInterface<(content: JSX.Element) => Promise<string>>;
52
+ export declare const CUSTOM_RENDER: ((content: JSX.Element) => Promise<string>) & {
53
+ __type?: "base token" | undefined;
54
+ };
45
55
  /**
46
56
  * @description
47
57
  * Resources registry is used only on server for registering any additional assets for browser (scripts, styles, html) which should be added to response html page
48
58
  */
49
- export declare const RESOURCES_REGISTRY: import("@tinkoff/dippy").BaseTokenInterface<ResourcesRegistry>;
59
+ export declare const RESOURCES_REGISTRY: ResourcesRegistry & {
60
+ __type?: "base token" | undefined;
61
+ };
50
62
  /**
51
63
  * @description
52
64
  * A string used for check of need to loading polyfills in the client browser.
@@ -56,22 +68,38 @@ export declare const RESOURCES_REGISTRY: import("@tinkoff/dippy").BaseTokenInter
56
68
  *
57
69
  * [Polyfill documentation](https://tramvai.dev/docs/how-to/how-to-enable-polyfills)
58
70
  */
59
- export declare const POLYFILL_CONDITION: import("@tinkoff/dippy").BaseTokenInterface<string>;
71
+ export declare const POLYFILL_CONDITION: string & {
72
+ __type?: "base token" | undefined;
73
+ };
60
74
  /**
61
75
  * @deprecated tramvai will automatically detect React version, and use hydrateRoot API for 18+ version
62
76
  * For Strict Mode, use token `USE_REACT_STRICT_MODE`
63
77
  */
64
- export declare const RENDER_MODE: import("@tinkoff/dippy").BaseTokenInterface<RenderMode>;
78
+ export declare const RENDER_MODE: ("legacy" & {
79
+ __type?: "base token" | undefined;
80
+ }) | ("strict" & {
81
+ __type?: "base token" | undefined;
82
+ }) | ("blocking" & {
83
+ __type?: "base token" | undefined;
84
+ }) | ("concurrent" & {
85
+ __type?: "base token" | undefined;
86
+ });
65
87
  /**
66
88
  * @description add Strict Mode wrapper, more info available in documentation https://reactjs.org/docs/strict-mode.html
67
89
  */
68
- export declare const USE_REACT_STRICT_MODE: import("@tinkoff/dippy").BaseTokenInterface<boolean>;
90
+ export declare const USE_REACT_STRICT_MODE: (false & {
91
+ __type?: "base token" | undefined;
92
+ }) | (true & {
93
+ __type?: "base token" | undefined;
94
+ });
69
95
  /**
70
96
  * @description
71
97
  * A wrapper for app render.
72
98
  * Through that token is possible to specify for example React.Context.Provider for the app
73
99
  */
74
- export declare const EXTEND_RENDER: import("@tinkoff/dippy").MultiTokenInterface<(current: ReactElement) => ReactElement>;
100
+ export declare const EXTEND_RENDER: ((current: ReactElement) => ReactElement) & {
101
+ __type?: "multi token" | undefined;
102
+ };
75
103
  /**
76
104
  * @description
77
105
  * Token for default layout for all pages - root layout
@@ -91,7 +119,11 @@ export declare const DEFAULT_FOOTER_COMPONENT: any;
91
119
  * @description
92
120
  * Token for passing parameters for page layout
93
121
  */
94
- export declare const LAYOUT_OPTIONS: import("@tinkoff/dippy").MultiTokenInterface<LayoutOptions | LayoutOptions[]>;
122
+ export declare const LAYOUT_OPTIONS: (LayoutOptions & {
123
+ __type?: "multi token" | undefined;
124
+ }) | (LayoutOptions[] & {
125
+ __type?: "multi token" | undefined;
126
+ });
95
127
  type ReactComponent = ComponentType<any>;
96
128
  type Wrapper = (WrappedComponent: ReactComponent) => ReactComponent;
97
129
  export interface LayoutOptions {
@@ -128,16 +160,34 @@ type ResourceInlineOptions = {
128
160
  * * threshold Maximum value (in bytes) of the file which are getting inlined in HTML page
129
161
  * * types Types of resources which should be inlined
130
162
  */
131
- export declare const RESOURCE_INLINE_OPTIONS: import("@tinkoff/dippy").BaseTokenInterface<ResourceInlineOptions>;
163
+ export declare const RESOURCE_INLINE_OPTIONS: ResourceInlineOptions & {
164
+ __type?: "base token" | undefined;
165
+ };
132
166
  /**
133
167
  * @description
134
168
  * Experimental switcher from ssr to client-side rendering mode
135
169
  */
136
- export declare const TRAMVAI_RENDER_MODE: import("@tinkoff/dippy").BaseTokenInterface<TramvaiRenderMode>;
170
+ export declare const TRAMVAI_RENDER_MODE: ("ssr" & {
171
+ __type?: "base token" | undefined;
172
+ }) | ("client" & {
173
+ __type?: "base token" | undefined;
174
+ }) | ("static" & {
175
+ __type?: "base token" | undefined;
176
+ });
137
177
  export type TramvaiRenderMode = 'ssr' | 'client' | 'static';
138
178
  export { ResourceSlot };
139
179
  export { StorageRecord as ResourceType };
140
- export declare const RENDER_FLOW_AFTER_TOKEN: import("@tinkoff/dippy").MultiTokenInterface<() => Promise<void>>;
141
- export declare const MODERN_SATISFIES_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<boolean>;
180
+ export declare const RENDER_FLOW_AFTER_TOKEN: (() => Promise<void>) & {
181
+ __type?: "multi token" | undefined;
182
+ };
183
+ export declare const MODERN_SATISFIES_TOKEN: (false & {
184
+ __type?: "base token" | undefined;
185
+ }) | (true & {
186
+ __type?: "base token" | undefined;
187
+ });
142
188
  export type ReactServerRenderMode = 'sync' | 'streaming';
143
- export declare const REACT_SERVER_RENDER_MODE: import("@tinkoff/dippy").BaseTokenInterface<ReactServerRenderMode>;
189
+ export declare const REACT_SERVER_RENDER_MODE: ("sync" & {
190
+ __type?: "base token" | undefined;
191
+ }) | ("streaming" & {
192
+ __type?: "base token" | undefined;
193
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-render",
3
- "version": "2.56.1",
3
+ "version": "2.56.5",
4
4
  "description": "Tramvai tokens for @tramvai/module-render",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -22,7 +22,7 @@
22
22
  "@tinkoff/htmlpagebuilder": "0.5.5"
23
23
  },
24
24
  "peerDependencies": {
25
- "@tinkoff/dippy": "0.8.10",
25
+ "@tinkoff/dippy": "0.8.11",
26
26
  "react": ">=16.14.0",
27
27
  "tslib": "^2.4.0"
28
28
  },