@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
@@ -34,10 +34,15 @@ export declare const actionSelectAll: {
34
34
  boxSelectionMode: import("../types").BoxSelectionMode;
35
35
  bindingPreference: "enabled" | "disabled";
36
36
  isMidpointSnappingEnabled: boolean;
37
+ inputDevice: import("../types").InputDevice;
37
38
  suggestedBinding: {
38
39
  element: NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
39
40
  midPoint?: import("@excalidraw/math").GlobalPoint;
40
41
  } | null;
42
+ hoveredArrowTextAnchor: {
43
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
44
+ anchor: "start" | "end" | "label";
45
+ } | null;
41
46
  frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
42
47
  frameRendering: {
43
48
  enabled: boolean;
@@ -45,7 +50,7 @@ export declare const actionSelectAll: {
45
50
  outline: boolean;
46
51
  clip: boolean;
47
52
  };
48
- editingFrame: string | null;
53
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
49
54
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
50
55
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
51
56
  activeTool: {
@@ -64,6 +69,8 @@ export declare const actionSelectAll: {
64
69
  exportWithDarkMode: boolean;
65
70
  exportScale: number;
66
71
  currentItemStrokeColor: string;
72
+ currentItemStickynoteStrokeColor: string;
73
+ currentItemStickynoteBackgroundColor: string;
67
74
  currentItemBackgroundColor: string;
68
75
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
69
76
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -150,8 +157,6 @@ export declare const actionSelectAll: {
150
157
  y: number;
151
158
  } | null;
152
159
  objectsSnapModeEnabled: boolean;
153
- userToFollow: import("../types").UserToFollow | null;
154
- followedBy: Set<import("../types").SocketId>;
155
160
  isCropping: boolean;
156
161
  croppingElementId: ExcalidrawElement["id"] | null;
157
162
  searchMatches: Readonly<{
@@ -163,6 +168,14 @@ export declare const actionSelectAll: {
163
168
  [groupId: string]: true;
164
169
  };
165
170
  bindMode: import("@excalidraw/element/types").BindMode;
171
+ colorTopPicks: {
172
+ elementStroke: readonly string[] | null;
173
+ elementBackground: readonly string[] | null;
174
+ bucketFill: readonly string[] | null;
175
+ stickyNoteStroke: readonly string[] | null;
176
+ stickyNoteBackground: readonly string[] | null;
177
+ };
178
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
166
179
  };
167
180
  captureUpdate: "IMMEDIATELY";
168
181
  };
@@ -32,10 +32,15 @@ export declare const actionCopyStyles: {
32
32
  boxSelectionMode: import("../types").BoxSelectionMode;
33
33
  bindingPreference: "enabled" | "disabled";
34
34
  isMidpointSnappingEnabled: boolean;
35
+ inputDevice: import("../types").InputDevice;
35
36
  suggestedBinding: {
36
37
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
37
38
  midPoint?: import("@excalidraw/math").GlobalPoint;
38
39
  } | null;
40
+ hoveredArrowTextAnchor: {
41
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
42
+ anchor: "start" | "end" | "label";
43
+ } | null;
39
44
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
40
45
  frameRendering: {
41
46
  enabled: boolean;
@@ -43,7 +48,7 @@ export declare const actionCopyStyles: {
43
48
  outline: boolean;
44
49
  clip: boolean;
45
50
  };
46
- editingFrame: string | null;
51
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
47
52
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
48
53
  editingTextElement: ExcalidrawTextElement | null;
49
54
  activeTool: {
@@ -62,6 +67,8 @@ export declare const actionCopyStyles: {
62
67
  exportWithDarkMode: boolean;
63
68
  exportScale: number;
64
69
  currentItemStrokeColor: string;
70
+ currentItemStickynoteStrokeColor: string;
71
+ currentItemStickynoteBackgroundColor: string;
65
72
  currentItemBackgroundColor: string;
66
73
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
67
74
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -151,8 +158,6 @@ export declare const actionCopyStyles: {
151
158
  y: number;
152
159
  } | null;
153
160
  objectsSnapModeEnabled: boolean;
154
- userToFollow: import("../types").UserToFollow | null;
155
- followedBy: Set<import("../types").SocketId>;
156
161
  isCropping: boolean;
157
162
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
158
163
  searchMatches: Readonly<{
@@ -164,6 +169,14 @@ export declare const actionCopyStyles: {
164
169
  [groupId: string]: true;
165
170
  };
166
171
  bindMode: import("@excalidraw/element/types").BindMode;
172
+ colorTopPicks: {
173
+ elementStroke: readonly string[] | null;
174
+ elementBackground: readonly string[] | null;
175
+ bucketFill: readonly string[] | null;
176
+ stickyNoteStroke: readonly string[] | null;
177
+ stickyNoteBackground: readonly string[] | null;
178
+ };
179
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
167
180
  };
168
181
  captureUpdate: "EVENTUALLY";
169
182
  };
@@ -182,7 +195,7 @@ export declare const actionPasteStyles: {
182
195
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
183
196
  captureUpdate: "EVENTUALLY";
184
197
  } | {
185
- elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
198
+ elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
186
199
  captureUpdate: "IMMEDIATELY";
187
200
  };
188
201
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -7,7 +7,7 @@ export declare const actionTextAutoResize: {
7
7
  category: "element";
8
8
  };
9
9
  predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: unknown) => boolean;
10
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, targetElement: unknown) => {
10
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, targetElement: unknown, app: import("../types").AppClassProperties) => false | {
11
11
  appState: Readonly<import("../types").AppState>;
12
12
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
13
13
  captureUpdate: "IMMEDIATELY";
@@ -28,10 +28,15 @@ export declare const actionToggleArrowBinding: {
28
28
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
29
  boxSelectionMode: import("../types").BoxSelectionMode;
30
30
  isMidpointSnappingEnabled: boolean;
31
+ inputDevice: import("../types").InputDevice;
31
32
  suggestedBinding: {
32
33
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
33
34
  midPoint?: import("@excalidraw/math").GlobalPoint;
34
35
  } | null;
36
+ hoveredArrowTextAnchor: {
37
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
38
+ anchor: "start" | "end" | "label";
39
+ } | null;
35
40
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
36
41
  frameRendering: {
37
42
  enabled: boolean;
@@ -39,7 +44,7 @@ export declare const actionToggleArrowBinding: {
39
44
  outline: boolean;
40
45
  clip: boolean;
41
46
  };
42
- editingFrame: string | null;
47
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
43
48
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
44
49
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
45
50
  activeTool: {
@@ -58,6 +63,8 @@ export declare const actionToggleArrowBinding: {
58
63
  exportWithDarkMode: boolean;
59
64
  exportScale: number;
60
65
  currentItemStrokeColor: string;
66
+ currentItemStickynoteStrokeColor: string;
67
+ currentItemStickynoteBackgroundColor: string;
61
68
  currentItemBackgroundColor: string;
62
69
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
63
70
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -152,8 +159,6 @@ export declare const actionToggleArrowBinding: {
152
159
  y: number;
153
160
  } | null;
154
161
  objectsSnapModeEnabled: boolean;
155
- userToFollow: import("../types").UserToFollow | null;
156
- followedBy: Set<import("../types").SocketId>;
157
162
  isCropping: boolean;
158
163
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
159
164
  searchMatches: Readonly<{
@@ -165,6 +170,14 @@ export declare const actionToggleArrowBinding: {
165
170
  [groupId: string]: true;
166
171
  };
167
172
  bindMode: import("@excalidraw/element/types").BindMode;
173
+ colorTopPicks: {
174
+ elementStroke: readonly string[] | null;
175
+ elementBackground: readonly string[] | null;
176
+ bucketFill: readonly string[] | null;
177
+ stickyNoteStroke: readonly string[] | null;
178
+ stickyNoteBackground: readonly string[] | null;
179
+ };
180
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
168
181
  };
169
182
  captureUpdate: "NEVER";
170
183
  };
@@ -32,10 +32,15 @@ export declare const actionToggleGridMode: {
32
32
  boxSelectionMode: import("../types").BoxSelectionMode;
33
33
  bindingPreference: "enabled" | "disabled";
34
34
  isMidpointSnappingEnabled: boolean;
35
+ inputDevice: import("../types").InputDevice;
35
36
  suggestedBinding: {
36
37
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
37
38
  midPoint?: import("@excalidraw/math").GlobalPoint;
38
39
  } | null;
40
+ hoveredArrowTextAnchor: {
41
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
42
+ anchor: "start" | "end" | "label";
43
+ } | null;
39
44
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
40
45
  frameRendering: {
41
46
  enabled: boolean;
@@ -43,7 +48,7 @@ export declare const actionToggleGridMode: {
43
48
  outline: boolean;
44
49
  clip: boolean;
45
50
  };
46
- editingFrame: string | null;
51
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
47
52
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
48
53
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
49
54
  activeTool: {
@@ -62,6 +67,8 @@ export declare const actionToggleGridMode: {
62
67
  exportWithDarkMode: boolean;
63
68
  exportScale: number;
64
69
  currentItemStrokeColor: string;
70
+ currentItemStickynoteStrokeColor: string;
71
+ currentItemStickynoteBackgroundColor: string;
65
72
  currentItemBackgroundColor: string;
66
73
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
67
74
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -154,8 +161,6 @@ export declare const actionToggleGridMode: {
154
161
  x: number;
155
162
  y: number;
156
163
  } | null;
157
- userToFollow: import("../types").UserToFollow | null;
158
- followedBy: Set<import("../types").SocketId>;
159
164
  isCropping: boolean;
160
165
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
161
166
  searchMatches: Readonly<{
@@ -167,6 +172,14 @@ export declare const actionToggleGridMode: {
167
172
  [groupId: string]: true;
168
173
  };
169
174
  bindMode: import("@excalidraw/element/types").BindMode;
175
+ colorTopPicks: {
176
+ elementStroke: readonly string[] | null;
177
+ elementBackground: readonly string[] | null;
178
+ bucketFill: readonly string[] | null;
179
+ stickyNoteStroke: readonly string[] | null;
180
+ stickyNoteBackground: readonly string[] | null;
181
+ };
182
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
170
183
  };
171
184
  captureUpdate: "EVENTUALLY";
172
185
  };
@@ -28,10 +28,15 @@ export declare const actionToggleMidpointSnapping: {
28
28
  isBindingEnabled: boolean;
29
29
  boxSelectionMode: import("../types").BoxSelectionMode;
30
30
  bindingPreference: "enabled" | "disabled";
31
+ inputDevice: import("../types").InputDevice;
31
32
  suggestedBinding: {
32
33
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
33
34
  midPoint?: import("@excalidraw/math").GlobalPoint;
34
35
  } | null;
36
+ hoveredArrowTextAnchor: {
37
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
38
+ anchor: "start" | "end" | "label";
39
+ } | null;
35
40
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
36
41
  frameRendering: {
37
42
  enabled: boolean;
@@ -39,7 +44,7 @@ export declare const actionToggleMidpointSnapping: {
39
44
  outline: boolean;
40
45
  clip: boolean;
41
46
  };
42
- editingFrame: string | null;
47
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
43
48
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
44
49
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
45
50
  activeTool: {
@@ -58,6 +63,8 @@ export declare const actionToggleMidpointSnapping: {
58
63
  exportWithDarkMode: boolean;
59
64
  exportScale: number;
60
65
  currentItemStrokeColor: string;
66
+ currentItemStickynoteStrokeColor: string;
67
+ currentItemStickynoteBackgroundColor: string;
61
68
  currentItemBackgroundColor: string;
62
69
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
63
70
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -152,8 +159,6 @@ export declare const actionToggleMidpointSnapping: {
152
159
  y: number;
153
160
  } | null;
154
161
  objectsSnapModeEnabled: boolean;
155
- userToFollow: import("../types").UserToFollow | null;
156
- followedBy: Set<import("../types").SocketId>;
157
162
  isCropping: boolean;
158
163
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
159
164
  searchMatches: Readonly<{
@@ -165,6 +170,14 @@ export declare const actionToggleMidpointSnapping: {
165
170
  [groupId: string]: true;
166
171
  };
167
172
  bindMode: import("@excalidraw/element/types").BindMode;
173
+ colorTopPicks: {
174
+ elementStroke: readonly string[] | null;
175
+ elementBackground: readonly string[] | null;
176
+ bucketFill: readonly string[] | null;
177
+ stickyNoteStroke: readonly string[] | null;
178
+ stickyNoteBackground: readonly string[] | null;
179
+ };
180
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
168
181
  };
169
182
  captureUpdate: "NEVER";
170
183
  };
@@ -31,10 +31,15 @@ export declare const actionToggleObjectsSnapMode: {
31
31
  boxSelectionMode: import("../types").BoxSelectionMode;
32
32
  bindingPreference: "enabled" | "disabled";
33
33
  isMidpointSnappingEnabled: boolean;
34
+ inputDevice: import("../types").InputDevice;
34
35
  suggestedBinding: {
35
36
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
36
37
  midPoint?: import("@excalidraw/math").GlobalPoint;
37
38
  } | null;
39
+ hoveredArrowTextAnchor: {
40
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
41
+ anchor: "start" | "end" | "label";
42
+ } | null;
38
43
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
39
44
  frameRendering: {
40
45
  enabled: boolean;
@@ -42,7 +47,7 @@ export declare const actionToggleObjectsSnapMode: {
42
47
  outline: boolean;
43
48
  clip: boolean;
44
49
  };
45
- editingFrame: string | null;
50
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
46
51
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
47
52
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
48
53
  activeTool: {
@@ -61,6 +66,8 @@ export declare const actionToggleObjectsSnapMode: {
61
66
  exportWithDarkMode: boolean;
62
67
  exportScale: number;
63
68
  currentItemStrokeColor: string;
69
+ currentItemStickynoteStrokeColor: string;
70
+ currentItemStickynoteBackgroundColor: string;
64
71
  currentItemBackgroundColor: string;
65
72
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
66
73
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -153,8 +160,6 @@ export declare const actionToggleObjectsSnapMode: {
153
160
  x: number;
154
161
  y: number;
155
162
  } | null;
156
- userToFollow: import("../types").UserToFollow | null;
157
- followedBy: Set<import("../types").SocketId>;
158
163
  isCropping: boolean;
159
164
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
160
165
  searchMatches: Readonly<{
@@ -166,6 +171,14 @@ export declare const actionToggleObjectsSnapMode: {
166
171
  [groupId: string]: true;
167
172
  };
168
173
  bindMode: import("@excalidraw/element/types").BindMode;
174
+ colorTopPicks: {
175
+ elementStroke: readonly string[] | null;
176
+ elementBackground: readonly string[] | null;
177
+ bucketFill: readonly string[] | null;
178
+ stickyNoteStroke: readonly string[] | null;
179
+ stickyNoteBackground: readonly string[] | null;
180
+ };
181
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
169
182
  };
170
183
  captureUpdate: "EVENTUALLY";
171
184
  };
@@ -36,10 +36,15 @@ export declare const actionToggleSearchMenu: {
36
36
  boxSelectionMode: import("../types").BoxSelectionMode;
37
37
  bindingPreference: "enabled" | "disabled";
38
38
  isMidpointSnappingEnabled: boolean;
39
+ inputDevice: import("../types").InputDevice;
39
40
  suggestedBinding: {
40
41
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
41
42
  midPoint?: import("@excalidraw/math").GlobalPoint;
42
43
  } | null;
44
+ hoveredArrowTextAnchor: {
45
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
46
+ anchor: "start" | "end" | "label";
47
+ } | null;
43
48
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
44
49
  frameRendering: {
45
50
  enabled: boolean;
@@ -47,7 +52,7 @@ export declare const actionToggleSearchMenu: {
47
52
  outline: boolean;
48
53
  clip: boolean;
49
54
  };
50
- editingFrame: string | null;
55
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
51
56
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
52
57
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
53
58
  activeTool: {
@@ -66,6 +71,8 @@ export declare const actionToggleSearchMenu: {
66
71
  exportWithDarkMode: boolean;
67
72
  exportScale: number;
68
73
  currentItemStrokeColor: string;
74
+ currentItemStickynoteStrokeColor: string;
75
+ currentItemStickynoteBackgroundColor: string;
69
76
  currentItemBackgroundColor: string;
70
77
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
71
78
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -139,8 +146,6 @@ export declare const actionToggleSearchMenu: {
139
146
  y: number;
140
147
  } | null;
141
148
  objectsSnapModeEnabled: boolean;
142
- userToFollow: import("../types").UserToFollow | null;
143
- followedBy: Set<import("../types").SocketId>;
144
149
  isCropping: boolean;
145
150
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
146
151
  searchMatches: Readonly<{
@@ -152,6 +157,14 @@ export declare const actionToggleSearchMenu: {
152
157
  [groupId: string]: true;
153
158
  };
154
159
  bindMode: import("@excalidraw/element/types").BindMode;
160
+ colorTopPicks: {
161
+ elementStroke: readonly string[] | null;
162
+ elementBackground: readonly string[] | null;
163
+ bucketFill: readonly string[] | null;
164
+ stickyNoteStroke: readonly string[] | null;
165
+ stickyNoteBackground: readonly string[] | null;
166
+ };
167
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
155
168
  };
156
169
  captureUpdate: "EVENTUALLY";
157
170
  };
@@ -33,10 +33,15 @@ export declare const actionToggleStats: {
33
33
  boxSelectionMode: import("../types").BoxSelectionMode;
34
34
  bindingPreference: "enabled" | "disabled";
35
35
  isMidpointSnappingEnabled: boolean;
36
+ inputDevice: import("../types").InputDevice;
36
37
  suggestedBinding: {
37
38
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
38
39
  midPoint?: import("@excalidraw/math").GlobalPoint;
39
40
  } | null;
41
+ hoveredArrowTextAnchor: {
42
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
43
+ anchor: "start" | "end" | "label";
44
+ } | null;
40
45
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
41
46
  frameRendering: {
42
47
  enabled: boolean;
@@ -44,7 +49,7 @@ export declare const actionToggleStats: {
44
49
  outline: boolean;
45
50
  clip: boolean;
46
51
  };
47
- editingFrame: string | null;
52
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
48
53
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
49
54
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
50
55
  activeTool: {
@@ -63,6 +68,8 @@ export declare const actionToggleStats: {
63
68
  exportWithDarkMode: boolean;
64
69
  exportScale: number;
65
70
  currentItemStrokeColor: string;
71
+ currentItemStickynoteStrokeColor: string;
72
+ currentItemStickynoteBackgroundColor: string;
66
73
  currentItemBackgroundColor: string;
67
74
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
68
75
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -153,8 +160,6 @@ export declare const actionToggleStats: {
153
160
  y: number;
154
161
  } | null;
155
162
  objectsSnapModeEnabled: boolean;
156
- userToFollow: import("../types").UserToFollow | null;
157
- followedBy: Set<import("../types").SocketId>;
158
163
  isCropping: boolean;
159
164
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
160
165
  searchMatches: Readonly<{
@@ -166,6 +171,14 @@ export declare const actionToggleStats: {
166
171
  [groupId: string]: true;
167
172
  };
168
173
  bindMode: import("@excalidraw/element/types").BindMode;
174
+ colorTopPicks: {
175
+ elementStroke: readonly string[] | null;
176
+ elementBackground: readonly string[] | null;
177
+ bucketFill: readonly string[] | null;
178
+ stickyNoteStroke: readonly string[] | null;
179
+ stickyNoteBackground: readonly string[] | null;
180
+ };
181
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
169
182
  };
170
183
  captureUpdate: "EVENTUALLY";
171
184
  };
@@ -30,10 +30,15 @@ export declare const actionToggleViewMode: {
30
30
  boxSelectionMode: import("../types").BoxSelectionMode;
31
31
  bindingPreference: "enabled" | "disabled";
32
32
  isMidpointSnappingEnabled: boolean;
33
+ inputDevice: import("../types").InputDevice;
33
34
  suggestedBinding: {
34
35
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
35
36
  midPoint?: import("@excalidraw/math").GlobalPoint;
36
37
  } | null;
38
+ hoveredArrowTextAnchor: {
39
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
40
+ anchor: "start" | "end" | "label";
41
+ } | null;
37
42
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
38
43
  frameRendering: {
39
44
  enabled: boolean;
@@ -41,7 +46,7 @@ export declare const actionToggleViewMode: {
41
46
  outline: boolean;
42
47
  clip: boolean;
43
48
  };
44
- editingFrame: string | null;
49
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
45
50
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
46
51
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
47
52
  activeTool: {
@@ -60,6 +65,8 @@ export declare const actionToggleViewMode: {
60
65
  exportWithDarkMode: boolean;
61
66
  exportScale: number;
62
67
  currentItemStrokeColor: string;
68
+ currentItemStickynoteStrokeColor: string;
69
+ currentItemStickynoteBackgroundColor: string;
63
70
  currentItemBackgroundColor: string;
64
71
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
65
72
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -153,8 +160,6 @@ export declare const actionToggleViewMode: {
153
160
  y: number;
154
161
  } | null;
155
162
  objectsSnapModeEnabled: boolean;
156
- userToFollow: import("../types").UserToFollow | null;
157
- followedBy: Set<import("../types").SocketId>;
158
163
  isCropping: boolean;
159
164
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
160
165
  searchMatches: Readonly<{
@@ -166,11 +171,19 @@ export declare const actionToggleViewMode: {
166
171
  [groupId: string]: true;
167
172
  };
168
173
  bindMode: import("@excalidraw/element/types").BindMode;
174
+ colorTopPicks: {
175
+ elementStroke: readonly string[] | null;
176
+ elementBackground: readonly string[] | null;
177
+ bucketFill: readonly string[] | null;
178
+ stickyNoteStroke: readonly string[] | null;
179
+ stickyNoteBackground: readonly string[] | null;
180
+ };
181
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
169
182
  };
170
183
  captureUpdate: "EVENTUALLY";
171
184
  };
172
185
  checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
173
- predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
186
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
174
187
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
175
188
  } & {
176
189
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -30,10 +30,15 @@ export declare const actionToggleZenMode: {
30
30
  boxSelectionMode: import("../types").BoxSelectionMode;
31
31
  bindingPreference: "enabled" | "disabled";
32
32
  isMidpointSnappingEnabled: boolean;
33
+ inputDevice: import("../types").InputDevice;
33
34
  suggestedBinding: {
34
35
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
35
36
  midPoint?: import("@excalidraw/math").GlobalPoint;
36
37
  } | null;
38
+ hoveredArrowTextAnchor: {
39
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
40
+ anchor: "start" | "end" | "label";
41
+ } | null;
37
42
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
38
43
  frameRendering: {
39
44
  enabled: boolean;
@@ -41,7 +46,7 @@ export declare const actionToggleZenMode: {
41
46
  outline: boolean;
42
47
  clip: boolean;
43
48
  };
44
- editingFrame: string | null;
49
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
45
50
  elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
46
51
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
47
52
  activeTool: {
@@ -60,6 +65,8 @@ export declare const actionToggleZenMode: {
60
65
  exportWithDarkMode: boolean;
61
66
  exportScale: number;
62
67
  currentItemStrokeColor: string;
68
+ currentItemStickynoteStrokeColor: string;
69
+ currentItemStickynoteBackgroundColor: string;
63
70
  currentItemBackgroundColor: string;
64
71
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
65
72
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -153,8 +160,6 @@ export declare const actionToggleZenMode: {
153
160
  y: number;
154
161
  } | null;
155
162
  objectsSnapModeEnabled: boolean;
156
- userToFollow: import("../types").UserToFollow | null;
157
- followedBy: Set<import("../types").SocketId>;
158
163
  isCropping: boolean;
159
164
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
160
165
  searchMatches: Readonly<{
@@ -166,6 +171,14 @@ export declare const actionToggleZenMode: {
166
171
  [groupId: string]: true;
167
172
  };
168
173
  bindMode: import("@excalidraw/element/types").BindMode;
174
+ colorTopPicks: {
175
+ elementStroke: readonly string[] | null;
176
+ elementBackground: readonly string[] | null;
177
+ bucketFill: readonly string[] | null;
178
+ stickyNoteStroke: readonly string[] | null;
179
+ stickyNoteBackground: readonly string[] | null;
180
+ };
181
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
169
182
  };
170
183
  captureUpdate: "EVENTUALLY";
171
184
  };
@@ -0,0 +1,39 @@
1
+ import type { ColorPaletteCustom, ColorTuple } from "@excalidraw/common";
2
+ import type { ExcalidrawElement } from "@excalidraw/element/types";
3
+ import type { AppState } from "../types";
4
+ export type ColorProperty = "strokeColor" | "backgroundColor";
5
+ /**
6
+ * Sticky notes are their own color domain: own defaults, own top picks, no
7
+ * transparent. A pick targets the regular domain, the sticky domain, or both
8
+ * ("mixed" selections write both defaults and use the regular picker).
9
+ */
10
+ export type ColorTargetKind = "regular" | "sticky" | "mixed";
11
+ export type ColorDefaultKey = "currentItemStrokeColor" | "currentItemBackgroundColor" | "currentItemStickynoteStrokeColor" | "currentItemStickynoteBackgroundColor";
12
+ export type ColorTargetAppState = Pick<AppState, "selectedElementIds" | "editingTextElement" | "activeTool" | ColorDefaultKey>;
13
+ export type ColorTarget = {
14
+ kind: ColorTargetKind;
15
+ property: ColorProperty;
16
+ /** the current-item defaults a pick is written to (normalized per domain) */
17
+ appStateKeys: readonly ColorDefaultKey[];
18
+ /** the default shown when no element is targeted */
19
+ currentValue: string;
20
+ palette: ColorPaletteCustom;
21
+ topPicks: ColorTuple;
22
+ customizableTopPicks: keyof AppState["colorTopPicks"];
23
+ excludedColors: readonly string[] | undefined;
24
+ };
25
+ /**
26
+ * Who a stroke/background pick targets. Resolve it from the state an action
27
+ * runs against, at execution time — never capture it in a render closure:
28
+ * the memoized picker keeps a stale `onChange`, and the always-visible top
29
+ * picks fire it without a re-render.
30
+ *
31
+ * Targets are the selected color-capable elements (for stroke incl. bound
32
+ * labels, since a note's visible text is its label) plus the text being
33
+ * edited (`handleTextWysiwyg` deselects while editing) — or, for a
34
+ * background pick on a note's label, the note (see `getColorTargetElement`).
35
+ * With no target, the active tool decides the domain.
36
+ */
37
+ export declare const resolveColorTarget: (appState: ColorTargetAppState, elements: readonly ExcalidrawElement[], property: ColorProperty) => ColorTarget;
38
+ /** the current-item default updates for a picked color */
39
+ export declare const getColorTargetAppStateUpdates: (target: ColorTarget, color: string) => Partial<AppState>;