rita-workspace 0.5.19 → 0.5.20

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/index.js CHANGED
@@ -834,6 +834,7 @@ function WorkspaceProvider({ children, lang = "en" }) {
834
834
  }, [workspace]);
835
835
  const saveCurrentDrawing = (0, import_react.useCallback)(async (elements, appState, files) => {
836
836
  if (!activeDrawing) return;
837
+ if (isDrawingOpenedEarlierInOtherTab(activeDrawing.id)) return;
837
838
  try {
838
839
  const updateData = {
839
840
  elements,
@@ -848,6 +849,7 @@ function WorkspaceProvider({ children, lang = "en" }) {
848
849
  }
849
850
  }, [activeDrawing]);
850
851
  const saveDrawingById = (0, import_react.useCallback)(async (id, elements, appState, files) => {
852
+ if (isDrawingOpenedEarlierInOtherTab(id)) return;
851
853
  try {
852
854
  const updateData = {
853
855
  elements,
package/dist/index.mjs CHANGED
@@ -763,6 +763,7 @@ function WorkspaceProvider({ children, lang = "en" }) {
763
763
  }, [workspace]);
764
764
  const saveCurrentDrawing = useCallback(async (elements, appState, files) => {
765
765
  if (!activeDrawing) return;
766
+ if (isDrawingOpenedEarlierInOtherTab(activeDrawing.id)) return;
766
767
  try {
767
768
  const updateData = {
768
769
  elements,
@@ -777,6 +778,7 @@ function WorkspaceProvider({ children, lang = "en" }) {
777
778
  }
778
779
  }, [activeDrawing]);
779
780
  const saveDrawingById = useCallback(async (id, elements, appState, files) => {
781
+ if (isDrawingOpenedEarlierInOtherTab(id)) return;
780
782
  try {
781
783
  const updateData = {
782
784
  elements,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rita-workspace",
3
- "version": "0.5.19",
3
+ "version": "0.5.20",
4
4
  "description": "Multi-drawing workspace feature for Rita (Excalidraw fork)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",