@plait/mind 0.90.1 → 0.92.0-next.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.
Files changed (94) hide show
  1. package/fesm2022/plait-mind.mjs +13 -34
  2. package/fesm2022/plait-mind.mjs.map +1 -1
  3. package/index.d.ts +601 -3
  4. package/package.json +1 -1
  5. package/constants/abstract-node.d.ts +0 -4
  6. package/constants/default.d.ts +0 -18
  7. package/constants/index.d.ts +0 -4
  8. package/constants/node-style.d.ts +0 -20
  9. package/constants/node-topic-style.d.ts +0 -3
  10. package/constants/theme.d.ts +0 -6
  11. package/emoji/emoji-base.component.d.ts +0 -10
  12. package/emoji/index.d.ts +0 -2
  13. package/emoji/with-emoji.d.ts +0 -15
  14. package/generators/node-active.generator.d.ts +0 -13
  15. package/generators/node-emojis.generator.d.ts +0 -22
  16. package/generators/node-more.generator.d.ts +0 -43
  17. package/generators/node-shape.generator.d.ts +0 -12
  18. package/interfaces/element-data.d.ts +0 -15
  19. package/interfaces/element.d.ts +0 -54
  20. package/interfaces/index.d.ts +0 -7
  21. package/interfaces/layout.d.ts +0 -10
  22. package/interfaces/node.d.ts +0 -32
  23. package/interfaces/options.d.ts +0 -5
  24. package/interfaces/pointer.d.ts +0 -3
  25. package/interfaces/theme-color.d.ts +0 -17
  26. package/interfaces/types.d.ts +0 -11
  27. package/mind-node.component.d.ts +0 -34
  28. package/mind.component.d.ts +0 -11
  29. package/plugins/with-abstract-resize.board.d.ts +0 -16
  30. package/plugins/with-abstract-resize.d.ts +0 -2
  31. package/plugins/with-mind-create.d.ts +0 -9
  32. package/plugins/with-mind-extend.d.ts +0 -3
  33. package/plugins/with-mind-fragment.d.ts +0 -5
  34. package/plugins/with-mind-hotkey.d.ts +0 -3
  35. package/plugins/with-mind.board.d.ts +0 -3
  36. package/plugins/with-mind.d.ts +0 -2
  37. package/plugins/with-node-dnd.d.ts +0 -2
  38. package/plugins/with-node-image-resize.d.ts +0 -2
  39. package/plugins/with-node-image.d.ts +0 -2
  40. package/plugins/with-node-more.d.ts +0 -14
  41. package/plugins/with-node-resize.d.ts +0 -6
  42. package/public-api.d.ts +0 -12
  43. package/queries/get-available-sublayouts-by-element.d.ts +0 -4
  44. package/queries/get-branch-layouts.d.ts +0 -4
  45. package/queries/get-correct-layout-by-element.d.ts +0 -10
  46. package/queries/get-layout-by-element.d.ts +0 -3
  47. package/queries/index.d.ts +0 -6
  48. package/transforms/abstract-node.d.ts +0 -6
  49. package/transforms/emoji.d.ts +0 -6
  50. package/transforms/image.d.ts +0 -5
  51. package/transforms/index.d.ts +0 -23
  52. package/transforms/layout.d.ts +0 -3
  53. package/transforms/node.d.ts +0 -14
  54. package/transforms/property.d.ts +0 -8
  55. package/utils/abstract/common.d.ts +0 -30
  56. package/utils/abstract/resize.d.ts +0 -23
  57. package/utils/clipboard.d.ts +0 -7
  58. package/utils/common.d.ts +0 -5
  59. package/utils/dnd/common.d.ts +0 -17
  60. package/utils/dnd/detector.d.ts +0 -18
  61. package/utils/draw/abstract-outline.d.ts +0 -12
  62. package/utils/draw/node-dnd.d.ts +0 -7
  63. package/utils/draw/node-link/abstract-link.d.ts +0 -3
  64. package/utils/draw/node-link/draw-link.d.ts +0 -4
  65. package/utils/draw/node-link/indented-link.d.ts +0 -4
  66. package/utils/draw/node-link/logic-link.d.ts +0 -4
  67. package/utils/draw/node-shape.d.ts +0 -5
  68. package/utils/index.d.ts +0 -16
  69. package/utils/layout.d.ts +0 -12
  70. package/utils/mind.d.ts +0 -17
  71. package/utils/node/adjust-node.d.ts +0 -6
  72. package/utils/node/common.d.ts +0 -4
  73. package/utils/node/create-node.d.ts +0 -18
  74. package/utils/node/dynamic-width.d.ts +0 -7
  75. package/utils/node/image.d.ts +0 -5
  76. package/utils/node/index.d.ts +0 -5
  77. package/utils/node/right-node-count.d.ts +0 -9
  78. package/utils/node-style/branch.d.ts +0 -15
  79. package/utils/node-style/common.d.ts +0 -3
  80. package/utils/node-style/index.d.ts +0 -3
  81. package/utils/node-style/shape.d.ts +0 -8
  82. package/utils/normalize.d.ts +0 -3
  83. package/utils/path.d.ts +0 -6
  84. package/utils/point-placement.d.ts +0 -12
  85. package/utils/position/emoji.d.ts +0 -7
  86. package/utils/position/image.d.ts +0 -16
  87. package/utils/position/index.d.ts +0 -4
  88. package/utils/position/node.d.ts +0 -12
  89. package/utils/position/topic.d.ts +0 -16
  90. package/utils/space/emoji.d.ts +0 -7
  91. package/utils/space/index.d.ts +0 -3
  92. package/utils/space/layout-options.d.ts +0 -3
  93. package/utils/space/node-space.d.ts +0 -23
  94. package/utils/weak-maps.d.ts +0 -3
@@ -1,6 +0,0 @@
1
- export declare const DEFAULT_BRANCH_COLORS: string[];
2
- export declare const COLORFUL_BRANCH_COLORS: string[];
3
- export declare const SOFT_BRANCH_COLORS: string[];
4
- export declare const RETRO_BRANCH_COLORS: string[];
5
- export declare const DARK_BRANCH_COLORS: string[];
6
- export declare const STARRY_BRANCH_COLORS: string[];
@@ -1,10 +0,0 @@
1
- import { EmojiData, EmojiItem } from '../interfaces/element-data';
2
- import { PlaitBoard } from '@plait/core';
3
- import { MindElement } from '../interfaces';
4
- export declare abstract class MindEmojiBaseComponent {
5
- fontSize: number;
6
- emojiItem: EmojiItem;
7
- board: PlaitBoard;
8
- element: MindElement<EmojiData>;
9
- abstract nativeElement(): HTMLElement;
10
- }
package/emoji/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './emoji-base.component';
2
- export * from './with-emoji';
@@ -1,15 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { RenderComponentRef } from '@plait/common';
3
- import { EmojiData, EmojiItem } from '../interfaces/element-data';
4
- import { MindElement } from '../interfaces/element';
5
- export interface PlaitMindEmojiBoard {
6
- renderEmoji: (container: Element | DocumentFragment, props: EmojiProps) => EmojiComponentRef;
7
- }
8
- export declare const withEmoji: <T extends PlaitBoard = PlaitBoard>(board: T) => T & PlaitMindEmojiBoard;
9
- export type EmojiComponentRef = RenderComponentRef<EmojiProps>;
10
- export interface EmojiProps {
11
- board: PlaitBoard;
12
- emojiItem: EmojiItem;
13
- element: MindElement<EmojiData>;
14
- fontSize: number;
15
- }
@@ -1,13 +0,0 @@
1
- import { MindElement, BaseData } from '../interfaces';
2
- import { AbstractHandlePosition } from '../plugins/with-abstract-resize.board';
3
- import { Generator } from '@plait/common';
4
- export interface ActiveData {
5
- selected: boolean;
6
- }
7
- export declare class NodeActiveGenerator extends Generator<MindElement, ActiveData> {
8
- static key: string;
9
- abstractOutlineG?: SVGGElement;
10
- canDraw(element: MindElement<BaseData>, data: ActiveData): boolean;
11
- draw(element: MindElement<BaseData>, data: ActiveData): SVGGElement;
12
- updateAbstractOutline(element: MindElement, activeHandlePosition?: AbstractHandlePosition, resizingLocation?: number): void;
13
- }
@@ -1,22 +0,0 @@
1
- import { EmojiData, EmojiItem, MindElement } from '../interfaces';
2
- import { PlaitBoard } from '@plait/core';
3
- import { PlaitMindBoard } from '../plugins/with-mind.board';
4
- import { EmojiComponentRef, PlaitMindEmojiBoard } from '../emoji/with-emoji';
5
- export declare const FOREIGN_OBJECT_EMOJI_CLASS_NAME = "foreign-object-emoji";
6
- declare class EmojiGenerator {
7
- private board;
8
- emojiComponentRef: EmojiComponentRef | null;
9
- constructor(board: PlaitMindEmojiBoard & PlaitBoard);
10
- draw(container: Element | DocumentFragment, emoji: EmojiItem, element: MindElement<EmojiData>): void;
11
- destroy(): void;
12
- }
13
- export declare class NodeEmojisGenerator {
14
- private board;
15
- static key: string;
16
- emojiGenerators: EmojiGenerator[];
17
- g?: SVGGElement;
18
- constructor(board: PlaitMindBoard);
19
- drawEmojis(element: MindElement): SVGGElement | undefined;
20
- destroy(): void;
21
- }
22
- export {};
@@ -1,43 +0,0 @@
1
- import { PlaitBoard, Point, RectangleClient } from '@plait/core';
2
- import { MindElement, BaseData, LayoutDirection } from '../interfaces';
3
- import { Generator } from '@plait/common';
4
- export interface NodeMoreExtraData {
5
- isSelected: boolean;
6
- isHit?: boolean;
7
- isHitAwarenessRectangle?: boolean | null;
8
- isHitCollapseArea?: boolean;
9
- isHitExpandArea?: boolean;
10
- isHitAddArea?: boolean;
11
- isShowCollapseAnimation?: boolean;
12
- isShowAddAnimation?: boolean;
13
- isHitStandardLeftAddArea?: boolean;
14
- isHitStandardLeftAwarenessRectangle?: boolean;
15
- }
16
- export declare class NodeMoreGenerator extends Generator<MindElement, NodeMoreExtraData> {
17
- static key: string;
18
- collapseOrAddG: SVGGElement | undefined | null;
19
- expandG: SVGGElement | undefined | null;
20
- canDraw(element: MindElement<BaseData>, extraData: NodeMoreExtraData): boolean;
21
- draw(element: MindElement<BaseData>, extraData: NodeMoreExtraData): SVGGElement;
22
- toggleCollapseAndAdd(center: Point, addCenter: Point | null, standardLeftAddCenter: Point | null | undefined, stroke: string, parentG: SVGGElement, isShowCollapse: boolean, isShowAdd: boolean, isShowStandardLeftAdd: boolean, isHitAddArea: boolean, isHitStandardLeftAdd: boolean, isShowCollapseAnimation: boolean, isShowAddAnimation: boolean): void;
23
- toggleExpandBadge(element: MindElement, moreStartAndEnd: [Point, Point], center: Point, stroke: string, parentG: SVGGElement, isCollapsed: boolean, isHoveredExpandIcon: boolean): void;
24
- }
25
- export declare const getNodeMoreKeyPosition: (board: PlaitBoard, element: MindElement) => {
26
- startPoint: Point;
27
- endPoint: Point;
28
- hasCollapsedIcon: boolean;
29
- hasExpandedIcon: boolean | undefined;
30
- hasAddIcon: boolean;
31
- collapsedIconCenter: Point | null;
32
- expandedIconCenter: Point | null;
33
- addCenter: Point | null;
34
- awarenessRectangle: RectangleClient | null;
35
- hasLeftAddIcon: boolean;
36
- standardRef: {
37
- addCenter: Point;
38
- awarenessRectangle: RectangleClient;
39
- } | null;
40
- };
41
- export declare const getNodeMoreLayoutDirection: (board: PlaitBoard, element: MindElement) => LayoutDirection;
42
- export declare const getNodeMoreStartPoint: (board: PlaitBoard, element: MindElement, linkLineDirection: LayoutDirection, isLeft?: boolean) => Point;
43
- export declare const canHandleNodeMore: (board: PlaitBoard) => boolean;
@@ -1,12 +0,0 @@
1
- import { Generator } from '@plait/common';
2
- import { MindElement } from '../interfaces/element';
3
- import { MindNode } from '../interfaces/node';
4
- import { PlaitBoard } from '@plait/core';
5
- export interface ShapeData {
6
- node: MindNode;
7
- }
8
- export declare class NodeShapeGenerator extends Generator<MindElement, ShapeData> {
9
- constructor(board: PlaitBoard);
10
- canDraw(element: MindElement, data: ShapeData): boolean;
11
- draw(element: MindElement, data: ShapeData): SVGGElement;
12
- }
@@ -1,15 +0,0 @@
1
- import { CommonImageItem, ParagraphElement } from '@plait/common';
2
- export interface EmojiItem {
3
- name: string;
4
- }
5
- export interface BaseData {
6
- topic: ParagraphElement;
7
- emojis?: EmojiItem[];
8
- image?: CommonImageItem;
9
- }
10
- export interface EmojiData extends BaseData {
11
- emojis: EmojiItem[];
12
- }
13
- export interface ImageData extends BaseData {
14
- image: CommonImageItem;
15
- }
@@ -1,54 +0,0 @@
1
- import { MindLayoutType } from '@plait/layouts';
2
- import { PlaitBoard, PlaitElement, Point } from '@plait/core';
3
- import { BaseData, EmojiData, ImageData } from './element-data';
4
- import { StrokeStyle } from '@plait/common';
5
- export interface BaseMindElement extends PlaitElement {
6
- rightNodeCount?: number;
7
- manualWidth?: number;
8
- fill?: string;
9
- strokeColor?: string;
10
- strokeWidth?: number;
11
- strokeStyle?: StrokeStyle;
12
- shape?: MindElementShape;
13
- branchColor?: string;
14
- branchWidth?: number;
15
- branchShape?: BranchShape;
16
- layout?: MindLayoutType;
17
- isCollapsed?: boolean;
18
- start?: number;
19
- end?: number;
20
- }
21
- export interface MindElement<T = BaseData> extends BaseMindElement {
22
- type: 'mind_child' | 'mind' | 'mindmap';
23
- children: MindElement[];
24
- data: T;
25
- }
26
- export interface PlaitMind<T = BaseData> extends MindElement<T> {
27
- type: 'mind' | 'mindmap';
28
- points: Point[];
29
- }
30
- export declare const PlaitMind: {
31
- isMind: (value: any) => value is PlaitMind;
32
- };
33
- export declare const MindElement: {
34
- hasLayout(value: MindElement, layout: MindLayoutType): boolean;
35
- isIndentedLayout(value: MindElement): boolean;
36
- isMindElement(board: PlaitBoard | null, element: PlaitElement): element is MindElement;
37
- getParent(node: MindElement): MindElement<BaseData>;
38
- findParent(node: MindElement): MindElement<BaseData> | undefined;
39
- getRoot(board: PlaitBoard, element: MindElement): PlaitMind;
40
- getAncestors(board: PlaitBoard, element: MindElement): PlaitElement[];
41
- getNode(element: MindElement): import("@plait/mind").MindNode;
42
- findParentNode(element: MindElement): import("@plait/mind").MindNode | undefined;
43
- hasEmojis(element: MindElement): element is MindElement<EmojiData>;
44
- hasImage(element: MindElement): element is MindElement<ImageData>;
45
- getEmojis(element: MindElement<EmojiData>): import("./element-data").EmojiItem[];
46
- };
47
- export declare enum MindElementShape {
48
- roundRectangle = "round-rectangle",
49
- underline = "underline"
50
- }
51
- export declare enum BranchShape {
52
- bight = "bight",
53
- polyline = "polyline"
54
- }
@@ -1,7 +0,0 @@
1
- export * from './element';
2
- export * from './element-data';
3
- export * from './node';
4
- export * from './layout';
5
- export * from './pointer';
6
- export * from './theme-color';
7
- export * from './options';
@@ -1,10 +0,0 @@
1
- export declare enum LayoutDirection {
2
- 'top' = "top",
3
- 'right' = "right",
4
- 'bottom' = "bottom",
5
- 'left' = "left"
6
- }
7
- export declare const LayoutDirectionsMap: LayoutDirectionMapType;
8
- export type LayoutDirectionMapType = {
9
- [key: string]: LayoutDirection[];
10
- };
@@ -1,32 +0,0 @@
1
- import { MindLayoutType } from '@plait/layouts';
2
- import { Path } from '@plait/core';
3
- import { MindElement } from './element';
4
- export interface MindNode {
5
- depth: number;
6
- x: number;
7
- y: number;
8
- width: number;
9
- height: number;
10
- hGap: number;
11
- vGap: number;
12
- children: MindNode[];
13
- origin: MindElement;
14
- parent: MindNode;
15
- left: boolean;
16
- up: boolean;
17
- }
18
- export declare const MindNode: {
19
- get(root: MindNode, path: Path): MindNode;
20
- };
21
- export type ExtendLayoutType = Exclude<MindLayoutType, MindLayoutType.standard>;
22
- export type CoordinateType = {
23
- startX: number;
24
- startY: number;
25
- endX: number;
26
- endY: number;
27
- };
28
- export type ExtendUnderlineCoordinateType = {
29
- [key in ExtendLayoutType]: CoordinateType;
30
- };
31
- export type DetectResult = 'top' | 'bottom' | 'right' | 'left' | null;
32
- export type RootBaseDirection = 'right' | 'left' | null;
@@ -1,5 +0,0 @@
1
- import { WithPluginOptions } from '@plait/core';
2
- export interface WithMindOptions extends WithPluginOptions {
3
- emojiPadding: number;
4
- spaceBetweenEmojis: number;
5
- }
@@ -1,3 +0,0 @@
1
- export declare enum MindPointerType {
2
- 'mind' = "mind"
3
- }
@@ -1,17 +0,0 @@
1
- import { ThemeColor, ThemeColorMode } from '@plait/core';
2
- export interface MindThemeColor extends ThemeColor {
3
- mode: ThemeColorMode | string;
4
- branchColors: string[];
5
- rootFill: string;
6
- rootTextColor: string;
7
- }
8
- export declare const MindDefaultThemeColor: MindThemeColor;
9
- export declare const MindColorfulThemeColor: MindThemeColor;
10
- export declare const MindSoftThemeColor: MindThemeColor;
11
- export declare const MindRetroThemeColor: MindThemeColor;
12
- export declare const MindDarkThemeColor: MindThemeColor;
13
- export declare const MindStarryThemeColor: MindThemeColor;
14
- export declare const MindThemeColors: MindThemeColor[];
15
- export declare const MindThemeColor: {
16
- isMindThemeColor(value: any): value is MindThemeColor;
17
- };
@@ -1,11 +0,0 @@
1
- export declare enum HorizontalPlacement {
2
- left = "left",
3
- center = "center",
4
- right = "right"
5
- }
6
- export declare enum VerticalPlacement {
7
- top = "top",
8
- middle = "middle",
9
- bottom = "bottom"
10
- }
11
- export type PointPlacement = [HorizontalPlacement, VerticalPlacement];
@@ -1,34 +0,0 @@
1
- import { PlaitPluginElementContext, OnContextChanged } from '@plait/core';
2
- import { RoughSVG } from 'roughjs/bin/svg';
3
- import { MindElement } from './interfaces/element';
4
- import { MindNode } from './interfaces/node';
5
- import { NodeEmojisGenerator } from './generators/node-emojis.generator';
6
- import { PlaitMindBoard } from './plugins/with-mind.board';
7
- import { NodeActiveGenerator } from './generators/node-active.generator';
8
- import { CommonElementFlavour, ImageGenerator, TextManage } from '@plait/common';
9
- import { NodeShapeGenerator } from './generators/node-shape.generator';
10
- import { ImageData } from './interfaces';
11
- import { NodeMoreGenerator } from './generators/node-more.generator';
12
- export declare class MindNodeComponent extends CommonElementFlavour<MindElement, PlaitMindBoard> implements OnContextChanged<MindElement, PlaitMindBoard> {
13
- roughSVG: RoughSVG;
14
- node: MindNode;
15
- index: number;
16
- shapeG: SVGGElement | null;
17
- linkLineG?: SVGGElement;
18
- nodeEmojisGenerator: NodeEmojisGenerator;
19
- nodeShapeGenerator: NodeShapeGenerator;
20
- imageGenerator: ImageGenerator<MindElement<ImageData>>;
21
- activeGenerator: NodeActiveGenerator;
22
- nodeMoreGenerator: NodeMoreGenerator;
23
- get textManage(): TextManage;
24
- constructor();
25
- initializeGenerator(): void;
26
- initialize(): void;
27
- onContextChanged(value: PlaitPluginElementContext<MindElement, PlaitMindBoard>, previous: PlaitPluginElementContext<MindElement, PlaitMindBoard>): void;
28
- drawEmojis(): void;
29
- drawLink(): void;
30
- drawTopic(): void;
31
- updateTopic(): void;
32
- trackBy: (index: number, node: MindNode) => string;
33
- destroy(): void;
34
- }
@@ -1,11 +0,0 @@
1
- import { PlaitMind } from './interfaces/element';
2
- import { MindNode } from './interfaces/node';
3
- import { BeforeContextChange, PlaitPluginElementContext } from '@plait/core';
4
- import { MindNodeComponent } from './mind-node.component';
5
- export declare class PlaitMindComponent extends MindNodeComponent implements BeforeContextChange<PlaitMind> {
6
- root: MindNode;
7
- initialize(): void;
8
- beforeContextChange(value: PlaitPluginElementContext<PlaitMind>): void;
9
- updateMindLayout(element?: import("./interfaces/element").MindElement<import("@plait/mind").BaseData>): void;
10
- updateMindNodeLocation(element: PlaitMind): void;
11
- }
@@ -1,16 +0,0 @@
1
- import { PlaitOptionsBoard } from '@plait/core';
2
- import { MindElement } from '../interfaces/element';
3
- import { AbstractNode } from '@plait/layouts';
4
- export declare enum AbstractHandlePosition {
5
- start = "start",
6
- end = "end"
7
- }
8
- export declare enum AbstractResizeState {
9
- start = "start",
10
- resizing = "resizing",
11
- end = "end"
12
- }
13
- export interface PlaitAbstractBoard extends PlaitOptionsBoard {
14
- onAbstractResize?: (state: AbstractResizeState) => void;
15
- }
16
- export type AbstractRefs = Map<MindElement, Pick<AbstractNode, 'start' | 'end'>>;
@@ -1,2 +0,0 @@
1
- import { PlaitPlugin } from '@plait/core';
2
- export declare const withAbstract: PlaitPlugin;
@@ -1,9 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { PlaitMindBoard } from './with-mind.board';
3
- import { TextManage } from '@plait/common';
4
- export interface FakeCreateNodeRef {
5
- g: SVGGElement;
6
- nodeG: SVGGElement;
7
- textManage: TextManage;
8
- }
9
- export declare const withCreateMind: (board: PlaitBoard) => PlaitBoard & PlaitMindBoard;
@@ -1,3 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { PlaitMindBoard } from './with-mind.board';
3
- export declare const withMindExtend: (board: PlaitBoard) => PlaitBoard & PlaitMindBoard;
@@ -1,5 +0,0 @@
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,3 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { PlaitMindBoard } from './with-mind.board';
3
- export declare const withMindHotkey: (baseBoard: PlaitBoard) => PlaitBoard & PlaitMindBoard;
@@ -1,3 +0,0 @@
1
- import { PlaitAbstractBoard } from './with-abstract-resize.board';
2
- export interface PlaitMindBoard extends PlaitAbstractBoard {
3
- }
@@ -1,2 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- export declare const withMind: (baseBoard: PlaitBoard) => PlaitBoard & import("../emoji/with-emoji").PlaitMindEmojiBoard;
@@ -1,2 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- export declare const withNodeDnd: (board: PlaitBoard) => PlaitBoard;
@@ -1,2 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- export declare const withNodeImageResize: (board: PlaitBoard) => PlaitBoard;
@@ -1,2 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- export declare const withNodeImage: (board: PlaitBoard) => PlaitBoard;
@@ -1,14 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { MindElement } from '../interfaces';
3
- export interface NodeMoreRef {
4
- target: MindElement;
5
- isHit: boolean;
6
- isHitAwarenessRectangle: boolean;
7
- isHitCollapseArea: boolean;
8
- isHitExpandArea: boolean;
9
- isHitAddArea: boolean;
10
- isHitStandardLeftAddArea: boolean;
11
- isHitStandardLeftAwarenessRectangle: boolean;
12
- }
13
- export declare const isSameNodeMoreRef: (ref1: NodeMoreRef | null, ref2: NodeMoreRef | null) => boolean;
14
- export declare const withNodeMore: (board: PlaitBoard) => PlaitBoard;
@@ -1,6 +0,0 @@
1
- import { PlaitBoard, Point, RectangleClient } from '@plait/core';
2
- import { MindElement } from '../interfaces/element';
3
- import { PlaitMindBoard } from './with-mind.board';
4
- export declare const withNodeResize: (board: PlaitBoard) => PlaitBoard;
5
- export declare const getSelectedTarget: (board: PlaitMindBoard, point: Point) => MindElement<import("@plait/mind").BaseData> | null;
6
- export declare const getResizeActiveRectangle: (board: PlaitBoard, element: MindElement) => RectangleClient;
package/public-api.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export * from './mind.component';
2
- export * from './mind-node.component';
3
- export * from './utils';
4
- export * from './interfaces';
5
- export * from './plugins/with-mind';
6
- export * from './plugins/with-mind-extend';
7
- export * from './constants';
8
- export * from './queries/index';
9
- export * from './transforms/index';
10
- export * from './emoji';
11
- export * from './plugins/with-mind.board';
12
- export * from './plugins/with-abstract-resize.board';
@@ -1,4 +0,0 @@
1
- import { MindElement } from '../interfaces';
2
- import { MindLayoutType } from '@plait/layouts';
3
- import { PlaitBoard } from '@plait/core';
4
- export declare const getAvailableSubLayoutsByElement: (board: PlaitBoard, element: MindElement) => MindLayoutType[] | undefined;
@@ -1,4 +0,0 @@
1
- import { MindElement } from '../interfaces';
2
- import { MindLayoutType } from '@plait/layouts';
3
- import { PlaitBoard } from '@plait/core';
4
- export declare const getBranchLayouts: (board: PlaitBoard, element: MindElement) => MindLayoutType[];
@@ -1,10 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { MindElement } from '../interfaces';
3
- import { MindLayoutType } from '@plait/layouts';
4
- /**
5
- * get correctly layout:
6
- * 1. root is standard -> left or right
7
- * 2. correct layout by incorrect layout direction
8
- * @param element
9
- */
10
- export declare const getCorrectLayoutByElement: (board: PlaitBoard, element: MindElement) => MindLayoutType;
@@ -1,3 +0,0 @@
1
- import { MindElement } from '../interfaces';
2
- import { MindLayoutType } from '@plait/layouts';
3
- export declare const getLayoutByElement: (element: MindElement) => MindLayoutType;
@@ -1,6 +0,0 @@
1
- export declare const MindQueries: {
2
- getAvailableSubLayoutsByElement: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement) => import("@plait/layouts").MindLayoutType[] | undefined;
3
- getBranchLayouts: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement) => import("@plait/layouts").MindLayoutType[];
4
- getLayoutByElement: (element: import("@plait/mind").MindElement) => import("@plait/layouts").MindLayoutType;
5
- getCorrectLayoutByElement: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement) => import("@plait/layouts").MindLayoutType;
6
- };
@@ -1,6 +0,0 @@
1
- import { PlaitBoard, PlaitElement } from '@plait/core';
2
- import { AbstractRefs } from '../plugins/with-abstract-resize.board';
3
- import { MindElement } from '../interfaces/element';
4
- export declare const setAbstractsByRefs: (board: PlaitBoard, abstractRefs: AbstractRefs) => void;
5
- export declare const setAbstractByStandardLayout: (board: PlaitBoard, element: MindElement) => void;
6
- export declare const insertAbstract: (board: PlaitBoard, elements: PlaitElement[]) => void;
@@ -1,6 +0,0 @@
1
- import { MindElement } from '../interfaces/element';
2
- import { PlaitBoard } from '@plait/core';
3
- import { EmojiData, EmojiItem } from '../interfaces/element-data';
4
- export declare const addEmoji: (board: PlaitBoard, element: MindElement, emojiItem: EmojiItem) => void;
5
- export declare const removeEmoji: (board: PlaitBoard, element: MindElement<EmojiData>, emojiItem: EmojiItem) => void;
6
- export declare const replaceEmoji: (board: PlaitBoard, element: MindElement<EmojiData>, oldEmoji: EmojiItem, newEmoji: EmojiItem) => void;
@@ -1,5 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { ImageData, MindElement } from '../interfaces';
3
- import { CommonImageItem } from '@plait/common';
4
- export declare const removeImage: (board: PlaitBoard, element: MindElement<ImageData>) => void;
5
- export declare const setImage: (board: PlaitBoard, element: MindElement, imageItem: CommonImageItem) => void;
@@ -1,23 +0,0 @@
1
- export declare const MindTransforms: {
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;
7
- setTopic: (board: import("@plait/mind").PlaitMindBoard, element: import("@plait/mind").MindElement, topic?: import("slate").Element) => void;
8
- setNodeManualWidth: (board: import("@plait/mind").PlaitMindBoard, element: import("@plait/mind").MindElement, width: number) => void;
9
- addEmoji: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement, emojiItem: import("@plait/mind").EmojiItem) => void;
10
- removeEmoji: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement<import("@plait/mind").EmojiData>, emojiItem: import("@plait/mind").EmojiItem) => void;
11
- replaceEmoji: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement<import("@plait/mind").EmojiData>, oldEmoji: import("@plait/mind").EmojiItem, newEmoji: import("@plait/mind").EmojiItem) => void;
12
- insertAbstract: (board: import("@plait/core").PlaitBoard, elements: import("@plait/core").PlaitElement[]) => void;
13
- setAbstractsByRefs: (board: import("@plait/core").PlaitBoard, abstractRefs: import("@plait/mind").AbstractRefs) => void;
14
- setAbstractByStandardLayout: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement) => void;
15
- insertNodes: (board: import("@plait/core").PlaitBoard, elements: import("@plait/mind").MindElement[], path: import("slate").Path) => void;
16
- insertAbstractNodes: (board: import("@plait/core").PlaitBoard, validAbstractRefs: import("@plait/mind").AbstractRef[], elements: import("@plait/mind").MindElement[], path: import("slate").Path) => void;
17
- setRightNodeCountByRefs: (board: import("@plait/core").PlaitBoard, refs: import("@plait/mind").RightNodeCountRef[]) => void;
18
- removeImage: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement<import("@plait/mind").ImageData>) => void;
19
- setImage: (board: import("@plait/core").PlaitBoard, element: import("@plait/mind").MindElement, imageItem: import("@plait/common").CommonImageItem) => void;
20
- insertChildNode: (board: import("@plait/mind").PlaitMindBoard, element: import("@plait/mind").MindElement) => void;
21
- insertSiblingNode: (board: import("@plait/mind").PlaitMindBoard, element: import("@plait/mind").MindElement) => void;
22
- insertMind: (board: import("@plait/mind").PlaitMindBoard, mind: import("@plait/mind").MindElement) => void;
23
- };
@@ -1,3 +0,0 @@
1
- import { PlaitBoard, Path } from '@plait/core';
2
- import { MindLayoutType } from '@plait/layouts';
3
- export declare const correctLogicLayoutNode: (board: PlaitBoard, layout: MindLayoutType, path: Path) => void;
@@ -1,14 +0,0 @@
1
- import { Element, Path } from 'slate';
2
- import { MindElement } from '../interfaces/element';
3
- import { PlaitBoard } from '@plait/core';
4
- import { AbstractRef } from '../utils/abstract/common';
5
- import { RightNodeCountRef } from '../utils/node/right-node-count';
6
- import { PlaitMindBoard } from '../plugins/with-mind.board';
7
- export declare const setTopic: (board: PlaitMindBoard, element: MindElement, topic?: Element) => void;
8
- export declare const setNodeManualWidth: (board: PlaitMindBoard, element: MindElement, width: number) => void;
9
- export declare const insertNodes: (board: PlaitBoard, elements: MindElement[], path: Path) => void;
10
- export declare const insertAbstractNodes: (board: PlaitBoard, validAbstractRefs: AbstractRef[], elements: MindElement[], path: Path) => void;
11
- export declare const setRightNodeCountByRefs: (board: PlaitBoard, refs: RightNodeCountRef[]) => void;
12
- export declare const insertChildNode: (board: PlaitMindBoard, element: MindElement) => void;
13
- export declare const insertSiblingNode: (board: PlaitMindBoard, element: MindElement) => void;
14
- export declare const insertMind: (board: PlaitMindBoard, mind: MindElement) => void;
@@ -1,8 +0,0 @@
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;
@@ -1,30 +0,0 @@
1
- import { AbstractNode } from '@plait/layouts';
2
- import { MindElement } from '../../interfaces/element';
3
- import { Path, PlaitBoard, PlaitElement } from '@plait/core';
4
- export declare const separateChildren: (parentElement: MindElement) => {
5
- leftChildren: MindElement<import("@plait/mind").BaseData>[];
6
- rightChildren: MindElement<import("@plait/mind").BaseData>[];
7
- };
8
- export declare const isSetAbstract: (element: PlaitElement) => boolean;
9
- export declare const canSetAbstract: (element: PlaitElement) => boolean;
10
- export declare const getCorrespondingAbstract: (element: MindElement) => MindElement<import("@plait/mind").BaseData> | undefined;
11
- export declare const getBehindAbstracts: (element: MindElement) => MindElement<import("@plait/mind").BaseData>[];
12
- /**
13
- * return corresponding abstract that is not child of elements
14
- */
15
- export declare const getOverallAbstracts: (board: PlaitBoard, elements: MindElement[]) => (MindElement & AbstractNode)[];
16
- export interface AbstractRef {
17
- abstract: MindElement & AbstractNode;
18
- references: MindElement[];
19
- }
20
- /**
21
- * abstract node is valid when elements contains at least one element it is referenced with
22
- */
23
- export declare const getValidAbstractRefs: (board: PlaitBoard, elements: MindElement[]) => AbstractRef[];
24
- export declare function getRelativeStartEndByAbstractRef(abstractRef: AbstractRef, elements: MindElement[]): {
25
- start: number;
26
- end: number;
27
- };
28
- export declare const insertElementHandleAbstract: (board: PlaitBoard, path: Path, step?: number, isExtendPreviousNode?: boolean, effectedAbstracts?: Map<MindElement<import("@plait/mind").BaseData>, Pick<AbstractNode, "start" | "end">>) => Map<MindElement<import("@plait/mind").BaseData>, Pick<AbstractNode, "start" | "end">>;
29
- export declare const deleteElementHandleAbstract: (board: PlaitBoard, deletableElements: MindElement[], effectedAbstracts?: Map<MindElement<import("@plait/mind").BaseData>, Pick<AbstractNode, "start" | "end">>) => Map<MindElement<import("@plait/mind").BaseData>, Pick<AbstractNode, "start" | "end">>;
30
- export declare const isChildOfAbstract: (board: PlaitBoard, element: MindElement) => boolean;