@plait/mind 0.47.0 → 0.49.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/mind",
3
- "version": "0.47.0",
3
+ "version": "0.49.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.0.0",
6
6
  "@angular/core": "^16.0.0"
@@ -1,5 +1,9 @@
1
1
  export declare const MindTransforms: {
2
- setLayout: (board: import("@plait/core").PlaitBoard, layout: import("@plait/layouts").MindLayoutType, path: import("@plait/core").Path) => void;
2
+ setLayout: (board: import("@plait/core").PlaitBoard, type: import("@plait/layouts").MindLayoutType) => void;
3
+ setShape: (board: import("@plait/core").PlaitBoard, shape: import("@plait/mind").MindElementShape) => void;
4
+ setBranchShape: (board: import("@plait/core").PlaitBoard, branchShape: import("@plait/mind").BranchShape) => void;
5
+ setBranchWidth: (board: import("@plait/core").PlaitBoard, branchWidth: number) => void;
6
+ setBranchColor: (board: import("@plait/core").PlaitBoard, branchColor: string) => void;
3
7
  setTopic: (board: import("@plait/mind").PlaitMindBoard, element: import("@plait/mind").MindElement<import("@plait/mind").BaseData>, topic: import("slate").BaseElement, width: number, height: number) => void;
4
8
  setTopicSize: (board: import("@plait/mind").PlaitMindBoard, element: import("@plait/mind").MindElement<import("@plait/mind").BaseData>, width: number, height: number) => void;
5
9
  setNodeManualWidth: (board: import("@plait/mind").PlaitMindBoard, element: import("@plait/mind").MindElement<import("@plait/mind").BaseData>, width: number, height: number) => void;
@@ -1,3 +1,3 @@
1
1
  import { PlaitBoard, Path } from '@plait/core';
2
2
  import { MindLayoutType } from '@plait/layouts';
3
- export declare const setLayout: (board: PlaitBoard, layout: MindLayoutType, path: Path) => void;
3
+ export declare const correctLogicLayoutNode: (board: PlaitBoard, layout: MindLayoutType, path: Path) => void;
@@ -0,0 +1,8 @@
1
+ import { PlaitBoard } from '@plait/core';
2
+ import { MindLayoutType } from '@plait/layouts';
3
+ import { BranchShape, MindElementShape } from '../interfaces';
4
+ export declare const setLayout: (board: PlaitBoard, type: MindLayoutType) => void;
5
+ export declare const setShape: (board: PlaitBoard, shape: MindElementShape) => void;
6
+ export declare const setBranchShape: (board: PlaitBoard, branchShape: BranchShape) => void;
7
+ export declare const setBranchWidth: (board: PlaitBoard, branchWidth: number) => void;
8
+ export declare const setBranchColor: (board: PlaitBoard, branchColor: string) => void;
package/utils/mind.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Path } from '@plait/core';
1
+ import { Path, PlaitBoard } from '@plait/core';
2
2
  import { MindElement } from '../interfaces/element';
3
3
  import { MindNode } from '../interfaces/node';
4
4
  import { PlaitMindBoard } from '../plugins/with-mind.board';
@@ -15,3 +15,4 @@ export declare const divideElementByParent: (elements: MindElement[]) => {
15
15
  parentElements: MindElement<import("@plait/mind").BaseData>[];
16
16
  abstractIncludedGroups: MindElement<import("@plait/mind").BaseData>[][];
17
17
  };
18
+ export declare const getDefaultMindElementFontSize: (board: PlaitBoard, element: MindElement) => 14 | 18;
@@ -11,7 +11,7 @@ export declare const NodeSpace: {
11
11
  */
12
12
  getNodeNewDynamicWidth(board: PlaitMindBoard, element: MindElement, imageWidth: number): number;
13
13
  getNodeResizableMinWidth(board: PlaitMindBoard, element: MindElement): number;
14
- getNodeTopicMinWidth(board: PlaitMindBoard, element: MindElement, isRoot?: boolean): number;
14
+ getNodeTopicMinWidth(board: PlaitMindBoard, element: MindElement): number;
15
15
  getTextLeftSpace(board: PlaitMindBoard, element: MindElement): number;
16
16
  getTextTopSpace(board: PlaitMindBoard, element: MindElement): number;
17
17
  getImageTopSpace(board: PlaitMindBoard, element: MindElement): number;
@@ -19,4 +19,3 @@ export declare const NodeSpace: {
19
19
  getEmojiTopSpace(board: PlaitMindBoard, element: MindElement): number;
20
20
  };
21
21
  export declare const getFontSizeBySlateElement: (text: string | Element) => number;
22
- export declare const getNodeDefaultFontSize: (isRoot?: boolean) => 14 | 18;