@synnaxlabs/pluto 0.46.7 → 0.47.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 (401) hide show
  1. package/dist/Animated-Bq6z2XkH.cjs +1 -0
  2. package/dist/Animated-CEx4LoLs.js +28 -0
  3. package/dist/Animated-CUFx-eAB.js +356 -0
  4. package/dist/Animated-NfnNvlbz.cjs +1 -0
  5. package/dist/Box-BvqALodh.cjs +1 -0
  6. package/dist/Box-D5Qv__kr.js +95 -0
  7. package/dist/Button-BMeq9Z2I.cjs +1 -0
  8. package/dist/Button-CMRdj9Ti.js +305 -0
  9. package/dist/Dialog-Bi1Sf3oc.js +58 -0
  10. package/dist/Dialog-BnPvG5WQ.cjs +1 -0
  11. package/dist/Editable-BXFY3-UW.cjs +1 -0
  12. package/dist/Editable-CxgdRDPb.js +193 -0
  13. package/dist/Haul-2Xa_nMgc.cjs +1 -0
  14. package/dist/Haul-BuI0PZpo.js +128 -0
  15. package/dist/Items-CHAbP2ZL.cjs +4 -0
  16. package/dist/Items-Cmc6otoS.js +777 -0
  17. package/dist/Menu-BImhHf24.cjs +1 -0
  18. package/dist/Menu-CQ_GMgB9.js +156 -0
  19. package/dist/Provider-BV7nN39a.cjs +5 -0
  20. package/dist/Provider-D0P_lzCo.js +434 -0
  21. package/dist/Tags-6IUFBvU-.js +604 -0
  22. package/dist/Tags-DtnStTuF.cjs +1 -0
  23. package/dist/Text-BnUGzpJq.js +1580 -0
  24. package/dist/Text-DY08sSZe.cjs +1 -0
  25. package/dist/{Video-CBAgqKPg.js → Video-CITi2j07.js} +1 -1
  26. package/dist/{Video-DqumxMbz.cjs → Video-VlT7jSYk.cjs} +1 -1
  27. package/dist/_commonjsHelpers-BH3jXuIh.cjs +1 -0
  28. package/dist/_commonjsHelpers-ByX85dGu.js +33 -0
  29. package/dist/button.cjs +1 -1
  30. package/dist/button.js +1 -1
  31. package/dist/color.cjs +1 -1
  32. package/dist/color.js +1 -1
  33. package/dist/{css-BYwooBtA.js → css-D6ZBcSwh.js} +800 -799
  34. package/dist/css-HnNQMUzV.cjs +8 -0
  35. package/dist/css.cjs +1 -1
  36. package/dist/css.js +2 -2
  37. package/dist/debounce-CW9Q-DsR.js +17 -0
  38. package/dist/debounce-heEWeOqL.cjs +1 -0
  39. package/dist/deep-DRVLw7iw.js +349 -0
  40. package/dist/deep-DtdcJG4q.cjs +1 -0
  41. package/dist/dialog.cjs +1 -1
  42. package/dist/dialog.js +1 -1
  43. package/dist/dimensions-BFCMI7yN.js +19 -0
  44. package/dist/dimensions-CGLhBwVq.cjs +1 -0
  45. package/dist/eraser-Dm5Du4PL.cjs +11 -0
  46. package/dist/eraser-DvzR9kLf.js +955 -0
  47. package/dist/eslint.config.d.ts +3 -0
  48. package/dist/eslint.config.d.ts.map +1 -0
  49. package/dist/ether.cjs +1 -1
  50. package/dist/ether.js +70 -67
  51. package/dist/external-6RyUkYAB.js +31 -0
  52. package/dist/external-6vmyay3h.js +46 -0
  53. package/dist/external-BSjAne2q.js +88 -0
  54. package/dist/external-BTlfU938.js +29 -0
  55. package/dist/external-BcZE443U.cjs +1 -0
  56. package/dist/external-BhOvtmPt.js +24 -0
  57. package/dist/external-Bo9Dyf8v.js +80 -0
  58. package/dist/external-BrQU-ZN8.cjs +1 -0
  59. package/dist/external-CAcL3DJP.js +130 -0
  60. package/dist/external-CMBnwYR4.cjs +1 -0
  61. package/dist/external-CSntN1is.cjs +1 -0
  62. package/dist/external-CTrkvlmd.cjs +1 -0
  63. package/dist/external-CTsR6bs9.cjs +46 -0
  64. package/dist/external-Clec0nDH.cjs +1 -0
  65. package/dist/external-CtiE4JLk.js +388 -0
  66. package/dist/external-D7EEjQaR.js +44 -0
  67. package/dist/external-DDzR-j7b.cjs +1 -0
  68. package/dist/{main-CEC8k4uE.js → external-DGNBXSAj.js} +16962 -22990
  69. package/dist/{external-CnSq_bSU.js → external-Daiy-vZ3.js} +29 -19
  70. package/dist/external-Ddn3rc_Q.cjs +85 -0
  71. package/dist/external-Dl0l3iHN.cjs +1 -0
  72. package/dist/external-Eaj0hgzm.cjs +1 -0
  73. package/dist/external-OLyg-4Ab.cjs +1 -0
  74. package/dist/{external-CafWN471.js → external-OzDazbiJ.js} +108 -97
  75. package/dist/flex.cjs +1 -1
  76. package/dist/flex.js +1 -1
  77. package/dist/{fontString-CVUEOEMw.js → fontString-CGd4NYXa.js} +11 -10
  78. package/dist/fontString-yPlq8smc.cjs +1 -0
  79. package/dist/header.cjs +1 -1
  80. package/dist/header.js +1 -1
  81. package/dist/hooks-Bvv-S6WC.js +74 -0
  82. package/dist/hooks-CoF3Fkrn.cjs +1 -0
  83. package/dist/index.cjs +16 -16
  84. package/dist/index.js +11182 -10542
  85. package/dist/input.cjs +1 -1
  86. package/dist/input.js +1 -1
  87. package/dist/list.cjs +1 -1
  88. package/dist/list.js +1 -1
  89. package/dist/menu.cjs +1 -1
  90. package/dist/menu.js +1 -1
  91. package/dist/pluto.css +1 -1
  92. package/dist/{provider-CKYgKu3z.js → provider-C8In649C.js} +4955 -8152
  93. package/dist/provider-lNhTlIWj.cjs +72 -0
  94. package/dist/src/aether/aether/aether.d.ts.map +1 -1
  95. package/dist/src/aether/main.d.ts.map +1 -1
  96. package/dist/src/arc/external.d.ts +1 -1
  97. package/dist/src/arc/external.d.ts.map +1 -1
  98. package/dist/src/arc/functions/Base.d.ts.map +1 -0
  99. package/dist/src/arc/functions/constant/Constant.d.ts.map +1 -0
  100. package/dist/src/arc/functions/constant/Form.d.ts.map +1 -0
  101. package/dist/src/arc/functions/constant/external.d.ts.map +1 -0
  102. package/dist/src/arc/functions/constant/index.d.ts.map +1 -0
  103. package/dist/src/arc/functions/external.d.ts.map +1 -0
  104. package/dist/src/arc/functions/index.d.ts.map +1 -0
  105. package/dist/src/arc/functions/operator/Operator.d.ts.map +1 -0
  106. package/dist/src/arc/functions/operator/external.d.ts.map +1 -0
  107. package/dist/src/arc/functions/operator/index.d.ts.map +1 -0
  108. package/dist/src/arc/functions/read/Form.d.ts.map +1 -0
  109. package/dist/src/arc/functions/read/Read.d.ts.map +1 -0
  110. package/dist/src/arc/functions/read/external.d.ts.map +1 -0
  111. package/dist/src/arc/functions/read/index.d.ts.map +1 -0
  112. package/dist/src/arc/functions/registry.d.ts.map +1 -0
  113. package/dist/src/arc/functions/select/Select.d.ts.map +1 -0
  114. package/dist/src/arc/functions/select/external.d.ts.map +1 -0
  115. package/dist/src/arc/functions/select/index.d.ts.map +1 -0
  116. package/dist/src/arc/functions/sink/Form.d.ts.map +1 -0
  117. package/dist/src/arc/functions/sink/Sink.d.ts.map +1 -0
  118. package/dist/src/arc/functions/sink/external.d.ts.map +1 -0
  119. package/dist/src/arc/functions/sink/index.d.ts.map +1 -0
  120. package/dist/src/arc/functions/source/Form.d.ts.map +1 -0
  121. package/dist/src/arc/functions/source/Source.d.ts.map +1 -0
  122. package/dist/src/arc/functions/source/external.d.ts.map +1 -0
  123. package/dist/src/arc/functions/source/index.d.ts.map +1 -0
  124. package/dist/src/arc/functions/stable/Form.d.ts.map +1 -0
  125. package/dist/src/arc/functions/stable/StableFor.d.ts.map +1 -0
  126. package/dist/src/arc/functions/stable/external.d.ts.map +1 -0
  127. package/dist/src/arc/functions/stable/index.d.ts.map +1 -0
  128. package/dist/src/arc/functions/status/Change.d.ts.map +1 -0
  129. package/dist/src/arc/functions/status/Form.d.ts.map +1 -0
  130. package/dist/src/arc/functions/status/external.d.ts.map +1 -0
  131. package/dist/src/arc/functions/status/index.d.ts.map +1 -0
  132. package/dist/src/arc/functions/types/index.d.ts.map +1 -0
  133. package/dist/src/arc/functions/types/spec.d.ts.map +1 -0
  134. package/dist/src/arc/handle/Core.d.ts.map +1 -1
  135. package/dist/src/arc/handle/Sink.d.ts.map +1 -1
  136. package/dist/src/arc/handle/Source.d.ts.map +1 -1
  137. package/dist/src/arc/handle/external.d.ts.map +1 -1
  138. package/dist/src/arc/handle/index.d.ts.map +1 -1
  139. package/dist/src/arc/queries.d.ts +6 -3
  140. package/dist/src/arc/queries.d.ts.map +1 -1
  141. package/dist/src/arc/queries.spec.d.ts +2 -0
  142. package/dist/src/arc/queries.spec.d.ts.map +1 -0
  143. package/dist/src/button/Button.d.ts +1 -1
  144. package/dist/src/button/Button.d.ts.map +1 -1
  145. package/dist/src/channel/AliasInput.d.ts +0 -1
  146. package/dist/src/channel/AliasInput.d.ts.map +1 -1
  147. package/dist/src/channel/CreateCalculatedIcon.d.ts +3 -0
  148. package/dist/src/channel/CreateCalculatedIcon.d.ts.map +1 -0
  149. package/dist/src/channel/LinePlot.d.ts +1 -3
  150. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  151. package/dist/src/channel/external.d.ts +1 -0
  152. package/dist/src/channel/external.d.ts.map +1 -1
  153. package/dist/src/channel/queries.d.ts +77 -5
  154. package/dist/src/channel/queries.d.ts.map +1 -1
  155. package/dist/src/component/SelectSize.d.ts.map +1 -1
  156. package/dist/src/css/css.d.ts +1 -2
  157. package/dist/src/css/css.d.ts.map +1 -1
  158. package/dist/src/flex/Box.d.ts +1 -2
  159. package/dist/src/flex/Box.d.ts.map +1 -1
  160. package/dist/src/flex/index.d.ts +1 -1
  161. package/dist/src/flex/index.d.ts.map +1 -1
  162. package/dist/src/flux/Provider.d.ts.map +1 -1
  163. package/dist/src/flux/aether/provider.d.ts +1 -1
  164. package/dist/src/flux/aether/provider.d.ts.map +1 -1
  165. package/dist/src/flux/core/client.d.ts.map +1 -1
  166. package/dist/src/flux/core/external.d.ts.map +1 -1
  167. package/dist/src/flux/core/index.d.ts.map +1 -1
  168. package/dist/src/flux/list.d.ts +5 -1
  169. package/dist/src/flux/list.d.ts.map +1 -1
  170. package/dist/src/group/index.d.ts.map +1 -1
  171. package/dist/src/hardware/device/Select.d.ts +0 -1
  172. package/dist/src/hardware/device/Select.d.ts.map +1 -1
  173. package/dist/src/hardware/device/queries.d.ts +6 -6
  174. package/dist/src/hardware/rack/Select.d.ts +0 -1
  175. package/dist/src/hardware/rack/Select.d.ts.map +1 -1
  176. package/dist/src/header/Header.d.ts.map +1 -1
  177. package/dist/src/icon/registry.d.ts.map +1 -1
  178. package/dist/src/index.d.ts +0 -1
  179. package/dist/src/index.d.ts.map +1 -1
  180. package/dist/src/input/Item.d.ts +2 -2
  181. package/dist/src/input/Item.d.ts.map +1 -1
  182. package/dist/src/log/aether/Log.d.ts.map +1 -1
  183. package/dist/src/menu/ContextMenu.d.ts +0 -3
  184. package/dist/src/menu/ContextMenu.d.ts.map +1 -1
  185. package/dist/src/menu/external.d.ts +1 -0
  186. package/dist/src/menu/external.d.ts.map +1 -1
  187. package/dist/src/menu/types.d.ts +4 -0
  188. package/dist/src/menu/types.d.ts.map +1 -0
  189. package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
  190. package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
  191. package/dist/src/schematic/symbol/Forms.d.ts +1 -0
  192. package/dist/src/schematic/symbol/Forms.d.ts.map +1 -1
  193. package/dist/src/schematic/symbol/Primitives.d.ts +11 -2
  194. package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
  195. package/dist/src/schematic/symbol/Symbols.d.ts +7 -0
  196. package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -1
  197. package/dist/src/schematic/symbol/registry.d.ts +2 -1
  198. package/dist/src/schematic/symbol/registry.d.ts.map +1 -1
  199. package/dist/src/select/Button.d.ts +0 -1
  200. package/dist/src/select/Button.d.ts.map +1 -1
  201. package/dist/src/select/Multiple.d.ts +5 -6
  202. package/dist/src/select/Multiple.d.ts.map +1 -1
  203. package/dist/src/select/MultipleTrigger.d.ts +0 -1
  204. package/dist/src/select/MultipleTrigger.d.ts.map +1 -1
  205. package/dist/src/select/SearchInput.d.ts.map +1 -1
  206. package/dist/src/select/Single.d.ts +1 -2
  207. package/dist/src/select/Single.d.ts.map +1 -1
  208. package/dist/src/select/Static.d.ts +0 -1
  209. package/dist/src/select/Static.d.ts.map +1 -1
  210. package/dist/src/select/external.d.ts +1 -0
  211. package/dist/src/select/external.d.ts.map +1 -1
  212. package/dist/src/select/flex/Alignment.d.ts +7 -0
  213. package/dist/src/select/flex/Alignment.d.ts.map +1 -0
  214. package/dist/src/select/flex/index.d.ts +2 -0
  215. package/dist/src/select/flex/index.d.ts.map +1 -0
  216. package/dist/src/select/text/Level.d.ts.map +1 -1
  217. package/dist/src/select/text/Weight.d.ts.map +1 -1
  218. package/dist/src/status/aether/errorHandler.d.ts.map +1 -1
  219. package/dist/src/status/aether/external.d.ts.map +1 -1
  220. package/dist/src/status/core/external.d.ts +0 -1
  221. package/dist/src/status/core/external.d.ts.map +1 -1
  222. package/dist/src/status/core/index.d.ts.map +1 -1
  223. package/dist/src/status/external.d.ts +1 -0
  224. package/dist/src/status/external.d.ts.map +1 -1
  225. package/dist/src/status/index.d.ts.map +1 -1
  226. package/dist/src/status/queries.d.ts +5 -1
  227. package/dist/src/status/queries.d.ts.map +1 -1
  228. package/dist/src/synnax/Provider.d.ts.map +1 -1
  229. package/dist/src/tabs/Selector.d.ts.map +1 -1
  230. package/dist/src/telem/SelectDataType.d.ts.map +1 -1
  231. package/dist/src/telem/aether/context.d.ts +1 -2
  232. package/dist/src/telem/aether/context.d.ts.map +1 -1
  233. package/dist/src/telem/aether/noop.d.ts +2 -1
  234. package/dist/src/telem/aether/noop.d.ts.map +1 -1
  235. package/dist/src/telem/aether/remote.d.ts.map +1 -1
  236. package/dist/src/telem/aether/telem.d.ts +9 -0
  237. package/dist/src/telem/aether/telem.d.ts.map +1 -1
  238. package/dist/src/telem/client/reader.d.ts +1 -1
  239. package/dist/src/telem/client/reader.d.ts.map +1 -1
  240. package/dist/src/telem/control/Controller.d.ts.map +1 -1
  241. package/dist/src/telem/control/aether/controller.d.ts +0 -1
  242. package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
  243. package/dist/src/telem/control/aether/state.d.ts.map +1 -1
  244. package/dist/src/theming/Provider.d.ts +0 -2
  245. package/dist/src/theming/Provider.d.ts.map +1 -1
  246. package/dist/src/tooltip/Config.d.ts.map +1 -1
  247. package/dist/src/tree/Context.d.ts.map +1 -1
  248. package/dist/src/triggers/Provider.d.ts.map +1 -1
  249. package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
  250. package/dist/src/vis/input/aether/index.d.ts +2 -0
  251. package/dist/src/vis/input/aether/index.d.ts.map +1 -0
  252. package/dist/src/vis/input/aether/input.d.ts +40 -0
  253. package/dist/src/vis/input/aether/input.d.ts.map +1 -0
  254. package/dist/src/vis/input/index.d.ts +2 -0
  255. package/dist/src/vis/input/index.d.ts.map +1 -0
  256. package/dist/src/vis/input/use.d.ts +9 -0
  257. package/dist/src/vis/input/use.d.ts.map +1 -0
  258. package/dist/src/vis/rule/Rule.d.ts.map +1 -1
  259. package/dist/src/vis/value/aether/value.d.ts +1 -2
  260. package/dist/src/vis/value/aether/value.d.ts.map +1 -1
  261. package/dist/tabs.cjs +1 -1
  262. package/dist/tabs.js +1 -1
  263. package/dist/text.cjs +1 -1
  264. package/dist/text.js +2 -2
  265. package/dist/theme.css +11 -0
  266. package/dist/theming.cjs +1 -1
  267. package/dist/theming.js +2 -2
  268. package/dist/tree.cjs +1 -1
  269. package/dist/tree.js +1 -1
  270. package/dist/triggers.cjs +1 -1
  271. package/dist/triggers.js +1 -1
  272. package/dist/types-BNX_Jj6k.js +80 -0
  273. package/dist/types-D-yz1qsT.cjs +1 -0
  274. package/dist/{units-CeCcz4O4.js → units-BqIfn6VX.js} +1 -1
  275. package/dist/units-DCifOxd9.cjs +1 -0
  276. package/dist/useStaticData-BTwIe0Il.cjs +1 -0
  277. package/dist/useStaticData-p8sk2VCJ.js +1051 -0
  278. package/dist/value-B3LTg1lE.cjs +53 -0
  279. package/dist/value-ChGMEPP3.js +6508 -0
  280. package/dist/video.cjs +1 -1
  281. package/dist/video.js +1 -1
  282. package/package.json +8 -8
  283. package/dist/Toggle-BSJnQkJM.js +0 -26
  284. package/dist/Toggle-C0DIo816.cjs +0 -1
  285. package/dist/css-B0VZnJIa.cjs +0 -8
  286. package/dist/external-B0_MIms2.js +0 -78
  287. package/dist/external-B1ETpyFM.js +0 -89
  288. package/dist/external-B3WxrVX0.js +0 -30
  289. package/dist/external-BP7GC2X2.cjs +0 -1
  290. package/dist/external-Bf8170BC.js +0 -380
  291. package/dist/external-BgNRw5Al.js +0 -23
  292. package/dist/external-BgSmm_d3.js +0 -84
  293. package/dist/external-BmxkwvZQ.cjs +0 -1
  294. package/dist/external-BoVr9B-m.cjs +0 -1
  295. package/dist/external-BrDpLk_U.js +0 -42
  296. package/dist/external-CAiETio2.js +0 -10
  297. package/dist/external-CQpqJGka.cjs +0 -1
  298. package/dist/external-CmmZWsrB.cjs +0 -1
  299. package/dist/external-Cutp76YR.cjs +0 -1
  300. package/dist/external-Cux9mC64.js +0 -69
  301. package/dist/external-D8EUzT1C.cjs +0 -1
  302. package/dist/external-DEYDSJ_G.cjs +0 -1
  303. package/dist/external-DElBi-Q-.js +0 -87
  304. package/dist/external-DP8Ao5TN.cjs +0 -1
  305. package/dist/external-DS6CmLLZ.cjs +0 -46
  306. package/dist/external-DoerTjzk.js +0 -14
  307. package/dist/external-FJ3vTUtb.cjs +0 -1
  308. package/dist/external-V3s19XkB.cjs +0 -1
  309. package/dist/external-Zuxgy86I.cjs +0 -1
  310. package/dist/fontString-DBgTdlAe.cjs +0 -1
  311. package/dist/main-Bg0vBNCG.cjs +0 -92
  312. package/dist/provider-CSa0L57i.js +0 -4673
  313. package/dist/provider-CWezGpoq.cjs +0 -52
  314. package/dist/provider-Fw6FIHoE.cjs +0 -83
  315. package/dist/src/arc/stage/Base.d.ts.map +0 -1
  316. package/dist/src/arc/stage/constant/Constant.d.ts.map +0 -1
  317. package/dist/src/arc/stage/constant/Form.d.ts.map +0 -1
  318. package/dist/src/arc/stage/constant/external.d.ts.map +0 -1
  319. package/dist/src/arc/stage/constant/index.d.ts.map +0 -1
  320. package/dist/src/arc/stage/external.d.ts.map +0 -1
  321. package/dist/src/arc/stage/index.d.ts.map +0 -1
  322. package/dist/src/arc/stage/operator/Operator.d.ts.map +0 -1
  323. package/dist/src/arc/stage/operator/external.d.ts.map +0 -1
  324. package/dist/src/arc/stage/operator/index.d.ts.map +0 -1
  325. package/dist/src/arc/stage/read/Form.d.ts.map +0 -1
  326. package/dist/src/arc/stage/read/Read.d.ts.map +0 -1
  327. package/dist/src/arc/stage/read/external.d.ts.map +0 -1
  328. package/dist/src/arc/stage/read/index.d.ts.map +0 -1
  329. package/dist/src/arc/stage/registry.d.ts.map +0 -1
  330. package/dist/src/arc/stage/select/Select.d.ts.map +0 -1
  331. package/dist/src/arc/stage/select/external.d.ts.map +0 -1
  332. package/dist/src/arc/stage/select/index.d.ts.map +0 -1
  333. package/dist/src/arc/stage/sink/Form.d.ts.map +0 -1
  334. package/dist/src/arc/stage/sink/Sink.d.ts.map +0 -1
  335. package/dist/src/arc/stage/sink/external.d.ts.map +0 -1
  336. package/dist/src/arc/stage/sink/index.d.ts.map +0 -1
  337. package/dist/src/arc/stage/source/Form.d.ts.map +0 -1
  338. package/dist/src/arc/stage/source/Source.d.ts.map +0 -1
  339. package/dist/src/arc/stage/source/external.d.ts.map +0 -1
  340. package/dist/src/arc/stage/source/index.d.ts.map +0 -1
  341. package/dist/src/arc/stage/stable/Form.d.ts.map +0 -1
  342. package/dist/src/arc/stage/stable/StableFor.d.ts.map +0 -1
  343. package/dist/src/arc/stage/stable/external.d.ts.map +0 -1
  344. package/dist/src/arc/stage/stable/index.d.ts.map +0 -1
  345. package/dist/src/arc/stage/status/Change.d.ts.map +0 -1
  346. package/dist/src/arc/stage/status/Form.d.ts.map +0 -1
  347. package/dist/src/arc/stage/status/external.d.ts.map +0 -1
  348. package/dist/src/arc/stage/status/index.d.ts.map +0 -1
  349. package/dist/src/arc/stage/types/index.d.ts.map +0 -1
  350. package/dist/src/arc/stage/types/spec.d.ts.map +0 -1
  351. package/dist/src/flex/Select.d.ts +0 -7
  352. package/dist/src/flex/Select.d.ts.map +0 -1
  353. package/dist/src/flex/external.d.ts +0 -3
  354. package/dist/src/flex/external.d.ts.map +0 -1
  355. package/dist/src/override/factory.d.ts +0 -3
  356. package/dist/src/override/factory.d.ts.map +0 -1
  357. package/dist/src/override/index.d.ts +0 -2
  358. package/dist/src/override/index.d.ts.map +0 -1
  359. package/dist/src/status/CreateIcon.d.ts +0 -1
  360. package/dist/src/status/CreateIcon.d.ts.map +0 -1
  361. package/dist/src/status/core/SelectVariant.d.ts +0 -7
  362. package/dist/src/status/core/SelectVariant.d.ts.map +0 -1
  363. package/dist/units-gFJ6UvpU.cjs +0 -1
  364. package/dist/useKeysData-DXXVQfXZ.js +0 -18
  365. package/dist/useKeysData-Do63LaI0.cjs +0 -1
  366. /package/dist/src/arc/{stage → functions}/Base.d.ts +0 -0
  367. /package/dist/src/arc/{stage → functions}/constant/Constant.d.ts +0 -0
  368. /package/dist/src/arc/{stage → functions}/constant/Form.d.ts +0 -0
  369. /package/dist/src/arc/{stage → functions}/constant/external.d.ts +0 -0
  370. /package/dist/src/arc/{stage → functions}/constant/index.d.ts +0 -0
  371. /package/dist/src/arc/{stage → functions}/external.d.ts +0 -0
  372. /package/dist/src/arc/{stage → functions}/index.d.ts +0 -0
  373. /package/dist/src/arc/{stage → functions}/operator/Operator.d.ts +0 -0
  374. /package/dist/src/arc/{stage → functions}/operator/external.d.ts +0 -0
  375. /package/dist/src/arc/{stage → functions}/operator/index.d.ts +0 -0
  376. /package/dist/src/arc/{stage → functions}/read/Form.d.ts +0 -0
  377. /package/dist/src/arc/{stage → functions}/read/Read.d.ts +0 -0
  378. /package/dist/src/arc/{stage → functions}/read/external.d.ts +0 -0
  379. /package/dist/src/arc/{stage → functions}/read/index.d.ts +0 -0
  380. /package/dist/src/arc/{stage → functions}/registry.d.ts +0 -0
  381. /package/dist/src/arc/{stage → functions}/select/Select.d.ts +0 -0
  382. /package/dist/src/arc/{stage → functions}/select/external.d.ts +0 -0
  383. /package/dist/src/arc/{stage → functions}/select/index.d.ts +0 -0
  384. /package/dist/src/arc/{stage → functions}/sink/Form.d.ts +0 -0
  385. /package/dist/src/arc/{stage → functions}/sink/Sink.d.ts +0 -0
  386. /package/dist/src/arc/{stage → functions}/sink/external.d.ts +0 -0
  387. /package/dist/src/arc/{stage → functions}/sink/index.d.ts +0 -0
  388. /package/dist/src/arc/{stage → functions}/source/Form.d.ts +0 -0
  389. /package/dist/src/arc/{stage → functions}/source/Source.d.ts +0 -0
  390. /package/dist/src/arc/{stage → functions}/source/external.d.ts +0 -0
  391. /package/dist/src/arc/{stage → functions}/source/index.d.ts +0 -0
  392. /package/dist/src/arc/{stage → functions}/stable/Form.d.ts +0 -0
  393. /package/dist/src/arc/{stage → functions}/stable/StableFor.d.ts +0 -0
  394. /package/dist/src/arc/{stage → functions}/stable/external.d.ts +0 -0
  395. /package/dist/src/arc/{stage → functions}/stable/index.d.ts +0 -0
  396. /package/dist/src/arc/{stage → functions}/status/Change.d.ts +0 -0
  397. /package/dist/src/arc/{stage → functions}/status/Form.d.ts +0 -0
  398. /package/dist/src/arc/{stage → functions}/status/external.d.ts +0 -0
  399. /package/dist/src/arc/{stage → functions}/status/index.d.ts +0 -0
  400. /package/dist/src/arc/{stage → functions}/types/index.d.ts +0 -0
  401. /package/dist/src/arc/{stage → functions}/types/spec.d.ts +0 -0
@@ -0,0 +1,955 @@
1
+ import { j as h, i as C, Q as d, o as k, L as y, c as U, C as q } from "./css-D6ZBcSwh.js";
2
+ import { z as _ } from "zod";
3
+ import { j as x, C as z, B as K, k as W, l as H, L as V } from "./provider-C8In649C.js";
4
+ import { a as G } from "./dimensions-BFCMI7yN.js";
5
+ const Z = _.object({
6
+ include: _.string().array().optional(),
7
+ exclude: _.string().array().optional(),
8
+ level: _.enum(x.LOG_LEVELS).optional().default("info")
9
+ }), L = "alamos-provider";
10
+ class v extends z {
11
+ static TYPE = "alamos.Provider";
12
+ schema = Z;
13
+ afterUpdate(t) {
14
+ if (t.getOptional(L) != null) return;
15
+ const s = [], { include: i, exclude: r, level: a } = this.state;
16
+ (i != null || r != null) && s.push(x.logLevelKeyFiler({ include: i, exclude: r })), a != null && s.push(x.logThresholdFilter(a)), s.length === 0 && s.push(() => !1), this.internal.ins = new x.Instrumentation({
17
+ key: "aether",
18
+ logger: new x.Logger({ filters: s })
19
+ }), t.set(L, this.internal.ins);
20
+ }
21
+ }
22
+ const J = (l, t) => {
23
+ const e = l.get(L);
24
+ if (e == null) throw new Error("No instrumentation provider");
25
+ return t == null ? e : e.child(t);
26
+ }, pt = {
27
+ [v.TYPE]: v
28
+ }, T = (l, t) => h.construct(
29
+ h.left(l) - t.x,
30
+ h.top(l) - t.y,
31
+ h.width(l) + t.x * 2,
32
+ h.height(l) + t.y * 2
33
+ );
34
+ class R {
35
+ scale_;
36
+ wrapped;
37
+ atlasRegistry;
38
+ cachedFont = null;
39
+ cachedFillStyle = null;
40
+ cachedStrokeStyle = null;
41
+ cachedLineWidth = null;
42
+ cachedGlobalAlpha = null;
43
+ cachedTextAlign = null;
44
+ cachedTextBaseline = null;
45
+ cachedLineCap = null;
46
+ cachedLineJoin = null;
47
+ cachedMiterLimit = null;
48
+ dpr;
49
+ constructor(t, e, s, i = C.XY.IDENTITY) {
50
+ this.wrapped = t, this.scale_ = i, this.atlasRegistry = e, this.dpr = s;
51
+ }
52
+ get fontStretch() {
53
+ return this.wrapped.fontStretch;
54
+ }
55
+ set fontStretch(t) {
56
+ this.wrapped.fontStretch = t;
57
+ }
58
+ get fontVariantCaps() {
59
+ return this.wrapped.fontVariantCaps;
60
+ }
61
+ set fontVariantCaps(t) {
62
+ this.wrapped.fontVariantCaps = t;
63
+ }
64
+ isContextLost() {
65
+ return this.wrapped.isContextLost();
66
+ }
67
+ get wordSpacing() {
68
+ return this.wrapped.wordSpacing;
69
+ }
70
+ set wordSpacing(t) {
71
+ this.wrapped.wordSpacing = t;
72
+ }
73
+ get letterSpacing() {
74
+ return this.wrapped.letterSpacing;
75
+ }
76
+ set letterSpacing(t) {
77
+ this.wrapped.letterSpacing = t;
78
+ }
79
+ get textRendering() {
80
+ return this.wrapped.textRendering;
81
+ }
82
+ set textRendering(t) {
83
+ this.wrapped.textRendering = t;
84
+ }
85
+ checkAtlasFillStyle(t = !1) {
86
+ return t && typeof this.fillStyle == "string" ? [!0, this.fillStyle] : (t && console.warn(
87
+ "attempted to use a text atlas with a gradient fill style. This is not supported. Falling back to default canvas fill."
88
+ ), [!1, null]);
89
+ }
90
+ reset() {
91
+ this.wrapped.reset();
92
+ }
93
+ applyScale(t) {
94
+ return new R(
95
+ this,
96
+ this.atlasRegistry,
97
+ this.dpr,
98
+ t
99
+ );
100
+ }
101
+ get canvas() {
102
+ return this.wrapped.canvas;
103
+ }
104
+ get miterLimit() {
105
+ return this.cachedMiterLimit ?? this.wrapped.miterLimit;
106
+ }
107
+ set miterLimit(t) {
108
+ const e = this.scale_.x.dim(t);
109
+ e !== this.cachedMiterLimit && (this.cachedMiterLimit = e, this.wrapped.miterLimit = e);
110
+ }
111
+ get globalAlpha() {
112
+ return this.cachedGlobalAlpha ?? this.wrapped.globalAlpha;
113
+ }
114
+ set globalAlpha(t) {
115
+ t !== this.cachedGlobalAlpha && (this.cachedGlobalAlpha = t, this.wrapped.globalAlpha = t);
116
+ }
117
+ get globalCompositeOperation() {
118
+ return this.wrapped.globalCompositeOperation;
119
+ }
120
+ set globalCompositeOperation(t) {
121
+ this.wrapped.globalCompositeOperation = t;
122
+ }
123
+ get fillStyle() {
124
+ return this.cachedFillStyle ?? this.wrapped.fillStyle;
125
+ }
126
+ set fillStyle(t) {
127
+ t !== this.cachedFillStyle && (this.cachedFillStyle = t, this.wrapped.fillStyle = t);
128
+ }
129
+ get strokeStyle() {
130
+ return this.cachedStrokeStyle ?? this.wrapped.strokeStyle;
131
+ }
132
+ set strokeStyle(t) {
133
+ t !== this.cachedStrokeStyle && (this.cachedStrokeStyle = t, this.wrapped.strokeStyle = t);
134
+ }
135
+ drawImage(t, e, s, i, r, a, n, o, p) {
136
+ this.wrapped.drawImage(
137
+ t,
138
+ e,
139
+ s,
140
+ i,
141
+ r,
142
+ a != null ? this.scale_.x.pos(a) : a,
143
+ n != null ? this.scale_.y.pos(n) : n,
144
+ o != null ? this.scale_.x.dim(o) : o,
145
+ p != null ? this.scale_.y.dim(p) : p
146
+ );
147
+ }
148
+ beginPath() {
149
+ this.wrapped.beginPath();
150
+ }
151
+ clip(t, e) {
152
+ this.wrapped.clip(t, e);
153
+ }
154
+ fill(t, e) {
155
+ if (t == null) return this.wrapped.fill();
156
+ this.wrapped.fill(t, e);
157
+ }
158
+ isPointInPath(t, e, s, i) {
159
+ return this.wrapped.isPointInPath(t, e, s, i);
160
+ }
161
+ isPointInStroke(t, e, s) {
162
+ return this.wrapped.isPointInStroke(t, e, s);
163
+ }
164
+ stroke(t) {
165
+ if (t == null) return this.wrapped.stroke();
166
+ this.wrapped.stroke(t);
167
+ }
168
+ createConicGradient(t, e, s) {
169
+ return this.wrapped.createConicGradient(t, e, s);
170
+ }
171
+ createLinearGradient(t, e, s, i) {
172
+ return this.wrapped.createLinearGradient(t, e, s, i);
173
+ }
174
+ createPattern(t, e) {
175
+ return this.wrapped.createPattern(t, e);
176
+ }
177
+ createRadialGradient(t, e, s, i, r, a) {
178
+ return this.wrapped.createRadialGradient(t, e, s, i, r, a);
179
+ }
180
+ get filter() {
181
+ return this.wrapped.filter;
182
+ }
183
+ set filter(t) {
184
+ this.wrapped.filter = t;
185
+ }
186
+ createImageData(t, e, s) {
187
+ return this.wrapped.createImageData(t, e, s);
188
+ }
189
+ getImageData(t, e, s, i, r) {
190
+ return this.wrapped.getImageData(t, e, s, i, r);
191
+ }
192
+ putImageData(t, e, s, i, r, a, n) {
193
+ this.wrapped.putImageData(
194
+ // @ts-expect-error - typescript overloads cause issues here
195
+ t,
196
+ e,
197
+ s,
198
+ i,
199
+ r,
200
+ a,
201
+ n
202
+ );
203
+ }
204
+ get imageSmoothingEnabled() {
205
+ return this.wrapped.imageSmoothingEnabled;
206
+ }
207
+ set imageSmoothingEnabled(t) {
208
+ this.wrapped.imageSmoothingEnabled = t;
209
+ }
210
+ get imageSmoothingQuality() {
211
+ return this.wrapped.imageSmoothingQuality;
212
+ }
213
+ set imageSmoothingQuality(t) {
214
+ this.wrapped.imageSmoothingQuality = t;
215
+ }
216
+ arc(t, e, s, i, r, a) {
217
+ this.wrapped.arc(
218
+ this.scale_.x.pos(t),
219
+ this.scale_.y.pos(e),
220
+ this.scale_.x.dim(s),
221
+ i,
222
+ r,
223
+ a
224
+ );
225
+ }
226
+ arcTo(t, e, s, i, r) {
227
+ this.wrapped.arcTo(
228
+ this.scale_.x.pos(t),
229
+ this.scale_.y.pos(e),
230
+ this.scale_.x.pos(s),
231
+ this.scale_.y.pos(i),
232
+ this.scale_.x.dim(r)
233
+ );
234
+ }
235
+ bezierCurveTo(t, e, s, i, r, a) {
236
+ this.wrapped.bezierCurveTo(
237
+ this.scale_.x.pos(t),
238
+ this.scale_.y.pos(e),
239
+ this.scale_.x.pos(s),
240
+ this.scale_.y.pos(i),
241
+ this.scale_.x.pos(r),
242
+ this.scale_.y.pos(a)
243
+ );
244
+ }
245
+ closePath() {
246
+ this.wrapped.closePath();
247
+ }
248
+ ellipse(t, e, s, i, r, a, n, o) {
249
+ this.wrapped.ellipse(
250
+ this.scale_.x.pos(t),
251
+ this.scale_.y.pos(e),
252
+ this.scale_.x.dim(s),
253
+ this.scale_.y.dim(i),
254
+ r,
255
+ a,
256
+ n,
257
+ o
258
+ );
259
+ }
260
+ lineTo(t, e) {
261
+ this.wrapped.lineTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
262
+ }
263
+ moveTo(t, e) {
264
+ this.wrapped.moveTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
265
+ }
266
+ quadraticCurveTo(t, e, s, i) {
267
+ this.wrapped.quadraticCurveTo(
268
+ this.scale_.x.pos(t),
269
+ this.scale_.y.pos(e),
270
+ this.scale_.x.pos(s),
271
+ this.scale_.y.pos(i)
272
+ );
273
+ }
274
+ rect(t, e, s, i) {
275
+ this.wrapped.rect(
276
+ this.scale_.x.pos(t),
277
+ this.scale_.y.pos(e),
278
+ this.scale_.x.dim(s),
279
+ this.scale_.y.dim(i)
280
+ );
281
+ }
282
+ roundRect(t, e, s, i, r) {
283
+ this.wrapped.roundRect(
284
+ this.scale_.x.pos(t),
285
+ this.scale_.y.pos(e),
286
+ this.scale_.x.dim(s),
287
+ this.scale_.y.dim(i),
288
+ typeof r == "number" ? this.scale_.x.dim(r) : r
289
+ );
290
+ }
291
+ get lineCap() {
292
+ return this.cachedLineCap ?? this.wrapped.lineCap;
293
+ }
294
+ set lineCap(t) {
295
+ t !== this.cachedLineCap && (this.cachedLineCap = t, this.wrapped.lineCap = t);
296
+ }
297
+ get lineDashOffset() {
298
+ return this.wrapped.lineDashOffset;
299
+ }
300
+ set lineDashOffset(t) {
301
+ this.wrapped.lineDashOffset = this.scale_.x.dim(t);
302
+ }
303
+ get lineJoin() {
304
+ return this.cachedLineJoin ?? this.wrapped.lineJoin;
305
+ }
306
+ set lineJoin(t) {
307
+ t !== this.cachedLineJoin && (this.cachedLineJoin = t, this.wrapped.lineJoin = t);
308
+ }
309
+ get lineWidth() {
310
+ return this.cachedLineWidth ?? this.wrapped.lineWidth;
311
+ }
312
+ set lineWidth(t) {
313
+ const e = this.scale_.x.dim(t);
314
+ e !== this.cachedLineWidth && (this.cachedLineWidth = e, this.wrapped.lineWidth = e);
315
+ }
316
+ getLineDash() {
317
+ return this.wrapped.getLineDash();
318
+ }
319
+ setLineDash(t) {
320
+ const e = Array.from(t).map((s) => this.scale_.x.dim(s));
321
+ this.wrapped.setLineDash(e);
322
+ }
323
+ clearRect(t, e, s, i) {
324
+ this.wrapped.clearRect(t, e, s, i);
325
+ }
326
+ fillRect(t, e, s, i) {
327
+ this.wrapped.fillRect(
328
+ this.scale_.x.pos(t),
329
+ this.scale_.y.pos(e),
330
+ this.scale_.x.dim(s),
331
+ this.scale_.y.dim(i)
332
+ );
333
+ }
334
+ strokeRect(t, e, s, i) {
335
+ this.wrapped.strokeRect(
336
+ this.scale_.x.pos(t),
337
+ this.scale_.y.pos(e),
338
+ this.scale_.x.dim(s),
339
+ this.scale_.y.dim(i)
340
+ );
341
+ }
342
+ get shadowBlur() {
343
+ return this.wrapped.shadowBlur;
344
+ }
345
+ set shadowBlur(t) {
346
+ this.wrapped.shadowBlur = t;
347
+ }
348
+ get shadowColor() {
349
+ return this.wrapped.shadowColor;
350
+ }
351
+ set shadowColor(t) {
352
+ this.wrapped.shadowColor = t;
353
+ }
354
+ get shadowOffsetX() {
355
+ return this.wrapped.shadowOffsetX;
356
+ }
357
+ set shadowOffsetX(t) {
358
+ this.wrapped.shadowOffsetX = t;
359
+ }
360
+ get shadowOffsetY() {
361
+ return this.wrapped.shadowOffsetY;
362
+ }
363
+ restore() {
364
+ this.cachedFillStyle = null, this.cachedStrokeStyle = null, this.cachedLineWidth = null, this.cachedGlobalAlpha = null, this.cachedTextAlign = null, this.cachedTextBaseline = null, this.cachedLineCap = null, this.cachedLineJoin = null, this.cachedMiterLimit = null, this.cachedFont = null, this.wrapped.restore();
365
+ }
366
+ save() {
367
+ this.wrapped.save();
368
+ }
369
+ fillText(t, e, s, i, r = {}) {
370
+ const [a, n] = this.checkAtlasFillStyle(r.useAtlas);
371
+ if (a) {
372
+ this.atlasRegistry.get({ font: this.font, textColor: n }).fillText(this, t, e, s);
373
+ return;
374
+ }
375
+ this.wrapped.fillText(
376
+ t,
377
+ this.scale_.x.pos(e),
378
+ this.scale_.y.pos(s),
379
+ i != null ? this.scale_.x.dim(i) : void 0
380
+ );
381
+ }
382
+ measureText(t) {
383
+ return this.wrapped.measureText(t);
384
+ }
385
+ textDimensions(t, e = {}) {
386
+ const [s, i] = this.checkAtlasFillStyle(e.useAtlas);
387
+ return s ? this.atlasRegistry.get({ font: this.font, textColor: i }).measureText(t) : G(this.measureText(t));
388
+ }
389
+ strokeText(t, e, s, i) {
390
+ this.wrapped.strokeText(
391
+ t,
392
+ this.scale_.x.pos(e),
393
+ this.scale_.y.pos(s),
394
+ i != null ? this.scale_.x.dim(i) : void 0
395
+ );
396
+ }
397
+ get direction() {
398
+ return this.wrapped.direction;
399
+ }
400
+ set direction(t) {
401
+ this.wrapped.direction = t;
402
+ }
403
+ get font() {
404
+ return this.cachedFont != null ? this.cachedFont : this.wrapped.font;
405
+ }
406
+ set font(t) {
407
+ t !== this.cachedFont && (this.cachedFont = t, this.wrapped.font = this.cachedFont);
408
+ }
409
+ get fontKerning() {
410
+ return this.wrapped.fontKerning;
411
+ }
412
+ set fontKerning(t) {
413
+ this.wrapped.fontKerning = t;
414
+ }
415
+ get textAlign() {
416
+ return this.cachedTextAlign ?? this.wrapped.textAlign;
417
+ }
418
+ set textAlign(t) {
419
+ t !== this.cachedTextAlign && (this.cachedTextAlign = t, this.wrapped.textAlign = t);
420
+ }
421
+ get textBaseline() {
422
+ return this.cachedTextBaseline ?? this.wrapped.textBaseline;
423
+ }
424
+ set textBaseline(t) {
425
+ t !== this.cachedTextBaseline && (this.cachedTextBaseline = t, this.wrapped.textBaseline = t);
426
+ }
427
+ getTransform() {
428
+ return this.wrapped.getTransform();
429
+ }
430
+ resetTransform() {
431
+ this.wrapped.resetTransform();
432
+ }
433
+ rotate(t) {
434
+ this.wrapped.rotate(t);
435
+ }
436
+ scale(t, e) {
437
+ this.wrapped.scale(t, e), this.dpr = t;
438
+ }
439
+ scissor(t, e = d.ZERO) {
440
+ const s = new $(this.scale_);
441
+ return t = T(t, e), s.rect(...d.couple(h.topLeft(t)), ...k.couple(h.dims(t))), this.save(), this.clip(s.getPath()), () => this.restore();
442
+ }
443
+ setTransform(t, e, s, i, r, a) {
444
+ this.wrapped.setTransform(t, e, s, i, r, a);
445
+ }
446
+ transform(t, e, s, i, r, a) {
447
+ this.wrapped.transform(t, e, s, i, r, a);
448
+ }
449
+ translate(t, e) {
450
+ this.wrapped.translate(t, e);
451
+ }
452
+ }
453
+ class $ {
454
+ scale_;
455
+ path;
456
+ constructor(t = C.XY.IDENTITY, e) {
457
+ this.scale_ = t, e instanceof Path2D || typeof e == "string" ? this.path = new Path2D(e) : this.path = new Path2D();
458
+ }
459
+ addPath(t, e) {
460
+ this.path.addPath(t, e);
461
+ }
462
+ arc(t, e, s, i, r, a) {
463
+ this.path.arc(
464
+ this.scale_.x.pos(t),
465
+ this.scale_.y.pos(e),
466
+ this.scale_.x.dim(s),
467
+ i,
468
+ r,
469
+ a
470
+ );
471
+ }
472
+ arcTo(t, e, s, i, r) {
473
+ this.path.arcTo(
474
+ this.scale_.x.pos(t),
475
+ this.scale_.y.pos(e),
476
+ this.scale_.x.pos(s),
477
+ this.scale_.y.pos(i),
478
+ this.scale_.x.dim(r)
479
+ );
480
+ }
481
+ bezierCurveTo(t, e, s, i, r, a) {
482
+ this.path.bezierCurveTo(
483
+ this.scale_.x.pos(t),
484
+ this.scale_.y.pos(e),
485
+ this.scale_.x.pos(s),
486
+ this.scale_.y.pos(i),
487
+ this.scale_.x.pos(r),
488
+ this.scale_.y.pos(a)
489
+ );
490
+ }
491
+ closePath() {
492
+ this.path.closePath();
493
+ }
494
+ ellipse(t, e, s, i, r, a, n, o) {
495
+ this.path.ellipse(
496
+ this.scale_.x.pos(t),
497
+ this.scale_.y.pos(e),
498
+ this.scale_.x.dim(s),
499
+ this.scale_.y.dim(i),
500
+ r,
501
+ a,
502
+ n,
503
+ o
504
+ );
505
+ }
506
+ lineTo(t, e) {
507
+ this.path.lineTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
508
+ }
509
+ moveTo(t, e) {
510
+ this.path.moveTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
511
+ }
512
+ quadraticCurveTo(t, e, s, i) {
513
+ this.path.quadraticCurveTo(
514
+ this.scale_.x.pos(t),
515
+ this.scale_.y.pos(e),
516
+ this.scale_.x.pos(s),
517
+ this.scale_.y.pos(i)
518
+ );
519
+ }
520
+ rect(t, e, s, i) {
521
+ this.path.rect(
522
+ this.scale_.x.pos(t),
523
+ this.scale_.y.pos(e),
524
+ this.scale_.x.dim(s),
525
+ this.scale_.y.dim(i)
526
+ );
527
+ }
528
+ roundRect(t, e, s, i, r) {
529
+ const a = this.scaleRadii(r);
530
+ this.path.roundRect(
531
+ this.scale_.x.pos(t),
532
+ this.scale_.y.pos(e),
533
+ this.scale_.x.dim(s),
534
+ this.scale_.y.dim(i),
535
+ a
536
+ );
537
+ }
538
+ scaleRadii(t) {
539
+ return t == null ? t : typeof t == "number" ? this.scale_.x.dim(t) : Array.isArray(t) ? t.map((e) => this.scaleRadius(e)) : this.scaleRadius(t);
540
+ }
541
+ scaleRadius(t) {
542
+ return typeof t == "number" ? this.scale_.x.dim(t) : {
543
+ x: this.scale_.x.dim(t.x ?? 0),
544
+ y: this.scale_.y.dim(t.y ?? 0)
545
+ };
546
+ }
547
+ getPath() {
548
+ return this.path;
549
+ }
550
+ }
551
+ const j = `precision mediump float;
552
+
553
+ void main(void) {
554
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
555
+ }
556
+ `, Q = `attribute vec4 a_position;
557
+
558
+ void main(void) {
559
+ gl_Position = a_position;
560
+ }
561
+ `, D = (l) => new Error(`failed to compile webgl program: ${l}`), tt = new Error("null shader encountered");
562
+ let et = class {
563
+ /** The render context used by this program. */
564
+ renderCtx;
565
+ /** The underlying webgl program. */
566
+ prog;
567
+ /** The code for the vertex shader. */
568
+ vertShader;
569
+ /** The code for the fragment shader. */
570
+ fragShader;
571
+ uniformLocCache = /* @__PURE__ */ new Map();
572
+ /**
573
+ * @constructor compiles the given vertex and fragment shaders under the given
574
+ * render context into a program.
575
+ *
576
+ * @param ctx - The render context to use.
577
+ * @param vertShader - The vertex shader code.
578
+ * @param fragShader - The fragment shader code.
579
+ */
580
+ constructor(t, e, s) {
581
+ this.renderCtx = t;
582
+ const i = t.gl.createProgram();
583
+ if (i == null) throw D("failed to create program");
584
+ this.prog = i, this.vertShader = e, this.fragShader = s, this.compile();
585
+ }
586
+ /** Sets the current program as the active program used by the context. */
587
+ setAsActive() {
588
+ return this.renderCtx.gl.useProgram(this.prog), () => this.renderCtx.gl.useProgram(null);
589
+ }
590
+ /**
591
+ * Sets a uniform XY coordinate value.
592
+ *
593
+ * @param name - The name of the uniform.
594
+ * @param value - The value to set.
595
+ */
596
+ uniformXY(t, e) {
597
+ this.renderCtx.gl.uniform2fv(this.getUniformLoc(t), d.couple(e));
598
+ }
599
+ /**
600
+ * Sets a uniform color value.
601
+ *
602
+ * @param name - The name of the uniform.
603
+ * @param value - The value to set.
604
+ */
605
+ uniformColor(t, e) {
606
+ this.renderCtx.gl.uniform4fv(this.getUniformLoc(t), y.rgba1(e));
607
+ }
608
+ getUniformLoc(t) {
609
+ const e = this.uniformLocCache.get(t);
610
+ if (e != null) return e;
611
+ const s = this.renderCtx.gl.getUniformLocation(this.prog, t);
612
+ if (s == null) throw new Error(`unexpected missing uniform ${t}`);
613
+ return this.uniformLocCache.set(t, s), s;
614
+ }
615
+ compile() {
616
+ const t = this.renderCtx.gl;
617
+ this.compileShader(this.vertShader, t.VERTEX_SHADER), this.compileShader(this.fragShader, t.FRAGMENT_SHADER), t.linkProgram(this.prog);
618
+ }
619
+ compileShader(t, e) {
620
+ const s = this.renderCtx.gl, i = s.createShader(e);
621
+ if (i == null) throw tt;
622
+ if (s.shaderSource(i, t), s.compileShader(i), !s.getShaderParameter(i, s.COMPILE_STATUS)) {
623
+ const a = s.getShaderInfoLog(i);
624
+ throw s.deleteShader(i), D(a ?? "unknown");
625
+ }
626
+ s.attachShader(this.prog, i);
627
+ }
628
+ };
629
+ const st = new Float32Array([0, 0, 0, 0, 0, 0]);
630
+ class it extends et {
631
+ positionBuffer;
632
+ constructor(t) {
633
+ super(t, Q, j);
634
+ const e = t.gl.createBuffer();
635
+ if (e == null) throw new K("webgl: failed to create buffer");
636
+ this.positionBuffer = e, t.gl.bindBuffer(t.gl.ARRAY_BUFFER, this.positionBuffer), t.gl.bufferData(t.gl.ARRAY_BUFFER, st, t.gl.STATIC_DRAW);
637
+ }
638
+ exec() {
639
+ const { gl: t } = this.renderCtx, e = t.getAttribLocation(this.prog, "a_position");
640
+ t.bindBuffer(t.ARRAY_BUFFER, this.positionBuffer);
641
+ const s = t.createVertexArray();
642
+ t.bindVertexArray(s), t.enableVertexAttribArray(e), t.vertexAttribPointer(e, 2, t.FLOAT, !1, 0, 0), this.setAsActive(), t.drawArrays(t.TRIANGLES, 0, 3);
643
+ }
644
+ }
645
+ const P = { high: 1, low: 0 };
646
+ class rt {
647
+ /** Stores the current requests for rendering. */
648
+ requests = /* @__PURE__ */ new Map();
649
+ /** Stores render cleanup functions for clearing canvases and other resources. */
650
+ cleanup = /* @__PURE__ */ new Map();
651
+ /** A callback to run after each render call. */
652
+ afterRender;
653
+ /** Instrumentation for logging, tracing, metrics, etc. */
654
+ instrumentation;
655
+ /** A function to add status to the status bar. */
656
+ handleError;
657
+ constructor({
658
+ afterRender: t,
659
+ instrumentation: e = x.Instrumentation.NOOP,
660
+ handleError: s
661
+ }) {
662
+ this.afterRender = t, this.instrumentation = e, this.handleError = s, this.start();
663
+ }
664
+ /**
665
+ * Sets a new request in the queue according to a set of rules:
666
+ *
667
+ * 1. If no request with the same key exists, add the request to the queue.
668
+ * 2. If a request with the same key exists, replace it if the new request has a
669
+ * greater or equal priority and a greater or equal number of canvases that are
670
+ * being rendered to.
671
+ *
672
+ * @param req - The request to set.
673
+ */
674
+ set(t) {
675
+ const e = this.requests.get(t.key);
676
+ if (e == null) this.requests.set(t.key, t);
677
+ else {
678
+ const s = P[t.priority] >= P[e.priority], i = t.canvases.length >= e.canvases.length;
679
+ s && i && this.requests.set(t.key, t);
680
+ }
681
+ }
682
+ /** Execute the render. */
683
+ render() {
684
+ const { requests: t } = this;
685
+ t.size !== 0 && (this.runCleanupsSync(), this.renderSync(), this.requests.clear(), this.afterRender?.());
686
+ }
687
+ runCleanupsSync() {
688
+ const { cleanup: t, requests: e } = this;
689
+ t.forEach((s, i) => {
690
+ const r = e.get(i);
691
+ r != null && (s(r), t.delete(i));
692
+ });
693
+ }
694
+ renderSync() {
695
+ const { requests: t } = this;
696
+ t.forEach((e) => {
697
+ try {
698
+ const s = e.render();
699
+ s != null && this.cleanup.set(e.key, s);
700
+ } catch (s) {
701
+ this.handleError(s, "render loop failed");
702
+ }
703
+ });
704
+ }
705
+ /** Starts the rendering loop. */
706
+ start() {
707
+ const t = () => {
708
+ try {
709
+ this.render();
710
+ } catch (e) {
711
+ this.handleError(e, "render loop failed");
712
+ }
713
+ requestAnimationFrame(t);
714
+ };
715
+ requestAnimationFrame(t);
716
+ }
717
+ }
718
+ const S = 2, g = 2;
719
+ class b {
720
+ // A canvas buffer that holds rendered characters.
721
+ atlas;
722
+ // Cached dimensions of a character.
723
+ charDims;
724
+ // A map of characters to their index in the atlas.
725
+ charMap;
726
+ // The default characters to include in the atlas.
727
+ static DEFAULT_CHARS = "0123456789.:-µmsNa∞ᴇABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz%";
728
+ constructor(t) {
729
+ const { font: e, characters: s = b.DEFAULT_CHARS, textColor: i } = t;
730
+ this.charMap = /* @__PURE__ */ new Map();
731
+ const r = U.unique(Array.from(s)), n = new OffscreenCanvas(1, 1).getContext("2d");
732
+ n.font = e;
733
+ const o = n.measureText("0");
734
+ this.charDims = G(o), this.charDims.width += S, this.charDims.height += S;
735
+ const p = r.length, u = this.charDims.width, m = this.charDims.height, c = Math.ceil(Math.sqrt(p)), E = Math.ceil(p / c);
736
+ this.atlas = new OffscreenCanvas(
737
+ u * c * g,
738
+ m * (E + 1) * g
739
+ );
740
+ const f = this.atlas.getContext("2d");
741
+ f.scale(g, g), f.font = e, f.textBaseline = "alphabetic", f.textAlign = "left", f.fillStyle = y.hex(i), f.clearRect(0, 0, this.atlas.width, this.atlas.height), r.forEach((O, A) => {
742
+ const M = A % c, Y = Math.floor(A / c), N = M * u, X = (Y + 1) * m;
743
+ f.fillText(O, N, X), this.charMap.set(O, A);
744
+ });
745
+ }
746
+ fillText(t, e, s, i) {
747
+ const { width: r, height: a } = this.charDims, n = Math.ceil(Math.sqrt(this.charMap.size));
748
+ t.textAlign === "center" && (s -= r * e.length / 2), t.textBaseline === "middle" && (i += a / 2);
749
+ for (let o = 0; o < e.length; o++) {
750
+ const p = e[o], u = this.charMap.get(p);
751
+ if (u === void 0) continue;
752
+ const m = u % n, c = Math.floor(u / n);
753
+ t.drawImage(
754
+ this.atlas,
755
+ m * r * g,
756
+ c * a * g + S,
757
+ r * g,
758
+ a * g,
759
+ s + o * r,
760
+ i - a - S / g,
761
+ r,
762
+ a
763
+ );
764
+ }
765
+ }
766
+ measureText(t) {
767
+ return { width: t.length * this.charDims.width, height: this.charDims.height };
768
+ }
769
+ }
770
+ class at {
771
+ atlases;
772
+ constructor() {
773
+ this.atlases = /* @__PURE__ */ new Map();
774
+ }
775
+ /**
776
+ * @returns at atlas from the registry compatible with the given props. If the
777
+ * atlas does not exist in the registry, it is created and added to the registry.
778
+ */
779
+ get(t) {
780
+ const e = `${t.font}-${y.hex(t.textColor)}-${t.characters}`;
781
+ if (this.atlases.has(e)) return this.atlases.get(e);
782
+ const s = new b(t);
783
+ return this.atlases.set(e, s), s;
784
+ }
785
+ }
786
+ const F = (l) => (l.textRendering = "optimizeSpeed", l.imageSmoothingEnabled = !1, l);
787
+ class w {
788
+ /* The canvas element used by WebGL. */
789
+ glCanvas;
790
+ /** The canvas element used by the 2D canvas. */
791
+ upper2dCanvas;
792
+ /** The canvas element used by the 2D canvas. */
793
+ lower2dCanvas;
794
+ /** The WebGL rendering context. */
795
+ gl;
796
+ /** A 2D canvas that sits below the WebGL canvas. */
797
+ lower2d;
798
+ /** A 2D canvas that sits above the WebGL canvas. */
799
+ upper2d;
800
+ /** The region the canvas occupies in pixel space */
801
+ region;
802
+ /** The device pixel ratio of the canvas */
803
+ dpr;
804
+ /** queue render transitions onto the stack */
805
+ loop;
806
+ /** See the @link{clear.Program} for why this is necessary. */
807
+ clearProgram;
808
+ os;
809
+ static CONTEXT_KEY = q.B("render-context");
810
+ instrumentation;
811
+ static create(t, e, s, i, r) {
812
+ const a = J(t, "render_context"), n = new w(
813
+ e,
814
+ s,
815
+ i,
816
+ r,
817
+ a,
818
+ W(t),
819
+ H(t)
820
+ );
821
+ return t.set(w.CONTEXT_KEY, n), n;
822
+ }
823
+ constructor(t, e, s, i, r, a, n) {
824
+ this.upper2dCanvas = s, this.lower2dCanvas = e, this.glCanvas = t, this.os = i, this.instrumentation = r, this.dpr = 1;
825
+ const o = this.lower2dCanvas.getContext("2d");
826
+ if (o == null) throw new Error("Could not get 2D context");
827
+ const p = new at();
828
+ this.lower2d = F(
829
+ new R(o, p, this.dpr)
830
+ );
831
+ const u = this.upper2dCanvas.getContext("2d");
832
+ if (u == null) throw new Error("Could not get 2D context");
833
+ this.upper2d = F(
834
+ new R(u, p, this.dpr)
835
+ );
836
+ const m = {
837
+ preserveDrawingBuffer: !0,
838
+ powerPreference: "high-performance",
839
+ stencil: !1,
840
+ depth: !1
841
+ }, c = this.glCanvas.getContext("webgl2", m);
842
+ if (c == null) throw new Error("Could not get WebGL context");
843
+ c.disable(c.DEPTH_TEST), c.disable(c.STENCIL_TEST), c.disable(c.CULL_FACE), c.disable(c.DITHER), this.gl = c, this.glCanvas.oncontextlost = () => a({
844
+ variant: "error",
845
+ message: "WebGL context lost"
846
+ });
847
+ const E = () => {
848
+ this.gl.flush(), this.gl.finish();
849
+ };
850
+ this.loop = new rt({
851
+ afterRender: E,
852
+ instrumentation: this.instrumentation,
853
+ handleError: n
854
+ }), this.region = h.ZERO, this.os === "Windows" && (this.clearProgram = new it(this));
855
+ }
856
+ static useOptional(t) {
857
+ return t.getOptional(w.CONTEXT_KEY);
858
+ }
859
+ static use(t) {
860
+ return t.get(w.CONTEXT_KEY);
861
+ }
862
+ update(t) {
863
+ t.set(w.CONTEXT_KEY, this);
864
+ }
865
+ /**
866
+ * Resizes the canvas to the given region and device pixel ratio. Ensuring
867
+ * that all drawing operations and viewports are scaled correctly.
868
+ */
869
+ resize(t, e) {
870
+ h.equals(this.region, t) && this.dpr === e || (this.region = t, this.dpr = e, this.resizeCanvas(this.glCanvas), this.resizeCanvas(this.upper2dCanvas), this.resizeCanvas(this.lower2dCanvas), this.lower2d.scale(this.dpr, this.dpr), this.upper2d.scale(this.dpr, this.dpr), this.gl.viewport(0, 0, h.width(t) * e, h.height(t) * e));
871
+ }
872
+ resizeCanvas(t) {
873
+ t.width = h.width(this.region) * this.dpr, t.height = h.height(this.region) * this.dpr;
874
+ }
875
+ /** @returns the aspect ratio of the canvas. */
876
+ get aspect() {
877
+ return h.aspect(this.region);
878
+ }
879
+ /**
880
+ * Takes the given box in PIXEL space and produces a transform
881
+ * in CLIP space representing the sub-region represented by the box
882
+ * in the canvas.
883
+ */
884
+ scaleRegion(t) {
885
+ return new C.XY(
886
+ // Accept a value in decimal.
887
+ C.Scale.scale(0, 1).scale(h.width(t)).translate(h.left(t)).reBound(h.width(this.region)).scale(-1, 1),
888
+ // Accept a value in decimal.
889
+ C.Scale.scale(0, 1).scale(h.height(t)).invert().translate(h.top(t)).reBound(h.height(this.region)).scale(-1, 1).invert()
890
+ );
891
+ }
892
+ scissor(t, e = d.ZERO, s) {
893
+ const i = [];
894
+ return s.includes("upper2d") && i.push(this.upper2d.scissor(t, e)), s.includes("lower2d") && i.push(this.lower2d.scissor(t, e)), s.includes("gl") && i.push(this.scissorGL(t, e)), () => i.forEach((r) => r());
895
+ }
896
+ scissorGL(t, e = d.ZERO) {
897
+ return this.gl.enable(this.gl.SCISSOR_TEST), t = T(t, e), this.gl.scissor(
898
+ h.left(t) * this.dpr,
899
+ (h.height(this.region) - h.bottom(t)) * this.dpr,
900
+ h.width(t) * this.dpr,
901
+ h.height(t) * this.dpr
902
+ ), () => this.gl.disable(this.gl.SCISSOR_TEST);
903
+ }
904
+ erase(t, e = d.ZERO, ...s) {
905
+ e = d.construct(e), s.length === 0 && (s = ["upper2d", "lower2d", "gl"]), s.includes("upper2d") && this.eraseCanvas(this.upper2d, t, e), s.includes("lower2d") && this.eraseCanvas(this.lower2d, t, e), s.includes("gl") && this.eraseGL(t, e);
906
+ }
907
+ eraseGL(t, e = d.ZERO) {
908
+ const { gl: s } = this, i = this.scissorGL(T(t, e));
909
+ s.clearColor(...y.rgba1(y.ZERO)), s.clear(s.COLOR_BUFFER_BIT), this.os === "Windows" && this.clearProgram?.exec(), i();
910
+ }
911
+ eraseCanvas(t, e, s = d.ZERO) {
912
+ const i = T(e, s);
913
+ t.clearRect(...d.couple(h.topLeft(i)), ...k.couple(h.dims(i)));
914
+ }
915
+ }
916
+ const ht = _.object({
917
+ region: h.box,
918
+ enabled: _.boolean().optional().default(!1)
919
+ }), I = ["gl", "lower2d", "upper2d"];
920
+ class B extends V {
921
+ static TYPE = "eraser";
922
+ schema = ht;
923
+ afterUpdate(t) {
924
+ this.deleted || (this.internal.renderCtx = w.use(t), this.renderOnLifecycleChange());
925
+ }
926
+ afterDelete() {
927
+ this.renderOnLifecycleChange();
928
+ }
929
+ renderOnLifecycleChange() {
930
+ this.internal.renderCtx.loop.set({
931
+ key: `${this.type}-${this.key}`,
932
+ render: this.render.bind(this),
933
+ priority: "high",
934
+ canvases: I
935
+ });
936
+ }
937
+ render() {
938
+ this.deleted || !this.state.enabled || this.internal.renderCtx.erase(this.state.region, d.construct(0), ...I);
939
+ }
940
+ }
941
+ const ut = {
942
+ [B.TYPE]: B
943
+ };
944
+ export {
945
+ w as C,
946
+ B as E,
947
+ et as G,
948
+ rt as L,
949
+ v as P,
950
+ ut as R,
951
+ pt as a,
952
+ ht as e,
953
+ Z as p,
954
+ J as u
955
+ };