@excalidraw/element 0.18.0-063e025 → 0.18.0-1118751

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 (154) hide show
  1. package/dist/dev/index.js +13047 -9808
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +19 -19
  4. package/dist/types/common/src/colors.d.ts +22 -0
  5. package/dist/types/common/src/constants.d.ts +54 -0
  6. package/dist/types/common/src/keys.d.ts +4 -0
  7. package/dist/types/common/src/points.d.ts +1 -1
  8. package/dist/types/common/src/random.d.ts +7 -0
  9. package/dist/types/common/src/utils.d.ts +1 -1
  10. package/dist/types/element/src/Scene.d.ts +1 -1
  11. package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
  12. package/dist/types/element/src/arrows/focus.d.ts +5 -2
  13. package/dist/types/element/src/binding.d.ts +15 -8
  14. package/dist/types/element/src/bucketFill.d.ts +110 -0
  15. package/dist/types/element/src/collision.d.ts +8 -5
  16. package/dist/types/element/src/comparisons.d.ts +7 -5
  17. package/dist/types/element/src/convertToShape.d.ts +23 -0
  18. package/dist/types/element/src/delta.d.ts +23 -1
  19. package/dist/types/element/src/dragElements.d.ts +27 -0
  20. package/dist/types/element/src/duplicate.d.ts +60 -0
  21. package/dist/types/element/src/flowchart.d.ts +10 -6
  22. package/dist/types/element/src/frame.d.ts +2 -2
  23. package/dist/types/element/src/groups.d.ts +1 -1
  24. package/dist/types/element/src/index.d.ts +4 -0
  25. package/dist/types/element/src/linearElementEditor.d.ts +17 -0
  26. package/dist/types/element/src/mutateElement.d.ts +1 -1
  27. package/dist/types/element/src/newElement.d.ts +37 -2
  28. package/dist/types/element/src/renderElement.d.ts +21 -4
  29. package/dist/types/element/src/selection.d.ts +1 -1
  30. package/dist/types/element/src/shape.d.ts +27 -1
  31. package/dist/types/element/src/sizeHelpers.d.ts +6 -0
  32. package/dist/types/element/src/sortElements.d.ts +10 -0
  33. package/dist/types/element/src/stickyNote.d.ts +183 -0
  34. package/dist/types/element/src/textElement.d.ts +7 -3
  35. package/dist/types/element/src/transform.d.ts +25 -6
  36. package/dist/types/element/src/typeChecks.d.ts +3 -2
  37. package/dist/types/element/src/types.d.ts +35 -6
  38. package/dist/types/element/src/utils.d.ts +15 -4
  39. package/dist/types/element/src/zindex.d.ts +1 -1
  40. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +48 -9
  41. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  42. package/dist/types/excalidraw/actions/actionBoundText.d.ts +32 -6
  43. package/dist/types/excalidraw/actions/actionCanvas.d.ts +173 -576
  44. package/dist/types/excalidraw/actions/actionClipboard.d.ts +32 -6
  45. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +16 -3
  46. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +50 -10
  47. package/dist/types/excalidraw/actions/actionDeselect.d.ts +13 -3
  48. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
  49. package/dist/types/excalidraw/actions/actionElementLink.d.ts +16 -3
  50. package/dist/types/excalidraw/actions/actionElementLock.d.ts +32 -6
  51. package/dist/types/excalidraw/actions/actionExport.d.ts +34 -8
  52. package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
  53. package/dist/types/excalidraw/actions/actionFrame.d.ts +99 -185
  54. package/dist/types/excalidraw/actions/actionGroup.d.ts +33 -7
  55. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +68 -4
  56. package/dist/types/excalidraw/actions/actionLink.d.ts +16 -3
  57. package/dist/types/excalidraw/actions/actionMenu.d.ts +16 -3
  58. package/dist/types/excalidraw/actions/actionProperties.d.ts +45 -12
  59. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +16 -3
  60. package/dist/types/excalidraw/actions/actionStyles.d.ts +17 -4
  61. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  62. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +16 -3
  63. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +16 -3
  64. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +16 -3
  65. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +16 -3
  66. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +16 -3
  67. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +16 -3
  68. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +17 -4
  69. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +16 -3
  70. package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
  71. package/dist/types/excalidraw/actions/index.d.ts +1 -2
  72. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  73. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  74. package/dist/types/excalidraw/actions/types.d.ts +5 -1
  75. package/dist/types/excalidraw/appState.d.ts +26 -5
  76. package/dist/types/excalidraw/components/Actions.d.ts +16 -10
  77. package/dist/types/excalidraw/components/App.arrowText.d.ts +104 -0
  78. package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
  79. package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
  80. package/dist/types/excalidraw/components/App.d.ts +468 -99
  81. package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
  82. package/dist/types/excalidraw/components/App.duplicate.d.ts +51 -0
  83. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  84. package/dist/types/excalidraw/components/App.pan.d.ts +54 -0
  85. package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
  86. package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
  87. package/dist/types/excalidraw/components/App.wheel.d.ts +26 -0
  88. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +8 -2
  89. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  90. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +5 -1
  91. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
  92. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
  93. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  94. package/dist/types/excalidraw/components/ColorPicker/colorTopPicksDnD.d.ts +11 -0
  95. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -1
  96. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +4 -1
  97. package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
  98. package/dist/types/excalidraw/components/FontPicker/fontTopPicksDnD.d.ts +12 -0
  99. package/dist/types/excalidraw/components/IconButton.d.ts +48 -0
  100. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  101. package/dist/types/excalidraw/components/LayerUI.d.ts +5 -2
  102. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  103. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  104. package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
  105. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  106. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  107. package/dist/types/excalidraw/components/Popover.d.ts +1 -3
  108. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  109. package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
  110. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  111. package/dist/types/excalidraw/components/Tools.d.ts +151 -0
  112. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksContextMenu.d.ts +14 -0
  113. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksTip.d.ts +11 -0
  114. package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +58 -0
  115. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  116. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  117. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -0
  118. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +2 -0
  119. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  120. package/dist/types/excalidraw/components/icons.d.ts +5 -1
  121. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -1
  122. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  123. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  124. package/dist/types/excalidraw/data/blob.d.ts +36 -10
  125. package/dist/types/excalidraw/data/json.d.ts +18 -5
  126. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  127. package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
  128. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
  129. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  130. package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
  131. package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
  132. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
  133. package/dist/types/excalidraw/scene/Renderer.d.ts +64 -2
  134. package/dist/types/excalidraw/scene/index.d.ts +1 -1
  135. package/dist/types/excalidraw/scene/types.d.ts +6 -1
  136. package/dist/types/excalidraw/types.d.ts +341 -21
  137. package/dist/types/excalidraw/viewport.d.ts +31 -66
  138. package/dist/types/laser-pointer/src/state.d.ts +1 -0
  139. package/dist/types/math/src/curve.d.ts +19 -12
  140. package/dist/types/math/src/index.d.ts +1 -0
  141. package/dist/types/math/src/pca.d.ts +79 -0
  142. package/dist/types/math/src/polygon.d.ts +25 -1
  143. package/dist/types/math/src/segment.d.ts +6 -0
  144. package/dist/types/utils/src/export.d.ts +1 -0
  145. package/dist/types/utils/src/shape.d.ts +2 -2
  146. package/package.json +4 -4
  147. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -173
  148. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  149. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  150. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
  151. package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
  152. package/dist/types/excalidraw/components/shapes.d.ts +0 -270
  153. package/dist/types/excalidraw/cursor.d.ts +0 -5
  154. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
@@ -1,6 +1,12 @@
1
1
  import type { MarkOptional } from "@excalidraw/common/utility-types";
2
2
  import { type ElementConstructorOpts } from "./newElement";
3
- import type { ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFreeDrawElement, ExcalidrawGenericElement, ExcalidrawIframeLikeElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawMagicFrameElement, ExcalidrawSelectionElement, ExcalidrawTextElement, FileId, FontFamilyValues, NonDeletedExcalidrawElement, Ordered, TextAlign, VerticalAlign } from "./types";
3
+ import type { ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFreeDrawElement, ExcalidrawGenericElement, ExcalidrawIframeLikeElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawMagicFrameElement, ExcalidrawSelectionElement, ExcalidrawTextElement, FileId, FontFamilyValues, NonDeletedExcalidrawElement, Ordered, TextAlign, VerticalAlign, ExcalidrawStickyNoteElement } from "./types";
4
+ /**
5
+ * Options for elements generated from a skeleton fragment (bound labels and
6
+ * binding endpoints). Such elements are always constructed fresh, hence they
7
+ * never carry a creation time of their own.
8
+ */
9
+ type FragmentConstructorOpts = MarkOptional<Omit<ElementConstructorOpts, "created">, "x" | "y">;
4
10
  export type ValidLinearElement = {
5
11
  type: "arrow" | "line";
6
12
  x: number;
@@ -11,7 +17,7 @@ export type ValidLinearElement = {
11
17
  fontFamily?: FontFamilyValues;
12
18
  textAlign?: TextAlign;
13
19
  verticalAlign?: VerticalAlign;
14
- } & MarkOptional<ElementConstructorOpts, "x" | "y">;
20
+ } & FragmentConstructorOpts;
15
21
  end?: (({
16
22
  type: Exclude<ExcalidrawBindableElement["type"], "image" | "text" | "frame" | "magicframe" | "embeddable" | "iframe">;
17
23
  id?: ExcalidrawGenericElement["id"];
@@ -25,7 +31,7 @@ export type ValidLinearElement = {
25
31
  type?: "text";
26
32
  id: ExcalidrawTextElement["id"];
27
33
  text: string;
28
- }) & Partial<ExcalidrawTextElement>)) & MarkOptional<ElementConstructorOpts, "x" | "y">;
34
+ }) & Partial<Omit<ExcalidrawTextElement, "created">>)) & FragmentConstructorOpts;
29
35
  start?: (({
30
36
  type: Exclude<ExcalidrawBindableElement["type"], "image" | "text" | "frame" | "magicframe" | "embeddable" | "iframe">;
31
37
  id?: ExcalidrawGenericElement["id"];
@@ -39,7 +45,7 @@ export type ValidLinearElement = {
39
45
  type?: "text";
40
46
  id: ExcalidrawTextElement["id"];
41
47
  text: string;
42
- }) & Partial<ExcalidrawTextElement>)) & MarkOptional<ElementConstructorOpts, "x" | "y">;
48
+ }) & Partial<Omit<ExcalidrawTextElement, "created">>)) & FragmentConstructorOpts;
43
49
  } & Partial<ExcalidrawLinearElement>;
44
50
  export type ValidContainer = {
45
51
  type: Exclude<ExcalidrawGenericElement["type"], "selection">;
@@ -50,13 +56,25 @@ export type ValidContainer = {
50
56
  fontFamily?: FontFamilyValues;
51
57
  textAlign?: TextAlign;
52
58
  verticalAlign?: VerticalAlign;
53
- } & MarkOptional<ElementConstructorOpts, "x" | "y">;
59
+ } & FragmentConstructorOpts;
54
60
  } & ElementConstructorOpts;
61
+ /**
62
+ * A sticky note: an always-filled note whose label auto-fits. `label.fontSize`
63
+ * is the font ceiling the fit shrinks from; the note grows past its height
64
+ * (kept as `baseHeight`) only once the label hits the minimum font size.
65
+ */
66
+ export type ValidStickyNote = {
67
+ type: "stickynote";
68
+ id?: ExcalidrawStickyNoteElement["id"];
69
+ label?: Extract<ValidContainer, {
70
+ label?: unknown;
71
+ }>["label"];
72
+ } & ElementConstructorOpts & Partial<Pick<ExcalidrawStickyNoteElement, "baseHeight">>;
55
73
  export type ExcalidrawElementSkeleton = Extract<Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, ExcalidrawIframeLikeElement | ExcalidrawFreeDrawElement> | ({
56
74
  type: Extract<ExcalidrawLinearElement["type"], "line">;
57
75
  x: number;
58
76
  y: number;
59
- } & Partial<ExcalidrawLinearElement>) | ValidContainer | ValidLinearElement | ({
77
+ } & Partial<ExcalidrawLinearElement>) | ValidContainer | ValidStickyNote | ValidLinearElement | ({
60
78
  type: "text";
61
79
  text: string;
62
80
  x: number;
@@ -79,3 +97,4 @@ export type ExcalidrawElementSkeleton = Extract<Exclude<ExcalidrawElement, Excal
79
97
  export declare const convertToExcalidrawElements: (elementsSkeleton: ExcalidrawElementSkeleton[] | null, opts?: {
80
98
  regenerateIds: boolean;
81
99
  }) => Ordered<NonDeletedExcalidrawElement>[];
100
+ export {};
@@ -1,12 +1,13 @@
1
1
  import type { ElementOrToolType } from "@excalidraw/excalidraw/types";
2
2
  import type { MarkNonNullable } from "@excalidraw/common/utility-types";
3
- import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement, ExcalidrawFlowchartNodeElement, ExcalidrawLinearElementSubType } from "./types";
3
+ import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement, ExcalidrawFlowchartNodeElement, ExcalidrawLinearElementSubType, ExcalidrawStickyNoteElement } from "./types";
4
4
  export declare const isInitializedImageElement: <T extends ExcalidrawElement>(element: T | null) => element is T & InitializedExcalidrawImageElement;
5
5
  export declare const isImageElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawImageElement;
6
6
  export declare const isEmbeddableElement: <T extends ExcalidrawElement>(element: T | null | undefined) => element is T & ExcalidrawEmbeddableElement;
7
7
  export declare const isIframeElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawIframeElement;
8
8
  export declare const isIframeLikeElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawIframeLikeElement;
9
9
  export declare const isTextElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawTextElement;
10
+ export declare const isStickyNoteElement: <T extends ExcalidrawElement>(element: T | null | undefined) => element is T & ExcalidrawStickyNoteElement;
10
11
  export declare const isFrameElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawFrameElement;
11
12
  export declare const isMagicFrameElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawMagicFrameElement;
12
13
  export declare const isFrameLikeElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawFrameLikeElement;
@@ -35,7 +36,7 @@ export declare const hasBoundTextElement: <T extends ExcalidrawElement>(element:
35
36
  export declare const isBoundToContainer: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawTextElementWithContainer;
36
37
  export declare const isArrowBoundToElement: (element: ExcalidrawArrowElement) => boolean;
37
38
  export declare const isUsingAdaptiveRadius: (type: string) => type is "rectangle" | "embeddable" | "iframe" | "image";
38
- export declare const isUsingProportionalRadius: (type: string) => type is "line" | "arrow" | "diamond";
39
+ export declare const isUsingProportionalRadius: (type: string) => type is "line" | "arrow" | "stickynote" | "diamond";
39
40
  export declare const canApplyRoundnessTypeToElement: (roundnessType: RoundnessType, element: ExcalidrawElement) => boolean;
40
41
  export declare const getDefaultRoundnessTypeForElement: (element: ExcalidrawElement) => {
41
42
  type: 2;
@@ -66,6 +66,11 @@ type _ExcalidrawElementBase = Readonly<{
66
66
  boundElements: readonly BoundElement[] | null;
67
67
  /** epoch (ms) timestamp of last element update */
68
68
  updated: number;
69
+ /** Client wall-clock creation time in epoch milliseconds; null if unknown.
70
+ Preserved for this element's lifetime, including edits and undo/redo,
71
+ and excluded from `ElementUpdate` (mutateElement / newElementWith).
72
+ Duplicating an element starts a new lifetime. Not an ordering clock. */
73
+ created: number | null;
69
74
  link: string | null;
70
75
  locked: boolean;
71
76
  customData?: Record<string, any>;
@@ -76,6 +81,14 @@ export type ExcalidrawSelectionElement = _ExcalidrawElementBase & {
76
81
  export type ExcalidrawRectangleElement = _ExcalidrawElementBase & {
77
82
  type: "rectangle";
78
83
  };
84
+ export type ExcalidrawStickyNoteElement = _ExcalidrawElementBase & Readonly<{
85
+ type: "stickynote";
86
+ /**
87
+ * The height the user set, from which the layout derives `height`: the
88
+ * note grows above it to fit its label and never shrinks below it
89
+ */
90
+ baseHeight: number;
91
+ }>;
79
92
  export type ExcalidrawDiamondElement = _ExcalidrawElementBase & {
80
93
  type: "diamond";
81
94
  };
@@ -150,14 +163,14 @@ export type ExcalidrawFrameLikeElement = ExcalidrawFrameElement | ExcalidrawMagi
150
163
  * These are elements that don't have any additional properties.
151
164
  */
152
165
  export type ExcalidrawGenericElement = ExcalidrawSelectionElement | ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
153
- export type ExcalidrawFlowchartNodeElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
154
- export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawSelectionElement;
166
+ export type ExcalidrawFlowchartNodeElement = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
167
+ export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawSelectionElement;
155
168
  /**
156
169
  * ExcalidrawElement should be JSON serializable and (eventually) contain
157
170
  * no computed data. The list of all ExcalidrawElements should be shareable
158
171
  * between peers and contain no state local to the peer.
159
172
  */
160
- export type ExcalidrawElement = ExcalidrawGenericElement | ExcalidrawTextElement | ExcalidrawLinearElement | ExcalidrawArrowElement | ExcalidrawFreeDrawElement | ExcalidrawImageElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement;
173
+ export type ExcalidrawElement = ExcalidrawGenericElement | ExcalidrawStickyNoteElement | ExcalidrawTextElement | ExcalidrawLinearElement | ExcalidrawArrowElement | ExcalidrawFreeDrawElement | ExcalidrawImageElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement;
161
174
  export type ExcalidrawNonSelectionElement = Exclude<ExcalidrawElement, ExcalidrawSelectionElement>;
162
175
  export type Ordered<TElement extends ExcalidrawElement> = TElement & {
163
176
  index: FractionalIndex;
@@ -171,10 +184,19 @@ export type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
171
184
  type: "text";
172
185
  fontSize: number;
173
186
  fontFamily: FontFamilyValues;
187
+ /**
188
+ * The font size the user picked, from which the layout derives `fontSize`.
189
+ * Today only sticky note labels have one: the auto-fit shrinks below it
190
+ * and never above it (compare `baseHeight`, which the note grows above).
191
+ * `null` for every other text. Read it through `getBaseFontSize` —
192
+ * generic binding repair can detach a label without clearing this, so
193
+ * the container decides its meaning.
194
+ */
195
+ baseFontSize: number | null;
174
196
  text: string;
175
197
  textAlign: TextAlign;
176
198
  verticalAlign: VerticalAlign;
177
- containerId: ExcalidrawGenericElement["id"] | null;
199
+ containerId: ExcalidrawTextContainer["id"] | null;
178
200
  originalText: string;
179
201
  /**
180
202
  * If `true` the width will fit the text. If `false`, the text will
@@ -190,9 +212,16 @@ export type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
190
212
  lineHeight: number & {
191
213
  _brand: "unitlessLineHeight";
192
214
  };
215
+ /**
216
+ * Position of text bound to a linear element (such as an arrow),
217
+ * expressed as a normalized arc-length parameter (0–1) along the
218
+ * container's whole path. Independent of how the path is segmented,
219
+ * so it survives midpoint insertion and other geometry changes.
220
+ * */
221
+ labelPosition?: number | null;
193
222
  }>;
194
- export type ExcalidrawBindableElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawTextElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement;
195
- export type ExcalidrawTextContainer = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawArrowElement;
223
+ export type ExcalidrawBindableElement = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawTextElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement;
224
+ export type ExcalidrawTextContainer = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawArrowElement;
196
225
  export type ExcalidrawTextElementWithContainer = {
197
226
  containerId: ExcalidrawTextContainer["id"];
198
227
  } & ExcalidrawTextElement;
@@ -2,13 +2,16 @@ import { type GlobalPoint } from "@excalidraw/math";
2
2
  import type { Curve, LineSegment } from "@excalidraw/math";
3
3
  import type { AppState, Zoom } from "@excalidraw/excalidraw/types";
4
4
  import type { ElementsMap, ExcalidrawArrowElement, ExcalidrawBindableElement, ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, ExcalidrawRectanguloidElement } from "./types";
5
+ export type LinearPathSegment = LineSegment<GlobalPoint> | Curve<GlobalPoint>;
6
+ type ElementShape = [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
5
7
  /**
6
8
  * Returns the **rotated** components of freedraw, line or arrow elements.
7
9
  *
8
10
  * @param element The linear element to deconstruct
9
11
  * @returns The rotated in components.
10
12
  */
11
- export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
13
+ export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap): ElementShape;
14
+ export declare function getLinearElementPathSegments(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap): LinearPathSegment[];
12
15
  /**
13
16
  * Get the building components of a rectanguloid element in the form of
14
17
  * line segments and curves **unrotated**.
@@ -17,7 +20,7 @@ export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLi
17
20
  * @param offset Optional offset to expand the rectanguloid shape
18
21
  * @returns Tuple of **unrotated** line segments (0) and curves (1)
19
22
  */
20
- export declare function deconstructRectanguloidElement(element: ExcalidrawRectanguloidElement, offset?: number): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
23
+ export declare function deconstructRectanguloidElement(element: ExcalidrawRectanguloidElement, offset?: number): ElementShape;
21
24
  export declare function getDiamondBaseCorners(element: ExcalidrawDiamondElement, offset?: number): Curve<GlobalPoint>[];
22
25
  /**
23
26
  * Get the **unrotated** building components of a diamond element
@@ -27,10 +30,18 @@ export declare function getDiamondBaseCorners(element: ExcalidrawDiamondElement,
27
30
  * @param offset An optional offset
28
31
  * @returns Tuple of line **unrotated** segments (0) and curves (1)
29
32
  */
30
- export declare function deconstructDiamondElement(element: ExcalidrawDiamondElement, offset?: number): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
33
+ export declare function deconstructDiamondElement(element: ExcalidrawDiamondElement, offset?: number): ElementShape;
31
34
  export declare const isPathALoop: (points: ExcalidrawLinearElement["points"],
32
35
  /** supply if you want the loop detection to account for current zoom */
33
36
  zoomValue?: Zoom["value"]) => boolean;
34
37
  export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
35
- 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;
36
46
  export declare const projectFixedPointOntoDiagonal: (arrow: ExcalidrawArrowElement, point: GlobalPoint, element: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, zoom: AppState["zoom"], isMidpointSnappingEnabled?: boolean) => GlobalPoint | null;
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,10 +29,15 @@ export declare const actionAddToLibrary: {
29
29
  boxSelectionMode: import("../types").BoxSelectionMode;
30
30
  bindingPreference: "enabled" | "disabled";
31
31
  isMidpointSnappingEnabled: boolean;
32
+ inputDevice: import("../types").InputDevice;
32
33
  suggestedBinding: {
33
34
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
34
35
  midPoint?: import("@excalidraw/math").GlobalPoint;
35
36
  } | null;
37
+ hoveredArrowTextAnchor: {
38
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
39
+ anchor: "start" | "end" | "label";
40
+ } | null;
36
41
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
37
42
  frameRendering: {
38
43
  enabled: boolean;
@@ -40,7 +45,7 @@ export declare const actionAddToLibrary: {
40
45
  outline: boolean;
41
46
  clip: boolean;
42
47
  };
43
- editingFrame: string | null;
48
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
44
49
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
45
50
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
46
51
  activeTool: {
@@ -59,6 +64,8 @@ export declare const actionAddToLibrary: {
59
64
  exportWithDarkMode: boolean;
60
65
  exportScale: number;
61
66
  currentItemStrokeColor: string;
67
+ currentItemStickynoteStrokeColor: string;
68
+ currentItemStickynoteBackgroundColor: string;
62
69
  currentItemBackgroundColor: string;
63
70
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
64
71
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -148,8 +155,6 @@ export declare const actionAddToLibrary: {
148
155
  y: number;
149
156
  } | null;
150
157
  objectsSnapModeEnabled: boolean;
151
- userToFollow: import("../types").UserToFollow | null;
152
- followedBy: Set<import("../types").SocketId>;
153
158
  isCropping: boolean;
154
159
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
155
160
  searchMatches: Readonly<{
@@ -161,6 +166,14 @@ export declare const actionAddToLibrary: {
161
166
  [groupId: string]: true;
162
167
  };
163
168
  bindMode: import("@excalidraw/element/types").BindMode;
169
+ colorTopPicks: {
170
+ elementStroke: readonly string[] | null;
171
+ elementBackground: readonly string[] | null;
172
+ bucketFill: readonly string[] | null;
173
+ stickyNoteStroke: readonly string[] | null;
174
+ stickyNoteBackground: readonly string[] | null;
175
+ };
176
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
164
177
  };
165
178
  } | {
166
179
  captureUpdate: "EVENTUALLY";
@@ -185,10 +198,15 @@ export declare const actionAddToLibrary: {
185
198
  boxSelectionMode: import("../types").BoxSelectionMode;
186
199
  bindingPreference: "enabled" | "disabled";
187
200
  isMidpointSnappingEnabled: boolean;
201
+ inputDevice: import("../types").InputDevice;
188
202
  suggestedBinding: {
189
203
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
190
204
  midPoint?: import("@excalidraw/math").GlobalPoint;
191
205
  } | null;
206
+ hoveredArrowTextAnchor: {
207
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
208
+ anchor: "start" | "end" | "label";
209
+ } | null;
192
210
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
193
211
  frameRendering: {
194
212
  enabled: boolean;
@@ -196,7 +214,7 @@ export declare const actionAddToLibrary: {
196
214
  outline: boolean;
197
215
  clip: boolean;
198
216
  };
199
- editingFrame: string | null;
217
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
200
218
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
201
219
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
202
220
  activeTool: {
@@ -215,6 +233,8 @@ export declare const actionAddToLibrary: {
215
233
  exportWithDarkMode: boolean;
216
234
  exportScale: number;
217
235
  currentItemStrokeColor: string;
236
+ currentItemStickynoteStrokeColor: string;
237
+ currentItemStickynoteBackgroundColor: string;
218
238
  currentItemBackgroundColor: string;
219
239
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
220
240
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -309,8 +329,6 @@ export declare const actionAddToLibrary: {
309
329
  y: number;
310
330
  } | null;
311
331
  objectsSnapModeEnabled: boolean;
312
- userToFollow: import("../types").UserToFollow | null;
313
- followedBy: Set<import("../types").SocketId>;
314
332
  isCropping: boolean;
315
333
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
316
334
  searchMatches: Readonly<{
@@ -322,6 +340,14 @@ export declare const actionAddToLibrary: {
322
340
  [groupId: string]: true;
323
341
  };
324
342
  bindMode: import("@excalidraw/element/types").BindMode;
343
+ colorTopPicks: {
344
+ elementStroke: readonly string[] | null;
345
+ elementBackground: readonly string[] | null;
346
+ bucketFill: readonly string[] | null;
347
+ stickyNoteStroke: readonly string[] | null;
348
+ stickyNoteBackground: readonly string[] | null;
349
+ };
350
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
325
351
  };
326
352
  }> | {
327
353
  captureUpdate: "EVENTUALLY";
@@ -346,10 +372,15 @@ export declare const actionAddToLibrary: {
346
372
  boxSelectionMode: import("../types").BoxSelectionMode;
347
373
  bindingPreference: "enabled" | "disabled";
348
374
  isMidpointSnappingEnabled: boolean;
375
+ inputDevice: import("../types").InputDevice;
349
376
  suggestedBinding: {
350
377
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
351
378
  midPoint?: import("@excalidraw/math").GlobalPoint;
352
379
  } | null;
380
+ hoveredArrowTextAnchor: {
381
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
382
+ anchor: "start" | "end" | "label";
383
+ } | null;
353
384
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
354
385
  frameRendering: {
355
386
  enabled: boolean;
@@ -357,7 +388,7 @@ export declare const actionAddToLibrary: {
357
388
  outline: boolean;
358
389
  clip: boolean;
359
390
  };
360
- editingFrame: string | null;
391
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
361
392
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
362
393
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
363
394
  activeTool: {
@@ -376,6 +407,8 @@ export declare const actionAddToLibrary: {
376
407
  exportWithDarkMode: boolean;
377
408
  exportScale: number;
378
409
  currentItemStrokeColor: string;
410
+ currentItemStickynoteStrokeColor: string;
411
+ currentItemStickynoteBackgroundColor: string;
379
412
  currentItemBackgroundColor: string;
380
413
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
381
414
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -470,8 +503,6 @@ export declare const actionAddToLibrary: {
470
503
  y: number;
471
504
  } | null;
472
505
  objectsSnapModeEnabled: boolean;
473
- userToFollow: import("../types").UserToFollow | null;
474
- followedBy: Set<import("../types").SocketId>;
475
506
  isCropping: boolean;
476
507
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
477
508
  searchMatches: Readonly<{
@@ -483,6 +514,14 @@ export declare const actionAddToLibrary: {
483
514
  [groupId: string]: true;
484
515
  };
485
516
  bindMode: import("@excalidraw/element/types").BindMode;
517
+ colorTopPicks: {
518
+ elementStroke: readonly string[] | null;
519
+ elementBackground: readonly string[] | null;
520
+ bucketFill: readonly string[] | null;
521
+ stickyNoteStroke: readonly string[] | null;
522
+ stickyNoteBackground: readonly string[] | null;
523
+ };
524
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
486
525
  };
487
526
  };
488
527
  label: string;
@@ -11,7 +11,7 @@ export declare const actionAlignTop: {
11
11
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
12
12
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
13
13
  appState: Readonly<AppState>;
14
- elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
14
+ elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
15
15
  captureUpdate: "IMMEDIATELY";
16
16
  };
17
17
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -29,7 +29,7 @@ export declare const actionAlignBottom: {
29
29
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
30
30
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
31
31
  appState: Readonly<AppState>;
32
- elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
32
+ elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
33
33
  captureUpdate: "IMMEDIATELY";
34
34
  };
35
35
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -47,7 +47,7 @@ export declare const actionAlignLeft: {
47
47
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
48
48
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
49
49
  appState: Readonly<AppState>;
50
- elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
50
+ elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
51
51
  captureUpdate: "IMMEDIATELY";
52
52
  };
53
53
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -65,7 +65,7 @@ export declare const actionAlignRight: {
65
65
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
66
66
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
67
67
  appState: Readonly<AppState>;
68
- elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
68
+ elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
69
69
  captureUpdate: "IMMEDIATELY";
70
70
  };
71
71
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -83,7 +83,7 @@ export declare const actionAlignVerticallyCentered: {
83
83
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
84
84
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
85
85
  appState: Readonly<AppState>;
86
- elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
86
+ elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
87
87
  captureUpdate: "IMMEDIATELY";
88
88
  };
89
89
  PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -100,7 +100,7 @@ export declare const actionAlignHorizontallyCentered: {
100
100
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
101
101
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
102
102
  appState: Readonly<AppState>;
103
- elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
103
+ elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
104
104
  captureUpdate: "IMMEDIATELY";
105
105
  };
106
106
  PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -49,10 +49,15 @@ export declare const actionBindText: {
49
49
  boxSelectionMode: import("../types").BoxSelectionMode;
50
50
  bindingPreference: "enabled" | "disabled";
51
51
  isMidpointSnappingEnabled: boolean;
52
+ inputDevice: import("../types").InputDevice;
52
53
  suggestedBinding: {
53
54
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
54
55
  midPoint?: import("@excalidraw/math").GlobalPoint;
55
56
  } | null;
57
+ hoveredArrowTextAnchor: {
58
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
59
+ anchor: "start" | "end" | "label";
60
+ } | null;
56
61
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
57
62
  frameRendering: {
58
63
  enabled: boolean;
@@ -60,7 +65,7 @@ export declare const actionBindText: {
60
65
  outline: boolean;
61
66
  clip: boolean;
62
67
  };
63
- editingFrame: string | null;
68
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
64
69
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
65
70
  editingTextElement: ExcalidrawTextElement | null;
66
71
  activeTool: {
@@ -79,6 +84,8 @@ export declare const actionBindText: {
79
84
  exportWithDarkMode: boolean;
80
85
  exportScale: number;
81
86
  currentItemStrokeColor: string;
87
+ currentItemStickynoteStrokeColor: string;
88
+ currentItemStickynoteBackgroundColor: string;
82
89
  currentItemBackgroundColor: string;
83
90
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
84
91
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -170,8 +177,6 @@ export declare const actionBindText: {
170
177
  y: number;
171
178
  } | null;
172
179
  objectsSnapModeEnabled: boolean;
173
- userToFollow: import("../types").UserToFollow | null;
174
- followedBy: Set<import("../types").SocketId>;
175
180
  isCropping: boolean;
176
181
  croppingElementId: ExcalidrawElement["id"] | null;
177
182
  searchMatches: Readonly<{
@@ -183,6 +188,14 @@ export declare const actionBindText: {
183
188
  [groupId: string]: true;
184
189
  };
185
190
  bindMode: import("@excalidraw/element/types").BindMode;
191
+ colorTopPicks: {
192
+ elementStroke: readonly string[] | null;
193
+ elementBackground: readonly string[] | null;
194
+ bucketFill: readonly string[] | null;
195
+ stickyNoteStroke: readonly string[] | null;
196
+ stickyNoteBackground: readonly string[] | null;
197
+ };
198
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
186
199
  };
187
200
  captureUpdate: "IMMEDIATELY";
188
201
  };
@@ -222,10 +235,15 @@ export declare const actionWrapTextInContainer: {
222
235
  boxSelectionMode: import("../types").BoxSelectionMode;
223
236
  bindingPreference: "enabled" | "disabled";
224
237
  isMidpointSnappingEnabled: boolean;
238
+ inputDevice: import("../types").InputDevice;
225
239
  suggestedBinding: {
226
240
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
227
241
  midPoint?: import("@excalidraw/math").GlobalPoint;
228
242
  } | null;
243
+ hoveredArrowTextAnchor: {
244
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
245
+ anchor: "start" | "end" | "label";
246
+ } | null;
229
247
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
230
248
  frameRendering: {
231
249
  enabled: boolean;
@@ -233,7 +251,7 @@ export declare const actionWrapTextInContainer: {
233
251
  outline: boolean;
234
252
  clip: boolean;
235
253
  };
236
- editingFrame: string | null;
254
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
237
255
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
238
256
  editingTextElement: ExcalidrawTextElement | null;
239
257
  activeTool: {
@@ -252,6 +270,8 @@ export declare const actionWrapTextInContainer: {
252
270
  exportWithDarkMode: boolean;
253
271
  exportScale: number;
254
272
  currentItemStrokeColor: string;
273
+ currentItemStickynoteStrokeColor: string;
274
+ currentItemStickynoteBackgroundColor: string;
255
275
  currentItemBackgroundColor: string;
256
276
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
257
277
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -343,8 +363,6 @@ export declare const actionWrapTextInContainer: {
343
363
  y: number;
344
364
  } | null;
345
365
  objectsSnapModeEnabled: boolean;
346
- userToFollow: import("../types").UserToFollow | null;
347
- followedBy: Set<import("../types").SocketId>;
348
366
  isCropping: boolean;
349
367
  croppingElementId: ExcalidrawElement["id"] | null;
350
368
  searchMatches: Readonly<{
@@ -356,6 +374,14 @@ export declare const actionWrapTextInContainer: {
356
374
  [groupId: string]: true;
357
375
  };
358
376
  bindMode: import("@excalidraw/element/types").BindMode;
377
+ colorTopPicks: {
378
+ elementStroke: readonly string[] | null;
379
+ elementBackground: readonly string[] | null;
380
+ bucketFill: readonly string[] | null;
381
+ stickyNoteStroke: readonly string[] | null;
382
+ stickyNoteBackground: readonly string[] | null;
383
+ };
384
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
359
385
  };
360
386
  captureUpdate: "IMMEDIATELY";
361
387
  };