@plait/draw 0.56.2 → 0.57.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/constants/geometry.d.ts +4 -0
- package/constants/pointer.d.ts +2 -2
- package/engines/flowchart/display.d.ts +4 -0
- package/engines/table/table.d.ts +2 -0
- package/esm2022/constants/geometry.mjs +3 -2
- package/esm2022/constants/pointer.mjs +1 -1
- package/esm2022/engines/flowchart/display.mjs +74 -0
- package/esm2022/engines/index.mjs +9 -3
- package/esm2022/engines/table/table.mjs +24 -0
- package/esm2022/geometry.component.mjs +7 -7
- package/esm2022/image.component.mjs +7 -7
- package/esm2022/interfaces/geometry.mjs +11 -1
- package/esm2022/interfaces/table.mjs +2 -0
- package/esm2022/line.component.mjs +4 -4
- package/esm2022/plugins/with-draw.mjs +3 -2
- package/esm2022/plugins/with-table.mjs +14 -0
- package/esm2022/table.component.mjs +45 -0
- package/fesm2022/plait-draw.mjs +182 -19
- package/fesm2022/plait-draw.mjs.map +1 -1
- package/geometry.component.d.ts +1 -0
- package/image.component.d.ts +1 -0
- package/interfaces/geometry.d.ts +21 -2
- package/interfaces/table.d.ts +27 -0
- package/line.component.d.ts +1 -0
- package/package.json +1 -1
- package/plugins/with-table.d.ts +2 -0
- package/table.component.d.ts +15 -0
package/geometry.component.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare class GeometryComponent extends CommonPluginElement<PlaitGeometry
|
|
|
13
13
|
lineAutoCompleteGenerator: LineAutoCompleteGenerator;
|
|
14
14
|
shapeGenerator: GeometryShapeGenerator;
|
|
15
15
|
get textManage(): TextManage;
|
|
16
|
+
constructor();
|
|
16
17
|
initializeGenerator(): void;
|
|
17
18
|
ngOnInit(): void;
|
|
18
19
|
onContextChanged(value: PlaitPluginElementContext<PlaitGeometry, PlaitBoard>, previous: PlaitPluginElementContext<PlaitGeometry, PlaitBoard>): void;
|
package/image.component.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare class ImageComponent extends CommonPluginElement<PlaitImage, Plai
|
|
|
10
10
|
get activeGenerator(): import("@plait/common").ActiveGenerator<import("@plait/core").PlaitElement>;
|
|
11
11
|
imageGenerator: ImageGenerator<PlaitImage>;
|
|
12
12
|
lineAutoCompleteGenerator: LineAutoCompleteGenerator;
|
|
13
|
+
constructor();
|
|
13
14
|
initializeGenerator(): void;
|
|
14
15
|
ngOnInit(): void;
|
|
15
16
|
onContextChanged(value: PlaitPluginElementContext<PlaitImage, PlaitBoard>, previous: PlaitPluginElementContext<PlaitImage, PlaitBoard>): void;
|
package/interfaces/geometry.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { PlaitBoard, PlaitElement, Point, PointOfRectangle, RectangleClient, Vec
|
|
|
2
2
|
import { Options } from 'roughjs/bin/core';
|
|
3
3
|
import { ParagraphElement } from '@plait/text';
|
|
4
4
|
import { StrokeStyle } from './element';
|
|
5
|
+
import { PlaitTable } from './table';
|
|
5
6
|
export declare enum BasicShapes {
|
|
6
7
|
rectangle = "rectangle",
|
|
7
8
|
ellipse = "ellipse",
|
|
@@ -48,9 +49,17 @@ export declare enum FlowchartSymbols {
|
|
|
48
49
|
internalStorage = "internalStorage",
|
|
49
50
|
noteCurlyRight = "noteCurlyRight",
|
|
50
51
|
noteCurlyLeft = "noteCurlyLeft",
|
|
51
|
-
noteSquare = "noteSquare"
|
|
52
|
+
noteSquare = "noteSquare",
|
|
53
|
+
display = "display"
|
|
52
54
|
}
|
|
53
|
-
export
|
|
55
|
+
export declare enum TableSymbols {
|
|
56
|
+
table = "table"
|
|
57
|
+
}
|
|
58
|
+
export declare enum SwimlaneSymbols {
|
|
59
|
+
swimlaneVertical = "swimlaneVertical",
|
|
60
|
+
swimlaneHorizontal = "swimlaneHorizontal"
|
|
61
|
+
}
|
|
62
|
+
export type GeometryShapes = BasicShapes | FlowchartSymbols | SwimlaneSymbols | TableSymbols;
|
|
54
63
|
export interface PlaitGeometry extends PlaitElement {
|
|
55
64
|
points: [Point, Point];
|
|
56
65
|
type: 'geometry';
|
|
@@ -73,6 +82,16 @@ export interface PlaitEllipse extends PlaitGeometry {
|
|
|
73
82
|
export interface PlaitDiamond extends PlaitGeometry {
|
|
74
83
|
shape: BasicShapes.diamond;
|
|
75
84
|
}
|
|
85
|
+
export interface PlaitSwimlane extends PlaitTable {
|
|
86
|
+
type: 'geometry';
|
|
87
|
+
shape: SwimlaneSymbols;
|
|
88
|
+
}
|
|
89
|
+
export interface PlaitSwimlaneVertical extends PlaitSwimlane {
|
|
90
|
+
shape: SwimlaneSymbols.swimlaneVertical;
|
|
91
|
+
}
|
|
92
|
+
export interface PlaitSwimlaneHorizontal extends PlaitSwimlane {
|
|
93
|
+
shape: SwimlaneSymbols.swimlaneHorizontal;
|
|
94
|
+
}
|
|
76
95
|
export declare const PlaitGeometry: {};
|
|
77
96
|
export interface ShapeEngine {
|
|
78
97
|
isInsidePoint: (rectangle: RectangleClient, point: Point) => boolean;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PlaitElement, Point } from '@plait/core';
|
|
2
|
+
import { ParagraphElement } from '@plait/text';
|
|
3
|
+
export interface PlaitTable extends PlaitElement {
|
|
4
|
+
id: string;
|
|
5
|
+
points: Point[];
|
|
6
|
+
rows: {
|
|
7
|
+
id: string;
|
|
8
|
+
height?: number;
|
|
9
|
+
}[];
|
|
10
|
+
columns: {
|
|
11
|
+
id: string;
|
|
12
|
+
width?: number;
|
|
13
|
+
}[];
|
|
14
|
+
cells: PlaitTableCell[];
|
|
15
|
+
groupId?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface PlaitTableCell {
|
|
18
|
+
id: string;
|
|
19
|
+
rowId: string;
|
|
20
|
+
columnId: string;
|
|
21
|
+
colspan?: number;
|
|
22
|
+
rowspan?: number;
|
|
23
|
+
text?: PlaitTableCellParagraph;
|
|
24
|
+
}
|
|
25
|
+
export interface PlaitTableCellParagraph extends ParagraphElement {
|
|
26
|
+
writingMode: 'vertical-lr' | 'horizontal-tb';
|
|
27
|
+
}
|
package/line.component.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare class LineComponent extends CommonPluginElement<PlaitLine, PlaitB
|
|
|
16
16
|
shapeGenerator: LineShapeGenerator;
|
|
17
17
|
activeGenerator: LineActiveGenerator;
|
|
18
18
|
boundedElements: BoundedElements;
|
|
19
|
+
constructor();
|
|
19
20
|
initializeGenerator(): void;
|
|
20
21
|
ngOnInit(): void;
|
|
21
22
|
getBoundedElements(): BoundedElements;
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { PlaitBoard, PlaitPluginElementContext, OnContextChanged } from '@plait/core';
|
|
3
|
+
import { ActiveGenerator, CommonPluginElement } from '@plait/common';
|
|
4
|
+
import { PlaitTable } from './interfaces/table';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TableComponent extends CommonPluginElement<PlaitTable, PlaitBoard> implements OnInit, OnDestroy, OnContextChanged<PlaitTable, PlaitBoard> {
|
|
7
|
+
activeGenerator: ActiveGenerator<PlaitTable>;
|
|
8
|
+
constructor();
|
|
9
|
+
initializeGenerator(): void;
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
onContextChanged(value: PlaitPluginElementContext<PlaitTable, PlaitBoard>, previous: PlaitPluginElementContext<PlaitTable, PlaitBoard>): void;
|
|
12
|
+
ngOnDestroy(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "plait-draw-table", never, {}, {}, never, never, true, never>;
|
|
15
|
+
}
|