@myoc/excalidraw 0.18.15 → 0.18.17

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 (152) hide show
  1. package/dist/dev/{chunk-O7OUZ7ZJ.js → chunk-FQEIAL75.js} +14874 -9982
  2. package/dist/dev/chunk-FQEIAL75.js.map +7 -0
  3. package/dist/dev/{chunk-PEI7EPYO.js → chunk-KJKC5BJI.js} +10 -4
  4. package/dist/dev/chunk-KJKC5BJI.js.map +7 -0
  5. package/dist/dev/{chunk-DJKQZ4KD.js → chunk-XL2I4W52.js} +2 -2
  6. package/dist/dev/data/{image-NJWLICAS.js → image-WMF622SS.js} +3 -3
  7. package/dist/dev/index.css +69 -22
  8. package/dist/dev/index.css.map +3 -3
  9. package/dist/dev/index.js +3104 -6547
  10. package/dist/dev/index.js.map +4 -4
  11. package/dist/dev/locales/{en-R455UJTM.js → en-UQFCZXHO.js} +2 -2
  12. package/dist/dev/subset-shared.chunk.js +1 -1
  13. package/dist/dev/subset-worker.chunk.js +1 -1
  14. package/dist/prod/{chunk-NJOW7IOK.js → chunk-5JAQX5EH.js} +1 -1
  15. package/dist/prod/{chunk-KZWZ7WHC.js → chunk-EJLAYNAE.js} +4 -4
  16. package/dist/prod/chunk-LSNMPGNI.js +33 -0
  17. package/dist/prod/data/image-Z433FUMH.js +1 -0
  18. package/dist/prod/index.css +1 -1
  19. package/dist/prod/index.js +17 -16
  20. package/dist/prod/locales/{en-YWERZJD6.js → en-7EHYHCIL.js} +1 -1
  21. package/dist/prod/subset-shared.chunk.js +1 -1
  22. package/dist/prod/subset-worker.chunk.js +1 -1
  23. package/dist/types/common/src/constants.d.ts +3 -1
  24. package/dist/types/{excalidraw → common/src}/emitter.d.ts +1 -1
  25. package/dist/types/common/src/font-metadata.d.ts +4 -2
  26. package/dist/types/common/src/index.d.ts +1 -0
  27. package/dist/types/common/src/utility-types.d.ts +5 -0
  28. package/dist/types/common/src/utils.d.ts +16 -4
  29. package/dist/types/{excalidraw/scene → element/src}/Scene.d.ts +11 -14
  30. package/dist/types/element/src/ShapeCache.d.ts +1 -1
  31. package/dist/types/element/src/align.d.ts +3 -3
  32. package/dist/types/element/src/arrange.d.ts +2 -1
  33. package/dist/types/element/src/binding.d.ts +18 -10
  34. package/dist/types/element/src/bounds.d.ts +1 -1
  35. package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +40 -35
  36. package/dist/types/element/src/dragElements.d.ts +3 -2
  37. package/dist/types/element/src/elbowArrow.d.ts +1 -1
  38. package/dist/types/element/src/flowchart.d.ts +3 -2
  39. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  40. package/dist/types/element/src/frame.d.ts +4 -3
  41. package/dist/types/element/src/index.d.ts +45 -2
  42. package/dist/types/element/src/linearElementEditor.d.ts +14 -18
  43. package/dist/types/element/src/mutateElement.d.ts +10 -2
  44. package/dist/types/element/src/newElement.d.ts +3 -3
  45. package/dist/types/element/src/resizeElements.d.ts +4 -4
  46. package/dist/types/element/src/selection.d.ts +1 -6
  47. package/dist/types/element/src/shapes.d.ts +1 -1
  48. package/dist/types/element/src/sizeHelpers.d.ts +0 -1
  49. package/dist/types/element/src/store.d.ts +227 -0
  50. package/dist/types/element/src/textElement.d.ts +4 -3
  51. package/dist/types/element/src/typeChecks.d.ts +5 -1
  52. package/dist/types/element/src/types.d.ts +8 -0
  53. package/dist/types/element/src/zindex.d.ts +1 -1
  54. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +30 -48
  55. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  56. package/dist/types/excalidraw/actions/actionArrange.d.ts +2 -2
  57. package/dist/types/excalidraw/actions/actionBoundText.d.ts +20 -32
  58. package/dist/types/excalidraw/actions/actionCanvas.d.ts +139 -211
  59. package/dist/types/excalidraw/actions/actionClipboard.d.ts +62 -98
  60. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +10 -16
  61. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +28 -46
  62. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  63. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  64. package/dist/types/excalidraw/actions/actionElementLink.d.ts +10 -16
  65. package/dist/types/excalidraw/actions/actionElementLock.d.ts +22 -34
  66. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +10 -16
  67. package/dist/types/excalidraw/actions/actionExport.d.ts +184 -238
  68. package/dist/types/excalidraw/actions/actionFinalize.d.ts +18 -30
  69. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  70. package/dist/types/excalidraw/actions/actionFrame.d.ts +84 -108
  71. package/dist/types/excalidraw/actions/actionGroup.d.ts +26 -38
  72. package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
  73. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +9 -15
  74. package/dist/types/excalidraw/actions/actionLink.d.ts +10 -16
  75. package/dist/types/excalidraw/actions/actionMenu.d.ts +30 -48
  76. package/dist/types/excalidraw/actions/actionNavigate.d.ts +19 -31
  77. package/dist/types/excalidraw/actions/actionProperties.d.ts +138 -228
  78. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +12 -18
  79. package/dist/types/excalidraw/actions/actionSmartZoom.d.ts +2 -2
  80. package/dist/types/excalidraw/actions/actionStyles.d.ts +14 -20
  81. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +12 -18
  82. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +12 -18
  83. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +12 -199
  84. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
  85. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +12 -18
  86. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +12 -18
  87. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -18
  88. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  89. package/dist/types/excalidraw/actions/types.d.ts +3 -3
  90. package/dist/types/excalidraw/appState.d.ts +31 -31
  91. package/dist/types/excalidraw/components/App.d.ts +13 -8
  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/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
  104. package/dist/types/excalidraw/components/Range.d.ts +3 -3
  105. package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  106. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  107. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  108. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  109. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
  110. package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  111. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  112. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  113. package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  114. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  115. package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
  116. package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -11
  117. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  118. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  119. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
  120. package/dist/types/excalidraw/components/icons.d.ts +1 -0
  121. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  122. package/dist/types/excalidraw/data/blob.d.ts +1 -1
  123. package/dist/types/excalidraw/data/transform.d.ts +1 -1
  124. package/dist/types/excalidraw/editor-jotai.d.ts +6 -6
  125. package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
  126. package/dist/types/excalidraw/history.d.ts +14 -22
  127. package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
  128. package/dist/types/excalidraw/index.d.ts +9 -9
  129. package/dist/types/excalidraw/lasso/index.d.ts +1 -0
  130. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -1
  131. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -1
  132. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  133. package/dist/types/excalidraw/snapping.d.ts +2 -2
  134. package/dist/types/excalidraw/types.d.ts +16 -9
  135. package/dist/types/excalidraw/visualdebug.d.ts +1 -1
  136. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
  137. package/dist/types/math/src/curve.d.ts +2 -0
  138. package/dist/types/math/src/vector.d.ts +4 -0
  139. package/dist/types/utils/src/bbox.d.ts +1 -1
  140. package/dist/types/utils/src/index.d.ts +1 -1
  141. package/dist/types/utils/src/withinBounds.d.ts +1 -1
  142. package/history.ts +68 -94
  143. package/package.json +5 -4
  144. package/dist/dev/chunk-O7OUZ7ZJ.js.map +0 -7
  145. package/dist/dev/chunk-PEI7EPYO.js.map +0 -7
  146. package/dist/prod/chunk-WGXUBJ4X.js +0 -33
  147. package/dist/prod/data/image-EKW6RBW7.js +0 -1
  148. package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
  149. package/dist/types/excalidraw/store.d.ts +0 -129
  150. /package/dist/dev/{chunk-DJKQZ4KD.js.map → chunk-XL2I4W52.js.map} +0 -0
  151. /package/dist/dev/data/{image-NJWLICAS.js.map → image-WMF622SS.js.map} +0 -0
  152. /package/dist/dev/locales/{en-R455UJTM.js.map → en-UQFCZXHO.js.map} +0 -0
@@ -22,9 +22,9 @@ export declare const actionToggleStats: {
22
22
  showWelcomeScreen: boolean;
23
23
  isLoading: boolean;
24
24
  myocSimplifiedMode: boolean;
25
+ dontResizeLimitMBs: number;
25
26
  hideMainMenus: boolean;
26
27
  wheelZoomsOnDefault?: boolean | undefined;
27
- dontResizeLimitMBs: number;
28
28
  arrangeConfiguration: {
29
29
  algorithm: "bin-packing";
30
30
  gap: number;
@@ -40,7 +40,7 @@ export declare const actionToggleStats: {
40
40
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
41
41
  isBindingEnabled: boolean;
42
42
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
43
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
43
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
44
44
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
45
45
  frameRendering: {
46
46
  enabled: boolean;
@@ -51,7 +51,7 @@ export declare const actionToggleStats: {
51
51
  editingFrame: string | null;
52
52
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
53
53
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
54
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
54
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
55
55
  activeTool: {
56
56
  lastActiveTool: import("../types").ActiveTool | null;
57
57
  locked: boolean;
@@ -89,7 +89,7 @@ export declare const actionToggleStats: {
89
89
  zoom: Readonly<{
90
90
  value: import("../types").NormalizedZoomValue;
91
91
  }>;
92
- openMenu: "shape" | "canvas" | null;
92
+ openMenu: "canvas" | "shape" | null;
93
93
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
94
94
  openSidebar: {
95
95
  name: string;
@@ -168,8 +168,8 @@ export declare const actionToggleStats: {
168
168
  data: import("../charts").Spreadsheet;
169
169
  };
170
170
  pendingImageElementId: string | null;
171
- showHyperlinkPopup: false | "editor" | "info";
172
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
171
+ showHyperlinkPopup: false | "info" | "editor";
172
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
173
173
  snapLines: readonly import("../snapping").SnapLine[];
174
174
  originSnapOffset: {
175
175
  x: number;
@@ -180,21 +180,15 @@ export declare const actionToggleStats: {
180
180
  followedBy: Set<import("../types").SocketId>;
181
181
  isCropping: boolean;
182
182
  croppingElementId: string | null;
183
- searchMatches: readonly {
184
- id: string;
185
- focus: boolean;
186
- matchedLines: {
187
- offsetX: number;
188
- offsetY: number;
189
- width: number;
190
- height: number;
191
- }[];
192
- }[];
183
+ searchMatches: Readonly<{
184
+ focusedId: string | null;
185
+ matches: readonly import("../types").SearchMatch[];
186
+ }> | null;
193
187
  };
194
188
  captureUpdate: "EVENTUALLY";
195
189
  };
196
190
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
197
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
191
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
198
192
  } & {
199
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
193
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
200
194
  };
@@ -19,9 +19,9 @@ export declare const actionToggleViewMode: {
19
19
  showWelcomeScreen: boolean;
20
20
  isLoading: boolean;
21
21
  myocSimplifiedMode: boolean;
22
+ dontResizeLimitMBs: number;
22
23
  hideMainMenus: boolean;
23
24
  wheelZoomsOnDefault?: boolean | undefined;
24
- dontResizeLimitMBs: number;
25
25
  arrangeConfiguration: {
26
26
  algorithm: "bin-packing";
27
27
  gap: number;
@@ -37,7 +37,7 @@ export declare const actionToggleViewMode: {
37
37
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
38
38
  isBindingEnabled: boolean;
39
39
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
40
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
40
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
41
41
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
42
42
  frameRendering: {
43
43
  enabled: boolean;
@@ -48,7 +48,7 @@ export declare const actionToggleViewMode: {
48
48
  editingFrame: string | null;
49
49
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
50
50
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
51
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
51
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
52
52
  activeTool: {
53
53
  lastActiveTool: import("../types").ActiveTool | null;
54
54
  locked: boolean;
@@ -86,7 +86,7 @@ export declare const actionToggleViewMode: {
86
86
  zoom: Readonly<{
87
87
  value: import("../types").NormalizedZoomValue;
88
88
  }>;
89
- openMenu: "shape" | "canvas" | null;
89
+ openMenu: "canvas" | "shape" | null;
90
90
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
91
91
  openSidebar: {
92
92
  name: string;
@@ -168,8 +168,8 @@ export declare const actionToggleViewMode: {
168
168
  data: import("../charts").Spreadsheet;
169
169
  };
170
170
  pendingImageElementId: string | null;
171
- showHyperlinkPopup: false | "editor" | "info";
172
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
171
+ showHyperlinkPopup: false | "info" | "editor";
172
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
173
173
  snapLines: readonly import("../snapping").SnapLine[];
174
174
  originSnapOffset: {
175
175
  x: number;
@@ -180,23 +180,17 @@ export declare const actionToggleViewMode: {
180
180
  followedBy: Set<import("../types").SocketId>;
181
181
  isCropping: boolean;
182
182
  croppingElementId: string | null;
183
- searchMatches: readonly {
184
- id: string;
185
- focus: boolean;
186
- matchedLines: {
187
- offsetX: number;
188
- offsetY: number;
189
- width: number;
190
- height: number;
191
- }[];
192
- }[];
183
+ searchMatches: Readonly<{
184
+ focusedId: string | null;
185
+ matches: readonly import("../types").SearchMatch[];
186
+ }> | null;
193
187
  };
194
188
  captureUpdate: "EVENTUALLY";
195
189
  };
196
190
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
197
191
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
198
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
192
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
199
193
  PanelComponent: ({ data, updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
200
194
  } & {
201
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
195
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
202
196
  };
@@ -19,9 +19,9 @@ export declare const actionToggleZenMode: {
19
19
  showWelcomeScreen: boolean;
20
20
  isLoading: boolean;
21
21
  myocSimplifiedMode: boolean;
22
+ dontResizeLimitMBs: number;
22
23
  hideMainMenus: boolean;
23
24
  wheelZoomsOnDefault?: boolean | undefined;
24
- dontResizeLimitMBs: number;
25
25
  arrangeConfiguration: {
26
26
  algorithm: "bin-packing";
27
27
  gap: number;
@@ -37,7 +37,7 @@ export declare const actionToggleZenMode: {
37
37
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
38
38
  isBindingEnabled: boolean;
39
39
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
40
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
40
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
41
41
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
42
42
  frameRendering: {
43
43
  enabled: boolean;
@@ -48,7 +48,7 @@ export declare const actionToggleZenMode: {
48
48
  editingFrame: string | null;
49
49
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
50
50
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
51
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
51
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
52
52
  activeTool: {
53
53
  lastActiveTool: import("../types").ActiveTool | null;
54
54
  locked: boolean;
@@ -86,7 +86,7 @@ export declare const actionToggleZenMode: {
86
86
  zoom: Readonly<{
87
87
  value: import("../types").NormalizedZoomValue;
88
88
  }>;
89
- openMenu: "shape" | "canvas" | null;
89
+ openMenu: "canvas" | "shape" | null;
90
90
  openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
91
91
  openSidebar: {
92
92
  name: string;
@@ -168,8 +168,8 @@ export declare const actionToggleZenMode: {
168
168
  data: import("../charts").Spreadsheet;
169
169
  };
170
170
  pendingImageElementId: string | null;
171
- showHyperlinkPopup: false | "editor" | "info";
172
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
171
+ showHyperlinkPopup: false | "info" | "editor";
172
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
173
173
  snapLines: readonly import("../snapping").SnapLine[];
174
174
  originSnapOffset: {
175
175
  x: number;
@@ -180,22 +180,16 @@ export declare const actionToggleZenMode: {
180
180
  followedBy: Set<import("../types").SocketId>;
181
181
  isCropping: boolean;
182
182
  croppingElementId: string | null;
183
- searchMatches: readonly {
184
- id: string;
185
- focus: boolean;
186
- matchedLines: {
187
- offsetX: number;
188
- offsetY: number;
189
- width: number;
190
- height: number;
191
- }[];
192
- }[];
183
+ searchMatches: Readonly<{
184
+ focusedId: string | null;
185
+ matches: readonly import("../types").SearchMatch[];
186
+ }> | null;
193
187
  };
194
188
  captureUpdate: "EVENTUALLY";
195
189
  };
196
190
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
197
191
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
198
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
192
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
199
193
  } & {
200
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
194
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
201
195
  };
@@ -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" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "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" | "smartZoom" | "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" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "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" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -35,7 +35,7 @@ export interface Action {
35
35
  predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
36
36
  checked?: (appState: Readonly<AppState>) => boolean;
37
37
  trackEvent: false | {
38
- category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu";
38
+ category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu" | "shape_switch";
39
39
  action?: string;
40
40
  predicate?: (appState: Readonly<AppState>, elements: readonly ExcalidrawElement[], value: any) => boolean;
41
41
  };
@@ -1,34 +1,19 @@
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
- theme?: import("@excalidraw/element/types").Theme | undefined;
7
- zoom?: Readonly<{
8
- value: NormalizedZoomValue;
9
- }> | undefined;
4
+ stats?: {
5
+ open: boolean;
6
+ panels: number;
7
+ } | undefined;
8
+ exportWithDarkMode?: boolean | undefined;
9
+ cursorButton?: "up" | "down" | undefined;
10
10
  scrollX?: number | undefined;
11
11
  scrollY?: number | undefined;
12
- editingGroupId?: string | null | undefined;
13
- selectedElementIds?: Readonly<{
14
- [id: string]: true;
15
- }> | 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
- wheelZoomsOnDefault?: boolean | undefined;
24
- dontResizeLimitMBs?: number | undefined;
25
- shouldCacheIgnoreZoom?: boolean | undefined;
26
- exportScale?: number | undefined;
27
- gridSize?: number | undefined;
28
- gridStep?: number | undefined;
29
12
  showWelcomeScreen?: boolean | undefined;
30
13
  myocSimplifiedMode?: boolean | undefined;
14
+ dontResizeLimitMBs?: number | undefined;
31
15
  hideMainMenus?: boolean | undefined;
16
+ wheelZoomsOnDefault?: boolean | undefined;
32
17
  arrangeConfiguration?: {
33
18
  algorithm: "bin-packing";
34
19
  gap: number;
@@ -42,7 +27,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
42
27
  penDetected?: boolean | undefined;
43
28
  exportBackground?: boolean | undefined;
44
29
  exportEmbedScene?: boolean | undefined;
45
- exportWithDarkMode?: boolean | undefined;
30
+ exportScale?: number | undefined;
46
31
  currentItemStrokeColor?: string | undefined;
47
32
  currentItemBackgroundColor?: string | undefined;
48
33
  currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
@@ -57,35 +42,50 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
57
42
  currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
58
43
  currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
59
44
  currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
60
- cursorButton?: "up" | "down" | undefined;
45
+ viewBackgroundColor?: string | undefined;
61
46
  scrolledOutside?: boolean | undefined;
62
- openMenu?: "shape" | "canvas" | null | undefined;
47
+ name?: string | null | undefined;
48
+ zoom?: Readonly<{
49
+ value: NormalizedZoomValue;
50
+ }> | undefined;
51
+ openMenu?: "canvas" | "shape" | null | undefined;
63
52
  openSidebar?: {
64
53
  name: string;
65
54
  tab?: string | undefined;
66
55
  } | null | undefined;
67
56
  defaultSidebarDockedPreference?: boolean | undefined;
68
57
  lastPointerDownWith?: import("@excalidraw/element/types").PointerType | undefined;
58
+ selectedElementIds?: Readonly<{
59
+ [id: string]: true;
60
+ }> | undefined;
69
61
  previousSelectedElementIds?: {
70
62
  [id: string]: true;
71
63
  } | undefined;
72
- stats?: {
73
- open: boolean;
74
- panels: number;
64
+ shouldCacheIgnoreZoom?: boolean | undefined;
65
+ zenModeEnabled?: boolean | undefined;
66
+ theme?: import("@excalidraw/element/types").Theme | undefined;
67
+ gridSize?: number | undefined;
68
+ gridStep?: number | undefined;
69
+ gridModeEnabled?: boolean | undefined;
70
+ selectedGroupIds?: {
71
+ [groupId: string]: boolean;
75
72
  } | undefined;
73
+ editingGroupId?: string | null | undefined;
76
74
  currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
75
+ selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
76
+ objectsSnapModeEnabled?: boolean | undefined;
77
77
  };
78
78
  export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
79
79
  viewBackgroundColor?: string | undefined;
80
- gridModeEnabled?: boolean | undefined;
81
80
  gridSize?: number | undefined;
82
81
  gridStep?: number | undefined;
82
+ gridModeEnabled?: boolean | undefined;
83
83
  };
84
84
  export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
85
85
  viewBackgroundColor?: string | undefined;
86
- gridModeEnabled?: boolean | undefined;
87
86
  gridSize?: number | undefined;
88
87
  gridStep?: number | undefined;
88
+ gridModeEnabled?: boolean | undefined;
89
89
  };
90
90
  export declare const isEraserActive: ({ activeTool, }: {
91
91
  activeTool: AppState["activeTool"];
@@ -1,16 +1,18 @@
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
16
  import { LaserTrails } from "../laser-trails";
15
17
  import { LassoTrail } from "../lasso";
16
18
  import { EraserTrail } from "../eraser";
@@ -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;
@@ -193,7 +195,7 @@ declare class App extends React.Component<AppProps, AppState> {
193
195
  };
194
196
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
195
197
  resize: {
196
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
198
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
197
199
  isResizing: boolean;
198
200
  offset: {
199
201
  x: number;
@@ -245,6 +247,7 @@ declare class App extends React.Component<AppProps, AppState> {
245
247
  missingPointerEventCleanupEmitter: Emitter<[event: PointerEvent | null]>;
246
248
  onRemoveEventListenersEmitter: Emitter<[]>;
247
249
  constructor(props: AppProps);
250
+ updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
248
251
  private onWindowMessage;
249
252
  private cacheEmbeddableRef;
250
253
  /**
@@ -266,6 +269,7 @@ declare class App extends React.Component<AppProps, AppState> {
266
269
  render(): import("react/jsx-runtime").JSX.Element;
267
270
  focusContainer: AppClassProperties["focusContainer"];
268
271
  getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
272
+ getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
269
273
  getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
270
274
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
271
275
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
@@ -402,6 +406,7 @@ declare class App extends React.Component<AppProps, AppState> {
402
406
  */
403
407
  captureUpdate?: SceneData["captureUpdate"];
404
408
  }) => void;
409
+ mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
405
410
  private triggerRender;
406
411
  /**
407
412
  * @returns whether the menu was toggled on or off
@@ -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;