@excalidraw/math 0.18.0-4e0441e → 0.18.0-4e758db

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 (344) hide show
  1. package/dist/dev/index.js +313 -116
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/debug.d.ts +21 -0
  5. package/dist/types/common/src/appEventBus.d.ts +27 -0
  6. package/dist/types/common/src/bounds.d.ts +10 -0
  7. package/dist/types/common/src/colors.d.ts +81 -39
  8. package/dist/types/common/src/constants.d.ts +75 -34
  9. package/dist/types/common/src/editorInterface.d.ts +34 -0
  10. package/dist/types/common/src/font-metadata.d.ts +1 -3
  11. package/dist/types/common/src/index.d.ts +5 -0
  12. package/dist/types/common/src/keys.d.ts +5 -1
  13. package/dist/types/common/src/points.d.ts +1 -1
  14. package/dist/types/common/src/random.d.ts +7 -0
  15. package/dist/types/common/src/utility-types.d.ts +0 -1
  16. package/dist/types/common/src/utils.d.ts +45 -77
  17. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  18. package/dist/types/element/src/Scene.d.ts +12 -8
  19. package/dist/types/element/src/align.d.ts +2 -2
  20. package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
  21. package/dist/types/element/src/arrowheads.d.ts +3 -0
  22. package/dist/types/element/src/arrows/focus.d.ts +30 -0
  23. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  24. package/dist/types/element/src/binding.d.ts +79 -51
  25. package/dist/types/element/src/bounds.d.ts +25 -18
  26. package/dist/types/element/src/bucketFill.d.ts +110 -0
  27. package/dist/types/element/src/collision.d.ts +7 -2
  28. package/dist/types/element/src/comparisons.d.ts +10 -7
  29. package/dist/types/element/src/convertToShape.d.ts +23 -0
  30. package/dist/types/element/src/delta.d.ts +23 -1
  31. package/dist/types/element/src/distribute.d.ts +3 -2
  32. package/dist/types/element/src/dragElements.d.ts +30 -3
  33. package/dist/types/element/src/duplicate.d.ts +7 -6
  34. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  35. package/dist/types/element/src/embeddable.d.ts +2 -2
  36. package/dist/types/element/src/flowchart.d.ts +11 -7
  37. package/dist/types/element/src/fractionalIndex.d.ts +4 -4
  38. package/dist/types/element/src/frame.d.ts +16 -11
  39. package/dist/types/element/src/groups.d.ts +9 -9
  40. package/dist/types/element/src/heading.d.ts +2 -1
  41. package/dist/types/element/src/image.d.ts +1 -11
  42. package/dist/types/element/src/index.d.ts +9 -4
  43. package/dist/types/element/src/linearElementEditor.d.ts +48 -30
  44. package/dist/types/element/src/mutateElement.d.ts +6 -2
  45. package/dist/types/element/src/newElement.d.ts +44 -8
  46. package/dist/types/element/src/renderElement.d.ts +1 -10
  47. package/dist/types/element/src/resizeElements.d.ts +12 -12
  48. package/dist/types/element/src/resizeTest.d.ts +6 -5
  49. package/dist/types/element/src/selection.d.ts +14 -14
  50. package/dist/types/element/src/shape.d.ts +21 -8
  51. package/dist/types/element/src/sizeHelpers.d.ts +6 -0
  52. package/dist/types/element/src/sortElements.d.ts +10 -0
  53. package/dist/types/element/src/stickyNote.d.ts +183 -0
  54. package/dist/types/element/src/textElement.d.ts +14 -10
  55. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  56. package/dist/types/element/src/textWrapping.d.ts +26 -0
  57. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +27 -8
  58. package/dist/types/element/src/transformHandles.d.ts +8 -27
  59. package/dist/types/element/src/typeChecks.d.ts +30 -31
  60. package/dist/types/element/src/types.d.ts +55 -20
  61. package/dist/types/element/src/utils.d.ts +15 -6
  62. package/dist/types/element/src/zindex.d.ts +7 -1
  63. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +206 -219
  64. package/dist/types/excalidraw/actions/actionAlign.d.ts +12 -13
  65. package/dist/types/excalidraw/actions/actionBoundText.d.ts +122 -131
  66. package/dist/types/excalidraw/actions/actionCanvas.d.ts +446 -1594
  67. package/dist/types/excalidraw/actions/actionClipboard.d.ts +149 -919
  68. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +59 -64
  69. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +192 -208
  70. package/dist/types/excalidraw/actions/actionDeselect.d.ts +170 -0
  71. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -6
  72. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -4
  73. package/dist/types/excalidraw/actions/actionElementLink.d.ts +66 -77
  74. package/dist/types/excalidraw/actions/actionElementLock.d.ts +121 -130
  75. package/dist/types/excalidraw/actions/actionExport.d.ts +200 -1449
  76. package/dist/types/excalidraw/actions/actionFinalize.d.ts +11 -404
  77. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  78. package/dist/types/excalidraw/actions/actionFrame.d.ts +318 -509
  79. package/dist/types/excalidraw/actions/actionGroup.d.ts +132 -149
  80. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +205 -196
  81. package/dist/types/excalidraw/actions/actionLink.d.ts +73 -78
  82. package/dist/types/excalidraw/actions/actionMenu.d.ts +60 -71
  83. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -369
  84. package/dist/types/excalidraw/actions/actionProperties.d.ts +213 -2610
  85. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +66 -75
  86. package/dist/types/excalidraw/actions/actionStyles.d.ts +60 -64
  87. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +4 -4
  88. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +186 -0
  89. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +74 -80
  90. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +186 -0
  91. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +73 -78
  92. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +62 -74
  93. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +2 -2
  94. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +72 -77
  95. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +73 -78
  96. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +73 -78
  97. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  98. package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
  99. package/dist/types/excalidraw/actions/index.d.ts +4 -2
  100. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  101. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  102. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  103. package/dist/types/excalidraw/actions/types.d.ts +11 -7
  104. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  105. package/dist/types/excalidraw/appState.d.ts +50 -25
  106. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  107. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  108. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  109. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  110. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  111. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  112. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  113. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  114. package/dist/types/excalidraw/clipboard.d.ts +13 -38
  115. package/dist/types/excalidraw/components/Actions.d.ts +22 -14
  116. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  117. package/dist/types/excalidraw/components/App.arrowText.d.ts +104 -0
  118. package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
  119. package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
  120. package/dist/types/excalidraw/components/App.d.ts +552 -125
  121. package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
  122. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  123. package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
  124. package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
  125. package/dist/types/excalidraw/components/App.wheel.d.ts +33 -0
  126. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  127. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  128. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  129. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -5
  130. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  131. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +3 -1
  132. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
  133. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
  134. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  135. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -2
  136. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
  137. package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +31 -0
  138. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  139. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +2 -4
  140. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +4 -4
  141. package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
  142. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  143. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  144. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  145. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  146. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  147. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -2
  148. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  149. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  150. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  151. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  152. package/dist/types/excalidraw/components/IconButton.d.ts +48 -0
  153. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  154. package/dist/types/excalidraw/components/InlineIcon.d.ts +2 -2
  155. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  156. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  157. package/dist/types/excalidraw/components/LayerUI.d.ts +5 -2
  158. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  159. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  160. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  161. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  162. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  163. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  164. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  165. package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
  166. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  167. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  168. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  169. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  170. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  171. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  172. package/dist/types/excalidraw/components/Popover.d.ts +1 -3
  173. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  174. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  175. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  176. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  177. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  178. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  179. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  180. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  181. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +16 -22
  182. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  183. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  184. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  185. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  186. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  187. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  188. package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
  189. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  190. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  191. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
  192. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -3
  193. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
  194. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  195. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  196. package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
  197. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  198. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  199. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  200. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  201. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  202. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  203. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  204. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  205. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  206. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  207. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  208. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  209. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  210. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  211. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  212. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  213. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  214. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  215. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  216. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  217. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  218. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  219. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  220. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  221. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  222. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  223. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  224. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  225. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  226. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  227. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  228. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  229. package/dist/types/excalidraw/components/Toast.d.ts +11 -7
  230. package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
  231. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  232. package/dist/types/excalidraw/components/Tools.d.ts +151 -0
  233. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  234. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  235. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  236. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +10 -4
  237. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +3 -0
  238. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  239. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +48 -38
  240. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -6
  241. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  242. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
  243. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  244. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  245. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -2
  246. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  247. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  248. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  249. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  250. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  251. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  252. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
  253. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  254. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  255. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  256. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +3 -3
  257. package/dist/types/excalidraw/components/icons.d.ts +51 -22
  258. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +25 -3
  259. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -35
  260. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  261. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  262. package/dist/types/excalidraw/data/blob.d.ts +354 -7
  263. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  264. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  265. package/dist/types/excalidraw/data/filesystem.d.ts +5 -7
  266. package/dist/types/excalidraw/data/index.d.ts +8 -9
  267. package/dist/types/excalidraw/data/json.d.ts +183 -3
  268. package/dist/types/excalidraw/data/library.d.ts +25 -10
  269. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  270. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  271. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  272. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  273. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  274. package/dist/types/excalidraw/errors.d.ts +14 -0
  275. package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
  276. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  277. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  278. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  279. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  280. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
  281. package/dist/types/excalidraw/i18n.d.ts +2 -2
  282. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  283. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  284. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  285. package/dist/types/excalidraw/renderer/animation.d.ts +16 -0
  286. package/dist/types/excalidraw/renderer/helpers.d.ts +31 -8
  287. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +7 -15
  288. package/dist/types/excalidraw/scene/Renderer.d.ts +477 -18
  289. package/dist/types/excalidraw/scene/export.d.ts +4 -4
  290. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  291. package/dist/types/excalidraw/scene/types.d.ts +27 -8
  292. package/dist/types/excalidraw/snapping.d.ts +12 -12
  293. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  294. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  295. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  296. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  297. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  298. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  299. package/dist/types/excalidraw/types.d.ts +566 -55
  300. package/dist/types/excalidraw/viewport.d.ts +280 -0
  301. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +8 -5
  302. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  303. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  304. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  305. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  306. package/dist/types/laser-pointer/src/state.d.ts +36 -0
  307. package/dist/types/math/src/constants.d.ts +0 -1
  308. package/dist/types/math/src/curve.d.ts +23 -13
  309. package/dist/types/math/src/index.d.ts +1 -0
  310. package/dist/types/math/src/pca.d.ts +79 -0
  311. package/dist/types/math/src/point.d.ts +8 -2
  312. package/dist/types/math/src/polygon.d.ts +26 -2
  313. package/dist/types/math/src/range.d.ts +1 -3
  314. package/dist/types/math/src/segment.d.ts +9 -3
  315. package/dist/types/math/src/types.d.ts +25 -1
  316. package/dist/types/utils/src/export.d.ts +9 -8
  317. package/dist/types/utils/src/index.d.ts +1 -2
  318. package/dist/types/utils/src/shape.d.ts +8 -8
  319. package/package.json +2 -2
  320. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -190
  321. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  322. package/dist/types/excalidraw/charts.d.ts +0 -27
  323. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  324. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
  325. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  326. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  327. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  328. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -11
  329. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  330. package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
  331. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  332. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -10
  333. package/dist/types/excalidraw/components/shapes.d.ts +0 -190
  334. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  335. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  336. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
  337. package/dist/types/excalidraw/cursor.d.ts +0 -5
  338. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  339. package/dist/types/excalidraw/index.d.ts +0 -47
  340. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  341. package/dist/types/excalidraw/scene/scroll.d.ts +0 -23
  342. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  343. package/dist/types/utils/src/bbox.d.ts +0 -9
  344. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,27 +1,22 @@
1
1
  import React from "react";
2
2
  import type { ValueOf } from "@excalidraw/common/utility-types";
3
3
  import type { JSX } from "react";
4
+ export type DropdownMenuItemProps = {
5
+ icon?: JSX.Element;
6
+ badge?: React.ReactNode;
7
+ value?: string | number | undefined;
8
+ onSelect?: (event: Event) => void;
9
+ children: React.ReactNode;
10
+ shortcut?: string;
11
+ selected?: boolean;
12
+ className?: string;
13
+ } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">;
4
14
  declare const DropdownMenuItem: {
5
- ({ icon, value, order, children, shortcut, className, hovered, selected, textStyle, onSelect, onClick, ...rest }: {
6
- icon?: JSX.Element | undefined;
7
- value?: string | number | undefined;
8
- order?: number | undefined;
9
- onSelect?: ((event: Event) => void) | undefined;
10
- children: React.ReactNode;
11
- shortcut?: string | undefined;
12
- hovered?: boolean | undefined;
13
- selected?: boolean | undefined;
14
- textStyle?: React.CSSProperties | undefined;
15
- className?: string | undefined;
16
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
15
+ ({ icon, badge, value, children, shortcut, className, selected, onSelect, ...rest }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
17
16
  displayName: string;
18
17
  Badge: {
19
18
  ({ type, children, }: {
20
- type?: ValueOf<{
21
- readonly GREEN: "green";
22
- readonly RED: "red";
23
- readonly BLUE: "blue";
24
- }> | undefined;
19
+ type?: ValueOf<typeof DropDownMenuItemBadgeType>;
25
20
  children: React.ReactNode;
26
21
  }): import("react/jsx-runtime").JSX.Element;
27
22
  displayName: string;
@@ -34,11 +29,7 @@ export declare const DropDownMenuItemBadgeType: {
34
29
  };
35
30
  export declare const DropDownMenuItemBadge: {
36
31
  ({ type, children, }: {
37
- type?: ValueOf<{
38
- readonly GREEN: "green";
39
- readonly RED: "red";
40
- readonly BLUE: "blue";
41
- }> | undefined;
32
+ type?: ValueOf<typeof DropDownMenuItemBadgeType>;
42
33
  children: React.ReactNode;
43
34
  }): import("react/jsx-runtime").JSX.Element;
44
35
  displayName: string;
@@ -0,0 +1,5 @@
1
+ import type { DropdownMenuItemProps } from "./DropdownMenuItem";
2
+ declare const DropdownMenuItemCheckbox: (props: Omit<DropdownMenuItemProps, "icon"> & {
3
+ checked: boolean;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default DropdownMenuItemCheckbox;
@@ -1,8 +1,9 @@
1
1
  import type { JSX } from "react";
2
- declare const MenuItemContent: ({ textStyle, icon, shortcut, children, }: {
3
- icon?: JSX.Element | undefined;
4
- shortcut?: string | undefined;
5
- textStyle?: import("react").CSSProperties | undefined;
2
+ declare const MenuItemContent: ({ textStyle, icon, shortcut, children, badge, }: {
3
+ icon?: JSX.Element;
4
+ shortcut?: string;
5
+ textStyle?: React.CSSProperties;
6
6
  children: React.ReactNode;
7
+ badge?: React.ReactNode;
7
8
  }) => import("react/jsx-runtime").JSX.Element;
8
9
  export default MenuItemContent;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type Props<T> = {
3
2
  value: T;
4
3
  shortcut?: string;
@@ -10,9 +9,10 @@ type Props<T> = {
10
9
  onChange: (value: T) => void;
11
10
  children: React.ReactNode;
12
11
  name: string;
12
+ icon?: React.ReactNode;
13
13
  };
14
14
  declare const DropdownMenuItemContentRadio: {
15
- <T>({ value, shortcut, onChange, choices, children, name, }: Props<T>): import("react/jsx-runtime").JSX.Element;
15
+ <T>({ value, shortcut, onChange, choices, children, name, icon, }: Props<T>): import("react/jsx-runtime").JSX.Element;
16
16
  displayName: string;
17
17
  };
18
18
  export default DropdownMenuItemContentRadio;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  declare const DropdownMenuItemCustom: ({ children, className, selected, ...rest }: {
3
3
  children: React.ReactNode;
4
- className?: string | undefined;
5
- selected?: boolean | undefined;
4
+ className?: string;
5
+ selected?: boolean;
6
6
  } & React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
7
7
  export default DropdownMenuItemCustom;
@@ -3,13 +3,13 @@ import type { JSX } from "react";
3
3
  declare const DropdownMenuItemLink: {
4
4
  ({ icon, shortcut, href, children, onSelect, className, selected, rel, ...rest }: {
5
5
  href: string;
6
- icon?: JSX.Element | undefined;
6
+ icon?: JSX.Element;
7
7
  children: React.ReactNode;
8
- shortcut?: string | undefined;
9
- className?: string | undefined;
10
- selected?: boolean | undefined;
11
- onSelect?: ((event: Event) => void) | undefined;
12
- rel?: string | undefined;
8
+ shortcut?: string;
9
+ className?: string;
10
+ selected?: boolean;
11
+ onSelect?: (event: Event) => void;
12
+ rel?: string;
13
13
  } & React.AnchorHTMLAttributes<HTMLAnchorElement>): import("react/jsx-runtime").JSX.Element;
14
14
  displayName: string;
15
15
  };
@@ -0,0 +1,23 @@
1
+ declare const DropdownMenuSub: {
2
+ ({ children }: {
3
+ children?: React.ReactNode;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ Trigger: {
6
+ ({ children, icon, shortcut, className, }: {
7
+ children: React.ReactNode;
8
+ icon?: import("react").JSX.Element;
9
+ shortcut?: string;
10
+ className?: string;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
14
+ Content: {
15
+ ({ children, className, }: {
16
+ children?: React.ReactNode;
17
+ className?: string;
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ displayName: string;
20
+ };
21
+ displayName: string;
22
+ };
23
+ export default DropdownMenuSub;
@@ -0,0 +1,8 @@
1
+ declare const DropdownMenuSubContent: {
2
+ ({ children, className, }: {
3
+ children?: React.ReactNode;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
8
+ export default DropdownMenuSubContent;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import type { JSX } from "react";
3
+ declare const DropdownMenuSubTrigger: {
4
+ ({ children, icon, shortcut, className, }: {
5
+ children: React.ReactNode;
6
+ icon?: JSX.Element;
7
+ shortcut?: string;
8
+ className?: string;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export default DropdownMenuSubTrigger;
@@ -1,11 +1,10 @@
1
- /// <reference types="react" />
2
1
  declare const MenuTrigger: {
3
2
  ({ className, children, onToggle, title, ...rest }: {
4
- className?: string | undefined;
3
+ className?: string;
5
4
  children: React.ReactNode;
6
5
  onToggle: () => void;
7
- title?: string | undefined;
8
- } & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
6
+ title?: string;
7
+ } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
9
8
  displayName: string;
10
9
  };
11
10
  export default MenuTrigger;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  export declare const DropdownMenuContentPropsContext: React.Context<{
3
- onSelect?: ((event: Event) => void) | undefined;
3
+ onSelect?: (event: Event) => void;
4
4
  }>;
5
5
  export declare const getDropdownMenuItemClassName: (className?: string, selected?: boolean, hovered?: boolean) => string;
6
- export declare const useHandleDropdownMenuItemClick: (origOnClick: React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement> | undefined, onSelect: ((event: Event) => void) | undefined) => (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>) => void;
6
+ export declare const useHandleDropdownMenuItemSelect: (onSelect: ((event: Event) => void) | undefined) => (event: Event) => void;
@@ -1,3 +1,5 @@
1
1
  import React from "react";
2
2
  export declare const getMenuTriggerComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
3
3
  export declare const getMenuContentComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
4
+ export declare const getSubMenuTriggerComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
5
+ export declare const getSubMenuContentComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
@@ -1,11 +1,13 @@
1
1
  import type { ActionManager } from "../../actions/manager";
2
2
  import type { UIAppState } from "../../types";
3
3
  declare const Footer: {
4
- ({ appState, actionManager, showExitZenModeBtn, renderWelcomeScreen, }: {
4
+ ({ appState, actionManager, showExitZenModeBtn, renderWelcomeScreen, defaultUIEnabled, zoomUIEnabled, }: {
5
5
  appState: UIAppState;
6
6
  actionManager: ActionManager;
7
7
  showExitZenModeBtn: boolean;
8
8
  renderWelcomeScreen: boolean;
9
+ defaultUIEnabled: boolean;
10
+ zoomUIEnabled: boolean;
9
11
  }): import("react/jsx-runtime").JSX.Element;
10
12
  displayName: string;
11
13
  };
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  export declare const withInternalFallback: <P>(componentName: string, Component: React.FC<P>) => React.FC<P & {
3
- __fallback?: boolean | undefined;
3
+ __fallback?: boolean;
4
4
  }>;
@@ -1,10 +1,10 @@
1
1
  import type { GlobalPoint, Radians } from "@excalidraw/math";
2
- import type { Bounds } from "@excalidraw/element";
2
+ import type { Bounds } from "@excalidraw/common";
3
3
  import type { ElementsMap, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
4
- import type { AppState, UIAppState } from "../../types";
4
+ import type { AppState } from "../../types";
5
5
  export declare const DEFAULT_LINK_SIZE = 12;
6
6
  export declare const EXTERNAL_LINK_IMG: HTMLImageElement;
7
7
  export declare const ELEMENT_LINK_IMG: HTMLImageElement;
8
- export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: Radians, appState: Pick<UIAppState, "zoom">) => Bounds;
8
+ export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: Radians, appState: Pick<AppState, "zoom">) => Bounds;
9
9
  export declare const isPointHittingLinkIcon: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: GlobalPoint) => boolean;
10
10
  export declare const isPointHittingLink: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: GlobalPoint, isMobile: boolean) => boolean;
@@ -57,6 +57,7 @@ export declare const saveAs: import("react/jsx-runtime").JSX.Element;
57
57
  export declare const LoadIcon: import("react/jsx-runtime").JSX.Element;
58
58
  export declare const clipboard: import("react/jsx-runtime").JSX.Element;
59
59
  export declare const palette: import("react/jsx-runtime").JSX.Element;
60
+ export declare const bucketFillIconSvgPaths: readonly ["M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z", "M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z", "M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"];
60
61
  export declare const bucketFillIcon: import("react/jsx-runtime").JSX.Element;
61
62
  export declare const slashIcon: import("react/jsx-runtime").JSX.Element;
62
63
  export declare const ExportImageIcon: import("react/jsx-runtime").JSX.Element;
@@ -114,41 +115,54 @@ export declare const StrokeStyleDottedIcon: import("react/jsx-runtime").JSX.Elem
114
115
  export declare const SloppinessArchitectIcon: import("react/jsx-runtime").JSX.Element;
115
116
  export declare const SloppinessArtistIcon: import("react/jsx-runtime").JSX.Element;
116
117
  export declare const SloppinessCartoonistIcon: import("react/jsx-runtime").JSX.Element;
118
+ export declare const strokeVariabilityConstantIcon: import("react/jsx-runtime").JSX.Element;
119
+ export declare const strokeVariabilityVariableIcon: import("react/jsx-runtime").JSX.Element;
117
120
  export declare const EdgeSharpIcon: import("react/jsx-runtime").JSX.Element;
118
121
  export declare const EdgeRoundIcon: import("react/jsx-runtime").JSX.Element;
119
- export declare const ArrowheadNoneIcon: import("react/jsx-runtime").JSX.Element;
122
+ export declare const ArrowheadNoneIcon: React.MemoExoticComponent<({ flip }: {
123
+ flip?: boolean;
124
+ }) => import("react/jsx-runtime").JSX.Element>;
120
125
  export declare const ArrowheadArrowIcon: React.MemoExoticComponent<({ flip }: {
121
- flip?: boolean | undefined;
126
+ flip?: boolean;
127
+ }) => import("react/jsx-runtime").JSX.Element>;
128
+ export declare const ArrowheadTriangleIcon: React.MemoExoticComponent<({ flip }: {
129
+ flip?: boolean;
130
+ }) => import("react/jsx-runtime").JSX.Element>;
131
+ export declare const ArrowheadTriangleOutlineIcon: React.MemoExoticComponent<({ flip }: {
132
+ flip?: boolean;
122
133
  }) => import("react/jsx-runtime").JSX.Element>;
123
134
  export declare const ArrowheadCircleIcon: React.MemoExoticComponent<({ flip }: {
124
- flip?: boolean | undefined;
135
+ flip?: boolean;
125
136
  }) => import("react/jsx-runtime").JSX.Element>;
126
137
  export declare const ArrowheadCircleOutlineIcon: React.MemoExoticComponent<({ flip }: {
127
- flip?: boolean | undefined;
138
+ flip?: boolean;
128
139
  }) => import("react/jsx-runtime").JSX.Element>;
129
- export declare const ArrowheadBarIcon: React.MemoExoticComponent<({ flip }: {
130
- flip?: boolean | undefined;
140
+ export declare const ArrowheadDiamondIcon: React.MemoExoticComponent<({ flip }: {
141
+ flip?: boolean;
131
142
  }) => import("react/jsx-runtime").JSX.Element>;
132
- export declare const ArrowheadTriangleIcon: React.MemoExoticComponent<({ flip }: {
133
- flip?: boolean | undefined;
143
+ export declare const ArrowheadDiamondOutlineIcon: React.MemoExoticComponent<({ flip }: {
144
+ flip?: boolean;
134
145
  }) => import("react/jsx-runtime").JSX.Element>;
135
- export declare const ArrowheadTriangleOutlineIcon: React.MemoExoticComponent<({ flip }: {
136
- flip?: boolean | undefined;
146
+ export declare const ArrowheadBarIcon: React.MemoExoticComponent<({ flip }: {
147
+ flip?: boolean;
137
148
  }) => import("react/jsx-runtime").JSX.Element>;
138
- export declare const ArrowheadDiamondIcon: React.MemoExoticComponent<({ flip }: {
139
- flip?: boolean | undefined;
149
+ export declare const ArrowheadCardinalityOneIcon: React.MemoExoticComponent<({ flip }: {
150
+ flip?: boolean;
140
151
  }) => import("react/jsx-runtime").JSX.Element>;
141
- export declare const ArrowheadDiamondOutlineIcon: React.MemoExoticComponent<({ flip }: {
142
- flip?: boolean | undefined;
152
+ export declare const ArrowheadCardinalityManyIcon: React.MemoExoticComponent<({ flip }: {
153
+ flip?: boolean;
154
+ }) => import("react/jsx-runtime").JSX.Element>;
155
+ export declare const ArrowheadCardinalityOneOrManyIcon: React.MemoExoticComponent<({ flip }: {
156
+ flip?: boolean;
143
157
  }) => import("react/jsx-runtime").JSX.Element>;
144
- export declare const ArrowheadCrowfootIcon: React.MemoExoticComponent<({ flip }: {
145
- flip?: boolean | undefined;
158
+ export declare const ArrowheadCardinalityExactlyOneIcon: React.MemoExoticComponent<({ flip }: {
159
+ flip?: boolean;
146
160
  }) => import("react/jsx-runtime").JSX.Element>;
147
- export declare const ArrowheadCrowfootOneIcon: React.MemoExoticComponent<({ flip }: {
148
- flip?: boolean | undefined;
161
+ export declare const ArrowheadCardinalityZeroOrOneIcon: React.MemoExoticComponent<({ flip }: {
162
+ flip?: boolean;
149
163
  }) => import("react/jsx-runtime").JSX.Element>;
150
- export declare const ArrowheadCrowfootOneOrManyIcon: React.MemoExoticComponent<({ flip }: {
151
- flip?: boolean | undefined;
164
+ export declare const ArrowheadCardinalityZeroOrManyIcon: React.MemoExoticComponent<({ flip }: {
165
+ flip?: boolean;
152
166
  }) => import("react/jsx-runtime").JSX.Element>;
153
167
  export declare const FontSizeSmallIcon: import("react/jsx-runtime").JSX.Element;
154
168
  export declare const FontSizeMediumIcon: import("react/jsx-runtime").JSX.Element;
@@ -157,6 +171,7 @@ export declare const FontSizeExtraLargeIcon: import("react/jsx-runtime").JSX.Ele
157
171
  export declare const fontSizeIcon: import("react/jsx-runtime").JSX.Element;
158
172
  export declare const FontFamilyHeadingIcon: import("react/jsx-runtime").JSX.Element;
159
173
  export declare const FontFamilyNormalIcon: import("react/jsx-runtime").JSX.Element;
174
+ export declare const codeIcon: import("react/jsx-runtime").JSX.Element;
160
175
  export declare const FontFamilyCodeIcon: import("react/jsx-runtime").JSX.Element;
161
176
  export declare const TextAlignLeftIcon: import("react/jsx-runtime").JSX.Element;
162
177
  export declare const TextAlignCenterIcon: import("react/jsx-runtime").JSX.Element;
@@ -182,11 +197,15 @@ export declare const playerPlayIcon: import("react/jsx-runtime").JSX.Element;
182
197
  export declare const playerStopFilledIcon: import("react/jsx-runtime").JSX.Element;
183
198
  export declare const tablerCheckIcon: import("react/jsx-runtime").JSX.Element;
184
199
  export declare const alertTriangleIcon: import("react/jsx-runtime").JSX.Element;
200
+ export declare const eyeDropperIconSvgPaths: readonly ["M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z", "M11 7l6 6"];
185
201
  export declare const eyeDropperIcon: import("react/jsx-runtime").JSX.Element;
186
- export declare const extraToolsIcon: import("react/jsx-runtime").JSX.Element;
187
202
  export declare const frameToolIcon: import("react/jsx-runtime").JSX.Element;
203
+ export declare const stickyNoteToolIcon: import("react/jsx-runtime").JSX.Element;
188
204
  export declare const mermaidLogoIcon: import("react/jsx-runtime").JSX.Element;
205
+ export declare const RetryIcon: import("react/jsx-runtime").JSX.Element;
206
+ export declare const stackPushIcon: import("react/jsx-runtime").JSX.Element;
189
207
  export declare const ArrowRightIcon: import("react/jsx-runtime").JSX.Element;
208
+ export declare const drawShapeToolIcon: import("react/jsx-runtime").JSX.Element;
190
209
  export declare const laserPointerToolIcon: import("react/jsx-runtime").JSX.Element;
191
210
  export declare const MagicIcon: import("react/jsx-runtime").JSX.Element;
192
211
  export declare const MagicIconThin: import("react/jsx-runtime").JSX.Element;
@@ -197,7 +216,8 @@ export declare const eyeClosedIcon: import("react/jsx-runtime").JSX.Element;
197
216
  export declare const brainIcon: import("react/jsx-runtime").JSX.Element;
198
217
  export declare const brainIconThin: import("react/jsx-runtime").JSX.Element;
199
218
  export declare const searchIcon: import("react/jsx-runtime").JSX.Element;
200
- export declare const clockIcon: import("react/jsx-runtime").JSX.Element;
219
+ export declare const historyCommandIcon: import("react/jsx-runtime").JSX.Element;
220
+ export declare const historyIcon: import("react/jsx-runtime").JSX.Element;
201
221
  export declare const microphoneIcon: import("react/jsx-runtime").JSX.Element;
202
222
  export declare const microphoneMutedIcon: import("react/jsx-runtime").JSX.Element;
203
223
  export declare const boltIcon: import("react/jsx-runtime").JSX.Element;
@@ -227,4 +247,13 @@ export declare const elementLinkIcon: import("react/jsx-runtime").JSX.Element;
227
247
  export declare const resizeIcon: import("react/jsx-runtime").JSX.Element;
228
248
  export declare const adjustmentsIcon: import("react/jsx-runtime").JSX.Element;
229
249
  export declare const strokeIcon: import("react/jsx-runtime").JSX.Element;
250
+ export declare const pencilIcon: import("react/jsx-runtime").JSX.Element;
251
+ export declare const chevronLeftIcon: import("react/jsx-runtime").JSX.Element;
252
+ export declare const sidebarRightIcon: import("react/jsx-runtime").JSX.Element;
253
+ export declare const messageCircleIcon: import("react/jsx-runtime").JSX.Element;
254
+ export declare const presentationIcon: import("react/jsx-runtime").JSX.Element;
255
+ export declare const emptyIcon: import("react/jsx-runtime").JSX.Element;
256
+ export declare const chevronDownIcon: import("react/jsx-runtime").JSX.Element;
257
+ export declare const chevronRight: import("react/jsx-runtime").JSX.Element;
258
+ export declare const settingsIcon: import("react/jsx-runtime").JSX.Element;
230
259
  export {};
@@ -35,11 +35,14 @@ export declare const ClearCanvas: {
35
35
  export declare const ToggleTheme: {
36
36
  (props: {
37
37
  allowSystemTheme: true;
38
+ /**
39
+ * Controls the theme of this UI component only.
40
+ * You should subscribe to `props.onThemeChange` and control the theme
41
+ * upstream.
42
+ */
38
43
  theme: Theme | "system";
39
- onSelect: (theme: Theme | "system") => void;
40
44
  } | {
41
- allowSystemTheme?: false | undefined;
42
- onSelect?: ((theme: Theme) => void) | undefined;
45
+ allowSystemTheme: false;
43
46
  }): import("react/jsx-runtime").JSX.Element | null;
44
47
  displayName: string;
45
48
  };
@@ -62,3 +65,22 @@ export declare const LiveCollaborationTrigger: {
62
65
  }): import("react/jsx-runtime").JSX.Element;
63
66
  displayName: string;
64
67
  };
68
+ export declare const PreferencesToggleGridModeItem: () => import("react/jsx-runtime").JSX.Element;
69
+ export declare const PreferencesToggleZenModeItem: () => import("react/jsx-runtime").JSX.Element;
70
+ export declare const Preferences: {
71
+ ({ children, additionalItems, }: {
72
+ children?: React.ReactNode;
73
+ additionalItems?: React.ReactNode;
74
+ }): import("react/jsx-runtime").JSX.Element;
75
+ ToggleToolLock: () => import("react/jsx-runtime").JSX.Element;
76
+ BoxSelectionMode: () => import("react/jsx-runtime").JSX.Element;
77
+ InputDevice: () => import("react/jsx-runtime").JSX.Element;
78
+ ToggleSnapMode: () => import("react/jsx-runtime").JSX.Element;
79
+ ToggleArrowBinding: () => import("react/jsx-runtime").JSX.Element;
80
+ ToggleMidpointSnapping: () => import("react/jsx-runtime").JSX.Element;
81
+ ToggleGridMode: () => import("react/jsx-runtime").JSX.Element;
82
+ ToggleZenMode: () => import("react/jsx-runtime").JSX.Element;
83
+ ToggleViewMode: () => import("react/jsx-runtime").JSX.Element | null;
84
+ ToggleElementProperties: () => import("react/jsx-runtime").JSX.Element;
85
+ displayName: string;
86
+ };
@@ -5,43 +5,25 @@ declare const MainMenu: React.FC<{
5
5
  /**
6
6
  * Called when any menu item is selected (clicked on).
7
7
  */
8
- onSelect?: ((event: Event) => void) | undefined;
8
+ onSelect?: (event: Event) => void;
9
9
  } & {
10
- __fallback?: boolean | undefined;
10
+ __fallback?: boolean;
11
11
  }> & {
12
12
  Trigger: {
13
13
  ({ className, children, onToggle, title, ...rest }: {
14
- className?: string | undefined;
14
+ className?: string;
15
15
  children: React.ReactNode;
16
16
  onToggle: () => void;
17
- title?: string | undefined;
17
+ title?: string;
18
18
  } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
19
19
  displayName: string;
20
20
  };
21
21
  Item: {
22
- ({ icon, value, order, children, shortcut, className, hovered, selected, textStyle, onSelect, onClick, ...rest }: {
23
- icon?: React.JSX.Element | undefined;
24
- value?: string | number | undefined;
25
- order?: number | undefined;
26
- onSelect?: ((event: Event) => void) | undefined;
27
- children: React.ReactNode;
28
- /**
29
- * Called when any menu item is selected (clicked on).
30
- */
31
- shortcut?: string | undefined;
32
- hovered?: boolean | undefined;
33
- selected?: boolean | undefined;
34
- textStyle?: React.CSSProperties | undefined;
35
- className?: string | undefined;
36
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
22
+ ({ icon, badge, value, children, shortcut, className, selected, onSelect, ...rest }: import("../dropdownMenu/DropdownMenuItem").DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
37
23
  displayName: string;
38
24
  Badge: {
39
25
  ({ type, children, }: {
40
- type?: import("../../../common/src/utility-types").ValueOf<{
41
- readonly GREEN: "green";
42
- readonly RED: "red";
43
- readonly BLUE: "blue";
44
- }> | undefined;
26
+ type?: import("@excalidraw/common/utility-types").ValueOf<typeof import("../dropdownMenu/DropdownMenuItem").DropDownMenuItemBadgeType>;
45
27
  children: React.ReactNode;
46
28
  }): import("react/jsx-runtime").JSX.Element;
47
29
  displayName: string;
@@ -50,27 +32,27 @@ declare const MainMenu: React.FC<{
50
32
  ItemLink: {
51
33
  ({ icon, shortcut, href, children, onSelect, className, selected, rel, ...rest }: {
52
34
  href: string;
53
- icon?: React.JSX.Element | undefined;
35
+ icon?: React.JSX.Element;
54
36
  children: React.ReactNode;
55
- shortcut?: string | undefined;
56
- className?: string | undefined;
57
- selected?: boolean | undefined;
58
- onSelect?: ((event: Event) => void) | undefined;
59
- rel?: string | undefined;
37
+ shortcut?: string;
38
+ className?: string;
39
+ selected?: boolean;
40
+ onSelect?: (event: Event) => void;
41
+ rel?: string;
60
42
  } & React.AnchorHTMLAttributes<HTMLAnchorElement>): import("react/jsx-runtime").JSX.Element;
61
43
  displayName: string;
62
44
  };
63
45
  ItemCustom: ({ children, className, selected, ...rest }: {
64
46
  children: React.ReactNode;
65
- className?: string | undefined;
66
- selected?: boolean | undefined;
47
+ className?: string;
48
+ selected?: boolean;
67
49
  } & React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
68
50
  Group: {
69
51
  ({ children, className, style, title, }: {
70
52
  children: React.ReactNode;
71
- className?: string | undefined;
72
- style?: React.CSSProperties | undefined;
73
- title?: string | undefined;
53
+ className?: string;
54
+ style?: React.CSSProperties;
55
+ title?: string;
74
56
  }): import("react/jsx-runtime").JSX.Element;
75
57
  displayName: string;
76
58
  };
@@ -78,6 +60,28 @@ declare const MainMenu: React.FC<{
78
60
  (): import("react/jsx-runtime").JSX.Element;
79
61
  displayName: string;
80
62
  };
63
+ Sub: {
64
+ ({ children }: {
65
+ children?: React.ReactNode;
66
+ }): import("react/jsx-runtime").JSX.Element;
67
+ Trigger: {
68
+ ({ children, icon, shortcut, className, }: {
69
+ children: React.ReactNode;
70
+ icon?: React.JSX.Element;
71
+ shortcut?: string;
72
+ className?: string;
73
+ }): import("react/jsx-runtime").JSX.Element;
74
+ displayName: string;
75
+ };
76
+ Content: {
77
+ ({ children, className, }: {
78
+ children?: React.ReactNode;
79
+ className?: string;
80
+ }): import("react/jsx-runtime").JSX.Element;
81
+ displayName: string;
82
+ };
83
+ displayName: string;
84
+ };
81
85
  DefaultItems: typeof DefaultItems;
82
86
  };
83
87
  export default MainMenu;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Positions an element beside a cursor within a container, flipping the
3
+ * element to the other side of the cursor when it would overflow the
4
+ * container, resolved independently on each axis.
5
+ *
6
+ * Takes the cursor in client (viewport) coordinates and returns
7
+ * container-local coordinates.
8
+ */
9
+ export declare const positionElementBesideCursor: ({ cursor, element, container, gap, }: {
10
+ /** client (viewport) coordinates */
11
+ cursor: {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ element: {
16
+ width: number;
17
+ height: number;
18
+ };
19
+ /** the container's bounding client rect */
20
+ container: Pick<DOMRect, "left" | "top" | "width" | "height">;
21
+ /** distance between the cursor and the positioned element */
22
+ gap: number;
23
+ }) => {
24
+ left: number;
25
+ top: number;
26
+ };
@@ -0,0 +1,39 @@
1
+ import type { ElementsMap, ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
2
+ import type { AppClassProperties, UIAppState } from "../types";
3
+ export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
4
+ export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[], elementsMap: ElementsMap) => boolean;
5
+ /**
6
+ * Single source of truth for "which shape-action controls are relevant right
7
+ * now". Each flag answers whether a given control should be shown, given the
8
+ * active tool and the current selection. All three styles-panel layouts
9
+ * (full / compact / mobile) and the compact popovers consume these flags so
10
+ * that visibility logic lives in one place and layout stays pure.
11
+ */
12
+ export declare const getShapeActionPredicates: (appState: UIAppState, targetElements: ExcalidrawElement[], elementsMap: NonDeletedElementsMap | NonDeletedSceneElementsMap, app: AppClassProperties) => {
13
+ /** some element(s) selected */
14
+ hasSelection: boolean;
15
+ /** actions on selected elements (delete/duplicate/...) */
16
+ showExtraActions: boolean;
17
+ strokeColor: boolean;
18
+ backgroundColor: boolean;
19
+ fill: boolean;
20
+ strokeWidth: boolean;
21
+ freedrawMode: boolean;
22
+ strokeStyle: boolean;
23
+ sloppiness: boolean;
24
+ roundness: boolean;
25
+ arrowType: boolean;
26
+ arrowheads: boolean;
27
+ text: boolean;
28
+ textAlign: boolean;
29
+ verticalAlign: boolean;
30
+ opacity: boolean;
31
+ layers: boolean;
32
+ align: boolean;
33
+ distribute: boolean;
34
+ link: boolean;
35
+ linkSingleOnly: boolean;
36
+ cropEditor: boolean;
37
+ lineEditor: boolean;
38
+ };
39
+ export type ShapeActionPredicates = ReturnType<typeof getShapeActionPredicates>;