@tramvai/tokens-render 2.7.1 → 2.20.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 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/lib/createToken/createToken").MultiTokenInterface<PageResource | PageResource[]>;
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/lib/createToken/createToken").MultiTokenInterface<HtmlAttrs>;
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/lib/createToken/createToken").MultiTokenInterface<(e?: Error) => void>;
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/lib/createToken/createToken").BaseTokenInterface<(content: JSX.Element) => Promise<string>>;
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/lib/createToken/createToken").BaseTokenInterface<ResourcesRegistry>;
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/lib/createToken/createToken").BaseTokenInterface<string>;
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/lib/createToken/createToken").BaseTokenInterface<RenderMode>;
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/lib/createToken/createToken").BaseTokenInterface<boolean>;
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/lib/createToken/createToken").MultiTokenInterface<(current: ReactElement) => ReactElement>;
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/lib/createToken/createToken").MultiTokenInterface<LayoutOptions | LayoutOptions[]>;
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,13 @@ 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/lib/createToken/createToken").BaseTokenInterface<ResourceInlineOptions>;
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/lib/createToken/createToken").BaseTokenInterface<TramvaiRenderMode>;
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 };
140
+ export declare const RENDER_FLOW_AFTER_TOKEN: import("@tinkoff/dippy").MultiTokenInterface<() => Promise<void>>;
package/lib/index.es.js CHANGED
@@ -143,5 +143,8 @@ const RESOURCE_INLINE_OPTIONS = createToken('resourceInlineThreshold');
143
143
  * Experimental switcher from ssr to client-side rendering mode
144
144
  */
145
145
  const TRAMVAI_RENDER_MODE = createToken('tramvaiRenderMode');
146
+ const RENDER_FLOW_AFTER_TOKEN = createToken('render flow after', {
147
+ multi: true,
148
+ });
146
149
 
147
- export { CUSTOM_RENDER, DEFAULT_FOOTER_COMPONENT, DEFAULT_HEADER_COMPONENT, DEFAULT_LAYOUT_COMPONENT, EXTEND_RENDER, HTML_ATTRS, LAYOUT_OPTIONS, POLYFILL_CONDITION, RENDERER_CALLBACK, RENDER_MODE, RENDER_SLOTS, RESOURCES_REGISTRY, RESOURCE_INLINE_OPTIONS, slots as ResourceSlot, TRAMVAI_RENDER_MODE, USE_REACT_STRICT_MODE };
150
+ export { CUSTOM_RENDER, DEFAULT_FOOTER_COMPONENT, DEFAULT_HEADER_COMPONENT, DEFAULT_LAYOUT_COMPONENT, EXTEND_RENDER, HTML_ATTRS, LAYOUT_OPTIONS, POLYFILL_CONDITION, RENDERER_CALLBACK, RENDER_FLOW_AFTER_TOKEN, RENDER_MODE, RENDER_SLOTS, RESOURCES_REGISTRY, RESOURCE_INLINE_OPTIONS, slots as ResourceSlot, TRAMVAI_RENDER_MODE, USE_REACT_STRICT_MODE };
package/lib/index.js CHANGED
@@ -147,6 +147,9 @@ const RESOURCE_INLINE_OPTIONS = dippy.createToken('resourceInlineThreshold');
147
147
  * Experimental switcher from ssr to client-side rendering mode
148
148
  */
149
149
  const TRAMVAI_RENDER_MODE = dippy.createToken('tramvaiRenderMode');
150
+ const RENDER_FLOW_AFTER_TOKEN = dippy.createToken('render flow after', {
151
+ multi: true,
152
+ });
150
153
 
151
154
  Object.defineProperty(exports, 'ResourceType', {
152
155
  enumerable: true,
@@ -161,6 +164,7 @@ exports.HTML_ATTRS = HTML_ATTRS;
161
164
  exports.LAYOUT_OPTIONS = LAYOUT_OPTIONS;
162
165
  exports.POLYFILL_CONDITION = POLYFILL_CONDITION;
163
166
  exports.RENDERER_CALLBACK = RENDERER_CALLBACK;
167
+ exports.RENDER_FLOW_AFTER_TOKEN = RENDER_FLOW_AFTER_TOKEN;
164
168
  exports.RENDER_MODE = RENDER_MODE;
165
169
  exports.RENDER_SLOTS = RENDER_SLOTS;
166
170
  exports.RESOURCES_REGISTRY = RESOURCES_REGISTRY;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-render",
3
- "version": "2.7.1",
3
+ "version": "2.20.0",
4
4
  "description": "Tramvai tokens for @tramvai/module-render",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -19,10 +19,10 @@
19
19
  "build-for-publish": "true"
20
20
  },
21
21
  "dependencies": {
22
- "@tinkoff/htmlpagebuilder": "0.4.24"
22
+ "@tinkoff/htmlpagebuilder": "0.5.2"
23
23
  },
24
24
  "peerDependencies": {
25
- "@tinkoff/dippy": "0.7.44",
25
+ "@tinkoff/dippy": "0.8.2",
26
26
  "react": ">=16.14.0",
27
27
  "tslib": "^2.0.3"
28
28
  },