@plait/draw 0.76.0 → 0.77.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/default.d.ts +4 -0
- package/constants/index.d.ts +1 -0
- package/esm2022/constants/default.mjs +6 -1
- package/esm2022/constants/index.mjs +2 -1
- package/esm2022/geometry.component.mjs +2 -3
- package/esm2022/image.component.mjs +2 -4
- package/esm2022/plugins/with-arrow-line-text.mjs +20 -8
- package/esm2022/plugins/with-draw-resize.mjs +23 -18
- package/esm2022/plugins/with-geometry-create.mjs +7 -7
- package/esm2022/plugins/with-table-resize.mjs +11 -7
- package/esm2022/plugins/with-table.mjs +8 -5
- package/esm2022/table.component.mjs +2 -3
- package/esm2022/utils/common.mjs +6 -3
- package/esm2022/utils/geometry.mjs +5 -62
- package/esm2022/utils/table-selected.mjs +1 -5
- package/esm2022/utils/table.mjs +3 -3
- package/esm2022/utils/uml.mjs +7 -5
- package/fesm2022/plait-draw.mjs +1380 -1413
- package/fesm2022/plait-draw.mjs.map +1 -1
- package/package.json +1 -1
- package/plugins/with-arrow-line-text.d.ts +1 -0
- package/plugins/with-draw-resize.d.ts +1 -0
- package/utils/common.d.ts +1 -0
- package/utils/geometry.d.ts +2 -3
- package/utils/table-selected.d.ts +0 -1
package/package.json
CHANGED
|
@@ -21,3 +21,4 @@ export declare const movePointByZoomAndOriginPoint: (p: Point, resizeOriginPoint
|
|
|
21
21
|
* 3. Reverse rotate the scaled points by 90°
|
|
22
22
|
*/
|
|
23
23
|
export declare const getResizePointsByOtherwiseAxis: (board: PlaitBoard, points: Point[], resizeOriginPoint: Point, xZoom: number, yZoom: number) => Point[];
|
|
24
|
+
export declare const generatorResizeHandles: (board: PlaitBoard, resizeActivePoints?: Point[], needCustomActiveRectangle?: boolean) => SVGGElement;
|
package/utils/common.d.ts
CHANGED
|
@@ -33,3 +33,4 @@ export declare const drawBoundReaction: (board: PlaitBoard, element: PlaitShapeE
|
|
|
33
33
|
export declare const getTextKey: (element: PlaitElement | undefined, text: Pick<DrawTextInfo, "id">) => string;
|
|
34
34
|
export declare const getGeometryAlign: (board: PlaitBoard, element: PlaitCommonGeometry | PlaitBaseTable) => Alignment;
|
|
35
35
|
export declare const isClosedPoints: (points: Point[]) => boolean;
|
|
36
|
+
export declare const getDefaultGeometryText: (board: PlaitBoard) => string;
|
package/utils/geometry.d.ts
CHANGED
|
@@ -122,12 +122,11 @@ export declare const getDefaultUMLProperty: (shape: UMLSymbols) => {
|
|
|
122
122
|
align: Alignment;
|
|
123
123
|
}[];
|
|
124
124
|
};
|
|
125
|
-
export declare const createDefaultFlowchart: (point: Point) => (PlaitGeometry | import("../interfaces").PlaitArrowLine)[];
|
|
126
125
|
export declare const getAutoCompletePoints: (board: PlaitBoard, element: PlaitShapeElement, isToActive?: boolean) => [Point, Point, Point, Point];
|
|
127
126
|
export declare const getHitIndexOfAutoCompletePoint: (movingPoint: Point, points: Point[]) => number;
|
|
128
127
|
export declare const getDrawDefaultStrokeColor: (theme: ThemeColorMode) => string;
|
|
129
128
|
export declare const getFlowchartDefaultFill: (theme: ThemeColorMode) => string;
|
|
130
|
-
export declare const getTextShapeProperty: (board: PlaitBoard, text
|
|
129
|
+
export declare const getTextShapeProperty: (board: PlaitBoard, text: string | Element, fontSize?: number | string) => {
|
|
131
130
|
width: number;
|
|
132
131
|
height: number;
|
|
133
132
|
};
|
|
@@ -137,7 +136,7 @@ export declare const getDefaultGeometryProperty: (pointer: DrawPointerType) => {
|
|
|
137
136
|
height: number;
|
|
138
137
|
};
|
|
139
138
|
export declare const getDefaultTextPoints: (board: PlaitBoard, centerPoint: Point, fontSize?: number | string) => [Point, Point];
|
|
140
|
-
export declare const createTextElement: (board: PlaitBoard, points: [Point, Point], text
|
|
139
|
+
export declare const createTextElement: (board: PlaitBoard, points: [Point, Point], text: string | Element, textHeight?: number) => PlaitGeometry;
|
|
141
140
|
export declare const createDefaultGeometry: (board: PlaitBoard, points: [Point, Point], shape: GeometryShapes) => import("../interfaces").PlaitCommonGeometry<"geometry", [Point, Point], GeometryShapes>;
|
|
142
141
|
export declare const editText: (board: PlaitBoard, element: PlaitGeometry, text?: DrawTextInfo) => void;
|
|
143
142
|
export declare const isGeometryIncludeText: (element: PlaitGeometry) => boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PlaitBoard, PlaitElement } from '@plait/core';
|
|
2
2
|
import { PlaitTableCell, PlaitBaseTable, PlaitTable } from '../interfaces/table';
|
|
3
3
|
export declare const isSingleSelectTable: (board: PlaitBoard) => boolean;
|
|
4
|
-
export declare const isSingleSelectElementByTable: (board: PlaitBoard) => boolean;
|
|
5
4
|
export declare const getSelectedTableElements: (board: PlaitBoard, elements?: PlaitElement[]) => PlaitTable[];
|
|
6
5
|
export declare const SELECTED_CELLS: WeakMap<PlaitBaseTable, PlaitTableCell[]>;
|
|
7
6
|
export declare function getSelectedCells(element: PlaitBaseTable): PlaitTableCell[] | undefined;
|