@dwelle/excalidraw 0.5.0-e05a141 → 0.5.0-e2a82c4d8
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/{chunk-JCMFCSXV.js → chunk-7M7SVUYU.js} +121 -7
- package/dist/dev/chunk-7M7SVUYU.js.map +7 -0
- package/dist/dev/{chunk-P7XQCHXR.js → chunk-HJWER26G.js} +901 -439
- package/dist/dev/chunk-HJWER26G.js.map +7 -0
- package/dist/dev/{chunk-B7UQ5W6R.js → chunk-Q5BO7QEK.js} +2 -2
- package/dist/dev/{chunk-B7UQ5W6R.js.map → chunk-Q5BO7QEK.js.map} +1 -1
- package/dist/dev/components/TTDDialog/CodeMirrorEditor-4GD6MAJW.js +259 -0
- package/dist/dev/components/TTDDialog/CodeMirrorEditor-4GD6MAJW.js.map +7 -0
- package/dist/dev/data/{image-BUI6GQJR.js → image-UQK7BQY4.js} +3 -3
- package/dist/dev/index.css +2444 -173
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +6875 -1415
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-SEGQGVZN.js → en-IHKMFGHF.js} +6 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/chunk-QHCRJDAB.js +12 -0
- package/dist/prod/chunk-R2CZDOAE.js +34 -0
- package/dist/prod/{chunk-KDBB3MAO.js → chunk-XXRJJHWR.js} +1 -1
- package/dist/prod/components/TTDDialog/CodeMirrorEditor-P2CDXXOC.js +1 -0
- package/dist/prod/data/image-WAWRV65K.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +34 -25
- package/dist/prod/locales/en-QQWGF6XN.js +1 -0
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/utils.d.ts +5 -3
- package/dist/types/element/src/Scene.d.ts +2 -0
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/binding.d.ts +5 -4
- package/dist/types/element/src/bounds.d.ts +5 -3
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/frame.d.ts +1 -1
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +5 -2
- package/dist/types/element/src/mutateElement.d.ts +2 -0
- package/dist/types/element/src/selection.d.ts +7 -3
- package/dist/types/element/src/shape.d.ts +1 -1
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/textWrapping.d.ts +26 -0
- package/dist/types/element/src/types.d.ts +4 -1
- package/dist/types/element/src/utils.d.ts +2 -2
- package/dist/types/excalidraw/TTA/TTAChatEmptyState.d.ts +7 -0
- package/dist/types/excalidraw/TTA/TTAChatMessage.d.ts +15 -0
- package/dist/types/excalidraw/TTA/TTAComposer.d.ts +24 -0
- package/dist/types/excalidraw/TTA/TTADialog.d.ts +19 -0
- package/dist/types/excalidraw/TTA/TTADialogPanel.d.ts +46 -0
- package/dist/types/excalidraw/TTA/TTADialogTrigger.d.ts +10 -0
- package/dist/types/excalidraw/TTA/TTAHistory.d.ts +11 -0
- package/dist/types/excalidraw/TTA/TTAWarningMessage.d.ts +5 -0
- package/dist/types/excalidraw/TTA/chatErrors.d.ts +13 -0
- package/dist/types/excalidraw/TTA/chatHelpers.d.ts +26 -0
- package/dist/types/excalidraw/TTA/client.d.ts +74 -0
- package/dist/types/excalidraw/TTA/history.d.ts +2 -0
- package/dist/types/excalidraw/TTA/insertAISkeletons.d.ts +20 -0
- package/dist/types/excalidraw/TTA/types.d.ts +167 -0
- package/dist/types/excalidraw/TTA/useAIAssistantPreview.d.ts +18 -0
- package/dist/types/excalidraw/TTA/useAIStreamingCanvasPreview.d.ts +21 -0
- package/dist/types/excalidraw/TTA/useAIStreamingLifecycle.d.ts +34 -0
- package/dist/types/excalidraw/TTA/useTTAChatHistory.d.ts +18 -0
- package/dist/types/excalidraw/TTA/utils.d.ts +14 -0
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +15 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +11 -5
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +50 -20
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +10 -4
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +15 -6
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +161 -0
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +10 -4
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionExport.d.ts +21 -8
- package/dist/types/excalidraw/actions/actionFrame.d.ts +20 -8
- package/dist/types/excalidraw/actions/actionGroup.d.ts +11 -5
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionLink.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionMenu.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionStyles.d.ts +6 -2
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +174 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +174 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -2
- package/dist/types/excalidraw/actions/index.d.ts +3 -0
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/aiWarnings.d.ts +7 -0
- package/dist/types/excalidraw/appState.d.ts +4 -0
- package/dist/types/excalidraw/components/AI/ChatMessage.d.ts +33 -0
- package/dist/types/excalidraw/components/AI/index.d.ts +2 -0
- package/dist/types/excalidraw/components/App.d.ts +11 -1
- package/dist/types/excalidraw/components/FilledButton.d.ts +1 -1
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- package/dist/types/excalidraw/components/TTDDialog/Chat/TTDRateLimitWarningContent.d.ts +5 -0
- package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +2 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +5 -1
- package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -6
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +18 -8
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +3 -0
- package/dist/types/excalidraw/context/tunnels.d.ts +1 -0
- package/dist/types/excalidraw/data/blob.d.ts +9 -3
- package/dist/types/excalidraw/data/filesystem.d.ts +3 -3
- package/dist/types/excalidraw/data/index.d.ts +1 -1
- package/dist/types/excalidraw/data/json.d.ts +6 -3
- package/dist/types/excalidraw/data/resave.d.ts +1 -1
- package/dist/types/excalidraw/data/sse.d.ts +15 -0
- package/dist/types/excalidraw/index.d.ts +15 -2
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +15 -2
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
- package/dist/types/math/src/curve.d.ts +4 -1
- package/dist/types/math/src/point.d.ts +1 -1
- package/package.json +11 -5
- package/CHANGELOG.md +0 -2385
- package/dist/dev/chunk-JCMFCSXV.js.map +0 -7
- package/dist/dev/chunk-P7XQCHXR.js.map +0 -7
- package/dist/prod/chunk-FVPDTNSG.js +0 -12
- package/dist/prod/chunk-LRBVLW2I.js +0 -33
- package/dist/prod/data/image-KI7JN73E.js +0 -1
- package/dist/prod/locales/en-6237XDE7.js +0 -1
- package/dist/types/excalidraw/data/ai/types.d.ts +0 -242
- package/history.ts +0 -249
- /package/dist/dev/data/{image-BUI6GQJR.js.map → image-UQK7BQY4.js.map} +0 -0
- /package/dist/dev/locales/{en-SEGQGVZN.js.map → en-IHKMFGHF.js.map} +0 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
export declare const actionToggleArrowBinding: {
|
|
2
|
+
name: "arrowBinding";
|
|
3
|
+
label: string;
|
|
4
|
+
viewMode: false;
|
|
5
|
+
trackEvent: {
|
|
6
|
+
category: "canvas";
|
|
7
|
+
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
8
|
+
};
|
|
9
|
+
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
10
|
+
appState: {
|
|
11
|
+
bindingPreference: "enabled" | "disabled";
|
|
12
|
+
isBindingEnabled: boolean;
|
|
13
|
+
contextMenu: {
|
|
14
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
15
|
+
top: number;
|
|
16
|
+
left: number;
|
|
17
|
+
} | null;
|
|
18
|
+
showWelcomeScreen: boolean;
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
errorMessage: React.ReactNode;
|
|
21
|
+
activeEmbeddable: {
|
|
22
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
23
|
+
state: "hover" | "active";
|
|
24
|
+
} | null;
|
|
25
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
26
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
27
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
28
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
29
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
30
|
+
isMidpointSnappingEnabled: boolean;
|
|
31
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
32
|
+
suggestedBinding: {
|
|
33
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
34
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
35
|
+
} | null;
|
|
36
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
37
|
+
frameRendering: {
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
name: boolean;
|
|
40
|
+
outline: boolean;
|
|
41
|
+
clip: boolean;
|
|
42
|
+
};
|
|
43
|
+
editingFrame: string | null;
|
|
44
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
45
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
46
|
+
activeTool: {
|
|
47
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
48
|
+
locked: boolean;
|
|
49
|
+
fromSelection: boolean;
|
|
50
|
+
} & import("../types").ActiveTool;
|
|
51
|
+
preferredSelectionTool: {
|
|
52
|
+
type: "selection" | "lasso";
|
|
53
|
+
initialized: boolean;
|
|
54
|
+
};
|
|
55
|
+
penMode: boolean;
|
|
56
|
+
penDetected: boolean;
|
|
57
|
+
exportBackground: boolean;
|
|
58
|
+
exportEmbedScene: boolean;
|
|
59
|
+
exportWithDarkMode: boolean;
|
|
60
|
+
exportScale: number;
|
|
61
|
+
currentItemStrokeColor: string;
|
|
62
|
+
currentItemBackgroundColor: string;
|
|
63
|
+
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
64
|
+
currentItemStrokeWidth: number;
|
|
65
|
+
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
66
|
+
currentItemRoughness: number;
|
|
67
|
+
currentItemOpacity: number;
|
|
68
|
+
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
69
|
+
currentItemFontSize: number;
|
|
70
|
+
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
71
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
72
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
73
|
+
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
74
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
75
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
76
|
+
viewBackgroundColor: string;
|
|
77
|
+
scrollX: number;
|
|
78
|
+
scrollY: number;
|
|
79
|
+
cursorButton: "up" | "down";
|
|
80
|
+
scrolledOutside: boolean;
|
|
81
|
+
name: string | null;
|
|
82
|
+
isResizing: boolean;
|
|
83
|
+
isRotating: boolean;
|
|
84
|
+
zoom: import("../types").Zoom;
|
|
85
|
+
openMenu: "canvas" | null;
|
|
86
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
87
|
+
openSidebar: {
|
|
88
|
+
name: import("../types").SidebarName;
|
|
89
|
+
tab?: import("../types").SidebarTabName;
|
|
90
|
+
} | null;
|
|
91
|
+
openDialog: null | {
|
|
92
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
93
|
+
} | {
|
|
94
|
+
name: "ttd";
|
|
95
|
+
tab: "text-to-diagram" | "mermaid";
|
|
96
|
+
} | {
|
|
97
|
+
name: "commandPalette";
|
|
98
|
+
} | {
|
|
99
|
+
name: "settings";
|
|
100
|
+
} | {
|
|
101
|
+
name: "elementLinkSelector";
|
|
102
|
+
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
103
|
+
} | {
|
|
104
|
+
name: "charts";
|
|
105
|
+
data: import("../charts").Spreadsheet;
|
|
106
|
+
rawText: string;
|
|
107
|
+
};
|
|
108
|
+
defaultSidebarDockedPreference: boolean;
|
|
109
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
110
|
+
selectedElementIds: Readonly<{
|
|
111
|
+
[id: string]: true;
|
|
112
|
+
}>;
|
|
113
|
+
hoveredElementIds: Readonly<{
|
|
114
|
+
[id: string]: true;
|
|
115
|
+
}>;
|
|
116
|
+
previousSelectedElementIds: {
|
|
117
|
+
[id: string]: true;
|
|
118
|
+
};
|
|
119
|
+
selectedElementsAreBeingDragged: boolean;
|
|
120
|
+
shouldCacheIgnoreZoom: boolean;
|
|
121
|
+
toast: {
|
|
122
|
+
message: string;
|
|
123
|
+
closable?: boolean;
|
|
124
|
+
duration?: number;
|
|
125
|
+
} | null;
|
|
126
|
+
zenModeEnabled: boolean;
|
|
127
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
128
|
+
gridSize: number;
|
|
129
|
+
gridStep: number;
|
|
130
|
+
gridModeEnabled: boolean;
|
|
131
|
+
viewModeEnabled: boolean;
|
|
132
|
+
selectedGroupIds: {
|
|
133
|
+
[groupId: string]: boolean;
|
|
134
|
+
};
|
|
135
|
+
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
136
|
+
width: number;
|
|
137
|
+
height: number;
|
|
138
|
+
offsetTop: number;
|
|
139
|
+
offsetLeft: number;
|
|
140
|
+
fileHandle: import("../data/filesystem").FileSystemHandle | null;
|
|
141
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
142
|
+
stats: {
|
|
143
|
+
open: boolean;
|
|
144
|
+
panels: number;
|
|
145
|
+
};
|
|
146
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
147
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
148
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
149
|
+
originSnapOffset: {
|
|
150
|
+
x: number;
|
|
151
|
+
y: number;
|
|
152
|
+
} | null;
|
|
153
|
+
objectsSnapModeEnabled: boolean;
|
|
154
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
155
|
+
followedBy: Set<import("../types").SocketId>;
|
|
156
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
157
|
+
isCropping: boolean;
|
|
158
|
+
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
159
|
+
searchMatches: Readonly<{
|
|
160
|
+
focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
161
|
+
matches: readonly import("../types").SearchMatch[];
|
|
162
|
+
}> | null;
|
|
163
|
+
activeLockedId: string | null;
|
|
164
|
+
lockedMultiSelections: {
|
|
165
|
+
[groupId: string]: true;
|
|
166
|
+
};
|
|
167
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
168
|
+
};
|
|
169
|
+
captureUpdate: "NEVER";
|
|
170
|
+
};
|
|
171
|
+
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
172
|
+
} & {
|
|
173
|
+
keyTest?: undefined;
|
|
174
|
+
};
|
|
@@ -30,6 +30,9 @@ export declare const actionToggleGridMode: {
|
|
|
30
30
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
31
31
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
32
32
|
isBindingEnabled: boolean;
|
|
33
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
34
|
+
bindingPreference: "enabled" | "disabled";
|
|
35
|
+
isMidpointSnappingEnabled: boolean;
|
|
33
36
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
34
37
|
suggestedBinding: {
|
|
35
38
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -44,7 +47,7 @@ export declare const actionToggleGridMode: {
|
|
|
44
47
|
};
|
|
45
48
|
editingFrame: string | null;
|
|
46
49
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
47
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
50
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
48
51
|
activeTool: {
|
|
49
52
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
50
53
|
locked: boolean;
|
|
@@ -138,7 +141,7 @@ export declare const actionToggleGridMode: {
|
|
|
138
141
|
height: number;
|
|
139
142
|
offsetTop: number;
|
|
140
143
|
offsetLeft: number;
|
|
141
|
-
fileHandle: import("
|
|
144
|
+
fileHandle: import("../data/filesystem").FileSystemHandle | null;
|
|
142
145
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
143
146
|
stats: {
|
|
144
147
|
open: boolean;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
export declare const actionToggleMidpointSnapping: {
|
|
2
|
+
name: "midpointSnapping";
|
|
3
|
+
label: string;
|
|
4
|
+
viewMode: false;
|
|
5
|
+
trackEvent: {
|
|
6
|
+
category: "canvas";
|
|
7
|
+
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
8
|
+
};
|
|
9
|
+
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
10
|
+
appState: {
|
|
11
|
+
isMidpointSnappingEnabled: boolean;
|
|
12
|
+
contextMenu: {
|
|
13
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
14
|
+
top: number;
|
|
15
|
+
left: number;
|
|
16
|
+
} | null;
|
|
17
|
+
showWelcomeScreen: boolean;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
errorMessage: React.ReactNode;
|
|
20
|
+
activeEmbeddable: {
|
|
21
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
22
|
+
state: "hover" | "active";
|
|
23
|
+
} | null;
|
|
24
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
25
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
26
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
27
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
28
|
+
isBindingEnabled: boolean;
|
|
29
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
30
|
+
bindingPreference: "enabled" | "disabled";
|
|
31
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
32
|
+
suggestedBinding: {
|
|
33
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
34
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
35
|
+
} | null;
|
|
36
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
37
|
+
frameRendering: {
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
name: boolean;
|
|
40
|
+
outline: boolean;
|
|
41
|
+
clip: boolean;
|
|
42
|
+
};
|
|
43
|
+
editingFrame: string | null;
|
|
44
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
45
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
46
|
+
activeTool: {
|
|
47
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
48
|
+
locked: boolean;
|
|
49
|
+
fromSelection: boolean;
|
|
50
|
+
} & import("../types").ActiveTool;
|
|
51
|
+
preferredSelectionTool: {
|
|
52
|
+
type: "selection" | "lasso";
|
|
53
|
+
initialized: boolean;
|
|
54
|
+
};
|
|
55
|
+
penMode: boolean;
|
|
56
|
+
penDetected: boolean;
|
|
57
|
+
exportBackground: boolean;
|
|
58
|
+
exportEmbedScene: boolean;
|
|
59
|
+
exportWithDarkMode: boolean;
|
|
60
|
+
exportScale: number;
|
|
61
|
+
currentItemStrokeColor: string;
|
|
62
|
+
currentItemBackgroundColor: string;
|
|
63
|
+
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
64
|
+
currentItemStrokeWidth: number;
|
|
65
|
+
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
66
|
+
currentItemRoughness: number;
|
|
67
|
+
currentItemOpacity: number;
|
|
68
|
+
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
69
|
+
currentItemFontSize: number;
|
|
70
|
+
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
71
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
72
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
73
|
+
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
74
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
75
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
76
|
+
viewBackgroundColor: string;
|
|
77
|
+
scrollX: number;
|
|
78
|
+
scrollY: number;
|
|
79
|
+
cursorButton: "up" | "down";
|
|
80
|
+
scrolledOutside: boolean;
|
|
81
|
+
name: string | null;
|
|
82
|
+
isResizing: boolean;
|
|
83
|
+
isRotating: boolean;
|
|
84
|
+
zoom: import("../types").Zoom;
|
|
85
|
+
openMenu: "canvas" | null;
|
|
86
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
87
|
+
openSidebar: {
|
|
88
|
+
name: import("../types").SidebarName;
|
|
89
|
+
tab?: import("../types").SidebarTabName;
|
|
90
|
+
} | null;
|
|
91
|
+
openDialog: null | {
|
|
92
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
93
|
+
} | {
|
|
94
|
+
name: "ttd";
|
|
95
|
+
tab: "text-to-diagram" | "mermaid";
|
|
96
|
+
} | {
|
|
97
|
+
name: "commandPalette";
|
|
98
|
+
} | {
|
|
99
|
+
name: "settings";
|
|
100
|
+
} | {
|
|
101
|
+
name: "elementLinkSelector";
|
|
102
|
+
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
103
|
+
} | {
|
|
104
|
+
name: "charts";
|
|
105
|
+
data: import("../charts").Spreadsheet;
|
|
106
|
+
rawText: string;
|
|
107
|
+
};
|
|
108
|
+
defaultSidebarDockedPreference: boolean;
|
|
109
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
110
|
+
selectedElementIds: Readonly<{
|
|
111
|
+
[id: string]: true;
|
|
112
|
+
}>;
|
|
113
|
+
hoveredElementIds: Readonly<{
|
|
114
|
+
[id: string]: true;
|
|
115
|
+
}>;
|
|
116
|
+
previousSelectedElementIds: {
|
|
117
|
+
[id: string]: true;
|
|
118
|
+
};
|
|
119
|
+
selectedElementsAreBeingDragged: boolean;
|
|
120
|
+
shouldCacheIgnoreZoom: boolean;
|
|
121
|
+
toast: {
|
|
122
|
+
message: string;
|
|
123
|
+
closable?: boolean;
|
|
124
|
+
duration?: number;
|
|
125
|
+
} | null;
|
|
126
|
+
zenModeEnabled: boolean;
|
|
127
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
128
|
+
gridSize: number;
|
|
129
|
+
gridStep: number;
|
|
130
|
+
gridModeEnabled: boolean;
|
|
131
|
+
viewModeEnabled: boolean;
|
|
132
|
+
selectedGroupIds: {
|
|
133
|
+
[groupId: string]: boolean;
|
|
134
|
+
};
|
|
135
|
+
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
136
|
+
width: number;
|
|
137
|
+
height: number;
|
|
138
|
+
offsetTop: number;
|
|
139
|
+
offsetLeft: number;
|
|
140
|
+
fileHandle: import("../data/filesystem").FileSystemHandle | null;
|
|
141
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
142
|
+
stats: {
|
|
143
|
+
open: boolean;
|
|
144
|
+
panels: number;
|
|
145
|
+
};
|
|
146
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
147
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
148
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
149
|
+
originSnapOffset: {
|
|
150
|
+
x: number;
|
|
151
|
+
y: number;
|
|
152
|
+
} | null;
|
|
153
|
+
objectsSnapModeEnabled: boolean;
|
|
154
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
155
|
+
followedBy: Set<import("../types").SocketId>;
|
|
156
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
157
|
+
isCropping: boolean;
|
|
158
|
+
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
159
|
+
searchMatches: Readonly<{
|
|
160
|
+
focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
161
|
+
matches: readonly import("../types").SearchMatch[];
|
|
162
|
+
}> | null;
|
|
163
|
+
activeLockedId: string | null;
|
|
164
|
+
lockedMultiSelections: {
|
|
165
|
+
[groupId: string]: true;
|
|
166
|
+
};
|
|
167
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
168
|
+
};
|
|
169
|
+
captureUpdate: "NEVER";
|
|
170
|
+
};
|
|
171
|
+
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
172
|
+
} & {
|
|
173
|
+
keyTest?: undefined;
|
|
174
|
+
};
|
|
@@ -28,6 +28,9 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
28
28
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
29
29
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
30
30
|
isBindingEnabled: boolean;
|
|
31
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
32
|
+
bindingPreference: "enabled" | "disabled";
|
|
33
|
+
isMidpointSnappingEnabled: boolean;
|
|
31
34
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
32
35
|
suggestedBinding: {
|
|
33
36
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -42,7 +45,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
42
45
|
};
|
|
43
46
|
editingFrame: string | null;
|
|
44
47
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
45
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
48
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
46
49
|
activeTool: {
|
|
47
50
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
48
51
|
locked: boolean;
|
|
@@ -136,7 +139,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
136
139
|
height: number;
|
|
137
140
|
offsetTop: number;
|
|
138
141
|
offsetLeft: number;
|
|
139
|
-
fileHandle: import("
|
|
142
|
+
fileHandle: import("../data/filesystem").FileSystemHandle | null;
|
|
140
143
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
141
144
|
stats: {
|
|
142
145
|
open: boolean;
|
|
@@ -34,6 +34,9 @@ export declare const actionToggleSearchMenu: {
|
|
|
34
34
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
35
35
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
36
36
|
isBindingEnabled: boolean;
|
|
37
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
38
|
+
bindingPreference: "enabled" | "disabled";
|
|
39
|
+
isMidpointSnappingEnabled: boolean;
|
|
37
40
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
38
41
|
suggestedBinding: {
|
|
39
42
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -48,7 +51,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
48
51
|
};
|
|
49
52
|
editingFrame: string | null;
|
|
50
53
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
51
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
54
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
52
55
|
activeTool: {
|
|
53
56
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
54
57
|
locked: boolean;
|
|
@@ -122,7 +125,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
122
125
|
height: number;
|
|
123
126
|
offsetTop: number;
|
|
124
127
|
offsetLeft: number;
|
|
125
|
-
fileHandle: import("
|
|
128
|
+
fileHandle: import("../data/filesystem").FileSystemHandle | null;
|
|
126
129
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
127
130
|
stats: {
|
|
128
131
|
open: boolean;
|
|
@@ -30,6 +30,9 @@ export declare const actionToggleStats: {
|
|
|
30
30
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
31
31
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
32
32
|
isBindingEnabled: boolean;
|
|
33
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
34
|
+
bindingPreference: "enabled" | "disabled";
|
|
35
|
+
isMidpointSnappingEnabled: boolean;
|
|
33
36
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
34
37
|
suggestedBinding: {
|
|
35
38
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -44,7 +47,7 @@ export declare const actionToggleStats: {
|
|
|
44
47
|
};
|
|
45
48
|
editingFrame: string | null;
|
|
46
49
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
47
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
50
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
48
51
|
activeTool: {
|
|
49
52
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
50
53
|
locked: boolean;
|
|
@@ -139,7 +142,7 @@ export declare const actionToggleStats: {
|
|
|
139
142
|
height: number;
|
|
140
143
|
offsetTop: number;
|
|
141
144
|
offsetLeft: number;
|
|
142
|
-
fileHandle: import("
|
|
145
|
+
fileHandle: import("../data/filesystem").FileSystemHandle | null;
|
|
143
146
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
144
147
|
showHyperlinkPopup: false | "info" | "editor";
|
|
145
148
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
@@ -27,6 +27,9 @@ export declare const actionToggleViewMode: {
|
|
|
27
27
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
28
28
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
29
29
|
isBindingEnabled: boolean;
|
|
30
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
31
|
+
bindingPreference: "enabled" | "disabled";
|
|
32
|
+
isMidpointSnappingEnabled: boolean;
|
|
30
33
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
31
34
|
suggestedBinding: {
|
|
32
35
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -41,7 +44,7 @@ export declare const actionToggleViewMode: {
|
|
|
41
44
|
};
|
|
42
45
|
editingFrame: string | null;
|
|
43
46
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
44
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
47
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
45
48
|
activeTool: {
|
|
46
49
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
47
50
|
locked: boolean;
|
|
@@ -135,7 +138,7 @@ export declare const actionToggleViewMode: {
|
|
|
135
138
|
height: number;
|
|
136
139
|
offsetTop: number;
|
|
137
140
|
offsetLeft: number;
|
|
138
|
-
fileHandle: import("
|
|
141
|
+
fileHandle: import("../data/filesystem").FileSystemHandle | null;
|
|
139
142
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
140
143
|
stats: {
|
|
141
144
|
open: boolean;
|
|
@@ -27,6 +27,9 @@ export declare const actionToggleZenMode: {
|
|
|
27
27
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
28
28
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
29
29
|
isBindingEnabled: boolean;
|
|
30
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
31
|
+
bindingPreference: "enabled" | "disabled";
|
|
32
|
+
isMidpointSnappingEnabled: boolean;
|
|
30
33
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
31
34
|
suggestedBinding: {
|
|
32
35
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -41,7 +44,7 @@ export declare const actionToggleZenMode: {
|
|
|
41
44
|
};
|
|
42
45
|
editingFrame: string | null;
|
|
43
46
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
44
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
47
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
45
48
|
activeTool: {
|
|
46
49
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
47
50
|
locked: boolean;
|
|
@@ -135,7 +138,7 @@ export declare const actionToggleZenMode: {
|
|
|
135
138
|
height: number;
|
|
136
139
|
offsetTop: number;
|
|
137
140
|
offsetLeft: number;
|
|
138
|
-
fileHandle: import("
|
|
141
|
+
fileHandle: import("../data/filesystem").FileSystemHandle | null;
|
|
139
142
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
140
143
|
stats: {
|
|
141
144
|
open: boolean;
|
|
@@ -6,6 +6,7 @@ export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrok
|
|
|
6
6
|
export { actionChangeViewBackgroundColor, actionClearCanvas, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, } from "./actionCanvas";
|
|
7
7
|
export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
|
|
8
8
|
export { actionFinalize } from "./actionFinalize";
|
|
9
|
+
export { actionDeselect } from "./actionDeselect";
|
|
9
10
|
export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
|
|
10
11
|
export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
|
|
11
12
|
export { actionShortcuts } from "./actionMenu";
|
|
@@ -19,6 +20,8 @@ export { actionCopy, actionCut, actionCopyAsPng, actionCopyAsSvg, copyText, } fr
|
|
|
19
20
|
export { actionToggleGridMode } from "./actionToggleGridMode";
|
|
20
21
|
export { actionToggleZenMode } from "./actionToggleZenMode";
|
|
21
22
|
export { actionToggleObjectsSnapMode } from "./actionToggleObjectsSnapMode";
|
|
23
|
+
export { actionToggleArrowBinding } from "./actionToggleArrowBinding";
|
|
24
|
+
export { actionToggleMidpointSnapping } from "./actionToggleMidpointSnapping";
|
|
22
25
|
export { actionToggleStats } from "./actionToggleStats";
|
|
23
26
|
export { actionUnbindText, actionBindText } from "./actionBoundText";
|
|
24
27
|
export { actionLink } from "./actionLink";
|
|
@@ -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" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "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" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "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" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -9,6 +9,10 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
9
9
|
value: import("./types").NormalizedZoomValue;
|
|
10
10
|
}> | undefined;
|
|
11
11
|
showWelcomeScreen?: boolean | undefined;
|
|
12
|
+
isBindingEnabled?: boolean | undefined;
|
|
13
|
+
boxSelectionMode?: import("./types").BoxSelectionMode | undefined;
|
|
14
|
+
bindingPreference?: "enabled" | "disabled" | undefined;
|
|
15
|
+
isMidpointSnappingEnabled?: boolean | undefined;
|
|
12
16
|
activeTool?: ({
|
|
13
17
|
lastActiveTool: import("./types").ActiveTool | null;
|
|
14
18
|
locked: boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
import "./ChatMessage.scss";
|
|
3
|
+
export interface ChatMessageActionButtonProps {
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
label?: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
danger?: boolean;
|
|
9
|
+
hidden?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
ariaLabel: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const ChatMessageActionButton: React.FC<ChatMessageActionButtonProps>;
|
|
15
|
+
export interface ChatMessageProps {
|
|
16
|
+
role: "user" | "assistant" | "system";
|
|
17
|
+
roleLabel: string;
|
|
18
|
+
timestamp?: Date | number;
|
|
19
|
+
content?: ReactNode;
|
|
20
|
+
images?: string[];
|
|
21
|
+
onImageClick?: (url: string) => void;
|
|
22
|
+
isGenerating?: boolean;
|
|
23
|
+
previewSvg?: string | null;
|
|
24
|
+
onPreviewClick?: () => void;
|
|
25
|
+
onPreviewLoad?: () => void;
|
|
26
|
+
previewLabel?: string;
|
|
27
|
+
error?: ReactNode;
|
|
28
|
+
statusLine?: ReactNode;
|
|
29
|
+
actions?: ReactNode;
|
|
30
|
+
className?: string;
|
|
31
|
+
containerRef?: React.Ref<HTMLDivElement>;
|
|
32
|
+
}
|
|
33
|
+
export declare const ChatMessage: React.FC<ChatMessageProps>;
|