@inditextech/weave-react 2.13.0 → 2.14.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/dist/react.d.ts +3 -5
- package/dist/react.js +6 -9
- package/package.json +3 -3
package/dist/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Weave, WeaveAction, WeaveConnectedUsers, WeaveNode, WeavePlugin, WeaveStore } from "@inditextech/weave-sdk";
|
|
3
|
-
import { WeaveFont, WeavePerformanceConfig, WeaveSelection, WeaveState, WeaveStateElement, WeaveStatus } from "@inditextech/weave-types";
|
|
3
|
+
import { WeaveChildLoggerLevel, WeaveFont, WeavePerformanceConfig, WeaveSelection, WeaveState, WeaveStateElement, WeaveStatus } from "@inditextech/weave-types";
|
|
4
4
|
import { StoreApi, UseBoundStore } from "zustand";
|
|
5
5
|
|
|
6
6
|
//#region src/components/provider.d.ts
|
|
@@ -12,11 +12,9 @@ type WeaveProviderType = {
|
|
|
12
12
|
actions?: WeaveAction[];
|
|
13
13
|
plugins?: WeavePlugin[];
|
|
14
14
|
performance?: WeavePerformanceConfig;
|
|
15
|
-
customNodes?: WeaveNode[];
|
|
16
|
-
customActions?: WeaveAction[];
|
|
17
|
-
customPlugins?: WeavePlugin[];
|
|
18
15
|
children: React.ReactNode;
|
|
19
16
|
logLevel?: "debug" | "info" | "warn" | "error";
|
|
17
|
+
logModules?: WeaveChildLoggerLevel[];
|
|
20
18
|
};
|
|
21
19
|
declare const WeaveProvider: ({
|
|
22
20
|
getContainer,
|
|
@@ -24,9 +22,9 @@ declare const WeaveProvider: ({
|
|
|
24
22
|
nodes,
|
|
25
23
|
actions,
|
|
26
24
|
plugins,
|
|
27
|
-
customPlugins,
|
|
28
25
|
fonts,
|
|
29
26
|
logLevel,
|
|
27
|
+
logModules,
|
|
30
28
|
performance,
|
|
31
29
|
children
|
|
32
30
|
}: Readonly<WeaveProviderType>) => React.JSX.Element;
|
package/dist/react.js
CHANGED
|
@@ -185,7 +185,7 @@ const useWeave = create()((set) => ({
|
|
|
185
185
|
|
|
186
186
|
//#endregion
|
|
187
187
|
//#region src/components/provider.tsx
|
|
188
|
-
const WeaveProvider = ({ getContainer, store, nodes = [], actions = [], plugins = [],
|
|
188
|
+
const WeaveProvider = ({ getContainer, store, nodes = [], actions = [], plugins = [], fonts = [], logLevel = "info", logModules = [], performance, children }) => {
|
|
189
189
|
const weaveInstanceRef = React.useRef(null);
|
|
190
190
|
const selectedNodes = useWeave((state) => state.selection.nodes);
|
|
191
191
|
const setInstance = useWeave((state) => state.setInstance);
|
|
@@ -246,20 +246,17 @@ const WeaveProvider = ({ getContainer, store, nodes = [], actions = [], plugins
|
|
|
246
246
|
if (!weaveEle) throw new Error(`Weave container not defined.`);
|
|
247
247
|
const weaveEleClientRect = weaveEle?.getBoundingClientRect();
|
|
248
248
|
if (weaveEle && !weaveInstanceRef.current) {
|
|
249
|
-
const instanceNodes = [];
|
|
250
|
-
if (nodes.length > 0) for (const node of nodes) instanceNodes.push(node);
|
|
251
|
-
const instanceActions = [];
|
|
252
|
-
if (actions.length > 0) for (const action of actions) instanceActions.push(action);
|
|
253
|
-
const instancePlugins = [];
|
|
254
|
-
if (plugins.length > 0) for (const plugin of plugins) instancePlugins.push(plugin);
|
|
255
249
|
weaveInstanceRef.current = new Weave({
|
|
256
250
|
store,
|
|
257
251
|
nodes,
|
|
258
252
|
actions,
|
|
259
|
-
plugins
|
|
253
|
+
plugins,
|
|
260
254
|
fonts,
|
|
261
255
|
performance,
|
|
262
|
-
logger: {
|
|
256
|
+
logger: {
|
|
257
|
+
level: logLevel,
|
|
258
|
+
modules: logModules
|
|
259
|
+
}
|
|
263
260
|
}, {
|
|
264
261
|
container: weaveEle,
|
|
265
262
|
width: weaveEleClientRect?.width ?? 1920,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inditextech/weave-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Jesus Manuel Piñeiro Cid <jesusmpc@inditex.com>",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"version:release": "npm version $RELEASE_VERSION -m \"[npm-scripts] prepare release $RELEASE_VERSION\" --tag-version-prefix \"\""
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@inditextech/weave-sdk": "2.
|
|
51
|
-
"@inditextech/weave-types": "2.
|
|
50
|
+
"@inditextech/weave-sdk": "2.14.0",
|
|
51
|
+
"@inditextech/weave-types": "2.14.0",
|
|
52
52
|
"@syncedstore/core": "0.6.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|