@zsviczian/excalidraw 0.17.1-obsidian-49 → 0.17.1-obsidian-51

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.
Files changed (44) hide show
  1. package/package.json +1 -1
  2. package/types/excalidraw/actions/actionAddToLibrary.d.ts +30 -0
  3. package/types/excalidraw/actions/actionBoundText.d.ts +20 -0
  4. package/types/excalidraw/actions/actionCanvas.d.ts +140 -0
  5. package/types/excalidraw/actions/actionClipboard.d.ts +70 -0
  6. package/types/excalidraw/actions/actionDeleteSelected.d.ts +30 -0
  7. package/types/excalidraw/actions/actionElementLock.d.ts +20 -0
  8. package/types/excalidraw/actions/actionExport.d.ts +90 -0
  9. package/types/excalidraw/actions/actionFinalize.d.ts +20 -0
  10. package/types/excalidraw/actions/actionFrame.d.ts +40 -0
  11. package/types/excalidraw/actions/actionGroup.d.ts +20 -0
  12. package/types/excalidraw/actions/actionLinearEditor.d.ts +10 -0
  13. package/types/excalidraw/actions/actionLink.d.ts +10 -0
  14. package/types/excalidraw/actions/actionMenu.d.ts +30 -0
  15. package/types/excalidraw/actions/actionNavigate.d.ts +20 -0
  16. package/types/excalidraw/actions/actionProperties.d.ts +150 -0
  17. package/types/excalidraw/actions/actionSelectAll.d.ts +10 -0
  18. package/types/excalidraw/actions/actionStyles.d.ts +10 -0
  19. package/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -0
  20. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -0
  21. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +406 -0
  22. package/types/excalidraw/actions/actionToggleStats.d.ts +10 -0
  23. package/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -0
  24. package/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -0
  25. package/types/excalidraw/actions/index.d.ts +1 -0
  26. package/types/excalidraw/actions/shortcuts.d.ts +1 -1
  27. package/types/excalidraw/actions/types.d.ts +2 -2
  28. package/types/excalidraw/components/App.d.ts +12 -2
  29. package/types/excalidraw/components/DefaultSidebar.d.ts +1 -0
  30. package/types/excalidraw/components/SearchMenu.d.ts +5 -0
  31. package/types/excalidraw/components/SearchSidebar.d.ts +1 -0
  32. package/types/excalidraw/components/TextField.d.ts +2 -0
  33. package/types/excalidraw/components/icons.d.ts +1 -0
  34. package/types/excalidraw/components/main-menu/DefaultItems.d.ts +6 -0
  35. package/types/excalidraw/constants.d.ts +4 -0
  36. package/types/excalidraw/element/embeddable.d.ts +10 -0
  37. package/types/excalidraw/element/textElement.d.ts +1 -1
  38. package/types/excalidraw/fonts/ExcalidrawFont.d.ts +2 -2
  39. package/types/excalidraw/types.d.ts +15 -0
  40. package/dist/excalidraw.development.js +0 -6944
  41. package/dist/excalidraw.production.min.js +0 -2
  42. package/dist/excalidraw.production.min.js.LICENSE.txt +0 -121
  43. package/dist/styles.development.css +0 -6708
  44. package/dist/styles.production.css +0 -65
@@ -0,0 +1,406 @@
1
+ import type { AppState } from "../types";
2
+ export declare const actionToggleSearchMenu: {
3
+ name: "searchMenu";
4
+ icon: JSX.Element;
5
+ keywords: string[];
6
+ label: string;
7
+ viewMode: true;
8
+ trackEvent: {
9
+ category: "search_menu";
10
+ action: string;
11
+ predicate: (appState: Readonly<AppState>) => boolean;
12
+ };
13
+ perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties): false | {
14
+ appState: {
15
+ openSidebar: null;
16
+ contextMenu: {
17
+ items: import("../components/ContextMenu").ContextMenuItems;
18
+ top: number;
19
+ left: number;
20
+ } | null;
21
+ showWelcomeScreen: boolean;
22
+ isLoading: boolean;
23
+ errorMessage: import("react").ReactNode;
24
+ activeEmbeddable: {
25
+ element: import("../element/types").NonDeletedExcalidrawElement;
26
+ state: "active" | "hover";
27
+ } | null;
28
+ newElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawNonSelectionElement> | null;
29
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
30
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
31
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
32
+ isBindingEnabled: boolean;
33
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
34
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
35
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameLikeElement> | null;
36
+ frameRendering: {
37
+ enabled: boolean;
38
+ name: boolean;
39
+ outline: boolean;
40
+ clip: boolean;
41
+ };
42
+ editingFrame: string | null;
43
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
44
+ editingTextElement: import("../element/types").NonDeletedExcalidrawElement | null;
45
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
46
+ activeTool: {
47
+ lastActiveTool: import("../types").ActiveTool | null;
48
+ locked: boolean;
49
+ } & import("../types").ActiveTool;
50
+ penMode: boolean;
51
+ penDetected: boolean;
52
+ exportBackground: boolean;
53
+ exportEmbedScene: boolean;
54
+ exportWithDarkMode: boolean;
55
+ exportScale: number;
56
+ currentItemStrokeColor: string;
57
+ currentItemBackgroundColor: string;
58
+ currentItemFillStyle: import("../element/types").FillStyle;
59
+ currentItemStrokeWidth: number;
60
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
61
+ currentItemRoughness: number;
62
+ currentItemOpacity: number;
63
+ currentItemFontFamily: number;
64
+ currentItemFontSize: number;
65
+ currentItemTextAlign: string;
66
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
67
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
68
+ currentHoveredFontFamily: number | null;
69
+ currentItemRoundness: import("../element/types").StrokeRoundness;
70
+ currentItemArrowType: "round" | "sharp" | "elbow";
71
+ viewBackgroundColor: string;
72
+ scrollX: number;
73
+ scrollY: number;
74
+ cursorButton: "up" | "down";
75
+ scrolledOutside: boolean;
76
+ name: string | null;
77
+ isResizing: boolean;
78
+ isRotating: boolean;
79
+ zoom: Readonly<{
80
+ value: import("../types").NormalizedZoomValue;
81
+ }>;
82
+ openMenu: "canvas" | "shape" | null;
83
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
84
+ openDialog: {
85
+ name: "imageExport" | "help" | "jsonExport";
86
+ } | {
87
+ name: "ttd";
88
+ tab: "mermaid" | "text-to-diagram";
89
+ } | {
90
+ name: "commandPalette";
91
+ } | null;
92
+ defaultSidebarDockedPreference: boolean;
93
+ lastPointerDownWith: import("../element/types").PointerType;
94
+ selectedElementIds: Readonly<{
95
+ [id: string]: true;
96
+ }>;
97
+ previousSelectedElementIds: {
98
+ [id: string]: true;
99
+ };
100
+ selectedElementsAreBeingDragged: boolean;
101
+ shouldCacheIgnoreZoom: boolean;
102
+ toast: {
103
+ message: string;
104
+ closable?: boolean | undefined;
105
+ duration?: number | undefined;
106
+ } | null;
107
+ zenModeEnabled: boolean;
108
+ theme: import("../element/types").Theme;
109
+ gridSize: number;
110
+ gridStep: number;
111
+ gridModeEnabled: boolean;
112
+ viewModeEnabled: boolean;
113
+ selectedGroupIds: {
114
+ [groupId: string]: boolean;
115
+ };
116
+ editingGroupId: string | null;
117
+ width: number;
118
+ height: number;
119
+ offsetTop: number;
120
+ offsetLeft: number;
121
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
122
+ collaborators: Map<import("../types").SocketId, Readonly<{
123
+ pointer?: import("../types").CollaboratorPointer | undefined;
124
+ button?: "up" | "down" | undefined;
125
+ selectedElementIds?: Readonly<{
126
+ [id: string]: true;
127
+ }> | undefined;
128
+ username?: string | null | undefined;
129
+ userState?: import("../types").UserIdleState | undefined;
130
+ color?: {
131
+ background: string;
132
+ stroke: string;
133
+ } | undefined;
134
+ avatarUrl?: string | undefined;
135
+ id?: string | undefined;
136
+ socketId?: import("../types").SocketId | undefined;
137
+ isCurrentUser?: boolean | undefined;
138
+ isInCall?: boolean | undefined;
139
+ isSpeaking?: boolean | undefined;
140
+ isMuted?: boolean | undefined;
141
+ }>>;
142
+ stats: {
143
+ open: boolean;
144
+ panels: number;
145
+ };
146
+ currentChartType: import("../element/types").ChartType;
147
+ pasteDialog: {
148
+ shown: false;
149
+ data: null;
150
+ } | {
151
+ shown: true;
152
+ data: import("../charts").Spreadsheet;
153
+ };
154
+ pendingImageElementId: string | null;
155
+ showHyperlinkPopup: false | "info" | "editor";
156
+ linkOpacity: number;
157
+ trayModeEnabled: boolean;
158
+ colorPalette?: {
159
+ canvasBackground: import("../colors").ColorPaletteCustom;
160
+ elementBackground: import("../colors").ColorPaletteCustom;
161
+ elementStroke: import("../colors").ColorPaletteCustom;
162
+ topPicks: {
163
+ canvasBackground: [string, string, string, string, string];
164
+ elementStroke: [string, string, string, string, string];
165
+ elementBackground: [string, string, string, string, string];
166
+ };
167
+ } | undefined;
168
+ allowWheelZoom?: boolean | undefined;
169
+ allowPinchZoom?: boolean | undefined;
170
+ pinnedScripts?: string[] | undefined;
171
+ customPens?: any[] | undefined;
172
+ currentStrokeOptions?: any;
173
+ resetCustomPen?: any;
174
+ gridColor: {
175
+ Bold: string;
176
+ Regular: string;
177
+ };
178
+ highlightSearchResult: boolean;
179
+ dynamicStyle: {
180
+ [x: string]: string;
181
+ };
182
+ frameColor: {
183
+ stroke: string;
184
+ fill: string;
185
+ nameColor: string;
186
+ };
187
+ invertBindingBehaviour: boolean;
188
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
189
+ snapLines: readonly import("../snapping").SnapLine[];
190
+ originSnapOffset: {
191
+ x: number;
192
+ y: number;
193
+ } | null;
194
+ objectsSnapModeEnabled: boolean;
195
+ userToFollow: import("../types").UserToFollow | null;
196
+ followedBy: Set<import("../types").SocketId>;
197
+ searchMatches: readonly {
198
+ id: string;
199
+ focus: boolean;
200
+ matchedLines: {
201
+ offsetX: number;
202
+ offsetY: number;
203
+ width: number;
204
+ height: number;
205
+ }[];
206
+ }[];
207
+ };
208
+ storeAction: "none";
209
+ } | {
210
+ appState: {
211
+ openSidebar: {
212
+ name: string;
213
+ };
214
+ openDialog: null;
215
+ contextMenu: {
216
+ items: import("../components/ContextMenu").ContextMenuItems;
217
+ top: number;
218
+ left: number;
219
+ } | null;
220
+ showWelcomeScreen: boolean;
221
+ isLoading: boolean;
222
+ errorMessage: import("react").ReactNode;
223
+ activeEmbeddable: {
224
+ element: import("../element/types").NonDeletedExcalidrawElement;
225
+ state: "active" | "hover";
226
+ } | null;
227
+ newElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawNonSelectionElement> | null;
228
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
229
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
230
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
231
+ isBindingEnabled: boolean;
232
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
233
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
234
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameLikeElement> | null;
235
+ frameRendering: {
236
+ enabled: boolean;
237
+ name: boolean;
238
+ outline: boolean;
239
+ clip: boolean;
240
+ };
241
+ editingFrame: string | null;
242
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
243
+ editingTextElement: import("../element/types").NonDeletedExcalidrawElement | null;
244
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
245
+ activeTool: {
246
+ lastActiveTool: import("../types").ActiveTool | null;
247
+ locked: boolean;
248
+ } & import("../types").ActiveTool;
249
+ penMode: boolean;
250
+ penDetected: boolean;
251
+ exportBackground: boolean;
252
+ exportEmbedScene: boolean;
253
+ exportWithDarkMode: boolean;
254
+ exportScale: number;
255
+ currentItemStrokeColor: string;
256
+ currentItemBackgroundColor: string;
257
+ currentItemFillStyle: import("../element/types").FillStyle;
258
+ currentItemStrokeWidth: number;
259
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
260
+ currentItemRoughness: number;
261
+ currentItemOpacity: number;
262
+ currentItemFontFamily: number;
263
+ currentItemFontSize: number;
264
+ currentItemTextAlign: string;
265
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
266
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
267
+ currentHoveredFontFamily: number | null;
268
+ currentItemRoundness: import("../element/types").StrokeRoundness;
269
+ currentItemArrowType: "round" | "sharp" | "elbow";
270
+ viewBackgroundColor: string;
271
+ scrollX: number;
272
+ scrollY: number;
273
+ cursorButton: "up" | "down";
274
+ scrolledOutside: boolean;
275
+ name: string | null;
276
+ isResizing: boolean;
277
+ isRotating: boolean;
278
+ zoom: Readonly<{
279
+ value: import("../types").NormalizedZoomValue;
280
+ }>;
281
+ openMenu: "canvas" | "shape" | null;
282
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
283
+ defaultSidebarDockedPreference: boolean;
284
+ lastPointerDownWith: import("../element/types").PointerType;
285
+ selectedElementIds: Readonly<{
286
+ [id: string]: true;
287
+ }>;
288
+ previousSelectedElementIds: {
289
+ [id: string]: true;
290
+ };
291
+ selectedElementsAreBeingDragged: boolean;
292
+ shouldCacheIgnoreZoom: boolean;
293
+ toast: {
294
+ message: string;
295
+ closable?: boolean | undefined;
296
+ duration?: number | undefined;
297
+ } | null;
298
+ zenModeEnabled: boolean;
299
+ theme: import("../element/types").Theme;
300
+ gridSize: number;
301
+ gridStep: number;
302
+ gridModeEnabled: boolean;
303
+ viewModeEnabled: boolean;
304
+ selectedGroupIds: {
305
+ [groupId: string]: boolean;
306
+ };
307
+ editingGroupId: string | null;
308
+ width: number;
309
+ height: number;
310
+ offsetTop: number;
311
+ offsetLeft: number;
312
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
313
+ collaborators: Map<import("../types").SocketId, Readonly<{
314
+ pointer?: import("../types").CollaboratorPointer | undefined;
315
+ button?: "up" | "down" | undefined;
316
+ selectedElementIds?: Readonly<{
317
+ [id: string]: true;
318
+ }> | undefined;
319
+ username?: string | null | undefined;
320
+ userState?: import("../types").UserIdleState | undefined;
321
+ color?: {
322
+ background: string;
323
+ stroke: string;
324
+ } | undefined;
325
+ avatarUrl?: string | undefined;
326
+ id?: string | undefined;
327
+ socketId?: import("../types").SocketId | undefined;
328
+ isCurrentUser?: boolean | undefined;
329
+ isInCall?: boolean | undefined;
330
+ isSpeaking?: boolean | undefined;
331
+ isMuted?: boolean | undefined;
332
+ }>>;
333
+ stats: {
334
+ open: boolean;
335
+ panels: number;
336
+ };
337
+ currentChartType: import("../element/types").ChartType;
338
+ pasteDialog: {
339
+ shown: false;
340
+ data: null;
341
+ } | {
342
+ shown: true;
343
+ data: import("../charts").Spreadsheet;
344
+ };
345
+ pendingImageElementId: string | null;
346
+ showHyperlinkPopup: false | "info" | "editor";
347
+ linkOpacity: number;
348
+ trayModeEnabled: boolean;
349
+ colorPalette?: {
350
+ canvasBackground: import("../colors").ColorPaletteCustom;
351
+ elementBackground: import("../colors").ColorPaletteCustom;
352
+ elementStroke: import("../colors").ColorPaletteCustom;
353
+ topPicks: {
354
+ canvasBackground: [string, string, string, string, string];
355
+ elementStroke: [string, string, string, string, string];
356
+ elementBackground: [string, string, string, string, string];
357
+ };
358
+ } | undefined;
359
+ allowWheelZoom?: boolean | undefined;
360
+ allowPinchZoom?: boolean | undefined;
361
+ pinnedScripts?: string[] | undefined;
362
+ customPens?: any[] | undefined;
363
+ currentStrokeOptions?: any;
364
+ resetCustomPen?: any;
365
+ gridColor: {
366
+ Bold: string;
367
+ Regular: string;
368
+ };
369
+ highlightSearchResult: boolean;
370
+ dynamicStyle: {
371
+ [x: string]: string;
372
+ };
373
+ frameColor: {
374
+ stroke: string;
375
+ fill: string;
376
+ nameColor: string;
377
+ };
378
+ invertBindingBehaviour: boolean;
379
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
380
+ snapLines: readonly import("../snapping").SnapLine[];
381
+ originSnapOffset: {
382
+ x: number;
383
+ y: number;
384
+ } | null;
385
+ objectsSnapModeEnabled: boolean;
386
+ userToFollow: import("../types").UserToFollow | null;
387
+ followedBy: Set<import("../types").SocketId>;
388
+ searchMatches: readonly {
389
+ id: string;
390
+ focus: boolean;
391
+ matchedLines: {
392
+ offsetX: number;
393
+ offsetY: number;
394
+ width: number;
395
+ height: number;
396
+ }[];
397
+ }[];
398
+ };
399
+ storeAction: "none";
400
+ };
401
+ checked: (appState: AppState) => boolean;
402
+ predicate: (element: readonly import("../element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
403
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
404
+ } & {
405
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
406
+ };
@@ -195,6 +195,16 @@ export declare const actionToggleStats: {
195
195
  objectsSnapModeEnabled: boolean;
196
196
  userToFollow: import("../types").UserToFollow | null;
197
197
  followedBy: Set<import("../types").SocketId>;
198
+ searchMatches: readonly {
199
+ id: string;
200
+ focus: boolean;
201
+ matchedLines: {
202
+ offsetX: number;
203
+ offsetY: number;
204
+ width: number;
205
+ height: number;
206
+ }[];
207
+ }[];
198
208
  };
199
209
  storeAction: "none";
200
210
  };
@@ -195,6 +195,16 @@ export declare const actionToggleViewMode: {
195
195
  objectsSnapModeEnabled: boolean;
196
196
  userToFollow: import("../types").UserToFollow | null;
197
197
  followedBy: Set<import("../types").SocketId>;
198
+ searchMatches: readonly {
199
+ id: string;
200
+ focus: boolean;
201
+ matchedLines: {
202
+ offsetX: number;
203
+ offsetY: number;
204
+ width: number;
205
+ height: number;
206
+ }[];
207
+ }[];
198
208
  };
199
209
  storeAction: "none";
200
210
  };
@@ -195,6 +195,16 @@ export declare const actionToggleZenMode: {
195
195
  objectsSnapModeEnabled: boolean;
196
196
  userToFollow: import("../types").UserToFollow | null;
197
197
  followedBy: Set<import("../types").SocketId>;
198
+ searchMatches: readonly {
199
+ id: string;
200
+ focus: boolean;
201
+ matchedLines: {
202
+ offsetX: number;
203
+ offsetY: number;
204
+ width: number;
205
+ height: number;
206
+ }[];
207
+ }[];
198
208
  };
199
209
  storeAction: "none";
200
210
  };
@@ -23,3 +23,4 @@ export { actionUnbindText, actionBindText } from "./actionBoundText";
23
23
  export { actionLink } from "./actionLink";
24
24
  export { actionToggleElementLock } from "./actionElementLock";
25
25
  export { actionToggleLinearEditor } from "./actionLinearEditor";
26
+ export { actionToggleSearchMenu } from "./actionToggleSearchMenu";
@@ -1,4 +1,4 @@
1
1
  import type { SubtypeOf } from "../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" | "copyAsSvg" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "toggleLaserPointerTool" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts"> | "saveScene" | "imageExport" | "commandPalette";
3
+ export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "copyAsSvg" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "toggleLaserPointerTool" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu";
4
4
  export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
@@ -15,7 +15,7 @@ export type ActionResult = {
15
15
  type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
16
16
  export type UpdaterFn = (res: ActionResult) => void;
17
17
  export type ActionFilterFn = (action: Action) => void;
18
- 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" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "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" | "toggleLaserPointerTool" | "commandPalette" | "autoResize" | "elementStats";
18
+ 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" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "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" | "toggleLaserPointerTool" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu";
19
19
  export type PanelComponentProps = {
20
20
  elements: readonly ExcalidrawElement[];
21
21
  appState: AppState;
@@ -36,7 +36,7 @@ export interface Action {
36
36
  predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
37
37
  checked?: (appState: Readonly<AppState>) => boolean;
38
38
  trackEvent: false | {
39
- category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink";
39
+ category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu";
40
40
  action?: string;
41
41
  predicate?: (appState: Readonly<AppState>, elements: readonly ExcalidrawElement[], value: any) => boolean;
42
42
  };
@@ -54,6 +54,7 @@ declare class App extends React.Component<AppProps, AppState> {
54
54
  scene: Scene;
55
55
  fonts: Fonts;
56
56
  renderer: Renderer;
57
+ visibleElements: readonly NonDeletedExcalidrawElement[];
57
58
  private resizeObserver;
58
59
  private nearestScrollableContainer;
59
60
  library: AppClassProperties["library"];
@@ -61,7 +62,10 @@ declare class App extends React.Component<AppProps, AppState> {
61
62
  id: string;
62
63
  private store;
63
64
  private history;
64
- private excalidrawContainerValue;
65
+ excalidrawContainerValue: {
66
+ container: HTMLDivElement | null;
67
+ id: string;
68
+ };
65
69
  files: BinaryFiles;
66
70
  imageCache: AppClassProperties["imageCache"];
67
71
  private iFrameRefs;
@@ -279,6 +283,7 @@ declare class App extends React.Component<AppProps, AppState> {
279
283
  private isMobileBreakpoint;
280
284
  private refreshViewportBreakpoints;
281
285
  private refreshEditorBreakpoints;
286
+ private clearImageShapeCache;
282
287
  componentDidMount(): Promise<void>;
283
288
  componentWillUnmount(): void;
284
289
  private onResize;
@@ -378,7 +383,12 @@ declare class App extends React.Component<AppProps, AppState> {
378
383
  force?: boolean | undefined;
379
384
  }) => boolean;
380
385
  private updateCurrentCursorPosition;
381
- private getEditorUIOffsets;
386
+ getEditorUIOffsets: () => {
387
+ top: number;
388
+ right: number;
389
+ bottom: number;
390
+ left: number;
391
+ };
382
392
  private onKeyDown;
383
393
  private onKeyUp;
384
394
  private isToolSupported;
@@ -1,5 +1,6 @@
1
1
  import type { MarkOptional } from "../utility-types";
2
2
  import type { SidebarProps, SidebarTriggerProps } from "./Sidebar/common";
3
+ import "../components/dropdownMenu/DropdownMenu.scss";
3
4
  export declare const DefaultSidebar: import("react").FC<Omit<MarkOptional<Omit<{
4
5
  name: string;
5
6
  children: import("react").ReactNode;
@@ -0,0 +1,5 @@
1
+ import "./SearchMenu.scss";
2
+ export declare const searchItemInFocusAtom: import("jotai").PrimitiveAtom<number | null> & {
3
+ init: number | null;
4
+ };
5
+ export declare const SearchMenu: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SearchSidebar: () => JSX.Element;
@@ -7,7 +7,9 @@ type TextFieldProps = {
7
7
  readonly?: boolean;
8
8
  fullWidth?: boolean;
9
9
  selectOnRender?: boolean;
10
+ icon?: React.ReactNode;
10
11
  label?: string;
12
+ className?: string;
11
13
  placeholder?: string;
12
14
  isRedacted?: boolean;
13
15
  } & ({
@@ -208,4 +208,5 @@ export declare const elbowArrowIcon: JSX.Element;
208
208
  export declare const roundArrowIcon: JSX.Element;
209
209
  export declare const collapseDownIcon: JSX.Element;
210
210
  export declare const collapseUpIcon: JSX.Element;
211
+ export declare const upIcon: JSX.Element;
211
212
  export {};
@@ -18,6 +18,12 @@ export declare const CommandPalette: {
18
18
  }): JSX.Element;
19
19
  displayName: string;
20
20
  };
21
+ export declare const SearchMenu: {
22
+ (opts?: {
23
+ className?: string;
24
+ }): JSX.Element;
25
+ displayName: string;
26
+ };
21
27
  export declare const Help: {
22
28
  (): JSX.Element;
23
29
  displayName: string;
@@ -88,6 +88,7 @@ export declare const CLASSES: {
88
88
  SHAPE_ACTIONS_MOBILE_MENU: string;
89
89
  MOBILE_TOOLBAR: string;
90
90
  ZOOM_ACTIONS: string;
91
+ SEARCH_MENU_INPUT_WRAPPER: string;
91
92
  };
92
93
  /**
93
94
  * // TODO: shouldn't be really `const`, likely neither have integers as values, due to value for the custom fonts, which should likely be some hash.
@@ -276,6 +277,9 @@ export declare const DEFAULT_SIDEBAR: {
276
277
  readonly name: "default";
277
278
  readonly defaultTab: "library";
278
279
  };
280
+ export declare const SEARCH_SIDEBAR: {
281
+ name: string;
282
+ };
279
283
  export declare const LIBRARY_DISABLED_TYPES: Set<"image" | "iframe" | "embeddable">;
280
284
  export declare const TOOL_TYPE: {
281
285
  readonly selection: "selection";
@@ -200,6 +200,16 @@ export declare const actionSetEmbeddableAsActiveTool: {
200
200
  objectsSnapModeEnabled: boolean;
201
201
  userToFollow: import("../types").UserToFollow | null;
202
202
  followedBy: Set<import("../types").SocketId>;
203
+ searchMatches: readonly {
204
+ id: string;
205
+ focus: boolean;
206
+ matchedLines: {
207
+ offsetX: number;
208
+ offsetY: number;
209
+ width: number;
210
+ height: number;
211
+ }[];
212
+ }[];
203
213
  };
204
214
  storeAction: "none";
205
215
  };
@@ -10,7 +10,7 @@ export declare const computeBoundTextPosition: (container: ExcalidrawElement, bo
10
10
  x: number;
11
11
  y: number;
12
12
  };
13
- export declare const measureText: (text: string, font: FontString, lineHeight: ExcalidrawTextElement["lineHeight"]) => {
13
+ export declare const measureText: (text: string, font: FontString, lineHeight: ExcalidrawTextElement["lineHeight"], forceAdvanceWidth?: true) => {
14
14
  width: number;
15
15
  height: number;
16
16
  };
@@ -31,7 +31,7 @@ export declare class ExcalidrawFont implements Font {
31
31
  private static getFormat;
32
32
  private static normalizeBaseUrl;
33
33
  /**
34
- * zsviczian https://github.com/zsviczian/excalidraw/commit/b4cfaaa4b4f46ca01f94e27fb7bf651a9da99daa
35
- */
34
+ * zsviczian https://github.com/zsviczian/excalidraw/commit/b4cfaaa4b4f46ca01f94e27fb7bf651a9da99daa
35
+ */
36
36
  getContentLegacy(): Promise<string>;
37
37
  }