@inditextech/weave-react 4.2.0-SNAPSHOT.307.1 → 4.2.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.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":"b3463866-1","name":"provider.d.ts"},{"uid":"b3463866-3","name":"store.d.ts"}]},{"name":"hooks/events.d.ts","uid":"b3463866-5"},{"uid":"b3463866-7","name":"index.d.ts"}]}]},{"name":"react.js","children":[{"name":"home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm","children":[{"uid":"b3463866-9","name":"vanilla.mjs"},{"uid":"b3463866-11","name":"react.mjs"}]},{"name":"src","children":[{"name":"components","children":[{"uid":"b3463866-13","name":"store.tsx"},{"uid":"b3463866-15","name":"provider.tsx"}]},{"name":"hooks/events.tsx","uid":"b3463866-17"},{"uid":"b3463866-19","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"b3463866-1":{"renderedLength":622,"gzipLength":278,"brotliLength":227,"metaUid":"b3463866-0"},"b3463866-3":{"renderedLength":569,"gzipLength":221,"brotliLength":174,"metaUid":"b3463866-2"},"b3463866-5":{"renderedLength":71,"gzipLength":84,"brotliLength":69,"metaUid":"b3463866-4"},"b3463866-7":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"b3463866-6"},"b3463866-9":{"renderedLength":1019,"gzipLength":445,"brotliLength":387,"metaUid":"b3463866-8"},"b3463866-11":{"renderedLength":601,"gzipLength":305,"brotliLength":279,"metaUid":"b3463866-10"},"b3463866-13":{"renderedLength":3202,"gzipLength":816,"brotliLength":716,"metaUid":"b3463866-12"},"b3463866-15":{"renderedLength":5557,"gzipLength":1162,"brotliLength":997,"metaUid":"b3463866-14"},"b3463866-17":{"renderedLength":3978,"gzipLength":814,"brotliLength":750,"metaUid":"b3463866-16"},"b3463866-19":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"b3463866-18"}},"nodeMetas":{"b3463866-0":{"id":"/src/components/provider.d.ts","moduleParts":{"react.d.ts":"b3463866-1"},"imported":[{"uid":"b3463866-20"},{"uid":"b3463866-21"},{"uid":"b3463866-22"}],"importedBy":[{"uid":"b3463866-6"}]},"b3463866-2":{"id":"/src/components/store.d.ts","moduleParts":{"react.d.ts":"b3463866-3"},"imported":[{"uid":"b3463866-21"},{"uid":"b3463866-22"},{"uid":"b3463866-23"}],"importedBy":[{"uid":"b3463866-6"}]},"b3463866-4":{"id":"/src/hooks/events.d.ts","moduleParts":{"react.d.ts":"b3463866-5"},"imported":[],"importedBy":[{"uid":"b3463866-6"}]},"b3463866-6":{"id":"/src/index.d.ts","moduleParts":{"react.d.ts":"b3463866-7"},"imported":[{"uid":"b3463866-0"},{"uid":"b3463866-2"},{"uid":"b3463866-4"}],"importedBy":[],"isEntry":true},"b3463866-8":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"react.js":"b3463866-9"},"imported":[],"importedBy":[{"uid":"b3463866-24"},{"uid":"b3463866-10"}]},"b3463866-10":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/react.mjs","moduleParts":{"react.js":"b3463866-11"},"imported":[{"uid":"b3463866-20"},{"uid":"b3463866-8"}],"importedBy":[{"uid":"b3463866-24"}]},"b3463866-12":{"id":"/src/components/store.tsx","moduleParts":{"react.js":"b3463866-13"},"imported":[{"uid":"b3463866-21"},{"uid":"b3463866-22"},{"uid":"b3463866-24"}],"importedBy":[{"uid":"b3463866-18"},{"uid":"b3463866-14"},{"uid":"b3463866-16"}]},"b3463866-14":{"id":"/src/components/provider.tsx","moduleParts":{"react.js":"b3463866-15"},"imported":[{"uid":"b3463866-20"},{"uid":"b3463866-21"},{"uid":"b3463866-22"},{"uid":"b3463866-12"}],"importedBy":[{"uid":"b3463866-18"}]},"b3463866-16":{"id":"/src/hooks/events.tsx","moduleParts":{"react.js":"b3463866-17"},"imported":[{"uid":"b3463866-12"},{"uid":"b3463866-20"}],"importedBy":[{"uid":"b3463866-18"}]},"b3463866-18":{"id":"/src/index.ts","moduleParts":{"react.js":"b3463866-19"},"imported":[{"uid":"b3463866-14"},{"uid":"b3463866-12"},{"uid":"b3463866-16"}],"importedBy":[],"isEntry":true},"b3463866-20":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"b3463866-0"},{"uid":"b3463866-14"},{"uid":"b3463866-16"},{"uid":"b3463866-10"}]},"b3463866-21":{"id":"@inditextech/weave-sdk","moduleParts":{},"imported":[],"importedBy":[{"uid":"b3463866-0"},{"uid":"b3463866-2"},{"uid":"b3463866-14"},{"uid":"b3463866-12"}]},"b3463866-22":{"id":"@inditextech/weave-types","moduleParts":{},"imported":[],"importedBy":[{"uid":"b3463866-0"},{"uid":"b3463866-2"},{"uid":"b3463866-14"},{"uid":"b3463866-12"}]},"b3463866-23":{"id":"zustand","moduleParts":{},"imported":[],"importedBy":[{"uid":"b3463866-2"}]},"b3463866-24":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"b3463866-8"},{"uid":"b3463866-10"}],"importedBy":[{"uid":"b3463866-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": "4.2.0-SNAPSHOT.307.1",
3
+ "version": "4.2.0",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Jesus Manuel Piñeiro Cid <jesusmpc@inditex.com>",
@@ -46,11 +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": "4.2.0-SNAPSHOT.307.1",
50
- "@inditextech/weave-types": "4.2.0-SNAPSHOT.307.1",
51
- "@syncedstore/core": "0.6.0"
49
+ "@inditextech/weave-sdk": "4.2.0",
50
+ "@inditextech/weave-types": "4.2.0"
52
51
  },
53
52
  "devDependencies": {
53
+ "@testing-library/jest-dom": "^6.9.1",
54
+ "@testing-library/react": "^16.3.2",
54
55
  "@types/node": "^22.15.3",
55
56
  "@typescript-eslint/eslint-plugin": "8.26.0",
56
57
  "@typescript-eslint/parser": "8.26.0",