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