@plait/mind 0.55.0 → 0.56.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.
@@ -3,9 +3,9 @@ import { AbstractHandlePosition } from '../plugins/with-abstract-resize.board';
3
3
  import { Generator } from '@plait/common';
4
4
  export interface ActiveData {
5
5
  selected: boolean;
6
- isEditing: boolean;
7
6
  }
8
7
  export declare class NodeActiveGenerator extends Generator<MindElement, ActiveData> {
8
+ static key: string;
9
9
  abstractOutlineG?: SVGGElement;
10
10
  canDraw(element: MindElement<BaseData>, data: ActiveData): boolean;
11
11
  draw(element: MindElement<BaseData>, data: ActiveData): SVGGElement;
@@ -14,6 +14,7 @@ declare class EmojiGenerator {
14
14
  export declare class NodeEmojisGenerator {
15
15
  private board;
16
16
  private viewContainerRef;
17
+ static key: string;
17
18
  emojiGenerators: EmojiGenerator[];
18
19
  g?: SVGGElement;
19
20
  constructor(board: PlaitMindBoard, viewContainerRef: ViewContainerRef);
@@ -41,7 +41,6 @@ export declare const MindElement: {
41
41
  hasEmojis(element: MindElement): element is MindElement<EmojiData>;
42
42
  hasImage(element: MindElement): element is MindElement<ImageData>;
43
43
  getEmojis(element: MindElement<EmojiData>): import("./element-data").EmojiItem[];
44
- hasMounted(element: MindElement): boolean;
45
44
  };
46
45
  export declare enum MindElementShape {
47
46
  roundRectangle = "round-rectangle",
@@ -1,4 +1,4 @@
1
- import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { PlaitPluginElementContext, OnContextChanged } from '@plait/core';
3
3
  import { TextManage } from '@plait/text';
4
4
  import { RoughSVG } from 'roughjs/bin/svg';
@@ -15,7 +15,6 @@ import { NodeShapeGenerator } from './generators/node-shape.generator';
15
15
  import { ImageData } from './interfaces';
16
16
  import * as i0 from "@angular/core";
17
17
  export declare class MindNodeComponent extends CommonPluginElement<MindElement, PlaitMindBoard> implements OnInit, OnDestroy, OnContextChanged<MindElement, PlaitMindBoard> {
18
- protected cdr: ChangeDetectorRef;
19
18
  roughSVG: RoughSVG;
20
19
  node: MindNode;
21
20
  index: number;
@@ -30,8 +29,8 @@ export declare class MindNodeComponent extends CommonPluginElement<MindElement,
30
29
  activeGenerator: NodeActiveGenerator;
31
30
  collapseGenerator: CollapseGenerator;
32
31
  get textManage(): TextManage;
33
- constructor(cdr: ChangeDetectorRef);
34
- initializeDrawer(): void;
32
+ constructor();
33
+ initializeGenerator(): void;
35
34
  ngOnInit(): void;
36
35
  onContextChanged(value: PlaitPluginElementContext<MindElement, PlaitMindBoard>, previous: PlaitPluginElementContext<MindElement, PlaitMindBoard>): void;
37
36
  drawEmojis(): void;
@@ -39,7 +38,6 @@ export declare class MindNodeComponent extends CommonPluginElement<MindElement,
39
38
  drawExtend(): void;
40
39
  drawTopic(): void;
41
40
  updateTopic(): void;
42
- editTopic(): void;
43
41
  trackBy: (index: number, node: MindNode) => string;
44
42
  ngOnDestroy(): void;
45
43
  static ɵfac: i0.ɵɵFactoryDeclaration<MindNodeComponent, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/mind",
3
- "version": "0.55.0",
3
+ "version": "0.56.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.4",
6
6
  "@angular/core": "^17.2.4"
@@ -20,4 +20,5 @@ export declare const MindTransforms: {
20
20
  setImage: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement<import("@plait/mind").BaseData>, imageItem: import("@plait/common").CommonImageItem) => void;
21
21
  insertChildNode: (board: import("@plait/mind").PlaitMindBoard, element: import("@plait/mind").MindElement<import("@plait/mind").BaseData>) => void;
22
22
  insertSiblingNode: (board: import("@plait/mind").PlaitMindBoard, element: import("@plait/mind").MindElement<import("@plait/mind").BaseData>) => void;
23
+ insertMind: (board: import("@plait/mind").PlaitMindBoard, mind: import("@plait/mind").MindElement<import("@plait/mind").BaseData>) => void;
23
24
  };
@@ -12,3 +12,4 @@ export declare const insertAbstractNodes: (board: PlaitBoard, validAbstractRefs:
12
12
  export declare const setRightNodeCountByRefs: (board: PlaitBoard, refs: RightNodeCountRef[]) => void;
13
13
  export declare const insertChildNode: (board: PlaitMindBoard, element: MindElement) => void;
14
14
  export declare const insertSiblingNode: (board: PlaitMindBoard, element: MindElement) => void;
15
+ export declare const insertMind: (board: PlaitMindBoard, mind: MindElement) => void;
package/utils/mind.d.ts CHANGED
@@ -14,4 +14,4 @@ export declare const divideElementByParent: (elements: MindElement[]) => {
14
14
  parentElements: MindElement<import("@plait/mind").BaseData>[];
15
15
  abstractIncludedGroups: MindElement<import("@plait/mind").BaseData>[][];
16
16
  };
17
- export declare const getDefaultMindElementFontSize: (board: PlaitBoard, element: MindElement) => 18 | 14;
17
+ export declare const getDefaultMindElementFontSize: (board: PlaitBoard, element: MindElement) => 14 | 18;
@@ -1,4 +1,4 @@
1
- import { PlaitBoard } from '@plait/core';
1
+ import { PlaitBoard, PlaitElement } from '@plait/core';
2
2
  import { MindElement } from '../../interfaces/element';
3
3
  export declare function editTopic(element: MindElement): void;
4
- export declare const getSelectedMindElements: (board: PlaitBoard) => MindElement<import("@plait/mind").BaseData>[];
4
+ export declare const getSelectedMindElements: (board: PlaitBoard, elements?: PlaitElement[]) => MindElement<import("@plait/mind").BaseData>[];