@inditextech/weave-react 5.0.0-SNAPSHOT.345.1 → 5.0.0-SNAPSHOT.366.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":"c4dbdee6-1","name":"provider.d.ts"},{"uid":"c4dbdee6-3","name":"store.d.ts"}]},{"name":"hooks/events.d.ts","uid":"c4dbdee6-5"},{"uid":"c4dbdee6-7","name":"index.d.ts"}]}]},{"name":"react.js","children":[{"name":"home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm","children":[{"uid":"c4dbdee6-9","name":"vanilla.mjs"},{"uid":"c4dbdee6-11","name":"react.mjs"}]},{"name":"src","children":[{"name":"components","children":[{"uid":"c4dbdee6-13","name":"store.tsx"},{"uid":"c4dbdee6-15","name":"provider.tsx"}]},{"name":"hooks/events.tsx","uid":"c4dbdee6-17"},{"uid":"c4dbdee6-19","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"c4dbdee6-1":{"renderedLength":622,"gzipLength":278,"brotliLength":227,"metaUid":"c4dbdee6-0"},"c4dbdee6-3":{"renderedLength":569,"gzipLength":221,"brotliLength":174,"metaUid":"c4dbdee6-2"},"c4dbdee6-5":{"renderedLength":71,"gzipLength":84,"brotliLength":69,"metaUid":"c4dbdee6-4"},"c4dbdee6-7":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"c4dbdee6-6"},"c4dbdee6-9":{"renderedLength":1019,"gzipLength":445,"brotliLength":387,"metaUid":"c4dbdee6-8"},"c4dbdee6-11":{"renderedLength":601,"gzipLength":305,"brotliLength":279,"metaUid":"c4dbdee6-10"},"c4dbdee6-13":{"renderedLength":3202,"gzipLength":816,"brotliLength":716,"metaUid":"c4dbdee6-12"},"c4dbdee6-15":{"renderedLength":5746,"gzipLength":1206,"brotliLength":1029,"metaUid":"c4dbdee6-14"},"c4dbdee6-17":{"renderedLength":3861,"gzipLength":811,"brotliLength":741,"metaUid":"c4dbdee6-16"},"c4dbdee6-19":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"c4dbdee6-18"}},"nodeMetas":{"c4dbdee6-0":{"id":"/src/components/provider.d.ts","moduleParts":{"react.d.ts":"c4dbdee6-1"},"imported":[{"uid":"c4dbdee6-20"},{"uid":"c4dbdee6-21"},{"uid":"c4dbdee6-22"}],"importedBy":[{"uid":"c4dbdee6-6"}]},"c4dbdee6-2":{"id":"/src/components/store.d.ts","moduleParts":{"react.d.ts":"c4dbdee6-3"},"imported":[{"uid":"c4dbdee6-21"},{"uid":"c4dbdee6-22"},{"uid":"c4dbdee6-23"}],"importedBy":[{"uid":"c4dbdee6-6"}]},"c4dbdee6-4":{"id":"/src/hooks/events.d.ts","moduleParts":{"react.d.ts":"c4dbdee6-5"},"imported":[],"importedBy":[{"uid":"c4dbdee6-6"}]},"c4dbdee6-6":{"id":"/src/index.d.ts","moduleParts":{"react.d.ts":"c4dbdee6-7"},"imported":[{"uid":"c4dbdee6-0"},{"uid":"c4dbdee6-2"},{"uid":"c4dbdee6-4"}],"importedBy":[],"isEntry":true},"c4dbdee6-8":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"react.js":"c4dbdee6-9"},"imported":[],"importedBy":[{"uid":"c4dbdee6-24"},{"uid":"c4dbdee6-10"}]},"c4dbdee6-10":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/react.mjs","moduleParts":{"react.js":"c4dbdee6-11"},"imported":[{"uid":"c4dbdee6-20"},{"uid":"c4dbdee6-8"}],"importedBy":[{"uid":"c4dbdee6-24"}]},"c4dbdee6-12":{"id":"/src/components/store.tsx","moduleParts":{"react.js":"c4dbdee6-13"},"imported":[{"uid":"c4dbdee6-21"},{"uid":"c4dbdee6-22"},{"uid":"c4dbdee6-24"}],"importedBy":[{"uid":"c4dbdee6-18"},{"uid":"c4dbdee6-14"},{"uid":"c4dbdee6-16"}]},"c4dbdee6-14":{"id":"/src/components/provider.tsx","moduleParts":{"react.js":"c4dbdee6-15"},"imported":[{"uid":"c4dbdee6-20"},{"uid":"c4dbdee6-21"},{"uid":"c4dbdee6-22"},{"uid":"c4dbdee6-12"}],"importedBy":[{"uid":"c4dbdee6-18"}]},"c4dbdee6-16":{"id":"/src/hooks/events.tsx","moduleParts":{"react.js":"c4dbdee6-17"},"imported":[{"uid":"c4dbdee6-12"},{"uid":"c4dbdee6-20"}],"importedBy":[{"uid":"c4dbdee6-18"}]},"c4dbdee6-18":{"id":"/src/index.ts","moduleParts":{"react.js":"c4dbdee6-19"},"imported":[{"uid":"c4dbdee6-14"},{"uid":"c4dbdee6-12"},{"uid":"c4dbdee6-16"}],"importedBy":[],"isEntry":true},"c4dbdee6-20":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"c4dbdee6-0"},{"uid":"c4dbdee6-14"},{"uid":"c4dbdee6-16"},{"uid":"c4dbdee6-10"}]},"c4dbdee6-21":{"id":"@inditextech/weave-sdk","moduleParts":{},"imported":[],"importedBy":[{"uid":"c4dbdee6-0"},{"uid":"c4dbdee6-2"},{"uid":"c4dbdee6-14"},{"uid":"c4dbdee6-12"}]},"c4dbdee6-22":{"id":"@inditextech/weave-types","moduleParts":{},"imported":[],"importedBy":[{"uid":"c4dbdee6-0"},{"uid":"c4dbdee6-2"},{"uid":"c4dbdee6-14"},{"uid":"c4dbdee6-12"}]},"c4dbdee6-23":{"id":"zustand","moduleParts":{},"imported":[],"importedBy":[{"uid":"c4dbdee6-2"}]},"c4dbdee6-24":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"c4dbdee6-8"},{"uid":"c4dbdee6-10"}],"importedBy":[{"uid":"c4dbdee6-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.366.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.366.1",
50
+ "@inditextech/weave-types": "5.0.0-SNAPSHOT.366.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",