@plait/draw 0.82.0 → 0.83.1
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/constants/line.d.ts +3 -3
- package/constants/pointer.d.ts +1 -0
- package/fesm2022/plait-draw.mjs +595 -521
- package/fesm2022/plait-draw.mjs.map +1 -1
- package/package.json +1 -1
- package/plugins/arrow-line/with-arrow-line-auto-complete.d.ts +6 -1
- package/utils/arrow-line/arrow-line-basic.d.ts +1 -1
- package/utils/hit.d.ts +1 -1
- package/utils/shape.d.ts +5 -1
- package/utils/swimlane.d.ts +2 -1
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { PlaitBoard } from '@plait/core';
|
|
2
|
-
import { PlaitArrowLine } from '../../interfaces';
|
|
2
|
+
import { PlaitArrowLine, PlaitGeometry } from '../../interfaces';
|
|
3
3
|
export declare const WithArrowLineAutoCompletePluginKey = "plait-arrow-line-auto-complete-plugin-key";
|
|
4
4
|
export interface ArrowLineAutoCompleteOptions {
|
|
5
5
|
afterComplete: (element: PlaitArrowLine) => {};
|
|
6
6
|
}
|
|
7
|
+
export type PreCommitRef = {
|
|
8
|
+
temporaryArrowLineElement: PlaitArrowLine;
|
|
9
|
+
temporaryShapeElement: PlaitGeometry;
|
|
10
|
+
};
|
|
11
|
+
export declare const BOARD_TO_PRE_COMMIT: WeakMap<PlaitBoard, PreCommitRef>;
|
|
7
12
|
export declare const withArrowLineAutoComplete: (board: PlaitBoard) => PlaitBoard;
|
|
@@ -10,4 +10,4 @@ export declare const getHitConnectorPoint: (point: Point, hitElement: PlaitShape
|
|
|
10
10
|
export declare const getArrowLineTextRectangle: (board: PlaitBoard, element: PlaitArrowLine, index: number) => RectangleClient;
|
|
11
11
|
export declare const getArrowLines: (board: PlaitBoard) => PlaitArrowLine[];
|
|
12
12
|
export declare const Q2C: (points: Point[]) => Point[];
|
|
13
|
-
export declare const handleArrowLineCreating: (board: PlaitBoard, lineShape: ArrowLineShape, sourcePoint: Point, movingPoint: Point, sourceElement: PlaitShapeElement | null, lineShapeG: SVGGElement) => PlaitArrowLine;
|
|
13
|
+
export declare const handleArrowLineCreating: (board: PlaitBoard, lineShape: ArrowLineShape, sourcePoint: Point, movingPoint: Point, sourceElement: PlaitShapeElement | null, lineShapeG: SVGGElement, options?: Pick<PlaitArrowLine, "strokeColor" | "strokeWidth">) => PlaitArrowLine;
|
package/utils/hit.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const isRectangleHitRotatedPoints: (rectangle: RectangleClient, p
|
|
|
16
16
|
export declare const getHitDrawElement: (board: PlaitBoard, elements: (PlaitDrawElement | PlaitCustomGeometry)[]) => PlaitElement;
|
|
17
17
|
export declare const getFirstFilledDrawElement: (board: PlaitBoard, elements: (PlaitDrawElement | PlaitCustomGeometry)[]) => PlaitGeometry | PlaitCustomGeometry<string, Point[], string> | null;
|
|
18
18
|
export declare const isFilledDrawElement: (board: PlaitBoard, element: PlaitDrawElement | PlaitCustomGeometry) => boolean;
|
|
19
|
-
export declare const getSolidElements: (elements: PlaitElement[]) => (import("../interfaces/
|
|
19
|
+
export declare const getSolidElements: (elements: PlaitElement[]) => (import("../interfaces/line").PlaitLine | import("../interfaces").PlaitText | import("../interfaces/image").PlaitImage)[] | null;
|
|
20
20
|
export declare const isHitDrawElement: (board: PlaitBoard, element: PlaitElement, point: Point, isStrict?: boolean) => boolean | null;
|
|
21
21
|
export declare const isHitEdgeOfShape: (board: PlaitBoard, element: PlaitShapeElement, point: Point, hitDistanceBuffer: number) => boolean;
|
|
22
22
|
export declare const isInsideOfShape: (board: PlaitBoard, element: PlaitShapeElement, point: Point, hitDistanceBuffer: number) => boolean;
|
package/utils/shape.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PlaitBoard } from '@plait/core';
|
|
2
|
+
import { PlaitGeometry, PlaitShapeElement, TableSymbols } from '../interfaces';
|
|
3
|
+
import { DrawPointerType } from '../constants/pointer';
|
|
4
|
+
import { GeometryShapeGenerator, TableGenerator } from '../generators';
|
|
2
5
|
export declare const getElementShape: (value: PlaitShapeElement) => import("../interfaces").GeometryShapes | TableSymbols.table | import("../interfaces").SwimlaneSymbols;
|
|
6
|
+
export declare const getGeometryGeneratorByShape: (board: PlaitBoard, shape: DrawPointerType) => GeometryShapeGenerator | TableGenerator<PlaitGeometry>;
|
package/utils/swimlane.d.ts
CHANGED
|
@@ -34,5 +34,6 @@ export declare const createDefaultCells: (shape: SwimlaneSymbols, rows: {
|
|
|
34
34
|
}[], header: boolean) => PlaitTableCell[];
|
|
35
35
|
export declare const getSwimlaneCount: (swimlane: PlaitSwimlane) => number;
|
|
36
36
|
export declare const isSwimlaneWithHeader: (shape: SwimlaneDrawSymbols) => boolean;
|
|
37
|
+
export declare const isSwimlaneShape: (shape: SwimlaneSymbols) => boolean;
|
|
37
38
|
export declare const adjustSwimlaneShape: (shape: SwimlaneDrawSymbols) => SwimlaneSymbols;
|
|
38
|
-
export declare const isSwimlanePointers: (board: PlaitBoard) => boolean;
|
|
39
|
+
export declare const isSwimlanePointers: (board: PlaitBoard, pointer?: string) => boolean;
|