@myoc/excalidraw 0.19.506 → 0.19.508

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 (86) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/dist/dev/{chunk-CUCA2WKB.js → chunk-4FUVQKPQ.js} +37 -43
  3. package/dist/dev/chunk-4FUVQKPQ.js.map +7 -0
  4. package/dist/dev/{chunk-KLM3KPI7.js → chunk-55P7U5EB.js} +4 -1
  5. package/dist/dev/chunk-55P7U5EB.js.map +7 -0
  6. package/dist/dev/{chunk-KCN2IL3S.js → chunk-TW3GG6X2.js} +2 -2
  7. package/dist/dev/data/{image-KG7C5ZXU.js → image-BLMJ34ZZ.js} +3 -3
  8. package/dist/dev/index.css +11 -3
  9. package/dist/dev/index.css.map +2 -2
  10. package/dist/dev/index.js +1391 -972
  11. package/dist/dev/index.js.map +4 -4
  12. package/dist/dev/locales/{en-I7VEBYIX.js → en-MHJYLCUG.js} +2 -2
  13. package/dist/dev/subset-shared.chunk.js +1 -1
  14. package/dist/dev/subset-worker.chunk.js +1 -1
  15. package/dist/prod/chunk-5HKPV526.js +4 -0
  16. package/dist/prod/{chunk-74H5OWWZ.js → chunk-GYDQTBSQ.js} +1 -1
  17. package/dist/prod/{chunk-3FGJVPJS.js → chunk-QIZKYIJ7.js} +3 -3
  18. package/dist/prod/data/image-S4O4TFPQ.js +1 -0
  19. package/dist/prod/index.css +1 -1
  20. package/dist/prod/index.js +19 -19
  21. package/dist/prod/locales/{en-Y2V7YPBM.js → en-YKHOUQAO.js} +1 -1
  22. package/dist/prod/subset-shared.chunk.js +1 -1
  23. package/dist/prod/subset-worker.chunk.js +1 -1
  24. package/dist/types/element/src/Scene.d.ts +5 -3
  25. package/dist/types/element/src/bounds.d.ts +4 -2
  26. package/dist/types/element/src/duplicate.d.ts +1 -0
  27. package/dist/types/element/src/frame.d.ts +7 -6
  28. package/dist/types/element/src/linearElementEditor.d.ts +2 -2
  29. package/dist/types/element/src/selection.d.ts +2 -2
  30. package/dist/types/element/src/shape.d.ts +1 -1
  31. package/dist/types/element/src/typeChecks.d.ts +1 -0
  32. package/dist/types/element/src/utils.d.ts +1 -1
  33. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -3
  34. package/dist/types/excalidraw/actions/actionBoundText.d.ts +2 -2
  35. package/dist/types/excalidraw/actions/actionCanvas.d.ts +11 -11
  36. package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -2
  37. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
  38. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
  39. package/dist/types/excalidraw/actions/actionDeselect.d.ts +168 -0
  40. package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -1
  41. package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -2
  42. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +1 -1
  43. package/dist/types/excalidraw/actions/actionExport.d.ts +2 -2
  44. package/dist/types/excalidraw/actions/actionFrame.d.ts +4 -4
  45. package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -2
  46. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -1
  47. package/dist/types/excalidraw/actions/actionLink.d.ts +1 -1
  48. package/dist/types/excalidraw/actions/actionMenu.d.ts +1 -1
  49. package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -2
  50. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
  51. package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -1
  52. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -1
  53. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
  54. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -1
  55. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
  56. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -1
  57. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
  58. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
  59. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -1
  60. package/dist/types/excalidraw/actions/index.d.ts +1 -0
  61. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  62. package/dist/types/excalidraw/appState.d.ts +1 -0
  63. package/dist/types/excalidraw/components/App.d.ts +9 -0
  64. package/dist/types/excalidraw/components/PublishLibrary.d.ts +3 -2
  65. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -1
  66. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  67. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  68. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
  69. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -0
  70. package/dist/types/excalidraw/components/shapes.d.ts +7 -0
  71. package/dist/types/excalidraw/data/blob.d.ts +4 -8
  72. package/dist/types/excalidraw/data/json.d.ts +1 -1
  73. package/dist/types/excalidraw/index.d.ts +1 -1
  74. package/dist/types/excalidraw/scene/Renderer.d.ts +425 -19
  75. package/dist/types/excalidraw/types.d.ts +15 -2
  76. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  77. package/dist/types/math/src/constants.d.ts +0 -1
  78. package/dist/types/math/src/curve.d.ts +4 -1
  79. package/package.json +4 -5
  80. package/dist/dev/chunk-CUCA2WKB.js.map +0 -7
  81. package/dist/dev/chunk-KLM3KPI7.js.map +0 -7
  82. package/dist/prod/chunk-DAHBMDEO.js +0 -4
  83. package/dist/prod/data/image-OZR7E4WV.js +0 -1
  84. /package/dist/dev/{chunk-KCN2IL3S.js.map → chunk-TW3GG6X2.js.map} +0 -0
  85. /package/dist/dev/data/{image-KG7C5ZXU.js.map → image-BLMJ34ZZ.js.map} +0 -0
  86. /package/dist/dev/locales/{en-I7VEBYIX.js.map → en-MHJYLCUG.js.map} +0 -0
@@ -42,9 +42,9 @@ export declare const actionSetEmbeddableAsActiveTool: {
42
42
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
43
43
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
44
  isBindingEnabled: boolean;
45
+ boxSelectionMode: import("../types").BoxSelectionMode;
45
46
  bindingPreference: "enabled" | "disabled";
46
47
  isMidpointSnappingEnabled: boolean;
47
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
48
48
  suggestedBinding: {
49
49
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
50
50
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -183,8 +183,8 @@ export declare const actionLoadScene: {
183
183
  };
184
184
  errorMessage: React.ReactNode;
185
185
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
186
+ boxSelectionMode: import("../types").BoxSelectionMode;
186
187
  bindingPreference: "enabled" | "disabled";
187
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
188
188
  editingFrame: string | null;
189
189
  preferredSelectionTool: {
190
190
  type: "selection" | "lasso";
@@ -277,9 +277,9 @@ export declare const actionLoadScene: {
277
277
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
278
278
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
279
279
  isBindingEnabled: boolean;
280
+ boxSelectionMode: import("../types").BoxSelectionMode;
280
281
  bindingPreference: "enabled" | "disabled";
281
282
  isMidpointSnappingEnabled: boolean;
282
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
283
283
  suggestedBinding: {
284
284
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
285
285
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -39,9 +39,9 @@ export declare const actionSelectAllElementsInFrame: {
39
39
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
40
40
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
41
41
  isBindingEnabled: boolean;
42
+ boxSelectionMode: import("../types").BoxSelectionMode;
42
43
  bindingPreference: "enabled" | "disabled";
43
44
  isMidpointSnappingEnabled: boolean;
44
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
45
45
  suggestedBinding: {
46
46
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
47
47
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -223,9 +223,9 @@ export declare const actionRemoveAllElementsFromFrame: {
223
223
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
224
224
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
225
225
  isBindingEnabled: boolean;
226
+ boxSelectionMode: import("../types").BoxSelectionMode;
226
227
  bindingPreference: "enabled" | "disabled";
227
228
  isMidpointSnappingEnabled: boolean;
228
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
229
229
  suggestedBinding: {
230
230
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
231
231
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -411,9 +411,9 @@ export declare const actionupdateFrameRendering: {
411
411
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
412
412
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
413
413
  isBindingEnabled: boolean;
414
+ boxSelectionMode: import("../types").BoxSelectionMode;
414
415
  bindingPreference: "enabled" | "disabled";
415
416
  isMidpointSnappingEnabled: boolean;
416
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
417
417
  suggestedBinding: {
418
418
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
419
419
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -592,9 +592,9 @@ export declare const actionSetFrameAsActiveTool: {
592
592
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
593
593
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
594
594
  isBindingEnabled: boolean;
595
+ boxSelectionMode: import("../types").BoxSelectionMode;
595
596
  bindingPreference: "enabled" | "disabled";
596
597
  isMidpointSnappingEnabled: boolean;
597
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
598
598
  suggestedBinding: {
599
599
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
600
600
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -45,9 +45,9 @@ export declare const actionGroup: {
45
45
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
46
46
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
47
47
  isBindingEnabled: boolean;
48
+ boxSelectionMode: import("../types").BoxSelectionMode;
48
49
  bindingPreference: "enabled" | "disabled";
49
50
  isMidpointSnappingEnabled: boolean;
50
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
51
51
  suggestedBinding: {
52
52
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
53
53
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -228,9 +228,9 @@ export declare const actionUngroup: {
228
228
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
229
229
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
230
230
  isBindingEnabled: boolean;
231
+ boxSelectionMode: import("../types").BoxSelectionMode;
231
232
  bindingPreference: "enabled" | "disabled";
232
233
  isMidpointSnappingEnabled: boolean;
233
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
234
234
  suggestedBinding: {
235
235
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
236
236
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -72,9 +72,9 @@ export declare const actionToggleLinearEditor: {
72
72
  multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
73
73
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
74
74
  isBindingEnabled: boolean;
75
+ boxSelectionMode: import("../types").BoxSelectionMode;
75
76
  bindingPreference: "enabled" | "disabled";
76
77
  isMidpointSnappingEnabled: boolean;
77
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
78
78
  suggestedBinding: {
79
79
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
80
80
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -36,9 +36,9 @@ export declare const actionLink: {
36
36
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
37
37
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
38
38
  isBindingEnabled: boolean;
39
+ boxSelectionMode: import("../types").BoxSelectionMode;
39
40
  bindingPreference: "enabled" | "disabled";
40
41
  isMidpointSnappingEnabled: boolean;
41
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
42
42
  suggestedBinding: {
43
43
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
44
44
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -43,9 +43,9 @@ export declare const actionShortcuts: {
43
43
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
44
44
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
45
45
  isBindingEnabled: boolean;
46
+ boxSelectionMode: import("../types").BoxSelectionMode;
46
47
  bindingPreference: "enabled" | "disabled";
47
48
  isMidpointSnappingEnabled: boolean;
48
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
49
49
  suggestedBinding: {
50
50
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
51
51
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -65,9 +65,9 @@ export declare const actionDecreaseFontSize: {
65
65
  multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
66
66
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
67
67
  isBindingEnabled: boolean;
68
+ boxSelectionMode: import("../types").BoxSelectionMode;
68
69
  bindingPreference: "enabled" | "disabled";
69
70
  isMidpointSnappingEnabled: boolean;
70
- startBoundElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
71
71
  suggestedBinding: {
72
72
  element: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement>;
73
73
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -244,9 +244,9 @@ export declare const actionIncreaseFontSize: {
244
244
  multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
245
245
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
246
246
  isBindingEnabled: boolean;
247
+ boxSelectionMode: import("../types").BoxSelectionMode;
247
248
  bindingPreference: "enabled" | "disabled";
248
249
  isMidpointSnappingEnabled: boolean;
249
- startBoundElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
250
250
  suggestedBinding: {
251
251
  element: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement>;
252
252
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -43,9 +43,9 @@ export declare const actionSelectAll: {
43
43
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
44
44
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
45
45
  isBindingEnabled: boolean;
46
+ boxSelectionMode: import("../types").BoxSelectionMode;
46
47
  bindingPreference: "enabled" | "disabled";
47
48
  isMidpointSnappingEnabled: boolean;
48
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
49
49
  suggestedBinding: {
50
50
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
51
51
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -41,9 +41,9 @@ export declare const actionCopyStyles: {
41
41
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
42
42
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
43
43
  isBindingEnabled: boolean;
44
+ boxSelectionMode: import("../types").BoxSelectionMode;
44
45
  bindingPreference: "enabled" | "disabled";
45
46
  isMidpointSnappingEnabled: boolean;
46
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
47
47
  suggestedBinding: {
48
48
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
49
49
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -38,8 +38,8 @@ export declare const actionToggleArrowBinding: {
38
38
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
39
39
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
40
40
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
41
+ boxSelectionMode: import("../types").BoxSelectionMode;
41
42
  isMidpointSnappingEnabled: boolean;
42
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
43
43
  suggestedBinding: {
44
44
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
45
45
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -42,9 +42,9 @@ export declare const actionToggleGridMode: {
42
42
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
43
43
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
44
  isBindingEnabled: boolean;
45
+ boxSelectionMode: import("../types").BoxSelectionMode;
45
46
  bindingPreference: "enabled" | "disabled";
46
47
  isMidpointSnappingEnabled: boolean;
47
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
48
48
  suggestedBinding: {
49
49
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
50
50
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -38,8 +38,8 @@ export declare const actionToggleMidpointSnapping: {
38
38
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
39
39
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
40
40
  isBindingEnabled: boolean;
41
+ boxSelectionMode: import("../types").BoxSelectionMode;
41
42
  bindingPreference: "enabled" | "disabled";
42
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
43
43
  suggestedBinding: {
44
44
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
45
45
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -40,9 +40,9 @@ export declare const actionToggleObjectsSnapMode: {
40
40
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
41
41
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
42
42
  isBindingEnabled: boolean;
43
+ boxSelectionMode: import("../types").BoxSelectionMode;
43
44
  bindingPreference: "enabled" | "disabled";
44
45
  isMidpointSnappingEnabled: boolean;
45
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
46
46
  suggestedBinding: {
47
47
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
48
48
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -46,9 +46,9 @@ export declare const actionToggleSearchMenu: {
46
46
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
47
47
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
48
48
  isBindingEnabled: boolean;
49
+ boxSelectionMode: import("../types").BoxSelectionMode;
49
50
  bindingPreference: "enabled" | "disabled";
50
51
  isMidpointSnappingEnabled: boolean;
51
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
52
52
  suggestedBinding: {
53
53
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
54
54
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -42,9 +42,9 @@ export declare const actionToggleStats: {
42
42
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
43
43
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
44
44
  isBindingEnabled: boolean;
45
+ boxSelectionMode: import("../types").BoxSelectionMode;
45
46
  bindingPreference: "enabled" | "disabled";
46
47
  isMidpointSnappingEnabled: boolean;
47
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
48
48
  suggestedBinding: {
49
49
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
50
50
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -39,9 +39,9 @@ export declare const actionToggleViewMode: {
39
39
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
40
40
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
41
41
  isBindingEnabled: boolean;
42
+ boxSelectionMode: import("../types").BoxSelectionMode;
42
43
  bindingPreference: "enabled" | "disabled";
43
44
  isMidpointSnappingEnabled: boolean;
44
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
45
45
  suggestedBinding: {
46
46
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
47
47
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -39,9 +39,9 @@ export declare const actionToggleZenMode: {
39
39
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
40
40
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
41
41
  isBindingEnabled: boolean;
42
+ boxSelectionMode: import("../types").BoxSelectionMode;
42
43
  bindingPreference: "enabled" | "disabled";
43
44
  isMidpointSnappingEnabled: boolean;
44
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
45
45
  suggestedBinding: {
46
46
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
47
47
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -6,6 +6,7 @@ export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrok
6
6
  export { actionChangeViewBackgroundColor, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, } from "./actionCanvas";
7
7
  export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
8
8
  export { actionFinalize } from "./actionFinalize";
9
+ export { actionDeselect } from "./actionDeselect";
9
10
  export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
10
11
  export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
11
12
  export { actionShortcuts } from "./actionMenu";
@@ -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" | "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" | "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";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -46,6 +46,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
46
46
  mode: import("./types").NormaliseMode;
47
47
  metric: import("./types").NormaliseMetric;
48
48
  } | undefined;
49
+ boxSelectionMode?: import("./types").BoxSelectionMode | undefined;
49
50
  bindingPreference?: "disabled" | "enabled" | undefined;
50
51
  preferredSelectionTool?: {
51
52
  type: "selection" | "lasso";
@@ -363,6 +363,7 @@ declare class App extends React.Component<AppProps, AppState> {
363
363
  } | "cursor" | "center";
364
364
  retainSeed?: boolean;
365
365
  fitToContent?: boolean;
366
+ preserveFrameChildrenOrder?: boolean;
366
367
  }) => void;
367
368
  private addElementsFromMixedContentPaste;
368
369
  private addTextFromPaste;
@@ -505,7 +506,15 @@ declare class App extends React.Component<AppProps, AppState> {
505
506
  private handleCanvasClick;
506
507
  private getElementLinkAtPosition;
507
508
  private handleElementLinkClick;
509
+ /**
510
+ * finds candidate frame under cursor (when dragging frame children/elements
511
+ * inside frames)
512
+ */
508
513
  private getTopLayerFrameAtSceneCoords;
514
+ private updateFrameToHighlight;
515
+ private maybeUpdateFrameToHighlightOnPointerMove;
516
+ private insertNewElements;
517
+ private insertNewElement;
509
518
  private handleCanvasPointerMove;
510
519
  private handleEraser;
511
520
  private handleTouchMove;
@@ -1,6 +1,6 @@
1
1
  import "./PublishLibrary.scss";
2
- import type { LibraryItems, UIAppState } from "../types";
3
- declare const PublishLibrary: ({ onClose, libraryItems, appState, onSuccess, onError, updateItemsInStorage, onRemove, }: {
2
+ import type { CompressImageFile, LibraryItems, UIAppState } from "../types";
3
+ declare const PublishLibrary: ({ onClose, libraryItems, appState, onSuccess, onError, updateItemsInStorage, onRemove, compressImageFile, }: {
4
4
  onClose: () => void;
5
5
  libraryItems: LibraryItems;
6
6
  appState: UIAppState;
@@ -12,5 +12,6 @@ declare const PublishLibrary: ({ onClose, libraryItems, appState, onSuccess, onE
12
12
  onError: (error: Error) => void;
13
13
  updateItemsInStorage: (items: LibraryItems) => void;
14
14
  onRemove: (id: string) => void;
15
+ compressImageFile: CompressImageFile;
15
16
  }) => import("react/jsx-runtime").JSX.Element;
16
17
  export default PublishLibrary;
@@ -11,7 +11,7 @@ type InteractiveCanvasProps = {
11
11
  visibleElements: readonly NonDeletedExcalidrawElement[];
12
12
  selectedElements: readonly NonDeletedExcalidrawElement[];
13
13
  allElementsMap: NonDeletedSceneElementsMap;
14
- sceneNonce: number | undefined;
14
+ canvasNonce: string;
15
15
  selectionNonce: number | undefined;
16
16
  scale: number;
17
17
  appState: InteractiveCanvasAppState;
@@ -4,6 +4,7 @@ import type { AppState } from "../../types";
4
4
  import type { RoughCanvas } from "roughjs/bin/canvas";
5
5
  interface NewElementCanvasProps {
6
6
  appState: AppState;
7
+ newElement: NonNullable<AppState["newElement"]>;
7
8
  elementsMap: RenderableElementsMap;
8
9
  allElementsMap: NonDeletedSceneElementsMap;
9
10
  scale: number;
@@ -9,7 +9,7 @@ type StaticCanvasProps = {
9
9
  elementsMap: RenderableElementsMap;
10
10
  allElementsMap: NonDeletedSceneElementsMap;
11
11
  visibleElements: readonly NonDeletedExcalidrawElement[];
12
- sceneNonce: number | undefined;
12
+ canvasNonce: string;
13
13
  selectionNonce: number | undefined;
14
14
  scale: number;
15
15
  appState: StaticCanvasAppState;
@@ -9,9 +9,10 @@ type Props<T> = {
9
9
  onChange: (value: T) => void;
10
10
  children: React.ReactNode;
11
11
  name: string;
12
+ icon?: React.ReactNode;
12
13
  };
13
14
  declare const DropdownMenuItemContentRadio: {
14
- <T>({ value, shortcut, onChange, choices, children, name, }: Props<T>): import("react/jsx-runtime").JSX.Element;
15
+ <T>({ value, shortcut, onChange, choices, children, name, icon, }: Props<T>): import("react/jsx-runtime").JSX.Element;
15
16
  displayName: string;
16
17
  };
17
18
  export default DropdownMenuItemContentRadio;
@@ -66,6 +66,7 @@ export declare const Preferences: {
66
66
  additionalItems?: React.ReactNode;
67
67
  }): import("react/jsx-runtime").JSX.Element;
68
68
  ToggleToolLock: () => import("react/jsx-runtime").JSX.Element;
69
+ BoxSelectionMode: () => import("react/jsx-runtime").JSX.Element;
69
70
  ToggleSnapMode: () => import("react/jsx-runtime").JSX.Element;
70
71
  ToggleArrowBinding: () => import("react/jsx-runtime").JSX.Element;
71
72
  ToggleMidpointSnapping: () => import("react/jsx-runtime").JSX.Element;
@@ -169,6 +169,13 @@ export declare const getToolbarTools: (app: AppClassProperties) => readonly [{
169
169
  readonly fillable: false;
170
170
  readonly toolbar: false;
171
171
  }] | readonly [{
172
+ readonly icon: import("react/jsx-runtime").JSX.Element;
173
+ readonly value: "hand";
174
+ readonly key: "h";
175
+ readonly numericKey: null;
176
+ readonly fillable: false;
177
+ readonly toolbar: true;
178
+ }, {
172
179
  readonly value: "lasso";
173
180
  readonly icon: import("react/jsx-runtime").JSX.Element;
174
181
  readonly key: "v";
@@ -1,7 +1,7 @@
1
1
  import { IMAGE_MIME_TYPES, MIME_TYPES } from "@excalidraw/common";
2
2
  import type { ValueOf } from "@excalidraw/common/utility-types";
3
3
  import type { ExcalidrawElement, FileId } from "@excalidraw/element/types";
4
- import type { AppState, DataURL, LibraryItem } from "../types";
4
+ import type { AppState, CompressImageFile, DataURL, LibraryItem } from "../types";
5
5
  import type { ImportedLibraryData } from "./types";
6
6
  export declare const getMimeType: (blob: Blob | string) => string;
7
7
  export declare const getFileHandleType: (handle: FileSystemFileHandle | null) => string | null;
@@ -121,8 +121,8 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
121
121
  };
122
122
  errorMessage: React.ReactNode;
123
123
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
124
+ boxSelectionMode: import("../types").BoxSelectionMode;
124
125
  bindingPreference: "enabled" | "disabled";
125
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
126
126
  editingFrame: string | null;
127
127
  preferredSelectionTool: {
128
128
  type: "selection" | "lasso";
@@ -295,8 +295,8 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
295
295
  };
296
296
  errorMessage: React.ReactNode;
297
297
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
298
+ boxSelectionMode: import("../types").BoxSelectionMode;
298
299
  bindingPreference: "enabled" | "disabled";
299
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
300
300
  editingFrame: string | null;
301
301
  preferredSelectionTool: {
302
302
  type: "selection" | "lasso";
@@ -368,11 +368,7 @@ export declare const getDataURL: (file: Blob | File) => Promise<DataURL>;
368
368
  export declare const getDataURL_sync: (data: string | Uint8Array | ArrayBuffer, mimeType: ValueOf<typeof MIME_TYPES>) => DataURL;
369
369
  export declare const dataURLToFile: (dataURL: DataURL, filename?: string) => File;
370
370
  export declare const dataURLToString: (dataURL: DataURL) => string;
371
- export declare const resizeImageFile: (file: File, opts: {
372
- /** undefined indicates auto */
373
- outputType?: (typeof MIME_TYPES)["jpg"];
374
- maxWidthOrHeight: number;
375
- }) => Promise<File>;
371
+ export declare const resizeImageFile: CompressImageFile;
376
372
  export declare const SVGStringToFile: (SVGString: string, filename?: string) => File & {
377
373
  type: typeof MIME_TYPES.svg;
378
374
  };
@@ -119,8 +119,8 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
119
119
  };
120
120
  errorMessage: React.ReactNode;
121
121
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
122
+ boxSelectionMode: import("../types").BoxSelectionMode;
122
123
  bindingPreference: "enabled" | "disabled";
123
- startBoundElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
124
124
  editingFrame: string | null;
125
125
  preferredSelectionTool: {
126
126
  type: "selection" | "lasso";
@@ -51,7 +51,7 @@ export { isElementLink } from "@excalidraw/element";
51
51
  export { Fonts } from "./fonts/Fonts";
52
52
  export { setCustomTextMetricsProvider } from "@excalidraw/element";
53
53
  export { CommandPalette } from "./components/CommandPalette/CommandPalette";
54
- export type { ArrangePreferences, EditorPreferences, NormalisePreferences, SmartZoomPreferences, } from "./types";
54
+ export type { ArrangePreferences, CompressImageFile, CompressImageFileOpts, EditorPreferences, NormalisePreferences, SmartZoomPreferences, } from "./types";
55
55
  export { renderSpreadsheet, tryParseSpreadsheet, isSpreadsheetValidForChartType, } from "./charts";
56
56
  /**
57
57
  * hook that subscribes to specific appState prop(s)