microboard-temp 0.13.98 → 0.14.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.
@@ -76514,6 +76514,19 @@ class Board {
76514
76514
  item: [group.getId()]
76515
76515
  });
76516
76516
  }
76517
+ detachFromGroup(item) {
76518
+ if (item.parent === "Board") {
76519
+ return;
76520
+ }
76521
+ const parentGroup = this.items.getById(item.parent);
76522
+ if (!parentGroup || parentGroup.itemType !== "Group") {
76523
+ return;
76524
+ }
76525
+ parentGroup.removeChildItems([item]);
76526
+ if (parentGroup.getChildrenIds().length === 0) {
76527
+ this.ungroup(parentGroup);
76528
+ }
76529
+ }
76517
76530
  getByZIndex(index2) {
76518
76531
  return this.index.getByZIndex(index2);
76519
76532
  }
package/dist/cjs/index.js CHANGED
@@ -76514,6 +76514,19 @@ class Board {
76514
76514
  item: [group.getId()]
76515
76515
  });
76516
76516
  }
76517
+ detachFromGroup(item) {
76518
+ if (item.parent === "Board") {
76519
+ return;
76520
+ }
76521
+ const parentGroup = this.items.getById(item.parent);
76522
+ if (!parentGroup || parentGroup.itemType !== "Group") {
76523
+ return;
76524
+ }
76525
+ parentGroup.removeChildItems([item]);
76526
+ if (parentGroup.getChildrenIds().length === 0) {
76527
+ this.ungroup(parentGroup);
76528
+ }
76529
+ }
76517
76530
  getByZIndex(index2) {
76518
76531
  return this.index.getByZIndex(index2);
76519
76532
  }
package/dist/cjs/node.js CHANGED
@@ -78989,6 +78989,19 @@ class Board {
78989
78989
  item: [group.getId()]
78990
78990
  });
78991
78991
  }
78992
+ detachFromGroup(item) {
78993
+ if (item.parent === "Board") {
78994
+ return;
78995
+ }
78996
+ const parentGroup = this.items.getById(item.parent);
78997
+ if (!parentGroup || parentGroup.itemType !== "Group") {
78998
+ return;
78999
+ }
79000
+ parentGroup.removeChildItems([item]);
79001
+ if (parentGroup.getChildrenIds().length === 0) {
79002
+ this.ungroup(parentGroup);
79003
+ }
79004
+ }
78992
79005
  getByZIndex(index2) {
78993
79006
  return this.index.getByZIndex(index2);
78994
79007
  }
@@ -76248,6 +76248,19 @@ class Board {
76248
76248
  item: [group.getId()]
76249
76249
  });
76250
76250
  }
76251
+ detachFromGroup(item) {
76252
+ if (item.parent === "Board") {
76253
+ return;
76254
+ }
76255
+ const parentGroup = this.items.getById(item.parent);
76256
+ if (!parentGroup || parentGroup.itemType !== "Group") {
76257
+ return;
76258
+ }
76259
+ parentGroup.removeChildItems([item]);
76260
+ if (parentGroup.getChildrenIds().length === 0) {
76261
+ this.ungroup(parentGroup);
76262
+ }
76263
+ }
76251
76264
  getByZIndex(index2) {
76252
76265
  return this.index.getByZIndex(index2);
76253
76266
  }
package/dist/esm/index.js CHANGED
@@ -76241,6 +76241,19 @@ class Board {
76241
76241
  item: [group.getId()]
76242
76242
  });
76243
76243
  }
76244
+ detachFromGroup(item) {
76245
+ if (item.parent === "Board") {
76246
+ return;
76247
+ }
76248
+ const parentGroup = this.items.getById(item.parent);
76249
+ if (!parentGroup || parentGroup.itemType !== "Group") {
76250
+ return;
76251
+ }
76252
+ parentGroup.removeChildItems([item]);
76253
+ if (parentGroup.getChildrenIds().length === 0) {
76254
+ this.ungroup(parentGroup);
76255
+ }
76256
+ }
76244
76257
  getByZIndex(index2) {
76245
76258
  return this.index.getByZIndex(index2);
76246
76259
  }
package/dist/esm/node.js CHANGED
@@ -78705,6 +78705,19 @@ class Board {
78705
78705
  item: [group.getId()]
78706
78706
  });
78707
78707
  }
78708
+ detachFromGroup(item) {
78709
+ if (item.parent === "Board") {
78710
+ return;
78711
+ }
78712
+ const parentGroup = this.items.getById(item.parent);
78713
+ if (!parentGroup || parentGroup.itemType !== "Group") {
78714
+ return;
78715
+ }
78716
+ parentGroup.removeChildItems([item]);
78717
+ if (parentGroup.getChildrenIds().length === 0) {
78718
+ this.ungroup(parentGroup);
78719
+ }
78720
+ }
78708
78721
  getByZIndex(index2) {
78709
78722
  return this.index.getByZIndex(index2);
78710
78723
  }
@@ -98,6 +98,12 @@ export declare class Board {
98
98
  * Dissolves a Group, returning its children to the board with world-space transforms.
99
99
  */
100
100
  ungroup(group: Group): void;
101
+ /**
102
+ * Removes a single item from its parent group, placing it back on the board
103
+ * at its current world position. If the group becomes empty after detach, the
104
+ * group itself is dissolved.
105
+ */
106
+ detachFromGroup(item: BaseItem): void;
101
107
  getByZIndex(index: number): Item;
102
108
  getZIndex(item: Item): number;
103
109
  getLastZIndex(): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.13.98",
3
+ "version": "0.14.0",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",