@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
@@ -11,6 +11,7 @@ export declare const PlusPromoIcon: import("react/jsx-runtime").JSX.Element;
11
11
  export declare const LibraryIcon: import("react/jsx-runtime").JSX.Element;
12
12
  export declare const PlusIcon: import("react/jsx-runtime").JSX.Element;
13
13
  export declare const DotsIcon: import("react/jsx-runtime").JSX.Element;
14
+ export declare const DotsHorizontalIcon: import("react/jsx-runtime").JSX.Element;
14
15
  export declare const PinIcon: import("react/jsx-runtime").JSX.Element;
15
16
  export declare const polygonIcon: import("react/jsx-runtime").JSX.Element;
16
17
  export declare const UnlockedIcon: import("react/jsx-runtime").JSX.Element;
@@ -30,6 +31,7 @@ export declare const LineIcon: import("react/jsx-runtime").JSX.Element;
30
31
  export declare const PenModeIcon: import("react/jsx-runtime").JSX.Element;
31
32
  export declare const FreedrawIcon: import("react/jsx-runtime").JSX.Element;
32
33
  export declare const TextIcon: import("react/jsx-runtime").JSX.Element;
34
+ export declare const TextSizeIcon: import("react/jsx-runtime").JSX.Element;
33
35
  export declare const ImageIcon: import("react/jsx-runtime").JSX.Element;
34
36
  export declare const EraserIcon: import("react/jsx-runtime").JSX.Element;
35
37
  export declare const ZoomInIcon: import("react/jsx-runtime").JSX.Element;
@@ -222,4 +224,7 @@ export declare const collapseUpIcon: import("react/jsx-runtime").JSX.Element;
222
224
  export declare const upIcon: import("react/jsx-runtime").JSX.Element;
223
225
  export declare const cropIcon: import("react/jsx-runtime").JSX.Element;
224
226
  export declare const elementLinkIcon: import("react/jsx-runtime").JSX.Element;
227
+ export declare const resizeIcon: import("react/jsx-runtime").JSX.Element;
228
+ export declare const adjustmentsIcon: import("react/jsx-runtime").JSX.Element;
229
+ export declare const strokeIcon: import("react/jsx-runtime").JSX.Element;
225
230
  export {};
@@ -1,3 +1,4 @@
1
+ import type { AppClassProperties } from "../types";
1
2
  export declare const SHAPES: readonly [{
2
3
  readonly icon: import("react/jsx-runtime").JSX.Element;
3
4
  readonly value: "selection";
@@ -59,4 +60,131 @@ export declare const SHAPES: readonly [{
59
60
  readonly numericKey: "0";
60
61
  readonly fillable: false;
61
62
  }];
62
- export declare const findShapeByKey: (key: string) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | null;
63
+ export declare const getToolbarTools: (app: AppClassProperties) => readonly [{
64
+ readonly icon: import("react/jsx-runtime").JSX.Element;
65
+ readonly value: "selection";
66
+ readonly key: "v";
67
+ readonly numericKey: "1";
68
+ readonly fillable: true;
69
+ }, {
70
+ readonly icon: import("react/jsx-runtime").JSX.Element;
71
+ readonly value: "rectangle";
72
+ readonly key: "r";
73
+ readonly numericKey: "2";
74
+ readonly fillable: true;
75
+ }, {
76
+ readonly icon: import("react/jsx-runtime").JSX.Element;
77
+ readonly value: "diamond";
78
+ readonly key: "d";
79
+ readonly numericKey: "3";
80
+ readonly fillable: true;
81
+ }, {
82
+ readonly icon: import("react/jsx-runtime").JSX.Element;
83
+ readonly value: "ellipse";
84
+ readonly key: "o";
85
+ readonly numericKey: "4";
86
+ readonly fillable: true;
87
+ }, {
88
+ readonly icon: import("react/jsx-runtime").JSX.Element;
89
+ readonly value: "arrow";
90
+ readonly key: "a";
91
+ readonly numericKey: "5";
92
+ readonly fillable: true;
93
+ }, {
94
+ readonly icon: import("react/jsx-runtime").JSX.Element;
95
+ readonly value: "line";
96
+ readonly key: "l";
97
+ readonly numericKey: "6";
98
+ readonly fillable: true;
99
+ }, {
100
+ readonly icon: import("react/jsx-runtime").JSX.Element;
101
+ readonly value: "freedraw";
102
+ readonly key: readonly ["p", "x"];
103
+ readonly numericKey: "7";
104
+ readonly fillable: false;
105
+ }, {
106
+ readonly icon: import("react/jsx-runtime").JSX.Element;
107
+ readonly value: "text";
108
+ readonly key: "t";
109
+ readonly numericKey: "8";
110
+ readonly fillable: false;
111
+ }, {
112
+ readonly icon: import("react/jsx-runtime").JSX.Element;
113
+ readonly value: "image";
114
+ readonly key: null;
115
+ readonly numericKey: "9";
116
+ readonly fillable: false;
117
+ }, {
118
+ readonly icon: import("react/jsx-runtime").JSX.Element;
119
+ readonly value: "eraser";
120
+ readonly key: "e";
121
+ readonly numericKey: "0";
122
+ readonly fillable: false;
123
+ }] | readonly [{
124
+ readonly value: "lasso";
125
+ readonly icon: import("react/jsx-runtime").JSX.Element;
126
+ readonly key: "v";
127
+ readonly numericKey: "1";
128
+ readonly fillable: true;
129
+ }, ...({
130
+ readonly icon: import("react/jsx-runtime").JSX.Element;
131
+ readonly value: "selection";
132
+ readonly key: "v";
133
+ readonly numericKey: "1";
134
+ readonly fillable: true;
135
+ } | {
136
+ readonly icon: import("react/jsx-runtime").JSX.Element;
137
+ readonly value: "rectangle";
138
+ readonly key: "r";
139
+ readonly numericKey: "2";
140
+ readonly fillable: true;
141
+ } | {
142
+ readonly icon: import("react/jsx-runtime").JSX.Element;
143
+ readonly value: "diamond";
144
+ readonly key: "d";
145
+ readonly numericKey: "3";
146
+ readonly fillable: true;
147
+ } | {
148
+ readonly icon: import("react/jsx-runtime").JSX.Element;
149
+ readonly value: "ellipse";
150
+ readonly key: "o";
151
+ readonly numericKey: "4";
152
+ readonly fillable: true;
153
+ } | {
154
+ readonly icon: import("react/jsx-runtime").JSX.Element;
155
+ readonly value: "arrow";
156
+ readonly key: "a";
157
+ readonly numericKey: "5";
158
+ readonly fillable: true;
159
+ } | {
160
+ readonly icon: import("react/jsx-runtime").JSX.Element;
161
+ readonly value: "line";
162
+ readonly key: "l";
163
+ readonly numericKey: "6";
164
+ readonly fillable: true;
165
+ } | {
166
+ readonly icon: import("react/jsx-runtime").JSX.Element;
167
+ readonly value: "freedraw";
168
+ readonly key: readonly ["p", "x"];
169
+ readonly numericKey: "7";
170
+ readonly fillable: false;
171
+ } | {
172
+ readonly icon: import("react/jsx-runtime").JSX.Element;
173
+ readonly value: "text";
174
+ readonly key: "t";
175
+ readonly numericKey: "8";
176
+ readonly fillable: false;
177
+ } | {
178
+ readonly icon: import("react/jsx-runtime").JSX.Element;
179
+ readonly value: "image";
180
+ readonly key: null;
181
+ readonly numericKey: "9";
182
+ readonly fillable: false;
183
+ } | {
184
+ readonly icon: import("react/jsx-runtime").JSX.Element;
185
+ readonly value: "eraser";
186
+ readonly key: "e";
187
+ readonly numericKey: "0";
188
+ readonly fillable: false;
189
+ })[]];
190
+ export declare const findShapeByKey: (key: string, app: AppClassProperties) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "lasso" | "eraser" | null;
@@ -2,7 +2,7 @@ import { IMAGE_MIME_TYPES, MIME_TYPES } from "@excalidraw/common";
2
2
  import type { ValueOf } from "@excalidraw/common/utility-types";
3
3
  import type { ExcalidrawElement, FileId } from "@excalidraw/element/types";
4
4
  import type { AppState, DataURL, LibraryItem } from "../types";
5
- import type { FileSystemHandle } from "./filesystem";
5
+ import type { FileSystemHandle } from "browser-fs-access";
6
6
  import type { ImportedLibraryData } from "./types";
7
7
  export declare const getMimeType: (blob: Blob | string) => string;
8
8
  export declare const getFileHandleType: (handle: FileSystemHandle | null) => string | null;
@@ -40,12 +40,8 @@ export declare const SVGStringToFile: (SVGString: string, filename?: string) =>
40
40
  type: typeof MIME_TYPES.svg;
41
41
  };
42
42
  export declare const ImageURLToFile: (imageUrl: string, filename?: string) => Promise<File | undefined>;
43
- export declare const getFileFromEvent: (event: React.DragEvent<HTMLDivElement>) => Promise<{
44
- file: File | null;
45
- fileHandle: FileSystemHandle | null;
46
- }>;
47
- export declare const getFileHandle: (event: React.DragEvent<HTMLDivElement>) => Promise<FileSystemHandle | null>;
48
- export declare const createFile: (blob: File | Blob | ArrayBuffer, mimeType: ValueOf<typeof MIME_TYPES>, name: string | undefined) => File;
43
+ export declare const getFileHandle: (event: DragEvent | React.DragEvent | DataTransferItem) => Promise<FileSystemHandle | null>;
44
+ export declare const createFile: (blob: File | Blob | ArrayBuffer, mimeType: string, name: string | undefined) => File;
49
45
  /** attempts to detect correct mimeType if none is set, or if an image
50
46
  * has an incorrect extension.
51
47
  * Note: doesn't handle missing .excalidraw/.excalidrawlib extension */
@@ -1,7 +1,7 @@
1
1
  import type { VERSIONS } from "@excalidraw/common";
2
2
  import type { ExcalidrawElement } from "@excalidraw/element/types";
3
3
  import type { cleanAppStateForExport } from "../appState";
4
- import type { AppState, BinaryFiles, LibraryItems, LibraryItems_anyVersion } from "../types";
4
+ import type { AppState, BinaryFiles, LibraryItem, LibraryItems, LibraryItems_anyVersion } from "../types";
5
5
  export interface ExportedDataState {
6
6
  type: string;
7
7
  version: number;
@@ -43,3 +43,6 @@ export interface ImportedLibraryData extends Partial<ExportedLibraryData> {
43
43
  /** @deprecated v1 */
44
44
  library?: LibraryItems;
45
45
  }
46
+ export type ExcalidrawLibraryIds = {
47
+ itemIds: LibraryItem["id"][];
48
+ };
@@ -3,7 +3,7 @@ export type SvgCache = Map<LibraryItem["id"], SVGSVGElement>;
3
3
  export declare const libraryItemSvgsCache: import("jotai/vanilla/atom").PrimitiveAtom<SvgCache> & {
4
4
  init: SvgCache;
5
5
  };
6
- export declare const useLibraryItemSvg: (id: LibraryItem["id"] | null, elements: LibraryItem["elements"] | undefined, svgCache: SvgCache) => SVGSVGElement | undefined;
6
+ export declare const useLibraryItemSvg: (id: LibraryItem["id"] | null, elements: LibraryItem["elements"] | undefined, svgCache: SvgCache, ref: React.RefObject<HTMLDivElement | null>) => SVGSVGElement | undefined;
7
7
  export declare const useLibraryCache: () => {
8
8
  clearLibraryCache: () => void;
9
9
  deleteItemsFromLibraryCache: (items: LibraryItem["id"][]) => void;
@@ -0,0 +1,14 @@
1
+ export type CaretPosition = {
2
+ start: number;
3
+ end: number;
4
+ };
5
+ export declare const saveCaretPosition: () => CaretPosition | null;
6
+ export declare const restoreCaretPosition: (position: CaretPosition | null) => void;
7
+ export declare const withCaretPositionPreservation: (callback: () => void, isCompactMode: boolean, isEditingText: boolean, onPreventClose?: () => void) => void;
8
+ export declare const useTextEditorFocus: () => {
9
+ saveCaretPosition: () => void;
10
+ restoreCaretPosition: () => void;
11
+ clearSavedPosition: () => void;
12
+ hasSavedPosition: boolean;
13
+ };
14
+ export declare const temporarilyDisableTextEditorBlur: (duration?: number) => void;
@@ -1,5 +1,5 @@
1
1
  import type { IMAGE_MIME_TYPES, UserIdleState, throttleRAF, MIME_TYPES } from "@excalidraw/common";
2
- import type { ApplyToOptions, SuggestedBinding } from "@excalidraw/element";
2
+ import type { SuggestedBinding } from "@excalidraw/element";
3
3
  import type { LinearElementEditor } from "@excalidraw/element";
4
4
  import type { MaybeTransformHandleType } from "@excalidraw/element";
5
5
  import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, FileId, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement } from "@excalidraw/element/types";
@@ -221,6 +221,10 @@ export interface AppState {
221
221
  locked: boolean;
222
222
  fromSelection: boolean;
223
223
  } & ActiveTool;
224
+ preferredSelectionTool: {
225
+ type: "selection" | "lasso";
226
+ initialized: boolean;
227
+ };
224
228
  penMode: boolean;
225
229
  penDetected: boolean;
226
230
  exportBackground: boolean;
@@ -251,8 +255,8 @@ export interface AppState {
251
255
  isResizing: boolean;
252
256
  isRotating: boolean;
253
257
  zoom: Zoom;
254
- openMenu: "canvas" | "shape" | null;
255
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | null;
258
+ openMenu: "canvas" | null;
259
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
256
260
  openSidebar: {
257
261
  name: SidebarName;
258
262
  tab?: SidebarTabName;
@@ -351,6 +355,8 @@ export interface AppState {
351
355
  lockedMultiSelections: {
352
356
  [groupId: string]: true;
353
357
  };
358
+ /** properties sidebar mode - determines whether to show compact or complete sidebar */
359
+ stylesPanelMode: "compact" | "full" | "mobile";
354
360
  }
355
361
  export type SearchMatch = {
356
362
  id: string;
@@ -441,6 +447,7 @@ export interface ExcalidrawProps {
441
447
  onDuplicate?: (nextElements: readonly ExcalidrawElement[],
442
448
  /** excludes the duplicated elements */
443
449
  prevElements: readonly ExcalidrawElement[]) => ExcalidrawElement[] | void;
450
+ renderTopLeftUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
444
451
  renderTopRightUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
445
452
  langCode?: Language["code"];
446
453
  viewModeEnabled?: boolean;
@@ -478,7 +485,6 @@ export type SceneData = {
478
485
  collaborators?: Map<SocketId, Collaborator>;
479
486
  captureUpdate?: CaptureUpdateActionType;
480
487
  };
481
- export type ApplyDeltasOptions = Omit<ApplyToOptions, "skipRedraw">;
482
488
  export type ExportOpts = {
483
489
  saveFileToDisk?: boolean;
484
490
  onExportToBackend?: (exportedElements: readonly NonDeletedExcalidrawElement[], appState: UIAppState, files: BinaryFiles) => void;
@@ -558,6 +564,7 @@ export type AppClassProperties = {
558
564
  excalidrawContainerValue: App["excalidrawContainerValue"];
559
565
  onPointerUpEmitter: App["onPointerUpEmitter"];
560
566
  updateEditorAtom: App["updateEditorAtom"];
567
+ onPointerDownEmitter: App["onPointerDownEmitter"];
561
568
  };
562
569
  export type PointerDownState = Readonly<{
563
570
  origin: Readonly<{
@@ -605,6 +612,7 @@ export type PointerDownState = Readonly<{
605
612
  x: number;
606
613
  y: number;
607
614
  };
615
+ blockDragging: boolean;
608
616
  };
609
617
  eventListeners: {
610
618
  onMove: null | ReturnType<typeof throttleRAF>;
@@ -37,3 +37,4 @@ export declare const distanceToLineSegment: <Point extends GlobalPoint | LocalPo
37
37
  * @returns
38
38
  */
39
39
  export declare function lineSegmentIntersectionPoints<Point extends GlobalPoint | LocalPoint>(l: LineSegment<Point>, s: LineSegment<Point>, threshold?: number): Point | null;
40
+ export declare function lineSegmentsDistance<Point extends GlobalPoint | LocalPoint>(s1: LineSegment<Point>, s2: LineSegment<Point>): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@excalidraw/excalidraw",
3
- "version": "0.18.0-508de2f3a",
3
+ "version": "0.18.0-5fffc47",
4
4
  "type": "module",
5
5
  "types": "./dist/types/excalidraw/index.d.ts",
6
6
  "main": "./dist/prod/index.js",
@@ -79,11 +79,11 @@
79
79
  },
80
80
  "dependencies": {
81
81
  "@braintree/sanitize-url": "6.0.2",
82
- "@excalidraw/common": "0.18.0-508de2f3a",
83
- "@excalidraw/element": "0.18.0-508de2f3a",
84
- "@excalidraw/math": "0.18.0-508de2f3a",
82
+ "@excalidraw/common": "0.18.0-5fffc47",
83
+ "@excalidraw/element": "0.18.0-5fffc47",
84
+ "@excalidraw/math": "0.18.0-5fffc47",
85
85
  "@excalidraw/laser-pointer": "1.3.1",
86
- "@excalidraw/mermaid-to-excalidraw": "1.1.2",
86
+ "@excalidraw/mermaid-to-excalidraw": "1.1.3",
87
87
  "@excalidraw/random-username": "1.1.0",
88
88
  "@radix-ui/react-popover": "1.1.6",
89
89
  "@radix-ui/react-tabs": "1.1.3",