@excalidraw/math 0.18.0-143b5b6 → 0.18.0-1440f2d
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/types/common/src/constants.d.ts +1 -0
- package/dist/types/common/src/utils.d.ts +7 -1
- package/dist/types/element/src/align.d.ts +4 -1
- package/dist/types/element/src/binding.d.ts +62 -0
- package/dist/types/element/src/bounds.d.ts +10 -2
- package/dist/types/element/src/collision.d.ts +7 -0
- package/dist/types/element/src/cropElement.d.ts +36 -4
- package/dist/types/element/src/delta.d.ts +7 -1
- package/dist/types/element/src/distribute.d.ts +4 -1
- package/dist/types/element/src/dragElements.d.ts +8 -3
- package/dist/types/element/src/elbowArrow.d.ts +5 -0
- package/dist/types/element/src/embeddable.d.ts +2 -1
- package/dist/types/element/src/flowchart.d.ts +1 -7
- package/dist/types/element/src/frame.d.ts +19 -1
- package/dist/types/element/src/groups.d.ts +1 -6
- package/dist/types/element/src/image.d.ts +5 -2
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +4 -1
- package/dist/types/element/src/listMarker.d.ts +7 -2
- package/dist/types/element/src/newElement.d.ts +3 -1
- package/dist/types/element/src/renderElement.d.ts +10 -0
- package/dist/types/element/src/renderEnvironment.d.ts +66 -0
- package/dist/types/element/src/resizeElements.d.ts +15 -5
- package/dist/types/element/src/selection.d.ts +1 -7
- package/dist/types/element/src/shape.d.ts +2 -0
- package/dist/types/element/src/stickyNote.d.ts +8 -0
- package/dist/types/element/src/textElement.d.ts +3 -2
- package/dist/types/element/src/textMeasurements.d.ts +15 -11
- package/dist/types/element/src/textWrapping.d.ts +3 -2
- package/dist/types/element/src/transform.d.ts +5 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +47 -221
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +13 -9
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -588
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionExport.d.ts +9 -7
- package/dist/types/excalidraw/actions/actionFrame.d.ts +44 -525
- package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionLink.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionMenu.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -0
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleMinimap.d.ts +201 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -0
- package/dist/types/excalidraw/actions/index.d.ts +2 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +8 -7
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -1
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +6 -5
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -1
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -1
- package/dist/types/excalidraw/charts/index.d.ts +2 -1
- package/dist/types/excalidraw/components/Actions.d.ts +9 -2
- package/dist/types/excalidraw/components/App.d.ts +23 -8
- package/dist/types/excalidraw/components/App.host.d.ts +102 -0
- package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
- package/dist/types/excalidraw/components/App.selectionTool.d.ts +42 -6
- package/dist/types/excalidraw/components/App.viewport.d.ts +23 -3
- package/dist/types/excalidraw/components/App.wheel.d.ts +6 -2
- package/dist/types/excalidraw/components/App.wrap.d.ts +31 -0
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -1
- package/dist/types/excalidraw/components/Minimap/Minimap.d.ts +15 -0
- package/dist/types/excalidraw/components/Minimap/MinimapAnnouncementDot.d.ts +10 -0
- package/dist/types/excalidraw/components/Minimap/minimap-controller.chunk.d.ts +90 -0
- package/dist/types/excalidraw/components/Minimap/minimap-shared.chunk.d.ts +122 -0
- package/dist/types/excalidraw/components/Minimap/minimap-worker.chunk.d.ts +12 -0
- package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -2
- package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +3 -2
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +14 -1
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +16 -0
- package/dist/types/excalidraw/components/Tooltip.d.ts +11 -1
- package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +0 -1
- package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +13 -2
- package/dist/types/excalidraw/components/icons.d.ts +1 -0
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -0
- package/dist/types/excalidraw/data/blob.d.ts +16 -14
- package/dist/types/excalidraw/data/index.d.ts +3 -3
- package/dist/types/excalidraw/data/json.d.ts +8 -7
- package/dist/types/excalidraw/fonts/Fonts.d.ts +9 -6
- package/dist/types/excalidraw/history.d.ts +10 -4
- package/dist/types/excalidraw/mermaid.d.ts +7 -0
- package/dist/types/excalidraw/reactUtils.d.ts +1 -1
- package/dist/types/excalidraw/renderer/animation.d.ts +11 -4
- package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
- package/dist/types/excalidraw/scene/Renderer.d.ts +1 -1
- package/dist/types/excalidraw/scene/export.d.ts +343 -20
- package/dist/types/excalidraw/scene/types.d.ts +23 -1
- package/dist/types/excalidraw/types.d.ts +48 -1
- package/dist/types/excalidraw/viewport.d.ts +1 -0
- package/dist/types/utils/src/index.d.ts +3 -1
- package/package.json +2 -2
- package/dist/types/utils/src/export.d.ts +0 -36
|
@@ -13,8 +13,8 @@ export declare const actionGroup: {
|
|
|
13
13
|
captureUpdate: "EVENTUALLY";
|
|
14
14
|
} | {
|
|
15
15
|
appState: {
|
|
16
|
-
editingGroupId: import("../types").AppState["editingGroupId"];
|
|
17
16
|
selectedElementIds: import("../types").AppState["selectedElementIds"];
|
|
17
|
+
editingGroupId: import("../types").AppState["editingGroupId"];
|
|
18
18
|
selectedGroupIds: import("../types").AppState["selectedGroupIds"];
|
|
19
19
|
contextMenu: {
|
|
20
20
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
@@ -145,6 +145,7 @@ export declare const actionGroup: {
|
|
|
145
145
|
duration?: number;
|
|
146
146
|
} | null;
|
|
147
147
|
zenModeEnabled: boolean;
|
|
148
|
+
minimapEnabled: boolean;
|
|
148
149
|
theme: import("@excalidraw/element/types").Theme;
|
|
149
150
|
gridSize: number;
|
|
150
151
|
gridStep: number;
|
|
@@ -210,8 +211,8 @@ export declare const actionUngroup: {
|
|
|
210
211
|
captureUpdate: "EVENTUALLY";
|
|
211
212
|
} | {
|
|
212
213
|
appState: {
|
|
213
|
-
editingGroupId: import("../types").AppState["editingGroupId"];
|
|
214
214
|
selectedElementIds: import("../types").AppState["selectedElementIds"];
|
|
215
|
+
editingGroupId: import("../types").AppState["editingGroupId"];
|
|
215
216
|
selectedGroupIds: import("../types").AppState["selectedGroupIds"];
|
|
216
217
|
contextMenu: {
|
|
217
218
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
@@ -342,6 +343,7 @@ export declare const actionUngroup: {
|
|
|
342
343
|
duration?: number;
|
|
343
344
|
} | null;
|
|
344
345
|
zenModeEnabled: boolean;
|
|
346
|
+
minimapEnabled: boolean;
|
|
345
347
|
theme: import("@excalidraw/element/types").Theme;
|
|
346
348
|
gridSize: number;
|
|
347
349
|
gridStep: number;
|
|
@@ -183,6 +183,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
183
183
|
duration?: number;
|
|
184
184
|
} | null;
|
|
185
185
|
zenModeEnabled: boolean;
|
|
186
|
+
minimapEnabled: boolean;
|
|
186
187
|
theme: import("@excalidraw/element/types").Theme;
|
|
187
188
|
gridSize: number;
|
|
188
189
|
gridStep: number;
|
|
@@ -376,6 +377,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
376
377
|
duration?: number;
|
|
377
378
|
} | null;
|
|
378
379
|
zenModeEnabled: boolean;
|
|
380
|
+
minimapEnabled: boolean;
|
|
379
381
|
theme: import("@excalidraw/element/types").Theme;
|
|
380
382
|
gridSize: number;
|
|
381
383
|
gridStep: number;
|
|
@@ -11,8 +11,8 @@ export declare const actionSelectAll: {
|
|
|
11
11
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => false | {
|
|
12
12
|
appState: {
|
|
13
13
|
selectedLinearElement: LinearElementEditor | null;
|
|
14
|
-
editingGroupId: import("../types").AppState["editingGroupId"];
|
|
15
14
|
selectedElementIds: import("../types").AppState["selectedElementIds"];
|
|
15
|
+
editingGroupId: import("../types").AppState["editingGroupId"];
|
|
16
16
|
selectedGroupIds: import("../types").AppState["selectedGroupIds"];
|
|
17
17
|
contextMenu: {
|
|
18
18
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
@@ -143,6 +143,7 @@ export declare const actionSelectAll: {
|
|
|
143
143
|
duration?: number;
|
|
144
144
|
} | null;
|
|
145
145
|
zenModeEnabled: boolean;
|
|
146
|
+
minimapEnabled: boolean;
|
|
146
147
|
theme: import("@excalidraw/element/types").Theme;
|
|
147
148
|
gridSize: number;
|
|
148
149
|
gridStep: number;
|
|
@@ -139,6 +139,7 @@ export declare const actionCopyStyles: {
|
|
|
139
139
|
selectedElementsAreBeingDragged: boolean;
|
|
140
140
|
shouldCacheIgnoreZoom: boolean;
|
|
141
141
|
zenModeEnabled: boolean;
|
|
142
|
+
minimapEnabled: boolean;
|
|
142
143
|
theme: import("@excalidraw/element/types").Theme;
|
|
143
144
|
gridSize: number;
|
|
144
145
|
gridStep: number;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
export declare const actionToggleMinimap: {
|
|
2
|
+
name: "minimap";
|
|
3
|
+
label: string;
|
|
4
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
keywords: string[];
|
|
6
|
+
viewMode: true;
|
|
7
|
+
navigation: true;
|
|
8
|
+
trackEvent: {
|
|
9
|
+
category: "canvas";
|
|
10
|
+
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
11
|
+
};
|
|
12
|
+
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
13
|
+
appState: {
|
|
14
|
+
minimapEnabled: boolean;
|
|
15
|
+
contextMenu: {
|
|
16
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
17
|
+
top: number;
|
|
18
|
+
left: number;
|
|
19
|
+
} | null;
|
|
20
|
+
showWelcomeScreen: boolean;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
errorMessage: React.ReactNode;
|
|
23
|
+
activeEmbeddable: {
|
|
24
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
25
|
+
state: "hover" | "active";
|
|
26
|
+
} | null;
|
|
27
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
28
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
29
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
30
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
31
|
+
isBindingEnabled: boolean;
|
|
32
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
33
|
+
bindingPreference: "enabled" | "disabled";
|
|
34
|
+
isMidpointSnappingEnabled: boolean;
|
|
35
|
+
showHints: boolean;
|
|
36
|
+
inputDevice: import("../types").InputDevice;
|
|
37
|
+
suggestedBinding: {
|
|
38
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
39
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
40
|
+
} | null;
|
|
41
|
+
textToolHover: {
|
|
42
|
+
type: "text";
|
|
43
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
44
|
+
} | {
|
|
45
|
+
type: "container";
|
|
46
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
47
|
+
} | {
|
|
48
|
+
type: "arrow";
|
|
49
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
50
|
+
anchor: "start" | "end" | "label";
|
|
51
|
+
} | null;
|
|
52
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
53
|
+
frameRendering: {
|
|
54
|
+
enabled: boolean;
|
|
55
|
+
name: boolean;
|
|
56
|
+
outline: boolean;
|
|
57
|
+
clip: boolean;
|
|
58
|
+
};
|
|
59
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
60
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
61
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
62
|
+
activeTool: {
|
|
63
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
64
|
+
locked: boolean;
|
|
65
|
+
fromSelection: boolean;
|
|
66
|
+
} & import("../types").ActiveTool;
|
|
67
|
+
preferredSelectionTool: {
|
|
68
|
+
type: "selection" | "lasso";
|
|
69
|
+
initialized: boolean;
|
|
70
|
+
};
|
|
71
|
+
penMode: boolean;
|
|
72
|
+
penDetected: boolean;
|
|
73
|
+
exportBackground: boolean;
|
|
74
|
+
exportEmbedScene: boolean;
|
|
75
|
+
exportWithDarkMode: boolean;
|
|
76
|
+
exportScale: number;
|
|
77
|
+
currentItemStrokeColor: string;
|
|
78
|
+
currentItemStickynoteStrokeColor: string;
|
|
79
|
+
currentItemStickynoteBackgroundColor: string;
|
|
80
|
+
currentItemBackgroundColor: string;
|
|
81
|
+
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
82
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
83
|
+
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
84
|
+
currentItemRoughness: number;
|
|
85
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
86
|
+
currentItemOpacity: number;
|
|
87
|
+
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
88
|
+
currentItemFontSize: number;
|
|
89
|
+
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
90
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
91
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
92
|
+
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
93
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
94
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
95
|
+
viewBackgroundColor: string;
|
|
96
|
+
scrollX: number;
|
|
97
|
+
scrollY: number;
|
|
98
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
99
|
+
cursorButton: "up" | "down";
|
|
100
|
+
scrolledOutside: boolean;
|
|
101
|
+
name: string | null;
|
|
102
|
+
isResizing: boolean;
|
|
103
|
+
isRotating: boolean;
|
|
104
|
+
zoom: import("../types").Zoom;
|
|
105
|
+
openMenu: "canvas" | null;
|
|
106
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
107
|
+
openSidebar: {
|
|
108
|
+
name: import("../types").SidebarName;
|
|
109
|
+
tab?: import("../types").SidebarTabName;
|
|
110
|
+
} | null;
|
|
111
|
+
openDialog: null | {
|
|
112
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
113
|
+
} | {
|
|
114
|
+
name: "ttd";
|
|
115
|
+
tab: "text-to-diagram" | "mermaid";
|
|
116
|
+
} | {
|
|
117
|
+
name: "commandPalette";
|
|
118
|
+
} | {
|
|
119
|
+
name: "settings";
|
|
120
|
+
} | {
|
|
121
|
+
name: "elementLinkSelector";
|
|
122
|
+
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
123
|
+
} | {
|
|
124
|
+
name: "charts";
|
|
125
|
+
data: import("../charts").Spreadsheet;
|
|
126
|
+
rawText: string;
|
|
127
|
+
};
|
|
128
|
+
defaultSidebarDockedPreference: boolean;
|
|
129
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
130
|
+
selectedElementIds: Readonly<{
|
|
131
|
+
[id: string]: true;
|
|
132
|
+
}>;
|
|
133
|
+
hoveredElementIds: Readonly<{
|
|
134
|
+
[id: string]: true;
|
|
135
|
+
}>;
|
|
136
|
+
previousSelectedElementIds: {
|
|
137
|
+
[id: string]: true;
|
|
138
|
+
};
|
|
139
|
+
selectedElementsAreBeingDragged: boolean;
|
|
140
|
+
shouldCacheIgnoreZoom: boolean;
|
|
141
|
+
toast: {
|
|
142
|
+
message: React.ReactNode;
|
|
143
|
+
closable?: boolean;
|
|
144
|
+
duration?: number;
|
|
145
|
+
} | null;
|
|
146
|
+
zenModeEnabled: boolean;
|
|
147
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
148
|
+
gridSize: number;
|
|
149
|
+
gridStep: number;
|
|
150
|
+
gridModeEnabled: boolean;
|
|
151
|
+
viewModeEnabled: boolean;
|
|
152
|
+
selectedGroupIds: {
|
|
153
|
+
[groupId: string]: boolean;
|
|
154
|
+
};
|
|
155
|
+
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
156
|
+
width: number;
|
|
157
|
+
height: number;
|
|
158
|
+
offsetTop: number;
|
|
159
|
+
offsetLeft: number;
|
|
160
|
+
fileHandle: FileSystemFileHandle | null;
|
|
161
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
162
|
+
stats: {
|
|
163
|
+
open: boolean;
|
|
164
|
+
panels: number;
|
|
165
|
+
};
|
|
166
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
167
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
168
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
169
|
+
originSnapOffset: {
|
|
170
|
+
x: number;
|
|
171
|
+
y: number;
|
|
172
|
+
} | null;
|
|
173
|
+
objectsSnapModeEnabled: boolean;
|
|
174
|
+
isCropping: boolean;
|
|
175
|
+
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
176
|
+
searchMatches: Readonly<{
|
|
177
|
+
focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
178
|
+
matches: readonly import("../types").SearchMatch[];
|
|
179
|
+
}> | null;
|
|
180
|
+
activeLockedId: string | null;
|
|
181
|
+
lockedMultiSelections: {
|
|
182
|
+
[groupId: string]: true;
|
|
183
|
+
};
|
|
184
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
185
|
+
colorTopPicks: {
|
|
186
|
+
elementStroke: readonly string[] | null;
|
|
187
|
+
elementBackground: readonly string[] | null;
|
|
188
|
+
bucketFill: readonly string[] | null;
|
|
189
|
+
stickyNoteStroke: readonly string[] | null;
|
|
190
|
+
stickyNoteBackground: readonly string[] | null;
|
|
191
|
+
};
|
|
192
|
+
fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
|
|
193
|
+
};
|
|
194
|
+
captureUpdate: "EVENTUALLY";
|
|
195
|
+
};
|
|
196
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
197
|
+
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
198
|
+
PanelComponent: ({ appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
199
|
+
} & {
|
|
200
|
+
keyTest?: undefined;
|
|
201
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const actionToggleWrap: {
|
|
2
|
+
name: "toggleWrap";
|
|
3
|
+
label: string;
|
|
4
|
+
trackEvent: {
|
|
5
|
+
category: "element";
|
|
6
|
+
};
|
|
7
|
+
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
8
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => import("./types").ActionResult;
|
|
9
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
|
|
10
|
+
} & {
|
|
11
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
|
|
12
|
+
};
|
|
@@ -23,7 +23,9 @@ export { actionToggleArrowBinding } from "./actionToggleArrowBinding";
|
|
|
23
23
|
export { actionToggleMidpointSnapping } from "./actionToggleMidpointSnapping";
|
|
24
24
|
export { actionToggleShowHints } from "./actionToggleShowHints";
|
|
25
25
|
export { actionToggleStats } from "./actionToggleStats";
|
|
26
|
+
export { actionToggleMinimap } from "./actionToggleMinimap";
|
|
26
27
|
export { actionUnbindText, actionBindText } from "./actionBoundText";
|
|
28
|
+
export { actionToggleWrap } from "./actionToggleWrap";
|
|
27
29
|
export { actionLink } from "./actionLink";
|
|
28
30
|
export { actionToggleElementLock } from "./actionElementLock";
|
|
29
31
|
export { actionToggleLinearEditor } from "./actionLinearEditor";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SubtypeOf } from "@excalidraw/common/utility-types";
|
|
2
2
|
import type { ActionName } from "./types";
|
|
3
|
-
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu" | "toolLock";
|
|
3
|
+
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "toggleWrap"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu" | "toolLock";
|
|
4
4
|
export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
|
|
@@ -14,7 +14,7 @@ export type ActionResult = {
|
|
|
14
14
|
type ActionFn<TData = any> = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: TData | undefined, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "showHints" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeBucketFillBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeSloppiness" | "changeFreedrawMode" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleShapeSwitch" | "togglePolygon";
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "showHints" | "stats" | "minimap" | "changeStrokeColor" | "changeBackgroundColor" | "changeBucketFillBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeSloppiness" | "changeFreedrawMode" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleWrap" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: UIAppState;
|
|
@@ -7,12 +7,14 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
7
7
|
zoom?: Readonly<{
|
|
8
8
|
value: NormalizedZoomValue;
|
|
9
9
|
}> | undefined;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
editingGroupId?: string | null | undefined;
|
|
10
|
+
isBindingEnabled?: boolean | undefined;
|
|
11
|
+
isMidpointSnappingEnabled?: boolean | undefined;
|
|
13
12
|
selectedElementIds?: Readonly<{
|
|
14
13
|
[id: string]: true;
|
|
15
14
|
}> | undefined;
|
|
15
|
+
scrollX?: number | undefined;
|
|
16
|
+
scrollY?: number | undefined;
|
|
17
|
+
editingGroupId?: string | null | undefined;
|
|
16
18
|
activeTool?: ({
|
|
17
19
|
lastActiveTool: import("./types").ActiveTool | null;
|
|
18
20
|
locked: boolean;
|
|
@@ -22,15 +24,11 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
22
24
|
[groupId: string]: boolean;
|
|
23
25
|
} | undefined;
|
|
24
26
|
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
25
|
-
isBindingEnabled?: boolean | undefined;
|
|
26
|
-
isMidpointSnappingEnabled?: boolean | undefined;
|
|
27
27
|
gridModeEnabled?: boolean | undefined;
|
|
28
28
|
zenModeEnabled?: boolean | undefined;
|
|
29
29
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
30
30
|
exportScale?: number | undefined;
|
|
31
31
|
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
32
|
-
gridSize?: number | undefined;
|
|
33
|
-
bindMode?: import("@excalidraw/element/types").BindMode | undefined;
|
|
34
32
|
showWelcomeScreen?: boolean | undefined;
|
|
35
33
|
boxSelectionMode?: import("./types").BoxSelectionMode | undefined;
|
|
36
34
|
bindingPreference?: "enabled" | "disabled" | undefined;
|
|
@@ -73,6 +71,8 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
73
71
|
previousSelectedElementIds?: {
|
|
74
72
|
[id: string]: true;
|
|
75
73
|
} | undefined;
|
|
74
|
+
minimapEnabled?: boolean | undefined;
|
|
75
|
+
gridSize?: number | undefined;
|
|
76
76
|
gridStep?: number | undefined;
|
|
77
77
|
stats?: {
|
|
78
78
|
open: boolean;
|
|
@@ -82,6 +82,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
82
82
|
lockedMultiSelections?: {
|
|
83
83
|
[groupId: string]: true;
|
|
84
84
|
} | undefined;
|
|
85
|
+
bindMode?: import("@excalidraw/element/types").BindMode | undefined;
|
|
85
86
|
colorTopPicks?: {
|
|
86
87
|
elementStroke: readonly string[] | null;
|
|
87
88
|
elementBackground: readonly string[] | null;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { RenderEnvironment } from "@excalidraw/element";
|
|
1
2
|
import type { ChartElements, Spreadsheet } from "./charts.types";
|
|
2
|
-
export declare const renderBarChart: (spreadsheet: Spreadsheet, x: number, y: number, colorSeed?: number) => ChartElements;
|
|
3
|
+
export declare const renderBarChart: (spreadsheet: Spreadsheet, x: number, y: number, colorSeed?: number, renderEnvironment?: RenderEnvironment) => ChartElements;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getFontString } from "@excalidraw/common";
|
|
2
|
+
import type { RenderEnvironment } from "@excalidraw/element";
|
|
2
3
|
import type { ChartType } from "@excalidraw/element/types";
|
|
3
4
|
import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
4
5
|
import { type CartesianChartLayout, type CartesianChartType } from "./charts.constants";
|
|
@@ -20,13 +21,13 @@ export declare const getRadarValueScale: (series: SpreadsheetSeries[], _labelsLe
|
|
|
20
21
|
renderSteps: boolean;
|
|
21
22
|
normalize: (value: number, _axisIndex: number) => number;
|
|
22
23
|
};
|
|
23
|
-
export declare const getRadarDisplayText: (text: string, fontString: ReturnType<typeof getFontString>, maxWidth: number) => string;
|
|
24
|
-
export declare const createRadarAxisLabels: (labels: readonly string[], angles: readonly number[], centerX: number, centerY: number, radius: number, backgroundColor: string) => {
|
|
24
|
+
export declare const getRadarDisplayText: (text: string, fontString: ReturnType<typeof getFontString>, maxWidth: number, renderEnvironment?: RenderEnvironment) => string;
|
|
25
|
+
export declare const createRadarAxisLabels: (labels: readonly string[], angles: readonly number[], centerX: number, centerY: number, radius: number, backgroundColor: string, renderEnvironment?: RenderEnvironment) => {
|
|
25
26
|
axisLabels: ChartElements;
|
|
26
27
|
axisLabelTopY: number;
|
|
27
28
|
axisLabelBottomY: number;
|
|
28
29
|
};
|
|
29
|
-
export declare const createSeriesLegend: (series: SpreadsheetSeries[], seriesColors: readonly string[], centerX: number, minLegendTopY: number, fallbackLegendY: number, backgroundColor: string) => ChartElements;
|
|
30
|
+
export declare const createSeriesLegend: (series: SpreadsheetSeries[], seriesColors: readonly string[], centerX: number, minLegendTopY: number, fallbackLegendY: number, backgroundColor: string, renderEnvironment?: RenderEnvironment) => ChartElements;
|
|
30
31
|
export declare const getRotatedTextElementBottom: (element: NonDeletedExcalidrawElement) => number;
|
|
31
|
-
export declare const chartXLabels: (spreadsheet: Spreadsheet, x: number, y: number, backgroundColor: string, layout: CartesianChartLayout) => ChartElements;
|
|
32
|
-
export declare const chartBaseElements: (spreadsheet: Spreadsheet, x: number, y: number, backgroundColor: string, layout: CartesianChartLayout, maxValue?: number, debug?: boolean) => ChartElements;
|
|
32
|
+
export declare const chartXLabels: (spreadsheet: Spreadsheet, x: number, y: number, backgroundColor: string, layout: CartesianChartLayout, renderEnvironment?: RenderEnvironment) => ChartElements;
|
|
33
|
+
export declare const chartBaseElements: (spreadsheet: Spreadsheet, x: number, y: number, backgroundColor: string, layout: CartesianChartLayout, maxValue?: number, debug?: boolean, renderEnvironment?: RenderEnvironment) => ChartElements;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { RenderEnvironment } from "@excalidraw/element";
|
|
1
2
|
import type { ChartElements, Spreadsheet } from "./charts.types";
|
|
2
|
-
export declare const renderLineChart: (spreadsheet: Spreadsheet, x: number, y: number, colorSeed?: number) => ChartElements;
|
|
3
|
+
export declare const renderLineChart: (spreadsheet: Spreadsheet, x: number, y: number, colorSeed?: number, renderEnvironment?: RenderEnvironment) => ChartElements;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { RenderEnvironment } from "@excalidraw/element";
|
|
1
2
|
import type { ChartElements, Spreadsheet } from "./charts.types";
|
|
2
|
-
export declare const renderRadarChart: (spreadsheet: Spreadsheet, x: number, y: number, colorSeed?: number) => ChartElements | null;
|
|
3
|
+
export declare const renderRadarChart: (spreadsheet: Spreadsheet, x: number, y: number, colorSeed?: number, renderEnvironment?: RenderEnvironment) => ChartElements | null;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ChartType } from "@excalidraw/element/types";
|
|
2
|
+
import type { RenderEnvironment } from "@excalidraw/element";
|
|
2
3
|
import { tryParseCells, tryParseNumber, tryParseSpreadsheet } from "./charts.parse";
|
|
3
4
|
import type { ChartElements, Spreadsheet } from "./charts.types";
|
|
4
5
|
export { type ParseSpreadsheetResult, type Spreadsheet, type SpreadsheetSeries, type ChartElements, } from "./charts.types";
|
|
5
6
|
export { isSpreadsheetValidForChartType } from "./charts.helpers";
|
|
6
7
|
export { tryParseCells, tryParseNumber, tryParseSpreadsheet };
|
|
7
|
-
export declare const renderSpreadsheet: (chartType: ChartType, spreadsheet: Spreadsheet, x: number, y: number, colorSeed?: number) => ChartElements | null;
|
|
8
|
+
export declare const renderSpreadsheet: (chartType: ChartType, spreadsheet: Spreadsheet, x: number, y: number, colorSeed?: number, renderEnvironment?: RenderEnvironment) => ChartElements | null;
|
|
@@ -36,8 +36,15 @@ export declare const MobileShapeActions: ({ appState, elementsMap, renderAction,
|
|
|
36
36
|
app: AppClassProperties;
|
|
37
37
|
setAppState: React.Component<any, AppState>["setState"];
|
|
38
38
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
/**
|
|
40
|
+
* The zoom level, opening a menu of the zoom actions, along with the minimap
|
|
41
|
+
* toggle.
|
|
42
|
+
*/
|
|
43
|
+
export declare const ZoomActions: ({ actionManager, zoomUIEnabled, minimapUIEnabled, zenModeEnabled, }: {
|
|
44
|
+
actionManager: ActionManager;
|
|
45
|
+
zoomUIEnabled: boolean;
|
|
46
|
+
minimapUIEnabled: boolean;
|
|
47
|
+
zenModeEnabled: boolean;
|
|
41
48
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
42
49
|
export declare const UndoRedoActions: ({ renderAction, className, }: {
|
|
43
50
|
renderAction: ActionManager["renderAction"];
|