@zsviczian/excalidraw 0.17.1-obsidian-46 → 0.17.1-obsidian-47

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 (349) hide show
  1. package/dist/excalidraw.development.js +152 -76
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/dist/excalidraw.production.min.js.LICENSE.txt +66 -0
  4. package/dist/styles.development.css +1 -1
  5. package/dist/styles.production.css +1 -1
  6. package/package.json +3 -1
  7. package/types/excalidraw/actions/actionAddToLibrary.d.ts +575 -575
  8. package/types/excalidraw/actions/actionAlign.d.ts +108 -108
  9. package/types/excalidraw/actions/actionBoundText.d.ts +420 -420
  10. package/types/excalidraw/actions/actionCanvas.d.ts +2802 -2802
  11. package/types/excalidraw/actions/actionClipboard.d.ts +1436 -1436
  12. package/types/excalidraw/actions/actionDeleteSelected.d.ts +609 -609
  13. package/types/excalidraw/actions/actionDistribute.d.ts +34 -34
  14. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +21 -21
  15. package/types/excalidraw/actions/actionElementLock.d.ts +408 -408
  16. package/types/excalidraw/actions/actionExport.d.ts +1794 -1794
  17. package/types/excalidraw/actions/actionFinalize.d.ts +389 -389
  18. package/types/excalidraw/actions/actionFlip.d.ts +34 -34
  19. package/types/excalidraw/actions/actionFrame.d.ts +815 -815
  20. package/types/excalidraw/actions/actionGroup.d.ts +418 -418
  21. package/types/excalidraw/actions/actionHistory.d.ts +7 -7
  22. package/types/excalidraw/actions/actionLinearEditor.d.ts +205 -205
  23. package/types/excalidraw/actions/actionLink.d.ts +205 -205
  24. package/types/excalidraw/actions/actionMenu.d.ts +598 -598
  25. package/types/excalidraw/actions/actionNavigate.d.ts +394 -394
  26. package/types/excalidraw/actions/actionProperties.d.ts +3006 -3006
  27. package/types/excalidraw/actions/actionSelectAll.d.ts +204 -204
  28. package/types/excalidraw/actions/actionStyles.d.ts +218 -218
  29. package/types/excalidraw/actions/actionTextAutoResize.d.ts +17 -17
  30. package/types/excalidraw/actions/actionToggleGridMode.d.ts +207 -207
  31. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +205 -205
  32. package/types/excalidraw/actions/actionToggleStats.d.ts +205 -205
  33. package/types/excalidraw/actions/actionToggleViewMode.d.ts +206 -206
  34. package/types/excalidraw/actions/actionToggleZenMode.d.ts +206 -206
  35. package/types/excalidraw/actions/actionZindex.d.ts +74 -74
  36. package/types/excalidraw/actions/index.d.ts +25 -25
  37. package/types/excalidraw/actions/manager.d.ts +21 -21
  38. package/types/excalidraw/actions/register.d.ts +5 -5
  39. package/types/excalidraw/actions/shortcuts.d.ts +4 -4
  40. package/types/excalidraw/actions/types.d.ts +47 -47
  41. package/types/excalidraw/align.d.ts +6 -6
  42. package/types/excalidraw/analytics.d.ts +1 -1
  43. package/types/excalidraw/animated-trail.d.ts +33 -33
  44. package/types/excalidraw/animation-frame-handler.d.ts +16 -16
  45. package/types/excalidraw/appState.d.ts +89 -89
  46. package/types/excalidraw/binaryheap.d.ts +12 -12
  47. package/types/excalidraw/change.d.ts +191 -191
  48. package/types/excalidraw/charts.d.ts +27 -27
  49. package/types/excalidraw/clients.d.ts +14 -14
  50. package/types/excalidraw/clipboard.d.ts +44 -44
  51. package/types/excalidraw/colors.d.ts +61 -61
  52. package/types/excalidraw/components/Actions.d.ts +34 -34
  53. package/types/excalidraw/components/ActiveConfirmDialog.d.ts +4 -4
  54. package/types/excalidraw/components/App.d.ts +526 -527
  55. package/types/excalidraw/components/Avatar.d.ts +11 -11
  56. package/types/excalidraw/components/BraveMeasureTextError.d.ts +2 -2
  57. package/types/excalidraw/components/Button.d.ts +17 -17
  58. package/types/excalidraw/components/ButtonIcon.d.ts +14 -14
  59. package/types/excalidraw/components/ButtonIconCycle.d.ts +10 -10
  60. package/types/excalidraw/components/ButtonIconSelect.d.ts +19 -19
  61. package/types/excalidraw/components/ButtonSelect.d.ts +9 -9
  62. package/types/excalidraw/components/ButtonSeparator.d.ts +1 -1
  63. package/types/excalidraw/components/Card.d.ts +6 -6
  64. package/types/excalidraw/components/CheckboxItem.d.ts +8 -8
  65. package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +9 -9
  66. package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +19 -19
  67. package/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +8 -8
  68. package/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +8 -8
  69. package/types/excalidraw/components/ColorPicker/Picker.d.ts +18 -18
  70. package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +10 -10
  71. package/types/excalidraw/components/ColorPicker/PickerHeading.d.ts +5 -5
  72. package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +8 -8
  73. package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +9 -9
  74. package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +21 -21
  75. package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +20 -20
  76. package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +18 -18
  77. package/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +2 -2
  78. package/types/excalidraw/components/CommandPalette/types.d.ts +25 -25
  79. package/types/excalidraw/components/ConfirmDialog.d.ts +10 -10
  80. package/types/excalidraw/components/ContextMenu.d.ts +16 -16
  81. package/types/excalidraw/components/DarkModeToggle.d.ts +7 -7
  82. package/types/excalidraw/components/DefaultSidebar.d.ts +29 -29
  83. package/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +4 -4
  84. package/types/excalidraw/components/Dialog.d.ts +13 -13
  85. package/types/excalidraw/components/DialogActionButton.d.ts +10 -10
  86. package/types/excalidraw/components/ErrorDialog.d.ts +5 -5
  87. package/types/excalidraw/components/ExcalidrawLogo.d.ts +15 -15
  88. package/types/excalidraw/components/EyeDropper.d.ts +27 -27
  89. package/types/excalidraw/components/FilledButton.d.ts +18 -18
  90. package/types/excalidraw/components/FixedSideContainer.d.ts +9 -9
  91. package/types/excalidraw/components/FollowMode/FollowMode.d.ts +10 -10
  92. package/types/excalidraw/components/FontPicker/FontPicker.d.ts +21 -21
  93. package/types/excalidraw/components/FontPicker/FontPickerList.d.ts +25 -25
  94. package/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +6 -6
  95. package/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +13 -13
  96. package/types/excalidraw/components/HandButton.d.ts +10 -10
  97. package/types/excalidraw/components/HelpButton.d.ts +7 -7
  98. package/types/excalidraw/components/HelpDialog.d.ts +4 -4
  99. package/types/excalidraw/components/HintViewer.d.ts +10 -10
  100. package/types/excalidraw/components/IconPicker.d.ts +14 -14
  101. package/types/excalidraw/components/ImageExportDialog.d.ts +14 -14
  102. package/types/excalidraw/components/InitializeApp.d.ts +10 -10
  103. package/types/excalidraw/components/InlineIcon.d.ts +3 -3
  104. package/types/excalidraw/components/Island.d.ts +10 -10
  105. package/types/excalidraw/components/JSONExportDialog.d.ts +15 -15
  106. package/types/excalidraw/components/LaserPointerButton.d.ts +10 -10
  107. package/types/excalidraw/components/LayerUI.d.ts +30 -30
  108. package/types/excalidraw/components/LibraryMenu.d.ts +24 -24
  109. package/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +7 -7
  110. package/types/excalidraw/components/LibraryMenuControlButtons.d.ts +9 -9
  111. package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +17 -17
  112. package/types/excalidraw/components/LibraryMenuItems.d.ts +14 -14
  113. package/types/excalidraw/components/LibraryMenuSection.d.ts +23 -23
  114. package/types/excalidraw/components/LibraryUnit.d.ts +14 -14
  115. package/types/excalidraw/components/LoadingMessage.d.ts +5 -5
  116. package/types/excalidraw/components/LockButton.d.ts +10 -10
  117. package/types/excalidraw/components/MagicButton.d.ts +9 -9
  118. package/types/excalidraw/components/MobileMenu.d.ts +24 -24
  119. package/types/excalidraw/components/Modal.d.ts +14 -14
  120. package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -17
  121. package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -17
  122. package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -22
  123. package/types/excalidraw/components/Paragraph.d.ts +4 -4
  124. package/types/excalidraw/components/PasteChartDialog.d.ts +8 -8
  125. package/types/excalidraw/components/PenModeButton.d.ts +12 -12
  126. package/types/excalidraw/components/Popover.d.ts +15 -15
  127. package/types/excalidraw/components/ProjectName.d.ts +10 -10
  128. package/types/excalidraw/components/PropertiesPopover.d.ts +15 -15
  129. package/types/excalidraw/components/PublishLibrary.d.ts +16 -16
  130. package/types/excalidraw/components/QuickSearch.d.ts +9 -9
  131. package/types/excalidraw/components/RadioGroup.d.ts +13 -13
  132. package/types/excalidraw/components/SVGLayer.d.ts +7 -7
  133. package/types/excalidraw/components/ScrollableList.d.ts +8 -8
  134. package/types/excalidraw/components/Section.d.ts +6 -6
  135. package/types/excalidraw/components/ShareableLinkDialog.d.ts +7 -7
  136. package/types/excalidraw/components/Sidebar/Sidebar.d.ts +76 -76
  137. package/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +7 -7
  138. package/types/excalidraw/components/Sidebar/SidebarTab.d.ts +8 -8
  139. package/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +9 -9
  140. package/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +6 -6
  141. package/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +6 -6
  142. package/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +6 -6
  143. package/types/excalidraw/components/Sidebar/common.d.ts +33 -33
  144. package/types/excalidraw/components/Spinner.d.ts +8 -8
  145. package/types/excalidraw/components/Stack.d.ts +16 -16
  146. package/types/excalidraw/components/Stats/Angle.d.ts +11 -11
  147. package/types/excalidraw/components/Stats/CanvasGrid.d.ts +10 -10
  148. package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +10 -10
  149. package/types/excalidraw/components/Stats/Collapsible.d.ts +8 -8
  150. package/types/excalidraw/components/Stats/Dimension.d.ts +11 -11
  151. package/types/excalidraw/components/Stats/DragInput.d.ts +34 -34
  152. package/types/excalidraw/components/Stats/FontSize.d.ts +11 -11
  153. package/types/excalidraw/components/Stats/MultiAngle.d.ts +11 -11
  154. package/types/excalidraw/components/Stats/MultiDimension.d.ts +14 -14
  155. package/types/excalidraw/components/Stats/MultiFontSize.d.ts +12 -12
  156. package/types/excalidraw/components/Stats/MultiPosition.d.ts +14 -14
  157. package/types/excalidraw/components/Stats/Position.d.ts +12 -12
  158. package/types/excalidraw/components/Stats/index.d.ts +35 -35
  159. package/types/excalidraw/components/Stats/utils.d.ts +26 -26
  160. package/types/excalidraw/components/Switch.d.ts +9 -9
  161. package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +14 -14
  162. package/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +29 -29
  163. package/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +9 -9
  164. package/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +7 -7
  165. package/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +17 -17
  166. package/types/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +4 -4
  167. package/types/excalidraw/components/TTDDialog/TTDDialogSubmitShortcut.d.ts +1 -1
  168. package/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +7 -7
  169. package/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +8 -8
  170. package/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +6 -6
  171. package/types/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +11 -11
  172. package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +8 -8
  173. package/types/excalidraw/components/TTDDialog/common.d.ts +32 -32
  174. package/types/excalidraw/components/TextField.d.ts +19 -19
  175. package/types/excalidraw/components/Toast.d.ts +9 -9
  176. package/types/excalidraw/components/ToolButton.d.ts +49 -49
  177. package/types/excalidraw/components/Tooltip.d.ts +18 -18
  178. package/types/excalidraw/components/Trans.d.ts +9 -9
  179. package/types/excalidraw/components/UserList.d.ts +18 -18
  180. package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +29 -29
  181. package/types/excalidraw/components/canvases/NewElementCanvas.d.ts +14 -14
  182. package/types/excalidraw/components/canvases/StaticCanvas.d.ts +19 -19
  183. package/types/excalidraw/components/canvases/index.d.ts +3 -3
  184. package/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +86 -86
  185. package/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +15 -15
  186. package/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -11
  187. package/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +45 -45
  188. package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +7 -7
  189. package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +17 -17
  190. package/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +7 -7
  191. package/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +15 -15
  192. package/types/excalidraw/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -5
  193. package/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +10 -10
  194. package/types/excalidraw/components/dropdownMenu/common.d.ts +6 -6
  195. package/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -3
  196. package/types/excalidraw/components/footer/Footer.d.ts +12 -12
  197. package/types/excalidraw/components/footer/FooterCenter.d.ts +8 -8
  198. package/types/excalidraw/components/hoc/withInternalFallback.d.ts +4 -4
  199. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +18 -18
  200. package/types/excalidraw/components/hyperlink/helpers.d.ts +7 -7
  201. package/types/excalidraw/components/icons.d.ts +211 -211
  202. package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +9 -9
  203. package/types/excalidraw/components/main-menu/DefaultItems.d.ts +58 -58
  204. package/types/excalidraw/components/main-menu/MainMenu.d.ts +80 -80
  205. package/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +59 -59
  206. package/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -19
  207. package/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +86 -86
  208. package/types/excalidraw/constants.d.ts +314 -314
  209. package/types/excalidraw/context/tunnels.d.ts +20 -20
  210. package/types/excalidraw/context/ui-appState.d.ts +4 -4
  211. package/types/excalidraw/cursor.d.ts +6 -6
  212. package/types/excalidraw/data/EditorLocalStorage.d.ts +8 -8
  213. package/types/excalidraw/data/ai/types.d.ts +242 -242
  214. package/types/excalidraw/data/blob.d.ts +49 -49
  215. package/types/excalidraw/data/encode.d.ts +53 -53
  216. package/types/excalidraw/data/encryption.d.ts +9 -9
  217. package/types/excalidraw/data/filesystem.d.ts +20 -20
  218. package/types/excalidraw/data/image.d.ts +15 -15
  219. package/types/excalidraw/data/index.d.ts +22 -22
  220. package/types/excalidraw/data/json.d.ts +16 -16
  221. package/types/excalidraw/data/library.d.ts +106 -106
  222. package/types/excalidraw/data/reconcile.d.ts +6 -6
  223. package/types/excalidraw/data/resave.d.ts +5 -5
  224. package/types/excalidraw/data/restore.d.ts +21 -21
  225. package/types/excalidraw/data/transform.d.ts +81 -81
  226. package/types/excalidraw/data/types.d.ts +45 -45
  227. package/types/excalidraw/data/url.d.ts +8 -8
  228. package/types/excalidraw/deburr.d.ts +1 -1
  229. package/types/excalidraw/dist/excalidraw.development.d.ts +2 -2
  230. package/types/excalidraw/dist/excalidraw.production.min.d.ts +1 -1
  231. package/types/excalidraw/distribute.d.ts +6 -6
  232. package/types/excalidraw/element/ElementCanvasButtons.d.ts +7 -7
  233. package/types/excalidraw/element/binding.d.ts +97 -97
  234. package/types/excalidraw/element/bounds.d.ts +74 -74
  235. package/types/excalidraw/element/collision.d.ts +16 -16
  236. package/types/excalidraw/element/containerCache.d.ts +11 -11
  237. package/types/excalidraw/element/dragElements.d.ts +32 -32
  238. package/types/excalidraw/element/embeddable.d.ts +211 -211
  239. package/types/excalidraw/element/flowchart.d.ts +25 -25
  240. package/types/excalidraw/element/heading.d.ts +11 -11
  241. package/types/excalidraw/element/image.d.ts +32 -32
  242. package/types/excalidraw/element/index.d.ts +26 -26
  243. package/types/excalidraw/element/linearElementEditor.d.ts +344 -344
  244. package/types/excalidraw/element/mutateElement.d.ts +11 -11
  245. package/types/excalidraw/element/newElement.d.ts +106 -106
  246. package/types/excalidraw/element/resizeElements.d.ts +17 -17
  247. package/types/excalidraw/element/resizeTest.d.ts +14 -14
  248. package/types/excalidraw/element/routing.d.ts +10 -10
  249. package/types/excalidraw/element/showSelectedShapeActions.d.ts +3 -3
  250. package/types/excalidraw/element/sizeHelpers.d.ts +40 -40
  251. package/types/excalidraw/element/sortElements.d.ts +2 -2
  252. package/types/excalidraw/element/textElement.d.ts +70 -70
  253. package/types/excalidraw/element/textWysiwyg.d.ts +22 -22
  254. package/types/excalidraw/element/transformHandles.d.ts +54 -54
  255. package/types/excalidraw/element/typeChecks.d.ts +42 -42
  256. package/types/excalidraw/element/types.d.ts +253 -253
  257. package/types/excalidraw/emitter.d.ts +16 -16
  258. package/types/excalidraw/entry.d.ts +1 -1
  259. package/types/excalidraw/env.d.cts +1 -1
  260. package/types/excalidraw/env.d.ts +1 -1
  261. package/types/excalidraw/errors.d.ts +16 -16
  262. package/types/excalidraw/fonts/ExcalidrawFont.d.ts +37 -21
  263. package/types/excalidraw/fonts/index.d.ts +83 -83
  264. package/types/excalidraw/fonts/metadata.d.ts +35 -35
  265. package/types/excalidraw/fonts/wasm/hb-subset.bindings.d.ts +45 -0
  266. package/types/excalidraw/fonts/wasm/hb-subset.loader.d.ts +5 -0
  267. package/types/excalidraw/fonts/wasm/hb-subset.wasm.d.ts +2 -0
  268. package/types/excalidraw/fonts/wasm/woff2.bindings.d.ts +31 -0
  269. package/types/excalidraw/fonts/wasm/woff2.loader.d.ts +6 -0
  270. package/types/excalidraw/fonts/wasm/woff2.wasm.d.ts +2 -0
  271. package/types/excalidraw/fractionalIndex.d.ts +48 -48
  272. package/types/excalidraw/frame.d.ts +63 -63
  273. package/types/excalidraw/ga.d.ts +63 -63
  274. package/types/excalidraw/gadirections.d.ts +8 -8
  275. package/types/excalidraw/galines.d.ts +22 -22
  276. package/types/excalidraw/gapoints.d.ts +7 -7
  277. package/types/excalidraw/gatransforms.d.ts +10 -10
  278. package/types/excalidraw/gesture.d.ts +6 -6
  279. package/types/excalidraw/groups.d.ts +33 -33
  280. package/types/excalidraw/history.d.ts +40 -40
  281. package/types/excalidraw/hooks/useCallbackRefState.d.ts +1 -1
  282. package/types/excalidraw/hooks/useCopiedIndicator.d.ts +5 -5
  283. package/types/excalidraw/hooks/useCreatePortalContainer.d.ts +7 -7
  284. package/types/excalidraw/hooks/useEmitter.d.ts +2 -2
  285. package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +11 -11
  286. package/types/excalidraw/hooks/useOutsideClick.d.ts +19 -19
  287. package/types/excalidraw/hooks/useScrollPosition.d.ts +1 -1
  288. package/types/excalidraw/hooks/useStable.d.ts +1 -1
  289. package/types/excalidraw/hooks/useStableCallback.d.ts +4 -4
  290. package/types/excalidraw/hooks/useTransition.d.ts +2 -2
  291. package/types/excalidraw/i18n.d.ts +24 -24
  292. package/types/excalidraw/index-node.d.ts +1 -1
  293. package/types/excalidraw/index.d.ts +61 -61
  294. package/types/excalidraw/jotai.d.ts +34 -34
  295. package/types/excalidraw/keys.d.ts +82 -82
  296. package/types/excalidraw/laser-trails.d.ts +20 -20
  297. package/types/excalidraw/main.d.ts +2 -2
  298. package/types/excalidraw/math.d.ts +79 -79
  299. package/types/excalidraw/mermaid.d.ts +2 -2
  300. package/types/excalidraw/obsidianUtils.d.ts +17 -17
  301. package/types/excalidraw/points.d.ts +7 -7
  302. package/types/excalidraw/polyfill.d.ts +2 -2
  303. package/types/excalidraw/publicPath.d.ts +1 -1
  304. package/types/excalidraw/queue.d.ts +9 -9
  305. package/types/excalidraw/random.d.ts +4 -4
  306. package/types/excalidraw/reactUtils.d.ts +14 -14
  307. package/types/excalidraw/renderer/easingFunctions.d.ts +6 -6
  308. package/types/excalidraw/renderer/helpers.d.ts +13 -13
  309. package/types/excalidraw/renderer/interactiveScene.d.ts +20 -20
  310. package/types/excalidraw/renderer/renderElement.d.ts +27 -27
  311. package/types/excalidraw/renderer/renderNewElementScene.d.ts +7 -7
  312. package/types/excalidraw/renderer/renderSnaps.d.ts +2 -2
  313. package/types/excalidraw/renderer/roundRect.d.ts +11 -11
  314. package/types/excalidraw/renderer/staticScene.d.ts +11 -11
  315. package/types/excalidraw/renderer/staticSvgScene.d.ts +5 -5
  316. package/types/excalidraw/scene/Renderer.d.ts +28 -28
  317. package/types/excalidraw/scene/Scene.d.ts +78 -78
  318. package/types/excalidraw/scene/Shape.d.ts +17 -17
  319. package/types/excalidraw/scene/ShapeCache.d.ts +25 -25
  320. package/types/excalidraw/scene/comparisons.d.ts +11 -11
  321. package/types/excalidraw/scene/export.d.ts +29 -29
  322. package/types/excalidraw/scene/index.d.ts +4 -4
  323. package/types/excalidraw/scene/normalize.d.ts +4 -4
  324. package/types/excalidraw/scene/scroll.d.ts +17 -17
  325. package/types/excalidraw/scene/scrollbars.d.ts +12 -12
  326. package/types/excalidraw/scene/selection.d.ts +32 -32
  327. package/types/excalidraw/scene/types.d.ts +112 -112
  328. package/types/excalidraw/scene/zoom.d.ts +12 -12
  329. package/types/excalidraw/shapes.d.ts +70 -70
  330. package/types/excalidraw/snapping.d.ts +109 -109
  331. package/types/excalidraw/store.d.ts +129 -129
  332. package/types/excalidraw/types.d.ts +700 -700
  333. package/types/excalidraw/utility-types.d.ts +31 -31
  334. package/types/excalidraw/utils.d.ts +243 -243
  335. package/types/excalidraw/visualdebug.d.ts +34 -34
  336. package/types/excalidraw/webpack.dev.config.d.ts +81 -81
  337. package/types/excalidraw/webpack.prod.config.d.ts +97 -97
  338. package/types/excalidraw/zindex.d.ts +6 -6
  339. package/types/utils/bbox.d.ts +11 -11
  340. package/types/utils/collision.d.ts +4 -4
  341. package/types/utils/export.d.ts +44 -44
  342. package/types/utils/geometry/geometry.d.ts +89 -89
  343. package/types/utils/geometry/shape.d.ts +56 -56
  344. package/types/utils/index.d.ts +4 -4
  345. package/types/utils/withinBounds.d.ts +19 -19
  346. package/types/excalidraw/components/MagicSettings.d.ts +0 -8
  347. package/types/excalidraw/components/Stats.d.ts +0 -11
  348. package/types/excalidraw/data/magic.d.ts +0 -23
  349. package/types/excalidraw/scene/Fonts.d.ts +0 -19
@@ -1,344 +1,344 @@
1
- import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, PointBinding, ExcalidrawBindableElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, OrderedExcalidrawElement, SceneElementsMap } from "./types";
2
- import type { Bounds } from "./bounds";
3
- import type { Point, AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize } from "../types";
4
- import type { Store } from "../store";
5
- import type Scene from "../scene/Scene";
6
- declare const editorMidPointsCache: {
7
- version: number | null;
8
- points: (Point | null)[];
9
- zoom: number | null;
10
- };
11
- export declare class LinearElementEditor {
12
- readonly elementId: ExcalidrawElement["id"] & {
13
- _brand: "excalidrawLinearElementId";
14
- };
15
- /** indices */
16
- readonly selectedPointsIndices: readonly number[] | null;
17
- readonly pointerDownState: Readonly<{
18
- prevSelectedPointsIndices: readonly number[] | null;
19
- /** index */
20
- lastClickedPoint: number;
21
- lastClickedIsEndPoint: boolean;
22
- origin: Readonly<{
23
- x: number;
24
- y: number;
25
- }> | null;
26
- segmentMidpoint: {
27
- value: Point | null;
28
- index: number | null;
29
- added: boolean;
30
- };
31
- }>;
32
- /** whether you're dragging a point */
33
- readonly isDragging: boolean;
34
- readonly lastUncommittedPoint: Point | null;
35
- readonly pointerOffset: Readonly<{
36
- x: number;
37
- y: number;
38
- }>;
39
- readonly startBindingElement: ExcalidrawBindableElement | null | "keep";
40
- readonly endBindingElement: ExcalidrawBindableElement | null | "keep";
41
- readonly hoverPointIndex: number;
42
- readonly segmentMidPointHoveredCoords: Point | null;
43
- constructor(element: NonDeleted<ExcalidrawLinearElement>);
44
- static POINT_HANDLE_SIZE: number;
45
- /**
46
- * @param id the `elementId` from the instance of this class (so that we can
47
- * statically guarantee this method returns an ExcalidrawLinearElement)
48
- */
49
- static getElement(id: InstanceType<typeof LinearElementEditor>["elementId"], elementsMap: ElementsMap): NonDeleted<ExcalidrawLinearElement> | null;
50
- static handleBoxSelection(event: PointerEvent, appState: AppState, setState: React.Component<any, AppState>["setState"], elementsMap: NonDeletedSceneElementsMap): false | undefined;
51
- /** @returns whether point was dragged */
52
- static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, maybeSuggestBinding: (element: NonDeleted<ExcalidrawLinearElement>, pointSceneCoords: {
53
- x: number;
54
- y: number;
55
- }[]) => void, linearElementEditor: LinearElementEditor, scene: Scene): boolean;
56
- static handlePointerUp(event: PointerEvent, editingLinearElement: LinearElementEditor, appState: AppState, scene: Scene): LinearElementEditor;
57
- static getEditorMidPoints: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => (typeof editorMidPointsCache)["points"];
58
- static updateEditorMidPointsCache: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => void;
59
- static getSegmentMidpointHitCoords: (linearElementEditor: LinearElementEditor, scenePointer: {
60
- x: number;
61
- y: number;
62
- }, appState: AppState, elementsMap: ElementsMap) => readonly [number, number] | null;
63
- static isSegmentTooShort(element: NonDeleted<ExcalidrawLinearElement>, startPoint: Point, endPoint: Point, zoom: AppState["zoom"]): boolean;
64
- static getSegmentMidPoint(element: NonDeleted<ExcalidrawLinearElement>, startPoint: Point, endPoint: Point, endPointIndex: number, elementsMap: ElementsMap): readonly [number, number];
65
- static getSegmentMidPointIndex(linearElementEditor: LinearElementEditor, appState: AppState, midPoint: Point, elementsMap: ElementsMap): number;
66
- static handlePointerDown(event: React.PointerEvent<HTMLElement>, app: AppClassProperties, store: Store, scenePointer: {
67
- x: number;
68
- y: number;
69
- }, linearElementEditor: LinearElementEditor, scene: Scene): {
70
- didAddPoint: boolean;
71
- hitElement: NonDeleted<ExcalidrawElement> | null;
72
- linearElementEditor: LinearElementEditor | null;
73
- };
74
- static arePointsEqual(point1: Point | null, point2: Point | null): boolean;
75
- static handlePointerMove(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number, app: AppClassProperties, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): LinearElementEditor | null;
76
- /** scene coords */
77
- static getPointGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, point: Point, elementsMap: ElementsMap): readonly [number, number];
78
- /** scene coords */
79
- static getPointsGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap): Point[];
80
- static getPointAtIndexGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, indexMaybeFromEnd: number, // -1 for last element
81
- elementsMap: ElementsMap): Point;
82
- static pointFromAbsoluteCoords(element: NonDeleted<ExcalidrawLinearElement>, absoluteCoords: Point, elementsMap: ElementsMap): Point;
83
- static getPointIndexUnderCursor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, zoom: AppState["zoom"], x: number, y: number): number;
84
- static createPointAt(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, scenePointerX: number, scenePointerY: number, gridSize: NullableGridSize): Point;
85
- /**
86
- * Normalizes line points so that the start point is at [0,0]. This is
87
- * expected in various parts of the codebase. Also returns new x/y to account
88
- * for the potential normalization.
89
- */
90
- static getNormalizedPoints(element: ExcalidrawLinearElement): {
91
- points: (readonly [number, number])[];
92
- x: number;
93
- y: number;
94
- };
95
- static normalizePoints(element: NonDeleted<ExcalidrawLinearElement>): void;
96
- static duplicateSelectedPoints(appState: AppState, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): false | {
97
- appState: {
98
- editingLinearElement: {
99
- selectedPointsIndices: number[];
100
- elementId: string & {
101
- _brand: "excalidrawLinearElementId";
102
- };
103
- pointerDownState: Readonly<{
104
- prevSelectedPointsIndices: readonly number[] | null;
105
- /** index */
106
- lastClickedPoint: number;
107
- lastClickedIsEndPoint: boolean;
108
- origin: Readonly<{
109
- x: number;
110
- y: number;
111
- }> | null;
112
- segmentMidpoint: {
113
- value: readonly [number, number] | null;
114
- index: number | null;
115
- added: boolean;
116
- };
117
- }>;
118
- isDragging: boolean;
119
- lastUncommittedPoint: readonly [number, number] | null;
120
- pointerOffset: Readonly<{
121
- x: number;
122
- y: number;
123
- }>;
124
- startBindingElement: ExcalidrawBindableElement | "keep" | null;
125
- endBindingElement: ExcalidrawBindableElement | "keep" | null;
126
- hoverPointIndex: number;
127
- segmentMidPointHoveredCoords: readonly [number, number] | null;
128
- };
129
- contextMenu: {
130
- items: import("../components/ContextMenu").ContextMenuItems;
131
- top: number;
132
- left: number;
133
- } | null;
134
- showWelcomeScreen: boolean;
135
- isLoading: boolean;
136
- errorMessage: import("react").ReactNode;
137
- activeEmbeddable: {
138
- element: import("./types").NonDeletedExcalidrawElement;
139
- state: "active" | "hover";
140
- } | null;
141
- newElement: NonDeleted<import("./types").ExcalidrawNonSelectionElement> | null;
142
- resizingElement: import("./types").NonDeletedExcalidrawElement | null;
143
- multiElement: NonDeleted<ExcalidrawLinearElement> | null;
144
- selectionElement: import("./types").NonDeletedExcalidrawElement | null;
145
- isBindingEnabled: boolean;
146
- startBoundElement: NonDeleted<ExcalidrawBindableElement> | null;
147
- suggestedBindings: import("./binding").SuggestedBinding[];
148
- frameToHighlight: NonDeleted<import("./types").ExcalidrawFrameLikeElement> | null;
149
- frameRendering: {
150
- enabled: boolean;
151
- name: boolean;
152
- outline: boolean;
153
- clip: boolean;
154
- };
155
- editingFrame: string | null;
156
- elementsToHighlight: NonDeleted<ExcalidrawElement>[] | null;
157
- editingTextElement: import("./types").NonDeletedExcalidrawElement | null;
158
- activeTool: {
159
- lastActiveTool: import("../types").ActiveTool | null;
160
- locked: boolean;
161
- } & import("../types").ActiveTool;
162
- penMode: boolean;
163
- penDetected: boolean;
164
- exportBackground: boolean;
165
- exportEmbedScene: boolean;
166
- exportWithDarkMode: boolean;
167
- exportScale: number;
168
- currentItemStrokeColor: string;
169
- currentItemBackgroundColor: string;
170
- currentItemFillStyle: import("./types").FillStyle;
171
- currentItemStrokeWidth: number;
172
- currentItemStrokeStyle: import("./types").StrokeStyle;
173
- currentItemRoughness: number;
174
- currentItemOpacity: number;
175
- currentItemFontFamily: number;
176
- currentItemFontSize: number;
177
- currentItemTextAlign: string;
178
- currentItemStartArrowhead: import("./types").Arrowhead | null;
179
- currentItemEndArrowhead: import("./types").Arrowhead | null;
180
- currentHoveredFontFamily: number | null;
181
- currentItemRoundness: import("./types").StrokeRoundness;
182
- currentItemArrowType: "sharp" | "round" | "elbow";
183
- viewBackgroundColor: string;
184
- scrollX: number;
185
- scrollY: number;
186
- cursorButton: "up" | "down";
187
- scrolledOutside: boolean;
188
- name: string | null;
189
- isResizing: boolean;
190
- isRotating: boolean;
191
- zoom: Readonly<{
192
- value: import("../types").NormalizedZoomValue;
193
- }>;
194
- openMenu: "canvas" | "shape" | null;
195
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
196
- openSidebar: {
197
- name: string;
198
- tab?: string | undefined;
199
- } | null;
200
- openDialog: {
201
- name: "imageExport" | "help" | "jsonExport";
202
- } | {
203
- name: "ttd";
204
- tab: "mermaid" | "text-to-diagram";
205
- } | {
206
- name: "commandPalette";
207
- } | null;
208
- defaultSidebarDockedPreference: boolean;
209
- lastPointerDownWith: import("./types").PointerType;
210
- selectedElementIds: Readonly<{
211
- [id: string]: true;
212
- }>;
213
- previousSelectedElementIds: {
214
- [id: string]: true;
215
- };
216
- selectedElementsAreBeingDragged: boolean;
217
- shouldCacheIgnoreZoom: boolean;
218
- toast: {
219
- message: string;
220
- closable?: boolean | undefined;
221
- duration?: number | undefined;
222
- } | null;
223
- zenModeEnabled: boolean;
224
- theme: import("./types").Theme;
225
- gridSize: number;
226
- gridStep: number;
227
- gridModeEnabled: boolean;
228
- viewModeEnabled: boolean;
229
- selectedGroupIds: {
230
- [groupId: string]: boolean;
231
- };
232
- editingGroupId: string | null;
233
- width: number;
234
- height: number;
235
- offsetTop: number;
236
- offsetLeft: number;
237
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
238
- collaborators: Map<import("../types").SocketId, Readonly<{
239
- pointer?: import("../types").CollaboratorPointer | undefined;
240
- button?: "up" | "down" | undefined;
241
- selectedElementIds?: Readonly<{
242
- [id: string]: true;
243
- }> | undefined;
244
- username?: string | null | undefined;
245
- userState?: import("../types").UserIdleState | undefined;
246
- color?: {
247
- background: string;
248
- stroke: string;
249
- } | undefined;
250
- avatarUrl?: string | undefined;
251
- id?: string | undefined;
252
- socketId?: import("../types").SocketId | undefined;
253
- isCurrentUser?: boolean | undefined; /** whether you're dragging a point */
254
- isInCall?: boolean | undefined;
255
- isSpeaking?: boolean | undefined;
256
- isMuted?: boolean | undefined;
257
- }>>;
258
- stats: {
259
- open: boolean;
260
- panels: number;
261
- };
262
- currentChartType: import("./types").ChartType;
263
- pasteDialog: {
264
- shown: false;
265
- data: null;
266
- } | {
267
- shown: true;
268
- data: import("../charts").Spreadsheet;
269
- };
270
- pendingImageElementId: string | null;
271
- showHyperlinkPopup: false | "info" | "editor";
272
- linkOpacity: number;
273
- trayModeEnabled: boolean;
274
- colorPalette?: {
275
- canvasBackground: import("../colors").ColorPaletteCustom;
276
- elementBackground: import("../colors").ColorPaletteCustom;
277
- elementStroke: import("../colors").ColorPaletteCustom;
278
- topPicks: {
279
- canvasBackground: [string, string, string, string, string];
280
- elementStroke: [string, string, string, string, string];
281
- elementBackground: [string, string, string, string, string];
282
- };
283
- } | undefined;
284
- allowWheelZoom?: boolean | undefined;
285
- allowPinchZoom?: boolean | undefined;
286
- pinnedScripts?: string[] | undefined;
287
- customPens?: any[] | undefined;
288
- currentStrokeOptions?: any;
289
- resetCustomPen?: any;
290
- gridColor: {
291
- Bold: string;
292
- Regular: string;
293
- };
294
- highlightSearchResult: boolean;
295
- dynamicStyle: {
296
- [x: string]: string;
297
- };
298
- frameColor: {
299
- stroke: string;
300
- fill: string;
301
- nameColor: string;
302
- };
303
- invertBindingBehaviour: boolean;
304
- selectedLinearElement: LinearElementEditor | null;
305
- snapLines: readonly import("../snapping").SnapLine[];
306
- originSnapOffset: {
307
- x: number;
308
- y: number;
309
- } | null;
310
- objectsSnapModeEnabled: boolean;
311
- userToFollow: import("../types").UserToFollow | null;
312
- followedBy: Set<import("../types").SocketId>;
313
- };
314
- };
315
- static deletePoints(element: NonDeleted<ExcalidrawLinearElement>, pointIndices: readonly number[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): void;
316
- static addPoints(element: NonDeleted<ExcalidrawLinearElement>, targetPoints: {
317
- point: Point;
318
- }[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): void;
319
- static movePoints(element: NonDeleted<ExcalidrawLinearElement>, targetPoints: {
320
- index: number;
321
- point: Point;
322
- isDragging?: boolean;
323
- }[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap, otherUpdates?: {
324
- startBinding?: PointBinding | null;
325
- endBinding?: PointBinding | null;
326
- }, options?: {
327
- changedElements?: Map<string, OrderedExcalidrawElement>;
328
- isDragging?: boolean;
329
- }): void;
330
- static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
331
- static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, elementsMap: ElementsMap): {
332
- pointerDownState: LinearElementEditor["pointerDownState"];
333
- selectedPointsIndices: LinearElementEditor["selectedPointsIndices"];
334
- } | undefined;
335
- private static _updatePoints;
336
- private static _getShiftLockedDelta;
337
- static getBoundTextElementPosition: (element: ExcalidrawLinearElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
338
- x: number;
339
- y: number;
340
- };
341
- static getMinMaxXYWithBoundText: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, elementBounds: Bounds, boundTextElement: ExcalidrawTextElementWithContainer) => [number, number, number, number, number, number];
342
- static getElementAbsoluteCoords: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, includeBoundText?: boolean) => [number, number, number, number, number, number];
343
- }
344
- export {};
1
+ import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, PointBinding, ExcalidrawBindableElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, OrderedExcalidrawElement, SceneElementsMap } from "./types";
2
+ import type { Bounds } from "./bounds";
3
+ import type { Point, AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize } from "../types";
4
+ import type { Store } from "../store";
5
+ import type Scene from "../scene/Scene";
6
+ declare const editorMidPointsCache: {
7
+ version: number | null;
8
+ points: (Point | null)[];
9
+ zoom: number | null;
10
+ };
11
+ export declare class LinearElementEditor {
12
+ readonly elementId: ExcalidrawElement["id"] & {
13
+ _brand: "excalidrawLinearElementId";
14
+ };
15
+ /** indices */
16
+ readonly selectedPointsIndices: readonly number[] | null;
17
+ readonly pointerDownState: Readonly<{
18
+ prevSelectedPointsIndices: readonly number[] | null;
19
+ /** index */
20
+ lastClickedPoint: number;
21
+ lastClickedIsEndPoint: boolean;
22
+ origin: Readonly<{
23
+ x: number;
24
+ y: number;
25
+ }> | null;
26
+ segmentMidpoint: {
27
+ value: Point | null;
28
+ index: number | null;
29
+ added: boolean;
30
+ };
31
+ }>;
32
+ /** whether you're dragging a point */
33
+ readonly isDragging: boolean;
34
+ readonly lastUncommittedPoint: Point | null;
35
+ readonly pointerOffset: Readonly<{
36
+ x: number;
37
+ y: number;
38
+ }>;
39
+ readonly startBindingElement: ExcalidrawBindableElement | null | "keep";
40
+ readonly endBindingElement: ExcalidrawBindableElement | null | "keep";
41
+ readonly hoverPointIndex: number;
42
+ readonly segmentMidPointHoveredCoords: Point | null;
43
+ constructor(element: NonDeleted<ExcalidrawLinearElement>);
44
+ static POINT_HANDLE_SIZE: number;
45
+ /**
46
+ * @param id the `elementId` from the instance of this class (so that we can
47
+ * statically guarantee this method returns an ExcalidrawLinearElement)
48
+ */
49
+ static getElement(id: InstanceType<typeof LinearElementEditor>["elementId"], elementsMap: ElementsMap): NonDeleted<ExcalidrawLinearElement> | null;
50
+ static handleBoxSelection(event: PointerEvent, appState: AppState, setState: React.Component<any, AppState>["setState"], elementsMap: NonDeletedSceneElementsMap): false | undefined;
51
+ /** @returns whether point was dragged */
52
+ static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, maybeSuggestBinding: (element: NonDeleted<ExcalidrawLinearElement>, pointSceneCoords: {
53
+ x: number;
54
+ y: number;
55
+ }[]) => void, linearElementEditor: LinearElementEditor, scene: Scene): boolean;
56
+ static handlePointerUp(event: PointerEvent, editingLinearElement: LinearElementEditor, appState: AppState, scene: Scene): LinearElementEditor;
57
+ static getEditorMidPoints: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => (typeof editorMidPointsCache)["points"];
58
+ static updateEditorMidPointsCache: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => void;
59
+ static getSegmentMidpointHitCoords: (linearElementEditor: LinearElementEditor, scenePointer: {
60
+ x: number;
61
+ y: number;
62
+ }, appState: AppState, elementsMap: ElementsMap) => readonly [number, number] | null;
63
+ static isSegmentTooShort(element: NonDeleted<ExcalidrawLinearElement>, startPoint: Point, endPoint: Point, zoom: AppState["zoom"]): boolean;
64
+ static getSegmentMidPoint(element: NonDeleted<ExcalidrawLinearElement>, startPoint: Point, endPoint: Point, endPointIndex: number, elementsMap: ElementsMap): readonly [number, number];
65
+ static getSegmentMidPointIndex(linearElementEditor: LinearElementEditor, appState: AppState, midPoint: Point, elementsMap: ElementsMap): number;
66
+ static handlePointerDown(event: React.PointerEvent<HTMLElement>, app: AppClassProperties, store: Store, scenePointer: {
67
+ x: number;
68
+ y: number;
69
+ }, linearElementEditor: LinearElementEditor, scene: Scene): {
70
+ didAddPoint: boolean;
71
+ hitElement: NonDeleted<ExcalidrawElement> | null;
72
+ linearElementEditor: LinearElementEditor | null;
73
+ };
74
+ static arePointsEqual(point1: Point | null, point2: Point | null): boolean;
75
+ static handlePointerMove(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number, app: AppClassProperties, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): LinearElementEditor | null;
76
+ /** scene coords */
77
+ static getPointGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, point: Point, elementsMap: ElementsMap): readonly [number, number];
78
+ /** scene coords */
79
+ static getPointsGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap): Point[];
80
+ static getPointAtIndexGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, indexMaybeFromEnd: number, // -1 for last element
81
+ elementsMap: ElementsMap): Point;
82
+ static pointFromAbsoluteCoords(element: NonDeleted<ExcalidrawLinearElement>, absoluteCoords: Point, elementsMap: ElementsMap): Point;
83
+ static getPointIndexUnderCursor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, zoom: AppState["zoom"], x: number, y: number): number;
84
+ static createPointAt(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, scenePointerX: number, scenePointerY: number, gridSize: NullableGridSize): Point;
85
+ /**
86
+ * Normalizes line points so that the start point is at [0,0]. This is
87
+ * expected in various parts of the codebase. Also returns new x/y to account
88
+ * for the potential normalization.
89
+ */
90
+ static getNormalizedPoints(element: ExcalidrawLinearElement): {
91
+ points: (readonly [number, number])[];
92
+ x: number;
93
+ y: number;
94
+ };
95
+ static normalizePoints(element: NonDeleted<ExcalidrawLinearElement>): void;
96
+ static duplicateSelectedPoints(appState: AppState, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): false | {
97
+ appState: {
98
+ editingLinearElement: {
99
+ selectedPointsIndices: number[];
100
+ elementId: string & {
101
+ _brand: "excalidrawLinearElementId";
102
+ };
103
+ pointerDownState: Readonly<{
104
+ prevSelectedPointsIndices: readonly number[] | null;
105
+ /** index */
106
+ lastClickedPoint: number;
107
+ lastClickedIsEndPoint: boolean;
108
+ origin: Readonly<{
109
+ x: number;
110
+ y: number;
111
+ }> | null;
112
+ segmentMidpoint: {
113
+ value: readonly [number, number] | null;
114
+ index: number | null;
115
+ added: boolean;
116
+ };
117
+ }>;
118
+ isDragging: boolean;
119
+ lastUncommittedPoint: readonly [number, number] | null;
120
+ pointerOffset: Readonly<{
121
+ x: number;
122
+ y: number;
123
+ }>;
124
+ startBindingElement: ExcalidrawBindableElement | "keep" | null;
125
+ endBindingElement: ExcalidrawBindableElement | "keep" | null;
126
+ hoverPointIndex: number;
127
+ segmentMidPointHoveredCoords: readonly [number, number] | null;
128
+ };
129
+ contextMenu: {
130
+ items: import("../components/ContextMenu").ContextMenuItems;
131
+ top: number;
132
+ left: number;
133
+ } | null;
134
+ showWelcomeScreen: boolean;
135
+ isLoading: boolean;
136
+ errorMessage: import("react").ReactNode;
137
+ activeEmbeddable: {
138
+ element: import("./types").NonDeletedExcalidrawElement;
139
+ state: "active" | "hover";
140
+ } | null;
141
+ newElement: NonDeleted<import("./types").ExcalidrawNonSelectionElement> | null;
142
+ resizingElement: import("./types").NonDeletedExcalidrawElement | null;
143
+ multiElement: NonDeleted<ExcalidrawLinearElement> | null;
144
+ selectionElement: import("./types").NonDeletedExcalidrawElement | null;
145
+ isBindingEnabled: boolean;
146
+ startBoundElement: NonDeleted<ExcalidrawBindableElement> | null;
147
+ suggestedBindings: import("./binding").SuggestedBinding[];
148
+ frameToHighlight: NonDeleted<import("./types").ExcalidrawFrameLikeElement> | null;
149
+ frameRendering: {
150
+ enabled: boolean;
151
+ name: boolean;
152
+ outline: boolean;
153
+ clip: boolean;
154
+ };
155
+ editingFrame: string | null;
156
+ elementsToHighlight: NonDeleted<ExcalidrawElement>[] | null;
157
+ editingTextElement: import("./types").NonDeletedExcalidrawElement | null;
158
+ activeTool: {
159
+ lastActiveTool: import("../types").ActiveTool | null;
160
+ locked: boolean;
161
+ } & import("../types").ActiveTool;
162
+ penMode: boolean;
163
+ penDetected: boolean;
164
+ exportBackground: boolean;
165
+ exportEmbedScene: boolean;
166
+ exportWithDarkMode: boolean;
167
+ exportScale: number;
168
+ currentItemStrokeColor: string;
169
+ currentItemBackgroundColor: string;
170
+ currentItemFillStyle: import("./types").FillStyle;
171
+ currentItemStrokeWidth: number;
172
+ currentItemStrokeStyle: import("./types").StrokeStyle;
173
+ currentItemRoughness: number;
174
+ currentItemOpacity: number;
175
+ currentItemFontFamily: number;
176
+ currentItemFontSize: number;
177
+ currentItemTextAlign: string;
178
+ currentItemStartArrowhead: import("./types").Arrowhead | null;
179
+ currentItemEndArrowhead: import("./types").Arrowhead | null;
180
+ currentHoveredFontFamily: number | null;
181
+ currentItemRoundness: import("./types").StrokeRoundness;
182
+ currentItemArrowType: "sharp" | "round" | "elbow";
183
+ viewBackgroundColor: string;
184
+ scrollX: number;
185
+ scrollY: number;
186
+ cursorButton: "up" | "down";
187
+ scrolledOutside: boolean;
188
+ name: string | null;
189
+ isResizing: boolean;
190
+ isRotating: boolean;
191
+ zoom: Readonly<{
192
+ value: import("../types").NormalizedZoomValue;
193
+ }>;
194
+ openMenu: "canvas" | "shape" | null;
195
+ openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
196
+ openSidebar: {
197
+ name: string;
198
+ tab?: string | undefined;
199
+ } | null;
200
+ openDialog: {
201
+ name: "imageExport" | "help" | "jsonExport";
202
+ } | {
203
+ name: "ttd";
204
+ tab: "mermaid" | "text-to-diagram";
205
+ } | {
206
+ name: "commandPalette";
207
+ } | null;
208
+ defaultSidebarDockedPreference: boolean;
209
+ lastPointerDownWith: import("./types").PointerType;
210
+ selectedElementIds: Readonly<{
211
+ [id: string]: true;
212
+ }>;
213
+ previousSelectedElementIds: {
214
+ [id: string]: true;
215
+ };
216
+ selectedElementsAreBeingDragged: boolean;
217
+ shouldCacheIgnoreZoom: boolean;
218
+ toast: {
219
+ message: string;
220
+ closable?: boolean | undefined;
221
+ duration?: number | undefined;
222
+ } | null;
223
+ zenModeEnabled: boolean;
224
+ theme: import("./types").Theme;
225
+ gridSize: number;
226
+ gridStep: number;
227
+ gridModeEnabled: boolean;
228
+ viewModeEnabled: boolean;
229
+ selectedGroupIds: {
230
+ [groupId: string]: boolean;
231
+ };
232
+ editingGroupId: string | null;
233
+ width: number;
234
+ height: number;
235
+ offsetTop: number;
236
+ offsetLeft: number;
237
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
238
+ collaborators: Map<import("../types").SocketId, Readonly<{
239
+ pointer?: import("../types").CollaboratorPointer | undefined;
240
+ button?: "up" | "down" | undefined;
241
+ selectedElementIds?: Readonly<{
242
+ [id: string]: true;
243
+ }> | undefined;
244
+ username?: string | null | undefined;
245
+ userState?: import("../types").UserIdleState | undefined;
246
+ color?: {
247
+ background: string;
248
+ stroke: string;
249
+ } | undefined;
250
+ avatarUrl?: string | undefined;
251
+ id?: string | undefined;
252
+ socketId?: import("../types").SocketId | undefined;
253
+ isCurrentUser?: boolean | undefined; /** whether you're dragging a point */
254
+ isInCall?: boolean | undefined;
255
+ isSpeaking?: boolean | undefined;
256
+ isMuted?: boolean | undefined;
257
+ }>>;
258
+ stats: {
259
+ open: boolean;
260
+ panels: number;
261
+ };
262
+ currentChartType: import("./types").ChartType;
263
+ pasteDialog: {
264
+ shown: false;
265
+ data: null;
266
+ } | {
267
+ shown: true;
268
+ data: import("../charts").Spreadsheet;
269
+ };
270
+ pendingImageElementId: string | null;
271
+ showHyperlinkPopup: false | "info" | "editor";
272
+ linkOpacity: number;
273
+ trayModeEnabled: boolean;
274
+ colorPalette?: {
275
+ canvasBackground: import("../colors").ColorPaletteCustom;
276
+ elementBackground: import("../colors").ColorPaletteCustom;
277
+ elementStroke: import("../colors").ColorPaletteCustom;
278
+ topPicks: {
279
+ canvasBackground: [string, string, string, string, string];
280
+ elementStroke: [string, string, string, string, string];
281
+ elementBackground: [string, string, string, string, string];
282
+ };
283
+ } | undefined;
284
+ allowWheelZoom?: boolean | undefined;
285
+ allowPinchZoom?: boolean | undefined;
286
+ pinnedScripts?: string[] | undefined;
287
+ customPens?: any[] | undefined;
288
+ currentStrokeOptions?: any;
289
+ resetCustomPen?: any;
290
+ gridColor: {
291
+ Bold: string;
292
+ Regular: string;
293
+ };
294
+ highlightSearchResult: boolean;
295
+ dynamicStyle: {
296
+ [x: string]: string;
297
+ };
298
+ frameColor: {
299
+ stroke: string;
300
+ fill: string;
301
+ nameColor: string;
302
+ };
303
+ invertBindingBehaviour: boolean;
304
+ selectedLinearElement: LinearElementEditor | null;
305
+ snapLines: readonly import("../snapping").SnapLine[];
306
+ originSnapOffset: {
307
+ x: number;
308
+ y: number;
309
+ } | null;
310
+ objectsSnapModeEnabled: boolean;
311
+ userToFollow: import("../types").UserToFollow | null;
312
+ followedBy: Set<import("../types").SocketId>;
313
+ };
314
+ };
315
+ static deletePoints(element: NonDeleted<ExcalidrawLinearElement>, pointIndices: readonly number[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): void;
316
+ static addPoints(element: NonDeleted<ExcalidrawLinearElement>, targetPoints: {
317
+ point: Point;
318
+ }[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): void;
319
+ static movePoints(element: NonDeleted<ExcalidrawLinearElement>, targetPoints: {
320
+ index: number;
321
+ point: Point;
322
+ isDragging?: boolean;
323
+ }[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap, otherUpdates?: {
324
+ startBinding?: PointBinding | null;
325
+ endBinding?: PointBinding | null;
326
+ }, options?: {
327
+ changedElements?: Map<string, OrderedExcalidrawElement>;
328
+ isDragging?: boolean;
329
+ }): void;
330
+ static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
331
+ static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, elementsMap: ElementsMap): {
332
+ pointerDownState: LinearElementEditor["pointerDownState"];
333
+ selectedPointsIndices: LinearElementEditor["selectedPointsIndices"];
334
+ } | undefined;
335
+ private static _updatePoints;
336
+ private static _getShiftLockedDelta;
337
+ static getBoundTextElementPosition: (element: ExcalidrawLinearElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
338
+ x: number;
339
+ y: number;
340
+ };
341
+ static getMinMaxXYWithBoundText: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, elementBounds: Bounds, boundTextElement: ExcalidrawTextElementWithContainer) => [number, number, number, number, number, number];
342
+ static getElementAbsoluteCoords: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, includeBoundText?: boolean) => [number, number, number, number, number, number];
343
+ }
344
+ export {};