@plait/draw 0.76.0 → 0.77.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/draw",
3
- "version": "0.76.0",
3
+ "version": "0.77.0",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
@@ -1,2 +1,3 @@
1
1
  import { PlaitBoard } from '@plait/core';
2
+ export declare const getDefaultLineText: (board: PlaitBoard) => string;
2
3
  export declare const withArrowLineText: (board: PlaitBoard) => PlaitBoard;
@@ -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;
@@ -67,6 +67,9 @@ export declare const getDefaultUMLProperty: (shape: UMLSymbols) => {
67
67
  } | {
68
68
  width: number;
69
69
  height: number;
70
+ } | {
71
+ width: number;
72
+ height: number;
70
73
  } | {
71
74
  width: number;
72
75
  height: number;
@@ -78,12 +81,25 @@ export declare const getDefaultUMLProperty: (shape: UMLSymbols) => {
78
81
  } | {
79
82
  width: number;
80
83
  height: number;
84
+ texts: {
85
+ id: import("../interfaces").GeometryCommonTextKeys;
86
+ text: string;
87
+ align: Alignment;
88
+ }[];
81
89
  } | {
82
90
  width: number;
83
91
  height: number;
92
+ texts: {
93
+ text: string;
94
+ align: Alignment;
95
+ }[];
84
96
  } | {
85
97
  width: number;
86
98
  height: number;
99
+ texts: {
100
+ text: string;
101
+ align: Alignment;
102
+ }[];
87
103
  } | {
88
104
  width: number;
89
105
  height: number;
@@ -102,32 +118,15 @@ export declare const getDefaultUMLProperty: (shape: UMLSymbols) => {
102
118
  } | {
103
119
  width: number;
104
120
  height: number;
105
- texts: {
106
- id: import("../interfaces").GeometryCommonTextKeys;
107
- text: string;
108
- align: Alignment;
109
- }[];
110
- } | {
111
- width: number;
112
- height: number;
113
- texts: {
114
- text: string;
115
- align: Alignment;
116
- }[];
117
121
  } | {
118
122
  width: number;
119
123
  height: number;
120
- texts: {
121
- text: string;
122
- align: Alignment;
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?: string | Element, fontSize?: number | string) => {
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?: string | Element, textHeight?: number) => PlaitGeometry;
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;