@excalidraw/excalidraw 0.18.0-a18b139 → 0.18.0-a30e1b2

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/dist/dev/{chunk-X3RYHLJU.js → chunk-CARD3WJZ.js} +9 -4
  2. package/dist/dev/chunk-CARD3WJZ.js.map +7 -0
  3. package/dist/dev/{chunk-U3G3LY5D.js → chunk-ETWEPOFC.js} +7284 -6864
  4. package/dist/dev/chunk-ETWEPOFC.js.map +7 -0
  5. package/dist/dev/{chunk-MJMGTOVG.js → chunk-RS23HYC4.js} +2 -2
  6. package/dist/dev/data/{image-Y366K5SN.js → image-AYLHSOBV.js} +3 -3
  7. package/dist/dev/index.css +43 -2
  8. package/dist/dev/index.css.map +3 -3
  9. package/dist/dev/index.js +2959 -1807
  10. package/dist/dev/index.js.map +4 -4
  11. package/dist/dev/locales/{en-CKWC2GMK.js → en-E3O5XSXJ.js} +2 -2
  12. package/dist/dev/subset-shared.chunk.js +1 -1
  13. package/dist/dev/subset-worker.chunk.js +1 -1
  14. package/dist/prod/chunk-6BSJPDKJ.js +33 -0
  15. package/dist/prod/{chunk-IUH5AXLB.js → chunk-FGHASORR.js} +4 -4
  16. package/dist/prod/{chunk-VQA74LVG.js → chunk-SBKTMZM7.js} +1 -1
  17. package/dist/prod/data/image-VAYKYPXV.js +1 -0
  18. package/dist/prod/index.css +1 -1
  19. package/dist/prod/index.js +19 -18
  20. package/dist/prod/locales/{en-SBO6ZHT2.js → en-44IKVKYT.js} +1 -1
  21. package/dist/prod/subset-shared.chunk.js +1 -1
  22. package/dist/prod/subset-worker.chunk.js +1 -1
  23. package/dist/types/common/src/constants.d.ts +2 -0
  24. package/dist/types/{excalidraw → common/src}/emitter.d.ts +1 -1
  25. package/dist/types/common/src/font-metadata.d.ts +4 -2
  26. package/dist/types/common/src/index.d.ts +1 -0
  27. package/dist/types/common/src/utility-types.d.ts +5 -0
  28. package/dist/types/common/src/utils.d.ts +9 -0
  29. package/dist/types/element/src/binding.d.ts +10 -2
  30. package/dist/types/element/src/bounds.d.ts +1 -1
  31. package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +40 -35
  32. package/dist/types/element/src/frame.d.ts +1 -0
  33. package/dist/types/element/src/index.d.ts +2 -2
  34. package/dist/types/element/src/linearElementEditor.d.ts +3 -7
  35. package/dist/types/element/src/newElement.d.ts +2 -2
  36. package/dist/types/element/src/store.d.ts +227 -0
  37. package/dist/types/element/src/transformHandles.d.ts +2 -2
  38. package/dist/types/element/src/typeChecks.d.ts +3 -0
  39. package/dist/types/element/src/types.d.ts +7 -0
  40. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +18 -36
  41. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  42. package/dist/types/excalidraw/actions/actionBoundText.d.ts +12 -24
  43. package/dist/types/excalidraw/actions/actionCanvas.d.ts +107 -185
  44. package/dist/types/excalidraw/actions/actionClipboard.d.ts +39 -75
  45. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +6 -12
  46. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +19 -37
  47. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  48. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  49. package/dist/types/excalidraw/actions/actionElementLink.d.ts +5 -11
  50. package/dist/types/excalidraw/actions/actionElementLock.d.ts +14 -26
  51. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +6 -12
  52. package/dist/types/excalidraw/actions/actionExport.d.ts +81 -135
  53. package/dist/types/excalidraw/actions/actionFinalize.d.ts +13 -25
  54. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  55. package/dist/types/excalidraw/actions/actionFrame.d.ts +26 -50
  56. package/dist/types/excalidraw/actions/actionGroup.d.ts +16 -28
  57. package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
  58. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +6 -12
  59. package/dist/types/excalidraw/actions/actionLink.d.ts +8 -14
  60. package/dist/types/excalidraw/actions/actionMenu.d.ts +19 -37
  61. package/dist/types/excalidraw/actions/actionNavigate.d.ts +12 -24
  62. package/dist/types/excalidraw/actions/actionProperties.d.ts +96 -186
  63. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +8 -14
  64. package/dist/types/excalidraw/actions/actionStyles.d.ts +10 -16
  65. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +8 -14
  66. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +8 -14
  67. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +7 -186
  68. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
  69. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +8 -14
  70. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +8 -14
  71. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +8 -14
  72. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  73. package/dist/types/excalidraw/actions/types.d.ts +3 -3
  74. package/dist/types/excalidraw/appState.d.ts +14 -14
  75. package/dist/types/excalidraw/components/App.d.ts +5 -3
  76. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +49 -0
  77. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  78. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -8
  79. package/dist/types/excalidraw/editor-jotai.d.ts +6 -6
  80. package/dist/types/excalidraw/history.d.ts +14 -22
  81. package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
  82. package/dist/types/excalidraw/index.d.ts +1 -1
  83. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -1
  84. package/dist/types/excalidraw/types.d.ts +11 -3
  85. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
  86. package/dist/types/math/src/curve.d.ts +2 -0
  87. package/dist/types/math/src/vector.d.ts +4 -0
  88. package/history.ts +68 -94
  89. package/package.json +3 -3
  90. package/dist/dev/chunk-U3G3LY5D.js.map +0 -7
  91. package/dist/dev/chunk-X3RYHLJU.js.map +0 -7
  92. package/dist/prod/chunk-PUQLEN73.js +0 -33
  93. package/dist/prod/data/image-WY2VMQLG.js +0 -1
  94. package/dist/types/excalidraw/store.d.ts +0 -129
  95. /package/dist/dev/{chunk-MJMGTOVG.js.map → chunk-RS23HYC4.js.map} +0 -0
  96. /package/dist/dev/data/{image-Y366K5SN.js.map → image-AYLHSOBV.js.map} +0 -0
  97. /package/dist/dev/locales/{en-CKWC2GMK.js.map → en-E3O5XSXJ.js.map} +0 -0
@@ -20,7 +20,7 @@ export declare const actionAddToLibrary: {
20
20
  errorMessage: import("react").ReactNode;
21
21
  activeEmbeddable: {
22
22
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
23
- state: "hover" | "active";
23
+ state: "active" | "hover";
24
24
  } | null;
25
25
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
26
26
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -87,7 +87,7 @@ export declare const actionAddToLibrary: {
87
87
  name: "imageExport" | "help" | "jsonExport";
88
88
  } | {
89
89
  name: "ttd";
90
- tab: "text-to-diagram" | "mermaid";
90
+ tab: "mermaid" | "text-to-diagram";
91
91
  } | {
92
92
  name: "commandPalette";
93
93
  } | {
@@ -167,16 +167,10 @@ export declare const actionAddToLibrary: {
167
167
  followedBy: Set<import("../types").SocketId>;
168
168
  isCropping: boolean;
169
169
  croppingElementId: string | null;
170
- searchMatches: readonly {
171
- id: string;
172
- focus: boolean;
173
- matchedLines: {
174
- offsetX: number;
175
- offsetY: number;
176
- width: number;
177
- height: number;
178
- }[];
179
- }[];
170
+ searchMatches: Readonly<{
171
+ focusedId: string | null;
172
+ matches: readonly import("../types").SearchMatch[];
173
+ }> | null;
180
174
  };
181
175
  } | {
182
176
  captureUpdate: "EVENTUALLY";
@@ -191,7 +185,7 @@ export declare const actionAddToLibrary: {
191
185
  isLoading: boolean;
192
186
  activeEmbeddable: {
193
187
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
194
- state: "hover" | "active";
188
+ state: "active" | "hover";
195
189
  } | null;
196
190
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
197
191
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -258,7 +252,7 @@ export declare const actionAddToLibrary: {
258
252
  name: "imageExport" | "help" | "jsonExport";
259
253
  } | {
260
254
  name: "ttd";
261
- tab: "text-to-diagram" | "mermaid";
255
+ tab: "mermaid" | "text-to-diagram";
262
256
  } | {
263
257
  name: "commandPalette";
264
258
  } | {
@@ -343,16 +337,10 @@ export declare const actionAddToLibrary: {
343
337
  followedBy: Set<import("../types").SocketId>;
344
338
  isCropping: boolean;
345
339
  croppingElementId: string | null;
346
- searchMatches: readonly {
347
- id: string;
348
- focus: boolean;
349
- matchedLines: {
350
- offsetX: number;
351
- offsetY: number;
352
- width: number;
353
- height: number;
354
- }[];
355
- }[];
340
+ searchMatches: Readonly<{
341
+ focusedId: string | null;
342
+ matches: readonly import("../types").SearchMatch[];
343
+ }> | null;
356
344
  };
357
345
  }> | {
358
346
  captureUpdate: "EVENTUALLY";
@@ -367,7 +355,7 @@ export declare const actionAddToLibrary: {
367
355
  isLoading: boolean;
368
356
  activeEmbeddable: {
369
357
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
370
- state: "hover" | "active";
358
+ state: "active" | "hover";
371
359
  } | null;
372
360
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
373
361
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -434,7 +422,7 @@ export declare const actionAddToLibrary: {
434
422
  name: "imageExport" | "help" | "jsonExport";
435
423
  } | {
436
424
  name: "ttd";
437
- tab: "text-to-diagram" | "mermaid";
425
+ tab: "mermaid" | "text-to-diagram";
438
426
  } | {
439
427
  name: "commandPalette";
440
428
  } | {
@@ -519,16 +507,10 @@ export declare const actionAddToLibrary: {
519
507
  followedBy: Set<import("../types").SocketId>;
520
508
  isCropping: boolean;
521
509
  croppingElementId: string | null;
522
- searchMatches: readonly {
523
- id: string;
524
- focus: boolean;
525
- matchedLines: {
526
- offsetX: number;
527
- offsetY: number;
528
- width: number;
529
- height: number;
530
- }[];
531
- }[];
510
+ searchMatches: Readonly<{
511
+ focusedId: string | null;
512
+ matches: readonly import("../types").SearchMatch[];
513
+ }> | null;
532
514
  };
533
515
  };
534
516
  label: string;
@@ -15,10 +15,10 @@ export declare const actionAlignTop: {
15
15
  elements: ExcalidrawElement[];
16
16
  captureUpdate: "IMMEDIATELY";
17
17
  };
18
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
18
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
19
19
  PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
20
20
  } & {
21
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
21
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
22
22
  };
23
23
  export declare const actionAlignBottom: {
24
24
  name: "alignBottom";
@@ -33,10 +33,10 @@ export declare const actionAlignBottom: {
33
33
  elements: ExcalidrawElement[];
34
34
  captureUpdate: "IMMEDIATELY";
35
35
  };
36
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
36
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
37
37
  PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
38
38
  } & {
39
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
39
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
40
40
  };
41
41
  export declare const actionAlignLeft: {
42
42
  name: "alignLeft";
@@ -51,10 +51,10 @@ export declare const actionAlignLeft: {
51
51
  elements: ExcalidrawElement[];
52
52
  captureUpdate: "IMMEDIATELY";
53
53
  };
54
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
54
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
55
55
  PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
56
56
  } & {
57
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
57
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
58
58
  };
59
59
  export declare const actionAlignRight: {
60
60
  name: "alignRight";
@@ -69,10 +69,10 @@ export declare const actionAlignRight: {
69
69
  elements: ExcalidrawElement[];
70
70
  captureUpdate: "IMMEDIATELY";
71
71
  };
72
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
72
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
73
73
  PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
74
74
  } & {
75
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
75
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
76
76
  };
77
77
  export declare const actionAlignVerticallyCentered: {
78
78
  name: "alignVerticallyCentered";
@@ -40,7 +40,7 @@ export declare const actionBindText: {
40
40
  errorMessage: import("react").ReactNode;
41
41
  activeEmbeddable: {
42
42
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
43
- state: "hover" | "active";
43
+ state: "active" | "hover";
44
44
  } | null;
45
45
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
46
46
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -107,7 +107,7 @@ export declare const actionBindText: {
107
107
  name: "imageExport" | "help" | "jsonExport";
108
108
  } | {
109
109
  name: "ttd";
110
- tab: "text-to-diagram" | "mermaid";
110
+ tab: "mermaid" | "text-to-diagram";
111
111
  } | {
112
112
  name: "commandPalette";
113
113
  } | {
@@ -189,16 +189,10 @@ export declare const actionBindText: {
189
189
  followedBy: Set<import("../types").SocketId>;
190
190
  isCropping: boolean;
191
191
  croppingElementId: string | null;
192
- searchMatches: readonly {
193
- id: string;
194
- focus: boolean;
195
- matchedLines: {
196
- offsetX: number;
197
- offsetY: number;
198
- width: number;
199
- height: number;
200
- }[];
201
- }[];
192
+ searchMatches: Readonly<{
193
+ focusedId: string | null;
194
+ matches: readonly import("../types").SearchMatch[];
195
+ }> | null;
202
196
  };
203
197
  captureUpdate: "IMMEDIATELY";
204
198
  };
@@ -228,7 +222,7 @@ export declare const actionWrapTextInContainer: {
228
222
  errorMessage: import("react").ReactNode;
229
223
  activeEmbeddable: {
230
224
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
231
- state: "hover" | "active";
225
+ state: "active" | "hover";
232
226
  } | null;
233
227
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
234
228
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -295,7 +289,7 @@ export declare const actionWrapTextInContainer: {
295
289
  name: "imageExport" | "help" | "jsonExport";
296
290
  } | {
297
291
  name: "ttd";
298
- tab: "text-to-diagram" | "mermaid";
292
+ tab: "mermaid" | "text-to-diagram";
299
293
  } | {
300
294
  name: "commandPalette";
301
295
  } | {
@@ -377,16 +371,10 @@ export declare const actionWrapTextInContainer: {
377
371
  followedBy: Set<import("../types").SocketId>;
378
372
  isCropping: boolean;
379
373
  croppingElementId: string | null;
380
- searchMatches: readonly {
381
- id: string;
382
- focus: boolean;
383
- matchedLines: {
384
- offsetX: number;
385
- offsetY: number;
386
- width: number;
387
- height: number;
388
- }[];
389
- }[];
374
+ searchMatches: Readonly<{
375
+ focusedId: string | null;
376
+ matches: readonly import("../types").SearchMatch[];
377
+ }> | null;
390
378
  };
391
379
  captureUpdate: "IMMEDIATELY";
392
380
  };