@plait/core 0.5.0 → 0.6.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/board/board.component.d.ts +5 -3
- package/esm2020/board/board.component.mjs +22 -6
- package/esm2020/interfaces/board.mjs +5 -1
- package/esm2020/interfaces/index.mjs +2 -1
- package/esm2020/interfaces/operation.mjs +5 -1
- package/esm2020/interfaces/theme.mjs +48 -0
- package/esm2020/interfaces/viewport.mjs +1 -1
- package/esm2020/plugins/create-board.mjs +6 -4
- package/esm2020/transforms/board.mjs +16 -2
- package/esm2020/transforms/general.mjs +12 -4
- package/esm2020/transforms/theme.mjs +8 -0
- package/esm2020/utils/element.mjs +9 -1
- package/esm2020/utils/viewport.mjs +4 -6
- package/fesm2015/plait-core.mjs +126 -20
- package/fesm2015/plait-core.mjs.map +1 -1
- package/fesm2020/plait-core.mjs +126 -20
- package/fesm2020/plait-core.mjs.map +1 -1
- package/interfaces/board.d.ts +10 -4
- package/interfaces/index.d.ts +1 -0
- package/interfaces/operation.d.ts +7 -1
- package/interfaces/theme.d.ts +23 -0
- package/interfaces/viewport.d.ts +0 -1
- package/package.json +1 -1
- package/styles/mixins.scss +18 -0
- package/styles/styles.scss +4 -0
- package/transforms/board.d.ts +7 -0
- package/transforms/theme.d.ts +7 -0
package/fesm2020/plait-core.mjs
CHANGED
|
@@ -61,6 +61,14 @@ function getRectangleByElements(board, elements, recursion) {
|
|
|
61
61
|
calcRectangleClient(element);
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
+
if (boundaryBox.left === Number.MAX_VALUE) {
|
|
65
|
+
return {
|
|
66
|
+
x: 0,
|
|
67
|
+
y: 0,
|
|
68
|
+
width: 0,
|
|
69
|
+
height: 0
|
|
70
|
+
};
|
|
71
|
+
}
|
|
64
72
|
return {
|
|
65
73
|
x: boundaryBox.left,
|
|
66
74
|
y: boundaryBox.top,
|
|
@@ -72,6 +80,54 @@ function getBoardRectangle(board) {
|
|
|
72
80
|
return getRectangleByElements(board, board.children, true);
|
|
73
81
|
}
|
|
74
82
|
|
|
83
|
+
var ThemeColorMode;
|
|
84
|
+
(function (ThemeColorMode) {
|
|
85
|
+
ThemeColorMode["default"] = "default";
|
|
86
|
+
ThemeColorMode["colorful"] = "colorful";
|
|
87
|
+
ThemeColorMode["soft"] = "soft";
|
|
88
|
+
ThemeColorMode["retro"] = "retro";
|
|
89
|
+
ThemeColorMode["dark"] = "dark";
|
|
90
|
+
ThemeColorMode["starry"] = "starry";
|
|
91
|
+
})(ThemeColorMode || (ThemeColorMode = {}));
|
|
92
|
+
const DefaultThemeColor = {
|
|
93
|
+
mode: ThemeColorMode.default,
|
|
94
|
+
boardBackground: '#ffffff',
|
|
95
|
+
textColor: '#333333'
|
|
96
|
+
};
|
|
97
|
+
const ColorfulThemeColor = {
|
|
98
|
+
mode: ThemeColorMode.colorful,
|
|
99
|
+
boardBackground: '#ffffff',
|
|
100
|
+
textColor: '#333333'
|
|
101
|
+
};
|
|
102
|
+
const SoftThemeColor = {
|
|
103
|
+
mode: ThemeColorMode.soft,
|
|
104
|
+
boardBackground: '#f5f5f5',
|
|
105
|
+
textColor: '#333333'
|
|
106
|
+
};
|
|
107
|
+
const RetroThemeColor = {
|
|
108
|
+
mode: ThemeColorMode.retro,
|
|
109
|
+
boardBackground: '#f9f8ed',
|
|
110
|
+
textColor: '#333333'
|
|
111
|
+
};
|
|
112
|
+
const DarkThemeColor = {
|
|
113
|
+
mode: ThemeColorMode.dark,
|
|
114
|
+
boardBackground: '#141414',
|
|
115
|
+
textColor: '#FFFFFF'
|
|
116
|
+
};
|
|
117
|
+
const StarryThemeColor = {
|
|
118
|
+
mode: ThemeColorMode.starry,
|
|
119
|
+
boardBackground: '#0d2537',
|
|
120
|
+
textColor: '#FFFFFF'
|
|
121
|
+
};
|
|
122
|
+
const ThemeColors = [
|
|
123
|
+
DefaultThemeColor,
|
|
124
|
+
ColorfulThemeColor,
|
|
125
|
+
SoftThemeColor,
|
|
126
|
+
RetroThemeColor,
|
|
127
|
+
DarkThemeColor,
|
|
128
|
+
StarryThemeColor
|
|
129
|
+
];
|
|
130
|
+
|
|
75
131
|
const PlaitBoard = {
|
|
76
132
|
isBoard(value) {
|
|
77
133
|
const cachedIsBoard = IS_BOARD_CACHE.get(value);
|
|
@@ -142,6 +198,9 @@ const PlaitBoard = {
|
|
|
142
198
|
},
|
|
143
199
|
getMovingPoint(board) {
|
|
144
200
|
return BOARD_TO_MOVING_POINT.get(board);
|
|
201
|
+
},
|
|
202
|
+
getThemeColors(board) {
|
|
203
|
+
return (board.options.themeColors || ThemeColors);
|
|
145
204
|
}
|
|
146
205
|
};
|
|
147
206
|
|
|
@@ -393,7 +452,7 @@ const PlaitNode = {
|
|
|
393
452
|
}
|
|
394
453
|
};
|
|
395
454
|
|
|
396
|
-
const applyToDraft = (board, selection, viewport, op) => {
|
|
455
|
+
const applyToDraft = (board, selection, viewport, theme, op) => {
|
|
397
456
|
switch (op.type) {
|
|
398
457
|
case 'insert_node': {
|
|
399
458
|
const { path, node } = op;
|
|
@@ -498,8 +557,13 @@ const applyToDraft = (board, selection, viewport, op) => {
|
|
|
498
557
|
}
|
|
499
558
|
break;
|
|
500
559
|
}
|
|
560
|
+
case 'set_theme': {
|
|
561
|
+
const { newProperties } = op;
|
|
562
|
+
theme = newProperties;
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
501
565
|
}
|
|
502
|
-
return { selection, viewport };
|
|
566
|
+
return { selection, viewport, theme };
|
|
503
567
|
};
|
|
504
568
|
const GeneralTransforms = {
|
|
505
569
|
/**
|
|
@@ -509,10 +573,12 @@ const GeneralTransforms = {
|
|
|
509
573
|
board.children = createDraft(board.children);
|
|
510
574
|
let viewport = board.viewport && createDraft(board.viewport);
|
|
511
575
|
let selection = board.selection && createDraft(board.selection);
|
|
576
|
+
let theme = board.theme && createDraft(board.theme);
|
|
512
577
|
try {
|
|
513
|
-
const state = applyToDraft(board, selection, viewport, op);
|
|
578
|
+
const state = applyToDraft(board, selection, viewport, theme, op);
|
|
514
579
|
viewport = state.viewport;
|
|
515
580
|
selection = state.selection;
|
|
581
|
+
theme = state.theme;
|
|
516
582
|
}
|
|
517
583
|
finally {
|
|
518
584
|
board.children = finishDraft(board.children);
|
|
@@ -523,6 +589,7 @@ const GeneralTransforms = {
|
|
|
523
589
|
board.selection = null;
|
|
524
590
|
}
|
|
525
591
|
board.viewport = isDraft(viewport) ? finishDraft(viewport) : viewport;
|
|
592
|
+
board.theme = isDraft(theme) ? finishDraft(theme) : theme;
|
|
526
593
|
}
|
|
527
594
|
}
|
|
528
595
|
};
|
|
@@ -582,7 +649,7 @@ function setViewport(board, viewport) {
|
|
|
582
649
|
const operation = { type: 'set_viewport', properties: board.viewport, newProperties: viewport };
|
|
583
650
|
board.apply(operation);
|
|
584
651
|
}
|
|
585
|
-
const ViewportTransforms = {
|
|
652
|
+
const ViewportTransforms$1 = {
|
|
586
653
|
setViewport
|
|
587
654
|
};
|
|
588
655
|
|
|
@@ -1350,6 +1417,10 @@ const inverse = (op) => {
|
|
|
1350
1417
|
return { ...op, properties: newProperties, newProperties: properties };
|
|
1351
1418
|
}
|
|
1352
1419
|
}
|
|
1420
|
+
case 'set_theme': {
|
|
1421
|
+
const { properties, newProperties } = op;
|
|
1422
|
+
return { ...op, properties: newProperties, newProperties: properties };
|
|
1423
|
+
}
|
|
1353
1424
|
}
|
|
1354
1425
|
};
|
|
1355
1426
|
const PlaitOperation = {
|
|
@@ -1443,18 +1514,16 @@ function clampZoomLevel(zoom, minZoom = 0.2, maxZoom = 4) {
|
|
|
1443
1514
|
}
|
|
1444
1515
|
function getViewBox(board, zoom) {
|
|
1445
1516
|
const { hideScrollbar } = board.options;
|
|
1446
|
-
const scrollBarWidth = hideScrollbar ?
|
|
1517
|
+
const scrollBarWidth = hideScrollbar ? 0 : SCROLL_BAR_WIDTH;
|
|
1447
1518
|
const viewportContainerRect = PlaitBoard.getBoardNativeElement(board).getBoundingClientRect();
|
|
1448
1519
|
const elementHostBBox = getElementHostBBox(board, zoom);
|
|
1449
1520
|
const horizontalPadding = viewportContainerRect.width / 2;
|
|
1450
1521
|
const verticalPadding = viewportContainerRect.height / 2;
|
|
1451
|
-
const viewportWidth = (elementHostBBox.right - elementHostBBox.left) * zoom + 2 * horizontalPadding + scrollBarWidth;
|
|
1452
|
-
const viewportHeight = (elementHostBBox.bottom - elementHostBBox.top) * zoom + 2 * verticalPadding + scrollBarWidth;
|
|
1453
1522
|
const viewBox = [
|
|
1454
1523
|
elementHostBBox.left - horizontalPadding / zoom,
|
|
1455
1524
|
elementHostBBox.top - verticalPadding / zoom,
|
|
1456
|
-
|
|
1457
|
-
|
|
1525
|
+
elementHostBBox.right - elementHostBBox.left + (horizontalPadding * 2 - scrollBarWidth) / zoom,
|
|
1526
|
+
elementHostBBox.bottom - elementHostBBox.top + (verticalPadding * 2 - scrollBarWidth) / zoom
|
|
1458
1527
|
];
|
|
1459
1528
|
return viewBox;
|
|
1460
1529
|
}
|
|
@@ -1540,6 +1609,14 @@ const setIsFromViewportChange = (board, state) => {
|
|
|
1540
1609
|
};
|
|
1541
1610
|
function scrollToRectangle(board, client) { }
|
|
1542
1611
|
|
|
1612
|
+
function setTheme(board, themeColorMode) {
|
|
1613
|
+
const operation = { type: 'set_theme', properties: board.theme, newProperties: themeColorMode };
|
|
1614
|
+
board.apply(operation);
|
|
1615
|
+
}
|
|
1616
|
+
const ViewportTransforms = {
|
|
1617
|
+
setTheme
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1543
1620
|
function updateViewport(board, origination, zoom) {
|
|
1544
1621
|
zoom = zoom ?? board.viewport.zoom;
|
|
1545
1622
|
setViewport(board, {
|
|
@@ -1595,16 +1672,28 @@ function fitViewport(board) {
|
|
|
1595
1672
|
];
|
|
1596
1673
|
updateViewport(board, newOrigination, newZoom);
|
|
1597
1674
|
}
|
|
1675
|
+
/**
|
|
1676
|
+
* apply theme to every element (remove element custom properties)
|
|
1677
|
+
* invoke applyThemeColor
|
|
1678
|
+
*/
|
|
1679
|
+
function updateThemeColor(board, mode) {
|
|
1680
|
+
mode = mode ?? board.theme.themeColorMode;
|
|
1681
|
+
setTheme(board, { themeColorMode: mode });
|
|
1682
|
+
depthFirstRecursion(board, element => {
|
|
1683
|
+
board.applyTheme(element);
|
|
1684
|
+
});
|
|
1685
|
+
}
|
|
1598
1686
|
const BoardTransforms = {
|
|
1599
1687
|
updatePointerType,
|
|
1600
1688
|
updateViewport,
|
|
1601
1689
|
fitViewport,
|
|
1602
|
-
updateZoom
|
|
1690
|
+
updateZoom,
|
|
1691
|
+
updateThemeColor
|
|
1603
1692
|
};
|
|
1604
1693
|
|
|
1605
1694
|
const Transforms = {
|
|
1606
1695
|
...GeneralTransforms,
|
|
1607
|
-
...ViewportTransforms,
|
|
1696
|
+
...ViewportTransforms$1,
|
|
1608
1697
|
...SelectionTransforms,
|
|
1609
1698
|
...NodeTransforms
|
|
1610
1699
|
};
|
|
@@ -1626,10 +1715,10 @@ const PathRef = {
|
|
|
1626
1715
|
function createBoard(children, options) {
|
|
1627
1716
|
const board = {
|
|
1628
1717
|
viewport: {
|
|
1629
|
-
zoom: 1
|
|
1630
|
-
viewBackgroundColor: '#000'
|
|
1718
|
+
zoom: 1
|
|
1631
1719
|
},
|
|
1632
1720
|
children,
|
|
1721
|
+
theme: { themeColorMode: ThemeColorMode.default },
|
|
1633
1722
|
operations: [],
|
|
1634
1723
|
history: {
|
|
1635
1724
|
redos: [],
|
|
@@ -1703,7 +1792,8 @@ function createBoard(children, options) {
|
|
|
1703
1792
|
isHitSelection: element => false,
|
|
1704
1793
|
isRecursion: element => true,
|
|
1705
1794
|
isMovable: element => false,
|
|
1706
|
-
getRectangle: element => null
|
|
1795
|
+
getRectangle: element => null,
|
|
1796
|
+
applyTheme: (element) => { }
|
|
1707
1797
|
};
|
|
1708
1798
|
return board;
|
|
1709
1799
|
}
|
|
@@ -2327,7 +2417,7 @@ class PlaitBoardComponent {
|
|
|
2327
2417
|
return this.svg.nativeElement;
|
|
2328
2418
|
}
|
|
2329
2419
|
get hostClass() {
|
|
2330
|
-
return `plait-board-container pointer-${this.board.pointer}`;
|
|
2420
|
+
return `plait-board-container pointer-${this.board.pointer} theme-${this.board.theme.themeColorMode}`;
|
|
2331
2421
|
}
|
|
2332
2422
|
get readonly() {
|
|
2333
2423
|
return this.board.options.readonly;
|
|
@@ -2381,7 +2471,8 @@ class PlaitBoardComponent {
|
|
|
2381
2471
|
children: this.board.children,
|
|
2382
2472
|
operations: this.board.operations,
|
|
2383
2473
|
viewport: this.board.viewport,
|
|
2384
|
-
selection: this.board.selection
|
|
2474
|
+
selection: this.board.selection,
|
|
2475
|
+
theme: this.board.theme
|
|
2385
2476
|
};
|
|
2386
2477
|
this.updateIslands();
|
|
2387
2478
|
this.plaitChange.emit(changeEvent);
|
|
@@ -2422,6 +2513,9 @@ class PlaitBoardComponent {
|
|
|
2422
2513
|
if (this.plaitViewport) {
|
|
2423
2514
|
this.board.viewport = this.plaitViewport;
|
|
2424
2515
|
}
|
|
2516
|
+
if (this.plaitTheme) {
|
|
2517
|
+
this.board.theme = this.plaitTheme;
|
|
2518
|
+
}
|
|
2425
2519
|
}
|
|
2426
2520
|
initializeHookListener() {
|
|
2427
2521
|
fromEvent(this.host, 'mousedown')
|
|
@@ -2466,6 +2560,16 @@ class PlaitBoardComponent {
|
|
|
2466
2560
|
event.preventDefault();
|
|
2467
2561
|
BoardTransforms.updateZoom(this.board, this.board.viewport.zoom - 0.1);
|
|
2468
2562
|
}
|
|
2563
|
+
if (isHotkey('mod+0', { byKey: true })(event)) {
|
|
2564
|
+
event.preventDefault();
|
|
2565
|
+
BoardTransforms.updateZoom(this.board, 1);
|
|
2566
|
+
return;
|
|
2567
|
+
}
|
|
2568
|
+
if (isHotkey('mod+shift+=', { byKey: true })(event)) {
|
|
2569
|
+
event.preventDefault();
|
|
2570
|
+
BoardTransforms.fitViewport(this.board);
|
|
2571
|
+
return;
|
|
2572
|
+
}
|
|
2469
2573
|
}
|
|
2470
2574
|
}), filter(event => this.isFocused && !PlaitBoard.hasBeenTextEditing(this.board) && !hasInputOrTextareaTarget(event.target)))
|
|
2471
2575
|
.subscribe((event) => {
|
|
@@ -2569,9 +2673,9 @@ class PlaitBoardComponent {
|
|
|
2569
2673
|
}
|
|
2570
2674
|
}
|
|
2571
2675
|
PlaitBoardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitBoardComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
2572
|
-
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" }, outputs: { plaitChange: "plaitChange", plaitBoardInitialized: "plaitBoardInitialized" }, host: { properties: { "class": "this.hostClass", "class.readonly": "this.readonly", "class.focused": "this.isFocused", "class.disabled-scroll": "this.disabledScrollOnNonFocus" } }, 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: `
|
|
2676
|
+
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" } }, 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: `
|
|
2573
2677
|
<div class="viewport-container" #viewportContainer>
|
|
2574
|
-
<svg #svg width="100%" height="100%" style="position: relative;"><g class="element-host"></g></svg>
|
|
2678
|
+
<svg #svg width="100%" height="100%" style="position: relative;" class="board-host-svg"><g class="element-host"></g></svg>
|
|
2575
2679
|
<plait-children [board]="board" [effect]="effect"></plait-children>
|
|
2576
2680
|
</div>
|
|
2577
2681
|
<ng-content></ng-content>
|
|
@@ -2582,7 +2686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
|
|
|
2582
2686
|
selector: 'plait-board',
|
|
2583
2687
|
template: `
|
|
2584
2688
|
<div class="viewport-container" #viewportContainer>
|
|
2585
|
-
<svg #svg width="100%" height="100%" style="position: relative;"><g class="element-host"></g></svg>
|
|
2689
|
+
<svg #svg width="100%" height="100%" style="position: relative;" class="board-host-svg"><g class="element-host"></g></svg>
|
|
2586
2690
|
<plait-children [board]="board" [effect]="effect"></plait-children>
|
|
2587
2691
|
</div>
|
|
2588
2692
|
<ng-content></ng-content>
|
|
@@ -2597,6 +2701,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
|
|
|
2597
2701
|
type: Input
|
|
2598
2702
|
}], plaitOptions: [{
|
|
2599
2703
|
type: Input
|
|
2704
|
+
}], plaitTheme: [{
|
|
2705
|
+
type: Input
|
|
2600
2706
|
}], plaitChange: [{
|
|
2601
2707
|
type: Output
|
|
2602
2708
|
}], plaitBoardInitialized: [{
|
|
@@ -2676,5 +2782,5 @@ const clearNodeWeakMap = (object) => {
|
|
|
2676
2782
|
* Generated bundle index. Do not edit.
|
|
2677
2783
|
*/
|
|
2678
2784
|
|
|
2679
|
-
export { 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_ON_CHANGE, BOARD_TO_ROUGH_SVG, BOARD_TO_SELECTED_ELEMENT, BOARD_TO_TEMPORARY_ELEMENTS, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, CLIP_BOARD_FORMAT_KEY, ELEMENT_TO_COMPONENT, FLUSHING, IS_APPLE, IS_BOARD_CACHE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_SAFARI, IS_TEXT_EDITABLE, MAX_RADIUS, MERGING, NODE_TO_INDEX, NODE_TO_PARENT, NS, PATH_REFS, POINTER_BUTTON, Path, PlaitBoard, PlaitBoardComponent, PlaitChildrenElement, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitModule, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, RectangleClient, SAVING, SCROLL_BAR_WIDTH, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, Selection, Transforms, Viewport, addMovingElements, addSelectedElement, arrowPoints, cacheMovingElements, cacheSelectedElements, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createForeignObject, createG, createPath, createSVG, createSelectionOuterG, createTestingBoard, createText, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, drawAbstractRoundRectangle, drawArrow, drawCircle, drawLine, drawLinearPath, drawRoundRectangle, fakeNodeWeakMap, getBoardRectangle, getElementHostBBox, getHitElements, getMovingElements, getRectangleByElements, getSelectedElements, getTemporaryElements, getViewBox, getViewportContainerRect, getViewportOrigination, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isInPlaitBoard, isIntersectionElements, isMainPointer, isNullOrUndefined, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setIsFromScrolling, setIsFromViewportChange, setSVGViewBox, setSelectionMoving, shouldClear, shouldMerge, shouldSave, throttleRAF, toPoint, transformPoint, transformPoints, updateForeignObject, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
|
|
2785
|
+
export { 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_ON_CHANGE, BOARD_TO_ROUGH_SVG, BOARD_TO_SELECTED_ELEMENT, BOARD_TO_TEMPORARY_ELEMENTS, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, CLIP_BOARD_FORMAT_KEY, ColorfulThemeColor, DarkThemeColor, DefaultThemeColor, ELEMENT_TO_COMPONENT, FLUSHING, IS_APPLE, IS_BOARD_CACHE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_SAFARI, IS_TEXT_EDITABLE, MAX_RADIUS, MERGING, NODE_TO_INDEX, NODE_TO_PARENT, NS, PATH_REFS, POINTER_BUTTON, Path, PlaitBoard, PlaitBoardComponent, PlaitChildrenElement, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitModule, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, RectangleClient, RetroThemeColor, SAVING, SCROLL_BAR_WIDTH, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, Selection, SoftThemeColor, StarryThemeColor, ThemeColorMode, ThemeColors, Transforms, Viewport, addMovingElements, addSelectedElement, arrowPoints, cacheMovingElements, cacheSelectedElements, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createForeignObject, createG, createPath, createSVG, createSelectionOuterG, createTestingBoard, createText, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, drawAbstractRoundRectangle, drawArrow, drawCircle, drawLine, drawLinearPath, drawRoundRectangle, fakeNodeWeakMap, getBoardRectangle, getElementHostBBox, getHitElements, getMovingElements, getRectangleByElements, getSelectedElements, getTemporaryElements, getViewBox, getViewportContainerRect, getViewportOrigination, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isInPlaitBoard, isIntersectionElements, isMainPointer, isNullOrUndefined, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setIsFromScrolling, setIsFromViewportChange, setSVGViewBox, setSelectionMoving, shouldClear, shouldMerge, shouldSave, throttleRAF, toPoint, transformPoint, transformPoints, updateForeignObject, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
|
|
2680
2786
|
//# sourceMappingURL=plait-core.mjs.map
|