@plait/draw 0.1.0-next.4 → 0.1.0-next.5
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/interfaces/line.mjs +7 -1
- package/esm2022/plugins/with-draw-fragment.mjs +12 -6
- package/esm2022/plugins/with-draw-hotkey.mjs +2 -2
- package/esm2022/plugins/with-draw.mjs +7 -2
- package/esm2022/utils/clipboard.mjs +35 -5
- package/esm2022/utils/line.mjs +9 -3
- package/fesm2022/plait-draw.mjs +61 -9
- package/fesm2022/plait-draw.mjs.map +1 -1
- package/interfaces/line.d.ts +3 -0
- package/package.json +1 -1
- package/utils/line.d.ts +1 -0
package/interfaces/line.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PlaitElement, Point } from '@plait/core';
|
|
2
2
|
import { Element } from 'slate';
|
|
3
|
+
import { PlaitGeometry } from './geometry';
|
|
3
4
|
export declare enum LineMarkerType {
|
|
4
5
|
arrow = "arrow",
|
|
5
6
|
none = "none"
|
|
@@ -46,4 +47,6 @@ export declare const PlaitLine: {
|
|
|
46
47
|
getTextEditors(element: PlaitLine): (import("slate").BaseEditor & import("slate-angular").AngularEditor & import("slate-history").HistoryEditor)[];
|
|
47
48
|
isSourceMark(line: PlaitLine, markType: LineMarkerType): boolean;
|
|
48
49
|
isTargetMark(line: PlaitLine, markType: LineMarkerType): boolean;
|
|
50
|
+
isBoundElementOfSource(line: PlaitLine, element: PlaitGeometry): boolean;
|
|
51
|
+
isBoundElementOfTarget(line: PlaitLine, element: PlaitGeometry): boolean;
|
|
49
52
|
};
|
package/package.json
CHANGED
package/utils/line.d.ts
CHANGED
|
@@ -14,3 +14,4 @@ export declare const getConnectionPoint: (geometry: PlaitGeometry, connection: P
|
|
|
14
14
|
export declare const transformPointToConnection: (board: PlaitBoard, point: Point, hitElement: PlaitGeometry) => Point;
|
|
15
15
|
export declare const getHitConnectorPoint: (movingPoint: Point, hitElement: PlaitGeometry, rectangle: RectangleClient) => Point | undefined;
|
|
16
16
|
export declare const getLineTextRectangle: (board: PlaitBoard, element: PlaitLine, index: number) => RectangleClient;
|
|
17
|
+
export declare const getBoardLines: (board: PlaitBoard) => PlaitLine[];
|