@zsviczian/excalidraw 0.18.0-53 → 0.18.0-54

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 (67) hide show
  1. package/dist/excalidraw.development.js +50 -50
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +2 -2
  4. package/types/common/src/commonObsidianUtils.d.ts +6 -0
  5. package/types/common/src/constants.d.ts +1 -0
  6. package/types/common/src/editorInterface.d.ts +1 -1
  7. package/types/common/src/index.d.ts +1 -0
  8. package/types/common/src/utils.d.ts +7 -2
  9. package/types/common/src/visualdebug.d.ts +1 -1
  10. package/types/element/src/binding.d.ts +55 -44
  11. package/types/element/src/collision.d.ts +6 -2
  12. package/types/element/src/index.d.ts +0 -3
  13. package/types/element/src/linearElementEditor.d.ts +15 -18
  14. package/types/element/src/renderElement.d.ts +1 -1
  15. package/types/element/src/typeChecks.d.ts +2 -3
  16. package/types/element/src/types.d.ts +7 -11
  17. package/types/element/src/utils.d.ts +2 -1
  18. package/types/element/src/zindex.d.ts +7 -1
  19. package/types/excalidraw/actions/actionAddToLibrary.d.ts +16 -7
  20. package/types/excalidraw/actions/actionAlign.d.ts +6 -6
  21. package/types/excalidraw/actions/actionBoundText.d.ts +13 -7
  22. package/types/excalidraw/actions/actionCanvas.d.ts +91 -286
  23. package/types/excalidraw/actions/actionClipboard.d.ts +34 -941
  24. package/types/excalidraw/actions/actionCropEditor.d.ts +6 -3
  25. package/types/excalidraw/actions/actionDeleteSelected.d.ts +23 -16
  26. package/types/excalidraw/actions/actionDistribute.d.ts +2 -2
  27. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
  28. package/types/excalidraw/actions/actionElementLink.d.ts +4 -3
  29. package/types/excalidraw/actions/actionElementLock.d.ts +11 -5
  30. package/types/excalidraw/actions/actionEmbeddable.d.ts +6 -3
  31. package/types/excalidraw/actions/actionExport.d.ts +43 -1149
  32. package/types/excalidraw/actions/actionFinalize.d.ts +10 -688
  33. package/types/excalidraw/actions/actionFlip.d.ts +2 -2
  34. package/types/excalidraw/actions/actionFrame.d.ts +26 -16
  35. package/types/excalidraw/actions/actionGroup.d.ts +12 -6
  36. package/types/excalidraw/actions/actionLinearEditor.d.ts +15 -16
  37. package/types/excalidraw/actions/actionLink.d.ts +5 -2
  38. package/types/excalidraw/actions/actionMenu.d.ts +3 -2
  39. package/types/excalidraw/actions/actionNavigate.d.ts +21 -445
  40. package/types/excalidraw/actions/actionProperties.d.ts +79 -2968
  41. package/types/excalidraw/actions/actionSelectAll.d.ts +6 -3
  42. package/types/excalidraw/actions/actionStyles.d.ts +7 -4
  43. package/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  44. package/types/excalidraw/actions/actionToggleGridMode.d.ts +5 -2
  45. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -2
  46. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +3 -2
  47. package/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  48. package/types/excalidraw/actions/actionToggleStats.d.ts +5 -2
  49. package/types/excalidraw/actions/actionToggleViewMode.d.ts +6 -3
  50. package/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -2
  51. package/types/excalidraw/actions/actionTrayMenu.d.ts +5 -2
  52. package/types/excalidraw/actions/actionZindex.d.ts +2 -2
  53. package/types/excalidraw/actions/manager.d.ts +1 -1
  54. package/types/excalidraw/actions/register.d.ts +1 -1
  55. package/types/excalidraw/actions/types.d.ts +3 -3
  56. package/types/excalidraw/appState.d.ts +4 -3
  57. package/types/excalidraw/components/App.d.ts +7 -3
  58. package/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
  59. package/types/excalidraw/components/Stats/utils.d.ts +1 -1
  60. package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +1 -1
  61. package/types/excalidraw/data/restore.d.ts +3 -3
  62. package/types/excalidraw/index.d.ts +3 -3
  63. package/types/excalidraw/obsidianUtils.d.ts +0 -5
  64. package/types/excalidraw/renderer/helpers.d.ts +1 -5
  65. package/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
  66. package/types/excalidraw/scene/types.d.ts +4 -0
  67. package/types/excalidraw/types.d.ts +15 -5
@@ -1,446 +1,22 @@
1
- import type { Collaborator } from "../types";
2
- export declare const actionGoToCollaborator: {
3
- name: "goToCollaborator";
4
- label: string;
5
- viewMode: true;
6
- trackEvent: {
7
- category: "collab";
8
- };
9
- perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, collaborator: Collaborator) => {
10
- appState: {
11
- userToFollow: null;
12
- contextMenu: {
13
- items: import("../components/ContextMenu").ContextMenuItems;
14
- top: number;
15
- left: number;
16
- } | null;
17
- showWelcomeScreen: boolean;
18
- isLoading: boolean;
19
- errorMessage: import("react").ReactNode;
20
- activeEmbeddable: {
21
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
22
- state: "active" | "hover";
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
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
30
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
31
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
32
- frameRendering: {
33
- enabled: boolean;
34
- name: boolean;
35
- outline: boolean;
36
- clip: boolean;
37
- markerName: boolean;
38
- markerEnabled: boolean;
39
- };
40
- editingFrame: string | null;
41
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
42
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
43
- activeTool: {
44
- lastActiveTool: import("../types").ActiveTool | null;
45
- locked: boolean;
46
- fromSelection: boolean;
47
- } & import("../types").ActiveTool;
48
- preferredSelectionTool: {
49
- type: "selection" | "lasso";
50
- initialized: boolean;
51
- };
52
- penMode: boolean;
53
- penDetected: boolean;
54
- exportBackground: boolean;
55
- exportEmbedScene: boolean;
56
- exportWithDarkMode: boolean;
57
- exportScale: number;
58
- currentItemStrokeColor: string;
59
- currentItemBackgroundColor: string;
60
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
61
- currentItemStrokeWidth: number;
62
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
63
- currentItemRoughness: number;
64
- currentItemOpacity: number;
65
- currentItemFontFamily: number;
66
- currentItemFontSize: number;
67
- currentItemTextAlign: string;
68
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
69
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
70
- currentHoveredFontFamily: number | null;
71
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
72
- currentItemArrowType: "round" | "sharp" | "elbow";
73
- currentItemFrameRole: ("marker" | null) | undefined;
74
- viewBackgroundColor: string;
75
- scrollX: number;
76
- scrollY: number;
77
- cursorButton: "up" | "down";
78
- scrolledOutside: boolean;
79
- name: string | null;
80
- isResizing: boolean;
81
- isRotating: boolean;
82
- zoom: Readonly<{
83
- value: import("../types").NormalizedZoomValue;
84
- }>;
85
- openMenu: "canvas" | "shape" | null;
86
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
87
- openSidebar: {
88
- name: string;
89
- tab?: string | undefined;
90
- } | null;
91
- openDialog: {
92
- name: "help" | "imageExport" | "jsonExport";
93
- } | {
94
- name: "ttd";
95
- tab: "mermaid" | "text-to-diagram";
96
- } | {
97
- name: "commandPalette";
98
- } | {
99
- name: "elementLinkSelector";
100
- sourceElementId: string;
101
- } | null;
102
- defaultSidebarDockedPreference: boolean;
103
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
104
- selectedElementIds: Readonly<{
105
- [id: string]: true;
106
- }>;
107
- hoveredElementIds: Readonly<{
108
- [id: string]: true;
109
- }>;
110
- previousSelectedElementIds: {
111
- [id: string]: true;
112
- };
113
- selectedElementsAreBeingDragged: boolean;
114
- shouldCacheIgnoreZoom: boolean;
115
- toast: {
116
- message: string;
117
- closable?: boolean | undefined;
118
- duration?: number | undefined;
119
- } | null;
120
- zenModeEnabled: boolean;
121
- theme: import("@excalidraw/element/types").Theme;
122
- gridSize: number;
123
- gridStep: number;
124
- gridModeEnabled: boolean;
125
- viewModeEnabled: boolean;
126
- selectedGroupIds: {
127
- [groupId: string]: boolean;
128
- };
129
- editingGroupId: string | null;
130
- width: number;
131
- height: number;
132
- offsetTop: number;
133
- offsetLeft: number;
134
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
135
- collaborators: Map<import("../types").SocketId, Readonly<{
136
- pointer?: import("../types").CollaboratorPointer | undefined;
137
- button?: "up" | "down" | undefined;
138
- selectedElementIds?: Readonly<{
139
- [id: string]: true;
140
- }> | undefined;
141
- username?: string | null | undefined;
142
- userState?: import("@excalidraw/common").UserIdleState | undefined;
143
- color?: {
144
- background: string;
145
- stroke: string;
146
- } | undefined;
147
- avatarUrl?: string | undefined;
148
- id?: string | undefined;
149
- socketId?: import("../types").SocketId | undefined;
150
- isCurrentUser?: boolean | undefined;
151
- isInCall?: boolean | undefined;
152
- isSpeaking?: boolean | undefined;
153
- isMuted?: boolean | undefined;
154
- }>>;
155
- stats: {
156
- open: boolean;
157
- panels: number;
158
- };
159
- currentChartType: import("@excalidraw/element/types").ChartType;
160
- pasteDialog: {
161
- shown: false;
162
- data: null;
163
- } | {
164
- shown: true;
165
- data: import("../charts").Spreadsheet;
166
- };
167
- showHyperlinkPopup: false | "info" | "editor";
168
- linkOpacity: number;
169
- colorPalette?: {
170
- canvasBackground: import("@excalidraw/common").ColorPaletteCustom;
171
- elementBackground: import("@excalidraw/common").ColorPaletteCustom;
172
- elementStroke: import("@excalidraw/common").ColorPaletteCustom;
173
- topPicks: {
174
- canvasBackground: [string, string, string, string, string];
175
- elementStroke: [string, string, string, string, string];
176
- elementBackground: [string, string, string, string, string];
177
- };
178
- } | undefined;
179
- allowWheelZoom?: boolean | undefined;
180
- allowPinchZoom?: boolean | undefined;
181
- disableContextMenu: boolean;
182
- pinnedScripts?: string[] | undefined;
183
- customPens?: any[] | undefined;
184
- currentStrokeOptions?: any;
185
- resetCustomPen?: any;
186
- gridColor: {
187
- Bold: string;
188
- Regular: string;
189
- };
190
- gridDirection: {
191
- horizontal: boolean;
192
- vertical: boolean;
193
- };
194
- highlightSearchResult: boolean;
195
- dynamicStyle: {
196
- [x: string]: string;
197
- };
198
- frameColor: {
199
- stroke: string;
200
- fill: string;
201
- nameColor: string;
202
- };
203
- invertBindingBehaviour: boolean;
204
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
205
- snapLines: readonly import("../snapping").SnapLine[];
206
- originSnapOffset: {
207
- x: number;
208
- y: number;
209
- } | null;
210
- objectsSnapModeEnabled: boolean;
211
- followedBy: Set<import("../types").SocketId>;
212
- isCropping: boolean;
213
- croppingElementId: string | null;
214
- searchMatches: Readonly<{
215
- focusedId: string | null;
216
- matches: readonly import("../types").SearchMatch[];
217
- }> | null;
218
- activeLockedId: string | null;
219
- lockedMultiSelections: {
220
- [groupId: string]: true;
221
- };
222
- };
223
- captureUpdate: "EVENTUALLY";
224
- } | {
225
- appState: {
226
- userToFollow: {
227
- socketId: import("../types").SocketId;
228
- username: string;
229
- };
230
- openMenu: "shape" | null;
231
- contextMenu: {
232
- items: import("../components/ContextMenu").ContextMenuItems;
233
- top: number;
234
- left: number;
235
- } | null;
236
- showWelcomeScreen: boolean;
237
- isLoading: boolean;
238
- errorMessage: import("react").ReactNode;
239
- activeEmbeddable: {
240
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
241
- state: "active" | "hover";
242
- } | null;
243
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
244
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
245
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
246
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
247
- isBindingEnabled: boolean;
248
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
249
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
250
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
251
- frameRendering: {
252
- enabled: boolean;
253
- name: boolean;
254
- outline: boolean;
255
- clip: boolean;
256
- markerName: boolean;
257
- markerEnabled: boolean;
258
- };
259
- editingFrame: string | null;
260
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
261
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
262
- activeTool: {
263
- lastActiveTool: import("../types").ActiveTool | null;
264
- locked: boolean;
265
- fromSelection: boolean;
266
- } & import("../types").ActiveTool;
267
- preferredSelectionTool: {
268
- type: "selection" | "lasso";
269
- initialized: boolean;
270
- };
271
- penMode: boolean;
272
- penDetected: boolean;
273
- exportBackground: boolean;
274
- exportEmbedScene: boolean;
275
- exportWithDarkMode: boolean;
276
- exportScale: number;
277
- currentItemStrokeColor: string;
278
- currentItemBackgroundColor: string;
279
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
280
- currentItemStrokeWidth: number;
281
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
282
- currentItemRoughness: number;
283
- currentItemOpacity: number;
284
- currentItemFontFamily: number;
285
- currentItemFontSize: number;
286
- currentItemTextAlign: string;
287
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
288
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
289
- currentHoveredFontFamily: number | null;
290
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
291
- currentItemArrowType: "round" | "sharp" | "elbow";
292
- currentItemFrameRole: ("marker" | null) | undefined;
293
- viewBackgroundColor: string;
294
- scrollX: number;
295
- scrollY: number;
296
- cursorButton: "up" | "down";
297
- scrolledOutside: boolean;
298
- name: string | null;
299
- isResizing: boolean;
300
- isRotating: boolean;
301
- zoom: Readonly<{
302
- value: import("../types").NormalizedZoomValue;
303
- }>;
304
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
305
- openSidebar: {
306
- name: string;
307
- tab?: string | undefined;
308
- } | null;
309
- openDialog: {
310
- name: "help" | "imageExport" | "jsonExport";
311
- } | {
312
- name: "ttd";
313
- tab: "mermaid" | "text-to-diagram";
314
- } | {
315
- name: "commandPalette";
316
- } | {
317
- name: "elementLinkSelector";
318
- sourceElementId: string;
319
- } | null;
320
- defaultSidebarDockedPreference: boolean;
321
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
322
- selectedElementIds: Readonly<{
323
- [id: string]: true;
324
- }>;
325
- hoveredElementIds: Readonly<{
326
- [id: string]: true;
327
- }>;
328
- previousSelectedElementIds: {
329
- [id: string]: true;
330
- };
331
- selectedElementsAreBeingDragged: boolean;
332
- shouldCacheIgnoreZoom: boolean;
333
- toast: {
334
- message: string;
335
- closable?: boolean | undefined;
336
- duration?: number | undefined;
337
- } | null;
338
- zenModeEnabled: boolean;
339
- theme: import("@excalidraw/element/types").Theme;
340
- gridSize: number;
341
- gridStep: number;
342
- gridModeEnabled: boolean;
343
- viewModeEnabled: boolean;
344
- selectedGroupIds: {
345
- [groupId: string]: boolean;
346
- };
347
- editingGroupId: string | null;
348
- width: number;
349
- height: number;
350
- offsetTop: number;
351
- offsetLeft: number;
352
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
353
- collaborators: Map<import("../types").SocketId, Readonly<{
354
- pointer?: import("../types").CollaboratorPointer | undefined;
355
- button?: "up" | "down" | undefined;
356
- selectedElementIds?: Readonly<{
357
- [id: string]: true;
358
- }> | undefined;
359
- username?: string | null | undefined;
360
- userState?: import("@excalidraw/common").UserIdleState | undefined;
361
- color?: {
362
- background: string;
363
- stroke: string;
364
- } | undefined;
365
- avatarUrl?: string | undefined;
366
- id?: string | undefined;
367
- socketId?: import("../types").SocketId | undefined;
368
- isCurrentUser?: boolean | undefined;
369
- isInCall?: boolean | undefined;
370
- isSpeaking?: boolean | undefined;
371
- isMuted?: boolean | undefined;
372
- }>>;
373
- stats: {
374
- open: boolean;
375
- panels: number;
376
- };
377
- currentChartType: import("@excalidraw/element/types").ChartType;
378
- pasteDialog: {
379
- shown: false;
380
- data: null;
381
- } | {
382
- shown: true;
383
- data: import("../charts").Spreadsheet;
384
- };
385
- showHyperlinkPopup: false | "info" | "editor";
386
- linkOpacity: number;
387
- colorPalette?: {
388
- canvasBackground: import("@excalidraw/common").ColorPaletteCustom;
389
- elementBackground: import("@excalidraw/common").ColorPaletteCustom;
390
- elementStroke: import("@excalidraw/common").ColorPaletteCustom;
391
- topPicks: {
392
- canvasBackground: [string, string, string, string, string];
393
- elementStroke: [string, string, string, string, string];
394
- elementBackground: [string, string, string, string, string];
395
- };
396
- } | undefined;
397
- allowWheelZoom?: boolean | undefined;
398
- allowPinchZoom?: boolean | undefined;
399
- disableContextMenu: boolean;
400
- pinnedScripts?: string[] | undefined;
401
- customPens?: any[] | undefined;
402
- currentStrokeOptions?: any;
403
- resetCustomPen?: any;
404
- gridColor: {
405
- Bold: string;
406
- Regular: string;
407
- };
408
- gridDirection: {
409
- horizontal: boolean;
410
- vertical: boolean;
411
- };
412
- highlightSearchResult: boolean;
413
- dynamicStyle: {
414
- [x: string]: string;
415
- };
416
- frameColor: {
417
- stroke: string;
418
- fill: string;
419
- nameColor: string;
420
- };
421
- invertBindingBehaviour: boolean;
422
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
423
- snapLines: readonly import("../snapping").SnapLine[];
424
- originSnapOffset: {
425
- x: number;
426
- y: number;
427
- } | null;
428
- objectsSnapModeEnabled: boolean;
429
- followedBy: Set<import("../types").SocketId>;
430
- isCropping: boolean;
431
- croppingElementId: string | null;
432
- searchMatches: Readonly<{
433
- focusedId: string | null;
434
- matches: readonly import("../types").SearchMatch[];
435
- }> | null;
436
- activeLockedId: string | null;
437
- lockedMultiSelections: {
438
- [groupId: string]: true;
439
- };
440
- };
441
- captureUpdate: "EVENTUALLY";
442
- };
443
- PanelComponent: ({ updateData, data, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
444
- } & {
445
- keyTest?: undefined;
1
+ export declare const actionGoToCollaborator: import("./types").Action<Readonly<{
2
+ pointer?: import("../types").CollaboratorPointer | undefined;
3
+ button?: "up" | "down" | undefined;
4
+ selectedElementIds?: Readonly<{
5
+ [id: string]: true;
6
+ }> | undefined;
7
+ username?: string | null | undefined;
8
+ userState?: import("@excalidraw/common").UserIdleState | undefined;
9
+ color?: {
10
+ background: string;
11
+ stroke: string;
12
+ } | undefined;
13
+ avatarUrl?: string | undefined;
14
+ id?: string | undefined;
15
+ socketId?: import("../types").SocketId | undefined;
16
+ isCurrentUser?: boolean | undefined;
17
+ isInCall?: boolean | undefined;
18
+ isSpeaking?: boolean | undefined;
19
+ isMuted?: boolean | undefined;
20
+ }>> & {
21
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
446
22
  };