@excalidraw/common 0.18.0-d9e8a33 → 0.18.0-dabd83c

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 (253) hide show
  1. package/dist/dev/index.js +237 -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 +68 -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 +98 -18
  54. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  55. package/dist/types/excalidraw/actions/actionBoundText.d.ts +79 -204
  56. package/dist/types/excalidraw/actions/actionCanvas.d.ts +306 -951
  57. package/dist/types/excalidraw/actions/actionClipboard.d.ts +68 -12
  58. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +34 -6
  59. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -521
  60. package/dist/types/excalidraw/actions/actionDeselect.d.ts +35 -7
  61. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  62. package/dist/types/excalidraw/actions/actionElementLink.d.ts +34 -6
  63. package/dist/types/excalidraw/actions/actionElementLock.d.ts +69 -13
  64. package/dist/types/excalidraw/actions/actionExport.d.ts +76 -20
  65. package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
  66. package/dist/types/excalidraw/actions/actionFrame.d.ts +132 -652
  67. package/dist/types/excalidraw/actions/actionGroup.d.ts +83 -27
  68. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +89 -9
  69. package/dist/types/excalidraw/actions/actionLink.d.ts +35 -7
  70. package/dist/types/excalidraw/actions/actionMenu.d.ts +34 -6
  71. package/dist/types/excalidraw/actions/actionProperties.d.ts +106 -34
  72. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +39 -11
  73. package/dist/types/excalidraw/actions/actionStyles.d.ts +31 -7
  74. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +452 -6
  75. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +35 -7
  76. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +38 -11
  77. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +35 -7
  78. package/dist/types/excalidraw/actions/actionToggleMinimap.d.ts +206 -0
  79. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +35 -7
  80. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +38 -11
  81. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  82. package/dist/types/excalidraw/actions/{actionEmbeddable.d.ts → actionToggleShowHints.d.ts} +50 -19
  83. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +35 -7
  84. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +36 -8
  85. package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
  86. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +35 -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 +37 -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/blob.d.ts +84 -28
  199. package/dist/types/excalidraw/data/index.d.ts +7 -7
  200. package/dist/types/excalidraw/data/json.d.ts +48 -20
  201. package/dist/types/excalidraw/data/library.d.ts +1 -1
  202. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  203. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  204. package/dist/types/excalidraw/fonts/Fonts.d.ts +12 -8
  205. package/dist/types/excalidraw/history.d.ts +10 -4
  206. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  207. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  208. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
  209. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  210. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  211. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  212. package/dist/types/excalidraw/mermaid.d.ts +7 -0
  213. package/dist/types/excalidraw/reactUtils.d.ts +1 -1
  214. package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
  215. package/dist/types/excalidraw/renderer/animation.d.ts +15 -4
  216. package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
  217. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +2 -4
  218. package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
  219. package/dist/types/excalidraw/scene/Renderer.d.ts +490 -21
  220. package/dist/types/excalidraw/scene/export.d.ts +344 -21
  221. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  222. package/dist/types/excalidraw/scene/types.d.ts +30 -5
  223. package/dist/types/excalidraw/snapping.d.ts +7 -7
  224. package/dist/types/excalidraw/types.d.ts +617 -29
  225. package/dist/types/excalidraw/viewport.d.ts +308 -0
  226. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +13 -3
  227. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  228. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  229. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  230. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  231. package/dist/types/laser-pointer/src/state.d.ts +36 -0
  232. package/dist/types/math/src/constants.d.ts +0 -1
  233. package/dist/types/math/src/curve.d.ts +19 -12
  234. package/dist/types/math/src/index.d.ts +1 -0
  235. package/dist/types/math/src/pca.d.ts +79 -0
  236. package/dist/types/math/src/point.d.ts +1 -0
  237. package/dist/types/math/src/polygon.d.ts +25 -1
  238. package/dist/types/math/src/segment.d.ts +6 -0
  239. package/dist/types/utils/src/index.d.ts +4 -3
  240. package/dist/types/utils/src/shape.d.ts +2 -2
  241. package/package.json +1 -1
  242. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  243. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  244. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  245. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
  246. package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
  247. package/dist/types/excalidraw/components/shapes.d.ts +0 -263
  248. package/dist/types/excalidraw/cursor.d.ts +0 -5
  249. package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
  250. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  251. package/dist/types/utils/src/bbox.d.ts +0 -9
  252. package/dist/types/utils/src/export.d.ts +0 -35
  253. 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,44 @@ 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
+ splitOnPaste: boolean;
36
+ inputDevice: import("../types").InputDevice;
34
37
  suggestedBinding: {
35
38
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
36
39
  midPoint?: import("@excalidraw/math").GlobalPoint;
37
40
  } | null;
38
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
41
+ textToolHover: {
42
+ type: "text";
43
+ elementId: ExcalidrawElement["id"];
44
+ } | {
45
+ type: "container";
46
+ elementId: ExcalidrawElement["id"];
47
+ } | {
48
+ type: "arrow";
49
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
50
+ anchor: "start" | "end" | "label";
51
+ } | null;
52
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
39
53
  frameRendering: {
40
54
  enabled: boolean;
41
55
  name: boolean;
42
56
  outline: boolean;
43
57
  clip: boolean;
44
58
  };
45
- editingFrame: string | null;
46
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
59
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
60
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
47
61
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
48
62
  activeTool: {
49
63
  lastActiveTool: import("../types").ActiveTool | null;
@@ -61,11 +75,14 @@ export declare const actionSelectAllElementsInFrame: {
61
75
  exportWithDarkMode: boolean;
62
76
  exportScale: number;
63
77
  currentItemStrokeColor: string;
78
+ currentItemStickynoteStrokeColor: string;
79
+ currentItemStickynoteBackgroundColor: string;
64
80
  currentItemBackgroundColor: string;
65
81
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
66
- currentItemStrokeWidth: number;
82
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
67
83
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
68
84
  currentItemRoughness: number;
85
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
69
86
  currentItemOpacity: number;
70
87
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
71
88
  currentItemFontSize: number;
@@ -78,6 +95,7 @@ export declare const actionSelectAllElementsInFrame: {
78
95
  viewBackgroundColor: string;
79
96
  scrollX: number;
80
97
  scrollY: number;
98
+ scrollConstraints: import("../types").ScrollConstraints | null;
81
99
  cursorButton: "up" | "down";
82
100
  scrolledOutside: boolean;
83
101
  name: string | null;
@@ -121,8 +139,13 @@ export declare const actionSelectAllElementsInFrame: {
121
139
  message: React.ReactNode;
122
140
  closable?: boolean;
123
141
  duration?: number;
142
+ action?: {
143
+ label: string;
144
+ onClick: () => void;
145
+ };
124
146
  } | null;
125
147
  zenModeEnabled: boolean;
148
+ minimapEnabled: boolean;
126
149
  theme: import("@excalidraw/element/types").Theme;
127
150
  gridSize: number;
128
151
  gridStep: number;
@@ -150,8 +173,6 @@ export declare const actionSelectAllElementsInFrame: {
150
173
  y: number;
151
174
  } | null;
152
175
  objectsSnapModeEnabled: boolean;
153
- userToFollow: import("../types").UserToFollow | null;
154
- followedBy: Set<import("../types").SocketId>;
155
176
  isCropping: boolean;
156
177
  croppingElementId: ExcalidrawElement["id"] | null;
157
178
  searchMatches: Readonly<{
@@ -163,6 +184,14 @@ export declare const actionSelectAllElementsInFrame: {
163
184
  [groupId: string]: true;
164
185
  };
165
186
  bindMode: import("@excalidraw/element/types").BindMode;
187
+ colorTopPicks: {
188
+ elementStroke: readonly string[] | null;
189
+ elementBackground: readonly string[] | null;
190
+ bucketFill: readonly string[] | null;
191
+ stickyNoteStroke: readonly string[] | null;
192
+ stickyNoteBackground: readonly string[] | null;
193
+ };
194
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
166
195
  };
167
196
  captureUpdate: "IMMEDIATELY";
168
197
  } | {
@@ -195,31 +224,44 @@ export declare const actionRemoveAllElementsFromFrame: {
195
224
  isLoading: boolean;
196
225
  errorMessage: React.ReactNode;
197
226
  activeEmbeddable: {
198
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
227
+ element: NonDeletedExcalidrawElement;
199
228
  state: "hover" | "active";
200
229
  } | null;
201
230
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
202
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
231
+ resizingElement: NonDeletedExcalidrawElement | null;
203
232
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
204
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
233
+ selectionElement: NonDeletedExcalidrawElement | null;
205
234
  isBindingEnabled: boolean;
206
235
  boxSelectionMode: import("../types").BoxSelectionMode;
207
236
  bindingPreference: "enabled" | "disabled";
208
237
  isMidpointSnappingEnabled: boolean;
209
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
238
+ showHints: boolean;
239
+ splitOnPaste: boolean;
240
+ inputDevice: import("../types").InputDevice;
210
241
  suggestedBinding: {
211
242
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
212
243
  midPoint?: import("@excalidraw/math").GlobalPoint;
213
244
  } | null;
214
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
245
+ textToolHover: {
246
+ type: "text";
247
+ elementId: ExcalidrawElement["id"];
248
+ } | {
249
+ type: "container";
250
+ elementId: ExcalidrawElement["id"];
251
+ } | {
252
+ type: "arrow";
253
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
254
+ anchor: "start" | "end" | "label";
255
+ } | null;
256
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
215
257
  frameRendering: {
216
258
  enabled: boolean;
217
259
  name: boolean;
218
260
  outline: boolean;
219
261
  clip: boolean;
220
262
  };
221
- editingFrame: string | null;
222
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
263
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
264
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
223
265
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
224
266
  activeTool: {
225
267
  lastActiveTool: import("../types").ActiveTool | null;
@@ -237,11 +279,14 @@ export declare const actionRemoveAllElementsFromFrame: {
237
279
  exportWithDarkMode: boolean;
238
280
  exportScale: number;
239
281
  currentItemStrokeColor: string;
282
+ currentItemStickynoteStrokeColor: string;
283
+ currentItemStickynoteBackgroundColor: string;
240
284
  currentItemBackgroundColor: string;
241
285
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
242
- currentItemStrokeWidth: number;
286
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
243
287
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
244
288
  currentItemRoughness: number;
289
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
245
290
  currentItemOpacity: number;
246
291
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
247
292
  currentItemFontSize: number;
@@ -254,6 +299,7 @@ export declare const actionRemoveAllElementsFromFrame: {
254
299
  viewBackgroundColor: string;
255
300
  scrollX: number;
256
301
  scrollY: number;
302
+ scrollConstraints: import("../types").ScrollConstraints | null;
257
303
  cursorButton: "up" | "down";
258
304
  scrolledOutside: boolean;
259
305
  name: string | null;
@@ -297,8 +343,13 @@ export declare const actionRemoveAllElementsFromFrame: {
297
343
  message: React.ReactNode;
298
344
  closable?: boolean;
299
345
  duration?: number;
346
+ action?: {
347
+ label: string;
348
+ onClick: () => void;
349
+ };
300
350
  } | null;
301
351
  zenModeEnabled: boolean;
352
+ minimapEnabled: boolean;
302
353
  theme: import("@excalidraw/element/types").Theme;
303
354
  gridSize: number;
304
355
  gridStep: number;
@@ -326,8 +377,6 @@ export declare const actionRemoveAllElementsFromFrame: {
326
377
  y: number;
327
378
  } | null;
328
379
  objectsSnapModeEnabled: boolean;
329
- userToFollow: import("../types").UserToFollow | null;
330
- followedBy: Set<import("../types").SocketId>;
331
380
  isCropping: boolean;
332
381
  croppingElementId: ExcalidrawElement["id"] | null;
333
382
  searchMatches: Readonly<{
@@ -339,6 +388,14 @@ export declare const actionRemoveAllElementsFromFrame: {
339
388
  [groupId: string]: true;
340
389
  };
341
390
  bindMode: import("@excalidraw/element/types").BindMode;
391
+ colorTopPicks: {
392
+ elementStroke: readonly string[] | null;
393
+ elementBackground: readonly string[] | null;
394
+ bucketFill: readonly string[] | null;
395
+ stickyNoteStroke: readonly string[] | null;
396
+ stickyNoteBackground: readonly string[] | null;
397
+ };
398
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
342
399
  };
343
400
  captureUpdate: "IMMEDIATELY";
344
401
  } | {
@@ -375,205 +432,44 @@ export declare const actionupdateFrameRendering: {
375
432
  isLoading: boolean;
376
433
  errorMessage: React.ReactNode;
377
434
  activeEmbeddable: {
378
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
435
+ element: NonDeletedExcalidrawElement;
379
436
  state: "hover" | "active";
380
437
  } | null;
381
438
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
382
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
439
+ resizingElement: NonDeletedExcalidrawElement | null;
383
440
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
384
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
441
+ selectionElement: NonDeletedExcalidrawElement | null;
385
442
  isBindingEnabled: boolean;
386
443
  boxSelectionMode: import("../types").BoxSelectionMode;
387
444
  bindingPreference: "enabled" | "disabled";
388
445
  isMidpointSnappingEnabled: boolean;
389
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
446
+ showHints: boolean;
447
+ splitOnPaste: boolean;
448
+ inputDevice: import("../types").InputDevice;
390
449
  suggestedBinding: {
391
450
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
392
451
  midPoint?: import("@excalidraw/math").GlobalPoint;
393
452
  } | 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";
453
+ textToolHover: {
454
+ type: "text";
455
+ elementId: ExcalidrawElement["id"];
445
456
  } | {
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"];
457
+ type: "container";
458
+ elementId: ExcalidrawElement["id"];
455
459
  } | {
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;
460
+ type: "arrow";
461
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
462
+ anchor: "start" | "end" | "label";
477
463
  } | 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: {
464
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
465
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
466
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
467
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
537
468
  activeTool: {
538
469
  lastActiveTool: import("../types").ActiveTool | null;
539
470
  locked: boolean;
540
471
  fromSelection: boolean;
541
472
  } & 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
473
  preferredSelectionTool: {
578
474
  type: "selection" | "lasso";
579
475
  initialized: boolean;
@@ -585,11 +481,14 @@ export declare const actionSetFrameAsActiveTool: {
585
481
  exportWithDarkMode: boolean;
586
482
  exportScale: number;
587
483
  currentItemStrokeColor: string;
484
+ currentItemStickynoteStrokeColor: string;
485
+ currentItemStickynoteBackgroundColor: string;
588
486
  currentItemBackgroundColor: string;
589
487
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
590
- currentItemStrokeWidth: number;
488
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
591
489
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
592
490
  currentItemRoughness: number;
491
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
593
492
  currentItemOpacity: number;
594
493
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
595
494
  currentItemFontSize: number;
@@ -602,6 +501,7 @@ export declare const actionSetFrameAsActiveTool: {
602
501
  viewBackgroundColor: string;
603
502
  scrollX: number;
604
503
  scrollY: number;
504
+ scrollConstraints: import("../types").ScrollConstraints | null;
605
505
  cursorButton: "up" | "down";
606
506
  scrolledOutside: boolean;
607
507
  name: string | null;
@@ -648,8 +548,13 @@ export declare const actionSetFrameAsActiveTool: {
648
548
  message: React.ReactNode;
649
549
  closable?: boolean;
650
550
  duration?: number;
551
+ action?: {
552
+ label: string;
553
+ onClick: () => void;
554
+ };
651
555
  } | null;
652
556
  zenModeEnabled: boolean;
557
+ minimapEnabled: boolean;
653
558
  theme: import("@excalidraw/element/types").Theme;
654
559
  gridSize: number;
655
560
  gridStep: number;
@@ -677,8 +582,6 @@ export declare const actionSetFrameAsActiveTool: {
677
582
  y: number;
678
583
  } | null;
679
584
  objectsSnapModeEnabled: boolean;
680
- userToFollow: import("../types").UserToFollow | null;
681
- followedBy: Set<import("../types").SocketId>;
682
585
  isCropping: boolean;
683
586
  croppingElementId: ExcalidrawElement["id"] | null;
684
587
  searchMatches: Readonly<{
@@ -690,465 +593,42 @@ export declare const actionSetFrameAsActiveTool: {
690
593
  [groupId: string]: true;
691
594
  };
692
595
  bindMode: import("@excalidraw/element/types").BindMode;
596
+ colorTopPicks: {
597
+ elementStroke: readonly string[] | null;
598
+ elementBackground: readonly string[] | null;
599
+ bucketFill: readonly string[] | null;
600
+ stickyNoteStroke: readonly string[] | null;
601
+ stickyNoteBackground: readonly string[] | null;
602
+ };
603
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
693
604
  };
694
605
  captureUpdate: "EVENTUALLY";
695
606
  };
696
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
607
+ checked: (appState: Readonly<UIAppState>) => boolean;
697
608
  } & {
698
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
609
+ keyTest?: undefined;
699
610
  };
611
+ /**
612
+ * The frame that wrapping the selection removes instead: the one frame the
613
+ * selection holds (along with any of its children), or, with no frame
614
+ * selected, the frame whose children are all selected.
615
+ */
616
+ export declare const getFrameToUnwrap: (selectedElements: readonly ExcalidrawElement[], elementsMap: ElementsMap) => ExcalidrawFrameLikeElement | null;
617
+ /** removes the frame, keeping its children selected in its place */
618
+ export declare const unwrapFrame: (elements: readonly ExcalidrawElement[], appState: AppState, frame: ExcalidrawFrameLikeElement, app: AppClassProperties) => ActionResult;
619
+ /**
620
+ * Wraps the selection in a new frame, along with the deselected elements
621
+ * within it — edge to edge when it's an image.
622
+ */
623
+ export declare const wrapInFrame: (elements: readonly ExcalidrawElement[], appState: AppState, selectedElements: NonDeletedExcalidrawElement[], app: AppClassProperties) => ActionResult;
700
624
  export declare const actionWrapSelectionInFrame: {
701
625
  name: "wrapSelectionInFrame";
702
- label: string;
626
+ label: (elements: readonly ExcalidrawElement[], appState: Readonly<UIAppState>, app: AppClassProperties) => "labels.removeFrame" | "labels.wrapSelectionInFrame";
703
627
  trackEvent: {
704
628
  category: "element";
705
629
  };
706
630
  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
- };
631
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
1152
632
  } & {
1153
633
  keyTest?: undefined;
1154
634
  };