@tramvai/tokens-render 6.82.35 → 6.82.37
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 +8 -1
- package/lib/index.es.js +5 -2
- package/lib/index.js +6 -1
- package/lib/slots.d.ts +4 -0
- package/lib/slots.es.js +5 -1
- package/lib/slots.js +5 -0
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import type { UniversalErrorBoundaryFallbackProps } from '@tramvai/react';
|
|
|
4
4
|
import type { JSX } from 'react';
|
|
5
5
|
import * as ResourceSlot from './slots';
|
|
6
6
|
/**
|
|
7
|
-
* @deprecated use `TRAMVAI_HOOKS_TOKEN['react:render']` and `TRAMVAI_HOOKS_TOKEN['react:error']` instead
|
|
8
7
|
* @description
|
|
9
8
|
* Token adding resources to specific render slots.
|
|
10
9
|
* Used only on server and it is equivalent to usage of RESOURCES_REGISTRY.
|
|
@@ -41,6 +40,8 @@ export declare const HTML_ATTRS: HtmlAttrs & {
|
|
|
41
40
|
__type?: "multi token" | undefined;
|
|
42
41
|
};
|
|
43
42
|
/**
|
|
43
|
+
* @deprecated use `TRAMVAI_HOOKS_TOKEN['react:render']` and `TRAMVAI_HOOKS_TOKEN['react:error']` instead
|
|
44
|
+
*
|
|
44
45
|
* @description
|
|
45
46
|
* Add node-style callback on render event in browser.
|
|
46
47
|
* Passes error instance as first argument if there was an error
|
|
@@ -261,4 +262,10 @@ export declare const ASSETS_PREFIX_TOKEN: (() => string | null) & {
|
|
|
261
262
|
export declare const DEFAULT_ASSETS_PREFIX_TOKEN: (string & {
|
|
262
263
|
__type?: "base token" | undefined;
|
|
263
264
|
}) | null;
|
|
265
|
+
export declare const RETRY_HOSTNAME_MAP: Record<string, string> & {
|
|
266
|
+
__type?: "base token" | undefined;
|
|
267
|
+
};
|
|
268
|
+
export declare const GET_RETRY_URL: ((url: string) => string) & {
|
|
269
|
+
__type?: "base token" | undefined;
|
|
270
|
+
};
|
|
264
271
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.es.js
CHANGED
|
@@ -4,7 +4,6 @@ import * as slots from './slots.es.js';
|
|
|
4
4
|
export { slots as ResourceSlot };
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* @deprecated use `TRAMVAI_HOOKS_TOKEN['react:render']` and `TRAMVAI_HOOKS_TOKEN['react:error']` instead
|
|
8
7
|
* @description
|
|
9
8
|
* Token adding resources to specific render slots.
|
|
10
9
|
* Used only on server and it is equivalent to usage of RESOURCES_REGISTRY.
|
|
@@ -37,6 +36,8 @@ const RENDER_SLOTS = createToken('RENDER_SLOTS', {
|
|
|
37
36
|
*/
|
|
38
37
|
const HTML_ATTRS = createToken('HTML_ATTRS', { multi: true });
|
|
39
38
|
/**
|
|
39
|
+
* @deprecated use `TRAMVAI_HOOKS_TOKEN['react:render']` and `TRAMVAI_HOOKS_TOKEN['react:error']` instead
|
|
40
|
+
*
|
|
40
41
|
* @description
|
|
41
42
|
* Add node-style callback on render event in browser.
|
|
42
43
|
* Passes error instance as first argument if there was an error
|
|
@@ -144,5 +145,7 @@ const ASSETS_PREFIX_TOKEN = createToken('tramvai assets prefix', {
|
|
|
144
145
|
scope: Scope.SINGLETON,
|
|
145
146
|
});
|
|
146
147
|
const DEFAULT_ASSETS_PREFIX_TOKEN = createToken('tramvai default assets prefix', { scope: Scope.SINGLETON });
|
|
148
|
+
const RETRY_HOSTNAME_MAP = createToken('tramvai retry assets hostname map');
|
|
149
|
+
const GET_RETRY_URL = createToken('tramvai get asset retry url');
|
|
147
150
|
|
|
148
|
-
export { ASSETS_PREFIX_TOKEN, BACK_FORWARD_CACHE_ENABLED, CUSTOM_RENDER, DEFAULT_ASSETS_PREFIX_TOKEN, DEFAULT_ERROR_BOUNDARY_COMPONENT, DEFAULT_FOOTER_COMPONENT, DEFAULT_HEADER_COMPONENT, DEFAULT_LAYOUT_COMPONENT, EXTEND_RENDER, FETCH_WEBPACK_STATS_TOKEN, HTML_ATTRS, INLINE_WEBPACK_RUNTIME, LAYOUT_OPTIONS, POLYFILL_CONDITION, REACT_SERVER_RENDER_MODE, REACT_STREAMING_RENDER_TIMEOUT, RENDERER_CALLBACK, RENDER_FLOW_AFTER_TOKEN, RENDER_MODE, RENDER_SLOTS, RESOURCES_REGISTRY, RESOURCE_INLINE_OPTIONS, TRAMVAI_RENDER_MODE, USE_REACT_STRICT_MODE };
|
|
151
|
+
export { ASSETS_PREFIX_TOKEN, BACK_FORWARD_CACHE_ENABLED, CUSTOM_RENDER, DEFAULT_ASSETS_PREFIX_TOKEN, DEFAULT_ERROR_BOUNDARY_COMPONENT, DEFAULT_FOOTER_COMPONENT, DEFAULT_HEADER_COMPONENT, DEFAULT_LAYOUT_COMPONENT, EXTEND_RENDER, FETCH_WEBPACK_STATS_TOKEN, GET_RETRY_URL, HTML_ATTRS, INLINE_WEBPACK_RUNTIME, LAYOUT_OPTIONS, POLYFILL_CONDITION, REACT_SERVER_RENDER_MODE, REACT_STREAMING_RENDER_TIMEOUT, RENDERER_CALLBACK, RENDER_FLOW_AFTER_TOKEN, RENDER_MODE, RENDER_SLOTS, RESOURCES_REGISTRY, RESOURCE_INLINE_OPTIONS, RETRY_HOSTNAME_MAP, TRAMVAI_RENDER_MODE, USE_REACT_STRICT_MODE };
|
package/lib/index.js
CHANGED
|
@@ -7,7 +7,6 @@ var htmlpagebuilder = require('@tinkoff/htmlpagebuilder');
|
|
|
7
7
|
var slots = require('./slots.js');
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* @deprecated use `TRAMVAI_HOOKS_TOKEN['react:render']` and `TRAMVAI_HOOKS_TOKEN['react:error']` instead
|
|
11
10
|
* @description
|
|
12
11
|
* Token adding resources to specific render slots.
|
|
13
12
|
* Used only on server and it is equivalent to usage of RESOURCES_REGISTRY.
|
|
@@ -40,6 +39,8 @@ const RENDER_SLOTS = dippy.createToken('RENDER_SLOTS', {
|
|
|
40
39
|
*/
|
|
41
40
|
const HTML_ATTRS = dippy.createToken('HTML_ATTRS', { multi: true });
|
|
42
41
|
/**
|
|
42
|
+
* @deprecated use `TRAMVAI_HOOKS_TOKEN['react:render']` and `TRAMVAI_HOOKS_TOKEN['react:error']` instead
|
|
43
|
+
*
|
|
43
44
|
* @description
|
|
44
45
|
* Add node-style callback on render event in browser.
|
|
45
46
|
* Passes error instance as first argument if there was an error
|
|
@@ -147,6 +148,8 @@ const ASSETS_PREFIX_TOKEN = dippy.createToken('tramvai assets prefix', {
|
|
|
147
148
|
scope: dippy.Scope.SINGLETON,
|
|
148
149
|
});
|
|
149
150
|
const DEFAULT_ASSETS_PREFIX_TOKEN = dippy.createToken('tramvai default assets prefix', { scope: dippy.Scope.SINGLETON });
|
|
151
|
+
const RETRY_HOSTNAME_MAP = dippy.createToken('tramvai retry assets hostname map');
|
|
152
|
+
const GET_RETRY_URL = dippy.createToken('tramvai get asset retry url');
|
|
150
153
|
|
|
151
154
|
Object.defineProperty(exports, 'ResourceType', {
|
|
152
155
|
enumerable: true,
|
|
@@ -163,6 +166,7 @@ exports.DEFAULT_HEADER_COMPONENT = DEFAULT_HEADER_COMPONENT;
|
|
|
163
166
|
exports.DEFAULT_LAYOUT_COMPONENT = DEFAULT_LAYOUT_COMPONENT;
|
|
164
167
|
exports.EXTEND_RENDER = EXTEND_RENDER;
|
|
165
168
|
exports.FETCH_WEBPACK_STATS_TOKEN = FETCH_WEBPACK_STATS_TOKEN;
|
|
169
|
+
exports.GET_RETRY_URL = GET_RETRY_URL;
|
|
166
170
|
exports.HTML_ATTRS = HTML_ATTRS;
|
|
167
171
|
exports.INLINE_WEBPACK_RUNTIME = INLINE_WEBPACK_RUNTIME;
|
|
168
172
|
exports.LAYOUT_OPTIONS = LAYOUT_OPTIONS;
|
|
@@ -175,5 +179,6 @@ exports.RENDER_MODE = RENDER_MODE;
|
|
|
175
179
|
exports.RENDER_SLOTS = RENDER_SLOTS;
|
|
176
180
|
exports.RESOURCES_REGISTRY = RESOURCES_REGISTRY;
|
|
177
181
|
exports.RESOURCE_INLINE_OPTIONS = RESOURCE_INLINE_OPTIONS;
|
|
182
|
+
exports.RETRY_HOSTNAME_MAP = RETRY_HOSTNAME_MAP;
|
|
178
183
|
exports.TRAMVAI_RENDER_MODE = TRAMVAI_RENDER_MODE;
|
|
179
184
|
exports.USE_REACT_STRICT_MODE = USE_REACT_STRICT_MODE;
|
package/lib/slots.d.ts
CHANGED
|
@@ -4,12 +4,16 @@ export declare const HEAD_CORE_STYLES: "head:core-styles";
|
|
|
4
4
|
export declare const HEAD_WEBPACK_RUNTIME: "head:webpack-runtime";
|
|
5
5
|
export declare const HEAD_POLYFILLS: "head:polyfills";
|
|
6
6
|
export declare const HEAD_CORE_SCRIPTS: "head:core-scripts";
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated prefer BODY_DYNAMIC_SCRIPTS and async=true for microfrontends scripts
|
|
9
|
+
*/
|
|
7
10
|
export declare const HEAD_DYNAMIC_SCRIPTS: "head:dynamic-scripts";
|
|
8
11
|
export declare const HEAD_ANALYTICS: "head:analytics";
|
|
9
12
|
export declare const HEAD_ICONS: "head:icons";
|
|
10
13
|
export declare const BODY_START: "body:start";
|
|
11
14
|
export declare const REACT_RENDER: "react:render";
|
|
12
15
|
export declare const BODY_END: "body:end";
|
|
16
|
+
export declare const BODY_DYNAMIC_SCRIPTS: "body:dynamic-scripts";
|
|
13
17
|
export declare const BODY_TAIL_ANALYTICS: "body:tail:analytics";
|
|
14
18
|
export declare const BODY_TAIL: "body:tail";
|
|
15
19
|
//# sourceMappingURL=slots.d.ts.map
|
package/lib/slots.es.js
CHANGED
|
@@ -4,13 +4,17 @@ const HEAD_CORE_STYLES = 'head:core-styles';
|
|
|
4
4
|
const HEAD_WEBPACK_RUNTIME = 'head:webpack-runtime';
|
|
5
5
|
const HEAD_POLYFILLS = 'head:polyfills';
|
|
6
6
|
const HEAD_CORE_SCRIPTS = 'head:core-scripts';
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated prefer BODY_DYNAMIC_SCRIPTS and async=true for microfrontends scripts
|
|
9
|
+
*/
|
|
7
10
|
const HEAD_DYNAMIC_SCRIPTS = 'head:dynamic-scripts';
|
|
8
11
|
const HEAD_ANALYTICS = 'head:analytics';
|
|
9
12
|
const HEAD_ICONS = 'head:icons';
|
|
10
13
|
const BODY_START = 'body:start';
|
|
11
14
|
const REACT_RENDER = 'react:render';
|
|
12
15
|
const BODY_END = 'body:end';
|
|
16
|
+
const BODY_DYNAMIC_SCRIPTS = 'body:dynamic-scripts';
|
|
13
17
|
const BODY_TAIL_ANALYTICS = 'body:tail:analytics';
|
|
14
18
|
const BODY_TAIL = 'body:tail';
|
|
15
19
|
|
|
16
|
-
export { BODY_END, BODY_START, BODY_TAIL, BODY_TAIL_ANALYTICS, HEAD_ANALYTICS, HEAD_CORE_SCRIPTS, HEAD_CORE_STYLES, HEAD_DYNAMIC_SCRIPTS, HEAD_ICONS, HEAD_META, HEAD_PERFORMANCE, HEAD_POLYFILLS, HEAD_WEBPACK_RUNTIME, REACT_RENDER };
|
|
20
|
+
export { BODY_DYNAMIC_SCRIPTS, BODY_END, BODY_START, BODY_TAIL, BODY_TAIL_ANALYTICS, HEAD_ANALYTICS, HEAD_CORE_SCRIPTS, HEAD_CORE_STYLES, HEAD_DYNAMIC_SCRIPTS, HEAD_ICONS, HEAD_META, HEAD_PERFORMANCE, HEAD_POLYFILLS, HEAD_WEBPACK_RUNTIME, REACT_RENDER };
|
package/lib/slots.js
CHANGED
|
@@ -8,15 +8,20 @@ const HEAD_CORE_STYLES = 'head:core-styles';
|
|
|
8
8
|
const HEAD_WEBPACK_RUNTIME = 'head:webpack-runtime';
|
|
9
9
|
const HEAD_POLYFILLS = 'head:polyfills';
|
|
10
10
|
const HEAD_CORE_SCRIPTS = 'head:core-scripts';
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated prefer BODY_DYNAMIC_SCRIPTS and async=true for microfrontends scripts
|
|
13
|
+
*/
|
|
11
14
|
const HEAD_DYNAMIC_SCRIPTS = 'head:dynamic-scripts';
|
|
12
15
|
const HEAD_ANALYTICS = 'head:analytics';
|
|
13
16
|
const HEAD_ICONS = 'head:icons';
|
|
14
17
|
const BODY_START = 'body:start';
|
|
15
18
|
const REACT_RENDER = 'react:render';
|
|
16
19
|
const BODY_END = 'body:end';
|
|
20
|
+
const BODY_DYNAMIC_SCRIPTS = 'body:dynamic-scripts';
|
|
17
21
|
const BODY_TAIL_ANALYTICS = 'body:tail:analytics';
|
|
18
22
|
const BODY_TAIL = 'body:tail';
|
|
19
23
|
|
|
24
|
+
exports.BODY_DYNAMIC_SCRIPTS = BODY_DYNAMIC_SCRIPTS;
|
|
20
25
|
exports.BODY_END = BODY_END;
|
|
21
26
|
exports.BODY_START = BODY_START;
|
|
22
27
|
exports.BODY_TAIL = BODY_TAIL;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-render",
|
|
3
|
-
"version": "6.82.
|
|
3
|
+
"version": "6.82.37",
|
|
4
4
|
"description": "Tramvai tokens for @tramvai/module-render",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.es.js",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"watch": "tsc -w"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@tramvai/react": "6.82.
|
|
21
|
+
"@tramvai/react": "6.82.37"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tinkoff/htmlpagebuilder": "0.9.
|
|
24
|
+
"@tinkoff/htmlpagebuilder": "0.9.4"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@tinkoff/dippy": "^1.0.0",
|