@inditextech/weave-react 5.0.0-SNAPSHOT.345.1 → 5.0.0-SNAPSHOT.377.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/dist/react.js CHANGED
@@ -340,7 +340,9 @@ const WeaveProvider = ({ getContainer, store, renderer, nodes = [], actions = []
340
340
  }
341
341
  setStatus(WEAVE_INSTANCE_STATUS.IDLE);
342
342
  setRoomLoaded(false);
343
- initWeave();
343
+ initWeave().catch((error) => {
344
+ console.error("WeaveProvider failed to initialize:", error);
345
+ });
344
346
  return () => {
345
347
  weaveInstanceRef.current?.removeEventListener("onInstanceStatus", onInstanceStatusHandler);
346
348
  weaveInstanceRef.current?.removeEventListener("onStoreConnectionStatusChange", onStoreConnectionStatusChangeHandler);
@@ -348,6 +350,7 @@ const WeaveProvider = ({ getContainer, store, renderer, nodes = [], actions = []
348
350
  weaveInstanceRef.current?.removeEventListener("onStateChange", onStateChangeHandler);
349
351
  weaveInstanceRef.current?.removeEventListener("onUndoManagerStatusChange", onUndoManagerStatusChangeHandler);
350
352
  weaveInstanceRef.current?.removeEventListener("onActiveActionChange", onActiveActionChangeHandler);
353
+ weaveInstanceRef.current?.removeEventListener("onAsyncElementsIdle", onAsyncElementsIdleHandler);
351
354
  weaveInstanceRef.current?.removeEventListener("onAsyncElementsLoading", onAsyncElementsLoadingHandler);
352
355
  weaveInstanceRef.current?.removeEventListener("onAsyncElementsLoaded", onAsyncElementsLoadedHandler);
353
356
  setStatus(WEAVE_INSTANCE_STATUS.IDLE);
@@ -427,7 +430,6 @@ const useWeaveEvents = () => {
427
430
  );
428
431
  const onMutexLockChangeHandler = React.useCallback(
429
432
  ({ locks }) => {
430
- if (!instance) return;
431
433
  const actUsersLocks = {};
432
434
  for (const lockKey of locks) {
433
435
  const mutexInfo = instance?.getLockDetails(lockKey);
@@ -456,7 +458,6 @@ const useWeaveEvents = () => {
456
458
  instance.removeEventListener("onZoomChange", onZoomChangeHandler);
457
459
  instance.removeEventListener("onNodesChange", onNodesChangeHandler);
458
460
  instance.removeEventListener("onConnectedUsersChange", onConnectedUsersChangedHandler);
459
- instance.removeEventListener("onConnectedUsersChange", onConnectedUsersChangedHandler);
460
461
  instance.removeEventListener("onMutexLockChange", onMutexLockChangeHandler);
461
462
  };
462
463
  }, [instance]);
@@ -4930,7 +4930,7 @@ var drawChart = (function (exports) {
4930
4930
  </script>
4931
4931
  <script>
4932
4932
  /*<!--*/
4933
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"react.d.ts","children":[{"name":"src","children":[{"name":"components","children":[{"uid":"85993669-1","name":"provider.d.ts"},{"uid":"85993669-3","name":"store.d.ts"}]},{"name":"hooks/events.d.ts","uid":"85993669-5"},{"uid":"85993669-7","name":"index.d.ts"}]}]},{"name":"react.js","children":[{"name":"home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm","children":[{"uid":"85993669-9","name":"vanilla.mjs"},{"uid":"85993669-11","name":"react.mjs"}]},{"name":"src","children":[{"name":"components","children":[{"uid":"85993669-13","name":"store.tsx"},{"uid":"85993669-15","name":"provider.tsx"}]},{"name":"hooks/events.tsx","uid":"85993669-17"},{"uid":"85993669-19","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"85993669-1":{"renderedLength":622,"gzipLength":279,"brotliLength":228,"metaUid":"85993669-0"},"85993669-3":{"renderedLength":569,"gzipLength":216,"brotliLength":174,"metaUid":"85993669-2"},"85993669-5":{"renderedLength":71,"gzipLength":84,"brotliLength":69,"metaUid":"85993669-4"},"85993669-7":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"85993669-6"},"85993669-9":{"renderedLength":1019,"gzipLength":445,"brotliLength":387,"metaUid":"85993669-8"},"85993669-11":{"renderedLength":601,"gzipLength":305,"brotliLength":279,"metaUid":"85993669-10"},"85993669-13":{"renderedLength":3202,"gzipLength":816,"brotliLength":716,"metaUid":"85993669-12"},"85993669-15":{"renderedLength":5557,"gzipLength":1162,"brotliLength":997,"metaUid":"85993669-14"},"85993669-17":{"renderedLength":3978,"gzipLength":814,"brotliLength":750,"metaUid":"85993669-16"},"85993669-19":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"85993669-18"}},"nodeMetas":{"85993669-0":{"id":"/src/components/provider.d.ts","moduleParts":{"react.d.ts":"85993669-1"},"imported":[{"uid":"85993669-20"},{"uid":"85993669-21"},{"uid":"85993669-22"}],"importedBy":[{"uid":"85993669-6"}]},"85993669-2":{"id":"/src/components/store.d.ts","moduleParts":{"react.d.ts":"85993669-3"},"imported":[{"uid":"85993669-21"},{"uid":"85993669-22"},{"uid":"85993669-23"}],"importedBy":[{"uid":"85993669-6"}]},"85993669-4":{"id":"/src/hooks/events.d.ts","moduleParts":{"react.d.ts":"85993669-5"},"imported":[],"importedBy":[{"uid":"85993669-6"}]},"85993669-6":{"id":"/src/index.d.ts","moduleParts":{"react.d.ts":"85993669-7"},"imported":[{"uid":"85993669-0"},{"uid":"85993669-2"},{"uid":"85993669-4"}],"importedBy":[],"isEntry":true},"85993669-8":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"react.js":"85993669-9"},"imported":[],"importedBy":[{"uid":"85993669-24"},{"uid":"85993669-10"}]},"85993669-10":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/react.mjs","moduleParts":{"react.js":"85993669-11"},"imported":[{"uid":"85993669-20"},{"uid":"85993669-8"}],"importedBy":[{"uid":"85993669-24"}]},"85993669-12":{"id":"/src/components/store.tsx","moduleParts":{"react.js":"85993669-13"},"imported":[{"uid":"85993669-21"},{"uid":"85993669-22"},{"uid":"85993669-24"}],"importedBy":[{"uid":"85993669-18"},{"uid":"85993669-14"},{"uid":"85993669-16"}]},"85993669-14":{"id":"/src/components/provider.tsx","moduleParts":{"react.js":"85993669-15"},"imported":[{"uid":"85993669-20"},{"uid":"85993669-21"},{"uid":"85993669-22"},{"uid":"85993669-12"}],"importedBy":[{"uid":"85993669-18"}]},"85993669-16":{"id":"/src/hooks/events.tsx","moduleParts":{"react.js":"85993669-17"},"imported":[{"uid":"85993669-12"},{"uid":"85993669-20"}],"importedBy":[{"uid":"85993669-18"}]},"85993669-18":{"id":"/src/index.ts","moduleParts":{"react.js":"85993669-19"},"imported":[{"uid":"85993669-14"},{"uid":"85993669-12"},{"uid":"85993669-16"}],"importedBy":[],"isEntry":true},"85993669-20":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"85993669-0"},{"uid":"85993669-14"},{"uid":"85993669-16"},{"uid":"85993669-10"}]},"85993669-21":{"id":"@inditextech/weave-sdk","moduleParts":{},"imported":[],"importedBy":[{"uid":"85993669-0"},{"uid":"85993669-2"},{"uid":"85993669-14"},{"uid":"85993669-12"}]},"85993669-22":{"id":"@inditextech/weave-types","moduleParts":{},"imported":[],"importedBy":[{"uid":"85993669-0"},{"uid":"85993669-2"},{"uid":"85993669-14"},{"uid":"85993669-12"}]},"85993669-23":{"id":"zustand","moduleParts":{},"imported":[],"importedBy":[{"uid":"85993669-2"}]},"85993669-24":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"85993669-8"},{"uid":"85993669-10"}],"importedBy":[{"uid":"85993669-12"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4933
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"react.d.ts","children":[{"name":"src","children":[{"name":"components","children":[{"uid":"1f1a30cd-1","name":"provider.d.ts"},{"uid":"1f1a30cd-3","name":"store.d.ts"}]},{"name":"hooks/events.d.ts","uid":"1f1a30cd-5"},{"uid":"1f1a30cd-7","name":"index.d.ts"}]}]},{"name":"react.js","children":[{"name":"home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm","children":[{"uid":"1f1a30cd-9","name":"vanilla.mjs"},{"uid":"1f1a30cd-11","name":"react.mjs"}]},{"name":"src","children":[{"name":"components","children":[{"uid":"1f1a30cd-13","name":"store.tsx"},{"uid":"1f1a30cd-15","name":"provider.tsx"}]},{"name":"hooks/events.tsx","uid":"1f1a30cd-17"},{"uid":"1f1a30cd-19","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"1f1a30cd-1":{"renderedLength":622,"gzipLength":278,"brotliLength":227,"metaUid":"1f1a30cd-0"},"1f1a30cd-3":{"renderedLength":569,"gzipLength":221,"brotliLength":174,"metaUid":"1f1a30cd-2"},"1f1a30cd-5":{"renderedLength":71,"gzipLength":84,"brotliLength":73,"metaUid":"1f1a30cd-4"},"1f1a30cd-7":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"1f1a30cd-6"},"1f1a30cd-9":{"renderedLength":1019,"gzipLength":445,"brotliLength":387,"metaUid":"1f1a30cd-8"},"1f1a30cd-11":{"renderedLength":601,"gzipLength":305,"brotliLength":279,"metaUid":"1f1a30cd-10"},"1f1a30cd-13":{"renderedLength":3202,"gzipLength":816,"brotliLength":716,"metaUid":"1f1a30cd-12"},"1f1a30cd-15":{"renderedLength":5746,"gzipLength":1206,"brotliLength":1029,"metaUid":"1f1a30cd-14"},"1f1a30cd-17":{"renderedLength":3861,"gzipLength":811,"brotliLength":741,"metaUid":"1f1a30cd-16"},"1f1a30cd-19":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"1f1a30cd-18"}},"nodeMetas":{"1f1a30cd-0":{"id":"/src/components/provider.d.ts","moduleParts":{"react.d.ts":"1f1a30cd-1"},"imported":[{"uid":"1f1a30cd-20"},{"uid":"1f1a30cd-21"},{"uid":"1f1a30cd-22"}],"importedBy":[{"uid":"1f1a30cd-6"}]},"1f1a30cd-2":{"id":"/src/components/store.d.ts","moduleParts":{"react.d.ts":"1f1a30cd-3"},"imported":[{"uid":"1f1a30cd-21"},{"uid":"1f1a30cd-22"},{"uid":"1f1a30cd-23"}],"importedBy":[{"uid":"1f1a30cd-6"}]},"1f1a30cd-4":{"id":"/src/hooks/events.d.ts","moduleParts":{"react.d.ts":"1f1a30cd-5"},"imported":[],"importedBy":[{"uid":"1f1a30cd-6"}]},"1f1a30cd-6":{"id":"/src/index.d.ts","moduleParts":{"react.d.ts":"1f1a30cd-7"},"imported":[{"uid":"1f1a30cd-0"},{"uid":"1f1a30cd-2"},{"uid":"1f1a30cd-4"}],"importedBy":[],"isEntry":true},"1f1a30cd-8":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"react.js":"1f1a30cd-9"},"imported":[],"importedBy":[{"uid":"1f1a30cd-24"},{"uid":"1f1a30cd-10"}]},"1f1a30cd-10":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/react.mjs","moduleParts":{"react.js":"1f1a30cd-11"},"imported":[{"uid":"1f1a30cd-20"},{"uid":"1f1a30cd-8"}],"importedBy":[{"uid":"1f1a30cd-24"}]},"1f1a30cd-12":{"id":"/src/components/store.tsx","moduleParts":{"react.js":"1f1a30cd-13"},"imported":[{"uid":"1f1a30cd-21"},{"uid":"1f1a30cd-22"},{"uid":"1f1a30cd-24"}],"importedBy":[{"uid":"1f1a30cd-18"},{"uid":"1f1a30cd-14"},{"uid":"1f1a30cd-16"}]},"1f1a30cd-14":{"id":"/src/components/provider.tsx","moduleParts":{"react.js":"1f1a30cd-15"},"imported":[{"uid":"1f1a30cd-20"},{"uid":"1f1a30cd-21"},{"uid":"1f1a30cd-22"},{"uid":"1f1a30cd-12"}],"importedBy":[{"uid":"1f1a30cd-18"}]},"1f1a30cd-16":{"id":"/src/hooks/events.tsx","moduleParts":{"react.js":"1f1a30cd-17"},"imported":[{"uid":"1f1a30cd-12"},{"uid":"1f1a30cd-20"}],"importedBy":[{"uid":"1f1a30cd-18"}]},"1f1a30cd-18":{"id":"/src/index.ts","moduleParts":{"react.js":"1f1a30cd-19"},"imported":[{"uid":"1f1a30cd-14"},{"uid":"1f1a30cd-12"},{"uid":"1f1a30cd-16"}],"importedBy":[],"isEntry":true},"1f1a30cd-20":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"1f1a30cd-0"},{"uid":"1f1a30cd-14"},{"uid":"1f1a30cd-16"},{"uid":"1f1a30cd-10"}]},"1f1a30cd-21":{"id":"@inditextech/weave-sdk","moduleParts":{},"imported":[],"importedBy":[{"uid":"1f1a30cd-0"},{"uid":"1f1a30cd-2"},{"uid":"1f1a30cd-14"},{"uid":"1f1a30cd-12"}]},"1f1a30cd-22":{"id":"@inditextech/weave-types","moduleParts":{},"imported":[],"importedBy":[{"uid":"1f1a30cd-0"},{"uid":"1f1a30cd-2"},{"uid":"1f1a30cd-14"},{"uid":"1f1a30cd-12"}]},"1f1a30cd-23":{"id":"zustand","moduleParts":{},"imported":[],"importedBy":[{"uid":"1f1a30cd-2"}]},"1f1a30cd-24":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"1f1a30cd-8"},{"uid":"1f1a30cd-10"}],"importedBy":[{"uid":"1f1a30cd-12"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4934
4934
 
4935
4935
  const run = () => {
4936
4936
  const width = window.innerWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inditextech/weave-react",
3
- "version": "5.0.0-SNAPSHOT.345.1",
3
+ "version": "5.0.0-SNAPSHOT.377.1",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Jesus Manuel Piñeiro Cid <jesusmpc@inditex.com>",
@@ -46,10 +46,12 @@
46
46
  "version:release": "npm version $RELEASE_VERSION -m \"[npm-scripts] prepare release $RELEASE_VERSION\" --tag-version-prefix \"\""
47
47
  },
48
48
  "dependencies": {
49
- "@inditextech/weave-sdk": "5.0.0-SNAPSHOT.345.1",
50
- "@inditextech/weave-types": "5.0.0-SNAPSHOT.345.1"
49
+ "@inditextech/weave-sdk": "5.0.0-SNAPSHOT.377.1",
50
+ "@inditextech/weave-types": "5.0.0-SNAPSHOT.377.1"
51
51
  },
52
52
  "devDependencies": {
53
+ "@testing-library/jest-dom": "^6.9.1",
54
+ "@testing-library/react": "^16.3.2",
53
55
  "@types/node": "^22.15.3",
54
56
  "@typescript-eslint/eslint-plugin": "8.26.0",
55
57
  "@typescript-eslint/parser": "8.26.0",