@plait/mind 0.27.0-next.4 → 0.27.0-next.6
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/base/image-base.component.mjs +1 -4
- package/esm2022/interfaces/element.mjs +9 -2
- package/esm2022/interfaces/index.mjs +2 -1
- package/esm2022/interfaces/options.mjs +1 -1
- package/esm2022/mind-node.component.mjs +10 -6
- package/esm2022/plugins/with-mind-fragment.mjs +90 -0
- package/esm2022/plugins/with-mind-hotkey.mjs +13 -55
- package/esm2022/plugins/with-mind.mjs +6 -35
- package/esm2022/plugins/with-node-dnd.mjs +3 -3
- package/esm2022/plugins/with-node-resize.mjs +5 -5
- package/esm2022/transforms/index.mjs +2 -3
- package/esm2022/transforms/node.mjs +1 -17
- package/esm2022/utils/draw/node-dnd.mjs +2 -2
- package/esm2022/utils/node/dynamic-width.mjs +3 -3
- package/fesm2022/plait-mind.mjs +214 -211
- package/fesm2022/plait-mind.mjs.map +1 -1
- package/interfaces/element.d.ts +1 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/options.d.ts +0 -2
- package/mind-node.component.d.ts +4 -3
- package/package.json +1 -1
- package/plugins/with-mind-fragment.d.ts +5 -0
- package/plugins/with-mind-hotkey.d.ts +0 -2
- package/transforms/index.d.ts +0 -1
- package/transforms/node.d.ts +0 -1
package/interfaces/element.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export declare const MindElement: {
|
|
|
43
43
|
getEmojis(element: MindElement<EmojiData>): import("./element-data").EmojiItem[];
|
|
44
44
|
hasMounted(element: MindElement): boolean;
|
|
45
45
|
getTextEditor(element: MindElement): import("slate").BaseEditor & import("slate-angular").AngularEditor & import("slate-history").HistoryEditor;
|
|
46
|
+
getTextManage(element: MindElement): import("@plait/text").TextManage;
|
|
46
47
|
};
|
|
47
48
|
export declare enum MindElementShape {
|
|
48
49
|
roundRectangle = "round-rectangle",
|
package/interfaces/index.d.ts
CHANGED
package/interfaces/options.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ComponentType, WithPluginOptions } from '@plait/core';
|
|
2
|
-
import { TextPlugin } from '@plait/text';
|
|
3
2
|
import { MindImageBaseComponent } from '../base';
|
|
4
3
|
export interface WithMindOptions extends WithPluginOptions {
|
|
5
4
|
emojiPadding: number;
|
|
6
5
|
spaceBetweenEmojis: number;
|
|
7
|
-
textPlugins?: TextPlugin[];
|
|
8
6
|
imageComponentType?: ComponentType<MindImageBaseComponent>;
|
|
9
7
|
}
|
package/mind-node.component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { PlaitPluginElementContext, OnContextChanged } from '@plait/core';
|
|
3
3
|
import { TextManage } from '@plait/text';
|
|
4
4
|
import { RoughSVG } from 'roughjs/bin/svg';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
@@ -11,8 +11,9 @@ import { PlaitMindBoard } from './plugins/with-mind.board';
|
|
|
11
11
|
import { NodeActiveDrawer } from './drawer/node-active.drawer';
|
|
12
12
|
import { CollapseDrawer } from './drawer/node-collapse.drawer';
|
|
13
13
|
import { NodeImageDrawer } from './drawer/node-image.drawer';
|
|
14
|
+
import { CommonPluginElement } from '@plait/common';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
|
-
export declare class MindNodeComponent extends
|
|
16
|
+
export declare class MindNodeComponent extends CommonPluginElement<MindElement, PlaitMindBoard> implements OnInit, OnDestroy, OnContextChanged<MindElement, PlaitMindBoard> {
|
|
16
17
|
private viewContainerRef;
|
|
17
18
|
protected cdr: ChangeDetectorRef;
|
|
18
19
|
roughSVG: RoughSVG;
|
|
@@ -26,9 +27,9 @@ export declare class MindNodeComponent extends PlaitPluginElementComponent<MindE
|
|
|
26
27
|
nodeEmojisDrawer: NodeEmojisDrawer;
|
|
27
28
|
nodeInsertDrawer: NodeInsertDrawer;
|
|
28
29
|
imageDrawer: NodeImageDrawer;
|
|
29
|
-
textManage: TextManage;
|
|
30
30
|
activeDrawer: NodeActiveDrawer;
|
|
31
31
|
collapseDrawer: CollapseDrawer;
|
|
32
|
+
get textManage(): TextManage;
|
|
32
33
|
constructor(viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef);
|
|
33
34
|
initializeDrawer(): void;
|
|
34
35
|
ngOnInit(): void;
|
package/package.json
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PlaitBoard } from '@plait/core';
|
|
2
|
+
import { MindElement } from '../interfaces';
|
|
3
|
+
import { PlaitMindBoard } from './with-mind.board';
|
|
4
|
+
export declare const withMindFragment: (baseBoard: PlaitBoard) => PlaitBoard & PlaitMindBoard;
|
|
5
|
+
export declare const getNextSelectedElement: (board: PlaitBoard, firstLevelElements: MindElement[]) => MindElement<import("../interfaces").BaseData> | undefined;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { PlaitBoard } from '@plait/core';
|
|
2
|
-
import { MindElement } from '../interfaces';
|
|
3
2
|
import { PlaitMindBoard } from './with-mind.board';
|
|
4
3
|
export declare const withMindHotkey: (baseBoard: PlaitBoard) => PlaitBoard & PlaitMindBoard;
|
|
5
|
-
export declare const getNextSelectedElement: (board: PlaitBoard, firstLevelElements: MindElement[]) => MindElement<import("../interfaces").BaseData> | undefined;
|
package/transforms/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export declare const MindTransforms: {
|
|
|
9
9
|
insertAbstract: (board: import("@plait/core").PlaitBoard, elements: import("@plait/core").PlaitElement[]) => void;
|
|
10
10
|
setAbstractsByRefs: (board: import("@plait/core").PlaitBoard, abstractRefs: import("@plait/mind").AbstractRefs) => void;
|
|
11
11
|
setAbstractByStandardLayout: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement<import("@plait/mind").BaseData>) => void;
|
|
12
|
-
removeElements: (board: import("@plait/core").PlaitBoard, elements: import("@plait/mind").MindElement<import("@plait/mind").BaseData>[]) => void;
|
|
13
12
|
insertNodes: (board: import("@plait/core").PlaitBoard, elements: import("@plait/mind").MindElement<import("@plait/mind").BaseData>[], path: import("slate").Path) => void;
|
|
14
13
|
insertAbstractNodes: (board: import("@plait/core").PlaitBoard, validAbstractRefs: import("@plait/mind").AbstractRef[], elements: import("@plait/mind").MindElement<import("@plait/mind").BaseData>[], path: import("slate").Path) => void;
|
|
15
14
|
setRightNodeCountByRefs: (board: import("@plait/core").PlaitBoard, refs: import("@plait/mind").RightNodeCountRef[]) => void;
|
package/transforms/node.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { PlaitMindBoard } from '../plugins/with-mind.board';
|
|
|
7
7
|
export declare const setTopic: (board: PlaitMindBoard, element: MindElement, topic: Element, width: number, height: number) => void;
|
|
8
8
|
export declare const setNodeManualWidth: (board: PlaitMindBoard, element: MindElement, width: number, height: number) => void;
|
|
9
9
|
export declare const setTopicSize: (board: PlaitMindBoard, element: MindElement, width: number, height: number) => void;
|
|
10
|
-
export declare const removeElements: (board: PlaitBoard, elements: MindElement[]) => void;
|
|
11
10
|
export declare const insertNodes: (board: PlaitBoard, elements: MindElement[], path: Path) => void;
|
|
12
11
|
export declare const insertAbstractNodes: (board: PlaitBoard, validAbstractRefs: AbstractRef[], elements: MindElement[], path: Path) => void;
|
|
13
12
|
export declare const setRightNodeCountByRefs: (board: PlaitBoard, refs: RightNodeCountRef[]) => void;
|