@excalidraw/common 0.18.0-4872083 → 0.18.0-4ce38fb

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 (119) hide show
  1. package/dist/dev/index.js +145 -14
  2. package/dist/dev/index.js.map +2 -2
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/colors.d.ts +13 -7
  5. package/dist/types/common/src/constants.d.ts +54 -0
  6. package/dist/types/common/src/keys.d.ts +2 -0
  7. package/dist/types/common/src/random.d.ts +7 -0
  8. package/dist/types/common/src/utils.d.ts +5 -0
  9. package/dist/types/element/src/Scene.d.ts +1 -1
  10. package/dist/types/element/src/binding.d.ts +13 -7
  11. package/dist/types/element/src/collision.d.ts +14 -5
  12. package/dist/types/element/src/comparisons.d.ts +5 -3
  13. package/dist/types/element/src/delta.d.ts +23 -1
  14. package/dist/types/element/src/duplicate.d.ts +60 -0
  15. package/dist/types/element/src/flowchart.d.ts +5 -1
  16. package/dist/types/element/src/frame.d.ts +2 -2
  17. package/dist/types/element/src/index.d.ts +2 -0
  18. package/dist/types/element/src/linearElementEditor.d.ts +10 -0
  19. package/dist/types/element/src/listMarker.d.ts +34 -0
  20. package/dist/types/element/src/mutateElement.d.ts +1 -1
  21. package/dist/types/element/src/newElement.d.ts +39 -3
  22. package/dist/types/element/src/renderElement.d.ts +21 -4
  23. package/dist/types/element/src/shape.d.ts +15 -1
  24. package/dist/types/element/src/sizeHelpers.d.ts +6 -0
  25. package/dist/types/element/src/stickyNote.d.ts +183 -0
  26. package/dist/types/element/src/textElement.d.ts +9 -1
  27. package/dist/types/element/src/transform.d.ts +25 -6
  28. package/dist/types/element/src/typeChecks.d.ts +3 -2
  29. package/dist/types/element/src/types.d.ts +35 -6
  30. package/dist/types/element/src/utils.d.ts +15 -4
  31. package/dist/types/element/src/zindex.d.ts +1 -1
  32. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +60 -3
  33. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  34. package/dist/types/excalidraw/actions/actionBoundText.d.ts +40 -2
  35. package/dist/types/excalidraw/actions/actionCanvas.d.ts +147 -14
  36. package/dist/types/excalidraw/actions/actionClipboard.d.ts +40 -2
  37. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +20 -1
  38. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +61 -4
  39. package/dist/types/excalidraw/actions/actionDeselect.d.ts +23 -1
  40. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
  41. package/dist/types/excalidraw/actions/actionElementLink.d.ts +20 -1
  42. package/dist/types/excalidraw/actions/actionElementLock.d.ts +40 -2
  43. package/dist/types/excalidraw/actions/actionExport.d.ts +41 -3
  44. package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
  45. package/dist/types/excalidraw/actions/actionFrame.d.ts +111 -4
  46. package/dist/types/excalidraw/actions/actionGroup.d.ts +40 -2
  47. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +71 -2
  48. package/dist/types/excalidraw/actions/actionLink.d.ts +20 -1
  49. package/dist/types/excalidraw/actions/actionMenu.d.ts +20 -1
  50. package/dist/types/excalidraw/actions/actionProperties.d.ts +50 -8
  51. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +20 -1
  52. package/dist/types/excalidraw/actions/actionStyles.d.ts +21 -2
  53. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +20 -1
  54. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +20 -1
  55. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +20 -1
  56. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +20 -1
  57. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +20 -1
  58. package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +197 -0
  59. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +20 -1
  60. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +20 -1
  61. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +20 -1
  62. package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
  63. package/dist/types/excalidraw/actions/index.d.ts +1 -0
  64. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  65. package/dist/types/excalidraw/appState.d.ts +26 -4
  66. package/dist/types/excalidraw/components/App.arrowText.d.ts +28 -30
  67. package/dist/types/excalidraw/components/App.bucketFill.d.ts +10 -0
  68. package/dist/types/excalidraw/components/App.clipboard.d.ts +31 -0
  69. package/dist/types/excalidraw/components/App.cursor.d.ts +8 -0
  70. package/dist/types/excalidraw/components/App.d.ts +110 -199
  71. package/dist/types/excalidraw/components/App.duplicate.d.ts +101 -0
  72. package/dist/types/excalidraw/components/App.pan.d.ts +62 -0
  73. package/dist/types/excalidraw/components/App.text.d.ts +146 -0
  74. package/dist/types/excalidraw/components/App.textTool.d.ts +140 -0
  75. package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
  76. package/dist/types/excalidraw/components/App.viewport.d.ts +41 -1
  77. package/dist/types/excalidraw/components/App.wheel.d.ts +26 -0
  78. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +6 -2
  79. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  80. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +4 -1
  81. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +4 -2
  82. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
  83. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  84. package/dist/types/excalidraw/components/ColorPicker/colorTopPicksDnD.d.ts +11 -0
  85. package/dist/types/excalidraw/components/FileDropOverlay.d.ts +2 -0
  86. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +4 -1
  87. package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
  88. package/dist/types/excalidraw/components/FontPicker/fontTopPicksDnD.d.ts +12 -0
  89. package/dist/types/excalidraw/components/IconButton.d.ts +2 -0
  90. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +6 -2
  91. package/dist/types/excalidraw/components/LibraryUnit.d.ts +7 -2
  92. package/dist/types/excalidraw/components/Tools.d.ts +7 -2
  93. package/dist/types/excalidraw/components/Tooltip.d.ts +15 -1
  94. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksContextMenu.d.ts +14 -0
  95. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksTip.d.ts +11 -0
  96. package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +58 -0
  97. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +2 -0
  98. package/dist/types/excalidraw/components/icons.d.ts +2 -0
  99. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -0
  100. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +2 -2
  101. package/dist/types/excalidraw/data/blob.d.ts +42 -4
  102. package/dist/types/excalidraw/data/json.d.ts +21 -2
  103. package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
  104. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
  105. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  106. package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
  107. package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
  108. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
  109. package/dist/types/excalidraw/scene/Renderer.d.ts +64 -2
  110. package/dist/types/excalidraw/scene/index.d.ts +1 -1
  111. package/dist/types/excalidraw/scene/types.d.ts +3 -1
  112. package/dist/types/excalidraw/types.d.ts +140 -18
  113. package/dist/types/excalidraw/viewport.d.ts +33 -1
  114. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +12 -1
  115. package/dist/types/math/src/curve.d.ts +19 -12
  116. package/dist/types/math/src/segment.d.ts +6 -0
  117. package/dist/types/utils/src/export.d.ts +1 -0
  118. package/dist/types/utils/src/shape.d.ts +2 -2
  119. package/package.json +1 -1
@@ -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,11 +29,20 @@ export declare const actionAddToLibrary: {
29
29
  boxSelectionMode: import("../types").BoxSelectionMode;
30
30
  bindingPreference: "enabled" | "disabled";
31
31
  isMidpointSnappingEnabled: boolean;
32
+ showHints: boolean;
33
+ inputDevice: import("../types").InputDevice;
32
34
  suggestedBinding: {
33
35
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
34
36
  midPoint?: import("@excalidraw/math").GlobalPoint;
35
37
  } | null;
36
- 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";
37
46
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
38
47
  anchor: "start" | "end" | "label";
39
48
  } | null;
@@ -63,6 +72,8 @@ export declare const actionAddToLibrary: {
63
72
  exportWithDarkMode: boolean;
64
73
  exportScale: number;
65
74
  currentItemStrokeColor: string;
75
+ currentItemStickynoteStrokeColor: string;
76
+ currentItemStickynoteBackgroundColor: string;
66
77
  currentItemBackgroundColor: string;
67
78
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
68
79
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -163,6 +174,14 @@ export declare const actionAddToLibrary: {
163
174
  [groupId: string]: true;
164
175
  };
165
176
  bindMode: import("@excalidraw/element/types").BindMode;
177
+ colorTopPicks: {
178
+ elementStroke: readonly string[] | null;
179
+ elementBackground: readonly string[] | null;
180
+ bucketFill: readonly string[] | null;
181
+ stickyNoteStroke: readonly string[] | null;
182
+ stickyNoteBackground: readonly string[] | null;
183
+ };
184
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
166
185
  };
167
186
  } | {
168
187
  captureUpdate: "EVENTUALLY";
@@ -187,11 +206,20 @@ export declare const actionAddToLibrary: {
187
206
  boxSelectionMode: import("../types").BoxSelectionMode;
188
207
  bindingPreference: "enabled" | "disabled";
189
208
  isMidpointSnappingEnabled: boolean;
209
+ showHints: boolean;
210
+ inputDevice: import("../types").InputDevice;
190
211
  suggestedBinding: {
191
212
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
192
213
  midPoint?: import("@excalidraw/math").GlobalPoint;
193
214
  } | null;
194
- 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";
195
223
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
196
224
  anchor: "start" | "end" | "label";
197
225
  } | null;
@@ -221,6 +249,8 @@ export declare const actionAddToLibrary: {
221
249
  exportWithDarkMode: boolean;
222
250
  exportScale: number;
223
251
  currentItemStrokeColor: string;
252
+ currentItemStickynoteStrokeColor: string;
253
+ currentItemStickynoteBackgroundColor: string;
224
254
  currentItemBackgroundColor: string;
225
255
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
226
256
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -326,6 +356,14 @@ export declare const actionAddToLibrary: {
326
356
  [groupId: string]: true;
327
357
  };
328
358
  bindMode: import("@excalidraw/element/types").BindMode;
359
+ colorTopPicks: {
360
+ elementStroke: readonly string[] | null;
361
+ elementBackground: readonly string[] | null;
362
+ bucketFill: readonly string[] | null;
363
+ stickyNoteStroke: readonly string[] | null;
364
+ stickyNoteBackground: readonly string[] | null;
365
+ };
366
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
329
367
  };
330
368
  }> | {
331
369
  captureUpdate: "EVENTUALLY";
@@ -350,11 +388,20 @@ export declare const actionAddToLibrary: {
350
388
  boxSelectionMode: import("../types").BoxSelectionMode;
351
389
  bindingPreference: "enabled" | "disabled";
352
390
  isMidpointSnappingEnabled: boolean;
391
+ showHints: boolean;
392
+ inputDevice: import("../types").InputDevice;
353
393
  suggestedBinding: {
354
394
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
355
395
  midPoint?: import("@excalidraw/math").GlobalPoint;
356
396
  } | null;
357
- 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";
358
405
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
359
406
  anchor: "start" | "end" | "label";
360
407
  } | null;
@@ -384,6 +431,8 @@ export declare const actionAddToLibrary: {
384
431
  exportWithDarkMode: boolean;
385
432
  exportScale: number;
386
433
  currentItemStrokeColor: string;
434
+ currentItemStickynoteStrokeColor: string;
435
+ currentItemStickynoteBackgroundColor: string;
387
436
  currentItemBackgroundColor: string;
388
437
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
389
438
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -489,6 +538,14 @@ export declare const actionAddToLibrary: {
489
538
  [groupId: string]: true;
490
539
  };
491
540
  bindMode: import("@excalidraw/element/types").BindMode;
541
+ colorTopPicks: {
542
+ elementStroke: readonly string[] | null;
543
+ elementBackground: readonly string[] | null;
544
+ bucketFill: readonly string[] | null;
545
+ stickyNoteStroke: readonly string[] | null;
546
+ stickyNoteBackground: readonly string[] | null;
547
+ };
548
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
492
549
  };
493
550
  };
494
551
  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,11 +49,20 @@ export declare const actionBindText: {
49
49
  boxSelectionMode: import("../types").BoxSelectionMode;
50
50
  bindingPreference: "enabled" | "disabled";
51
51
  isMidpointSnappingEnabled: boolean;
52
+ showHints: boolean;
53
+ inputDevice: import("../types").InputDevice;
52
54
  suggestedBinding: {
53
55
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
54
56
  midPoint?: import("@excalidraw/math").GlobalPoint;
55
57
  } | null;
56
- hoveredArrowTextAnchor: {
58
+ textToolHover: {
59
+ type: "text";
60
+ elementId: ExcalidrawElement["id"];
61
+ } | {
62
+ type: "container";
63
+ elementId: ExcalidrawElement["id"];
64
+ } | {
65
+ type: "arrow";
57
66
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
58
67
  anchor: "start" | "end" | "label";
59
68
  } | null;
@@ -83,6 +92,8 @@ export declare const actionBindText: {
83
92
  exportWithDarkMode: boolean;
84
93
  exportScale: number;
85
94
  currentItemStrokeColor: string;
95
+ currentItemStickynoteStrokeColor: string;
96
+ currentItemStickynoteBackgroundColor: string;
86
97
  currentItemBackgroundColor: string;
87
98
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
88
99
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -185,6 +196,14 @@ export declare const actionBindText: {
185
196
  [groupId: string]: true;
186
197
  };
187
198
  bindMode: import("@excalidraw/element/types").BindMode;
199
+ colorTopPicks: {
200
+ elementStroke: readonly string[] | null;
201
+ elementBackground: readonly string[] | null;
202
+ bucketFill: readonly string[] | null;
203
+ stickyNoteStroke: readonly string[] | null;
204
+ stickyNoteBackground: readonly string[] | null;
205
+ };
206
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
188
207
  };
189
208
  captureUpdate: "IMMEDIATELY";
190
209
  };
@@ -224,11 +243,20 @@ export declare const actionWrapTextInContainer: {
224
243
  boxSelectionMode: import("../types").BoxSelectionMode;
225
244
  bindingPreference: "enabled" | "disabled";
226
245
  isMidpointSnappingEnabled: boolean;
246
+ showHints: boolean;
247
+ inputDevice: import("../types").InputDevice;
227
248
  suggestedBinding: {
228
249
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
229
250
  midPoint?: import("@excalidraw/math").GlobalPoint;
230
251
  } | null;
231
- hoveredArrowTextAnchor: {
252
+ textToolHover: {
253
+ type: "text";
254
+ elementId: ExcalidrawElement["id"];
255
+ } | {
256
+ type: "container";
257
+ elementId: ExcalidrawElement["id"];
258
+ } | {
259
+ type: "arrow";
232
260
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
233
261
  anchor: "start" | "end" | "label";
234
262
  } | null;
@@ -258,6 +286,8 @@ export declare const actionWrapTextInContainer: {
258
286
  exportWithDarkMode: boolean;
259
287
  exportScale: number;
260
288
  currentItemStrokeColor: string;
289
+ currentItemStickynoteStrokeColor: string;
290
+ currentItemStickynoteBackgroundColor: string;
261
291
  currentItemBackgroundColor: string;
262
292
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
263
293
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -360,6 +390,14 @@ export declare const actionWrapTextInContainer: {
360
390
  [groupId: string]: true;
361
391
  };
362
392
  bindMode: import("@excalidraw/element/types").BindMode;
393
+ colorTopPicks: {
394
+ elementStroke: readonly string[] | null;
395
+ elementBackground: readonly string[] | null;
396
+ bucketFill: readonly string[] | null;
397
+ stickyNoteStroke: readonly string[] | null;
398
+ stickyNoteBackground: readonly string[] | null;
399
+ };
400
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
363
401
  };
364
402
  captureUpdate: "IMMEDIATELY";
365
403
  };