@tramvai/module-render 2.108.1 → 2.109.1
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/react/index.browser.js +3 -2
- package/lib/react/index.d.ts +2 -1
- package/lib/react/index.es.js +3 -2
- package/lib/react/index.js +3 -2
- package/package.json +15 -15
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Provider } from '@tramvai/state';
|
|
3
3
|
import { DIContext } from '@tramvai/react';
|
|
4
|
+
import { INITIAL_APP_STATE_TOKEN } from '@tramvai/tokens-common';
|
|
4
5
|
import { Root } from './root.browser.js';
|
|
5
6
|
|
|
6
7
|
function renderReact({ di }, context) {
|
|
7
|
-
const
|
|
8
|
-
return (jsx(Provider, { context: context, serverState:
|
|
8
|
+
const initialState = di.get({ token: INITIAL_APP_STATE_TOKEN, optional: true });
|
|
9
|
+
return (jsx(Provider, { context: context, serverState: initialState === null || initialState === void 0 ? void 0 : initialState.stores, children: jsx(DIContext.Provider, { value: di, children: jsx(Root, {}) }) }));
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export { renderReact };
|
package/lib/react/index.d.ts
CHANGED
package/lib/react/index.es.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Provider } from '@tramvai/state';
|
|
3
3
|
import { DIContext } from '@tramvai/react';
|
|
4
|
+
import { INITIAL_APP_STATE_TOKEN } from '@tramvai/tokens-common';
|
|
4
5
|
import { Root } from './root.es.js';
|
|
5
6
|
|
|
6
7
|
function renderReact({ di }, context) {
|
|
7
|
-
const
|
|
8
|
-
return (jsx(Provider, { context: context, serverState:
|
|
8
|
+
const initialState = di.get({ token: INITIAL_APP_STATE_TOKEN, optional: true });
|
|
9
|
+
return (jsx(Provider, { context: context, serverState: initialState === null || initialState === void 0 ? void 0 : initialState.stores, children: jsx(DIContext.Provider, { value: di, children: jsx(Root, {}) }) }));
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export { renderReact };
|
package/lib/react/index.js
CHANGED
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var state = require('@tramvai/state');
|
|
7
7
|
var react = require('@tramvai/react');
|
|
8
|
+
var tokensCommon = require('@tramvai/tokens-common');
|
|
8
9
|
var root = require('./root.js');
|
|
9
10
|
|
|
10
11
|
function renderReact({ di }, context) {
|
|
11
|
-
const
|
|
12
|
-
return (jsxRuntime.jsx(state.Provider, { context: context, serverState:
|
|
12
|
+
const initialState = di.get({ token: tokensCommon.INITIAL_APP_STATE_TOKEN, optional: true });
|
|
13
|
+
return (jsxRuntime.jsx(state.Provider, { context: context, serverState: initialState === null || initialState === void 0 ? void 0 : initialState.stores, children: jsxRuntime.jsx(react.DIContext.Provider, { value: di, children: jsxRuntime.jsx(root.Root, {}) }) }));
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
exports.renderReact = renderReact;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-render",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.109.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "lib/browser.js",
|
|
6
6
|
"main": "lib/server.js",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"@tinkoff/layout-factory": "0.3.8",
|
|
27
27
|
"@tinkoff/errors": "0.3.8",
|
|
28
28
|
"@tinkoff/url": "0.8.6",
|
|
29
|
-
"@tinkoff/user-agent": "0.4.
|
|
30
|
-
"@tramvai/module-client-hints": "2.
|
|
31
|
-
"@tramvai/module-router": "2.
|
|
32
|
-
"@tramvai/react": "2.
|
|
29
|
+
"@tinkoff/user-agent": "0.4.310",
|
|
30
|
+
"@tramvai/module-client-hints": "2.109.1",
|
|
31
|
+
"@tramvai/module-router": "2.109.1",
|
|
32
|
+
"@tramvai/react": "2.109.1",
|
|
33
33
|
"@tramvai/safe-strings": "0.5.9",
|
|
34
|
-
"@tramvai/tokens-render": "2.
|
|
35
|
-
"@tramvai/experiments": "2.
|
|
34
|
+
"@tramvai/tokens-render": "2.109.1",
|
|
35
|
+
"@tramvai/experiments": "2.109.1",
|
|
36
36
|
"@types/loadable__server": "^5.12.6",
|
|
37
37
|
"node-fetch": "^2.6.1"
|
|
38
38
|
},
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@tinkoff/dippy": "0.8.15",
|
|
41
41
|
"@tinkoff/utils": "^2.1.2",
|
|
42
42
|
"@tinkoff/react-hooks": "0.1.6",
|
|
43
|
-
"@tramvai/cli": "2.
|
|
44
|
-
"@tramvai/core": "2.
|
|
45
|
-
"@tramvai/module-common": "2.
|
|
46
|
-
"@tramvai/state": "2.
|
|
47
|
-
"@tramvai/test-helpers": "2.
|
|
48
|
-
"@tramvai/tokens-common": "2.
|
|
49
|
-
"@tramvai/tokens-router": "2.
|
|
50
|
-
"@tramvai/tokens-server-private": "2.
|
|
43
|
+
"@tramvai/cli": "2.109.1",
|
|
44
|
+
"@tramvai/core": "2.109.1",
|
|
45
|
+
"@tramvai/module-common": "2.109.1",
|
|
46
|
+
"@tramvai/state": "2.109.1",
|
|
47
|
+
"@tramvai/test-helpers": "2.109.1",
|
|
48
|
+
"@tramvai/tokens-common": "2.109.1",
|
|
49
|
+
"@tramvai/tokens-router": "2.109.1",
|
|
50
|
+
"@tramvai/tokens-server-private": "2.109.1",
|
|
51
51
|
"express": "^4.17.1",
|
|
52
52
|
"prop-types": "^15.6.2",
|
|
53
53
|
"react": ">=16.14.0",
|