@plait/core 0.44.0 → 0.47.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/esm2022/interfaces/board.mjs +1 -1
- package/esm2022/plugins/create-board.mjs +2 -1
- package/esm2022/plugins/with-hotkey.mjs +53 -4
- package/esm2022/plugins/with-moving.mjs +3 -2
- package/esm2022/plugins/with-selection.mjs +39 -34
- package/esm2022/utils/dnd.mjs +8 -0
- package/esm2022/utils/hotkeys.mjs +13 -3
- package/esm2022/utils/index.mjs +2 -1
- package/esm2022/utils/moving-element.mjs +4 -1
- package/fesm2022/plait-core.mjs +112 -37
- package/fesm2022/plait-core.mjs.map +1 -1
- package/interfaces/board.d.ts +1 -0
- package/package.json +1 -1
- package/utils/dnd.d.ts +4 -0
- package/utils/hotkeys.d.ts +5 -0
- package/utils/index.d.ts +1 -0
package/fesm2022/plait-core.mjs
CHANGED
|
@@ -995,6 +995,8 @@ const PlaitHistoryBoard = {
|
|
|
995
995
|
const HOTKEYS = {
|
|
996
996
|
bold: 'mod+b',
|
|
997
997
|
compose: ['down', 'left', 'right', 'up', 'backspace', 'enter'],
|
|
998
|
+
arrow: ['down', 'left', 'right', 'up'],
|
|
999
|
+
extendArrow: ['shift+down', 'shift+left', 'shift+right', 'shift+up'],
|
|
998
1000
|
moveBackward: 'left',
|
|
999
1001
|
moveForward: 'right',
|
|
1000
1002
|
moveUp: 'up',
|
|
@@ -1005,9 +1007,12 @@ const HOTKEYS = {
|
|
|
1005
1007
|
deleteForward: 'shift?+delete',
|
|
1006
1008
|
extendBackward: 'shift+left',
|
|
1007
1009
|
extendForward: 'shift+right',
|
|
1010
|
+
extendUp: 'shift+up',
|
|
1011
|
+
extendDown: 'shift+down',
|
|
1008
1012
|
italic: 'mod+i',
|
|
1009
1013
|
splitBlock: 'shift?+enter',
|
|
1010
|
-
undo: 'mod+z'
|
|
1014
|
+
undo: 'mod+z',
|
|
1015
|
+
shift: 'shift'
|
|
1011
1016
|
};
|
|
1012
1017
|
const APPLE_HOTKEYS = {
|
|
1013
1018
|
moveLineBackward: 'opt+up',
|
|
@@ -1059,6 +1064,7 @@ const create = (key) => {
|
|
|
1059
1064
|
const hotkeys = {
|
|
1060
1065
|
isBold: create('bold'),
|
|
1061
1066
|
isCompose: create('compose'),
|
|
1067
|
+
isArrow: create('arrow'),
|
|
1062
1068
|
isMoveBackward: create('moveBackward'),
|
|
1063
1069
|
isMoveForward: create('moveForward'),
|
|
1064
1070
|
isMoveUp: create('moveUp'),
|
|
@@ -1071,6 +1077,9 @@ const hotkeys = {
|
|
|
1071
1077
|
isDeleteWordForward: create('deleteWordForward'),
|
|
1072
1078
|
isExtendBackward: create('extendBackward'),
|
|
1073
1079
|
isExtendForward: create('extendForward'),
|
|
1080
|
+
isExtendUp: create('extendUp'),
|
|
1081
|
+
isExtendDown: create('extendDown'),
|
|
1082
|
+
isExtendArrow: create('extendArrow'),
|
|
1074
1083
|
isExtendLineBackward: create('extendLineBackward'),
|
|
1075
1084
|
isExtendLineForward: create('extendLineForward'),
|
|
1076
1085
|
isItalic: create('italic'),
|
|
@@ -1081,7 +1090,8 @@ const hotkeys = {
|
|
|
1081
1090
|
isRedo: create('redo'),
|
|
1082
1091
|
isSplitBlock: create('splitBlock'),
|
|
1083
1092
|
isTransposeCharacter: create('transposeCharacter'),
|
|
1084
|
-
isUndo: create('undo')
|
|
1093
|
+
isUndo: create('undo'),
|
|
1094
|
+
isShift: create('shift')
|
|
1085
1095
|
};
|
|
1086
1096
|
|
|
1087
1097
|
function idCreator(length = 5) {
|
|
@@ -1554,6 +1564,14 @@ const debounce = (func, wait, options) => {
|
|
|
1554
1564
|
};
|
|
1555
1565
|
};
|
|
1556
1566
|
|
|
1567
|
+
const IS_DRAGGING = new WeakMap();
|
|
1568
|
+
const isDragging = (board) => {
|
|
1569
|
+
return !!IS_DRAGGING.get(board);
|
|
1570
|
+
};
|
|
1571
|
+
const setDragging = (board, state) => {
|
|
1572
|
+
IS_DRAGGING.set(board, state);
|
|
1573
|
+
};
|
|
1574
|
+
|
|
1557
1575
|
const getMovingElements = (board) => {
|
|
1558
1576
|
return BOARD_TO_MOVING_ELEMENT.get(board) || [];
|
|
1559
1577
|
};
|
|
@@ -1564,9 +1582,11 @@ const addMovingElements = (board, elements) => {
|
|
|
1564
1582
|
const movingElements = getMovingElements(board);
|
|
1565
1583
|
const newElements = elements.filter(item => !movingElements.find(movingElement => movingElement.key === item.key));
|
|
1566
1584
|
cacheMovingElements(board, [...movingElements, ...newElements]);
|
|
1585
|
+
setDragging(board, true);
|
|
1567
1586
|
};
|
|
1568
1587
|
const removeMovingElements = (board) => {
|
|
1569
1588
|
BOARD_TO_MOVING_ELEMENT.delete(board);
|
|
1589
|
+
setDragging(board, false);
|
|
1570
1590
|
};
|
|
1571
1591
|
const cacheMovingElements = (board, elements) => {
|
|
1572
1592
|
BOARD_TO_MOVING_ELEMENT.set(board, elements);
|
|
@@ -2596,56 +2616,45 @@ const NodeTransforms = {
|
|
|
2596
2616
|
};
|
|
2597
2617
|
|
|
2598
2618
|
function withSelection(board) {
|
|
2599
|
-
const { pointerDown,
|
|
2619
|
+
const { pointerDown, pointerUp, pointerMove, globalPointerUp, keydown, keyup, onChange, afterChange } = board;
|
|
2600
2620
|
let start = null;
|
|
2601
2621
|
let end = null;
|
|
2602
2622
|
let selectionMovingG;
|
|
2603
2623
|
let selectionRectangleG;
|
|
2604
2624
|
let previousSelectedElements;
|
|
2605
|
-
// prevent text from being selected when user pressed main pointer and is moving
|
|
2606
|
-
let needPreventNativeSelectionWhenMoving = false;
|
|
2607
2625
|
let isShift = false;
|
|
2626
|
+
let isTextSelection = false;
|
|
2608
2627
|
board.pointerDown = (event) => {
|
|
2609
|
-
const isHitText = event.target instanceof Element && event.target.closest('.plait-richtext-container');
|
|
2610
|
-
|
|
2628
|
+
const isHitText = !!(event.target instanceof Element && event.target.closest('.plait-richtext-container'));
|
|
2629
|
+
isTextSelection = isHitText && PlaitBoard.hasBeenTextEditing(board);
|
|
2630
|
+
// prevent text from being selected
|
|
2631
|
+
if (event.shiftKey && !isTextSelection) {
|
|
2611
2632
|
event.preventDefault();
|
|
2612
|
-
isShift = true;
|
|
2613
|
-
}
|
|
2614
|
-
else {
|
|
2615
|
-
isShift = false;
|
|
2616
|
-
}
|
|
2617
|
-
if (!isHitText) {
|
|
2618
|
-
needPreventNativeSelectionWhenMoving = true;
|
|
2619
2633
|
}
|
|
2620
|
-
if (!isMainPointer(event)) {
|
|
2621
|
-
pointerDown(event);
|
|
2622
|
-
return;
|
|
2623
|
-
}
|
|
2624
|
-
const options = board.getPluginOptions(PlaitPluginKey.withSelection);
|
|
2625
2634
|
const point = transformPoint(board, toPoint(event.x, event.y, PlaitBoard.getHost(board)));
|
|
2626
|
-
const selection = { anchor: point, focus: point };
|
|
2627
2635
|
const hitElement = getHitElementByPoint(board, point);
|
|
2628
|
-
const
|
|
2629
|
-
if (!isShift && hitElement && selectedElements.includes(hitElement) && !options.isDisabledSelect) {
|
|
2630
|
-
pointerDown(event);
|
|
2631
|
-
return;
|
|
2632
|
-
}
|
|
2636
|
+
const options = board.getPluginOptions(PlaitPluginKey.withSelection);
|
|
2633
2637
|
if (PlaitBoard.isPointer(board, PlaitPointerType.selection) && !hitElement && options.isMultiple && !options.isDisabledSelect) {
|
|
2634
|
-
selectionRectangleG?.remove();
|
|
2635
|
-
start = point;
|
|
2636
2638
|
preventTouchMove(board, event, true);
|
|
2639
|
+
// start rectangle selection
|
|
2640
|
+
start = transformPoint(board, toPoint(event.x, event.y, PlaitBoard.getHost(board)));
|
|
2637
2641
|
}
|
|
2638
|
-
Transforms.setSelection(board, selection);
|
|
2639
2642
|
pointerDown(event);
|
|
2640
2643
|
};
|
|
2644
|
+
board.keydown = (event) => {
|
|
2645
|
+
if (!isShift && event.key === 'Shift') {
|
|
2646
|
+
isShift = true;
|
|
2647
|
+
}
|
|
2648
|
+
keydown(event);
|
|
2649
|
+
};
|
|
2641
2650
|
board.keyup = (event) => {
|
|
2642
2651
|
if (isShift && event.key === 'Shift') {
|
|
2643
2652
|
isShift = false;
|
|
2644
2653
|
}
|
|
2645
2654
|
keyup(event);
|
|
2646
2655
|
};
|
|
2647
|
-
board.
|
|
2648
|
-
if (
|
|
2656
|
+
board.pointerMove = (event) => {
|
|
2657
|
+
if (!isTextSelection) {
|
|
2649
2658
|
// prevent text from being selected
|
|
2650
2659
|
event.preventDefault();
|
|
2651
2660
|
}
|
|
@@ -2653,7 +2662,7 @@ function withSelection(board) {
|
|
|
2653
2662
|
const movedTarget = transformPoint(board, toPoint(event.x, event.y, PlaitBoard.getHost(board)));
|
|
2654
2663
|
const rectangle = RectangleClient.toRectangleClient([start, movedTarget]);
|
|
2655
2664
|
selectionMovingG?.remove();
|
|
2656
|
-
if (Math.hypot(rectangle.width, rectangle.height) >
|
|
2665
|
+
if (Math.hypot(rectangle.width, rectangle.height) > PRESS_AND_MOVE_BUFFER || isSelectionMoving(board)) {
|
|
2657
2666
|
end = movedTarget;
|
|
2658
2667
|
throttleRAF(() => {
|
|
2659
2668
|
if (start && end) {
|
|
@@ -2670,7 +2679,19 @@ function withSelection(board) {
|
|
|
2670
2679
|
PlaitBoard.getElementActiveHost(board).append(selectionMovingG);
|
|
2671
2680
|
}
|
|
2672
2681
|
}
|
|
2673
|
-
|
|
2682
|
+
pointerMove(event);
|
|
2683
|
+
};
|
|
2684
|
+
// handle the end of click select
|
|
2685
|
+
board.pointerUp = (event) => {
|
|
2686
|
+
const isSkip = !isMainPointer(event) || isDragging(board) || !PlaitBoard.isPointer(board, PlaitPointerType.selection);
|
|
2687
|
+
if (isSkip) {
|
|
2688
|
+
pointerDown(event);
|
|
2689
|
+
return;
|
|
2690
|
+
}
|
|
2691
|
+
const point = transformPoint(board, toPoint(event.x, event.y, PlaitBoard.getHost(board)));
|
|
2692
|
+
const selection = { anchor: point, focus: point };
|
|
2693
|
+
Transforms.setSelection(board, selection);
|
|
2694
|
+
pointerUp(event);
|
|
2674
2695
|
};
|
|
2675
2696
|
board.globalPointerUp = (event) => {
|
|
2676
2697
|
if (start && end) {
|
|
@@ -2690,7 +2711,7 @@ function withSelection(board) {
|
|
|
2690
2711
|
}
|
|
2691
2712
|
start = null;
|
|
2692
2713
|
end = null;
|
|
2693
|
-
|
|
2714
|
+
isTextSelection = false;
|
|
2694
2715
|
preventTouchMove(board, event, false);
|
|
2695
2716
|
globalPointerUp(event);
|
|
2696
2717
|
};
|
|
@@ -2726,7 +2747,8 @@ function withSelection(board) {
|
|
|
2726
2747
|
cacheSelectedElements(board, newSelectedElements);
|
|
2727
2748
|
}
|
|
2728
2749
|
else {
|
|
2729
|
-
|
|
2750
|
+
const newSelectedElements = [...elements];
|
|
2751
|
+
cacheSelectedElements(board, newSelectedElements);
|
|
2730
2752
|
}
|
|
2731
2753
|
const newElements = getSelectedElements(board);
|
|
2732
2754
|
previousSelectedElements = newElements;
|
|
@@ -2797,10 +2819,12 @@ function isSelectionMoving(board) {
|
|
|
2797
2819
|
function setSelectionMoving(board) {
|
|
2798
2820
|
PlaitBoard.getBoardContainer(board).classList.add('selection-moving');
|
|
2799
2821
|
BOARD_TO_IS_SELECTION_MOVING.set(board, true);
|
|
2822
|
+
setDragging(board, true);
|
|
2800
2823
|
}
|
|
2801
2824
|
function clearSelectionMoving(board) {
|
|
2802
2825
|
PlaitBoard.getBoardContainer(board).classList.remove('selection-moving');
|
|
2803
2826
|
BOARD_TO_IS_SELECTION_MOVING.delete(board);
|
|
2827
|
+
setDragging(board, false);
|
|
2804
2828
|
}
|
|
2805
2829
|
function createSelectionRectangleG(board) {
|
|
2806
2830
|
const elements = getSelectedElements(board);
|
|
@@ -2963,6 +2987,7 @@ function createBoard(children, options) {
|
|
|
2963
2987
|
CoreTransforms.removeElements(board, elements);
|
|
2964
2988
|
},
|
|
2965
2989
|
getDeletedFragment: (data) => data,
|
|
2990
|
+
getRelatedFragment: (data) => data,
|
|
2966
2991
|
drawElement: (context) => [],
|
|
2967
2992
|
redrawElement: (context, previousContext) => { },
|
|
2968
2993
|
destroyElement: (context) => { },
|
|
@@ -3562,7 +3587,8 @@ function withMoving(board) {
|
|
|
3562
3587
|
const hitElement = getHitElementByPoint(board, point);
|
|
3563
3588
|
if (hitElement && movableElements.includes(hitElement)) {
|
|
3564
3589
|
if (selectedMovableElements.includes(hitElement)) {
|
|
3565
|
-
|
|
3590
|
+
const relatedElements = board.getRelatedFragment([]);
|
|
3591
|
+
activeElements = [...selectedMovableElements, ...relatedElements];
|
|
3566
3592
|
}
|
|
3567
3593
|
else {
|
|
3568
3594
|
activeElements = [hitElement];
|
|
@@ -3740,9 +3766,13 @@ const hasOnBoardChange = (value) => {
|
|
|
3740
3766
|
};
|
|
3741
3767
|
|
|
3742
3768
|
const withHotkey = (board) => {
|
|
3743
|
-
const { keydown, globalKeydown } = board;
|
|
3769
|
+
const { keydown, keyup, globalKeydown } = board;
|
|
3770
|
+
let isShift = false;
|
|
3744
3771
|
board.keydown = (event) => {
|
|
3745
3772
|
const options = board.getPluginOptions(PlaitPluginKey.withSelection);
|
|
3773
|
+
if (hotkeys.isShift(event)) {
|
|
3774
|
+
isShift = true;
|
|
3775
|
+
}
|
|
3746
3776
|
if (!PlaitBoard.isReadonly(board) && options.isMultiple && isHotkey('mod+a', event)) {
|
|
3747
3777
|
event.preventDefault();
|
|
3748
3778
|
let elements = [];
|
|
@@ -3769,8 +3799,53 @@ const withHotkey = (board) => {
|
|
|
3769
3799
|
event.preventDefault();
|
|
3770
3800
|
board.deleteFragment(null);
|
|
3771
3801
|
}
|
|
3802
|
+
if (!PlaitBoard.isReadonly(board) && selectedElements.length > 0 && (hotkeys.isArrow(event) || hotkeys.isExtendArrow(event))) {
|
|
3803
|
+
event.preventDefault();
|
|
3804
|
+
const offset = [0, 0];
|
|
3805
|
+
const buffer = isShift ? 10 : 1;
|
|
3806
|
+
switch (true) {
|
|
3807
|
+
case hotkeys.isMoveUp(event) || hotkeys.isExtendUp(event): {
|
|
3808
|
+
offset[1] = -buffer;
|
|
3809
|
+
break;
|
|
3810
|
+
}
|
|
3811
|
+
case hotkeys.isMoveDown(event) || hotkeys.isExtendDown(event): {
|
|
3812
|
+
offset[1] = buffer;
|
|
3813
|
+
break;
|
|
3814
|
+
}
|
|
3815
|
+
case hotkeys.isMoveBackward(event) || hotkeys.isExtendBackward(event): {
|
|
3816
|
+
offset[0] = -buffer;
|
|
3817
|
+
break;
|
|
3818
|
+
}
|
|
3819
|
+
case hotkeys.isMoveForward(event) || hotkeys.isExtendForward(event): {
|
|
3820
|
+
offset[0] = buffer;
|
|
3821
|
+
break;
|
|
3822
|
+
}
|
|
3823
|
+
}
|
|
3824
|
+
const selectedElements = getSelectedElements(board);
|
|
3825
|
+
const relatedElements = board.getRelatedFragment([]);
|
|
3826
|
+
const movableElements = board.children.filter(item => board.isMovable(item));
|
|
3827
|
+
throttleRAF(() => {
|
|
3828
|
+
[...selectedElements, ...relatedElements]
|
|
3829
|
+
.filter(element => movableElements.includes(element))
|
|
3830
|
+
.forEach(element => {
|
|
3831
|
+
const points = element.points || [];
|
|
3832
|
+
const newPoints = points.map(p => [p[0] + offset[0], p[1] + offset[1]]);
|
|
3833
|
+
Transforms.setNode(board, {
|
|
3834
|
+
points: newPoints
|
|
3835
|
+
}, PlaitBoard.findPath(board, element));
|
|
3836
|
+
MERGING.set(board, true);
|
|
3837
|
+
});
|
|
3838
|
+
});
|
|
3839
|
+
}
|
|
3772
3840
|
keydown(event);
|
|
3773
3841
|
};
|
|
3842
|
+
board.keyup = (event) => {
|
|
3843
|
+
if (event.key === 'Shift') {
|
|
3844
|
+
isShift = false;
|
|
3845
|
+
}
|
|
3846
|
+
MERGING.set(board, false);
|
|
3847
|
+
keyup(event);
|
|
3848
|
+
};
|
|
3774
3849
|
board.globalKeydown = (event) => {
|
|
3775
3850
|
if (PlaitBoard.getMovingPointInBoard(board) || PlaitBoard.isMovingPointInBoard(board)) {
|
|
3776
3851
|
if (isHotkey(['mod+=', 'mod++'], { byKey: true })(event)) {
|
|
@@ -4543,5 +4618,5 @@ function createModModifierKeys() {
|
|
|
4543
4618
|
* Generated bundle index. Do not edit.
|
|
4544
4619
|
*/
|
|
4545
4620
|
|
|
4546
|
-
export { A, ACTIVE_MOVING_CLASS_NAME, ACTIVE_STROKE_WIDTH, ALT, APOSTROPHE, ATTACHED_ELEMENT_CLASS_NAME, AT_SIGN, B, BACKSLASH, BACKSPACE, BOARD_TO_AFTER_CHANGE, 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_TOUCH_REF, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, CoreTransforms, CursorClass, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, Direction, 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_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, PlaitChildrenElementComponent, PlaitContextService, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RIGHT_ARROW, RectangleClient, ResizeCursorClass, RetroThemeColor, RgbaToHEX, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SELECTION_RECTANGLE_CLASS_NAME, 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, catmullRomFitting, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createFakeEvent, createForeignObject, createG, createKeyboardEvent, createMask, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createRect, createSVG, createSelectionRectangleG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downScale, downloadImage, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRectangle, drawRoundRectangle, fakeNodeWeakMap, findElements, getBoardRectangle, getClipboardByKey, getClipboardDataByMedia, getDataFromClipboard, getElementById, getElementHostBBox, getHitElementByPoint, getHitElementsBySelection, getIsRecursionFunc, getMovingElements, getNearestPointBetweenPointAndSegment, getNearestPointBetweenPointAndSegments, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getTemporaryRef, getTextFromClipboard, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, handleTouchTarget, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isHandleSelection, isInPlaitBoard, isLineHitLine, isMainPointer, isMovingElements, isNullOrUndefined, isPointInEllipse, isPointInPolygon, isPointInRoundRectangle, isPolylineHitRectangle, isPreventTouchMove, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetSelectionOperation, isSetViewportOperation, normalizePoint, preventTouchMove, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setClipboardData, setClipboardDataByMedia, setClipboardDataByText, setIsFromScrolling, setIsFromViewportChange, setPathStrokeLinecap, setSVGViewBox, setSelectionMoving, setStrokeLinecap, shouldClear, shouldMerge, shouldSave, temporaryDisableSelection, throttleRAF, toImage, toPoint, toSVGScreenPoint, toScreenPoint, transformPoint, transformPoints, updateForeignObject, updateForeignObjectWidth, updateViewportByScrolling, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
|
|
4621
|
+
export { A, ACTIVE_MOVING_CLASS_NAME, ACTIVE_STROKE_WIDTH, ALT, APOSTROPHE, ATTACHED_ELEMENT_CLASS_NAME, AT_SIGN, B, BACKSLASH, BACKSPACE, BOARD_TO_AFTER_CHANGE, 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_TOUCH_REF, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, CoreTransforms, CursorClass, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, Direction, 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_DRAGGING, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_MAC, 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, PlaitChildrenElementComponent, PlaitContextService, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RIGHT_ARROW, RectangleClient, ResizeCursorClass, RetroThemeColor, RgbaToHEX, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SELECTION_RECTANGLE_CLASS_NAME, 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, catmullRomFitting, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createFakeEvent, createForeignObject, createG, createKeyboardEvent, createMask, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createRect, createSVG, createSelectionRectangleG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downScale, downloadImage, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRectangle, drawRoundRectangle, fakeNodeWeakMap, findElements, getBoardRectangle, getClipboardByKey, getClipboardDataByMedia, getDataFromClipboard, getElementById, getElementHostBBox, getHitElementByPoint, getHitElementsBySelection, getIsRecursionFunc, getMovingElements, getNearestPointBetweenPointAndSegment, getNearestPointBetweenPointAndSegments, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getTemporaryRef, getTextFromClipboard, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, handleTouchTarget, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isDragging, isFromScrolling, isFromViewportChange, isHandleSelection, isInPlaitBoard, isLineHitLine, isMainPointer, isMovingElements, isNullOrUndefined, isPointInEllipse, isPointInPolygon, isPointInRoundRectangle, isPolylineHitRectangle, isPreventTouchMove, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetSelectionOperation, isSetViewportOperation, normalizePoint, preventTouchMove, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setClipboardData, setClipboardDataByMedia, setClipboardDataByText, setDragging, setIsFromScrolling, setIsFromViewportChange, setPathStrokeLinecap, setSVGViewBox, setSelectionMoving, setStrokeLinecap, shouldClear, shouldMerge, shouldSave, temporaryDisableSelection, throttleRAF, toImage, toPoint, toSVGScreenPoint, toScreenPoint, transformPoint, transformPoints, updateForeignObject, updateForeignObjectWidth, updateViewportByScrolling, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
|
|
4547
4622
|
//# sourceMappingURL=plait-core.mjs.map
|