@plait/mind 0.14.0 → 0.16.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/constants/default.d.ts +1 -0
- package/constants/node-topic-style.d.ts +2 -0
- package/esm2020/constants/default.mjs +2 -1
- package/esm2020/constants/node-topic-style.mjs +3 -1
- package/esm2020/interfaces/options.mjs +1 -1
- package/esm2020/node.component.mjs +8 -5
- package/esm2020/plugins/with-abstract-resize.board.mjs +1 -1
- package/esm2020/plugins/with-mind-create.mjs +3 -3
- package/esm2020/plugins/with-mind-extend.mjs +3 -4
- package/esm2020/plugins/with-mind-hotkey.mjs +42 -32
- package/esm2020/plugins/with-mind.board.mjs +1 -1
- package/esm2020/plugins/with-mind.mjs +7 -9
- package/esm2020/plugins/with-node-dnd.mjs +13 -6
- package/esm2020/transforms/abstract-node.mjs +1 -3
- package/esm2020/utils/abstract/common.mjs +5 -1
- package/esm2020/utils/clipboard.mjs +14 -5
- package/esm2020/utils/draw/node-link/indented-link.mjs +4 -15
- package/esm2020/utils/node/adjust-node.mjs +3 -7
- package/esm2020/utils/node-style/branch.mjs +6 -1
- package/esm2020/utils/node-style/shape.mjs +8 -1
- package/esm2020/utils/space/emoji.mjs +3 -2
- package/esm2020/utils/space/node-space.mjs +3 -2
- package/fesm2015/plait-mind.mjs +259 -239
- package/fesm2015/plait-mind.mjs.map +1 -1
- package/fesm2020/plait-mind.mjs +259 -239
- package/fesm2020/plait-mind.mjs.map +1 -1
- package/interfaces/options.d.ts +2 -1
- package/package.json +1 -1
- package/plugins/with-abstract-resize.board.d.ts +2 -2
- package/plugins/with-mind-hotkey.d.ts +2 -0
- package/plugins/with-mind.board.d.ts +0 -2
- package/utils/abstract/common.d.ts +1 -0
- package/utils/clipboard.d.ts +1 -1
package/interfaces/options.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { WithPluginOptions } from '@plait/core';
|
|
1
2
|
import { TextPlugin } from '@plait/text';
|
|
2
|
-
export interface
|
|
3
|
+
export interface WithMindOptions extends WithPluginOptions {
|
|
3
4
|
emojiPadding: number;
|
|
4
5
|
spaceBetweenEmojis: number;
|
|
5
6
|
textPlugins?: TextPlugin[];
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PlaitOptionsBoard } from '@plait/core';
|
|
2
2
|
import { MindElement } from '../interfaces/element';
|
|
3
3
|
import { AbstractNode } from '@plait/layouts';
|
|
4
4
|
export declare enum AbstractHandlePosition {
|
|
@@ -10,7 +10,7 @@ export declare enum AbstractResizeState {
|
|
|
10
10
|
resizing = "resizing",
|
|
11
11
|
end = "end"
|
|
12
12
|
}
|
|
13
|
-
export interface PlaitAbstractBoard extends
|
|
13
|
+
export interface PlaitAbstractBoard extends PlaitOptionsBoard {
|
|
14
14
|
onAbstractResize?: (state: AbstractResizeState) => void;
|
|
15
15
|
}
|
|
16
16
|
export type AbstractRefs = Map<MindElement, Pick<AbstractNode, 'start' | 'end'>>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { PlaitBoard } from '@plait/core';
|
|
2
|
+
import { MindElement } from '../interfaces';
|
|
2
3
|
export declare const withMindHotkey: (board: PlaitBoard) => PlaitBoard;
|
|
4
|
+
export declare const getNextSelectedElement: (board: PlaitBoard, firstLevelElements: MindElement[]) => MindElement<import("../interfaces").BaseData> | undefined;
|
|
3
5
|
export declare const isExpandHotkey: (event: KeyboardEvent) => boolean;
|
|
4
6
|
export declare const isTabHotkey: (event: KeyboardEvent) => boolean;
|
|
5
7
|
export declare const isEnterHotkey: (event: KeyboardEvent) => boolean;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ComponentType } from '@plait/core';
|
|
2
2
|
import { MindElement } from '../interfaces/element';
|
|
3
3
|
import { EmojiItem } from '../interfaces/element-data';
|
|
4
|
-
import { MindOptions } from '../interfaces/options';
|
|
5
4
|
import { PlaitAbstractBoard } from './with-abstract-resize.board';
|
|
6
5
|
import { MindEmojiBaseComponent } from '../base/emoji-base.component';
|
|
7
6
|
export interface PlaitMindBoard extends PlaitAbstractBoard {
|
|
8
7
|
drawEmoji: (emoji: EmojiItem, element: MindElement) => ComponentType<MindEmojiBaseComponent>;
|
|
9
|
-
getMindOptions: () => MindOptions;
|
|
10
8
|
}
|
|
@@ -27,3 +27,4 @@ export declare function getRelativeStartEndByAbstractRef(abstractRef: AbstractRe
|
|
|
27
27
|
};
|
|
28
28
|
export declare const insertElementHandleAbstract: (board: PlaitBoard, path: Path, step?: number, isExtendPreviousNode?: boolean, effectedAbstracts?: Map<MindElement<import("@plait/mind").BaseData>, Pick<AbstractNode, "end" | "start">>) => Map<MindElement<import("@plait/mind").BaseData>, Pick<AbstractNode, "end" | "start">>;
|
|
29
29
|
export declare const deleteElementHandleAbstract: (board: PlaitBoard, deletableElements: MindElement[], effectedAbstracts?: Map<MindElement<import("@plait/mind").BaseData>, Pick<AbstractNode, "end" | "start">>) => Map<MindElement<import("@plait/mind").BaseData>, Pick<AbstractNode, "end" | "start">>;
|
|
30
|
+
export declare const isChildOfAbstract: (board: PlaitBoard, element: MindElement) => boolean;
|
package/utils/clipboard.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export declare const buildClipboardData: (board: PlaitBoard, selectedElements: M
|
|
|
5
5
|
export declare const setClipboardData: (data: DataTransfer | null, elements: MindElement[]) => void;
|
|
6
6
|
export declare const getDataFromClipboard: (data: DataTransfer | null) => PlaitElement[];
|
|
7
7
|
export declare const insertClipboardData: (board: PlaitBoard, elements: PlaitElement[], targetPoint: Point) => void;
|
|
8
|
-
export declare const insertClipboardText: (board: PlaitBoard,
|
|
8
|
+
export declare const insertClipboardText: (board: PlaitBoard, targetParent: PlaitElement, text: string | Element) => void;
|