@excalidraw/math 0.18.0-dda3affcb-8fc71066d → 0.18.0-ec07091

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/dev/index.js +58 -61
  2. package/dist/dev/index.js.map +3 -3
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/src/constants.d.ts +20 -4
  5. package/dist/types/common/src/utils.d.ts +3 -0
  6. package/dist/types/element/src/bounds.d.ts +1 -1
  7. package/dist/types/element/src/delta.d.ts +4 -5
  8. package/dist/types/element/src/index.d.ts +1 -0
  9. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  10. package/dist/types/element/src/renderElement.d.ts +4 -1
  11. package/dist/types/element/src/store.d.ts +5 -0
  12. package/dist/types/element/src/textElement.d.ts +1 -1
  13. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +6 -3
  14. package/dist/types/excalidraw/actions/actionBoundText.d.ts +4 -2
  15. package/dist/types/excalidraw/actions/actionCanvas.d.ts +29 -15
  16. package/dist/types/excalidraw/actions/actionClipboard.d.ts +12 -6
  17. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +2 -1
  18. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +6 -3
  19. package/dist/types/excalidraw/actions/actionElementLink.d.ts +2 -1
  20. package/dist/types/excalidraw/actions/actionElementLock.d.ts +4 -2
  21. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +2 -1
  22. package/dist/types/excalidraw/actions/actionExport.d.ts +18 -9
  23. package/dist/types/excalidraw/actions/actionFinalize.d.ts +4 -2
  24. package/dist/types/excalidraw/actions/actionFrame.d.ts +8 -4
  25. package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -2
  26. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +3 -2
  27. package/dist/types/excalidraw/actions/actionLink.d.ts +2 -1
  28. package/dist/types/excalidraw/actions/actionMenu.d.ts +6 -3
  29. package/dist/types/excalidraw/actions/actionNavigate.d.ts +4 -2
  30. package/dist/types/excalidraw/actions/actionProperties.d.ts +48 -24
  31. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +2 -1
  32. package/dist/types/excalidraw/actions/actionStyles.d.ts +2 -1
  33. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +2 -1
  34. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +2 -1
  35. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -1
  36. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +2 -1
  37. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +2 -1
  38. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +2 -1
  39. package/dist/types/excalidraw/actions/index.d.ts +1 -1
  40. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  41. package/dist/types/excalidraw/appState.d.ts +1 -0
  42. package/dist/types/excalidraw/clipboard.d.ts +64 -1
  43. package/dist/types/excalidraw/components/Actions.d.ts +8 -1
  44. package/dist/types/excalidraw/components/App.d.ts +13 -11
  45. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -1
  46. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  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/InlineIcon.d.ts +3 -1
  50. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  51. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  52. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  53. package/dist/types/excalidraw/components/icons.d.ts +6 -0
  54. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  55. package/dist/types/excalidraw/data/blob.d.ts +3 -7
  56. package/dist/types/excalidraw/data/types.d.ts +4 -1
  57. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  58. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  59. package/dist/types/excalidraw/types.d.ts +6 -3
  60. package/dist/types/math/src/segment.d.ts +1 -0
  61. package/package.json +2 -2
@@ -8,6 +8,7 @@ export declare const isChrome: boolean;
8
8
  export declare const isSafari: boolean;
9
9
  export declare const isIOS: boolean;
10
10
  export declare const isBrave: () => boolean;
11
+ export declare const isMobile: boolean;
11
12
  export declare const supportsResizeObserver: boolean;
12
13
  export declare const APP_NAME = "Excalidraw";
13
14
  export declare const TEXT_AUTOWRAP_THRESHOLD = 36;
@@ -86,10 +87,12 @@ export declare const ENV: {
86
87
  PRODUCTION: string;
87
88
  };
88
89
  export declare const CLASSES: {
90
+ SIDEBAR: string;
89
91
  SHAPE_ACTIONS_MENU: string;
90
92
  ZOOM_ACTIONS: string;
91
93
  SEARCH_MENU_INPUT_WRAPPER: string;
92
94
  CONVERT_ELEMENT_TYPE_POPUP: string;
95
+ SHAPE_ACTIONS_THEME_SCOPE: string;
93
96
  };
94
97
  export declare const CJK_HAND_DRAWN_FALLBACK_FONT = "Xiaolai";
95
98
  export declare const WINDOWS_EMOJI_FALLBACK_FONT = "Segoe UI Emoji";
@@ -175,6 +178,14 @@ export declare const IMAGE_MIME_TYPES: {
175
178
  readonly avif: "image/avif";
176
179
  readonly jfif: "image/jfif";
177
180
  };
181
+ export declare const STRING_MIME_TYPES: {
182
+ readonly text: "text/plain";
183
+ readonly html: "text/html";
184
+ readonly json: "application/json";
185
+ readonly excalidraw: "application/vnd.excalidraw+json";
186
+ readonly excalidrawlib: "application/vnd.excalidrawlib+json";
187
+ readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
188
+ };
178
189
  export declare const MIME_TYPES: {
179
190
  readonly svg: "image/svg+xml";
180
191
  readonly png: "image/png";
@@ -185,14 +196,15 @@ export declare const MIME_TYPES: {
185
196
  readonly ico: "image/x-icon";
186
197
  readonly avif: "image/avif";
187
198
  readonly jfif: "image/jfif";
199
+ readonly "excalidraw.svg": "image/svg+xml";
200
+ readonly "excalidraw.png": "image/png";
201
+ readonly binary: "application/octet-stream";
188
202
  readonly text: "text/plain";
189
203
  readonly html: "text/html";
190
204
  readonly json: "application/json";
191
205
  readonly excalidraw: "application/vnd.excalidraw+json";
192
206
  readonly excalidrawlib: "application/vnd.excalidrawlib+json";
193
- readonly "excalidraw.svg": "image/svg+xml";
194
- readonly "excalidraw.png": "image/png";
195
- readonly binary: "application/octet-stream";
207
+ readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
196
208
  };
197
209
  export declare const ALLOWED_PASTE_MIME_TYPES: readonly ["text/plain", "text/html", ...("image/svg+xml" | "image/png" | "image/jpeg" | "image/gif" | "image/webp" | "image/bmp" | "image/x-icon" | "image/avif" | "image/jfif")[]];
198
210
  export declare const EXPORT_IMAGE_TYPES: {
@@ -227,9 +239,12 @@ export declare const URL_HASH_KEYS: {
227
239
  readonly addLibrary: "addLibrary";
228
240
  };
229
241
  export declare const DEFAULT_UI_OPTIONS: AppProps["UIOptions"];
230
- export declare const MQ_MAX_WIDTH_PORTRAIT = 730;
242
+ export declare const MQ_MAX_MOBILE = 599;
231
243
  export declare const MQ_MAX_WIDTH_LANDSCAPE = 1000;
232
244
  export declare const MQ_MAX_HEIGHT_LANDSCAPE = 500;
245
+ export declare const MQ_MIN_TABLET: number;
246
+ export declare const MQ_MAX_TABLET = 1400;
247
+ export declare const MQ_MIN_WIDTH_DESKTOP = 1440;
233
248
  export declare const MQ_RIGHT_SIDEBAR_MIN_WIDTH = 1229;
234
249
  export declare const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
235
250
  export declare const EXPORT_SCALES: number[];
@@ -342,3 +357,4 @@ export declare enum UserIdleState {
342
357
  * the start and end points)
343
358
  */
344
359
  export declare const LINE_POLYGON_POINT_MERGE_DISTANCE = 20;
360
+ export declare const DOUBLE_TAP_POSITION_THRESHOLD = 35;
@@ -17,6 +17,8 @@ export declare const getFontString: ({ fontSize, fontFamily, }: {
17
17
  fontSize: number;
18
18
  fontFamily: FontFamilyValues;
19
19
  }) => FontString;
20
+ /** executes callback in the frame that's after the current one */
21
+ export declare const nextAnimationFrame: (cb: () => any) => Promise<void>;
20
22
  export declare const debounce: <T extends any[]>(fn: (...args: T) => void, timeout: number) => {
21
23
  (...args: T): void;
22
24
  flush(): void;
@@ -264,4 +266,5 @@ export declare const castArray: <T>(value: T | T[]) => T[];
264
266
  export declare const isReadonlyArray: (value?: any) => value is readonly any[];
265
267
  export declare const sizeOf: (value: readonly unknown[] | Readonly<Map<string, unknown>> | Readonly<Record<string, unknown>> | ReadonlySet<unknown>) => number;
266
268
  export declare const reduceToCommonValue: <T, R = T>(collection: ReadonlySet<T> | readonly T[], getValue?: ((item: T) => R) | undefined) => R | null;
269
+ export declare const isMobileOrTablet: () => boolean;
267
270
  export {};
@@ -74,7 +74,7 @@ export interface BoundingBox {
74
74
  width: number;
75
75
  height: number;
76
76
  }
77
- export declare const getCommonBoundingBox: (elements: ExcalidrawElement[] | readonly NonDeleted<ExcalidrawElement>[]) => BoundingBox;
77
+ export declare const getCommonBoundingBox: (elements: readonly ExcalidrawElement[] | readonly NonDeleted<ExcalidrawElement>[]) => BoundingBox;
78
78
  /**
79
79
  * returns scene coords of user's editor viewport (visible canvas area) bounds
80
80
  */
@@ -32,13 +32,13 @@ export declare class Delta<T> {
32
32
  /**
33
33
  * Merges two deltas into a new one.
34
34
  */
35
- static merge<T>(delta1: Delta<T>, delta2: Delta<T>): Delta<T>;
35
+ static merge<T>(delta1: Delta<T>, delta2: Delta<T>, delta3?: Delta<T>): Delta<T>;
36
36
  /**
37
37
  * Merges deleted and inserted object partials.
38
38
  */
39
39
  static mergeObjects<T extends {
40
40
  [key: string]: unknown;
41
- }>(prev: T, added: T, removed: T): T;
41
+ }>(prev: T, added: T, removed?: T): T;
42
42
  /**
43
43
  * Merges deleted and inserted array partials.
44
44
  */
@@ -105,7 +105,7 @@ export interface DeltaContainer<T> {
105
105
  *
106
106
  * @returns a tuple of the next object `T` with applied `Delta`s, and `boolean`, indicating whether the applied deltas resulted in a visible change.
107
107
  */
108
- applyTo(previous: T, ...options: unknown[]): [T, boolean, ...unknown[]];
108
+ applyTo(previous: T, ...options: unknown[]): [T, boolean];
109
109
  /**
110
110
  * Squashes the current delta with the given one.
111
111
  */
@@ -146,7 +146,6 @@ export declare class AppStateDelta implements DeltaContainer<AppState> {
146
146
  type ElementPartial<TElement extends ExcalidrawElement = ExcalidrawElement> = Omit<Partial<Ordered<TElement>>, "id" | "updated" | "seed">;
147
147
  export type ApplyToOptions = {
148
148
  excludedProperties?: Set<keyof ElementPartial>;
149
- skipRedraw?: true;
150
149
  };
151
150
  /**
152
151
  * Elements change is a low level primitive to capture a change between two sets of elements.
@@ -165,6 +164,7 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
165
164
  private static satisfiesRemoval;
166
165
  private static satisfiesUpdate;
167
166
  private static satisfiesCommmonInvariants;
167
+ private static satisfiesUniqueInvariants;
168
168
  private static validate;
169
169
  /**
170
170
  * Calculates the `Delta`s between the previous and next set of elements.
@@ -224,6 +224,5 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
224
224
  */
225
225
  private static postProcess;
226
226
  private static stripIrrelevantProps;
227
- private static stripVersionProps;
228
227
  }
229
228
  export {};
@@ -38,6 +38,7 @@ export * from "./image";
38
38
  export * from "./linearElementEditor";
39
39
  export * from "./mutateElement";
40
40
  export * from "./newElement";
41
+ export * from "./positionElementsOnGrid";
41
42
  export * from "./renderElement";
42
43
  export * from "./resizeElements";
43
44
  export * from "./resizeTest";
@@ -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][];
@@ -170,6 +170,10 @@ export declare class StoreDelta {
170
170
  * Parse and load the delta from the remote payload.
171
171
  */
172
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
  };