@zsviczian/excalidraw 0.11.0-obsidian-21-namedexport → 0.12.0-obsidian-0

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 (81) hide show
  1. package/README.md +352 -42
  2. package/dist/excalidraw.development.js +186 -149
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/dist/excalidraw.production.min.js.LICENSE.txt +2 -1
  5. package/package.json +22 -24
  6. package/types/actions/actionAddToLibrary.d.ts +19 -6
  7. package/types/actions/actionAlign.d.ts +6 -6
  8. package/types/actions/actionBoundText.d.ts +7 -2
  9. package/types/actions/actionCanvas.d.ts +70 -25
  10. package/types/actions/actionClipboard.d.ts +35 -10
  11. package/types/actions/actionDeleteSelected.d.ts +22 -7
  12. package/types/actions/actionDistribute.d.ts +2 -2
  13. package/types/actions/actionDuplicateSelection.d.ts +1 -1
  14. package/types/actions/actionExport.d.ts +69 -26
  15. package/types/actions/actionFinalize.d.ts +16 -6
  16. package/types/actions/actionGroup.d.ts +2 -2
  17. package/types/actions/actionMenu.d.ts +24 -9
  18. package/types/actions/actionNavigate.d.ts +1 -2
  19. package/types/actions/actionProperties.d.ts +104 -39
  20. package/types/actions/actionSelectAll.d.ts +2 -1
  21. package/types/actions/actionStyles.d.ts +5 -2
  22. package/types/actions/actionToggleGridMode.d.ts +7 -2
  23. package/types/actions/actionToggleStats.d.ts +7 -2
  24. package/types/actions/actionToggleViewMode.d.ts +7 -2
  25. package/types/actions/actionToggleZenMode.d.ts +7 -2
  26. package/types/actions/actionZindex.d.ts +4 -4
  27. package/types/analytics.d.ts +1 -1
  28. package/types/appState.d.ts +3 -0
  29. package/types/clients.d.ts +1 -1
  30. package/types/components/ActiveFile.d.ts +0 -1
  31. package/types/components/App.d.ts +17 -8
  32. package/types/components/ButtonIconSelect.d.ts +0 -1
  33. package/types/components/Card.d.ts +1 -0
  34. package/types/components/CheckboxItem.d.ts +1 -0
  35. package/types/components/ClearCanvas.d.ts +0 -1
  36. package/types/components/CollabButton.d.ts +0 -1
  37. package/types/components/ColorPicker.d.ts +0 -1
  38. package/types/components/ConfirmDialog.d.ts +0 -1
  39. package/types/components/DarkModeToggle.d.ts +0 -1
  40. package/types/components/ErrorDialog.d.ts +0 -1
  41. package/types/components/HelpDialog.d.ts +0 -1
  42. package/types/components/HelpIcon.d.ts +0 -1
  43. package/types/components/HintViewer.d.ts +0 -1
  44. package/types/components/IconPicker.d.ts +0 -1
  45. package/types/components/ImageExportDialog.d.ts +0 -1
  46. package/types/components/JSONExportDialog.d.ts +0 -1
  47. package/types/components/LayerUI.d.ts +4 -6
  48. package/types/components/LibraryMenu.d.ts +0 -1
  49. package/types/components/LibraryMenuItems.d.ts +2 -1
  50. package/types/components/LibraryUnit.d.ts +0 -1
  51. package/types/components/LockButton.d.ts +0 -1
  52. package/types/components/MobileMenu.d.ts +2 -2
  53. package/types/components/Modal.d.ts +2 -2
  54. package/types/components/PenModeButton.d.ts +0 -1
  55. package/types/components/ProjectName.d.ts +0 -1
  56. package/types/components/PublishLibrary.d.ts +0 -1
  57. package/types/components/Section.d.ts +4 -5
  58. package/types/components/SidebarLockButton.d.ts +8 -0
  59. package/types/components/SingleLibraryItem.d.ts +0 -1
  60. package/types/components/Spinner.d.ts +0 -1
  61. package/types/components/Stack.d.ts +1 -1
  62. package/types/components/Toast.d.ts +4 -3
  63. package/types/constants.d.ts +3 -1
  64. package/types/data/blob.d.ts +4 -4
  65. package/types/data/filesystem.d.ts +2 -2
  66. package/types/data/json.d.ts +1 -1
  67. package/types/element/Hyperlink.d.ts +8 -3
  68. package/types/element/binding.d.ts +3 -3
  69. package/types/element/dragElements.d.ts +1 -1
  70. package/types/element/linearElementEditor.d.ts +7 -2
  71. package/types/element/mutateElement.d.ts +1 -1
  72. package/types/element/textElement.d.ts +1 -1
  73. package/types/element/typeChecks.d.ts +3 -3
  74. package/types/jotai.d.ts +5 -3
  75. package/types/keys.d.ts +1 -1
  76. package/types/packages/excalidraw/example/App.d.ts +0 -1
  77. package/types/renderer/renderElement.d.ts +1 -1
  78. package/types/renderer/renderScene.d.ts +9 -1
  79. package/types/shapes.d.ts +0 -1
  80. package/types/types.d.ts +21 -12
  81. package/types/utils.d.ts +8 -5
@@ -4,7 +4,7 @@ import { AppState } from "../types";
4
4
  export declare const actionFinalize: {
5
5
  name: "finalize";
6
6
  trackEvent: false;
7
- perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<AppState>, _: any, { canvas, focusContainer }: import("../types").AppClassProperties) => {
7
+ perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<AppState>, _: any, { canvas, focusContainer, scene }: import("../types").AppClassProperties) => {
8
8
  elements: import("../element/types").ExcalidrawElement[] | undefined;
9
9
  appState: {
10
10
  cursorButton: "up";
@@ -71,7 +71,11 @@ export declare const actionFinalize: {
71
71
  };
72
72
  shouldCacheIgnoreZoom: boolean;
73
73
  showHelpDialog: boolean;
74
- toastMessage: string | null;
74
+ toast: {
75
+ message: string;
76
+ closable?: boolean | undefined;
77
+ duration?: number | undefined;
78
+ } | null;
75
79
  zenModeEnabled: boolean;
76
80
  theme: string;
77
81
  gridSize: number | null;
@@ -85,6 +89,7 @@ export declare const actionFinalize: {
85
89
  offsetTop: number;
86
90
  offsetLeft: number;
87
91
  isLibraryOpen: boolean;
92
+ isLibraryMenuDocked: boolean;
88
93
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
89
94
  collaborators: Map<string, import("../types").Collaborator>;
90
95
  showStats: boolean;
@@ -96,7 +101,7 @@ export declare const actionFinalize: {
96
101
  shown: true;
97
102
  data: import("../charts").Spreadsheet;
98
103
  };
99
- pendingImageElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawImageElement> | null;
104
+ pendingImageElementId: string | null;
100
105
  showHyperlinkPopup: false | "info" | "editor";
101
106
  linkOpacity: number;
102
107
  trayModeEnabled: boolean;
@@ -130,7 +135,7 @@ export declare const actionFinalize: {
130
135
  selectedElementIds: {
131
136
  [id: string]: boolean;
132
137
  };
133
- pendingImageElement: null;
138
+ pendingImageElementId: null;
134
139
  isLoading: boolean;
135
140
  errorMessage: string | null;
136
141
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -175,7 +180,11 @@ export declare const actionFinalize: {
175
180
  };
176
181
  shouldCacheIgnoreZoom: boolean;
177
182
  showHelpDialog: boolean;
178
- toastMessage: string | null;
183
+ toast: {
184
+ message: string;
185
+ closable?: boolean | undefined;
186
+ duration?: number | undefined;
187
+ } | null;
179
188
  zenModeEnabled: boolean;
180
189
  theme: string;
181
190
  gridSize: number | null;
@@ -189,6 +198,7 @@ export declare const actionFinalize: {
189
198
  offsetTop: number;
190
199
  offsetLeft: number;
191
200
  isLibraryOpen: boolean;
201
+ isLibraryMenuDocked: boolean;
192
202
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
193
203
  collaborators: Map<string, import("../types").Collaborator>;
194
204
  showStats: boolean;
@@ -212,7 +222,7 @@ export declare const actionFinalize: {
212
222
  commitToHistory: boolean;
213
223
  };
214
224
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
215
- PanelComponent: ({ appState, updateData, data }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
225
+ PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
216
226
  } & {
217
227
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
218
228
  };
@@ -18,7 +18,7 @@ export declare const actionGroup: {
18
18
  contextItemLabel: string;
19
19
  contextItemPredicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
20
20
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
21
- PanelComponent: ({ elements, appState, updateData }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
21
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
22
22
  } & {
23
23
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
24
24
  };
@@ -39,7 +39,7 @@ export declare const actionUngroup: {
39
39
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
40
40
  contextItemLabel: string;
41
41
  contextItemPredicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
42
- PanelComponent: ({ elements, appState, updateData }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
42
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
43
43
  } & {
44
44
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
45
45
  };
@@ -70,7 +70,11 @@ export declare const actionToggleCanvasMenu: {
70
70
  };
71
71
  shouldCacheIgnoreZoom: boolean;
72
72
  showHelpDialog: boolean;
73
- toastMessage: string | null;
73
+ toast: {
74
+ message: string;
75
+ closable?: boolean | undefined;
76
+ duration?: number | undefined;
77
+ } | null;
74
78
  zenModeEnabled: boolean;
75
79
  theme: string;
76
80
  gridSize: number | null;
@@ -84,6 +88,7 @@ export declare const actionToggleCanvasMenu: {
84
88
  offsetTop: number;
85
89
  offsetLeft: number;
86
90
  isLibraryOpen: boolean;
91
+ isLibraryMenuDocked: boolean;
87
92
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
88
93
  collaborators: Map<string, import("../types").Collaborator>;
89
94
  showStats: boolean;
@@ -95,7 +100,7 @@ export declare const actionToggleCanvasMenu: {
95
100
  shown: true;
96
101
  data: import("../charts").Spreadsheet;
97
102
  };
98
- pendingImageElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawImageElement> | null;
103
+ pendingImageElementId: string | null;
99
104
  showHyperlinkPopup: false | "info" | "editor";
100
105
  linkOpacity: number;
101
106
  trayModeEnabled: boolean;
@@ -107,7 +112,7 @@ export declare const actionToggleCanvasMenu: {
107
112
  };
108
113
  commitToHistory: false;
109
114
  };
110
- PanelComponent: ({ appState, updateData }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
115
+ PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
111
116
  } & {
112
117
  keyTest?: undefined;
113
118
  };
@@ -182,7 +187,11 @@ export declare const actionToggleEditMenu: {
182
187
  };
183
188
  shouldCacheIgnoreZoom: boolean;
184
189
  showHelpDialog: boolean;
185
- toastMessage: string | null;
190
+ toast: {
191
+ message: string;
192
+ closable?: boolean | undefined;
193
+ duration?: number | undefined;
194
+ } | null;
186
195
  zenModeEnabled: boolean;
187
196
  theme: string;
188
197
  gridSize: number | null;
@@ -196,6 +205,7 @@ export declare const actionToggleEditMenu: {
196
205
  offsetTop: number;
197
206
  offsetLeft: number;
198
207
  isLibraryOpen: boolean;
208
+ isLibraryMenuDocked: boolean;
199
209
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
200
210
  collaborators: Map<string, import("../types").Collaborator>;
201
211
  showStats: boolean;
@@ -207,7 +217,7 @@ export declare const actionToggleEditMenu: {
207
217
  shown: true;
208
218
  data: import("../charts").Spreadsheet;
209
219
  };
210
- pendingImageElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawImageElement> | null;
220
+ pendingImageElementId: string | null;
211
221
  showHyperlinkPopup: false | "info" | "editor";
212
222
  linkOpacity: number;
213
223
  trayModeEnabled: boolean;
@@ -219,7 +229,7 @@ export declare const actionToggleEditMenu: {
219
229
  };
220
230
  commitToHistory: false;
221
231
  };
222
- PanelComponent: ({ elements, appState, updateData }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
232
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
223
233
  } & {
224
234
  keyTest?: undefined;
225
235
  };
@@ -308,7 +318,11 @@ export declare const actionShortcuts: {
308
318
  [id: string]: boolean;
309
319
  };
310
320
  shouldCacheIgnoreZoom: boolean;
311
- toastMessage: string | null;
321
+ toast: {
322
+ message: string;
323
+ closable?: boolean | undefined;
324
+ duration?: number | undefined;
325
+ } | null;
312
326
  zenModeEnabled: boolean;
313
327
  theme: string;
314
328
  gridSize: number | null;
@@ -322,6 +336,7 @@ export declare const actionShortcuts: {
322
336
  offsetTop: number;
323
337
  offsetLeft: number;
324
338
  isLibraryOpen: boolean;
339
+ isLibraryMenuDocked: boolean;
325
340
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
326
341
  collaborators: Map<string, import("../types").Collaborator>;
327
342
  showStats: boolean;
@@ -333,7 +348,7 @@ export declare const actionShortcuts: {
333
348
  shown: true;
334
349
  data: import("../charts").Spreadsheet;
335
350
  };
336
- pendingImageElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawImageElement> | null;
351
+ pendingImageElementId: string | null;
337
352
  showHyperlinkPopup: false | "info" | "editor";
338
353
  linkOpacity: number;
339
354
  trayModeEnabled: boolean;
@@ -345,7 +360,7 @@ export declare const actionShortcuts: {
345
360
  };
346
361
  commitToHistory: false;
347
362
  };
348
- PanelComponent: ({ updateData }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
363
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
349
364
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
350
365
  } & {
351
366
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const actionGoToCollaborator: {
3
2
  name: "goToCollaborator";
4
3
  trackEvent: {
@@ -8,7 +7,7 @@ export declare const actionGoToCollaborator: {
8
7
  appState: Readonly<import("../types").AppState>;
9
8
  commitToHistory: false;
10
9
  };
11
- PanelComponent: ({ appState, updateData, data }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
10
+ PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
12
11
  } & {
13
12
  keyTest?: undefined;
14
13
  };