telva 1.0.1

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 (587) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +298 -0
  3. package/dist/Telva.d.ts +98 -0
  4. package/dist/Telva.d.ts.map +1 -0
  5. package/dist/components/CenterToolbar/CenterToolbar.d.ts +3 -0
  6. package/dist/components/CenterToolbar/CenterToolbar.d.ts.map +1 -0
  7. package/dist/components/CenterToolbar/index.d.ts +2 -0
  8. package/dist/components/CenterToolbar/index.d.ts.map +1 -0
  9. package/dist/components/ContextMenu/ContextMenu.d.ts +18 -0
  10. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -0
  11. package/dist/components/ContextMenu/index.d.ts +2 -0
  12. package/dist/components/ContextMenu/index.d.ts.map +1 -0
  13. package/dist/components/ErrorFallback/ErrorFallback.d.ts +3 -0
  14. package/dist/components/ErrorFallback/ErrorFallback.d.ts.map +1 -0
  15. package/dist/components/ErrorFallback/index.d.ts +2 -0
  16. package/dist/components/ErrorFallback/index.d.ts.map +1 -0
  17. package/dist/components/FocusButton/FocusButton.d.ts +6 -0
  18. package/dist/components/FocusButton/FocusButton.d.ts.map +1 -0
  19. package/dist/components/FocusButton/index.d.ts +2 -0
  20. package/dist/components/FocusButton/index.d.ts.map +1 -0
  21. package/dist/components/LeftPanel/ComponentsTab.d.ts +7 -0
  22. package/dist/components/LeftPanel/ComponentsTab.d.ts.map +1 -0
  23. package/dist/components/LeftPanel/LayersPanel.d.ts +3 -0
  24. package/dist/components/LeftPanel/LayersPanel.d.ts.map +1 -0
  25. package/dist/components/LeftPanel/LeftPanel.d.ts +3 -0
  26. package/dist/components/LeftPanel/LeftPanel.d.ts.map +1 -0
  27. package/dist/components/LeftPanel/index.d.ts +3 -0
  28. package/dist/components/LeftPanel/index.d.ts.map +1 -0
  29. package/dist/components/Loading/Loading.d.ts +2 -0
  30. package/dist/components/Loading/Loading.d.ts.map +1 -0
  31. package/dist/components/Loading/index.d.ts +2 -0
  32. package/dist/components/Loading/index.d.ts.map +1 -0
  33. package/dist/components/Primitives/AlertDialog/AlertDialog.d.ts +665 -0
  34. package/dist/components/Primitives/AlertDialog/AlertDialog.d.ts.map +1 -0
  35. package/dist/components/Primitives/AlertDialog/FilenameDialog.d.ts +7 -0
  36. package/dist/components/Primitives/AlertDialog/FilenameDialog.d.ts.map +1 -0
  37. package/dist/components/Primitives/AlertDialog/index.d.ts +3 -0
  38. package/dist/components/Primitives/AlertDialog/index.d.ts.map +1 -0
  39. package/dist/components/Primitives/Divider/Divider.d.ts +217 -0
  40. package/dist/components/Primitives/Divider/Divider.d.ts.map +1 -0
  41. package/dist/components/Primitives/Divider/index.d.ts +2 -0
  42. package/dist/components/Primitives/Divider/index.d.ts.map +1 -0
  43. package/dist/components/Primitives/DropdownMenu/DMCheckboxItem.d.ts +15 -0
  44. package/dist/components/Primitives/DropdownMenu/DMCheckboxItem.d.ts.map +1 -0
  45. package/dist/components/Primitives/DropdownMenu/DMContent.d.ts +450 -0
  46. package/dist/components/Primitives/DropdownMenu/DMContent.d.ts.map +1 -0
  47. package/dist/components/Primitives/DropdownMenu/DMDivider.d.ts +217 -0
  48. package/dist/components/Primitives/DropdownMenu/DMDivider.d.ts.map +1 -0
  49. package/dist/components/Primitives/DropdownMenu/DMItem.d.ts +6 -0
  50. package/dist/components/Primitives/DropdownMenu/DMItem.d.ts.map +1 -0
  51. package/dist/components/Primitives/DropdownMenu/DMRadioItem.d.ts +220 -0
  52. package/dist/components/Primitives/DropdownMenu/DMRadioItem.d.ts.map +1 -0
  53. package/dist/components/Primitives/DropdownMenu/DMSubMenu.d.ts +11 -0
  54. package/dist/components/Primitives/DropdownMenu/DMSubMenu.d.ts.map +1 -0
  55. package/dist/components/Primitives/DropdownMenu/DMTriggerIcon.d.ts +9 -0
  56. package/dist/components/Primitives/DropdownMenu/DMTriggerIcon.d.ts.map +1 -0
  57. package/dist/components/Primitives/DropdownMenu/index.d.ts +8 -0
  58. package/dist/components/Primitives/DropdownMenu/index.d.ts.map +1 -0
  59. package/dist/components/Primitives/IconButton/IconButton.d.ts +221 -0
  60. package/dist/components/Primitives/IconButton/IconButton.d.ts.map +1 -0
  61. package/dist/components/Primitives/IconButton/index.d.ts +2 -0
  62. package/dist/components/Primitives/IconButton/index.d.ts.map +1 -0
  63. package/dist/components/Primitives/Kbd/Kbd.d.ts +223 -0
  64. package/dist/components/Primitives/Kbd/Kbd.d.ts.map +1 -0
  65. package/dist/components/Primitives/Kbd/index.d.ts +2 -0
  66. package/dist/components/Primitives/Kbd/index.d.ts.map +1 -0
  67. package/dist/components/Primitives/MenuContent/MenuContent.d.ts +220 -0
  68. package/dist/components/Primitives/MenuContent/MenuContent.d.ts.map +1 -0
  69. package/dist/components/Primitives/MenuContent/index.d.ts +2 -0
  70. package/dist/components/Primitives/MenuContent/index.d.ts.map +1 -0
  71. package/dist/components/Primitives/Panel/Panel.d.ts +219 -0
  72. package/dist/components/Primitives/Panel/Panel.d.ts.map +1 -0
  73. package/dist/components/Primitives/Panel/index.d.ts +2 -0
  74. package/dist/components/Primitives/Panel/index.d.ts.map +1 -0
  75. package/dist/components/Primitives/RowButton/RowButton.d.ts +237 -0
  76. package/dist/components/Primitives/RowButton/RowButton.d.ts.map +1 -0
  77. package/dist/components/Primitives/RowButton/index.d.ts +2 -0
  78. package/dist/components/Primitives/RowButton/index.d.ts.map +1 -0
  79. package/dist/components/Primitives/SmallIcon/SmallIcon.d.ts +217 -0
  80. package/dist/components/Primitives/SmallIcon/SmallIcon.d.ts.map +1 -0
  81. package/dist/components/Primitives/SmallIcon/index.d.ts +2 -0
  82. package/dist/components/Primitives/SmallIcon/index.d.ts.map +1 -0
  83. package/dist/components/Primitives/TextField/TextField.d.ts +6 -0
  84. package/dist/components/Primitives/TextField/TextField.d.ts.map +1 -0
  85. package/dist/components/Primitives/TextField/index.d.ts +2 -0
  86. package/dist/components/Primitives/TextField/index.d.ts.map +1 -0
  87. package/dist/components/Primitives/ToolButton/ToolButton.d.ts +459 -0
  88. package/dist/components/Primitives/ToolButton/ToolButton.d.ts.map +1 -0
  89. package/dist/components/Primitives/ToolButton/index.d.ts +2 -0
  90. package/dist/components/Primitives/ToolButton/index.d.ts.map +1 -0
  91. package/dist/components/Primitives/Tooltip/Tooltip.d.ts +11 -0
  92. package/dist/components/Primitives/Tooltip/Tooltip.d.ts.map +1 -0
  93. package/dist/components/Primitives/Tooltip/index.d.ts +2 -0
  94. package/dist/components/Primitives/Tooltip/index.d.ts.map +1 -0
  95. package/dist/components/Primitives/icons/BoxIcon.d.ts +6 -0
  96. package/dist/components/Primitives/icons/BoxIcon.d.ts.map +1 -0
  97. package/dist/components/Primitives/icons/CircleIcon.d.ts +5 -0
  98. package/dist/components/Primitives/icons/CircleIcon.d.ts.map +1 -0
  99. package/dist/components/Primitives/icons/DashDashedIcon.d.ts +2 -0
  100. package/dist/components/Primitives/icons/DashDashedIcon.d.ts.map +1 -0
  101. package/dist/components/Primitives/icons/DashDottedIcon.d.ts +2 -0
  102. package/dist/components/Primitives/icons/DashDottedIcon.d.ts.map +1 -0
  103. package/dist/components/Primitives/icons/DashDrawIcon.d.ts +2 -0
  104. package/dist/components/Primitives/icons/DashDrawIcon.d.ts.map +1 -0
  105. package/dist/components/Primitives/icons/DashSolidIcon.d.ts +2 -0
  106. package/dist/components/Primitives/icons/DashSolidIcon.d.ts.map +1 -0
  107. package/dist/components/Primitives/icons/DiscordIcon.d.ts +2 -0
  108. package/dist/components/Primitives/icons/DiscordIcon.d.ts.map +1 -0
  109. package/dist/components/Primitives/icons/EraserIcon.d.ts +2 -0
  110. package/dist/components/Primitives/icons/EraserIcon.d.ts.map +1 -0
  111. package/dist/components/Primitives/icons/LineIcon.d.ts +2 -0
  112. package/dist/components/Primitives/icons/LineIcon.d.ts.map +1 -0
  113. package/dist/components/Primitives/icons/MultiplayerIcon2.d.ts +2 -0
  114. package/dist/components/Primitives/icons/MultiplayerIcon2.d.ts.map +1 -0
  115. package/dist/components/Primitives/icons/SizeLargeIcon.d.ts +3 -0
  116. package/dist/components/Primitives/icons/SizeLargeIcon.d.ts.map +1 -0
  117. package/dist/components/Primitives/icons/SizeMediumIcon.d.ts +3 -0
  118. package/dist/components/Primitives/icons/SizeMediumIcon.d.ts.map +1 -0
  119. package/dist/components/Primitives/icons/SizeSmallIcon.d.ts +3 -0
  120. package/dist/components/Primitives/icons/SizeSmallIcon.d.ts.map +1 -0
  121. package/dist/components/Primitives/icons/TrashIcon.d.ts +3 -0
  122. package/dist/components/Primitives/icons/TrashIcon.d.ts.map +1 -0
  123. package/dist/components/Primitives/icons/UndoIcon.d.ts +5 -0
  124. package/dist/components/Primitives/icons/UndoIcon.d.ts.map +1 -0
  125. package/dist/components/Primitives/icons/index.d.ts +15 -0
  126. package/dist/components/Primitives/icons/index.d.ts.map +1 -0
  127. package/dist/components/RightPanel/ColorPicker.d.ts +27 -0
  128. package/dist/components/RightPanel/ColorPicker.d.ts.map +1 -0
  129. package/dist/components/RightPanel/DraggableInput.d.ts +15 -0
  130. package/dist/components/RightPanel/DraggableInput.d.ts.map +1 -0
  131. package/dist/components/RightPanel/GradientPicker.d.ts +22 -0
  132. package/dist/components/RightPanel/GradientPicker.d.ts.map +1 -0
  133. package/dist/components/RightPanel/PropertiesPanel.d.ts +3 -0
  134. package/dist/components/RightPanel/PropertiesPanel.d.ts.map +1 -0
  135. package/dist/components/RightPanel/RightPanel.d.ts +3 -0
  136. package/dist/components/RightPanel/RightPanel.d.ts.map +1 -0
  137. package/dist/components/RightPanel/googleFonts.d.ts +39 -0
  138. package/dist/components/RightPanel/googleFonts.d.ts.map +1 -0
  139. package/dist/components/RightPanel/index.d.ts +6 -0
  140. package/dist/components/RightPanel/index.d.ts.map +1 -0
  141. package/dist/components/ToolsPanel/ActionButton.d.ts +218 -0
  142. package/dist/components/ToolsPanel/ActionButton.d.ts.map +1 -0
  143. package/dist/components/ToolsPanel/BackToContent.d.ts +3 -0
  144. package/dist/components/ToolsPanel/BackToContent.d.ts.map +1 -0
  145. package/dist/components/ToolsPanel/DeleteButton.d.ts +2 -0
  146. package/dist/components/ToolsPanel/DeleteButton.d.ts.map +1 -0
  147. package/dist/components/ToolsPanel/HelpPanel.d.ts +438 -0
  148. package/dist/components/ToolsPanel/HelpPanel.d.ts.map +1 -0
  149. package/dist/components/ToolsPanel/KeyboardShortcutDialog.d.ts +4 -0
  150. package/dist/components/ToolsPanel/KeyboardShortcutDialog.d.ts.map +1 -0
  151. package/dist/components/ToolsPanel/LockButton.d.ts +2 -0
  152. package/dist/components/ToolsPanel/LockButton.d.ts.map +1 -0
  153. package/dist/components/ToolsPanel/PrimaryTools.d.ts +3 -0
  154. package/dist/components/ToolsPanel/PrimaryTools.d.ts.map +1 -0
  155. package/dist/components/ToolsPanel/ShapesMenu.d.ts +9 -0
  156. package/dist/components/ToolsPanel/ShapesMenu.d.ts.map +1 -0
  157. package/dist/components/ToolsPanel/StatusBar.d.ts +2 -0
  158. package/dist/components/ToolsPanel/StatusBar.d.ts.map +1 -0
  159. package/dist/components/ToolsPanel/ToolsPanel.d.ts +7 -0
  160. package/dist/components/ToolsPanel/ToolsPanel.d.ts.map +1 -0
  161. package/dist/components/ToolsPanel/index.d.ts +2 -0
  162. package/dist/components/ToolsPanel/index.d.ts.map +1 -0
  163. package/dist/components/TopPanel/LanguageMenu/LanguageMenu.d.ts +2 -0
  164. package/dist/components/TopPanel/LanguageMenu/LanguageMenu.d.ts.map +1 -0
  165. package/dist/components/TopPanel/Menu/Menu.d.ts +7 -0
  166. package/dist/components/TopPanel/Menu/Menu.d.ts.map +1 -0
  167. package/dist/components/TopPanel/Menu/index.d.ts +1 -0
  168. package/dist/components/TopPanel/Menu/index.d.ts.map +1 -0
  169. package/dist/components/TopPanel/MultiplayerMenu/MultiplayerMenu.d.ts +2 -0
  170. package/dist/components/TopPanel/MultiplayerMenu/MultiplayerMenu.d.ts.map +1 -0
  171. package/dist/components/TopPanel/MultiplayerMenu/index.d.ts +2 -0
  172. package/dist/components/TopPanel/MultiplayerMenu/index.d.ts.map +1 -0
  173. package/dist/components/TopPanel/PageMenu/PageMenu.d.ts +219 -0
  174. package/dist/components/TopPanel/PageMenu/PageMenu.d.ts.map +1 -0
  175. package/dist/components/TopPanel/PageMenu/index.d.ts +2 -0
  176. package/dist/components/TopPanel/PageMenu/index.d.ts.map +1 -0
  177. package/dist/components/TopPanel/PageOptionsDialog/PageOptionsDialog.d.ts +443 -0
  178. package/dist/components/TopPanel/PageOptionsDialog/PageOptionsDialog.d.ts.map +1 -0
  179. package/dist/components/TopPanel/PageOptionsDialog/index.d.ts +2 -0
  180. package/dist/components/TopPanel/PageOptionsDialog/index.d.ts.map +1 -0
  181. package/dist/components/TopPanel/PreferencesMenu/PreferencesMenu.d.ts +2 -0
  182. package/dist/components/TopPanel/PreferencesMenu/PreferencesMenu.d.ts.map +1 -0
  183. package/dist/components/TopPanel/PreferencesMenu/index.d.ts +2 -0
  184. package/dist/components/TopPanel/PreferencesMenu/index.d.ts.map +1 -0
  185. package/dist/components/TopPanel/StyleMenu/StyleMenu.d.ts +221 -0
  186. package/dist/components/TopPanel/StyleMenu/StyleMenu.d.ts.map +1 -0
  187. package/dist/components/TopPanel/StyleMenu/index.d.ts +2 -0
  188. package/dist/components/TopPanel/StyleMenu/index.d.ts.map +1 -0
  189. package/dist/components/TopPanel/TopPanel.d.ts +13 -0
  190. package/dist/components/TopPanel/TopPanel.d.ts.map +1 -0
  191. package/dist/components/TopPanel/ZoomMenu/ZoomMenu.d.ts +2 -0
  192. package/dist/components/TopPanel/ZoomMenu/ZoomMenu.d.ts.map +1 -0
  193. package/dist/components/TopPanel/ZoomMenu/index.d.ts +2 -0
  194. package/dist/components/TopPanel/ZoomMenu/index.d.ts.map +1 -0
  195. package/dist/components/TopPanel/index.d.ts +2 -0
  196. package/dist/components/TopPanel/index.d.ts.map +1 -0
  197. package/dist/components/breakpoints.d.ts +2 -0
  198. package/dist/components/breakpoints.d.ts.map +1 -0
  199. package/dist/components/preventEvent.d.ts +2 -0
  200. package/dist/components/preventEvent.d.ts.map +1 -0
  201. package/dist/components/stopPropagation.d.ts +3 -0
  202. package/dist/components/stopPropagation.d.ts.map +1 -0
  203. package/dist/constants.d.ts +25 -0
  204. package/dist/constants.d.ts.map +1 -0
  205. package/dist/hooks/index.d.ts +8 -0
  206. package/dist/hooks/index.d.ts.map +1 -0
  207. package/dist/hooks/useCursor.d.ts +3 -0
  208. package/dist/hooks/useCursor.d.ts.map +1 -0
  209. package/dist/hooks/useDialog.d.ts +14 -0
  210. package/dist/hooks/useDialog.d.ts.map +1 -0
  211. package/dist/hooks/useFileSystem.d.ts +10 -0
  212. package/dist/hooks/useFileSystem.d.ts.map +1 -0
  213. package/dist/hooks/useFileSystemHandlers.d.ts +9 -0
  214. package/dist/hooks/useFileSystemHandlers.d.ts.map +1 -0
  215. package/dist/hooks/useKeyboardShortcuts.d.ts +3 -0
  216. package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  217. package/dist/hooks/useTelvaApp.d.ts +7 -0
  218. package/dist/hooks/useTelvaApp.d.ts.map +1 -0
  219. package/dist/hooks/useTheme.d.ts +6 -0
  220. package/dist/hooks/useTheme.d.ts.map +1 -0
  221. package/dist/hooks/useTranslation.d.ts +3 -0
  222. package/dist/hooks/useTranslation.d.ts.map +1 -0
  223. package/dist/index.d.ts +8 -0
  224. package/dist/index.d.ts.map +1 -0
  225. package/dist/index.js +39 -0
  226. package/dist/index.js.map +7 -0
  227. package/dist/index.mjs +30157 -0
  228. package/dist/index.mjs.map +7 -0
  229. package/dist/state/IdbClipboard.d.ts +4 -0
  230. package/dist/state/IdbClipboard.d.ts.map +1 -0
  231. package/dist/state/StateManager/StateManager.d.ts +197 -0
  232. package/dist/state/StateManager/StateManager.d.ts.map +1 -0
  233. package/dist/state/StateManager/copy.d.ts +9 -0
  234. package/dist/state/StateManager/copy.d.ts.map +1 -0
  235. package/dist/state/StateManager/index.d.ts +2 -0
  236. package/dist/state/StateManager/index.d.ts.map +1 -0
  237. package/dist/state/TVDR.d.ts +79 -0
  238. package/dist/state/TVDR.d.ts.map +1 -0
  239. package/dist/state/TelvaApp.d.ts +968 -0
  240. package/dist/state/TelvaApp.d.ts.map +1 -0
  241. package/dist/state/commands/alignShapes/alignShapes.d.ts +4 -0
  242. package/dist/state/commands/alignShapes/alignShapes.d.ts.map +1 -0
  243. package/dist/state/commands/alignShapes/index.d.ts +2 -0
  244. package/dist/state/commands/alignShapes/index.d.ts.map +1 -0
  245. package/dist/state/commands/changePage/changePage.d.ts +4 -0
  246. package/dist/state/commands/changePage/changePage.d.ts.map +1 -0
  247. package/dist/state/commands/changePage/index.d.ts +2 -0
  248. package/dist/state/commands/changePage/index.d.ts.map +1 -0
  249. package/dist/state/commands/createPage/createPage.d.ts +4 -0
  250. package/dist/state/commands/createPage/createPage.d.ts.map +1 -0
  251. package/dist/state/commands/createPage/index.d.ts +2 -0
  252. package/dist/state/commands/createPage/index.d.ts.map +1 -0
  253. package/dist/state/commands/createShapes/createShapes.d.ts +4 -0
  254. package/dist/state/commands/createShapes/createShapes.d.ts.map +1 -0
  255. package/dist/state/commands/createShapes/index.d.ts +2 -0
  256. package/dist/state/commands/createShapes/index.d.ts.map +1 -0
  257. package/dist/state/commands/deletePage/deletePage.d.ts +4 -0
  258. package/dist/state/commands/deletePage/deletePage.d.ts.map +1 -0
  259. package/dist/state/commands/deletePage/index.d.ts +2 -0
  260. package/dist/state/commands/deletePage/index.d.ts.map +1 -0
  261. package/dist/state/commands/deleteShapes/deleteShapes.d.ts +4 -0
  262. package/dist/state/commands/deleteShapes/deleteShapes.d.ts.map +1 -0
  263. package/dist/state/commands/deleteShapes/index.d.ts +2 -0
  264. package/dist/state/commands/deleteShapes/index.d.ts.map +1 -0
  265. package/dist/state/commands/distributeShapes/distributeShapes.d.ts +4 -0
  266. package/dist/state/commands/distributeShapes/distributeShapes.d.ts.map +1 -0
  267. package/dist/state/commands/distributeShapes/index.d.ts +2 -0
  268. package/dist/state/commands/distributeShapes/index.d.ts.map +1 -0
  269. package/dist/state/commands/duplicatePage/duplicatePage.d.ts +4 -0
  270. package/dist/state/commands/duplicatePage/duplicatePage.d.ts.map +1 -0
  271. package/dist/state/commands/duplicatePage/index.d.ts +2 -0
  272. package/dist/state/commands/duplicatePage/index.d.ts.map +1 -0
  273. package/dist/state/commands/duplicateShapes/duplicateShapes.d.ts +4 -0
  274. package/dist/state/commands/duplicateShapes/duplicateShapes.d.ts.map +1 -0
  275. package/dist/state/commands/duplicateShapes/index.d.ts +2 -0
  276. package/dist/state/commands/duplicateShapes/index.d.ts.map +1 -0
  277. package/dist/state/commands/flipShapes/flipShapes.d.ts +5 -0
  278. package/dist/state/commands/flipShapes/flipShapes.d.ts.map +1 -0
  279. package/dist/state/commands/flipShapes/index.d.ts +2 -0
  280. package/dist/state/commands/flipShapes/index.d.ts.map +1 -0
  281. package/dist/state/commands/groupShapes/groupShapes.d.ts +4 -0
  282. package/dist/state/commands/groupShapes/groupShapes.d.ts.map +1 -0
  283. package/dist/state/commands/groupShapes/index.d.ts +2 -0
  284. package/dist/state/commands/groupShapes/index.d.ts.map +1 -0
  285. package/dist/state/commands/index.d.ts +27 -0
  286. package/dist/state/commands/index.d.ts.map +1 -0
  287. package/dist/state/commands/insertContent/index.d.ts +2 -0
  288. package/dist/state/commands/insertContent/index.d.ts.map +1 -0
  289. package/dist/state/commands/insertContent/insertContent.d.ts +12 -0
  290. package/dist/state/commands/insertContent/insertContent.d.ts.map +1 -0
  291. package/dist/state/commands/movePage/index.d.ts +2 -0
  292. package/dist/state/commands/movePage/index.d.ts.map +1 -0
  293. package/dist/state/commands/movePage/movePage.d.ts +4 -0
  294. package/dist/state/commands/movePage/movePage.d.ts.map +1 -0
  295. package/dist/state/commands/moveShapesToPage/index.d.ts +2 -0
  296. package/dist/state/commands/moveShapesToPage/index.d.ts.map +1 -0
  297. package/dist/state/commands/moveShapesToPage/moveShapesToPage.d.ts +5 -0
  298. package/dist/state/commands/moveShapesToPage/moveShapesToPage.d.ts.map +1 -0
  299. package/dist/state/commands/renamePage/index.d.ts +2 -0
  300. package/dist/state/commands/renamePage/index.d.ts.map +1 -0
  301. package/dist/state/commands/renamePage/renamePage.d.ts +4 -0
  302. package/dist/state/commands/renamePage/renamePage.d.ts.map +1 -0
  303. package/dist/state/commands/reorderShapes/index.d.ts +2 -0
  304. package/dist/state/commands/reorderShapes/index.d.ts.map +1 -0
  305. package/dist/state/commands/reorderShapes/reorderShapes.d.ts +4 -0
  306. package/dist/state/commands/reorderShapes/reorderShapes.d.ts.map +1 -0
  307. package/dist/state/commands/resetBounds/index.d.ts +2 -0
  308. package/dist/state/commands/resetBounds/index.d.ts.map +1 -0
  309. package/dist/state/commands/resetBounds/resetBounds.d.ts +4 -0
  310. package/dist/state/commands/resetBounds/resetBounds.d.ts.map +1 -0
  311. package/dist/state/commands/rotateShapes/index.d.ts +2 -0
  312. package/dist/state/commands/rotateShapes/index.d.ts.map +1 -0
  313. package/dist/state/commands/rotateShapes/rotateShapes.d.ts +4 -0
  314. package/dist/state/commands/rotateShapes/rotateShapes.d.ts.map +1 -0
  315. package/dist/state/commands/setShapesProps/index.d.ts +2 -0
  316. package/dist/state/commands/setShapesProps/index.d.ts.map +1 -0
  317. package/dist/state/commands/setShapesProps/setShapesProps.d.ts +4 -0
  318. package/dist/state/commands/setShapesProps/setShapesProps.d.ts.map +1 -0
  319. package/dist/state/commands/shared/getIncrementedName.d.ts +8 -0
  320. package/dist/state/commands/shared/getIncrementedName.d.ts.map +1 -0
  321. package/dist/state/commands/shared/index.d.ts +3 -0
  322. package/dist/state/commands/shared/index.d.ts.map +1 -0
  323. package/dist/state/commands/shared/removeShapesFromPage.d.ts +7 -0
  324. package/dist/state/commands/shared/removeShapesFromPage.d.ts.map +1 -0
  325. package/dist/state/commands/stretchShapes/index.d.ts +2 -0
  326. package/dist/state/commands/stretchShapes/index.d.ts.map +1 -0
  327. package/dist/state/commands/stretchShapes/stretchShapes.d.ts +5 -0
  328. package/dist/state/commands/stretchShapes/stretchShapes.d.ts.map +1 -0
  329. package/dist/state/commands/styleShapes/index.d.ts +2 -0
  330. package/dist/state/commands/styleShapes/index.d.ts.map +1 -0
  331. package/dist/state/commands/styleShapes/styleShapes.d.ts +4 -0
  332. package/dist/state/commands/styleShapes/styleShapes.d.ts.map +1 -0
  333. package/dist/state/commands/toggleShapesDecoration/index.d.ts +2 -0
  334. package/dist/state/commands/toggleShapesDecoration/index.d.ts.map +1 -0
  335. package/dist/state/commands/toggleShapesDecoration/toggleShapesDecoration.d.ts +4 -0
  336. package/dist/state/commands/toggleShapesDecoration/toggleShapesDecoration.d.ts.map +1 -0
  337. package/dist/state/commands/toggleShapesProp/index.d.ts +2 -0
  338. package/dist/state/commands/toggleShapesProp/index.d.ts.map +1 -0
  339. package/dist/state/commands/toggleShapesProp/toggleShapesProp.d.ts +4 -0
  340. package/dist/state/commands/toggleShapesProp/toggleShapesProp.d.ts.map +1 -0
  341. package/dist/state/commands/translateShapes/index.d.ts +2 -0
  342. package/dist/state/commands/translateShapes/index.d.ts.map +1 -0
  343. package/dist/state/commands/translateShapes/translateShapes.d.ts +4 -0
  344. package/dist/state/commands/translateShapes/translateShapes.d.ts.map +1 -0
  345. package/dist/state/commands/ungroupShapes/index.d.ts +2 -0
  346. package/dist/state/commands/ungroupShapes/index.d.ts.map +1 -0
  347. package/dist/state/commands/ungroupShapes/ungroupShapes.d.ts +5 -0
  348. package/dist/state/commands/ungroupShapes/ungroupShapes.d.ts.map +1 -0
  349. package/dist/state/commands/updateShapes/index.d.ts +2 -0
  350. package/dist/state/commands/updateShapes/index.d.ts.map +1 -0
  351. package/dist/state/commands/updateShapes/updateShapes.d.ts +6 -0
  352. package/dist/state/commands/updateShapes/updateShapes.d.ts.map +1 -0
  353. package/dist/state/data/filesystem.d.ts +26 -0
  354. package/dist/state/data/filesystem.d.ts.map +1 -0
  355. package/dist/state/data/index.d.ts +4 -0
  356. package/dist/state/data/index.d.ts.map +1 -0
  357. package/dist/state/data/migrate.d.ts +3 -0
  358. package/dist/state/data/migrate.d.ts.map +1 -0
  359. package/dist/state/index.d.ts +3 -0
  360. package/dist/state/index.d.ts.map +1 -0
  361. package/dist/state/internal.d.ts +5 -0
  362. package/dist/state/internal.d.ts.map +1 -0
  363. package/dist/state/reactRegistry.d.ts +27 -0
  364. package/dist/state/reactRegistry.d.ts.map +1 -0
  365. package/dist/state/sessions/ArrowSession/ArrowSession.d.ts +24 -0
  366. package/dist/state/sessions/ArrowSession/ArrowSession.d.ts.map +1 -0
  367. package/dist/state/sessions/ArrowSession/index.d.ts +2 -0
  368. package/dist/state/sessions/ArrowSession/index.d.ts.map +1 -0
  369. package/dist/state/sessions/BaseSession.d.ts +14 -0
  370. package/dist/state/sessions/BaseSession.d.ts.map +1 -0
  371. package/dist/state/sessions/BrushSession/BrushSession.d.ts +21 -0
  372. package/dist/state/sessions/BrushSession/BrushSession.d.ts.map +1 -0
  373. package/dist/state/sessions/BrushSession/index.d.ts +2 -0
  374. package/dist/state/sessions/BrushSession/index.d.ts.map +1 -0
  375. package/dist/state/sessions/DrawSession/DrawSession.d.ts +45 -0
  376. package/dist/state/sessions/DrawSession/DrawSession.d.ts.map +1 -0
  377. package/dist/state/sessions/DrawSession/index.d.ts +2 -0
  378. package/dist/state/sessions/DrawSession/index.d.ts.map +1 -0
  379. package/dist/state/sessions/EditSession/EditSession.d.ts +17 -0
  380. package/dist/state/sessions/EditSession/EditSession.d.ts.map +1 -0
  381. package/dist/state/sessions/EditSession/index.d.ts +2 -0
  382. package/dist/state/sessions/EditSession/index.d.ts.map +1 -0
  383. package/dist/state/sessions/EraseSession/EraseSession.d.ts +27 -0
  384. package/dist/state/sessions/EraseSession/EraseSession.d.ts.map +1 -0
  385. package/dist/state/sessions/EraseSession/index.d.ts +2 -0
  386. package/dist/state/sessions/EraseSession/index.d.ts.map +1 -0
  387. package/dist/state/sessions/GridSession/GridSession.d.ts +24 -0
  388. package/dist/state/sessions/GridSession/GridSession.d.ts.map +1 -0
  389. package/dist/state/sessions/GridSession/index.d.ts +2 -0
  390. package/dist/state/sessions/GridSession/index.d.ts.map +1 -0
  391. package/dist/state/sessions/HandleSession/HandleSession.d.ts +19 -0
  392. package/dist/state/sessions/HandleSession/HandleSession.d.ts.map +1 -0
  393. package/dist/state/sessions/HandleSession/index.d.ts +2 -0
  394. package/dist/state/sessions/HandleSession/index.d.ts.map +1 -0
  395. package/dist/state/sessions/RotateSession/RotateSession.d.ts +22 -0
  396. package/dist/state/sessions/RotateSession/RotateSession.d.ts.map +1 -0
  397. package/dist/state/sessions/RotateSession/index.d.ts +2 -0
  398. package/dist/state/sessions/RotateSession/index.d.ts.map +1 -0
  399. package/dist/state/sessions/TransformSession/TransformSession.d.ts +41 -0
  400. package/dist/state/sessions/TransformSession/TransformSession.d.ts.map +1 -0
  401. package/dist/state/sessions/TransformSession/index.d.ts +2 -0
  402. package/dist/state/sessions/TransformSession/index.d.ts.map +1 -0
  403. package/dist/state/sessions/TransformSingleSession/TransformSingleSession.d.ts +32 -0
  404. package/dist/state/sessions/TransformSingleSession/TransformSingleSession.d.ts.map +1 -0
  405. package/dist/state/sessions/TransformSingleSession/index.d.ts +2 -0
  406. package/dist/state/sessions/TransformSingleSession/index.d.ts.map +1 -0
  407. package/dist/state/sessions/TranslateLabelSession/TranslateLabelSession.d.ts +17 -0
  408. package/dist/state/sessions/TranslateLabelSession/TranslateLabelSession.d.ts.map +1 -0
  409. package/dist/state/sessions/TranslateLabelSession/index.d.ts +2 -0
  410. package/dist/state/sessions/TranslateLabelSession/index.d.ts.map +1 -0
  411. package/dist/state/sessions/TranslateSession/TranslateSession.d.ts +49 -0
  412. package/dist/state/sessions/TranslateSession/TranslateSession.d.ts.map +1 -0
  413. package/dist/state/sessions/TranslateSession/index.d.ts +2 -0
  414. package/dist/state/sessions/TranslateSession/index.d.ts.map +1 -0
  415. package/dist/state/sessions/index.d.ts +33 -0
  416. package/dist/state/sessions/index.d.ts.map +1 -0
  417. package/dist/state/shapes/ArrowUtil/ArrowUtil.d.ts +34 -0
  418. package/dist/state/shapes/ArrowUtil/ArrowUtil.d.ts.map +1 -0
  419. package/dist/state/shapes/ArrowUtil/arrowHelpers.d.ts +21 -0
  420. package/dist/state/shapes/ArrowUtil/arrowHelpers.d.ts.map +1 -0
  421. package/dist/state/shapes/ArrowUtil/components/ArrowHead.d.ts +9 -0
  422. package/dist/state/shapes/ArrowUtil/components/ArrowHead.d.ts.map +1 -0
  423. package/dist/state/shapes/ArrowUtil/components/CurvedArrow.tsx.d.ts +17 -0
  424. package/dist/state/shapes/ArrowUtil/components/CurvedArrow.tsx.d.ts.map +1 -0
  425. package/dist/state/shapes/ArrowUtil/components/StraightArrow.d.ts +17 -0
  426. package/dist/state/shapes/ArrowUtil/components/StraightArrow.d.ts.map +1 -0
  427. package/dist/state/shapes/ArrowUtil/index.d.ts +2 -0
  428. package/dist/state/shapes/ArrowUtil/index.d.ts.map +1 -0
  429. package/dist/state/shapes/DrawUtil/DrawUtil.d.ts +31 -0
  430. package/dist/state/shapes/DrawUtil/DrawUtil.d.ts.map +1 -0
  431. package/dist/state/shapes/DrawUtil/drawHelpers.d.ts +27 -0
  432. package/dist/state/shapes/DrawUtil/drawHelpers.d.ts.map +1 -0
  433. package/dist/state/shapes/DrawUtil/index.d.ts +2 -0
  434. package/dist/state/shapes/DrawUtil/index.d.ts.map +1 -0
  435. package/dist/state/shapes/EllipseUtil/EllipseUtil.d.ts +36 -0
  436. package/dist/state/shapes/EllipseUtil/EllipseUtil.d.ts.map +1 -0
  437. package/dist/state/shapes/EllipseUtil/components/DashedEllipse.d.ts +12 -0
  438. package/dist/state/shapes/EllipseUtil/components/DashedEllipse.d.ts.map +1 -0
  439. package/dist/state/shapes/EllipseUtil/components/DrawEllipse.d.ts +12 -0
  440. package/dist/state/shapes/EllipseUtil/components/DrawEllipse.d.ts.map +1 -0
  441. package/dist/state/shapes/EllipseUtil/ellipseHelpers.d.ts +5 -0
  442. package/dist/state/shapes/EllipseUtil/ellipseHelpers.d.ts.map +1 -0
  443. package/dist/state/shapes/EllipseUtil/index.d.ts +2 -0
  444. package/dist/state/shapes/EllipseUtil/index.d.ts.map +1 -0
  445. package/dist/state/shapes/GroupUtil/GroupUtil.d.ts +22 -0
  446. package/dist/state/shapes/GroupUtil/GroupUtil.d.ts.map +1 -0
  447. package/dist/state/shapes/GroupUtil/index.d.ts +2 -0
  448. package/dist/state/shapes/GroupUtil/index.d.ts.map +1 -0
  449. package/dist/state/shapes/ImageUtil/ImageUtil.d.ts +29 -0
  450. package/dist/state/shapes/ImageUtil/ImageUtil.d.ts.map +1 -0
  451. package/dist/state/shapes/ImageUtil/index.d.ts +2 -0
  452. package/dist/state/shapes/ImageUtil/index.d.ts.map +1 -0
  453. package/dist/state/shapes/PenUtil/PenUtil.d.ts +34 -0
  454. package/dist/state/shapes/PenUtil/PenUtil.d.ts.map +1 -0
  455. package/dist/state/shapes/PenUtil/index.d.ts +3 -0
  456. package/dist/state/shapes/PenUtil/index.d.ts.map +1 -0
  457. package/dist/state/shapes/PenUtil/penHelpers.d.ts +25 -0
  458. package/dist/state/shapes/PenUtil/penHelpers.d.ts.map +1 -0
  459. package/dist/state/shapes/ReactComponentUtil/ReactComponentUtil.d.ts +29 -0
  460. package/dist/state/shapes/ReactComponentUtil/ReactComponentUtil.d.ts.map +1 -0
  461. package/dist/state/shapes/RectangleUtil/RectangleUtil.d.ts +27 -0
  462. package/dist/state/shapes/RectangleUtil/RectangleUtil.d.ts.map +1 -0
  463. package/dist/state/shapes/RectangleUtil/components/BindingIndicator.d.ts +7 -0
  464. package/dist/state/shapes/RectangleUtil/components/BindingIndicator.d.ts.map +1 -0
  465. package/dist/state/shapes/RectangleUtil/components/DashedRectangle.d.ts +12 -0
  466. package/dist/state/shapes/RectangleUtil/components/DashedRectangle.d.ts.map +1 -0
  467. package/dist/state/shapes/RectangleUtil/components/DrawRectangle.d.ts +12 -0
  468. package/dist/state/shapes/RectangleUtil/components/DrawRectangle.d.ts.map +1 -0
  469. package/dist/state/shapes/RectangleUtil/index.d.ts +2 -0
  470. package/dist/state/shapes/RectangleUtil/index.d.ts.map +1 -0
  471. package/dist/state/shapes/RectangleUtil/rectangleHelpers.d.ts +4 -0
  472. package/dist/state/shapes/RectangleUtil/rectangleHelpers.d.ts.map +1 -0
  473. package/dist/state/shapes/StickyUtil/StickyUtil.d.ts +30 -0
  474. package/dist/state/shapes/StickyUtil/StickyUtil.d.ts.map +1 -0
  475. package/dist/state/shapes/StickyUtil/index.d.ts +2 -0
  476. package/dist/state/shapes/StickyUtil/index.d.ts.map +1 -0
  477. package/dist/state/shapes/TVShapeUtil.d.ts +36 -0
  478. package/dist/state/shapes/TVShapeUtil.d.ts.map +1 -0
  479. package/dist/state/shapes/TextUtil/TextUtil.d.ts +53 -0
  480. package/dist/state/shapes/TextUtil/TextUtil.d.ts.map +1 -0
  481. package/dist/state/shapes/TextUtil/index.d.ts +2 -0
  482. package/dist/state/shapes/TextUtil/index.d.ts.map +1 -0
  483. package/dist/state/shapes/TriangleUtil/TriangleUtil.d.ts +36 -0
  484. package/dist/state/shapes/TriangleUtil/TriangleUtil.d.ts.map +1 -0
  485. package/dist/state/shapes/TriangleUtil/components/DashedTriangle.d.ts +12 -0
  486. package/dist/state/shapes/TriangleUtil/components/DashedTriangle.d.ts.map +1 -0
  487. package/dist/state/shapes/TriangleUtil/components/DrawTriangle.d.ts +12 -0
  488. package/dist/state/shapes/TriangleUtil/components/DrawTriangle.d.ts.map +1 -0
  489. package/dist/state/shapes/TriangleUtil/components/TriangleBindingIndicator.d.ts +6 -0
  490. package/dist/state/shapes/TriangleUtil/components/TriangleBindingIndicator.d.ts.map +1 -0
  491. package/dist/state/shapes/TriangleUtil/index.d.ts +2 -0
  492. package/dist/state/shapes/TriangleUtil/index.d.ts.map +1 -0
  493. package/dist/state/shapes/TriangleUtil/triangleHelpers.d.ts +6 -0
  494. package/dist/state/shapes/TriangleUtil/triangleHelpers.d.ts.map +1 -0
  495. package/dist/state/shapes/VideoUtil/VideoUtil.d.ts +31 -0
  496. package/dist/state/shapes/VideoUtil/VideoUtil.d.ts.map +1 -0
  497. package/dist/state/shapes/VideoUtil/index.d.ts +2 -0
  498. package/dist/state/shapes/VideoUtil/index.d.ts.map +1 -0
  499. package/dist/state/shapes/index.d.ts +42 -0
  500. package/dist/state/shapes/index.d.ts.map +1 -0
  501. package/dist/state/shapes/shared/LabelMask.d.ts +11 -0
  502. package/dist/state/shapes/shared/LabelMask.d.ts.map +1 -0
  503. package/dist/state/shapes/shared/PolygonUtils.d.ts +18 -0
  504. package/dist/state/shapes/shared/PolygonUtils.d.ts.map +1 -0
  505. package/dist/state/shapes/shared/TextAreaUtils.d.ts +19 -0
  506. package/dist/state/shapes/shared/TextAreaUtils.d.ts.map +1 -0
  507. package/dist/state/shapes/shared/TextLabel.d.ts +18 -0
  508. package/dist/state/shapes/shared/TextLabel.d.ts.map +1 -0
  509. package/dist/state/shapes/shared/getBoundsRectangle.d.ts +10 -0
  510. package/dist/state/shapes/shared/getBoundsRectangle.d.ts.map +1 -0
  511. package/dist/state/shapes/shared/getTextAlign.d.ts +3 -0
  512. package/dist/state/shapes/shared/getTextAlign.d.ts.map +1 -0
  513. package/dist/state/shapes/shared/getTextSize.d.ts +3 -0
  514. package/dist/state/shapes/shared/getTextSize.d.ts.map +1 -0
  515. package/dist/state/shapes/shared/getTextSvgElement.d.ts +3 -0
  516. package/dist/state/shapes/shared/getTextSvgElement.d.ts.map +1 -0
  517. package/dist/state/shapes/shared/gradient-fill.d.ts +11 -0
  518. package/dist/state/shapes/shared/gradient-fill.d.ts.map +1 -0
  519. package/dist/state/shapes/shared/index.d.ts +13 -0
  520. package/dist/state/shapes/shared/index.d.ts.map +1 -0
  521. package/dist/state/shapes/shared/shape-styles.d.ts +24 -0
  522. package/dist/state/shapes/shared/shape-styles.d.ts.map +1 -0
  523. package/dist/state/shapes/shared/transformRectangle.d.ts +19 -0
  524. package/dist/state/shapes/shared/transformRectangle.d.ts.map +1 -0
  525. package/dist/state/shapes/shared/transformSingleRectangle.d.ts +13 -0
  526. package/dist/state/shapes/shared/transformSingleRectangle.d.ts.map +1 -0
  527. package/dist/state/tools/ArrowTool/ArrowTool.d.ts +8 -0
  528. package/dist/state/tools/ArrowTool/ArrowTool.d.ts.map +1 -0
  529. package/dist/state/tools/ArrowTool/index.d.ts +2 -0
  530. package/dist/state/tools/ArrowTool/index.d.ts.map +1 -0
  531. package/dist/state/tools/BaseTool.d.ts +28 -0
  532. package/dist/state/tools/BaseTool.d.ts.map +1 -0
  533. package/dist/state/tools/DrawTool/DrawTool.d.ts +13 -0
  534. package/dist/state/tools/DrawTool/DrawTool.d.ts.map +1 -0
  535. package/dist/state/tools/DrawTool/index.d.ts +2 -0
  536. package/dist/state/tools/DrawTool/index.d.ts.map +1 -0
  537. package/dist/state/tools/EllipseTool/EllipseTool.d.ts +8 -0
  538. package/dist/state/tools/EllipseTool/EllipseTool.d.ts.map +1 -0
  539. package/dist/state/tools/EllipseTool/index.d.ts +2 -0
  540. package/dist/state/tools/EllipseTool/index.d.ts.map +1 -0
  541. package/dist/state/tools/EraseTool/EraseTool.d.ts +17 -0
  542. package/dist/state/tools/EraseTool/EraseTool.d.ts.map +1 -0
  543. package/dist/state/tools/EraseTool/index.d.ts +2 -0
  544. package/dist/state/tools/EraseTool/index.d.ts.map +1 -0
  545. package/dist/state/tools/LineTool/LineTool.d.ts +8 -0
  546. package/dist/state/tools/LineTool/LineTool.d.ts.map +1 -0
  547. package/dist/state/tools/LineTool/index.d.ts +2 -0
  548. package/dist/state/tools/LineTool/index.d.ts.map +1 -0
  549. package/dist/state/tools/PenEditTool.d.ts +37 -0
  550. package/dist/state/tools/PenEditTool.d.ts.map +1 -0
  551. package/dist/state/tools/PenTool/PenTool.d.ts +35 -0
  552. package/dist/state/tools/PenTool/PenTool.d.ts.map +1 -0
  553. package/dist/state/tools/PenTool/index.d.ts +2 -0
  554. package/dist/state/tools/PenTool/index.d.ts.map +1 -0
  555. package/dist/state/tools/RectangleTool/RectangleTool.d.ts +8 -0
  556. package/dist/state/tools/RectangleTool/RectangleTool.d.ts.map +1 -0
  557. package/dist/state/tools/RectangleTool/index.d.ts +2 -0
  558. package/dist/state/tools/RectangleTool/index.d.ts.map +1 -0
  559. package/dist/state/tools/SelectTool/SelectTool.d.ts +324 -0
  560. package/dist/state/tools/SelectTool/SelectTool.d.ts.map +1 -0
  561. package/dist/state/tools/SelectTool/index.d.ts +2 -0
  562. package/dist/state/tools/SelectTool/index.d.ts.map +1 -0
  563. package/dist/state/tools/StickyTool/StickyTool.d.ts +10 -0
  564. package/dist/state/tools/StickyTool/StickyTool.d.ts.map +1 -0
  565. package/dist/state/tools/StickyTool/index.d.ts +2 -0
  566. package/dist/state/tools/StickyTool/index.d.ts.map +1 -0
  567. package/dist/state/tools/TextTool/TextTool.d.ts +14 -0
  568. package/dist/state/tools/TextTool/TextTool.d.ts.map +1 -0
  569. package/dist/state/tools/TextTool/index.d.ts +2 -0
  570. package/dist/state/tools/TextTool/index.d.ts.map +1 -0
  571. package/dist/state/tools/TriangleTool/TriangleTool.d.ts +8 -0
  572. package/dist/state/tools/TriangleTool/TriangleTool.d.ts.map +1 -0
  573. package/dist/state/tools/TriangleTool/index.d.ts +2 -0
  574. package/dist/state/tools/TriangleTool/index.d.ts.map +1 -0
  575. package/dist/state/tools/index.d.ts +31 -0
  576. package/dist/state/tools/index.d.ts.map +1 -0
  577. package/dist/styles/index.d.ts +2 -0
  578. package/dist/styles/index.d.ts.map +1 -0
  579. package/dist/styles/stitches.config.d.ts +475 -0
  580. package/dist/styles/stitches.config.d.ts.map +1 -0
  581. package/dist/translations/index.d.ts +2 -0
  582. package/dist/translations/index.d.ts.map +1 -0
  583. package/dist/translations/translations.d.ts +11 -0
  584. package/dist/translations/translations.d.ts.map +1 -0
  585. package/dist/types.d.ts +493 -0
  586. package/dist/types.d.ts.map +1 -0
  587. package/package.json +108 -0
@@ -0,0 +1,968 @@
1
+ import { TLBounds, TLBoundsEventHandler, TLBoundsHandleEventHandler, TLCanvasEventHandler, TLDropEventHandler, TLKeyboardEventHandler, TLPageState, TLPinchEventHandler, TLPointerEventHandler, TLShape, TLShapeCloneHandler, TLWheelEventHandler } from 'telva-core';
2
+ import { DialogState } from '~hooks';
3
+ import { AlignType, DistributeType, SessionType, ShapeStyles, StretchType, TVAsset, TVAssets, TVBinding, TVDocument, TVExport, TVExportBackground, TVExportType, TVPage, TVShape, TVShapeType, TVSnapshot, TVToolType, TVUser, TelvaCommand, TelvaPatch } from '~types';
4
+ import { StateManager } from './StateManager';
5
+ import { TVDR } from './TVDR';
6
+ import { SessionArgsOfType, TelvaSession } from './sessions';
7
+ import { ArrowTool } from './tools/ArrowTool';
8
+ import type { BaseTool } from './tools/BaseTool';
9
+ import { DrawTool } from './tools/DrawTool';
10
+ import { EllipseTool } from './tools/EllipseTool';
11
+ import { EraseTool } from './tools/EraseTool';
12
+ import { LineTool } from './tools/LineTool';
13
+ import { PenTool } from './tools/PenTool';
14
+ import { RectangleTool } from './tools/RectangleTool';
15
+ import { SelectTool } from './tools/SelectTool';
16
+ import { StickyTool } from './tools/StickyTool';
17
+ import { TextTool } from './tools/TextTool';
18
+ import { TriangleTool } from './tools/TriangleTool';
19
+ export interface TVCallbacks {
20
+ /**
21
+ * (optional) A callback to run when the component mounts.
22
+ */
23
+ onMount?: (app: TelvaApp) => void;
24
+ /**
25
+ * (optional) A callback to run when the component's state changes.
26
+ */
27
+ onChange?: (app: TelvaApp, reason?: string) => void;
28
+ /**
29
+ * (optional) A callback to run when the user creates a new project through the menu or through a keyboard shortcut.
30
+ */
31
+ onNewProject?: (app: TelvaApp, openDialog: (dialogState: DialogState, onYes: () => void, onNo: () => void, onCancel: () => void) => void, e?: KeyboardEvent) => void;
32
+ /**
33
+ * (optional) A callback to run when the user saves a project through the menu or through a keyboard shortcut.
34
+ */
35
+ onSaveProject?: (app: TelvaApp, e?: KeyboardEvent) => void;
36
+ /**
37
+ * (optional) A callback to run when the user saves a project as a new project through the menu or through a keyboard shortcut.
38
+ */
39
+ onSaveProjectAs?: (app: TelvaApp, e?: KeyboardEvent) => void;
40
+ /**
41
+ * (optional) A callback to run when the user opens new project through the menu or through a keyboard shortcut.
42
+ */
43
+ onOpenProject?: (app: TelvaApp, openDialog: (dialogState: DialogState, onYes: () => void, onNo: () => void, onCancel: () => void) => void, e?: KeyboardEvent) => void;
44
+ /**
45
+ * (optional) A callback to run when the opens a file to upload.
46
+ */
47
+ onOpenMedia?: (app: TelvaApp) => void;
48
+ /**
49
+ * (optional) A callback to run when the state is patched.
50
+ */
51
+ onPatch?: (app: TelvaApp, patch: TelvaPatch, reason?: string) => void;
52
+ /**
53
+ * (optional) A callback to run when the state is changed with a command.
54
+ */
55
+ onCommand?: (app: TelvaApp, command: TelvaCommand, reason?: string) => void;
56
+ /**
57
+ * (optional) A callback to run when the state is persisted.
58
+ */
59
+ onPersist?: (app: TelvaApp) => void;
60
+ /**
61
+ * (optional) A callback to run when the user undos.
62
+ */
63
+ onUndo?: (app: TelvaApp) => void;
64
+ /**
65
+ * (optional) A callback to run when the user redos.
66
+ */
67
+ onRedo?: (app: TelvaApp) => void;
68
+ /**
69
+ * (optional) A callback to run when the user changes the current page's shapes.
70
+ */
71
+ onChangePage?: (app: TelvaApp, shapes: Record<string, TVShape | undefined>, bindings: Record<string, TVBinding | undefined>, assets: Record<string, TVAsset | undefined>, addToHistory: boolean) => void;
72
+ /**
73
+ * (optional) A callback to run when the user creates a new project.
74
+ */
75
+ onChangePresence?: (app: TelvaApp, user: TVUser) => void;
76
+ /**
77
+ * (optional) A callback to run when an asset will be deleted.
78
+ */
79
+ onAssetDelete?: (app: TelvaApp, assetId: string) => void;
80
+ /**
81
+ * (optional) A callback to run when an asset will be created. Should return the value for the image/video's `src` property.
82
+ */
83
+ onAssetCreate?: (app: TelvaApp, file: File, id: string) => Promise<string | false>;
84
+ /**
85
+ * (optional) A callback to run when an asset will be uploaded. Should return the value for the image/video's `src` property.
86
+ */
87
+ onAssetUpload?: (app: TelvaApp, file: File, id: string) => Promise<string | false>;
88
+ /**
89
+ * (optional) A callback to run when the user exports their page or selection.
90
+ */
91
+ onExport?: (app: TelvaApp, info: TVExport) => Promise<void>;
92
+ /**
93
+ * (optional) A callback to run when a session begins.
94
+ */
95
+ onSessionStart?: (app: TelvaApp, id: string) => void;
96
+ /**
97
+ * (optional) A callback to run when a session ends.
98
+ */
99
+ onSessionEnd?: (app: TelvaApp, id: string) => void;
100
+ }
101
+ export declare class TelvaApp extends StateManager<TVSnapshot> {
102
+ callbacks: TVCallbacks;
103
+ tools: {
104
+ select: SelectTool;
105
+ erase: EraseTool;
106
+ text: TextTool;
107
+ draw: DrawTool;
108
+ ellipse: EllipseTool;
109
+ rectangle: RectangleTool;
110
+ triangle: TriangleTool;
111
+ line: LineTool;
112
+ arrow: ArrowTool;
113
+ sticky: StickyTool;
114
+ pen: PenTool;
115
+ };
116
+ currentTool: BaseTool;
117
+ session?: TelvaSession;
118
+ readOnly: boolean;
119
+ isDirty: boolean;
120
+ isCreating: boolean;
121
+ originPoint: number[];
122
+ currentPoint: number[];
123
+ previousPoint: number[];
124
+ shiftKey: boolean;
125
+ altKey: boolean;
126
+ metaKey: boolean;
127
+ ctrlKey: boolean;
128
+ spaceKey: boolean;
129
+ isPointing: boolean;
130
+ isForcePanning: boolean;
131
+ isErasingWithPen: boolean;
132
+ isPastePrevented: boolean;
133
+ editingStartTime: number;
134
+ fileSystemHandle: FileSystemFileHandle | null;
135
+ viewport: TLBounds;
136
+ rendererBounds: TLBounds;
137
+ selectHistory: {
138
+ stack: string[][];
139
+ pointer: number;
140
+ };
141
+ clipboard?: {
142
+ shapes: TVShape[];
143
+ bindings: TVBinding[];
144
+ assets: TVAsset[];
145
+ };
146
+ rotationInfo: {
147
+ selectedIds: string[];
148
+ center: number[];
149
+ };
150
+ constructor(id?: string, callbacks?: TVCallbacks);
151
+ protected migrate: (state: TVSnapshot) => TVSnapshot;
152
+ protected onReady: () => void;
153
+ /**
154
+ * Cleanup the state after each state change.
155
+ * @param state The new state
156
+ * @param prev The previous state
157
+ * @protected
158
+ * @returns The final state
159
+ */
160
+ protected cleanup: (state: TVSnapshot, prev: TVSnapshot) => TVSnapshot;
161
+ private broadcastPatch;
162
+ onPatch: (state: TVSnapshot, patch: TelvaPatch, id?: string) => void;
163
+ onCommand: (state: TVSnapshot, command: TelvaCommand, id?: string) => void;
164
+ onReplace: () => void;
165
+ onUndo: () => void;
166
+ onRedo: () => void;
167
+ onPersist: (state: TVSnapshot, patch: TelvaPatch) => void;
168
+ private prevSelectedIds;
169
+ /**
170
+ * Clear the selection history after each new command, undo or redo.
171
+ * @param state
172
+ * @param id
173
+ */
174
+ protected onStateDidChange: (_state: TVSnapshot, id?: string) => void;
175
+ private preventPaste;
176
+ private justSent;
177
+ getReservedContent: (coreReservedIds: string[], pageId?: string) => {
178
+ reservedShapes: Record<string, TVShape>;
179
+ reservedBindings: Record<string, import("~types").ArrowBinding>;
180
+ strongReservedShapeIds: Set<string>;
181
+ };
182
+ /**
183
+ * Manually patch in page content.
184
+ */
185
+ replacePageContent: (shapes: Record<string, TVShape>, bindings: Record<string, TVBinding>, assets: Record<string, TVAsset>, pageId?: string) => this;
186
+ /**
187
+ * Set the current status.
188
+ * @param status The new status to set.
189
+ * @private
190
+ * @returns
191
+ */
192
+ setStatus(status: string): this;
193
+ /**
194
+ * Update the bounding box when the renderer's bounds change.
195
+ * @param bounds
196
+ */
197
+ updateBounds: (bounds: TLBounds) => void;
198
+ updateViewport: (point: number[], zoom: number) => void;
199
+ /**
200
+ * Set or clear the editing id
201
+ * @param id [string]
202
+ */
203
+ setEditingId: (id?: string, isCreating?: boolean) => void;
204
+ /**
205
+ * Set or clear the hovered id
206
+ * @param id [string]
207
+ */
208
+ setHoveredId: (id?: string) => void;
209
+ /**
210
+ * Set or clear the node-editing shape id (for draw-path vertex editing).
211
+ * @param id [string | undefined]
212
+ */
213
+ setNodeEditingId: (id?: string) => void;
214
+ /**
215
+ * Set a setting.
216
+ */
217
+ setSetting: <T extends "language" | "isDarkMode" | "showGrid" | "isSnapping" | "isCadSelectMode" | "isDebugMode" | "isPenMode" | "isReadonlyMode" | "isZoomSnap" | "keepStyleMenuOpen" | "nudgeDistanceSmall" | "nudgeDistanceLarge" | "isFocusMode" | "showRotateHandles" | "showBindingHandles" | "showCloneHandles" | "dockPosition" | "exportBackground" | "canvasMode", V extends {
218
+ isCadSelectMode: boolean;
219
+ isDarkMode: boolean;
220
+ isDebugMode: boolean;
221
+ isPenMode: boolean;
222
+ isReadonlyMode: boolean;
223
+ isZoomSnap: boolean;
224
+ keepStyleMenuOpen: boolean;
225
+ nudgeDistanceSmall: number;
226
+ nudgeDistanceLarge: number;
227
+ isFocusMode: boolean;
228
+ isSnapping: boolean;
229
+ showRotateHandles: boolean;
230
+ showBindingHandles: boolean;
231
+ showCloneHandles: boolean;
232
+ showGrid: boolean;
233
+ language: string;
234
+ dockPosition: import("~types").TVDockPosition;
235
+ exportBackground: TVExportBackground;
236
+ canvasMode: "freehand" | "straight";
237
+ }[T]>(name: T, value: V | ((value: V) => V)) => this;
238
+ /**
239
+ * Toggle pen mode.
240
+ */
241
+ toggleFocusMode: () => this;
242
+ /**
243
+ * Toggle pen mode.
244
+ */
245
+ togglePenMode: () => this;
246
+ /**
247
+ * Toggle dark mode.
248
+ */
249
+ toggleDarkMode: () => this;
250
+ /**
251
+ * Toggle zoom snap.
252
+ */
253
+ toggleZoomSnap: () => this;
254
+ /**
255
+ * Toggle debug mode.
256
+ */
257
+ toggleDebugMode: () => this;
258
+ /**
259
+ * Toggles the state if menu is opened
260
+ */
261
+ setMenuOpen: (isOpen: boolean) => this;
262
+ /**
263
+ * Toggles the state if something is loading
264
+ */
265
+ setIsLoading: (isLoading: boolean) => this;
266
+ setDisableAssets: (disableAssets: boolean) => this;
267
+ get isMenuOpen(): boolean;
268
+ get isLoading(): boolean;
269
+ get disableAssets(): boolean;
270
+ /**
271
+ * Toggle grids.
272
+ */
273
+ toggleGrid: () => this;
274
+ /**
275
+ * Toggle canvas mode between freehand and straight.
276
+ */
277
+ toggleCanvasMode: () => this;
278
+ get canvasMode(): "freehand" | "straight";
279
+ /**
280
+ * Select a tool.
281
+ * @param tool The tool to select, or "select".
282
+ */
283
+ selectTool: (type: TVToolType) => this;
284
+ /**
285
+ * Toggle the tool lock option.
286
+ */
287
+ toggleToolLock: () => this;
288
+ /**
289
+ * Reset the document to a blank state.
290
+ */
291
+ resetDocument: () => this;
292
+ /**
293
+ *
294
+ * @param document
295
+ */
296
+ updateUsers: (users: TVUser[], isOwnUpdate?: boolean) => void;
297
+ removeUser: (userId: string) => void;
298
+ /**
299
+ * Merge a new document patch into the current document.
300
+ * @param document
301
+ */
302
+ mergeDocument: (document: TVDocument) => this;
303
+ /**
304
+ * Update the current document.
305
+ * @param document
306
+ */
307
+ updateDocument: (document: TVDocument, reason?: string) => this;
308
+ /**
309
+ * Load a fresh room into the state.
310
+ * @param roomId
311
+ */
312
+ loadRoom: (roomId: string) => this;
313
+ /**
314
+ * Load a new document.
315
+ * @param document The document to load
316
+ */
317
+ loadDocument: (document: TVDocument) => this;
318
+ /**
319
+ * load content from URL
320
+ * @param page
321
+ * @param pageState
322
+ * @returns
323
+ */
324
+ loadPageFromURL: (page: TVPage, pageState: Record<string, TLPageState>) => void;
325
+ /**
326
+ * Create a new project.
327
+ */
328
+ newProject: () => void;
329
+ /**
330
+ * Save the current project.
331
+ */
332
+ saveProject: () => Promise<this | undefined>;
333
+ /**
334
+ * Save the current project as a new file.
335
+ * @param filename Optional file name (without extension).
336
+ * @param format 'tldr' (default Telva format) | 'tld' (tldraw v2 JSON format)
337
+ */
338
+ saveProjectAs: (filename?: string, format?: 'tldr' | 'tld') => Promise<this>;
339
+ /**
340
+ * Load a project from the filesystem.
341
+ * @todo
342
+ */
343
+ openProject: () => Promise<void>;
344
+ /**
345
+ * Upload media from file
346
+ */
347
+ openAsset: () => Promise<void>;
348
+ /**
349
+ * Sign out of the current account.
350
+ * Should move to the www layer.
351
+ * @todo
352
+ */
353
+ signOut: () => void;
354
+ /**
355
+ * Get the current app state.
356
+ */
357
+ getAppState: () => TVSnapshot['appState'];
358
+ /**
359
+ * Get a page.
360
+ * @param pageId (optional) The page's id.
361
+ */
362
+ getPage: (pageId?: string) => TVPage;
363
+ /**
364
+ * Get the shapes (as an array) from a given page.
365
+ * @param pageId (optional) The page's id.
366
+ */
367
+ getShapes: (pageId?: string) => TVShape[];
368
+ /**
369
+ * Get the bindings from a given page.
370
+ * @param pageId (optional) The page's id.
371
+ */
372
+ getBindings: (pageId?: string) => TVBinding[];
373
+ /**
374
+ * Get a shape from a given page.
375
+ * @param id The shape's id.
376
+ * @param pageId (optional) The page's id.
377
+ */
378
+ getShape: <T extends TVShape = TVShape>(id: string, pageId?: string) => T;
379
+ /**
380
+ * Get the bounds of a shape on a given page.
381
+ * @param id The shape's id.
382
+ * @param pageId (optional) The page's id.
383
+ */
384
+ getShapeBounds: (id: string, pageId?: string) => TLBounds;
385
+ /**
386
+ * Get a binding from a given page.
387
+ * @param id The binding's id.
388
+ * @param pageId (optional) The page's id.
389
+ */
390
+ getBinding: (id: string, pageId?: string) => TVBinding;
391
+ /**
392
+ * Get the page state for a given page.
393
+ * @param pageId (optional) The page's id.
394
+ */
395
+ getPageState: (pageId?: string) => TLPageState;
396
+ /**
397
+ * Turn a screen point into a point on the page.
398
+ * @param point The screen point
399
+ * @param pageId (optional) The page to use
400
+ */
401
+ getPagePoint: (point: number[], pageId?: string) => number[];
402
+ /**
403
+ * Get the current undo/redo stack.
404
+ */
405
+ get history(): TelvaCommand[];
406
+ /**
407
+ * Replace the current history stack.
408
+ */
409
+ set history(commands: TelvaCommand[]);
410
+ /**
411
+ * The current document.
412
+ */
413
+ get document(): TVDocument;
414
+ /**
415
+ * The current app state.
416
+ */
417
+ get settings(): TVSnapshot['settings'];
418
+ /**
419
+ * The current app state.
420
+ */
421
+ get appState(): TVSnapshot['appState'];
422
+ /**
423
+ * The current page id.
424
+ */
425
+ get currentPageId(): string;
426
+ /**
427
+ * The current page.
428
+ */
429
+ get page(): TVPage;
430
+ /**
431
+ * The current page's shapes (as an array).
432
+ */
433
+ get shapes(): TVShape[];
434
+ /**
435
+ * The current page's bindings.
436
+ */
437
+ get bindings(): TVBinding[];
438
+ /**
439
+ * The document's assets (as an array).
440
+ */
441
+ get assets(): TVAsset[];
442
+ /**
443
+ * The current page's state.
444
+ */
445
+ get pageState(): TLPageState;
446
+ get camera(): {
447
+ point: number[];
448
+ zoom: number;
449
+ };
450
+ get zoom(): number;
451
+ /**
452
+ * The page's current selected ids.
453
+ */
454
+ get selectedIds(): string[];
455
+ /**
456
+ * Create a new page.
457
+ * @param pageId (optional) The new page's id.
458
+ */
459
+ createPage: (id?: string, name?: string) => this;
460
+ /**
461
+ * Change the current page.
462
+ * @param pageId The new current page's id.
463
+ */
464
+ changePage: (pageId: string) => this;
465
+ /**
466
+ * Move a page above another.
467
+ * @param pageId The page to move.
468
+ * @param index The page above which to move.
469
+ */
470
+ movePage: (pageId: string, index: number) => this;
471
+ /**
472
+ * Rename a page.
473
+ * @param pageId The id of the page to rename.
474
+ * @param name The page's new name
475
+ */
476
+ renamePage: (pageId: string, name: string) => this;
477
+ /**
478
+ * Duplicate a page.
479
+ * @param pageId The id of the page to duplicate.
480
+ */
481
+ duplicatePage: (pageId: string) => this;
482
+ /**
483
+ * Delete a page.
484
+ * @param pageId The id of the page to delete.
485
+ */
486
+ deletePage: (pageId?: string) => this;
487
+ /**
488
+ * Cut (copy and delete) one or more shapes to the clipboard.
489
+ * @param ids The ids of the shapes to cut.
490
+ */
491
+ cut: (ids?: string[], e?: ClipboardEvent) => this;
492
+ /**
493
+ * Copy one or more shapes to the clipboard.
494
+ * @param ids The ids of the shapes to copy.
495
+ */
496
+ copy: (ids?: string[], e?: ClipboardEvent) => this;
497
+ /**
498
+ * Paste shapes (or text) from clipboard to a certain point.
499
+ * @param point
500
+ */
501
+ paste: (point?: number[], e?: ClipboardEvent) => Promise<this | undefined>;
502
+ getSvg: (ids?: string[], opts?: Partial<{
503
+ includeFonts: boolean;
504
+ }>) => Promise<SVGElement | undefined>;
505
+ /**
506
+ * Copy one or more shapes as SVG.
507
+ * @param ids The ids of the shapes to copy.
508
+ * @returns A string containing the JSON.
509
+ */
510
+ copySvg: (ids?: string[]) => Promise<string | undefined>;
511
+ /**
512
+ * Get the shapes and bindings for the current selection, if any, or else the current page.
513
+ *
514
+ * @param ids The ids of the shapes to get content for.
515
+ */
516
+ getContent: (ids?: string[]) => {
517
+ shapes: TVShape[];
518
+ bindings: import("~types").ArrowBinding[];
519
+ assets: TVAsset[];
520
+ } | undefined;
521
+ /**
522
+ * Copy one or more shapes as JSON.
523
+ * @param ids The ids of the shapes to copy.
524
+ * @returns A string containing the JSON.
525
+ */
526
+ copyJson: (ids?: string[]) => this;
527
+ /**
528
+ * Export one or more shapes as JSON.
529
+ * @param ids The ids of the shapes to copy from the current page.
530
+ * @returns A string containing the JSON.
531
+ */
532
+ exportJson: (ids?: string[]) => this;
533
+ /**
534
+ * Insert content.
535
+ *
536
+ * @param content The content to insert.
537
+ * @param content.shapes An array of TVShape objects.
538
+ * @param content.bindings (optional) An array of TVBinding objects.
539
+ * @param content.assets (optional) An array of TVAsset objects.
540
+ * @param opts (optional) An options object
541
+ * @param opts.point (optional) A point at which to paste the content.
542
+ * @param opts.select (optional) When true, the inserted shapes will be selected. Defaults to false.
543
+ * @param opts.overwrite (optional) When true, the inserted shapes and bindings will overwrite any existing shapes and bindings. Defaults to false.
544
+ */
545
+ insertContent: (content: {
546
+ shapes: TVShape[];
547
+ bindings?: TVBinding[];
548
+ assets?: TVAsset[];
549
+ }, opts?: {
550
+ point?: number[] | undefined;
551
+ select?: boolean | undefined;
552
+ overwrite?: boolean | undefined;
553
+ }) => this;
554
+ /**
555
+ * Get an image of the selected shapes.
556
+ *
557
+ * @param format The format to export the image as.
558
+ * @param opts (optional) An object containing options for the image.
559
+ * @param opts.ids (optional) The ids of the shapes (on the current page) to get an image for.
560
+ * @param opts.scale (optional) The id of the page from which to get an image.
561
+ * @param opts.quality (optional) The quality (between 0 and 1) for the image if lossy format.
562
+ */
563
+ getImage: (format?: Exclude<TVExportType, TVExportType.JSON>, opts?: Partial<{
564
+ ids: string[];
565
+ scale: number;
566
+ quality: number;
567
+ transparentBackground: boolean;
568
+ }>) => Promise<Blob | undefined>;
569
+ /**
570
+ * Copy an image of the selected shapes.
571
+ *
572
+ * @param format The format to export the image as.
573
+ * @param opts (optional) An object containing options for the image.
574
+ * @param opts.ids (optional) The ids of the shapes (on the current page) to get an image for.
575
+ * @param opts.scale (optional) The id of the page from which to get an image.
576
+ * @param opts.quality (optional) The quality (between 0 and 1) for the image if lossy format.
577
+ */
578
+ copyImage: (format?: TVExportType.PNG | TVExportType.SVG, opts?: Partial<{
579
+ ids: string[];
580
+ scale: number;
581
+ quality: number;
582
+ transparentBackground: boolean;
583
+ }>) => Promise<void>;
584
+ exportImage: (format?: Exclude<TVExportType, TVExportType.JSON>, opts?: Partial<{
585
+ ids: string[];
586
+ pageId: string;
587
+ scale: number;
588
+ quality: number;
589
+ }>) => Promise<void>;
590
+ /**
591
+ * Convert the selected ReactComponent shapes into static Image shapes.
592
+ * This takes a snapshot of the live component and swaps it out on the canvas.
593
+ */
594
+ convertToImage: () => Promise<void>;
595
+ /**
596
+ * Set the camera to a specific point and zoom.
597
+ * @param point The camera point (top left of the viewport).
598
+ * @param zoom The zoom level.
599
+ * @param reason Why did the camera change?
600
+ */
601
+ setCamera: (point: number[], zoom: number, reason: string) => this;
602
+ /**
603
+ * Reset the camera to the default position
604
+ */
605
+ resetCamera: () => this;
606
+ /**
607
+ * Pan the camera
608
+ * @param delta
609
+ */
610
+ pan: (delta: number[]) => this;
611
+ /**
612
+ * Pinch to a new zoom level, possibly together with a pan.
613
+ * @param point The current point under the cursor.
614
+ * @param delta The movement delta.
615
+ * @param zoomDelta The zoom detal
616
+ */
617
+ pinchZoom: (point: number[], delta: number[], zoom: number) => this;
618
+ /**
619
+ * Zoom to a new zoom level, keeping the point under the cursor in the same position
620
+ * @param next The new zoom level.
621
+ * @param center The point to zoom towards (defaults to screen center).
622
+ */
623
+ zoomTo: (next: number, center?: number[]) => this;
624
+ /**
625
+ * Zoom out by 25%
626
+ */
627
+ zoomIn: () => this;
628
+ /**
629
+ * Zoom in by 25%.
630
+ */
631
+ zoomOut: () => this;
632
+ /**
633
+ * Zoom to fit the page's shapes.
634
+ */
635
+ zoomToFit: () => this;
636
+ /**
637
+ * Zoom to the selected shapes.
638
+ */
639
+ zoomToSelection: () => this;
640
+ /**
641
+ * Zoom back to content when the canvas is empty.
642
+ */
643
+ zoomToContent: () => this;
644
+ /**
645
+ * Zoom the camera to 100%.
646
+ */
647
+ resetZoom: () => this;
648
+ /**
649
+ * Zoom the camera by a certain delta.
650
+ * @param delta The zoom delta.
651
+ * @param center The point to zoom toward.
652
+ */
653
+ zoomBy: (delta: number, center?: number[] | undefined) => this;
654
+ /**
655
+ * Clear the selection history (undo/redo stack for selection).
656
+ */
657
+ private clearSelectHistory;
658
+ /**
659
+ * Adds a selection to the selection history (undo/redo stack for selection).
660
+ */
661
+ private addToSelectHistory;
662
+ /**
663
+ * Set the current selection.
664
+ * @param ids The ids to select
665
+ * @param push Whether to add the ids to the current selection instead.
666
+ */
667
+ private setSelectedIds;
668
+ /**
669
+ * Undo the most recent selection.
670
+ */
671
+ undoSelect: () => this;
672
+ /**
673
+ * Redo the previous selection.
674
+ */
675
+ redoSelect: () => this;
676
+ /**
677
+ * Select one or more shapes.
678
+ * @param ids The shape ids to select.
679
+ */
680
+ select: (...ids: string[]) => this;
681
+ /**
682
+ * Select all shapes on the page.
683
+ */
684
+ selectAll: (pageId?: string) => this;
685
+ /**
686
+ * Deselect any selected shapes.
687
+ */
688
+ selectNone: () => this;
689
+ /**
690
+ * Start a new session.
691
+ * @param type The session type
692
+ * @param args arguments of the session's start method.
693
+ */
694
+ startSession: <T extends SessionType>(type: T, ...args: import("~types").ExceptFirst<ConstructorParameters<import("./sessions").SessionOfType<T>>>) => this;
695
+ /**
696
+ * updateSession.
697
+ * @param args The arguments of the current session's update method.
698
+ */
699
+ updateSession: () => this;
700
+ /**
701
+ * Cancel the current session.
702
+ * @param args The arguments of the current session's cancel method.
703
+ */
704
+ cancelSession: () => this;
705
+ /**
706
+ * Complete the current session.
707
+ * @param args The arguments of the current session's complete method.
708
+ */
709
+ completeSession: () => this;
710
+ /**
711
+ * Manually create shapes on the page.
712
+ * @param shapes An array of shape partials, containing the initial props for the shapes.
713
+ * @command
714
+ */
715
+ createShapes: (...shapes: ({
716
+ id: string;
717
+ type: TVShapeType;
718
+ } & Partial<TVShape>)[]) => this;
719
+ /**
720
+ * Manually update a set of shapes.
721
+ * @param shapes An array of shape partials, containing the changes to be made to each shape.
722
+ * @command
723
+ */
724
+ updateShapes: (...shapes: ({
725
+ id: string;
726
+ } & Partial<TVShape>)[]) => this;
727
+ createTextShapeAtPoint(point: number[], id?: string, patch?: boolean): this;
728
+ getImageOrVideoShapeAtPoint(id: string, type: TVShapeType.Image | TVShapeType.Video, point: number[], size: number[], assetId: string): import("~types").ImageShape | import("~types").VideoShape;
729
+ /**
730
+ * Create one or more shapes.
731
+ * @param shapes An array of shapes.
732
+ * @command
733
+ */
734
+ create: (shapes?: TVShape[], bindings?: TVBinding[]) => this;
735
+ /**
736
+ * Patch in a new set of shapes
737
+ * @param shapes
738
+ * @param bindings
739
+ */
740
+ patchCreate: (shapes?: TVShape[], bindings?: TVBinding[]) => this;
741
+ /**
742
+ * Delete one or more shapes.
743
+ * @param ids The ids of the shapes to delete.
744
+ * @command
745
+ */
746
+ delete: (ids?: string[]) => this;
747
+ /**
748
+ * Delete all shapes on the page.
749
+ */
750
+ deleteAll: () => this;
751
+ /**
752
+ * Change the style for one or more shapes.
753
+ * @param style A style partial to apply to the shapes.
754
+ * @param ids The ids of the shapes to change (defaults to selection).
755
+ */
756
+ style: (style: Partial<ShapeStyles>, ids?: string[]) => this;
757
+ /**
758
+ * Align one or more shapes.
759
+ * @param direction Whether to align horizontally or vertically.
760
+ * @param ids The ids of the shapes to change (defaults to selection).
761
+ */
762
+ align: (type: AlignType, ids?: string[]) => this;
763
+ /**
764
+ * Distribute one or more shapes.
765
+ * @param direction Whether to distribute horizontally or vertically..
766
+ * @param ids The ids of the shapes to change (defaults to selection).
767
+ */
768
+ distribute: (direction: DistributeType, ids?: string[]) => this;
769
+ /**
770
+ * Stretch one or more shapes to their common bounds.
771
+ * @param direction Whether to stretch horizontally or vertically.
772
+ * @param ids The ids of the shapes to change (defaults to selection).
773
+ */
774
+ stretch: (direction: StretchType, ids?: string[]) => this;
775
+ /**
776
+ * Flip one or more shapes horizontally.
777
+ * @param ids The ids of the shapes to change (defaults to selection).
778
+ */
779
+ flipHorizontal: (ids?: string[]) => this;
780
+ /**
781
+ * Flip one or more shapes vertically.
782
+ * @param ids The ids of the shapes to change (defaults to selection).
783
+ */
784
+ flipVertical: (ids?: string[]) => this;
785
+ /**
786
+ * Move one or more shapes to a new page. Will also break or move bindings.
787
+ * @param toPageId The id of the page to move the shapes to.
788
+ * @param fromPageId The id of the page to move the shapes from (defaults to current page).
789
+ * @param ids The ids of the shapes to move (defaults to selection).
790
+ */
791
+ moveToPage: (toPageId: string, fromPageId?: string, ids?: string[]) => this;
792
+ /**
793
+ * Move one or more shapes to the back of the page.
794
+ * @param ids The ids of the shapes to change (defaults to selection).
795
+ */
796
+ moveToBack: (ids?: string[]) => this;
797
+ /**
798
+ * Move one or more shapes backward on of the page.
799
+ * @param ids The ids of the shapes to change (defaults to selection).
800
+ */
801
+ moveBackward: (ids?: string[]) => this;
802
+ /**
803
+ * Move one or more shapes forward on the page.
804
+ * @param ids The ids of the shapes to change (defaults to selection).
805
+ */
806
+ moveForward: (ids?: string[]) => this;
807
+ /**
808
+ * Move one or more shapes to the front of the page.
809
+ * @param ids The ids of the shapes to change (defaults to selection).
810
+ */
811
+ moveToFront: (ids?: string[]) => this;
812
+ /**
813
+ * Nudge one or more shapes in a direction.
814
+ * @param delta The direction to nudge the shapes.
815
+ * @param isMajor Whether this is a major (i.e. shift) nudge.
816
+ * @param ids The ids to change (defaults to selection).
817
+ */
818
+ nudge: (delta: number[], isMajor?: boolean, ids?: string[]) => this;
819
+ /**
820
+ * Duplicate one or more shapes.
821
+ * @param ids The ids to duplicate (defaults to selection).
822
+ */
823
+ duplicate: (ids?: string[], point?: number[]) => this;
824
+ /**
825
+ * Reset the bounds for one or more shapes. Usually when the
826
+ * bounding box of a shape is double-clicked. Different shapes may
827
+ * handle this differently.
828
+ * @param ids The ids to change (defaults to selection).
829
+ */
830
+ resetBounds: (ids?: string[]) => this;
831
+ /**
832
+ * Toggle the hidden property of one or more shapes.
833
+ * @param ids The ids to change (defaults to selection).
834
+ */
835
+ toggleHidden: (ids?: string[]) => this;
836
+ /**
837
+ * Toggle the locked property of one or more shapes.
838
+ * @param ids The ids to change (defaults to selection).
839
+ */
840
+ toggleLocked: (ids?: string[]) => this;
841
+ /**
842
+ * Toggle the fixed-aspect-ratio property of one or more shapes.
843
+ * @param ids The ids to change (defaults to selection).
844
+ */
845
+ toggleAspectRatioLocked: (ids?: string[]) => this;
846
+ /**
847
+ * Toggle the decoration at a handle of one or more shapes.
848
+ * @param handleId The handle to toggle.
849
+ * @param ids The ids of the shapes to toggle the decoration on.
850
+ */
851
+ toggleDecoration: (handleId: string, ids?: string[]) => this;
852
+ /**
853
+ * Set the props of one or more shapes
854
+ * @param props The props to set on the shapes.
855
+ * @param ids The ids of the shapes to set props on.
856
+ */
857
+ setShapeProps: <T extends TVShape>(props: Partial<T>, ids?: string[]) => this;
858
+ /**
859
+ * Rotate one or more shapes by a delta.
860
+ * @param delta The delta in radians.
861
+ * @param ids The ids to rotate (defaults to selection).
862
+ */
863
+ rotate: (delta?: number, ids?: string[]) => this;
864
+ /**
865
+ * Group the selected shapes.
866
+ * @param ids The ids to group (defaults to selection).
867
+ * @param groupId The new group's id.
868
+ */
869
+ group: (ids?: string[], groupId?: string, pageId?: string) => this;
870
+ /**
871
+ * Ungroup the selected groups.
872
+ * @todo
873
+ */
874
+ ungroup: (ids?: string[], pageId?: string) => this;
875
+ /**
876
+ * Cancel the current session.
877
+ */
878
+ cancel: () => this;
879
+ addMediaFromFiles: (files: File[], point?: number[]) => Promise<this>;
880
+ private getViewboxFromSVG;
881
+ onKeyDown: TLKeyboardEventHandler;
882
+ onKeyUp: TLKeyboardEventHandler;
883
+ /** Force bounding boxes to reset when the document loads. */
884
+ refreshBoundingBoxes: () => void;
885
+ onDragOver: TLDropEventHandler;
886
+ onDrop: TLDropEventHandler;
887
+ onPinchStart: TLPinchEventHandler;
888
+ onPinchEnd: TLPinchEventHandler;
889
+ onPinch: TLPinchEventHandler;
890
+ onPan: TLWheelEventHandler;
891
+ onZoom: TLWheelEventHandler;
892
+ updateInputs: TLPointerEventHandler;
893
+ onPointerMove: TLPointerEventHandler;
894
+ onPointerDown: TLPointerEventHandler;
895
+ onPointerUp: TLPointerEventHandler;
896
+ onPointCanvas: TLCanvasEventHandler;
897
+ onDoubleClickCanvas: TLCanvasEventHandler;
898
+ onRightPointCanvas: TLCanvasEventHandler;
899
+ onDragCanvas: TLCanvasEventHandler;
900
+ onReleaseCanvas: TLCanvasEventHandler;
901
+ onPointShape: TLPointerEventHandler;
902
+ onReleaseShape: TLPointerEventHandler;
903
+ onDoubleClickShape: TLPointerEventHandler;
904
+ onRightPointShape: TLPointerEventHandler;
905
+ onDragShape: TLPointerEventHandler;
906
+ onHoverShape: TLPointerEventHandler;
907
+ onUnhoverShape: TLPointerEventHandler;
908
+ onPointBounds: TLBoundsEventHandler;
909
+ onDoubleClickBounds: TLBoundsEventHandler;
910
+ onRightPointBounds: TLBoundsEventHandler;
911
+ onDragBounds: TLBoundsEventHandler;
912
+ onHoverBounds: TLBoundsEventHandler;
913
+ onUnhoverBounds: TLBoundsEventHandler;
914
+ onReleaseBounds: TLBoundsEventHandler;
915
+ onPointBoundsHandle: TLBoundsHandleEventHandler;
916
+ onDoubleClickBoundsHandle: TLBoundsHandleEventHandler;
917
+ onRightPointBoundsHandle: TLBoundsHandleEventHandler;
918
+ onDragBoundsHandle: TLBoundsHandleEventHandler;
919
+ onHoverBoundsHandle: TLBoundsHandleEventHandler;
920
+ onUnhoverBoundsHandle: TLBoundsHandleEventHandler;
921
+ onReleaseBoundsHandle: TLBoundsHandleEventHandler;
922
+ onPointHandle: TLPointerEventHandler;
923
+ onDoubleClickHandle: TLPointerEventHandler;
924
+ onRightPointHandle: TLPointerEventHandler;
925
+ onDragHandle: TLPointerEventHandler;
926
+ onHoverHandle: TLPointerEventHandler;
927
+ onUnhoverHandle: TLPointerEventHandler;
928
+ onReleaseHandle: TLPointerEventHandler;
929
+ onShapeChange: (shape: {
930
+ id: string;
931
+ } & Partial<TLShape>) => this;
932
+ onShapeBlur: () => void;
933
+ onShapeClone: TLShapeCloneHandler;
934
+ onRenderCountChange: (ids: string[]) => void;
935
+ onError: () => void;
936
+ isSelected(id: string): boolean;
937
+ /**
938
+ * Get a snapshot of a video at current frame as base64 encoded image
939
+ * @param id ID of video shape
940
+ * @returns base64 encoded frame
941
+ * @throws Error if video shape with given ID does not exist
942
+ */
943
+ serializeVideo(id: string): string;
944
+ /**
945
+ * Get a snapshot of a image (e.g. a GIF) as base64 encoded image
946
+ * @param id ID of image shape
947
+ * @returns base64 encoded frame
948
+ * @throws Error if image shape with given ID does not exist
949
+ */
950
+ serializeImage(id: string): string;
951
+ patchAssets(assets: TVAssets): void;
952
+ get room(): {
953
+ id: string;
954
+ userId: string;
955
+ users: Record<string, TVUser>;
956
+ } | undefined;
957
+ get isLocal(): boolean;
958
+ get status(): string;
959
+ get currentUser(): TVUser | undefined;
960
+ get centerPoint(): number[];
961
+ get currentGrid(): number;
962
+ getShapeUtil: typeof TVDR.getShapeUtil;
963
+ static version: number;
964
+ static defaultDocument: TVDocument;
965
+ static defaultState: TVSnapshot;
966
+ static assetSrc: string;
967
+ }
968
+ //# sourceMappingURL=TelvaApp.d.ts.map