@zsviczian/excalidraw 0.17.6-3 → 0.17.6-31

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 (148) hide show
  1. package/dist/excalidraw.development.js +13100 -1540
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/dist/excalidraw.production.min.js.LICENSE.txt +21 -1
  4. package/dist/styles.development.css +490 -376
  5. package/dist/styles.production.css +10 -8
  6. package/package.json +5 -4
  7. package/types/excalidraw/actions/actionAddToLibrary.d.ts +27 -3
  8. package/types/excalidraw/actions/actionAlign.d.ts +7 -6
  9. package/types/excalidraw/actions/actionBoundText.d.ts +18 -2
  10. package/types/excalidraw/actions/actionCanvas.d.ts +126 -14
  11. package/types/excalidraw/actions/actionClipboard.d.ts +61 -9
  12. package/types/excalidraw/actions/actionCropEditor.d.ts +222 -0
  13. package/types/excalidraw/actions/actionDeleteSelected.d.ts +34 -6
  14. package/types/excalidraw/actions/actionElementLink.d.ts +244 -0
  15. package/types/excalidraw/actions/actionElementLock.d.ts +18 -2
  16. package/types/excalidraw/actions/actionExport.d.ts +77 -8
  17. package/types/excalidraw/actions/actionFinalize.d.ts +18 -2
  18. package/types/excalidraw/actions/actionFrame.d.ts +533 -4
  19. package/types/excalidraw/actions/actionGroup.d.ts +18 -2
  20. package/types/excalidraw/actions/actionLinearEditor.d.ts +9 -1
  21. package/types/excalidraw/actions/actionLink.d.ts +10 -2
  22. package/types/excalidraw/actions/actionMenu.d.ts +23 -2
  23. package/types/excalidraw/actions/actionNavigate.d.ts +18 -2
  24. package/types/excalidraw/actions/actionProperties.d.ts +135 -15
  25. package/types/excalidraw/actions/actionSelectAll.d.ts +9 -1
  26. package/types/excalidraw/actions/actionStyles.d.ts +9 -1
  27. package/types/excalidraw/actions/actionToggleGridMode.d.ts +9 -1
  28. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +9 -1
  29. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +14 -1
  30. package/types/excalidraw/actions/actionToggleStats.d.ts +9 -1
  31. package/types/excalidraw/actions/actionToggleViewMode.d.ts +9 -1
  32. package/types/excalidraw/actions/actionToggleZenMode.d.ts +9 -1
  33. package/types/excalidraw/actions/index.d.ts +1 -0
  34. package/types/excalidraw/actions/shortcuts.d.ts +1 -1
  35. package/types/excalidraw/actions/types.d.ts +1 -1
  36. package/types/excalidraw/align.d.ts +2 -1
  37. package/types/excalidraw/change.d.ts +2 -2
  38. package/types/excalidraw/clipboard.d.ts +27 -5
  39. package/types/excalidraw/components/Actions.d.ts +2 -1
  40. package/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  41. package/types/excalidraw/components/App.d.ts +21 -5
  42. package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  43. package/types/excalidraw/components/ElementLinkDialog.d.ts +11 -0
  44. package/types/excalidraw/components/EyeDropper.d.ts +1 -1
  45. package/types/excalidraw/components/IconPicker.d.ts +2 -2
  46. package/types/excalidraw/components/LayerUI.d.ts +2 -1
  47. package/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  48. package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  49. package/types/excalidraw/components/Range.d.ts +8 -0
  50. package/types/excalidraw/components/SearchMenu.d.ts +1 -1
  51. package/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  52. package/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  53. package/types/excalidraw/components/Stats/utils.d.ts +1 -1
  54. package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -7
  55. package/types/excalidraw/components/TTDDialog/MermaidToExcalidrawLib.d.ts +10 -0
  56. package/types/excalidraw/components/TTDDialog/common.d.ts +2 -2
  57. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
  58. package/types/excalidraw/components/hyperlink/helpers.d.ts +1 -0
  59. package/types/excalidraw/components/icons.d.ts +11 -0
  60. package/types/excalidraw/constants.d.ts +5 -1
  61. package/types/excalidraw/context/tunnels.d.ts +2 -1
  62. package/types/excalidraw/data/blob.d.ts +4 -0
  63. package/types/excalidraw/data/encode.d.ts +6 -5
  64. package/types/excalidraw/data/filesystem.d.ts +2 -1
  65. package/types/excalidraw/data/image.d.ts +0 -6
  66. package/types/excalidraw/data/library.d.ts +9 -3
  67. package/types/excalidraw/data/url.d.ts +0 -1
  68. package/types/excalidraw/dist/excalidraw.production.min.d.ts +3 -1
  69. package/types/excalidraw/editor-jotai.d.ts +56 -0
  70. package/types/excalidraw/element/binding.d.ts +10 -7
  71. package/types/excalidraw/element/cropElement.d.ts +19 -0
  72. package/types/excalidraw/element/elbowArrow.d.ts +16 -0
  73. package/types/excalidraw/element/elementLink.d.ts +13 -0
  74. package/types/excalidraw/element/embeddable.d.ts +9 -1
  75. package/types/excalidraw/element/flowchart.d.ts +1 -1
  76. package/types/excalidraw/element/heading.d.ts +5 -1
  77. package/types/excalidraw/element/image.d.ts +1 -1
  78. package/types/excalidraw/element/linearElementEditor.d.ts +9 -10
  79. package/types/excalidraw/element/mutateElement.d.ts +3 -1
  80. package/types/excalidraw/element/newElement.d.ts +9 -7
  81. package/types/excalidraw/element/resizeElements.d.ts +27 -5
  82. package/types/excalidraw/element/textElement.d.ts +14 -4
  83. package/types/excalidraw/element/textWrapping.d.ts +13 -0
  84. package/types/excalidraw/element/transformHandles.d.ts +1 -1
  85. package/types/excalidraw/element/types.d.ts +33 -1
  86. package/types/excalidraw/errors.d.ts +7 -0
  87. package/types/excalidraw/fonts/{woff2/Cascadia → Cascadia}/index.d.ts +1 -1
  88. package/types/excalidraw/fonts/ComicShanns/index.d.ts +2 -0
  89. package/types/excalidraw/fonts/{woff2/Emoji → Emoji}/index.d.ts +1 -1
  90. package/types/excalidraw/fonts/ExcalidrawFontFace.d.ts +2 -8
  91. package/types/excalidraw/fonts/{woff2/Excalifont → Excalifont}/index.d.ts +1 -1
  92. package/types/excalidraw/fonts/Fonts.d.ts +100 -0
  93. package/types/excalidraw/fonts/{woff2/Helvetica → Helvetica}/index.d.ts +1 -1
  94. package/types/excalidraw/fonts/{woff2/Liberation → Liberation}/index.d.ts +1 -1
  95. package/types/excalidraw/fonts/{woff2/Lilita → Lilita}/index.d.ts +1 -1
  96. package/types/excalidraw/fonts/{woff2/Nunito → Nunito}/index.d.ts +1 -1
  97. package/types/excalidraw/fonts/{woff2/Virgil → Virgil}/index.d.ts +1 -1
  98. package/types/excalidraw/fonts/{woff2/Xiaolai → Xiaolai}/index.d.ts +1 -1
  99. package/types/excalidraw/fonts/index.d.ts +1 -87
  100. package/types/excalidraw/frame.d.ts +11 -5
  101. package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  102. package/types/excalidraw/index.d.ts +4 -3
  103. package/types/excalidraw/keys.d.ts +107 -0
  104. package/types/excalidraw/obsidianUtils.d.ts +9 -4
  105. package/types/excalidraw/renderer/renderElement.d.ts +3 -2
  106. package/types/excalidraw/scene/Scene.d.ts +1 -0
  107. package/types/excalidraw/scene/comparisons.d.ts +1 -0
  108. package/types/excalidraw/scene/export.d.ts +8 -0
  109. package/types/excalidraw/scene/types.d.ts +7 -0
  110. package/types/excalidraw/types.d.ts +25 -1
  111. package/types/excalidraw/utils.d.ts +7 -1
  112. package/types/excalidraw/visualdebug.d.ts +8 -1
  113. package/types/math/line.d.ts +19 -0
  114. package/types/math/point.d.ts +10 -0
  115. package/types/math/utils.d.ts +1 -0
  116. package/types/math/vector.d.ts +4 -0
  117. package/types/utils/export.d.ts +6 -4
  118. package/types/excalidraw/components/MagicSettings.d.ts +0 -8
  119. package/types/excalidraw/components/Stats.d.ts +0 -11
  120. package/types/excalidraw/data/magic.d.ts +0 -23
  121. package/types/excalidraw/element/routing.d.ts +0 -12
  122. package/types/excalidraw/fonts/ExcalidrawFont.d.ts +0 -37
  123. package/types/excalidraw/fonts/wasm/hb-subset.bindings.d.ts +0 -45
  124. package/types/excalidraw/fonts/wasm/hb-subset.loader.d.ts +0 -5
  125. package/types/excalidraw/fonts/wasm/hb-subset.wasm.d.ts +0 -2
  126. package/types/excalidraw/fonts/wasm/woff2.bindings.d.ts +0 -31
  127. package/types/excalidraw/fonts/wasm/woff2.loader.d.ts +0 -6
  128. package/types/excalidraw/fonts/wasm/woff2.wasm.d.ts +0 -2
  129. package/types/excalidraw/fonts/woff2/Comic/index.d.ts +0 -2
  130. package/types/excalidraw/ga.d.ts +0 -63
  131. package/types/excalidraw/gadirections.d.ts +0 -8
  132. package/types/excalidraw/galines.d.ts +0 -22
  133. package/types/excalidraw/gapoints.d.ts +0 -7
  134. package/types/excalidraw/gatransforms.d.ts +0 -10
  135. package/types/excalidraw/jotai.d.ts +0 -34
  136. package/types/excalidraw/math.d.ts +0 -79
  137. package/types/excalidraw/scene/Fonts.d.ts +0 -19
  138. package/types/utils/geometry/geometry.d.ts +0 -89
  139. /package/types/excalidraw/fonts/{metadata.d.ts → FontMetadata.d.ts} +0 -0
  140. /package/types/excalidraw/{fonts/wasm/hb-subset-bindings.d.ts → subset/harfbuzz/harfbuzz-bindings.d.ts} +0 -0
  141. /package/types/excalidraw/{fonts/wasm/hb-subset-loader.d.ts → subset/harfbuzz/harfbuzz-loader.d.ts} +0 -0
  142. /package/types/excalidraw/{fonts/wasm/hb-subset-wasm.d.ts → subset/harfbuzz/harfbuzz-wasm.d.ts} +0 -0
  143. /package/types/excalidraw/{fonts/subset → subset}/subset-main.d.ts +0 -0
  144. /package/types/excalidraw/{fonts/subset → subset}/subset-shared.chunk.d.ts +0 -0
  145. /package/types/excalidraw/{fonts/subset → subset}/subset-worker.chunk.d.ts +0 -0
  146. /package/types/excalidraw/{fonts/wasm → subset/woff2}/woff2-bindings.d.ts +0 -0
  147. /package/types/excalidraw/{fonts/wasm → subset/woff2}/woff2-loader.d.ts +0 -0
  148. /package/types/excalidraw/{fonts/wasm → subset/woff2}/woff2-wasm.d.ts +0 -0
@@ -82,18 +82,24 @@ export declare const actionAddToLibrary: {
82
82
  tab?: string | undefined;
83
83
  } | null;
84
84
  openDialog: {
85
- name: "imageExport" | "help" | "jsonExport";
85
+ name: "help" | "imageExport" | "jsonExport";
86
86
  } | {
87
87
  name: "ttd";
88
88
  tab: "mermaid" | "text-to-diagram";
89
89
  } | {
90
90
  name: "commandPalette";
91
+ } | {
92
+ name: "elementLinkSelector";
93
+ sourceElementId: string;
91
94
  } | null;
92
95
  defaultSidebarDockedPreference: boolean;
93
96
  lastPointerDownWith: import("../element/types").PointerType;
94
97
  selectedElementIds: Readonly<{
95
98
  [id: string]: true;
96
99
  }>;
100
+ hoveredElementIds: Readonly<{
101
+ [id: string]: true;
102
+ }>;
97
103
  previousSelectedElementIds: {
98
104
  [id: string]: true;
99
105
  };
@@ -189,6 +195,8 @@ export declare const actionAddToLibrary: {
189
195
  objectsSnapModeEnabled: boolean;
190
196
  userToFollow: import("../types").UserToFollow | null;
191
197
  followedBy: Set<import("../types").SocketId>;
198
+ isCropping: boolean;
199
+ croppingElementId: string | null;
192
200
  searchMatches: readonly {
193
201
  id: string;
194
202
  focus: boolean;
@@ -276,18 +284,24 @@ export declare const actionAddToLibrary: {
276
284
  tab?: string | undefined;
277
285
  } | null;
278
286
  openDialog: {
279
- name: "imageExport" | "help" | "jsonExport";
287
+ name: "help" | "imageExport" | "jsonExport";
280
288
  } | {
281
289
  name: "ttd";
282
290
  tab: "mermaid" | "text-to-diagram";
283
291
  } | {
284
292
  name: "commandPalette";
293
+ } | {
294
+ name: "elementLinkSelector";
295
+ sourceElementId: string;
285
296
  } | null;
286
297
  defaultSidebarDockedPreference: boolean;
287
298
  lastPointerDownWith: import("../element/types").PointerType;
288
299
  selectedElementIds: Readonly<{
289
300
  [id: string]: true;
290
301
  }>;
302
+ hoveredElementIds: Readonly<{
303
+ [id: string]: true;
304
+ }>;
291
305
  previousSelectedElementIds: {
292
306
  [id: string]: true;
293
307
  };
@@ -388,6 +402,8 @@ export declare const actionAddToLibrary: {
388
402
  objectsSnapModeEnabled: boolean;
389
403
  userToFollow: import("../types").UserToFollow | null;
390
404
  followedBy: Set<import("../types").SocketId>;
405
+ isCropping: boolean;
406
+ croppingElementId: string | null;
391
407
  searchMatches: readonly {
392
408
  id: string;
393
409
  focus: boolean;
@@ -475,18 +491,24 @@ export declare const actionAddToLibrary: {
475
491
  tab?: string | undefined;
476
492
  } | null;
477
493
  openDialog: {
478
- name: "imageExport" | "help" | "jsonExport";
494
+ name: "help" | "imageExport" | "jsonExport";
479
495
  } | {
480
496
  name: "ttd";
481
497
  tab: "mermaid" | "text-to-diagram";
482
498
  } | {
483
499
  name: "commandPalette";
500
+ } | {
501
+ name: "elementLinkSelector";
502
+ sourceElementId: string;
484
503
  } | null;
485
504
  defaultSidebarDockedPreference: boolean;
486
505
  lastPointerDownWith: import("../element/types").PointerType;
487
506
  selectedElementIds: Readonly<{
488
507
  [id: string]: true;
489
508
  }>;
509
+ hoveredElementIds: Readonly<{
510
+ [id: string]: true;
511
+ }>;
490
512
  previousSelectedElementIds: {
491
513
  [id: string]: true;
492
514
  };
@@ -587,6 +609,8 @@ export declare const actionAddToLibrary: {
587
609
  objectsSnapModeEnabled: boolean;
588
610
  userToFollow: import("../types").UserToFollow | null;
589
611
  followedBy: Set<import("../types").SocketId>;
612
+ isCropping: boolean;
613
+ croppingElementId: string | null;
590
614
  searchMatches: readonly {
591
615
  id: string;
592
616
  focus: boolean;
@@ -1,5 +1,6 @@
1
1
  import type { ExcalidrawElement } from "../element/types";
2
2
  import type { AppClassProperties, AppState, UIAppState } from "../types";
3
+ export declare const alignActionsPredicate: (appState: UIAppState, app: AppClassProperties) => boolean;
3
4
  export declare const actionAlignTop: {
4
5
  name: "alignTop";
5
6
  label: string;
@@ -7,7 +8,7 @@ export declare const actionAlignTop: {
7
8
  trackEvent: {
8
9
  category: "element";
9
10
  };
10
- predicate: (elements: readonly ExcalidrawElement[], appState: UIAppState, _: unknown, app: AppClassProperties) => boolean;
11
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
11
12
  perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
12
13
  appState: Readonly<AppState>;
13
14
  elements: ExcalidrawElement[];
@@ -25,7 +26,7 @@ export declare const actionAlignBottom: {
25
26
  trackEvent: {
26
27
  category: "element";
27
28
  };
28
- predicate: (elements: readonly ExcalidrawElement[], appState: UIAppState, _: unknown, app: AppClassProperties) => boolean;
29
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
29
30
  perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
30
31
  appState: Readonly<AppState>;
31
32
  elements: ExcalidrawElement[];
@@ -43,7 +44,7 @@ export declare const actionAlignLeft: {
43
44
  trackEvent: {
44
45
  category: "element";
45
46
  };
46
- predicate: (elements: readonly ExcalidrawElement[], appState: UIAppState, _: unknown, app: AppClassProperties) => boolean;
47
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
47
48
  perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
48
49
  appState: Readonly<AppState>;
49
50
  elements: ExcalidrawElement[];
@@ -61,7 +62,7 @@ export declare const actionAlignRight: {
61
62
  trackEvent: {
62
63
  category: "element";
63
64
  };
64
- predicate: (elements: readonly ExcalidrawElement[], appState: UIAppState, _: unknown, app: AppClassProperties) => boolean;
65
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
65
66
  perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
66
67
  appState: Readonly<AppState>;
67
68
  elements: ExcalidrawElement[];
@@ -79,7 +80,7 @@ export declare const actionAlignVerticallyCentered: {
79
80
  trackEvent: {
80
81
  category: "element";
81
82
  };
82
- predicate: (elements: readonly ExcalidrawElement[], appState: UIAppState, _: unknown, app: AppClassProperties) => boolean;
83
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
83
84
  perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
84
85
  appState: Readonly<AppState>;
85
86
  elements: ExcalidrawElement[];
@@ -96,7 +97,7 @@ export declare const actionAlignHorizontallyCentered: {
96
97
  trackEvent: {
97
98
  category: "element";
98
99
  };
99
- predicate: (elements: readonly ExcalidrawElement[], appState: UIAppState, _: unknown, app: AppClassProperties) => boolean;
100
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
100
101
  perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
101
102
  appState: Readonly<AppState>;
102
103
  elements: ExcalidrawElement[];
@@ -102,15 +102,21 @@ export declare const actionBindText: {
102
102
  tab?: string | undefined;
103
103
  } | null;
104
104
  openDialog: {
105
- name: "imageExport" | "help" | "jsonExport";
105
+ name: "help" | "imageExport" | "jsonExport";
106
106
  } | {
107
107
  name: "ttd";
108
108
  tab: "mermaid" | "text-to-diagram";
109
109
  } | {
110
110
  name: "commandPalette";
111
+ } | {
112
+ name: "elementLinkSelector";
113
+ sourceElementId: string;
111
114
  } | null;
112
115
  defaultSidebarDockedPreference: boolean;
113
116
  lastPointerDownWith: import("../element/types").PointerType;
117
+ hoveredElementIds: Readonly<{
118
+ [id: string]: true;
119
+ }>;
114
120
  previousSelectedElementIds: {
115
121
  [id: string]: true;
116
122
  };
@@ -211,6 +217,8 @@ export declare const actionBindText: {
211
217
  objectsSnapModeEnabled: boolean;
212
218
  userToFollow: import("../types").UserToFollow | null;
213
219
  followedBy: Set<import("../types").SocketId>;
220
+ isCropping: boolean;
221
+ croppingElementId: string | null;
214
222
  searchMatches: readonly {
215
223
  id: string;
216
224
  focus: boolean;
@@ -313,15 +321,21 @@ export declare const actionWrapTextInContainer: {
313
321
  tab?: string | undefined;
314
322
  } | null;
315
323
  openDialog: {
316
- name: "imageExport" | "help" | "jsonExport";
324
+ name: "help" | "imageExport" | "jsonExport";
317
325
  } | {
318
326
  name: "ttd";
319
327
  tab: "mermaid" | "text-to-diagram";
320
328
  } | {
321
329
  name: "commandPalette";
330
+ } | {
331
+ name: "elementLinkSelector";
332
+ sourceElementId: string;
322
333
  } | null;
323
334
  defaultSidebarDockedPreference: boolean;
324
335
  lastPointerDownWith: import("../element/types").PointerType;
336
+ hoveredElementIds: Readonly<{
337
+ [id: string]: true;
338
+ }>;
325
339
  previousSelectedElementIds: {
326
340
  [id: string]: true;
327
341
  };
@@ -422,6 +436,8 @@ export declare const actionWrapTextInContainer: {
422
436
  objectsSnapModeEnabled: boolean;
423
437
  userToFollow: import("../types").UserToFollow | null;
424
438
  followedBy: Set<import("../types").SocketId>;
439
+ isCropping: boolean;
440
+ croppingElementId: string | null;
425
441
  searchMatches: readonly {
426
442
  id: string;
427
443
  focus: boolean;