@synnaxlabs/pluto 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (612) hide show
  1. package/LICENSE +4 -0
  2. package/README.md +34 -0
  3. package/dist/Center-ZAcURh-3.cjs +148 -0
  4. package/dist/Center-ZAcURh-3.cjs.map +1 -0
  5. package/dist/Center-gEKkAkdh.js +149 -0
  6. package/dist/Center-gEKkAkdh.js.map +1 -0
  7. package/dist/Header-5YX6FUn6.cjs +35 -0
  8. package/dist/Header-5YX6FUn6.cjs.map +1 -0
  9. package/dist/Header-7x6367IV.js +36 -0
  10. package/dist/Header-7x6367IV.js.map +1 -0
  11. package/dist/Item-EDdYN2NK.js +171 -0
  12. package/dist/Item-EDdYN2NK.js.map +1 -0
  13. package/dist/Item-HWzX7RK2.cjs +170 -0
  14. package/dist/Item-HWzX7RK2.cjs.map +1 -0
  15. package/dist/Item-owLU4Xop.js +97 -0
  16. package/dist/Item-owLU4Xop.js.map +1 -0
  17. package/dist/Item-rkSKzZoh.cjs +96 -0
  18. package/dist/Item-rkSKzZoh.cjs.map +1 -0
  19. package/dist/Keyboard-mE03PKwA.js +14 -0
  20. package/dist/Keyboard-mE03PKwA.js.map +1 -0
  21. package/dist/Keyboard-w372197S.cjs +13 -0
  22. package/dist/Keyboard-w372197S.cjs.map +1 -0
  23. package/dist/Link-laNlv47N.js +13 -0
  24. package/dist/Link-laNlv47N.js.map +1 -0
  25. package/dist/Link-xlTZan29.cjs +12 -0
  26. package/dist/Link-xlTZan29.cjs.map +1 -0
  27. package/dist/SelectLevel-bGb0dRXh.cjs +152 -0
  28. package/dist/SelectLevel-bGb0dRXh.cjs.map +1 -0
  29. package/dist/SelectLevel-cewIWtOv.js +153 -0
  30. package/dist/SelectLevel-cewIWtOv.js.map +1 -0
  31. package/dist/Selector-R3lL41_i.js +267 -0
  32. package/dist/Selector-R3lL41_i.js.map +1 -0
  33. package/dist/Selector-hQLSIYum.cjs +266 -0
  34. package/dist/Selector-hQLSIYum.cjs.map +1 -0
  35. package/dist/TimeRangeChip-XXXLMCrf.cjs +9316 -0
  36. package/dist/TimeRangeChip-XXXLMCrf.cjs.map +1 -0
  37. package/dist/TimeRangeChip-eDCX5pUC.js +9301 -0
  38. package/dist/TimeRangeChip-eDCX5pUC.js.map +1 -0
  39. package/dist/Toggle-eOKYw1OT.cjs +13664 -0
  40. package/dist/Toggle-eOKYw1OT.cjs.map +1 -0
  41. package/dist/Toggle-kLunfJtR.js +13665 -0
  42. package/dist/Toggle-kLunfJtR.js.map +1 -0
  43. package/dist/Video-Vpwp5ao1.js +12 -0
  44. package/dist/Video-Vpwp5ao1.js.map +1 -0
  45. package/dist/Video-a7BUKvzF.cjs +11 -0
  46. package/dist/Video-a7BUKvzF.cjs.map +1 -0
  47. package/dist/Video-k52RqIHf.cjs +2 -0
  48. package/dist/Video-k52RqIHf.cjs.map +1 -0
  49. package/dist/Video-w40geAFS.js +2 -0
  50. package/dist/Video-w40geAFS.js.map +1 -0
  51. package/dist/accordion/Accordion.d.ts +38 -0
  52. package/dist/accordion/Accordion.spec.d.ts +1 -0
  53. package/dist/accordion/Accordion.stories.d.ts +5 -0
  54. package/dist/accordion/index.d.ts +1 -0
  55. package/dist/aether/aether/aether.d.ts +247 -0
  56. package/dist/aether/aether/index.d.ts +2 -0
  57. package/dist/aether/aether/worker.spec.d.ts +8 -0
  58. package/dist/aether/index.d.ts +1 -0
  59. package/dist/aether/main.d.ts +96 -0
  60. package/dist/aether/main.spec.d.ts +8 -0
  61. package/dist/aether/message.d.ts +17 -0
  62. package/dist/aether.cjs +90 -0
  63. package/dist/aether.cjs.map +1 -0
  64. package/dist/aether.js +93 -0
  65. package/dist/aether.js.map +1 -0
  66. package/dist/aetherIndex.d.ts +14 -0
  67. package/dist/alamos/Provider.d.ts +12 -0
  68. package/dist/alamos/aether/alamos.d.ts +39 -0
  69. package/dist/alamos/aether/index.d.ts +1 -0
  70. package/dist/alamos/index.d.ts +1 -0
  71. package/dist/align/Center.d.ts +8 -0
  72. package/dist/align/Pack.d.ts +23 -0
  73. package/dist/align/Pack.stories.d.ts +8 -0
  74. package/dist/align/Space.d.ts +54 -0
  75. package/dist/align/Space.spec.d.ts +1 -0
  76. package/dist/align/Space.stories.d.ts +5 -0
  77. package/dist/align/external.d.ts +3 -0
  78. package/dist/align/index.d.ts +1 -0
  79. package/dist/align.cjs +10 -0
  80. package/dist/align.cjs.map +1 -0
  81. package/dist/align.js +10 -0
  82. package/dist/align.js.map +1 -0
  83. package/dist/button/Button.d.ts +46 -0
  84. package/dist/button/Button.spec.d.ts +1 -0
  85. package/dist/button/Button.stories.d.ts +9 -0
  86. package/dist/button/Icon.d.ts +19 -0
  87. package/dist/button/Link.d.ts +16 -0
  88. package/dist/button/Toggle.d.ts +34 -0
  89. package/dist/button/color.d.ts +3 -0
  90. package/dist/button/external.d.ts +4 -0
  91. package/dist/button/index.d.ts +1 -0
  92. package/dist/button.cjs +15 -0
  93. package/dist/button.cjs.map +1 -0
  94. package/dist/button.js +15 -0
  95. package/dist/button.js.map +1 -0
  96. package/dist/channel/AliasProvider.d.ts +24 -0
  97. package/dist/channel/ChannelSelect.stories.d.ts +7 -0
  98. package/dist/channel/LinePlot.d.ts +72 -0
  99. package/dist/channel/LinePlot.stories.d.ts +6 -0
  100. package/dist/channel/Select.d.ts +11 -0
  101. package/dist/channel/external.d.ts +3 -0
  102. package/dist/channel/index.d.ts +1 -0
  103. package/dist/channel/types.d.ts +1 -0
  104. package/dist/color/Picker/Picker.d.ts +6 -0
  105. package/dist/color/Picker/Picker.stories.d.ts +6 -0
  106. package/dist/color/Picker/index.d.ts +1 -0
  107. package/dist/color/Swatch/Swatch.d.ts +8 -0
  108. package/dist/color/Swatch/index.d.ts +1 -0
  109. package/dist/color/core/color.d.ts +128 -0
  110. package/dist/color/core/color.spec.d.ts +1 -0
  111. package/dist/color/core/index.d.ts +2 -0
  112. package/dist/color/external.d.ts +4 -0
  113. package/dist/color/index.d.ts +1 -0
  114. package/dist/component-joFaJiQW.cjs +24719 -0
  115. package/dist/component-joFaJiQW.cjs.map +1 -0
  116. package/dist/component-k78Jq9I7.js +24720 -0
  117. package/dist/component-k78Jq9I7.js.map +1 -0
  118. package/dist/css/bem.d.ts +14 -0
  119. package/dist/css/bem.spec.d.ts +1 -0
  120. package/dist/css/color.d.ts +10 -0
  121. package/dist/css/css.d.ts +27 -0
  122. package/dist/css/grid.d.ts +14 -0
  123. package/dist/css/index.d.ts +4 -0
  124. package/dist/css/units.d.ts +1 -0
  125. package/dist/css/vars.d.ts +1 -0
  126. package/dist/css-NTD4Xm8x.js +9206 -0
  127. package/dist/css-NTD4Xm8x.js.map +1 -0
  128. package/dist/css-V3VUT_Js.cjs +9204 -0
  129. package/dist/css-V3VUT_Js.cjs.map +1 -0
  130. package/dist/cursor/cursor.d.ts +3 -0
  131. package/dist/cursor/index.d.ts +1 -0
  132. package/dist/dimensions-Sej0Zly9.cjs +26 -0
  133. package/dist/dimensions-Sej0Zly9.cjs.map +1 -0
  134. package/dist/dimensions-guJ5PHmb.js +27 -0
  135. package/dist/dimensions-guJ5PHmb.js.map +1 -0
  136. package/dist/divider/Divider.d.ts +14 -0
  137. package/dist/divider/index.d.ts +2 -0
  138. package/dist/dropdown/Dropdown.d.ts +49 -0
  139. package/dist/dropdown/Dropdown.spec.d.ts +1 -0
  140. package/dist/dropdown/Dropdown.stories.d.ts +5 -0
  141. package/dist/dropdown/index.d.ts +2 -0
  142. package/dist/dropdown.cjs +13 -0
  143. package/dist/dropdown.cjs.map +1 -0
  144. package/dist/dropdown.js +13 -0
  145. package/dist/dropdown.js.map +1 -0
  146. package/dist/external-2Aicsb3l.js +88 -0
  147. package/dist/external-2Aicsb3l.js.map +1 -0
  148. package/dist/external-9Ncn2J9B.cjs +93 -0
  149. package/dist/external-9Ncn2J9B.cjs.map +1 -0
  150. package/dist/external-9RCzxzgZ.js +30 -0
  151. package/dist/external-9RCzxzgZ.js.map +1 -0
  152. package/dist/external-9pS8-DvV.js +15 -0
  153. package/dist/external-9pS8-DvV.js.map +1 -0
  154. package/dist/external-KxlyA74C.js +20 -0
  155. package/dist/external-KxlyA74C.js.map +1 -0
  156. package/dist/external-OSLzuRs1.cjs +14 -0
  157. package/dist/external-OSLzuRs1.cjs.map +1 -0
  158. package/dist/external-PS3nzqUn.cjs +23 -0
  159. package/dist/external-PS3nzqUn.cjs.map +1 -0
  160. package/dist/external-QRmqSjV0.js +18 -0
  161. package/dist/external-QRmqSjV0.js.map +1 -0
  162. package/dist/external-QuVTCnGl.js +71 -0
  163. package/dist/external-QuVTCnGl.js.map +1 -0
  164. package/dist/external-U5HRPaDI.cjs +17 -0
  165. package/dist/external-U5HRPaDI.cjs.map +1 -0
  166. package/dist/external-_CtRDtih.js +17 -0
  167. package/dist/external-_CtRDtih.js.map +1 -0
  168. package/dist/external-eQU48hM4.cjs +87 -0
  169. package/dist/external-eQU48hM4.cjs.map +1 -0
  170. package/dist/external-kbDFnfuk.js +24 -0
  171. package/dist/external-kbDFnfuk.js.map +1 -0
  172. package/dist/external-oX1JmOFf.js +17 -0
  173. package/dist/external-oX1JmOFf.js.map +1 -0
  174. package/dist/external-oZe6tF4A.cjs +14 -0
  175. package/dist/external-oZe6tF4A.cjs.map +1 -0
  176. package/dist/external-tVcmKSsT.cjs +19 -0
  177. package/dist/external-tVcmKSsT.cjs.map +1 -0
  178. package/dist/external-up1sE3F6.js +94 -0
  179. package/dist/external-up1sE3F6.js.map +1 -0
  180. package/dist/external-uvx0b-Jw.cjs +16 -0
  181. package/dist/external-uvx0b-Jw.cjs.map +1 -0
  182. package/dist/external-vXBQOmKv.js +15 -0
  183. package/dist/external-vXBQOmKv.js.map +1 -0
  184. package/dist/external-yiqRIIvW.cjs +16 -0
  185. package/dist/external-yiqRIIvW.cjs.map +1 -0
  186. package/dist/external-zBiIxeDG.cjs +70 -0
  187. package/dist/external-zBiIxeDG.cjs.map +1 -0
  188. package/dist/external-zw9fckWT.cjs +29 -0
  189. package/dist/external-zw9fckWT.cjs.map +1 -0
  190. package/dist/font-t7KoGNFX.js +17 -0
  191. package/dist/font-t7KoGNFX.js.map +1 -0
  192. package/dist/font-wlgaMRYN.cjs +16 -0
  193. package/dist/font-wlgaMRYN.cjs.map +1 -0
  194. package/dist/fontString-RKvYIr5H.js +13 -0
  195. package/dist/fontString-RKvYIr5H.js.map +1 -0
  196. package/dist/fontString-i24UxKCQ.cjs +12 -0
  197. package/dist/fontString-i24UxKCQ.cjs.map +1 -0
  198. package/dist/generic/Generic.d.ts +13 -0
  199. package/dist/generic/index.d.ts +1 -0
  200. package/dist/haul/Haul.d.ts +60 -0
  201. package/dist/haul/index.d.ts +1 -0
  202. package/dist/header/Actions.d.ts +15 -0
  203. package/dist/header/ButtonTitle.d.ts +13 -0
  204. package/dist/header/Header.d.ts +28 -0
  205. package/dist/header/Header.spec.d.ts +1 -0
  206. package/dist/header/Header.stories.d.ts +6 -0
  207. package/dist/header/Title.d.ts +13 -0
  208. package/dist/header/external.d.ts +4 -0
  209. package/dist/header/index.d.ts +1 -0
  210. package/dist/header.cjs +15 -0
  211. package/dist/header.cjs.map +1 -0
  212. package/dist/header.js +15 -0
  213. package/dist/header.js.map +1 -0
  214. package/dist/hooks/effect.d.ts +14 -0
  215. package/dist/hooks/index.d.ts +8 -0
  216. package/dist/hooks/ref.d.ts +31 -0
  217. package/dist/hooks/useClickOutside.d.ts +9 -0
  218. package/dist/hooks/useCursorDrag/index.d.ts +2 -0
  219. package/dist/hooks/useCursorDrag/types.d.ts +5 -0
  220. package/dist/hooks/useCursorDrag/useCursorDrag.d.ts +10 -0
  221. package/dist/hooks/useCursorDrag/useVirtualCursorDrag.d.ts +1 -0
  222. package/dist/hooks/useCursorDrag/useVirtualCursorDragWebKit.d.ts +2 -0
  223. package/dist/hooks/useCursorDrag/useVirtualCursorDragWebView.d.ts +2 -0
  224. package/dist/hooks/useDebouncedCallback.d.ts +2 -0
  225. package/dist/hooks/useFilter.d.ts +21 -0
  226. package/dist/hooks/useResize.d.ts +24 -0
  227. package/dist/hooks/useSelectMultiple.d.ts +51 -0
  228. package/dist/hooks/useTransforms.d.ts +15 -0
  229. package/dist/hooks/useUniqueKey.d.ts +6 -0
  230. package/dist/index.cjs +1175 -0
  231. package/dist/index.cjs.map +1 -0
  232. package/dist/index.d.ts +51 -0
  233. package/dist/index.js +1182 -0
  234. package/dist/index.js.map +1 -0
  235. package/dist/input/Date.d.ts +28 -0
  236. package/dist/input/DragButton.d.ts +14 -0
  237. package/dist/input/HelpText.d.ts +19 -0
  238. package/dist/input/Input.spec.d.ts +1 -0
  239. package/dist/input/Input.stories.d.ts +9 -0
  240. package/dist/input/Item.d.ts +23 -0
  241. package/dist/input/Label.d.ts +13 -0
  242. package/dist/input/Number.d.ts +30 -0
  243. package/dist/input/Switch.d.ts +15 -0
  244. package/dist/input/Text.d.ts +18 -0
  245. package/dist/input/Time.d.ts +30 -0
  246. package/dist/input/Time.spec.d.ts +1 -0
  247. package/dist/input/external.d.ts +10 -0
  248. package/dist/input/index.d.ts +1 -0
  249. package/dist/input/types.d.ts +19 -0
  250. package/dist/input.cjs +15 -0
  251. package/dist/input.cjs.map +1 -0
  252. package/dist/input.js +15 -0
  253. package/dist/input.js.map +1 -0
  254. package/dist/jsx-runtime-N1ikfypN.cjs +931 -0
  255. package/dist/jsx-runtime-N1ikfypN.cjs.map +1 -0
  256. package/dist/jsx-runtime-rX5tAIG2.js +932 -0
  257. package/dist/jsx-runtime-rX5tAIG2.js.map +1 -0
  258. package/dist/list/Column.d.ts +24 -0
  259. package/dist/list/Context.d.ts +45 -0
  260. package/dist/list/Core.d.ts +40 -0
  261. package/dist/list/Filter.d.ts +22 -0
  262. package/dist/list/KeyHover.d.ts +4 -0
  263. package/dist/list/List.d.ts +19 -0
  264. package/dist/list/List.spec.d.ts +1 -0
  265. package/dist/list/List.stories.d.ts +7 -0
  266. package/dist/list/Search.d.ts +12 -0
  267. package/dist/list/Selector.d.ts +11 -0
  268. package/dist/list/external.d.ts +9 -0
  269. package/dist/list/index.d.ts +1 -0
  270. package/dist/list/types.d.ts +38 -0
  271. package/dist/list.cjs +27 -0
  272. package/dist/list.cjs.map +1 -0
  273. package/dist/list.js +27 -0
  274. package/dist/list.js.map +1 -0
  275. package/dist/memo/index.d.ts +2 -0
  276. package/dist/memo/proxyMemo.d.ts +2 -0
  277. package/dist/memo/useMemoCompare.d.ts +5 -0
  278. package/dist/menu/ContextMenu.d.ts +78 -0
  279. package/dist/menu/Item.d.ts +35 -0
  280. package/dist/menu/Menu.d.ts +26 -0
  281. package/dist/menu/external.d.ts +3 -0
  282. package/dist/menu/index.d.ts +1 -0
  283. package/dist/menu.cjs +16 -0
  284. package/dist/menu.cjs.map +1 -0
  285. package/dist/menu.js +16 -0
  286. package/dist/menu.js.map +1 -0
  287. package/dist/mock/MockGLBufferController.d.ts +20 -0
  288. package/dist/mock/setuptests.d.ts +1 -0
  289. package/dist/mosaic/Mosaic.d.ts +35 -0
  290. package/dist/mosaic/Mosaic.spec.d.ts +1 -0
  291. package/dist/mosaic/Mosaic.stories.d.ts +5 -0
  292. package/dist/mosaic/external.d.ts +4 -0
  293. package/dist/mosaic/index.d.ts +1 -0
  294. package/dist/mosaic/tree.d.ts +70 -0
  295. package/dist/mosaic/types.d.ts +50 -0
  296. package/dist/mosaic/use.d.ts +24 -0
  297. package/dist/nav/Bar.d.ts +25 -0
  298. package/dist/nav/Drawer.d.ts +24 -0
  299. package/dist/nav/Nav.spec.d.ts +1 -0
  300. package/dist/nav/Nav.stories.d.ts +6 -0
  301. package/dist/nav/external.d.ts +2 -0
  302. package/dist/nav/index.d.ts +1 -0
  303. package/dist/os/Controls/Controls.d.ts +7 -0
  304. package/dist/os/Controls/Controls.stories.d.ts +6 -0
  305. package/dist/os/Controls/Mac.d.ts +8 -0
  306. package/dist/os/Controls/Windows.d.ts +3 -0
  307. package/dist/os/Controls/index.d.ts +3 -0
  308. package/dist/os/Controls/types.d.ts +12 -0
  309. package/dist/os/external.d.ts +2 -0
  310. package/dist/os/index.d.ts +1 -0
  311. package/dist/os/use.d.ts +2 -0
  312. package/dist/pluto/Pluto.d.ts +18 -0
  313. package/dist/pluto/aether/ pluto.d.ts +1 -0
  314. package/dist/pluto/aether/index.d.ts +1 -0
  315. package/dist/pluto/defaultWorker.d.ts +1 -0
  316. package/dist/pluto/index.d.ts +1 -0
  317. package/dist/ranger/SelectLabel.d.ts +6 -0
  318. package/dist/ranger/TimeRangeChip.d.ts +6 -0
  319. package/dist/ranger/TimeRangeChip.stories.d.ts +6 -0
  320. package/dist/ranger/external.d.ts +2 -0
  321. package/dist/ranger/index.d.ts +1 -0
  322. package/dist/resize/Core.d.ts +10 -0
  323. package/dist/resize/Multiple.d.ts +63 -0
  324. package/dist/resize/Single.d.ts +23 -0
  325. package/dist/resize/Single.spec.d.ts +1 -0
  326. package/dist/resize/Single.stories.d.ts +6 -0
  327. package/dist/resize/external.d.ts +3 -0
  328. package/dist/resize/index.d.ts +1 -0
  329. package/dist/select/Button.d.ts +18 -0
  330. package/dist/select/ClearButton.d.ts +3 -0
  331. package/dist/select/Direction.d.ts +11 -0
  332. package/dist/select/List.d.ts +7 -0
  333. package/dist/select/Multiple.d.ts +45 -0
  334. package/dist/select/Select.spec.d.ts +1 -0
  335. package/dist/select/Select.stories.d.ts +14 -0
  336. package/dist/select/Single.d.ts +37 -0
  337. package/dist/select/external.d.ts +4 -0
  338. package/dist/select/index.d.ts +1 -0
  339. package/dist/state/index.d.ts +1 -0
  340. package/dist/state/state.d.ts +27 -0
  341. package/dist/status/Aggregator.d.ts +27 -0
  342. package/dist/status/Circle.d.ts +6 -0
  343. package/dist/status/Text.d.ts +21 -0
  344. package/dist/status/aether/aggregator.d.ts +86 -0
  345. package/dist/status/aether/external.d.ts +2 -0
  346. package/dist/status/aether/index.d.ts +1 -0
  347. package/dist/status/aether/types.d.ts +26 -0
  348. package/dist/status/colors.d.ts +2 -0
  349. package/dist/status/external.d.ts +4 -0
  350. package/dist/status/index.d.ts +1 -0
  351. package/dist/style.css +3119 -0
  352. package/dist/synnax/Provider.d.ts +10 -0
  353. package/dist/synnax/aether/index.d.ts +1 -0
  354. package/dist/synnax/aether/provider.d.ts +225 -0
  355. package/dist/synnax/index.d.ts +1 -0
  356. package/dist/table-8MFXzE4C.js +13664 -0
  357. package/dist/table-8MFXzE4C.js.map +1 -0
  358. package/dist/table-VNkSG_Cj.cjs +13661 -0
  359. package/dist/table-VNkSG_Cj.cjs.map +1 -0
  360. package/dist/tabs/Selector.d.ts +23 -0
  361. package/dist/tabs/Tabs.d.ts +40 -0
  362. package/dist/tabs/Tabs.spec.d.ts +1 -0
  363. package/dist/tabs/Tabs.stories.d.ts +5 -0
  364. package/dist/tabs/external.d.ts +2 -0
  365. package/dist/tabs/index.d.ts +1 -0
  366. package/dist/tabs.cjs +15 -0
  367. package/dist/tabs.cjs.map +1 -0
  368. package/dist/tabs.js +15 -0
  369. package/dist/tabs.js.map +1 -0
  370. package/dist/tag/Tag.d.ts +12 -0
  371. package/dist/tag/Tag.spec.d.ts +1 -0
  372. package/dist/tag/Tag.stories.d.ts +5 -0
  373. package/dist/tag/index.d.ts +1 -0
  374. package/dist/telem/Pipeline.d.ts +2 -0
  375. package/dist/telem/Provider.d.ts +6 -0
  376. package/dist/telem/aether/context.d.ts +16 -0
  377. package/dist/telem/aether/convertSeries.d.ts +9 -0
  378. package/dist/telem/aether/external.d.ts +9 -0
  379. package/dist/telem/aether/factory.d.ts +14 -0
  380. package/dist/telem/aether/index.d.ts +1 -0
  381. package/dist/telem/aether/noop.d.ts +12 -0
  382. package/dist/telem/aether/pipeline.d.ts +263 -0
  383. package/dist/telem/aether/provider.d.ts +24 -0
  384. package/dist/telem/aether/remote.d.ts +154 -0
  385. package/dist/telem/aether/remote.spec.d.ts +1 -0
  386. package/dist/telem/aether/static.d.ts +98 -0
  387. package/dist/telem/aether/telem.d.ts +376 -0
  388. package/dist/telem/aether/telem.spec.d.ts +1 -0
  389. package/dist/telem/aether/transformers.d.ts +197 -0
  390. package/dist/telem/client/cache/cache.d.ts +14 -0
  391. package/dist/telem/client/cache/dynamic.d.ts +32 -0
  392. package/dist/telem/client/cache/dynamic.spec.d.ts +1 -0
  393. package/dist/telem/client/cache/external.d.ts +1 -0
  394. package/dist/telem/client/cache/index.d.ts +2 -0
  395. package/dist/telem/client/cache/static.d.ts +31 -0
  396. package/dist/telem/client/cache/static.spec.d.ts +1 -0
  397. package/dist/telem/client/client.d.ts +104 -0
  398. package/dist/telem/client/index.d.ts +1 -0
  399. package/dist/telem/control/Chip.d.ts +8 -0
  400. package/dist/telem/control/Controller.d.ts +15 -0
  401. package/dist/telem/control/Indicator.d.ts +8 -0
  402. package/dist/telem/control/Legend.d.ts +7 -0
  403. package/dist/telem/control/StateProvider.d.ts +8 -0
  404. package/dist/telem/control/aether/chip.d.ts +229 -0
  405. package/dist/telem/control/aether/controller.d.ts +166 -0
  406. package/dist/telem/control/aether/external.d.ts +6 -0
  407. package/dist/telem/control/aether/index.d.ts +1 -0
  408. package/dist/telem/control/aether/indicator.d.ts +248 -0
  409. package/dist/telem/control/aether/legend.d.ts +216 -0
  410. package/dist/telem/control/aether/registry.d.ts +2 -0
  411. package/dist/telem/control/aether/state.d.ts +113 -0
  412. package/dist/telem/control/external.d.ts +6 -0
  413. package/dist/telem/control/index.d.ts +1 -0
  414. package/dist/telem/index.d.ts +1 -0
  415. package/dist/testutil/dom.d.ts +2 -0
  416. package/dist/text/DateTime.d.ts +19 -0
  417. package/dist/text/Editable.d.ts +15 -0
  418. package/dist/text/Keyboard.d.ts +5 -0
  419. package/dist/text/Link.d.ts +17 -0
  420. package/dist/text/SelectLevel.d.ts +11 -0
  421. package/dist/text/Text.d.ts +12 -0
  422. package/dist/text/Text.spec.d.ts +1 -0
  423. package/dist/text/Text.stories.d.ts +8 -0
  424. package/dist/text/WithIcon.d.ts +13 -0
  425. package/dist/text/dimensions.d.ts +2 -0
  426. package/dist/text/external.d.ts +10 -0
  427. package/dist/text/index.d.ts +1 -0
  428. package/dist/text/symbols.d.ts +5 -0
  429. package/dist/text/types.d.ts +24 -0
  430. package/dist/text.cjs +17 -0
  431. package/dist/text.cjs.map +1 -0
  432. package/dist/text.js +17 -0
  433. package/dist/text.js.map +1 -0
  434. package/dist/theming/aether/external.d.ts +3 -0
  435. package/dist/theming/aether/index.d.ts +2 -0
  436. package/dist/theming/aether/provider.d.ts +9808 -0
  437. package/dist/theming/context.d.ts +22 -0
  438. package/dist/theming/core/fontString.d.ts +4 -0
  439. package/dist/theming/core/theme.d.ts +3830 -0
  440. package/dist/theming/css.d.ts +2 -0
  441. package/dist/theming/external.d.ts +5 -0
  442. package/dist/theming/font.d.ts +8 -0
  443. package/dist/theming/index.d.ts +1 -0
  444. package/dist/theming/theming.spec.d.ts +1 -0
  445. package/dist/theming.cjs +16 -0
  446. package/dist/theming.cjs.map +1 -0
  447. package/dist/theming.js +16 -0
  448. package/dist/theming.js.map +1 -0
  449. package/dist/tooltip/Config.d.ts +29 -0
  450. package/dist/tooltip/Dialog.d.ts +36 -0
  451. package/dist/tooltip/Tooltip.stories.d.ts +5 -0
  452. package/dist/tooltip/external.d.ts +3 -0
  453. package/dist/tooltip/index.d.ts +1 -0
  454. package/dist/tooltip/wrap.d.ts +29 -0
  455. package/dist/tree/Tree.d.ts +73 -0
  456. package/dist/tree/Tree.stories.d.ts +5 -0
  457. package/dist/tree/index.d.ts +1 -0
  458. package/dist/tree.cjs +26 -0
  459. package/dist/tree.cjs.map +1 -0
  460. package/dist/tree.js +26 -0
  461. package/dist/tree.js.map +1 -0
  462. package/dist/triggers/Provider.d.ts +13 -0
  463. package/dist/triggers/Status.d.ts +5 -0
  464. package/dist/triggers/Text.d.ts +7 -0
  465. package/dist/triggers/Triggers.spec.d.ts +1 -0
  466. package/dist/triggers/Triggers.stories.d.ts +6 -0
  467. package/dist/triggers/external.d.ts +6 -0
  468. package/dist/triggers/hooks.d.ts +25 -0
  469. package/dist/triggers/index.d.ts +1 -0
  470. package/dist/triggers/triggers.d.ts +130 -0
  471. package/dist/triggers/useDrag.d.ts +17 -0
  472. package/dist/triggers.cjs +16 -0
  473. package/dist/triggers.cjs.map +1 -0
  474. package/dist/triggers.js +16 -0
  475. package/dist/triggers.js.map +1 -0
  476. package/dist/useDrag-KRQ7DTg1.cjs +48 -0
  477. package/dist/useDrag-KRQ7DTg1.cjs.map +1 -0
  478. package/dist/useDrag-rQt5hv4R.js +49 -0
  479. package/dist/useDrag-rQt5hv4R.js.map +1 -0
  480. package/dist/util/case.d.ts +1 -0
  481. package/dist/util/children.d.ts +3 -0
  482. package/dist/util/component.d.ts +5 -0
  483. package/dist/util/event.d.ts +6 -0
  484. package/dist/util/renderProp.d.ts +7 -0
  485. package/dist/util/zod.d.ts +2 -0
  486. package/dist/video/Video.d.ts +5 -0
  487. package/dist/video/Video.stories.d.ts +5 -0
  488. package/dist/video/index.d.ts +1 -0
  489. package/dist/video.cjs +10 -0
  490. package/dist/video.cjs.map +1 -0
  491. package/dist/video.js +10 -0
  492. package/dist/video.js.map +1 -0
  493. package/dist/viewport/Mask.d.ts +7 -0
  494. package/dist/viewport/SelectMode.d.ts +8 -0
  495. package/dist/viewport/Viewport.stories.d.ts +6 -0
  496. package/dist/viewport/external.d.ts +3 -0
  497. package/dist/viewport/index.d.ts +1 -0
  498. package/dist/viewport/use.d.ts +35 -0
  499. package/dist/vis/axis/axis.d.ts +97 -0
  500. package/dist/vis/axis/canvas.d.ts +18 -0
  501. package/dist/vis/axis/external.d.ts +3 -0
  502. package/dist/vis/axis/index.d.ts +1 -0
  503. package/dist/vis/axis/ticks.d.ts +33 -0
  504. package/dist/vis/button/aether/button.d.ts +94 -0
  505. package/dist/vis/button/aether/index.d.ts +1 -0
  506. package/dist/vis/button/index.d.ts +1 -0
  507. package/dist/vis/button/use.d.ts +9 -0
  508. package/dist/vis/canvas/Canvas.d.ts +11 -0
  509. package/dist/vis/canvas/aether/canvas.d.ts +230 -0
  510. package/dist/vis/canvas/aether/index.d.ts +1 -0
  511. package/dist/vis/canvas/index.d.ts +1 -0
  512. package/dist/vis/diagram/Diagram.d.ts +52 -0
  513. package/dist/vis/diagram/Diagram.stories.d.ts +5 -0
  514. package/dist/vis/diagram/aether/Diagram.d.ts +587 -0
  515. package/dist/vis/diagram/aether/index.d.ts +1 -0
  516. package/dist/vis/diagram/align.d.ts +3 -0
  517. package/dist/vis/diagram/align.spec.d.ts +1 -0
  518. package/dist/vis/diagram/edge/Edge.d.ts +14 -0
  519. package/dist/vis/diagram/edge/connector/connector.d.ts +59 -0
  520. package/dist/vis/diagram/edge/connector/connector.spec.d.ts +1 -0
  521. package/dist/vis/diagram/edge/connector/index.d.ts +1 -0
  522. package/dist/vis/diagram/edge/index.d.ts +1 -0
  523. package/dist/vis/diagram/external.d.ts +4 -0
  524. package/dist/vis/diagram/index.d.ts +1 -0
  525. package/dist/vis/diagram/types.d.ts +71 -0
  526. package/dist/vis/diagram/util.d.ts +21 -0
  527. package/dist/vis/draw2d/canvas.d.ts +106 -0
  528. package/dist/vis/draw2d/index.d.ts +60 -0
  529. package/dist/vis/eraser/aether/eraser.d.ts +194 -0
  530. package/dist/vis/eraser/aether/index.d.ts +1 -0
  531. package/dist/vis/eraser/index.d.ts +1 -0
  532. package/dist/vis/eraser/use.d.ts +11 -0
  533. package/dist/vis/legend/Container.d.ts +11 -0
  534. package/dist/vis/legend/Simple.d.ts +16 -0
  535. package/dist/vis/legend/external.d.ts +2 -0
  536. package/dist/vis/legend/index.d.ts +1 -0
  537. package/dist/vis/line/Line.d.ts +8 -0
  538. package/dist/vis/line/aether/index.d.ts +1 -0
  539. package/dist/vis/line/aether/line.d.ts +184 -0
  540. package/dist/vis/line/index.d.ts +1 -0
  541. package/dist/vis/lineplot/Axis.d.ts +17 -0
  542. package/dist/vis/lineplot/Legend.d.ts +7 -0
  543. package/dist/vis/lineplot/Line.d.ts +7 -0
  544. package/dist/vis/lineplot/LinePlot.d.ts +32 -0
  545. package/dist/vis/lineplot/LinePlot.stories.d.ts +5 -0
  546. package/dist/vis/lineplot/Title.d.ts +4 -0
  547. package/dist/vis/lineplot/Viewport.d.ts +6 -0
  548. package/dist/vis/lineplot/aether/LinePlot.d.ts +622 -0
  549. package/dist/vis/lineplot/aether/XAxis.d.ts +211 -0
  550. package/dist/vis/lineplot/aether/YAxis.d.ts +218 -0
  551. package/dist/vis/lineplot/aether/axis.d.ts +144 -0
  552. package/dist/vis/lineplot/aether/external.d.ts +3 -0
  553. package/dist/vis/lineplot/aether/grid.d.ts +22 -0
  554. package/dist/vis/lineplot/aether/index.d.ts +2 -0
  555. package/dist/vis/lineplot/external.d.ts +6 -0
  556. package/dist/vis/lineplot/index.d.ts +1 -0
  557. package/dist/vis/lineplot/tooltip/Tooltip.d.ts +8 -0
  558. package/dist/vis/lineplot/tooltip/aether/index.d.ts +1 -0
  559. package/dist/vis/lineplot/tooltip/aether/tooltip.d.ts +185 -0
  560. package/dist/vis/lineplot/tooltip/index.d.ts +1 -0
  561. package/dist/vis/measure/Measure.d.ts +6 -0
  562. package/dist/vis/measure/aether/index.d.ts +1 -0
  563. package/dist/vis/measure/aether/measure.d.ts +307 -0
  564. package/dist/vis/measure/index.d.ts +1 -0
  565. package/dist/vis/pid/Forms.d.ts +32 -0
  566. package/dist/vis/pid/Labeled.d.ts +15 -0
  567. package/dist/vis/pid/SelectOrientation.d.ts +15 -0
  568. package/dist/vis/pid/SelectOrientation.stories.d.ts +5 -0
  569. package/dist/vis/pid/Symbols.d.ts +205 -0
  570. package/dist/vis/pid/index.d.ts +1 -0
  571. package/dist/vis/pid/primitives/Primitives.d.ts +98 -0
  572. package/dist/vis/pid/primitives/Primitives.stories.d.ts +5 -0
  573. package/dist/vis/pid/primitives/index.d.ts +1 -0
  574. package/dist/vis/pid/registry.d.ts +17 -0
  575. package/dist/vis/render/GLProgram.d.ts +44 -0
  576. package/dist/vis/render/clear/index.d.ts +1 -0
  577. package/dist/vis/render/clear/program.d.ts +14 -0
  578. package/dist/vis/render/context.d.ts +61 -0
  579. package/dist/vis/render/controller.d.ts +14 -0
  580. package/dist/vis/render/eraser.d.ts +19 -0
  581. package/dist/vis/render/external.d.ts +5 -0
  582. package/dist/vis/render/index.d.ts +1 -0
  583. package/dist/vis/render/loop.d.ts +73 -0
  584. package/dist/vis/rule/Rule.d.ts +12 -0
  585. package/dist/vis/rule/aether/aether.d.ts +121 -0
  586. package/dist/vis/rule/aether/index.d.ts +1 -0
  587. package/dist/vis/rule/index.d.ts +1 -0
  588. package/dist/vis/table/Table.d.ts +25 -0
  589. package/dist/vis/table/Table.stories.d.ts +5 -0
  590. package/dist/vis/table/aether/index.d.ts +1 -0
  591. package/dist/vis/table/aether/table.d.ts +353 -0
  592. package/dist/vis/table/cell/Label.d.ts +7 -0
  593. package/dist/vis/table/cell/element.d.ts +18 -0
  594. package/dist/vis/table/cell/external.d.ts +3 -0
  595. package/dist/vis/table/cell/index.d.ts +1 -0
  596. package/dist/vis/table/cell/registry.d.ts +2 -0
  597. package/dist/vis/table/cell/value.d.ts +9 -0
  598. package/dist/vis/table/external.d.ts +2 -0
  599. package/dist/vis/table/index.d.ts +1 -0
  600. package/dist/vis/table/use.d.ts +101 -0
  601. package/dist/vis/toggle/aether/index.d.ts +1 -0
  602. package/dist/vis/toggle/aether/toggle.d.ts +170 -0
  603. package/dist/vis/toggle/index.d.ts +1 -0
  604. package/dist/vis/toggle/use.d.ts +9 -0
  605. package/dist/vis/value/aether/index.d.ts +1 -0
  606. package/dist/vis/value/aether/value.d.ts +462 -0
  607. package/dist/vis/value/external.d.ts +1 -0
  608. package/dist/vis/value/index.d.ts +1 -0
  609. package/dist/vis/value/use.d.ts +151 -0
  610. package/dist/worker/Context.d.ts +15 -0
  611. package/dist/worker/index.d.ts +1 -0
  612. package/package.json +181 -0
@@ -0,0 +1,12 @@
1
+ import { j as jsxRuntimeExports } from "./jsx-runtime-rX5tAIG2.js";
2
+ import { C as CSS } from "./css-NTD4Xm8x.js";
3
+ import "./Video-w40geAFS.js";
4
+ const Video = ({ href, className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("video", { className: CSS(CSS.B("video"), className), ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("source", { src: href, type: "video/mp4" }) });
5
+ const Video$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6
+ __proto__: null,
7
+ Video
8
+ }, Symbol.toStringTag, { value: "Module" }));
9
+ export {
10
+ Video$1 as V
11
+ };
12
+ //# sourceMappingURL=Video-Vpwp5ao1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Video-Vpwp5ao1.js","sources":["../src/video/Video.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ComponentPropsWithoutRef, type ReactElement } from \"react\";\n\nimport { CSS } from \"@/css\";\n\nimport \"@/video/Video.css\";\n\nexport interface VideoProps extends ComponentPropsWithoutRef<\"video\"> {\n href: string;\n}\n\nexport const Video = ({ href, className, ...props }: VideoProps): ReactElement => (\n <video className={CSS(CSS.B(\"video\"), className)} {...props}>\n <source src={href} type=\"video/mp4\" />\n </video>\n);\n"],"names":["jsx"],"mappings":";;;AAmBa,MAAA,QAAQ,CAAC,EAAE,MAAM,WAAW,GAAG,MAAA,MAC1CA,kCAAA,IAAC,SAAM,EAAA,WAAW,IAAI,IAAI,EAAE,OAAO,GAAG,SAAS,GAAI,GAAG,OACpD,UAACA,kCAAAA,IAAA,UAAA,EAAO,KAAK,MAAM,MAAK,YAAA,CAAY,EACtC,CAAA;;;;;"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ const jsxRuntime = require("./jsx-runtime-N1ikfypN.cjs");
3
+ const css = require("./css-V3VUT_Js.cjs");
4
+ require("./Video-k52RqIHf.cjs");
5
+ const Video = ({ href, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("video", { className: css.CSS(css.CSS.B("video"), className), ...props, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("source", { src: href, type: "video/mp4" }) });
6
+ const Video$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7
+ __proto__: null,
8
+ Video
9
+ }, Symbol.toStringTag, { value: "Module" }));
10
+ exports.Video = Video$1;
11
+ //# sourceMappingURL=Video-a7BUKvzF.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Video-a7BUKvzF.cjs","sources":["../src/video/Video.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ComponentPropsWithoutRef, type ReactElement } from \"react\";\n\nimport { CSS } from \"@/css\";\n\nimport \"@/video/Video.css\";\n\nexport interface VideoProps extends ComponentPropsWithoutRef<\"video\"> {\n href: string;\n}\n\nexport const Video = ({ href, className, ...props }: VideoProps): ReactElement => (\n <video className={CSS(CSS.B(\"video\"), className)} {...props}>\n <source src={href} type=\"video/mp4\" />\n </video>\n);\n"],"names":["jsx","CSS"],"mappings":";;;;AAmBa,MAAA,QAAQ,CAAC,EAAE,MAAM,WAAW,GAAG,MAAA,MAC1CA,2BAAA,kBAAA,IAAC,SAAM,EAAA,WAAWC,IAAI,IAAAA,IAAA,IAAI,EAAE,OAAO,GAAG,SAAS,GAAI,GAAG,OACpD,UAACD,2BAAAA,kBAAAA,IAAA,UAAA,EAAO,KAAK,MAAM,MAAK,YAAA,CAAY,EACtC,CAAA;;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=Video-k52RqIHf.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Video-k52RqIHf.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=Video-w40geAFS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Video-w40geAFS.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ import { type ReactElement } from "react";
2
+ import { type Button } from '../button';
3
+ import { Resize } from '../resize';
4
+ /** The props for a single entry in the {@link Accordion} component. */
5
+ export interface Entry {
6
+ /** A unique key for the entry. */
7
+ key: string;
8
+ /** The name for the entries header. */
9
+ name: string;
10
+ /** The content for the entry. */
11
+ content: ReactElement;
12
+ /**
13
+ * The initial size for the entry. It's recommended to set this to a decimal value
14
+ * representing the percentage of the overall parent size.
15
+ */
16
+ initialSize?: number;
17
+ /**
18
+ * A list of actions to display in the entry's header. See the {@link Header.Actions}
19
+ * component for more details.
20
+ */
21
+ actions?: Array<Button.IconProps | ReactElement>;
22
+ }
23
+ /** The props for the {@link Accordion} component. */
24
+ export interface AccordionProps extends Omit<Resize.MultipleProps, "sizeDistribution" | "parentSize" | "onDragHandle" | "direction"> {
25
+ data: Entry[];
26
+ }
27
+ /**
28
+ * A resizable accordion component, whose entries can be expanded and collapsed. This
29
+ * component is intentionally opinionated in its interface in order to provide stylistic
30
+ * consistency and simplicity. If you need more control, look at building a custom
31
+ * accordion component using {@link Resize.Multiple}.
32
+ *
33
+ * @param props - All unused props are passed to the underyling {@link Resize.Multiple}
34
+ * component.
35
+ * @param props.entries - The entries to display in the accordion. See the
36
+ * {@link Entry} interface for more details.
37
+ */
38
+ export declare const Accordion: ({ data, ...props }: AccordionProps) => ReactElement;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryFn } from "@storybook/react";
2
+ import { Accordion } from '../accordion';
3
+ declare const story: Meta<typeof Accordion.Accordion>;
4
+ export declare const Primary: StoryFn<typeof Accordion>;
5
+ export default story;
@@ -0,0 +1 @@
1
+ export * as Accordion from '../accordion/Accordion';
@@ -0,0 +1,247 @@
1
+ import { Instrumentation } from "@synnaxlabs/alamos";
2
+ import { type Sender, type SenderHandler } from "@synnaxlabs/x";
3
+ import { z } from "zod";
4
+ import { type MainMessage, type WorkerMessage } from '../../aether/message';
5
+ import { state } from '../../state';
6
+ type UpdateVariant = "state" | "context";
7
+ /** An update to an AetherComponent from the main React tree. */
8
+ export interface Update {
9
+ /**
10
+ * The variant of update being performed. State updates are used to update
11
+ * the state of a particular component, while context updates are used to propagate
12
+ * context changes to children in the tree.
13
+ */
14
+ variant: UpdateVariant;
15
+ ctx: Context;
16
+ /**
17
+ * The path of the component in the tree. This path is shortened as the update is
18
+ * propagated through the tree
19
+ */
20
+ path: string[];
21
+ /**
22
+ * The type of the component being updated. This is used to create the component
23
+ * if it does not already exist.
24
+ */
25
+ type: string;
26
+ /**
27
+ * The state to udpate on the component . This is only present if the variant is
28
+ * "state".
29
+ */
30
+ state: any;
31
+ }
32
+ /**
33
+ * A component in the Aether tree. Each component instance has a unique key identifying
34
+ * it within the tree, and also has a type identifying it's class. Components
35
+ * implementing different functionality should have different types, and these types
36
+ * typically correlate to the corresponding name of the component in the react tree.
37
+ */
38
+ export interface Component {
39
+ /** The type of component. */
40
+ type: string;
41
+ /** A unique key identifying the component within the tree. */
42
+ key: string;
43
+ ctx: Context;
44
+ /**
45
+ * Propagates an update to the internal tree of the component, updating the component
46
+ * itself and any children as necessary.
47
+ *
48
+ * @param update - The update to propagate.
49
+ */
50
+ internalUpdate: (update: Update) => void;
51
+ /**
52
+ * Propagates a delete to the internal tree of the component, calling the handleDelete
53
+ * component on the component itself and any children as necessary. It is up to
54
+ * the parent component to remove the child from its internal tree.
55
+ *
56
+ * @param path - The path of the component to delete.
57
+ */
58
+ internalDelete: (path: string[]) => void;
59
+ }
60
+ /** A constructor type for an AetherComponent. */
61
+ export type ComponentConstructor = new (update: Update) => Component;
62
+ /**
63
+ * AetherContext is used to propagate environment information to components in the
64
+ * aether tree. It allows components to propagate state changes to the main react
65
+ * tree, create new components, and set/get values from the environment, passing
66
+ * them to children as necessary.
67
+ */
68
+ export declare class Context {
69
+ readonly providers: Map<string, any>;
70
+ private readonly registry;
71
+ private readonly sender;
72
+ changed: boolean;
73
+ constructor(sender: Sender<WorkerMessage>, registry: Record<string, ComponentConstructor>, providers?: Map<string, any>);
74
+ /**
75
+ * Proapgates the given state for the component with the given key to the main
76
+ * react tree.
77
+ *
78
+ * @param key - The key of the component to propagate the state for.
79
+ * @param state - The state to propagate.
80
+ * @param transfer - Any transferable objects to transfer to the main thread.
81
+ */
82
+ propagateState(key: string, state: any, transfer?: Transferable[]): void;
83
+ /**
84
+ * Copies the context, setting it's 'changed' flag to false, and optionally merging
85
+ * another set of context values into it.
86
+ *
87
+ * @param merge - The context to merge into the copy.
88
+ * @returns The copied context.
89
+ */
90
+ copyAndMerge(merge?: Context): Context;
91
+ /**
92
+ * Sets a value on the context and flags the context as changed.
93
+ *
94
+ * @param key - The key to set.
95
+ * @param value - The value to set.
96
+ */
97
+ set(key: string, value: any): void;
98
+ setIfNotHas(key: string, value: any): void;
99
+ /**
100
+ * Creates a new component using the given update. It is up to the caller to
101
+ * validate that the component type is valid.
102
+ *
103
+ * @param update - The update to create the component from.
104
+ * @returns The created component.
105
+ */
106
+ create<C extends Component>(update: Update): C;
107
+ /**
108
+ * Gets a value from the context, returning null if the value does not exist. It's
109
+ * imporant to note that the context provides no validation of the type of the
110
+ * value, so it is up to the caller to ensure that the value is of the correct type.
111
+ *
112
+ * @param key - The key to get.
113
+ * @returns The value, or null if it does not exist.
114
+ */
115
+ getOptional<P>(key: string): P | null;
116
+ /**
117
+ * Checks if the context has a value for the given key.
118
+ *
119
+ * @param key - The key to check.
120
+ * @returns True if the context has a value for the given key, false otherwise.
121
+ */
122
+ has(key: string): boolean;
123
+ /**
124
+ * Gets a value from the context, throwing an error if the value does not exist.
125
+ * It's imporant to note that the context provides no validation of the type of
126
+ * the value, so it is up to the caller to ensure that the value is of the correct
127
+ *
128
+ * @param key - The key to get.
129
+ * @returns The value.
130
+ */
131
+ get<P>(key: string): P;
132
+ }
133
+ /**
134
+ * Implements an AtherComponent that does not have any children, and servers as the base
135
+ * class for the AetherComposite type. The corresponding react component should NOT have
136
+ * any children that use Aether functionality; for those cases, use AetherComposite instead.
137
+ */
138
+ export declare class Leaf<S extends z.ZodTypeAny, IS extends {} = {}> implements Component {
139
+ readonly type: string;
140
+ readonly key: string;
141
+ _ctx: Context;
142
+ private readonly _internalState;
143
+ private _state;
144
+ private _prevState;
145
+ private _deleted;
146
+ schema: S | undefined;
147
+ constructor(u: Update);
148
+ private get _schema();
149
+ /**
150
+ * Sets the state on the component, communicating the change to the corresponding
151
+ * React component on the main thread.
152
+ *
153
+ * @param next - The new state to set on the component. This can be the state object
154
+ * or a pure function that takes in the previous state and returns the next state.
155
+ */
156
+ setState(next: state.SetArg<z.input<S> | z.output<S>>): void;
157
+ /** Returns the current context on the component. */
158
+ get ctx(): Context;
159
+ /** @returns the current state of the component. */
160
+ get state(): z.output<S>;
161
+ get internal(): IS;
162
+ /** @returns the previous state of the component. */
163
+ get prevState(): z.output<S>;
164
+ get deleted(): boolean;
165
+ /**
166
+ * @implements AetherComponent, and should NOT be called by a subclass other than
167
+ * AetherComposite.
168
+ */
169
+ internalUpdate({ variant, path, ctx, state }: Update): void;
170
+ /**
171
+ * @implements AetherComponent, and should NOT be called by a subclass other than
172
+ * AetherComposite.
173
+ */
174
+ internalDelete(path: string[]): void;
175
+ /**
176
+ * afterUpdate is optionally defined by a subclass, allowing the component to
177
+ * perform some action after the component is updated. At this point, the current
178
+ * state, previous state, derived state, and current context are all available to
179
+ * the component.
180
+ */
181
+ afterUpdate(): void;
182
+ /**
183
+ * Runs after the component has been spliced out of the tree. This is useful for
184
+ * running cleanup code, such as unsubscribing from an event emitter. At this point,
185
+ * the current state, previous state, derived state, and current context are all
186
+ * available to the component, and this.deleted is true.
187
+ */
188
+ afterDelete(): void;
189
+ private validatePath;
190
+ }
191
+ /**
192
+ * AetherComposite is an implementation of AetherComponent that allows it to maintain
193
+ * child components. It is the base class for all composite components, and should not
194
+ * be used directly.
195
+ */
196
+ export declare class Composite<S extends z.ZodTypeAny, IS extends {} = {}, C extends Component = Component> extends Leaf<S, IS> implements Component {
197
+ _children: C[];
198
+ constructor(u: Update);
199
+ internalMemo: Record<string, any>;
200
+ /** @returns a readonly array of the children of the component. */
201
+ get children(): readonly C[];
202
+ /**
203
+ * @implements AetherComponent, and should NOT be called by a subclass, except for
204
+ * AetherRoot.
205
+ */
206
+ internalUpdate(u: Update): void;
207
+ private updateContext;
208
+ private updateChild;
209
+ private updateThis;
210
+ internalDelete(path: string[]): void;
211
+ getRequiredKey(path: string[], type?: string): [string, string[]];
212
+ /**
213
+ * Finds a child component with the given key.
214
+ *
215
+ * @param key - the key of the child component to find.
216
+ * @returns the child component, or null if no child component with the given key
217
+ */
218
+ findChild<T extends C = C>(key: string): T | null;
219
+ /**
220
+ * Finds all children of the component with the given type
221
+ *
222
+ * @param types - the type of the children to find
223
+ * @returns an array of all children of the component with the given type
224
+ */
225
+ childrenOfType<T extends C = C>(...types: Array<T["type"]>): readonly T[];
226
+ }
227
+ export type ComponentRegistry = Record<string, ComponentConstructor>;
228
+ declare const aetherRootState: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
229
+ export interface RootProps {
230
+ worker: SenderHandler<WorkerMessage, MainMessage>;
231
+ registry: ComponentRegistry;
232
+ instrumentation?: Instrumentation;
233
+ }
234
+ export declare class Root extends Composite<typeof aetherRootState> {
235
+ wrap: SenderHandler<WorkerMessage, MainMessage>;
236
+ instrumentation: Instrumentation;
237
+ private static readonly TYPE;
238
+ private static readonly KEY;
239
+ private static readonly ZERO_UPDATE;
240
+ static readonly schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
241
+ schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
242
+ static render(props: RootProps): Root;
243
+ private constructor();
244
+ handle(msg: MainMessage): void;
245
+ }
246
+ export declare const render: typeof Root.render;
247
+ export {};
@@ -0,0 +1,2 @@
1
+ import * as aether from '../../aether/aether/aether';
2
+ export { aether };
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ export declare const exampleProps: z.ZodObject<{
3
+ x: z.ZodNumber;
4
+ }, "strip", z.ZodTypeAny, {
5
+ x: number;
6
+ }, {
7
+ x: number;
8
+ }>;
@@ -0,0 +1 @@
1
+ export * as Aether from '../aether/main';
@@ -0,0 +1,96 @@
1
+ import { type ComponentType, type FC, type PropsWithChildren, type ReactElement } from "react";
2
+ import { type SenderHandler } from "@synnaxlabs/x";
3
+ import { type z } from "zod";
4
+ import { type MainMessage, type WorkerMessage } from '../aether/message';
5
+ import { state } from '../state';
6
+ export interface CreateReturn {
7
+ setState: (state: any, transfer?: Transferable[]) => void;
8
+ delete: () => void;
9
+ }
10
+ export interface ContextValue {
11
+ path: string[];
12
+ create: (type: string, path: string[], onReceive?: StateHandler) => CreateReturn;
13
+ }
14
+ export declare const Context: import("react").Context<ContextValue>;
15
+ export interface ProviderProps extends PropsWithChildren {
16
+ workerKey: string;
17
+ worker?: SenderHandler<MainMessage, WorkerMessage>;
18
+ }
19
+ export declare const Provider: ({ workerKey, worker: propsWorker, children, }: ProviderProps) => ReactElement;
20
+ export declare const useAetherContext: () => ContextValue;
21
+ export interface UseLifecycleReturn<S extends z.ZodTypeAny> {
22
+ path: string[];
23
+ setState: (state: z.input<S>, transfer?: Transferable[]) => void;
24
+ }
25
+ export interface UseLifecycleProps<S extends z.ZodTypeAny> {
26
+ type: string;
27
+ schema: S;
28
+ aetherKey: string;
29
+ initialState: z.input<S>;
30
+ initialTransfer?: Transferable[];
31
+ onReceive?: StateHandler;
32
+ }
33
+ export interface UseProps<S extends z.ZodTypeAny> extends Omit<UseLifecycleProps<S>, "onReceive"> {
34
+ }
35
+ export type UseReturn<S extends z.ZodTypeAny> = [
36
+ {
37
+ path: string[];
38
+ },
39
+ z.output<S>,
40
+ (state: state.SetArg<z.input<S>>, transfer?: Transferable[]) => void
41
+ ];
42
+ /**
43
+ * Use creates a new aether component with a unique key and type.
44
+ *
45
+ * @param props.type - The type of the component. Aether will use this to instantiate
46
+ * the correct component type on the worker thread. A constructor for this type must
47
+ * exist on the registry passed into aether.render on the worker thread.
48
+ * @param props.aetherKey - A unique key for the component that is used to identify it
49
+ * in the aether component tree. We recommend using `Aether.wrap` to generate unique keys.
50
+ * @param props.schema - The zod schema for the component's state. Used to validate state
51
+ * changes on transfer to and from the worker thread.
52
+ * @param props.initialState - The initial state for the component. Note that this state
53
+ * is only used on the first render, and any changes to this value will not be reflected
54
+ * in the component's state. To alter the component's state, use the setState function
55
+ * returned by the hook.
56
+ * @returns A triplet with the following values:
57
+ * 1. An object containing metadata about the generated component. This object contains
58
+ * a path property, which is an array of strings representing the path to the component
59
+ * in the aether component tree.
60
+ * 2. The component's current state. This is synchronised with the worker thread, and
61
+ * can be updated by both the worker and the main thread.
62
+ * 3. A function that can be used to update the component's state. This function takes
63
+ * in both the next state and an optional array of transferable objects. The next state
64
+ * can be either a new state, or a function that takes in the current state and returns
65
+ * the next state. This function is impure, and will update the component's state on the
66
+ * worker thread.
67
+ */
68
+ export declare const use: <S extends z.ZodTypeAny>(props: UseProps<S>) => UseReturn<S>;
69
+ type StateHandler = (state: any) => void;
70
+ export interface CompositeProps extends PropsWithChildren {
71
+ path: string[];
72
+ }
73
+ /**
74
+ * Composite establishes all children as child components of the current component. The
75
+ * provide path should match the path returned by the {@link use} hook. Any children
76
+ * of this component will be added to the `children` property of the component on the
77
+ * worker tree.
78
+ *
79
+ * Naturally, composites can be nested within each other. Child components that are
80
+ */
81
+ export declare const Composite: import("react").MemoExoticComponent<({ children, path }: CompositeProps) => JSX.Element>;
82
+ /**
83
+ * Wrap wraps a component to generate a unique key that persists across re-renders. This
84
+ * hook is necessary to create an aether enhanced component when using React.StrictMode.
85
+ *
86
+ * @param displayName - The display name of the component. Used or react devtools.
87
+ * @param Component - The component to wrap. This component receives an additional
88
+ * aetherKey prop along with its normal props.
89
+ * @returns A wrapped component that is behaviorally identical to the original component.
90
+ */
91
+ export declare const wrap: <P extends {}>(displayName: string, Component: ComponentType<P & {
92
+ aetherKey: string;
93
+ }>) => FC<P & {
94
+ aetherKey?: string | undefined;
95
+ }>;
96
+ export {};
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ export declare const exampleProps: z.ZodObject<{
3
+ x: z.ZodNumber;
4
+ }, "strip", z.ZodTypeAny, {
5
+ x: number;
6
+ }, {
7
+ x: number;
8
+ }>;
@@ -0,0 +1,17 @@
1
+ export interface MainUpdate {
2
+ variant: "update";
3
+ path: string[];
4
+ type: string;
5
+ state: any;
6
+ }
7
+ export interface MainDelete {
8
+ variant: "delete";
9
+ type: string;
10
+ path: string[];
11
+ }
12
+ export interface WorkerUpdate {
13
+ key: string;
14
+ state: any;
15
+ }
16
+ export type WorkerMessage = WorkerUpdate;
17
+ export type MainMessage = MainUpdate | MainDelete;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const css = require("./css-V3VUT_Js.cjs");
4
+ const component = require("./component-joFaJiQW.cjs");
5
+ const table = require("./table-VNkSG_Cj.cjs");
6
+ const fontString = require("./fontString-i24UxKCQ.cjs");
7
+ const external$3 = require("./external-eQU48hM4.cjs");
8
+ require("zod");
9
+ require("react");
10
+ require("react-dom");
11
+ require("./dimensions-Sej0Zly9.cjs");
12
+ const external$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13
+ __proto__: null,
14
+ Provider: component.Provider,
15
+ REGISTRY: component.REGISTRY,
16
+ fontString: fontString.fontString,
17
+ synnaxDark: component.synnaxDark,
18
+ synnaxLight: component.synnaxLight,
19
+ themeZ: component.themeZ,
20
+ themes: component.themes,
21
+ use: component.use
22
+ }, Symbol.toStringTag, { value: "Module" }));
23
+ const external$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24
+ __proto__: null,
25
+ Context: table.Context,
26
+ Controller: table.Controller,
27
+ Eraser: table.Eraser,
28
+ GLProgram: table.GLProgram,
29
+ Loop: table.Loop,
30
+ REASON_DATA: table.REASON_DATA,
31
+ REASON_LAYOUT: table.REASON_LAYOUT,
32
+ REASON_TOOL: table.REASON_TOOL
33
+ }, Symbol.toStringTag, { value: "Module" }));
34
+ const external = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
35
+ __proto__: null,
36
+ LinePlot: table.LinePlot,
37
+ REGISTRY: table.REGISTRY$1,
38
+ XAxis: table.XAxis,
39
+ YAxis: table.YAxis,
40
+ linePlotStateZ: table.linePlotStateZ,
41
+ xAxisStateZ: table.xAxisStateZ,
42
+ yAxisStateZ: table.yAxisStateZ
43
+ }, Symbol.toStringTag, { value: "Module" }));
44
+ const render = () => {
45
+ const w = new css.RoutedWorker((data, transfer) => postMessage(data, transfer));
46
+ onmessage = w.handle.bind(w);
47
+ const REGISTRY = {
48
+ ...table.REGISTRY$1,
49
+ ...table.REGISTRY$2,
50
+ ...table.REGISTRY$3,
51
+ ...table.REGISTRY,
52
+ ...table.REGISTRY$4,
53
+ ...table.REGISTRY$5,
54
+ ...table.REGISTRY$6,
55
+ ...table.REGISTRY$7,
56
+ ...table.REGISTRY$8,
57
+ ...table.REGISTRY$9,
58
+ ...table.REGISTRY$10,
59
+ ...table.REGISTRY$11,
60
+ ...component.REGISTRY,
61
+ ...component.REGISTRY$1,
62
+ ...table.REGISTRY$12,
63
+ ...table.REGISTRY$13,
64
+ ...table.REGISTRY$14,
65
+ ...table.REGISTRY$15
66
+ };
67
+ component.render({
68
+ worker: w.route("vis"),
69
+ registry: REGISTRY
70
+ });
71
+ };
72
+ const _pluto = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
73
+ __proto__: null,
74
+ render
75
+ }, Symbol.toStringTag, { value: "Module" }));
76
+ exports.color = css.color;
77
+ exports.aether = component.aether;
78
+ exports.canvas = table.canvas;
79
+ exports.diagram = table.Diagram;
80
+ exports.measure = table.measure;
81
+ exports.rule = table.aether;
82
+ exports.synnax = table.provider;
83
+ exports.tooltip = table.tooltip;
84
+ exports.value = table.value;
85
+ exports.telem = external$3.external;
86
+ exports.lineplot = external;
87
+ exports.pluto = _pluto;
88
+ exports.render = external$1;
89
+ exports.theming = external$2;
90
+ //# sourceMappingURL=aether.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aether.cjs","sources":["../src/pluto/aether/ pluto.ts"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { RoutedWorker } from \"@synnaxlabs/x\";\n\nimport { aether } from \"@/aether/aether\";\nimport { alamos } from \"@/alamos/aether\";\nimport { status } from \"@/status/aether\";\nimport { synnax } from \"@/synnax/aether\";\nimport { telem } from \"@/telem/aether\";\nimport { control } from \"@/telem/control/aether\";\nimport { theming } from \"@/theming/aether\";\nimport { button } from \"@/vis/button/aether\";\nimport { canvas } from \"@/vis/canvas/aether\";\nimport { diagram } from \"@/vis/diagram/aether\";\nimport { eraser } from \"@/vis/eraser/aether\";\nimport { line } from \"@/vis/line/aether\";\nimport { lineplot } from \"@/vis/lineplot/aether\";\nimport { tooltip } from \"@/vis/lineplot/tooltip/aether\";\nimport { measure } from \"@/vis/measure/aether\";\nimport { rule } from \"@/vis/rule/aether\";\nimport { table } from \"@/vis/table/aether\";\nimport { toggle } from \"@/vis/toggle/aether\";\nimport { value } from \"@/vis/value/aether\";\n\nexport const render = (): void => {\n // @ts-expect-error - for some reason post-message can't type transfer correctly\n const w = new RoutedWorker((data, transfer) => postMessage(data, transfer));\n onmessage = w.handle.bind(w);\n\n const REGISTRY: aether.ComponentRegistry = {\n ...lineplot.REGISTRY,\n ...canvas.REGISTRY,\n ...synnax.REGISTRY,\n ...telem.REGISTRY,\n ...line.REGISTRY,\n ...value.REGISTRY,\n ...toggle.REGISTRY,\n ...diagram.REGISTRY,\n ...rule.REGISTRY,\n ...tooltip.REGISTRY,\n ...measure.REGISTRY,\n ...control.REGISTRY,\n ...theming.REGISTRY,\n ...status.REGISTRY,\n ...button.REGISTRY,\n ...alamos.REGISTRY,\n ...eraser.REGISTRY,\n ...table.REGISTRY,\n };\n\n aether.render({\n worker: w.route(\"vis\"),\n registry: REGISTRY,\n });\n};\n"],"names":["RoutedWorker","lineplot.REGISTRY","canvas.REGISTRY","synnax.REGISTRY","telem.REGISTRY","line.REGISTRY","value.REGISTRY","toggle.REGISTRY","diagram.REGISTRY","rule.REGISTRY","tooltip.REGISTRY","measure.REGISTRY","control.REGISTRY","theming.REGISTRY","status.REGISTRY","button.REGISTRY","alamos.REGISTRY","eraser.REGISTRY","table.REGISTRY","aether.render"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,MAAM,SAAS,MAAY;AAE1B,QAAA,IAAI,IAAIA,IAAa,aAAA,CAAC,MAAM,aAAa,YAAY,MAAM,QAAQ,CAAC;AAC9D,cAAA,EAAE,OAAO,KAAK,CAAC;AAE3B,QAAM,WAAqC;AAAA,IACzC,GAAGC,MAAS;AAAA,IACZ,GAAGC,MAAO;AAAA,IACV,GAAGC,MAAO;AAAA,IACV,GAAGC,MAAM;AAAA,IACT,GAAGC,MAAK;AAAA,IACR,GAAGC,MAAM;AAAA,IACT,GAAGC,MAAO;AAAA,IACV,GAAGC,MAAQ;AAAA,IACX,GAAGC,MAAK;AAAA,IACR,GAAGC,MAAQ;AAAA,IACX,GAAGC,MAAQ;AAAA,IACX,GAAGC,MAAQ;AAAA,IACX,GAAGC,UAAQ;AAAA,IACX,GAAGC,UAAO;AAAA,IACV,GAAGC,MAAO;AAAA,IACV,GAAGC,MAAO;AAAA,IACV,GAAGC,MAAO;AAAA,IACV,GAAGC,MAAM;AAAA,EAAA;AAGXC,mBAAc;AAAA,IACZ,QAAQ,EAAE,MAAM,KAAK;AAAA,IACrB,UAAU;AAAA,EAAA,CACX;AACH;;;;;;;;;;;;;;;;;;;"}