microboard-ui-temp 0.1.124 → 0.1.125

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
@@ -276383,7 +276383,12 @@ class AddScreen extends ShapeTool {
276383
276383
  super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
276384
276384
  }
276385
276385
  pointerUp() {
276386
- this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
276386
+ let screenOwnerId = localStorage.getItem("currentUser") || localStorage.getItem("screenOwnerId");
276387
+ if (!screenOwnerId) {
276388
+ screenOwnerId = v4_default();
276389
+ localStorage.setItem("screenOwnerId", screenOwnerId);
276390
+ }
276391
+ this.item.applyOwnerId(screenOwnerId);
276387
276392
  return super.pointerUp();
276388
276393
  }
276389
276394
  }
@@ -276513,7 +276518,7 @@ class Screen extends BaseItem {
276513
276518
  return;
276514
276519
  }
276515
276520
  this.path.render(context);
276516
- if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
276521
+ if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
276517
276522
  super.render(context);
276518
276523
  }
276519
276524
  }
package/dist/spa.js CHANGED
@@ -276383,7 +276383,12 @@ class AddScreen extends ShapeTool {
276383
276383
  super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
276384
276384
  }
276385
276385
  pointerUp() {
276386
- this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
276386
+ let screenOwnerId = localStorage.getItem("currentUser") || localStorage.getItem("screenOwnerId");
276387
+ if (!screenOwnerId) {
276388
+ screenOwnerId = v4_default();
276389
+ localStorage.setItem("screenOwnerId", screenOwnerId);
276390
+ }
276391
+ this.item.applyOwnerId(screenOwnerId);
276387
276392
  return super.pointerUp();
276388
276393
  }
276389
276394
  }
@@ -276513,7 +276518,7 @@ class Screen extends BaseItem {
276513
276518
  return;
276514
276519
  }
276515
276520
  this.path.render(context);
276516
- if (localStorage.getItem("currentUser") === this.ownerId || !this.ownerId) {
276521
+ if (localStorage.getItem("currentUser") === this.ownerId || localStorage.getItem("screenOwnerId") === this.ownerId || !this.ownerId) {
276517
276522
  super.render(context);
276518
276523
  }
276519
276524
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-ui-temp",
3
- "version": "0.1.124",
3
+ "version": "0.1.125",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",
@@ -66,7 +66,7 @@
66
66
  "i18next-browser-languagedetector": "^8.2.0",
67
67
  "js-cookie": "^3.0.5",
68
68
  "jwt-decode": "^4.0.0",
69
- "microboard-temp": "^0.5.51",
69
+ "microboard-temp": "^0.5.52",
70
70
  "nanoid": "^5.1.5",
71
71
  "prop-types": "^15.8.1",
72
72
  "react-hot-toast": "2.4.1",