@zsviczian/excalidraw 0.13.0-obsidian → 0.13.0-obsidian-2

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 (98) hide show
  1. package/README.md +1 -1
  2. package/dist/excalidraw.development.js +1149 -166
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/dist/excalidraw.production.min.js.LICENSE.txt +104 -0
  5. package/package.json +1 -1
  6. package/types/actions/actionAddToLibrary.d.ts +9 -9
  7. package/types/actions/actionAlign.d.ts +18 -6
  8. package/types/actions/actionBoundText.d.ts +3 -3
  9. package/types/actions/actionCanvas.d.ts +62 -43
  10. package/types/actions/actionClipboard.d.ts +24 -15
  11. package/types/actions/actionDeleteSelected.d.ts +21 -10
  12. package/types/actions/actionDistribute.d.ts +6 -2
  13. package/types/actions/actionDuplicateSelection.d.ts +3 -1
  14. package/types/actions/actionExport.d.ts +61 -44
  15. package/types/actions/actionFinalize.d.ts +9 -7
  16. package/types/actions/actionGroup.d.ts +6 -2
  17. package/types/actions/actionLinearEditor.d.ts +3 -3
  18. package/types/actions/actionMenu.d.ts +20 -12
  19. package/types/actions/actionNavigate.d.ts +4 -1
  20. package/types/actions/actionProperties.d.ts +80 -54
  21. package/types/actions/actionStyles.d.ts +3 -3
  22. package/types/actions/actionToggleGridMode.d.ts +4 -3
  23. package/types/actions/actionToggleLock.d.ts +3 -3
  24. package/types/actions/actionToggleStats.d.ts +4 -3
  25. package/types/actions/actionToggleViewMode.d.ts +4 -3
  26. package/types/actions/actionToggleZenMode.d.ts +4 -3
  27. package/types/actions/actionZindex.d.ts +12 -4
  28. package/types/actions/manager.d.ts +1 -1
  29. package/types/actions/shortcuts.d.ts +1 -1
  30. package/types/actions/types.d.ts +7 -2
  31. package/types/appState.d.ts +11 -11
  32. package/types/bug-issue-template.d.ts +2 -0
  33. package/types/clients.d.ts +1 -1
  34. package/types/clipboard.d.ts +6 -1
  35. package/types/components/Actions.d.ts +1 -0
  36. package/types/components/App.d.ts +47 -1
  37. package/types/components/Avatar.d.ts +1 -1
  38. package/types/components/CollabButton.d.ts +2 -1
  39. package/types/components/ContextMenu.d.ts +9 -10
  40. package/types/components/DialogActionButton.d.ts +10 -0
  41. package/types/components/EncryptedIcon.d.ts +2 -0
  42. package/types/components/Footer.d.ts +2 -1
  43. package/types/components/HelpButton.d.ts +8 -0
  44. package/types/components/ImageExportDialog.d.ts +3 -1
  45. package/types/components/LayerUI.d.ts +2 -1
  46. package/types/components/LibraryButton.d.ts +1 -0
  47. package/types/components/LibraryMenuBrowseButton.d.ts +7 -0
  48. package/types/components/LibraryMenuItems.d.ts +5 -2
  49. package/types/components/MenuItem.d.ts +11 -0
  50. package/types/components/MenuUtils.d.ts +2 -0
  51. package/types/components/MobileMenu.d.ts +2 -1
  52. package/types/components/Sidebar/Sidebar.d.ts +1 -1
  53. package/types/components/Sidebar/common.d.ts +1 -0
  54. package/types/components/TopErrorBoundary.d.ts +15 -0
  55. package/types/components/WelcomeScreen.d.ts +8 -0
  56. package/types/components/WelcomeScreenDecor.d.ts +6 -0
  57. package/types/components/icons.d.ts +83 -124
  58. package/types/constants.d.ts +8 -5
  59. package/types/element/Hyperlink.d.ts +6 -4
  60. package/types/element/bounds.d.ts +3 -2
  61. package/types/element/linearElementEditor.d.ts +34 -6
  62. package/types/element/newElement.d.ts +2 -2
  63. package/types/element/resizeElements.d.ts +0 -1
  64. package/types/element/textElement.d.ts +17 -2
  65. package/types/element/transformHandles.d.ts +3 -4
  66. package/types/element/typeChecks.d.ts +10 -1
  67. package/types/element/types.d.ts +11 -4
  68. package/types/excalidraw-app/CustomStats.d.ts +9 -0
  69. package/types/excalidraw-app/app_constants.d.ts +32 -0
  70. package/types/excalidraw-app/collab/Collab.d.ts +163 -0
  71. package/types/excalidraw-app/collab/Portal.d.ts +28 -0
  72. package/types/excalidraw-app/collab/RoomDialog.d.ts +13 -0
  73. package/types/excalidraw-app/collab/reconciliation.d.ts +10 -0
  74. package/types/excalidraw-app/components/ExportToExcalidrawPlus.d.ts +9 -0
  75. package/types/excalidraw-app/components/LanguageList.d.ts +4 -0
  76. package/types/excalidraw-app/components/icons.d.ts +1 -0
  77. package/types/excalidraw-app/data/FileManager.d.ts +66 -0
  78. package/types/excalidraw-app/data/LocalData.d.ts +32 -0
  79. package/types/excalidraw-app/data/Locker.d.ts +8 -0
  80. package/types/excalidraw-app/data/firebase.d.ts +25 -0
  81. package/types/excalidraw-app/data/index.d.ts +185 -0
  82. package/types/excalidraw-app/data/localStorage.d.ts +111 -0
  83. package/types/excalidraw-app/data/tabSync.d.ts +9 -0
  84. package/types/excalidraw-app/index.d.ts +26 -0
  85. package/types/hooks/useOutsideClick.d.ts +2 -0
  86. package/types/keys.d.ts +10 -0
  87. package/types/math.d.ts +2 -1
  88. package/types/packages/excalidraw/index.d.ts +3 -0
  89. package/types/packages/utils.d.ts +3 -1
  90. package/types/renderer/renderElement.d.ts +4 -3
  91. package/types/renderer/renderScene.d.ts +1 -1
  92. package/types/scene/Fonts.d.ts +21 -0
  93. package/types/scene/Scene.d.ts +15 -0
  94. package/types/scene/comparisons.d.ts +2 -3
  95. package/types/scene/index.d.ts +1 -1
  96. package/types/scene/types.d.ts +1 -0
  97. package/types/shapes.d.ts +27 -3
  98. package/types/types.d.ts +15 -4
@@ -9,6 +9,7 @@ export declare const actionFinalize: {
9
9
  appState: {
10
10
  cursorButton: "up";
11
11
  editingLinearElement: null;
12
+ showWelcomeScreen: boolean;
12
13
  isLoading: boolean;
13
14
  errorMessage: string | null;
14
15
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -46,10 +47,9 @@ export declare const actionFinalize: {
46
47
  currentItemFontFamily: number;
47
48
  currentItemFontSize: number;
48
49
  currentItemTextAlign: string;
49
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
50
50
  currentItemStartArrowhead: import("../element/types").Arrowhead | null;
51
51
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
52
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
52
+ currentItemRoundness: import("../element/types").StrokeRoundness;
53
53
  viewBackgroundColor: string;
54
54
  scrollX: number;
55
55
  scrollY: number;
@@ -63,6 +63,7 @@ export declare const actionFinalize: {
63
63
  openMenu: "canvas" | "shape" | null;
64
64
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
65
65
  openSidebar: "library" | "customSidebar" | null;
66
+ openDialog: "imageExport" | "help" | null;
66
67
  isSidebarDocked: boolean;
67
68
  lastPointerDownWith: import("../element/types").PointerType;
68
69
  selectedElementIds: {
@@ -72,7 +73,6 @@ export declare const actionFinalize: {
72
73
  [id: string]: boolean;
73
74
  };
74
75
  shouldCacheIgnoreZoom: boolean;
75
- showHelpDialog: boolean;
76
76
  toast: {
77
77
  message: string;
78
78
  closable?: boolean | undefined;
@@ -138,6 +138,7 @@ export declare const actionFinalize: {
138
138
  };
139
139
  selectedLinearElement: LinearElementEditor | null;
140
140
  pendingImageElementId: null;
141
+ showWelcomeScreen: boolean;
141
142
  isLoading: boolean;
142
143
  errorMessage: string | null;
143
144
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -160,10 +161,9 @@ export declare const actionFinalize: {
160
161
  currentItemFontFamily: number;
161
162
  currentItemFontSize: number;
162
163
  currentItemTextAlign: string;
163
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
164
164
  currentItemStartArrowhead: import("../element/types").Arrowhead | null;
165
165
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
166
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
166
+ currentItemRoundness: import("../element/types").StrokeRoundness;
167
167
  viewBackgroundColor: string;
168
168
  scrollX: number;
169
169
  scrollY: number;
@@ -177,13 +177,13 @@ export declare const actionFinalize: {
177
177
  openMenu: "canvas" | "shape" | null;
178
178
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
179
179
  openSidebar: "library" | "customSidebar" | null;
180
+ openDialog: "imageExport" | "help" | null;
180
181
  isSidebarDocked: boolean;
181
182
  lastPointerDownWith: import("../element/types").PointerType;
182
183
  previousSelectedElementIds: {
183
184
  [id: string]: boolean;
184
185
  };
185
186
  shouldCacheIgnoreZoom: boolean;
186
- showHelpDialog: boolean;
187
187
  toast: {
188
188
  message: string;
189
189
  closable?: boolean | undefined;
@@ -224,7 +224,9 @@ export declare const actionFinalize: {
224
224
  commitToHistory: boolean;
225
225
  };
226
226
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
227
- PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
227
+ PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps & {
228
+ isInHamburgerMenu: boolean;
229
+ }) => JSX.Element;
228
230
  } & {
229
231
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
230
232
  };
@@ -18,7 +18,9 @@ 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("./types").PanelComponentProps) => JSX.Element;
21
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
22
+ isInHamburgerMenu: boolean;
23
+ }) => JSX.Element;
22
24
  } & {
23
25
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
24
26
  };
@@ -39,7 +41,9 @@ export declare const actionUngroup: {
39
41
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
40
42
  contextItemLabel: string;
41
43
  contextItemPredicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
42
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
44
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
45
+ isInHamburgerMenu: boolean;
46
+ }) => JSX.Element;
43
47
  } & {
44
48
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
45
49
  };
@@ -9,6 +9,7 @@ export declare const actionToggleLinearEditor: {
9
9
  perform(elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
10
10
  appState: {
11
11
  editingLinearElement: LinearElementEditor | null;
12
+ showWelcomeScreen: boolean;
12
13
  isLoading: boolean;
13
14
  errorMessage: string | null;
14
15
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -46,10 +47,9 @@ export declare const actionToggleLinearEditor: {
46
47
  currentItemFontFamily: number;
47
48
  currentItemFontSize: number;
48
49
  currentItemTextAlign: string;
49
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
50
50
  currentItemStartArrowhead: import("../element/types").Arrowhead | null;
51
51
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
52
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
52
+ currentItemRoundness: import("../element/types").StrokeRoundness;
53
53
  viewBackgroundColor: string;
54
54
  scrollX: number;
55
55
  scrollY: number;
@@ -64,6 +64,7 @@ export declare const actionToggleLinearEditor: {
64
64
  openMenu: "canvas" | "shape" | null;
65
65
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
66
66
  openSidebar: "library" | "customSidebar" | null;
67
+ openDialog: "imageExport" | "help" | null;
67
68
  isSidebarDocked: boolean;
68
69
  lastPointerDownWith: import("../element/types").PointerType;
69
70
  selectedElementIds: {
@@ -73,7 +74,6 @@ export declare const actionToggleLinearEditor: {
73
74
  [id: string]: boolean;
74
75
  };
75
76
  shouldCacheIgnoreZoom: boolean;
76
- showHelpDialog: boolean;
77
77
  toast: {
78
78
  message: string;
79
79
  closable?: boolean | undefined;
@@ -7,6 +7,7 @@ export declare const actionToggleCanvasMenu: {
7
7
  perform: (_: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
8
8
  appState: {
9
9
  openMenu: "canvas" | null;
10
+ showWelcomeScreen: boolean;
10
11
  isLoading: boolean;
11
12
  errorMessage: string | null;
12
13
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -45,10 +46,9 @@ export declare const actionToggleCanvasMenu: {
45
46
  currentItemFontFamily: number;
46
47
  currentItemFontSize: number;
47
48
  currentItemTextAlign: string;
48
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
49
49
  currentItemStartArrowhead: import("../element/types").Arrowhead | null;
50
50
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
51
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
51
+ currentItemRoundness: import("../element/types").StrokeRoundness;
52
52
  viewBackgroundColor: string;
53
53
  scrollX: number;
54
54
  scrollY: number;
@@ -62,6 +62,7 @@ export declare const actionToggleCanvasMenu: {
62
62
  }>;
63
63
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
64
64
  openSidebar: "library" | "customSidebar" | null;
65
+ openDialog: "imageExport" | "help" | null;
65
66
  isSidebarDocked: boolean;
66
67
  lastPointerDownWith: import("../element/types").PointerType;
67
68
  selectedElementIds: {
@@ -71,7 +72,6 @@ export declare const actionToggleCanvasMenu: {
71
72
  [id: string]: boolean;
72
73
  };
73
74
  shouldCacheIgnoreZoom: boolean;
74
- showHelpDialog: boolean;
75
75
  toast: {
76
76
  message: string;
77
77
  closable?: boolean | undefined;
@@ -113,7 +113,9 @@ export declare const actionToggleCanvasMenu: {
113
113
  };
114
114
  commitToHistory: false;
115
115
  };
116
- PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
116
+ PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps & {
117
+ isInHamburgerMenu: boolean;
118
+ }) => JSX.Element;
117
119
  } & {
118
120
  keyTest?: undefined;
119
121
  };
@@ -125,6 +127,7 @@ export declare const actionToggleEditMenu: {
125
127
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
126
128
  appState: {
127
129
  openMenu: "shape" | null;
130
+ showWelcomeScreen: boolean;
128
131
  isLoading: boolean;
129
132
  errorMessage: string | null;
130
133
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -163,10 +166,9 @@ export declare const actionToggleEditMenu: {
163
166
  currentItemFontFamily: number;
164
167
  currentItemFontSize: number;
165
168
  currentItemTextAlign: string;
166
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
167
169
  currentItemStartArrowhead: import("../element/types").Arrowhead | null;
168
170
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
169
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
171
+ currentItemRoundness: import("../element/types").StrokeRoundness;
170
172
  viewBackgroundColor: string;
171
173
  scrollX: number;
172
174
  scrollY: number;
@@ -180,6 +182,7 @@ export declare const actionToggleEditMenu: {
180
182
  }>;
181
183
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
182
184
  openSidebar: "library" | "customSidebar" | null;
185
+ openDialog: "imageExport" | "help" | null;
183
186
  isSidebarDocked: boolean;
184
187
  lastPointerDownWith: import("../element/types").PointerType;
185
188
  selectedElementIds: {
@@ -189,7 +192,6 @@ export declare const actionToggleEditMenu: {
189
192
  [id: string]: boolean;
190
193
  };
191
194
  shouldCacheIgnoreZoom: boolean;
192
- showHelpDialog: boolean;
193
195
  toast: {
194
196
  message: string;
195
197
  closable?: boolean | undefined;
@@ -231,12 +233,15 @@ export declare const actionToggleEditMenu: {
231
233
  };
232
234
  commitToHistory: false;
233
235
  };
234
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
236
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
237
+ isInHamburgerMenu: boolean;
238
+ }) => JSX.Element;
235
239
  } & {
236
240
  keyTest?: undefined;
237
241
  };
238
242
  export declare const actionFullScreen: {
239
243
  name: "toggleFullScreen";
244
+ viewMode: true;
240
245
  trackEvent: {
241
246
  category: "canvas";
242
247
  predicate: (appState: Readonly<import("../types").AppState>) => boolean;
@@ -250,13 +255,15 @@ export declare const actionFullScreen: {
250
255
  };
251
256
  export declare const actionShortcuts: {
252
257
  name: "toggleShortcuts";
258
+ viewMode: true;
253
259
  trackEvent: {
254
260
  category: "menu";
255
261
  action: string;
256
262
  };
257
263
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, { focusContainer }: import("../types").AppClassProperties) => {
258
264
  appState: {
259
- showHelpDialog: boolean;
265
+ openDialog: "help" | null;
266
+ showWelcomeScreen: boolean;
260
267
  isLoading: boolean;
261
268
  errorMessage: string | null;
262
269
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -295,10 +302,9 @@ export declare const actionShortcuts: {
295
302
  currentItemFontFamily: number;
296
303
  currentItemFontSize: number;
297
304
  currentItemTextAlign: string;
298
- currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
299
305
  currentItemStartArrowhead: import("../element/types").Arrowhead | null;
300
306
  currentItemEndArrowhead: import("../element/types").Arrowhead | null;
301
- currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
307
+ currentItemRoundness: import("../element/types").StrokeRoundness;
302
308
  viewBackgroundColor: string;
303
309
  scrollX: number;
304
310
  scrollY: number;
@@ -363,7 +369,9 @@ export declare const actionShortcuts: {
363
369
  };
364
370
  commitToHistory: false;
365
371
  };
366
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
372
+ PanelComponent: ({ updateData, isInHamburgerMenu }: import("./types").PanelComponentProps & {
373
+ isInHamburgerMenu: boolean;
374
+ }) => JSX.Element;
367
375
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
368
376
  } & {
369
377
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -1,5 +1,6 @@
1
1
  export declare const actionGoToCollaborator: {
2
2
  name: "goToCollaborator";
3
+ viewMode: true;
3
4
  trackEvent: {
4
5
  category: "collab";
5
6
  };
@@ -7,7 +8,9 @@ export declare const actionGoToCollaborator: {
7
8
  appState: Readonly<import("../types").AppState>;
8
9
  commitToHistory: false;
9
10
  };
10
- PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
11
+ PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps & {
12
+ isInHamburgerMenu: boolean;
13
+ }) => JSX.Element;
11
14
  } & {
12
15
  keyTest?: undefined;
13
16
  };