@plait/core 0.24.0-next.2 → 0.24.0-next.3
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/board/board.component.d.ts +1 -1
- package/core/children/children.component.d.ts +1 -1
- package/core/element/element.component.d.ts +1 -1
- package/core/element/plugin-element.d.ts +1 -1
- package/core/island/island-base.component.d.ts +1 -1
- package/{esm2020 → esm2022}/board/board.component.mjs +6 -6
- package/{esm2020 → esm2022}/core/children/children.component.mjs +6 -6
- package/{esm2020 → esm2022}/core/element/element.component.mjs +4 -4
- package/{esm2020 → esm2022}/core/element/plugin-element.mjs +4 -4
- package/{esm2020 → esm2022}/core/island/island-base.component.mjs +7 -7
- package/{esm2020 → esm2022}/interfaces/rectangle-client.mjs +11 -3
- package/{esm2020 → esm2022}/plait.module.mjs +5 -5
- package/esm2022/plugins/with-moving.mjs +98 -0
- package/{esm2020 → esm2022}/services/image-context.service.mjs +4 -4
- package/esm2022/utils/dom/common.mjs +68 -0
- package/esm2022/utils/element.mjs +53 -0
- package/esm2022/utils/math.mjs +128 -0
- package/{fesm2020 → fesm2022}/plait-core.mjs +108 -33
- package/fesm2022/plait-core.mjs.map +1 -0
- package/interfaces/rectangle-client.d.ts +1 -0
- package/package.json +14 -14
- package/utils/dom/common.d.ts +4 -0
- package/utils/element.d.ts +1 -0
- package/utils/math.d.ts +2 -0
- package/esm2020/plugins/with-moving.mjs +0 -97
- package/esm2020/utils/dom/common.mjs +0 -53
- package/esm2020/utils/element.mjs +0 -44
- package/esm2020/utils/math.mjs +0 -85
- package/fesm2015/plait-core.mjs +0 -3498
- package/fesm2015/plait-core.mjs.map +0 -1
- package/fesm2020/plait-core.mjs.map +0 -1
- /package/{esm2020 → esm2022}/board/board.component.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/constants/index.mjs +0 -0
- /package/{esm2020 → esm2022}/constants/keycodes.mjs +0 -0
- /package/{esm2020 → esm2022}/constants/resize.mjs +0 -0
- /package/{esm2020 → esm2022}/constants/selection.mjs +0 -0
- /package/{esm2020 → esm2022}/core/children/effect.mjs +0 -0
- /package/{esm2020 → esm2022}/core/element/context-change.mjs +0 -0
- /package/{esm2020 → esm2022}/core/element/context.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/board.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/custom-types.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/element.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/history.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/index.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/node.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/operation.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/path-ref.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/path.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/plugin-key.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/plugin.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/point.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/pointer.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/selection.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/theme.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/viewport.mjs +0 -0
- /package/{esm2020 → esm2022}/plait-core.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/create-board.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-board.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-hand.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-history.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-hotkey.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-options.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-selection.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-viewport.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/core/create-board.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/core/fake-weak-map.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/core/index.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/fake-events/event-objects.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/fake-events/index.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/index.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/test-element.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/board.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/general.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/index.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/node.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/selection.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/theme.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/viewport.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/board.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/clipboard.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/common.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/dom/environment.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/dom/foreign.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/dom/index.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/draw/arrow.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/draw/circle.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/draw/line.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/draw/rectangle.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/environment.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/helper.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/history.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/hotkeys.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/id-creator.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/index.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/moving-element.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/selected-element.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/to-image.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/touch.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/tree.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/viewport.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/weak-maps.mjs +0 -0
|
@@ -96,6 +96,15 @@ function getRectangleByElements(board, elements, recursion) {
|
|
|
96
96
|
function getBoardRectangle(board) {
|
|
97
97
|
return getRectangleByElements(board, board.children, true);
|
|
98
98
|
}
|
|
99
|
+
function getElementById(board, id) {
|
|
100
|
+
let element = null;
|
|
101
|
+
depthFirstRecursion(board, node => {
|
|
102
|
+
if (id === node.id) {
|
|
103
|
+
element = node;
|
|
104
|
+
}
|
|
105
|
+
}, getIsRecursionFunc(board), true);
|
|
106
|
+
return element;
|
|
107
|
+
}
|
|
99
108
|
|
|
100
109
|
var ThemeColorMode;
|
|
101
110
|
(function (ThemeColorMode) {
|
|
@@ -173,8 +182,8 @@ const RectangleClient = {
|
|
|
173
182
|
return {
|
|
174
183
|
x: rectangle.x + offset,
|
|
175
184
|
y: rectangle.y + offset,
|
|
176
|
-
width: rectangle.width
|
|
177
|
-
height: rectangle.height
|
|
185
|
+
width: rectangle.width - offset * 2,
|
|
186
|
+
height: rectangle.height - offset * 2
|
|
178
187
|
};
|
|
179
188
|
},
|
|
180
189
|
isEqual: (rectangle, otherRectangle) => {
|
|
@@ -190,6 +199,14 @@ const RectangleClient = {
|
|
|
190
199
|
[rectangle.x + rectangle.width, rectangle.y + rectangle.height],
|
|
191
200
|
[rectangle.x, rectangle.y + rectangle.height]
|
|
192
201
|
];
|
|
202
|
+
},
|
|
203
|
+
getEdgeCenterPoints: (rectangle) => {
|
|
204
|
+
return [
|
|
205
|
+
[rectangle.x + rectangle.width / 2, rectangle.y],
|
|
206
|
+
[rectangle.x + rectangle.width, rectangle.y + rectangle.height / 2],
|
|
207
|
+
[rectangle.x + rectangle.width / 2, rectangle.y + rectangle.height],
|
|
208
|
+
[rectangle.x, rectangle.y + rectangle.height / 2]
|
|
209
|
+
];
|
|
193
210
|
}
|
|
194
211
|
};
|
|
195
212
|
|
|
@@ -223,6 +240,34 @@ function distanceBetweenPointAndSegment(x, y, x1, y1, x2, y2) {
|
|
|
223
240
|
const dy = y - yy;
|
|
224
241
|
return Math.hypot(dx, dy);
|
|
225
242
|
}
|
|
243
|
+
function getNearestPointBetweenPointAndSegment(point, linePoints) {
|
|
244
|
+
const x = point[0], y = point[1], x1 = linePoints[0][0], y1 = linePoints[0][1], x2 = linePoints[1][0], y2 = linePoints[1][1];
|
|
245
|
+
const A = x - x1;
|
|
246
|
+
const B = y - y1;
|
|
247
|
+
const C = x2 - x1;
|
|
248
|
+
const D = y2 - y1;
|
|
249
|
+
const dot = A * C + B * D;
|
|
250
|
+
const lenSquare = C * C + D * D;
|
|
251
|
+
let param = -1;
|
|
252
|
+
if (lenSquare !== 0) {
|
|
253
|
+
// in case of 0 length line
|
|
254
|
+
param = dot / lenSquare;
|
|
255
|
+
}
|
|
256
|
+
let xx, yy;
|
|
257
|
+
if (param < 0) {
|
|
258
|
+
xx = x1;
|
|
259
|
+
yy = y1;
|
|
260
|
+
}
|
|
261
|
+
else if (param > 1) {
|
|
262
|
+
xx = x2;
|
|
263
|
+
yy = y2;
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
xx = x1 + param * C;
|
|
267
|
+
yy = y1 + param * D;
|
|
268
|
+
}
|
|
269
|
+
return [xx, yy];
|
|
270
|
+
}
|
|
226
271
|
function distanceBetweenPointAndSegments(points, point) {
|
|
227
272
|
const len = points.length;
|
|
228
273
|
let distance = Infinity;
|
|
@@ -236,6 +281,21 @@ function distanceBetweenPointAndSegments(points, point) {
|
|
|
236
281
|
}
|
|
237
282
|
return distance;
|
|
238
283
|
}
|
|
284
|
+
function getNearestPointBetweenPointAndSegments(point, points) {
|
|
285
|
+
const len = points.length;
|
|
286
|
+
let distance = Infinity;
|
|
287
|
+
let result = point;
|
|
288
|
+
for (let i = 0; i < len; i++) {
|
|
289
|
+
const p = points[i];
|
|
290
|
+
const p2 = i === len - 1 ? points[0] : points[i + 1];
|
|
291
|
+
const currentDistance = distanceBetweenPointAndSegment(point[0], point[1], p[0], p[1], p2[0], p2[1]);
|
|
292
|
+
if (currentDistance < distance) {
|
|
293
|
+
distance = currentDistance;
|
|
294
|
+
result = getNearestPointBetweenPointAndSegment(point, [p, p2]);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return result;
|
|
298
|
+
}
|
|
239
299
|
function rotate(x1, y1, x2, y2, angle) {
|
|
240
300
|
// 𝑎′𝑥=(𝑎𝑥−𝑐𝑥)cos𝜃−(𝑎𝑦−𝑐𝑦)sin𝜃+𝑐𝑥
|
|
241
301
|
// 𝑎′𝑦=(𝑎𝑥−𝑐𝑥)sin𝜃+(𝑎𝑦−𝑐𝑦)cos𝜃+𝑐𝑦.
|
|
@@ -982,6 +1042,21 @@ function createPath() {
|
|
|
982
1042
|
const newG = document.createElementNS(NS, 'path');
|
|
983
1043
|
return newG;
|
|
984
1044
|
}
|
|
1045
|
+
function createRect(rectangle, options) {
|
|
1046
|
+
const rect = document.createElementNS(NS, 'rect');
|
|
1047
|
+
rect.setAttribute('x', `${rectangle.x}`);
|
|
1048
|
+
rect.setAttribute('y', `${rectangle.y}`);
|
|
1049
|
+
rect.setAttribute('width', `${rectangle.width}`);
|
|
1050
|
+
rect.setAttribute('height', `${rectangle.height}`);
|
|
1051
|
+
for (let key in options) {
|
|
1052
|
+
const optionKey = key;
|
|
1053
|
+
rect.setAttribute(key, `${options[optionKey]}`);
|
|
1054
|
+
}
|
|
1055
|
+
return rect;
|
|
1056
|
+
}
|
|
1057
|
+
function createMask() {
|
|
1058
|
+
return document.createElementNS(NS, 'mask');
|
|
1059
|
+
}
|
|
985
1060
|
function createSVG() {
|
|
986
1061
|
const svg = document.createElementNS(NS, 'svg');
|
|
987
1062
|
return svg;
|
|
@@ -1171,10 +1246,10 @@ class PlaitPluginElementComponent {
|
|
|
1171
1246
|
removeSelectedElement(this.board, this.element);
|
|
1172
1247
|
(this.rootG || this.g).remove();
|
|
1173
1248
|
}
|
|
1249
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitPluginElementComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1250
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: PlaitPluginElementComponent, inputs: { context: "context" }, ngImport: i0 }); }
|
|
1174
1251
|
}
|
|
1175
|
-
|
|
1176
|
-
PlaitPluginElementComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: PlaitPluginElementComponent, inputs: { context: "context" }, ngImport: i0 });
|
|
1177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitPluginElementComponent, decorators: [{
|
|
1252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitPluginElementComponent, decorators: [{
|
|
1178
1253
|
type: Directive
|
|
1179
1254
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { context: [{
|
|
1180
1255
|
type: Input
|
|
@@ -2575,7 +2650,7 @@ function withMoving(board) {
|
|
|
2575
2650
|
const point = transformPoint(board, toPoint(event.x, event.y, host));
|
|
2576
2651
|
const range = { anchor: point, focus: point };
|
|
2577
2652
|
let movableElements = board.children.filter(item => board.isMovable(item));
|
|
2578
|
-
if (movableElements.length) {
|
|
2653
|
+
if (movableElements.length && !isPreventTouchMove(board)) {
|
|
2579
2654
|
startPoint = point;
|
|
2580
2655
|
const selectedRootElements = getSelectedElements(board).filter(item => movableElements.includes(item));
|
|
2581
2656
|
const hitElement = getHitElementOfRoot(board, movableElements, range);
|
|
@@ -2674,10 +2749,10 @@ class PlaitIslandBaseComponent {
|
|
|
2674
2749
|
markForCheck() {
|
|
2675
2750
|
this.cdr.markForCheck();
|
|
2676
2751
|
}
|
|
2752
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitIslandBaseComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2753
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: PlaitIslandBaseComponent, host: { classAttribute: "plait-island-container" }, ngImport: i0 }); }
|
|
2677
2754
|
}
|
|
2678
|
-
|
|
2679
|
-
PlaitIslandBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: PlaitIslandBaseComponent, host: { classAttribute: "plait-island-container" }, ngImport: i0 });
|
|
2680
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitIslandBaseComponent, decorators: [{
|
|
2755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitIslandBaseComponent, decorators: [{
|
|
2681
2756
|
type: Directive,
|
|
2682
2757
|
args: [{
|
|
2683
2758
|
host: {
|
|
@@ -2708,10 +2783,10 @@ class PlaitIslandPopoverBaseComponent {
|
|
|
2708
2783
|
this.board.onChange = this.onChange;
|
|
2709
2784
|
this.islandOnDestroy();
|
|
2710
2785
|
}
|
|
2786
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitIslandPopoverBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2787
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: PlaitIslandPopoverBaseComponent, inputs: { board: "board" }, host: { classAttribute: "plait-island-popover-container" }, ngImport: i0 }); }
|
|
2711
2788
|
}
|
|
2712
|
-
|
|
2713
|
-
PlaitIslandPopoverBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: PlaitIslandPopoverBaseComponent, inputs: { board: "board" }, host: { classAttribute: "plait-island-popover-container" }, ngImport: i0 });
|
|
2714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitIslandPopoverBaseComponent, decorators: [{
|
|
2789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitIslandPopoverBaseComponent, decorators: [{
|
|
2715
2790
|
type: Directive,
|
|
2716
2791
|
args: [{
|
|
2717
2792
|
host: {
|
|
@@ -2796,10 +2871,10 @@ class PlaitContextService {
|
|
|
2796
2871
|
removeUploadingFile(fileEntry) {
|
|
2797
2872
|
this.uploadingFiles = this.uploadingFiles.filter(file => file.url !== fileEntry.url);
|
|
2798
2873
|
}
|
|
2874
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2875
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitContextService }); }
|
|
2799
2876
|
}
|
|
2800
|
-
|
|
2801
|
-
PlaitContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitContextService });
|
|
2802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitContextService, decorators: [{
|
|
2877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitContextService, decorators: [{
|
|
2803
2878
|
type: Injectable
|
|
2804
2879
|
}] });
|
|
2805
2880
|
|
|
@@ -2876,10 +2951,10 @@ class PlaitElementComponent {
|
|
|
2876
2951
|
ngOnDestroy() {
|
|
2877
2952
|
this.board.destroyElement(this.getContext());
|
|
2878
2953
|
}
|
|
2954
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitElementComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2955
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: PlaitElementComponent, selector: "plait-element", inputs: { index: "index", element: "element", parent: "parent", board: "board", effect: "effect", parentG: "parentG" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2879
2956
|
}
|
|
2880
|
-
|
|
2881
|
-
PlaitElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: PlaitElementComponent, selector: "plait-element", inputs: { index: "index", element: "element", parent: "parent", board: "board", effect: "effect", parentG: "parentG" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2882
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitElementComponent, decorators: [{
|
|
2957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitElementComponent, decorators: [{
|
|
2883
2958
|
type: Component,
|
|
2884
2959
|
args: [{
|
|
2885
2960
|
selector: 'plait-element',
|
|
@@ -2914,9 +2989,8 @@ class PlaitChildrenElement {
|
|
|
2914
2989
|
this.parentG = PlaitBoard.getElementHost(this.board);
|
|
2915
2990
|
}
|
|
2916
2991
|
}
|
|
2917
|
-
}
|
|
2918
|
-
|
|
2919
|
-
PlaitChildrenElement.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: PlaitChildrenElement, selector: "plait-children", inputs: { board: "board", parent: "parent", effect: "effect", parentG: "parentG" }, ngImport: i0, template: `
|
|
2992
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitChildrenElement, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2993
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: PlaitChildrenElement, selector: "plait-children", inputs: { board: "board", parent: "parent", effect: "effect", parentG: "parentG" }, ngImport: i0, template: `
|
|
2920
2994
|
<plait-element
|
|
2921
2995
|
*ngFor="let item of parent.children; let index = index; trackBy: trackBy"
|
|
2922
2996
|
[index]="index"
|
|
@@ -2926,8 +3000,9 @@ PlaitChildrenElement.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
2926
3000
|
[effect]="effect"
|
|
2927
3001
|
[parentG]="parentG"
|
|
2928
3002
|
></plait-element>
|
|
2929
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PlaitElementComponent, selector: "plait-element", inputs: ["index", "element", "parent", "board", "effect", "parentG"] }] });
|
|
2930
|
-
|
|
3003
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PlaitElementComponent, selector: "plait-element", inputs: ["index", "element", "parent", "board", "effect", "parentG"] }] }); }
|
|
3004
|
+
}
|
|
3005
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitChildrenElement, decorators: [{
|
|
2931
3006
|
type: Component,
|
|
2932
3007
|
args: [{
|
|
2933
3008
|
selector: 'plait-children',
|
|
@@ -3266,9 +3341,8 @@ class PlaitBoardComponent {
|
|
|
3266
3341
|
this.updateIslands();
|
|
3267
3342
|
});
|
|
3268
3343
|
}
|
|
3269
|
-
}
|
|
3270
|
-
|
|
3271
|
-
PlaitBoardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: PlaitBoardComponent, selector: "plait-board", inputs: { plaitValue: "plaitValue", plaitViewport: "plaitViewport", plaitPlugins: "plaitPlugins", plaitOptions: "plaitOptions", plaitTheme: "plaitTheme" }, outputs: { plaitChange: "plaitChange", plaitBoardInitialized: "plaitBoardInitialized" }, host: { properties: { "class": "this.hostClass", "class.readonly": "this.readonly", "class.focused": "this.isFocused", "class.disabled-scroll": "this.disabledScrollOnNonFocus" } }, providers: [PlaitContextService], queries: [{ propertyName: "islands", predicate: PlaitIslandBaseComponent, descendants: true }], viewQueries: [{ propertyName: "svg", first: true, predicate: ["svg"], descendants: true, static: true }, { propertyName: "viewportContainer", first: true, predicate: ["viewportContainer"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
3344
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitBoardComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3345
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: PlaitBoardComponent, selector: "plait-board", inputs: { plaitValue: "plaitValue", plaitViewport: "plaitViewport", plaitPlugins: "plaitPlugins", plaitOptions: "plaitOptions", plaitTheme: "plaitTheme" }, outputs: { plaitChange: "plaitChange", plaitBoardInitialized: "plaitBoardInitialized" }, host: { properties: { "class": "this.hostClass", "class.readonly": "this.readonly", "class.focused": "this.isFocused", "class.disabled-scroll": "this.disabledScrollOnNonFocus" } }, providers: [PlaitContextService], queries: [{ propertyName: "islands", predicate: PlaitIslandBaseComponent, descendants: true }], viewQueries: [{ propertyName: "svg", first: true, predicate: ["svg"], descendants: true, static: true }, { propertyName: "viewportContainer", first: true, predicate: ["viewportContainer"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
3272
3346
|
<div class="viewport-container" #viewportContainer>
|
|
3273
3347
|
<svg #svg width="100%" height="100%" style="position: relative;" class="board-host-svg">
|
|
3274
3348
|
<g class="element-host"></g>
|
|
@@ -3278,8 +3352,9 @@ PlaitBoardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
3278
3352
|
<plait-children [board]="board" [effect]="effect"></plait-children>
|
|
3279
3353
|
</div>
|
|
3280
3354
|
<ng-content></ng-content>
|
|
3281
|
-
`, isInline: true, dependencies: [{ kind: "component", type: PlaitChildrenElement, selector: "plait-children", inputs: ["board", "parent", "effect", "parentG"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3282
|
-
|
|
3355
|
+
`, isInline: true, dependencies: [{ kind: "component", type: PlaitChildrenElement, selector: "plait-children", inputs: ["board", "parent", "effect", "parentG"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3356
|
+
}
|
|
3357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitBoardComponent, decorators: [{
|
|
3283
3358
|
type: Component,
|
|
3284
3359
|
args: [{
|
|
3285
3360
|
selector: 'plait-board',
|
|
@@ -3336,11 +3411,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
|
|
|
3336
3411
|
|
|
3337
3412
|
const COMPONENTS = [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent];
|
|
3338
3413
|
class PlaitModule {
|
|
3414
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3415
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, declarations: [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent], imports: [CommonModule], exports: [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent] }); }
|
|
3416
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, imports: [CommonModule] }); }
|
|
3339
3417
|
}
|
|
3340
|
-
|
|
3341
|
-
PlaitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: PlaitModule, declarations: [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent], imports: [CommonModule], exports: [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent] });
|
|
3342
|
-
PlaitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitModule, imports: [CommonModule] });
|
|
3343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitModule, decorators: [{
|
|
3418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, decorators: [{
|
|
3344
3419
|
type: NgModule,
|
|
3345
3420
|
args: [{
|
|
3346
3421
|
declarations: [...COMPONENTS],
|
|
@@ -3517,5 +3592,5 @@ function createModModifierKeys() {
|
|
|
3517
3592
|
* Generated bundle index. Do not edit.
|
|
3518
3593
|
*/
|
|
3519
3594
|
|
|
3520
|
-
export { A, ALT, APOSTROPHE, ATTACHED_ELEMENT_CLASS_NAME, AT_SIGN, B, BACKSLASH, BACKSPACE, BOARD_TO_COMPONENT, BOARD_TO_ELEMENT_HOST, BOARD_TO_HOST, BOARD_TO_IS_SELECTION_MOVING, BOARD_TO_MOVING_ELEMENT, BOARD_TO_MOVING_POINT, BOARD_TO_MOVING_POINT_IN_BOARD, BOARD_TO_ON_CHANGE, BOARD_TO_ROUGH_SVG, BOARD_TO_SELECTED_ELEMENT, BOARD_TO_TEMPORARY_ELEMENTS, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, E, EIGHT, ELEMENT_TO_COMPONENT, END, ENTER, EQUALS, ESCAPE, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FLUSHING, FOUR, G, H, HOME, HOST_CLASS_NAME, I, INSERT, IS_APPLE, IS_BOARD_CACHE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_MAC, IS_PREVENT_TOUCH_MOVE, IS_SAFARI, IS_TEXT_EDITABLE, J, K, L, LAST_MEDIA, LEFT_ARROW, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, MAX_RADIUS, MERGING, META, MUTE, N, NINE, NODE_TO_INDEX, NODE_TO_PARENT, NS, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PATH_REFS, PAUSE, PERIOD, PLUS_SIGN, POINTER_BUTTON, PRESS_AND_MOVE_BUFFER, PRINT_SCREEN, Path, PlaitBoard, PlaitBoardComponent, PlaitChildrenElement, PlaitContextService, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, PlaitModule, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RIGHT_ARROW, RectangleClient, ResizeCursorClass, RetroThemeColor, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, Selection, SoftThemeColor, StarryThemeColor, T, TAB, THREE, TILDE, TWO, ThemeColorMode, ThemeColors, Transforms, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, Viewport, W, X, Y, Z, ZERO, addMovingElements, addSelectedElement, arrowPoints, cacheMovingElements, cacheSelectedElements, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createFakeEvent, createForeignObject, createG, createKeyboardEvent, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createSVG, createSelectionOuterG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downloadImage, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRoundRectangle, fakeNodeWeakMap, getBoardRectangle, getClipboardByKey, getClipboardDataByMedia, getDataFromClipboard, getElementHostBBox, getHitElementOfRoot, getHitElements, getIsRecursionFunc, getMovingElements, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getTextFromClipboard, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isHitElements, isInPlaitBoard, isLineHitLine, isMainPointer, isNullOrUndefined, isPolylineHitRectangle, isPreventTouchMove, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, preventTouchMove, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setClipboardData, setClipboardDataByMedia, setClipboardDataByText, setIsFromScrolling, setIsFromViewportChange, setSVGViewBox, setSelectionMoving, shouldClear, shouldMerge, shouldSave, throttleRAF, toImage, toPoint, transformPoint, transformPoints, updateForeignObject, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
|
|
3595
|
+
export { A, ALT, APOSTROPHE, ATTACHED_ELEMENT_CLASS_NAME, AT_SIGN, B, BACKSLASH, BACKSPACE, BOARD_TO_COMPONENT, BOARD_TO_ELEMENT_HOST, BOARD_TO_HOST, BOARD_TO_IS_SELECTION_MOVING, BOARD_TO_MOVING_ELEMENT, BOARD_TO_MOVING_POINT, BOARD_TO_MOVING_POINT_IN_BOARD, BOARD_TO_ON_CHANGE, BOARD_TO_ROUGH_SVG, BOARD_TO_SELECTED_ELEMENT, BOARD_TO_TEMPORARY_ELEMENTS, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, E, EIGHT, ELEMENT_TO_COMPONENT, END, ENTER, EQUALS, ESCAPE, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FLUSHING, FOUR, G, H, HOME, HOST_CLASS_NAME, I, INSERT, IS_APPLE, IS_BOARD_CACHE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_MAC, IS_PREVENT_TOUCH_MOVE, IS_SAFARI, IS_TEXT_EDITABLE, J, K, L, LAST_MEDIA, LEFT_ARROW, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, MAX_RADIUS, MERGING, META, MUTE, N, NINE, NODE_TO_INDEX, NODE_TO_PARENT, NS, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PATH_REFS, PAUSE, PERIOD, PLUS_SIGN, POINTER_BUTTON, PRESS_AND_MOVE_BUFFER, PRINT_SCREEN, Path, PlaitBoard, PlaitBoardComponent, PlaitChildrenElement, PlaitContextService, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, PlaitModule, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RIGHT_ARROW, RectangleClient, ResizeCursorClass, RetroThemeColor, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, Selection, SoftThemeColor, StarryThemeColor, T, TAB, THREE, TILDE, TWO, ThemeColorMode, ThemeColors, Transforms, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, Viewport, W, X, Y, Z, ZERO, addMovingElements, addSelectedElement, arrowPoints, cacheMovingElements, cacheSelectedElements, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createFakeEvent, createForeignObject, createG, createKeyboardEvent, createMask, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createRect, createSVG, createSelectionOuterG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downloadImage, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRoundRectangle, fakeNodeWeakMap, getBoardRectangle, getClipboardByKey, getClipboardDataByMedia, getDataFromClipboard, getElementById, getElementHostBBox, getHitElementOfRoot, getHitElements, getIsRecursionFunc, getMovingElements, getNearestPointBetweenPointAndSegment, getNearestPointBetweenPointAndSegments, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getTextFromClipboard, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isHitElements, isInPlaitBoard, isLineHitLine, isMainPointer, isNullOrUndefined, isPolylineHitRectangle, isPreventTouchMove, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, preventTouchMove, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setClipboardData, setClipboardDataByMedia, setClipboardDataByText, setIsFromScrolling, setIsFromViewportChange, setSVGViewBox, setSelectionMoving, shouldClear, shouldMerge, shouldSave, throttleRAF, toImage, toPoint, transformPoint, transformPoints, updateForeignObject, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
|
|
3521
3596
|
//# sourceMappingURL=plait-core.mjs.map
|