@excalidraw/math 0.18.0-9036812b6 → 0.18.0-91c7748

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 (59) hide show
  1. package/dist/dev/index.js +12 -0
  2. package/dist/dev/index.js.map +2 -2
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/src/constants.d.ts +19 -4
  5. package/dist/types/common/src/utils.d.ts +1 -0
  6. package/dist/types/element/src/Scene.d.ts +6 -2
  7. package/dist/types/element/src/bounds.d.ts +1 -1
  8. package/dist/types/element/src/delta.d.ts +6 -3
  9. package/dist/types/element/src/index.d.ts +1 -0
  10. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  11. package/dist/types/element/src/renderElement.d.ts +4 -1
  12. package/dist/types/element/src/store.d.ts +6 -1
  13. package/dist/types/element/src/textElement.d.ts +1 -1
  14. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +6 -3
  15. package/dist/types/excalidraw/actions/actionBoundText.d.ts +4 -2
  16. package/dist/types/excalidraw/actions/actionCanvas.d.ts +29 -15
  17. package/dist/types/excalidraw/actions/actionClipboard.d.ts +12 -6
  18. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +2 -1
  19. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +6 -3
  20. package/dist/types/excalidraw/actions/actionElementLink.d.ts +2 -1
  21. package/dist/types/excalidraw/actions/actionElementLock.d.ts +4 -2
  22. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +2 -1
  23. package/dist/types/excalidraw/actions/actionExport.d.ts +18 -9
  24. package/dist/types/excalidraw/actions/actionFinalize.d.ts +4 -2
  25. package/dist/types/excalidraw/actions/actionFrame.d.ts +8 -4
  26. package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -2
  27. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +3 -2
  28. package/dist/types/excalidraw/actions/actionLink.d.ts +2 -1
  29. package/dist/types/excalidraw/actions/actionMenu.d.ts +6 -3
  30. package/dist/types/excalidraw/actions/actionNavigate.d.ts +4 -2
  31. package/dist/types/excalidraw/actions/actionProperties.d.ts +48 -24
  32. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +2 -1
  33. package/dist/types/excalidraw/actions/actionStyles.d.ts +2 -1
  34. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +2 -1
  35. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +2 -1
  36. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -1
  37. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +2 -1
  38. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +2 -1
  39. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +2 -1
  40. package/dist/types/excalidraw/actions/index.d.ts +1 -1
  41. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  42. package/dist/types/excalidraw/appState.d.ts +1 -0
  43. package/dist/types/excalidraw/clipboard.d.ts +64 -1
  44. package/dist/types/excalidraw/components/Actions.d.ts +8 -1
  45. package/dist/types/excalidraw/components/App.d.ts +11 -8
  46. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -1
  47. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  48. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +2 -1
  49. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  50. package/dist/types/excalidraw/components/icons.d.ts +6 -0
  51. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  52. package/dist/types/excalidraw/data/blob.d.ts +1 -5
  53. package/dist/types/excalidraw/data/restore.d.ts +6 -1
  54. package/dist/types/excalidraw/data/types.d.ts +4 -1
  55. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  56. package/dist/types/excalidraw/index.d.ts +1 -1
  57. package/dist/types/excalidraw/types.d.ts +6 -1
  58. package/dist/types/math/src/segment.d.ts +1 -0
  59. package/package.json +2 -2
@@ -0,0 +1,2 @@
1
+ import type { ExcalidrawElement } from "./types";
2
+ export declare const positionElementsOnGrid: <TElement extends ExcalidrawElement>(elements: TElement[] | TElement[][], centerX: number, centerY: number, padding?: number) => TElement[];
@@ -1,6 +1,7 @@
1
+ import { type GlobalPoint } from "@excalidraw/math";
1
2
  import type { AppState, StaticCanvasAppState, InteractiveCanvasAppState, ElementsPendingErasure, PendingExcalidrawElements } from "@excalidraw/excalidraw/types";
2
3
  import type { StaticCanvasRenderConfig, RenderableElementsMap, InteractiveCanvasRenderConfig } from "@excalidraw/excalidraw/scene/types";
3
- import type { ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawImageElement, ExcalidrawFrameLikeElement, NonDeletedSceneElementsMap } from "./types";
4
+ import type { ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawImageElement, ExcalidrawFrameLikeElement, NonDeletedSceneElementsMap, ElementsMap } from "./types";
4
5
  import type { RoughCanvas } from "roughjs/bin/canvas";
5
6
  export declare const IMAGE_INVERT_FILTER = "invert(100%) hue-rotate(180deg) saturate(1.25)";
6
7
  export declare const getRenderOpacity: (element: ExcalidrawElement, containingFrame: ExcalidrawFrameLikeElement | null, elementsPendingErasure: ElementsPendingErasure, pendingNodes: Readonly<PendingExcalidrawElements> | null, globalAlpha?: number) => number;
@@ -26,3 +27,5 @@ export declare const pathsCache: WeakMap<ExcalidrawFreeDrawElement, Path2D>;
26
27
  export declare function generateFreeDrawShape(element: ExcalidrawFreeDrawElement): Path2D;
27
28
  export declare function getFreeDrawPath2D(element: ExcalidrawFreeDrawElement): Path2D | undefined;
28
29
  export declare function getFreeDrawSvgPath(element: ExcalidrawFreeDrawElement): string;
30
+ export declare function getFreedrawOutlineAsSegments(element: ExcalidrawFreeDrawElement, points: [number, number][], elementsMap: ElementsMap): import("@excalidraw/math").LineSegment<GlobalPoint>[];
31
+ export declare function getFreedrawOutlinePoints(element: ExcalidrawFreeDrawElement): [number, number][];
@@ -169,7 +169,11 @@ export declare class StoreDelta {
169
169
  /**
170
170
  * Parse and load the delta from the remote payload.
171
171
  */
172
- static load({ id, elements: { added, removed, updated }, }: DTO<StoreDelta>): StoreDelta;
172
+ static load({ id, elements: { added, removed, updated }, appState: { delta: appStateDelta }, }: DTO<StoreDelta>): StoreDelta;
173
+ /**
174
+ * Squash the passed deltas into the aggregated delta instance.
175
+ */
176
+ static squash(...deltas: StoreDelta[]): StoreDelta;
173
177
  /**
174
178
  * Inverse store delta, creates new instance of `StoreDelta`.
175
179
  */
@@ -182,6 +186,7 @@ export declare class StoreDelta {
182
186
  * Apply latest (remote) changes to the delta, creates new instance of `StoreDelta`.
183
187
  */
184
188
  static applyLatestChanges(delta: StoreDelta, prevElements: SceneElementsMap, nextElements: SceneElementsMap, modifierOptions?: "deleted" | "inserted"): StoreDelta;
189
+ static empty(): StoreDelta;
185
190
  isEmpty(): boolean;
186
191
  }
187
192
  /**
@@ -1,6 +1,6 @@
1
+ import { type Radians } from "@excalidraw/math";
1
2
  import type { AppState } from "@excalidraw/excalidraw/types";
2
3
  import type { ExtractSetType } from "@excalidraw/common/utility-types";
3
- import type { Radians } from "@excalidraw/math";
4
4
  import type { Scene } from "./Scene";
5
5
  import type { MaybeTransformHandleType } from "./transformHandles";
6
6
  import type { ElementsMap, ExcalidrawElement, ExcalidrawElementType, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeletedExcalidrawElement } from "./types";
@@ -77,7 +77,7 @@ export declare const actionAddToLibrary: {
77
77
  value: import("../types").NormalizedZoomValue;
78
78
  }>;
79
79
  openMenu: "canvas" | "shape" | null;
80
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
80
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
81
81
  openSidebar: {
82
82
  name: string;
83
83
  tab?: string | undefined;
@@ -173,6 +173,7 @@ export declare const actionAddToLibrary: {
173
173
  lockedMultiSelections: {
174
174
  [groupId: string]: true;
175
175
  };
176
+ stylesPanelMode: "compact" | "full";
176
177
  };
177
178
  } | {
178
179
  captureUpdate: "EVENTUALLY";
@@ -244,7 +245,7 @@ export declare const actionAddToLibrary: {
244
245
  value: import("../types").NormalizedZoomValue;
245
246
  }>;
246
247
  openMenu: "canvas" | "shape" | null;
247
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
248
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
248
249
  openSidebar: {
249
250
  name: string;
250
251
  tab?: string | undefined;
@@ -345,6 +346,7 @@ export declare const actionAddToLibrary: {
345
346
  lockedMultiSelections: {
346
347
  [groupId: string]: true;
347
348
  };
349
+ stylesPanelMode: "compact" | "full";
348
350
  };
349
351
  }> | {
350
352
  captureUpdate: "EVENTUALLY";
@@ -416,7 +418,7 @@ export declare const actionAddToLibrary: {
416
418
  value: import("../types").NormalizedZoomValue;
417
419
  }>;
418
420
  openMenu: "canvas" | "shape" | null;
419
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
421
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
420
422
  openSidebar: {
421
423
  name: string;
422
424
  tab?: string | undefined;
@@ -517,6 +519,7 @@ export declare const actionAddToLibrary: {
517
519
  lockedMultiSelections: {
518
520
  [groupId: string]: true;
519
521
  };
522
+ stylesPanelMode: "compact" | "full";
520
523
  };
521
524
  };
522
525
  label: string;
@@ -97,7 +97,7 @@ export declare const actionBindText: {
97
97
  value: import("../types").NormalizedZoomValue;
98
98
  }>;
99
99
  openMenu: "canvas" | "shape" | null;
100
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
100
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
101
101
  openSidebar: {
102
102
  name: string;
103
103
  tab?: string | undefined;
@@ -195,6 +195,7 @@ export declare const actionBindText: {
195
195
  lockedMultiSelections: {
196
196
  [groupId: string]: true;
197
197
  };
198
+ stylesPanelMode: "compact" | "full";
198
199
  };
199
200
  captureUpdate: "IMMEDIATELY";
200
201
  };
@@ -281,7 +282,7 @@ export declare const actionWrapTextInContainer: {
281
282
  value: import("../types").NormalizedZoomValue;
282
283
  }>;
283
284
  openMenu: "canvas" | "shape" | null;
284
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
285
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
285
286
  openSidebar: {
286
287
  name: string;
287
288
  tab?: string | undefined;
@@ -379,6 +380,7 @@ export declare const actionWrapTextInContainer: {
379
380
  lockedMultiSelections: {
380
381
  [groupId: string]: true;
381
382
  };
383
+ stylesPanelMode: "compact" | "full";
382
384
  };
383
385
  captureUpdate: "IMMEDIATELY";
384
386
  };
@@ -11,7 +11,7 @@ export declare const actionChangeViewBackgroundColor: {
11
11
  appState: any;
12
12
  captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
13
13
  };
14
- PanelComponent: ({ elements, appState, updateData, appProps }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
14
+ PanelComponent: ({ elements, appState, updateData, appProps, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
15
15
  } & {
16
16
  keyTest?: undefined;
17
17
  };
@@ -158,7 +158,7 @@ export declare const actionClearCanvas: {
158
158
  scrolledOutside: boolean;
159
159
  isResizing: boolean;
160
160
  openMenu: "canvas" | "shape" | null;
161
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
161
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
162
162
  openSidebar: {
163
163
  name: string;
164
164
  tab?: string | undefined;
@@ -191,6 +191,7 @@ export declare const actionClearCanvas: {
191
191
  lockedMultiSelections: {
192
192
  [groupId: string]: true;
193
193
  };
194
+ stylesPanelMode: "compact" | "full";
194
195
  };
195
196
  captureUpdate: "IMMEDIATELY";
196
197
  };
@@ -275,7 +276,7 @@ export declare const actionZoomIn: {
275
276
  isResizing: boolean;
276
277
  isRotating: boolean;
277
278
  openMenu: "canvas" | "shape" | null;
278
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
279
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
279
280
  openSidebar: {
280
281
  name: string;
281
282
  tab?: string | undefined;
@@ -375,6 +376,7 @@ export declare const actionZoomIn: {
375
376
  lockedMultiSelections: {
376
377
  [groupId: string]: true;
377
378
  };
379
+ stylesPanelMode: "compact" | "full";
378
380
  };
379
381
  captureUpdate: "EVENTUALLY";
380
382
  };
@@ -461,7 +463,7 @@ export declare const actionZoomOut: {
461
463
  isResizing: boolean;
462
464
  isRotating: boolean;
463
465
  openMenu: "canvas" | "shape" | null;
464
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
466
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
465
467
  openSidebar: {
466
468
  name: string;
467
469
  tab?: string | undefined;
@@ -561,6 +563,7 @@ export declare const actionZoomOut: {
561
563
  lockedMultiSelections: {
562
564
  [groupId: string]: true;
563
565
  };
566
+ stylesPanelMode: "compact" | "full";
564
567
  };
565
568
  captureUpdate: "EVENTUALLY";
566
569
  };
@@ -647,7 +650,7 @@ export declare const actionResetZoom: {
647
650
  isResizing: boolean;
648
651
  isRotating: boolean;
649
652
  openMenu: "canvas" | "shape" | null;
650
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
653
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
651
654
  openSidebar: {
652
655
  name: string;
653
656
  tab?: string | undefined;
@@ -747,6 +750,7 @@ export declare const actionResetZoom: {
747
750
  lockedMultiSelections: {
748
751
  [groupId: string]: true;
749
752
  };
753
+ stylesPanelMode: "compact" | "full";
750
754
  };
751
755
  captureUpdate: "EVENTUALLY";
752
756
  };
@@ -839,7 +843,7 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
839
843
  isResizing: boolean;
840
844
  isRotating: boolean;
841
845
  openMenu: "canvas" | "shape" | null;
842
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
846
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
843
847
  openSidebar: {
844
848
  name: string;
845
849
  tab?: string | undefined;
@@ -940,6 +944,7 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
940
944
  lockedMultiSelections: {
941
945
  [groupId: string]: true;
942
946
  };
947
+ stylesPanelMode: "compact" | "full";
943
948
  };
944
949
  captureUpdate: "EVENTUALLY";
945
950
  };
@@ -1027,7 +1032,7 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
1027
1032
  isResizing: boolean;
1028
1033
  isRotating: boolean;
1029
1034
  openMenu: "canvas" | "shape" | null;
1030
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1035
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1031
1036
  openSidebar: {
1032
1037
  name: string;
1033
1038
  tab?: string | undefined;
@@ -1128,6 +1133,7 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
1128
1133
  lockedMultiSelections: {
1129
1134
  [groupId: string]: true;
1130
1135
  };
1136
+ stylesPanelMode: "compact" | "full";
1131
1137
  };
1132
1138
  captureUpdate: "EVENTUALLY";
1133
1139
  };
@@ -1207,7 +1213,7 @@ export declare const actionZoomToFitSelectionInViewport: {
1207
1213
  isResizing: boolean;
1208
1214
  isRotating: boolean;
1209
1215
  openMenu: "canvas" | "shape" | null;
1210
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1216
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1211
1217
  openSidebar: {
1212
1218
  name: string;
1213
1219
  tab?: string | undefined;
@@ -1308,6 +1314,7 @@ export declare const actionZoomToFitSelectionInViewport: {
1308
1314
  lockedMultiSelections: {
1309
1315
  [groupId: string]: true;
1310
1316
  };
1317
+ stylesPanelMode: "compact" | "full";
1311
1318
  };
1312
1319
  captureUpdate: "EVENTUALLY";
1313
1320
  };
@@ -1391,7 +1398,7 @@ export declare const actionZoomToFitSelection: {
1391
1398
  isResizing: boolean;
1392
1399
  isRotating: boolean;
1393
1400
  openMenu: "canvas" | "shape" | null;
1394
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1401
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1395
1402
  openSidebar: {
1396
1403
  name: string;
1397
1404
  tab?: string | undefined;
@@ -1492,6 +1499,7 @@ export declare const actionZoomToFitSelection: {
1492
1499
  lockedMultiSelections: {
1493
1500
  [groupId: string]: true;
1494
1501
  };
1502
+ stylesPanelMode: "compact" | "full";
1495
1503
  };
1496
1504
  captureUpdate: "EVENTUALLY";
1497
1505
  };
@@ -1576,7 +1584,7 @@ export declare const actionZoomToFit: {
1576
1584
  isResizing: boolean;
1577
1585
  isRotating: boolean;
1578
1586
  openMenu: "canvas" | "shape" | null;
1579
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1587
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1580
1588
  openSidebar: {
1581
1589
  name: string;
1582
1590
  tab?: string | undefined;
@@ -1677,6 +1685,7 @@ export declare const actionZoomToFit: {
1677
1685
  lockedMultiSelections: {
1678
1686
  [groupId: string]: true;
1679
1687
  };
1688
+ stylesPanelMode: "compact" | "full";
1680
1689
  };
1681
1690
  captureUpdate: "EVENTUALLY";
1682
1691
  };
@@ -1763,7 +1772,7 @@ export declare const actionToggleTheme: {
1763
1772
  value: import("../types").NormalizedZoomValue;
1764
1773
  }>;
1765
1774
  openMenu: "canvas" | "shape" | null;
1766
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1775
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1767
1776
  openSidebar: {
1768
1777
  name: string;
1769
1778
  tab?: string | undefined;
@@ -1863,6 +1872,7 @@ export declare const actionToggleTheme: {
1863
1872
  lockedMultiSelections: {
1864
1873
  [groupId: string]: true;
1865
1874
  };
1875
+ stylesPanelMode: "compact" | "full";
1866
1876
  };
1867
1877
  captureUpdate: "EVENTUALLY";
1868
1878
  };
@@ -1877,7 +1887,7 @@ export declare const actionToggleEraserTool: {
1877
1887
  trackEvent: {
1878
1888
  category: "toolbar";
1879
1889
  };
1880
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
1890
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
1881
1891
  appState: {
1882
1892
  selectedElementIds: {};
1883
1893
  selectedGroupIds: {};
@@ -1945,7 +1955,7 @@ export declare const actionToggleEraserTool: {
1945
1955
  value: import("../types").NormalizedZoomValue;
1946
1956
  }>;
1947
1957
  openMenu: "canvas" | "shape" | null;
1948
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1958
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1949
1959
  openSidebar: {
1950
1960
  name: string;
1951
1961
  tab?: string | undefined;
@@ -2040,6 +2050,7 @@ export declare const actionToggleEraserTool: {
2040
2050
  lockedMultiSelections: {
2041
2051
  [groupId: string]: true;
2042
2052
  };
2053
+ stylesPanelMode: "compact" | "full";
2043
2054
  };
2044
2055
  captureUpdate: "IMMEDIATELY";
2045
2056
  };
@@ -2054,6 +2065,7 @@ export declare const actionToggleLassoTool: {
2054
2065
  trackEvent: {
2055
2066
  category: "toolbar";
2056
2067
  };
2068
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
2057
2069
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
2058
2070
  appState: {
2059
2071
  selectedElementIds: {};
@@ -2122,7 +2134,7 @@ export declare const actionToggleLassoTool: {
2122
2134
  value: import("../types").NormalizedZoomValue;
2123
2135
  }>;
2124
2136
  openMenu: "canvas" | "shape" | null;
2125
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2137
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2126
2138
  openSidebar: {
2127
2139
  name: string;
2128
2140
  tab?: string | undefined;
@@ -2217,6 +2229,7 @@ export declare const actionToggleLassoTool: {
2217
2229
  lockedMultiSelections: {
2218
2230
  [groupId: string]: true;
2219
2231
  };
2232
+ stylesPanelMode: "compact" | "full";
2220
2233
  };
2221
2234
  captureUpdate: "NEVER";
2222
2235
  };
@@ -2299,7 +2312,7 @@ export declare const actionToggleHandTool: {
2299
2312
  value: import("../types").NormalizedZoomValue;
2300
2313
  }>;
2301
2314
  openMenu: "canvas" | "shape" | null;
2302
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
2315
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2303
2316
  openSidebar: {
2304
2317
  name: string;
2305
2318
  tab?: string | undefined;
@@ -2394,6 +2407,7 @@ export declare const actionToggleHandTool: {
2394
2407
  lockedMultiSelections: {
2395
2408
  [groupId: string]: true;
2396
2409
  };
2410
+ stylesPanelMode: "compact" | "full";
2397
2411
  };
2398
2412
  captureUpdate: "IMMEDIATELY";
2399
2413
  };
@@ -76,7 +76,7 @@ export declare const actionCopy: {
76
76
  value: import("../types").NormalizedZoomValue;
77
77
  }>;
78
78
  openMenu: "canvas" | "shape" | null;
79
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
79
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
80
80
  openSidebar: {
81
81
  name: string;
82
82
  tab?: string | undefined;
@@ -177,6 +177,7 @@ export declare const actionCopy: {
177
177
  lockedMultiSelections: {
178
178
  [groupId: string]: true;
179
179
  };
180
+ stylesPanelMode: "compact" | "full";
180
181
  };
181
182
  } | {
182
183
  captureUpdate: "EVENTUALLY";
@@ -262,7 +263,7 @@ export declare const actionPaste: {
262
263
  value: import("../types").NormalizedZoomValue;
263
264
  }>;
264
265
  openMenu: "canvas" | "shape" | null;
265
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
266
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
266
267
  openSidebar: {
267
268
  name: string;
268
269
  tab?: string | undefined;
@@ -363,6 +364,7 @@ export declare const actionPaste: {
363
364
  lockedMultiSelections: {
364
365
  [groupId: string]: true;
365
366
  };
367
+ stylesPanelMode: "compact" | "full";
366
368
  };
367
369
  } | {
368
370
  captureUpdate: "EVENTUALLY";
@@ -450,7 +452,7 @@ export declare const actionCut: {
450
452
  value: import("../types").NormalizedZoomValue;
451
453
  }>;
452
454
  openMenu: "canvas" | "shape" | null;
453
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
455
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
454
456
  openSidebar: {
455
457
  name: string;
456
458
  tab?: string | undefined;
@@ -550,6 +552,7 @@ export declare const actionCut: {
550
552
  lockedMultiSelections: {
551
553
  [groupId: string]: true;
552
554
  };
555
+ stylesPanelMode: "compact" | "full";
553
556
  };
554
557
  captureUpdate: "IMMEDIATELY";
555
558
  } | {
@@ -655,7 +658,7 @@ export declare const actionCut: {
655
658
  value: import("../types").NormalizedZoomValue;
656
659
  }>;
657
660
  openMenu: "canvas" | "shape" | null;
658
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
661
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
659
662
  openSidebar: {
660
663
  name: string;
661
664
  tab?: string | undefined;
@@ -755,6 +758,7 @@ export declare const actionCut: {
755
758
  lockedMultiSelections: {
756
759
  [groupId: string]: true;
757
760
  };
761
+ stylesPanelMode: "compact" | "full";
758
762
  };
759
763
  captureUpdate: "IMMEDIATELY";
760
764
  } | {
@@ -832,7 +836,7 @@ export declare const actionCut: {
832
836
  value: import("../types").NormalizedZoomValue;
833
837
  }>;
834
838
  openMenu: "canvas" | "shape" | null;
835
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
839
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
836
840
  openSidebar: {
837
841
  name: string;
838
842
  tab?: string | undefined;
@@ -925,6 +929,7 @@ export declare const actionCut: {
925
929
  lockedMultiSelections: {
926
930
  [groupId: string]: true;
927
931
  };
932
+ stylesPanelMode: "compact" | "full";
928
933
  };
929
934
  captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
930
935
  };
@@ -1041,7 +1046,7 @@ export declare const actionCopyAsPng: {
1041
1046
  value: import("../types").NormalizedZoomValue;
1042
1047
  }>;
1043
1048
  openMenu: "canvas" | "shape" | null;
1044
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1049
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1045
1050
  openSidebar: {
1046
1051
  name: string;
1047
1052
  tab?: string | undefined;
@@ -1142,6 +1147,7 @@ export declare const actionCopyAsPng: {
1142
1147
  lockedMultiSelections: {
1143
1148
  [groupId: string]: true;
1144
1149
  };
1150
+ stylesPanelMode: "compact" | "full";
1145
1151
  };
1146
1152
  captureUpdate: "EVENTUALLY";
1147
1153
  }>;
@@ -79,7 +79,7 @@ export declare const actionToggleCropEditor: {
79
79
  value: import("../types").NormalizedZoomValue;
80
80
  }>;
81
81
  openMenu: "canvas" | "shape" | null;
82
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
82
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
83
83
  openSidebar: {
84
84
  name: string;
85
85
  tab?: string | undefined;
@@ -178,6 +178,7 @@ export declare const actionToggleCropEditor: {
178
178
  lockedMultiSelections: {
179
179
  [groupId: string]: true;
180
180
  };
181
+ stylesPanelMode: "compact" | "full";
181
182
  };
182
183
  captureUpdate: "IMMEDIATELY";
183
184
  };
@@ -80,7 +80,7 @@ export declare const actionDeleteSelected: {
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;
@@ -180,6 +180,7 @@ export declare const actionDeleteSelected: {
180
180
  lockedMultiSelections: {
181
181
  [groupId: string]: true;
182
182
  };
183
+ stylesPanelMode: "compact" | "full";
183
184
  };
184
185
  captureUpdate: "IMMEDIATELY";
185
186
  } | {
@@ -285,7 +286,7 @@ export declare const actionDeleteSelected: {
285
286
  value: import("../types").NormalizedZoomValue;
286
287
  }>;
287
288
  openMenu: "canvas" | "shape" | null;
288
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
289
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
289
290
  openSidebar: {
290
291
  name: string;
291
292
  tab?: string | undefined;
@@ -385,6 +386,7 @@ export declare const actionDeleteSelected: {
385
386
  lockedMultiSelections: {
386
387
  [groupId: string]: true;
387
388
  };
389
+ stylesPanelMode: "compact" | "full";
388
390
  };
389
391
  captureUpdate: "IMMEDIATELY";
390
392
  } | {
@@ -462,7 +464,7 @@ export declare const actionDeleteSelected: {
462
464
  value: import("../types").NormalizedZoomValue;
463
465
  }>;
464
466
  openMenu: "canvas" | "shape" | null;
465
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
467
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
466
468
  openSidebar: {
467
469
  name: string;
468
470
  tab?: string | undefined;
@@ -555,6 +557,7 @@ export declare const actionDeleteSelected: {
555
557
  lockedMultiSelections: {
556
558
  [groupId: string]: true;
557
559
  };
560
+ stylesPanelMode: "compact" | "full";
558
561
  };
559
562
  captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
560
563
  };
@@ -108,7 +108,7 @@ export declare const actionLinkToElement: {
108
108
  value: import("../types").NormalizedZoomValue;
109
109
  }>;
110
110
  openMenu: "canvas" | "shape" | null;
111
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
111
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
112
112
  openSidebar: {
113
113
  name: string;
114
114
  tab?: string | undefined;
@@ -198,6 +198,7 @@ export declare const actionLinkToElement: {
198
198
  lockedMultiSelections: {
199
199
  [groupId: string]: true;
200
200
  };
201
+ stylesPanelMode: "compact" | "full";
201
202
  };
202
203
  captureUpdate: "IMMEDIATELY";
203
204
  elements?: undefined;
@@ -90,7 +90,7 @@ export declare const actionToggleElementLock: {
90
90
  value: import("../types").NormalizedZoomValue;
91
91
  }>;
92
92
  openMenu: "canvas" | "shape" | null;
93
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
93
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
94
94
  openSidebar: {
95
95
  name: string;
96
96
  tab?: string | undefined;
@@ -180,6 +180,7 @@ export declare const actionToggleElementLock: {
180
180
  focusedId: string | null;
181
181
  matches: readonly import("../types").SearchMatch[];
182
182
  }> | null;
183
+ stylesPanelMode: "compact" | "full";
183
184
  };
184
185
  captureUpdate: "IMMEDIATELY";
185
186
  };
@@ -273,7 +274,7 @@ export declare const actionUnlockAllElements: {
273
274
  value: import("../types").NormalizedZoomValue;
274
275
  }>;
275
276
  openMenu: "canvas" | "shape" | null;
276
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
277
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
277
278
  openSidebar: {
278
279
  name: string;
279
280
  tab?: string | undefined;
@@ -364,6 +365,7 @@ export declare const actionUnlockAllElements: {
364
365
  focusedId: string | null;
365
366
  matches: readonly import("../types").SearchMatch[];
366
367
  }> | null;
368
+ stylesPanelMode: "compact" | "full";
367
369
  };
368
370
  captureUpdate: "IMMEDIATELY";
369
371
  };
@@ -76,7 +76,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
76
76
  value: import("../types").NormalizedZoomValue;
77
77
  }>;
78
78
  openMenu: "canvas" | "shape" | null;
79
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
79
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
80
80
  openSidebar: {
81
81
  name: string;
82
82
  tab?: string | undefined;
@@ -177,6 +177,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
177
177
  lockedMultiSelections: {
178
178
  [groupId: string]: true;
179
179
  };
180
+ stylesPanelMode: "compact" | "full";
180
181
  };
181
182
  captureUpdate: "EVENTUALLY";
182
183
  };