@excalidraw/element 0.18.0-063e025 → 0.18.0-1118751
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/dist/dev/index.js +13047 -9808
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/index.js +19 -19
- package/dist/types/common/src/colors.d.ts +22 -0
- package/dist/types/common/src/constants.d.ts +54 -0
- package/dist/types/common/src/keys.d.ts +4 -0
- package/dist/types/common/src/points.d.ts +1 -1
- package/dist/types/common/src/random.d.ts +7 -0
- package/dist/types/common/src/utils.d.ts +1 -1
- package/dist/types/element/src/Scene.d.ts +1 -1
- package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
- package/dist/types/element/src/arrows/focus.d.ts +5 -2
- package/dist/types/element/src/binding.d.ts +15 -8
- package/dist/types/element/src/bucketFill.d.ts +110 -0
- package/dist/types/element/src/collision.d.ts +8 -5
- package/dist/types/element/src/comparisons.d.ts +7 -5
- package/dist/types/element/src/convertToShape.d.ts +23 -0
- package/dist/types/element/src/delta.d.ts +23 -1
- package/dist/types/element/src/dragElements.d.ts +27 -0
- package/dist/types/element/src/duplicate.d.ts +60 -0
- package/dist/types/element/src/flowchart.d.ts +10 -6
- package/dist/types/element/src/frame.d.ts +2 -2
- package/dist/types/element/src/groups.d.ts +1 -1
- package/dist/types/element/src/index.d.ts +4 -0
- package/dist/types/element/src/linearElementEditor.d.ts +17 -0
- package/dist/types/element/src/mutateElement.d.ts +1 -1
- package/dist/types/element/src/newElement.d.ts +37 -2
- package/dist/types/element/src/renderElement.d.ts +21 -4
- package/dist/types/element/src/selection.d.ts +1 -1
- package/dist/types/element/src/shape.d.ts +27 -1
- package/dist/types/element/src/sizeHelpers.d.ts +6 -0
- package/dist/types/element/src/sortElements.d.ts +10 -0
- package/dist/types/element/src/stickyNote.d.ts +183 -0
- package/dist/types/element/src/textElement.d.ts +7 -3
- package/dist/types/element/src/transform.d.ts +25 -6
- package/dist/types/element/src/typeChecks.d.ts +3 -2
- package/dist/types/element/src/types.d.ts +35 -6
- package/dist/types/element/src/utils.d.ts +15 -4
- package/dist/types/element/src/zindex.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +48 -9
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +32 -6
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +173 -576
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +32 -6
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +50 -10
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +13 -3
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +32 -6
- package/dist/types/excalidraw/actions/actionExport.d.ts +34 -8
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +99 -185
- package/dist/types/excalidraw/actions/actionGroup.d.ts +33 -7
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +68 -4
- package/dist/types/excalidraw/actions/actionLink.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionMenu.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionProperties.d.ts +45 -12
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionStyles.d.ts +17 -4
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +16 -3
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +17 -4
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +16 -3
- package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
- package/dist/types/excalidraw/actions/index.d.ts +1 -2
- package/dist/types/excalidraw/actions/manager.d.ts +1 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +5 -1
- package/dist/types/excalidraw/appState.d.ts +26 -5
- package/dist/types/excalidraw/components/Actions.d.ts +16 -10
- package/dist/types/excalidraw/components/App.arrowText.d.ts +104 -0
- package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
- package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
- package/dist/types/excalidraw/components/App.d.ts +468 -99
- package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
- package/dist/types/excalidraw/components/App.duplicate.d.ts +51 -0
- package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
- package/dist/types/excalidraw/components/App.pan.d.ts +54 -0
- package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
- package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
- package/dist/types/excalidraw/components/App.wheel.d.ts +26 -0
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +8 -2
- package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +5 -1
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
- package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
- package/dist/types/excalidraw/components/ColorPicker/colorTopPicksDnD.d.ts +11 -0
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +4 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
- package/dist/types/excalidraw/components/FontPicker/fontTopPicksDnD.d.ts +12 -0
- package/dist/types/excalidraw/components/IconButton.d.ts +48 -0
- package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
- package/dist/types/excalidraw/components/LayerUI.d.ts +5 -2
- package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
- package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
- package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
- package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
- package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
- package/dist/types/excalidraw/components/Popover.d.ts +1 -3
- package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
- package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
- package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
- package/dist/types/excalidraw/components/Tools.d.ts +151 -0
- package/dist/types/excalidraw/components/TopPicksDnD/TopPicksContextMenu.d.ts +14 -0
- package/dist/types/excalidraw/components/TopPicksDnD/TopPicksTip.d.ts +11 -0
- package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +58 -0
- package/dist/types/excalidraw/components/UserList.d.ts +3 -2
- package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -0
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +2 -0
- package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
- package/dist/types/excalidraw/components/icons.d.ts +5 -1
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -1
- package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
- package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
- package/dist/types/excalidraw/data/blob.d.ts +36 -10
- package/dist/types/excalidraw/data/json.d.ts +18 -5
- package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
- package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
- package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
- package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
- package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +64 -2
- package/dist/types/excalidraw/scene/index.d.ts +1 -1
- package/dist/types/excalidraw/scene/types.d.ts +6 -1
- package/dist/types/excalidraw/types.d.ts +341 -21
- package/dist/types/excalidraw/viewport.d.ts +31 -66
- package/dist/types/laser-pointer/src/state.d.ts +1 -0
- package/dist/types/math/src/curve.d.ts +19 -12
- package/dist/types/math/src/index.d.ts +1 -0
- package/dist/types/math/src/pca.d.ts +79 -0
- package/dist/types/math/src/polygon.d.ts +25 -1
- package/dist/types/math/src/segment.d.ts +6 -0
- package/dist/types/utils/src/export.d.ts +1 -0
- package/dist/types/utils/src/shape.d.ts +2 -2
- package/package.json +4 -4
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -173
- package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
- package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
- package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
- package/dist/types/excalidraw/components/shapes.d.ts +0 -270
- package/dist/types/excalidraw/cursor.d.ts +0 -5
- package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { PointerType } from "@excalidraw/element/types";
|
|
3
|
-
import "./ToolIcon.scss";
|
|
4
|
-
import type { CSSProperties } from "react";
|
|
5
|
-
export type ToolButtonSize = "small" | "medium";
|
|
6
|
-
type ToolButtonBaseProps = {
|
|
7
|
-
icon?: React.ReactNode;
|
|
8
|
-
"aria-label": string;
|
|
9
|
-
"aria-keyshortcuts"?: string;
|
|
10
|
-
"data-testid"?: string;
|
|
11
|
-
label?: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
name?: string;
|
|
14
|
-
id?: string;
|
|
15
|
-
size?: ToolButtonSize;
|
|
16
|
-
keyBindingLabel?: string | null;
|
|
17
|
-
showAriaLabel?: boolean;
|
|
18
|
-
hidden?: boolean;
|
|
19
|
-
visible?: boolean;
|
|
20
|
-
selected?: boolean;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
className?: string;
|
|
23
|
-
style?: CSSProperties;
|
|
24
|
-
isLoading?: boolean;
|
|
25
|
-
};
|
|
26
|
-
type ToolButtonProps = (ToolButtonBaseProps & {
|
|
27
|
-
type: "button";
|
|
28
|
-
children?: React.ReactNode;
|
|
29
|
-
onClick?(event: React.MouseEvent): void;
|
|
30
|
-
}) | (ToolButtonBaseProps & {
|
|
31
|
-
type: "submit";
|
|
32
|
-
children?: React.ReactNode;
|
|
33
|
-
onClick?(event: React.MouseEvent): void;
|
|
34
|
-
}) | (ToolButtonBaseProps & {
|
|
35
|
-
type: "icon";
|
|
36
|
-
children?: React.ReactNode;
|
|
37
|
-
onClick?(): void;
|
|
38
|
-
}) | (ToolButtonBaseProps & {
|
|
39
|
-
type: "radio";
|
|
40
|
-
checked: boolean;
|
|
41
|
-
onChange?(data: {
|
|
42
|
-
pointerType: PointerType | null;
|
|
43
|
-
}): void;
|
|
44
|
-
onPointerDown?(data: {
|
|
45
|
-
pointerType: PointerType;
|
|
46
|
-
}): void;
|
|
47
|
-
});
|
|
48
|
-
export declare const ToolButton: React.ForwardRefExoticComponent<ToolButtonProps & React.RefAttributes<unknown>>;
|
|
49
|
-
export {};
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import type { AppClassProperties } from "../types";
|
|
2
|
-
export declare const SHAPES: readonly [{
|
|
3
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
readonly value: "hand";
|
|
5
|
-
readonly key: "h";
|
|
6
|
-
readonly numericKey: null;
|
|
7
|
-
readonly fillable: false;
|
|
8
|
-
readonly toolbar: true;
|
|
9
|
-
}, {
|
|
10
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
readonly value: "selection";
|
|
12
|
-
readonly key: "v";
|
|
13
|
-
readonly numericKey: "1";
|
|
14
|
-
readonly fillable: true;
|
|
15
|
-
readonly toolbar: true;
|
|
16
|
-
}, {
|
|
17
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
readonly value: "rectangle";
|
|
19
|
-
readonly key: "r";
|
|
20
|
-
readonly numericKey: "2";
|
|
21
|
-
readonly fillable: true;
|
|
22
|
-
readonly toolbar: true;
|
|
23
|
-
}, {
|
|
24
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
readonly value: "diamond";
|
|
26
|
-
readonly key: "d";
|
|
27
|
-
readonly numericKey: "3";
|
|
28
|
-
readonly fillable: true;
|
|
29
|
-
readonly toolbar: true;
|
|
30
|
-
}, {
|
|
31
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
readonly value: "ellipse";
|
|
33
|
-
readonly key: "o";
|
|
34
|
-
readonly numericKey: "4";
|
|
35
|
-
readonly fillable: true;
|
|
36
|
-
readonly toolbar: true;
|
|
37
|
-
}, {
|
|
38
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
readonly value: "arrow";
|
|
40
|
-
readonly key: "a";
|
|
41
|
-
readonly numericKey: "5";
|
|
42
|
-
readonly fillable: true;
|
|
43
|
-
readonly toolbar: true;
|
|
44
|
-
}, {
|
|
45
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
readonly value: "line";
|
|
47
|
-
readonly key: "l";
|
|
48
|
-
readonly numericKey: "6";
|
|
49
|
-
readonly fillable: true;
|
|
50
|
-
readonly toolbar: true;
|
|
51
|
-
}, {
|
|
52
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
53
|
-
readonly value: "freedraw";
|
|
54
|
-
readonly key: readonly ["p", "x"];
|
|
55
|
-
readonly numericKey: "7";
|
|
56
|
-
readonly fillable: false;
|
|
57
|
-
readonly toolbar: true;
|
|
58
|
-
}, {
|
|
59
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
60
|
-
readonly value: "text";
|
|
61
|
-
readonly key: "t";
|
|
62
|
-
readonly numericKey: "8";
|
|
63
|
-
readonly fillable: false;
|
|
64
|
-
readonly toolbar: true;
|
|
65
|
-
}, {
|
|
66
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
67
|
-
readonly value: "image";
|
|
68
|
-
readonly key: null;
|
|
69
|
-
readonly numericKey: "9";
|
|
70
|
-
readonly fillable: false;
|
|
71
|
-
readonly toolbar: true;
|
|
72
|
-
}, {
|
|
73
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
74
|
-
readonly value: "eraser";
|
|
75
|
-
readonly key: "e";
|
|
76
|
-
readonly numericKey: "0";
|
|
77
|
-
readonly fillable: false;
|
|
78
|
-
readonly toolbar: true;
|
|
79
|
-
}, {
|
|
80
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
81
|
-
readonly value: "laser";
|
|
82
|
-
readonly key: "k";
|
|
83
|
-
readonly numericKey: null;
|
|
84
|
-
readonly fillable: false;
|
|
85
|
-
readonly toolbar: false;
|
|
86
|
-
}];
|
|
87
|
-
export declare const getToolbarTools: (app: AppClassProperties) => readonly [{
|
|
88
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
89
|
-
readonly value: "hand";
|
|
90
|
-
readonly key: "h";
|
|
91
|
-
readonly numericKey: null;
|
|
92
|
-
readonly fillable: false;
|
|
93
|
-
readonly toolbar: true;
|
|
94
|
-
}, {
|
|
95
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
96
|
-
readonly value: "selection";
|
|
97
|
-
readonly key: "v";
|
|
98
|
-
readonly numericKey: "1";
|
|
99
|
-
readonly fillable: true;
|
|
100
|
-
readonly toolbar: true;
|
|
101
|
-
}, {
|
|
102
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
103
|
-
readonly value: "rectangle";
|
|
104
|
-
readonly key: "r";
|
|
105
|
-
readonly numericKey: "2";
|
|
106
|
-
readonly fillable: true;
|
|
107
|
-
readonly toolbar: true;
|
|
108
|
-
}, {
|
|
109
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
110
|
-
readonly value: "diamond";
|
|
111
|
-
readonly key: "d";
|
|
112
|
-
readonly numericKey: "3";
|
|
113
|
-
readonly fillable: true;
|
|
114
|
-
readonly toolbar: true;
|
|
115
|
-
}, {
|
|
116
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
117
|
-
readonly value: "ellipse";
|
|
118
|
-
readonly key: "o";
|
|
119
|
-
readonly numericKey: "4";
|
|
120
|
-
readonly fillable: true;
|
|
121
|
-
readonly toolbar: true;
|
|
122
|
-
}, {
|
|
123
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
124
|
-
readonly value: "arrow";
|
|
125
|
-
readonly key: "a";
|
|
126
|
-
readonly numericKey: "5";
|
|
127
|
-
readonly fillable: true;
|
|
128
|
-
readonly toolbar: true;
|
|
129
|
-
}, {
|
|
130
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
131
|
-
readonly value: "line";
|
|
132
|
-
readonly key: "l";
|
|
133
|
-
readonly numericKey: "6";
|
|
134
|
-
readonly fillable: true;
|
|
135
|
-
readonly toolbar: true;
|
|
136
|
-
}, {
|
|
137
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
138
|
-
readonly value: "freedraw";
|
|
139
|
-
readonly key: readonly ["p", "x"];
|
|
140
|
-
readonly numericKey: "7";
|
|
141
|
-
readonly fillable: false;
|
|
142
|
-
readonly toolbar: true;
|
|
143
|
-
}, {
|
|
144
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
145
|
-
readonly value: "text";
|
|
146
|
-
readonly key: "t";
|
|
147
|
-
readonly numericKey: "8";
|
|
148
|
-
readonly fillable: false;
|
|
149
|
-
readonly toolbar: true;
|
|
150
|
-
}, {
|
|
151
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
152
|
-
readonly value: "image";
|
|
153
|
-
readonly key: null;
|
|
154
|
-
readonly numericKey: "9";
|
|
155
|
-
readonly fillable: false;
|
|
156
|
-
readonly toolbar: true;
|
|
157
|
-
}, {
|
|
158
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
159
|
-
readonly value: "eraser";
|
|
160
|
-
readonly key: "e";
|
|
161
|
-
readonly numericKey: "0";
|
|
162
|
-
readonly fillable: false;
|
|
163
|
-
readonly toolbar: true;
|
|
164
|
-
}, {
|
|
165
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
166
|
-
readonly value: "laser";
|
|
167
|
-
readonly key: "k";
|
|
168
|
-
readonly numericKey: null;
|
|
169
|
-
readonly fillable: false;
|
|
170
|
-
readonly toolbar: false;
|
|
171
|
-
}] | readonly [{
|
|
172
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
173
|
-
readonly value: "hand";
|
|
174
|
-
readonly key: "h";
|
|
175
|
-
readonly numericKey: null;
|
|
176
|
-
readonly fillable: false;
|
|
177
|
-
readonly toolbar: true;
|
|
178
|
-
}, {
|
|
179
|
-
readonly value: "lasso";
|
|
180
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
181
|
-
readonly key: "v";
|
|
182
|
-
readonly numericKey: "1";
|
|
183
|
-
readonly fillable: true;
|
|
184
|
-
readonly toolbar: true;
|
|
185
|
-
}, ...({
|
|
186
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
187
|
-
readonly value: "hand";
|
|
188
|
-
readonly key: "h";
|
|
189
|
-
readonly numericKey: null;
|
|
190
|
-
readonly fillable: false;
|
|
191
|
-
readonly toolbar: true;
|
|
192
|
-
} | {
|
|
193
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
194
|
-
readonly value: "selection";
|
|
195
|
-
readonly key: "v";
|
|
196
|
-
readonly numericKey: "1";
|
|
197
|
-
readonly fillable: true;
|
|
198
|
-
readonly toolbar: true;
|
|
199
|
-
} | {
|
|
200
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
201
|
-
readonly value: "rectangle";
|
|
202
|
-
readonly key: "r";
|
|
203
|
-
readonly numericKey: "2";
|
|
204
|
-
readonly fillable: true;
|
|
205
|
-
readonly toolbar: true;
|
|
206
|
-
} | {
|
|
207
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
208
|
-
readonly value: "diamond";
|
|
209
|
-
readonly key: "d";
|
|
210
|
-
readonly numericKey: "3";
|
|
211
|
-
readonly fillable: true;
|
|
212
|
-
readonly toolbar: true;
|
|
213
|
-
} | {
|
|
214
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
215
|
-
readonly value: "ellipse";
|
|
216
|
-
readonly key: "o";
|
|
217
|
-
readonly numericKey: "4";
|
|
218
|
-
readonly fillable: true;
|
|
219
|
-
readonly toolbar: true;
|
|
220
|
-
} | {
|
|
221
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
222
|
-
readonly value: "arrow";
|
|
223
|
-
readonly key: "a";
|
|
224
|
-
readonly numericKey: "5";
|
|
225
|
-
readonly fillable: true;
|
|
226
|
-
readonly toolbar: true;
|
|
227
|
-
} | {
|
|
228
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
229
|
-
readonly value: "line";
|
|
230
|
-
readonly key: "l";
|
|
231
|
-
readonly numericKey: "6";
|
|
232
|
-
readonly fillable: true;
|
|
233
|
-
readonly toolbar: true;
|
|
234
|
-
} | {
|
|
235
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
236
|
-
readonly value: "freedraw";
|
|
237
|
-
readonly key: readonly ["p", "x"];
|
|
238
|
-
readonly numericKey: "7";
|
|
239
|
-
readonly fillable: false;
|
|
240
|
-
readonly toolbar: true;
|
|
241
|
-
} | {
|
|
242
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
243
|
-
readonly value: "text";
|
|
244
|
-
readonly key: "t";
|
|
245
|
-
readonly numericKey: "8";
|
|
246
|
-
readonly fillable: false;
|
|
247
|
-
readonly toolbar: true;
|
|
248
|
-
} | {
|
|
249
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
250
|
-
readonly value: "image";
|
|
251
|
-
readonly key: null;
|
|
252
|
-
readonly numericKey: "9";
|
|
253
|
-
readonly fillable: false;
|
|
254
|
-
readonly toolbar: true;
|
|
255
|
-
} | {
|
|
256
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
257
|
-
readonly value: "eraser";
|
|
258
|
-
readonly key: "e";
|
|
259
|
-
readonly numericKey: "0";
|
|
260
|
-
readonly fillable: false;
|
|
261
|
-
readonly toolbar: true;
|
|
262
|
-
} | {
|
|
263
|
-
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
264
|
-
readonly value: "laser";
|
|
265
|
-
readonly key: "k";
|
|
266
|
-
readonly numericKey: null;
|
|
267
|
-
readonly fillable: false;
|
|
268
|
-
readonly toolbar: false;
|
|
269
|
-
})[]];
|
|
270
|
-
export declare const findShapeByKey: (key: string, app: AppClassProperties) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "lasso" | "eraser" | "hand" | "laser" | null;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { AppState } from "./types";
|
|
2
|
-
export declare const resetCursor: (interactiveCanvas: HTMLCanvasElement | null) => void;
|
|
3
|
-
export declare const setCursor: (interactiveCanvas: HTMLCanvasElement | null, cursor: string) => void;
|
|
4
|
-
export declare const setEraserCursor: (interactiveCanvas: HTMLCanvasElement | null, theme: AppState["theme"]) => void;
|
|
5
|
-
export declare const setCursorForShape: (interactiveCanvas: HTMLCanvasElement | null, appState: Pick<AppState, "activeTool" | "theme">) => void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { AppState, NormalizedZoomValue } from "../types";
|
|
2
|
-
export declare const getStateForZoom: ({ viewportX, viewportY, nextZoom, }: {
|
|
3
|
-
viewportX: number;
|
|
4
|
-
viewportY: number;
|
|
5
|
-
nextZoom: NormalizedZoomValue;
|
|
6
|
-
}, appState: AppState) => {
|
|
7
|
-
scrollX: number;
|
|
8
|
-
scrollY: number;
|
|
9
|
-
zoom: {
|
|
10
|
-
value: NormalizedZoomValue;
|
|
11
|
-
};
|
|
12
|
-
};
|