@excalidraw/excalidraw 0.18.0-6fc8502 → 0.18.0-864353b

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 (164) hide show
  1. package/dist/dev/{chunk-X3RYHLJU.js → chunk-7YMZV3TY.js} +14 -4
  2. package/dist/dev/chunk-7YMZV3TY.js.map +7 -0
  3. package/dist/dev/chunk-BBNNHA7I.js +7 -0
  4. package/dist/dev/chunk-BBNNHA7I.js.map +7 -0
  5. package/dist/dev/{chunk-KYBDXI6F.js → chunk-LL55DS44.js} +15037 -10099
  6. package/dist/dev/chunk-LL55DS44.js.map +7 -0
  7. package/dist/dev/data/{image-NKFINVKH.js → image-OFYK7EOY.js} +3 -3
  8. package/dist/dev/index.css +100 -22
  9. package/dist/dev/index.css.map +3 -3
  10. package/dist/dev/index.js +3531 -6486
  11. package/dist/dev/index.js.map +4 -4
  12. package/dist/dev/locales/{en-CKWC2GMK.js → en-KIY5SGI3.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-F44EGBV2.js +33 -0
  16. package/dist/prod/{chunk-IUH5AXLB.js → chunk-OUULIERA.js} +4 -4
  17. package/dist/prod/chunk-UH6Q3EIV.js +7 -0
  18. package/dist/prod/data/image-CUOH64HE.js +1 -0
  19. package/dist/prod/index.css +1 -1
  20. package/dist/prod/index.js +18 -17
  21. package/dist/prod/locales/{en-SBO6ZHT2.js → en-GCLCIHXH.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 +11 -1
  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 +22 -4
  30. package/dist/types/{excalidraw/scene → element/src}/Scene.d.ts +11 -14
  31. package/dist/types/element/src/ShapeCache.d.ts +1 -1
  32. package/dist/types/element/src/align.d.ts +3 -3
  33. package/dist/types/element/src/binding.d.ts +19 -12
  34. package/dist/types/element/src/bounds.d.ts +2 -2
  35. package/dist/types/element/src/collision.d.ts +1 -1
  36. package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +40 -35
  37. package/dist/types/element/src/dragElements.d.ts +3 -2
  38. package/dist/types/element/src/duplicate.d.ts +10 -13
  39. package/dist/types/element/src/elbowArrow.d.ts +1 -1
  40. package/dist/types/element/src/flowchart.d.ts +3 -2
  41. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  42. package/dist/types/element/src/frame.d.ts +5 -4
  43. package/dist/types/element/src/index.d.ts +45 -2
  44. package/dist/types/element/src/linearElementEditor.d.ts +20 -31
  45. package/dist/types/element/src/mutateElement.d.ts +10 -2
  46. package/dist/types/element/src/newElement.d.ts +4 -3
  47. package/dist/types/element/src/resizeElements.d.ts +4 -4
  48. package/dist/types/element/src/selection.d.ts +11 -5
  49. package/dist/types/element/src/shapes.d.ts +5 -1
  50. package/dist/types/element/src/sizeHelpers.d.ts +2 -2
  51. package/dist/types/element/src/store.d.ts +227 -0
  52. package/dist/types/element/src/textElement.d.ts +5 -3
  53. package/dist/types/element/src/transformHandles.d.ts +4 -4
  54. package/dist/types/element/src/typeChecks.d.ts +15 -1
  55. package/dist/types/element/src/types.d.ts +14 -1
  56. package/dist/types/element/src/zindex.d.ts +1 -1
  57. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +39 -45
  58. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  59. package/dist/types/excalidraw/actions/actionBoundText.d.ts +26 -30
  60. package/dist/types/excalidraw/actions/actionCanvas.d.ts +262 -288
  61. package/dist/types/excalidraw/actions/actionClipboard.d.ts +81 -92
  62. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -15
  63. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +38 -43
  64. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  65. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  66. package/dist/types/excalidraw/actions/actionElementLink.d.ts +13 -15
  67. package/dist/types/excalidraw/actions/actionElementLock.d.ts +41 -46
  68. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -15
  69. package/dist/types/excalidraw/actions/actionExport.d.ts +210 -228
  70. package/dist/types/excalidraw/actions/actionFinalize.d.ts +72 -36
  71. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  72. package/dist/types/excalidraw/actions/actionFrame.d.ts +96 -104
  73. package/dist/types/excalidraw/actions/actionGroup.d.ts +32 -36
  74. package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
  75. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +505 -14
  76. package/dist/types/excalidraw/actions/actionLink.d.ts +13 -15
  77. package/dist/types/excalidraw/actions/actionMenu.d.ts +39 -45
  78. package/dist/types/excalidraw/actions/actionNavigate.d.ts +25 -29
  79. package/dist/types/excalidraw/actions/actionProperties.d.ts +192 -214
  80. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +15 -17
  81. package/dist/types/excalidraw/actions/actionStyles.d.ts +17 -19
  82. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +15 -17
  83. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +15 -17
  84. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +15 -190
  85. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
  86. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +15 -17
  87. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +15 -17
  88. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +15 -17
  89. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  90. package/dist/types/excalidraw/actions/types.d.ts +4 -3
  91. package/dist/types/excalidraw/appState.d.ts +38 -29
  92. package/dist/types/excalidraw/components/App.d.ts +24 -11
  93. package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
  94. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
  95. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
  96. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
  97. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
  98. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
  99. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
  100. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  101. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  102. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  103. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
  104. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +4 -3
  105. package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
  106. package/dist/types/excalidraw/components/Range.d.ts +3 -3
  107. package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  108. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  109. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  110. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  111. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
  112. package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  113. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  114. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  115. package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  116. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  117. package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
  118. package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -11
  119. package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
  120. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  121. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  122. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
  123. package/dist/types/excalidraw/components/icons.d.ts +3 -0
  124. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  125. package/dist/types/excalidraw/data/blob.d.ts +1 -1
  126. package/dist/types/excalidraw/data/transform.d.ts +1 -1
  127. package/dist/types/excalidraw/editor-jotai.d.ts +6 -6
  128. package/dist/types/excalidraw/eraser/index.d.ts +14 -0
  129. package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
  130. package/dist/types/excalidraw/history.d.ts +14 -22
  131. package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
  132. package/dist/types/excalidraw/index.d.ts +9 -9
  133. package/dist/types/excalidraw/lasso/index.d.ts +1 -0
  134. package/dist/types/excalidraw/lasso/utils.d.ts +1 -2
  135. package/dist/types/excalidraw/renderer/helpers.d.ts +7 -2
  136. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -1
  137. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  138. package/dist/types/excalidraw/scene/scrollbars.d.ts +2 -3
  139. package/dist/types/excalidraw/scene/types.d.ts +2 -0
  140. package/dist/types/excalidraw/snapping.d.ts +2 -2
  141. package/dist/types/excalidraw/types.d.ts +28 -6
  142. package/dist/types/excalidraw/visualdebug.d.ts +1 -1
  143. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
  144. package/dist/types/math/src/angle.d.ts +2 -0
  145. package/dist/types/math/src/curve.d.ts +2 -0
  146. package/dist/types/math/src/point.d.ts +1 -1
  147. package/dist/types/math/src/types.d.ts +1 -0
  148. package/dist/types/math/src/vector.d.ts +4 -0
  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 +68 -94
  153. package/package.json +3 -3
  154. package/dist/dev/chunk-H7XJ5UVD.js +0 -7
  155. package/dist/dev/chunk-H7XJ5UVD.js.map +0 -7
  156. package/dist/dev/chunk-KYBDXI6F.js.map +0 -7
  157. package/dist/dev/chunk-X3RYHLJU.js.map +0 -7
  158. package/dist/prod/chunk-CAN5RS4P.js +0 -31
  159. package/dist/prod/chunk-KJYFYP64.js +0 -7
  160. package/dist/prod/data/image-5XD47O4X.js +0 -1
  161. package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
  162. package/dist/types/excalidraw/store.d.ts +0 -129
  163. /package/dist/dev/data/{image-NKFINVKH.js.map → image-OFYK7EOY.js.map} +0 -0
  164. /package/dist/dev/locales/{en-CKWC2GMK.js.map → en-KIY5SGI3.js.map} +0 -0
@@ -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;
@@ -160,8 +160,8 @@ export declare const actionToggleViewMode: {
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
162
  pendingImageElementId: string | null;
163
- showHyperlinkPopup: false | "editor" | "info";
164
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
163
+ showHyperlinkPopup: false | "info" | "editor";
164
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
165
  snapLines: readonly import("../snapping").SnapLine[];
166
166
  originSnapOffset: {
167
167
  x: number;
@@ -172,22 +172,20 @@ export declare const actionToggleViewMode: {
172
172
  followedBy: Set<import("../types").SocketId>;
173
173
  isCropping: boolean;
174
174
  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
- }[];
175
+ searchMatches: Readonly<{
176
+ focusedId: string | null;
177
+ matches: readonly import("../types").SearchMatch[];
178
+ }> | null;
179
+ activeLockedId: string | null;
180
+ lockedMultiSelections: {
181
+ [groupId: string]: true;
182
+ };
185
183
  };
186
184
  captureUpdate: "EVENTUALLY";
187
185
  };
188
186
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
189
187
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
190
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
188
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
191
189
  } & {
192
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
190
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
193
191
  };
@@ -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;
@@ -160,8 +160,8 @@ export declare const actionToggleZenMode: {
160
160
  data: import("../charts").Spreadsheet;
161
161
  };
162
162
  pendingImageElementId: string | null;
163
- showHyperlinkPopup: false | "editor" | "info";
164
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
163
+ showHyperlinkPopup: false | "info" | "editor";
164
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
165
165
  snapLines: readonly import("../snapping").SnapLine[];
166
166
  originSnapOffset: {
167
167
  x: number;
@@ -172,22 +172,20 @@ export declare const actionToggleZenMode: {
172
172
  followedBy: Set<import("../types").SocketId>;
173
173
  isCropping: boolean;
174
174
  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
- }[];
175
+ searchMatches: Readonly<{
176
+ focusedId: string | null;
177
+ matches: readonly import("../types").SearchMatch[];
178
+ }> | null;
179
+ activeLockedId: string | null;
180
+ lockedMultiSelections: {
181
+ [groupId: string]: true;
182
+ };
185
183
  };
186
184
  captureUpdate: "EVENTUALLY";
187
185
  };
188
186
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
189
187
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
190
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
188
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
191
189
  } & {
192
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
190
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
193
191
  };
@@ -13,10 +13,10 @@ export declare const actionSendBackward: {
13
13
  captureUpdate: "IMMEDIATELY";
14
14
  };
15
15
  keyPriority: number;
16
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
16
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
17
17
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
18
18
  } & {
19
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
19
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
20
20
  };
21
21
  export declare const actionBringForward: {
22
22
  name: "bringForward";
@@ -32,10 +32,10 @@ export declare const actionBringForward: {
32
32
  captureUpdate: "IMMEDIATELY";
33
33
  };
34
34
  keyPriority: number;
35
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
35
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
36
36
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
37
37
  } & {
38
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
38
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
39
39
  };
40
40
  export declare const actionSendToBack: {
41
41
  name: "sendToBack";
@@ -50,10 +50,10 @@ export declare const actionSendToBack: {
50
50
  appState: Readonly<import("../types").AppState>;
51
51
  captureUpdate: "IMMEDIATELY";
52
52
  };
53
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
53
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
54
54
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
55
55
  } & {
56
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
56
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
57
57
  };
58
58
  export declare const actionBringToFront: {
59
59
  name: "bringToFront";
@@ -68,8 +68,8 @@ export declare const actionBringToFront: {
68
68
  appState: Readonly<import("../types").AppState>;
69
69
  captureUpdate: "IMMEDIATELY";
70
70
  };
71
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
71
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
72
72
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
73
73
  } & {
74
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
74
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
75
75
  };
@@ -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
  };
@@ -1,29 +1,14 @@
1
1
  import type { AppState, NormalizedZoomValue } from "./types";
2
2
  export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
3
3
  export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
4
- viewBackgroundColor?: string | undefined;
5
- name?: string | null | undefined;
6
- zoom?: Readonly<{
7
- value: NormalizedZoomValue;
8
- }> | undefined;
4
+ stats?: {
5
+ open: boolean;
6
+ panels: number;
7
+ } | undefined;
8
+ exportWithDarkMode?: boolean | undefined;
9
+ cursorButton?: "up" | "down" | undefined;
9
10
  scrollX?: number | undefined;
10
11
  scrollY?: number | undefined;
11
- editingGroupId?: string | null | undefined;
12
- selectedElementIds?: Readonly<{
13
- [id: string]: true;
14
- }> | undefined;
15
- theme?: import("@excalidraw/element/types").Theme | undefined;
16
- selectedGroupIds?: {
17
- [groupId: string]: boolean;
18
- } | undefined;
19
- selectedLinearElement?: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null | undefined;
20
- zenModeEnabled?: boolean | undefined;
21
- gridModeEnabled?: boolean | undefined;
22
- objectsSnapModeEnabled?: boolean | undefined;
23
- shouldCacheIgnoreZoom?: boolean | undefined;
24
- exportScale?: number | undefined;
25
- gridSize?: number | undefined;
26
- gridStep?: number | undefined;
27
12
  showWelcomeScreen?: boolean | undefined;
28
13
  activeTool?: ({
29
14
  lastActiveTool: import("./types").ActiveTool | null;
@@ -34,7 +19,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
34
19
  penDetected?: boolean | undefined;
35
20
  exportBackground?: boolean | undefined;
36
21
  exportEmbedScene?: boolean | undefined;
37
- exportWithDarkMode?: boolean | undefined;
22
+ exportScale?: number | undefined;
38
23
  currentItemStrokeColor?: string | undefined;
39
24
  currentItemBackgroundColor?: string | undefined;
40
25
  currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
@@ -49,35 +34,59 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
49
34
  currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
50
35
  currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
51
36
  currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
52
- cursorButton?: "up" | "down" | undefined;
37
+ viewBackgroundColor?: string | undefined;
53
38
  scrolledOutside?: boolean | undefined;
54
- openMenu?: "shape" | "canvas" | null | undefined;
39
+ name?: string | null | undefined;
40
+ zoom?: Readonly<{
41
+ value: NormalizedZoomValue;
42
+ }> | undefined;
43
+ openMenu?: "canvas" | "shape" | null | undefined;
55
44
  openSidebar?: {
56
45
  name: string;
57
46
  tab?: string | undefined;
58
47
  } | null | undefined;
59
48
  defaultSidebarDockedPreference?: boolean | undefined;
60
49
  lastPointerDownWith?: import("@excalidraw/element/types").PointerType | undefined;
50
+ selectedElementIds?: Readonly<{
51
+ [id: string]: true;
52
+ }> | undefined;
61
53
  previousSelectedElementIds?: {
62
54
  [id: string]: true;
63
55
  } | undefined;
64
- stats?: {
65
- open: boolean;
66
- panels: number;
56
+ shouldCacheIgnoreZoom?: boolean | undefined;
57
+ zenModeEnabled?: boolean | undefined;
58
+ theme?: import("@excalidraw/element/types").Theme | undefined;
59
+ gridSize?: number | undefined;
60
+ gridStep?: number | undefined;
61
+ gridModeEnabled?: boolean | undefined;
62
+ selectedGroupIds?: {
63
+ [groupId: string]: boolean;
67
64
  } | undefined;
65
+ editingGroupId?: string | null | undefined;
68
66
  currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
67
+ selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | 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,19 +1,21 @@
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";
2
+ import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
3
+ import { LinearElementEditor } from "@excalidraw/element";
4
+ import { FlowChartCreator } from "@excalidraw/element";
5
+ import { Scene } from "@excalidraw/element";
6
+ import { Store } from "@excalidraw/element";
7
+ import type { ElementUpdate } from "@excalidraw/element";
5
8
  import type { ExcalidrawElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
9
+ import type { Mutable } from "@excalidraw/common/utility-types";
6
10
  import { ActionManager } from "../actions/manager";
7
11
  import { AnimationFrameHandler } from "../animation-frame-handler";
8
12
  import { History } from "../history";
9
- import Scene from "../scene/Scene";
10
13
  import { Fonts } from "../fonts";
14
+ import { type WritableAtom } from "../editor-jotai";
11
15
  import { Renderer } from "../scene/Renderer";
12
- import { Emitter } from "../emitter";
13
- import { Store } from "../store";
14
- import { AnimatedTrail } from "../animated-trail";
15
16
  import { LaserTrails } from "../laser-trails";
16
17
  import { LassoTrail } from "../lasso";
18
+ import { EraserTrail } from "../eraser";
17
19
  import type { ExportedElements } from "../data";
18
20
  import type { FileSystemHandle } from "../data/filesystem";
19
21
  import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
@@ -97,7 +99,7 @@ declare class App extends React.Component<AppProps, AppState> {
97
99
  };
98
100
  animationFrameHandler: AnimationFrameHandler;
99
101
  laserTrails: LaserTrails;
100
- eraserTrail: AnimatedTrail;
102
+ eraserTrail: EraserTrail;
101
103
  lassoTrail: LassoTrail;
102
104
  onChangeEmitter: Emitter<[elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles]>;
103
105
  onPointerDownEmitter: Emitter<[activeTool: {
@@ -124,7 +126,7 @@ declare class App extends React.Component<AppProps, AppState> {
124
126
  };
125
127
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
126
128
  resize: {
127
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
129
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
128
130
  isResizing: boolean;
129
131
  offset: {
130
132
  x: number;
@@ -150,6 +152,10 @@ declare class App extends React.Component<AppProps, AppState> {
150
152
  x: number;
151
153
  y: number;
152
154
  } | null;
155
+ origin: {
156
+ x: number;
157
+ y: number;
158
+ };
153
159
  };
154
160
  eventListeners: {
155
161
  onMove: {
@@ -189,7 +195,7 @@ declare class App extends React.Component<AppProps, AppState> {
189
195
  };
190
196
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
191
197
  resize: {
192
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
198
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
193
199
  isResizing: boolean;
194
200
  offset: {
195
201
  x: number;
@@ -215,6 +221,10 @@ declare class App extends React.Component<AppProps, AppState> {
215
221
  x: number;
216
222
  y: number;
217
223
  } | null;
224
+ origin: {
225
+ x: number;
226
+ y: number;
227
+ };
218
228
  };
219
229
  eventListeners: {
220
230
  onMove: {
@@ -237,6 +247,7 @@ declare class App extends React.Component<AppProps, AppState> {
237
247
  missingPointerEventCleanupEmitter: Emitter<[event: PointerEvent | null]>;
238
248
  onRemoveEventListenersEmitter: Emitter<[]>;
239
249
  constructor(props: AppProps);
250
+ updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
240
251
  private onWindowMessage;
241
252
  private cacheEmbeddableRef;
242
253
  /**
@@ -258,6 +269,7 @@ declare class App extends React.Component<AppProps, AppState> {
258
269
  render(): import("react/jsx-runtime").JSX.Element;
259
270
  focusContainer: AppClassProperties["focusContainer"];
260
271
  getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
272
+ getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
261
273
  getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
262
274
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
263
275
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
@@ -388,6 +400,7 @@ declare class App extends React.Component<AppProps, AppState> {
388
400
  */
389
401
  captureUpdate?: SceneData["captureUpdate"];
390
402
  }) => void;
403
+ mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
391
404
  private triggerRender;
392
405
  /**
393
406
  * @returns whether the menu was toggled on or off
@@ -433,7 +446,7 @@ declare class App extends React.Component<AppProps, AppState> {
433
446
  private getTextElementAtPosition;
434
447
  private getElementAtPosition;
435
448
  private getElementsAtPosition;
436
- private getElementHitThreshold;
449
+ getElementHitThreshold(): number;
437
450
  private hitElement;
438
451
  private getTextBindableContainerAtPosition;
439
452
  private startTextEditing;
@@ -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;
@@ -0,0 +1,23 @@
1
+ import type { ConvertibleTypes, ExcalidrawElement, ExcalidrawTextContainer, ExcalidrawTextElementWithContainer } from "@excalidraw/element/types";
2
+ import type { Scene } from "@excalidraw/element";
3
+ import "./ConvertElementTypePopup.scss";
4
+ import type App from "./App";
5
+ export declare const convertElementTypePopupAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
6
+ type: "panel";
7
+ } | null> & {
8
+ init: {
9
+ type: "panel";
10
+ } | null;
11
+ };
12
+ declare const ConvertElementTypePopup: ({ app }: {
13
+ app: App;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const adjustBoundTextSize: (container: ExcalidrawTextContainer, boundText: ExcalidrawTextElementWithContainer, scene: Scene) => void;
16
+ type ConversionType = "generic" | "linear" | null;
17
+ export declare const convertElementTypes: (app: App, { conversionType, nextType, direction, }: {
18
+ conversionType: ConversionType;
19
+ nextType?: ConvertibleTypes | undefined;
20
+ direction?: "left" | "right" | undefined;
21
+ }) => boolean;
22
+ export declare const getConversionTypeFromElements: (elements: ExcalidrawElement[]) => ConversionType;
23
+ export default ConvertElementTypePopup;
@@ -1,10 +1,11 @@
1
- import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
1
+ import type { ExcalidrawElement } from "@excalidraw/element/types";
2
+ import type { Scene } from "@excalidraw/element";
2
3
  import "./ElementLinkDialog.scss";
3
4
  import type { AppProps, UIAppState } from "../types";
4
- declare const ElementLinkDialog: ({ sourceElementId, onClose, elementsMap, appState, generateLinkForSelection, }: {
5
+ declare const ElementLinkDialog: ({ sourceElementId, onClose, appState, scene, generateLinkForSelection, }: {
5
6
  sourceElementId: ExcalidrawElement["id"];
6
- elementsMap: ElementsMap;
7
7
  appState: UIAppState;
8
+ scene: Scene;
8
9
  onClose?: (() => void) | undefined;
9
10
  generateLinkForSelection: AppProps["generateLinkForSelection"];
10
11
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { JSX } from "react";
2
- export declare const ButtonIconSelect: <T extends Object>(props: {
2
+ export declare const RadioSelection: <T extends Object>(props: {
3
3
  options: {
4
4
  value: T;
5
5
  text: string;
@@ -1,8 +1,8 @@
1
1
  import "./Range.scss";
2
+ import type { AppClassProperties } from "../types";
2
3
  export type RangeProps = {
3
4
  updateData: (value: number) => void;
4
- appState: any;
5
- elements: any;
5
+ app: AppClassProperties;
6
6
  testId?: string;
7
7
  };
8
- export declare const Range: ({ updateData, appState, elements, testId, }: RangeProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Range: ({ updateData, app, testId }: RangeProps) => import("react/jsx-runtime").JSX.Element;