@excalidraw/common 0.18.0-b1c6bfc → 0.18.0-b55c9ee

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 (254) hide show
  1. package/dist/dev/index.js +239 -104
  2. package/dist/dev/index.js.map +3 -3
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/colors.d.ts +23 -1
  5. package/dist/types/common/src/constants.d.ts +70 -7
  6. package/dist/types/common/src/keys.d.ts +6 -0
  7. package/dist/types/common/src/points.d.ts +1 -1
  8. package/dist/types/common/src/random.d.ts +7 -0
  9. package/dist/types/common/src/utils.d.ts +13 -44
  10. package/dist/types/element/src/Scene.d.ts +7 -5
  11. package/dist/types/element/src/align.d.ts +5 -2
  12. package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
  13. package/dist/types/element/src/arrows/focus.d.ts +5 -2
  14. package/dist/types/element/src/binding.d.ts +90 -13
  15. package/dist/types/element/src/bounds.d.ts +28 -7
  16. package/dist/types/element/src/bucketFill.d.ts +110 -0
  17. package/dist/types/element/src/collision.d.ts +21 -5
  18. package/dist/types/element/src/comparisons.d.ts +8 -5
  19. package/dist/types/element/src/convertToShape.d.ts +23 -0
  20. package/dist/types/element/src/cropElement.d.ts +36 -4
  21. package/dist/types/element/src/delta.d.ts +30 -2
  22. package/dist/types/element/src/distribute.d.ts +5 -2
  23. package/dist/types/element/src/dragElements.d.ts +34 -2
  24. package/dist/types/element/src/duplicate.d.ts +64 -3
  25. package/dist/types/element/src/elbowArrow.d.ts +5 -0
  26. package/dist/types/element/src/embeddable.d.ts +3 -2
  27. package/dist/types/element/src/flowchart.d.ts +9 -11
  28. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  29. package/dist/types/element/src/frame.d.ts +30 -11
  30. package/dist/types/element/src/groups.d.ts +10 -15
  31. package/dist/types/element/src/image.d.ts +5 -2
  32. package/dist/types/element/src/index.d.ts +7 -1
  33. package/dist/types/element/src/linearElementEditor.d.ts +31 -11
  34. package/dist/types/element/src/listMarker.d.ts +39 -0
  35. package/dist/types/element/src/mutateElement.d.ts +1 -1
  36. package/dist/types/element/src/newElement.d.ts +55 -3
  37. package/dist/types/element/src/renderElement.d.ts +31 -7
  38. package/dist/types/element/src/renderEnvironment.d.ts +66 -0
  39. package/dist/types/element/src/resizeElements.d.ts +14 -4
  40. package/dist/types/element/src/selection.d.ts +7 -13
  41. package/dist/types/element/src/shape.d.ts +29 -1
  42. package/dist/types/element/src/sizeHelpers.d.ts +6 -0
  43. package/dist/types/element/src/sortElements.d.ts +10 -0
  44. package/dist/types/element/src/stickyNote.d.ts +191 -0
  45. package/dist/types/element/src/textElement.d.ts +22 -10
  46. package/dist/types/element/src/textMeasurements.d.ts +15 -11
  47. package/dist/types/element/src/textWrapping.d.ts +3 -2
  48. package/dist/types/element/src/transform.d.ts +31 -8
  49. package/dist/types/element/src/typeChecks.d.ts +29 -27
  50. package/dist/types/element/src/types.d.ts +43 -7
  51. package/dist/types/element/src/utils.d.ts +15 -4
  52. package/dist/types/element/src/zindex.d.ts +2 -2
  53. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +95 -18
  54. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  55. package/dist/types/excalidraw/actions/actionBoundText.d.ts +78 -204
  56. package/dist/types/excalidraw/actions/actionCanvas.d.ts +299 -951
  57. package/dist/types/excalidraw/actions/actionClipboard.d.ts +66 -12
  58. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +33 -6
  59. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -521
  60. package/dist/types/excalidraw/actions/actionDeselect.d.ts +34 -7
  61. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  62. package/dist/types/excalidraw/actions/actionElementLink.d.ts +33 -6
  63. package/dist/types/excalidraw/actions/actionElementLock.d.ts +67 -13
  64. package/dist/types/excalidraw/actions/actionExport.d.ts +74 -20
  65. package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
  66. package/dist/types/excalidraw/actions/actionFrame.d.ts +129 -652
  67. package/dist/types/excalidraw/actions/actionGroup.d.ts +81 -27
  68. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +88 -9
  69. package/dist/types/excalidraw/actions/actionLink.d.ts +34 -7
  70. package/dist/types/excalidraw/actions/actionMenu.d.ts +33 -6
  71. package/dist/types/excalidraw/actions/actionProperties.d.ts +104 -34
  72. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +38 -11
  73. package/dist/types/excalidraw/actions/actionStyles.d.ts +30 -7
  74. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +452 -6
  75. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +34 -7
  76. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +37 -11
  77. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +34 -7
  78. package/dist/types/excalidraw/actions/actionToggleMinimap.d.ts +205 -0
  79. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +34 -7
  80. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +37 -11
  81. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  82. package/dist/types/excalidraw/actions/{actionEmbeddable.d.ts → actionToggleShowHints.d.ts} +49 -19
  83. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +34 -7
  84. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +35 -8
  85. package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
  86. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +34 -7
  87. package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
  88. package/dist/types/excalidraw/actions/index.d.ts +4 -2
  89. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  90. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  91. package/dist/types/excalidraw/actions/types.d.ts +8 -4
  92. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  93. package/dist/types/excalidraw/appState.d.ts +36 -12
  94. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -1
  95. package/dist/types/excalidraw/charts/charts.helpers.d.ts +6 -5
  96. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -1
  97. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -1
  98. package/dist/types/excalidraw/charts/index.d.ts +2 -1
  99. package/dist/types/excalidraw/components/Actions.d.ts +26 -13
  100. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  101. package/dist/types/excalidraw/components/App.arrowText.d.ts +70 -0
  102. package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
  103. package/dist/types/excalidraw/components/App.clipboard.d.ts +59 -0
  104. package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
  105. package/dist/types/excalidraw/components/App.d.ts +335 -111
  106. package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
  107. package/dist/types/excalidraw/components/App.duplicate.d.ts +101 -0
  108. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  109. package/dist/types/excalidraw/components/App.host.d.ts +102 -0
  110. package/dist/types/excalidraw/components/App.modifiers.d.ts +38 -0
  111. package/dist/types/excalidraw/components/App.pan.d.ts +62 -0
  112. package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
  113. package/dist/types/excalidraw/components/App.selectionTool.d.ts +94 -0
  114. package/dist/types/excalidraw/components/App.text.d.ts +194 -0
  115. package/dist/types/excalidraw/components/App.textTool.d.ts +140 -0
  116. package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
  117. package/dist/types/excalidraw/components/App.viewport.d.ts +133 -0
  118. package/dist/types/excalidraw/components/App.wheel.d.ts +30 -0
  119. package/dist/types/excalidraw/components/App.wrap.d.ts +39 -0
  120. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -3
  121. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  122. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +5 -1
  123. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
  124. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
  125. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  126. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  127. package/dist/types/excalidraw/components/ColorPicker/colorTopPicksDnD.d.ts +11 -0
  128. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -1
  129. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  130. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +4 -3
  131. package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
  132. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  133. package/dist/types/excalidraw/components/FileDropOverlay.d.ts +2 -0
  134. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +4 -1
  135. package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
  136. package/dist/types/excalidraw/components/FontPicker/fontTopPicksDnD.d.ts +12 -0
  137. package/dist/types/excalidraw/components/IconButton.d.ts +48 -0
  138. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  139. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  140. package/dist/types/excalidraw/components/LayerUI.d.ts +5 -2
  141. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  142. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +6 -2
  143. package/dist/types/excalidraw/components/LibraryUnit.d.ts +7 -2
  144. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  145. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  146. package/dist/types/excalidraw/components/Minimap/Minimap.d.ts +15 -0
  147. package/dist/types/excalidraw/components/Minimap/MinimapAnnouncementDot.d.ts +10 -0
  148. package/dist/types/excalidraw/components/Minimap/minimap-controller.chunk.d.ts +90 -0
  149. package/dist/types/excalidraw/components/Minimap/minimap-shared.chunk.d.ts +122 -0
  150. package/dist/types/excalidraw/components/Minimap/minimap-worker.chunk.d.ts +12 -0
  151. package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
  152. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  153. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  154. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  155. package/dist/types/excalidraw/components/Popover.d.ts +1 -3
  156. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  157. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  158. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  159. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  160. package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
  161. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
  162. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  163. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
  164. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  165. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  166. package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
  167. package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -2
  168. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -1
  169. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
  170. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  171. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +5 -2
  172. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
  173. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +4 -1
  174. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +3 -2
  175. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +14 -1
  176. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
  177. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +16 -0
  178. package/dist/types/excalidraw/components/Toast.d.ts +12 -1
  179. package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
  180. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  181. package/dist/types/excalidraw/components/Tools.d.ts +151 -0
  182. package/dist/types/excalidraw/components/Tooltip.d.ts +26 -2
  183. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksContextMenu.d.ts +14 -0
  184. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksTip.d.ts +11 -0
  185. package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +58 -0
  186. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  187. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  188. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -2
  189. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +3 -0
  190. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  191. package/dist/types/excalidraw/components/footer/Footer.d.ts +5 -1
  192. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  193. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +15 -4
  194. package/dist/types/excalidraw/components/icons.d.ts +8 -1
  195. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +10 -4
  196. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  197. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  198. package/dist/types/excalidraw/data/EditorLocalStorage.d.ts +8 -4
  199. package/dist/types/excalidraw/data/blob.d.ts +82 -28
  200. package/dist/types/excalidraw/data/index.d.ts +7 -7
  201. package/dist/types/excalidraw/data/json.d.ts +47 -20
  202. package/dist/types/excalidraw/data/library.d.ts +1 -1
  203. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  204. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  205. package/dist/types/excalidraw/fonts/Fonts.d.ts +12 -8
  206. package/dist/types/excalidraw/history.d.ts +10 -4
  207. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  208. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  209. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
  210. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  211. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  212. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  213. package/dist/types/excalidraw/mermaid.d.ts +7 -0
  214. package/dist/types/excalidraw/reactUtils.d.ts +1 -1
  215. package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
  216. package/dist/types/excalidraw/renderer/animation.d.ts +15 -4
  217. package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
  218. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +2 -4
  219. package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
  220. package/dist/types/excalidraw/scene/Renderer.d.ts +490 -21
  221. package/dist/types/excalidraw/scene/export.d.ts +344 -21
  222. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  223. package/dist/types/excalidraw/scene/types.d.ts +30 -5
  224. package/dist/types/excalidraw/snapping.d.ts +7 -7
  225. package/dist/types/excalidraw/types.d.ts +612 -29
  226. package/dist/types/excalidraw/viewport.d.ts +307 -0
  227. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +13 -3
  228. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  229. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  230. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  231. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  232. package/dist/types/laser-pointer/src/state.d.ts +36 -0
  233. package/dist/types/math/src/constants.d.ts +0 -1
  234. package/dist/types/math/src/curve.d.ts +19 -12
  235. package/dist/types/math/src/index.d.ts +1 -0
  236. package/dist/types/math/src/pca.d.ts +79 -0
  237. package/dist/types/math/src/point.d.ts +1 -0
  238. package/dist/types/math/src/polygon.d.ts +25 -1
  239. package/dist/types/math/src/segment.d.ts +6 -0
  240. package/dist/types/utils/src/index.d.ts +4 -3
  241. package/dist/types/utils/src/shape.d.ts +2 -2
  242. package/package.json +1 -1
  243. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  244. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  245. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  246. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
  247. package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
  248. package/dist/types/excalidraw/components/shapes.d.ts +0 -263
  249. package/dist/types/excalidraw/cursor.d.ts +0 -5
  250. package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
  251. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  252. package/dist/types/utils/src/bbox.d.ts +0 -9
  253. package/dist/types/utils/src/export.d.ts +0 -35
  254. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,5 +1,6 @@
1
- import type { ExcalidrawElement } from "@excalidraw/element/types";
2
- import type { AppClassProperties, AppState } from "../types";
1
+ import type { ElementsMap, ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
2
+ import type { ActionResult } from "./types";
3
+ import type { AppClassProperties, AppState, UIAppState } from "../types";
3
4
  export declare const actionSelectAllElementsInFrame: {
4
5
  name: "selectAllElementsInFrame";
5
6
  label: string;
@@ -19,31 +20,43 @@ export declare const actionSelectAllElementsInFrame: {
19
20
  isLoading: boolean;
20
21
  errorMessage: React.ReactNode;
21
22
  activeEmbeddable: {
22
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
23
+ element: NonDeletedExcalidrawElement;
23
24
  state: "hover" | "active";
24
25
  } | null;
25
26
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
26
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
27
+ resizingElement: NonDeletedExcalidrawElement | null;
27
28
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
28
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
+ selectionElement: NonDeletedExcalidrawElement | null;
29
30
  isBindingEnabled: boolean;
30
31
  boxSelectionMode: import("../types").BoxSelectionMode;
31
32
  bindingPreference: "enabled" | "disabled";
32
33
  isMidpointSnappingEnabled: boolean;
33
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
34
+ showHints: boolean;
35
+ inputDevice: import("../types").InputDevice;
34
36
  suggestedBinding: {
35
37
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
36
38
  midPoint?: import("@excalidraw/math").GlobalPoint;
37
39
  } | null;
38
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
40
+ textToolHover: {
41
+ type: "text";
42
+ elementId: ExcalidrawElement["id"];
43
+ } | {
44
+ type: "container";
45
+ elementId: ExcalidrawElement["id"];
46
+ } | {
47
+ type: "arrow";
48
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
49
+ anchor: "start" | "end" | "label";
50
+ } | null;
51
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
39
52
  frameRendering: {
40
53
  enabled: boolean;
41
54
  name: boolean;
42
55
  outline: boolean;
43
56
  clip: boolean;
44
57
  };
45
- editingFrame: string | null;
46
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
58
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
59
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
47
60
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
48
61
  activeTool: {
49
62
  lastActiveTool: import("../types").ActiveTool | null;
@@ -61,11 +74,14 @@ export declare const actionSelectAllElementsInFrame: {
61
74
  exportWithDarkMode: boolean;
62
75
  exportScale: number;
63
76
  currentItemStrokeColor: string;
77
+ currentItemStickynoteStrokeColor: string;
78
+ currentItemStickynoteBackgroundColor: string;
64
79
  currentItemBackgroundColor: string;
65
80
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
66
- currentItemStrokeWidth: number;
81
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
67
82
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
68
83
  currentItemRoughness: number;
84
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
69
85
  currentItemOpacity: number;
70
86
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
71
87
  currentItemFontSize: number;
@@ -78,6 +94,7 @@ export declare const actionSelectAllElementsInFrame: {
78
94
  viewBackgroundColor: string;
79
95
  scrollX: number;
80
96
  scrollY: number;
97
+ scrollConstraints: import("../types").ScrollConstraints | null;
81
98
  cursorButton: "up" | "down";
82
99
  scrolledOutside: boolean;
83
100
  name: string | null;
@@ -121,8 +138,13 @@ export declare const actionSelectAllElementsInFrame: {
121
138
  message: React.ReactNode;
122
139
  closable?: boolean;
123
140
  duration?: number;
141
+ action?: {
142
+ label: string;
143
+ onClick: () => void;
144
+ };
124
145
  } | null;
125
146
  zenModeEnabled: boolean;
147
+ minimapEnabled: boolean;
126
148
  theme: import("@excalidraw/element/types").Theme;
127
149
  gridSize: number;
128
150
  gridStep: number;
@@ -150,8 +172,6 @@ export declare const actionSelectAllElementsInFrame: {
150
172
  y: number;
151
173
  } | null;
152
174
  objectsSnapModeEnabled: boolean;
153
- userToFollow: import("../types").UserToFollow | null;
154
- followedBy: Set<import("../types").SocketId>;
155
175
  isCropping: boolean;
156
176
  croppingElementId: ExcalidrawElement["id"] | null;
157
177
  searchMatches: Readonly<{
@@ -163,6 +183,14 @@ export declare const actionSelectAllElementsInFrame: {
163
183
  [groupId: string]: true;
164
184
  };
165
185
  bindMode: import("@excalidraw/element/types").BindMode;
186
+ colorTopPicks: {
187
+ elementStroke: readonly string[] | null;
188
+ elementBackground: readonly string[] | null;
189
+ bucketFill: readonly string[] | null;
190
+ stickyNoteStroke: readonly string[] | null;
191
+ stickyNoteBackground: readonly string[] | null;
192
+ };
193
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
166
194
  };
167
195
  captureUpdate: "IMMEDIATELY";
168
196
  } | {
@@ -195,31 +223,43 @@ export declare const actionRemoveAllElementsFromFrame: {
195
223
  isLoading: boolean;
196
224
  errorMessage: React.ReactNode;
197
225
  activeEmbeddable: {
198
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
226
+ element: NonDeletedExcalidrawElement;
199
227
  state: "hover" | "active";
200
228
  } | null;
201
229
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
202
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
230
+ resizingElement: NonDeletedExcalidrawElement | null;
203
231
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
204
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
232
+ selectionElement: NonDeletedExcalidrawElement | null;
205
233
  isBindingEnabled: boolean;
206
234
  boxSelectionMode: import("../types").BoxSelectionMode;
207
235
  bindingPreference: "enabled" | "disabled";
208
236
  isMidpointSnappingEnabled: boolean;
209
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
237
+ showHints: boolean;
238
+ inputDevice: import("../types").InputDevice;
210
239
  suggestedBinding: {
211
240
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
212
241
  midPoint?: import("@excalidraw/math").GlobalPoint;
213
242
  } | null;
214
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
243
+ textToolHover: {
244
+ type: "text";
245
+ elementId: ExcalidrawElement["id"];
246
+ } | {
247
+ type: "container";
248
+ elementId: ExcalidrawElement["id"];
249
+ } | {
250
+ type: "arrow";
251
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
252
+ anchor: "start" | "end" | "label";
253
+ } | null;
254
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
215
255
  frameRendering: {
216
256
  enabled: boolean;
217
257
  name: boolean;
218
258
  outline: boolean;
219
259
  clip: boolean;
220
260
  };
221
- editingFrame: string | null;
222
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
261
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
262
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
223
263
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
224
264
  activeTool: {
225
265
  lastActiveTool: import("../types").ActiveTool | null;
@@ -237,11 +277,14 @@ export declare const actionRemoveAllElementsFromFrame: {
237
277
  exportWithDarkMode: boolean;
238
278
  exportScale: number;
239
279
  currentItemStrokeColor: string;
280
+ currentItemStickynoteStrokeColor: string;
281
+ currentItemStickynoteBackgroundColor: string;
240
282
  currentItemBackgroundColor: string;
241
283
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
242
- currentItemStrokeWidth: number;
284
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
243
285
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
244
286
  currentItemRoughness: number;
287
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
245
288
  currentItemOpacity: number;
246
289
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
247
290
  currentItemFontSize: number;
@@ -254,6 +297,7 @@ export declare const actionRemoveAllElementsFromFrame: {
254
297
  viewBackgroundColor: string;
255
298
  scrollX: number;
256
299
  scrollY: number;
300
+ scrollConstraints: import("../types").ScrollConstraints | null;
257
301
  cursorButton: "up" | "down";
258
302
  scrolledOutside: boolean;
259
303
  name: string | null;
@@ -297,8 +341,13 @@ export declare const actionRemoveAllElementsFromFrame: {
297
341
  message: React.ReactNode;
298
342
  closable?: boolean;
299
343
  duration?: number;
344
+ action?: {
345
+ label: string;
346
+ onClick: () => void;
347
+ };
300
348
  } | null;
301
349
  zenModeEnabled: boolean;
350
+ minimapEnabled: boolean;
302
351
  theme: import("@excalidraw/element/types").Theme;
303
352
  gridSize: number;
304
353
  gridStep: number;
@@ -326,8 +375,6 @@ export declare const actionRemoveAllElementsFromFrame: {
326
375
  y: number;
327
376
  } | null;
328
377
  objectsSnapModeEnabled: boolean;
329
- userToFollow: import("../types").UserToFollow | null;
330
- followedBy: Set<import("../types").SocketId>;
331
378
  isCropping: boolean;
332
379
  croppingElementId: ExcalidrawElement["id"] | null;
333
380
  searchMatches: Readonly<{
@@ -339,6 +386,14 @@ export declare const actionRemoveAllElementsFromFrame: {
339
386
  [groupId: string]: true;
340
387
  };
341
388
  bindMode: import("@excalidraw/element/types").BindMode;
389
+ colorTopPicks: {
390
+ elementStroke: readonly string[] | null;
391
+ elementBackground: readonly string[] | null;
392
+ bucketFill: readonly string[] | null;
393
+ stickyNoteStroke: readonly string[] | null;
394
+ stickyNoteBackground: readonly string[] | null;
395
+ };
396
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
342
397
  };
343
398
  captureUpdate: "IMMEDIATELY";
344
399
  } | {
@@ -375,205 +430,43 @@ export declare const actionupdateFrameRendering: {
375
430
  isLoading: boolean;
376
431
  errorMessage: React.ReactNode;
377
432
  activeEmbeddable: {
378
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
433
+ element: NonDeletedExcalidrawElement;
379
434
  state: "hover" | "active";
380
435
  } | null;
381
436
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
382
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
437
+ resizingElement: NonDeletedExcalidrawElement | null;
383
438
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
384
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
439
+ selectionElement: NonDeletedExcalidrawElement | null;
385
440
  isBindingEnabled: boolean;
386
441
  boxSelectionMode: import("../types").BoxSelectionMode;
387
442
  bindingPreference: "enabled" | "disabled";
388
443
  isMidpointSnappingEnabled: boolean;
389
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
444
+ showHints: boolean;
445
+ inputDevice: import("../types").InputDevice;
390
446
  suggestedBinding: {
391
447
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
392
448
  midPoint?: import("@excalidraw/math").GlobalPoint;
393
449
  } | null;
394
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
395
- editingFrame: string | null;
396
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
397
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
398
- activeTool: {
399
- lastActiveTool: import("../types").ActiveTool | null;
400
- locked: boolean;
401
- fromSelection: boolean;
402
- } & import("../types").ActiveTool;
403
- preferredSelectionTool: {
404
- type: "selection" | "lasso";
405
- initialized: boolean;
406
- };
407
- penMode: boolean;
408
- penDetected: boolean;
409
- exportBackground: boolean;
410
- exportEmbedScene: boolean;
411
- exportWithDarkMode: boolean;
412
- exportScale: number;
413
- currentItemStrokeColor: string;
414
- currentItemBackgroundColor: string;
415
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
416
- currentItemStrokeWidth: number;
417
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
418
- currentItemRoughness: number;
419
- currentItemOpacity: number;
420
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
421
- currentItemFontSize: number;
422
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
423
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
424
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
425
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
426
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
427
- currentItemArrowType: "sharp" | "round" | "elbow";
428
- viewBackgroundColor: string;
429
- scrollX: number;
430
- scrollY: number;
431
- cursorButton: "up" | "down";
432
- scrolledOutside: boolean;
433
- name: string | null;
434
- isResizing: boolean;
435
- isRotating: boolean;
436
- zoom: import("../types").Zoom;
437
- openMenu: "canvas" | null;
438
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
439
- openSidebar: {
440
- name: import("../types").SidebarName;
441
- tab?: import("../types").SidebarTabName;
442
- } | null;
443
- openDialog: null | {
444
- name: "imageExport" | "help" | "jsonExport";
450
+ textToolHover: {
451
+ type: "text";
452
+ elementId: ExcalidrawElement["id"];
445
453
  } | {
446
- name: "ttd";
447
- tab: "text-to-diagram" | "mermaid";
448
- } | {
449
- name: "commandPalette";
450
- } | {
451
- name: "settings";
452
- } | {
453
- name: "elementLinkSelector";
454
- sourceElementId: ExcalidrawElement["id"];
454
+ type: "container";
455
+ elementId: ExcalidrawElement["id"];
455
456
  } | {
456
- name: "charts";
457
- data: import("../charts").Spreadsheet;
458
- rawText: string;
459
- };
460
- defaultSidebarDockedPreference: boolean;
461
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
462
- selectedElementIds: Readonly<{
463
- [id: string]: true;
464
- }>;
465
- hoveredElementIds: Readonly<{
466
- [id: string]: true;
467
- }>;
468
- previousSelectedElementIds: {
469
- [id: string]: true;
470
- };
471
- selectedElementsAreBeingDragged: boolean;
472
- shouldCacheIgnoreZoom: boolean;
473
- toast: {
474
- message: React.ReactNode;
475
- closable?: boolean;
476
- duration?: number;
457
+ type: "arrow";
458
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
459
+ anchor: "start" | "end" | "label";
477
460
  } | null;
478
- zenModeEnabled: boolean;
479
- theme: import("@excalidraw/element/types").Theme;
480
- gridSize: number;
481
- gridStep: number;
482
- gridModeEnabled: boolean;
483
- viewModeEnabled: boolean;
484
- selectedGroupIds: {
485
- [groupId: string]: boolean;
486
- };
487
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
488
- width: number;
489
- height: number;
490
- offsetTop: number;
491
- offsetLeft: number;
492
- fileHandle: FileSystemFileHandle | null;
493
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
494
- stats: {
495
- open: boolean;
496
- panels: number;
497
- };
498
- showHyperlinkPopup: false | "info" | "editor";
499
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
500
- snapLines: readonly import("../snapping").SnapLine[];
501
- originSnapOffset: {
502
- x: number;
503
- y: number;
504
- } | null;
505
- objectsSnapModeEnabled: boolean;
506
- userToFollow: import("../types").UserToFollow | null;
507
- followedBy: Set<import("../types").SocketId>;
508
- isCropping: boolean;
509
- croppingElementId: ExcalidrawElement["id"] | null;
510
- searchMatches: Readonly<{
511
- focusedId: ExcalidrawElement["id"] | null;
512
- matches: readonly import("../types").SearchMatch[];
513
- }> | null;
514
- activeLockedId: string | null;
515
- lockedMultiSelections: {
516
- [groupId: string]: true;
517
- };
518
- bindMode: import("@excalidraw/element/types").BindMode;
519
- };
520
- captureUpdate: "EVENTUALLY";
521
- };
522
- checked: (appState: AppState) => boolean;
523
- } & {
524
- keyTest?: undefined;
525
- };
526
- export declare const actionSetFrameAsActiveTool: {
527
- name: "setFrameAsActiveTool";
528
- label: string;
529
- trackEvent: {
530
- category: "toolbar";
531
- };
532
- icon: import("react/jsx-runtime").JSX.Element;
533
- viewMode: false;
534
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
535
- elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
536
- appState: {
461
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
462
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
463
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
464
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
537
465
  activeTool: {
538
466
  lastActiveTool: import("../types").ActiveTool | null;
539
467
  locked: boolean;
540
468
  fromSelection: boolean;
541
469
  } & import("../types").ActiveTool;
542
- contextMenu: {
543
- items: import("../components/ContextMenu").ContextMenuItems;
544
- top: number;
545
- left: number;
546
- } | null;
547
- showWelcomeScreen: boolean;
548
- isLoading: boolean;
549
- errorMessage: React.ReactNode;
550
- activeEmbeddable: {
551
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
552
- state: "hover" | "active";
553
- } | null;
554
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
555
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
556
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
557
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
558
- isBindingEnabled: boolean;
559
- boxSelectionMode: import("../types").BoxSelectionMode;
560
- bindingPreference: "enabled" | "disabled";
561
- isMidpointSnappingEnabled: boolean;
562
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
563
- suggestedBinding: {
564
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
565
- midPoint?: import("@excalidraw/math").GlobalPoint;
566
- } | null;
567
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
568
- frameRendering: {
569
- enabled: boolean;
570
- name: boolean;
571
- outline: boolean;
572
- clip: boolean;
573
- };
574
- editingFrame: string | null;
575
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
576
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
577
470
  preferredSelectionTool: {
578
471
  type: "selection" | "lasso";
579
472
  initialized: boolean;
@@ -585,11 +478,14 @@ export declare const actionSetFrameAsActiveTool: {
585
478
  exportWithDarkMode: boolean;
586
479
  exportScale: number;
587
480
  currentItemStrokeColor: string;
481
+ currentItemStickynoteStrokeColor: string;
482
+ currentItemStickynoteBackgroundColor: string;
588
483
  currentItemBackgroundColor: string;
589
484
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
590
- currentItemStrokeWidth: number;
485
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
591
486
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
592
487
  currentItemRoughness: number;
488
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
593
489
  currentItemOpacity: number;
594
490
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
595
491
  currentItemFontSize: number;
@@ -602,6 +498,7 @@ export declare const actionSetFrameAsActiveTool: {
602
498
  viewBackgroundColor: string;
603
499
  scrollX: number;
604
500
  scrollY: number;
501
+ scrollConstraints: import("../types").ScrollConstraints | null;
605
502
  cursorButton: "up" | "down";
606
503
  scrolledOutside: boolean;
607
504
  name: string | null;
@@ -648,8 +545,13 @@ export declare const actionSetFrameAsActiveTool: {
648
545
  message: React.ReactNode;
649
546
  closable?: boolean;
650
547
  duration?: number;
548
+ action?: {
549
+ label: string;
550
+ onClick: () => void;
551
+ };
651
552
  } | null;
652
553
  zenModeEnabled: boolean;
554
+ minimapEnabled: boolean;
653
555
  theme: import("@excalidraw/element/types").Theme;
654
556
  gridSize: number;
655
557
  gridStep: number;
@@ -677,8 +579,6 @@ export declare const actionSetFrameAsActiveTool: {
677
579
  y: number;
678
580
  } | null;
679
581
  objectsSnapModeEnabled: boolean;
680
- userToFollow: import("../types").UserToFollow | null;
681
- followedBy: Set<import("../types").SocketId>;
682
582
  isCropping: boolean;
683
583
  croppingElementId: ExcalidrawElement["id"] | null;
684
584
  searchMatches: Readonly<{
@@ -690,465 +590,42 @@ export declare const actionSetFrameAsActiveTool: {
690
590
  [groupId: string]: true;
691
591
  };
692
592
  bindMode: import("@excalidraw/element/types").BindMode;
593
+ colorTopPicks: {
594
+ elementStroke: readonly string[] | null;
595
+ elementBackground: readonly string[] | null;
596
+ bucketFill: readonly string[] | null;
597
+ stickyNoteStroke: readonly string[] | null;
598
+ stickyNoteBackground: readonly string[] | null;
599
+ };
600
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
693
601
  };
694
602
  captureUpdate: "EVENTUALLY";
695
603
  };
696
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
604
+ checked: (appState: Readonly<UIAppState>) => boolean;
697
605
  } & {
698
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
606
+ keyTest?: undefined;
699
607
  };
608
+ /**
609
+ * The frame that wrapping the selection removes instead: the one frame the
610
+ * selection holds (along with any of its children), or, with no frame
611
+ * selected, the frame whose children are all selected.
612
+ */
613
+ export declare const getFrameToUnwrap: (selectedElements: readonly ExcalidrawElement[], elementsMap: ElementsMap) => ExcalidrawFrameLikeElement | null;
614
+ /** removes the frame, keeping its children selected in its place */
615
+ export declare const unwrapFrame: (elements: readonly ExcalidrawElement[], appState: AppState, frame: ExcalidrawFrameLikeElement, app: AppClassProperties) => ActionResult;
616
+ /**
617
+ * Wraps the selection in a new frame, along with the deselected elements
618
+ * within it — edge to edge when it's an image.
619
+ */
620
+ export declare const wrapInFrame: (elements: readonly ExcalidrawElement[], appState: AppState, selectedElements: NonDeletedExcalidrawElement[], app: AppClassProperties) => ActionResult;
700
621
  export declare const actionWrapSelectionInFrame: {
701
622
  name: "wrapSelectionInFrame";
702
- label: string;
623
+ label: (elements: readonly ExcalidrawElement[], appState: Readonly<UIAppState>, app: AppClassProperties) => "labels.removeFrame" | "labels.wrapSelectionInFrame";
703
624
  trackEvent: {
704
625
  category: "element";
705
626
  };
706
627
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
707
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
708
- elements: ((Readonly<{
709
- id: string;
710
- x: number;
711
- y: number;
712
- strokeColor: string;
713
- backgroundColor: string;
714
- fillStyle: import("@excalidraw/element/types").FillStyle;
715
- strokeWidth: number;
716
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
717
- roundness: null | {
718
- type: import("@excalidraw/element/types").RoundnessType;
719
- value?: number;
720
- };
721
- roughness: number;
722
- opacity: number;
723
- width: number;
724
- height: number;
725
- angle: import("@excalidraw/math").Radians;
726
- seed: number;
727
- version: number;
728
- versionNonce: number;
729
- index: import("@excalidraw/element/types").FractionalIndex | null;
730
- isDeleted: boolean;
731
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
732
- frameId: string | null;
733
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
734
- updated: number;
735
- link: string | null;
736
- locked: boolean;
737
- customData?: Record<string, any>;
738
- }> & Readonly<{
739
- type: "line" | "arrow";
740
- points: readonly import("@excalidraw/math").LocalPoint[];
741
- startBinding: import("@excalidraw/element/types").FixedPointBinding | null;
742
- endBinding: import("@excalidraw/element/types").FixedPointBinding | null;
743
- startArrowhead: import("@excalidraw/element/types").Arrowhead | null;
744
- endArrowhead: import("@excalidraw/element/types").Arrowhead | null;
745
- }> & {
746
- index: import("@excalidraw/element/types").FractionalIndex;
747
- }) | (Readonly<{
748
- id: string;
749
- x: number;
750
- y: number;
751
- strokeColor: string;
752
- backgroundColor: string;
753
- fillStyle: import("@excalidraw/element/types").FillStyle;
754
- strokeWidth: number;
755
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
756
- roundness: null | {
757
- type: import("@excalidraw/element/types").RoundnessType;
758
- value?: number;
759
- };
760
- roughness: number;
761
- opacity: number;
762
- width: number;
763
- height: number;
764
- angle: import("@excalidraw/math").Radians;
765
- seed: number;
766
- version: number;
767
- versionNonce: number;
768
- index: import("@excalidraw/element/types").FractionalIndex | null;
769
- isDeleted: boolean;
770
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
771
- frameId: string | null;
772
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
773
- updated: number;
774
- link: string | null;
775
- locked: boolean;
776
- customData?: Record<string, any>;
777
- }> & {
778
- type: "selection";
779
- } & {
780
- index: import("@excalidraw/element/types").FractionalIndex;
781
- }) | (Readonly<{
782
- id: string;
783
- x: number;
784
- y: number;
785
- strokeColor: string;
786
- backgroundColor: string;
787
- fillStyle: import("@excalidraw/element/types").FillStyle;
788
- strokeWidth: number;
789
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
790
- roundness: null | {
791
- type: import("@excalidraw/element/types").RoundnessType;
792
- value?: number;
793
- };
794
- roughness: number;
795
- opacity: number;
796
- width: number;
797
- height: number;
798
- angle: import("@excalidraw/math").Radians;
799
- seed: number;
800
- version: number;
801
- versionNonce: number;
802
- index: import("@excalidraw/element/types").FractionalIndex | null;
803
- isDeleted: boolean;
804
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
805
- frameId: string | null;
806
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
807
- updated: number;
808
- link: string | null;
809
- locked: boolean;
810
- customData?: Record<string, any>;
811
- }> & {
812
- type: "rectangle";
813
- } & {
814
- index: import("@excalidraw/element/types").FractionalIndex;
815
- }) | (Readonly<{
816
- id: string;
817
- x: number;
818
- y: number;
819
- strokeColor: string;
820
- backgroundColor: string;
821
- fillStyle: import("@excalidraw/element/types").FillStyle;
822
- strokeWidth: number;
823
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
824
- roundness: null | {
825
- type: import("@excalidraw/element/types").RoundnessType;
826
- value?: number;
827
- };
828
- roughness: number;
829
- opacity: number;
830
- width: number;
831
- height: number;
832
- angle: import("@excalidraw/math").Radians;
833
- seed: number;
834
- version: number;
835
- versionNonce: number;
836
- index: import("@excalidraw/element/types").FractionalIndex | null;
837
- isDeleted: boolean;
838
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
839
- frameId: string | null;
840
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
841
- updated: number;
842
- link: string | null;
843
- locked: boolean;
844
- customData?: Record<string, any>;
845
- }> & {
846
- type: "diamond";
847
- } & {
848
- index: import("@excalidraw/element/types").FractionalIndex;
849
- }) | (Readonly<{
850
- id: string;
851
- x: number;
852
- y: number;
853
- strokeColor: string;
854
- backgroundColor: string;
855
- fillStyle: import("@excalidraw/element/types").FillStyle;
856
- strokeWidth: number;
857
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
858
- roundness: null | {
859
- type: import("@excalidraw/element/types").RoundnessType;
860
- value?: number;
861
- };
862
- roughness: number;
863
- opacity: number;
864
- width: number;
865
- height: number;
866
- angle: import("@excalidraw/math").Radians;
867
- seed: number;
868
- version: number;
869
- versionNonce: number;
870
- index: import("@excalidraw/element/types").FractionalIndex | null;
871
- isDeleted: boolean;
872
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
873
- frameId: string | null;
874
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
875
- updated: number;
876
- link: string | null;
877
- locked: boolean;
878
- customData?: Record<string, any>;
879
- }> & {
880
- type: "ellipse";
881
- } & {
882
- index: import("@excalidraw/element/types").FractionalIndex;
883
- }) | (Readonly<{
884
- id: string;
885
- x: number;
886
- y: number;
887
- strokeColor: string;
888
- backgroundColor: string;
889
- fillStyle: import("@excalidraw/element/types").FillStyle;
890
- strokeWidth: number;
891
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
892
- roundness: null | {
893
- type: import("@excalidraw/element/types").RoundnessType;
894
- value?: number;
895
- };
896
- roughness: number;
897
- opacity: number;
898
- width: number;
899
- height: number;
900
- angle: import("@excalidraw/math").Radians;
901
- seed: number;
902
- version: number;
903
- versionNonce: number;
904
- index: import("@excalidraw/element/types").FractionalIndex | null;
905
- isDeleted: boolean;
906
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
907
- frameId: string | null;
908
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
909
- updated: number;
910
- link: string | null;
911
- locked: boolean;
912
- customData?: Record<string, any>;
913
- }> & Readonly<{
914
- type: "embeddable";
915
- }> & {
916
- index: import("@excalidraw/element/types").FractionalIndex;
917
- }) | (Readonly<{
918
- id: string;
919
- x: number;
920
- y: number;
921
- strokeColor: string;
922
- backgroundColor: string;
923
- fillStyle: import("@excalidraw/element/types").FillStyle;
924
- strokeWidth: number;
925
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
926
- roundness: null | {
927
- type: import("@excalidraw/element/types").RoundnessType;
928
- value?: number;
929
- };
930
- roughness: number;
931
- opacity: number;
932
- width: number;
933
- height: number;
934
- angle: import("@excalidraw/math").Radians;
935
- seed: number;
936
- version: number;
937
- versionNonce: number;
938
- index: import("@excalidraw/element/types").FractionalIndex | null;
939
- isDeleted: boolean;
940
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
941
- frameId: string | null;
942
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
943
- updated: number;
944
- link: string | null;
945
- locked: boolean;
946
- customData?: Record<string, any>;
947
- }> & Readonly<{
948
- type: "iframe";
949
- customData?: {
950
- generationData?: import("@excalidraw/element/types").MagicGenerationData;
951
- };
952
- }> & {
953
- index: import("@excalidraw/element/types").FractionalIndex;
954
- }) | (Readonly<{
955
- id: string;
956
- x: number;
957
- y: number;
958
- strokeColor: string;
959
- backgroundColor: string;
960
- fillStyle: import("@excalidraw/element/types").FillStyle;
961
- strokeWidth: number;
962
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
963
- roundness: null | {
964
- type: import("@excalidraw/element/types").RoundnessType;
965
- value?: number;
966
- };
967
- roughness: number;
968
- opacity: number;
969
- width: number;
970
- height: number;
971
- angle: import("@excalidraw/math").Radians;
972
- seed: number;
973
- version: number;
974
- versionNonce: number;
975
- index: import("@excalidraw/element/types").FractionalIndex | null;
976
- isDeleted: boolean;
977
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
978
- frameId: string | null;
979
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
980
- updated: number;
981
- link: string | null;
982
- locked: boolean;
983
- customData?: Record<string, any>;
984
- }> & Readonly<{
985
- type: "image";
986
- fileId: import("@excalidraw/element/types").FileId | null;
987
- status: "pending" | "saved" | "error";
988
- scale: [number, number];
989
- crop: import("@excalidraw/element/types").ImageCrop | null;
990
- }> & {
991
- index: import("@excalidraw/element/types").FractionalIndex;
992
- }) | (Readonly<{
993
- id: string;
994
- x: number;
995
- y: number;
996
- strokeColor: string;
997
- backgroundColor: string;
998
- fillStyle: import("@excalidraw/element/types").FillStyle;
999
- strokeWidth: number;
1000
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1001
- roundness: null | {
1002
- type: import("@excalidraw/element/types").RoundnessType;
1003
- value?: number;
1004
- };
1005
- roughness: number;
1006
- opacity: number;
1007
- width: number;
1008
- height: number;
1009
- angle: import("@excalidraw/math").Radians;
1010
- seed: number;
1011
- version: number;
1012
- versionNonce: number;
1013
- index: import("@excalidraw/element/types").FractionalIndex | null;
1014
- isDeleted: boolean;
1015
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
1016
- frameId: string | null;
1017
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
1018
- updated: number;
1019
- link: string | null;
1020
- locked: boolean;
1021
- customData?: Record<string, any>;
1022
- }> & {
1023
- type: "frame";
1024
- name: string | null;
1025
- } & {
1026
- index: import("@excalidraw/element/types").FractionalIndex;
1027
- }) | (Readonly<{
1028
- id: string;
1029
- x: number;
1030
- y: number;
1031
- strokeColor: string;
1032
- backgroundColor: string;
1033
- fillStyle: import("@excalidraw/element/types").FillStyle;
1034
- strokeWidth: number;
1035
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1036
- roundness: null | {
1037
- type: import("@excalidraw/element/types").RoundnessType;
1038
- value?: number;
1039
- };
1040
- roughness: number;
1041
- opacity: number;
1042
- width: number;
1043
- height: number;
1044
- angle: import("@excalidraw/math").Radians;
1045
- seed: number;
1046
- version: number;
1047
- versionNonce: number;
1048
- index: import("@excalidraw/element/types").FractionalIndex | null;
1049
- isDeleted: boolean;
1050
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
1051
- frameId: string | null;
1052
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
1053
- updated: number;
1054
- link: string | null;
1055
- locked: boolean;
1056
- customData?: Record<string, any>;
1057
- }> & {
1058
- type: "magicframe";
1059
- name: string | null;
1060
- } & {
1061
- index: import("@excalidraw/element/types").FractionalIndex;
1062
- }) | (Readonly<{
1063
- id: string;
1064
- x: number;
1065
- y: number;
1066
- strokeColor: string;
1067
- backgroundColor: string;
1068
- fillStyle: import("@excalidraw/element/types").FillStyle;
1069
- strokeWidth: number;
1070
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1071
- roundness: null | {
1072
- type: import("@excalidraw/element/types").RoundnessType;
1073
- value?: number;
1074
- };
1075
- roughness: number;
1076
- opacity: number;
1077
- width: number;
1078
- height: number;
1079
- angle: import("@excalidraw/math").Radians;
1080
- seed: number;
1081
- version: number;
1082
- versionNonce: number;
1083
- index: import("@excalidraw/element/types").FractionalIndex | null;
1084
- isDeleted: boolean;
1085
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
1086
- frameId: string | null;
1087
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
1088
- updated: number;
1089
- link: string | null;
1090
- locked: boolean;
1091
- customData?: Record<string, any>;
1092
- }> & Readonly<{
1093
- type: "text";
1094
- fontSize: number;
1095
- fontFamily: import("@excalidraw/element/types").FontFamilyValues;
1096
- text: string;
1097
- textAlign: import("@excalidraw/element/types").TextAlign;
1098
- verticalAlign: import("@excalidraw/element/types").VerticalAlign;
1099
- containerId: import("@excalidraw/element/types").ExcalidrawGenericElement["id"] | null;
1100
- originalText: string;
1101
- autoResize: boolean;
1102
- lineHeight: number & {
1103
- _brand: "unitlessLineHeight";
1104
- };
1105
- }> & {
1106
- index: import("@excalidraw/element/types").FractionalIndex;
1107
- }) | (Readonly<{
1108
- id: string;
1109
- x: number;
1110
- y: number;
1111
- strokeColor: string;
1112
- backgroundColor: string;
1113
- fillStyle: import("@excalidraw/element/types").FillStyle;
1114
- strokeWidth: number;
1115
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1116
- roundness: null | {
1117
- type: import("@excalidraw/element/types").RoundnessType;
1118
- value?: number;
1119
- };
1120
- roughness: number;
1121
- opacity: number;
1122
- width: number;
1123
- height: number;
1124
- angle: import("@excalidraw/math").Radians;
1125
- seed: number;
1126
- version: number;
1127
- versionNonce: number;
1128
- index: import("@excalidraw/element/types").FractionalIndex | null;
1129
- isDeleted: boolean;
1130
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
1131
- frameId: string | null;
1132
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
1133
- updated: number;
1134
- link: string | null;
1135
- locked: boolean;
1136
- customData?: Record<string, any>;
1137
- }> & Readonly<{
1138
- type: "freedraw";
1139
- points: readonly import("@excalidraw/math").LocalPoint[];
1140
- pressures: readonly number[];
1141
- simulatePressure: boolean;
1142
- }> & {
1143
- index: import("@excalidraw/element/types").FractionalIndex;
1144
- }) | import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameElement>)[];
1145
- appState: {
1146
- selectedElementIds: {
1147
- [x: string]: true;
1148
- };
1149
- };
1150
- captureUpdate: "IMMEDIATELY";
1151
- };
628
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
1152
629
  } & {
1153
630
  keyTest?: undefined;
1154
631
  };