@tramvai/tokens-render 2.0.0 → 2.2.2

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: PageResource | PageResource[];
11
+ export declare const RENDER_SLOTS: import("@tinkoff/dippy/lib/createToken/createToken").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: PageResource | PageResource[];
30
30
  },
31
31
  ```
32
32
  */
33
- export declare const HTML_ATTRS: HtmlAttrs;
33
+ export declare const HTML_ATTRS: import("@tinkoff/dippy/lib/createToken/createToken").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: ((e?: Error) => void)[];
39
+ export declare const RENDERER_CALLBACK: import("@tinkoff/dippy/lib/createToken/createToken").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: (content: JSX.Element) => Promise<string>;
44
+ export declare const CUSTOM_RENDER: import("@tinkoff/dippy/lib/createToken/createToken").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: ResourcesRegistry;
49
+ export declare const RESOURCES_REGISTRY: import("@tinkoff/dippy/lib/createToken/createToken").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: ResourcesRegistry;
56
56
  *
57
57
  * [Polyfill documentation](https://tramvai.dev/docs/how-to/how-to-enable-polyfills)
58
58
  */
59
- export declare const POLYFILL_CONDITION: string;
59
+ export declare const POLYFILL_CONDITION: import("@tinkoff/dippy/lib/createToken/createToken").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: RenderMode;
64
+ export declare const RENDER_MODE: import("@tinkoff/dippy/lib/createToken/createToken").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: boolean;
68
+ export declare const USE_REACT_STRICT_MODE: import("@tinkoff/dippy/lib/createToken/createToken").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: ((current: ReactElement) => ReactElement)[];
74
+ export declare const EXTEND_RENDER: import("@tinkoff/dippy/lib/createToken/createToken").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: LayoutOptions[];
94
+ export declare const LAYOUT_OPTIONS: import("@tinkoff/dippy/lib/createToken/createToken").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: ResourceInlineOptions;
131
+ export declare const RESOURCE_INLINE_OPTIONS: import("@tinkoff/dippy/lib/createToken/createToken").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: TramvaiRenderMode;
136
+ export declare const TRAMVAI_RENDER_MODE: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<TramvaiRenderMode>;
137
137
  export declare type TramvaiRenderMode = 'ssr' | 'client';
138
138
  export { ResourceSlot };
139
139
  export { StorageRecord as ResourceType };
package/lib/index.es.js CHANGED
@@ -128,7 +128,9 @@ const DEFAULT_FOOTER_COMPONENT = createToken('defaultFooterComponent');
128
128
  * @description
129
129
  * Token for passing parameters for page layout
130
130
  */
131
- const LAYOUT_OPTIONS = createToken('layoutOptions', { multi: true });
131
+ const LAYOUT_OPTIONS = createToken('layoutOptions', {
132
+ multi: true,
133
+ });
132
134
  /**
133
135
  * @description
134
136
  * Settings for HTML resources inlining
package/lib/index.js CHANGED
@@ -132,7 +132,9 @@ const DEFAULT_FOOTER_COMPONENT = dippy.createToken('defaultFooterComponent');
132
132
  * @description
133
133
  * Token for passing parameters for page layout
134
134
  */
135
- const LAYOUT_OPTIONS = dippy.createToken('layoutOptions', { multi: true });
135
+ const LAYOUT_OPTIONS = dippy.createToken('layoutOptions', {
136
+ multi: true,
137
+ });
136
138
  /**
137
139
  * @description
138
140
  * Settings for HTML resources inlining
package/lib/slots.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export declare const HEAD_META = "head:meta";
2
- export declare const HEAD_PERFORMANCE = "head:performance";
3
- export declare const HEAD_CORE_STYLES = "head:core-styles";
4
- export declare const HEAD_POLYFILLS = "head:polyfills";
5
- export declare const HEAD_CORE_SCRIPTS = "head:core-scripts";
6
- export declare const HEAD_DYNAMIC_SCRIPTS = "head:dynamic-scripts";
7
- export declare const HEAD_ANALYTICS = "head:analytics";
8
- export declare const HEAD_ICONS = "head:icons";
9
- export declare const BODY_START = "body:start";
10
- export declare const REACT_RENDER = "react:render";
11
- export declare const BODY_END = "body:end";
12
- export declare const BODY_TAIL_ANALYTICS = "body:tail:analytics";
13
- export declare const BODY_TAIL = "body:tail";
1
+ export declare const HEAD_META: "head:meta";
2
+ export declare const HEAD_PERFORMANCE: "head:performance";
3
+ export declare const HEAD_CORE_STYLES: "head:core-styles";
4
+ export declare const HEAD_POLYFILLS: "head:polyfills";
5
+ export declare const HEAD_CORE_SCRIPTS: "head:core-scripts";
6
+ export declare const HEAD_DYNAMIC_SCRIPTS: "head:dynamic-scripts";
7
+ export declare const HEAD_ANALYTICS: "head:analytics";
8
+ export declare const HEAD_ICONS: "head:icons";
9
+ export declare const BODY_START: "body:start";
10
+ export declare const REACT_RENDER: "react:render";
11
+ export declare const BODY_END: "body:end";
12
+ export declare const BODY_TAIL_ANALYTICS: "body:tail:analytics";
13
+ export declare const BODY_TAIL: "body:tail";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-render",
3
- "version": "2.0.0",
3
+ "version": "2.2.2",
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.23"
22
+ "@tinkoff/htmlpagebuilder": "0.4.24"
23
23
  },
24
24
  "peerDependencies": {
25
- "@tinkoff/dippy": "0.7.41",
25
+ "@tinkoff/dippy": "0.7.43",
26
26
  "react": ">=16.14.0",
27
27
  "tslib": "^2.0.3"
28
28
  },