@zsviczian/excalidraw 0.18.0-37 → 0.18.0-39

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 (61) hide show
  1. package/dist/excalidraw.development.js +172 -150
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/dist/styles.development.css +690 -499
  4. package/dist/styles.production.css +12 -12
  5. package/package.json +2 -2
  6. package/types/common/src/constants.d.ts +20 -4
  7. package/types/common/src/utils.d.ts +3 -0
  8. package/types/element/src/bounds.d.ts +1 -1
  9. package/types/element/src/delta.d.ts +0 -1
  10. package/types/element/src/index.d.ts +1 -0
  11. package/types/element/src/positionElementsOnGrid.d.ts +2 -0
  12. package/types/element/src/renderElement.d.ts +4 -1
  13. package/types/element/src/textElement.d.ts +1 -1
  14. package/types/excalidraw/actions/actionAddToLibrary.d.ts +6 -3
  15. package/types/excalidraw/actions/actionBoundText.d.ts +4 -2
  16. package/types/excalidraw/actions/actionCanvas.d.ts +63 -32
  17. package/types/excalidraw/actions/actionClipboard.d.ts +12 -6
  18. package/types/excalidraw/actions/actionCropEditor.d.ts +2 -1
  19. package/types/excalidraw/actions/actionDeleteSelected.d.ts +6 -3
  20. package/types/excalidraw/actions/actionElementLink.d.ts +2 -1
  21. package/types/excalidraw/actions/actionElementLock.d.ts +4 -2
  22. package/types/excalidraw/actions/actionEmbeddable.d.ts +2 -1
  23. package/types/excalidraw/actions/actionExport.d.ts +18 -9
  24. package/types/excalidraw/actions/actionFinalize.d.ts +6 -3
  25. package/types/excalidraw/actions/actionFrame.d.ts +8 -4
  26. package/types/excalidraw/actions/actionGroup.d.ts +4 -2
  27. package/types/excalidraw/actions/actionLinearEditor.d.ts +3 -2
  28. package/types/excalidraw/actions/actionLink.d.ts +2 -1
  29. package/types/excalidraw/actions/actionMenu.d.ts +6 -3
  30. package/types/excalidraw/actions/actionNavigate.d.ts +4 -2
  31. package/types/excalidraw/actions/actionProperties.d.ts +50 -25
  32. package/types/excalidraw/actions/actionSelectAll.d.ts +2 -1
  33. package/types/excalidraw/actions/actionStyles.d.ts +2 -1
  34. package/types/excalidraw/actions/actionToggleGridMode.d.ts +2 -1
  35. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +2 -1
  36. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -1
  37. package/types/excalidraw/actions/actionToggleStats.d.ts +2 -1
  38. package/types/excalidraw/actions/actionToggleViewMode.d.ts +2 -1
  39. package/types/excalidraw/actions/actionToggleZenMode.d.ts +2 -1
  40. package/types/excalidraw/actions/index.d.ts +1 -1
  41. package/types/excalidraw/actions/types.d.ts +1 -1
  42. package/types/excalidraw/appState.d.ts +1 -0
  43. package/types/excalidraw/clipboard.d.ts +64 -1
  44. package/types/excalidraw/components/Actions.d.ts +8 -1
  45. package/types/excalidraw/components/App.d.ts +8 -6
  46. package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -1
  47. package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  48. package/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  49. package/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +2 -1
  50. package/types/excalidraw/components/InlineIcon.d.ts +3 -1
  51. package/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  52. package/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  53. package/types/excalidraw/components/TextField.d.ts +1 -0
  54. package/types/excalidraw/components/icons.d.ts +6 -0
  55. package/types/excalidraw/components/shapes.d.ts +117 -1
  56. package/types/excalidraw/data/blob.d.ts +3 -7
  57. package/types/excalidraw/data/types.d.ts +4 -1
  58. package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  59. package/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  60. package/types/excalidraw/types.d.ts +5 -1
  61. package/types/math/src/segment.d.ts +1 -0
@@ -8,7 +8,7 @@ export declare const actionChangeStrokeColor: {
8
8
  label: string;
9
9
  trackEvent: false;
10
10
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: any, app: AppClassProperties) => any;
11
- PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
11
+ PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
12
12
  } & {
13
13
  keyTest?: undefined;
14
14
  };
@@ -25,7 +25,7 @@ export declare const actionChangeBackgroundColor: {
25
25
  appState: any;
26
26
  captureUpdate: "IMMEDIATELY";
27
27
  };
28
- PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
28
+ PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
29
29
  } & {
30
30
  keyTest?: undefined;
31
31
  };
@@ -106,7 +106,7 @@ export declare const actionChangeFillStyle: {
106
106
  value: import("../types").NormalizedZoomValue;
107
107
  }>;
108
108
  openMenu: "canvas" | "shape" | null;
109
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
109
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
110
110
  openSidebar: {
111
111
  name: string;
112
112
  tab?: string | undefined;
@@ -243,6 +243,7 @@ export declare const actionChangeFillStyle: {
243
243
  lockedMultiSelections: {
244
244
  [groupId: string]: true;
245
245
  };
246
+ stylesPanelMode: "compact" | "full";
246
247
  };
247
248
  captureUpdate: "IMMEDIATELY";
248
249
  };
@@ -327,7 +328,7 @@ export declare const actionChangeStrokeWidth: {
327
328
  value: import("../types").NormalizedZoomValue;
328
329
  }>;
329
330
  openMenu: "canvas" | "shape" | null;
330
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
331
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
331
332
  openSidebar: {
332
333
  name: string;
333
334
  tab?: string | undefined;
@@ -464,10 +465,11 @@ export declare const actionChangeStrokeWidth: {
464
465
  lockedMultiSelections: {
465
466
  [groupId: string]: true;
466
467
  };
468
+ stylesPanelMode: "compact" | "full";
467
469
  };
468
470
  captureUpdate: "IMMEDIATELY";
469
471
  };
470
- PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
472
+ PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
471
473
  } & {
472
474
  keyTest?: undefined;
473
475
  };
@@ -548,7 +550,7 @@ export declare const actionChangeSloppiness: {
548
550
  value: import("../types").NormalizedZoomValue;
549
551
  }>;
550
552
  openMenu: "canvas" | "shape" | null;
551
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
553
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
552
554
  openSidebar: {
553
555
  name: string;
554
556
  tab?: string | undefined;
@@ -685,10 +687,11 @@ export declare const actionChangeSloppiness: {
685
687
  lockedMultiSelections: {
686
688
  [groupId: string]: true;
687
689
  };
690
+ stylesPanelMode: "compact" | "full";
688
691
  };
689
692
  captureUpdate: "IMMEDIATELY";
690
693
  };
691
- PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
694
+ PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
692
695
  } & {
693
696
  keyTest?: undefined;
694
697
  };
@@ -769,7 +772,7 @@ export declare const actionChangeStrokeStyle: {
769
772
  value: import("../types").NormalizedZoomValue;
770
773
  }>;
771
774
  openMenu: "canvas" | "shape" | null;
772
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
775
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
773
776
  openSidebar: {
774
777
  name: string;
775
778
  tab?: string | undefined;
@@ -906,10 +909,11 @@ export declare const actionChangeStrokeStyle: {
906
909
  lockedMultiSelections: {
907
910
  [groupId: string]: true;
908
911
  };
912
+ stylesPanelMode: "compact" | "full";
909
913
  };
910
914
  captureUpdate: "IMMEDIATELY";
911
915
  };
912
- PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
916
+ PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
913
917
  } & {
914
918
  keyTest?: undefined;
915
919
  };
@@ -990,7 +994,7 @@ export declare const actionChangeOpacity: {
990
994
  value: import("../types").NormalizedZoomValue;
991
995
  }>;
992
996
  openMenu: "canvas" | "shape" | null;
993
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
997
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
994
998
  openSidebar: {
995
999
  name: string;
996
1000
  tab?: string | undefined;
@@ -1127,6 +1131,7 @@ export declare const actionChangeOpacity: {
1127
1131
  lockedMultiSelections: {
1128
1132
  [groupId: string]: true;
1129
1133
  };
1134
+ stylesPanelMode: "compact" | "full";
1130
1135
  };
1131
1136
  captureUpdate: "IMMEDIATELY";
1132
1137
  };
@@ -1212,7 +1217,7 @@ export declare const actionChangeFontSize: {
1212
1217
  value: import("../types").NormalizedZoomValue;
1213
1218
  }>;
1214
1219
  openMenu: "canvas" | "shape" | null;
1215
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1220
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1216
1221
  openSidebar: {
1217
1222
  name: string;
1218
1223
  tab?: string | undefined;
@@ -1349,10 +1354,11 @@ export declare const actionChangeFontSize: {
1349
1354
  lockedMultiSelections: {
1350
1355
  [groupId: string]: true;
1351
1356
  };
1357
+ stylesPanelMode: "compact" | "full";
1352
1358
  };
1353
1359
  captureUpdate: "IMMEDIATELY";
1354
1360
  };
1355
- PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
1361
+ PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
1356
1362
  } & {
1357
1363
  keyTest?: undefined;
1358
1364
  };
@@ -1434,7 +1440,7 @@ export declare const actionDecreaseFontSize: {
1434
1440
  value: import("../types").NormalizedZoomValue;
1435
1441
  }>;
1436
1442
  openMenu: "canvas" | "shape" | null;
1437
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1443
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1438
1444
  openSidebar: {
1439
1445
  name: string;
1440
1446
  tab?: string | undefined;
@@ -1571,6 +1577,7 @@ export declare const actionDecreaseFontSize: {
1571
1577
  lockedMultiSelections: {
1572
1578
  [groupId: string]: true;
1573
1579
  };
1580
+ stylesPanelMode: "compact" | "full";
1574
1581
  };
1575
1582
  captureUpdate: "IMMEDIATELY";
1576
1583
  };
@@ -1656,7 +1663,7 @@ export declare const actionIncreaseFontSize: {
1656
1663
  value: import("../types").NormalizedZoomValue;
1657
1664
  }>;
1658
1665
  openMenu: "canvas" | "shape" | null;
1659
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1666
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1660
1667
  openSidebar: {
1661
1668
  name: string;
1662
1669
  tab?: string | undefined;
@@ -1793,6 +1800,7 @@ export declare const actionIncreaseFontSize: {
1793
1800
  lockedMultiSelections: {
1794
1801
  [groupId: string]: true;
1795
1802
  };
1803
+ stylesPanelMode: "compact" | "full";
1796
1804
  };
1797
1805
  captureUpdate: "IMMEDIATELY";
1798
1806
  };
@@ -1808,7 +1816,7 @@ export declare const actionChangeFontFamily: {
1808
1816
  appState: {
1809
1817
  currentItemFontFamily: number;
1810
1818
  currentHoveredFontFamily: number | null;
1811
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1819
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1812
1820
  contextMenu: {
1813
1821
  items: import("../components/ContextMenu").ContextMenuItems;
1814
1822
  top: number;
@@ -2013,6 +2021,7 @@ export declare const actionChangeFontFamily: {
2013
2021
  lockedMultiSelections: {
2014
2022
  [groupId: string]: true;
2015
2023
  };
2024
+ stylesPanelMode: "compact" | "full";
2016
2025
  };
2017
2026
  captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
2018
2027
  } | {
@@ -2020,7 +2029,7 @@ export declare const actionChangeFontFamily: {
2020
2029
  appState: {
2021
2030
  currentItemFontFamily: number;
2022
2031
  currentHoveredFontFamily: number | null;
2023
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2032
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2024
2033
  contextMenu: {
2025
2034
  items: import("../components/ContextMenu").ContextMenuItems;
2026
2035
  top: number;
@@ -2225,10 +2234,11 @@ export declare const actionChangeFontFamily: {
2225
2234
  lockedMultiSelections: {
2226
2235
  [groupId: string]: true;
2227
2236
  };
2237
+ stylesPanelMode: "compact" | "full";
2228
2238
  };
2229
2239
  captureUpdate: "NEVER";
2230
2240
  };
2231
- PanelComponent: ({ elements, appState, app, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
2241
+ PanelComponent: ({ elements, appState, app, updateData, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
2232
2242
  } & {
2233
2243
  keyTest?: undefined;
2234
2244
  };
@@ -2309,7 +2319,7 @@ export declare const actionChangeTextAlign: {
2309
2319
  value: import("../types").NormalizedZoomValue;
2310
2320
  }>;
2311
2321
  openMenu: "canvas" | "shape" | null;
2312
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2322
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2313
2323
  openSidebar: {
2314
2324
  name: string;
2315
2325
  tab?: string | undefined;
@@ -2446,10 +2456,11 @@ export declare const actionChangeTextAlign: {
2446
2456
  lockedMultiSelections: {
2447
2457
  [groupId: string]: true;
2448
2458
  };
2459
+ stylesPanelMode: "compact" | "full";
2449
2460
  };
2450
2461
  captureUpdate: "IMMEDIATELY";
2451
2462
  };
2452
- PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
2463
+ PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
2453
2464
  } & {
2454
2465
  keyTest?: undefined;
2455
2466
  };
@@ -2532,7 +2543,7 @@ export declare const actionChangeVerticalAlign: {
2532
2543
  value: import("../types").NormalizedZoomValue;
2533
2544
  }>;
2534
2545
  openMenu: "canvas" | "shape" | null;
2535
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2546
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2536
2547
  openSidebar: {
2537
2548
  name: string;
2538
2549
  tab?: string | undefined;
@@ -2669,10 +2680,11 @@ export declare const actionChangeVerticalAlign: {
2669
2680
  lockedMultiSelections: {
2670
2681
  [groupId: string]: true;
2671
2682
  };
2683
+ stylesPanelMode: "compact" | "full";
2672
2684
  };
2673
2685
  captureUpdate: "IMMEDIATELY";
2674
2686
  };
2675
- PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
2687
+ PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
2676
2688
  } & {
2677
2689
  keyTest?: undefined;
2678
2690
  };
@@ -2753,7 +2765,7 @@ export declare const actionChangeRoundness: {
2753
2765
  value: import("../types").NormalizedZoomValue;
2754
2766
  }>;
2755
2767
  openMenu: "canvas" | "shape" | null;
2756
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2768
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2757
2769
  openSidebar: {
2758
2770
  name: string;
2759
2771
  tab?: string | undefined;
@@ -2890,6 +2902,7 @@ export declare const actionChangeRoundness: {
2890
2902
  lockedMultiSelections: {
2891
2903
  [groupId: string]: true;
2892
2904
  };
2905
+ stylesPanelMode: "compact" | "full";
2893
2906
  };
2894
2907
  captureUpdate: "IMMEDIATELY";
2895
2908
  };
@@ -2977,7 +2990,7 @@ export declare const actionChangeArrowhead: {
2977
2990
  value: import("../types").NormalizedZoomValue;
2978
2991
  }>;
2979
2992
  openMenu: "canvas" | "shape" | null;
2980
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2993
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2981
2994
  openSidebar: {
2982
2995
  name: string;
2983
2996
  tab?: string | undefined;
@@ -3114,6 +3127,7 @@ export declare const actionChangeArrowhead: {
3114
3127
  lockedMultiSelections: {
3115
3128
  [groupId: string]: true;
3116
3129
  };
3130
+ stylesPanelMode: "compact" | "full";
3117
3131
  };
3118
3132
  captureUpdate: "IMMEDIATELY";
3119
3133
  };
@@ -3121,6 +3135,15 @@ export declare const actionChangeArrowhead: {
3121
3135
  } & {
3122
3136
  keyTest?: undefined;
3123
3137
  };
3138
+ export declare const actionChangeArrowProperties: {
3139
+ name: "changeArrowProperties";
3140
+ label: string;
3141
+ trackEvent: false;
3142
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: any, app: AppClassProperties) => false;
3143
+ PanelComponent: ({ elements, appState, updateData, app, renderAction }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
3144
+ } & {
3145
+ keyTest?: undefined;
3146
+ };
3124
3147
  export declare const actionChangeArrowType: {
3125
3148
  name: "changeArrowType";
3126
3149
  label: string;
@@ -3198,7 +3221,7 @@ export declare const actionChangeArrowType: {
3198
3221
  value: import("../types").NormalizedZoomValue;
3199
3222
  }>;
3200
3223
  openMenu: "canvas" | "shape" | null;
3201
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
3224
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
3202
3225
  openSidebar: {
3203
3226
  name: string;
3204
3227
  tab?: string | undefined;
@@ -3335,6 +3358,7 @@ export declare const actionChangeArrowType: {
3335
3358
  lockedMultiSelections: {
3336
3359
  [groupId: string]: true;
3337
3360
  };
3361
+ stylesPanelMode: "compact" | "full";
3338
3362
  };
3339
3363
  captureUpdate: "IMMEDIATELY";
3340
3364
  };
@@ -3426,7 +3450,7 @@ export declare const actionToggleFrameRole: {
3426
3450
  value: import("../types").NormalizedZoomValue;
3427
3451
  }>;
3428
3452
  openMenu: "canvas" | "shape" | null;
3429
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
3453
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
3430
3454
  openSidebar: {
3431
3455
  name: string;
3432
3456
  tab?: string | undefined;
@@ -3563,6 +3587,7 @@ export declare const actionToggleFrameRole: {
3563
3587
  lockedMultiSelections: {
3564
3588
  [groupId: string]: true;
3565
3589
  };
3590
+ stylesPanelMode: "compact" | "full";
3566
3591
  };
3567
3592
  captureUpdate: "IMMEDIATELY";
3568
3593
  };
@@ -88,7 +88,7 @@ export declare const actionSelectAll: {
88
88
  value: import("../types").NormalizedZoomValue;
89
89
  }>;
90
90
  openMenu: "canvas" | "shape" | null;
91
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
91
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
92
92
  openSidebar: {
93
93
  name: string;
94
94
  tab?: string | undefined;
@@ -217,6 +217,7 @@ export declare const actionSelectAll: {
217
217
  lockedMultiSelections: {
218
218
  [groupId: string]: true;
219
219
  };
220
+ stylesPanelMode: "compact" | "full";
220
221
  };
221
222
  captureUpdate: "IMMEDIATELY";
222
223
  };
@@ -81,7 +81,7 @@ export declare const actionCopyStyles: {
81
81
  value: import("../types").NormalizedZoomValue;
82
82
  }>;
83
83
  openMenu: "canvas" | "shape" | null;
84
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
84
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
85
85
  openSidebar: {
86
86
  name: string;
87
87
  tab?: string | undefined;
@@ -213,6 +213,7 @@ export declare const actionCopyStyles: {
213
213
  lockedMultiSelections: {
214
214
  [groupId: string]: true;
215
215
  };
216
+ stylesPanelMode: "compact" | "full";
216
217
  };
217
218
  captureUpdate: "EVENTUALLY";
218
219
  };
@@ -83,7 +83,7 @@ export declare const actionToggleGridMode: {
83
83
  value: import("../types").NormalizedZoomValue;
84
84
  }>;
85
85
  openMenu: "canvas" | "shape" | null;
86
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
86
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
87
87
  openSidebar: {
88
88
  name: string;
89
89
  tab?: string | undefined;
@@ -218,6 +218,7 @@ export declare const actionToggleGridMode: {
218
218
  lockedMultiSelections: {
219
219
  [groupId: string]: true;
220
220
  };
221
+ stylesPanelMode: "compact" | "full";
221
222
  };
222
223
  captureUpdate: "EVENTUALLY";
223
224
  };
@@ -81,7 +81,7 @@ export declare const actionToggleObjectsSnapMode: {
81
81
  value: import("../types").NormalizedZoomValue;
82
82
  }>;
83
83
  openMenu: "canvas" | "shape" | null;
84
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
84
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
85
85
  openSidebar: {
86
86
  name: string;
87
87
  tab?: string | undefined;
@@ -216,6 +216,7 @@ export declare const actionToggleObjectsSnapMode: {
216
216
  lockedMultiSelections: {
217
217
  [groupId: string]: true;
218
218
  };
219
+ stylesPanelMode: "compact" | "full";
219
220
  };
220
221
  captureUpdate: "EVENTUALLY";
221
222
  };
@@ -87,7 +87,7 @@ export declare const actionToggleSearchMenu: {
87
87
  value: import("../types").NormalizedZoomValue;
88
88
  }>;
89
89
  openMenu: "canvas" | "shape" | null;
90
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
90
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
91
91
  defaultSidebarDockedPreference: boolean;
92
92
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
93
93
  selectedElementIds: Readonly<{
@@ -209,6 +209,7 @@ export declare const actionToggleSearchMenu: {
209
209
  lockedMultiSelections: {
210
210
  [groupId: string]: true;
211
211
  };
212
+ stylesPanelMode: "compact" | "full";
212
213
  };
213
214
  captureUpdate: "EVENTUALLY";
214
215
  };
@@ -83,7 +83,7 @@ export declare const actionToggleStats: {
83
83
  value: import("../types").NormalizedZoomValue;
84
84
  }>;
85
85
  openMenu: "canvas" | "shape" | null;
86
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
86
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
87
87
  openSidebar: {
88
88
  name: string;
89
89
  tab?: string | undefined;
@@ -216,6 +216,7 @@ export declare const actionToggleStats: {
216
216
  lockedMultiSelections: {
217
217
  [groupId: string]: true;
218
218
  };
219
+ stylesPanelMode: "compact" | "full";
219
220
  };
220
221
  captureUpdate: "EVENTUALLY";
221
222
  };
@@ -80,7 +80,7 @@ export declare const actionToggleViewMode: {
80
80
  value: import("../types").NormalizedZoomValue;
81
81
  }>;
82
82
  openMenu: "canvas" | "shape" | null;
83
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
84
84
  openSidebar: {
85
85
  name: string;
86
86
  tab?: string | undefined;
@@ -216,6 +216,7 @@ export declare const actionToggleViewMode: {
216
216
  lockedMultiSelections: {
217
217
  [groupId: string]: true;
218
218
  };
219
+ stylesPanelMode: "compact" | "full";
219
220
  };
220
221
  captureUpdate: "EVENTUALLY";
221
222
  };
@@ -80,7 +80,7 @@ export declare const actionToggleZenMode: {
80
80
  value: import("../types").NormalizedZoomValue;
81
81
  }>;
82
82
  openMenu: "canvas" | "shape" | null;
83
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
84
84
  openSidebar: {
85
85
  name: string;
86
86
  tab?: string | undefined;
@@ -216,6 +216,7 @@ export declare const actionToggleZenMode: {
216
216
  lockedMultiSelections: {
217
217
  [groupId: string]: true;
218
218
  };
219
+ stylesPanelMode: "compact" | "full";
219
220
  };
220
221
  captureUpdate: "EVENTUALLY";
221
222
  };
@@ -2,7 +2,7 @@ export { actionDeleteSelected } from "./actionDeleteSelected";
2
2
  export { actionBringForward, actionBringToFront, actionSendBackward, actionSendToBack, } from "./actionZindex";
3
3
  export { actionSelectAll } from "./actionSelectAll";
4
4
  export { actionDuplicateSelection } from "./actionDuplicateSelection";
5
- export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, } from "./actionProperties";
5
+ export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
6
6
  export { actionChangeViewBackgroundColor, actionClearCanvas, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, zoomToFitElements, } from "./actionCanvas";
7
7
  export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
8
8
  export { actionFinalize } from "./actionFinalize";
@@ -14,7 +14,7 @@ export type ActionResult = {
14
14
  type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, 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" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "toggleFrameRole" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
17
+ export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "toggleFrameRole" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -70,6 +70,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
70
70
  lockedMultiSelections?: {
71
71
  [groupId: string]: true;
72
72
  } | undefined;
73
+ stylesPanelMode?: "compact" | "full" | undefined;
73
74
  };
74
75
  export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
75
76
  viewBackgroundColor?: string | undefined;
@@ -1,5 +1,8 @@
1
1
  import { ALLOWED_PASTE_MIME_TYPES } from "@excalidraw/common";
2
+ import type { ValueOf } from "@excalidraw/common/utility-types";
3
+ import type { IMAGE_MIME_TYPES, STRING_MIME_TYPES } from "@excalidraw/common";
2
4
  import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
5
+ import type { FileSystemHandle } from "./data/filesystem";
3
6
  import type { Spreadsheet } from "./charts";
4
7
  import type { BinaryFiles } from "./types";
5
8
  export type PastedMixedContent = {
@@ -57,10 +60,70 @@ export declare const readSystemClipboard: () => Promise<{
57
60
  "image/avif"?: string | File | undefined;
58
61
  "image/jfif"?: string | File | undefined;
59
62
  }>;
63
+ type AllowedParsedDataTransferItem = {
64
+ type: ValueOf<typeof IMAGE_MIME_TYPES>;
65
+ kind: "file";
66
+ file: File;
67
+ fileHandle: FileSystemHandle | null;
68
+ } | {
69
+ type: ValueOf<typeof STRING_MIME_TYPES>;
70
+ kind: "string";
71
+ value: string;
72
+ };
73
+ type ParsedDataTransferItem = {
74
+ type: string;
75
+ kind: "file";
76
+ file: File;
77
+ fileHandle: FileSystemHandle | null;
78
+ } | {
79
+ type: string;
80
+ kind: "string";
81
+ value: string;
82
+ };
83
+ type ParsedDataTransferItemType<T extends AllowedParsedDataTransferItem["type"]> = AllowedParsedDataTransferItem & {
84
+ type: T;
85
+ };
86
+ export type ParsedDataTransferFile = Extract<AllowedParsedDataTransferItem, {
87
+ kind: "file";
88
+ }>;
89
+ type ParsedDataTranferList = ParsedDataTransferItem[] & {
90
+ /**
91
+ * Only allows filtering by known `string` data types, since `file`
92
+ * types can have multiple items of the same type (e.g. multiple image files)
93
+ * unlike `string` data transfer items.
94
+ */
95
+ findByType: typeof findDataTransferItemType;
96
+ /**
97
+ * Only allows filtering by known `string` data types, since `file`
98
+ * types can have multiple items of the same type (e.g. multiple image files)
99
+ * unlike `string` data transfer items.
100
+ */
101
+ getData: typeof getDataTransferItemData;
102
+ getFiles: typeof getDataTransferFiles;
103
+ };
104
+ declare const findDataTransferItemType: <T extends ValueOf<{
105
+ readonly text: "text/plain";
106
+ readonly html: "text/html";
107
+ readonly json: "application/json";
108
+ readonly excalidraw: "application/vnd.excalidraw+json";
109
+ readonly excalidrawlib: "application/vnd.excalidrawlib+json";
110
+ readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
111
+ }>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<T> | null;
112
+ declare const getDataTransferItemData: <T extends ValueOf<{
113
+ readonly text: "text/plain";
114
+ readonly html: "text/html";
115
+ readonly json: "application/json";
116
+ readonly excalidraw: "application/vnd.excalidraw+json";
117
+ readonly excalidrawlib: "application/vnd.excalidrawlib+json";
118
+ readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
119
+ }>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<ValueOf<typeof STRING_MIME_TYPES>>["value"] | null;
120
+ declare const getDataTransferFiles: (this: ParsedDataTranferList) => ParsedDataTransferFile[];
121
+ export declare const parseDataTransferEvent: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Promise<ParsedDataTranferList>;
60
122
  /**
61
123
  * Attempts to parse clipboard event.
62
124
  */
63
- export declare const parseClipboard: (event: ClipboardEvent, isPlainPaste?: boolean) => Promise<ClipboardData>;
125
+ export declare const parseClipboard: (dataList: ParsedDataTranferList, isPlainPaste?: boolean) => Promise<ClipboardData>;
64
126
  export declare const copyBlobToClipboardAsPng: (blob: Blob | Promise<Blob>) => Promise<void>;
65
127
  export declare const copyTextToSystemClipboard: (text: string | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
128
+ export declare const isClipboardEvent: (event: React.SyntheticEvent | Event) => event is ClipboardEvent;
66
129
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
2
2
  import "./Actions.scss";
3
- import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
3
+ import type { AppClassProperties, AppProps, UIAppState, Zoom, AppState } from "../types";
4
4
  import type { ActionManager } from "../actions/manager";
5
5
  export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
6
6
  export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
@@ -10,6 +10,13 @@ export declare const SelectedShapeActions: ({ appState, elementsMap, renderActio
10
10
  renderAction: ActionManager["renderAction"];
11
11
  app: AppClassProperties;
12
12
  }) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const CompactShapeActions: ({ appState, elementsMap, renderAction, app, setAppState, }: {
14
+ appState: UIAppState;
15
+ elementsMap: NonDeletedElementsMap | NonDeletedSceneElementsMap;
16
+ renderAction: ActionManager["renderAction"];
17
+ app: AppClassProperties;
18
+ setAppState: React.Component<any, AppState>["setState"];
19
+ }) => import("react/jsx-runtime").JSX.Element;
13
20
  export declare const ShapesSwitcher: ({ activeTool, appState, app, UIOptions, }: {
14
21
  activeTool: UIAppState["activeTool"];
15
22
  appState: UIAppState;