@excalidraw/excalidraw 0.17.1-d9bbf1e → 0.17.1-e63dd02

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 (416) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/browser/dev/excalidraw-assets-dev/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
  3. package/dist/browser/dev/excalidraw-assets-dev/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
  4. package/dist/browser/dev/excalidraw-assets-dev/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
  5. package/dist/browser/dev/excalidraw-assets-dev/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
  6. package/dist/browser/dev/excalidraw-assets-dev/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
  7. package/dist/browser/dev/excalidraw-assets-dev/{chunk-XOM7LNOU.js → chunk-IT7T3AIK.js} +49 -8
  8. package/dist/browser/dev/excalidraw-assets-dev/chunk-IT7T3AIK.js.map +7 -0
  9. package/dist/browser/dev/excalidraw-assets-dev/{chunk-BLEB3M62.js → chunk-RNHSD5AR.js} +7668 -2142
  10. package/dist/browser/dev/excalidraw-assets-dev/chunk-RNHSD5AR.js.map +7 -0
  11. package/dist/browser/dev/excalidraw-assets-dev/{dist-ITJNUBZF.js → dist-DNSPZDOZ.js} +66 -32
  12. package/dist/browser/dev/excalidraw-assets-dev/dist-DNSPZDOZ.js.map +7 -0
  13. package/dist/browser/dev/excalidraw-assets-dev/{en-TR4QLF5E.js → en-XV7OZCPP.js} +8 -2
  14. package/dist/browser/dev/excalidraw-assets-dev/{image-ZGDDRBEN.js → image-77HZYGLG.js} +2 -2
  15. package/dist/browser/dev/excalidraw-assets-dev/{image-O66MQ7WQ.css → image-WDHYGKKP.css} +1 -1
  16. package/dist/browser/dev/excalidraw-assets-dev/{image-O66MQ7WQ.css.map → image-WDHYGKKP.css.map} +2 -2
  17. package/dist/browser/dev/index.css +610 -180
  18. package/dist/browser/dev/index.css.map +3 -3
  19. package/dist/browser/dev/index.js +13306 -8006
  20. package/dist/browser/dev/index.js.map +4 -4
  21. package/dist/browser/prod/excalidraw-assets/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
  22. package/dist/browser/prod/excalidraw-assets/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
  23. package/dist/browser/prod/excalidraw-assets/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
  24. package/dist/browser/prod/excalidraw-assets/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
  25. package/dist/browser/prod/excalidraw-assets/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
  26. package/dist/browser/prod/excalidraw-assets/chunk-OYEADJSR.js +63 -0
  27. package/dist/browser/prod/excalidraw-assets/{chunk-5SYIAZGL.js → chunk-PDYFZJMS.js} +5 -5
  28. package/dist/browser/prod/excalidraw-assets/dist-NLUQPPQQ.js +7 -0
  29. package/dist/browser/prod/excalidraw-assets/en-YVAVVILW.js +1 -0
  30. package/dist/browser/prod/excalidraw-assets/image-X3GFZHNN.js +1 -0
  31. package/dist/browser/prod/index.css +1 -1
  32. package/dist/browser/prod/index.js +70 -51
  33. package/dist/dev/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
  34. package/dist/dev/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
  35. package/dist/dev/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
  36. package/dist/dev/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
  37. package/dist/dev/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
  38. package/dist/dev/{en-XW4JO6VX.json → en-YNVBSAIL.json} +42 -7
  39. package/dist/dev/index.css +610 -180
  40. package/dist/dev/index.css.map +3 -3
  41. package/dist/dev/index.js +22165 -16833
  42. package/dist/dev/index.js.map +4 -4
  43. package/dist/excalidraw/actions/actionAddToLibrary.d.ts +24 -9
  44. package/dist/excalidraw/actions/actionAlign.d.ts +8 -8
  45. package/dist/excalidraw/actions/actionBoundText.d.ts +20 -10
  46. package/dist/excalidraw/actions/actionBoundText.js +3 -1
  47. package/dist/excalidraw/actions/actionCanvas.d.ts +100 -40
  48. package/dist/excalidraw/actions/actionCanvas.js +1 -1
  49. package/dist/excalidraw/actions/actionClipboard.d.ts +62 -26
  50. package/dist/excalidraw/actions/actionDeleteSelected.d.ts +28 -12
  51. package/dist/excalidraw/actions/actionDeleteSelected.js +24 -5
  52. package/dist/excalidraw/actions/actionDistribute.d.ts +4 -4
  53. package/dist/excalidraw/actions/actionDuplicateSelection.d.ts +3 -3
  54. package/dist/excalidraw/actions/actionDuplicateSelection.js +1 -2
  55. package/dist/excalidraw/actions/actionElementLock.d.ts +17 -7
  56. package/dist/excalidraw/actions/actionExport.d.ts +75 -30
  57. package/dist/excalidraw/actions/actionFinalize.d.ts +17 -7
  58. package/dist/excalidraw/actions/actionFinalize.js +2 -2
  59. package/dist/excalidraw/actions/actionFlip.d.ts +4 -4
  60. package/dist/excalidraw/actions/actionFlip.js +2 -2
  61. package/dist/excalidraw/actions/actionFrame.d.ts +338 -10
  62. package/dist/excalidraw/actions/actionGroup.d.ts +324 -4
  63. package/dist/excalidraw/actions/actionHistory.d.ts +3 -3
  64. package/dist/excalidraw/actions/actionHistory.js +8 -8
  65. package/dist/excalidraw/actions/actionLinearEditor.d.ts +12 -5
  66. package/dist/excalidraw/actions/actionLinearEditor.js +21 -5
  67. package/dist/excalidraw/actions/actionLink.d.ts +8 -3
  68. package/dist/excalidraw/actions/actionMenu.d.ts +24 -9
  69. package/dist/excalidraw/actions/actionNavigate.d.ts +17 -7
  70. package/dist/excalidraw/actions/actionProperties.d.ts +476 -82
  71. package/dist/excalidraw/actions/actionProperties.js +384 -59
  72. package/dist/excalidraw/actions/actionSelectAll.d.ts +9 -4
  73. package/dist/excalidraw/actions/actionStyles.d.ts +12 -4
  74. package/dist/excalidraw/actions/actionStyles.js +3 -2
  75. package/dist/excalidraw/actions/actionTextAutoResize.d.ts +17 -0
  76. package/dist/excalidraw/actions/actionTextAutoResize.js +38 -0
  77. package/dist/excalidraw/actions/actionToggleGridMode.d.ts +9 -4
  78. package/dist/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +8 -3
  79. package/dist/excalidraw/actions/actionToggleStats.d.ts +9 -3
  80. package/dist/excalidraw/actions/actionToggleStats.js +4 -3
  81. package/dist/excalidraw/actions/actionToggleViewMode.d.ts +8 -3
  82. package/dist/excalidraw/actions/actionToggleZenMode.d.ts +8 -3
  83. package/dist/excalidraw/actions/actionZindex.d.ts +8 -4
  84. package/dist/excalidraw/actions/actionZindex.js +4 -0
  85. package/dist/excalidraw/actions/manager.d.ts +3 -3
  86. package/dist/excalidraw/actions/register.d.ts +1 -1
  87. package/dist/excalidraw/actions/shortcuts.d.ts +2 -2
  88. package/dist/excalidraw/actions/types.d.ts +6 -6
  89. package/dist/excalidraw/align.d.ts +1 -1
  90. package/dist/excalidraw/analytics.js +9 -7
  91. package/dist/excalidraw/animated-trail.d.ts +2 -2
  92. package/dist/excalidraw/appState.d.ts +6 -2
  93. package/dist/excalidraw/appState.js +14 -3
  94. package/dist/excalidraw/binaryheap.d.ts +12 -0
  95. package/dist/excalidraw/binaryheap.js +93 -0
  96. package/dist/excalidraw/change.d.ts +6 -5
  97. package/dist/excalidraw/change.js +20 -11
  98. package/dist/excalidraw/charts.d.ts +1 -1
  99. package/dist/excalidraw/charts.js +0 -10
  100. package/dist/excalidraw/clients.d.ts +2 -2
  101. package/dist/excalidraw/clients.js +1 -1
  102. package/dist/excalidraw/clipboard.d.ts +3 -3
  103. package/dist/excalidraw/colors.d.ts +1 -1
  104. package/dist/excalidraw/components/Actions.d.ts +3 -3
  105. package/dist/excalidraw/components/Actions.js +14 -9
  106. package/dist/excalidraw/components/App.d.ts +14 -17
  107. package/dist/excalidraw/components/App.js +356 -217
  108. package/dist/excalidraw/components/ButtonIcon.d.ts +15 -0
  109. package/dist/excalidraw/components/ButtonIcon.js +8 -0
  110. package/dist/excalidraw/components/ButtonIconSelect.js +2 -3
  111. package/dist/excalidraw/components/ButtonSeparator.d.ts +2 -0
  112. package/dist/excalidraw/components/ButtonSeparator.js +7 -0
  113. package/dist/excalidraw/components/CheckboxItem.js +1 -1
  114. package/dist/excalidraw/components/ColorPicker/ColorInput.d.ts +1 -1
  115. package/dist/excalidraw/components/ColorPicker/ColorInput.js +1 -1
  116. package/dist/excalidraw/components/ColorPicker/ColorPicker.d.ts +4 -4
  117. package/dist/excalidraw/components/ColorPicker/ColorPicker.js +48 -80
  118. package/dist/excalidraw/components/ColorPicker/Picker.d.ts +3 -3
  119. package/dist/excalidraw/components/ColorPicker/Picker.js +1 -1
  120. package/dist/excalidraw/components/ColorPicker/PickerColorList.d.ts +1 -1
  121. package/dist/excalidraw/components/ColorPicker/PickerHeading.d.ts +1 -1
  122. package/dist/excalidraw/components/ColorPicker/ShadeList.d.ts +1 -1
  123. package/dist/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  124. package/dist/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +2 -2
  125. package/dist/excalidraw/components/ColorPicker/colorPickerUtils.js +1 -1
  126. package/dist/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
  127. package/dist/excalidraw/components/ColorPicker/keyboardNavHandlers.js +1 -1
  128. package/dist/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
  129. package/dist/excalidraw/components/CommandPalette/CommandPalette.js +5 -5
  130. package/dist/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -1
  131. package/dist/excalidraw/components/CommandPalette/types.d.ts +3 -3
  132. package/dist/excalidraw/components/ConfirmDialog.d.ts +1 -1
  133. package/dist/excalidraw/components/ContextMenu.d.ts +2 -2
  134. package/dist/excalidraw/components/ContextMenu.js +2 -2
  135. package/dist/excalidraw/components/DarkModeToggle.d.ts +1 -1
  136. package/dist/excalidraw/components/DefaultSidebar.d.ts +2 -2
  137. package/dist/excalidraw/components/Dialog.js +1 -1
  138. package/dist/excalidraw/components/DialogActionButton.d.ts +1 -1
  139. package/dist/excalidraw/components/EyeDropper.d.ts +2 -2
  140. package/dist/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
  141. package/dist/excalidraw/components/FollowMode/FollowMode.js +1 -1
  142. package/dist/excalidraw/components/FontPicker/FontPicker.d.ts +21 -0
  143. package/dist/excalidraw/components/FontPicker/FontPicker.js +49 -0
  144. package/dist/excalidraw/components/FontPicker/FontPickerList.d.ts +25 -0
  145. package/dist/excalidraw/components/FontPicker/FontPickerList.js +119 -0
  146. package/dist/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +7 -0
  147. package/dist/excalidraw/components/FontPicker/FontPickerTrigger.js +13 -0
  148. package/dist/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +14 -0
  149. package/dist/excalidraw/components/FontPicker/keyboardNavHandlers.js +38 -0
  150. package/dist/excalidraw/components/HelpDialog.js +2 -2
  151. package/dist/excalidraw/components/HintViewer.d.ts +1 -1
  152. package/dist/excalidraw/components/HintViewer.js +6 -3
  153. package/dist/excalidraw/components/IconPicker.js +2 -2
  154. package/dist/excalidraw/components/ImageExportDialog.d.ts +1 -1
  155. package/dist/excalidraw/components/InitializeApp.d.ts +2 -2
  156. package/dist/excalidraw/components/JSONExportDialog.d.ts +3 -3
  157. package/dist/excalidraw/components/LayerUI.d.ts +4 -4
  158. package/dist/excalidraw/components/LayerUI.js +10 -7
  159. package/dist/excalidraw/components/LibraryMenu.d.ts +2 -2
  160. package/dist/excalidraw/components/LibraryMenuBrowseButton.d.ts +1 -1
  161. package/dist/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  162. package/dist/excalidraw/components/LibraryMenuHeaderContent.d.ts +2 -2
  163. package/dist/excalidraw/components/LibraryMenuItems.d.ts +1 -1
  164. package/dist/excalidraw/components/LibraryMenuSection.d.ts +5 -4
  165. package/dist/excalidraw/components/LibraryUnit.d.ts +2 -2
  166. package/dist/excalidraw/components/LoadingMessage.d.ts +1 -1
  167. package/dist/excalidraw/components/MagicSettings.js +2 -2
  168. package/dist/excalidraw/components/MobileMenu.d.ts +3 -3
  169. package/dist/excalidraw/components/MobileMenu.js +2 -6
  170. package/dist/excalidraw/components/Modal.d.ts +1 -1
  171. package/dist/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  172. package/dist/excalidraw/components/PasteChartDialog.d.ts +1 -1
  173. package/dist/excalidraw/components/PasteChartDialog.js +1 -1
  174. package/dist/excalidraw/components/PropertiesPopover.d.ts +15 -0
  175. package/dist/excalidraw/components/PropertiesPopover.js +31 -0
  176. package/dist/excalidraw/components/PublishLibrary.d.ts +1 -1
  177. package/dist/excalidraw/components/QuickSearch.d.ts +9 -0
  178. package/dist/excalidraw/components/QuickSearch.js +8 -0
  179. package/dist/excalidraw/components/SVGLayer.d.ts +1 -1
  180. package/dist/excalidraw/components/ScrollableList.d.ts +9 -0
  181. package/dist/excalidraw/components/ScrollableList.js +8 -0
  182. package/dist/excalidraw/components/Sidebar/Sidebar.js +1 -1
  183. package/dist/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -1
  184. package/dist/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -1
  185. package/dist/excalidraw/components/Sidebar/SidebarTrigger.d.ts +1 -1
  186. package/dist/excalidraw/components/Sidebar/common.d.ts +1 -1
  187. package/dist/excalidraw/components/Stats/Angle.d.ts +12 -0
  188. package/dist/excalidraw/components/Stats/Angle.js +53 -0
  189. package/dist/excalidraw/components/Stats/Collapsible.d.ts +9 -0
  190. package/dist/excalidraw/components/Stats/Collapsible.js +12 -0
  191. package/dist/excalidraw/components/Stats/Dimension.d.ts +12 -0
  192. package/dist/excalidraw/components/Stats/Dimension.js +68 -0
  193. package/dist/excalidraw/components/Stats/DragInput.d.ts +32 -0
  194. package/dist/excalidraw/components/Stats/DragInput.js +174 -0
  195. package/dist/excalidraw/components/Stats/FontSize.d.ts +12 -0
  196. package/dist/excalidraw/components/Stats/FontSize.js +50 -0
  197. package/dist/excalidraw/components/Stats/MultiAngle.d.ts +12 -0
  198. package/dist/excalidraw/components/Stats/MultiAngle.js +66 -0
  199. package/dist/excalidraw/components/Stats/MultiDimension.d.ts +15 -0
  200. package/dist/excalidraw/components/Stats/MultiDimension.js +199 -0
  201. package/dist/excalidraw/components/Stats/MultiFontSize.d.ts +13 -0
  202. package/dist/excalidraw/components/Stats/MultiFontSize.js +72 -0
  203. package/dist/excalidraw/components/Stats/MultiPosition.d.ts +15 -0
  204. package/dist/excalidraw/components/Stats/MultiPosition.js +101 -0
  205. package/dist/excalidraw/components/Stats/Position.d.ts +13 -0
  206. package/dist/excalidraw/components/Stats/Position.js +40 -0
  207. package/dist/excalidraw/components/Stats/index.d.ts +16 -0
  208. package/dist/excalidraw/components/Stats/index.js +79 -0
  209. package/dist/excalidraw/components/Stats/utils.d.ts +26 -0
  210. package/dist/excalidraw/components/Stats/utils.js +162 -0
  211. package/dist/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -1
  212. package/dist/excalidraw/components/TTDDialog/TTDDialog.js +2 -2
  213. package/dist/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +1 -1
  214. package/dist/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +1 -1
  215. package/dist/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +1 -1
  216. package/dist/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +1 -1
  217. package/dist/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  218. package/dist/excalidraw/components/TTDDialog/common.d.ts +5 -5
  219. package/dist/excalidraw/components/TTDDialog/common.js +3 -7
  220. package/dist/excalidraw/components/TextField.d.ts +1 -1
  221. package/dist/excalidraw/components/Toast.d.ts +1 -1
  222. package/dist/excalidraw/components/ToolButton.d.ts +3 -2
  223. package/dist/excalidraw/components/Trans.d.ts +1 -1
  224. package/dist/excalidraw/components/UserList.d.ts +1 -1
  225. package/dist/excalidraw/components/UserList.js +22 -22
  226. package/dist/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -2
  227. package/dist/excalidraw/components/canvases/InteractiveCanvas.js +4 -2
  228. package/dist/excalidraw/components/canvases/StaticCanvas.d.ts +2 -2
  229. package/dist/excalidraw/components/canvases/StaticCanvas.js +3 -2
  230. package/dist/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +12 -3
  231. package/dist/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +24 -4
  232. package/dist/excalidraw/components/dropdownMenu/DropdownMenuItem.js +55 -14
  233. package/dist/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
  234. package/dist/excalidraw/components/dropdownMenu/DropdownMenuItemContent.js +2 -2
  235. package/dist/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  236. package/dist/excalidraw/components/dropdownMenu/common.js +3 -2
  237. package/dist/excalidraw/components/footer/Footer.d.ts +2 -2
  238. package/dist/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
  239. package/dist/excalidraw/components/hyperlink/helpers.d.ts +3 -3
  240. package/dist/excalidraw/components/icons.d.ts +10 -2
  241. package/dist/excalidraw/components/icons.js +29 -6
  242. package/dist/excalidraw/components/main-menu/MainMenu.d.ts +12 -3
  243. package/dist/excalidraw/components/welcome-screen/WelcomeScreen.Center.js +2 -2
  244. package/dist/excalidraw/components/welcome-screen/WelcomeScreen.Hints.js +3 -3
  245. package/dist/excalidraw/constants.d.ts +24 -3
  246. package/dist/excalidraw/constants.js +28 -4
  247. package/dist/excalidraw/context/ui-appState.d.ts +1 -1
  248. package/dist/excalidraw/cursor.d.ts +1 -1
  249. package/dist/excalidraw/data/EditorLocalStorage.d.ts +2 -2
  250. package/dist/excalidraw/data/blob.d.ts +5 -5
  251. package/dist/excalidraw/data/filesystem.d.ts +2 -1
  252. package/dist/excalidraw/data/index.d.ts +4 -4
  253. package/dist/excalidraw/data/json.d.ts +3 -3
  254. package/dist/excalidraw/data/library.d.ts +3 -3
  255. package/dist/excalidraw/data/magic.d.ts +3 -3
  256. package/dist/excalidraw/data/reconcile.d.ts +3 -3
  257. package/dist/excalidraw/data/reconcile.js +18 -1
  258. package/dist/excalidraw/data/resave.d.ts +2 -2
  259. package/dist/excalidraw/data/restore.d.ts +3 -3
  260. package/dist/excalidraw/data/restore.js +58 -9
  261. package/dist/excalidraw/data/transform.d.ts +3 -3
  262. package/dist/excalidraw/data/transform.js +8 -5
  263. package/dist/excalidraw/data/types.d.ts +3 -3
  264. package/dist/excalidraw/element/ElementCanvasButtons.d.ts +1 -1
  265. package/dist/excalidraw/element/binding.d.ts +29 -10
  266. package/dist/excalidraw/element/binding.js +303 -71
  267. package/dist/excalidraw/element/bounds.d.ts +3 -3
  268. package/dist/excalidraw/element/collision.d.ts +4 -4
  269. package/dist/excalidraw/element/collision.js +5 -2
  270. package/dist/excalidraw/element/containerCache.d.ts +1 -1
  271. package/dist/excalidraw/element/dragElements.d.ts +6 -6
  272. package/dist/excalidraw/element/dragElements.js +39 -5
  273. package/dist/excalidraw/element/embeddable.d.ts +11 -6
  274. package/dist/excalidraw/element/heading.d.ts +11 -0
  275. package/dist/excalidraw/element/heading.js +81 -0
  276. package/dist/excalidraw/element/image.d.ts +2 -2
  277. package/dist/excalidraw/element/index.d.ts +2 -2
  278. package/dist/excalidraw/element/index.js +1 -1
  279. package/dist/excalidraw/element/linearElementEditor.d.ts +27 -16
  280. package/dist/excalidraw/element/linearElementEditor.js +133 -56
  281. package/dist/excalidraw/element/mutateElement.d.ts +3 -3
  282. package/dist/excalidraw/element/mutateElement.js +5 -3
  283. package/dist/excalidraw/element/newElement.d.ts +12 -10
  284. package/dist/excalidraw/element/newElement.js +31 -16
  285. package/dist/excalidraw/element/resizeElements.d.ts +15 -6
  286. package/dist/excalidraw/element/resizeElements.js +122 -46
  287. package/dist/excalidraw/element/resizeTest.d.ts +4 -4
  288. package/dist/excalidraw/element/resizeTest.js +2 -4
  289. package/dist/excalidraw/element/routing.d.ts +13 -0
  290. package/dist/excalidraw/element/routing.js +641 -0
  291. package/dist/excalidraw/element/showSelectedShapeActions.d.ts +2 -2
  292. package/dist/excalidraw/element/sizeHelpers.d.ts +2 -2
  293. package/dist/excalidraw/element/sortElements.d.ts +1 -1
  294. package/dist/excalidraw/element/textElement.d.ts +6 -28
  295. package/dist/excalidraw/element/textElement.js +64 -112
  296. package/dist/excalidraw/element/textWysiwyg.d.ts +12 -6
  297. package/dist/excalidraw/element/textWysiwyg.js +75 -62
  298. package/dist/excalidraw/element/transformHandles.d.ts +3 -3
  299. package/dist/excalidraw/element/transformHandles.js +7 -12
  300. package/dist/excalidraw/element/typeChecks.d.ts +7 -4
  301. package/dist/excalidraw/element/typeChecks.js +17 -0
  302. package/dist/excalidraw/element/types.d.ts +22 -4
  303. package/dist/excalidraw/emitter.d.ts +1 -1
  304. package/dist/excalidraw/fonts/ExcalidrawFont.d.ts +21 -0
  305. package/dist/excalidraw/fonts/ExcalidrawFont.js +112 -0
  306. package/dist/excalidraw/fonts/index.d.ts +58 -0
  307. package/dist/excalidraw/fonts/index.js +240 -0
  308. package/dist/excalidraw/fonts/metadata.d.ts +36 -0
  309. package/dist/excalidraw/fonts/metadata.js +91 -0
  310. package/dist/excalidraw/fractionalIndex.d.ts +12 -5
  311. package/dist/excalidraw/fractionalIndex.js +40 -10
  312. package/dist/excalidraw/frame.d.ts +4 -4
  313. package/dist/excalidraw/frame.js +3 -3
  314. package/dist/excalidraw/gatransforms.d.ts +1 -1
  315. package/dist/excalidraw/gesture.d.ts +1 -1
  316. package/dist/excalidraw/groups.d.ts +4 -4
  317. package/dist/excalidraw/history.d.ts +8 -7
  318. package/dist/excalidraw/history.js +8 -8
  319. package/dist/excalidraw/hooks/useEmitter.d.ts +1 -1
  320. package/dist/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  321. package/dist/excalidraw/i18n.d.ts +1 -1
  322. package/dist/excalidraw/index.d.ts +2 -2
  323. package/dist/excalidraw/index.js +3 -3
  324. package/dist/excalidraw/jotai.d.ts +1 -1
  325. package/dist/excalidraw/laser-trails.d.ts +3 -2
  326. package/dist/excalidraw/locales/en.json +42 -7
  327. package/dist/excalidraw/math.d.ts +47 -2
  328. package/dist/excalidraw/math.js +116 -0
  329. package/dist/excalidraw/mermaid.d.ts +2 -0
  330. package/dist/excalidraw/mermaid.js +29 -0
  331. package/dist/excalidraw/points.d.ts +1 -1
  332. package/dist/excalidraw/queue.d.ts +1 -1
  333. package/dist/excalidraw/renderer/helpers.d.ts +2 -2
  334. package/dist/excalidraw/renderer/interactiveScene.d.ts +2 -2
  335. package/dist/excalidraw/renderer/interactiveScene.js +64 -22
  336. package/dist/excalidraw/renderer/renderElement.d.ts +6 -4
  337. package/dist/excalidraw/renderer/renderElement.js +78 -58
  338. package/dist/excalidraw/renderer/renderSnaps.d.ts +1 -1
  339. package/dist/excalidraw/renderer/staticScene.d.ts +1 -1
  340. package/dist/excalidraw/renderer/staticSvgScene.d.ts +4 -4
  341. package/dist/excalidraw/renderer/staticSvgScene.js +2 -1
  342. package/dist/excalidraw/scene/Renderer.d.ts +4 -4
  343. package/dist/excalidraw/scene/Renderer.js +2 -3
  344. package/dist/excalidraw/scene/Scene.d.ts +16 -7
  345. package/dist/excalidraw/scene/Scene.js +26 -11
  346. package/dist/excalidraw/scene/Shape.d.ts +1 -1
  347. package/dist/excalidraw/scene/Shape.js +56 -5
  348. package/dist/excalidraw/scene/ShapeCache.d.ts +4 -4
  349. package/dist/excalidraw/scene/comparisons.d.ts +3 -2
  350. package/dist/excalidraw/scene/comparisons.js +1 -1
  351. package/dist/excalidraw/scene/export.d.ts +4 -3
  352. package/dist/excalidraw/scene/export.js +34 -36
  353. package/dist/excalidraw/scene/scroll.d.ts +2 -2
  354. package/dist/excalidraw/scene/scrollbars.d.ts +3 -3
  355. package/dist/excalidraw/scene/selection.d.ts +2 -2
  356. package/dist/excalidraw/scene/types.d.ts +6 -8
  357. package/dist/excalidraw/scene/zoom.d.ts +1 -1
  358. package/dist/excalidraw/shapes.d.ts +8 -0
  359. package/dist/excalidraw/shapes.js +57 -0
  360. package/dist/excalidraw/snapping.d.ts +4 -4
  361. package/dist/excalidraw/snapping.js +2 -1
  362. package/dist/excalidraw/store.d.ts +34 -4
  363. package/dist/excalidraw/store.js +27 -0
  364. package/dist/excalidraw/types.d.ts +32 -21
  365. package/dist/excalidraw/utils.d.ts +15 -5
  366. package/dist/excalidraw/utils.js +22 -0
  367. package/dist/excalidraw/zindex.d.ts +2 -2
  368. package/dist/prod/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
  369. package/dist/prod/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
  370. package/dist/prod/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
  371. package/dist/prod/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
  372. package/dist/prod/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
  373. package/dist/prod/{en-XW4JO6VX.json → en-YNVBSAIL.json} +42 -7
  374. package/dist/prod/index.css +1 -1
  375. package/dist/prod/index.js +49 -53
  376. package/dist/utils/bbox.d.ts +2 -2
  377. package/dist/utils/collision.d.ts +1 -1
  378. package/dist/utils/export.d.ts +4 -3
  379. package/dist/utils/export.js +2 -1
  380. package/dist/utils/geometry/geometry.d.ts +3 -2
  381. package/dist/utils/geometry/geometry.js +5 -1
  382. package/dist/utils/geometry/shape.d.ts +1 -1
  383. package/dist/utils/index.d.ts +1 -0
  384. package/dist/utils/index.js +1 -0
  385. package/dist/utils/withinBounds.d.ts +1 -1
  386. package/history.ts +13 -6
  387. package/package.json +2 -2
  388. package/dist/browser/dev/Cascadia-CYPE3OJC.woff2 +0 -0
  389. package/dist/browser/dev/Virgil-UZN6MUT6.woff2 +0 -0
  390. package/dist/browser/dev/excalidraw-assets-dev/chunk-BLEB3M62.js.map +0 -7
  391. package/dist/browser/dev/excalidraw-assets-dev/chunk-XOM7LNOU.js.map +0 -7
  392. package/dist/browser/dev/excalidraw-assets-dev/dist-ITJNUBZF.js.map +0 -7
  393. package/dist/browser/prod/Cascadia-CYPE3OJC.woff2 +0 -0
  394. package/dist/browser/prod/Virgil-UZN6MUT6.woff2 +0 -0
  395. package/dist/browser/prod/excalidraw-assets/chunk-UWBW5SR2.js +0 -55
  396. package/dist/browser/prod/excalidraw-assets/dist-54276HPL.js +0 -6
  397. package/dist/browser/prod/excalidraw-assets/en-7GPZE2Y2.js +0 -1
  398. package/dist/browser/prod/excalidraw-assets/image-35KQQ5EN.js +0 -1
  399. package/dist/dev/Cascadia-CYPE3OJC.woff2 +0 -0
  400. package/dist/dev/Virgil-UZN6MUT6.woff2 +0 -0
  401. package/dist/excalidraw/components/Stats.d.ts +0 -11
  402. package/dist/excalidraw/components/Stats.js +0 -13
  403. package/dist/excalidraw/scene/Fonts.d.ts +0 -21
  404. package/dist/excalidraw/scene/Fonts.js +0 -72
  405. package/dist/prod/Cascadia-CYPE3OJC.woff2 +0 -0
  406. package/dist/prod/Virgil-UZN6MUT6.woff2 +0 -0
  407. /package/dist/browser/dev/{Assistant-Bold-ZDZZ6JHA.woff2 → excalidraw-assets-dev/Assistant-Bold-ZDZZ6JHA.woff2} +0 -0
  408. /package/dist/browser/dev/{Assistant-Medium-DZ25RZU3.woff2 → excalidraw-assets-dev/Assistant-Medium-DZ25RZU3.woff2} +0 -0
  409. /package/dist/browser/dev/{Assistant-Regular-PLF2XOGW.woff2 → excalidraw-assets-dev/Assistant-Regular-PLF2XOGW.woff2} +0 -0
  410. /package/dist/browser/dev/{Assistant-SemiBold-CZ5MX6FK.woff2 → excalidraw-assets-dev/Assistant-SemiBold-CZ5MX6FK.woff2} +0 -0
  411. /package/dist/browser/dev/excalidraw-assets-dev/{en-TR4QLF5E.js.map → en-XV7OZCPP.js.map} +0 -0
  412. /package/dist/browser/dev/excalidraw-assets-dev/{image-ZGDDRBEN.js.map → image-77HZYGLG.js.map} +0 -0
  413. /package/dist/browser/prod/{Assistant-Bold-ZDZZ6JHA.woff2 → excalidraw-assets/Assistant-Bold-ZDZZ6JHA.woff2} +0 -0
  414. /package/dist/browser/prod/{Assistant-Medium-DZ25RZU3.woff2 → excalidraw-assets/Assistant-Medium-DZ25RZU3.woff2} +0 -0
  415. /package/dist/browser/prod/{Assistant-Regular-PLF2XOGW.woff2 → excalidraw-assets/Assistant-Regular-PLF2XOGW.woff2} +0 -0
  416. /package/dist/browser/prod/{Assistant-SemiBold-CZ5MX6FK.woff2 → excalidraw-assets/Assistant-SemiBold-CZ5MX6FK.woff2} +0 -0
@@ -1,22 +1,63 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from "react";
2
3
  import { getDropdownMenuItemClassName, useHandleDropdownMenuItemClick, } from "./common";
3
4
  import MenuItemContent from "./DropdownMenuItemContent";
4
- const DropdownMenuItem = ({ icon, onSelect, children, shortcut, className, selected, ...rest }) => {
5
- const handleClick = useHandleDropdownMenuItemClick(rest.onClick, onSelect);
6
- return (_jsx("button", { ...rest, onClick: handleClick, type: "button", className: getDropdownMenuItemClassName(className, selected), title: rest.title ?? rest["aria-label"], children: _jsx(MenuItemContent, { icon: icon, shortcut: shortcut, children: children }) }));
5
+ import { useExcalidrawAppState } from "../App";
6
+ import { THEME } from "../../constants";
7
+ const DropdownMenuItem = ({ icon, value, order, children, shortcut, className, hovered, selected, textStyle, onSelect, onClick, ...rest }) => {
8
+ const handleClick = useHandleDropdownMenuItemClick(onClick, onSelect);
9
+ const ref = useRef(null);
10
+ useEffect(() => {
11
+ if (hovered) {
12
+ if (order === 0) {
13
+ // scroll into the first item differently, so it's visible what is above (i.e. group title)
14
+ ref.current?.scrollIntoView({ block: "end" });
15
+ }
16
+ else {
17
+ ref.current?.scrollIntoView({ block: "nearest" });
18
+ }
19
+ }
20
+ }, [hovered, order]);
21
+ return (_jsx("button", { ...rest, ref: ref, value: value, onClick: handleClick, className: getDropdownMenuItemClassName(className, selected, hovered), title: rest.title ?? rest["aria-label"], children: _jsx(MenuItemContent, { textStyle: textStyle, icon: icon, shortcut: shortcut, children: children }) }));
7
22
  };
8
23
  DropdownMenuItem.displayName = "DropdownMenuItem";
9
- export const DropDownMenuItemBadge = ({ children, }) => {
10
- return (_jsx("div", { style: {
11
- display: "inline-flex",
12
- marginLeft: "auto",
13
- padding: "2px 4px",
14
- background: "pink",
15
- borderRadius: 6,
16
- fontSize: 9,
17
- color: "black",
18
- fontFamily: "Cascadia, monospace",
19
- }, children: children }));
24
+ export const DropDownMenuItemBadgeType = {
25
+ GREEN: "green",
26
+ RED: "red",
27
+ BLUE: "blue",
28
+ };
29
+ export const DropDownMenuItemBadge = ({ type = DropDownMenuItemBadgeType.BLUE, children, }) => {
30
+ const { theme } = useExcalidrawAppState();
31
+ const style = {
32
+ display: "inline-flex",
33
+ marginLeft: "auto",
34
+ padding: "2px 4px",
35
+ borderRadius: 6,
36
+ fontSize: 9,
37
+ fontFamily: "Cascadia, monospace",
38
+ border: theme === THEME.LIGHT ? "1.5px solid white" : "none",
39
+ };
40
+ switch (type) {
41
+ case DropDownMenuItemBadgeType.GREEN:
42
+ Object.assign(style, {
43
+ backgroundColor: "var(--background-color-badge)",
44
+ color: "var(--color-badge)",
45
+ });
46
+ break;
47
+ case DropDownMenuItemBadgeType.RED:
48
+ Object.assign(style, {
49
+ backgroundColor: "pink",
50
+ color: "darkred",
51
+ });
52
+ break;
53
+ case DropDownMenuItemBadgeType.BLUE:
54
+ default:
55
+ Object.assign(style, {
56
+ background: "var(--color-promo)",
57
+ color: "var(--color-surface-lowest)",
58
+ });
59
+ }
60
+ return (_jsx("div", { className: "DropDownMenuItemBadge", style: style, children: children }));
20
61
  };
21
62
  DropDownMenuItemBadge.displayName = "DropdownMenuItemBadge";
22
63
  DropdownMenuItem.Badge = DropDownMenuItemBadge;
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
- declare const MenuItemContent: ({ icon, shortcut, children, }: {
2
+ declare const MenuItemContent: ({ textStyle, icon, shortcut, children, }: {
3
3
  icon?: JSX.Element | undefined;
4
4
  shortcut?: string | undefined;
5
+ textStyle?: import("react").CSSProperties | undefined;
5
6
  children: React.ReactNode;
6
7
  }) => JSX.Element;
7
8
  export default MenuItemContent;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useDevice } from "../App";
3
- const MenuItemContent = ({ icon, shortcut, children, }) => {
3
+ const MenuItemContent = ({ textStyle, icon, shortcut, children, }) => {
4
4
  const device = useDevice();
5
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "dropdown-menu-item__icon", children: icon }), _jsx("div", { className: "dropdown-menu-item__text", children: children }), shortcut && !device.editor.isMobile && (_jsx("div", { className: "dropdown-menu-item__shortcut", children: shortcut }))] }));
5
+ return (_jsxs(_Fragment, { children: [icon && _jsx("div", { className: "dropdown-menu-item__icon", children: icon }), _jsx("div", { style: textStyle, className: "dropdown-menu-item__text", children: children }), shortcut && !device.editor.isMobile && (_jsx("div", { className: "dropdown-menu-item__shortcut", children: shortcut }))] }));
6
6
  };
7
7
  export default MenuItemContent;
@@ -2,5 +2,5 @@ import React from "react";
2
2
  export declare const DropdownMenuContentPropsContext: React.Context<{
3
3
  onSelect?: ((event: Event) => void) | undefined;
4
4
  }>;
5
- export declare const getDropdownMenuItemClassName: (className?: string, selected?: boolean) => string;
5
+ export declare const getDropdownMenuItemClassName: (className?: string, selected?: boolean, hovered?: boolean) => string;
6
6
  export declare const useHandleDropdownMenuItemClick: (origOnClick: React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement> | undefined, onSelect: ((event: Event) => void) | undefined) => (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>) => void;
@@ -2,8 +2,9 @@ import React, { useContext } from "react";
2
2
  import { EVENT } from "../../constants";
3
3
  import { composeEventHandlers } from "../../utils";
4
4
  export const DropdownMenuContentPropsContext = React.createContext({});
5
- export const getDropdownMenuItemClassName = (className = "", selected = false) => {
6
- return `dropdown-menu-item dropdown-menu-item-base ${className} ${selected ? "dropdown-menu-item--selected" : ""}`.trim();
5
+ export const getDropdownMenuItemClassName = (className = "", selected = false, hovered = false) => {
6
+ return `dropdown-menu-item dropdown-menu-item-base ${className}
7
+ ${selected ? "dropdown-menu-item--selected" : ""} ${hovered ? "dropdown-menu-item--hovered" : ""}`.trim();
7
8
  };
8
9
  export const useHandleDropdownMenuItemClick = (origOnClick, onSelect) => {
9
10
  const DropdownMenuContentProps = useContext(DropdownMenuContentPropsContext);
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ActionManager } from "../../actions/manager";
3
- import { UIAppState } from "../../types";
2
+ import type { ActionManager } from "../../actions/manager";
3
+ import type { UIAppState } from "../../types";
4
4
  declare const Footer: {
5
5
  ({ appState, actionManager, showExitZenModeBtn, renderWelcomeScreen, }: {
6
6
  appState: UIAppState;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { AppState, ExcalidrawProps, UIAppState } from "../../types";
3
- import { ElementsMap, ExcalidrawEmbeddableElement, NonDeletedExcalidrawElement } from "../../element/types";
2
+ import type { AppState, ExcalidrawProps, UIAppState } from "../../types";
3
+ import type { ElementsMap, ExcalidrawEmbeddableElement, NonDeletedExcalidrawElement } from "../../element/types";
4
4
  import "./Hyperlink.scss";
5
5
  export declare const Hyperlink: ({ element, elementsMap, setAppState, onLinkOpen, setToast, updateEmbedValidationStatus, }: {
6
6
  element: NonDeletedExcalidrawElement;
@@ -1,6 +1,6 @@
1
- import { Bounds } from "../../element/bounds";
2
- import { ElementsMap, NonDeletedExcalidrawElement } from "../../element/types";
3
- import { AppState, UIAppState } from "../../types";
1
+ import type { Bounds } from "../../element/bounds";
2
+ import type { ElementsMap, NonDeletedExcalidrawElement } from "../../element/types";
3
+ import type { AppState, UIAppState } from "../../types";
4
4
  export declare const EXTERNAL_LINK_IMG: HTMLImageElement;
5
5
  export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: number, appState: Pick<UIAppState, "zoom">) => Bounds;
6
6
  export declare const isPointHittingLinkIcon: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: readonly [number, number]) => boolean;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { Theme } from "../element/types";
2
+ import type { Theme } from "../element/types";
3
3
  export declare const iconFillColor: (theme: Theme) => string;
4
4
  type Opts = {
5
5
  width?: number;
@@ -140,6 +140,7 @@ export declare const FontSizeMediumIcon: JSX.Element;
140
140
  export declare const FontSizeLargeIcon: JSX.Element;
141
141
  export declare const FontSizeExtraLargeIcon: JSX.Element;
142
142
  export declare const fontSizeIcon: JSX.Element;
143
+ export declare const FontFamilyHeadingIcon: JSX.Element;
143
144
  export declare const FontFamilyNormalIcon: JSX.Element;
144
145
  export declare const FontFamilyCodeIcon: JSX.Element;
145
146
  export declare const TextAlignLeftIcon: JSX.Element;
@@ -154,6 +155,7 @@ export declare const TextAlignBottomIcon: React.MemoExoticComponent<({ theme }:
154
155
  export declare const TextAlignMiddleIcon: React.MemoExoticComponent<({ theme }: {
155
156
  theme: Theme;
156
157
  }) => JSX.Element>;
158
+ export declare const angleIcon: JSX.Element;
157
159
  export declare const publishIcon: JSX.Element;
158
160
  export declare const eraser: JSX.Element;
159
161
  export declare const handIcon: JSX.Element;
@@ -195,7 +197,13 @@ export declare const pngIcon: JSX.Element;
195
197
  export declare const magnetIcon: JSX.Element;
196
198
  export declare const coffeeIcon: JSX.Element;
197
199
  export declare const DeviceDesktopIcon: JSX.Element;
198
- export declare const arrowBarToLeftIcon: JSX.Element;
200
+ export declare const loginIcon: JSX.Element;
199
201
  export declare const youtubeIcon: JSX.Element;
200
202
  export declare const gridIcon: JSX.Element;
203
+ export declare const lineEditorIcon: JSX.Element;
204
+ export declare const sharpArrowIcon: JSX.Element;
205
+ export declare const elbowArrowIcon: JSX.Element;
206
+ export declare const roundArrowIcon: JSX.Element;
207
+ export declare const collapseDownIcon: JSX.Element;
208
+ export declare const collapseUpIcon: JSX.Element;
201
209
  export {};
@@ -121,10 +121,22 @@ export const shareWindows = createIcon(_jsxs(_Fragment, { children: [_jsx("path"
121
121
  // Icon imported form Storybook
122
122
  // Storybook is licensed under MIT https://github.com/storybookjs/storybook/blob/next/LICENSE
123
123
  export const resetZoom = createIcon(_jsx("path", { stroke: "currentColor", strokeWidth: "40", fill: "currentColor", d: "M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z" }), { width: 1024 });
124
- export const BringForwardIcon = createIcon(_jsxs(_Fragment, { children: [_jsxs("g", { clipPath: "url(#a)", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z", fill: "currentColor" }), _jsx("path", { d: "M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "a", children: _jsx("path", { fill: "#fff", d: "M0 0h20v20H0z" }) }) })] }), modifiedTablerIconProps);
125
- export const SendBackwardIcon = createIcon(_jsxs(_Fragment, { children: [_jsxs("g", { clipPath: "url(#a)", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388", fill: "currentColor" }), _jsx("path", { d: "M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "a", children: _jsx("path", { fill: "#fff", d: "M0 0h20v20H0z" }) }) })] }), modifiedTablerIconProps);
126
- export const BringToFrontIcon = createIcon(_jsxs(_Fragment, { children: [_jsxs("g", { clipPath: "url(#a)", stroke: "currentColor", strokeWidth: "1.25", children: [_jsx("path", { d: "M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z", fill: "currentColor" }), _jsx("path", { d: "M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "a", children: _jsx("path", { fill: "#fff", d: "M0 0h20v20H0z" }) }) })] }), modifiedTablerIconProps);
127
- export const SendToBackIcon = createIcon(_jsxs(_Fragment, { children: [_jsxs("g", { clipPath: "url(#a)", children: [_jsx("path", { d: "M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z", stroke: "currentColor", strokeWidth: "1.25" }), _jsx("path", { d: "M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z", stroke: "currentColor", strokeWidth: "1.25" }), _jsx("mask", { id: "SendToBackIcon", fill: "#fff", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z" }) }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z", fill: "currentColor" }), _jsx("path", { d: "M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z", fill: "currentColor", mask: "url(#SendToBackIcon)" }), _jsx("path", { d: "M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z", stroke: "currentColor", strokeWidth: "1.25" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "a", children: _jsx("path", { fill: "#fff", d: "M0 0h20v20H0z" }) }) })] }), modifiedTablerIconProps);
124
+ const arrowBarToTopJSX = (_jsxs("g", { strokeWidth: 1.5, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M12 10l0 10" }), _jsx("path", { d: "M12 10l4 4" }), _jsx("path", { d: "M12 10l-4 4" }), _jsx("path", { d: "M4 4l16 0" })] }));
125
+ const arrownNarrowUpJSX = (_jsxs("g", { strokeWidth: 1.5, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M12 5l0 14" }), _jsx("path", { d: "M16 9l-4 -4" }), _jsx("path", { d: "M8 9l4 -4" })] }));
126
+ export const BringForwardIcon = createIcon(arrownNarrowUpJSX, tablerIconProps);
127
+ export const SendBackwardIcon = createIcon(arrownNarrowUpJSX, {
128
+ ...tablerIconProps,
129
+ style: {
130
+ transform: "rotate(180deg)",
131
+ },
132
+ });
133
+ export const BringToFrontIcon = createIcon(arrowBarToTopJSX, tablerIconProps);
134
+ export const SendToBackIcon = createIcon(arrowBarToTopJSX, {
135
+ ...tablerIconProps,
136
+ style: {
137
+ transform: "rotate(180deg)",
138
+ },
139
+ });
128
140
  //
129
141
  // Align action icons created from scratch to match those of z-index actions
130
142
  // Note: vertical align icons are flipped so the larger item is always the
@@ -189,6 +201,7 @@ export const FontSizeMediumIcon = createIcon(_jsxs(_Fragment, { children: [_jsx(
189
201
  export const FontSizeLargeIcon = createIcon(_jsxs(_Fragment, { children: [_jsx("g", { clipPath: "url(#a)", children: _jsx("path", { d: "M5.833 3.333v13.334h8.334", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }), _jsx("defs", { children: _jsx("clipPath", { id: "a", children: _jsx("path", { fill: "#fff", d: "M0 0h20v20H0z" }) }) })] }), modifiedTablerIconProps);
190
202
  export const FontSizeExtraLargeIcon = createIcon(_jsx(_Fragment, { children: _jsx("path", { d: "m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }), modifiedTablerIconProps);
191
203
  export const fontSizeIcon = createIcon(_jsxs("g", { strokeWidth: 1.25, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M3 7v-2h13v2" }), _jsx("path", { d: "M10 5v14" }), _jsx("path", { d: "M12 19h-4" }), _jsx("path", { d: "M15 13v-1h6v1" }), _jsx("path", { d: "M18 12v7" }), _jsx("path", { d: "M17 19h2" })] }), tablerIconProps);
204
+ export const FontFamilyHeadingIcon = createIcon(_jsx(_Fragment, { children: _jsxs("g", { stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M7 12h10" }), _jsx("path", { d: "M7 5v14" }), _jsx("path", { d: "M17 5v14" }), _jsx("path", { d: "M15 19h4" }), _jsx("path", { d: "M15 5h4" }), _jsx("path", { d: "M5 19h4" }), _jsx("path", { d: "M5 5h4" })] }) }), tablerIconProps);
192
205
  export const FontFamilyNormalIcon = createIcon(_jsx(_Fragment, { children: _jsx("g", { stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334" }) }) }), modifiedTablerIconProps);
193
206
  export const FontFamilyCodeIcon = createIcon(_jsxs(_Fragment, { children: [_jsx("g", { clipPath: "url(#a)", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667" }) }), _jsx("defs", { children: _jsx("clipPath", { id: "a", children: _jsx("path", { fill: "#fff", d: "M0 0h20v20H0z" }) }) })] }), modifiedTablerIconProps);
194
207
  export const TextAlignLeftIcon = createIcon(_jsxs("g", { stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("line", { x1: "4", y1: "8", x2: "20", y2: "8" }), _jsx("line", { x1: "4", y1: "12", x2: "12", y2: "12" }), _jsx("line", { x1: "4", y1: "16", x2: "16", y2: "16" })] }), tablerIconProps);
@@ -200,6 +213,7 @@ export const TextAlignTopIcon = React.memo(({ theme }) => createIcon(_jsxs("g",
200
213
  export const TextAlignBottomIcon = React.memo(({ theme }) => createIcon(_jsxs("g", { strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("line", { x1: "4", y1: "20", x2: "20", y2: "20" }), _jsx("rect", { x: "9", y: "4", width: "6", height: "12", rx: "2" })] }), tablerIconProps));
201
214
  // tabler-icons: layout-align-middle
202
215
  export const TextAlignMiddleIcon = React.memo(({ theme }) => createIcon(_jsxs("g", { strokeWidth: "1.5", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("line", { x1: "4", y1: "12", x2: "9", y2: "12" }), _jsx("line", { x1: "15", y1: "12", x2: "20", y2: "12" }), _jsx("rect", { x: "9", y: "6", width: "6", height: "12", rx: "2" })] }), tablerIconProps));
216
+ export const angleIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M21 19h-18l9 -15" }), _jsx("path", { d: "M20.615 15.171h.015" }), _jsx("path", { d: "M19.515 11.771h.015" }), _jsx("path", { d: "M17.715 8.671h.015" }), _jsx("path", { d: "M15.415 5.971h.015" })] }), tablerIconProps);
203
217
  export const publishIcon = createIcon(_jsx("path", { d: "M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z", fill: "currentColor" }), { width: 640, height: 512 });
204
218
  export const eraser = createIcon(_jsx("path", { d: "M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z" }));
205
219
  export const handIcon = createIcon(_jsxs("g", { strokeWidth: 1.25, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5" }), _jsx("path", { d: "M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5" }), _jsx("path", { d: "M14 5.5a1.5 1.5 0 0 1 3 0v6.5" }), _jsx("path", { d: "M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47" })] }), tablerIconProps);
@@ -241,7 +255,16 @@ export const pngIcon = createIcon(_jsxs("g", { strokeWidth: 1.25, children: [_js
241
255
  export const magnetIcon = createIcon(_jsxs("g", { strokeWidth: 1.25, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0" }), _jsx("path", { d: "M4 8l5 0" }), _jsx("path", { d: "M15 8l4 0" })] }), tablerIconProps);
242
256
  export const coffeeIcon = createIcon(_jsxs("g", { strokeWidth: 1.25, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1" }), _jsx("path", { d: "M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2" }), _jsx("path", { d: "M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2" }), _jsx("path", { d: "M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z" }), _jsx("path", { d: "M16.746 16.726a3 3 0 1 0 .252 -5.555" })] }), tablerIconProps);
243
257
  export const DeviceDesktopIcon = createIcon(_jsxs("g", { stroke: "currentColor", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4" })] }), { ...tablerIconProps, strokeWidth: 1.5 });
244
- // arrow-bar-to-left
245
- export const arrowBarToLeftIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M10 12l10 0" }), _jsx("path", { d: "M10 12l4 4" }), _jsx("path", { d: "M10 12l4 -4" }), _jsx("path", { d: "M4 4l0 16" })] }), tablerIconProps);
258
+ // login
259
+ export const loginIcon = createIcon(_jsxs("g", { strokeWidth: 1.5, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" }), _jsx("path", { d: "M21 12h-13l3 -3" }), _jsx("path", { d: "M11 15l-3 -3" })] }), tablerIconProps);
246
260
  export const youtubeIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z" }), _jsx("path", { d: "M10 9l5 3l-5 3z" })] }), tablerIconProps);
247
261
  export const gridIcon = createIcon(_jsxs("g", { strokeWidth: 1.5, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M3 6h18" }), _jsx("path", { d: "M3 12h18" }), _jsx("path", { d: "M3 18h18" }), _jsx("path", { d: "M6 3v18" }), _jsx("path", { d: "M12 3v18" }), _jsx("path", { d: "M18 3v18" })] }), tablerIconProps);
262
+ export const lineEditorIcon = createIcon(_jsxs("g", { strokeWidth: 1.5, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z" }), _jsx("path", { d: "M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z" }), _jsx("path", { d: "M17 5c-6.627 0 -12 5.373 -12 12" })] }), tablerIconProps);
263
+ // arrow-up-right (modified)
264
+ export const sharpArrowIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M6 18l12 -12" }), _jsx("path", { d: "M18 10v-4h-4" })] }), tablerIconProps);
265
+ // arrow-guide (modified)
266
+ export const elbowArrowIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7" }), _jsx("path", { d: "M18 4l3 3l-3 3" })] }), tablerIconProps);
267
+ // arrow-ramp-right-2 (heavily modified)
268
+ export const roundArrowIcon = createIcon(_jsxs("g", { children: [_jsx("path", { d: "M16,12L20,9L16,6" }), _jsx("path", { d: "M6 20c0 -6.075 4.925 -11 11 -11h3" })] }), tablerIconProps);
269
+ export const collapseDownIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M6 9l6 6l6 -6" })] }), tablerIconProps);
270
+ export const collapseUpIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M6 15l6 -6l6 6" })] }), tablerIconProps);
@@ -19,17 +19,26 @@ declare const MainMenu: React.FC<{
19
19
  displayName: string;
20
20
  };
21
21
  Item: {
22
- ({ icon, onSelect, children, shortcut, className, selected, ...rest }: {
22
+ ({ icon, value, order, children, shortcut, className, hovered, selected, textStyle, onSelect, onClick, ...rest }: {
23
23
  icon?: JSX.Element | undefined;
24
- onSelect: (event: Event) => void;
24
+ value?: string | number | undefined;
25
+ order?: number | undefined;
26
+ onSelect?: ((event: Event) => void) | undefined;
25
27
  children: React.ReactNode;
26
28
  shortcut?: string | undefined;
29
+ hovered?: boolean | undefined;
27
30
  selected?: boolean | undefined;
31
+ textStyle?: React.CSSProperties | undefined;
28
32
  className?: string | undefined;
29
33
  } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): JSX.Element;
30
34
  displayName: string;
31
35
  Badge: {
32
- ({ children, }: {
36
+ ({ type, children, }: {
37
+ type?: import("../../utility-types").ValueOf<{
38
+ readonly GREEN: "green";
39
+ readonly RED: "red";
40
+ readonly BLUE: "blue";
41
+ }> | undefined;
33
42
  children: React.ReactNode;
34
43
  }): JSX.Element;
35
44
  displayName: string;
@@ -26,11 +26,11 @@ const Center = ({ children }) => {
26
26
  };
27
27
  Center.displayName = "Center";
28
28
  const Logo = ({ children }) => {
29
- return (_jsx("div", { className: "welcome-screen-center__logo virgil welcome-screen-decor", children: children || _jsx(ExcalidrawLogo, { withText: true }) }));
29
+ return (_jsx("div", { className: "welcome-screen-center__logo excalifont welcome-screen-decor", children: children || _jsx(ExcalidrawLogo, { withText: true }) }));
30
30
  };
31
31
  Logo.displayName = "Logo";
32
32
  const Heading = ({ children }) => {
33
- return (_jsx("div", { className: "welcome-screen-center__heading welcome-screen-decor virgil", children: children }));
33
+ return (_jsx("div", { className: "welcome-screen-center__heading welcome-screen-decor excalifont", children: children }));
34
34
  };
35
35
  Heading.displayName = "Heading";
36
36
  const Menu = ({ children }) => {
@@ -4,17 +4,17 @@ import { useTunnels } from "../../context/tunnels";
4
4
  import { WelcomeScreenHelpArrow, WelcomeScreenMenuArrow, WelcomeScreenTopToolbarArrow, } from "../icons";
5
5
  const MenuHint = ({ children }) => {
6
6
  const { WelcomeScreenMenuHintTunnel } = useTunnels();
7
- return (_jsx(WelcomeScreenMenuHintTunnel.In, { children: _jsxs("div", { className: "virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu", children: [WelcomeScreenMenuArrow, _jsx("div", { className: "welcome-screen-decor-hint__label", children: children || t("welcomeScreen.defaults.menuHint") })] }) }));
7
+ return (_jsx(WelcomeScreenMenuHintTunnel.In, { children: _jsxs("div", { className: "excalifont welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu", children: [WelcomeScreenMenuArrow, _jsx("div", { className: "welcome-screen-decor-hint__label", children: children || t("welcomeScreen.defaults.menuHint") })] }) }));
8
8
  };
9
9
  MenuHint.displayName = "MenuHint";
10
10
  const ToolbarHint = ({ children }) => {
11
11
  const { WelcomeScreenToolbarHintTunnel } = useTunnels();
12
- return (_jsx(WelcomeScreenToolbarHintTunnel.In, { children: _jsxs("div", { className: "virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar", children: [_jsx("div", { className: "welcome-screen-decor-hint__label", children: children || t("welcomeScreen.defaults.toolbarHint") }), WelcomeScreenTopToolbarArrow] }) }));
12
+ return (_jsx(WelcomeScreenToolbarHintTunnel.In, { children: _jsxs("div", { className: "excalifont welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar", children: [_jsx("div", { className: "welcome-screen-decor-hint__label", children: children || t("welcomeScreen.defaults.toolbarHint") }), WelcomeScreenTopToolbarArrow] }) }));
13
13
  };
14
14
  ToolbarHint.displayName = "ToolbarHint";
15
15
  const HelpHint = ({ children }) => {
16
16
  const { WelcomeScreenHelpHintTunnel } = useTunnels();
17
- return (_jsx(WelcomeScreenHelpHintTunnel.In, { children: _jsxs("div", { className: "virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help", children: [_jsx("div", { children: children || t("welcomeScreen.defaults.helpHint") }), WelcomeScreenHelpArrow] }) }));
17
+ return (_jsx(WelcomeScreenHelpHintTunnel.In, { children: _jsxs("div", { className: "excalifont welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help", children: [_jsx("div", { children: children || t("welcomeScreen.defaults.helpHint") }), WelcomeScreenHelpArrow] }) }));
18
18
  };
19
19
  HelpHint.displayName = "HelpHint";
20
20
  export { HelpHint, MenuHint, ToolbarHint };
@@ -1,5 +1,5 @@
1
- import { AppProps } from "./types";
2
- import { ExcalidrawElement, FontFamilyValues } from "./element/types";
1
+ import type { AppProps, AppState } from "./types";
2
+ import type { ExcalidrawElement, FontFamilyValues } from "./element/types";
3
3
  export declare const isDarwin: boolean;
4
4
  export declare const isWindows: boolean;
5
5
  export declare const isAndroid: boolean;
@@ -10,6 +10,7 @@ export declare const isIOS: boolean;
10
10
  export declare const isBrave: () => boolean;
11
11
  export declare const supportsResizeObserver: boolean;
12
12
  export declare const APP_NAME = "Excalidraw";
13
+ export declare const TEXT_AUTOWRAP_THRESHOLD = 36;
13
14
  export declare const DRAGGING_THRESHOLD = 10;
14
15
  export declare const LINE_CONFIRM_THRESHOLD = 8;
15
16
  export declare const ELEMENT_SHIFT_TRANSLATE_AMOUNT = 5;
@@ -85,11 +86,23 @@ export declare const ENV: {
85
86
  export declare const CLASSES: {
86
87
  SHAPE_ACTIONS_MENU: string;
87
88
  };
89
+ /**
90
+ * // TODO: shouldn't be really `const`, likely neither have integers as values, due to value for the custom fonts, which should likely be some hash.
91
+ *
92
+ * Let's think this through and consider:
93
+ * - https://developer.mozilla.org/en-US/docs/Web/CSS/generic-family
94
+ * - https://drafts.csswg.org/css-fonts-4/#font-family-prop
95
+ * - https://learn.microsoft.com/en-us/typography/opentype/spec/ibmfc
96
+ */
88
97
  export declare const FONT_FAMILY: {
89
98
  Virgil: number;
90
99
  Helvetica: number;
91
100
  Cascadia: number;
92
- Assistant: number;
101
+ Excalifont: number;
102
+ Nunito: number;
103
+ "Lilita One": number;
104
+ "Comic Shanns": number;
105
+ "Liberation Sans": number;
93
106
  };
94
107
  export declare const THEME: {
95
108
  readonly LIGHT: "light";
@@ -279,3 +292,11 @@ export declare const EDITOR_LS_KEYS: {
279
292
  * where filename is optional and we can't retrieve name from app state
280
293
  */
281
294
  export declare const DEFAULT_FILENAME = "Untitled";
295
+ export declare const STATS_PANELS: {
296
+ readonly generalStats: 1;
297
+ readonly elementProperties: 2;
298
+ };
299
+ export declare const MIN_WIDTH_OR_HEIGHT = 1;
300
+ export declare const ARROW_TYPE: {
301
+ [T in AppState["currentItemArrowType"]]: T;
302
+ };
@@ -15,6 +15,11 @@ export const isIOS = /iPad|iPhone/.test(navigator.platform) ||
15
15
  export const isBrave = () => navigator.brave?.isBrave?.name === "isBrave";
16
16
  export const supportsResizeObserver = typeof window !== "undefined" && "ResizeObserver" in window;
17
17
  export const APP_NAME = "Excalidraw";
18
+ // distance when creating text before it's considered `autoResize: false`
19
+ // we're using higher threshold so that clicks that end up being drags
20
+ // don't unintentionally create text elements that are wrapped to a few chars
21
+ // (happens a lot with fast clicks with the text tool)
22
+ export const TEXT_AUTOWRAP_THRESHOLD = 36; // px
18
23
  export const DRAGGING_THRESHOLD = 10; // px
19
24
  export const LINE_CONFIRM_THRESHOLD = 8; // px
20
25
  export const ELEMENT_SHIFT_TRANSLATE_AMOUNT = 5;
@@ -94,12 +99,24 @@ export const ENV = {
94
99
  export const CLASSES = {
95
100
  SHAPE_ACTIONS_MENU: "App-menu__left",
96
101
  };
97
- // 1-based in case we ever do `if(element.fontFamily)`
102
+ /**
103
+ * // TODO: shouldn't be really `const`, likely neither have integers as values, due to value for the custom fonts, which should likely be some hash.
104
+ *
105
+ * Let's think this through and consider:
106
+ * - https://developer.mozilla.org/en-US/docs/Web/CSS/generic-family
107
+ * - https://drafts.csswg.org/css-fonts-4/#font-family-prop
108
+ * - https://learn.microsoft.com/en-us/typography/opentype/spec/ibmfc
109
+ */
98
110
  export const FONT_FAMILY = {
99
111
  Virgil: 1,
100
112
  Helvetica: 2,
101
113
  Cascadia: 3,
102
- Assistant: 4,
114
+ // leave 4 unused as it was historically used for Assistant (which we don't use anymore) or custom font (Obsidian)
115
+ Excalifont: 5,
116
+ Nunito: 6,
117
+ "Lilita One": 7,
118
+ "Comic Shanns": 8,
119
+ "Liberation Sans": 9,
103
120
  };
104
121
  export const THEME = {
105
122
  LIGHT: "light",
@@ -123,7 +140,7 @@ export const FRAME_STYLE = {
123
140
  export const WINDOWS_EMOJI_FALLBACK_FONT = "Segoe UI Emoji";
124
141
  export const MIN_FONT_SIZE = 1;
125
142
  export const DEFAULT_FONT_SIZE = 20;
126
- export const DEFAULT_FONT_FAMILY = FONT_FAMILY.Virgil;
143
+ export const DEFAULT_FONT_FAMILY = FONT_FAMILY.Excalifont;
127
144
  export const DEFAULT_TEXT_ALIGN = "left";
128
145
  export const DEFAULT_VERTICAL_ALIGN = "top";
129
146
  export const DEFAULT_VERSION = "{version}";
@@ -226,7 +243,7 @@ export const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
226
243
  export const EXPORT_SCALES = [1, 2, 3];
227
244
  export const DEFAULT_EXPORT_PADDING = 10; // px
228
245
  export const DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT = 1440;
229
- export const MAX_ALLOWED_FILE_BYTES = 2 * 1024 * 1024;
246
+ export const MAX_ALLOWED_FILE_BYTES = 4 * 1024 * 1024;
230
247
  export const SVG_NS = "http://www.w3.org/2000/svg";
231
248
  export const ENCRYPTION_KEY_BITS = 128;
232
249
  export const VERSIONS = {
@@ -329,3 +346,10 @@ export const EDITOR_LS_KEYS = {
329
346
  * where filename is optional and we can't retrieve name from app state
330
347
  */
331
348
  export const DEFAULT_FILENAME = "Untitled";
349
+ export const STATS_PANELS = { generalStats: 1, elementProperties: 2 };
350
+ export const MIN_WIDTH_OR_HEIGHT = 1;
351
+ export const ARROW_TYPE = {
352
+ sharp: "sharp",
353
+ round: "round",
354
+ elbow: "elbow",
355
+ };
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import { UIAppState } from "../types";
2
+ import type { UIAppState } from "../types";
3
3
  export declare const UIAppStateContext: React.Context<UIAppState>;
4
4
  export declare const useUIAppState: () => UIAppState;
@@ -1,4 +1,4 @@
1
- import { AppState } from "./types";
1
+ import type { AppState } from "./types";
2
2
  export declare const resetCursor: (interactiveCanvas: HTMLCanvasElement | null) => void;
3
3
  export declare const setCursor: (interactiveCanvas: HTMLCanvasElement | null, cursor: string) => void;
4
4
  export declare const setEraserCursor: (interactiveCanvas: HTMLCanvasElement | null, theme: AppState["theme"]) => void;
@@ -1,5 +1,5 @@
1
- import { EDITOR_LS_KEYS } from "../constants";
2
- import { JSONValue } from "../types";
1
+ import type { EDITOR_LS_KEYS } from "../constants";
2
+ import type { JSONValue } from "../types";
3
3
  export declare class EditorLocalStorage {
4
4
  static has(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]): boolean;
5
5
  static get<T extends JSONValue>(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]): T | null;
@@ -1,9 +1,9 @@
1
1
  import { IMAGE_MIME_TYPES, MIME_TYPES } from "../constants";
2
- import { ExcalidrawElement, FileId } from "../element/types";
3
- import { AppState, DataURL, LibraryItem } from "../types";
4
- import { ValueOf } from "../utility-types";
5
- import { FileSystemHandle } from "./filesystem";
6
- import { ImportedLibraryData } from "./types";
2
+ import type { ExcalidrawElement, FileId } from "../element/types";
3
+ import type { AppState, DataURL, LibraryItem } from "../types";
4
+ import type { ValueOf } from "../utility-types";
5
+ import type { FileSystemHandle } from "./filesystem";
6
+ import type { ImportedLibraryData } from "./types";
7
7
  export declare const getMimeType: (blob: Blob | string) => string;
8
8
  export declare const getFileHandleType: (handle: FileSystemHandle | null) => string | null;
9
9
  export declare const isImageFileHandleType: (type: string | null) => type is "png" | "svg";
@@ -1,4 +1,5 @@
1
- import { FileSystemHandle, supported as nativeFileSystemSupported } from "browser-fs-access";
1
+ import type { FileSystemHandle } from "browser-fs-access";
2
+ import { supported as nativeFileSystemSupported } from "browser-fs-access";
2
3
  import { MIME_TYPES } from "../constants";
3
4
  type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">;
4
5
  export declare const fileOpen: <M extends boolean | undefined = false>(opts: {
@@ -1,7 +1,7 @@
1
- import { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "../element/types";
2
- import { ExportType } from "../scene/types";
3
- import { AppState, BinaryFiles } from "../types";
4
- import { FileSystemHandle } from "./filesystem";
1
+ import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "../element/types";
2
+ import type { ExportType } from "../scene/types";
3
+ import type { AppState, BinaryFiles } from "../types";
4
+ import type { FileSystemHandle } from "./filesystem";
5
5
  export { loadFromBlob } from "./blob";
6
6
  export { loadFromJSON, saveAsJSON } from "./json";
7
7
  export type ExportedElements = readonly NonDeletedExcalidrawElement[] & {
@@ -1,6 +1,6 @@
1
- import { ExcalidrawElement } from "../element/types";
2
- import { AppState, BinaryFiles, LibraryItems } from "../types";
3
- import { ImportedDataState, ImportedLibraryData } from "./types";
1
+ import type { ExcalidrawElement } from "../element/types";
2
+ import type { AppState, BinaryFiles, LibraryItems } from "../types";
3
+ import type { ImportedDataState, ImportedLibraryData } from "./types";
4
4
  export declare const serializeAsJSON: (elements: readonly ExcalidrawElement[], appState: Partial<AppState>, files: BinaryFiles, type: "local" | "database") => string;
5
5
  export declare const saveAsJSON: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles, name?: string) => Promise<{
6
6
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
@@ -1,7 +1,7 @@
1
- import { LibraryItems, ExcalidrawImperativeAPI, LibraryItemsSource, LibraryItems_anyVersion } from "../types";
1
+ import type { LibraryItems, ExcalidrawImperativeAPI, LibraryItemsSource, LibraryItems_anyVersion } from "../types";
2
2
  import type App from "../components/App";
3
- import { ExcalidrawElement } from "../element/types";
4
- import { MaybePromise } from "../utility-types";
3
+ import type { ExcalidrawElement } from "../element/types";
4
+ import type { MaybePromise } from "../utility-types";
5
5
  export type LibraryPersistedData = {
6
6
  libraryItems: LibraryItems;
7
7
  };
@@ -1,6 +1,6 @@
1
- import { Theme } from "../element/types";
2
- import { DataURL } from "../types";
3
- import { OpenAIOutput } from "./ai/types";
1
+ import type { Theme } from "../element/types";
2
+ import type { DataURL } from "../types";
3
+ import type { OpenAIOutput } from "./ai/types";
4
4
  export type MagicCacheData = {
5
5
  status: "pending";
6
6
  } | {
@@ -1,6 +1,6 @@
1
- import { OrderedExcalidrawElement } from "../element/types";
2
- import { AppState } from "../types";
3
- import { MakeBrand } from "../utility-types";
1
+ import type { OrderedExcalidrawElement } from "../element/types";
2
+ import type { AppState } from "../types";
3
+ import type { MakeBrand } from "../utility-types";
4
4
  export type ReconciledExcalidrawElement = OrderedExcalidrawElement & MakeBrand<"ReconciledElement">;
5
5
  export type RemoteExcalidrawElement = OrderedExcalidrawElement & MakeBrand<"RemoteExcalidrawElement">;
6
6
  export declare const reconcileElements: (localElements: readonly OrderedExcalidrawElement[], remoteElements: readonly RemoteExcalidrawElement[], localAppState: AppState) => ReconciledExcalidrawElement[];
@@ -1,4 +1,5 @@
1
- import { orderByFractionalIndex, syncInvalidIndices } from "../fractionalIndex";
1
+ import { ENV } from "../constants";
2
+ import { orderByFractionalIndex, syncInvalidIndices, validateFractionalIndices, } from "../fractionalIndex";
2
3
  import { arrayToMap } from "../utils";
3
4
  const shouldDiscardRemoteElement = (localAppState, local, remote) => {
4
5
  if (local &&
@@ -43,6 +44,22 @@ export const reconcileElements = (localElements, remoteElements, localAppState)
43
44
  }
44
45
  }
45
46
  const orderedElements = orderByFractionalIndex(reconciledElements);
47
+ if (import.meta.env.DEV ||
48
+ import.meta.env.MODE === ENV.TEST ||
49
+ window?.DEBUG_FRACTIONAL_INDICES) {
50
+ const elements = syncInvalidIndices(
51
+ // create new instances due to the mutation
52
+ orderedElements.map((x) => ({ ...x })));
53
+ validateFractionalIndices(elements, {
54
+ // throw in dev & test only, to remain functional on `DEBUG_FRACTIONAL_INDICES`
55
+ shouldThrow: import.meta.env.DEV || import.meta.env.MODE === ENV.TEST,
56
+ includeBoundTextValidation: true,
57
+ reconciliationContext: {
58
+ localElements,
59
+ remoteElements,
60
+ },
61
+ });
62
+ }
46
63
  // de-duplicate indices
47
64
  syncInvalidIndices(orderedElements);
48
65
  return orderedElements;