@excalidraw/common 0.18.0-4e758db → 0.18.0-4f68076

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 (80) hide show
  1. package/dist/dev/index.js +15 -0
  2. package/dist/dev/index.js.map +2 -2
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/constants.d.ts +10 -0
  5. package/dist/types/common/src/utils.d.ts +5 -0
  6. package/dist/types/element/src/binding.d.ts +13 -7
  7. package/dist/types/element/src/collision.d.ts +14 -5
  8. package/dist/types/element/src/duplicate.d.ts +60 -0
  9. package/dist/types/element/src/index.d.ts +1 -0
  10. package/dist/types/element/src/listMarker.d.ts +34 -0
  11. package/dist/types/element/src/newElement.d.ts +15 -1
  12. package/dist/types/element/src/renderElement.d.ts +21 -4
  13. package/dist/types/element/src/shape.d.ts +15 -1
  14. package/dist/types/element/src/textElement.d.ts +7 -0
  15. package/dist/types/element/src/utils.d.ts +8 -1
  16. package/dist/types/element/src/zindex.d.ts +1 -1
  17. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +30 -3
  18. package/dist/types/excalidraw/actions/actionBoundText.d.ts +20 -2
  19. package/dist/types/excalidraw/actions/actionCanvas.d.ts +77 -14
  20. package/dist/types/excalidraw/actions/actionClipboard.d.ts +20 -2
  21. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +10 -1
  22. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +30 -3
  23. package/dist/types/excalidraw/actions/actionDeselect.d.ts +13 -1
  24. package/dist/types/excalidraw/actions/actionElementLink.d.ts +10 -1
  25. package/dist/types/excalidraw/actions/actionElementLock.d.ts +20 -2
  26. package/dist/types/excalidraw/actions/actionExport.d.ts +21 -3
  27. package/dist/types/excalidraw/actions/actionFrame.d.ts +30 -3
  28. package/dist/types/excalidraw/actions/actionGroup.d.ts +20 -2
  29. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +10 -1
  30. package/dist/types/excalidraw/actions/actionLink.d.ts +10 -1
  31. package/dist/types/excalidraw/actions/actionMenu.d.ts +10 -1
  32. package/dist/types/excalidraw/actions/actionProperties.d.ts +20 -2
  33. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +10 -1
  34. package/dist/types/excalidraw/actions/actionStyles.d.ts +10 -1
  35. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +10 -1
  36. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -1
  37. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +10 -1
  38. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -1
  39. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -1
  40. package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +197 -0
  41. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +10 -1
  42. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -1
  43. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -1
  44. package/dist/types/excalidraw/actions/index.d.ts +1 -0
  45. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  46. package/dist/types/excalidraw/appState.d.ts +5 -3
  47. package/dist/types/excalidraw/components/App.arrowText.d.ts +5 -39
  48. package/dist/types/excalidraw/components/App.clipboard.d.ts +31 -0
  49. package/dist/types/excalidraw/components/App.d.ts +82 -262
  50. package/dist/types/excalidraw/components/App.duplicate.d.ts +101 -0
  51. package/dist/types/excalidraw/components/App.modifiers.d.ts +38 -0
  52. package/dist/types/excalidraw/components/App.pan.d.ts +62 -0
  53. package/dist/types/excalidraw/components/App.selectionTool.d.ts +57 -0
  54. package/dist/types/excalidraw/components/App.text.d.ts +146 -0
  55. package/dist/types/excalidraw/components/App.textTool.d.ts +140 -0
  56. package/dist/types/excalidraw/components/App.viewport.d.ts +41 -1
  57. package/dist/types/excalidraw/components/App.wheel.d.ts +3 -10
  58. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  59. package/dist/types/excalidraw/components/ColorPicker/colorTopPicksDnD.d.ts +11 -0
  60. package/dist/types/excalidraw/components/FileDropOverlay.d.ts +2 -0
  61. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +4 -1
  62. package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
  63. package/dist/types/excalidraw/components/FontPicker/fontTopPicksDnD.d.ts +12 -0
  64. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +6 -2
  65. package/dist/types/excalidraw/components/LibraryUnit.d.ts +7 -2
  66. package/dist/types/excalidraw/components/Tooltip.d.ts +15 -1
  67. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksContextMenu.d.ts +14 -0
  68. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksTip.d.ts +11 -0
  69. package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +58 -0
  70. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -0
  71. package/dist/types/excalidraw/data/blob.d.ts +22 -4
  72. package/dist/types/excalidraw/data/json.d.ts +11 -2
  73. package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
  74. package/dist/types/excalidraw/scene/Renderer.d.ts +14 -1
  75. package/dist/types/excalidraw/scene/types.d.ts +2 -1
  76. package/dist/types/excalidraw/types.d.ts +92 -19
  77. package/dist/types/excalidraw/viewport.d.ts +23 -1
  78. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +12 -1
  79. package/package.json +1 -1
  80. package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +0 -31
@@ -1,9 +1,22 @@
1
1
  import { type GlobalPoint } from "@excalidraw/math";
2
- import type { AppState, StaticCanvasAppState, InteractiveCanvasAppState, ElementsPendingErasure, PendingExcalidrawElements } from "@excalidraw/excalidraw/types";
2
+ import type { AppState, StaticCanvasAppState, InteractiveCanvasAppState, ElementRenderOverrides } from "@excalidraw/excalidraw/types";
3
3
  import type { StaticCanvasRenderConfig, RenderableElementsMap, InteractiveCanvasRenderConfig } from "@excalidraw/excalidraw/scene/types";
4
- import type { ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawImageElement, ExcalidrawFrameLikeElement, NonDeletedSceneElementsMap, ElementsMap } from "./types";
4
+ import type { ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawImageElement, NonDeletedSceneElementsMap, ElementsMap } from "./types";
5
5
  import type { RoughCanvas } from "roughjs/bin/canvas";
6
- export declare const getRenderOpacity: (element: ExcalidrawElement, containingFrame: ExcalidrawFrameLikeElement | null, elementsPendingErasure: ElementsPendingErasure, pendingNodes: Readonly<PendingExcalidrawElements> | null, globalAlpha?: number) => number;
6
+ export type RenderPositionOffset = Readonly<{
7
+ x: number;
8
+ y: number;
9
+ }>;
10
+ /** Bound labels follow their container; a label's own offset is ignored. */
11
+ export declare const getElementRenderOffset: (element: ExcalidrawElement, elementsMap: ElementsMap, overrides: ElementRenderOverrides | undefined) => RenderPositionOffset | undefined;
12
+ export declare const getRenderElementWithPositionOverride: <TElement extends ExcalidrawElement>(element: TElement, positionOffset: RenderPositionOffset) => TElement;
13
+ export type ElementRenderState = Readonly<{
14
+ /** Alpha including frame opacity and pending erasure; selection dimming is separate. */
15
+ opacity: number;
16
+ offset: RenderPositionOffset;
17
+ }>;
18
+ /** Resolve visual state at the drawing boundary, preserving document cache keys. */
19
+ export declare const resolveElementRenderState: (element: ExcalidrawElement, elementsMap: ElementsMap, renderConfig: Pick<StaticCanvasRenderConfig, "elementRenderOverrides" | "elementsPendingErasure" | "pendingFlowchartNodes">, allElementsMap?: ElementsMap) => ElementRenderState;
7
20
  export interface ExcalidrawElementWithCanvas {
8
21
  element: ExcalidrawElement | ExcalidrawTextElement;
9
22
  canvas: HTMLCanvasElement;
@@ -18,5 +31,9 @@ export interface ExcalidrawElementWithCanvas {
18
31
  export declare const DEFAULT_LINK_SIZE = 14;
19
32
  export declare const elementWithCanvasCache: WeakMap<ExcalidrawElement, ExcalidrawElementWithCanvas>;
20
33
  export declare const renderSelectionElement: (element: NonDeletedExcalidrawElement, context: CanvasRenderingContext2D, appState: InteractiveCanvasAppState, selectionColor: InteractiveCanvasRenderConfig["selectionColor"]) => void;
21
- export declare const renderElement: (element: NonDeletedExcalidrawElement, elementsMap: RenderableElementsMap, allElementsMap: NonDeletedSceneElementsMap, rc: RoughCanvas, context: CanvasRenderingContext2D, renderConfig: StaticCanvasRenderConfig, appState: StaticCanvasAppState | InteractiveCanvasAppState) => void;
34
+ export declare const renderElement: (element: NonDeletedExcalidrawElement, elementsMap: RenderableElementsMap, allElementsMap: NonDeletedSceneElementsMap, rc: RoughCanvas, context: CanvasRenderingContext2D, renderConfig: StaticCanvasRenderConfig, appState: StaticCanvasAppState | InteractiveCanvasAppState, renderState?: Readonly<{
35
+ /** Alpha including frame opacity and pending erasure; selection dimming is separate. */
36
+ opacity: number;
37
+ offset: RenderPositionOffset;
38
+ }>) => void;
22
39
  export declare function getFreedrawOutlineAsSegments(element: ExcalidrawFreeDrawElement, points: [number, number][], elementsMap: ElementsMap): import("@excalidraw/math").LineSegment<GlobalPoint>[];
@@ -1,6 +1,6 @@
1
1
  import { type GeometricShape } from "@excalidraw/utils/shape";
2
2
  import { type LocalPoint } from "@excalidraw/math";
3
- import type { GlobalPoint } from "@excalidraw/math";
3
+ import type { GlobalPoint, Polygon } from "@excalidraw/math";
4
4
  import type { AppState, EmbedsValidationStatus } from "@excalidraw/excalidraw/types";
5
5
  import type { ElementShape, ElementShapes } from "@excalidraw/excalidraw/scene/types";
6
6
  import type { ExcalidrawElement, ExcalidrawSelectionElement, ExcalidrawLinearElement, ExcalidrawFreeDrawElement, ElementsMap, ExcalidrawLineElement } from "./types";
@@ -27,6 +27,11 @@ export declare class ShapeCache {
27
27
  } | null) => ((T["type"] extends keyof ElementShapes ? ElementShapes[T["type"]] | undefined : ElementShape | undefined) & {}) | (T["type"] extends keyof ElementShapes ? ElementShapes[T["type"]] : Drawable | null);
28
28
  }
29
29
  export declare const generateRoughOptions: (element: ExcalidrawElement, continuousPath?: boolean, isDarkMode?: boolean) => Options;
30
+ /**
31
+ * Returns the flattened fill contour of a freedraw loop in local, unrotated
32
+ * coordinates, following the rendered fill rather than the stroke outline.
33
+ */
34
+ export declare const getFreedrawFillPolygon: (element: ExcalidrawFreeDrawElement) => Polygon<LocalPoint>;
30
35
  export declare const generateLinearCollisionShape: (element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap) => {
31
36
  op: string;
32
37
  data: number[];
@@ -41,6 +46,15 @@ export declare const toggleLinePolygonState: (element: ExcalidrawLineElement, ne
41
46
  points: ExcalidrawLineElement["points"];
42
47
  } | null;
43
48
  export declare const getFreedrawOutlinePoints: (element: ExcalidrawFreeDrawElement) => [number, number][];
49
+ /**
50
+ * Upper bound on how far a freedraw stroke's ink reaches past its centerline
51
+ * points. Both stroke generators scale the stroke size by at most 1 (easing
52
+ * or pressure), so the size itself bounds the radius, except for
53
+ * perfect-freehand's short strokes: under 3px long, the start cap is drawn
54
+ * around the first point from an outline point of the last one (reaching
55
+ * sqrt(size² + 3²)), and a single point gets a synthetic neighbor 1px away.
56
+ */
57
+ export declare const getFreedrawMaxStrokeRadius: (element: ExcalidrawFreeDrawElement) => number;
44
58
  /**
45
59
  * The streamline-smoothed centerline the freedraw stroke is rendered
46
60
  * around, in element-local coordinates. Boundary-sensitive consumers (e.g.
@@ -29,6 +29,13 @@ export declare const getBoundTextElementPosition: (container: ExcalidrawElement,
29
29
  x: number;
30
30
  y: number;
31
31
  } | undefined;
32
+ /**
33
+ * Returns the text element with its accurate coords. An arrow label's
34
+ * position is derived from the arrow at render time rather than kept in
35
+ * sync on the element itself (see getBoundTextElementPosition), so
36
+ * consumers reading a label's coords directly must go through this helper.
37
+ */
38
+ export declare const getTextElementWithAccuratePosition: <T extends ExcalidrawTextElement>(textElement: T, elementsMap: ElementsMap) => T;
32
39
  export declare const shouldAllowVerticalAlign: (selectedElements: readonly ExcalidrawElement[], elementsMap: ElementsMap) => boolean;
33
40
  export declare const suppportsHorizontalAlign: (selectedElements: readonly ExcalidrawElement[], elementsMap: ElementsMap) => boolean;
34
41
  declare const VALID_CONTAINER_TYPES: Set<string>;
@@ -35,6 +35,13 @@ export declare const isPathALoop: (points: ExcalidrawLinearElement["points"],
35
35
  /** supply if you want the loop detection to account for current zoom */
36
36
  zoomValue?: Zoom["value"]) => boolean;
37
37
  export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
38
- export declare const getSnapOutlineMidPoint: (point: GlobalPoint, element: ExcalidrawBindableElement, elementsMap: ElementsMap, zoom: AppState["zoom"]) => GlobalPoint | undefined;
38
+ export declare const getAllMidpoints: (element: ExcalidrawBindableElement, elementsMap: ElementsMap) => GlobalPoint[];
39
+ export declare const getElbowArrowSnapMidPoint: (point: GlobalPoint, element: ExcalidrawBindableElement, elementsMap: ElementsMap, zoom: AppState["zoom"]) => {
40
+ point: GlobalPoint;
41
+ onAxis: boolean;
42
+ } | undefined;
43
+ export declare const getSnapOutlineMidPoint: (point: GlobalPoint, element: ExcalidrawBindableElement, elementsMap: ElementsMap, zoom: AppState["zoom"], arrow: {
44
+ elbowed: boolean;
45
+ }) => GlobalPoint | undefined;
39
46
  export declare const projectFixedPointOntoDiagonal: (arrow: ExcalidrawArrowElement, point: GlobalPoint, element: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, zoom: AppState["zoom"], isMidpointSnappingEnabled?: boolean) => GlobalPoint | null;
40
47
  export {};
@@ -6,7 +6,7 @@ import type { ExcalidrawArrowElement, ExcalidrawElement, NonDeletedExcalidrawEle
6
6
  * Moves the arrow element above any bindable elements it intersects with or
7
7
  * hovers over.
8
8
  */
9
- export declare const moveArrowAboveBindable: (point: GlobalPoint, arrow: ExcalidrawArrowElement, elements: readonly OrderedExcalidrawElement[], elementsMap: NonDeletedSceneElementsMap, scene: Scene, hit?: NonDeletedExcalidrawElement) => readonly OrderedExcalidrawElement[];
9
+ export declare const moveArrowAboveBindable: (point: GlobalPoint, arrow: ExcalidrawArrowElement, elements: readonly OrderedExcalidrawElement[], elementsMap: NonDeletedSceneElementsMap, scene: Scene, hoveredElement: NonDeletedExcalidrawElement) => readonly OrderedExcalidrawElement[];
10
10
  export declare const moveOneLeft: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
11
11
  export declare const moveOneRight: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
12
12
  export declare const moveAllLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
@@ -29,12 +29,20 @@ export declare const actionAddToLibrary: {
29
29
  boxSelectionMode: import("../types").BoxSelectionMode;
30
30
  bindingPreference: "enabled" | "disabled";
31
31
  isMidpointSnappingEnabled: boolean;
32
+ showHints: boolean;
32
33
  inputDevice: import("../types").InputDevice;
33
34
  suggestedBinding: {
34
35
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
35
36
  midPoint?: import("@excalidraw/math").GlobalPoint;
36
37
  } | null;
37
- hoveredArrowTextAnchor: {
38
+ textToolHover: {
39
+ type: "text";
40
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
41
+ } | {
42
+ type: "container";
43
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
44
+ } | {
45
+ type: "arrow";
38
46
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
39
47
  anchor: "start" | "end" | "label";
40
48
  } | null;
@@ -173,6 +181,7 @@ export declare const actionAddToLibrary: {
173
181
  stickyNoteStroke: readonly string[] | null;
174
182
  stickyNoteBackground: readonly string[] | null;
175
183
  };
184
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
176
185
  };
177
186
  } | {
178
187
  captureUpdate: "EVENTUALLY";
@@ -197,12 +206,20 @@ export declare const actionAddToLibrary: {
197
206
  boxSelectionMode: import("../types").BoxSelectionMode;
198
207
  bindingPreference: "enabled" | "disabled";
199
208
  isMidpointSnappingEnabled: boolean;
209
+ showHints: boolean;
200
210
  inputDevice: import("../types").InputDevice;
201
211
  suggestedBinding: {
202
212
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
203
213
  midPoint?: import("@excalidraw/math").GlobalPoint;
204
214
  } | null;
205
- hoveredArrowTextAnchor: {
215
+ textToolHover: {
216
+ type: "text";
217
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
218
+ } | {
219
+ type: "container";
220
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
221
+ } | {
222
+ type: "arrow";
206
223
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
207
224
  anchor: "start" | "end" | "label";
208
225
  } | null;
@@ -346,6 +363,7 @@ export declare const actionAddToLibrary: {
346
363
  stickyNoteStroke: readonly string[] | null;
347
364
  stickyNoteBackground: readonly string[] | null;
348
365
  };
366
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
349
367
  };
350
368
  }> | {
351
369
  captureUpdate: "EVENTUALLY";
@@ -370,12 +388,20 @@ export declare const actionAddToLibrary: {
370
388
  boxSelectionMode: import("../types").BoxSelectionMode;
371
389
  bindingPreference: "enabled" | "disabled";
372
390
  isMidpointSnappingEnabled: boolean;
391
+ showHints: boolean;
373
392
  inputDevice: import("../types").InputDevice;
374
393
  suggestedBinding: {
375
394
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
376
395
  midPoint?: import("@excalidraw/math").GlobalPoint;
377
396
  } | null;
378
- hoveredArrowTextAnchor: {
397
+ textToolHover: {
398
+ type: "text";
399
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
400
+ } | {
401
+ type: "container";
402
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
403
+ } | {
404
+ type: "arrow";
379
405
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
380
406
  anchor: "start" | "end" | "label";
381
407
  } | null;
@@ -519,6 +545,7 @@ export declare const actionAddToLibrary: {
519
545
  stickyNoteStroke: readonly string[] | null;
520
546
  stickyNoteBackground: readonly string[] | null;
521
547
  };
548
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
522
549
  };
523
550
  };
524
551
  label: string;
@@ -49,12 +49,20 @@ export declare const actionBindText: {
49
49
  boxSelectionMode: import("../types").BoxSelectionMode;
50
50
  bindingPreference: "enabled" | "disabled";
51
51
  isMidpointSnappingEnabled: boolean;
52
+ showHints: boolean;
52
53
  inputDevice: import("../types").InputDevice;
53
54
  suggestedBinding: {
54
55
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
55
56
  midPoint?: import("@excalidraw/math").GlobalPoint;
56
57
  } | null;
57
- hoveredArrowTextAnchor: {
58
+ textToolHover: {
59
+ type: "text";
60
+ elementId: ExcalidrawElement["id"];
61
+ } | {
62
+ type: "container";
63
+ elementId: ExcalidrawElement["id"];
64
+ } | {
65
+ type: "arrow";
58
66
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
59
67
  anchor: "start" | "end" | "label";
60
68
  } | null;
@@ -195,6 +203,7 @@ export declare const actionBindText: {
195
203
  stickyNoteStroke: readonly string[] | null;
196
204
  stickyNoteBackground: readonly string[] | null;
197
205
  };
206
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
198
207
  };
199
208
  captureUpdate: "IMMEDIATELY";
200
209
  };
@@ -234,12 +243,20 @@ export declare const actionWrapTextInContainer: {
234
243
  boxSelectionMode: import("../types").BoxSelectionMode;
235
244
  bindingPreference: "enabled" | "disabled";
236
245
  isMidpointSnappingEnabled: boolean;
246
+ showHints: boolean;
237
247
  inputDevice: import("../types").InputDevice;
238
248
  suggestedBinding: {
239
249
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
240
250
  midPoint?: import("@excalidraw/math").GlobalPoint;
241
251
  } | null;
242
- hoveredArrowTextAnchor: {
252
+ textToolHover: {
253
+ type: "text";
254
+ elementId: ExcalidrawElement["id"];
255
+ } | {
256
+ type: "container";
257
+ elementId: ExcalidrawElement["id"];
258
+ } | {
259
+ type: "arrow";
243
260
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
244
261
  anchor: "start" | "end" | "label";
245
262
  } | null;
@@ -380,6 +397,7 @@ export declare const actionWrapTextInContainer: {
380
397
  stickyNoteStroke: readonly string[] | null;
381
398
  stickyNoteBackground: readonly string[] | null;
382
399
  };
400
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
383
401
  };
384
402
  captureUpdate: "IMMEDIATELY";
385
403
  };
@@ -33,11 +33,13 @@ export declare const actionClearCanvas: {
33
33
  stickyNoteStroke: readonly string[] | null;
34
34
  stickyNoteBackground: readonly string[] | null;
35
35
  };
36
+ fontTopPicks: readonly number[] | null;
36
37
  activeTool: {
37
38
  lastActiveTool: import("../types").ActiveTool | null;
38
39
  locked: boolean;
39
40
  fromSelection: boolean;
40
41
  } & import("../types").ActiveTool;
42
+ zoom: import("../types").Zoom;
41
43
  viewModeEnabled: boolean;
42
44
  zenModeEnabled: boolean;
43
45
  objectsSnapModeEnabled: boolean;
@@ -63,12 +65,20 @@ export declare const actionClearCanvas: {
63
65
  boxSelectionMode: import("../types").BoxSelectionMode;
64
66
  bindingPreference: "enabled" | "disabled";
65
67
  isMidpointSnappingEnabled: boolean;
68
+ showHints: boolean;
66
69
  inputDevice: import("../types").InputDevice;
67
70
  suggestedBinding: {
68
71
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
69
72
  midPoint?: import("@excalidraw/math").GlobalPoint;
70
73
  } | null;
71
- hoveredArrowTextAnchor: {
74
+ textToolHover: {
75
+ type: "text";
76
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
77
+ } | {
78
+ type: "container";
79
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
80
+ } | {
81
+ type: "arrow";
72
82
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
73
83
  anchor: "start" | "end" | "label";
74
84
  } | null;
@@ -113,7 +123,6 @@ export declare const actionClearCanvas: {
113
123
  scrolledOutside: boolean;
114
124
  isResizing: boolean;
115
125
  isRotating: boolean;
116
- zoom: import("../types").Zoom;
117
126
  openMenu: "canvas" | null;
118
127
  openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
119
128
  openSidebar: {
@@ -197,9 +206,9 @@ export declare const actionZoomIn: {
197
206
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
198
207
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
199
208
  appState: {
209
+ zoom: import("../types").Zoom;
200
210
  scrollX: number;
201
211
  scrollY: number;
202
- zoom: import("../types").Zoom;
203
212
  contextMenu: {
204
213
  items: import("../components/ContextMenu").ContextMenuItems;
205
214
  top: number;
@@ -220,12 +229,20 @@ export declare const actionZoomIn: {
220
229
  boxSelectionMode: import("../types").BoxSelectionMode;
221
230
  bindingPreference: "enabled" | "disabled";
222
231
  isMidpointSnappingEnabled: boolean;
232
+ showHints: boolean;
223
233
  inputDevice: import("../types").InputDevice;
224
234
  suggestedBinding: {
225
235
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
226
236
  midPoint?: import("@excalidraw/math").GlobalPoint;
227
237
  } | null;
228
- hoveredArrowTextAnchor: {
238
+ textToolHover: {
239
+ type: "text";
240
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
241
+ } | {
242
+ type: "container";
243
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
244
+ } | {
245
+ type: "arrow";
229
246
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
230
247
  anchor: "start" | "end" | "label";
231
248
  } | null;
@@ -366,6 +383,7 @@ export declare const actionZoomIn: {
366
383
  stickyNoteStroke: readonly string[] | null;
367
384
  stickyNoteBackground: readonly string[] | null;
368
385
  };
386
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
369
387
  };
370
388
  captureUpdate: "EVENTUALLY";
371
389
  };
@@ -386,9 +404,9 @@ export declare const actionZoomOut: {
386
404
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
387
405
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
388
406
  appState: {
407
+ zoom: import("../types").Zoom;
389
408
  scrollX: number;
390
409
  scrollY: number;
391
- zoom: import("../types").Zoom;
392
410
  contextMenu: {
393
411
  items: import("../components/ContextMenu").ContextMenuItems;
394
412
  top: number;
@@ -409,12 +427,20 @@ export declare const actionZoomOut: {
409
427
  boxSelectionMode: import("../types").BoxSelectionMode;
410
428
  bindingPreference: "enabled" | "disabled";
411
429
  isMidpointSnappingEnabled: boolean;
430
+ showHints: boolean;
412
431
  inputDevice: import("../types").InputDevice;
413
432
  suggestedBinding: {
414
433
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
415
434
  midPoint?: import("@excalidraw/math").GlobalPoint;
416
435
  } | null;
417
- hoveredArrowTextAnchor: {
436
+ textToolHover: {
437
+ type: "text";
438
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
439
+ } | {
440
+ type: "container";
441
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
442
+ } | {
443
+ type: "arrow";
418
444
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
419
445
  anchor: "start" | "end" | "label";
420
446
  } | null;
@@ -555,6 +581,7 @@ export declare const actionZoomOut: {
555
581
  stickyNoteStroke: readonly string[] | null;
556
582
  stickyNoteBackground: readonly string[] | null;
557
583
  };
584
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
558
585
  };
559
586
  captureUpdate: "EVENTUALLY";
560
587
  };
@@ -575,9 +602,9 @@ export declare const actionResetZoom: {
575
602
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
576
603
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
577
604
  appState: {
605
+ zoom: import("../types").Zoom;
578
606
  scrollX: number;
579
607
  scrollY: number;
580
- zoom: import("../types").Zoom;
581
608
  contextMenu: {
582
609
  items: import("../components/ContextMenu").ContextMenuItems;
583
610
  top: number;
@@ -598,12 +625,20 @@ export declare const actionResetZoom: {
598
625
  boxSelectionMode: import("../types").BoxSelectionMode;
599
626
  bindingPreference: "enabled" | "disabled";
600
627
  isMidpointSnappingEnabled: boolean;
628
+ showHints: boolean;
601
629
  inputDevice: import("../types").InputDevice;
602
630
  suggestedBinding: {
603
631
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
604
632
  midPoint?: import("@excalidraw/math").GlobalPoint;
605
633
  } | null;
606
- hoveredArrowTextAnchor: {
634
+ textToolHover: {
635
+ type: "text";
636
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
637
+ } | {
638
+ type: "container";
639
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
640
+ } | {
641
+ type: "arrow";
607
642
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
608
643
  anchor: "start" | "end" | "label";
609
644
  } | null;
@@ -744,6 +779,7 @@ export declare const actionResetZoom: {
744
779
  stickyNoteStroke: readonly string[] | null;
745
780
  stickyNoteBackground: readonly string[] | null;
746
781
  };
782
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
747
783
  };
748
784
  captureUpdate: "EVENTUALLY";
749
785
  };
@@ -764,9 +800,9 @@ export declare const actionZoomToFitSelectionInViewport: {
764
800
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
765
801
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
766
802
  appState: {
803
+ zoom: import("../types").Zoom;
767
804
  scrollX: number;
768
805
  scrollY: number;
769
- zoom: import("../types").Zoom;
770
806
  contextMenu: {
771
807
  items: import("../components/ContextMenu").ContextMenuItems;
772
808
  top: number;
@@ -787,12 +823,20 @@ export declare const actionZoomToFitSelectionInViewport: {
787
823
  boxSelectionMode: import("../types").BoxSelectionMode;
788
824
  bindingPreference: "enabled" | "disabled";
789
825
  isMidpointSnappingEnabled: boolean;
826
+ showHints: boolean;
790
827
  inputDevice: import("../types").InputDevice;
791
828
  suggestedBinding: {
792
829
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
793
830
  midPoint?: import("@excalidraw/math").GlobalPoint;
794
831
  } | null;
795
- hoveredArrowTextAnchor: {
832
+ textToolHover: {
833
+ type: "text";
834
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
835
+ } | {
836
+ type: "container";
837
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
838
+ } | {
839
+ type: "arrow";
796
840
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
797
841
  anchor: "start" | "end" | "label";
798
842
  } | null;
@@ -933,6 +977,7 @@ export declare const actionZoomToFitSelectionInViewport: {
933
977
  stickyNoteStroke: readonly string[] | null;
934
978
  stickyNoteBackground: readonly string[] | null;
935
979
  };
980
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
936
981
  };
937
982
  captureUpdate: "EVENTUALLY";
938
983
  };
@@ -952,9 +997,9 @@ export declare const actionZoomToFitSelection: {
952
997
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
953
998
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
954
999
  appState: {
1000
+ zoom: import("../types").Zoom;
955
1001
  scrollX: number;
956
1002
  scrollY: number;
957
- zoom: import("../types").Zoom;
958
1003
  contextMenu: {
959
1004
  items: import("../components/ContextMenu").ContextMenuItems;
960
1005
  top: number;
@@ -975,12 +1020,20 @@ export declare const actionZoomToFitSelection: {
975
1020
  boxSelectionMode: import("../types").BoxSelectionMode;
976
1021
  bindingPreference: "enabled" | "disabled";
977
1022
  isMidpointSnappingEnabled: boolean;
1023
+ showHints: boolean;
978
1024
  inputDevice: import("../types").InputDevice;
979
1025
  suggestedBinding: {
980
1026
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
981
1027
  midPoint?: import("@excalidraw/math").GlobalPoint;
982
1028
  } | null;
983
- hoveredArrowTextAnchor: {
1029
+ textToolHover: {
1030
+ type: "text";
1031
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1032
+ } | {
1033
+ type: "container";
1034
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1035
+ } | {
1036
+ type: "arrow";
984
1037
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
985
1038
  anchor: "start" | "end" | "label";
986
1039
  } | null;
@@ -1121,6 +1174,7 @@ export declare const actionZoomToFitSelection: {
1121
1174
  stickyNoteStroke: readonly string[] | null;
1122
1175
  stickyNoteBackground: readonly string[] | null;
1123
1176
  };
1177
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
1124
1178
  };
1125
1179
  captureUpdate: "EVENTUALLY";
1126
1180
  };
@@ -1140,9 +1194,9 @@ export declare const actionZoomToFit: {
1140
1194
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1141
1195
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1142
1196
  appState: {
1197
+ zoom: import("../types").Zoom;
1143
1198
  scrollX: number;
1144
1199
  scrollY: number;
1145
- zoom: import("../types").Zoom;
1146
1200
  contextMenu: {
1147
1201
  items: import("../components/ContextMenu").ContextMenuItems;
1148
1202
  top: number;
@@ -1163,12 +1217,20 @@ export declare const actionZoomToFit: {
1163
1217
  boxSelectionMode: import("../types").BoxSelectionMode;
1164
1218
  bindingPreference: "enabled" | "disabled";
1165
1219
  isMidpointSnappingEnabled: boolean;
1220
+ showHints: boolean;
1166
1221
  inputDevice: import("../types").InputDevice;
1167
1222
  suggestedBinding: {
1168
1223
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1169
1224
  midPoint?: import("@excalidraw/math").GlobalPoint;
1170
1225
  } | null;
1171
- hoveredArrowTextAnchor: {
1226
+ textToolHover: {
1227
+ type: "text";
1228
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1229
+ } | {
1230
+ type: "container";
1231
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1232
+ } | {
1233
+ type: "arrow";
1172
1234
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
1173
1235
  anchor: "start" | "end" | "label";
1174
1236
  } | null;
@@ -1309,6 +1371,7 @@ export declare const actionZoomToFit: {
1309
1371
  stickyNoteStroke: readonly string[] | null;
1310
1372
  stickyNoteBackground: readonly string[] | null;
1311
1373
  };
1374
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
1312
1375
  };
1313
1376
  captureUpdate: "EVENTUALLY";
1314
1377
  };
@@ -30,12 +30,20 @@ export declare const actionPaste: {
30
30
  boxSelectionMode: import("../types").BoxSelectionMode;
31
31
  bindingPreference: "enabled" | "disabled";
32
32
  isMidpointSnappingEnabled: boolean;
33
+ showHints: boolean;
33
34
  inputDevice: import("../types").InputDevice;
34
35
  suggestedBinding: {
35
36
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
36
37
  midPoint?: import("@excalidraw/math").GlobalPoint;
37
38
  } | null;
38
- hoveredArrowTextAnchor: {
39
+ textToolHover: {
40
+ type: "text";
41
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
42
+ } | {
43
+ type: "container";
44
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
45
+ } | {
46
+ type: "arrow";
39
47
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
40
48
  anchor: "start" | "end" | "label";
41
49
  } | null;
@@ -179,6 +187,7 @@ export declare const actionPaste: {
179
187
  stickyNoteStroke: readonly string[] | null;
180
188
  stickyNoteBackground: readonly string[] | null;
181
189
  };
190
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
182
191
  };
183
192
  } | {
184
193
  captureUpdate: "EVENTUALLY";
@@ -253,12 +262,20 @@ export declare const actionCopyAsPng: {
253
262
  boxSelectionMode: import("../types").BoxSelectionMode;
254
263
  bindingPreference: "enabled" | "disabled";
255
264
  isMidpointSnappingEnabled: boolean;
265
+ showHints: boolean;
256
266
  inputDevice: import("../types").InputDevice;
257
267
  suggestedBinding: {
258
268
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
259
269
  midPoint?: import("@excalidraw/math").GlobalPoint;
260
270
  } | null;
261
- hoveredArrowTextAnchor: {
271
+ textToolHover: {
272
+ type: "text";
273
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
274
+ } | {
275
+ type: "container";
276
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
277
+ } | {
278
+ type: "arrow";
262
279
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
263
280
  anchor: "start" | "end" | "label";
264
281
  } | null;
@@ -402,6 +419,7 @@ export declare const actionCopyAsPng: {
402
419
  stickyNoteStroke: readonly string[] | null;
403
420
  stickyNoteBackground: readonly string[] | null;
404
421
  };
422
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
405
423
  };
406
424
  captureUpdate: "EVENTUALLY";
407
425
  }>;
@@ -31,12 +31,20 @@ export declare const actionToggleCropEditor: {
31
31
  boxSelectionMode: import("../types").BoxSelectionMode;
32
32
  bindingPreference: "enabled" | "disabled";
33
33
  isMidpointSnappingEnabled: boolean;
34
+ showHints: boolean;
34
35
  inputDevice: import("../types").InputDevice;
35
36
  suggestedBinding: {
36
37
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
37
38
  midPoint?: import("@excalidraw/math").GlobalPoint;
38
39
  } | null;
39
- hoveredArrowTextAnchor: {
40
+ textToolHover: {
41
+ type: "text";
42
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
43
+ } | {
44
+ type: "container";
45
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
46
+ } | {
47
+ type: "arrow";
40
48
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
41
49
  anchor: "start" | "end" | "label";
42
50
  } | null;
@@ -178,6 +186,7 @@ export declare const actionToggleCropEditor: {
178
186
  stickyNoteStroke: readonly string[] | null;
179
187
  stickyNoteBackground: readonly string[] | null;
180
188
  };
189
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
181
190
  };
182
191
  captureUpdate: "IMMEDIATELY";
183
192
  };