@excalidraw/math 0.18.0-b16b6f8fd → 0.18.0-b2b2815

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 (277) hide show
  1. package/dist/dev/index.js +92 -65
  2. package/dist/dev/index.js.map +3 -3
  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 +59 -39
  8. package/dist/types/common/src/constants.d.ts +37 -26
  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 +1 -1
  13. package/dist/types/common/src/utility-types.d.ts +0 -1
  14. package/dist/types/common/src/utils.d.ts +53 -41
  15. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  16. package/dist/types/element/src/Scene.d.ts +16 -8
  17. package/dist/types/element/src/arrowheads.d.ts +3 -0
  18. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  19. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  20. package/dist/types/element/src/binding.d.ts +67 -48
  21. package/dist/types/element/src/bounds.d.ts +8 -14
  22. package/dist/types/element/src/collision.d.ts +7 -2
  23. package/dist/types/element/src/comparisons.d.ts +7 -7
  24. package/dist/types/element/src/delta.d.ts +16 -4
  25. package/dist/types/element/src/distribute.d.ts +2 -1
  26. package/dist/types/element/src/dragElements.d.ts +3 -3
  27. package/dist/types/element/src/duplicate.d.ts +4 -3
  28. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  29. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  30. package/dist/types/element/src/frame.d.ts +12 -7
  31. package/dist/types/element/src/heading.d.ts +2 -1
  32. package/dist/types/element/src/image.d.ts +1 -11
  33. package/dist/types/element/src/index.d.ts +5 -3
  34. package/dist/types/element/src/linearElementEditor.d.ts +23 -22
  35. package/dist/types/element/src/mutateElement.d.ts +5 -1
  36. package/dist/types/element/src/newElement.d.ts +6 -6
  37. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  38. package/dist/types/element/src/renderElement.d.ts +4 -7
  39. package/dist/types/element/src/resizeElements.d.ts +10 -10
  40. package/dist/types/element/src/resizeTest.d.ts +6 -5
  41. package/dist/types/element/src/selection.d.ts +10 -10
  42. package/dist/types/element/src/shape.d.ts +9 -8
  43. package/dist/types/element/src/store.d.ts +6 -1
  44. package/dist/types/element/src/textElement.d.ts +2 -2
  45. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  46. package/dist/types/element/src/textWrapping.d.ts +26 -0
  47. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
  48. package/dist/types/element/src/transformHandles.d.ts +8 -27
  49. package/dist/types/element/src/typeChecks.d.ts +5 -7
  50. package/dist/types/element/src/types.d.ts +12 -13
  51. package/dist/types/element/src/utils.d.ts +9 -4
  52. package/dist/types/element/src/zindex.d.ts +7 -1
  53. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +167 -207
  54. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
  55. package/dist/types/excalidraw/actions/actionBoundText.d.ts +94 -121
  56. package/dist/types/excalidraw/actions/actionCanvas.d.ts +557 -914
  57. package/dist/types/excalidraw/actions/actionClipboard.d.ts +123 -891
  58. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +45 -59
  59. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +148 -192
  60. package/dist/types/excalidraw/actions/actionDeselect.d.ts +159 -0
  61. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  62. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -4
  63. package/dist/types/excalidraw/actions/actionElementLink.d.ts +53 -73
  64. package/dist/types/excalidraw/actions/actionElementLock.d.ts +92 -119
  65. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +59 -73
  66. package/dist/types/excalidraw/actions/actionExport.d.ts +173 -1405
  67. package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
  68. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  69. package/dist/types/excalidraw/actions/actionFrame.d.ts +265 -356
  70. package/dist/types/excalidraw/actions/actionGroup.d.ts +97 -132
  71. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +138 -190
  72. package/dist/types/excalidraw/actions/actionLink.d.ts +59 -73
  73. package/dist/types/excalidraw/actions/actionMenu.d.ts +48 -434
  74. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
  75. package/dist/types/excalidraw/actions/actionProperties.d.ts +152 -2509
  76. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +48 -66
  77. package/dist/types/excalidraw/actions/actionStyles.d.ts +45 -58
  78. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +4 -4
  79. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
  80. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +59 -73
  81. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
  82. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +59 -73
  83. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +47 -67
  84. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  85. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +58 -72
  86. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +59 -73
  87. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +59 -73
  88. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  89. package/dist/types/excalidraw/actions/index.d.ts +5 -2
  90. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  91. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  92. package/dist/types/excalidraw/actions/types.d.ts +4 -4
  93. package/dist/types/excalidraw/appState.d.ts +29 -21
  94. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  95. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  96. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  97. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  98. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  99. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  100. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  101. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  102. package/dist/types/excalidraw/clipboard.d.ts +57 -19
  103. package/dist/types/excalidraw/components/Actions.d.ts +22 -5
  104. package/dist/types/excalidraw/components/App.d.ts +127 -76
  105. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  106. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  107. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  108. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  109. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  110. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  111. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  112. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -1
  113. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  114. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  115. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +2 -4
  116. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  117. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  118. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  119. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  120. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  121. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  122. package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
  123. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  124. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  125. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  126. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  127. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  128. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  129. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  130. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  131. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  132. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  133. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  134. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  135. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  136. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  137. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  138. package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
  139. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  140. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  141. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  142. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  143. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +2 -1
  144. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  145. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  146. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  147. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  148. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
  149. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  150. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  151. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  152. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  153. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  154. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  155. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  156. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  157. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  158. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  159. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  160. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  161. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  162. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  163. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  164. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  165. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  166. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  167. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  168. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  169. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  170. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  171. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  172. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  173. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  174. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  175. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  176. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  177. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  178. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  179. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  180. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  181. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  182. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  183. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  184. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  185. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  186. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  187. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  188. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  189. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  190. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  191. package/dist/types/excalidraw/components/Toast.d.ts +11 -7
  192. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  193. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  194. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +8 -4
  195. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  196. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  197. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +47 -35
  198. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -5
  199. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  200. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
  201. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  202. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  203. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -2
  204. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  205. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  206. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  207. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  208. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  209. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  210. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
  211. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  212. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  213. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  214. package/dist/types/excalidraw/components/icons.d.ts +49 -21
  215. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +20 -2
  216. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -35
  217. package/dist/types/excalidraw/components/shapes.d.ts +209 -1
  218. package/dist/types/excalidraw/data/blob.d.ts +327 -12
  219. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  220. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  221. package/dist/types/excalidraw/data/filesystem.d.ts +5 -7
  222. package/dist/types/excalidraw/data/index.d.ts +4 -5
  223. package/dist/types/excalidraw/data/json.d.ts +170 -4
  224. package/dist/types/excalidraw/data/library.d.ts +24 -9
  225. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  226. package/dist/types/excalidraw/data/restore.d.ts +27 -7
  227. package/dist/types/excalidraw/data/types.d.ts +4 -1
  228. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  229. package/dist/types/excalidraw/errors.d.ts +14 -0
  230. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  231. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  232. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  233. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  234. package/dist/types/excalidraw/i18n.d.ts +2 -2
  235. package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
  236. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
  237. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
  238. package/dist/types/excalidraw/scene/Renderer.d.ts +427 -18
  239. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  240. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  241. package/dist/types/excalidraw/scene/types.d.ts +22 -5
  242. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  243. package/dist/types/excalidraw/snapping.d.ts +5 -5
  244. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  245. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  246. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  247. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  248. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  249. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  250. package/dist/types/excalidraw/types.d.ts +134 -37
  251. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +7 -3
  252. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  253. package/dist/types/math/src/constants.d.ts +0 -1
  254. package/dist/types/math/src/curve.d.ts +4 -1
  255. package/dist/types/math/src/point.d.ts +7 -2
  256. package/dist/types/math/src/polygon.d.ts +2 -2
  257. package/dist/types/math/src/range.d.ts +1 -3
  258. package/dist/types/math/src/segment.d.ts +4 -3
  259. package/dist/types/math/src/types.d.ts +25 -1
  260. package/dist/types/utils/src/bbox.d.ts +1 -1
  261. package/dist/types/utils/src/export.d.ts +5 -5
  262. package/dist/types/utils/src/shape.d.ts +6 -6
  263. package/dist/types/utils/src/withinBounds.d.ts +2 -2
  264. package/package.json +2 -2
  265. package/dist/types/excalidraw/charts.d.ts +0 -27
  266. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  267. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
  268. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  269. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -9
  270. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  271. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -10
  272. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  273. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  274. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
  275. package/dist/types/excalidraw/data/reconcile.d.ts +0 -6
  276. package/dist/types/excalidraw/index.d.ts +0 -47
  277. package/dist/types/excalidraw/polyfill.d.ts +0 -2
@@ -1,27 +1,436 @@
1
- import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
1
+ import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
2
2
  import type { Scene } from "@excalidraw/element";
3
+ import type { RenderableElementsMap } from "./types";
3
4
  import type { AppState } from "../types";
5
+ type GetRenderableElementsOpts = {
6
+ zoom: AppState["zoom"];
7
+ offsetLeft: AppState["offsetLeft"];
8
+ offsetTop: AppState["offsetTop"];
9
+ scrollX: AppState["scrollX"];
10
+ scrollY: AppState["scrollY"];
11
+ height: AppState["height"];
12
+ width: AppState["width"];
13
+ editingTextElement: AppState["editingTextElement"];
14
+ newElement: AppState["newElement"];
15
+ selectedElements: readonly NonDeletedExcalidrawElement[];
16
+ selectedElementsAreBeingDragged: AppState["selectedElementsAreBeingDragged"];
17
+ frameToHighlight: AppState["frameToHighlight"];
18
+ };
4
19
  export declare class Renderer {
5
20
  private scene;
6
21
  constructor(scene: Scene);
7
- getRenderableElements: ((opts: {
8
- zoom: AppState["zoom"];
9
- offsetLeft: AppState["offsetLeft"];
10
- offsetTop: AppState["offsetTop"];
11
- scrollX: AppState["scrollX"];
12
- scrollY: AppState["scrollY"];
13
- height: AppState["height"];
14
- width: AppState["width"];
15
- editingTextElement: AppState["editingTextElement"];
16
- /** note: first render of newElement will always bust the cache
17
- * (we'd have to prefilter elements outside of this function) */
18
- newElementId: ExcalidrawElement["id"] | undefined;
19
- sceneNonce: ReturnType<InstanceType<typeof Scene>["getSceneNonce"]>;
20
- }) => {
21
- elementsMap: Map<string, NonDeletedExcalidrawElement> & import("../../common/src/utility-types").MakeBrand<"NonDeletedElementsMap"> & import("../../common/src/utility-types").MakeBrand<"RenderableElementsMap">;
22
+ private getVisibleCanvasElements;
23
+ private getRenderableElementsMap;
24
+ private sortSelectedElementsIntoHighlightedFrame;
25
+ private _getRenderableElements;
26
+ getRenderableElements: (opts: GetRenderableElementsOpts) => {
27
+ elementsMap: RenderableElementsMap;
22
28
  visibleElements: readonly NonDeletedExcalidrawElement[];
23
- }) & {
24
- clear: () => void;
29
+ newElementCanvasElement: (Readonly<{
30
+ id: string;
31
+ x: number;
32
+ y: number;
33
+ strokeColor: string;
34
+ backgroundColor: string;
35
+ fillStyle: import("@excalidraw/element/types").FillStyle;
36
+ strokeWidth: number;
37
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
38
+ roundness: null | {
39
+ type: import("@excalidraw/element/types").RoundnessType;
40
+ value?: number;
41
+ };
42
+ roughness: number;
43
+ opacity: number;
44
+ width: number;
45
+ height: number;
46
+ angle: import("@excalidraw/math").Radians;
47
+ seed: number;
48
+ version: number;
49
+ versionNonce: number;
50
+ index: import("@excalidraw/element/types").FractionalIndex | null;
51
+ isDeleted: boolean;
52
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
53
+ frameId: string | null;
54
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
55
+ updated: number;
56
+ link: string | null;
57
+ locked: boolean;
58
+ customData?: Record<string, any>;
59
+ }> & Readonly<{
60
+ type: "line" | "arrow";
61
+ points: readonly import("@excalidraw/math").LocalPoint[];
62
+ startBinding: import("@excalidraw/element/types").FixedPointBinding | null;
63
+ endBinding: import("@excalidraw/element/types").FixedPointBinding | null;
64
+ startArrowhead: import("@excalidraw/element/types").Arrowhead | null;
65
+ endArrowhead: import("@excalidraw/element/types").Arrowhead | null;
66
+ }> & {
67
+ isDeleted: boolean;
68
+ }) | (Readonly<{
69
+ id: string;
70
+ x: number;
71
+ y: number;
72
+ strokeColor: string;
73
+ backgroundColor: string;
74
+ fillStyle: import("@excalidraw/element/types").FillStyle;
75
+ strokeWidth: number;
76
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
77
+ roundness: null | {
78
+ type: import("@excalidraw/element/types").RoundnessType;
79
+ value?: number;
80
+ };
81
+ roughness: number;
82
+ opacity: number;
83
+ width: number;
84
+ height: number;
85
+ angle: import("@excalidraw/math").Radians;
86
+ seed: number;
87
+ version: number;
88
+ versionNonce: number;
89
+ index: import("@excalidraw/element/types").FractionalIndex | null;
90
+ isDeleted: boolean;
91
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
92
+ frameId: string | null;
93
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
94
+ updated: number;
95
+ link: string | null;
96
+ locked: boolean;
97
+ customData?: Record<string, any>;
98
+ }> & {
99
+ type: "rectangle";
100
+ } & {
101
+ isDeleted: boolean;
102
+ }) | (Readonly<{
103
+ id: string;
104
+ x: number;
105
+ y: number;
106
+ strokeColor: string;
107
+ backgroundColor: string;
108
+ fillStyle: import("@excalidraw/element/types").FillStyle;
109
+ strokeWidth: number;
110
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
111
+ roundness: null | {
112
+ type: import("@excalidraw/element/types").RoundnessType;
113
+ value?: number;
114
+ };
115
+ roughness: number;
116
+ opacity: number;
117
+ width: number;
118
+ height: number;
119
+ angle: import("@excalidraw/math").Radians;
120
+ seed: number;
121
+ version: number;
122
+ versionNonce: number;
123
+ index: import("@excalidraw/element/types").FractionalIndex | null;
124
+ isDeleted: boolean;
125
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
126
+ frameId: string | null;
127
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
128
+ updated: number;
129
+ link: string | null;
130
+ locked: boolean;
131
+ customData?: Record<string, any>;
132
+ }> & {
133
+ type: "diamond";
134
+ } & {
135
+ isDeleted: boolean;
136
+ }) | (Readonly<{
137
+ id: string;
138
+ x: number;
139
+ y: number;
140
+ strokeColor: string;
141
+ backgroundColor: string;
142
+ fillStyle: import("@excalidraw/element/types").FillStyle;
143
+ strokeWidth: number;
144
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
145
+ roundness: null | {
146
+ type: import("@excalidraw/element/types").RoundnessType;
147
+ value?: number;
148
+ };
149
+ roughness: number;
150
+ opacity: number;
151
+ width: number;
152
+ height: number;
153
+ angle: import("@excalidraw/math").Radians;
154
+ seed: number;
155
+ version: number;
156
+ versionNonce: number;
157
+ index: import("@excalidraw/element/types").FractionalIndex | null;
158
+ isDeleted: boolean;
159
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
160
+ frameId: string | null;
161
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
162
+ updated: number;
163
+ link: string | null;
164
+ locked: boolean;
165
+ customData?: Record<string, any>;
166
+ }> & {
167
+ type: "ellipse";
168
+ } & {
169
+ isDeleted: boolean;
170
+ }) | (Readonly<{
171
+ id: string;
172
+ x: number;
173
+ y: number;
174
+ strokeColor: string;
175
+ backgroundColor: string;
176
+ fillStyle: import("@excalidraw/element/types").FillStyle;
177
+ strokeWidth: number;
178
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
179
+ roundness: null | {
180
+ type: import("@excalidraw/element/types").RoundnessType;
181
+ value?: number;
182
+ };
183
+ roughness: number;
184
+ opacity: number;
185
+ width: number;
186
+ height: number;
187
+ angle: import("@excalidraw/math").Radians;
188
+ seed: number;
189
+ version: number;
190
+ versionNonce: number;
191
+ index: import("@excalidraw/element/types").FractionalIndex | null;
192
+ isDeleted: boolean;
193
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
194
+ frameId: string | null;
195
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
196
+ updated: number;
197
+ link: string | null;
198
+ locked: boolean;
199
+ customData?: Record<string, any>;
200
+ }> & Readonly<{
201
+ type: "embeddable";
202
+ }> & {
203
+ isDeleted: boolean;
204
+ }) | (Readonly<{
205
+ id: string;
206
+ x: number;
207
+ y: number;
208
+ strokeColor: string;
209
+ backgroundColor: string;
210
+ fillStyle: import("@excalidraw/element/types").FillStyle;
211
+ strokeWidth: number;
212
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
213
+ roundness: null | {
214
+ type: import("@excalidraw/element/types").RoundnessType;
215
+ value?: number;
216
+ };
217
+ roughness: number;
218
+ opacity: number;
219
+ width: number;
220
+ height: number;
221
+ angle: import("@excalidraw/math").Radians;
222
+ seed: number;
223
+ version: number;
224
+ versionNonce: number;
225
+ index: import("@excalidraw/element/types").FractionalIndex | null;
226
+ isDeleted: boolean;
227
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
228
+ frameId: string | null;
229
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
230
+ updated: number;
231
+ link: string | null;
232
+ locked: boolean;
233
+ customData?: Record<string, any>;
234
+ }> & Readonly<{
235
+ type: "iframe";
236
+ customData?: {
237
+ generationData?: import("@excalidraw/element/types").MagicGenerationData;
238
+ };
239
+ }> & {
240
+ isDeleted: boolean;
241
+ }) | (Readonly<{
242
+ id: string;
243
+ x: number;
244
+ y: number;
245
+ strokeColor: string;
246
+ backgroundColor: string;
247
+ fillStyle: import("@excalidraw/element/types").FillStyle;
248
+ strokeWidth: number;
249
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
250
+ roundness: null | {
251
+ type: import("@excalidraw/element/types").RoundnessType;
252
+ value?: number;
253
+ };
254
+ roughness: number;
255
+ opacity: number;
256
+ width: number;
257
+ height: number;
258
+ angle: import("@excalidraw/math").Radians;
259
+ seed: number;
260
+ version: number;
261
+ versionNonce: number;
262
+ index: import("@excalidraw/element/types").FractionalIndex | null;
263
+ isDeleted: boolean;
264
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
265
+ frameId: string | null;
266
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
267
+ updated: number;
268
+ link: string | null;
269
+ locked: boolean;
270
+ customData?: Record<string, any>;
271
+ }> & Readonly<{
272
+ type: "image";
273
+ fileId: import("@excalidraw/element/types").FileId | null;
274
+ status: "pending" | "saved" | "error";
275
+ scale: [number, number];
276
+ crop: import("@excalidraw/element/types").ImageCrop | null;
277
+ }> & {
278
+ isDeleted: boolean;
279
+ }) | (Readonly<{
280
+ id: string;
281
+ x: number;
282
+ y: number;
283
+ strokeColor: string;
284
+ backgroundColor: string;
285
+ fillStyle: import("@excalidraw/element/types").FillStyle;
286
+ strokeWidth: number;
287
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
288
+ roundness: null | {
289
+ type: import("@excalidraw/element/types").RoundnessType;
290
+ value?: number;
291
+ };
292
+ roughness: number;
293
+ opacity: number;
294
+ width: number;
295
+ height: number;
296
+ angle: import("@excalidraw/math").Radians;
297
+ seed: number;
298
+ version: number;
299
+ versionNonce: number;
300
+ index: import("@excalidraw/element/types").FractionalIndex | null;
301
+ isDeleted: boolean;
302
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
303
+ frameId: string | null;
304
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
305
+ updated: number;
306
+ link: string | null;
307
+ locked: boolean;
308
+ customData?: Record<string, any>;
309
+ }> & {
310
+ type: "frame";
311
+ name: string | null;
312
+ } & {
313
+ isDeleted: boolean;
314
+ }) | (Readonly<{
315
+ id: string;
316
+ x: number;
317
+ y: number;
318
+ strokeColor: string;
319
+ backgroundColor: string;
320
+ fillStyle: import("@excalidraw/element/types").FillStyle;
321
+ strokeWidth: number;
322
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
323
+ roundness: null | {
324
+ type: import("@excalidraw/element/types").RoundnessType;
325
+ value?: number;
326
+ };
327
+ roughness: number;
328
+ opacity: number;
329
+ width: number;
330
+ height: number;
331
+ angle: import("@excalidraw/math").Radians;
332
+ seed: number;
333
+ version: number;
334
+ versionNonce: number;
335
+ index: import("@excalidraw/element/types").FractionalIndex | null;
336
+ isDeleted: boolean;
337
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
338
+ frameId: string | null;
339
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
340
+ updated: number;
341
+ link: string | null;
342
+ locked: boolean;
343
+ customData?: Record<string, any>;
344
+ }> & {
345
+ type: "magicframe";
346
+ name: string | null;
347
+ } & {
348
+ isDeleted: boolean;
349
+ }) | (Readonly<{
350
+ id: string;
351
+ x: number;
352
+ y: number;
353
+ strokeColor: string;
354
+ backgroundColor: string;
355
+ fillStyle: import("@excalidraw/element/types").FillStyle;
356
+ strokeWidth: number;
357
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
358
+ roundness: null | {
359
+ type: import("@excalidraw/element/types").RoundnessType;
360
+ value?: number;
361
+ };
362
+ roughness: number;
363
+ opacity: number;
364
+ width: number;
365
+ height: number;
366
+ angle: import("@excalidraw/math").Radians;
367
+ seed: number;
368
+ version: number;
369
+ versionNonce: number;
370
+ index: import("@excalidraw/element/types").FractionalIndex | null;
371
+ isDeleted: boolean;
372
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
373
+ frameId: string | null;
374
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
375
+ updated: number;
376
+ link: string | null;
377
+ locked: boolean;
378
+ customData?: Record<string, any>;
379
+ }> & Readonly<{
380
+ type: "text";
381
+ fontSize: number;
382
+ fontFamily: import("@excalidraw/element/types").FontFamilyValues;
383
+ text: string;
384
+ textAlign: import("@excalidraw/element/types").TextAlign;
385
+ verticalAlign: import("@excalidraw/element/types").VerticalAlign;
386
+ containerId: import("@excalidraw/element/types").ExcalidrawGenericElement["id"] | null;
387
+ originalText: string;
388
+ autoResize: boolean;
389
+ lineHeight: number & {
390
+ _brand: "unitlessLineHeight";
391
+ };
392
+ }> & {
393
+ isDeleted: boolean;
394
+ }) | (Readonly<{
395
+ id: string;
396
+ x: number;
397
+ y: number;
398
+ strokeColor: string;
399
+ backgroundColor: string;
400
+ fillStyle: import("@excalidraw/element/types").FillStyle;
401
+ strokeWidth: number;
402
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
403
+ roundness: null | {
404
+ type: import("@excalidraw/element/types").RoundnessType;
405
+ value?: number;
406
+ };
407
+ roughness: number;
408
+ opacity: number;
409
+ width: number;
410
+ height: number;
411
+ angle: import("@excalidraw/math").Radians;
412
+ seed: number;
413
+ version: number;
414
+ versionNonce: number;
415
+ index: import("@excalidraw/element/types").FractionalIndex | null;
416
+ isDeleted: boolean;
417
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
418
+ frameId: string | null;
419
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
420
+ updated: number;
421
+ link: string | null;
422
+ locked: boolean;
423
+ customData?: Record<string, any>;
424
+ }> & Readonly<{
425
+ type: "freedraw";
426
+ points: readonly import("@excalidraw/math").LocalPoint[];
427
+ pressures: readonly number[];
428
+ simulatePressure: boolean;
429
+ }> & {
430
+ isDeleted: boolean;
431
+ }) | null;
432
+ canvasNonce: string;
25
433
  };
26
434
  destroy(): void;
27
435
  }
436
+ export {};
@@ -2,9 +2,9 @@ import type { ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "@e
2
2
  import type { AppState, BinaryFiles } from "../types";
3
3
  export declare const exportToCanvas: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState, files: BinaryFiles, { exportBackground, exportPadding, viewBackgroundColor, exportingFrame, }: {
4
4
  exportBackground: boolean;
5
- exportPadding?: number | undefined;
5
+ exportPadding?: number;
6
6
  viewBackgroundColor: string;
7
- exportingFrame?: ExcalidrawFrameLikeElement | null | undefined;
7
+ exportingFrame?: ExcalidrawFrameLikeElement | null;
8
8
  }, createCanvas?: (width: number, height: number) => {
9
9
  canvas: HTMLCanvasElement;
10
10
  scale: number;
@@ -7,12 +7,7 @@ export declare const centerScrollOn: ({ scenePoint, viewportDimensions, zoom, of
7
7
  width: number;
8
8
  };
9
9
  zoom: Zoom;
10
- offsets?: Partial<{
11
- top: number;
12
- right: number;
13
- bottom: number;
14
- left: number;
15
- }> | undefined;
10
+ offsets?: Offsets;
16
11
  }) => {
17
12
  scrollX: number;
18
13
  scrollY: number;
@@ -1,7 +1,7 @@
1
- import type { UserIdleState } from "@excalidraw/common";
1
+ import type { UserIdleState, EditorInterface } from "@excalidraw/common";
2
2
  import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
3
3
  import type { MakeBrand } from "@excalidraw/common/utility-types";
4
- import type { AppClassProperties, AppState, EmbedsValidationStatus, ElementsPendingErasure, InteractiveCanvasAppState, StaticCanvasAppState, SocketId, Device, PendingExcalidrawElements } from "../types";
4
+ import type { AppClassProperties, AppState, EmbedsValidationStatus, ElementsPendingErasure, InteractiveCanvasAppState, StaticCanvasAppState, SocketId, PendingExcalidrawElements } from "../types";
5
5
  import type { RoughCanvas } from "roughjs/bin/canvas";
6
6
  import type { Drawable } from "roughjs/bin/core";
7
7
  export type RenderableElementsMap = NonDeletedElementsMap & MakeBrand<"RenderableElementsMap">;
@@ -15,6 +15,7 @@ export type StaticCanvasRenderConfig = {
15
15
  embedsValidationStatus: EmbedsValidationStatus;
16
16
  elementsPendingErasure: ElementsPendingErasure;
17
17
  pendingFlowchartNodes: PendingExcalidrawElements | null;
18
+ theme: AppState["theme"];
18
19
  };
19
20
  export type SVGRenderConfig = {
20
21
  offsetX: number;
@@ -32,6 +33,7 @@ export type SVGRenderConfig = {
32
33
  * @default true
33
34
  */
34
35
  reuseImages: boolean;
36
+ theme: AppState["theme"];
35
37
  };
36
38
  export type InteractiveCanvasRenderConfig = {
37
39
  remoteSelectedElementIds: Map<ExcalidrawElement["id"], SocketId[]>;
@@ -43,6 +45,10 @@ export type InteractiveCanvasRenderConfig = {
43
45
  remotePointerUsernames: Map<SocketId, string>;
44
46
  remotePointerButton: Map<SocketId, string | undefined>;
45
47
  selectionColor: string;
48
+ lastViewportPosition: {
49
+ x: number;
50
+ y: number;
51
+ };
46
52
  renderScrollbars?: boolean;
47
53
  };
48
54
  export type RenderInteractiveSceneCallback = {
@@ -60,7 +66,13 @@ export type StaticSceneRenderConfig = {
60
66
  appState: StaticCanvasAppState;
61
67
  renderConfig: StaticCanvasRenderConfig;
62
68
  };
69
+ export type InteractiveSceneRenderAnimationState = {
70
+ bindingHighlight: {
71
+ runtime: number;
72
+ } | undefined;
73
+ };
63
74
  export type InteractiveSceneRenderConfig = {
75
+ app: AppClassProperties;
64
76
  canvas: HTMLCanvasElement | null;
65
77
  elementsMap: RenderableElementsMap;
66
78
  visibleElements: readonly NonDeletedExcalidrawElement[];
@@ -69,8 +81,10 @@ export type InteractiveSceneRenderConfig = {
69
81
  scale: number;
70
82
  appState: InteractiveCanvasAppState;
71
83
  renderConfig: InteractiveCanvasRenderConfig;
72
- device: Device;
84
+ editorInterface: EditorInterface;
73
85
  callback: (data: RenderInteractiveSceneCallback) => void;
86
+ animationState?: InteractiveSceneRenderAnimationState;
87
+ deltaTime: number;
74
88
  };
75
89
  export type NewElementSceneRenderConfig = {
76
90
  canvas: HTMLCanvasElement | null;
@@ -103,14 +117,17 @@ export type ScrollBars = {
103
117
  deltaMultiplier: number;
104
118
  } | null;
105
119
  };
106
- export type ElementShape = Drawable | Drawable[] | null;
120
+ export type SVGPathString = string & {
121
+ __brand: "SVGPathString";
122
+ };
123
+ export type ElementShape = Drawable | Drawable[] | Path2D | (Drawable | SVGPathString)[] | null;
107
124
  export type ElementShapes = {
108
125
  rectangle: Drawable;
109
126
  ellipse: Drawable;
110
127
  diamond: Drawable;
111
128
  iframe: Drawable;
112
129
  embeddable: Drawable;
113
- freedraw: Drawable | null;
130
+ freedraw: (Drawable | SVGPathString)[];
114
131
  arrow: Drawable[];
115
132
  line: Drawable[];
116
133
  text: null;
@@ -0,0 +1 @@
1
+ export declare const getShortcutKey: (shortcut: string) => string;
@@ -1,6 +1,6 @@
1
1
  import { type GlobalPoint } from "@excalidraw/math";
2
2
  import type { InclusiveRange } from "@excalidraw/math";
3
- import type { Bounds } from "@excalidraw/element";
3
+ import type { Bounds } from "@excalidraw/common";
4
4
  import type { MaybeTransformHandleType } from "@excalidraw/element";
5
5
  import type { ElementsMap, ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
6
6
  import type { AppClassProperties, AppState, KeyboardModifiersObject } from "./types";
@@ -70,9 +70,9 @@ export declare const isSnappingEnabled: ({ event, app, selectedElements, }: {
70
70
  }) => boolean;
71
71
  export declare const areRoughlyEqual: (a: number, b: number, precision?: number) => boolean;
72
72
  export declare const getElementsCorners: (elements: ExcalidrawElement[], elementsMap: ElementsMap, { omitCenter, boundingBoxCorners, dragOffset, }?: {
73
- omitCenter?: boolean | undefined;
74
- boundingBoxCorners?: boolean | undefined;
75
- dragOffset?: Vector2D | undefined;
73
+ omitCenter?: boolean;
74
+ boundingBoxCorners?: boolean;
75
+ dragOffset?: Vector2D;
76
76
  }) => GlobalPoint[];
77
77
  export declare const getVisibleGaps: (elements: readonly NonDeletedExcalidrawElement[], selectedElements: ExcalidrawElement[], appState: AppState, elementsMap: ElementsMap) => {
78
78
  horizontalGaps: Gap[];
@@ -107,5 +107,5 @@ export declare const getSnapLinesAtPointer: (elements: readonly ExcalidrawElemen
107
107
  };
108
108
  snapLines: PointerSnapLine[];
109
109
  };
110
- export declare const isActiveToolNonLinearSnappable: (activeToolType: AppState["activeTool"]["type"]) => boolean;
110
+ export declare const isActiveToolNonLinearSnappable: (activeToolType: AppState["activeTool"]["type"]) => activeToolType is "text" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "magicframe";
111
111
  export {};
@@ -38,7 +38,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38
38
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39
39
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40
40
  */
41
- declare function subset(hbSubsetWasm: any, heapu8: Uint8Array, font: ArrayBuffer, codePoints: ReadonlySet<number>): Uint8Array;
41
+ declare function subset(hbSubsetWasm: any, heapu8: Uint8Array, font: ArrayBuffer, codePoints: ReadonlySet<number>): Uint8Array<ArrayBuffer>;
42
42
  declare const _default: {
43
43
  subset: typeof subset;
44
44
  };
@@ -7,7 +7,7 @@
7
7
  * In the future consider separating common utils into a separate shared chunk.
8
8
  */
9
9
  declare const load: () => Promise<{
10
- subset: (fontBuffer: ArrayBuffer, codePoints: ReadonlySet<number>) => Uint8Array;
10
+ subset: (fontBuffer: ArrayBuffer, codePoints: ReadonlySet<number>) => Uint8Array<ArrayBuffer>;
11
11
  }>;
12
12
  declare const _default: () => ReturnType<typeof load>;
13
13
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: Uint8Array;
1
+ declare const _default: Uint8Array<ArrayBuffer>;
2
2
  export default _default;
@@ -7,8 +7,8 @@
7
7
  * In the future consider separating common utils into a separate shared chunk.
8
8
  */
9
9
  declare const load: () => Promise<{
10
- compress: (buffer: ArrayBuffer) => Uint8Array;
11
- decompress: (buffer: ArrayBuffer) => Uint8Array;
10
+ compress: (buffer: ArrayBuffer) => Uint8Array<ArrayBuffer>;
11
+ decompress: (buffer: ArrayBuffer) => Uint8Array<ArrayBuffer>;
12
12
  }>;
13
13
  declare const _default: () => ReturnType<typeof load>;
14
14
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: Uint8Array;
1
+ declare const _default: Uint8Array<ArrayBuffer>;
2
2
  export default _default;
@@ -0,0 +1,15 @@
1
+ import { type GlobalPoint } from "@excalidraw/math";
2
+ import type { EditorInterface } from "@excalidraw/common";
3
+ import type { ExcalidrawTextElement } from "@excalidraw/element/types";
4
+ export declare const getTextBoxPadding: (zoomValue: number) => number;
5
+ export declare const getTextAutoResizeHandle: (textElement: ExcalidrawTextElement, zoomValue: number, formFactor: EditorInterface["formFactor"]) => {
6
+ center: GlobalPoint | import("@excalidraw/math").LocalPoint;
7
+ start: GlobalPoint;
8
+ end: GlobalPoint;
9
+ hitboxWidth: number;
10
+ hitboxHeight: number;
11
+ } | null;
12
+ export declare const isPointHittingTextAutoResizeHandle: (point: Readonly<{
13
+ x: number;
14
+ y: number;
15
+ }>, textElement: ExcalidrawTextElement, zoomValue: number, formFactor: EditorInterface["formFactor"]) => boolean;