@zsviczian/excalidraw 0.12.0-obsidian-11 → 0.13.0-obsidian-1

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 (97) hide show
  1. package/README.md +68 -14
  2. package/dist/excalidraw.development.js +1192 -154
  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 +12 -9
  7. package/types/actions/actionAlign.d.ts +18 -6
  8. package/types/actions/actionBoundText.d.ts +4 -3
  9. package/types/actions/actionCanvas.d.ts +59 -36
  10. package/types/actions/actionClipboard.d.ts +20 -15
  11. package/types/actions/actionDeleteSelected.d.ts +15 -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 +62 -37
  15. package/types/actions/actionFinalize.d.ts +11 -7
  16. package/types/actions/actionGroup.d.ts +6 -2
  17. package/types/actions/actionLinearEditor.d.ts +4 -3
  18. package/types/actions/actionMenu.d.ts +21 -12
  19. package/types/actions/actionNavigate.d.ts +3 -1
  20. package/types/actions/actionProperties.d.ts +91 -52
  21. package/types/actions/actionStyles.d.ts +4 -3
  22. package/types/actions/actionToggleGridMode.d.ts +4 -3
  23. package/types/actions/actionToggleLock.d.ts +4 -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 +3 -1
  31. package/types/appState.d.ts +5 -4
  32. package/types/bug-issue-template.d.ts +2 -0
  33. package/types/clients.d.ts +1 -1
  34. package/types/components/Actions.d.ts +1 -0
  35. package/types/components/App.d.ts +52 -1
  36. package/types/components/Avatar.d.ts +1 -1
  37. package/types/components/CollabButton.d.ts +2 -1
  38. package/types/components/DialogActionButton.d.ts +10 -0
  39. package/types/components/EncryptedIcon.d.ts +2 -0
  40. package/types/components/Footer.d.ts +2 -1
  41. package/types/components/HelpButton.d.ts +8 -0
  42. package/types/components/HintViewer.d.ts +3 -2
  43. package/types/components/ImageExportDialog.d.ts +3 -1
  44. package/types/components/LayerUI.d.ts +3 -1
  45. package/types/components/LibraryButton.d.ts +1 -0
  46. package/types/components/LibraryMenu.d.ts +14 -5
  47. package/types/components/LibraryMenuBrowseButton.d.ts +7 -0
  48. package/types/components/LibraryMenuHeaderContent.d.ts +12 -0
  49. package/types/components/LibraryMenuItems.d.ts +5 -14
  50. package/types/components/LibraryUnit.d.ts +2 -3
  51. package/types/components/MenuItem.d.ts +11 -0
  52. package/types/components/MenuUtils.d.ts +2 -0
  53. package/types/components/MobileMenu.d.ts +5 -3
  54. package/types/components/Sidebar/Sidebar.d.ts +73 -0
  55. package/types/components/Sidebar/SidebarHeader.d.ts +20 -0
  56. package/types/components/Sidebar/common.d.ts +16 -0
  57. package/types/components/TopErrorBoundary.d.ts +15 -0
  58. package/types/components/WelcomeScreen.d.ts +8 -0
  59. package/types/components/WelcomeScreenDecor.d.ts +6 -0
  60. package/types/components/hoc/withUpstreamOverride.d.ts +10 -0
  61. package/types/components/icons.d.ts +83 -124
  62. package/types/constants.d.ts +1 -0
  63. package/types/data/restore.d.ts +1 -1
  64. package/types/data/types.d.ts +16 -1
  65. package/types/element/Hyperlink.d.ts +7 -4
  66. package/types/element/index.d.ts +1 -1
  67. package/types/element/linearElementEditor.d.ts +4 -3
  68. package/types/element/newElement.d.ts +8 -0
  69. package/types/element/transformHandles.d.ts +1 -1
  70. package/types/excalidraw-app/CustomStats.d.ts +9 -0
  71. package/types/excalidraw-app/app_constants.d.ts +32 -0
  72. package/types/excalidraw-app/collab/Collab.d.ts +163 -0
  73. package/types/excalidraw-app/collab/Portal.d.ts +28 -0
  74. package/types/excalidraw-app/collab/RoomDialog.d.ts +13 -0
  75. package/types/excalidraw-app/collab/reconciliation.d.ts +10 -0
  76. package/types/excalidraw-app/components/ExportToExcalidrawPlus.d.ts +9 -0
  77. package/types/excalidraw-app/components/LanguageList.d.ts +4 -0
  78. package/types/excalidraw-app/components/icons.d.ts +1 -0
  79. package/types/excalidraw-app/data/FileManager.d.ts +66 -0
  80. package/types/excalidraw-app/data/LocalData.d.ts +32 -0
  81. package/types/excalidraw-app/data/Locker.d.ts +8 -0
  82. package/types/excalidraw-app/data/firebase.d.ts +25 -0
  83. package/types/excalidraw-app/data/index.d.ts +186 -0
  84. package/types/excalidraw-app/data/localStorage.d.ts +112 -0
  85. package/types/excalidraw-app/data/tabSync.d.ts +9 -0
  86. package/types/excalidraw-app/index.d.ts +26 -0
  87. package/types/hooks/useOutsideClick.d.ts +2 -0
  88. package/types/keys.d.ts +13 -3
  89. package/types/packages/excalidraw/example/App.d.ts +2 -1
  90. package/types/packages/excalidraw/example/sidebar/ExampleSidebar.d.ts +5 -0
  91. package/types/packages/excalidraw/index.d.ts +4 -0
  92. package/types/packages/utils.d.ts +3 -1
  93. package/types/renderer/renderScene.d.ts +1 -1
  94. package/types/scene/scrollbars.d.ts +1 -1
  95. package/types/scene/types.d.ts +1 -0
  96. package/types/shapes.d.ts +27 -3
  97. package/types/types.d.ts +21 -3
@@ -11,6 +11,110 @@ https://github.com/nodeca/pica
11
11
 
12
12
  */
13
13
 
14
+ /*! *****************************************************************************
15
+ Copyright (c) Microsoft Corporation. All rights reserved.
16
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
17
+ this file except in compliance with the License. You may obtain a copy of the
18
+ License at http://www.apache.org/licenses/LICENSE-2.0
19
+
20
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
22
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
23
+ MERCHANTABLITY OR NON-INFRINGEMENT.
24
+
25
+ See the Apache Version 2.0 License for specific language governing permissions
26
+ and limitations under the License.
27
+ ***************************************************************************** */
28
+
29
+ /*! https://mths.be/utf8js v2.1.2 by @mathias */
30
+
31
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
32
+
33
+ /**
34
+ * @license
35
+ * Copyright 2017 Google LLC
36
+ *
37
+ * Licensed under the Apache License, Version 2.0 (the "License");
38
+ * you may not use this file except in compliance with the License.
39
+ * You may obtain a copy of the License at
40
+ *
41
+ * http://www.apache.org/licenses/LICENSE-2.0
42
+ *
43
+ * Unless required by applicable law or agreed to in writing, software
44
+ * distributed under the License is distributed on an "AS IS" BASIS,
45
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
46
+ * See the License for the specific language governing permissions and
47
+ * limitations under the License.
48
+ */
49
+
50
+ /**
51
+ * @license
52
+ * Copyright 2018 Google LLC
53
+ *
54
+ * Licensed under the Apache License, Version 2.0 (the "License");
55
+ * you may not use this file except in compliance with the License.
56
+ * You may obtain a copy of the License at
57
+ *
58
+ * http://www.apache.org/licenses/LICENSE-2.0
59
+ *
60
+ * Unless required by applicable law or agreed to in writing, software
61
+ * distributed under the License is distributed on an "AS IS" BASIS,
62
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
63
+ * See the License for the specific language governing permissions and
64
+ * limitations under the License.
65
+ */
66
+
67
+ /**
68
+ * @license
69
+ * Copyright 2019 Google LLC
70
+ *
71
+ * Licensed under the Apache License, Version 2.0 (the "License");
72
+ * you may not use this file except in compliance with the License.
73
+ * You may obtain a copy of the License at
74
+ *
75
+ * http://www.apache.org/licenses/LICENSE-2.0
76
+ *
77
+ * Unless required by applicable law or agreed to in writing, software
78
+ * distributed under the License is distributed on an "AS IS" BASIS,
79
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
80
+ * See the License for the specific language governing permissions and
81
+ * limitations under the License.
82
+ */
83
+
84
+ /**
85
+ * @license
86
+ * Copyright 2020 Google LLC
87
+ *
88
+ * Licensed under the Apache License, Version 2.0 (the "License");
89
+ * you may not use this file except in compliance with the License.
90
+ * You may obtain a copy of the License at
91
+ *
92
+ * http://www.apache.org/licenses/LICENSE-2.0
93
+ *
94
+ * Unless required by applicable law or agreed to in writing, software
95
+ * distributed under the License is distributed on an "AS IS" BASIS,
96
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
97
+ * See the License for the specific language governing permissions and
98
+ * limitations under the License.
99
+ */
100
+
101
+ /**
102
+ * @license
103
+ * Copyright 2021 Google LLC
104
+ *
105
+ * Licensed under the Apache License, Version 2.0 (the "License");
106
+ * you may not use this file except in compliance with the License.
107
+ * You may obtain a copy of the License at
108
+ *
109
+ * http://www.apache.org/licenses/LICENSE-2.0
110
+ *
111
+ * Unless required by applicable law or agreed to in writing, software
112
+ * distributed under the License is distributed on an "AS IS" BASIS,
113
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
114
+ * See the License for the specific language governing permissions and
115
+ * limitations under the License.
116
+ */
117
+
14
118
  /**
15
119
  * @license React
16
120
  * react-jsx-runtime.production.min.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zsviczian/excalidraw",
3
- "version": "0.12.0-obsidian-11",
3
+ "version": "0.13.0-obsidian-1",
4
4
  "main": "main.js",
5
5
  "types": "types/packages/excalidraw/index.d.ts",
6
6
  "files": [
@@ -9,6 +9,7 @@ export declare const actionAddToLibrary: {
9
9
  toast: {
10
10
  message: string;
11
11
  };
12
+ showWelcomeScreen: boolean;
12
13
  isLoading: boolean;
13
14
  errorMessage: string | null;
14
15
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -64,6 +65,9 @@ export declare const actionAddToLibrary: {
64
65
  }>;
65
66
  openMenu: "canvas" | "shape" | null;
66
67
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
68
+ openSidebar: "library" | "customSidebar" | null;
69
+ openDialog: "imageExport" | "help" | null;
70
+ isSidebarDocked: boolean;
67
71
  lastPointerDownWith: import("../element/types").PointerType;
68
72
  selectedElementIds: {
69
73
  [id: string]: boolean;
@@ -72,7 +76,6 @@ export declare const actionAddToLibrary: {
72
76
  [id: string]: boolean;
73
77
  };
74
78
  shouldCacheIgnoreZoom: boolean;
75
- showHelpDialog: boolean;
76
79
  zenModeEnabled: boolean;
77
80
  theme: string;
78
81
  gridSize: number | null;
@@ -85,8 +88,6 @@ export declare const actionAddToLibrary: {
85
88
  height: number;
86
89
  offsetTop: number;
87
90
  offsetLeft: number;
88
- isLibraryOpen: boolean;
89
- isLibraryMenuDocked: boolean;
90
91
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
91
92
  collaborators: Map<string, import("../types").Collaborator>;
92
93
  showStats: boolean;
@@ -113,6 +114,7 @@ export declare const actionAddToLibrary: {
113
114
  commitToHistory: false;
114
115
  appState: {
115
116
  errorMessage: any;
117
+ showWelcomeScreen: boolean;
116
118
  isLoading: boolean;
117
119
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
118
120
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -167,6 +169,9 @@ export declare const actionAddToLibrary: {
167
169
  }>;
168
170
  openMenu: "canvas" | "shape" | null;
169
171
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
172
+ openSidebar: "library" | "customSidebar" | null;
173
+ openDialog: "imageExport" | "help" | null;
174
+ isSidebarDocked: boolean;
170
175
  lastPointerDownWith: import("../element/types").PointerType;
171
176
  selectedElementIds: {
172
177
  [id: string]: boolean;
@@ -175,7 +180,6 @@ export declare const actionAddToLibrary: {
175
180
  [id: string]: boolean;
176
181
  };
177
182
  shouldCacheIgnoreZoom: boolean;
178
- showHelpDialog: boolean;
179
183
  toast: {
180
184
  message: string;
181
185
  closable?: boolean | undefined;
@@ -193,8 +197,6 @@ export declare const actionAddToLibrary: {
193
197
  height: number;
194
198
  offsetTop: number;
195
199
  offsetLeft: number;
196
- isLibraryOpen: boolean;
197
- isLibraryMenuDocked: boolean;
198
200
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
199
201
  collaborators: Map<string, import("../types").Collaborator>;
200
202
  showStats: boolean;
@@ -221,6 +223,7 @@ export declare const actionAddToLibrary: {
221
223
  commitToHistory: false;
222
224
  appState: {
223
225
  errorMessage: string;
226
+ showWelcomeScreen: boolean;
224
227
  isLoading: boolean;
225
228
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
226
229
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -275,6 +278,9 @@ export declare const actionAddToLibrary: {
275
278
  }>;
276
279
  openMenu: "canvas" | "shape" | null;
277
280
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
281
+ openSidebar: "library" | "customSidebar" | null;
282
+ openDialog: "imageExport" | "help" | null;
283
+ isSidebarDocked: boolean;
278
284
  lastPointerDownWith: import("../element/types").PointerType;
279
285
  selectedElementIds: {
280
286
  [id: string]: boolean;
@@ -283,7 +289,6 @@ export declare const actionAddToLibrary: {
283
289
  [id: string]: boolean;
284
290
  };
285
291
  shouldCacheIgnoreZoom: boolean;
286
- showHelpDialog: boolean;
287
292
  toast: {
288
293
  message: string;
289
294
  closable?: boolean | undefined;
@@ -301,8 +306,6 @@ export declare const actionAddToLibrary: {
301
306
  height: number;
302
307
  offsetTop: number;
303
308
  offsetLeft: number;
304
- isLibraryOpen: boolean;
305
- isLibraryMenuDocked: boolean;
306
309
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
307
310
  collaborators: Map<string, import("../types").Collaborator>;
308
311
  showStats: boolean;
@@ -12,7 +12,9 @@ export declare const actionAlignTop: {
12
12
  commitToHistory: true;
13
13
  };
14
14
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
15
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
15
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
16
+ isInHamburgerMenu: boolean;
17
+ }) => JSX.Element;
16
18
  } & {
17
19
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
18
20
  };
@@ -27,7 +29,9 @@ export declare const actionAlignBottom: {
27
29
  commitToHistory: true;
28
30
  };
29
31
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
30
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
32
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
33
+ isInHamburgerMenu: boolean;
34
+ }) => JSX.Element;
31
35
  } & {
32
36
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
33
37
  };
@@ -42,7 +46,9 @@ export declare const actionAlignLeft: {
42
46
  commitToHistory: true;
43
47
  };
44
48
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
45
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
49
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
50
+ isInHamburgerMenu: boolean;
51
+ }) => JSX.Element;
46
52
  } & {
47
53
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
48
54
  };
@@ -57,7 +63,9 @@ export declare const actionAlignRight: {
57
63
  commitToHistory: true;
58
64
  };
59
65
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
60
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
66
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
67
+ isInHamburgerMenu: boolean;
68
+ }) => JSX.Element;
61
69
  } & {
62
70
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
63
71
  };
@@ -71,7 +79,9 @@ export declare const actionAlignVerticallyCentered: {
71
79
  elements: ExcalidrawElement[];
72
80
  commitToHistory: true;
73
81
  };
74
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
82
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
83
+ isInHamburgerMenu: boolean;
84
+ }) => JSX.Element;
75
85
  } & {
76
86
  keyTest?: undefined;
77
87
  };
@@ -85,7 +95,9 @@ export declare const actionAlignHorizontallyCentered: {
85
95
  elements: ExcalidrawElement[];
86
96
  commitToHistory: true;
87
97
  };
88
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
98
+ PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps & {
99
+ isInHamburgerMenu: boolean;
100
+ }) => JSX.Element;
89
101
  } & {
90
102
  keyTest?: undefined;
91
103
  };
@@ -26,6 +26,7 @@ export declare const actionBindText: {
26
26
  selectedElementIds: {
27
27
  [x: string]: true;
28
28
  };
29
+ showWelcomeScreen: boolean;
29
30
  isLoading: boolean;
30
31
  errorMessage: string | null;
31
32
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -81,12 +82,14 @@ export declare const actionBindText: {
81
82
  }>;
82
83
  openMenu: "canvas" | "shape" | null;
83
84
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
85
+ openSidebar: "library" | "customSidebar" | null;
86
+ openDialog: "imageExport" | "help" | null;
87
+ isSidebarDocked: boolean;
84
88
  lastPointerDownWith: import("../element/types").PointerType;
85
89
  previousSelectedElementIds: {
86
90
  [id: string]: boolean;
87
91
  };
88
92
  shouldCacheIgnoreZoom: boolean;
89
- showHelpDialog: boolean;
90
93
  toast: {
91
94
  message: string;
92
95
  closable?: boolean | undefined;
@@ -104,8 +107,6 @@ export declare const actionBindText: {
104
107
  height: number;
105
108
  offsetTop: number;
106
109
  offsetLeft: number;
107
- isLibraryOpen: boolean;
108
- isLibraryMenuDocked: boolean;
109
110
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
110
111
  collaborators: Map<string, import("../types").Collaborator>;
111
112
  showStats: boolean;