microboard-temp 0.4.33 → 0.4.35

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.
@@ -23,6 +23,8 @@ export declare class BaseItem extends Mbr implements Geometry {
23
23
  readonly transformation: Transformation;
24
24
  readonly linkTo: LinkTo;
25
25
  parent: string;
26
+ private children;
27
+ canBeNested: boolean;
26
28
  transformationRenderBlock?: boolean;
27
29
  board: Board;
28
30
  id: string;
@@ -34,6 +36,16 @@ export declare class BaseItem extends Mbr implements Geometry {
34
36
  constructor(board: Board, id?: string, defaultItemData?: BaseItemData | undefined);
35
37
  getId(): string;
36
38
  setId(id: string): this;
39
+ addChildItems(children: BaseItem[]): void;
40
+ removeChildItems(children: BaseItem[] | BaseItem): void;
41
+ emitNesting(children: BaseItem[]): void;
42
+ private updateChildren;
43
+ handleNesting(item: BaseItem | Mbr, options?: {
44
+ onlyForOut?: boolean;
45
+ cancelIfChild?: boolean;
46
+ }): boolean;
47
+ applyUpdateChildren(children: string[]): void;
48
+ updateMbr(): void;
37
49
  getLinkTo(): string | undefined;
38
50
  getRichText(): RichText | null;
39
51
  deserialize(data: SerializedItemData): this;
@@ -0,0 +1,7 @@
1
+ import { BaseOperation } from "../../Events/EventsOperations";
2
+ export type BaseItemOperation = UpdateChildren;
3
+ export interface UpdateChildren extends BaseOperation<{
4
+ children: string[];
5
+ }> {
6
+ method: "updateChildren";
7
+ }
@@ -33,33 +33,25 @@ export declare class Frame extends BaseItem {
33
33
  readonly linkTo: LinkTo;
34
34
  readonly text: RichText;
35
35
  private canChangeRatio;
36
+ canBeNested: boolean;
36
37
  newShape: FrameType | null;
37
38
  transformationRenderBlock?: boolean;
38
39
  constructor(board: Board, getItemById: (id: string) => Item | undefined, id?: string, name?: string, shapeType?: "Custom" | "A4" | "Letter" | "Frame16x9" | "Frame4x3" | "Frame1x1" | "Frame3x2" | "Frame9x18", backgroundColor?: string, backgroundOpacity?: number, borderColor?: string, borderOpacity?: number, borderStyle?: "solid" | "dot" | "dash" | "longDash" | "dotDash" | "tripleDotDash" | "looseDoubleDotDash", borderWidth?: number);
39
40
  setBoard(board: Board): this;
40
41
  /** Sets parent of child and emits add child message */
41
- emitAddChild(children: Item[]): void;
42
- emitRemoveChild(children: Item[] | Item): void;
43
- emitNesting(children: Item[]): void;
44
42
  /**
45
43
  * Parent cant be child,
46
44
  * Child cant be itself,
47
45
  * frame cant be child
48
46
  */
49
- private addChild;
50
47
  applyAddChild(childId: string[] | string, noWarn?: boolean): void;
51
48
  private applyRemoveChild;
52
- private removeChild;
53
49
  getLinkTo(): string | undefined;
54
50
  /**
55
51
  * Returns:
56
52
  * true - if can be child of the frame
57
53
  * false - if outside of the frame
58
54
  */
59
- handleNesting(item: Item | Mbr, options?: {
60
- onlyForOut?: boolean;
61
- cancelIfChild?: boolean;
62
- }): boolean;
63
55
  private initPath;
64
56
  getPaths(): Path | Paths;
65
57
  getPath(): Path | Paths;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.4.33",
3
+ "version": "0.4.35",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",