@tramvai/tokens-render 7.37.2 → 7.38.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 +8 -1
- package/lib/index.es.js +5 -2
- package/lib/index.js +6 -1
- package/package.json +2 -2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-render",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.38.0",
|
|
4
4
|
"description": "Tramvai tokens for @tramvai/module-render",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.es.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"watch": "tsc -w"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@tramvai/react": "7.
|
|
21
|
+
"@tramvai/react": "7.38.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@tinkoff/htmlpagebuilder": "0.10.1"
|