@dwelle/excalidraw 0.5.0-ddf5c00 → 0.5.0-dfd3a9a

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 (171) hide show
  1. package/dist/dev/chunk-6AV52PJO.js +5805 -0
  2. package/dist/dev/chunk-6AV52PJO.js.map +7 -0
  3. package/dist/dev/{chunk-N4RJWLSZ.js → chunk-G5DT2A72.js} +15 -5
  4. package/dist/dev/chunk-G5DT2A72.js.map +7 -0
  5. package/dist/dev/chunk-WYHOCMLG.js +7 -0
  6. package/dist/dev/chunk-WYHOCMLG.js.map +7 -0
  7. package/dist/dev/data/{image-7TSQCOPJ.js → image-CVNOYW5X.js} +3 -3
  8. package/dist/dev/index.css +104 -22
  9. package/dist/dev/index.css.map +3 -3
  10. package/dist/dev/index.js +25076 -19609
  11. package/dist/dev/index.js.map +4 -4
  12. package/dist/dev/locales/{en-KO5RAUUV.js → en-KEYRB5CP.js} +2 -2
  13. package/dist/dev/subset-shared.chunk.js +1 -1
  14. package/dist/dev/subset-worker.chunk.js +1 -1
  15. package/dist/prod/chunk-76R4CNZA.js +12 -0
  16. package/dist/prod/chunk-DHNAMUY4.js +4 -0
  17. package/dist/prod/chunk-SS5RKRMN.js +7 -0
  18. package/dist/prod/data/image-YVTXQC5H.js +1 -0
  19. package/dist/prod/index.css +1 -1
  20. package/dist/prod/index.js +33 -20
  21. package/dist/prod/locales/{en-6574ZDO2.js → en-CQGKCVPT.js} +1 -1
  22. package/dist/prod/subset-shared.chunk.js +1 -1
  23. package/dist/prod/subset-worker.chunk.js +1 -1
  24. package/dist/types/common/src/constants.d.ts +20 -3
  25. package/dist/types/{excalidraw → common/src}/emitter.d.ts +1 -1
  26. package/dist/types/common/src/font-metadata.d.ts +4 -2
  27. package/dist/types/common/src/index.d.ts +1 -0
  28. package/dist/types/common/src/utility-types.d.ts +5 -0
  29. package/dist/types/common/src/utils.d.ts +17 -4
  30. package/dist/types/{excalidraw/scene → element/src}/Scene.d.ts +11 -14
  31. package/dist/types/element/src/align.d.ts +4 -3
  32. package/dist/types/element/src/binding.d.ts +26 -16
  33. package/dist/types/element/src/bounds.d.ts +13 -5
  34. package/dist/types/element/src/collision.d.ts +18 -12
  35. package/dist/types/element/src/cropElement.d.ts +1 -1
  36. package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +63 -38
  37. package/dist/types/element/src/distance.d.ts +2 -2
  38. package/dist/types/element/src/distribute.d.ts +2 -1
  39. package/dist/types/element/src/dragElements.d.ts +3 -2
  40. package/dist/types/element/src/duplicate.d.ts +10 -13
  41. package/dist/types/element/src/elbowArrow.d.ts +1 -1
  42. package/dist/types/element/src/flowchart.d.ts +3 -2
  43. package/dist/types/element/src/fractionalIndex.d.ts +9 -3
  44. package/dist/types/element/src/frame.d.ts +5 -4
  45. package/dist/types/element/src/groups.d.ts +1 -0
  46. package/dist/types/element/src/index.d.ts +43 -2
  47. package/dist/types/element/src/linearElementEditor.d.ts +22 -36
  48. package/dist/types/element/src/mutateElement.d.ts +11 -3
  49. package/dist/types/element/src/newElement.d.ts +4 -3
  50. package/dist/types/element/src/resizeElements.d.ts +5 -4
  51. package/dist/types/element/src/selection.d.ts +11 -5
  52. package/dist/types/element/src/shape.d.ts +42 -0
  53. package/dist/types/element/src/sizeHelpers.d.ts +2 -2
  54. package/dist/types/element/src/store.d.ts +232 -0
  55. package/dist/types/element/src/textElement.d.ts +4 -3
  56. package/dist/types/element/src/typeChecks.d.ts +19 -1
  57. package/dist/types/element/src/types.d.ts +15 -2
  58. package/dist/types/element/src/utils.d.ts +16 -6
  59. package/dist/types/element/src/zindex.d.ts +1 -1
  60. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +42 -51
  61. package/dist/types/excalidraw/actions/actionBoundText.d.ts +28 -34
  62. package/dist/types/excalidraw/actions/actionCanvas.d.ts +188 -227
  63. package/dist/types/excalidraw/actions/actionClipboard.d.ts +81 -98
  64. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +14 -17
  65. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +37 -45
  66. package/dist/types/excalidraw/actions/actionElementLink.d.ts +13 -16
  67. package/dist/types/excalidraw/actions/actionElementLock.d.ts +43 -50
  68. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +14 -17
  69. package/dist/types/excalidraw/actions/actionExport.d.ts +141 -168
  70. package/dist/types/excalidraw/actions/actionFinalize.d.ts +71 -37
  71. package/dist/types/excalidraw/actions/actionFrame.d.ts +103 -115
  72. package/dist/types/excalidraw/actions/actionGroup.d.ts +28 -34
  73. package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
  74. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +506 -16
  75. package/dist/types/excalidraw/actions/actionLink.d.ts +13 -16
  76. package/dist/types/excalidraw/actions/actionMenu.d.ts +39 -48
  77. package/dist/types/excalidraw/actions/actionNavigate.d.ts +27 -33
  78. package/dist/types/excalidraw/actions/actionProperties.d.ts +203 -240
  79. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +13 -16
  80. package/dist/types/excalidraw/actions/actionStyles.d.ts +14 -17
  81. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +14 -17
  82. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +14 -17
  83. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +13 -189
  84. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
  85. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +14 -17
  86. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +14 -17
  87. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +14 -17
  88. package/dist/types/excalidraw/actions/types.d.ts +4 -3
  89. package/dist/types/excalidraw/appState.d.ts +20 -11
  90. package/dist/types/excalidraw/components/App.d.ts +31 -19
  91. package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
  92. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
  93. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
  94. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
  95. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
  96. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
  97. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
  98. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  99. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  100. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  101. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
  102. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +4 -3
  103. package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
  104. package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
  105. package/dist/types/excalidraw/components/Range.d.ts +3 -3
  106. package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  107. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  108. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  109. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  110. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +12 -2
  111. package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  112. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  113. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  114. package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  115. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  116. package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
  117. package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -11
  118. package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
  119. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  120. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  121. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
  122. package/dist/types/excalidraw/components/icons.d.ts +3 -0
  123. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  124. package/dist/types/excalidraw/data/transform.d.ts +1 -1
  125. package/dist/types/excalidraw/editor-jotai.d.ts +6 -6
  126. package/dist/types/excalidraw/eraser/index.d.ts +0 -2
  127. package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
  128. package/dist/types/excalidraw/history.d.ts +30 -22
  129. package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
  130. package/dist/types/excalidraw/index.d.ts +10 -9
  131. package/dist/types/excalidraw/lasso/index.d.ts +1 -0
  132. package/dist/types/excalidraw/lasso/utils.d.ts +2 -1
  133. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -1
  134. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -2
  135. package/dist/types/excalidraw/scene/export.d.ts +1 -1
  136. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  137. package/dist/types/excalidraw/scene/scrollbars.d.ts +2 -3
  138. package/dist/types/excalidraw/scene/types.d.ts +2 -0
  139. package/dist/types/excalidraw/snapping.d.ts +2 -2
  140. package/dist/types/excalidraw/types.d.ts +30 -10
  141. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
  142. package/dist/types/math/src/angle.d.ts +2 -0
  143. package/dist/types/math/src/constants.d.ts +3 -0
  144. package/dist/types/math/src/curve.d.ts +34 -0
  145. package/dist/types/math/src/index.d.ts +1 -0
  146. package/dist/types/math/src/point.d.ts +1 -1
  147. package/dist/types/math/src/rectangle.d.ts +2 -0
  148. package/dist/types/math/src/vector.d.ts +8 -2
  149. package/dist/types/utils/src/bbox.d.ts +1 -1
  150. package/dist/types/utils/src/index.d.ts +1 -1
  151. package/dist/types/utils/src/withinBounds.d.ts +1 -1
  152. package/history.ts +147 -110
  153. package/package.json +11 -8
  154. package/dist/dev/chunk-N4RJWLSZ.js.map +0 -7
  155. package/dist/dev/chunk-U4RZP56O.js +0 -18849
  156. package/dist/dev/chunk-U4RZP56O.js.map +0 -7
  157. package/dist/dev/chunk-XCMEWBOW.js +0 -7
  158. package/dist/dev/chunk-XCMEWBOW.js.map +0 -7
  159. package/dist/prod/chunk-3ZKFSMTS.js +0 -7
  160. package/dist/prod/chunk-OYRPRL6F.js +0 -12
  161. package/dist/prod/chunk-YO4ODNEY.js +0 -33
  162. package/dist/prod/data/image-TCFXBYOI.js +0 -1
  163. package/dist/types/element/src/Shape.d.ts +0 -17
  164. package/dist/types/element/src/ShapeCache.d.ts +0 -25
  165. package/dist/types/element/src/shapes.d.ts +0 -23
  166. package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
  167. package/dist/types/excalidraw/store.d.ts +0 -129
  168. package/dist/types/excalidraw/visualdebug.d.ts +0 -41
  169. package/dist/types/utils/src/collision.d.ts +0 -8
  170. /package/dist/dev/data/{image-7TSQCOPJ.js.map → image-CVNOYW5X.js.map} +0 -0
  171. /package/dist/dev/locales/{en-KO5RAUUV.js.map → en-KEYRB5CP.js.map} +0 -0
@@ -24,7 +24,7 @@ export declare const actionToggleStats: {
24
24
  errorMessage: import("react").ReactNode;
25
25
  activeEmbeddable: {
26
26
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
27
- state: "hover" | "active";
27
+ state: "active" | "hover";
28
28
  } | null;
29
29
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
30
30
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -32,7 +32,7 @@ export declare const actionToggleStats: {
32
32
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
33
33
  isBindingEnabled: boolean;
34
34
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
35
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
36
36
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
37
37
  frameRendering: {
38
38
  enabled: boolean;
@@ -43,7 +43,7 @@ export declare const actionToggleStats: {
43
43
  editingFrame: string | null;
44
44
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
45
45
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
46
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
46
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
47
47
  activeTool: {
48
48
  lastActiveTool: import("../types").ActiveTool | null;
49
49
  locked: boolean;
@@ -81,7 +81,7 @@ export declare const actionToggleStats: {
81
81
  zoom: Readonly<{
82
82
  value: import("../types").NormalizedZoomValue;
83
83
  }>;
84
- openMenu: "shape" | "canvas" | null;
84
+ openMenu: "canvas" | "shape" | null;
85
85
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
86
86
  openSidebar: {
87
87
  name: string;
@@ -91,7 +91,7 @@ export declare const actionToggleStats: {
91
91
  name: "imageExport" | "help" | "jsonExport";
92
92
  } | {
93
93
  name: "ttd";
94
- tab: "text-to-diagram" | "mermaid";
94
+ tab: "mermaid" | "text-to-diagram";
95
95
  } | {
96
96
  name: "commandPalette";
97
97
  } | {
@@ -159,9 +159,8 @@ export declare const actionToggleStats: {
159
159
  shown: true;
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
- pendingImageElementId: string | null;
163
162
  showHyperlinkPopup: false | "editor" | "info";
164
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
163
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
164
  snapLines: readonly import("../snapping").SnapLine[];
166
165
  originSnapOffset: {
167
166
  x: number;
@@ -172,16 +171,14 @@ export declare const actionToggleStats: {
172
171
  followedBy: Set<import("../types").SocketId>;
173
172
  isCropping: boolean;
174
173
  croppingElementId: string | null;
175
- searchMatches: readonly {
176
- id: string;
177
- focus: boolean;
178
- matchedLines: {
179
- offsetX: number;
180
- offsetY: number;
181
- width: number;
182
- height: number;
183
- }[];
184
- }[];
174
+ searchMatches: Readonly<{
175
+ focusedId: string | null;
176
+ matches: readonly import("../types").SearchMatch[];
177
+ }> | null;
178
+ activeLockedId: string | null;
179
+ lockedMultiSelections: {
180
+ [groupId: string]: true;
181
+ };
185
182
  };
186
183
  captureUpdate: "EVENTUALLY";
187
184
  };
@@ -21,7 +21,7 @@ export declare const actionToggleViewMode: {
21
21
  errorMessage: import("react").ReactNode;
22
22
  activeEmbeddable: {
23
23
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
24
- state: "hover" | "active";
24
+ state: "active" | "hover";
25
25
  } | null;
26
26
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
27
27
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -29,7 +29,7 @@ export declare const actionToggleViewMode: {
29
29
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
30
30
  isBindingEnabled: boolean;
31
31
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
32
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
32
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
33
33
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
34
34
  frameRendering: {
35
35
  enabled: boolean;
@@ -40,7 +40,7 @@ export declare const actionToggleViewMode: {
40
40
  editingFrame: string | null;
41
41
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
42
42
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
43
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
43
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
44
44
  activeTool: {
45
45
  lastActiveTool: import("../types").ActiveTool | null;
46
46
  locked: boolean;
@@ -78,7 +78,7 @@ export declare const actionToggleViewMode: {
78
78
  zoom: Readonly<{
79
79
  value: import("../types").NormalizedZoomValue;
80
80
  }>;
81
- openMenu: "shape" | "canvas" | null;
81
+ openMenu: "canvas" | "shape" | null;
82
82
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
83
  openSidebar: {
84
84
  name: string;
@@ -88,7 +88,7 @@ export declare const actionToggleViewMode: {
88
88
  name: "imageExport" | "help" | "jsonExport";
89
89
  } | {
90
90
  name: "ttd";
91
- tab: "text-to-diagram" | "mermaid";
91
+ tab: "mermaid" | "text-to-diagram";
92
92
  } | {
93
93
  name: "commandPalette";
94
94
  } | {
@@ -159,9 +159,8 @@ export declare const actionToggleViewMode: {
159
159
  shown: true;
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
- pendingImageElementId: string | null;
163
162
  showHyperlinkPopup: false | "editor" | "info";
164
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
163
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
164
  snapLines: readonly import("../snapping").SnapLine[];
166
165
  originSnapOffset: {
167
166
  x: number;
@@ -172,16 +171,14 @@ export declare const actionToggleViewMode: {
172
171
  followedBy: Set<import("../types").SocketId>;
173
172
  isCropping: boolean;
174
173
  croppingElementId: string | null;
175
- searchMatches: readonly {
176
- id: string;
177
- focus: boolean;
178
- matchedLines: {
179
- offsetX: number;
180
- offsetY: number;
181
- width: number;
182
- height: number;
183
- }[];
184
- }[];
174
+ searchMatches: Readonly<{
175
+ focusedId: string | null;
176
+ matches: readonly import("../types").SearchMatch[];
177
+ }> | null;
178
+ activeLockedId: string | null;
179
+ lockedMultiSelections: {
180
+ [groupId: string]: true;
181
+ };
185
182
  };
186
183
  captureUpdate: "EVENTUALLY";
187
184
  };
@@ -21,7 +21,7 @@ export declare const actionToggleZenMode: {
21
21
  errorMessage: import("react").ReactNode;
22
22
  activeEmbeddable: {
23
23
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
24
- state: "hover" | "active";
24
+ state: "active" | "hover";
25
25
  } | null;
26
26
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
27
27
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -29,7 +29,7 @@ export declare const actionToggleZenMode: {
29
29
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
30
30
  isBindingEnabled: boolean;
31
31
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
32
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
32
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
33
33
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
34
34
  frameRendering: {
35
35
  enabled: boolean;
@@ -40,7 +40,7 @@ export declare const actionToggleZenMode: {
40
40
  editingFrame: string | null;
41
41
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
42
42
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
43
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
43
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
44
44
  activeTool: {
45
45
  lastActiveTool: import("../types").ActiveTool | null;
46
46
  locked: boolean;
@@ -78,7 +78,7 @@ export declare const actionToggleZenMode: {
78
78
  zoom: Readonly<{
79
79
  value: import("../types").NormalizedZoomValue;
80
80
  }>;
81
- openMenu: "shape" | "canvas" | null;
81
+ openMenu: "canvas" | "shape" | null;
82
82
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
83
83
  openSidebar: {
84
84
  name: string;
@@ -88,7 +88,7 @@ export declare const actionToggleZenMode: {
88
88
  name: "imageExport" | "help" | "jsonExport";
89
89
  } | {
90
90
  name: "ttd";
91
- tab: "text-to-diagram" | "mermaid";
91
+ tab: "mermaid" | "text-to-diagram";
92
92
  } | {
93
93
  name: "commandPalette";
94
94
  } | {
@@ -159,9 +159,8 @@ export declare const actionToggleZenMode: {
159
159
  shown: true;
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
- pendingImageElementId: string | null;
163
162
  showHyperlinkPopup: false | "editor" | "info";
164
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
163
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
164
  snapLines: readonly import("../snapping").SnapLine[];
166
165
  originSnapOffset: {
167
166
  x: number;
@@ -172,16 +171,14 @@ export declare const actionToggleZenMode: {
172
171
  followedBy: Set<import("../types").SocketId>;
173
172
  isCropping: boolean;
174
173
  croppingElementId: string | null;
175
- searchMatches: readonly {
176
- id: string;
177
- focus: boolean;
178
- matchedLines: {
179
- offsetX: number;
180
- offsetY: number;
181
- width: number;
182
- height: number;
183
- }[];
184
- }[];
174
+ searchMatches: Readonly<{
175
+ focusedId: string | null;
176
+ matches: readonly import("../types").SearchMatch[];
177
+ }> | null;
178
+ activeLockedId: string | null;
179
+ lockedMultiSelections: {
180
+ [groupId: string]: true;
181
+ };
185
182
  };
186
183
  captureUpdate: "EVENTUALLY";
187
184
  };
@@ -1,5 +1,5 @@
1
1
  import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
2
- import type { CaptureUpdateActionType } from "../store";
2
+ import type { CaptureUpdateActionType } from "@excalidraw/element";
3
3
  import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
4
4
  import type React from "react";
5
5
  export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
@@ -14,7 +14,7 @@ export type ActionResult = {
14
14
  type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
15
15
  export type UpdaterFn = (res: ActionResult) => void;
16
16
  export type ActionFilterFn = (action: Action) => void;
17
- export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool";
17
+ export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -22,6 +22,7 @@ export type PanelComponentProps = {
22
22
  appProps: ExcalidrawProps;
23
23
  data?: Record<string, any>;
24
24
  app: AppClassProperties;
25
+ renderAction: (name: ActionName, data?: PanelComponentProps["data"]) => React.JSX.Element | null;
25
26
  };
26
27
  export interface Action {
27
28
  name: ActionName;
@@ -35,7 +36,7 @@ export interface Action {
35
36
  predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
36
37
  checked?: (appState: Readonly<AppState>) => boolean;
37
38
  trackEvent: false | {
38
- category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu";
39
+ category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu" | "shape_switch";
39
40
  action?: string;
40
41
  predicate?: (appState: Readonly<AppState>, elements: readonly ExcalidrawElement[], value: any) => boolean;
41
42
  };
@@ -16,25 +16,20 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
16
16
  selectedGroupIds?: {
17
17
  [groupId: string]: boolean;
18
18
  } | undefined;
19
- selectedLinearElement?: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null | undefined;
19
+ selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
20
20
  zenModeEnabled?: boolean | undefined;
21
- gridModeEnabled?: boolean | undefined;
22
- objectsSnapModeEnabled?: boolean | undefined;
21
+ showWelcomeScreen?: boolean | undefined;
23
22
  activeTool?: ({
24
23
  lastActiveTool: import("./types").ActiveTool | null;
25
24
  locked: boolean;
26
25
  fromSelection: boolean;
27
26
  } & import("./types").ActiveTool) | undefined;
28
- shouldCacheIgnoreZoom?: boolean | undefined;
29
- exportScale?: number | undefined;
30
- gridSize?: number | undefined;
31
- gridStep?: number | undefined;
32
- showWelcomeScreen?: boolean | undefined;
33
27
  penMode?: boolean | undefined;
34
28
  penDetected?: boolean | undefined;
35
29
  exportBackground?: boolean | undefined;
36
30
  exportEmbedScene?: boolean | undefined;
37
31
  exportWithDarkMode?: boolean | undefined;
32
+ exportScale?: number | undefined;
38
33
  currentItemStrokeColor?: string | undefined;
39
34
  currentItemBackgroundColor?: string | undefined;
40
35
  currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
@@ -51,7 +46,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
51
46
  currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
52
47
  cursorButton?: "up" | "down" | undefined;
53
48
  scrolledOutside?: boolean | undefined;
54
- openMenu?: "shape" | "canvas" | null | undefined;
49
+ openMenu?: "canvas" | "shape" | null | undefined;
55
50
  openSidebar?: {
56
51
  name: string;
57
52
  tab?: string | undefined;
@@ -61,23 +56,37 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
61
56
  previousSelectedElementIds?: {
62
57
  [id: string]: true;
63
58
  } | undefined;
59
+ shouldCacheIgnoreZoom?: boolean | undefined;
60
+ gridSize?: number | undefined;
61
+ gridStep?: number | undefined;
62
+ gridModeEnabled?: boolean | undefined;
64
63
  stats?: {
65
64
  open: boolean;
66
65
  panels: number;
67
66
  } | undefined;
68
67
  currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
68
+ objectsSnapModeEnabled?: boolean | undefined;
69
+ lockedMultiSelections?: {
70
+ [groupId: string]: true;
71
+ } | undefined;
69
72
  };
70
73
  export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
71
74
  viewBackgroundColor?: string | undefined;
72
- gridModeEnabled?: boolean | undefined;
73
75
  gridSize?: number | undefined;
74
76
  gridStep?: number | undefined;
77
+ gridModeEnabled?: boolean | undefined;
78
+ lockedMultiSelections?: {
79
+ [groupId: string]: true;
80
+ } | undefined;
75
81
  };
76
82
  export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
77
83
  viewBackgroundColor?: string | undefined;
78
- gridModeEnabled?: boolean | undefined;
79
84
  gridSize?: number | undefined;
80
85
  gridStep?: number | undefined;
86
+ gridModeEnabled?: boolean | undefined;
87
+ lockedMultiSelections?: {
88
+ [groupId: string]: true;
89
+ } | undefined;
81
90
  };
82
91
  export declare const isEraserActive: ({ activeTool, }: {
83
92
  activeTool: AppState["activeTool"];
@@ -1,16 +1,15 @@
1
1
  import React from "react";
2
- import { type EXPORT_IMAGE_TYPES } from "@excalidraw/common";
3
- import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
4
- import { FlowChartCreator } from "@excalidraw/element/flowchart";
5
- import type { ExcalidrawElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
2
+ import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
3
+ import { LinearElementEditor, FlowChartCreator } from "@excalidraw/element";
4
+ import { Scene, Store, type ElementUpdate } from "@excalidraw/element";
5
+ import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
6
+ import type { Mutable } from "@excalidraw/common/utility-types";
6
7
  import { ActionManager } from "../actions/manager";
7
8
  import { AnimationFrameHandler } from "../animation-frame-handler";
8
9
  import { History } from "../history";
9
- import Scene from "../scene/Scene";
10
10
  import { Fonts } from "../fonts";
11
+ import { type WritableAtom } from "../editor-jotai";
11
12
  import { Renderer } from "../scene/Renderer";
12
- import { Emitter } from "../emitter";
13
- import { Store } from "../store";
14
13
  import { LaserTrails } from "../laser-trails";
15
14
  import { LassoTrail } from "../lasso";
16
15
  import { EraserTrail } from "../eraser";
@@ -80,6 +79,7 @@ declare class App extends React.Component<AppProps, AppState> {
80
79
  /** embeds that have been inserted to DOM (as a perf optim, we don't want to
81
80
  * insert to DOM before user initially scrolls to them) */
82
81
  private initializedEmbeds;
82
+ private handleToastClose;
83
83
  private elementsPendingErasure;
84
84
  flowChartCreator: FlowChartCreator;
85
85
  private flowChartNavigator;
@@ -124,7 +124,7 @@ declare class App extends React.Component<AppProps, AppState> {
124
124
  };
125
125
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
126
126
  resize: {
127
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
127
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
128
128
  isResizing: boolean;
129
129
  offset: {
130
130
  x: number;
@@ -150,6 +150,10 @@ declare class App extends React.Component<AppProps, AppState> {
150
150
  x: number;
151
151
  y: number;
152
152
  } | null;
153
+ origin: {
154
+ x: number;
155
+ y: number;
156
+ };
153
157
  };
154
158
  eventListeners: {
155
159
  onMove: {
@@ -189,7 +193,7 @@ declare class App extends React.Component<AppProps, AppState> {
189
193
  };
190
194
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
191
195
  resize: {
192
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
196
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
193
197
  isResizing: boolean;
194
198
  offset: {
195
199
  x: number;
@@ -215,6 +219,10 @@ declare class App extends React.Component<AppProps, AppState> {
215
219
  x: number;
216
220
  y: number;
217
221
  } | null;
222
+ origin: {
223
+ x: number;
224
+ y: number;
225
+ };
218
226
  };
219
227
  eventListeners: {
220
228
  onMove: {
@@ -237,6 +245,7 @@ declare class App extends React.Component<AppProps, AppState> {
237
245
  missingPointerEventCleanupEmitter: Emitter<[event: PointerEvent | null]>;
238
246
  onRemoveEventListenersEmitter: Emitter<[]>;
239
247
  constructor(props: AppProps);
248
+ updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
240
249
  private onWindowMessage;
241
250
  private cacheEmbeddableRef;
242
251
  /**
@@ -258,6 +267,7 @@ declare class App extends React.Component<AppProps, AppState> {
258
267
  render(): import("react/jsx-runtime").JSX.Element;
259
268
  focusContainer: AppClassProperties["focusContainer"];
260
269
  getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
270
+ getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
261
271
  getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
262
272
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
263
273
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
@@ -388,6 +398,7 @@ declare class App extends React.Component<AppProps, AppState> {
388
398
  */
389
399
  captureUpdate?: SceneData["captureUpdate"];
390
400
  }) => void;
401
+ mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
391
402
  private triggerRender;
392
403
  /**
393
404
  * @returns whether the menu was toggled on or off
@@ -402,12 +413,9 @@ declare class App extends React.Component<AppProps, AppState> {
402
413
  private onKeyDown;
403
414
  private onKeyUp;
404
415
  private isToolSupported;
405
- setActiveTool: (tool: (({
406
- type: Exclude<ToolType, "image">;
416
+ setActiveTool: (tool: ({
417
+ type: ToolType;
407
418
  } | {
408
- type: Extract<ToolType, "image">;
409
- insertOnCanvasDirectly?: boolean;
410
- }) | {
411
419
  type: "custom";
412
420
  customType: string;
413
421
  }) & {
@@ -433,7 +441,7 @@ declare class App extends React.Component<AppProps, AppState> {
433
441
  private getTextElementAtPosition;
434
442
  private getElementAtPosition;
435
443
  private getElementsAtPosition;
436
- getElementHitThreshold(): number;
444
+ getElementHitThreshold(element: ExcalidrawElement): number;
437
445
  private hitElement;
438
446
  private getTextBindableContainerAtPosition;
439
447
  private startTextEditing;
@@ -496,13 +504,18 @@ declare class App extends React.Component<AppProps, AppState> {
496
504
  private restoreReadyToEraseElements;
497
505
  private eraseElements;
498
506
  private initializeImage;
507
+ /**
508
+ * use during async image initialization,
509
+ * when the placeholder image could have been modified in the meantime,
510
+ * and when you don't want to loose those modifications
511
+ */
512
+ private getLatestInitializedImageElement;
499
513
  /**
500
514
  * inserts image into elements array and rerenders
501
515
  */
502
- insertImageElement: (imageElement: ExcalidrawImageElement, imageFile: File, showCursorImagePreview?: boolean) => Promise<NonDeleted<InitializedExcalidrawImageElement> | null | undefined>;
503
- private setImagePreviewCursor;
516
+ private insertImageElement;
504
517
  private onImageAction;
505
- initializeImageDimensions: (imageElement: ExcalidrawImageElement, forceNaturalSize?: boolean) => void;
518
+ private getImageNaturalDimensions;
506
519
  /** updates image cache, refreshing updated elements and/or setting status
507
520
  to error for images that fail during <img> element creation */
508
521
  private updateImageCache;
@@ -513,7 +526,6 @@ declare class App extends React.Component<AppProps, AppState> {
513
526
  private scheduleImageRefresh;
514
527
  private updateBindingEnabledOnPointerMove;
515
528
  private maybeSuggestBindingAtCursor;
516
- private maybeSuggestBindingsForLinearElementAtCoords;
517
529
  private clearSelection;
518
530
  private handleInteractiveCanvasRef;
519
531
  private handleAppOnDrop;
@@ -10,6 +10,7 @@ interface ButtonIconProps {
10
10
  /** include standalone style (could interfere with parent styles) */
11
11
  standalone?: boolean;
12
12
  onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
13
+ style?: React.CSSProperties;
13
14
  }
14
15
  export declare const ButtonIcon: import("react").ForwardRefExoticComponent<ButtonIconProps & import("react").RefAttributes<HTMLButtonElement>>;
15
16
  export {};
@@ -4,6 +4,7 @@ interface ColorInputProps {
4
4
  onChange: (color: string) => void;
5
5
  label: string;
6
6
  colorPickerType: ColorPickerType;
7
+ placeholder?: string;
7
8
  }
8
- export declare const ColorInput: ({ color, onChange, label, colorPickerType, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -6,7 +6,11 @@ import type { AppState } from "../../types";
6
6
  export declare const getColor: (color: string) => string | null;
7
7
  interface ColorPickerProps {
8
8
  type: ColorPickerType;
9
- color: string;
9
+ /**
10
+ * null indicates no color should be displayed as active
11
+ * (e.g. when multiple shapes selected with different colors)
12
+ */
13
+ color: string | null;
10
14
  onChange: (color: string) => void;
11
15
  label: string;
12
16
  elements: readonly ExcalidrawElement[];
@@ -1,6 +1,6 @@
1
1
  interface CustomColorListProps {
2
2
  colors: string[];
3
- color: string;
3
+ color: string | null;
4
4
  onChange: (color: string) => void;
5
5
  label: string;
6
6
  }
@@ -3,9 +3,8 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
3
3
  import type { ColorPaletteCustom } from "@excalidraw/common";
4
4
  import type { ColorPickerType } from "./colorPickerUtils";
5
5
  interface PickerProps {
6
- color: string;
6
+ color: string | null;
7
7
  onChange: (color: string) => void;
8
- label: string;
9
8
  type: ColorPickerType;
10
9
  elements: readonly ExcalidrawElement[];
11
10
  palette: ColorPaletteCustom;
@@ -14,5 +13,5 @@ interface PickerProps {
14
13
  onEyeDropperToggle: (force?: boolean) => void;
15
14
  onEscape: (event: React.KeyboardEvent | KeyboardEvent) => void;
16
15
  }
17
- export declare const Picker: ({ color, onChange, label, type, elements, palette, updateData, children, onEyeDropperToggle, onEscape, }: PickerProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const Picker: React.ForwardRefExoticComponent<PickerProps & React.RefAttributes<unknown>>;
18
17
  export {};
@@ -1,10 +1,9 @@
1
1
  import type { ColorPaletteCustom } from "@excalidraw/common";
2
2
  interface PickerColorListProps {
3
3
  palette: ColorPaletteCustom;
4
- color: string;
4
+ color: string | null;
5
5
  onChange: (color: string) => void;
6
- label: string;
7
6
  activeShade: number;
8
7
  }
9
- declare const PickerColorList: ({ palette, color, onChange, label, activeShade, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const PickerColorList: ({ palette, color, onChange, activeShade, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
10
9
  export default PickerColorList;
@@ -1,8 +1,8 @@
1
1
  import type { ColorPaletteCustom } from "@excalidraw/common";
2
2
  interface ShadeListProps {
3
- hex: string;
3
+ color: string | null;
4
4
  onChange: (color: string) => void;
5
5
  palette: ColorPaletteCustom;
6
6
  }
7
- export declare const ShadeList: ({ hex, onChange, palette }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const ShadeList: ({ color, onChange, palette }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -2,7 +2,7 @@ import type { ColorPickerType } from "./colorPickerUtils";
2
2
  interface TopPicksProps {
3
3
  onChange: (color: string) => void;
4
4
  type: ColorPickerType;
5
- activeColor: string;
5
+ activeColor: string | null;
6
6
  topPicks?: readonly string[];
7
7
  }
8
8
  export declare const TopPicks: ({ onChange, type, activeColor, topPicks, }: TopPicksProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -2,7 +2,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
2
2
  import type { ColorPickerColor, ColorPaletteCustom } from "@excalidraw/common";
3
3
  export declare const getColorNameAndShadeFromColor: ({ palette, color, }: {
4
4
  palette: ColorPaletteCustom;
5
- color: string;
5
+ color: string | null;
6
6
  }) => {
7
7
  colorName: ColorPickerColor;
8
8
  shade: number | null;
@@ -5,7 +5,7 @@ interface ColorPickerKeyNavHandlerProps {
5
5
  event: React.KeyboardEvent;
6
6
  activeColorPickerSection: ActiveColorPickerSectionAtomType;
7
7
  palette: ColorPaletteCustom;
8
- color: string;
8
+ color: string | null;
9
9
  onChange: (color: string) => void;
10
10
  customColors: string[];
11
11
  setActiveColorPickerSection: (update: React.SetStateAction<ActiveColorPickerSectionAtomType>) => void;