@tramvai/tokens-render 2.7.0 → 2.11.0
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 +12 -12
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ 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
|
|
11
|
+
export declare const RENDER_SLOTS: import("@tinkoff/dippy").MultiTokenInterface<PageResource | PageResource[]>;
|
|
12
12
|
/**
|
|
13
13
|
* @description
|
|
14
14
|
* Token for defining additional attributes for html, body and app container. Keep in mind that:
|
|
@@ -30,23 +30,23 @@ export declare const RENDER_SLOTS: import("@tinkoff/dippy/lib/createToken/create
|
|
|
30
30
|
},
|
|
31
31
|
```
|
|
32
32
|
*/
|
|
33
|
-
export declare const HTML_ATTRS: import("@tinkoff/dippy
|
|
33
|
+
export declare const HTML_ATTRS: import("@tinkoff/dippy").MultiTokenInterface<HtmlAttrs>;
|
|
34
34
|
/**
|
|
35
35
|
* @description
|
|
36
36
|
* Add node-style callback on render event in browser.
|
|
37
37
|
* Passes error instance as first argument if there was an error
|
|
38
38
|
*/
|
|
39
|
-
export declare const RENDERER_CALLBACK: import("@tinkoff/dippy
|
|
39
|
+
export declare const RENDERER_CALLBACK: import("@tinkoff/dippy").MultiTokenInterface<(e?: Error) => void>;
|
|
40
40
|
/**
|
|
41
41
|
* @description
|
|
42
42
|
* Used as async function which overrides app render. This function may define render parameters or override render result.
|
|
43
43
|
*/
|
|
44
|
-
export declare const CUSTOM_RENDER: import("@tinkoff/dippy
|
|
44
|
+
export declare const CUSTOM_RENDER: import("@tinkoff/dippy").BaseTokenInterface<(content: JSX.Element) => Promise<string>>;
|
|
45
45
|
/**
|
|
46
46
|
* @description
|
|
47
47
|
* 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
48
|
*/
|
|
49
|
-
export declare const RESOURCES_REGISTRY: import("@tinkoff/dippy
|
|
49
|
+
export declare const RESOURCES_REGISTRY: import("@tinkoff/dippy").BaseTokenInterface<ResourcesRegistry>;
|
|
50
50
|
/**
|
|
51
51
|
* @description
|
|
52
52
|
* A string used for check of need to loading polyfills in the client browser.
|
|
@@ -56,22 +56,22 @@ export declare const RESOURCES_REGISTRY: import("@tinkoff/dippy/lib/createToken/
|
|
|
56
56
|
*
|
|
57
57
|
* [Polyfill documentation](https://tramvai.dev/docs/how-to/how-to-enable-polyfills)
|
|
58
58
|
*/
|
|
59
|
-
export declare const POLYFILL_CONDITION: import("@tinkoff/dippy
|
|
59
|
+
export declare const POLYFILL_CONDITION: import("@tinkoff/dippy").BaseTokenInterface<string>;
|
|
60
60
|
/**
|
|
61
61
|
* @deprecated tramvai will automatically detect React version, and use hydrateRoot API for 18+ version
|
|
62
62
|
* For Strict Mode, use token `USE_REACT_STRICT_MODE`
|
|
63
63
|
*/
|
|
64
|
-
export declare const RENDER_MODE: import("@tinkoff/dippy
|
|
64
|
+
export declare const RENDER_MODE: import("@tinkoff/dippy").BaseTokenInterface<RenderMode>;
|
|
65
65
|
/**
|
|
66
66
|
* @description add Strict Mode wrapper, more info available in documentation https://reactjs.org/docs/strict-mode.html
|
|
67
67
|
*/
|
|
68
|
-
export declare const USE_REACT_STRICT_MODE: import("@tinkoff/dippy
|
|
68
|
+
export declare const USE_REACT_STRICT_MODE: import("@tinkoff/dippy").BaseTokenInterface<boolean>;
|
|
69
69
|
/**
|
|
70
70
|
* @description
|
|
71
71
|
* A wrapper for app render.
|
|
72
72
|
* Through that token is possible to specify for example React.Context.Provider for the app
|
|
73
73
|
*/
|
|
74
|
-
export declare const EXTEND_RENDER: import("@tinkoff/dippy
|
|
74
|
+
export declare const EXTEND_RENDER: import("@tinkoff/dippy").MultiTokenInterface<(current: ReactElement) => ReactElement>;
|
|
75
75
|
/**
|
|
76
76
|
* @description
|
|
77
77
|
* Token for default layout for page
|
|
@@ -91,7 +91,7 @@ export declare const DEFAULT_FOOTER_COMPONENT: any;
|
|
|
91
91
|
* @description
|
|
92
92
|
* Token for passing parameters for page layout
|
|
93
93
|
*/
|
|
94
|
-
export declare const LAYOUT_OPTIONS: import("@tinkoff/dippy
|
|
94
|
+
export declare const LAYOUT_OPTIONS: import("@tinkoff/dippy").MultiTokenInterface<LayoutOptions | LayoutOptions[]>;
|
|
95
95
|
declare type ReactComponent = ComponentType<any>;
|
|
96
96
|
declare type Wrapper = (WrappedComponent: ReactComponent) => ReactComponent;
|
|
97
97
|
export interface LayoutOptions {
|
|
@@ -128,12 +128,12 @@ declare type ResourceInlineOptions = {
|
|
|
128
128
|
* * threshold Maximum value (in bytes) of the file which are getting inlined in HTML page
|
|
129
129
|
* * types Types of resources which should be inlined
|
|
130
130
|
*/
|
|
131
|
-
export declare const RESOURCE_INLINE_OPTIONS: import("@tinkoff/dippy
|
|
131
|
+
export declare const RESOURCE_INLINE_OPTIONS: import("@tinkoff/dippy").BaseTokenInterface<ResourceInlineOptions>;
|
|
132
132
|
/**
|
|
133
133
|
* @description
|
|
134
134
|
* Experimental switcher from ssr to client-side rendering mode
|
|
135
135
|
*/
|
|
136
|
-
export declare const TRAMVAI_RENDER_MODE: import("@tinkoff/dippy
|
|
136
|
+
export declare const TRAMVAI_RENDER_MODE: import("@tinkoff/dippy").BaseTokenInterface<TramvaiRenderMode>;
|
|
137
137
|
export declare type TramvaiRenderMode = 'ssr' | 'client';
|
|
138
138
|
export { ResourceSlot };
|
|
139
139
|
export { StorageRecord as ResourceType };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-render",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
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.4.24"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@tinkoff/dippy": "0.7.
|
|
25
|
+
"@tinkoff/dippy": "0.7.45",
|
|
26
26
|
"react": ">=16.14.0",
|
|
27
27
|
"tslib": "^2.0.3"
|
|
28
28
|
},
|