@nous-excalidraw/math 0.1.0

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 (408) hide show
  1. package/README.md +19 -0
  2. package/dist/dev/index.js +934 -0
  3. package/dist/dev/index.js.map +7 -0
  4. package/dist/prod/index.js +1 -0
  5. package/dist/types/common/debug.d.ts +21 -0
  6. package/dist/types/common/src/appEventBus.d.ts +27 -0
  7. package/dist/types/common/src/binary-heap.d.ts +12 -0
  8. package/dist/types/common/src/bounds.d.ts +10 -0
  9. package/dist/types/common/src/colors.d.ts +82 -0
  10. package/dist/types/common/src/constants.d.ts +357 -0
  11. package/dist/types/common/src/editorInterface.d.ts +34 -0
  12. package/dist/types/common/src/emitter.d.ts +16 -0
  13. package/dist/types/common/src/font-metadata.d.ts +46 -0
  14. package/dist/types/common/src/index.d.ts +17 -0
  15. package/dist/types/common/src/keys.d.ts +189 -0
  16. package/dist/types/common/src/points.d.ts +9 -0
  17. package/dist/types/common/src/promise-pool.d.ts +6 -0
  18. package/dist/types/common/src/queue.d.ts +9 -0
  19. package/dist/types/common/src/random.d.ts +3 -0
  20. package/dist/types/common/src/url.d.ts +7 -0
  21. package/dist/types/common/src/utility-types.d.ts +37 -0
  22. package/dist/types/common/src/utils.d.ts +279 -0
  23. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  24. package/dist/types/element/src/Scene.d.ts +82 -0
  25. package/dist/types/element/src/align.d.ts +8 -0
  26. package/dist/types/element/src/arrowheads.d.ts +3 -0
  27. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  28. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  29. package/dist/types/element/src/binding.d.ts +129 -0
  30. package/dist/types/element/src/bounds.d.ts +83 -0
  31. package/dist/types/element/src/collision.d.ts +37 -0
  32. package/dist/types/element/src/comparisons.d.ts +8 -0
  33. package/dist/types/element/src/containerCache.d.ts +11 -0
  34. package/dist/types/element/src/cropElement.d.ts +19 -0
  35. package/dist/types/element/src/delta.d.ts +228 -0
  36. package/dist/types/element/src/distance.d.ts +3 -0
  37. package/dist/types/element/src/distribute.d.ts +8 -0
  38. package/dist/types/element/src/dragElements.d.ts +33 -0
  39. package/dist/types/element/src/duplicate.d.ts +63 -0
  40. package/dist/types/element/src/elbowArrow.d.ts +19 -0
  41. package/dist/types/element/src/elementLink.d.ts +13 -0
  42. package/dist/types/element/src/embeddable.d.ts +10 -0
  43. package/dist/types/element/src/flowchart.d.ts +26 -0
  44. package/dist/types/element/src/fractionalIndex.d.ts +57 -0
  45. package/dist/types/element/src/frame.d.ts +74 -0
  46. package/dist/types/element/src/groups.d.ts +34 -0
  47. package/dist/types/element/src/heading.d.ts +16 -0
  48. package/dist/types/element/src/image.d.ts +22 -0
  49. package/dist/types/element/src/index.d.ts +59 -0
  50. package/dist/types/element/src/linearElementEditor.d.ts +118 -0
  51. package/dist/types/element/src/mutateElement.d.ts +25 -0
  52. package/dist/types/element/src/newElement.d.ts +62 -0
  53. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  54. package/dist/types/element/src/renderElement.d.ts +25 -0
  55. package/dist/types/element/src/resizeElements.d.ts +32 -0
  56. package/dist/types/element/src/resizeTest.d.ts +16 -0
  57. package/dist/types/element/src/selection.d.ts +38 -0
  58. package/dist/types/element/src/shape.d.ts +43 -0
  59. package/dist/types/element/src/showSelectedShapeActions.d.ts +3 -0
  60. package/dist/types/element/src/sizeHelpers.d.ts +35 -0
  61. package/dist/types/element/src/sortElements.d.ts +2 -0
  62. package/dist/types/element/src/store.d.ts +237 -0
  63. package/dist/types/element/src/textElement.d.ts +40 -0
  64. package/dist/types/element/src/textMeasurements.d.ts +39 -0
  65. package/dist/types/element/src/textWrapping.d.ts +39 -0
  66. package/dist/types/element/src/transform.d.ts +81 -0
  67. package/dist/types/element/src/transformHandles.d.ts +36 -0
  68. package/dist/types/element/src/typeChecks.d.ts +54 -0
  69. package/dist/types/element/src/types.d.ts +294 -0
  70. package/dist/types/element/src/utils.d.ts +36 -0
  71. package/dist/types/element/src/zindex.d.ts +13 -0
  72. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +488 -0
  73. package/dist/types/excalidraw/actions/actionAlign.d.ts +109 -0
  74. package/dist/types/excalidraw/actions/actionBoundText.d.ts +362 -0
  75. package/dist/types/excalidraw/actions/actionCanvas.d.ts +2071 -0
  76. package/dist/types/excalidraw/actions/actionClipboard.d.ts +401 -0
  77. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +175 -0
  78. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +524 -0
  79. package/dist/types/excalidraw/actions/actionDeselect.d.ts +160 -0
  80. package/dist/types/excalidraw/actions/actionDistribute.d.ts +34 -0
  81. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +17 -0
  82. package/dist/types/excalidraw/actions/actionElementLink.d.ts +191 -0
  83. package/dist/types/excalidraw/actions/actionElementLock.d.ts +348 -0
  84. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +172 -0
  85. package/dist/types/excalidraw/actions/actionExport.d.ts +409 -0
  86. package/dist/types/excalidraw/actions/actionFinalize.d.ts +13 -0
  87. package/dist/types/excalidraw/actions/actionFlip.d.ts +34 -0
  88. package/dist/types/excalidraw/actions/actionFrame.d.ts +1154 -0
  89. package/dist/types/excalidraw/actions/actionGroup.d.ts +352 -0
  90. package/dist/types/excalidraw/actions/actionHistory.d.ts +6 -0
  91. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +662 -0
  92. package/dist/types/excalidraw/actions/actionLink.d.ts +176 -0
  93. package/dist/types/excalidraw/actions/actionMenu.d.ts +160 -0
  94. package/dist/types/excalidraw/actions/actionNavigate.d.ts +20 -0
  95. package/dist/types/excalidraw/actions/actionProperties.d.ts +404 -0
  96. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +171 -0
  97. package/dist/types/excalidraw/actions/actionStyles.d.ts +190 -0
  98. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +17 -0
  99. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +173 -0
  100. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +178 -0
  101. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +173 -0
  102. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +176 -0
  103. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +163 -0
  104. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
  105. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +175 -0
  106. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +176 -0
  107. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +176 -0
  108. package/dist/types/excalidraw/actions/actionZindex.d.ts +74 -0
  109. package/dist/types/excalidraw/actions/index.d.ts +31 -0
  110. package/dist/types/excalidraw/actions/manager.d.ts +21 -0
  111. package/dist/types/excalidraw/actions/register.d.ts +5 -0
  112. package/dist/types/excalidraw/actions/shortcuts.d.ts +4 -0
  113. package/dist/types/excalidraw/actions/types.d.ts +47 -0
  114. package/dist/types/excalidraw/analytics.d.ts +1 -0
  115. package/dist/types/excalidraw/animated-trail.d.ts +39 -0
  116. package/dist/types/excalidraw/animation-frame-handler.d.ts +16 -0
  117. package/dist/types/excalidraw/appState.d.ts +104 -0
  118. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  119. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  120. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  121. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  122. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  123. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  124. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  125. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  126. package/dist/types/excalidraw/clients.d.ts +14 -0
  127. package/dist/types/excalidraw/clipboard.d.ts +104 -0
  128. package/dist/types/excalidraw/components/Actions.d.ts +47 -0
  129. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +4 -0
  130. package/dist/types/excalidraw/components/App.d.ts +602 -0
  131. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  132. package/dist/types/excalidraw/components/Avatar.d.ts +11 -0
  133. package/dist/types/excalidraw/components/BraveMeasureTextError.d.ts +2 -0
  134. package/dist/types/excalidraw/components/Button.d.ts +17 -0
  135. package/dist/types/excalidraw/components/ButtonIcon.d.ts +16 -0
  136. package/dist/types/excalidraw/components/ButtonSeparator.d.ts +1 -0
  137. package/dist/types/excalidraw/components/Card.d.ts +5 -0
  138. package/dist/types/excalidraw/components/CheckboxItem.d.ts +8 -0
  139. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +8 -0
  140. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +22 -0
  141. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +8 -0
  142. package/dist/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +7 -0
  143. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +19 -0
  144. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +10 -0
  145. package/dist/types/excalidraw/components/ColorPicker/PickerHeading.d.ts +5 -0
  146. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +9 -0
  147. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +9 -0
  148. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +20 -0
  149. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +20 -0
  150. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +19 -0
  151. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +2 -0
  152. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +24 -0
  153. package/dist/types/excalidraw/components/ConfirmDialog.d.ts +10 -0
  154. package/dist/types/excalidraw/components/ContextMenu.d.ts +16 -0
  155. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
  156. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +7 -0
  157. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +27 -0
  158. package/dist/types/excalidraw/components/Dialog.d.ts +13 -0
  159. package/dist/types/excalidraw/components/DialogActionButton.d.ts +10 -0
  160. package/dist/types/excalidraw/components/ElementCanvasButtons.d.ts +7 -0
  161. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +12 -0
  162. package/dist/types/excalidraw/components/Ellipsify.d.ts +3 -0
  163. package/dist/types/excalidraw/components/ErrorDialog.d.ts +5 -0
  164. package/dist/types/excalidraw/components/EyeDropper.d.ts +27 -0
  165. package/dist/types/excalidraw/components/FilledButton.d.ts +19 -0
  166. package/dist/types/excalidraw/components/FixedSideContainer.d.ts +9 -0
  167. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +10 -0
  168. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +22 -0
  169. package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +26 -0
  170. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +8 -0
  171. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +13 -0
  172. package/dist/types/excalidraw/components/HandButton.d.ts +10 -0
  173. package/dist/types/excalidraw/components/HelpButton.d.ts +7 -0
  174. package/dist/types/excalidraw/components/HelpDialog.d.ts +4 -0
  175. package/dist/types/excalidraw/components/HintViewer.d.ts +11 -0
  176. package/dist/types/excalidraw/components/IconPicker.d.ts +20 -0
  177. package/dist/types/excalidraw/components/ImageExportDialog.d.ts +14 -0
  178. package/dist/types/excalidraw/components/InlineIcon.d.ts +5 -0
  179. package/dist/types/excalidraw/components/Island.d.ts +10 -0
  180. package/dist/types/excalidraw/components/JSONExportDialog.d.ts +15 -0
  181. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +10 -0
  182. package/dist/types/excalidraw/components/LayerUI.d.ts +32 -0
  183. package/dist/types/excalidraw/components/LibraryMenu.d.ts +10 -0
  184. package/dist/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +7 -0
  185. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +9 -0
  186. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +17 -0
  187. package/dist/types/excalidraw/components/LibraryMenuItems.d.ts +14 -0
  188. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +23 -0
  189. package/dist/types/excalidraw/components/LibraryUnit.d.ts +14 -0
  190. package/dist/types/excalidraw/components/LoadingMessage.d.ts +5 -0
  191. package/dist/types/excalidraw/components/LockButton.d.ts +10 -0
  192. package/dist/types/excalidraw/components/MagicButton.d.ts +10 -0
  193. package/dist/types/excalidraw/components/MobileMenu.d.ts +23 -0
  194. package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
  195. package/dist/types/excalidraw/components/Modal.d.ts +11 -0
  196. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
  197. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
  198. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
  199. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +7 -0
  200. package/dist/types/excalidraw/components/PenModeButton.d.ts +12 -0
  201. package/dist/types/excalidraw/components/Popover.d.ts +16 -0
  202. package/dist/types/excalidraw/components/ProjectName.d.ts +10 -0
  203. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +16 -0
  204. package/dist/types/excalidraw/components/PublishLibrary.d.ts +16 -0
  205. package/dist/types/excalidraw/components/QuickSearch.d.ts +9 -0
  206. package/dist/types/excalidraw/components/RadioGroup.d.ts +13 -0
  207. package/dist/types/excalidraw/components/RadioSelection.d.ts +20 -0
  208. package/dist/types/excalidraw/components/Range.d.ts +14 -0
  209. package/dist/types/excalidraw/components/SVGLayer.d.ts +7 -0
  210. package/dist/types/excalidraw/components/ScrollableList.d.ts +8 -0
  211. package/dist/types/excalidraw/components/SearchMenu.d.ts +5 -0
  212. package/dist/types/excalidraw/components/Section.d.ts +6 -0
  213. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +70 -0
  214. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +7 -0
  215. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +8 -0
  216. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +9 -0
  217. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +6 -0
  218. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +6 -0
  219. package/dist/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +6 -0
  220. package/dist/types/excalidraw/components/Sidebar/common.d.ts +34 -0
  221. package/dist/types/excalidraw/components/Spinner.d.ts +8 -0
  222. package/dist/types/excalidraw/components/Stack.d.ts +15 -0
  223. package/dist/types/excalidraw/components/Stats/Angle.d.ts +11 -0
  224. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +10 -0
  225. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +10 -0
  226. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +11 -0
  227. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +44 -0
  228. package/dist/types/excalidraw/components/Stats/FontSize.d.ts +11 -0
  229. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +11 -0
  230. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +14 -0
  231. package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +12 -0
  232. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +14 -0
  233. package/dist/types/excalidraw/components/Stats/Position.d.ts +12 -0
  234. package/dist/types/excalidraw/components/Stats/index.d.ts +35 -0
  235. package/dist/types/excalidraw/components/Stats/utils.d.ts +19 -0
  236. package/dist/types/excalidraw/components/Switch.d.ts +9 -0
  237. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  238. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  239. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  240. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  241. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  242. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  243. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  244. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +7 -0
  245. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  246. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +13 -0
  247. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +9 -0
  248. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +11 -0
  249. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +21 -0
  250. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +4 -0
  251. package/dist/types/excalidraw/components/TTDDialog/TTDDialogSubmitShortcut.d.ts +1 -0
  252. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +7 -0
  253. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +8 -0
  254. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +6 -0
  255. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +11 -0
  256. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  257. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  258. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  259. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +33 -0
  260. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  261. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  262. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  263. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  264. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  265. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  266. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  267. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  268. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  269. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  270. package/dist/types/excalidraw/components/TextField.d.ts +22 -0
  271. package/dist/types/excalidraw/components/Toast.d.ts +13 -0
  272. package/dist/types/excalidraw/components/ToolButton.d.ts +49 -0
  273. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  274. package/dist/types/excalidraw/components/Tooltip.d.ts +18 -0
  275. package/dist/types/excalidraw/components/Trans.d.ts +9 -0
  276. package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
  277. package/dist/types/excalidraw/components/UserList.d.ts +18 -0
  278. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +34 -0
  279. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +14 -0
  280. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +19 -0
  281. package/dist/types/excalidraw/components/canvases/index.d.ts +3 -0
  282. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +98 -0
  283. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +17 -0
  284. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
  285. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +37 -0
  286. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  287. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +9 -0
  288. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +18 -0
  289. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +7 -0
  290. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +16 -0
  291. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
  292. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  293. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  294. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  295. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +10 -0
  296. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +6 -0
  297. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +5 -0
  298. package/dist/types/excalidraw/components/footer/Footer.d.ts +12 -0
  299. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +4 -0
  300. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +19 -0
  301. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +10 -0
  302. package/dist/types/excalidraw/components/icons.d.ts +253 -0
  303. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +82 -0
  304. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +87 -0
  305. package/dist/types/excalidraw/components/shapes.d.ts +263 -0
  306. package/dist/types/excalidraw/context/tunnels.d.ts +21 -0
  307. package/dist/types/excalidraw/context/ui-appState.d.ts +4 -0
  308. package/dist/types/excalidraw/cursor.d.ts +5 -0
  309. package/dist/types/excalidraw/data/EditorLocalStorage.d.ts +8 -0
  310. package/dist/types/excalidraw/data/blob.d.ts +370 -0
  311. package/dist/types/excalidraw/data/encode.d.ts +55 -0
  312. package/dist/types/excalidraw/data/encryption.d.ts +9 -0
  313. package/dist/types/excalidraw/data/filesystem.d.ts +19 -0
  314. package/dist/types/excalidraw/data/image.d.ts +9 -0
  315. package/dist/types/excalidraw/data/index.d.ts +21 -0
  316. package/dist/types/excalidraw/data/json.d.ts +183 -0
  317. package/dist/types/excalidraw/data/library.d.ts +127 -0
  318. package/dist/types/excalidraw/data/resave.d.ts +10 -0
  319. package/dist/types/excalidraw/data/restore.d.ts +41 -0
  320. package/dist/types/excalidraw/data/types.d.ts +48 -0
  321. package/dist/types/excalidraw/deburr.d.ts +1 -0
  322. package/dist/types/excalidraw/editor-jotai.d.ts +56 -0
  323. package/dist/types/excalidraw/eraser/index.d.ts +12 -0
  324. package/dist/types/excalidraw/errors.d.ts +43 -0
  325. package/dist/types/excalidraw/fonts/Cascadia/index.d.ts +2 -0
  326. package/dist/types/excalidraw/fonts/ComicShanns/index.d.ts +2 -0
  327. package/dist/types/excalidraw/fonts/Emoji/index.d.ts +2 -0
  328. package/dist/types/excalidraw/fonts/ExcalidrawFontFace.d.ts +25 -0
  329. package/dist/types/excalidraw/fonts/Excalifont/index.d.ts +2 -0
  330. package/dist/types/excalidraw/fonts/Fonts.d.ts +79 -0
  331. package/dist/types/excalidraw/fonts/Helvetica/index.d.ts +2 -0
  332. package/dist/types/excalidraw/fonts/Liberation/index.d.ts +2 -0
  333. package/dist/types/excalidraw/fonts/Lilita/index.d.ts +2 -0
  334. package/dist/types/excalidraw/fonts/Nunito/index.d.ts +2 -0
  335. package/dist/types/excalidraw/fonts/Virgil/index.d.ts +2 -0
  336. package/dist/types/excalidraw/fonts/Xiaolai/index.d.ts +8 -0
  337. package/dist/types/excalidraw/fonts/index.d.ts +1 -0
  338. package/dist/types/excalidraw/gesture.d.ts +6 -0
  339. package/dist/types/excalidraw/history.d.ts +48 -0
  340. package/dist/types/excalidraw/hooks/useCallbackRefState.d.ts +1 -0
  341. package/dist/types/excalidraw/hooks/useCopiedIndicator.d.ts +5 -0
  342. package/dist/types/excalidraw/hooks/useCreatePortalContainer.d.ts +4 -0
  343. package/dist/types/excalidraw/hooks/useEmitter.d.ts +2 -0
  344. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +11 -0
  345. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +21 -0
  346. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -0
  347. package/dist/types/excalidraw/hooks/useStable.d.ts +1 -0
  348. package/dist/types/excalidraw/hooks/useStableCallback.d.ts +4 -0
  349. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  350. package/dist/types/excalidraw/hooks/useTransition.d.ts +2 -0
  351. package/dist/types/excalidraw/i18n.d.ts +24 -0
  352. package/dist/types/excalidraw/laser-trails.d.ts +20 -0
  353. package/dist/types/excalidraw/lasso/index.d.ts +16 -0
  354. package/dist/types/excalidraw/lasso/utils.d.ts +13 -0
  355. package/dist/types/excalidraw/mermaid.d.ts +2 -0
  356. package/dist/types/excalidraw/reactUtils.d.ts +14 -0
  357. package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
  358. package/dist/types/excalidraw/renderer/helpers.d.ts +16 -0
  359. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +14 -0
  360. package/dist/types/excalidraw/renderer/renderNewElementScene.d.ts +7 -0
  361. package/dist/types/excalidraw/renderer/renderSnaps.d.ts +2 -0
  362. package/dist/types/excalidraw/renderer/roundRect.d.ts +11 -0
  363. package/dist/types/excalidraw/renderer/staticScene.d.ts +14 -0
  364. package/dist/types/excalidraw/renderer/staticSvgScene.d.ts +5 -0
  365. package/dist/types/excalidraw/scene/Renderer.d.ts +30 -0
  366. package/dist/types/excalidraw/scene/export.d.ts +36 -0
  367. package/dist/types/excalidraw/scene/index.d.ts +4 -0
  368. package/dist/types/excalidraw/scene/normalize.d.ts +4 -0
  369. package/dist/types/excalidraw/scene/scroll.d.ts +18 -0
  370. package/dist/types/excalidraw/scene/scrollbars.d.ts +11 -0
  371. package/dist/types/excalidraw/scene/types.d.ts +137 -0
  372. package/dist/types/excalidraw/scene/zoom.d.ts +12 -0
  373. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  374. package/dist/types/excalidraw/snapping.d.ts +111 -0
  375. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +45 -0
  376. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +13 -0
  377. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +2 -0
  378. package/dist/types/excalidraw/subset/subset-main.d.ts +12 -0
  379. package/dist/types/excalidraw/subset/subset-shared.chunk.d.ts +32 -0
  380. package/dist/types/excalidraw/subset/subset-worker.chunk.d.ts +15 -0
  381. package/dist/types/excalidraw/subset/woff2/woff2-bindings.d.ts +31 -0
  382. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +14 -0
  383. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +2 -0
  384. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  385. package/dist/types/excalidraw/types.d.ts +798 -0
  386. package/dist/types/excalidraw/workers.d.ts +36 -0
  387. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +28 -0
  388. package/dist/types/math/src/angle.d.ts +19 -0
  389. package/dist/types/math/src/constants.d.ts +3 -0
  390. package/dist/types/math/src/curve.d.ts +77 -0
  391. package/dist/types/math/src/ellipse.d.ts +44 -0
  392. package/dist/types/math/src/index.d.ts +13 -0
  393. package/dist/types/math/src/line.d.ts +17 -0
  394. package/dist/types/math/src/point.d.ts +127 -0
  395. package/dist/types/math/src/polygon.d.ts +6 -0
  396. package/dist/types/math/src/range.d.ts +42 -0
  397. package/dist/types/math/src/rectangle.d.ts +5 -0
  398. package/dist/types/math/src/segment.d.ts +40 -0
  399. package/dist/types/math/src/triangle.d.ts +11 -0
  400. package/dist/types/math/src/types.d.ts +130 -0
  401. package/dist/types/math/src/utils.d.ts +7 -0
  402. package/dist/types/math/src/vector.d.ts +94 -0
  403. package/dist/types/utils/src/bbox.d.ts +9 -0
  404. package/dist/types/utils/src/export.d.ts +35 -0
  405. package/dist/types/utils/src/index.d.ts +4 -0
  406. package/dist/types/utils/src/shape.d.ts +58 -0
  407. package/dist/types/utils/src/withinBounds.d.ts +19 -0
  408. package/package.json +66 -0
@@ -0,0 +1,934 @@
1
+ // src/utils.ts
2
+ var PRECISION = 1e-4;
3
+ var clamp = (value, min, max) => {
4
+ return Math.min(Math.max(value, min), max);
5
+ };
6
+ var round = (value, precision, func = "round") => {
7
+ const multiplier = Math.pow(10, precision);
8
+ return Math[func]((value + Number.EPSILON) * multiplier) / multiplier;
9
+ };
10
+ var roundToStep = (value, step, func = "round") => {
11
+ const factor = 1 / step;
12
+ return Math[func](value * factor) / factor;
13
+ };
14
+ var average = (a, b) => (a + b) / 2;
15
+ var isFiniteNumber = (value) => {
16
+ return typeof value === "number" && Number.isFinite(value);
17
+ };
18
+ var isCloseTo = (a, b, precision = PRECISION) => Math.abs(a - b) < precision;
19
+
20
+ // src/angle.ts
21
+ var normalizeRadians = (angle) => angle < 0 ? angle % (2 * Math.PI) + 2 * Math.PI : angle % (2 * Math.PI);
22
+ var cartesian2Polar = ([
23
+ x,
24
+ y
25
+ ]) => [
26
+ Math.hypot(x, y),
27
+ normalizeRadians(Math.atan2(y, x))
28
+ ];
29
+ function degreesToRadians(degrees) {
30
+ return degrees * Math.PI / 180;
31
+ }
32
+ function radiansToDegrees(degrees) {
33
+ return degrees * 180 / Math.PI;
34
+ }
35
+ function isRightAngleRads(rads) {
36
+ return Math.abs(Math.sin(2 * rads)) < PRECISION;
37
+ }
38
+ function radiansBetweenAngles(a, min, max) {
39
+ a = normalizeRadians(a);
40
+ min = normalizeRadians(min);
41
+ max = normalizeRadians(max);
42
+ if (min < max) {
43
+ return a >= min && a <= max;
44
+ }
45
+ return a >= min || a <= max;
46
+ }
47
+ function radiansDifference(a, b) {
48
+ a = normalizeRadians(a);
49
+ b = normalizeRadians(b);
50
+ let diff = a - b;
51
+ if (diff < -Math.PI) {
52
+ diff = diff + 2 * Math.PI;
53
+ } else if (diff > Math.PI) {
54
+ diff = diff - 2 * Math.PI;
55
+ }
56
+ return Math.abs(diff);
57
+ }
58
+
59
+ // src/vector.ts
60
+ function vector(x, y, originX = 0, originY = 0) {
61
+ return [x - originX, y - originY];
62
+ }
63
+ function vectorFromPoint(p, origin = [0, 0], threshold, defaultValue = [0, 1]) {
64
+ const vec = vector(p[0] - origin[0], p[1] - origin[1]);
65
+ if (threshold && vectorMagnitudeSq(vec) < threshold * threshold) {
66
+ return defaultValue;
67
+ }
68
+ return vec;
69
+ }
70
+ function vectorCross(a, b) {
71
+ return a[0] * b[1] - b[0] * a[1];
72
+ }
73
+ function vectorDot(a, b) {
74
+ return a[0] * b[0] + a[1] * b[1];
75
+ }
76
+ function isVector(v) {
77
+ return Array.isArray(v) && v.length === 2 && typeof v[0] === "number" && !isNaN(v[0]) && typeof v[1] === "number" && !isNaN(v[1]);
78
+ }
79
+ function vectorAdd(a, b) {
80
+ return [a[0] + b[0], a[1] + b[1]];
81
+ }
82
+ function vectorSubtract(start, end) {
83
+ return [start[0] - end[0], start[1] - end[1]];
84
+ }
85
+ function vectorScale(v, scalar) {
86
+ return vector(v[0] * scalar, v[1] * scalar);
87
+ }
88
+ function vectorMagnitudeSq(v) {
89
+ return v[0] * v[0] + v[1] * v[1];
90
+ }
91
+ function vectorMagnitude(v) {
92
+ return Math.sqrt(vectorMagnitudeSq(v));
93
+ }
94
+ var vectorNormalize = (v) => {
95
+ const m = vectorMagnitude(v);
96
+ if (m === 0) {
97
+ return vector(0, 0);
98
+ }
99
+ return vector(v[0] / m, v[1] / m);
100
+ };
101
+ var vectorNormal = (v) => vector(v[1], -v[0]);
102
+
103
+ // src/point.ts
104
+ function pointFrom(xOrCoords, y) {
105
+ return typeof xOrCoords === "object" ? [xOrCoords.x, xOrCoords.y] : [xOrCoords, y];
106
+ }
107
+ function pointFromArray(numberArray) {
108
+ return numberArray.length === 2 ? pointFrom(numberArray[0], numberArray[1]) : void 0;
109
+ }
110
+ function pointFromPair(pair) {
111
+ return pair;
112
+ }
113
+ function pointFromVector(v, offset = pointFrom(0, 0)) {
114
+ return pointFrom(offset[0] + v[0], offset[1] + v[1]);
115
+ }
116
+ function isPoint(p) {
117
+ return Array.isArray(p) && p.length === 2 && typeof p[0] === "number" && !isNaN(p[0]) && typeof p[1] === "number" && !isNaN(p[1]);
118
+ }
119
+ function pointsEqual(a, b, tolerance = PRECISION) {
120
+ const abs = Math.abs;
121
+ return abs(a[0] - b[0]) < tolerance && abs(a[1] - b[1]) < tolerance;
122
+ }
123
+ function pointRotateRads(point, center, angle) {
124
+ if (!angle) {
125
+ return point;
126
+ }
127
+ const [x, y] = point;
128
+ const [cx, cy] = center;
129
+ return pointFrom(
130
+ (x - cx) * Math.cos(angle) - (y - cy) * Math.sin(angle) + cx,
131
+ (x - cx) * Math.sin(angle) + (y - cy) * Math.cos(angle) + cy
132
+ );
133
+ }
134
+ function pointRotateDegs(point, center, angle) {
135
+ return pointRotateRads(point, center, degreesToRadians(angle));
136
+ }
137
+ function pointTranslate(p, v = [0, 0]) {
138
+ return pointFrom(p[0] + v[0], p[1] + v[1]);
139
+ }
140
+ function pointCenter(a, b) {
141
+ return pointFrom((a[0] + b[0]) / 2, (a[1] + b[1]) / 2);
142
+ }
143
+ function pointDistance(a, b) {
144
+ return Math.hypot(b[0] - a[0], b[1] - a[1]);
145
+ }
146
+ function pointDistanceSq(a, b) {
147
+ const xDiff = b[0] - a[0];
148
+ const yDiff = b[1] - a[1];
149
+ return xDiff * xDiff + yDiff * yDiff;
150
+ }
151
+ var pointScaleFromOrigin = (p, mid, multiplier) => pointTranslate(mid, vectorScale(vectorFromPoint(p, mid), multiplier));
152
+ var isPointWithinBounds = (p, q, r) => {
153
+ return q[0] <= Math.max(p[0], r[0]) && q[0] >= Math.min(p[0], r[0]) && q[1] <= Math.max(p[1], r[1]) && q[1] >= Math.min(p[1], r[1]);
154
+ };
155
+
156
+ // src/constants.ts
157
+ var LegendreGaussN24TValues = [
158
+ -0.06405689286260563,
159
+ 0.06405689286260563,
160
+ -0.1911188674736163,
161
+ 0.1911188674736163,
162
+ -0.3150426796961634,
163
+ 0.3150426796961634,
164
+ -0.4337935076260451,
165
+ 0.4337935076260451,
166
+ -0.5454214713888396,
167
+ 0.5454214713888396,
168
+ -0.6480936519369755,
169
+ 0.6480936519369755,
170
+ -0.7401241915785544,
171
+ 0.7401241915785544,
172
+ -0.820001985973903,
173
+ 0.820001985973903,
174
+ -0.8864155270044011,
175
+ 0.8864155270044011,
176
+ -0.9382745520027328,
177
+ 0.9382745520027328,
178
+ -0.9747285559713095,
179
+ 0.9747285559713095,
180
+ -0.9951872199970213,
181
+ 0.9951872199970213
182
+ ];
183
+ var LegendreGaussN24CValues = [
184
+ 0.12793819534675216,
185
+ 0.12793819534675216,
186
+ 0.1258374563468283,
187
+ 0.1258374563468283,
188
+ 0.12167047292780339,
189
+ 0.12167047292780339,
190
+ 0.1155056680537256,
191
+ 0.1155056680537256,
192
+ 0.10744427011596563,
193
+ 0.10744427011596563,
194
+ 0.09761865210411388,
195
+ 0.09761865210411388,
196
+ 0.08619016153195327,
197
+ 0.08619016153195327,
198
+ 0.0733464814110803,
199
+ 0.0733464814110803,
200
+ 0.05929858491543678,
201
+ 0.05929858491543678,
202
+ 0.04427743881741981,
203
+ 0.04427743881741981,
204
+ 0.028531388628933663,
205
+ 0.028531388628933663,
206
+ 0.0123412297999872,
207
+ 0.0123412297999872
208
+ ];
209
+
210
+ // src/curve.ts
211
+ function curve(a, b, c, d) {
212
+ return [a, b, c, d];
213
+ }
214
+ function solveWithAnalyticalJacobian(curve2, lineSegment2, t0, s0, tolerance = 1e-3, iterLimit = 10) {
215
+ let error = Infinity;
216
+ let iter = 0;
217
+ while (error >= tolerance) {
218
+ if (iter >= iterLimit) {
219
+ return null;
220
+ }
221
+ const bt = 1 - t0;
222
+ const bt2 = bt * bt;
223
+ const bt3 = bt2 * bt;
224
+ const t0_2 = t0 * t0;
225
+ const t0_3 = t0_2 * t0;
226
+ const bezierX = bt3 * curve2[0][0] + 3 * bt2 * t0 * curve2[1][0] + 3 * bt * t0_2 * curve2[2][0] + t0_3 * curve2[3][0];
227
+ const bezierY = bt3 * curve2[0][1] + 3 * bt2 * t0 * curve2[1][1] + 3 * bt * t0_2 * curve2[2][1] + t0_3 * curve2[3][1];
228
+ const lineX = lineSegment2[0][0] + s0 * (lineSegment2[1][0] - lineSegment2[0][0]);
229
+ const lineY = lineSegment2[0][1] + s0 * (lineSegment2[1][1] - lineSegment2[0][1]);
230
+ const fx = bezierX - lineX;
231
+ const fy = bezierY - lineY;
232
+ error = Math.abs(fx) + Math.abs(fy);
233
+ if (error < tolerance) {
234
+ break;
235
+ }
236
+ const dfx_dt = -3 * bt2 * curve2[0][0] + 3 * bt2 * curve2[1][0] - 6 * bt * t0 * curve2[1][0] - 3 * t0_2 * curve2[2][0] + 6 * bt * t0 * curve2[2][0] + 3 * t0_2 * curve2[3][0];
237
+ const dfy_dt = -3 * bt2 * curve2[0][1] + 3 * bt2 * curve2[1][1] - 6 * bt * t0 * curve2[1][1] - 3 * t0_2 * curve2[2][1] + 6 * bt * t0 * curve2[2][1] + 3 * t0_2 * curve2[3][1];
238
+ const dfx_ds = -(lineSegment2[1][0] - lineSegment2[0][0]);
239
+ const dfy_ds = -(lineSegment2[1][1] - lineSegment2[0][1]);
240
+ const det = dfx_dt * dfy_ds - dfx_ds * dfy_dt;
241
+ if (Math.abs(det) < 1e-12) {
242
+ return null;
243
+ }
244
+ const invDet = 1 / det;
245
+ const dt = invDet * (dfy_ds * -fx - dfx_ds * -fy);
246
+ const ds = invDet * (-dfy_dt * -fx + dfx_dt * -fy);
247
+ t0 += dt;
248
+ s0 += ds;
249
+ iter += 1;
250
+ }
251
+ return [t0, s0];
252
+ }
253
+ var bezierEquation = (c, t) => pointFrom(
254
+ (1 - t) ** 3 * c[0][0] + 3 * (1 - t) ** 2 * t * c[1][0] + 3 * (1 - t) * t ** 2 * c[2][0] + t ** 3 * c[3][0],
255
+ (1 - t) ** 3 * c[0][1] + 3 * (1 - t) ** 2 * t * c[1][1] + 3 * (1 - t) * t ** 2 * c[2][1] + t ** 3 * c[3][1]
256
+ );
257
+ var initial_guesses = [
258
+ [0.5, 0],
259
+ [0.2, 0],
260
+ [0.8, 0]
261
+ ];
262
+ var calculate = ([t0, s0], l, c, tolerance = 0.01, iterLimit = 4) => {
263
+ const solution = solveWithAnalyticalJacobian(
264
+ c,
265
+ l,
266
+ t0,
267
+ s0,
268
+ tolerance,
269
+ iterLimit
270
+ );
271
+ if (!solution) {
272
+ return null;
273
+ }
274
+ const [t, s] = solution;
275
+ if (t < 0 || t > 1 || s < 0 || s > 1) {
276
+ return null;
277
+ }
278
+ return bezierEquation(c, t);
279
+ };
280
+ function curveIntersectLineSegment(c, l, opts) {
281
+ let solution = calculate(
282
+ initial_guesses[0],
283
+ l,
284
+ c,
285
+ opts?.tolerance,
286
+ opts?.iterLimit
287
+ );
288
+ if (solution) {
289
+ return [solution];
290
+ }
291
+ solution = calculate(
292
+ initial_guesses[1],
293
+ l,
294
+ c,
295
+ opts?.tolerance,
296
+ opts?.iterLimit
297
+ );
298
+ if (solution) {
299
+ return [solution];
300
+ }
301
+ solution = calculate(
302
+ initial_guesses[2],
303
+ l,
304
+ c,
305
+ opts?.tolerance,
306
+ opts?.iterLimit
307
+ );
308
+ if (solution) {
309
+ return [solution];
310
+ }
311
+ return [];
312
+ }
313
+ function curveClosestPoint(c, p, tolerance = 1e-3) {
314
+ const localMinimum = (min, max, f, e = tolerance) => {
315
+ let m = min;
316
+ let n = max;
317
+ let k;
318
+ while (n - m > e) {
319
+ k = (n + m) / 2;
320
+ if (f(k - e) < f(k + e)) {
321
+ n = k;
322
+ } else {
323
+ m = k;
324
+ }
325
+ }
326
+ return k;
327
+ };
328
+ const maxSteps = 30;
329
+ let closestStep = 0;
330
+ for (let min = Infinity, step = 0; step < maxSteps; step++) {
331
+ const d = pointDistance(p, bezierEquation(c, step / maxSteps));
332
+ if (d < min) {
333
+ min = d;
334
+ closestStep = step;
335
+ }
336
+ }
337
+ const t0 = Math.max((closestStep - 1) / maxSteps, 0);
338
+ const t1 = Math.min((closestStep + 1) / maxSteps, 1);
339
+ const solution = localMinimum(
340
+ t0,
341
+ t1,
342
+ (t) => pointDistance(p, bezierEquation(c, t))
343
+ );
344
+ if (!solution) {
345
+ return null;
346
+ }
347
+ return bezierEquation(c, solution);
348
+ }
349
+ function curvePointDistance(c, p) {
350
+ const closest = curveClosestPoint(c, p);
351
+ if (!closest) {
352
+ return 0;
353
+ }
354
+ return pointDistance(p, closest);
355
+ }
356
+ function isCurve(v) {
357
+ return Array.isArray(v) && v.length === 4 && isPoint(v[0]) && isPoint(v[1]) && isPoint(v[2]) && isPoint(v[3]);
358
+ }
359
+ function curveTangent([p0, p1, p2, p3], t) {
360
+ return vector(
361
+ -3 * (1 - t) * (1 - t) * p0[0] + 3 * (1 - t) * (1 - t) * p1[0] - 6 * t * (1 - t) * p1[0] - 3 * t * t * p2[0] + 6 * t * (1 - t) * p2[0] + 3 * t * t * p3[0],
362
+ -3 * (1 - t) * (1 - t) * p0[1] + 3 * (1 - t) * (1 - t) * p1[1] - 6 * t * (1 - t) * p1[1] - 3 * t * t * p2[1] + 6 * t * (1 - t) * p2[1] + 3 * t * t * p3[1]
363
+ );
364
+ }
365
+ function curveCatmullRomQuadraticApproxPoints(points, tension = 0.5) {
366
+ if (points.length < 2) {
367
+ return;
368
+ }
369
+ const pointSets = [];
370
+ for (let i = 0; i < points.length - 1; i++) {
371
+ const p0 = points[i - 1 < 0 ? 0 : i - 1];
372
+ const p1 = points[i];
373
+ const p2 = points[i + 1 >= points.length ? points.length - 1 : i + 1];
374
+ const cpX = p1[0] + (p2[0] - p0[0]) * tension / 2;
375
+ const cpY = p1[1] + (p2[1] - p0[1]) * tension / 2;
376
+ pointSets.push([
377
+ pointFrom(cpX, cpY),
378
+ pointFrom(p2[0], p2[1])
379
+ ]);
380
+ }
381
+ return pointSets;
382
+ }
383
+ function curveCatmullRomCubicApproxPoints(points, tension = 0.5) {
384
+ if (points.length < 2) {
385
+ return;
386
+ }
387
+ const pointSets = [];
388
+ for (let i = 0; i < points.length - 1; i++) {
389
+ const p0 = points[i - 1 < 0 ? 0 : i - 1];
390
+ const p1 = points[i];
391
+ const p2 = points[i + 1 >= points.length ? points.length - 1 : i + 1];
392
+ const p3 = points[i + 2 >= points.length ? points.length - 1 : i + 2];
393
+ const tangent1 = [(p2[0] - p0[0]) * tension, (p2[1] - p0[1]) * tension];
394
+ const tangent2 = [(p3[0] - p1[0]) * tension, (p3[1] - p1[1]) * tension];
395
+ const cp1x = p1[0] + tangent1[0] / 3;
396
+ const cp1y = p1[1] + tangent1[1] / 3;
397
+ const cp2x = p2[0] - tangent2[0] / 3;
398
+ const cp2y = p2[1] - tangent2[1] / 3;
399
+ pointSets.push(
400
+ curve(
401
+ pointFrom(p1[0], p1[1]),
402
+ pointFrom(cp1x, cp1y),
403
+ pointFrom(cp2x, cp2y),
404
+ pointFrom(p2[0], p2[1])
405
+ )
406
+ );
407
+ }
408
+ return pointSets;
409
+ }
410
+ function curveOffsetPoints([p0, p1, p2, p3], offset, steps = 50) {
411
+ const offsetPoints = [];
412
+ for (let i = 0; i <= steps; i++) {
413
+ const t = i / steps;
414
+ const c = curve(p0, p1, p2, p3);
415
+ const point = bezierEquation(c, t);
416
+ const tangent = vectorNormalize(curveTangent(c, t));
417
+ const normal = vectorNormal(tangent);
418
+ offsetPoints.push(pointFromVector(vectorScale(normal, offset), point));
419
+ }
420
+ return offsetPoints;
421
+ }
422
+ function offsetPointsForQuadraticBezier(p0, p1, p2, offsetDist, steps = 50) {
423
+ const offsetPoints = [];
424
+ for (let i = 0; i <= steps; i++) {
425
+ const t = i / steps;
426
+ const t1 = 1 - t;
427
+ const point = pointFrom(
428
+ t1 * t1 * p0[0] + 2 * t1 * t * p1[0] + t * t * p2[0],
429
+ t1 * t1 * p0[1] + 2 * t1 * t * p1[1] + t * t * p2[1]
430
+ );
431
+ const tangentX = 2 * (1 - t) * (p1[0] - p0[0]) + 2 * t * (p2[0] - p1[0]);
432
+ const tangentY = 2 * (1 - t) * (p1[1] - p0[1]) + 2 * t * (p2[1] - p1[1]);
433
+ const tangent = vectorNormalize(vector(tangentX, tangentY));
434
+ const normal = vectorNormal(tangent);
435
+ offsetPoints.push(pointFromVector(vectorScale(normal, offsetDist), point));
436
+ }
437
+ return offsetPoints;
438
+ }
439
+ function curveLength(c) {
440
+ const z2 = 0.5;
441
+ let sum = 0;
442
+ for (let i = 0; i < 24; i++) {
443
+ const t = z2 * LegendreGaussN24TValues[i] + z2;
444
+ const derivativeVector = curveTangent(c, t);
445
+ const magnitude = Math.sqrt(
446
+ derivativeVector[0] * derivativeVector[0] + derivativeVector[1] * derivativeVector[1]
447
+ );
448
+ sum += LegendreGaussN24CValues[i] * magnitude;
449
+ }
450
+ return z2 * sum;
451
+ }
452
+ function curveLengthAtParameter(c, t) {
453
+ if (t <= 0) {
454
+ return 0;
455
+ }
456
+ if (t >= 1) {
457
+ return curveLength(c);
458
+ }
459
+ const z1 = t / 2;
460
+ const z2 = t / 2;
461
+ let sum = 0;
462
+ for (let i = 0; i < 24; i++) {
463
+ const parameter = z1 * LegendreGaussN24TValues[i] + z2;
464
+ const derivativeVector = curveTangent(c, parameter);
465
+ const magnitude = Math.sqrt(
466
+ derivativeVector[0] * derivativeVector[0] + derivativeVector[1] * derivativeVector[1]
467
+ );
468
+ sum += LegendreGaussN24CValues[i] * magnitude;
469
+ }
470
+ return z1 * sum;
471
+ }
472
+ function curvePointAtLength(c, percent) {
473
+ if (percent <= 0) {
474
+ return bezierEquation(c, 0);
475
+ }
476
+ if (percent >= 1) {
477
+ return bezierEquation(c, 1);
478
+ }
479
+ const totalLength = curveLength(c);
480
+ const targetLength = totalLength * percent;
481
+ let tMin = 0;
482
+ let tMax = 1;
483
+ let t = percent;
484
+ let currentLength = 0;
485
+ const tolerance = totalLength * 1e-4;
486
+ const maxIterations = 20;
487
+ for (let iteration = 0; iteration < maxIterations; iteration++) {
488
+ currentLength = curveLengthAtParameter(c, t);
489
+ const error = Math.abs(currentLength - targetLength);
490
+ if (error < tolerance) {
491
+ break;
492
+ }
493
+ if (currentLength < targetLength) {
494
+ tMin = t;
495
+ } else {
496
+ tMax = t;
497
+ }
498
+ t = (tMin + tMax) / 2;
499
+ }
500
+ return bezierEquation(c, t);
501
+ }
502
+
503
+ // src/ellipse.ts
504
+ function ellipse(center, halfWidth, halfHeight) {
505
+ return {
506
+ center,
507
+ halfWidth,
508
+ halfHeight
509
+ };
510
+ }
511
+ var ellipseIncludesPoint = (p, ellipse2) => {
512
+ const { center, halfWidth, halfHeight } = ellipse2;
513
+ const normalizedX = (p[0] - center[0]) / halfWidth;
514
+ const normalizedY = (p[1] - center[1]) / halfHeight;
515
+ return normalizedX * normalizedX + normalizedY * normalizedY <= 1;
516
+ };
517
+ var ellipseTouchesPoint = (point, ellipse2, threshold = PRECISION) => {
518
+ return ellipseDistanceFromPoint(point, ellipse2) <= threshold;
519
+ };
520
+ var ellipseDistanceFromPoint = (p, ellipse2) => {
521
+ const { halfWidth, halfHeight, center } = ellipse2;
522
+ const a = halfWidth;
523
+ const b = halfHeight;
524
+ const translatedPoint = vectorAdd(
525
+ vectorFromPoint(p),
526
+ vectorScale(vectorFromPoint(center), -1)
527
+ );
528
+ const px = Math.abs(translatedPoint[0]);
529
+ const py = Math.abs(translatedPoint[1]);
530
+ let tx = 0.707;
531
+ let ty = 0.707;
532
+ for (let i = 0; i < 3; i++) {
533
+ const x = a * tx;
534
+ const y = b * ty;
535
+ const ex = (a * a - b * b) * tx ** 3 / a;
536
+ const ey = (b * b - a * a) * ty ** 3 / b;
537
+ const rx = x - ex;
538
+ const ry = y - ey;
539
+ const qx = px - ex;
540
+ const qy = py - ey;
541
+ const r = Math.hypot(ry, rx);
542
+ const q = Math.hypot(qy, qx);
543
+ tx = Math.min(1, Math.max(0, (qx * r / q + ex) / a));
544
+ ty = Math.min(1, Math.max(0, (qy * r / q + ey) / b));
545
+ const t = Math.hypot(ty, tx);
546
+ tx /= t;
547
+ ty /= t;
548
+ }
549
+ const [minX, minY] = [
550
+ a * tx * Math.sign(translatedPoint[0]),
551
+ b * ty * Math.sign(translatedPoint[1])
552
+ ];
553
+ return pointDistance(pointFromVector(translatedPoint), pointFrom(minX, minY));
554
+ };
555
+ function ellipseSegmentInterceptPoints(e, s) {
556
+ const rx = e.halfWidth;
557
+ const ry = e.halfHeight;
558
+ const dir = vectorFromPoint(s[1], s[0]);
559
+ const diff = vector(s[0][0] - e.center[0], s[0][1] - e.center[1]);
560
+ const mDir = vector(dir[0] / (rx * rx), dir[1] / (ry * ry));
561
+ const mDiff = vector(diff[0] / (rx * rx), diff[1] / (ry * ry));
562
+ const a = vectorDot(dir, mDir);
563
+ const b = vectorDot(dir, mDiff);
564
+ const c = vectorDot(diff, mDiff) - 1;
565
+ const d = b * b - a * c;
566
+ const intersections = [];
567
+ if (d > 0) {
568
+ const t_a = (-b - Math.sqrt(d)) / a;
569
+ const t_b = (-b + Math.sqrt(d)) / a;
570
+ if (0 <= t_a && t_a <= 1) {
571
+ intersections.push(
572
+ pointFrom(
573
+ s[0][0] + (s[1][0] - s[0][0]) * t_a,
574
+ s[0][1] + (s[1][1] - s[0][1]) * t_a
575
+ )
576
+ );
577
+ }
578
+ if (0 <= t_b && t_b <= 1) {
579
+ intersections.push(
580
+ pointFrom(
581
+ s[0][0] + (s[1][0] - s[0][0]) * t_b,
582
+ s[0][1] + (s[1][1] - s[0][1]) * t_b
583
+ )
584
+ );
585
+ }
586
+ } else if (d === 0) {
587
+ const t = -b / a;
588
+ if (0 <= t && t <= 1) {
589
+ intersections.push(
590
+ pointFrom(
591
+ s[0][0] + (s[1][0] - s[0][0]) * t,
592
+ s[0][1] + (s[1][1] - s[0][1]) * t
593
+ )
594
+ );
595
+ }
596
+ }
597
+ return intersections;
598
+ }
599
+ function ellipseLineIntersectionPoints({ center, halfWidth, halfHeight }, [g, h]) {
600
+ const [cx, cy] = center;
601
+ const x1 = g[0] - cx;
602
+ const y1 = g[1] - cy;
603
+ const x2 = h[0] - cx;
604
+ const y2 = h[1] - cy;
605
+ const a = Math.pow(x2 - x1, 2) / Math.pow(halfWidth, 2) + Math.pow(y2 - y1, 2) / Math.pow(halfHeight, 2);
606
+ const b = 2 * (x1 * (x2 - x1) / Math.pow(halfWidth, 2) + y1 * (y2 - y1) / Math.pow(halfHeight, 2));
607
+ const c = Math.pow(x1, 2) / Math.pow(halfWidth, 2) + Math.pow(y1, 2) / Math.pow(halfHeight, 2) - 1;
608
+ const t1 = (-b + Math.sqrt(Math.pow(b, 2) - 4 * a * c)) / (2 * a);
609
+ const t2 = (-b - Math.sqrt(Math.pow(b, 2) - 4 * a * c)) / (2 * a);
610
+ const candidates = [
611
+ pointFrom(x1 + t1 * (x2 - x1) + cx, y1 + t1 * (y2 - y1) + cy),
612
+ pointFrom(x1 + t2 * (x2 - x1) + cx, y1 + t2 * (y2 - y1) + cy)
613
+ ].filter((p) => !isNaN(p[0]) && !isNaN(p[1]));
614
+ if (candidates.length === 2 && pointsEqual(candidates[0], candidates[1])) {
615
+ return [candidates[0]];
616
+ }
617
+ return candidates;
618
+ }
619
+
620
+ // src/line.ts
621
+ function line(a, b) {
622
+ return [a, b];
623
+ }
624
+ function linesIntersectAt(a, b) {
625
+ const A1 = a[1][1] - a[0][1];
626
+ const B1 = a[0][0] - a[1][0];
627
+ const A2 = b[1][1] - b[0][1];
628
+ const B2 = b[0][0] - b[1][0];
629
+ const D = A1 * B2 - A2 * B1;
630
+ if (D !== 0) {
631
+ const C1 = A1 * a[0][0] + B1 * a[0][1];
632
+ const C2 = A2 * b[0][0] + B2 * b[0][1];
633
+ return pointFrom((C1 * B2 - C2 * B1) / D, (A1 * C2 - A2 * C1) / D);
634
+ }
635
+ return null;
636
+ }
637
+
638
+ // src/segment.ts
639
+ function lineSegment(a, b) {
640
+ return [a, b];
641
+ }
642
+ var isLineSegment = (segment) => Array.isArray(segment) && segment.length === 2 && isPoint(segment[0]) && isPoint(segment[1]);
643
+ var lineSegmentRotate = (l, angle, origin) => {
644
+ return lineSegment(
645
+ pointRotateRads(l[0], origin || pointCenter(l[0], l[1]), angle),
646
+ pointRotateRads(l[1], origin || pointCenter(l[0], l[1]), angle)
647
+ );
648
+ };
649
+ var segmentsIntersectAt = (a, b) => {
650
+ const a0 = vectorFromPoint(a[0]);
651
+ const a1 = vectorFromPoint(a[1]);
652
+ const b0 = vectorFromPoint(b[0]);
653
+ const b1 = vectorFromPoint(b[1]);
654
+ const r = vectorSubtract(a1, a0);
655
+ const s = vectorSubtract(b1, b0);
656
+ const denominator = vectorCross(r, s);
657
+ if (denominator === 0) {
658
+ return null;
659
+ }
660
+ const i = vectorSubtract(vectorFromPoint(b[0]), vectorFromPoint(a[0]));
661
+ const u = vectorCross(i, r) / denominator;
662
+ const t = vectorCross(i, s) / denominator;
663
+ if (u === 0) {
664
+ return null;
665
+ }
666
+ const p = vectorAdd(a0, vectorScale(r, t));
667
+ if (t >= 0 && t < 1 && u >= 0 && u < 1) {
668
+ return pointFromVector(p);
669
+ }
670
+ return null;
671
+ };
672
+ var pointOnLineSegment = (point, line2, threshold = PRECISION) => {
673
+ const distance = distanceToLineSegment(point, line2);
674
+ if (distance === 0) {
675
+ return true;
676
+ }
677
+ return distance < threshold;
678
+ };
679
+ var distanceToLineSegment = (point, line2) => {
680
+ const [x, y] = point;
681
+ const [[x1, y1], [x2, y2]] = line2;
682
+ const A = x - x1;
683
+ const B = y - y1;
684
+ const C = x2 - x1;
685
+ const D = y2 - y1;
686
+ const dot = A * C + B * D;
687
+ const len_sq = C * C + D * D;
688
+ let param = -1;
689
+ if (len_sq !== 0) {
690
+ param = dot / len_sq;
691
+ }
692
+ let xx;
693
+ let yy;
694
+ if (param < 0) {
695
+ xx = x1;
696
+ yy = y1;
697
+ } else if (param > 1) {
698
+ xx = x2;
699
+ yy = y2;
700
+ } else {
701
+ xx = x1 + param * C;
702
+ yy = y1 + param * D;
703
+ }
704
+ const dx = x - xx;
705
+ const dy = y - yy;
706
+ return Math.sqrt(dx * dx + dy * dy);
707
+ };
708
+ function lineSegmentIntersectionPoints(l, s, threshold) {
709
+ const candidate = linesIntersectAt(line(l[0], l[1]), line(s[0], s[1]));
710
+ if (!candidate || !pointOnLineSegment(candidate, s, threshold) || !pointOnLineSegment(candidate, l, threshold)) {
711
+ return null;
712
+ }
713
+ return candidate;
714
+ }
715
+ function lineSegmentsDistance(s1, s2) {
716
+ if (lineSegmentIntersectionPoints(s1, s2)) {
717
+ return 0;
718
+ }
719
+ return Math.min(
720
+ distanceToLineSegment(s1[0], s2),
721
+ distanceToLineSegment(s1[1], s2),
722
+ distanceToLineSegment(s2[0], s1),
723
+ distanceToLineSegment(s2[1], s1)
724
+ );
725
+ }
726
+
727
+ // src/polygon.ts
728
+ function polygon(...points) {
729
+ return polygonClose(points);
730
+ }
731
+ function polygonFromPoints(points) {
732
+ return polygonClose(points);
733
+ }
734
+ var polygonIncludesPoint = (point, polygon2) => {
735
+ const x = point[0];
736
+ const y = point[1];
737
+ let inside = false;
738
+ for (let i = 0, j = polygon2.length - 1; i < polygon2.length; j = i++) {
739
+ const xi = polygon2[i][0];
740
+ const yi = polygon2[i][1];
741
+ const xj = polygon2[j][0];
742
+ const yj = polygon2[j][1];
743
+ if ((yi > y && yj <= y || yi <= y && yj > y) && x < (xj - xi) * (y - yi) / (yj - yi) + xi) {
744
+ inside = !inside;
745
+ }
746
+ }
747
+ return inside;
748
+ };
749
+ var polygonIncludesPointNonZero = (point, polygon2) => {
750
+ const [x, y] = point;
751
+ let windingNumber = 0;
752
+ for (let i = 0; i < polygon2.length; i++) {
753
+ const j = (i + 1) % polygon2.length;
754
+ const [xi, yi] = polygon2[i];
755
+ const [xj, yj] = polygon2[j];
756
+ if (yi <= y) {
757
+ if (yj > y) {
758
+ if ((xj - xi) * (y - yi) - (x - xi) * (yj - yi) > 0) {
759
+ windingNumber++;
760
+ }
761
+ }
762
+ } else if (yj <= y) {
763
+ if ((xj - xi) * (y - yi) - (x - xi) * (yj - yi) < 0) {
764
+ windingNumber--;
765
+ }
766
+ }
767
+ }
768
+ return windingNumber !== 0;
769
+ };
770
+ var pointOnPolygon = (p, poly, threshold = PRECISION) => {
771
+ let on = false;
772
+ for (let i = 0, l = poly.length - 1; i < l; i++) {
773
+ if (pointOnLineSegment(p, lineSegment(poly[i], poly[i + 1]), threshold)) {
774
+ on = true;
775
+ break;
776
+ }
777
+ }
778
+ return on;
779
+ };
780
+ function polygonClose(polygon2) {
781
+ return polygonIsClosed(polygon2) ? polygon2 : [...polygon2, polygon2[0]];
782
+ }
783
+ function polygonIsClosed(polygon2) {
784
+ return pointsEqual(polygon2[0], polygon2[polygon2.length - 1]);
785
+ }
786
+
787
+ // src/range.ts
788
+ import { toBrandedType } from "@nous-excalidraw/common";
789
+ function rangeInclusive(start, end) {
790
+ return toBrandedType([start, end]);
791
+ }
792
+ function rangeInclusiveFromPair(pair) {
793
+ return toBrandedType(pair);
794
+ }
795
+ var rangesOverlap = ([a0, a1], [b0, b1]) => {
796
+ if (a0 <= b0) {
797
+ return a1 >= b0;
798
+ }
799
+ if (a0 >= b0) {
800
+ return b1 >= a0;
801
+ }
802
+ return false;
803
+ };
804
+ var rangeIntersection = ([a0, a1], [b0, b1]) => {
805
+ const rangeStart = Math.max(a0, b0);
806
+ const rangeEnd = Math.min(a1, b1);
807
+ if (rangeStart <= rangeEnd) {
808
+ return toBrandedType([rangeStart, rangeEnd]);
809
+ }
810
+ return null;
811
+ };
812
+ var rangeIncludesValue = (value, [min, max]) => {
813
+ return value >= min && value <= max;
814
+ };
815
+
816
+ // src/rectangle.ts
817
+ function rectangle(topLeft, bottomRight) {
818
+ return [topLeft, bottomRight];
819
+ }
820
+ function rectangleFromNumberSequence(minX, minY, maxX, maxY) {
821
+ return rectangle(pointFrom(minX, minY), pointFrom(maxX, maxY));
822
+ }
823
+ function rectangleIntersectLineSegment(r, l) {
824
+ return [
825
+ lineSegment(r[0], pointFrom(r[1][0], r[0][1])),
826
+ lineSegment(pointFrom(r[1][0], r[0][1]), r[1]),
827
+ lineSegment(r[1], pointFrom(r[0][0], r[1][1])),
828
+ lineSegment(pointFrom(r[0][0], r[1][1]), r[0])
829
+ ].map((s) => lineSegmentIntersectionPoints(l, s)).filter((i) => !!i);
830
+ }
831
+ function rectangleIntersectRectangle(rectangle1, rectangle2) {
832
+ const [[minX1, minY1], [maxX1, maxY1]] = rectangle1;
833
+ const [[minX2, minY2], [maxX2, maxY2]] = rectangle2;
834
+ return minX1 < maxX2 && maxX1 > minX2 && minY1 < maxY2 && maxY1 > minY2;
835
+ }
836
+
837
+ // src/triangle.ts
838
+ function triangleIncludesPoint([a, b, c], p) {
839
+ const triangleSign = (p1, p2, p3) => (p1[0] - p3[0]) * (p2[1] - p3[1]) - (p2[0] - p3[0]) * (p1[1] - p3[1]);
840
+ const d1 = triangleSign(p, a, b);
841
+ const d2 = triangleSign(p, b, c);
842
+ const d3 = triangleSign(p, c, a);
843
+ const has_neg = d1 < 0 || d2 < 0 || d3 < 0;
844
+ const has_pos = d1 > 0 || d2 > 0 || d3 > 0;
845
+ return !(has_neg && has_pos);
846
+ }
847
+ export {
848
+ PRECISION,
849
+ average,
850
+ bezierEquation,
851
+ cartesian2Polar,
852
+ clamp,
853
+ curve,
854
+ curveCatmullRomCubicApproxPoints,
855
+ curveCatmullRomQuadraticApproxPoints,
856
+ curveClosestPoint,
857
+ curveIntersectLineSegment,
858
+ curveLength,
859
+ curveLengthAtParameter,
860
+ curveOffsetPoints,
861
+ curvePointAtLength,
862
+ curvePointDistance,
863
+ curveTangent,
864
+ degreesToRadians,
865
+ distanceToLineSegment,
866
+ ellipse,
867
+ ellipseDistanceFromPoint,
868
+ ellipseIncludesPoint,
869
+ ellipseLineIntersectionPoints,
870
+ ellipseSegmentInterceptPoints,
871
+ ellipseTouchesPoint,
872
+ isCloseTo,
873
+ isCurve,
874
+ isFiniteNumber,
875
+ isLineSegment,
876
+ isPoint,
877
+ isPointWithinBounds,
878
+ isRightAngleRads,
879
+ isVector,
880
+ line,
881
+ lineSegment,
882
+ lineSegmentIntersectionPoints,
883
+ lineSegmentRotate,
884
+ lineSegmentsDistance,
885
+ linesIntersectAt,
886
+ normalizeRadians,
887
+ offsetPointsForQuadraticBezier,
888
+ pointCenter,
889
+ pointDistance,
890
+ pointDistanceSq,
891
+ pointFrom,
892
+ pointFromArray,
893
+ pointFromPair,
894
+ pointFromVector,
895
+ pointOnLineSegment,
896
+ pointOnPolygon,
897
+ pointRotateDegs,
898
+ pointRotateRads,
899
+ pointScaleFromOrigin,
900
+ pointTranslate,
901
+ pointsEqual,
902
+ polygon,
903
+ polygonFromPoints,
904
+ polygonIncludesPoint,
905
+ polygonIncludesPointNonZero,
906
+ radiansBetweenAngles,
907
+ radiansDifference,
908
+ radiansToDegrees,
909
+ rangeIncludesValue,
910
+ rangeInclusive,
911
+ rangeInclusiveFromPair,
912
+ rangeIntersection,
913
+ rangesOverlap,
914
+ rectangle,
915
+ rectangleFromNumberSequence,
916
+ rectangleIntersectLineSegment,
917
+ rectangleIntersectRectangle,
918
+ round,
919
+ roundToStep,
920
+ segmentsIntersectAt,
921
+ triangleIncludesPoint,
922
+ vector,
923
+ vectorAdd,
924
+ vectorCross,
925
+ vectorDot,
926
+ vectorFromPoint,
927
+ vectorMagnitude,
928
+ vectorMagnitudeSq,
929
+ vectorNormal,
930
+ vectorNormalize,
931
+ vectorScale,
932
+ vectorSubtract
933
+ };
934
+ //# sourceMappingURL=index.js.map