@plait/mind 0.26.0 → 0.27.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/mind",
3
- "version": "0.26.0",
3
+ "version": "0.27.0-next.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.2",
6
6
  "@angular/core": "^15.2.2"
@@ -0,0 +1,2 @@
1
+ import { PlaitBoard } from '@plait/core';
2
+ export declare const withNodeImageResize: (board: PlaitBoard) => PlaitBoard;
@@ -6,5 +6,5 @@ export declare const IS_MIND_NODE_RESIZING: WeakMap<PlaitBoard, boolean>;
6
6
  export declare const isMindNodeResizing: (board: PlaitBoard) => boolean;
7
7
  export declare const addResizing: (board: PlaitBoard, element: MindElement) => void;
8
8
  export declare const removeResizing: (board: PlaitBoard, element: MindElement) => void;
9
- export declare const getTargetElement: (board: PlaitMindBoard, point: Point) => MindElement<import("@plait/mind").BaseData> | null;
9
+ export declare const getSelectedTarget: (board: PlaitMindBoard, point: Point) => MindElement<import("@plait/mind").BaseData> | null;
10
10
  export declare const getResizeActiveRectangle: (board: PlaitBoard, element: MindElement) => RectangleClient;
@@ -21,10 +21,8 @@ $primary: #4e8afa;
21
21
  }
22
22
  }
23
23
  .slate-editable-container {
24
- cursor: default;
25
24
  min-width: 5px;
26
25
  &.editing {
27
- cursor: text;
28
26
  max-width: 34em;
29
27
  }
30
28
  }
@@ -1,11 +1,8 @@
1
1
  import { PlaitBoard, PlaitElement, Point } from '@plait/core';
2
- import { ImageItem, MindElement } from '../interfaces';
2
+ import { MindElement } from '../interfaces';
3
3
  import { Element } from 'slate';
4
4
  import { PlaitMindBoard } from '../plugins/with-mind.board';
5
- export declare const buildClipboardData: (board: PlaitBoard, selectedElements: MindElement[]) => MindElement<import("../interfaces").BaseData>[];
6
- export declare const setClipboardData: (data: DataTransfer | null, elements: MindElement[]) => void;
7
- export declare const setClipboardDataByImage: (data: DataTransfer | null, image: ImageItem) => void;
8
- export declare const getImageItemFromClipboard: (data: DataTransfer | null) => any;
9
- export declare const getDataFromClipboard: (data: DataTransfer | null) => PlaitElement[];
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;
10
7
  export declare const insertClipboardData: (board: PlaitMindBoard, elements: PlaitElement[], targetPoint: Point) => void;
11
8
  export declare const insertClipboardText: (board: PlaitMindBoard, targetParent: PlaitElement, text: string | Element) => void;
@@ -1,4 +1,5 @@
1
- import { PlaitOptionsBoard } from '@plait/core';
1
+ import { PlaitBoard, PlaitOptionsBoard } from '@plait/core';
2
2
  import { MindElement } from '../../interfaces/element';
3
3
  export declare function editTopic(element: MindElement): void;
4
4
  export declare const temporaryDisableSelection: (board: PlaitOptionsBoard) => void;
5
+ export declare const getSelectedMindElements: (board: PlaitBoard) => MindElement<import("@plait/mind").BaseData>[];
@@ -1,8 +1,9 @@
1
1
  import { PlaitBoard } from '@plait/core';
2
- import { MindElement } from '../../interfaces';
3
- export declare const getSelectedImageElement: (board: PlaitBoard) => MindElement<import("../../interfaces").BaseData> | undefined;
4
- export declare const addSelectedImageElement: (board: PlaitBoard, element: MindElement) => void;
2
+ import { MindElement } from '../../interfaces/element';
3
+ import { ImageData } from '../../interfaces/element-data';
4
+ export declare const getSelectedImageElement: (board: PlaitBoard) => MindElement<ImageData> | undefined;
5
+ export declare const addSelectedImageElement: (board: PlaitBoard, element: MindElement<ImageData>) => void;
5
6
  export declare const removeSelectedImageElement: (board: PlaitBoard) => void;
6
- export declare const setImageFocus: (board: PlaitBoard, element: MindElement, isFocus: boolean) => void;
7
+ export declare const setImageFocus: (board: PlaitBoard, element: MindElement<ImageData>, isFocus: boolean) => void;
7
8
  export declare const selectImage: (board: PlaitBoard, element: MindElement, acceptImageTypes?: string[]) => void;
8
9
  export declare const buildImage: (board: PlaitBoard, element: MindElement, imageFile: File) => Promise<void>;
@@ -1,6 +1,16 @@
1
- import { PlaitBoard, Range, RectangleClient } from '@plait/core';
1
+ import { PlaitBoard, Point, Range, RectangleClient } from '@plait/core';
2
2
  import { MindElement } from '../../interfaces/element';
3
3
  import { ImageData } from '../../interfaces/element-data';
4
4
  import { PlaitMindBoard } from '../../plugins/with-mind.board';
5
5
  export declare function getImageForeignRectangle(board: PlaitMindBoard, element: MindElement<ImageData>): RectangleClient;
6
6
  export declare const isHitImage: (board: PlaitBoard, element: MindElement<ImageData>, range: Range) => 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
+ direction: import("@plait/common").ResizeDirection;
15
+ cursorClass: import("@plait/common").ResizeCursorClass;
16
+ } | undefined;