@excalidraw/excalidraw 0.18.0-508de2f3a → 0.18.0-5fffc47

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 (99) hide show
  1. package/dist/dev/{chunk-BVDPDK7J.js → chunk-CP5DND7P.js} +2 -2
  2. package/dist/dev/{chunk-BVDPDK7J.js.map → chunk-CP5DND7P.js.map} +1 -1
  3. package/dist/dev/{chunk-QF5FRM6O.js → chunk-PWQMCSHA.js} +12 -4
  4. package/dist/dev/chunk-PWQMCSHA.js.map +7 -0
  5. package/dist/dev/{chunk-3JWCK6AW.js → chunk-YMRX7R7U.js} +55 -61
  6. package/dist/dev/chunk-YMRX7R7U.js.map +7 -0
  7. package/dist/dev/data/{image-CNYZRAWA.js → image-L23D26XS.js} +3 -3
  8. package/dist/dev/index.css +965 -584
  9. package/dist/dev/index.css.map +3 -3
  10. package/dist/dev/index.js +4721 -2778
  11. package/dist/dev/index.js.map +4 -4
  12. package/dist/dev/locales/{en-SMAPCEOQ.js → en-V3NQTBPG.js} +2 -2
  13. package/dist/dev/subset-shared.chunk.js +1 -1
  14. package/dist/dev/subset-worker.chunk.js +1 -1
  15. package/dist/prod/{chunk-XRPJNYI4.js → chunk-A66AFZZU.js} +1 -1
  16. package/dist/prod/{chunk-I4UNSFV6.js → chunk-GF46JCB3.js} +2 -2
  17. package/dist/prod/chunk-HT4FKTIQ.js +4 -0
  18. package/dist/prod/data/image-NWF7UX55.js +1 -0
  19. package/dist/prod/index.css +1 -1
  20. package/dist/prod/index.js +18 -18
  21. package/dist/prod/locales/{en-TYY6KWIJ.js → en-LQE6K457.js} +1 -1
  22. package/dist/prod/subset-shared.chunk.js +1 -1
  23. package/dist/prod/subset-worker.chunk.js +1 -1
  24. package/dist/types/common/src/constants.d.ts +23 -4
  25. package/dist/types/common/src/utils.d.ts +3 -0
  26. package/dist/types/element/src/bounds.d.ts +1 -1
  27. package/dist/types/element/src/delta.d.ts +4 -5
  28. package/dist/types/element/src/index.d.ts +1 -0
  29. package/dist/types/element/src/mutateElement.d.ts +0 -1
  30. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  31. package/dist/types/element/src/renderElement.d.ts +4 -1
  32. package/dist/types/element/src/store.d.ts +5 -0
  33. package/dist/types/element/src/textElement.d.ts +1 -1
  34. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +21 -6
  35. package/dist/types/excalidraw/actions/actionBoundText.d.ts +14 -4
  36. package/dist/types/excalidraw/actions/actionCanvas.d.ts +94 -28
  37. package/dist/types/excalidraw/actions/actionClipboard.d.ts +42 -12
  38. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +7 -2
  39. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +21 -6
  40. package/dist/types/excalidraw/actions/actionElementLink.d.ts +7 -2
  41. package/dist/types/excalidraw/actions/actionElementLock.d.ts +14 -4
  42. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +7 -2
  43. package/dist/types/excalidraw/actions/actionExport.d.ts +63 -18
  44. package/dist/types/excalidraw/actions/actionFinalize.d.ts +14 -4
  45. package/dist/types/excalidraw/actions/actionFrame.d.ts +28 -8
  46. package/dist/types/excalidraw/actions/actionGroup.d.ts +14 -4
  47. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +8 -3
  48. package/dist/types/excalidraw/actions/actionLink.d.ts +6 -1
  49. package/dist/types/excalidraw/actions/actionMenu.d.ts +7 -368
  50. package/dist/types/excalidraw/actions/actionNavigate.d.ts +14 -4
  51. package/dist/types/excalidraw/actions/actionProperties.d.ts +122 -38
  52. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +7 -2
  53. package/dist/types/excalidraw/actions/actionStyles.d.ts +7 -2
  54. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +7 -2
  55. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +7 -2
  56. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +7 -2
  57. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +7 -2
  58. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +7 -2
  59. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +7 -2
  60. package/dist/types/excalidraw/actions/index.d.ts +2 -2
  61. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  62. package/dist/types/excalidraw/appState.d.ts +5 -1
  63. package/dist/types/excalidraw/clipboard.d.ts +64 -1
  64. package/dist/types/excalidraw/components/Actions.d.ts +17 -3
  65. package/dist/types/excalidraw/components/App.d.ts +12 -11
  66. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +1 -0
  67. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  68. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  69. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  70. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  71. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -1
  72. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  73. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  74. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  75. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  76. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  77. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  78. package/dist/types/excalidraw/components/MobileToolBar.d.ts +11 -0
  79. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  80. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -2
  81. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  82. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  83. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +4 -2
  84. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
  85. package/dist/types/excalidraw/components/icons.d.ts +5 -0
  86. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  87. package/dist/types/excalidraw/data/blob.d.ts +3 -7
  88. package/dist/types/excalidraw/data/types.d.ts +4 -1
  89. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  90. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  91. package/dist/types/excalidraw/types.d.ts +12 -4
  92. package/dist/types/math/src/segment.d.ts +1 -0
  93. package/package.json +5 -5
  94. package/dist/dev/chunk-3JWCK6AW.js.map +0 -7
  95. package/dist/dev/chunk-QF5FRM6O.js.map +0 -7
  96. package/dist/prod/chunk-2HQY2INW.js +0 -4
  97. package/dist/prod/data/image-DYRE7ZKS.js +0 -1
  98. /package/dist/dev/data/{image-CNYZRAWA.js.map → image-L23D26XS.js.map} +0 -0
  99. /package/dist/dev/locales/{en-SMAPCEOQ.js.map → en-V3NQTBPG.js.map} +0 -0
@@ -1 +1 @@
1
- import{A,B,C,D,E,F,G,H,I,J,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-I4UNSFV6.js";import"../chunk-SRAX5OIU.js";export{f as alerts,e as buttons,l as canvasError,s as clearCanvasDialog,C as colorPicker,A as colors,I as commandPalette,v as confirmDialog,J as default,i as element,b as elementLink,x as encrypted,p as errorDialog,m as errorSplash,g as errors,q as exportDialog,G as fontList,j as headings,r as helpDialog,k as hints,w as imageExportDialog,a as labels,c as library,E as mermaid,D as overwriteConfirm,t as publishDialog,u as publishSuccessDialog,F as quickSearch,o as roomDialog,d as search,n as shareDialog,y as stats,z as toast,h as toolBar,H as userList,B as welcomeScreen};
1
+ import{A,B,C,D,E,F,G,H,I,J,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-GF46JCB3.js";import"../chunk-SRAX5OIU.js";export{f as alerts,e as buttons,l as canvasError,s as clearCanvasDialog,C as colorPicker,A as colors,I as commandPalette,v as confirmDialog,J as default,i as element,b as elementLink,x as encrypted,p as errorDialog,m as errorSplash,g as errors,q as exportDialog,G as fontList,j as headings,r as helpDialog,k as hints,w as imageExportDialog,a as labels,c as library,E as mermaid,D as overwriteConfirm,t as publishDialog,u as publishSuccessDialog,F as quickSearch,o as roomDialog,d as search,n as shareDialog,y as stats,z as toast,h as toolBar,H as userList,B as welcomeScreen};
@@ -1 +1 @@
1
- import{a,b,c,d}from"./chunk-LS7FJGPW.js";import"./chunk-XRPJNYI4.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
1
+ import{a,b,c,d}from"./chunk-LS7FJGPW.js";import"./chunk-A66AFZZU.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
@@ -1 +1 @@
1
- import{a as r,c as t}from"./chunk-LS7FJGPW.js";import"./chunk-XRPJNYI4.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
1
+ import{a as r,c as t}from"./chunk-LS7FJGPW.js";import"./chunk-A66AFZZU.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
@@ -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,7 @@ 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;
361
+ export declare const MOBILE_ACTION_BUTTON_BG: {
362
+ readonly background: "var(--mobile-action-button-bg)";
363
+ };
@@ -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";
@@ -11,7 +11,6 @@ export type ElementUpdate<TElement extends ExcalidrawElement> = Omit<Partial<TEl
11
11
  */
12
12
  export declare const mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, elementsMap: ElementsMap, updates: ElementUpdate<TElement>, options?: {
13
13
  isDragging?: boolean;
14
- force?: boolean;
15
14
  }) => TElement;
16
15
  export declare const newElementWith: <TElement extends ExcalidrawElement>(element: TElement, updates: ElementUpdate<TElement>, force?: boolean) => TElement;
17
16
  /**
@@ -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";
@@ -44,6 +44,10 @@ export declare const actionAddToLibrary: {
44
44
  locked: boolean;
45
45
  fromSelection: boolean;
46
46
  } & import("../types").ActiveTool;
47
+ preferredSelectionTool: {
48
+ type: "selection" | "lasso";
49
+ initialized: boolean;
50
+ };
47
51
  penMode: boolean;
48
52
  penDetected: boolean;
49
53
  exportBackground: boolean;
@@ -76,8 +80,8 @@ export declare const actionAddToLibrary: {
76
80
  zoom: Readonly<{
77
81
  value: import("../types").NormalizedZoomValue;
78
82
  }>;
79
- openMenu: "canvas" | "shape" | null;
80
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
+ openMenu: "canvas" | null;
84
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
81
85
  openSidebar: {
82
86
  name: string;
83
87
  tab?: string | undefined;
@@ -173,6 +177,7 @@ export declare const actionAddToLibrary: {
173
177
  lockedMultiSelections: {
174
178
  [groupId: string]: true;
175
179
  };
180
+ stylesPanelMode: "compact" | "full" | "mobile";
176
181
  };
177
182
  } | {
178
183
  captureUpdate: "EVENTUALLY";
@@ -211,6 +216,10 @@ export declare const actionAddToLibrary: {
211
216
  locked: boolean;
212
217
  fromSelection: boolean;
213
218
  } & import("../types").ActiveTool;
219
+ preferredSelectionTool: {
220
+ type: "selection" | "lasso";
221
+ initialized: boolean;
222
+ };
214
223
  penMode: boolean;
215
224
  penDetected: boolean;
216
225
  exportBackground: boolean;
@@ -243,8 +252,8 @@ export declare const actionAddToLibrary: {
243
252
  zoom: Readonly<{
244
253
  value: import("../types").NormalizedZoomValue;
245
254
  }>;
246
- openMenu: "canvas" | "shape" | null;
247
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
255
+ openMenu: "canvas" | null;
256
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
248
257
  openSidebar: {
249
258
  name: string;
250
259
  tab?: string | undefined;
@@ -345,6 +354,7 @@ export declare const actionAddToLibrary: {
345
354
  lockedMultiSelections: {
346
355
  [groupId: string]: true;
347
356
  };
357
+ stylesPanelMode: "compact" | "full" | "mobile";
348
358
  };
349
359
  }> | {
350
360
  captureUpdate: "EVENTUALLY";
@@ -383,6 +393,10 @@ export declare const actionAddToLibrary: {
383
393
  locked: boolean;
384
394
  fromSelection: boolean;
385
395
  } & import("../types").ActiveTool;
396
+ preferredSelectionTool: {
397
+ type: "selection" | "lasso";
398
+ initialized: boolean;
399
+ };
386
400
  penMode: boolean;
387
401
  penDetected: boolean;
388
402
  exportBackground: boolean;
@@ -415,8 +429,8 @@ export declare const actionAddToLibrary: {
415
429
  zoom: Readonly<{
416
430
  value: import("../types").NormalizedZoomValue;
417
431
  }>;
418
- openMenu: "canvas" | "shape" | null;
419
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
432
+ openMenu: "canvas" | null;
433
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
420
434
  openSidebar: {
421
435
  name: string;
422
436
  tab?: string | undefined;
@@ -517,6 +531,7 @@ export declare const actionAddToLibrary: {
517
531
  lockedMultiSelections: {
518
532
  [groupId: string]: true;
519
533
  };
534
+ stylesPanelMode: "compact" | "full" | "mobile";
520
535
  };
521
536
  };
522
537
  label: string;
@@ -64,6 +64,10 @@ export declare const actionBindText: {
64
64
  locked: boolean;
65
65
  fromSelection: boolean;
66
66
  } & import("../types").ActiveTool;
67
+ preferredSelectionTool: {
68
+ type: "selection" | "lasso";
69
+ initialized: boolean;
70
+ };
67
71
  penMode: boolean;
68
72
  penDetected: boolean;
69
73
  exportBackground: boolean;
@@ -96,8 +100,8 @@ export declare const actionBindText: {
96
100
  zoom: Readonly<{
97
101
  value: import("../types").NormalizedZoomValue;
98
102
  }>;
99
- openMenu: "canvas" | "shape" | null;
100
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
103
+ openMenu: "canvas" | null;
104
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
101
105
  openSidebar: {
102
106
  name: string;
103
107
  tab?: string | undefined;
@@ -195,6 +199,7 @@ export declare const actionBindText: {
195
199
  lockedMultiSelections: {
196
200
  [groupId: string]: true;
197
201
  };
202
+ stylesPanelMode: "compact" | "full" | "mobile";
198
203
  };
199
204
  captureUpdate: "IMMEDIATELY";
200
205
  };
@@ -248,6 +253,10 @@ export declare const actionWrapTextInContainer: {
248
253
  locked: boolean;
249
254
  fromSelection: boolean;
250
255
  } & import("../types").ActiveTool;
256
+ preferredSelectionTool: {
257
+ type: "selection" | "lasso";
258
+ initialized: boolean;
259
+ };
251
260
  penMode: boolean;
252
261
  penDetected: boolean;
253
262
  exportBackground: boolean;
@@ -280,8 +289,8 @@ export declare const actionWrapTextInContainer: {
280
289
  zoom: Readonly<{
281
290
  value: import("../types").NormalizedZoomValue;
282
291
  }>;
283
- openMenu: "canvas" | "shape" | null;
284
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
292
+ openMenu: "canvas" | null;
293
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
285
294
  openSidebar: {
286
295
  name: string;
287
296
  tab?: string | undefined;
@@ -379,6 +388,7 @@ export declare const actionWrapTextInContainer: {
379
388
  lockedMultiSelections: {
380
389
  [groupId: string]: true;
381
390
  };
391
+ stylesPanelMode: "compact" | "full" | "mobile";
382
392
  };
383
393
  captureUpdate: "IMMEDIATELY";
384
394
  };