@plait/draw 0.90.1 → 0.92.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.
Files changed (153) hide show
  1. package/index.d.ts +1416 -5
  2. package/package.json +1 -1
  3. package/arrow-line.component.d.ts +0 -26
  4. package/constants/default.d.ts +0 -5
  5. package/constants/geometry.d.ts +0 -378
  6. package/constants/image.d.ts +0 -1
  7. package/constants/index.d.ts +0 -8
  8. package/constants/line.d.ts +0 -11
  9. package/constants/pointer.d.ts +0 -10
  10. package/constants/swimlane.d.ts +0 -21
  11. package/constants/text.d.ts +0 -1
  12. package/constants/theme.d.ts +0 -26
  13. package/engines/basic-shapes/cloud.d.ts +0 -7
  14. package/engines/basic-shapes/comment.d.ts +0 -4
  15. package/engines/basic-shapes/cross.d.ts +0 -4
  16. package/engines/basic-shapes/diamond.d.ts +0 -2
  17. package/engines/basic-shapes/ellipse.d.ts +0 -9
  18. package/engines/basic-shapes/hexagon.d.ts +0 -4
  19. package/engines/basic-shapes/left-arrow.d.ts +0 -4
  20. package/engines/basic-shapes/octagon.d.ts +0 -4
  21. package/engines/basic-shapes/parallelogram.d.ts +0 -4
  22. package/engines/basic-shapes/pentagon-arrow.d.ts +0 -4
  23. package/engines/basic-shapes/pentagon.d.ts +0 -4
  24. package/engines/basic-shapes/polygon.d.ts +0 -8
  25. package/engines/basic-shapes/process-arrow.d.ts +0 -4
  26. package/engines/basic-shapes/rectangle.d.ts +0 -2
  27. package/engines/basic-shapes/right-arrow.d.ts +0 -4
  28. package/engines/basic-shapes/round-comment.d.ts +0 -4
  29. package/engines/basic-shapes/round-rectangle.d.ts +0 -5
  30. package/engines/basic-shapes/star.d.ts +0 -4
  31. package/engines/basic-shapes/trapezoid.d.ts +0 -4
  32. package/engines/basic-shapes/triangle.d.ts +0 -4
  33. package/engines/basic-shapes/two-way-arrow.d.ts +0 -4
  34. package/engines/flowchart/database.d.ts +0 -2
  35. package/engines/flowchart/delay.d.ts +0 -2
  36. package/engines/flowchart/display.d.ts +0 -4
  37. package/engines/flowchart/document.d.ts +0 -2
  38. package/engines/flowchart/hard-disk.d.ts +0 -2
  39. package/engines/flowchart/internal-storage.d.ts +0 -2
  40. package/engines/flowchart/manual-input.d.ts +0 -4
  41. package/engines/flowchart/manual-loop.d.ts +0 -4
  42. package/engines/flowchart/merge.d.ts +0 -4
  43. package/engines/flowchart/multi-document.d.ts +0 -4
  44. package/engines/flowchart/note-curly-left.d.ts +0 -2
  45. package/engines/flowchart/note-curly-right.d.ts +0 -2
  46. package/engines/flowchart/note-square.d.ts +0 -2
  47. package/engines/flowchart/off-page.d.ts +0 -4
  48. package/engines/flowchart/or.d.ts +0 -2
  49. package/engines/flowchart/predefined-process.d.ts +0 -2
  50. package/engines/flowchart/preparation.d.ts +0 -4
  51. package/engines/flowchart/stored-data.d.ts +0 -2
  52. package/engines/flowchart/summing-junction.d.ts +0 -2
  53. package/engines/flowchart/terminal.d.ts +0 -6
  54. package/engines/index.d.ts +0 -3
  55. package/engines/table/table.d.ts +0 -24
  56. package/engines/uml/activity-class.d.ts +0 -2
  57. package/engines/uml/actor.d.ts +0 -2
  58. package/engines/uml/assembly.d.ts +0 -2
  59. package/engines/uml/combined-fragment.d.ts +0 -3
  60. package/engines/uml/component-box.d.ts +0 -2
  61. package/engines/uml/component.d.ts +0 -2
  62. package/engines/uml/container.d.ts +0 -2
  63. package/engines/uml/deletion.d.ts +0 -2
  64. package/engines/uml/note.d.ts +0 -2
  65. package/engines/uml/package.d.ts +0 -3
  66. package/engines/uml/provided-interface.d.ts +0 -2
  67. package/engines/uml/required-interface.d.ts +0 -2
  68. package/engines/uml/template.d.ts +0 -2
  69. package/generators/arrow-line-auto-complete.generator.d.ts +0 -14
  70. package/generators/arrow-line.generator.d.ts +0 -6
  71. package/generators/geometry-shape.generator.d.ts +0 -8
  72. package/generators/index.d.ts +0 -6
  73. package/generators/line-active.generator.d.ts +0 -17
  74. package/generators/single-text.generator.d.ts +0 -10
  75. package/generators/table.generator.d.ts +0 -9
  76. package/generators/text.generator.d.ts +0 -40
  77. package/generators/vector-line-generator.d.ts +0 -6
  78. package/geometry.component.d.ts +0 -20
  79. package/image.component.d.ts +0 -13
  80. package/interfaces/arrow-line.d.ts +0 -73
  81. package/interfaces/element.d.ts +0 -7
  82. package/interfaces/engine.d.ts +0 -21
  83. package/interfaces/geometry.d.ts +0 -112
  84. package/interfaces/image.d.ts +0 -9
  85. package/interfaces/index.d.ts +0 -42
  86. package/interfaces/line.d.ts +0 -3
  87. package/interfaces/options.d.ts +0 -4
  88. package/interfaces/swimlane.d.ts +0 -22
  89. package/interfaces/table.d.ts +0 -48
  90. package/interfaces/text.d.ts +0 -5
  91. package/interfaces/vector-line.d.ts +0 -19
  92. package/plugins/arrow-line/with-arrow-line-auto-complete-reaction.d.ts +0 -2
  93. package/plugins/arrow-line/with-arrow-line-auto-complete.d.ts +0 -12
  94. package/plugins/arrow-line/with-arrow-line-bound-reaction.d.ts +0 -2
  95. package/plugins/arrow-line/with-arrow-line-create.d.ts +0 -2
  96. package/plugins/arrow-line/with-arrow-line-resize.d.ts +0 -2
  97. package/plugins/arrow-line/with-arrow-line-text-move.d.ts +0 -2
  98. package/plugins/arrow-line/with-arrow-line-text.d.ts +0 -3
  99. package/plugins/with-draw-fragment.d.ts +0 -4
  100. package/plugins/with-draw-hotkey.d.ts +0 -2
  101. package/plugins/with-draw-resize.d.ts +0 -24
  102. package/plugins/with-draw-rotate.d.ts +0 -2
  103. package/plugins/with-draw.d.ts +0 -2
  104. package/plugins/with-geometry-create.d.ts +0 -8
  105. package/plugins/with-swimlane-create.d.ts +0 -8
  106. package/plugins/with-swimlane.d.ts +0 -2
  107. package/plugins/with-table-resize.d.ts +0 -2
  108. package/plugins/with-table.d.ts +0 -3
  109. package/plugins/with-vector-line-create.d.ts +0 -2
  110. package/plugins/with-vector-line-resize.d.ts +0 -2
  111. package/public-api.d.ts +0 -10
  112. package/table.component.d.ts +0 -21
  113. package/transforms/arrow-line.d.ts +0 -8
  114. package/transforms/common.d.ts +0 -3
  115. package/transforms/geometry-text.d.ts +0 -5
  116. package/transforms/geometry.d.ts +0 -7
  117. package/transforms/image.d.ts +0 -9
  118. package/transforms/index.d.ts +0 -25
  119. package/transforms/multi-text-geometry-text.d.ts +0 -4
  120. package/transforms/swimlane.d.ts +0 -7
  121. package/transforms/table-text.d.ts +0 -3
  122. package/transforms/table.d.ts +0 -3
  123. package/transforms/vector-line.d.ts +0 -3
  124. package/utils/arrow-line/arrow-line-arrow.d.ts +0 -4
  125. package/utils/arrow-line/arrow-line-basic.d.ts +0 -13
  126. package/utils/arrow-line/arrow-line-common.d.ts +0 -29
  127. package/utils/arrow-line/arrow-line-resize.d.ts +0 -23
  128. package/utils/arrow-line/elbow.d.ts +0 -12
  129. package/utils/arrow-line/index.d.ts +0 -5
  130. package/utils/clipboard.d.ts +0 -11
  131. package/utils/common.d.ts +0 -42
  132. package/utils/geometry.d.ts +0 -144
  133. package/utils/hit.d.ts +0 -22
  134. package/utils/index.d.ts +0 -16
  135. package/utils/line.d.ts +0 -3
  136. package/utils/memorize.d.ts +0 -29
  137. package/utils/multi-text-geometry.d.ts +0 -10
  138. package/utils/polygon.d.ts +0 -4
  139. package/utils/position/arrow-line.d.ts +0 -3
  140. package/utils/position/geometry.d.ts +0 -14
  141. package/utils/position/line.d.ts +0 -15
  142. package/utils/selected.d.ts +0 -12
  143. package/utils/shape.d.ts +0 -6
  144. package/utils/snap-resizing.d.ts +0 -25
  145. package/utils/style/index.d.ts +0 -1
  146. package/utils/style/stroke.d.ts +0 -4
  147. package/utils/swimlane.d.ts +0 -39
  148. package/utils/table-selected.d.ts +0 -8
  149. package/utils/table.d.ts +0 -29
  150. package/utils/text-size.d.ts +0 -7
  151. package/utils/uml.d.ts +0 -3
  152. package/utils/vector-line.d.ts +0 -6
  153. package/vector-line.component.d.ts +0 -14
package/index.d.ts CHANGED
@@ -1,5 +1,1416 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@plait/draw" />
5
- export * from './public-api';
1
+ import * as _plait_core from '@plait/core';
2
+ import { PlaitElement, PlaitBoard, RectangleClient, Point, PointOfRectangle, Direction, Vector, WithPluginOptions, Path, ThemeColorMode, Selection, SnapRef, DirectionFactors, OnContextChanged, PlaitPluginElementContext } from '@plait/core';
3
+ import * as _plait_common from '@plait/common';
4
+ import { ParagraphElement, TextManageChangeData, TextManage, StrokeStyle, Alignment, ElbowLineRouteOptions, ResizeState, CustomText, ResizeRef, Generator, ActiveGeneratorExtraData, CommonElementFlavour, ActiveGenerator } from '@plait/common';
5
+ import { Options } from 'roughjs/bin/core';
6
+ import * as slate from 'slate';
7
+ import { Element, BaseOperation, BaseEditor } from 'slate';
8
+ import * as _plait_draw from '@plait/draw';
9
+
10
+ interface DrawTextInfo extends TextRectangleOptions {
11
+ text: ParagraphElement;
12
+ }
13
+ interface TextGeneratorOptions<T> {
14
+ onChange: (element: T, textChangeRef: TextManageChangeData, text: DrawTextInfo) => void;
15
+ getRenderRectangle?: (element: T, text: DrawTextInfo) => RectangleClient;
16
+ getMaxWidth?: () => number;
17
+ }
18
+ declare const KEY_TO_TEXT_MANAGE: WeakMap<PlaitBoard, {
19
+ [key: string]: TextManage;
20
+ }>;
21
+ declare const setTextManage: (board: PlaitBoard, element: PlaitElement, text: DrawTextInfo, textManage: TextManage) => WeakMap<PlaitBoard, {
22
+ [key: string]: TextManage;
23
+ }>;
24
+ declare const getTextManage: (board: PlaitBoard, element: PlaitElement | undefined, text: Pick<DrawTextInfo, "id">) => TextManage;
25
+ declare const deleteTextManage: (board: PlaitBoard, key: string) => void;
26
+ declare class TextGenerator<T extends PlaitElement = PlaitGeometry> {
27
+ protected board: PlaitBoard;
28
+ protected element: T;
29
+ protected texts: DrawTextInfo[];
30
+ protected options: TextGeneratorOptions<T>;
31
+ textManages: TextManage[];
32
+ get shape(): DrawShapes;
33
+ constructor(board: PlaitBoard, element: T, texts: DrawTextInfo[], options: TextGeneratorOptions<T>);
34
+ initialize(): void;
35
+ draw(elementG: SVGElement): void;
36
+ update(element: T, previousDrawShapeTexts: DrawTextInfo[], currentDrawShapeTexts: DrawTextInfo[], elementG: SVGElement): void;
37
+ private createTextManage;
38
+ getRectangle(text: DrawTextInfo): {
39
+ height: number;
40
+ width: number;
41
+ x: any;
42
+ y: number;
43
+ };
44
+ getMaxWidth(text: DrawTextInfo): number;
45
+ destroy(): void;
46
+ }
47
+
48
+ declare enum BasicShapes {
49
+ rectangle = "rectangle",
50
+ ellipse = "ellipse",
51
+ diamond = "diamond",
52
+ roundRectangle = "roundRectangle",
53
+ parallelogram = "parallelogram",
54
+ text = "text",
55
+ triangle = "triangle",
56
+ leftArrow = "leftArrow",
57
+ trapezoid = "trapezoid",
58
+ rightArrow = "rightArrow",
59
+ cross = "cross",
60
+ star = "star",
61
+ pentagon = "pentagon",
62
+ hexagon = "hexagon",
63
+ octagon = "octagon",
64
+ pentagonArrow = "pentagonArrow",
65
+ processArrow = "processArrow",
66
+ twoWayArrow = "twoWayArrow",
67
+ comment = "comment",
68
+ roundComment = "roundComment",
69
+ cloud = "cloud"
70
+ }
71
+ declare enum FlowchartSymbols {
72
+ process = "process",
73
+ decision = "decision",
74
+ data = "data",
75
+ connector = "connector",
76
+ terminal = "terminal",
77
+ manualInput = "manualInput",
78
+ preparation = "preparation",
79
+ manualLoop = "manualLoop",
80
+ merge = "merge",
81
+ delay = "delay",
82
+ storedData = "storedData",
83
+ or = "or",
84
+ summingJunction = "summingJunction",
85
+ predefinedProcess = "predefinedProcess",
86
+ offPage = "offPage",
87
+ document = "document",
88
+ multiDocument = "multiDocument",
89
+ database = "database",
90
+ hardDisk = "hardDisk",
91
+ internalStorage = "internalStorage",
92
+ noteCurlyRight = "noteCurlyRight",
93
+ noteCurlyLeft = "noteCurlyLeft",
94
+ noteSquare = "noteSquare",
95
+ display = "display"
96
+ }
97
+ declare enum UMLSymbols {
98
+ actor = "actor",
99
+ useCase = "useCase",
100
+ container = "container",
101
+ note = "note",
102
+ simpleClass = "simpleClass",
103
+ activityClass = "activityClass",
104
+ branchMerge = "branchMerge",
105
+ port = "port",
106
+ package = "package",
107
+ combinedFragment = "combinedFragment",
108
+ class = "class",
109
+ interface = "interface",
110
+ object = "object",
111
+ component = "component",
112
+ componentBox = "componentBox",
113
+ template = "template",
114
+ activation = "activation",
115
+ deletion = "deletion",
116
+ assembly = "assembly",
117
+ providedInterface = "providedInterface",
118
+ requiredInterface = "requiredInterface"
119
+ }
120
+ declare enum GeometryCommonTextKeys {
121
+ name = "name",
122
+ content = "content"
123
+ }
124
+ type GeometryShapes = BasicShapes | FlowchartSymbols | UMLSymbols;
125
+ type SwimlaneDirection = 'horizontal' | 'vertical';
126
+ interface PlaitBaseGeometry<T extends string = 'geometry', P extends Point[] = [Point, Point], S extends string = GeometryShapes> extends PlaitElement {
127
+ type: T;
128
+ points: P;
129
+ shape: S;
130
+ }
131
+ interface PlaitCommonGeometry<T extends string = 'geometry', P extends Point[] = [Point, Point], S extends string = GeometryShapes> extends PlaitBaseGeometry<T, P, S> {
132
+ fill?: string;
133
+ strokeColor?: string;
134
+ strokeWidth?: number;
135
+ strokeStyle?: StrokeStyle;
136
+ angle?: number;
137
+ opacity?: number;
138
+ }
139
+ interface PlaitCustomGeometry<T extends string = string, P extends Point[] = Point[], S extends string = string> extends PlaitBaseGeometry<T, P, S> {
140
+ }
141
+ interface PlaitMultipleTextGeometry extends PlaitCommonGeometry {
142
+ texts: DrawTextInfo[];
143
+ }
144
+ interface PlaitRectangle extends PlaitGeometry {
145
+ shape: BasicShapes.rectangle;
146
+ }
147
+ interface PlaitEllipse extends PlaitGeometry {
148
+ shape: BasicShapes.ellipse;
149
+ }
150
+ interface PlaitDiamond extends PlaitGeometry {
151
+ shape: BasicShapes.diamond;
152
+ }
153
+ interface PlaitGeometry extends PlaitCommonGeometry {
154
+ text?: ParagraphElement;
155
+ }
156
+ declare const PlaitGeometry: {};
157
+
158
+ interface PlaitCommonImage extends PlaitElement {
159
+ points: [Point, Point];
160
+ type: 'image';
161
+ angle: number;
162
+ }
163
+ interface PlaitImage extends PlaitCommonImage {
164
+ url: string;
165
+ }
166
+
167
+ declare enum ArrowLineMarkerType {
168
+ arrow = "arrow",
169
+ none = "none",
170
+ openTriangle = "open-triangle",
171
+ solidTriangle = "solid-triangle",
172
+ sharpArrow = "sharp-arrow",
173
+ oneSideUp = "one-side-up",
174
+ oneSideDown = "one-side-down",
175
+ hollowTriangle = "hollow-triangle",
176
+ singleSlash = "single-slash"
177
+ }
178
+ declare enum ArrowLineShape {
179
+ straight = "straight",
180
+ curve = "curve",
181
+ elbow = "elbow"
182
+ }
183
+ declare enum ArrowLineHandleKey {
184
+ source = "source",
185
+ target = "target"
186
+ }
187
+ interface ArrowLineText {
188
+ text: Element;
189
+ position: number;
190
+ }
191
+ interface ArrowLineHandle {
192
+ boundId?: string;
193
+ connection?: PointOfRectangle;
194
+ marker: ArrowLineMarkerType;
195
+ }
196
+ interface ArrowLineHandleRef {
197
+ key: ArrowLineHandleKey;
198
+ direction: Direction;
199
+ point: PointOfRectangle;
200
+ vector: Vector;
201
+ boundElement?: PlaitShapeElement;
202
+ }
203
+ interface ArrowLineHandleRefPair {
204
+ source: ArrowLineHandleRef;
205
+ target: ArrowLineHandleRef;
206
+ }
207
+ interface PlaitStraightArrowLine extends PlaitArrowLine {
208
+ shape: ArrowLineShape.straight;
209
+ }
210
+ interface PlaitCurveArrowLine extends PlaitArrowLine {
211
+ shape: ArrowLineShape.curve;
212
+ }
213
+ interface PlaitElbowArrowLine extends PlaitArrowLine {
214
+ shape: ArrowLineShape.elbow;
215
+ }
216
+ interface PlaitArrowLine extends PlaitElement {
217
+ type: 'arrow-line';
218
+ shape: ArrowLineShape;
219
+ points: Point[];
220
+ source: ArrowLineHandle;
221
+ target: ArrowLineHandle;
222
+ texts: ArrowLineText[];
223
+ strokeColor?: string;
224
+ strokeWidth?: number;
225
+ strokeStyle?: StrokeStyle;
226
+ opacity: number;
227
+ }
228
+ declare const PlaitArrowLine: {
229
+ isSourceMarkOrTargetMark(line: PlaitArrowLine, markType: ArrowLineMarkerType, handleKey: ArrowLineHandleKey): boolean;
230
+ isSourceMark(line: PlaitArrowLine, markType: ArrowLineMarkerType): boolean;
231
+ isTargetMark(line: PlaitArrowLine, markType: ArrowLineMarkerType): boolean;
232
+ isBoundElementOfSource(line: PlaitArrowLine, element: PlaitShapeElement): boolean;
233
+ isBoundElementOfTarget(line: PlaitArrowLine, element: PlaitShapeElement): boolean;
234
+ getPoints(board: PlaitBoard, line: PlaitArrowLine): Point[];
235
+ };
236
+
237
+ interface DrawOptions {
238
+ element: PlaitElement;
239
+ }
240
+ interface TextRectangleOptions {
241
+ id: string;
242
+ board?: PlaitBoard;
243
+ }
244
+ interface ShapeEngine<T extends PlaitElement = PlaitGeometry, P extends DrawOptions = DrawOptions, K extends TextRectangleOptions = TextRectangleOptions> {
245
+ isInsidePoint: (rectangle: RectangleClient, point: Point) => boolean;
246
+ getNearestPoint: (rectangle: RectangleClient, point: Point) => Point;
247
+ getNearestCrossingPoint?: (rectangle: RectangleClient, point: Point) => Point;
248
+ getConnectorPoints: (rectangle: RectangleClient) => Point[];
249
+ getCornerPoints: (rectangle: RectangleClient) => Point[];
250
+ getEdgeByConnectionPoint?: (rectangle: RectangleClient, point: PointOfRectangle) => [Point, Point] | null;
251
+ getTangentVectorByConnectionPoint?: (rectangle: RectangleClient, point: PointOfRectangle) => Vector | null;
252
+ draw: (board: PlaitBoard, rectangle: RectangleClient, roughOptions: Options, options?: P) => SVGGElement;
253
+ getTextRectangle?: (board: PlaitBoard, element: T, options?: K) => RectangleClient;
254
+ }
255
+
256
+ declare enum TableSymbols {
257
+ table = "table"
258
+ }
259
+ interface PlaitTableBoard extends PlaitBoard {
260
+ buildTable: (element: PlaitBaseTable) => PlaitBaseTable;
261
+ }
262
+ interface PlaitBaseTable extends PlaitElement {
263
+ id: string;
264
+ points: Point[];
265
+ rows: {
266
+ id: string;
267
+ height?: number;
268
+ }[];
269
+ columns: {
270
+ id: string;
271
+ width?: number;
272
+ }[];
273
+ cells: PlaitTableCell[];
274
+ groupId?: string;
275
+ }
276
+ interface PlaitTable extends PlaitBaseTable {
277
+ type: 'table';
278
+ }
279
+ interface PlaitTableCell {
280
+ id: string;
281
+ rowId: string;
282
+ columnId: string;
283
+ colspan?: number;
284
+ rowspan?: number;
285
+ text?: PlaitTableCellParagraph;
286
+ fill?: string;
287
+ }
288
+ interface PlaitTableDrawOptions extends DrawOptions {
289
+ element: PlaitTable;
290
+ }
291
+ interface PlaitTableCellWithPoints extends PlaitTableCell {
292
+ points: [Point, Point];
293
+ }
294
+ interface PlaitTableCellParagraph extends ParagraphElement {
295
+ direction?: 'vertical' | 'horizontal';
296
+ }
297
+ declare const PlaitTableElement: {
298
+ isTable: (value: any) => value is PlaitTable;
299
+ isVerticalText: (value: PlaitTableCell) => value is PlaitTableCell;
300
+ };
301
+
302
+ declare enum SwimlaneSymbols {
303
+ swimlaneVertical = "swimlaneVertical",
304
+ swimlaneHorizontal = "swimlaneHorizontal"
305
+ }
306
+ declare enum SwimlaneDrawSymbols {
307
+ swimlaneVertical = "swimlaneVertical",
308
+ swimlaneHorizontal = "swimlaneHorizontal",
309
+ swimlaneVerticalWithHeader = "swimlaneVerticalWithHeader",
310
+ swimlaneHorizontalWithHeader = "swimlaneHorizontalWithHeader"
311
+ }
312
+ interface PlaitSwimlane extends PlaitBaseTable {
313
+ type: 'swimlane';
314
+ shape: SwimlaneSymbols;
315
+ header?: boolean;
316
+ }
317
+ interface PlaitSwimlaneVertical extends PlaitSwimlane {
318
+ shape: SwimlaneSymbols.swimlaneVertical;
319
+ }
320
+ interface PlaitSwimlaneHorizontal extends PlaitSwimlane {
321
+ shape: SwimlaneSymbols.swimlaneHorizontal;
322
+ }
323
+
324
+ interface PlaitText extends PlaitGeometry {
325
+ shape: BasicShapes.text;
326
+ autoSize: boolean;
327
+ }
328
+
329
+ declare enum VectorLinePointerType {
330
+ vectorLine = "vectorLine"
331
+ }
332
+ declare enum VectorLineShape {
333
+ straight = "straight",
334
+ curve = "curve"
335
+ }
336
+ interface PlaitVectorLine extends PlaitElement {
337
+ type: 'vector-line';
338
+ shape: VectorLineShape;
339
+ points: Point[];
340
+ strokeColor?: string;
341
+ strokeWidth?: number;
342
+ strokeStyle?: StrokeStyle;
343
+ fill?: string;
344
+ opacity: number;
345
+ }
346
+
347
+ type PlaitLine = PlaitArrowLine | PlaitVectorLine;
348
+
349
+ declare enum MemorizeKey {
350
+ basicShape = "basicShape",
351
+ flowchart = "flowchart",
352
+ text = "text",
353
+ arrowLine = "arrow-line",
354
+ UML = "UML"
355
+ }
356
+
357
+ interface WithDrawOptions extends WithPluginOptions {
358
+ customGeometryTypes: string[];
359
+ }
360
+
361
+ type PlaitShapeElement = PlaitGeometry | PlaitImage | PlaitTable | PlaitSwimlane;
362
+ type DrawShapes = GeometryShapes | TableSymbols | SwimlaneSymbols;
363
+ type PlaitDrawElement = PlaitGeometry | PlaitArrowLine | PlaitVectorLine | PlaitImage | PlaitBaseTable | PlaitSwimlane;
364
+ declare const PlaitDrawElement: {
365
+ isGeometry: (value: any) => value is PlaitGeometry;
366
+ isArrowLine: (value: any) => value is PlaitArrowLine;
367
+ isVectorLine: (value: any) => value is PlaitVectorLine;
368
+ isLine: (value: any) => value is PlaitLine;
369
+ isText: (value: any) => value is PlaitText;
370
+ isImage: (value: any) => value is PlaitImage;
371
+ isTable: (value: any) => value is PlaitTable;
372
+ isDrawElement: (value: any) => value is PlaitDrawElement;
373
+ isCustomGeometryElement: (board: PlaitBoard, value: any) => value is PlaitCustomGeometry;
374
+ isShapeElement: (value: any) => value is PlaitShapeElement;
375
+ isBasicShape: (value: any) => boolean;
376
+ isFlowchart: (value: any) => boolean;
377
+ isUML: (value: any) => boolean;
378
+ isSwimlane: (value: any) => value is PlaitSwimlane;
379
+ isVerticalSwimlane: (value: any) => boolean;
380
+ isHorizontalSwimlane: (value: any) => boolean;
381
+ isUMLClassOrInterface: (value: any) => boolean;
382
+ isGeometryByTable: (value: any) => value is PlaitBaseTable;
383
+ isElementByTable: (value: any) => value is PlaitBaseTable;
384
+ };
385
+
386
+ declare const withDraw: (board: PlaitBoard) => PlaitBoard;
387
+
388
+ declare const WithArrowLineAutoCompletePluginKey = "plait-arrow-line-auto-complete-plugin-key";
389
+ interface ArrowLineAutoCompleteOptions {
390
+ afterComplete: (element: PlaitArrowLine) => {};
391
+ }
392
+ type PreCommitRef = {
393
+ temporaryArrowLineElement: PlaitArrowLine;
394
+ temporaryShapeElement: PlaitGeometry;
395
+ };
396
+ declare const BOARD_TO_PRE_COMMIT: WeakMap<PlaitBoard, PreCommitRef>;
397
+ declare const withArrowLineAutoComplete: (board: PlaitBoard) => PlaitBoard;
398
+
399
+ declare const WithDrawPluginKey = "plait-draw-plugin-key";
400
+ declare enum DrawI18nKey {
401
+ lineText = "line-text",
402
+ geometryText = "geometry-text"
403
+ }
404
+
405
+ declare const ShapeDefaultSpace: {
406
+ rectangleAndText: number;
407
+ };
408
+ declare const DefaultDrawStyle: {
409
+ strokeWidth: number;
410
+ defaultRadius: number;
411
+ strokeColor: string;
412
+ fill: string;
413
+ };
414
+ declare const DefaultDrawActiveStyle: {
415
+ strokeWidth: number;
416
+ selectionStrokeWidth: number;
417
+ };
418
+ declare const DefaultBasicShapeProperty: {
419
+ width: number;
420
+ height: number;
421
+ strokeColor: string;
422
+ strokeWidth: number;
423
+ };
424
+ declare const DefaultPentagonArrowProperty: {
425
+ width: number;
426
+ height: number;
427
+ };
428
+ declare const DefaultTwoWayArrowProperty: {
429
+ width: number;
430
+ height: number;
431
+ };
432
+ declare const DefaultArrowProperty: {
433
+ width: number;
434
+ height: number;
435
+ };
436
+ declare const DefaultCloudProperty: {
437
+ width: number;
438
+ height: number;
439
+ };
440
+ declare const DefaultTextProperty: {
441
+ width: number;
442
+ height: number;
443
+ text: string;
444
+ };
445
+ declare const GeometryThreshold: {
446
+ defaultTextMaxWidth: number;
447
+ };
448
+ declare const DefaultConnectorProperty: {
449
+ width: number;
450
+ height: number;
451
+ };
452
+ declare const DefaultFlowchartProperty: {
453
+ width: number;
454
+ height: number;
455
+ };
456
+ declare const DefaultDataBaseProperty: {
457
+ width: number;
458
+ height: number;
459
+ };
460
+ declare const DefaultInternalStorageProperty: {
461
+ width: number;
462
+ height: number;
463
+ };
464
+ declare const DefaultDecisionProperty: {
465
+ width: number;
466
+ height: number;
467
+ };
468
+ declare const DefaultDataProperty: {
469
+ width: number;
470
+ height: number;
471
+ };
472
+ declare const DefaultDocumentProperty: {
473
+ width: number;
474
+ height: number;
475
+ };
476
+ declare const DefaultNoteProperty: {
477
+ width: number;
478
+ height: number;
479
+ };
480
+ declare const DefaultMultiDocumentProperty: {
481
+ width: number;
482
+ height: number;
483
+ };
484
+ declare const DefaultManualInputProperty: {
485
+ width: number;
486
+ height: number;
487
+ };
488
+ declare const DefaultMergeProperty: {
489
+ width: number;
490
+ height: number;
491
+ };
492
+ declare const DefaultActorProperty: {
493
+ width: number;
494
+ height: number;
495
+ };
496
+ declare const DefaultContainerProperty: {
497
+ width: number;
498
+ height: number;
499
+ };
500
+ declare const DefaultPackageProperty: {
501
+ width: number;
502
+ height: number;
503
+ texts: {
504
+ id: GeometryCommonTextKeys;
505
+ text: string;
506
+ align: Alignment;
507
+ }[];
508
+ };
509
+ declare const DefaultActivationProperty: {
510
+ width: number;
511
+ height: number;
512
+ };
513
+ declare const DefaultObjectProperty: {
514
+ width: number;
515
+ height: number;
516
+ };
517
+ declare const DefaultComponentBoxProperty: {
518
+ width: number;
519
+ height: number;
520
+ };
521
+ declare const DefaultDeletionProperty: {
522
+ width: number;
523
+ height: number;
524
+ };
525
+ declare const DefaultPortProperty: {
526
+ width: number;
527
+ height: number;
528
+ };
529
+ declare const DefaultRequiredInterfaceProperty: {
530
+ width: number;
531
+ height: number;
532
+ };
533
+ declare const DefaultAssemblyProperty: {
534
+ width: number;
535
+ height: number;
536
+ };
537
+ declare const DefaultProvidedInterfaceProperty: {
538
+ width: number;
539
+ height: number;
540
+ };
541
+ declare const DefaultCombinedFragmentProperty: {
542
+ width: number;
543
+ height: number;
544
+ texts: {
545
+ id: GeometryCommonTextKeys;
546
+ text: string;
547
+ align: Alignment;
548
+ }[];
549
+ };
550
+ declare const DefaultClassProperty: {
551
+ width: number;
552
+ height: number;
553
+ texts: {
554
+ text: string;
555
+ align: Alignment;
556
+ }[];
557
+ };
558
+ declare const DefaultInterfaceProperty: {
559
+ width: number;
560
+ height: number;
561
+ texts: {
562
+ text: string;
563
+ align: Alignment;
564
+ }[];
565
+ };
566
+ declare const DefaultBasicShapePropertyMap: Record<string, {
567
+ width: number;
568
+ height: number;
569
+ }>;
570
+ declare const DefaultFlowchartPropertyMap: {
571
+ connector: {
572
+ width: number;
573
+ height: number;
574
+ };
575
+ process: {
576
+ width: number;
577
+ height: number;
578
+ };
579
+ decision: {
580
+ width: number;
581
+ height: number;
582
+ };
583
+ data: {
584
+ width: number;
585
+ height: number;
586
+ };
587
+ terminal: {
588
+ width: number;
589
+ height: number;
590
+ };
591
+ manualInput: {
592
+ width: number;
593
+ height: number;
594
+ };
595
+ preparation: {
596
+ width: number;
597
+ height: number;
598
+ };
599
+ manualLoop: {
600
+ width: number;
601
+ height: number;
602
+ };
603
+ merge: {
604
+ width: number;
605
+ height: number;
606
+ };
607
+ delay: {
608
+ width: number;
609
+ height: number;
610
+ };
611
+ storedData: {
612
+ width: number;
613
+ height: number;
614
+ };
615
+ or: {
616
+ width: number;
617
+ height: number;
618
+ };
619
+ summingJunction: {
620
+ width: number;
621
+ height: number;
622
+ };
623
+ predefinedProcess: {
624
+ width: number;
625
+ height: number;
626
+ };
627
+ offPage: {
628
+ width: number;
629
+ height: number;
630
+ };
631
+ document: {
632
+ width: number;
633
+ height: number;
634
+ };
635
+ multiDocument: {
636
+ width: number;
637
+ height: number;
638
+ };
639
+ database: {
640
+ width: number;
641
+ height: number;
642
+ };
643
+ hardDisk: {
644
+ width: number;
645
+ height: number;
646
+ };
647
+ internalStorage: {
648
+ width: number;
649
+ height: number;
650
+ };
651
+ noteCurlyLeft: {
652
+ width: number;
653
+ height: number;
654
+ };
655
+ noteCurlyRight: {
656
+ width: number;
657
+ height: number;
658
+ };
659
+ noteSquare: {
660
+ width: number;
661
+ height: number;
662
+ };
663
+ display: {
664
+ width: number;
665
+ height: number;
666
+ };
667
+ };
668
+ declare const DefaultUMLPropertyMap: {
669
+ actor: {
670
+ width: number;
671
+ height: number;
672
+ };
673
+ useCase: {
674
+ width: number;
675
+ height: number;
676
+ };
677
+ container: {
678
+ width: number;
679
+ height: number;
680
+ };
681
+ note: {
682
+ width: number;
683
+ height: number;
684
+ };
685
+ package: {
686
+ width: number;
687
+ height: number;
688
+ texts: {
689
+ id: GeometryCommonTextKeys;
690
+ text: string;
691
+ align: Alignment;
692
+ }[];
693
+ };
694
+ combinedFragment: {
695
+ width: number;
696
+ height: number;
697
+ texts: {
698
+ id: GeometryCommonTextKeys;
699
+ text: string;
700
+ align: Alignment;
701
+ }[];
702
+ };
703
+ class: {
704
+ width: number;
705
+ height: number;
706
+ texts: {
707
+ text: string;
708
+ align: Alignment;
709
+ }[];
710
+ };
711
+ interface: {
712
+ width: number;
713
+ height: number;
714
+ texts: {
715
+ text: string;
716
+ align: Alignment;
717
+ }[];
718
+ };
719
+ activation: {
720
+ width: number;
721
+ height: number;
722
+ };
723
+ object: {
724
+ width: number;
725
+ height: number;
726
+ };
727
+ deletion: {
728
+ width: number;
729
+ height: number;
730
+ };
731
+ activityClass: {
732
+ width: number;
733
+ height: number;
734
+ };
735
+ simpleClass: {
736
+ width: number;
737
+ height: number;
738
+ };
739
+ component: {
740
+ width: number;
741
+ height: number;
742
+ };
743
+ template: {
744
+ width: number;
745
+ height: number;
746
+ };
747
+ componentBox: {
748
+ width: number;
749
+ height: number;
750
+ };
751
+ port: {
752
+ width: number;
753
+ height: number;
754
+ };
755
+ branchMerge: {
756
+ width: number;
757
+ height: number;
758
+ };
759
+ assembly: {
760
+ width: number;
761
+ height: number;
762
+ };
763
+ providedInterface: {
764
+ width: number;
765
+ height: number;
766
+ };
767
+ requiredInterface: {
768
+ width: number;
769
+ height: number;
770
+ };
771
+ };
772
+ declare const MultipleTextGeometryTextKeys: {
773
+ [key in GeometryShapes]?: string[];
774
+ };
775
+ declare const LINE_HIT_GEOMETRY_BUFFER = 10;
776
+ declare const LINE_SNAPPING_BUFFER = 6;
777
+ declare const LINE_SNAPPING_CONNECTOR_BUFFER = 8;
778
+ declare const GEOMETRY_WITHOUT_TEXT: GeometryShapes[];
779
+ declare const GEOMETRY_WITH_MULTIPLE_TEXT: UMLSymbols[];
780
+ declare const GEOMETRY_NOT_CLOSED: GeometryShapes[];
781
+
782
+ type DrawPointerType = BasicShapes | ArrowLineShape | FlowchartSymbols | SwimlaneDrawSymbols | TableSymbols | UMLSymbols | VectorLinePointerType;
783
+ declare const getGeometryPointers: () => string[];
784
+ declare const getSwimlanePointers: () => string[];
785
+ declare const getSwimlaneShapes: () => string[];
786
+ declare const getBasicPointers: () => string[];
787
+ declare const getFlowchartPointers: () => string[];
788
+ declare const getUMLPointers: () => string[];
789
+ declare const getArrowLinePointers: () => string[];
790
+ declare const getVectorLinePointers: () => string[];
791
+
792
+ declare const DEFAULT_IMAGE_WIDTH = 1000;
793
+
794
+ declare const DrawThemeColors: {
795
+ default: {
796
+ strokeColor: string;
797
+ fill: string;
798
+ };
799
+ colorful: {
800
+ strokeColor: string;
801
+ fill: string;
802
+ };
803
+ soft: {
804
+ strokeColor: string;
805
+ fill: string;
806
+ };
807
+ retro: {
808
+ strokeColor: string;
809
+ fill: string;
810
+ };
811
+ dark: {
812
+ strokeColor: string;
813
+ fill: string;
814
+ };
815
+ starry: {
816
+ strokeColor: string;
817
+ fill: string;
818
+ };
819
+ };
820
+
821
+ declare const SWIMLANE_HEADER_SIZE = 42;
822
+ declare const DefaultSwimlaneVerticalWithHeaderProperty: {
823
+ width: number;
824
+ height: number;
825
+ };
826
+ declare const DefaultSwimlaneHorizontalWithHeaderProperty: {
827
+ width: number;
828
+ height: number;
829
+ };
830
+ declare const DefaultSwimlaneVerticalProperty: {
831
+ width: number;
832
+ height: number;
833
+ };
834
+ declare const DefaultSwimlaneHorizontalProperty: {
835
+ width: number;
836
+ height: number;
837
+ };
838
+ declare const DefaultSwimlanePropertyMap: Record<string, {
839
+ width: number;
840
+ height: number;
841
+ }>;
842
+
843
+ declare const MIN_TEXT_WIDTH = 5;
844
+
845
+ declare const DefaultLineStyle: {
846
+ strokeWidth: number;
847
+ strokeColor: string;
848
+ };
849
+ declare const LINE_TEXT_SPACE = 4;
850
+ declare const LINE_AUTO_COMPLETE_DIAMETER = 6;
851
+ declare const LINE_AUTO_COMPLETE_OPACITY = 1;
852
+ declare const LINE_AUTO_COMPLETE_HOVERED_OPACITY = 1;
853
+ declare const LINE_AUTO_COMPLETE_HOVERED_DIAMETER = 12;
854
+ declare const LINE_ALIGN_TOLERANCE = 3;
855
+ declare const LINE_TEXT = "\u6587\u672C";
856
+
857
+ declare const isSelfLoop: (element: PlaitArrowLine) => boolean | "" | undefined;
858
+ declare const isUseDefaultOrthogonalRoute: (element: PlaitArrowLine, options: ElbowLineRouteOptions) => boolean;
859
+ declare const getElbowPoints: (board: PlaitBoard, element: PlaitArrowLine) => Point[];
860
+ declare const getNextSourceAndTargetPoints: (board: PlaitBoard, element: PlaitArrowLine) => Point[];
861
+ declare const getSourceAndTargetRectangle: (board: PlaitBoard, element: PlaitArrowLine, handleRefPair: ArrowLineHandleRefPair) => {
862
+ sourceRectangle: RectangleClient;
863
+ targetRectangle: RectangleClient;
864
+ };
865
+ declare function getNextRenderPoints(board: PlaitBoard, element: PlaitArrowLine, renderPoints?: Point[]): Point[];
866
+
867
+ declare const drawArrowLineArrow: (element: PlaitArrowLine, points: Point[], options: Options) => SVGGElement | null;
868
+
869
+ declare const createArrowLineElement: (shape: ArrowLineShape, points: [Point, Point], source: ArrowLineHandle, target: ArrowLineHandle, texts?: ArrowLineText[], options?: Pick<PlaitArrowLine, "strokeColor" | "strokeWidth">) => PlaitArrowLine;
870
+ declare const getArrowLinePoints: (board: PlaitBoard, element: PlaitArrowLine) => Point[];
871
+ declare const getCurvePoints: (board: PlaitBoard, element: PlaitArrowLine) => Point[];
872
+ declare const drawArrowLine: (board: PlaitBoard, element: PlaitArrowLine) => SVGGElement;
873
+ declare const getHitConnection: (board: PlaitBoard, point: Point, hitElement: PlaitShapeElement) => Point;
874
+ declare const getHitConnectionFromConnectionPoint: (connectionPoint: Point, hitElement: PlaitShapeElement) => Point;
875
+ declare const getHitConnectorPoint: (point: Point, hitElement: PlaitShapeElement) => Point | undefined;
876
+ declare const getArrowLineTextRectangle: (board: PlaitBoard, element: PlaitArrowLine, index: number) => RectangleClient;
877
+ declare const getArrowLines: (board: PlaitBoard) => PlaitArrowLine[];
878
+ declare const Q2C: (points: Point[]) => Point[];
879
+ declare const handleArrowLineCreating: (board: PlaitBoard, lineShape: ArrowLineShape, sourcePoint: Point, movingPoint: Point, sourceElement: PlaitShapeElement | null, lineShapeG: SVGGElement, options?: Pick<PlaitArrowLine, "strokeColor" | "strokeWidth">) => PlaitArrowLine;
880
+
881
+ declare const getArrowLineHandleRefPair: (board: PlaitBoard, element: PlaitArrowLine) => ArrowLineHandleRefPair;
882
+ declare const getConnectionPoint: (geometry: PlaitShapeElement, connection: Point, direction?: Direction, delta?: number) => Point;
883
+ declare const getVectorByConnection: (boundElement: PlaitShapeElement, connection: PointOfRectangle) => Vector;
884
+ declare const getElbowLineRouteOptions: (board: PlaitBoard, element: PlaitArrowLine, handleRefPair?: ArrowLineHandleRefPair) => {
885
+ sourcePoint: PointOfRectangle;
886
+ nextSourcePoint: Point;
887
+ sourceRectangle: RectangleClient;
888
+ sourceOuterRectangle: {
889
+ x: number;
890
+ y: number;
891
+ width: number;
892
+ height: number;
893
+ };
894
+ targetPoint: PointOfRectangle;
895
+ nextTargetPoint: Point;
896
+ targetRectangle: RectangleClient;
897
+ targetOuterRectangle: {
898
+ x: number;
899
+ y: number;
900
+ width: number;
901
+ height: number;
902
+ };
903
+ };
904
+ declare const collectArrowLineUpdatedRefsByGeometry: (board: PlaitBoard, element: PlaitShapeElement, refs: {
905
+ property: Partial<PlaitArrowLine>;
906
+ path: Path;
907
+ }[]) => void;
908
+
909
+ declare const alignPoints: (basePoint: Point, movingPoint: Point) => Point;
910
+ declare function getResizedPreviousAndNextPoint(nextRenderPoints: Point[], sourcePoint: Point, targetPoint: Point, handleIndex: number): {
911
+ previous: Point | null;
912
+ next: Point | null;
913
+ };
914
+ declare function alignElbowSegment(startKeyPoint: Point, endKeyPoint: Point, resizeState: ResizeState, resizedPreviousAndNextPoint: {
915
+ previous: Point | null;
916
+ next: Point | null;
917
+ }): Point[];
918
+ declare function getIndexAndDeleteCountByKeyPoint(board: PlaitBoard, element: PlaitArrowLine, dataPoints: Point[], nextRenderPoints: Point[], handleIndex: number): {
919
+ index: null;
920
+ deleteCount: null;
921
+ } | {
922
+ index: number;
923
+ deleteCount: number | null;
924
+ };
925
+ declare function getMirrorDataPoints(board: PlaitBoard, nextDataPoints: Point[], nextKeyPoints: Point[], params: ElbowLineRouteOptions): Point[];
926
+ declare function isUpdatedHandleIndex(board: PlaitBoard, element: PlaitArrowLine, dataPoints: Point[], nextRenderPoints: Point[], handleIndex: number): boolean;
927
+ declare function getMidKeyPoints(simplifiedNextKeyPoints: Point[], startPoint: Point, endPoint: Point): Point[];
928
+ declare const hasIllegalElbowPoint: (midDataPoints: Point[]) => boolean;
929
+
930
+ type GeometryStyleOptions = Pick<PlaitGeometry, 'fill' | 'strokeColor' | 'strokeWidth'>;
931
+ type TextProperties = Partial<CustomText> & {
932
+ align?: Alignment;
933
+ };
934
+ declare const createGeometryElement: (shape: GeometryShapes, points: [Point, Point], text: string | Element, options?: GeometryStyleOptions, textProperties?: TextProperties) => PlaitGeometry;
935
+ declare const createGeometryElementWithText: (shape: GeometryShapes, points: [Point, Point], text: string | Element, options?: GeometryStyleOptions, textProperties?: TextProperties) => PlaitGeometry;
936
+ declare const createGeometryElementWithoutText: (shape: GeometryShapes, points: [Point, Point], options?: GeometryStyleOptions) => PlaitGeometry;
937
+ declare const drawGeometry: (board: PlaitBoard, outerRectangle: RectangleClient, shape: GeometryShapes, roughOptions: Options) => SVGGElement;
938
+ declare const getNearestPoint: (element: PlaitShapeElement, point: Point) => Point;
939
+ declare const getCenterPointsOnPolygon: (points: Point[]) => Point[];
940
+ declare const getDefaultFlowchartProperty: (symbol: FlowchartSymbols) => {
941
+ width: number;
942
+ height: number;
943
+ } | {
944
+ width: number;
945
+ height: number;
946
+ } | {
947
+ width: number;
948
+ height: number;
949
+ } | {
950
+ width: number;
951
+ height: number;
952
+ } | {
953
+ width: number;
954
+ height: number;
955
+ } | {
956
+ width: number;
957
+ height: number;
958
+ } | {
959
+ width: number;
960
+ height: number;
961
+ } | {
962
+ width: number;
963
+ height: number;
964
+ } | {
965
+ width: number;
966
+ height: number;
967
+ } | {
968
+ width: number;
969
+ height: number;
970
+ } | {
971
+ width: number;
972
+ height: number;
973
+ };
974
+ declare const getDefaultBasicShapeProperty: (shape: BasicShapes) => {
975
+ width: number;
976
+ height: number;
977
+ };
978
+ declare const getDefaultUMLProperty: (shape: UMLSymbols) => {
979
+ width: number;
980
+ height: number;
981
+ } | {
982
+ width: number;
983
+ height: number;
984
+ } | {
985
+ width: number;
986
+ height: number;
987
+ } | {
988
+ width: number;
989
+ height: number;
990
+ } | {
991
+ width: number;
992
+ height: number;
993
+ texts: {
994
+ id: _plait_draw.GeometryCommonTextKeys;
995
+ text: string;
996
+ align: Alignment;
997
+ }[];
998
+ } | {
999
+ width: number;
1000
+ height: number;
1001
+ } | {
1002
+ width: number;
1003
+ height: number;
1004
+ } | {
1005
+ width: number;
1006
+ height: number;
1007
+ } | {
1008
+ width: number;
1009
+ height: number;
1010
+ } | {
1011
+ width: number;
1012
+ height: number;
1013
+ } | {
1014
+ width: number;
1015
+ height: number;
1016
+ } | {
1017
+ width: number;
1018
+ height: number;
1019
+ } | {
1020
+ width: number;
1021
+ height: number;
1022
+ } | {
1023
+ width: number;
1024
+ height: number;
1025
+ texts: {
1026
+ id: _plait_draw.GeometryCommonTextKeys;
1027
+ text: string;
1028
+ align: Alignment;
1029
+ }[];
1030
+ } | {
1031
+ width: number;
1032
+ height: number;
1033
+ texts: {
1034
+ text: string;
1035
+ align: Alignment;
1036
+ }[];
1037
+ } | {
1038
+ width: number;
1039
+ height: number;
1040
+ texts: {
1041
+ text: string;
1042
+ align: Alignment;
1043
+ }[];
1044
+ };
1045
+ declare const getAutoCompletePoints: (board: PlaitBoard, element: PlaitShapeElement, isToActive?: boolean) => [Point, Point, Point, Point];
1046
+ declare const getHitIndexOfAutoCompletePoint: (movingPoint: Point, points: Point[]) => number;
1047
+ declare const getDrawDefaultStrokeColor: (theme: ThemeColorMode) => string;
1048
+ declare const getFlowchartDefaultFill: (theme: ThemeColorMode) => string;
1049
+ declare const getTextShapeProperty: (board: PlaitBoard, text: string | Element, fontSize?: number | string) => {
1050
+ width: number;
1051
+ height: number;
1052
+ };
1053
+ declare const getDefaultGeometryPoints: (pointer: DrawPointerType, centerPoint: Point) => [Point, Point];
1054
+ declare const getDefaultGeometryProperty: (pointer: DrawPointerType) => {
1055
+ width: number;
1056
+ height: number;
1057
+ };
1058
+ declare const getDefaultTextPoints: (board: PlaitBoard, centerPoint: Point, fontSize?: number | string) => [Point, Point];
1059
+ declare const createTextElement: (board: PlaitBoard, points: [Point, Point], text: string | Element) => PlaitGeometry;
1060
+ declare const createDefaultGeometry: (board: PlaitBoard, points: [Point, Point], shape: GeometryShapes) => _plait_draw.PlaitCommonGeometry<"geometry", [Point, Point], GeometryShapes>;
1061
+ declare const editText: (board: PlaitBoard, element: PlaitGeometry, text?: DrawTextInfo) => void;
1062
+ declare const isGeometryIncludeText: (element: PlaitGeometry) => boolean;
1063
+ declare const isSingleTextShape: (shape: GeometryShapes) => boolean;
1064
+ declare const isSingleTextGeometry: (element: PlaitGeometry) => boolean;
1065
+ declare const isGeometryClosed: (element: PlaitGeometry) => boolean;
1066
+
1067
+ declare const isMultipleTextShape: (shape: GeometryShapes) => boolean;
1068
+ declare const isMultipleTextGeometry: (geometry: PlaitElement) => geometry is PlaitMultipleTextGeometry;
1069
+ declare const getMultipleTextGeometryTextKeys: (shape: GeometryShapes) => string[] | undefined;
1070
+ declare const createMultipleTextGeometryElement: (shape: GeometryShapes, points: [Point, Point], options?: GeometryStyleOptions) => PlaitMultipleTextGeometry;
1071
+ declare const buildDefaultTextsByShape: (shape: GeometryShapes) => DrawTextInfo[];
1072
+ declare const getHitMultipleGeometryText: (board: PlaitBoard, element: PlaitMultipleTextGeometry, point: Point) => DrawTextInfo | undefined;
1073
+
1074
+ declare const createUMLClassOrInterfaceGeometryElement: (board: PlaitBoard, shape: GeometryShapes, points: [Point, Point]) => PlaitCommonGeometry;
1075
+
1076
+ declare const getSelectedDrawElements: (board: PlaitBoard, elements?: PlaitElement[]) => PlaitDrawElement[];
1077
+ declare const getSelectedGeometryElements: (board: PlaitBoard) => PlaitGeometry[];
1078
+ declare const getSelectedCustomGeometryElements: (board: PlaitBoard) => PlaitCustomGeometry<string, _plait_core.Point[], string>[];
1079
+ declare const getSelectedArrowLineElements: (board: PlaitBoard) => PlaitArrowLine[];
1080
+ declare const getSelectedVectorLineElements: (board: PlaitBoard) => PlaitVectorLine[];
1081
+ declare const getSelectedImageElements: (board: PlaitBoard) => PlaitImage[];
1082
+ declare const isSingleSelectSwimlane: (board: PlaitBoard) => boolean;
1083
+ declare const isSingleSelectLine: (board: PlaitBoard) => boolean;
1084
+ declare const getSelectedSwimlane: (board: PlaitBoard) => PlaitSwimlane;
1085
+
1086
+ declare const getStrokeColorByElement: (board: PlaitBoard, element: PlaitElement) => any;
1087
+ declare const getFillByElement: (board: PlaitBoard, element: PlaitElement) => any;
1088
+ declare const getStrokeStyleByElement: (board: PlaitBoard, element: PlaitElement) => any;
1089
+
1090
+ declare const isHitArrowLineText: (board: PlaitBoard, element: PlaitArrowLine, point: Point) => boolean;
1091
+ declare const isHitPolyLine: (pathPoints: Point[], point: Point) => boolean;
1092
+ declare const isHitArrowLine: (board: PlaitBoard, element: PlaitArrowLine, point: Point) => boolean;
1093
+ declare const isHitVectorLine: (board: PlaitBoard, element: PlaitVectorLine, point: Point) => boolean;
1094
+ declare const isRectangleHitElementText: (board: PlaitBoard, element: PlaitCommonGeometry, rectangle: RectangleClient) => boolean;
1095
+ declare const isHitElementText: (board: PlaitBoard, element: PlaitCommonGeometry, point: Point) => boolean;
1096
+ declare const isEmptyTextElement: (element: PlaitCommonGeometry) => boolean;
1097
+ declare const isRectangleHitDrawElement: (board: PlaitBoard, element: PlaitElement, selection: Selection) => boolean | null;
1098
+ declare const isRectangleHitRotatedElement: (board: PlaitBoard, rectangle: RectangleClient, element: PlaitElement & {
1099
+ points: Point[];
1100
+ }) => boolean;
1101
+ declare const isRectangleHitRotatedPoints: (rectangle: RectangleClient, points: Point[], angle: number | undefined) => boolean;
1102
+ declare const getHitDrawElement: (board: PlaitBoard, elements: (PlaitDrawElement | PlaitCustomGeometry)[]) => PlaitElement;
1103
+ declare const getFirstFilledDrawElement: (board: PlaitBoard, elements: (PlaitDrawElement | PlaitCustomGeometry)[]) => PlaitGeometry | PlaitCustomGeometry<string, Point[], string> | null;
1104
+ declare const isFilledDrawElement: (board: PlaitBoard, element: PlaitDrawElement | PlaitCustomGeometry) => boolean;
1105
+ declare const getSolidElements: (elements: PlaitElement[]) => (PlaitLine | _plait_draw.PlaitText | PlaitImage)[] | null;
1106
+ declare const isHitDrawElement: (board: PlaitBoard, element: PlaitElement, point: Point, isStrict?: boolean) => boolean | null;
1107
+ declare const isHitEdgeOfShape: (board: PlaitBoard, element: PlaitShapeElement, point: Point, hitDistanceBuffer: number) => boolean;
1108
+ declare const isInsideOfShape: (board: PlaitBoard, element: PlaitShapeElement, point: Point, hitDistanceBuffer: number) => boolean;
1109
+ declare const isHitElementInside: (board: PlaitBoard, element: PlaitElement, point: Point) => boolean | null;
1110
+
1111
+ declare const getMemorizeKey: (element: PlaitElement) => string;
1112
+ declare const getLineMemorizedLatest: () => {
1113
+ [key: string]: any;
1114
+ id: string;
1115
+ children?: PlaitElement[];
1116
+ points?: _plait_core.Point[];
1117
+ type?: string;
1118
+ groupId?: string;
1119
+ angle?: number;
1120
+ };
1121
+ declare const getMemorizedLatestByPointer: (pointer: DrawPointerType) => {
1122
+ textProperties: any;
1123
+ geometryProperties: {
1124
+ [key: string]: any;
1125
+ id: string;
1126
+ children?: PlaitElement[];
1127
+ points?: _plait_core.Point[];
1128
+ type?: string;
1129
+ groupId?: string;
1130
+ angle?: number;
1131
+ };
1132
+ };
1133
+ declare const memorizeLatestText: <T extends PlaitElement = PlaitDrawElement>(element: T, operations: BaseOperation[]) => void;
1134
+ declare const memorizeLatestShape: (board: PlaitBoard, shape: GeometryShapes) => void;
1135
+ declare const getMemorizedLatestShape: (board: PlaitBoard) => GeometryShapes[] | undefined;
1136
+
1137
+ declare const getTextRectangle: <T extends PlaitElement = PlaitGeometry>(board: PlaitBoard, element: T) => {
1138
+ height: number;
1139
+ width: number;
1140
+ x: any;
1141
+ y: number;
1142
+ };
1143
+ declare const getCustomTextRectangle: <T extends PlaitElement = PlaitGeometry>(board: PlaitBoard, element: T, widthRatio: number) => {
1144
+ height: number;
1145
+ width: number;
1146
+ x: number;
1147
+ y: number;
1148
+ };
1149
+ declare const getStrokeWidthByElement: (element: PlaitElement) => any;
1150
+ declare const insertElement: (board: PlaitBoard, element: PlaitBaseGeometry | PlaitBaseTable) => void;
1151
+ declare const isDrawElementIncludeText: (element: PlaitDrawElement) => boolean;
1152
+ declare const isDrawElementsIncludeText: (elements: PlaitDrawElement[]) => boolean;
1153
+ declare const isClosedDrawElement: (element: PlaitElement) => boolean;
1154
+ declare const isClosedCustomGeometry: (board: PlaitBoard, value: PlaitElement) => value is PlaitCustomGeometry;
1155
+ declare const getSnappingShape: (board: PlaitBoard, point: Point) => PlaitShapeElement | null;
1156
+ declare const getSnappingRef: (board: PlaitBoard, hitElement: PlaitShapeElement, point: Point) => {
1157
+ isHitEdge: boolean;
1158
+ isHitConnector: boolean;
1159
+ connectorPoint: Point | undefined;
1160
+ edgePoint: Point;
1161
+ };
1162
+ declare const getHitShape: (board: PlaitBoard, point: Point, offset?: number) => PlaitShapeElement | null;
1163
+ declare const traverseDrawShapes: (board: PlaitBoard, callback: (element: PlaitShapeElement) => void) => void;
1164
+ declare const drawShape: (board: PlaitBoard, outerRectangle: RectangleClient, shape: DrawShapes, roughOptions: Options, drawOptions?: DrawOptions) => SVGGElement;
1165
+ declare const drawBoundReaction: (board: PlaitBoard, element: PlaitShapeElement, roughOptions?: {
1166
+ hasMask: boolean;
1167
+ hasConnector: boolean;
1168
+ }) => SVGGElement;
1169
+ declare const getTextKey: (element: PlaitElement | undefined, text: Pick<DrawTextInfo, "id">) => string;
1170
+ declare const getGeometryAlign: (board: PlaitBoard, element: PlaitCommonGeometry | PlaitBaseTable) => Alignment;
1171
+ declare const isClosedPoints: (points: Point[]) => boolean;
1172
+ declare const getDefaultGeometryText: (board: PlaitBoard) => string;
1173
+
1174
+ declare const debugGenerator: _plait_core.DebugGenerator;
1175
+ interface ResizeSnapRef extends SnapRef {
1176
+ xZoom: number;
1177
+ yZoom: number;
1178
+ activePoints: Point[];
1179
+ }
1180
+ interface ResizeSnapOptions {
1181
+ resizePoints: Point[];
1182
+ activeRectangle: RectangleClient;
1183
+ directionFactors: DirectionFactors;
1184
+ isFromCorner: boolean;
1185
+ isAspectRatio: boolean;
1186
+ resizeOriginPoint?: Point[];
1187
+ originPoint?: Point;
1188
+ handlePoint?: Point;
1189
+ isCreate?: boolean;
1190
+ }
1191
+ declare function getSnapResizingRefOptions(board: PlaitBoard, resizeRef: ResizeRef<PlaitDrawElement | PlaitCustomGeometry | (PlaitDrawElement | PlaitCustomGeometry)[]>, resizeState: ResizeState, resizeOriginPointAndHandlePoint: {
1192
+ originPoint: Point;
1193
+ handlePoint: Point;
1194
+ }, isAspectRatio: boolean, isFromCorner: boolean): ResizeSnapOptions;
1195
+ declare function getSnapResizingRef(board: PlaitBoard, activeElements: PlaitElement[], resizeSnapOptions: ResizeSnapOptions): ResizeSnapRef;
1196
+
1197
+ declare function getCellsWithPoints(board: PlaitBoard, element: PlaitBaseTable): PlaitTableCellWithPoints[];
1198
+ declare function getCellWithPoints(board: PlaitBoard, table: PlaitBaseTable, cellId: string): PlaitTableCellWithPoints;
1199
+ declare function getHitCell(board: PlaitTableBoard, element: PlaitBaseTable, point: Point): PlaitTableCell | null | undefined;
1200
+ declare function editCell(board: PlaitBoard, cell: PlaitTableCell): void;
1201
+ declare function getTextManageByCell(board: PlaitBoard, cell: PlaitTableCell): _plait_common.TextManage;
1202
+ declare const updateColumns: (table: PlaitBaseTable, columnId: string, width: number, offset: number) => {
1203
+ columns: {
1204
+ id: string;
1205
+ width?: number;
1206
+ }[];
1207
+ points: Point[];
1208
+ };
1209
+ declare const updateRows: (table: PlaitBaseTable, rowId: string, height: number, offset: number) => {
1210
+ rows: {
1211
+ id: string;
1212
+ height?: number;
1213
+ }[];
1214
+ points: Point[];
1215
+ };
1216
+ declare function updateCellIdsByRowOrColumn(cells: PlaitTableCell[], oldId: string, newId: string, type: 'row' | 'column'): void;
1217
+ declare function updateRowOrColumnIds(element: PlaitTable, type: 'row' | 'column'): void;
1218
+ declare function updateCellIds(cells: PlaitTableCell[]): void;
1219
+ declare function isCellIncludeText(cell: PlaitTableCell): _plait_draw.PlaitTableCellParagraph | undefined;
1220
+ declare function getCellsRectangle(board: PlaitTableBoard, element: PlaitTable, cells: PlaitTableCell[]): RectangleClient;
1221
+ declare const createCell: (rowId: string, columnId: string, text?: string | null) => PlaitTableCell;
1222
+ declare const getSelectedTableCellsEditor: (board: PlaitBoard) => BaseEditor[] | undefined;
1223
+
1224
+ declare const isSingleSelectTable: (board: PlaitBoard) => boolean;
1225
+ declare const getSelectedTableElements: (board: PlaitBoard, elements?: PlaitElement[]) => PlaitTable[];
1226
+ declare const SELECTED_CELLS: WeakMap<PlaitBaseTable, PlaitTableCell[]>;
1227
+ declare function getSelectedCells(element: PlaitBaseTable): PlaitTableCell[] | undefined;
1228
+ declare function setSelectedCells(element: PlaitBaseTable, cells: PlaitTableCell[]): WeakMap<PlaitBaseTable, PlaitTableCell[]>;
1229
+ declare function clearSelectedCells(element: PlaitBaseTable): boolean;
1230
+
1231
+ declare function buildSwimlaneTable(element: PlaitSwimlane): {
1232
+ [key: string]: any;
1233
+ type: "swimlane";
1234
+ shape: SwimlaneSymbols;
1235
+ header?: boolean;
1236
+ id: string;
1237
+ points: Point[];
1238
+ rows: {
1239
+ id: string;
1240
+ height?: number;
1241
+ }[];
1242
+ columns: {
1243
+ id: string;
1244
+ width?: number;
1245
+ }[];
1246
+ cells: PlaitTableCell[];
1247
+ groupId?: string;
1248
+ children?: _plait_core.PlaitElement[];
1249
+ angle?: number;
1250
+ };
1251
+ declare const getDefaultSwimlanePoints: (pointer: SwimlaneDrawSymbols, centerPoint: Point) => [Point, Point];
1252
+ declare const createDefaultSwimlane: (shape: SwimlaneDrawSymbols, points: [Point, Point]) => PlaitSwimlane;
1253
+ declare const createDefaultRowsOrColumns: (shape: SwimlaneSymbols, type: "row" | "column", header: boolean, size: number) => {
1254
+ id: string;
1255
+ }[];
1256
+ declare const createDefaultCells: (shape: SwimlaneSymbols, rows: {
1257
+ id: string;
1258
+ height?: number;
1259
+ }[], columns: {
1260
+ id: string;
1261
+ width?: number;
1262
+ }[], header: boolean) => PlaitTableCell[];
1263
+ declare const getSwimlaneCount: (swimlane: PlaitSwimlane) => number;
1264
+ declare const isSwimlaneWithHeader: (shape: SwimlaneDrawSymbols) => boolean;
1265
+ declare const isSwimlaneShape: (shape: SwimlaneSymbols) => boolean;
1266
+ declare const adjustSwimlaneShape: (shape: SwimlaneDrawSymbols) => SwimlaneSymbols;
1267
+ declare const isSwimlanePointers: (board: PlaitBoard, pointer?: string) => boolean;
1268
+
1269
+ declare function getMiddlePoints(board: PlaitBoard, element: PlaitLine): Point[];
1270
+
1271
+ declare const getVectorLinePoints: (board: PlaitBoard, element: PlaitVectorLine) => Point[] | null;
1272
+ declare const createVectorLineElement: (shape: VectorLineShape, points: Point[], options?: Pick<PlaitVectorLine, "strokeColor" | "strokeWidth" | "fill">) => PlaitVectorLine;
1273
+ declare const vectorLineCreating: (board: PlaitBoard, lineShape: VectorLineShape, points: Point[], movingPoint: Point, lineShapeG: SVGGElement) => PlaitVectorLine;
1274
+ declare const drawVectorLine: (board: PlaitBoard, element: PlaitVectorLine) => SVGGElement;
1275
+
1276
+ declare const buildClipboardData: (board: PlaitBoard, elements: PlaitDrawElement[], startPoint: Point) => (PlaitElement | {
1277
+ points: number[][];
1278
+ id: string;
1279
+ children?: PlaitElement[];
1280
+ type?: string;
1281
+ groupId?: string;
1282
+ angle?: number;
1283
+ })[];
1284
+ declare const insertClipboardData: (board: PlaitBoard, elements: PlaitDrawElement[], startPoint: Point) => void;
1285
+
1286
+ interface ShapeData {
1287
+ }
1288
+ declare class GeometryShapeGenerator extends Generator<PlaitGeometry, ShapeData> {
1289
+ canDraw(element: PlaitGeometry, data: ShapeData): boolean;
1290
+ draw(element: PlaitGeometry, data: ShapeData): SVGGElement | undefined;
1291
+ }
1292
+
1293
+ declare class ArrowLineAutoCompleteGenerator<T extends PlaitShapeElement = PlaitGeometry> extends Generator<T, ActiveGeneratorExtraData> {
1294
+ board: PlaitBoard;
1295
+ static key: string;
1296
+ autoCompleteG: SVGGElement;
1297
+ hoverElement: SVGGElement | null;
1298
+ constructor(board: PlaitBoard);
1299
+ canDraw(element: PlaitShapeElement, data: ActiveGeneratorExtraData): boolean;
1300
+ draw(element: T, data: ActiveGeneratorExtraData): SVGGElement;
1301
+ removeAutoCompleteG(index: number): void;
1302
+ recoverAutoCompleteG(): void;
1303
+ }
1304
+
1305
+ declare class SingleTextGenerator<T extends PlaitElement = PlaitGeometry> extends TextGenerator<T> {
1306
+ get textManage(): _plait_common.TextManage;
1307
+ constructor(board: PlaitBoard, element: T, text: ParagraphElement, options: TextGeneratorOptions<T>);
1308
+ update(element: T, previousDrawShapeTexts: DrawTextInfo[], currentDrawShapeTexts: DrawTextInfo[], elementG: SVGElement): void;
1309
+ update(element: T, previousText: ParagraphElement, currentText: ParagraphElement, elementG: SVGElement): void;
1310
+ }
1311
+
1312
+ declare class GeometryComponent extends CommonElementFlavour<PlaitCommonGeometry, PlaitBoard> implements OnContextChanged<PlaitCommonGeometry, PlaitBoard> {
1313
+ activeGenerator: ActiveGenerator<PlaitCommonGeometry>;
1314
+ lineAutoCompleteGenerator: ArrowLineAutoCompleteGenerator;
1315
+ shapeGenerator: GeometryShapeGenerator;
1316
+ textGenerator: TextGenerator<PlaitMultipleTextGeometry> | SingleTextGenerator;
1317
+ constructor();
1318
+ initializeGenerator(): void;
1319
+ initialize(): void;
1320
+ onContextChanged(value: PlaitPluginElementContext<PlaitCommonGeometry, PlaitBoard>, previous: PlaitPluginElementContext<PlaitCommonGeometry, PlaitBoard>): void;
1321
+ updateText(previousElement: PlaitCommonGeometry, currentElement: PlaitCommonGeometry): void;
1322
+ initializeTextManage(): void;
1323
+ destroy(): void;
1324
+ }
1325
+
1326
+ interface ActiveData {
1327
+ selected: boolean;
1328
+ linePoints: Point[];
1329
+ }
1330
+ declare class LineActiveGenerator extends Generator<PlaitLine, ActiveData> {
1331
+ protected board: PlaitBoard;
1332
+ onlySelectedCurrentLine: boolean;
1333
+ constructor(board: PlaitBoard, options?: {
1334
+ active: boolean;
1335
+ });
1336
+ canDraw(element: PlaitLine, data: ActiveData): boolean;
1337
+ draw(element: PlaitLine, data: ActiveData): SVGGElement;
1338
+ needUpdate(): boolean;
1339
+ }
1340
+
1341
+ declare class ArrowLineShapeGenerator extends Generator<PlaitArrowLine> {
1342
+ canDraw(element: PlaitArrowLine): boolean;
1343
+ draw(element: PlaitArrowLine): SVGGElement;
1344
+ }
1345
+
1346
+ interface BoundedElements {
1347
+ source?: PlaitGeometry;
1348
+ target?: PlaitGeometry;
1349
+ }
1350
+ declare class ArrowLineComponent extends CommonElementFlavour<PlaitArrowLine, PlaitBoard> implements OnContextChanged<PlaitArrowLine, PlaitBoard> {
1351
+ shapeGenerator: ArrowLineShapeGenerator;
1352
+ activeGenerator: LineActiveGenerator;
1353
+ boundedElements: BoundedElements;
1354
+ constructor();
1355
+ initializeGenerator(): void;
1356
+ initialize(): void;
1357
+ getBoundedElements(): BoundedElements;
1358
+ onContextChanged(value: PlaitPluginElementContext<PlaitArrowLine, PlaitBoard>, previous: PlaitPluginElementContext<PlaitArrowLine, PlaitBoard>): void;
1359
+ initializeTextManages(): void;
1360
+ drawText(): void;
1361
+ createTextManage(text: ArrowLineText, index: number): TextManage;
1362
+ updateText(previousTexts: ArrowLineText[], currentTexts: ArrowLineText[]): void;
1363
+ updateTextRectangle(): void;
1364
+ destroy(): void;
1365
+ }
1366
+
1367
+ declare class VectorLineShapeGenerator extends Generator<PlaitVectorLine> {
1368
+ canDraw(element: PlaitVectorLine): boolean;
1369
+ draw(element: PlaitVectorLine): SVGGElement;
1370
+ }
1371
+
1372
+ declare class VectorLineComponent extends CommonElementFlavour<PlaitVectorLine, PlaitBoard> implements OnContextChanged<PlaitVectorLine, PlaitBoard> {
1373
+ shapeGenerator: VectorLineShapeGenerator;
1374
+ activeGenerator: LineActiveGenerator;
1375
+ constructor();
1376
+ initializeGenerator(): void;
1377
+ initialize(): void;
1378
+ onContextChanged(value: PlaitPluginElementContext<PlaitVectorLine, PlaitBoard>, previous: PlaitPluginElementContext<PlaitVectorLine, PlaitBoard>): void;
1379
+ destroy(): void;
1380
+ }
1381
+
1382
+ declare const DrawTransforms: {
1383
+ setText: (board: _plait_core.PlaitBoard, element: _plait_draw.PlaitGeometry, text: slate.Element, width: number, height: number) => void;
1384
+ setDrawTexts: (board: _plait_core.PlaitBoard, element: _plait_draw.PlaitMultipleTextGeometry, text: _plait_draw.DrawTextInfo) => void;
1385
+ insertGeometry: (board: _plait_core.PlaitBoard, points: [_plait_core.Point, _plait_core.Point], shape: _plait_draw.GeometryShapes) => _plait_draw.PlaitCommonGeometry<"geometry", [_plait_core.Point, _plait_core.Point], _plait_draw.GeometryShapes>;
1386
+ resizeGeometry: (board: _plait_core.PlaitBoard, points: [_plait_core.Point, _plait_core.Point], path: _plait_core.Path) => void;
1387
+ insertText: (board: _plait_core.PlaitBoard, point: _plait_core.Point, text: string | slate.Element) => void;
1388
+ setTextSize: (board: _plait_core.PlaitBoard, element: _plait_draw.PlaitGeometry, width: number, height: number) => void;
1389
+ resizeArrowLine: (board: _plait_core.PlaitBoard, options: Partial<_plait_draw.PlaitArrowLine>, path: _plait_core.Path) => void;
1390
+ setArrowLineTexts: (board: _plait_core.PlaitBoard, element: _plait_draw.PlaitArrowLine, texts: _plait_draw.ArrowLineText[]) => void;
1391
+ removeArrowLineText: (board: _plait_core.PlaitBoard, element: _plait_draw.PlaitArrowLine, index: number) => void;
1392
+ setArrowLineMark: (board: _plait_core.PlaitBoard, handleKey: _plait_draw.ArrowLineHandleKey, marker: _plait_draw.ArrowLineMarkerType) => void;
1393
+ setArrowLineShape: (board: _plait_core.PlaitBoard, newProperties: Partial<_plait_draw.PlaitArrowLine>) => void;
1394
+ setVectorLineShape: (board: _plait_core.PlaitBoard, newProperties: Partial<_plait_draw.PlaitVectorLine>) => void;
1395
+ insertImage: (board: _plait_core.PlaitBoard, imageItem: _plait_common.CommonImageItem, startPoint?: _plait_core.Point) => void;
1396
+ connectArrowLineToDraw: (board: _plait_core.PlaitBoard, lineElement: _plait_draw.PlaitArrowLine, handle: _plait_draw.ArrowLineHandleKey, geometryElement: _plait_draw.PlaitShapeElement) => void;
1397
+ switchGeometryShape: (board: _plait_core.PlaitBoard, shape: _plait_draw.GeometryShapes) => void;
1398
+ setTableText: (board: _plait_core.PlaitBoard, path: _plait_core.Path, cellId: string, text: slate.Element, textHeight: number) => void;
1399
+ addSwimlaneRow: (board: _plait_core.PlaitBoard, swimlane: _plait_draw.PlaitSwimlane, index: number, count?: number) => void;
1400
+ addSwimlaneColumn: (board: _plait_core.PlaitBoard, swimlane: _plait_draw.PlaitSwimlane, index: number, count?: number) => void;
1401
+ removeSwimlaneRow: (board: _plait_core.PlaitBoard, swimlane: _plait_draw.PlaitSwimlane, index: number, count?: number) => void;
1402
+ removeSwimlaneColumn: (board: _plait_core.PlaitBoard, swimlane: _plait_draw.PlaitSwimlane, index: number, count?: number) => void;
1403
+ updateSwimlaneCount: (board: _plait_core.PlaitBoard, swimlane: _plait_draw.PlaitSwimlane, count: number) => void;
1404
+ setTableFill: (board: _plait_core.PlaitBoard, element: _plait_draw.PlaitBaseTable, fill: string | null, path: _plait_core.Path) => void;
1405
+ insertDrawByVector: (board: _plait_core.PlaitBoard, point: _plait_core.Point, shape: _plait_draw.GeometryShapes | _plait_draw.SwimlaneDrawSymbols, vector: _plait_core.Vector) => _plait_draw.PlaitCommonGeometry<"geometry", [_plait_core.Point, _plait_core.Point], _plait_draw.GeometryShapes> | _plait_draw.PlaitSwimlane | null;
1406
+ };
1407
+
1408
+ interface TableData {
1409
+ }
1410
+ declare class TableGenerator<T extends PlaitElement = PlaitBaseTable> extends Generator<T, TableData> {
1411
+ canDraw(element: T, data: TableData): boolean;
1412
+ draw(element: T, data: TableData): SVGGElement;
1413
+ }
1414
+
1415
+ export { ArrowLineAutoCompleteGenerator, ArrowLineComponent, ArrowLineHandleKey, ArrowLineMarkerType, ArrowLineShape, BOARD_TO_PRE_COMMIT, BasicShapes, DEFAULT_IMAGE_WIDTH, DefaultActivationProperty, DefaultActorProperty, DefaultArrowProperty, DefaultAssemblyProperty, DefaultBasicShapeProperty, DefaultBasicShapePropertyMap, DefaultClassProperty, DefaultCloudProperty, DefaultCombinedFragmentProperty, DefaultComponentBoxProperty, DefaultConnectorProperty, DefaultContainerProperty, DefaultDataBaseProperty, DefaultDataProperty, DefaultDecisionProperty, DefaultDeletionProperty, DefaultDocumentProperty, DefaultDrawActiveStyle, DefaultDrawStyle, DefaultFlowchartProperty, DefaultFlowchartPropertyMap, DefaultInterfaceProperty, DefaultInternalStorageProperty, DefaultLineStyle, DefaultManualInputProperty, DefaultMergeProperty, DefaultMultiDocumentProperty, DefaultNoteProperty, DefaultObjectProperty, DefaultPackageProperty, DefaultPentagonArrowProperty, DefaultPortProperty, DefaultProvidedInterfaceProperty, DefaultRequiredInterfaceProperty, DefaultSwimlaneHorizontalProperty, DefaultSwimlaneHorizontalWithHeaderProperty, DefaultSwimlanePropertyMap, DefaultSwimlaneVerticalProperty, DefaultSwimlaneVerticalWithHeaderProperty, DefaultTextProperty, DefaultTwoWayArrowProperty, DefaultUMLPropertyMap, DrawI18nKey, DrawThemeColors, DrawTransforms, FlowchartSymbols, GEOMETRY_NOT_CLOSED, GEOMETRY_WITHOUT_TEXT, GEOMETRY_WITH_MULTIPLE_TEXT, GeometryCommonTextKeys, GeometryComponent, GeometryShapeGenerator, GeometryThreshold, KEY_TO_TEXT_MANAGE, LINE_ALIGN_TOLERANCE, LINE_AUTO_COMPLETE_DIAMETER, LINE_AUTO_COMPLETE_HOVERED_DIAMETER, LINE_AUTO_COMPLETE_HOVERED_OPACITY, LINE_AUTO_COMPLETE_OPACITY, LINE_HIT_GEOMETRY_BUFFER, LINE_SNAPPING_BUFFER, LINE_SNAPPING_CONNECTOR_BUFFER, LINE_TEXT, LINE_TEXT_SPACE, LineActiveGenerator, MIN_TEXT_WIDTH, MemorizeKey, MultipleTextGeometryTextKeys, PlaitArrowLine, PlaitDrawElement, PlaitGeometry, PlaitTableElement, Q2C, SELECTED_CELLS, SWIMLANE_HEADER_SIZE, ShapeDefaultSpace, SingleTextGenerator, SwimlaneDrawSymbols, SwimlaneSymbols, TableGenerator, TableSymbols, TextGenerator, UMLSymbols, VectorLineComponent, VectorLinePointerType, VectorLineShape, WithArrowLineAutoCompletePluginKey, WithDrawPluginKey, adjustSwimlaneShape, alignElbowSegment, alignPoints, buildClipboardData, buildDefaultTextsByShape, buildSwimlaneTable, clearSelectedCells, collectArrowLineUpdatedRefsByGeometry, createArrowLineElement, createCell, createDefaultCells, createDefaultGeometry, createDefaultRowsOrColumns, createDefaultSwimlane, createGeometryElement, createGeometryElementWithText, createGeometryElementWithoutText, createMultipleTextGeometryElement, createTextElement, createUMLClassOrInterfaceGeometryElement, createVectorLineElement, debugGenerator, deleteTextManage, drawArrowLine, drawArrowLineArrow, drawBoundReaction, drawGeometry, drawShape, drawVectorLine, editCell, editText, getArrowLineHandleRefPair, getArrowLinePointers, getArrowLinePoints, getArrowLineTextRectangle, getArrowLines, getAutoCompletePoints, getBasicPointers, getCellWithPoints, getCellsRectangle, getCellsWithPoints, getCenterPointsOnPolygon, getConnectionPoint, getCurvePoints, getCustomTextRectangle, getDefaultBasicShapeProperty, getDefaultFlowchartProperty, getDefaultGeometryPoints, getDefaultGeometryProperty, getDefaultGeometryText, getDefaultSwimlanePoints, getDefaultTextPoints, getDefaultUMLProperty, getDrawDefaultStrokeColor, getElbowLineRouteOptions, getElbowPoints, getFillByElement, getFirstFilledDrawElement, getFlowchartDefaultFill, getFlowchartPointers, getGeometryAlign, getGeometryPointers, getHitCell, getHitConnection, getHitConnectionFromConnectionPoint, getHitConnectorPoint, getHitDrawElement, getHitIndexOfAutoCompletePoint, getHitMultipleGeometryText, getHitShape, getIndexAndDeleteCountByKeyPoint, getLineMemorizedLatest, getMemorizeKey, getMemorizedLatestByPointer, getMemorizedLatestShape, getMidKeyPoints, getMiddlePoints, getMirrorDataPoints, getMultipleTextGeometryTextKeys, getNearestPoint, getNextRenderPoints, getNextSourceAndTargetPoints, getResizedPreviousAndNextPoint, getSelectedArrowLineElements, getSelectedCells, getSelectedCustomGeometryElements, getSelectedDrawElements, getSelectedGeometryElements, getSelectedImageElements, getSelectedSwimlane, getSelectedTableCellsEditor, getSelectedTableElements, getSelectedVectorLineElements, getSnapResizingRef, getSnapResizingRefOptions, getSnappingRef, getSnappingShape, getSolidElements, getSourceAndTargetRectangle, getStrokeColorByElement, getStrokeStyleByElement, getStrokeWidthByElement, getSwimlaneCount, getSwimlanePointers, getSwimlaneShapes, getTextKey, getTextManage, getTextManageByCell, getTextRectangle, getTextShapeProperty, getUMLPointers, getVectorByConnection, getVectorLinePointers, getVectorLinePoints, handleArrowLineCreating, hasIllegalElbowPoint, insertClipboardData, insertElement, isCellIncludeText, isClosedCustomGeometry, isClosedDrawElement, isClosedPoints, isDrawElementIncludeText, isDrawElementsIncludeText, isEmptyTextElement, isFilledDrawElement, isGeometryClosed, isGeometryIncludeText, isHitArrowLine, isHitArrowLineText, isHitDrawElement, isHitEdgeOfShape, isHitElementInside, isHitElementText, isHitPolyLine, isHitVectorLine, isInsideOfShape, isMultipleTextGeometry, isMultipleTextShape, isRectangleHitDrawElement, isRectangleHitElementText, isRectangleHitRotatedElement, isRectangleHitRotatedPoints, isSelfLoop, isSingleSelectLine, isSingleSelectSwimlane, isSingleSelectTable, isSingleTextGeometry, isSingleTextShape, isSwimlanePointers, isSwimlaneShape, isSwimlaneWithHeader, isUpdatedHandleIndex, isUseDefaultOrthogonalRoute, memorizeLatestShape, memorizeLatestText, setSelectedCells, setTextManage, traverseDrawShapes, updateCellIds, updateCellIdsByRowOrColumn, updateColumns, updateRowOrColumnIds, updateRows, vectorLineCreating, withArrowLineAutoComplete, withDraw };
1416
+ export type { ActiveData, ArrowLineAutoCompleteOptions, ArrowLineHandle, ArrowLineHandleRef, ArrowLineHandleRefPair, ArrowLineText, DrawOptions, DrawPointerType, DrawShapes, DrawTextInfo, GeometryShapes, GeometryStyleOptions, PlaitBaseGeometry, PlaitBaseTable, PlaitCommonGeometry, PlaitCurveArrowLine, PlaitCustomGeometry, PlaitDiamond, PlaitElbowArrowLine, PlaitEllipse, PlaitMultipleTextGeometry, PlaitRectangle, PlaitShapeElement, PlaitStraightArrowLine, PlaitSwimlane, PlaitSwimlaneHorizontal, PlaitSwimlaneVertical, PlaitTable, PlaitTableBoard, PlaitTableCell, PlaitTableCellParagraph, PlaitTableCellWithPoints, PlaitTableDrawOptions, PlaitText, PlaitVectorLine, PreCommitRef, ResizeSnapOptions, ResizeSnapRef, ShapeData, ShapeEngine, SwimlaneDirection, TableData, TextGeneratorOptions, TextProperties, TextRectangleOptions, WithDrawOptions };