@tramvai/module-page-render-mode 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/README.md +5 -3
- package/lib/tokens.d.ts +4 -4
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -110,15 +110,17 @@ For specific pages available few options:
|
|
|
110
110
|
- add fallback to page component static property, use name `pageRenderFallbackDefault`:
|
|
111
111
|
|
|
112
112
|
```tsx
|
|
113
|
-
|
|
113
|
+
import { PageComponent } from '@tramvai/react';
|
|
114
|
+
|
|
115
|
+
const Page: PageComponent = () => <div>Page</div>;
|
|
114
116
|
|
|
115
117
|
const PageFallback = () => <div>Loading...</div>;
|
|
116
118
|
|
|
117
|
-
|
|
119
|
+
Page.components = {
|
|
118
120
|
'pageRenderFallbackDefault': PageFallback,
|
|
119
121
|
};
|
|
120
122
|
|
|
121
|
-
export default
|
|
123
|
+
export default Page;
|
|
122
124
|
```
|
|
123
125
|
|
|
124
126
|
- add default fallback to bundle, use name `pageRenderFallbackDefault`:
|
package/lib/tokens.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
import type { TramvaiRenderMode } from '@tramvai/tokens-render';
|
|
3
|
-
export declare const PAGE_RENDER_FALLBACK_COMPONENT_PREFIX: import("@tinkoff/dippy
|
|
3
|
+
export declare const PAGE_RENDER_FALLBACK_COMPONENT_PREFIX: import("@tinkoff/dippy").BaseTokenInterface<string>;
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated Use token `TRAMVAI_RENDER_MODE` from `@tramvai/tokens-render`
|
|
6
6
|
*/
|
|
7
|
-
export declare const PAGE_RENDER_DEFAULT_MODE: import("@tinkoff/dippy
|
|
8
|
-
export declare const PAGE_RENDER_WRAPPER_TYPE: import("@tinkoff/dippy
|
|
9
|
-
export declare const PAGE_RENDER_DEFAULT_FALLBACK_COMPONENT: import("@tinkoff/dippy
|
|
7
|
+
export declare const PAGE_RENDER_DEFAULT_MODE: import("@tinkoff/dippy").BaseTokenInterface<TramvaiRenderMode>;
|
|
8
|
+
export declare const PAGE_RENDER_WRAPPER_TYPE: import("@tinkoff/dippy").BaseTokenInterface<"layout" | "content" | "page">;
|
|
9
|
+
export declare const PAGE_RENDER_DEFAULT_FALLBACK_COMPONENT: import("@tinkoff/dippy").BaseTokenInterface<ComponentType<any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-page-render-mode",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.0",
|
|
4
4
|
"description": "Enable different rendering modes for pages",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.es.js",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@tinkoff/dippy": "0.
|
|
28
|
-
"@tramvai/core": "2.
|
|
29
|
-
"@tramvai/react": "2.
|
|
30
|
-
"@tramvai/module-router": "2.
|
|
31
|
-
"@tramvai/tokens-render": "2.
|
|
32
|
-
"@tramvai/tokens-router": "2.
|
|
27
|
+
"@tinkoff/dippy": "0.8.2",
|
|
28
|
+
"@tramvai/core": "2.20.0",
|
|
29
|
+
"@tramvai/react": "2.20.0",
|
|
30
|
+
"@tramvai/module-router": "2.20.0",
|
|
31
|
+
"@tramvai/tokens-render": "2.20.0",
|
|
32
|
+
"@tramvai/tokens-router": "2.20.0",
|
|
33
33
|
"react": ">=16.14.0",
|
|
34
34
|
"tslib": "^2.0.3"
|
|
35
35
|
}
|