@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,23 +0,0 @@
1
- import { PlaitBoard, Point, RectangleClient } from '@plait/core';
2
- import { MindElement } from '../../interfaces';
3
- import { LayoutNode } from '@plait/layouts';
4
- import { AbstractHandlePosition } from '../../plugins/with-abstract-resize.board';
5
- export declare const getRectangleByResizingLocation: (abstractRectangle: RectangleClient, location: number, activeHandlePosition: AbstractHandlePosition, isHorizontal: boolean) => {
6
- y: number;
7
- height: number;
8
- x: number;
9
- width: number;
10
- };
11
- export declare const getLocationScope: (board: PlaitBoard, handlePosition: AbstractHandlePosition, parentChildren: MindElement[], element: MindElement, parent: LayoutNode, isHorizontal: boolean) => {
12
- max: number;
13
- min: number;
14
- };
15
- export declare const getHitAbstractHandle: (board: PlaitBoard, element: MindElement, point: Point) => AbstractHandlePosition | undefined;
16
- export declare const getAbstractHandleRectangle: (rectangle: RectangleClient, isHorizontal: boolean, position: AbstractHandlePosition) => {
17
- y: number;
18
- height: number;
19
- x: number;
20
- width: number;
21
- };
22
- export declare function findLocationLeftIndex(board: PlaitBoard, parentChildren: MindElement[], location: number, isHorizontal: boolean): number;
23
- export declare function handleTouchedAbstract(board: PlaitBoard, touchedAbstract: MindElement | undefined, endPoint: Point): MindElement<import("../../interfaces").BaseData> | undefined;
@@ -1,7 +0,0 @@
1
- import { PlaitBoard, PlaitElement, Point, WritableClipboardOperationType } from '@plait/core';
2
- import { MindElement } from '../interfaces';
3
- import { Element } from 'slate';
4
- import { PlaitMindBoard } from '../plugins/with-mind.board';
5
- export declare const buildClipboardData: (board: PlaitBoard, selectedElements: MindElement[], startPoint: Point) => MindElement<import("../interfaces").BaseData>[];
6
- export declare const insertClipboardData: (board: PlaitMindBoard, elements: PlaitElement[], targetPoint: Point, operationType?: WritableClipboardOperationType) => void;
7
- export declare const insertClipboardText: (board: PlaitMindBoard, targetParent: PlaitElement, text: string | Element) => void;
package/utils/common.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- export declare const MIND_CENTRAL_TEXT = "\u4E2D\u5FC3\u4E3B\u9898";
3
- export declare const ABSTRACT_NODE_TEXT = "\u6982\u8981";
4
- export declare const getDefaultMindNameText: (board: PlaitBoard) => string;
5
- export declare const getAbstractNodeText: (board: PlaitBoard) => string;
@@ -1,17 +0,0 @@
1
- import { MindElement } from '../../interfaces/element';
2
- import { Path, PlaitBoard } from '@plait/core';
3
- import { DetectResult } from '../../interfaces/node';
4
- export declare const addActiveOnDragOrigin: (activeElement: MindElement) => void;
5
- export declare const removeActiveOnDragOrigin: (activeElement: MindElement) => void;
6
- export declare const setMindDragging: (board: PlaitBoard, state: boolean) => void;
7
- export declare const hasPreviousOrNextOfDropPath: (parent: MindElement, dropTarget: {
8
- target: MindElement;
9
- detectResult: DetectResult;
10
- }, dropPath: Path) => {
11
- hasPreviousNode: boolean;
12
- hasNextNode: boolean;
13
- };
14
- export declare const isDropStandardRight: (parent: MindElement, dropTarget: {
15
- target: MindElement;
16
- detectResult: DetectResult;
17
- }) => boolean;
@@ -1,18 +0,0 @@
1
- import { MindElement } from '../../interfaces/element';
2
- import { PlaitBoard, Point, Path } from '@plait/core';
3
- import { DetectResult, MindNode } from '../../interfaces/node';
4
- export declare const directionCorrector: (board: PlaitBoard, node: MindNode, detectResults: DetectResult[]) => DetectResult[] | null;
5
- export declare const getAllowedDirection: (detectResults: DetectResult[], illegalDirections: DetectResult[]) => DetectResult[] | null;
6
- export declare const detectDropTarget: (board: PlaitBoard, detectPoint: Point, dropTarget: {
7
- target: MindElement;
8
- detectResult: DetectResult;
9
- } | null, activeElements: MindElement[]) => {
10
- target: MindElement;
11
- detectResult: DetectResult;
12
- } | null;
13
- export declare const directionDetector: (targetNode: MindNode, centerPoint: Point) => DetectResult[] | null;
14
- export declare const isValidTarget: (origin: MindElement, target: MindElement) => boolean;
15
- export declare const getPathByDropTarget: (board: PlaitBoard, dropTarget: {
16
- target: MindElement;
17
- detectResult: DetectResult;
18
- }) => Path;
@@ -1,12 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { RoughSVG } from 'roughjs/bin/svg';
3
- import { MindElement } from '../../interfaces';
4
- import { AbstractHandlePosition } from '../../plugins/with-abstract-resize.board';
5
- import { Options } from 'roughjs/bin/core';
6
- export declare function drawAbstractIncludedOutline(board: PlaitBoard, roughSVG: RoughSVG, element: MindElement, activeHandlePosition?: AbstractHandlePosition, resizingLocation?: number): SVGGElement;
7
- export declare function getHandleOption(isHover: boolean): {
8
- stroke: string;
9
- strokeWidth: number;
10
- fillStyle: string;
11
- };
12
- export declare function drawAbstractRoundRectangle(rs: RoughSVG, x1: number, y1: number, x2: number, y2: number, isHorizontal: boolean, options: Options): SVGGElement;
@@ -1,7 +0,0 @@
1
- import { DetectResult, MindElement } from '../../interfaces';
2
- import { PlaitBoard, Path } from '@plait/core';
3
- export declare const drawFakeDragNode: (board: PlaitBoard, element: MindElement, offsetX: number, offsetY: number) => SVGGElement;
4
- export declare const drawFakeDropNode: (board: PlaitBoard, dropTarget: {
5
- target: MindElement;
6
- detectResult: DetectResult;
7
- }, path: Path) => SVGGElement;
@@ -1,3 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { MindNode } from '../../../interfaces/node';
3
- export declare function drawAbstractLink(board: PlaitBoard, node: MindNode, isHorizontal: boolean): SVGGElement;
@@ -1,4 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { MindNode } from '../../../interfaces/node';
3
- import { StrokeStyle } from '@plait/common';
4
- export declare function drawLink(board: PlaitBoard, parentNode: MindNode, node: MindNode, isHorizontal: boolean, needDrawUnderline?: boolean, defaultStrokeColor?: string, defaultStrokeWidth?: number, defaultStrokeStyle?: StrokeStyle): SVGGElement;
@@ -1,4 +0,0 @@
1
- import { MindNode } from '../../../interfaces/node';
2
- import { PlaitBoard } from '@plait/core';
3
- import { StrokeStyle } from '@plait/common';
4
- export declare function drawIndentedLink(board: PlaitBoard, parent: MindNode, child: MindNode, needDrawUnderline?: boolean, defaultStrokeColor?: string | null, defaultStrokeWidth?: number, defaultStrokeStyle?: StrokeStyle): SVGGElement;
@@ -1,4 +0,0 @@
1
- import { MindNode } from '../../../interfaces/node';
2
- import { PlaitBoard } from '@plait/core';
3
- import { StrokeStyle } from '@plait/common';
4
- export declare function drawLogicLink(board: PlaitBoard, parent: MindNode, node: MindNode, isHorizontal: boolean, defaultStrokeColor?: string | null, defaultStrokeWidth?: number, defaultStrokeStyle?: StrokeStyle): SVGGElement;
@@ -1,5 +0,0 @@
1
- import { MindNode } from '../../interfaces/node';
2
- import { PlaitBoard, RectangleClient } from '@plait/core';
3
- import { MindElement } from '../../interfaces';
4
- export declare function drawRoundRectangleByNode(board: PlaitBoard, node: MindNode): SVGGElement;
5
- export declare function drawRoundRectangleByElement(board: PlaitBoard, nodeRectangle: RectangleClient, element: MindElement): SVGGElement;
package/utils/index.d.ts DELETED
@@ -1,16 +0,0 @@
1
- export * from './position';
2
- export * from './weak-maps';
3
- export * from './mind';
4
- export * from './layout';
5
- export * from './node';
6
- export * from './node-style';
7
- export * from './dnd/common';
8
- export * from './dnd/detector';
9
- export * from './draw/node-dnd';
10
- export * from './abstract/common';
11
- export * from './abstract/resize';
12
- export * from './node/right-node-count';
13
- export * from './space/node-space';
14
- export * from './space';
15
- export * from './path';
16
- export * from './common';
package/utils/layout.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import { LayoutDirection, MindElement } from '../interfaces';
2
- import { MindLayoutType } from '@plait/layouts';
3
- export declare const getBranchDirectionsByLayouts: (branchLayouts: MindLayoutType[]) => LayoutDirection[];
4
- export declare const isCorrectLayout: (root: MindElement, layout: MindLayoutType) => boolean;
5
- export declare const isMixedLayout: (parentLayout: MindLayoutType, layout: MindLayoutType) => boolean;
6
- export declare const getInCorrectLayoutDirection: (rootLayout: MindLayoutType, layout: MindLayoutType) => LayoutDirection | undefined;
7
- export declare const correctLayoutByDirection: (layout: MindLayoutType, direction: LayoutDirection) => MindLayoutType;
8
- export declare const getLayoutDirection: (root: MindElement) => LayoutDirection[];
9
- export declare const getDefaultLayout: () => MindLayoutType;
10
- export declare const getAvailableSubLayoutsByLayoutDirections: (directions: LayoutDirection[]) => MindLayoutType[];
11
- export declare const getLayoutReverseDirection: (layoutDirection: LayoutDirection) => LayoutDirection;
12
- export declare const getRootLayout: (root: MindElement) => MindLayoutType;
package/utils/mind.d.ts DELETED
@@ -1,17 +0,0 @@
1
- import { Path } from '@plait/core';
2
- import { MindElement } from '../interfaces/element';
3
- import { MindNode } from '../interfaces/node';
4
- import { PlaitMindBoard } from '../plugins/with-mind.board';
5
- export declare const getChildrenCount: (element: MindElement) => number;
6
- export declare const isChildElement: (origin: MindElement, child: MindElement) => boolean;
7
- export declare const getFirstLevelElement: (elements: MindElement[]) => MindElement<import("@plait/mind").BaseData>[];
8
- export declare const isChildRight: (parent: MindNode, child: MindNode) => boolean;
9
- export declare const isChildUp: (parent: MindNode, child: MindNode) => boolean;
10
- export declare const copyNewNode: (node: MindElement) => MindElement<import("@plait/mind").BaseData>;
11
- export declare const insertMindElement: (board: PlaitMindBoard, inheritNode: MindElement, path: Path) => void;
12
- export declare const findLastChild: (child: MindNode) => MindNode;
13
- export declare const divideElementByParent: (elements: MindElement[]) => {
14
- parentElements: MindElement<import("@plait/mind").BaseData>[];
15
- abstractIncludedGroups: MindElement<import("@plait/mind").BaseData>[][];
16
- };
17
- export declare const getDefaultFontSizeForMindElement: (element: MindElement) => 18 | 14;
@@ -1,6 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { MindElement } from '../../interfaces/element';
3
- import { PlaitMindBoard } from '../../plugins/with-mind.board';
4
- export declare const adjustRootToNode: (board: PlaitBoard, node: MindElement) => MindElement<import("@plait/mind").BaseData>;
5
- export declare const adjustAbstractToNode: (node: MindElement) => MindElement<import("@plait/mind").BaseData>;
6
- export declare const adjustNodeToRoot: (board: PlaitMindBoard, node: MindElement) => MindElement;
@@ -1,4 +0,0 @@
1
- import { PlaitBoard, PlaitElement } from '@plait/core';
2
- import { MindElement } from '../../interfaces/element';
3
- export declare function editTopic(element: MindElement): void;
4
- export declare const getSelectedMindElements: (board: PlaitBoard, elements?: PlaitElement[]) => MindElement[];
@@ -1,18 +0,0 @@
1
- import { PlaitBoard, Point } from '@plait/core';
2
- import { MindLayoutType } from '@plait/layouts';
3
- import { BranchShape, MindElement, MindElementShape } from '../../interfaces/element';
4
- import { Element } from 'slate';
5
- export declare const createEmptyMind: (board: PlaitBoard, point: Point) => MindElement<import("@plait/mind").BaseData>;
6
- export declare const createMindElement: (text: string | Element, options: InheritAttribute) => MindElement<import("@plait/mind").BaseData>;
7
- export interface InheritAttribute {
8
- fill?: string;
9
- strokeColor?: string;
10
- strokeWidth?: number;
11
- strokeStyle?: number;
12
- shape?: MindElementShape;
13
- layout?: MindLayoutType;
14
- branchColor?: string;
15
- branchWidth?: number;
16
- branchShape?: BranchShape;
17
- }
18
- export declare const INHERIT_ATTRIBUTE_KEYS: string[];
@@ -1,7 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { MindElement } from '../../interfaces/element';
3
- /**
4
- * 1. return new node height if height changed
5
- * 2. new height is effected by zoom
6
- */
7
- export declare const getNewNodeHeight: (board: PlaitBoard, element: MindElement, newNodeDynamicWidth: number) => number | undefined;
@@ -1,5 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { MindElement } from '../../interfaces/element';
3
- import { ImageData } from '../../interfaces/element-data';
4
- export declare const addImageFocus: (board: PlaitBoard, element: MindElement<ImageData>) => void;
5
- export declare const removeImageFocus: (board: PlaitBoard, element: MindElement<ImageData>) => void;
@@ -1,5 +0,0 @@
1
- export * from './adjust-node';
2
- export * from './create-node';
3
- export * from './common';
4
- export * from './image';
5
- export * from './dynamic-width';
@@ -1,9 +0,0 @@
1
- import { Path, PlaitBoard } from '@plait/core';
2
- import { MindElement } from '../../interfaces/element';
3
- export declare const isInRightBranchOfStandardLayout: (selectedElement: MindElement) => boolean;
4
- export interface RightNodeCountRef {
5
- path: Path;
6
- rightNodeCount: number;
7
- }
8
- export declare const insertElementHandleRightNodeCount: (board: PlaitBoard, path: Path, insertCount: number, effectedRightNodeCount?: RightNodeCountRef[]) => RightNodeCountRef[];
9
- export declare const deleteElementsHandleRightNodeCount: (board: PlaitBoard, deletableElements: MindElement[], effectedRightNodeCount?: RightNodeCountRef[]) => RightNodeCountRef[];
@@ -1,15 +0,0 @@
1
- /**
2
- * Processing of branch color, width, style, etc. of the mind node
3
- */
4
- import { PlaitBoard } from '@plait/core';
5
- import { MindElement } from '../../interfaces/element';
6
- import { MindThemeColor } from '../../interfaces/theme-color';
7
- export declare const getBranchColorByMindElement: (board: PlaitBoard, element: MindElement) => any;
8
- export declare const getBranchShapeByMindElement: (board: PlaitBoard, element: MindElement) => any;
9
- export declare const getBranchWidthByMindElement: (board: PlaitBoard, element: MindElement) => any;
10
- export declare const getAbstractBranchWidth: (board: PlaitBoard, element: MindElement) => number;
11
- export declare const getAbstractBranchColor: (board: PlaitBoard, element: MindElement) => string | undefined;
12
- export declare const getNextBranchColor: (board: PlaitBoard, root: MindElement) => string;
13
- export declare const getDefaultBranchColor: (board: PlaitBoard, element: MindElement) => string;
14
- export declare const getDefaultBranchColorByIndex: (board: PlaitBoard, index: number) => string;
15
- export declare const getMindThemeColor: (board: PlaitBoard) => MindThemeColor;
@@ -1,3 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { MindElement } from '../../interfaces/element';
3
- export declare const getAvailableProperty: (board: PlaitBoard, element: MindElement, propertyKey: keyof MindElement) => any;
@@ -1,3 +0,0 @@
1
- export * from './branch';
2
- export * from './shape';
3
- export * from './shape';
@@ -1,8 +0,0 @@
1
- import { PlaitBoard } from '@plait/core';
2
- import { MindElement, MindElementShape } from '../../interfaces/element';
3
- import { StrokeStyle } from '@plait/common';
4
- export declare const getStrokeColorByElement: (board: PlaitBoard, element: MindElement) => any;
5
- export declare const getStrokeStyleByElement: (board: PlaitBoard, element: MindElement) => StrokeStyle;
6
- export declare const getStrokeWidthByElement: (board: PlaitBoard, element: MindElement) => number;
7
- export declare const getFillByElement: (board: PlaitBoard, element: MindElement) => string;
8
- export declare const getShapeByElement: (board: PlaitBoard, element: MindElement) => MindElementShape;
@@ -1,3 +0,0 @@
1
- import { MindElement } from '../interfaces/element';
2
- export declare const isNormalizedData: (element: MindElement) => boolean;
3
- export declare const fixMindElementData: (element: MindElement) => void;
package/utils/path.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { PlaitBoard, PlaitElement } from '@plait/core';
2
- import { Path } from 'slate';
3
- import { PlaitMind } from '../interfaces';
4
- export declare function findNewChildNodePath(board: PlaitBoard, element: PlaitElement): number[];
5
- export declare function findNewRightChildNodePath(board: PlaitBoard, element: PlaitMind, rightNodeCount: number): number[];
6
- export declare function findNewSiblingNodePath(board: PlaitBoard, element: PlaitElement): Path;
@@ -1,12 +0,0 @@
1
- import { Point, RectangleClient } from '@plait/core';
2
- import { MindNode } from '../interfaces/node';
3
- import { LayoutDirection } from '../interfaces/layout';
4
- import { PointPlacement } from '../interfaces/types';
5
- export declare const getPointByPlacement: (client: RectangleClient, placement: PointPlacement) => Point;
6
- export interface PlacementRef {
7
- placement: PointPlacement;
8
- client: RectangleClient;
9
- }
10
- export declare const getYDistanceBetweenPoint: (point1: Point, point2: Point, isHorizontalLayout: boolean) => void;
11
- export declare const getLayoutDirection: (node: MindNode, isHorizontal: boolean) => LayoutDirection;
12
- export declare const transformPlacement: (placement: PointPlacement, direction: LayoutDirection) => void;
@@ -1,7 +0,0 @@
1
- import { PlaitBoard, Point, RectangleClient } from '@plait/core';
2
- import { MindElement } from '../../interfaces/element';
3
- import { EmojiData } from '../../interfaces/element-data';
4
- import { PlaitMindBoard } from '../../plugins/with-mind.board';
5
- export declare function getEmojiRectangle(board: PlaitMindBoard, element: MindElement<EmojiData>): RectangleClient;
6
- export declare function getEmojiForeignRectangle(board: PlaitMindBoard, element: MindElement<EmojiData>): RectangleClient;
7
- export declare const isHitEmojis: (board: PlaitBoard, element: MindElement<EmojiData>, point: Point) => boolean;
@@ -1,16 +0,0 @@
1
- import { PlaitBoard, Point, RectangleClient } from '@plait/core';
2
- import { MindElement } from '../../interfaces/element';
3
- import { ImageData } from '../../interfaces/element-data';
4
- import { PlaitMindBoard } from '../../plugins/with-mind.board';
5
- export declare function getImageForeignRectangle(board: PlaitMindBoard, element: MindElement<ImageData>): RectangleClient;
6
- export declare const isHitImage: (board: PlaitBoard, element: MindElement<ImageData>, point: Point) => boolean;
7
- export declare const getHitImageResizeHandleDirection: (board: PlaitBoard, element: MindElement<ImageData>, point: Point) => {
8
- rectangle: {
9
- x: number;
10
- y: number;
11
- width: number;
12
- height: number;
13
- };
14
- handle: import("@plait/common").ResizeHandle;
15
- cursorClass: import("@plait/core").ResizeCursorClass;
16
- } | undefined;
@@ -1,4 +0,0 @@
1
- export * from './node';
2
- export * from './emoji';
3
- export * from './topic';
4
- export * from './image';
@@ -1,12 +0,0 @@
1
- import { PlaitBoard, Point, RectangleClient } from '@plait/core';
2
- import { MindNode } from '../../interfaces/node';
3
- import { MindElement } from '../../interfaces/element';
4
- import { PlaitMindBoard } from '../../plugins/with-mind.board';
5
- export declare function getRectangleByNode(node: MindNode): RectangleClient;
6
- export declare function getRectangleByElement(board: PlaitMindBoard, element: MindElement): {
7
- x: number;
8
- y: number;
9
- width: number;
10
- height: number;
11
- };
12
- export declare function isHitMindElement(board: PlaitBoard, point: Point, element: MindElement): boolean;
@@ -1,16 +0,0 @@
1
- import { MindElement } from '../../interfaces/element';
2
- import { MindNode } from '../../interfaces/node';
3
- import { PlaitMindBoard } from '../../plugins/with-mind.board';
4
- import { RectangleClient } from '@plait/core';
5
- export declare function getTopicRectangleByNode(board: PlaitMindBoard, node: MindNode): {
6
- height: number;
7
- width: number;
8
- x: number;
9
- y: number;
10
- };
11
- export declare function getTopicRectangleByElement(board: PlaitMindBoard, nodeRectangle: RectangleClient, element: MindElement): {
12
- height: number;
13
- width: number;
14
- x: number;
15
- y: number;
16
- };
@@ -1,7 +0,0 @@
1
- import { EmojiData, MindElement } from '../../interfaces';
2
- import { PlaitMindBoard } from '../../plugins/with-mind.board';
3
- export declare function getEmojisWidthHeight(board: PlaitMindBoard, element: MindElement<EmojiData>): {
4
- width: number;
5
- height: any;
6
- };
7
- export declare function getEmojiFontSize(element: MindElement<EmojiData>): number;
@@ -1,3 +0,0 @@
1
- export * from './emoji';
2
- export * from './layout-options';
3
- export * from './node-space';
@@ -1,3 +0,0 @@
1
- import { LayoutOptions } from '@plait/layouts';
2
- import { PlaitMindBoard } from '../../plugins/with-mind.board';
3
- export declare const getLayoutOptions: (board: PlaitMindBoard) => LayoutOptions;
@@ -1,23 +0,0 @@
1
- import { MindElement } from '../../interfaces/element';
2
- import { EmojiData } from '../../interfaces/element-data';
3
- import { PlaitMindBoard } from '../../plugins/with-mind.board';
4
- import { PlaitBoard } from '@plait/core';
5
- export declare const NodeSpace: {
6
- getNodeWidth(board: PlaitMindBoard, element: MindElement): number;
7
- getNodeHeight(board: PlaitMindBoard, element: MindElement): number;
8
- getTopicDynamicWidth(board: PlaitMindBoard, element: MindElement): number;
9
- getTopicHeight(board: PlaitMindBoard, element: MindElement): number;
10
- getTopicMaxDynamicWidth(board: PlaitMindBoard, element: MindElement): number;
11
- getNodeResizableMinWidth(board: PlaitMindBoard, element: MindElement): number;
12
- getNodeTopicMinWidth(board: PlaitMindBoard, element: MindElement): number;
13
- getTextLeftSpace(board: PlaitMindBoard, element: MindElement): number;
14
- getTextTopSpace(board: PlaitMindBoard, element: MindElement): number;
15
- getImageTopSpace(board: PlaitMindBoard, element: MindElement): number;
16
- getEmojiLeftSpace(board: PlaitMindBoard, element: MindElement<EmojiData>): number;
17
- getEmojiTopSpace(board: PlaitMindBoard, element: MindElement): number;
18
- };
19
- export declare const getFontSizeByMindElement: (board: PlaitBoard, element: MindElement) => number;
20
- export declare const normalizeWidthAndHeight: (board: PlaitMindBoard, element: MindElement, width: number, height: number) => {
21
- width: number;
22
- height: number;
23
- };
@@ -1,3 +0,0 @@
1
- import { MindElement } from '../interfaces/element';
2
- import { MindNode } from '../interfaces/node';
3
- export declare const MIND_ELEMENT_TO_NODE: WeakMap<MindElement<import("@plait/mind").BaseData>, MindNode>;