microboard-temp 0.4.65 → 0.4.66

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.
@@ -21464,6 +21464,7 @@ class BaseItem extends Mbr {
21464
21464
  this.id = id;
21465
21465
  if (isGroupItem) {
21466
21466
  this.index = new SimpleSpatialIndex(board.camera, board.pointer);
21467
+ this.canBeNested = false;
21467
21468
  }
21468
21469
  if (defaultItemData) {
21469
21470
  Object.entries(defaultItemData).forEach(([key, value]) => {
@@ -21588,6 +21589,9 @@ class BaseItem extends Mbr {
21588
21589
  return null;
21589
21590
  }
21590
21591
  deserialize(data) {
21592
+ if (data.children) {
21593
+ this.applyAddChildren(data.children);
21594
+ }
21591
21595
  Object.entries(data).forEach(([key, value]) => {
21592
21596
  if (this[key]?.deserialize) {
21593
21597
  this[key].deserialize(value);
package/dist/cjs/index.js CHANGED
@@ -21464,6 +21464,7 @@ class BaseItem extends Mbr {
21464
21464
  this.id = id;
21465
21465
  if (isGroupItem) {
21466
21466
  this.index = new SimpleSpatialIndex(board.camera, board.pointer);
21467
+ this.canBeNested = false;
21467
21468
  }
21468
21469
  if (defaultItemData) {
21469
21470
  Object.entries(defaultItemData).forEach(([key, value]) => {
@@ -21588,6 +21589,9 @@ class BaseItem extends Mbr {
21588
21589
  return null;
21589
21590
  }
21590
21591
  deserialize(data) {
21592
+ if (data.children) {
21593
+ this.applyAddChildren(data.children);
21594
+ }
21591
21595
  Object.entries(data).forEach(([key, value]) => {
21592
21596
  if (this[key]?.deserialize) {
21593
21597
  this[key].deserialize(value);
package/dist/cjs/node.js CHANGED
@@ -23936,6 +23936,7 @@ class BaseItem extends Mbr {
23936
23936
  this.id = id;
23937
23937
  if (isGroupItem) {
23938
23938
  this.index = new SimpleSpatialIndex(board.camera, board.pointer);
23939
+ this.canBeNested = false;
23939
23940
  }
23940
23941
  if (defaultItemData) {
23941
23942
  Object.entries(defaultItemData).forEach(([key, value]) => {
@@ -24060,6 +24061,9 @@ class BaseItem extends Mbr {
24060
24061
  return null;
24061
24062
  }
24062
24063
  deserialize(data) {
24064
+ if (data.children) {
24065
+ this.applyAddChildren(data.children);
24066
+ }
24063
24067
  Object.entries(data).forEach(([key, value]) => {
24064
24068
  if (this[key]?.deserialize) {
24065
24069
  this[key].deserialize(value);
@@ -21314,6 +21314,7 @@ class BaseItem extends Mbr {
21314
21314
  this.id = id;
21315
21315
  if (isGroupItem) {
21316
21316
  this.index = new SimpleSpatialIndex(board.camera, board.pointer);
21317
+ this.canBeNested = false;
21317
21318
  }
21318
21319
  if (defaultItemData) {
21319
21320
  Object.entries(defaultItemData).forEach(([key, value]) => {
@@ -21438,6 +21439,9 @@ class BaseItem extends Mbr {
21438
21439
  return null;
21439
21440
  }
21440
21441
  deserialize(data) {
21442
+ if (data.children) {
21443
+ this.applyAddChildren(data.children);
21444
+ }
21441
21445
  Object.entries(data).forEach(([key, value]) => {
21442
21446
  if (this[key]?.deserialize) {
21443
21447
  this[key].deserialize(value);
package/dist/esm/index.js CHANGED
@@ -21307,6 +21307,7 @@ class BaseItem extends Mbr {
21307
21307
  this.id = id;
21308
21308
  if (isGroupItem) {
21309
21309
  this.index = new SimpleSpatialIndex(board.camera, board.pointer);
21310
+ this.canBeNested = false;
21310
21311
  }
21311
21312
  if (defaultItemData) {
21312
21313
  Object.entries(defaultItemData).forEach(([key, value]) => {
@@ -21431,6 +21432,9 @@ class BaseItem extends Mbr {
21431
21432
  return null;
21432
21433
  }
21433
21434
  deserialize(data) {
21435
+ if (data.children) {
21436
+ this.applyAddChildren(data.children);
21437
+ }
21434
21438
  Object.entries(data).forEach(([key, value]) => {
21435
21439
  if (this[key]?.deserialize) {
21436
21440
  this[key].deserialize(value);
package/dist/esm/node.js CHANGED
@@ -23774,6 +23774,7 @@ class BaseItem extends Mbr {
23774
23774
  this.id = id;
23775
23775
  if (isGroupItem) {
23776
23776
  this.index = new SimpleSpatialIndex(board.camera, board.pointer);
23777
+ this.canBeNested = false;
23777
23778
  }
23778
23779
  if (defaultItemData) {
23779
23780
  Object.entries(defaultItemData).forEach(([key, value]) => {
@@ -23898,6 +23899,9 @@ class BaseItem extends Mbr {
23898
23899
  return null;
23899
23900
  }
23900
23901
  deserialize(data) {
23902
+ if (data.children) {
23903
+ this.applyAddChildren(data.children);
23904
+ }
23901
23905
  Object.entries(data).forEach(([key, value]) => {
23902
23906
  if (this[key]?.deserialize) {
23903
23907
  this[key].deserialize(value);
@@ -0,0 +1,6 @@
1
+ import { Board } from "Board";
2
+ import { ShapeTool } from "Tools/CustomTool";
3
+ export declare class AddDice extends ShapeTool {
4
+ constructor(board: Board, name: string);
5
+ pointerUp(): boolean;
6
+ }
@@ -0,0 +1,18 @@
1
+ import { BaseItem, BaseItemData, SerializedItemData } from "Items/BaseItem/BaseItem";
2
+ import { Board } from "Board";
3
+ import { Subject } from "Subject";
4
+ import { DrawingContext } from "Items/DrawingContext";
5
+ import { DeckOperation } from "Items/Examples/CardGame/Deck/DeckOperation";
6
+ export declare const defaultHandData: BaseItemData;
7
+ export declare class Hand extends BaseItem {
8
+ private ownerId;
9
+ readonly subject: Subject<Hand>;
10
+ private path;
11
+ constructor(board: Board, id?: string, ownerId?: string);
12
+ apply(op: DeckOperation): void;
13
+ applyOwnerId(ownerId: string): void;
14
+ private transformPath;
15
+ updateMbr(): void;
16
+ deserialize(data: SerializedItemData): this;
17
+ render(context: DrawingContext): void;
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.4.65",
3
+ "version": "0.4.66",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",