@myoc/element 0.19.510 → 0.19.512

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 (69) hide show
  1. package/dist/dev/index.js +0 -11
  2. package/dist/dev/index.js.map +2 -2
  3. package/dist/prod/index.js +8 -8
  4. package/dist/types/common/src/constants.d.ts +2 -16
  5. package/dist/types/excalidraw/actions/actionBoundText.d.ts +0 -4
  6. package/dist/types/excalidraw/actions/actionCanvas.d.ts +0 -22
  7. package/dist/types/excalidraw/actions/actionClipboard.d.ts +0 -4
  8. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +0 -2
  9. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +0 -6
  10. package/dist/types/excalidraw/actions/actionDeselect.d.ts +0 -2
  11. package/dist/types/excalidraw/actions/actionElementLock.d.ts +0 -4
  12. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -2
  13. package/dist/types/excalidraw/actions/actionExport.d.ts +0 -4
  14. package/dist/types/excalidraw/actions/actionFrame.d.ts +0 -8
  15. package/dist/types/excalidraw/actions/actionGroup.d.ts +0 -4
  16. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +0 -4
  17. package/dist/types/excalidraw/actions/actionLink.d.ts +0 -2
  18. package/dist/types/excalidraw/actions/actionProperties.d.ts +0 -4
  19. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +0 -2
  20. package/dist/types/excalidraw/actions/actionStyles.d.ts +0 -2
  21. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +0 -2
  22. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +0 -2
  23. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +0 -2
  24. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +0 -2
  25. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +0 -2
  26. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +0 -2
  27. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +0 -2
  28. package/dist/types/excalidraw/actions/index.d.ts +0 -1
  29. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  30. package/dist/types/excalidraw/actions/types.d.ts +2 -2
  31. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  32. package/dist/types/excalidraw/components/App.d.ts +3 -7
  33. package/dist/types/excalidraw/components/MobileToolBar.d.ts +3 -1
  34. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  35. package/dist/types/excalidraw/components/icons.d.ts +0 -1
  36. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +0 -6
  37. package/dist/types/excalidraw/data/blob.d.ts +3 -184
  38. package/dist/types/excalidraw/data/json.d.ts +2 -7
  39. package/dist/types/excalidraw/data/restore.d.ts +1 -2
  40. package/dist/types/excalidraw/data/types.d.ts +1 -16
  41. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  42. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  43. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  44. package/dist/types/excalidraw/renderer/animation.d.ts +4 -1
  45. package/dist/types/excalidraw/types.d.ts +12 -30
  46. package/dist/types/math/src/point.d.ts +1 -0
  47. package/package.json +4 -4
  48. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +0 -512
  49. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +0 -19
  50. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  51. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +0 -19
  52. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +0 -2
  53. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +0 -24
  54. package/dist/types/excalidraw/components/ConfirmDialog.d.ts +0 -10
  55. package/dist/types/excalidraw/components/LibraryMenu.d.ts +0 -10
  56. package/dist/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +0 -7
  57. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +0 -9
  58. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +0 -17
  59. package/dist/types/excalidraw/components/LibraryMenuItems.d.ts +0 -14
  60. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +0 -23
  61. package/dist/types/excalidraw/components/LibraryUnit.d.ts +0 -14
  62. package/dist/types/excalidraw/components/PublishLibrary.d.ts +0 -17
  63. package/dist/types/excalidraw/data/EditorLocalStorage.d.ts +0 -8
  64. package/dist/types/excalidraw/data/library.d.ts +0 -127
  65. package/dist/types/excalidraw/deburr.d.ts +0 -1
  66. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +0 -11
  67. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +0 -1
  68. package/dist/types/excalidraw/hooks/useStableCallback.d.ts +0 -4
  69. package/dist/types/excalidraw/hooks/useTransition.d.ts +0 -2
@@ -181,8 +181,6 @@ export declare const STRING_MIME_TYPES: {
181
181
  readonly json: "application/json";
182
182
  readonly excalidraw: "application/vnd.excalidraw+json";
183
183
  readonly excalidrawClipboard: "application/vnd.excalidraw.clipboard+json";
184
- readonly excalidrawlib: "application/vnd.excalidrawlib+json";
185
- readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
186
184
  };
187
185
  export declare const MIME_TYPES: {
188
186
  readonly svg: "image/svg+xml";
@@ -202,8 +200,6 @@ export declare const MIME_TYPES: {
202
200
  readonly json: "application/json";
203
201
  readonly excalidraw: "application/vnd.excalidraw+json";
204
202
  readonly excalidrawClipboard: "application/vnd.excalidraw.clipboard+json";
205
- readonly excalidrawlib: "application/vnd.excalidrawlib+json";
206
- readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
207
203
  };
208
204
  export declare const ALLOWED_PASTE_MIME_TYPES: readonly ["text/plain", "text/html", ...("image/svg+xml" | "image/png" | "image/jpeg" | "image/gif" | "image/webp" | "image/bmp" | "image/x-icon" | "image/avif" | "image/jfif")[]];
209
205
  export declare const EXPORT_IMAGE_TYPES: {
@@ -214,7 +210,6 @@ export declare const EXPORT_IMAGE_TYPES: {
214
210
  export declare const EXPORT_DATA_TYPES: {
215
211
  readonly excalidraw: "excalidraw";
216
212
  readonly excalidrawClipboard: "excalidraw/clipboard";
217
- readonly excalidrawLibrary: "excalidrawlib";
218
213
  readonly excalidrawClipboardWithAPI: "excalidraw-api/clipboard";
219
214
  };
220
215
  export declare const getExportSource: () => string;
@@ -230,24 +225,18 @@ export declare const MAX_ZOOM = 30;
230
225
  export declare const HYPERLINK_TOOLTIP_DELAY = 300;
231
226
  export declare const IDLE_THRESHOLD = 60000;
232
227
  export declare const ACTIVE_THRESHOLD = 3000;
233
- export declare const URL_QUERY_KEYS: {
234
- readonly addLibrary: "addLibrary";
235
- };
236
- export declare const URL_HASH_KEYS: {
237
- readonly addLibrary: "addLibrary";
238
- };
239
228
  export declare const DEFAULT_UI_OPTIONS: AppProps["UIOptions"];
240
229
  export declare const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
241
230
  export declare const EXPORT_SCALES: number[];
242
231
  export declare const DEFAULT_EXPORT_PADDING = 10;
243
232
  export declare const DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT = 1440;
244
233
  export declare const MAX_ALLOWED_FILE_BYTES: number;
234
+ export declare const DEFAULT_IMAGE_OPTIONS: AppProps["imageOptions"];
245
235
  export declare const SVG_NS = "http://www.w3.org/2000/svg";
246
236
  export declare const SVG_DOCUMENT_PREAMBLE = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n";
247
237
  export declare const ENCRYPTION_KEY_BITS = 128;
248
238
  export declare const VERSIONS: {
249
239
  readonly excalidraw: 2;
250
- readonly excalidrawLibrary: 2;
251
240
  };
252
241
  export declare const BOUND_TEXT_PADDING = 5;
253
242
  export declare const ARROW_LABEL_WIDTH_FRACTION = 0.7;
@@ -290,13 +279,11 @@ export declare const DEFAULT_ELEMENT_PROPS: {
290
279
  opacity: ExcalidrawElement["opacity"];
291
280
  locked: ExcalidrawElement["locked"];
292
281
  };
293
- export declare const LIBRARY_SIDEBAR_TAB = "library";
294
282
  export declare const CANVAS_SEARCH_TAB = "search";
295
283
  export declare const DEFAULT_SIDEBAR: {
296
284
  readonly name: "default";
297
- readonly defaultTab: "library";
285
+ readonly defaultTab: "search";
298
286
  };
299
- export declare const LIBRARY_DISABLED_TYPES: Set<"embeddable" | "iframe" | "image">;
300
287
  export declare const TOOL_TYPE: {
301
288
  readonly selection: "selection";
302
289
  readonly lasso: "lasso";
@@ -318,7 +305,6 @@ export declare const TOOL_TYPE: {
318
305
  export declare const EDITOR_LS_KEYS: {
319
306
  readonly OAI_API_KEY: "excalidraw-oai-api-key";
320
307
  readonly MERMAID_TO_EXCALIDRAW: "mermaid-to-excalidraw";
321
- readonly PUBLISH_LIBRARY: "publish-library-data";
322
308
  };
323
309
  /**
324
310
  * not translated as this is used only in public, stateless API as default value
@@ -122,8 +122,6 @@ export declare const actionBindText: {
122
122
  } | null;
123
123
  openDialog: null | {
124
124
  name: "imageExport" | "help" | "jsonExport";
125
- } | {
126
- name: "commandPalette";
127
125
  } | {
128
126
  name: "settings";
129
127
  } | {
@@ -302,8 +300,6 @@ export declare const actionWrapTextInContainer: {
302
300
  } | null;
303
301
  openDialog: null | {
304
302
  name: "imageExport" | "help" | "jsonExport";
305
- } | {
306
- name: "commandPalette";
307
303
  } | {
308
304
  name: "settings";
309
305
  } | {
@@ -110,8 +110,6 @@ export declare const actionZoomIn: {
110
110
  } | null;
111
111
  openDialog: null | {
112
112
  name: "imageExport" | "help" | "jsonExport";
113
- } | {
114
- name: "commandPalette";
115
113
  } | {
116
114
  name: "settings";
117
115
  } | {
@@ -294,8 +292,6 @@ export declare const actionZoomOut: {
294
292
  } | null;
295
293
  openDialog: null | {
296
294
  name: "imageExport" | "help" | "jsonExport";
297
- } | {
298
- name: "commandPalette";
299
295
  } | {
300
296
  name: "settings";
301
297
  } | {
@@ -478,8 +474,6 @@ export declare const actionResetZoom: {
478
474
  } | null;
479
475
  openDialog: null | {
480
476
  name: "imageExport" | "help" | "jsonExport";
481
- } | {
482
- name: "commandPalette";
483
477
  } | {
484
478
  name: "settings";
485
479
  } | {
@@ -663,8 +657,6 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
663
657
  } | null;
664
658
  openDialog: null | {
665
659
  name: "imageExport" | "help" | "jsonExport";
666
- } | {
667
- name: "commandPalette";
668
660
  } | {
669
661
  name: "settings";
670
662
  } | {
@@ -844,8 +836,6 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
844
836
  } | null;
845
837
  openDialog: null | {
846
838
  name: "imageExport" | "help" | "jsonExport";
847
- } | {
848
- name: "commandPalette";
849
839
  } | {
850
840
  name: "settings";
851
841
  } | {
@@ -1022,8 +1012,6 @@ export declare const actionZoomToFitSelectionInViewport: {
1022
1012
  } | null;
1023
1013
  openDialog: null | {
1024
1014
  name: "imageExport" | "help" | "jsonExport";
1025
- } | {
1026
- name: "commandPalette";
1027
1015
  } | {
1028
1016
  name: "settings";
1029
1017
  } | {
@@ -1204,8 +1192,6 @@ export declare const actionZoomToFitSelection: {
1204
1192
  } | null;
1205
1193
  openDialog: null | {
1206
1194
  name: "imageExport" | "help" | "jsonExport";
1207
- } | {
1208
- name: "commandPalette";
1209
1195
  } | {
1210
1196
  name: "settings";
1211
1197
  } | {
@@ -1387,8 +1373,6 @@ export declare const actionZoomToFit: {
1387
1373
  } | null;
1388
1374
  openDialog: null | {
1389
1375
  name: "imageExport" | "help" | "jsonExport";
1390
- } | {
1391
- name: "commandPalette";
1392
1376
  } | {
1393
1377
  name: "settings";
1394
1378
  } | {
@@ -1568,8 +1552,6 @@ export declare const actionToggleEraserTool: {
1568
1552
  } | null;
1569
1553
  openDialog: null | {
1570
1554
  name: "imageExport" | "help" | "jsonExport";
1571
- } | {
1572
- name: "commandPalette";
1573
1555
  } | {
1574
1556
  name: "settings";
1575
1557
  } | {
@@ -1742,8 +1724,6 @@ export declare const actionToggleLassoTool: {
1742
1724
  } | null;
1743
1725
  openDialog: null | {
1744
1726
  name: "imageExport" | "help" | "jsonExport";
1745
- } | {
1746
- name: "commandPalette";
1747
1727
  } | {
1748
1728
  name: "settings";
1749
1729
  } | {
@@ -1915,8 +1895,6 @@ export declare const actionToggleHandTool: {
1915
1895
  } | null;
1916
1896
  openDialog: null | {
1917
1897
  name: "imageExport" | "help" | "jsonExport";
1918
- } | {
1919
- name: "commandPalette";
1920
1898
  } | {
1921
1899
  name: "settings";
1922
1900
  } | {
@@ -103,8 +103,6 @@ export declare const actionPaste: {
103
103
  } | null;
104
104
  openDialog: null | {
105
105
  name: "imageExport" | "help" | "jsonExport";
106
- } | {
107
- name: "commandPalette";
108
106
  } | {
109
107
  name: "settings";
110
108
  } | {
@@ -321,8 +319,6 @@ export declare const actionCopyAsPng: {
321
319
  } | null;
322
320
  openDialog: null | {
323
321
  name: "imageExport" | "help" | "jsonExport";
324
- } | {
325
- name: "commandPalette";
326
322
  } | {
327
323
  name: "settings";
328
324
  } | {
@@ -104,8 +104,6 @@ export declare const actionToggleCropEditor: {
104
104
  } | null;
105
105
  openDialog: null | {
106
106
  name: "imageExport" | "help" | "jsonExport";
107
- } | {
108
- name: "commandPalette";
109
107
  } | {
110
108
  name: "settings";
111
109
  } | {
@@ -105,8 +105,6 @@ export declare const actionDeleteSelected: {
105
105
  } | null;
106
106
  openDialog: null | {
107
107
  name: "imageExport" | "help" | "jsonExport";
108
- } | {
109
- name: "commandPalette";
110
108
  } | {
111
109
  name: "settings";
112
110
  } | {
@@ -306,8 +304,6 @@ export declare const actionDeleteSelected: {
306
304
  } | null;
307
305
  openDialog: null | {
308
306
  name: "imageExport" | "help" | "jsonExport";
309
- } | {
310
- name: "commandPalette";
311
307
  } | {
312
308
  name: "settings";
313
309
  } | {
@@ -475,8 +471,6 @@ export declare const actionDeleteSelected: {
475
471
  } | null;
476
472
  openDialog: null | {
477
473
  name: "imageExport" | "help" | "jsonExport";
478
- } | {
479
- name: "commandPalette";
480
474
  } | {
481
475
  name: "settings";
482
476
  } | {
@@ -97,8 +97,6 @@ export declare const actionDeselect: {
97
97
  } | null;
98
98
  openDialog: null | {
99
99
  name: "imageExport" | "help" | "jsonExport";
100
- } | {
101
- name: "commandPalette";
102
100
  } | {
103
101
  name: "settings";
104
102
  } | {
@@ -115,8 +115,6 @@ export declare const actionToggleElementLock: {
115
115
  } | null;
116
116
  openDialog: null | {
117
117
  name: "imageExport" | "help" | "jsonExport";
118
- } | {
119
- name: "commandPalette";
120
118
  } | {
121
119
  name: "settings";
122
120
  } | {
@@ -294,8 +292,6 @@ export declare const actionUnlockAllElements: {
294
292
  } | null;
295
293
  openDialog: null | {
296
294
  name: "imageExport" | "help" | "jsonExport";
297
- } | {
298
- name: "commandPalette";
299
295
  } | {
300
296
  name: "settings";
301
297
  } | {
@@ -101,8 +101,6 @@ export declare const actionSetEmbeddableAsActiveTool: {
101
101
  } | null;
102
102
  openDialog: null | {
103
103
  name: "imageExport" | "help" | "jsonExport";
104
- } | {
105
- name: "commandPalette";
106
104
  } | {
107
105
  name: "settings";
108
106
  } | {
@@ -97,8 +97,6 @@ export declare const actionLoadScene: {
97
97
  viewModeEnabled: boolean;
98
98
  openDialog: null | {
99
99
  name: "imageExport" | "help" | "jsonExport";
100
- } | {
101
- name: "commandPalette";
102
100
  } | {
103
101
  name: "settings";
104
102
  } | {
@@ -341,8 +339,6 @@ export declare const actionLoadScene: {
341
339
  } | null;
342
340
  openDialog: null | {
343
341
  name: "imageExport" | "help" | "jsonExport";
344
- } | {
345
- name: "commandPalette";
346
342
  } | {
347
343
  name: "settings";
348
344
  } | {
@@ -103,8 +103,6 @@ export declare const actionSelectAllElementsInFrame: {
103
103
  } | null;
104
104
  openDialog: null | {
105
105
  name: "imageExport" | "help" | "jsonExport";
106
- } | {
107
- name: "commandPalette";
108
106
  } | {
109
107
  name: "settings";
110
108
  } | {
@@ -287,8 +285,6 @@ export declare const actionRemoveAllElementsFromFrame: {
287
285
  } | null;
288
286
  openDialog: null | {
289
287
  name: "imageExport" | "help" | "jsonExport";
290
- } | {
291
- name: "commandPalette";
292
288
  } | {
293
289
  name: "settings";
294
290
  } | {
@@ -469,8 +465,6 @@ export declare const actionupdateFrameRendering: {
469
465
  } | null;
470
466
  openDialog: null | {
471
467
  name: "imageExport" | "help" | "jsonExport";
472
- } | {
473
- name: "commandPalette";
474
468
  } | {
475
469
  name: "settings";
476
470
  } | {
@@ -651,8 +645,6 @@ export declare const actionSetFrameAsActiveTool: {
651
645
  } | null;
652
646
  openDialog: null | {
653
647
  name: "imageExport" | "help" | "jsonExport";
654
- } | {
655
- name: "commandPalette";
656
648
  } | {
657
649
  name: "settings";
658
650
  } | {
@@ -109,8 +109,6 @@ export declare const actionGroup: {
109
109
  } | null;
110
110
  openDialog: null | {
111
111
  name: "imageExport" | "help" | "jsonExport";
112
- } | {
113
- name: "commandPalette";
114
112
  } | {
115
113
  name: "settings";
116
114
  } | {
@@ -292,8 +290,6 @@ export declare const actionUngroup: {
292
290
  } | null;
293
291
  openDialog: null | {
294
292
  name: "imageExport" | "help" | "jsonExport";
295
- } | {
296
- name: "commandPalette";
297
293
  } | {
298
294
  name: "settings";
299
295
  } | {
@@ -1,7 +1,6 @@
1
1
  import type { ExcalidrawLinearElement } from "@excalidraw/element/types";
2
2
  export declare const actionToggleLinearEditor: {
3
3
  name: "toggleLinearEditor";
4
- category: string;
5
4
  label: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.lineEditor.editArrow" | "labels.lineEditor.edit";
6
5
  keywords: string[];
7
6
  trackEvent: {
@@ -136,8 +135,6 @@ export declare const actionToggleLinearEditor: {
136
135
  } | null;
137
136
  openDialog: null | {
138
137
  name: "imageExport" | "help" | "jsonExport";
139
- } | {
140
- name: "commandPalette";
141
138
  } | {
142
139
  name: "settings";
143
140
  } | {
@@ -215,7 +212,6 @@ export declare const actionToggleLinearEditor: {
215
212
  };
216
213
  export declare const actionTogglePolygon: {
217
214
  name: "togglePolygon";
218
- category: string;
219
215
  icon: import("react/jsx-runtime").JSX.Element;
220
216
  keywords: string[];
221
217
  label: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.polygon.breakPolygon" | "labels.polygon.convertToPolygon";
@@ -99,8 +99,6 @@ export declare const actionLink: {
99
99
  } | null;
100
100
  openDialog: null | {
101
101
  name: "imageExport" | "help" | "jsonExport";
102
- } | {
103
- name: "commandPalette";
104
102
  } | {
105
103
  name: "settings";
106
104
  } | {
@@ -128,8 +128,6 @@ export declare const actionDecreaseFontSize: {
128
128
  } | null;
129
129
  openDialog: null | {
130
130
  name: "imageExport" | "help" | "jsonExport";
131
- } | {
132
- name: "commandPalette";
133
131
  } | {
134
132
  name: "settings";
135
133
  } | {
@@ -307,8 +305,6 @@ export declare const actionIncreaseFontSize: {
307
305
  } | null;
308
306
  openDialog: null | {
309
307
  name: "imageExport" | "help" | "jsonExport";
310
- } | {
311
- name: "commandPalette";
312
308
  } | {
313
309
  name: "settings";
314
310
  } | {
@@ -107,8 +107,6 @@ export declare const actionSelectAll: {
107
107
  } | null;
108
108
  openDialog: null | {
109
109
  name: "imageExport" | "help" | "jsonExport";
110
- } | {
111
- name: "commandPalette";
112
110
  } | {
113
111
  name: "settings";
114
112
  } | {
@@ -105,8 +105,6 @@ export declare const actionCopyStyles: {
105
105
  } | null;
106
106
  openDialog: null | {
107
107
  name: "imageExport" | "help" | "jsonExport";
108
- } | {
109
- name: "commandPalette";
110
108
  } | {
111
109
  name: "settings";
112
110
  } | {
@@ -101,8 +101,6 @@ export declare const actionToggleArrowBinding: {
101
101
  } | null;
102
102
  openDialog: null | {
103
103
  name: "imageExport" | "help" | "jsonExport";
104
- } | {
105
- name: "commandPalette";
106
104
  } | {
107
105
  name: "settings";
108
106
  } | {
@@ -106,8 +106,6 @@ export declare const actionToggleGridMode: {
106
106
  } | null;
107
107
  openDialog: null | {
108
108
  name: "imageExport" | "help" | "jsonExport";
109
- } | {
110
- name: "commandPalette";
111
109
  } | {
112
110
  name: "settings";
113
111
  } | {
@@ -101,8 +101,6 @@ export declare const actionToggleMidpointSnapping: {
101
101
  } | null;
102
102
  openDialog: null | {
103
103
  name: "imageExport" | "help" | "jsonExport";
104
- } | {
105
- name: "commandPalette";
106
104
  } | {
107
105
  name: "settings";
108
106
  } | {
@@ -104,8 +104,6 @@ export declare const actionToggleObjectsSnapMode: {
104
104
  } | null;
105
105
  openDialog: null | {
106
106
  name: "imageExport" | "help" | "jsonExport";
107
- } | {
108
- name: "commandPalette";
109
107
  } | {
110
108
  name: "settings";
111
109
  } | {
@@ -106,8 +106,6 @@ export declare const actionToggleStats: {
106
106
  } | null;
107
107
  openDialog: null | {
108
108
  name: "imageExport" | "help" | "jsonExport";
109
- } | {
110
- name: "commandPalette";
111
109
  } | {
112
110
  name: "settings";
113
111
  } | {
@@ -103,8 +103,6 @@ export declare const actionToggleViewMode: {
103
103
  } | null;
104
104
  openDialog: null | {
105
105
  name: "imageExport" | "help" | "jsonExport";
106
- } | {
107
- name: "commandPalette";
108
106
  } | {
109
107
  name: "settings";
110
108
  } | {
@@ -103,8 +103,6 @@ export declare const actionToggleZenMode: {
103
103
  } | null;
104
104
  openDialog: null | {
105
105
  name: "imageExport" | "help" | "jsonExport";
106
- } | {
107
- name: "commandPalette";
108
106
  } | {
109
107
  name: "settings";
110
108
  } | {
@@ -12,7 +12,6 @@ export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
12
12
  export { actionShortcuts } from "./actionMenu";
13
13
  export { actionGroup, actionUngroup } from "./actionGroup";
14
14
  export { actionGoToCollaborator } from "./actionNavigate";
15
- export { actionAddToLibrary } from "./actionAddToLibrary";
16
15
  export { actionAlignTop, actionAlignBottom, actionAlignLeft, actionAlignRight, actionAlignVerticallyCentered, actionAlignHorizontallyCentered, } from "./actionAlign";
17
16
  export { distributeHorizontally, distributeVertically, } from "./actionDistribute";
18
17
  export { actionArrangeElements } from "./actionArrange";
@@ -1,4 +1,4 @@
1
1
  import type { SubtypeOf } from "@excalidraw/common/utility-types";
2
2
  import type { ActionName } from "./types";
3
- export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu" | "toolLock";
3
+ export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "searchMenu" | "toolLock";
4
4
  export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
@@ -2,7 +2,7 @@ import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/el
2
2
  import type { CaptureUpdateActionType } from "@excalidraw/element";
3
3
  import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
4
4
  import type React from "react";
5
- export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
5
+ export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api";
6
6
  /** if false, the action should be prevented */
7
7
  export type ActionResult = {
8
8
  elements?: readonly ExcalidrawElement[] | null;
@@ -14,7 +14,7 @@ export type ActionResult = {
14
14
  type ActionFn<TData = any> = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: TData | undefined, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
15
15
  export type UpdaterFn = (res: ActionResult) => void;
16
16
  export type ActionFilterFn = (action: Action) => void;
17
- export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "flipHorizontal" | "flipVertical" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
17
+ export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "flipHorizontal" | "flipVertical" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -1,6 +1,5 @@
1
1
  import { LaserPointer } from "@excalidraw/laser-pointer";
2
2
  import type { LaserPointerOptions } from "@excalidraw/laser-pointer";
3
- import type { AnimationFrameHandler } from "./animation-frame-handler";
4
3
  import type App from "./components/App";
5
4
  export interface Trail {
6
5
  start(container: SVGSVGElement): void;
@@ -15,7 +14,6 @@ export interface AnimatedTrailOptions {
15
14
  animateTrail?: boolean;
16
15
  }
17
16
  export declare class AnimatedTrail implements Trail {
18
- private animationFrameHandler;
19
17
  protected app: App;
20
18
  private options;
21
19
  private currentTrail?;
@@ -23,9 +21,12 @@ export declare class AnimatedTrail implements Trail {
23
21
  private container?;
24
22
  private trailElement;
25
23
  private trailAnimation?;
26
- constructor(animationFrameHandler: AnimationFrameHandler, app: App, options: Partial<LaserPointerOptions> & Partial<AnimatedTrailOptions>);
24
+ private key;
25
+ private static counter;
26
+ constructor(app: App, options: Partial<LaserPointerOptions> & Partial<AnimatedTrailOptions>);
27
27
  get hasCurrentTrail(): boolean;
28
28
  hasLastPoint(x: number, y: number): boolean;
29
+ private cleanup;
29
30
  start(container?: SVGSVGElement): void;
30
31
  stop(): void;
31
32
  startPath(x: number, y: number): void;
@@ -5,18 +5,17 @@ import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
5
5
  import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
6
6
  import type { Mutable } from "@excalidraw/common/utility-types";
7
7
  import { ActionManager } from "../actions/manager";
8
- import { AnimationFrameHandler } from "../animation-frame-handler";
9
8
  import { History } from "../history";
10
9
  import { Fonts } from "../fonts";
11
10
  import { type WritableAtom } from "../editor-jotai";
12
11
  import { Renderer } from "../scene/Renderer";
13
- import { LaserTrails } from "../laser-trails";
12
+ import { LaserTrails } from "../laserTrails";
14
13
  import { isOverScrollBars } from "../scene/scrollbars";
15
14
  import { LassoTrail } from "../lasso";
16
15
  import { EraserTrail } from "../eraser";
17
16
  import { type OnStateChange } from "./AppStateObserver";
18
17
  import type { ExportedElements } from "../data";
19
- import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, ExcalidrawImperativeAPIEventMap, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
18
+ import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, SceneData, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, ExcalidrawImperativeAPIEventMap, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
20
19
  import type { RoughCanvas } from "roughjs/bin/canvas";
21
20
  import type { ActionResult } from "../actions/types";
22
21
  declare const editorLifecycleEventBehavior: {
@@ -80,8 +79,6 @@ declare class App extends React.Component<AppProps, AppState> {
80
79
  renderer: Renderer;
81
80
  visibleElements: readonly NonDeletedExcalidrawElement[];
82
81
  private resizeObserver;
83
- library: AppClassProperties["library"];
84
- libraryItemsFromStorage: LibraryItems | undefined;
85
82
  id: string;
86
83
  private store;
87
84
  private history;
@@ -131,7 +128,6 @@ declare class App extends React.Component<AppProps, AppState> {
131
128
  x: number;
132
129
  y: number;
133
130
  };
134
- animationFrameHandler: AnimationFrameHandler;
135
131
  laserTrails: LaserTrails;
136
132
  eraserTrail: EraserTrail;
137
133
  lassoTrail: LassoTrail;
@@ -354,7 +350,7 @@ declare class App extends React.Component<AppProps, AppState> {
354
350
  private onTouchEnd;
355
351
  private insertClipboardContent;
356
352
  pasteFromClipboard: (event: ClipboardEvent) => Promise<void>;
357
- addElementsFromPasteOrLibrary: (opts: {
353
+ addElementsFromPaste: (opts: {
358
354
  elements: readonly ExcalidrawElement[];
359
355
  files: BinaryFiles | null;
360
356
  position: {
@@ -1,10 +1,12 @@
1
1
  import "./ToolIcon.scss";
2
2
  import "./MobileToolBar.scss";
3
+ import type { ActionManager } from "../actions/manager";
3
4
  import type { AppClassProperties, UIAppState } from "../types";
4
5
  type MobileToolBarProps = {
5
6
  app: AppClassProperties;
7
+ actionManager: ActionManager;
6
8
  onHandToolToggle: () => void;
7
9
  setAppState: React.Component<any, UIAppState>["setState"];
8
10
  };
9
- export declare const MobileToolBar: ({ app, onHandToolToggle, setAppState, }: MobileToolBarProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const MobileToolBar: ({ app, actionManager, onHandToolToggle, setAppState, }: MobileToolBarProps) => import("react/jsx-runtime").JSX.Element;
10
12
  export {};