@plait/mind 0.48.0 → 0.50.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/esm2022/plugins/with-abstract-resize.mjs +4 -5
- package/esm2022/plugins/with-mind-create.mjs +12 -12
- package/esm2022/plugins/with-mind-fragment.mjs +28 -19
- package/esm2022/plugins/with-mind.mjs +3 -3
- package/esm2022/plugins/with-node-dnd.mjs +5 -5
- package/esm2022/plugins/with-node-image.mjs +24 -23
- package/esm2022/transforms/index.mjs +6 -2
- package/esm2022/transforms/layout.mjs +3 -13
- package/esm2022/transforms/node.mjs +2 -2
- package/esm2022/transforms/property.mjs +34 -0
- package/esm2022/utils/clipboard.mjs +6 -13
- package/esm2022/utils/mind.mjs +13 -15
- package/esm2022/utils/node/adjust-node.mjs +2 -3
- package/esm2022/utils/node-hover/extend.mjs +3 -3
- package/esm2022/utils/space/node-space.mjs +4 -8
- package/fesm2022/plait-mind.mjs +428 -408
- package/fesm2022/plait-mind.mjs.map +1 -1
- package/package.json +1 -1
- package/transforms/index.d.ts +5 -1
- package/transforms/layout.d.ts +1 -1
- package/transforms/property.d.ts +8 -0
- package/utils/clipboard.d.ts +0 -1
- package/utils/mind.d.ts +2 -2
- package/utils/space/node-space.d.ts +1 -2
package/package.json
CHANGED
package/transforms/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare const MindTransforms: {
|
|
2
|
-
setLayout: (board: import("@plait/core").PlaitBoard,
|
|
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;
|
package/transforms/layout.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PlaitBoard, Path } from '@plait/core';
|
|
2
2
|
import { MindLayoutType } from '@plait/layouts';
|
|
3
|
-
export declare const
|
|
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/clipboard.d.ts
CHANGED
|
@@ -3,6 +3,5 @@ import { MindElement } from '../interfaces';
|
|
|
3
3
|
import { Element } from 'slate';
|
|
4
4
|
import { PlaitMindBoard } from '../plugins/with-mind.board';
|
|
5
5
|
export declare const buildClipboardData: (board: PlaitBoard, selectedElements: MindElement[], startPoint: Point) => MindElement<import("../interfaces").BaseData>[];
|
|
6
|
-
export declare const setMindClipboardData: (data: DataTransfer | null, elements: MindElement[]) => void;
|
|
7
6
|
export declare const insertClipboardData: (board: PlaitMindBoard, elements: PlaitElement[], targetPoint: Point) => void;
|
|
8
7
|
export declare const insertClipboardText: (board: PlaitMindBoard, targetParent: PlaitElement, text: string | Element) => 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';
|
|
@@ -8,10 +8,10 @@ export declare const getFirstLevelElement: (elements: MindElement[]) => MindElem
|
|
|
8
8
|
export declare const isChildRight: (node: MindNode, child: MindNode) => boolean;
|
|
9
9
|
export declare const isChildUp: (node: MindNode, child: MindNode) => boolean;
|
|
10
10
|
export declare const copyNewNode: (node: MindElement) => MindElement<import("@plait/mind").BaseData>;
|
|
11
|
-
export declare const extractNodesText: (node: MindElement) => string;
|
|
12
11
|
export declare const insertMindElement: (board: PlaitMindBoard, inheritNode: MindElement, path: Path) => void;
|
|
13
12
|
export declare const findLastChild: (child: MindNode) => MindNode;
|
|
14
13
|
export declare const divideElementByParent: (elements: MindElement[]) => {
|
|
15
14
|
parentElements: MindElement<import("@plait/mind").BaseData>[];
|
|
16
15
|
abstractIncludedGroups: MindElement<import("@plait/mind").BaseData>[][];
|
|
17
16
|
};
|
|
17
|
+
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
|
|
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;
|