@synnaxlabs/pluto 0.42.4 → 0.43.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 (452) hide show
  1. package/README.md +3 -3
  2. package/dist/{Center-D0JeI7Ta.js → Center-Bq5L7oy0.js} +2 -2
  3. package/dist/{Center-DuI3XH-Q.cjs → Center-DE_BtCCX.cjs} +1 -1
  4. package/dist/ContextMenu-BC5x7XR5.cjs +1 -0
  5. package/dist/{ContextMenu-BiNr7Gxv.js → ContextMenu-DLM5eLLG.js} +11 -11
  6. package/dist/DateTime-CdNKxVxT.js +17 -0
  7. package/dist/DateTime-DC19AIGq.cjs +1 -0
  8. package/dist/{Divider-DqEkzRIY.js → Divider-CDFHLK9U.js} +213 -215
  9. package/dist/Divider-D74_FAXn.cjs +22 -0
  10. package/dist/Dropdown-BpoU-xVd.cjs +1 -0
  11. package/dist/Dropdown-CQu3yo3v.js +327 -0
  12. package/dist/Haul-D6kpOYBa.js +124 -0
  13. package/dist/Haul-De8axVdi.cjs +1 -0
  14. package/dist/{Item-C5SQraZM.js → Item-BgUwEjzV.js} +6 -6
  15. package/dist/{Item-DSBs9VLu.cjs → Item-BrHZi6Fl.cjs} +1 -1
  16. package/dist/{Keyboard-Ca7TAAHK.cjs → Keyboard-CiNuYBa3.cjs} +1 -1
  17. package/dist/{Keyboard-Duo41pJL.js → Keyboard-DjeQa-Nx.js} +2 -2
  18. package/dist/{Link-B9ZGvoBU.cjs → Link-Bngd8rrL.cjs} +1 -1
  19. package/dist/{Link-C9GeoB0w.js → Link-y133HE5v.js} +1 -1
  20. package/dist/Pack-80N7XB5O.cjs +1 -0
  21. package/dist/Pack-BiS6QIuA.js +52 -0
  22. package/dist/Provider-B1j7nPL9.cjs +1 -0
  23. package/dist/Provider-CAR23fYq.js +464 -0
  24. package/dist/{Space-DvalhzRj.cjs → Space-ByFmfiTa.cjs} +1 -1
  25. package/dist/{Space-CyTH97CN.js → Space-DxHm2ok7.js} +1 -1
  26. package/dist/{Text-BR4FW9Hy.js → Text-B1uUpUKk.js} +125 -122
  27. package/dist/Text-CLsJyQGy.cjs +4 -0
  28. package/dist/{Text-8ps3Uw4T.js → Text-CacHYC7L.js} +4 -4
  29. package/dist/{Text-DkA06TeT.cjs → Text-DTPuORh0.cjs} +1 -1
  30. package/dist/Text-Ddc0C5JU.cjs +1 -0
  31. package/dist/{Text-sH_NOelc.js → Text-P0b041la.js} +17 -17
  32. package/dist/{Toggle-BRuUrO2N.js → Toggle-BC1o8qt5.js} +115 -109
  33. package/dist/Toggle-D-vvd8lz.cjs +1 -0
  34. package/dist/{Video-DWStbcmD.js → Video-Bq_WSdfc.js} +1 -1
  35. package/dist/{Video-DgjuFLiE.cjs → Video-BuzHLiXL.cjs} +1 -1
  36. package/dist/{WithIcon-BhR6nwRh.js → WithIcon-B7VPBqA2.js} +24 -27
  37. package/dist/WithIcon-CCnlO2LC.cjs +1 -0
  38. package/dist/align.cjs +1 -1
  39. package/dist/align.js +1 -1
  40. package/dist/array-CPtP5Oov.js +7 -0
  41. package/dist/array-CZHEGH95.cjs +1 -0
  42. package/dist/button.cjs +1 -1
  43. package/dist/button.js +1 -1
  44. package/dist/color.cjs +1 -1
  45. package/dist/color.js +1 -1
  46. package/dist/css-C7rJrqRi.cjs +38 -0
  47. package/dist/css-DjQu2Qyf.js +12511 -0
  48. package/dist/css.cjs +1 -1
  49. package/dist/css.js +11 -5
  50. package/dist/deep-BRgXTyZn.cjs +1 -0
  51. package/dist/deep-D72Fid_q.js +193 -0
  52. package/dist/{dimensions-By-vgVks.cjs → dimensions-BmlCx5q4.cjs} +1 -1
  53. package/dist/{dimensions-B6qmnzv3.js → dimensions-FnMV2fyj.js} +1 -1
  54. package/dist/dropdown.cjs +1 -1
  55. package/dist/dropdown.js +1 -1
  56. package/dist/eraser-C0Kv4_kL.cjs +11 -0
  57. package/dist/{eraser-CK8SwEJa.js → eraser-CupVBBBp.js} +246 -427
  58. package/dist/ether.cjs +1 -1
  59. package/dist/ether.js +36 -37
  60. package/dist/{external-B1YsdhS4.js → external-8zJ3fvo2.js} +122 -123
  61. package/dist/{external-_8qdWaAg.js → external-BDh272rT.js} +2 -2
  62. package/dist/{external-BnK4UIFe.js → external-BYsOdgw5.js} +3 -3
  63. package/dist/{external-DmryCcwg.cjs → external-BgKH42un.cjs} +1 -1
  64. package/dist/external-BmeMUsxr.js +399 -0
  65. package/dist/{external-DissGp_3.js → external-CKag7gXR.js} +8 -8
  66. package/dist/{external-C0X4mXVG.js → external-CVHgvs0C.js} +6 -6
  67. package/dist/{external-B8uaUKhb.cjs → external-CjTwWT6m.cjs} +1 -1
  68. package/dist/{external-BDkqwq72.js → external-Cjnx793K.js} +7901 -7839
  69. package/dist/{external-CUgPP-JD.cjs → external-D1gwMWza.cjs} +1 -1
  70. package/dist/{external-BwUa_5Vs.cjs → external-D38Y0J6S.cjs} +1 -1
  71. package/dist/{external-zbKPQ9ls.cjs → external-D8mHEAIG.cjs} +2 -2
  72. package/dist/external-DC1RT1Js.cjs +1 -0
  73. package/dist/external-DHw0SdIj.cjs +1 -0
  74. package/dist/external-DOujCKRS.cjs +1 -0
  75. package/dist/external-DlyrUZhP.cjs +1 -0
  76. package/dist/external-Ds5GDIp9.cjs +1 -0
  77. package/dist/{external-BOMdfX8_.js → external-DuvwfKLw.js} +2 -2
  78. package/dist/external-GjPk23XZ.cjs +1 -0
  79. package/dist/{external-DQwznOyH.cjs → external-IsogMmdT.cjs} +38 -38
  80. package/dist/{external-C7yPkamb.js → external-ZV7pEm55.js} +8 -8
  81. package/dist/{external-Bl8q9UBF.js → external-firJ8w9n.js} +1837 -1838
  82. package/dist/{external-bSUra-q7.js → external-l7imNJRR.js} +26 -26
  83. package/dist/external-upR9Jz-8.js +60 -0
  84. package/dist/{font-XlUAG1-r.cjs → font-C5EV9fq1.cjs} +1 -1
  85. package/dist/{font-CjYcjBiv.js → font-Cy9UYjyY.js} +2 -2
  86. package/dist/fontString-CUy7T-OR.cjs +1 -0
  87. package/dist/{fontString-BN1kd1AP.js → fontString-CynarMI1.js} +6 -5
  88. package/dist/header.cjs +1 -1
  89. package/dist/header.js +1 -1
  90. package/dist/hooks-B92WH57y.cjs +1 -0
  91. package/dist/{hooks-DjznxGgm.js → hooks-u_TgL0Xi.js} +79 -79
  92. package/dist/index.cjs +7 -7
  93. package/dist/index.js +7286 -7253
  94. package/dist/input.cjs +1 -1
  95. package/dist/input.js +1 -1
  96. package/dist/list.cjs +1 -1
  97. package/dist/list.js +1 -1
  98. package/dist/menu.cjs +1 -1
  99. package/dist/menu.js +1 -1
  100. package/dist/pluto.css +1 -1
  101. package/dist/provider-B8IM-N4g.cjs +154 -0
  102. package/dist/provider-CQqS-teQ.js +31994 -0
  103. package/dist/src/aether/aether/aether.d.ts +16 -16
  104. package/dist/src/aether/aether/aether.d.ts.map +1 -1
  105. package/dist/src/aether/aether/aether.spec.d.ts +5 -0
  106. package/dist/src/aether/aether/aether.spec.d.ts.map +1 -0
  107. package/dist/src/aether/main.d.ts +68 -19
  108. package/dist/src/aether/main.d.ts.map +1 -1
  109. package/dist/src/aether/main.spec.d.ts +2 -2
  110. package/dist/src/aether/main.spec.d.ts.map +1 -1
  111. package/dist/src/aether/message.d.ts +24 -14
  112. package/dist/src/aether/message.d.ts.map +1 -1
  113. package/dist/src/alamos/aether/alamos.d.ts +3 -3
  114. package/dist/src/alamos/aether/alamos.d.ts.map +1 -1
  115. package/dist/src/align/Pack.d.ts.map +1 -1
  116. package/dist/src/breadcrumb/Breadcrumb.d.ts.map +1 -1
  117. package/dist/src/button/Button.d.ts +1 -2
  118. package/dist/src/button/Button.d.ts.map +1 -1
  119. package/dist/src/button/color.d.ts +2 -2
  120. package/dist/src/button/color.d.ts.map +1 -1
  121. package/dist/src/channel/Select.d.ts.map +1 -1
  122. package/dist/src/color/Provider.d.ts +10 -10
  123. package/dist/src/color/Provider.d.ts.map +1 -1
  124. package/dist/src/css/color.d.ts +2 -2
  125. package/dist/src/css/color.d.ts.map +1 -1
  126. package/dist/src/divider/Divider.d.ts.map +1 -1
  127. package/dist/src/dropdown/Dropdown.d.ts.map +1 -1
  128. package/dist/src/form/Field.d.ts +3 -3
  129. package/dist/src/form/Field.d.ts.map +1 -1
  130. package/dist/src/form/Form.d.ts +42 -28
  131. package/dist/src/form/Form.d.ts.map +1 -1
  132. package/dist/src/form/synced.d.ts +8 -8
  133. package/dist/src/form/synced.d.ts.map +1 -1
  134. package/dist/src/haul/Haul.d.ts +6 -6
  135. package/dist/src/haul/Haul.d.ts.map +1 -1
  136. package/dist/src/hooks/ref.d.ts +2 -2
  137. package/dist/src/hooks/ref.d.ts.map +1 -1
  138. package/dist/src/hooks/useResize.d.ts.map +1 -1
  139. package/dist/src/index.d.ts +0 -1
  140. package/dist/src/index.d.ts.map +1 -1
  141. package/dist/src/input/HelpText.d.ts +4 -4
  142. package/dist/src/input/HelpText.d.ts.map +1 -1
  143. package/dist/src/input/Item.d.ts +1 -1
  144. package/dist/src/input/Item.d.ts.map +1 -1
  145. package/dist/src/input/Text.d.ts +2 -3
  146. package/dist/src/input/Text.d.ts.map +1 -1
  147. package/dist/src/label/Select.d.ts.map +1 -1
  148. package/dist/src/list/Selector.d.ts.map +1 -1
  149. package/dist/src/list/useSelect.d.ts.map +1 -1
  150. package/dist/src/memo/proxyMemo.d.ts.map +1 -1
  151. package/dist/src/memo/useMemoCompare.d.ts +3 -3
  152. package/dist/src/memo/useMemoCompare.d.ts.map +1 -1
  153. package/dist/src/mosaic/types.d.ts +9 -1
  154. package/dist/src/mosaic/types.d.ts.map +1 -1
  155. package/dist/src/note/Note.d.ts +2 -2
  156. package/dist/src/note/Note.d.ts.map +1 -1
  157. package/dist/src/observe/use.d.ts +2 -2
  158. package/dist/src/observe/use.d.ts.map +1 -1
  159. package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
  160. package/dist/src/ranger/Select.d.ts.map +1 -1
  161. package/dist/src/select/Button.d.ts +5 -3
  162. package/dist/src/select/Button.d.ts.map +1 -1
  163. package/dist/src/select/Multiple.d.ts.map +1 -1
  164. package/dist/src/select/Single.d.ts.map +1 -1
  165. package/dist/src/state/state.d.ts +2 -1
  166. package/dist/src/state/state.d.ts.map +1 -1
  167. package/dist/src/status/Indicator.d.ts +8 -0
  168. package/dist/src/status/Indicator.d.ts.map +1 -0
  169. package/dist/src/status/Text.d.ts +2 -2
  170. package/dist/src/status/Text.d.ts.map +1 -1
  171. package/dist/src/status/aether/aggregator.d.ts +14 -17
  172. package/dist/src/status/aether/aggregator.d.ts.map +1 -1
  173. package/dist/src/status/aether/types.d.ts +5 -17
  174. package/dist/src/status/aether/types.d.ts.map +1 -1
  175. package/dist/src/status/colors.d.ts +1 -1
  176. package/dist/src/status/colors.d.ts.map +1 -1
  177. package/dist/src/status/external.d.ts +1 -1
  178. package/dist/src/status/external.d.ts.map +1 -1
  179. package/dist/src/synnax/Provider.d.ts +2 -0
  180. package/dist/src/synnax/Provider.d.ts.map +1 -1
  181. package/dist/src/synnax/aether/provider.d.ts +28 -28
  182. package/dist/src/synnax/aether/provider.d.ts.map +1 -1
  183. package/dist/src/table/Table.d.ts +1 -1
  184. package/dist/src/table/Table.d.ts.map +1 -1
  185. package/dist/src/table/aether/Table.d.ts +28 -28
  186. package/dist/src/table/aether/Table.d.ts.map +1 -1
  187. package/dist/src/table/cells/Cells.d.ts +16 -16
  188. package/dist/src/table/cells/Cells.d.ts.map +1 -1
  189. package/dist/src/table/cells/registry.d.ts +2 -2
  190. package/dist/src/table/cells/registry.d.ts.map +1 -1
  191. package/dist/src/tabs/types.d.ts +3 -3
  192. package/dist/src/tabs/types.d.ts.map +1 -1
  193. package/dist/src/telem/aether/context.d.ts +1 -1
  194. package/dist/src/telem/aether/context.d.ts.map +1 -1
  195. package/dist/src/telem/aether/pipeline.d.ts +19 -19
  196. package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
  197. package/dist/src/telem/aether/provider.d.ts +4 -4
  198. package/dist/src/telem/aether/provider.d.ts.map +1 -1
  199. package/dist/src/telem/aether/remote.d.ts +27 -28
  200. package/dist/src/telem/aether/remote.d.ts.map +1 -1
  201. package/dist/src/telem/aether/static.d.ts +13 -13
  202. package/dist/src/telem/aether/static.d.ts.map +1 -1
  203. package/dist/src/telem/aether/telem.d.ts +44 -45
  204. package/dist/src/telem/aether/telem.d.ts.map +1 -1
  205. package/dist/src/telem/aether/transformers.d.ts +44 -47
  206. package/dist/src/telem/aether/transformers.d.ts.map +1 -1
  207. package/dist/src/telem/client/cache/cache.d.ts +1 -1
  208. package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
  209. package/dist/src/telem/client/streamer.d.ts.map +1 -1
  210. package/dist/src/telem/control/Chip.d.ts +1 -1
  211. package/dist/src/telem/control/Chip.d.ts.map +1 -1
  212. package/dist/src/telem/control/Controller.d.ts +1 -1
  213. package/dist/src/telem/control/Controller.d.ts.map +1 -1
  214. package/dist/src/telem/control/Indicator.d.ts +1 -1
  215. package/dist/src/telem/control/Indicator.d.ts.map +1 -1
  216. package/dist/src/telem/control/StateProvider.d.ts +1 -3
  217. package/dist/src/telem/control/StateProvider.d.ts.map +1 -1
  218. package/dist/src/telem/control/aether/chip.d.ts +19 -21
  219. package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
  220. package/dist/src/telem/control/aether/controller.d.ts +17 -14
  221. package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
  222. package/dist/src/telem/control/aether/indicator.d.ts +25 -28
  223. package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
  224. package/dist/src/telem/control/aether/legend.d.ts +13 -13
  225. package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
  226. package/dist/src/telem/control/aether/state.d.ts +8 -8
  227. package/dist/src/telem/control/aether/state.d.ts.map +1 -1
  228. package/dist/src/text/Editable.d.ts.map +1 -1
  229. package/dist/src/text/Text.d.ts +2 -2
  230. package/dist/src/text/Text.d.ts.map +1 -1
  231. package/dist/src/text/WithIcon.d.ts.map +1 -1
  232. package/dist/src/text/core/dimensions.d.ts +24 -0
  233. package/dist/src/text/core/dimensions.d.ts.map +1 -0
  234. package/dist/src/text/core/dimensions.spec.d.ts +2 -0
  235. package/dist/src/text/core/dimensions.spec.d.ts.map +1 -0
  236. package/dist/src/text/core/external.d.ts +3 -0
  237. package/dist/src/text/core/external.d.ts.map +1 -0
  238. package/dist/src/text/core/index.d.ts +1 -1
  239. package/dist/src/text/core/index.d.ts.map +1 -1
  240. package/dist/src/text/core/types.d.ts +5 -5
  241. package/dist/src/text/core/types.d.ts.map +1 -1
  242. package/dist/src/text/external.d.ts +1 -1
  243. package/dist/src/text/external.d.ts.map +1 -1
  244. package/dist/src/theming/aether/provider.d.ts +809 -809
  245. package/dist/src/theming/aether/provider.d.ts.map +1 -1
  246. package/dist/src/theming/core/theme.d.ts +423 -424
  247. package/dist/src/theming/core/theme.d.ts.map +1 -1
  248. package/dist/src/tooltip/Dialog.d.ts.map +1 -1
  249. package/dist/src/tree/Tree.d.ts.map +1 -1
  250. package/dist/src/tree/core.d.ts.map +1 -1
  251. package/dist/src/triggers/triggers.d.ts +1 -1
  252. package/dist/src/triggers/triggers.d.ts.map +1 -1
  253. package/dist/src/util/component.d.ts +1 -1
  254. package/dist/src/util/component.d.ts.map +1 -1
  255. package/dist/src/util/zod.d.ts +2 -2
  256. package/dist/src/util/zod.d.ts.map +1 -1
  257. package/dist/src/viewport/use.d.ts +1 -1
  258. package/dist/src/viewport/use.d.ts.map +1 -1
  259. package/dist/src/vis/axis/axis.d.ts +10 -10
  260. package/dist/src/vis/axis/axis.d.ts.map +1 -1
  261. package/dist/src/vis/axis/ticks.d.ts +2 -2
  262. package/dist/src/vis/axis/ticks.d.ts.map +1 -1
  263. package/dist/src/vis/button/aether/button.d.ts +25 -7
  264. package/dist/src/vis/button/aether/button.d.ts.map +1 -1
  265. package/dist/src/vis/button/use.d.ts +5 -3
  266. package/dist/src/vis/button/use.d.ts.map +1 -1
  267. package/dist/src/vis/canvas/aether/canvas.d.ts +11 -11
  268. package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
  269. package/dist/src/vis/diagram/Diagram.d.ts +3 -2
  270. package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
  271. package/dist/src/vis/diagram/aether/Diagram.d.ts +32 -32
  272. package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
  273. package/dist/src/vis/diagram/aether/types.d.ts +19 -45
  274. package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
  275. package/dist/src/vis/diagram/align.d.ts.map +1 -1
  276. package/dist/src/vis/diagram/edge/connector/connector.d.ts +2 -2
  277. package/dist/src/vis/diagram/edge/connector/connector.d.ts.map +1 -1
  278. package/dist/src/vis/draw2d/canvas.d.ts +1 -4
  279. package/dist/src/vis/draw2d/canvas.d.ts.map +1 -1
  280. package/dist/src/vis/draw2d/index.d.ts.map +1 -1
  281. package/dist/src/vis/eraser/aether/eraser.d.ts +11 -11
  282. package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
  283. package/dist/src/vis/eraser/use.d.ts +1 -1
  284. package/dist/src/vis/eraser/use.d.ts.map +1 -1
  285. package/dist/src/vis/grid/grid.d.ts +3 -3
  286. package/dist/src/vis/grid/grid.d.ts.map +1 -1
  287. package/dist/src/vis/legend/Container.d.ts +7 -7
  288. package/dist/src/vis/legend/Container.d.ts.map +1 -1
  289. package/dist/src/vis/light/aether/light.d.ts +7 -8
  290. package/dist/src/vis/light/aether/light.d.ts.map +1 -1
  291. package/dist/src/vis/light/use.d.ts +2 -2
  292. package/dist/src/vis/light/use.d.ts.map +1 -1
  293. package/dist/src/vis/line/Line.d.ts +1 -1
  294. package/dist/src/vis/line/Line.d.ts.map +1 -1
  295. package/dist/src/vis/line/aether/line.d.ts +10 -10
  296. package/dist/src/vis/line/aether/line.d.ts.map +1 -1
  297. package/dist/src/vis/lineplot/Axis.d.ts +2 -2
  298. package/dist/src/vis/lineplot/Axis.d.ts.map +1 -1
  299. package/dist/src/vis/lineplot/Line.d.ts +1 -1
  300. package/dist/src/vis/lineplot/Line.d.ts.map +1 -1
  301. package/dist/src/vis/lineplot/LinePlot.d.ts +2 -2
  302. package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
  303. package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts +7 -7
  304. package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts.map +1 -1
  305. package/dist/src/vis/lineplot/aether/LinePlot.d.ts +30 -30
  306. package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
  307. package/dist/src/vis/lineplot/aether/XAxis.d.ts +64 -64
  308. package/dist/src/vis/lineplot/aether/XAxis.d.ts.map +1 -1
  309. package/dist/src/vis/lineplot/aether/YAxis.d.ts +64 -64
  310. package/dist/src/vis/lineplot/aether/YAxis.d.ts.map +1 -1
  311. package/dist/src/vis/lineplot/aether/axis.d.ts +13 -13
  312. package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
  313. package/dist/src/vis/lineplot/range/Annotation.d.ts +2 -2
  314. package/dist/src/vis/lineplot/range/Annotation.d.ts.map +1 -1
  315. package/dist/src/vis/lineplot/range/Provider.d.ts +1 -1
  316. package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
  317. package/dist/src/vis/lineplot/range/aether/annotation.d.ts +11 -11
  318. package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
  319. package/dist/src/vis/lineplot/range/aether/provider.d.ts +31 -29
  320. package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
  321. package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts +2 -2
  322. package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts.map +1 -1
  323. package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts +29 -29
  324. package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
  325. package/dist/src/vis/lineplot/useBoundQuerier.d.ts.map +1 -1
  326. package/dist/src/vis/log/Log.d.ts +2 -2
  327. package/dist/src/vis/log/Log.d.ts.map +1 -1
  328. package/dist/src/vis/log/aether/Log.d.ts +37 -37
  329. package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
  330. package/dist/src/vis/measure/Measure.d.ts +1 -1
  331. package/dist/src/vis/measure/Measure.d.ts.map +1 -1
  332. package/dist/src/vis/measure/aether/measure.d.ts +36 -36
  333. package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
  334. package/dist/src/vis/render/context.d.ts.map +1 -1
  335. package/dist/src/vis/render/loop.d.ts +10 -15
  336. package/dist/src/vis/render/loop.d.ts.map +1 -1
  337. package/dist/src/vis/rule/Rule.d.ts +2 -2
  338. package/dist/src/vis/rule/Rule.d.ts.map +1 -1
  339. package/dist/src/vis/rule/aether/aether.d.ts +10 -10
  340. package/dist/src/vis/rule/aether/aether.d.ts.map +1 -1
  341. package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
  342. package/dist/src/vis/schematic/Grid.d.ts +6 -3
  343. package/dist/src/vis/schematic/Grid.d.ts.map +1 -1
  344. package/dist/src/vis/schematic/SelectOrientation.d.ts +3 -2
  345. package/dist/src/vis/schematic/SelectOrientation.d.ts.map +1 -1
  346. package/dist/src/vis/schematic/Symbols.d.ts +108 -99
  347. package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
  348. package/dist/src/vis/schematic/external.d.ts +1 -0
  349. package/dist/src/vis/schematic/external.d.ts.map +1 -1
  350. package/dist/src/vis/schematic/primitives/Primitives.d.ts +28 -28
  351. package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
  352. package/dist/src/vis/schematic/registry.d.ts +5 -5
  353. package/dist/src/vis/schematic/registry.d.ts.map +1 -1
  354. package/dist/src/vis/setpoint/aether/setpoint.d.ts +11 -11
  355. package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
  356. package/dist/src/vis/setpoint/use.d.ts +2 -2
  357. package/dist/src/vis/setpoint/use.d.ts.map +1 -1
  358. package/dist/src/vis/text/atlas.d.ts +0 -2
  359. package/dist/src/vis/text/atlas.d.ts.map +1 -1
  360. package/dist/src/vis/text/index.d.ts.map +1 -1
  361. package/dist/src/vis/toggle/aether/toggle.d.ts +11 -12
  362. package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
  363. package/dist/src/vis/toggle/use.d.ts +2 -2
  364. package/dist/src/vis/toggle/use.d.ts.map +1 -1
  365. package/dist/src/vis/value/aether/value.d.ts +43 -43
  366. package/dist/src/vis/value/aether/value.d.ts.map +1 -1
  367. package/dist/src/vis/value/use.d.ts +15 -15
  368. package/dist/src/vis/value/use.d.ts.map +1 -1
  369. package/dist/state-DAFH2z9y.js +4082 -0
  370. package/dist/state-DwM4WaEw.cjs +27 -0
  371. package/dist/tabs.cjs +1 -1
  372. package/dist/tabs.js +1 -1
  373. package/dist/text.cjs +1 -1
  374. package/dist/text.js +2 -2
  375. package/dist/theming.cjs +1 -1
  376. package/dist/theming.js +2 -2
  377. package/dist/tree.cjs +1 -1
  378. package/dist/tree.js +1 -1
  379. package/dist/triggers.cjs +1 -1
  380. package/dist/triggers.js +1 -1
  381. package/dist/useClickOutside-CUa496t0.cjs +1 -0
  382. package/dist/{useClickOutside-DDCP7Fh-.js → useClickOutside-Dw3KdU3w.js} +22 -22
  383. package/dist/{useDebouncedCallback-DnwYZzjR.cjs → useDebouncedCallback-Bx-HX76R.cjs} +1 -1
  384. package/dist/{useDebouncedCallback-BG4I7mbT.js → useDebouncedCallback-Cvo_HNow.js} +1 -1
  385. package/dist/{useMemoCompare-BViQehyd.js → useMemoCompare-B5QPDK2p.js} +2 -2
  386. package/dist/{useMemoCompare-C2X7Mzx8.cjs → useMemoCompare-BDs2sKw5.cjs} +1 -1
  387. package/dist/useVirtualCursorDragWebKit-CUbBopD6.cjs +1 -0
  388. package/dist/{useVirtualCursorDragWebKit-DTU2tUmp.js → useVirtualCursorDragWebKit-CfxbToxm.js} +7 -7
  389. package/dist/value-BVL4mfhG.cjs +55 -0
  390. package/dist/value-DLy5XRhS.js +10797 -0
  391. package/dist/video.cjs +1 -1
  392. package/dist/video.js +1 -1
  393. package/package.json +24 -23
  394. package/dist/ContextMenu-HpMLd1Ht.cjs +0 -1
  395. package/dist/DateTime-BsjSfOY-.cjs +0 -1
  396. package/dist/DateTime-r6hocEmI.js +0 -17
  397. package/dist/Divider-Dut8qPee.cjs +0 -22
  398. package/dist/Dropdown-BSSe1E1e.cjs +0 -1
  399. package/dist/Dropdown-BrFL1eSc.js +0 -327
  400. package/dist/Haul-C6i2oI7z.cjs +0 -1
  401. package/dist/Haul-CEFSvdy9.js +0 -124
  402. package/dist/Pack-BozAEHBp.js +0 -48
  403. package/dist/Pack-DeZUUdJM.cjs +0 -1
  404. package/dist/Provider-B86QO9NT.js +0 -461
  405. package/dist/Provider-Cw0mSr2D.cjs +0 -1
  406. package/dist/Text-C8GBHl-F.cjs +0 -1
  407. package/dist/Text-CMTkSEWx.cjs +0 -4
  408. package/dist/Toggle-C0lZDyeo.cjs +0 -1
  409. package/dist/WithIcon-BgS5shNZ.cjs +0 -1
  410. package/dist/css-9iEiTRNL.cjs +0 -15
  411. package/dist/css-Cnb9DQMD.js +0 -4747
  412. package/dist/deep-BNa3STCp.cjs +0 -1
  413. package/dist/deep-P35D0Sz7.js +0 -112
  414. package/dist/eraser-BkqFgBRY.cjs +0 -11
  415. package/dist/external-B7NxSklQ.js +0 -60
  416. package/dist/external-BA_VOnV-.js +0 -400
  417. package/dist/external-BGBgNbe2.cjs +0 -1
  418. package/dist/external-CTc1n-JC.cjs +0 -1
  419. package/dist/external-CzTBFiv_.cjs +0 -1
  420. package/dist/external-DGJ8YAe-.cjs +0 -1
  421. package/dist/external-DiLZ1dEk.cjs +0 -1
  422. package/dist/external-Dq8-cbf3.cjs +0 -1
  423. package/dist/fontString-Ddza50DF.cjs +0 -1
  424. package/dist/hooks-B5aLaWzS.cjs +0 -1
  425. package/dist/provider-aWtsGnV8.cjs +0 -58
  426. package/dist/provider-r5Ly36FI.js +0 -12854
  427. package/dist/src/aether/aether/aether.spec.spec.d.ts +0 -5
  428. package/dist/src/aether/aether/aether.spec.spec.d.ts.map +0 -1
  429. package/dist/src/select/Modal.d.ts +0 -1
  430. package/dist/src/select/Modal.d.ts.map +0 -1
  431. package/dist/src/status/Circle.d.ts +0 -8
  432. package/dist/src/status/Circle.d.ts.map +0 -1
  433. package/dist/src/text/dimensions.d.ts +0 -4
  434. package/dist/src/text/dimensions.d.ts.map +0 -1
  435. package/dist/src/vis/performance/Performance.d.ts +0 -2
  436. package/dist/src/vis/performance/Performance.d.ts.map +0 -1
  437. package/dist/src/vis/performance/aether/index.d.ts +0 -2
  438. package/dist/src/vis/performance/aether/index.d.ts.map +0 -1
  439. package/dist/src/vis/performance/aether/performance.d.ts +0 -15
  440. package/dist/src/vis/performance/aether/performance.d.ts.map +0 -1
  441. package/dist/src/vis/performance/index.d.ts +0 -2
  442. package/dist/src/vis/performance/index.d.ts.map +0 -1
  443. package/dist/state-CjGemC7S.js +0 -88
  444. package/dist/state-_FFrG5nH.cjs +0 -1
  445. package/dist/toArray-B7nD2CTw.js +0 -5
  446. package/dist/toArray-BvVYuN_b.cjs +0 -1
  447. package/dist/units-CX_coN92.cjs +0 -1
  448. package/dist/units-Ct3Xl5nK.js +0 -11
  449. package/dist/useClickOutside-CSff8yb-.cjs +0 -1
  450. package/dist/useVirtualCursorDragWebKit-DDmXE4RW.cjs +0 -1
  451. package/dist/value-CkzEjG7v.cjs +0 -57
  452. package/dist/value-DIoBc3VU.js +0 -5977
@@ -1,58 +1,58 @@
1
- var $ = Object.defineProperty;
2
- var z = (h, t, e) => t in h ? $(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
3
- var n = (h, t, e) => z(h, typeof t != "symbol" ? t + "" : t, e);
4
- import { $ as c, v as x, J as f, _ as G, D as y, b as K, C as H } from "./css-Cnb9DQMD.js";
5
- import { z as m } from "zod";
6
- import { h as _, j as J, Q as Z, L as Q } from "./provider-r5Ly36FI.js";
7
- import { a as M } from "./dimensions-B6qmnzv3.js";
8
- const j = m.object({
9
- include: m.string().array().optional(),
10
- exclude: m.string().array().optional(),
11
- level: m.enum(_.LOG_LEVELS).optional().default("info")
12
- }), A = "alamos-provider";
13
- class b extends J {
1
+ var z = Object.defineProperty;
2
+ var H = (l, t, e) => t in l ? z(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
+ var a = (l, t, e) => H(l, typeof t != "symbol" ? t + "" : t, e);
4
+ import { P as n, A as C, K as u, q as M, o as y, c as V, C as Z } from "./css-DjQu2Qyf.js";
5
+ import { h as _, j as $, k as J, m as Q, n as j, L as tt } from "./provider-CQqS-teQ.js";
6
+ import { o as N, _ as et, b as I, g as st } from "./state-DAFH2z9y.js";
7
+ import { a as X } from "./dimensions-FnMV2fyj.js";
8
+ const it = N({
9
+ include: I().array().optional(),
10
+ exclude: I().array().optional(),
11
+ level: et(_.LOG_LEVELS).optional().default("info")
12
+ }), b = "alamos-provider";
13
+ class O extends $ {
14
14
  constructor() {
15
15
  super(...arguments);
16
- n(this, "schema", j);
16
+ a(this, "schema", it);
17
17
  }
18
18
  afterUpdate(e) {
19
- if (e.getOptional(A) != null) return;
20
- const i = [], { include: r, exclude: a, level: l } = this.state;
21
- (r != null || a != null) && i.push(_.logLevelKeyFiler({ include: r, exclude: a })), l != null && i.push(_.logThresholdFilter(l)), i.length === 0 && i.push(() => !1), this.internal.ins = new _.Instrumentation({
19
+ if (e.getOptional(b) != null) return;
20
+ const i = [], { include: r, exclude: h, level: o } = this.state;
21
+ (r != null || h != null) && i.push(_.logLevelKeyFiler({ include: r, exclude: h })), o != null && i.push(_.logThresholdFilter(o)), i.length === 0 && i.push(() => !1), this.internal.ins = new _.Instrumentation({
22
22
  key: "aether",
23
23
  logger: new _.Logger({ filters: i })
24
- }), e.set(A, this.internal.ins);
24
+ }), e.set(b, this.internal.ins);
25
25
  }
26
26
  }
27
- n(b, "TYPE", "alamos.Provider");
28
- const tt = (h, t) => {
29
- const e = h.get(A);
27
+ a(O, "TYPE", "alamos.Provider");
28
+ const rt = (l, t) => {
29
+ const e = l.get(b);
30
30
  if (e == null) throw new Error("No instrumentation provider");
31
31
  return t == null ? e : e.child(t);
32
- }, St = {
33
- [b.TYPE]: b
34
- }, E = (h, t) => c.construct(
35
- c.left(h) - t.x,
36
- c.top(h) - t.y,
37
- c.width(h) + t.x * 2,
38
- c.height(h) + t.y * 2
32
+ }, Ct = {
33
+ [O.TYPE]: O
34
+ }, T = (l, t) => n.construct(
35
+ n.left(l) - t.x,
36
+ n.top(l) - t.y,
37
+ n.width(l) + t.x * 2,
38
+ n.height(l) + t.y * 2
39
39
  );
40
40
  class R {
41
- constructor(t, e, s, i = x.XY.IDENTITY) {
42
- n(this, "scale_");
43
- n(this, "wrapped");
44
- n(this, "atlasRegistry");
45
- n(this, "cachedFont", null);
46
- n(this, "cachedFillStyle", null);
47
- n(this, "cachedStrokeStyle", null);
48
- n(this, "cachedLineWidth", null);
49
- n(this, "cachedGlobalAlpha", null);
50
- n(this, "cachedTextAlign", null);
51
- n(this, "cachedTextBaseline", null);
52
- n(this, "cachedLineCap", null);
53
- n(this, "cachedLineJoin", null);
54
- n(this, "cachedMiterLimit", null);
55
- n(this, "dpr");
41
+ constructor(t, e, s, i = C.XY.IDENTITY) {
42
+ a(this, "scale_");
43
+ a(this, "wrapped");
44
+ a(this, "atlasRegistry");
45
+ a(this, "cachedFont", null);
46
+ a(this, "cachedFillStyle", null);
47
+ a(this, "cachedStrokeStyle", null);
48
+ a(this, "cachedLineWidth", null);
49
+ a(this, "cachedGlobalAlpha", null);
50
+ a(this, "cachedTextAlign", null);
51
+ a(this, "cachedTextBaseline", null);
52
+ a(this, "cachedLineCap", null);
53
+ a(this, "cachedLineJoin", null);
54
+ a(this, "cachedMiterLimit", null);
55
+ a(this, "dpr");
56
56
  this.wrapped = t, this.scale_ = i, this.atlasRegistry = e, this.dpr = s;
57
57
  }
58
58
  get fontStretch() {
@@ -88,6 +88,11 @@ class R {
88
88
  set textRendering(t) {
89
89
  this.wrapped.textRendering = t;
90
90
  }
91
+ checkAtlasFillStyle(t = !1) {
92
+ return t && typeof this.fillStyle == "string" ? [!0, this.fillStyle] : (t && console.warn(
93
+ "attempted to use a text atlas with a gradient fill style. This is not supported. Falling back to default canvas fill."
94
+ ), [!1, null]);
95
+ }
91
96
  reset() {
92
97
  this.wrapped.reset();
93
98
  }
@@ -133,16 +138,16 @@ class R {
133
138
  set strokeStyle(t) {
134
139
  t !== this.cachedStrokeStyle && (this.cachedStrokeStyle = t, this.wrapped.strokeStyle = t);
135
140
  }
136
- drawImage(t, e, s, i, r, a, l, p, d) {
141
+ drawImage(t, e, s, i, r, h, o, c, d) {
137
142
  this.wrapped.drawImage(
138
143
  t,
139
144
  e,
140
145
  s,
141
146
  i,
142
147
  r,
143
- a != null ? this.scale_.x.pos(a) : a,
144
- l != null ? this.scale_.y.pos(l) : l,
145
- p != null ? this.scale_.x.dim(p) : p,
148
+ h != null ? this.scale_.x.pos(h) : h,
149
+ o != null ? this.scale_.y.pos(o) : o,
150
+ c != null ? this.scale_.x.dim(c) : c,
146
151
  d != null ? this.scale_.y.dim(d) : d
147
152
  );
148
153
  }
@@ -175,8 +180,8 @@ class R {
175
180
  createPattern(t, e) {
176
181
  return this.wrapped.createPattern(t, e);
177
182
  }
178
- createRadialGradient(t, e, s, i, r, a) {
179
- return this.wrapped.createRadialGradient(t, e, s, i, r, a);
183
+ createRadialGradient(t, e, s, i, r, h) {
184
+ return this.wrapped.createRadialGradient(t, e, s, i, r, h);
180
185
  }
181
186
  get filter() {
182
187
  return this.wrapped.filter;
@@ -190,7 +195,7 @@ class R {
190
195
  getImageData(t, e, s, i, r) {
191
196
  return this.wrapped.getImageData(t, e, s, i, r);
192
197
  }
193
- putImageData(t, e, s, i, r, a, l) {
198
+ putImageData(t, e, s, i, r, h, o) {
194
199
  this.wrapped.putImageData(
195
200
  // @ts-expect-error - typescript overloads cause issues here
196
201
  t,
@@ -198,8 +203,8 @@ class R {
198
203
  s,
199
204
  i,
200
205
  r,
201
- a,
202
- l
206
+ h,
207
+ o
203
208
  );
204
209
  }
205
210
  get imageSmoothingEnabled() {
@@ -214,14 +219,14 @@ class R {
214
219
  set imageSmoothingQuality(t) {
215
220
  this.wrapped.imageSmoothingQuality = t;
216
221
  }
217
- arc(t, e, s, i, r, a) {
222
+ arc(t, e, s, i, r, h) {
218
223
  this.wrapped.arc(
219
224
  this.scale_.x.pos(t),
220
225
  this.scale_.y.pos(e),
221
226
  this.scale_.x.dim(s),
222
227
  i,
223
228
  r,
224
- a
229
+ h
225
230
  );
226
231
  }
227
232
  arcTo(t, e, s, i, r) {
@@ -233,29 +238,29 @@ class R {
233
238
  this.scale_.x.dim(r)
234
239
  );
235
240
  }
236
- bezierCurveTo(t, e, s, i, r, a) {
241
+ bezierCurveTo(t, e, s, i, r, h) {
237
242
  this.wrapped.bezierCurveTo(
238
243
  this.scale_.x.pos(t),
239
244
  this.scale_.y.pos(e),
240
245
  this.scale_.x.pos(s),
241
246
  this.scale_.y.pos(i),
242
247
  this.scale_.x.pos(r),
243
- this.scale_.y.pos(a)
248
+ this.scale_.y.pos(h)
244
249
  );
245
250
  }
246
251
  closePath() {
247
252
  this.wrapped.closePath();
248
253
  }
249
- ellipse(t, e, s, i, r, a, l, p) {
254
+ ellipse(t, e, s, i, r, h, o, c) {
250
255
  this.wrapped.ellipse(
251
256
  this.scale_.x.pos(t),
252
257
  this.scale_.y.pos(e),
253
258
  this.scale_.x.dim(s),
254
259
  this.scale_.y.dim(i),
255
260
  r,
256
- a,
257
- l,
258
- p
261
+ h,
262
+ o,
263
+ c
259
264
  );
260
265
  }
261
266
  lineTo(t, e) {
@@ -368,13 +373,9 @@ class R {
368
373
  this.wrapped.save();
369
374
  }
370
375
  fillText(t, e, s, i, r = {}) {
371
- const { useAtlas: a } = r;
372
- if (a == !0) {
373
- this.atlasRegistry.get({
374
- font: this.font,
375
- textColor: this.fillStyle,
376
- dpr: this.dpr
377
- }).fillText(this, t, e, s);
376
+ const [h, o] = this.checkAtlasFillStyle(r.useAtlas);
377
+ if (h) {
378
+ this.atlasRegistry.get({ font: this.font, textColor: o }).fillText(this, t, e, s);
378
379
  return;
379
380
  }
380
381
  this.wrapped.fillText(
@@ -384,20 +385,12 @@ class R {
384
385
  i != null ? this.scale_.x.dim(i) : void 0
385
386
  );
386
387
  }
387
- atlasMeasureText(t) {
388
- return this.atlasRegistry.get({
389
- font: this.font,
390
- textColor: this.fillStyle,
391
- dpr: this.dpr
392
- }).measureText(t);
393
- }
394
388
  measureText(t) {
395
389
  return this.wrapped.measureText(t);
396
390
  }
397
391
  textDimensions(t, e = {}) {
398
- const { useAtlas: s } = e;
399
- let i;
400
- return s ? i = this.atlasMeasureText(t) : i = M(this.measureText(t)), i;
392
+ const [s, i] = this.checkAtlasFillStyle(e.useAtlas);
393
+ return s ? this.atlasRegistry.get({ font: this.font, textColor: i }).measureText(t) : X(this.measureText(t));
401
394
  }
402
395
  strokeText(t, e, s, i) {
403
396
  this.wrapped.strokeText(
@@ -449,37 +442,37 @@ class R {
449
442
  scale(t, e) {
450
443
  this.wrapped.scale(t, e), this.dpr = t;
451
444
  }
452
- scissor(t, e = f.ZERO) {
453
- const s = new et(this.scale_);
454
- return t = E(t, e), s.rect(...f.couple(c.topLeft(t)), ...G.couple(c.dims(t))), this.save(), this.clip(s.getPath()), () => this.restore();
445
+ scissor(t, e = u.ZERO) {
446
+ const s = new at(this.scale_);
447
+ return t = T(t, e), s.rect(...u.couple(n.topLeft(t)), ...M.couple(n.dims(t))), this.save(), this.clip(s.getPath()), () => this.restore();
455
448
  }
456
- setTransform(t, e, s, i, r, a) {
457
- this.wrapped.setTransform(t, e, s, i, r, a);
449
+ setTransform(t, e, s, i, r, h) {
450
+ this.wrapped.setTransform(t, e, s, i, r, h);
458
451
  }
459
- transform(t, e, s, i, r, a) {
460
- this.wrapped.transform(t, e, s, i, r, a);
452
+ transform(t, e, s, i, r, h) {
453
+ this.wrapped.transform(t, e, s, i, r, h);
461
454
  }
462
455
  translate(t, e) {
463
456
  this.wrapped.translate(t, e);
464
457
  }
465
458
  }
466
- class et {
467
- constructor(t = x.XY.IDENTITY, e) {
468
- n(this, "scale_");
469
- n(this, "path");
459
+ class at {
460
+ constructor(t = C.XY.IDENTITY, e) {
461
+ a(this, "scale_");
462
+ a(this, "path");
470
463
  this.scale_ = t, e instanceof Path2D || typeof e == "string" ? this.path = new Path2D(e) : this.path = new Path2D();
471
464
  }
472
465
  addPath(t, e) {
473
466
  this.path.addPath(t, e);
474
467
  }
475
- arc(t, e, s, i, r, a) {
468
+ arc(t, e, s, i, r, h) {
476
469
  this.path.arc(
477
470
  this.scale_.x.pos(t),
478
471
  this.scale_.y.pos(e),
479
472
  this.scale_.x.dim(s),
480
473
  i,
481
474
  r,
482
- a
475
+ h
483
476
  );
484
477
  }
485
478
  arcTo(t, e, s, i, r) {
@@ -491,29 +484,29 @@ class et {
491
484
  this.scale_.x.dim(r)
492
485
  );
493
486
  }
494
- bezierCurveTo(t, e, s, i, r, a) {
487
+ bezierCurveTo(t, e, s, i, r, h) {
495
488
  this.path.bezierCurveTo(
496
489
  this.scale_.x.pos(t),
497
490
  this.scale_.y.pos(e),
498
491
  this.scale_.x.pos(s),
499
492
  this.scale_.y.pos(i),
500
493
  this.scale_.x.pos(r),
501
- this.scale_.y.pos(a)
494
+ this.scale_.y.pos(h)
502
495
  );
503
496
  }
504
497
  closePath() {
505
498
  this.path.closePath();
506
499
  }
507
- ellipse(t, e, s, i, r, a, l, p) {
500
+ ellipse(t, e, s, i, r, h, o, c) {
508
501
  this.path.ellipse(
509
502
  this.scale_.x.pos(t),
510
503
  this.scale_.y.pos(e),
511
504
  this.scale_.x.dim(s),
512
505
  this.scale_.y.dim(i),
513
506
  r,
514
- a,
515
- l,
516
- p
507
+ h,
508
+ o,
509
+ c
517
510
  );
518
511
  }
519
512
  lineTo(t, e) {
@@ -539,13 +532,13 @@ class et {
539
532
  );
540
533
  }
541
534
  roundRect(t, e, s, i, r) {
542
- const a = this.scaleRadii(r);
535
+ const h = this.scaleRadii(r);
543
536
  this.path.roundRect(
544
537
  this.scale_.x.pos(t),
545
538
  this.scale_.y.pos(e),
546
539
  this.scale_.x.dim(s),
547
540
  this.scale_.y.dim(i),
548
- a
541
+ h
549
542
  );
550
543
  }
551
544
  // Helper method to scale radii for roundRect
@@ -563,18 +556,18 @@ class et {
563
556
  return this.path;
564
557
  }
565
558
  }
566
- const st = `precision mediump float;
559
+ const ht = `precision mediump float;
567
560
 
568
561
  void main(void) {
569
562
  gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
570
563
  }
571
- `, it = `attribute vec4 a_position;
564
+ `, nt = `attribute vec4 a_position;
572
565
 
573
566
  void main(void) {
574
567
  gl_Position = a_position;
575
568
  }
576
- `, k = (h) => new Error(`failed to compile webgl program: ${h}`), rt = new Error("null shader encountered");
577
- let at = class {
569
+ `, k = (l) => new Error(`failed to compile webgl program: ${l}`), lt = new Error("null shader encountered");
570
+ let ot = class {
578
571
  /**
579
572
  * @constructor compiles the given vertex and fragment shaders under the given
580
573
  * render context into a program.
@@ -585,14 +578,14 @@ let at = class {
585
578
  */
586
579
  constructor(t, e, s) {
587
580
  /** The render context used by this program. */
588
- n(this, "renderCtx");
581
+ a(this, "renderCtx");
589
582
  /** The underlying webgl program. */
590
- n(this, "prog");
583
+ a(this, "prog");
591
584
  /** The code for the vertex shader. */
592
- n(this, "vertShader");
585
+ a(this, "vertShader");
593
586
  /** The code for the fragment shader. */
594
- n(this, "fragShader");
595
- n(this, "uniformLocCache", /* @__PURE__ */ new Map());
587
+ a(this, "fragShader");
588
+ a(this, "uniformLocCache", /* @__PURE__ */ new Map());
596
589
  this.renderCtx = t;
597
590
  const i = t.gl.createProgram();
598
591
  if (i == null) throw k("failed to create program");
@@ -609,7 +602,7 @@ let at = class {
609
602
  * @param value - The value to set.
610
603
  */
611
604
  uniformXY(t, e) {
612
- this.renderCtx.gl.uniform2fv(this.getUniformLoc(t), f.couple(e));
605
+ this.renderCtx.gl.uniform2fv(this.getUniformLoc(t), u.couple(e));
613
606
  }
614
607
  /**
615
608
  * Sets a uniform color value.
@@ -633,22 +626,22 @@ let at = class {
633
626
  }
634
627
  compileShader(t, e) {
635
628
  const s = this.renderCtx.gl, i = s.createShader(e);
636
- if (i == null) throw rt;
629
+ if (i == null) throw lt;
637
630
  if (s.shaderSource(i, t), s.compileShader(i), !s.getShaderParameter(i, s.COMPILE_STATUS)) {
638
- const a = s.getShaderInfoLog(i);
639
- throw s.deleteShader(i), k(a ?? "unknown");
631
+ const h = s.getShaderInfoLog(i);
632
+ throw s.deleteShader(i), k(h ?? "unknown");
640
633
  }
641
634
  s.attachShader(this.prog, i);
642
635
  }
643
636
  };
644
- const nt = new Float32Array([0, 0, 0, 0, 0, 0]);
645
- class ht extends at {
637
+ const ct = new Float32Array([0, 0, 0, 0, 0, 0]);
638
+ class pt extends ot {
646
639
  constructor(e) {
647
- super(e, it, st);
648
- n(this, "positionBuffer");
640
+ super(e, nt, ht);
641
+ a(this, "positionBuffer");
649
642
  const s = e.gl.createBuffer();
650
- if (s == null) throw new Z("webgl: failed to create buffer");
651
- this.positionBuffer = s, e.gl.bindBuffer(e.gl.ARRAY_BUFFER, this.positionBuffer), e.gl.bufferData(e.gl.ARRAY_BUFFER, nt, e.gl.STATIC_DRAW);
643
+ if (s == null) throw new J("webgl: failed to create buffer");
644
+ this.positionBuffer = s, e.gl.bindBuffer(e.gl.ARRAY_BUFFER, this.positionBuffer), e.gl.bufferData(e.gl.ARRAY_BUFFER, ct, e.gl.STATIC_DRAW);
652
645
  }
653
646
  exec() {
654
647
  const { gl: e } = this.renderCtx, s = e.getAttribLocation(this.prog, "a_position");
@@ -657,197 +650,24 @@ class ht extends at {
657
650
  e.bindVertexArray(i), e.enableVertexAttribArray(s), e.vertexAttribPointer(s, 2, e.FLOAT, !1, 0, 0), this.setAsActive(), e.drawArrays(e.TRIANGLES, 0, 3);
658
651
  }
659
652
  }
660
- const ot = new Error("request for lock canceled");
661
- var lt = function(h, t, e, s) {
662
- function i(r) {
663
- return r instanceof e ? r : new e(function(a) {
664
- a(r);
665
- });
666
- }
667
- return new (e || (e = Promise))(function(r, a) {
668
- function l(o) {
669
- try {
670
- d(s.next(o));
671
- } catch (u) {
672
- a(u);
673
- }
674
- }
675
- function p(o) {
676
- try {
677
- d(s.throw(o));
678
- } catch (u) {
679
- a(u);
680
- }
681
- }
682
- function d(o) {
683
- o.done ? r(o.value) : i(o.value).then(l, p);
684
- }
685
- d((s = s.apply(h, t || [])).next());
686
- });
687
- };
688
- class ct {
689
- constructor(t, e = ot) {
690
- this._value = t, this._cancelError = e, this._queue = [], this._weightedWaiters = [];
691
- }
692
- acquire(t = 1, e = 0) {
693
- if (t <= 0)
694
- throw new Error(`invalid weight ${t}: must be positive`);
695
- return new Promise((s, i) => {
696
- const r = { resolve: s, reject: i, weight: t, priority: e }, a = Y(this._queue, (l) => e <= l.priority);
697
- a === -1 && t <= this._value ? this._dispatchItem(r) : this._queue.splice(a + 1, 0, r);
698
- });
699
- }
700
- runExclusive(t) {
701
- return lt(this, arguments, void 0, function* (e, s = 1, i = 0) {
702
- const [r, a] = yield this.acquire(s, i);
703
- try {
704
- return yield e(r);
705
- } finally {
706
- a();
707
- }
708
- });
709
- }
710
- waitForUnlock(t = 1, e = 0) {
711
- if (t <= 0)
712
- throw new Error(`invalid weight ${t}: must be positive`);
713
- return this._couldLockImmediately(t, e) ? Promise.resolve() : new Promise((s) => {
714
- this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), pt(this._weightedWaiters[t - 1], { resolve: s, priority: e });
715
- });
716
- }
717
- isLocked() {
718
- return this._value <= 0;
719
- }
720
- getValue() {
721
- return this._value;
722
- }
723
- setValue(t) {
724
- this._value = t, this._dispatchQueue();
725
- }
726
- release(t = 1) {
727
- if (t <= 0)
728
- throw new Error(`invalid weight ${t}: must be positive`);
729
- this._value += t, this._dispatchQueue();
730
- }
731
- cancel() {
732
- this._queue.forEach((t) => t.reject(this._cancelError)), this._queue = [];
733
- }
734
- _dispatchQueue() {
735
- for (this._drainUnlockWaiters(); this._queue.length > 0 && this._queue[0].weight <= this._value; )
736
- this._dispatchItem(this._queue.shift()), this._drainUnlockWaiters();
737
- }
738
- _dispatchItem(t) {
739
- const e = this._value;
740
- this._value -= t.weight, t.resolve([e, this._newReleaser(t.weight)]);
741
- }
742
- _newReleaser(t) {
743
- let e = !1;
744
- return () => {
745
- e || (e = !0, this.release(t));
746
- };
747
- }
748
- _drainUnlockWaiters() {
749
- if (this._queue.length === 0)
750
- for (let t = this._value; t > 0; t--) {
751
- const e = this._weightedWaiters[t - 1];
752
- e && (e.forEach((s) => s.resolve()), this._weightedWaiters[t - 1] = []);
753
- }
754
- else {
755
- const t = this._queue[0].priority;
756
- for (let e = this._value; e > 0; e--) {
757
- const s = this._weightedWaiters[e - 1];
758
- if (!s)
759
- continue;
760
- const i = s.findIndex((r) => r.priority <= t);
761
- (i === -1 ? s : s.splice(0, i)).forEach((r) => r.resolve());
762
- }
763
- }
764
- }
765
- _couldLockImmediately(t, e) {
766
- return (this._queue.length === 0 || this._queue[0].priority < e) && t <= this._value;
767
- }
768
- }
769
- function pt(h, t) {
770
- const e = Y(h, (s) => t.priority <= s.priority);
771
- h.splice(e + 1, 0, t);
772
- }
773
- function Y(h, t) {
774
- for (let e = h.length - 1; e >= 0; e--)
775
- if (t(h[e]))
776
- return e;
777
- return -1;
778
- }
779
- var dt = function(h, t, e, s) {
780
- function i(r) {
781
- return r instanceof e ? r : new e(function(a) {
782
- a(r);
783
- });
784
- }
785
- return new (e || (e = Promise))(function(r, a) {
786
- function l(o) {
787
- try {
788
- d(s.next(o));
789
- } catch (u) {
790
- a(u);
791
- }
792
- }
793
- function p(o) {
794
- try {
795
- d(s.throw(o));
796
- } catch (u) {
797
- a(u);
798
- }
799
- }
800
- function d(o) {
801
- o.done ? r(o.value) : i(o.value).then(l, p);
802
- }
803
- d((s = s.apply(h, t || [])).next());
804
- });
805
- };
806
- class ut {
807
- constructor(t) {
808
- this._semaphore = new ct(1, t);
809
- }
810
- acquire() {
811
- return dt(this, arguments, void 0, function* (t = 0) {
812
- const [, e] = yield this._semaphore.acquire(1, t);
813
- return e;
814
- });
815
- }
816
- runExclusive(t, e = 0) {
817
- return this._semaphore.runExclusive(() => t(), 1, e);
818
- }
819
- isLocked() {
820
- return this._semaphore.isLocked();
821
- }
822
- waitForUnlock(t = 0) {
823
- return this._semaphore.waitForUnlock(1, t);
824
- }
825
- release() {
826
- this._semaphore.isLocked() && this._semaphore.release();
827
- }
828
- cancel() {
829
- return this._semaphore.cancel();
830
- }
831
- }
832
- const F = { high: 1, low: 0 };
833
- class ft {
653
+ const B = { high: 1, low: 0 };
654
+ class dt {
834
655
  constructor({
835
656
  afterRender: t,
836
- instrumentation: e = _.Instrumentation.NOOP
657
+ instrumentation: e = _.Instrumentation.NOOP,
658
+ handleError: s
837
659
  }) {
838
- /** To lock things so renders don't collide */
839
- n(this, "mutex", new ut());
840
660
  /** Stores the current requests for rendering. */
841
- n(this, "requests", /* @__PURE__ */ new Map());
661
+ a(this, "requests", /* @__PURE__ */ new Map());
842
662
  /** Stores render cleanup functions for clearing canvases and other resources. */
843
- n(this, "cleanup", /* @__PURE__ */ new Map());
663
+ a(this, "cleanup", /* @__PURE__ */ new Map());
844
664
  /** A callback to run after each render call. */
845
- n(this, "afterRender");
665
+ a(this, "afterRender");
846
666
  /** Instrumentation for logging, tracing, metrics, etc. */
847
- n(this, "instrumentation");
848
- /** The total number of renders */
849
- n(this, "count", 0);
850
- this.afterRender = t, this.instrumentation = e, this.start();
667
+ a(this, "instrumentation");
668
+ /** A function to add status to the status bar. */
669
+ a(this, "handleError");
670
+ this.afterRender = t, this.instrumentation = e, this.handleError = s, this.start();
851
671
  }
852
672
  /**
853
673
  * Sets a new request in the queue according to a set of rules:
@@ -863,19 +683,15 @@ class ft {
863
683
  const e = this.requests.get(t.key);
864
684
  if (e == null) this.requests.set(t.key, t);
865
685
  else {
866
- const s = F[t.priority] >= F[e.priority], i = t.canvases.length >= e.canvases.length;
686
+ const s = B[t.priority] >= B[e.priority], i = t.canvases.length >= e.canvases.length;
867
687
  s && i && this.requests.set(t.key, t);
868
688
  }
869
689
  }
870
690
  /** Execute the render. */
871
691
  render() {
872
- var r;
692
+ var e;
873
693
  const { requests: t } = this;
874
- if (t.size === 0) return;
875
- const e = this.instrumentation.T.bench("render-cycle"), s = this.instrumentation.T.bench("render-cycle-cleanup");
876
- this.runCleanupsSync(), s();
877
- const i = this.instrumentation.T.bench("render-cycle-render");
878
- this.renderSync(), i(), e(), this.requests.clear(), (r = this.afterRender) == null || r.call(this);
694
+ t.size !== 0 && (this.runCleanupsSync(), this.renderSync(), this.requests.clear(), (e = this.afterRender) == null || e.call(this));
879
695
  }
880
696
  runCleanupsSync() {
881
697
  const { cleanup: t, requests: e } = this;
@@ -891,66 +707,64 @@ class ft {
891
707
  const s = e.render();
892
708
  s != null && this.cleanup.set(e.key, s);
893
709
  } catch (s) {
894
- console.error(s);
710
+ this.handleError(s, "render loop failed");
895
711
  }
896
712
  });
897
713
  }
898
714
  /** Starts the rendering loop. */
899
- async start() {
715
+ start() {
900
716
  const t = () => {
901
717
  try {
902
718
  this.render();
903
719
  } catch (e) {
904
- console.error(e);
720
+ this.handleError(e, "render loop failed");
905
721
  }
906
722
  requestAnimationFrame(t);
907
723
  };
908
724
  requestAnimationFrame(t);
909
725
  }
910
726
  }
911
- const T = 2, v = class v {
727
+ const S = 2, f = 2, E = class E {
912
728
  constructor(t) {
913
729
  // A canvas buffer that holds rendered characters.
914
- n(this, "atlas");
730
+ a(this, "atlas");
915
731
  // Cached dimensions of a character.
916
- n(this, "charDims");
917
- // The device pixel ratio of the atlas.
918
- n(this, "dpr");
732
+ a(this, "charDims");
919
733
  // A map of characters to their index in the atlas.
920
- n(this, "charMap");
921
- const { font: e, dpr: s, characters: i = v.DEFAULT_CHARS, textColor: r } = t;
922
- this.dpr = s, this.charMap = /* @__PURE__ */ new Map();
923
- const a = K.unique(Array.from(i)), p = new OffscreenCanvas(1, 1).getContext("2d");
924
- p.font = e;
925
- const d = p.measureText("0");
926
- this.charDims = M(d), this.charDims.width += T, this.charDims.height += T;
927
- const o = a.length, u = this.charDims.width, C = this.charDims.height, S = Math.ceil(Math.sqrt(o)), W = Math.ceil(o / S);
734
+ a(this, "charMap");
735
+ const { font: e, characters: s = E.DEFAULT_CHARS, textColor: i } = t;
736
+ this.charMap = /* @__PURE__ */ new Map();
737
+ const r = V.unique(Array.from(s)), o = new OffscreenCanvas(1, 1).getContext("2d");
738
+ o.font = e;
739
+ const c = o.measureText("0");
740
+ this.charDims = X(c), this.charDims.width += S, this.charDims.height += S;
741
+ const d = r.length, g = this.charDims.width, x = this.charDims.height, p = Math.ceil(Math.sqrt(d)), A = Math.ceil(d / p);
928
742
  this.atlas = new OffscreenCanvas(
929
- u * S * this.dpr,
930
- C * (W + 1) * this.dpr
743
+ g * p * f,
744
+ x * (A + 1) * f
931
745
  );
932
- const w = this.atlas.getContext("2d");
933
- w.scale(this.dpr, this.dpr), w.font = e, w.textBaseline = "alphabetic", w.textAlign = "left", w.fillStyle = y.hex(r), w.clearRect(0, 0, this.atlas.width, this.atlas.height), a.forEach((I, L) => {
934
- const U = L % S, N = Math.floor(L / S), X = U * u, V = (N + 1) * C;
935
- w.fillText(I, X, V), this.charMap.set(I, L);
746
+ const m = this.atlas.getContext("2d");
747
+ m.scale(f, f), m.font = e, m.textBaseline = "alphabetic", m.textAlign = "left", m.fillStyle = y.hex(i), m.clearRect(0, 0, this.atlas.width, this.atlas.height), r.forEach((F, L) => {
748
+ const q = L % p, K = Math.floor(L / p), U = q * g, W = (K + 1) * x;
749
+ m.fillText(F, U, W), this.charMap.set(F, L);
936
750
  });
937
751
  }
938
752
  fillText(t, e, s, i) {
939
- const { width: r, height: a } = this.charDims, l = Math.ceil(Math.sqrt(this.charMap.size));
940
- for (let p = 0; p < e.length; p++) {
941
- const d = e[p], o = this.charMap.get(d);
942
- if (o === void 0) continue;
943
- const u = o % l, C = Math.floor(o / l);
753
+ const { width: r, height: h } = this.charDims, o = Math.ceil(Math.sqrt(this.charMap.size));
754
+ for (let c = 0; c < e.length; c++) {
755
+ const d = e[c], g = this.charMap.get(d);
756
+ if (g === void 0) continue;
757
+ const x = g % o, p = Math.floor(g / o);
944
758
  t.drawImage(
945
759
  this.atlas,
946
- u * r * this.dpr,
947
- C * a * this.dpr + T,
948
- r * this.dpr,
949
- a * this.dpr,
950
- s + p * r,
951
- i - a - T / this.dpr,
760
+ x * r * f,
761
+ p * h * f + S,
762
+ r * f,
763
+ h * f,
764
+ s + c * r,
765
+ i - h - S / f,
952
766
  r,
953
- a
767
+ h
954
768
  );
955
769
  }
956
770
  }
@@ -959,11 +773,11 @@ const T = 2, v = class v {
959
773
  }
960
774
  };
961
775
  // The default characters to include in the atlas.
962
- n(v, "DEFAULT_CHARS", "0123456789.:-umsNa∞ᴇ");
963
- let O = v;
964
- class gt {
776
+ a(E, "DEFAULT_CHARS", "0123456789.:-umsNa∞ᴇ");
777
+ let v = E;
778
+ class ut {
965
779
  constructor() {
966
- n(this, "atlases");
780
+ a(this, "atlases");
967
781
  this.atlases = /* @__PURE__ */ new Map();
968
782
  }
969
783
  /**
@@ -971,96 +785,102 @@ class gt {
971
785
  * atlas does not exist in the registry, it is created and added to the registry.
972
786
  */
973
787
  get(t) {
974
- const e = `${t.font}-${y.hex(t.textColor)}-${t.dpr}-${t.characters}`;
788
+ const e = `${t.font}-${y.hex(t.textColor)}-${t.characters}`;
975
789
  if (this.atlases.has(e)) return this.atlases.get(e);
976
- const s = new O(t);
790
+ const s = new v(t);
977
791
  return this.atlases.set(e, s), s;
978
792
  }
979
793
  }
980
- const q = (h) => (h.textRendering = "optimizeSpeed", h.imageSmoothingEnabled = !1, h), g = class g {
981
- constructor(t, e, s, i, r) {
794
+ const G = (l) => (l.textRendering = "optimizeSpeed", l.imageSmoothingEnabled = !1, l), w = class w {
795
+ constructor(t, e, s, i, r, h, o) {
982
796
  /* The canvas element used by WebGL. */
983
- n(this, "glCanvas");
797
+ a(this, "glCanvas");
984
798
  /** The canvas element used by the 2D canvas. */
985
- n(this, "upper2dCanvas");
799
+ a(this, "upper2dCanvas");
986
800
  /** The canvas element used by the 2D canvas. */
987
- n(this, "lower2dCanvas");
801
+ a(this, "lower2dCanvas");
988
802
  /** The WebGL rendering context. */
989
- n(this, "gl");
803
+ a(this, "gl");
990
804
  /** A 2D canvas that sits below the WebGL canvas. */
991
- n(this, "lower2d");
805
+ a(this, "lower2d");
992
806
  /** A 2D canvas that sits above the WebGL canvas. */
993
- n(this, "upper2d");
807
+ a(this, "upper2d");
994
808
  /** The region the canvas occupies in pixel space */
995
- n(this, "region");
809
+ a(this, "region");
996
810
  /** The device pixel ratio of the canvas */
997
- n(this, "dpr");
811
+ a(this, "dpr");
998
812
  /** queue render transitions onto the stack */
999
- n(this, "loop");
813
+ a(this, "loop");
1000
814
  /** See the @link{clear.Program} for why this is necessary. */
1001
- n(this, "clearProgram");
1002
- n(this, "os");
1003
- n(this, "instrumentation");
815
+ a(this, "clearProgram");
816
+ a(this, "os");
817
+ a(this, "instrumentation");
1004
818
  this.upper2dCanvas = s, this.lower2dCanvas = e, this.glCanvas = t, this.os = i, this.instrumentation = r, this.dpr = 1;
1005
- const a = this.lower2dCanvas.getContext("2d");
1006
- if (a == null) throw new Error("Could not get 2D context");
1007
- const l = new gt();
1008
- this.lower2d = q(
1009
- new R(a, l, this.dpr)
819
+ const c = this.lower2dCanvas.getContext("2d");
820
+ if (c == null) throw new Error("Could not get 2D context");
821
+ const d = new ut();
822
+ this.lower2d = G(
823
+ new R(c, d, this.dpr)
1010
824
  );
1011
- const p = this.upper2dCanvas.getContext("2d");
1012
- if (p == null) throw new Error("Could not get 2D context");
1013
- this.upper2d = q(
1014
- new R(p, l, this.dpr)
825
+ const g = this.upper2dCanvas.getContext("2d");
826
+ if (g == null) throw new Error("Could not get 2D context");
827
+ this.upper2d = G(
828
+ new R(g, d, this.dpr)
1015
829
  );
1016
- const d = {
830
+ const x = {
1017
831
  preserveDrawingBuffer: !0,
1018
832
  powerPreference: "high-performance",
1019
833
  stencil: !1,
1020
834
  depth: !1
1021
- }, o = this.glCanvas.getContext("webgl2", d);
1022
- if (o == null) throw new Error("Could not get WebGL context");
1023
- o.disable(o.DEPTH_TEST), o.disable(o.STENCIL_TEST), o.disable(o.CULL_FACE), o.disable(o.DITHER), this.gl = o, this.glCanvas.oncontextlost = console.error;
1024
- const u = () => {
835
+ }, p = this.glCanvas.getContext("webgl2", x);
836
+ if (p == null) throw new Error("Could not get WebGL context");
837
+ p.disable(p.DEPTH_TEST), p.disable(p.STENCIL_TEST), p.disable(p.CULL_FACE), p.disable(p.DITHER), this.gl = p, this.glCanvas.oncontextlost = () => h({
838
+ variant: "error",
839
+ message: "WebGL context lost"
840
+ });
841
+ const A = () => {
1025
842
  this.gl.flush(), this.gl.finish();
1026
843
  };
1027
- this.loop = new ft({
1028
- afterRender: u,
1029
- instrumentation: this.instrumentation
1030
- }), this.region = c.ZERO, this.os === "Windows" && (this.clearProgram = new ht(this));
844
+ this.loop = new dt({
845
+ afterRender: A,
846
+ instrumentation: this.instrumentation,
847
+ handleError: o
848
+ }), this.region = n.ZERO, this.os === "Windows" && (this.clearProgram = new pt(this));
1031
849
  }
1032
850
  static create(t, e, s, i, r) {
1033
- const a = tt(t, "render_context"), l = new g(
851
+ const h = rt(t, "render_context"), o = new w(
1034
852
  e,
1035
853
  s,
1036
854
  i,
1037
855
  r,
1038
- a
856
+ h,
857
+ Q(t),
858
+ j(t)
1039
859
  );
1040
- return t.set(g.CONTEXT_KEY, l), l;
860
+ return t.set(w.CONTEXT_KEY, o), o;
1041
861
  }
1042
862
  static useOptional(t) {
1043
- return t.getOptional(g.CONTEXT_KEY);
863
+ return t.getOptional(w.CONTEXT_KEY);
1044
864
  }
1045
865
  static use(t) {
1046
- return t.get(g.CONTEXT_KEY);
866
+ return t.get(w.CONTEXT_KEY);
1047
867
  }
1048
868
  update(t) {
1049
- t.set(g.CONTEXT_KEY, this);
869
+ t.set(w.CONTEXT_KEY, this);
1050
870
  }
1051
871
  /**
1052
872
  * Resizes the canvas to the given region and device pixel ratio. Ensuring
1053
873
  * that all drawing operations and viewports are scaled correctly.
1054
874
  */
1055
875
  resize(t, e) {
1056
- c.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, c.width(t) * e, c.height(t) * e));
876
+ n.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, n.width(t) * e, n.height(t) * e));
1057
877
  }
1058
878
  resizeCanvas(t) {
1059
- t.width = c.width(this.region) * this.dpr, t.height = c.height(this.region) * this.dpr;
879
+ t.width = n.width(this.region) * this.dpr, t.height = n.height(this.region) * this.dpr;
1060
880
  }
1061
881
  /** @returns the aspect ratio of the canvas. */
1062
882
  get aspect() {
1063
- return c.aspect(this.region);
883
+ return n.aspect(this.region);
1064
884
  }
1065
885
  /**
1066
886
  * Takes the given box in PIXEL space and produces a transform
@@ -1068,48 +888,48 @@ const q = (h) => (h.textRendering = "optimizeSpeed", h.imageSmoothingEnabled = !
1068
888
  * in the canvas.
1069
889
  */
1070
890
  scaleRegion(t) {
1071
- return new x.XY(
891
+ return new C.XY(
1072
892
  // Accept a value in decimal.
1073
- x.Scale.scale(0, 1).scale(c.width(t)).translate(c.left(t)).reBound(c.width(this.region)).scale(-1, 1),
893
+ C.Scale.scale(0, 1).scale(n.width(t)).translate(n.left(t)).reBound(n.width(this.region)).scale(-1, 1),
1074
894
  // Accept a value in decimal.
1075
- x.Scale.scale(0, 1).scale(c.height(t)).invert().translate(c.top(t)).reBound(c.height(this.region)).scale(-1, 1).invert()
895
+ C.Scale.scale(0, 1).scale(n.height(t)).invert().translate(n.top(t)).reBound(n.height(this.region)).scale(-1, 1).invert()
1076
896
  );
1077
897
  }
1078
- scissor(t, e = f.ZERO, s) {
898
+ scissor(t, e = u.ZERO, s) {
1079
899
  const i = [];
1080
900
  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());
1081
901
  }
1082
- scissorGL(t, e = f.ZERO) {
1083
- return this.gl.enable(this.gl.SCISSOR_TEST), t = E(t, e), this.gl.scissor(
1084
- c.left(t) * this.dpr,
1085
- (c.height(this.region) - c.bottom(t)) * this.dpr,
1086
- c.width(t) * this.dpr,
1087
- c.height(t) * this.dpr
902
+ scissorGL(t, e = u.ZERO) {
903
+ return this.gl.enable(this.gl.SCISSOR_TEST), t = T(t, e), this.gl.scissor(
904
+ n.left(t) * this.dpr,
905
+ (n.height(this.region) - n.bottom(t)) * this.dpr,
906
+ n.width(t) * this.dpr,
907
+ n.height(t) * this.dpr
1088
908
  ), () => this.gl.disable(this.gl.SCISSOR_TEST);
1089
909
  }
1090
- erase(t, e = f.ZERO, ...s) {
1091
- e = f.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);
910
+ erase(t, e = u.ZERO, ...s) {
911
+ e = u.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);
1092
912
  }
1093
- eraseGL(t, e = f.ZERO) {
913
+ eraseGL(t, e = u.ZERO) {
1094
914
  var r;
1095
- const { gl: s } = this, i = this.scissorGL(E(t, e));
915
+ const { gl: s } = this, i = this.scissorGL(T(t, e));
1096
916
  s.clearColor(...y.rgba1(y.ZERO)), s.clear(s.COLOR_BUFFER_BIT), this.os === "Windows" && ((r = this.clearProgram) == null || r.exec()), i();
1097
917
  }
1098
- eraseCanvas(t, e, s = f.ZERO) {
1099
- const i = E(e, s);
1100
- t.clearRect(...f.couple(c.topLeft(i)), ...G.couple(c.dims(i)));
918
+ eraseCanvas(t, e, s = u.ZERO) {
919
+ const i = T(e, s);
920
+ t.clearRect(...u.couple(n.topLeft(i)), ...M.couple(n.dims(i)));
1101
921
  }
1102
922
  };
1103
- n(g, "CONTEXT_KEY", H.B("render-context"));
1104
- let D = g;
1105
- const wt = m.object({
1106
- region: c.box,
1107
- enabled: m.boolean().optional().default(!1)
1108
- }), B = ["gl", "lower2d", "upper2d"];
1109
- class P extends Q {
923
+ a(w, "CONTEXT_KEY", Z.B("render-context"));
924
+ let D = w;
925
+ const gt = N({
926
+ region: n.box,
927
+ enabled: st().optional().default(!1)
928
+ }), Y = ["gl", "lower2d", "upper2d"];
929
+ class P extends tt {
1110
930
  constructor() {
1111
931
  super(...arguments);
1112
- n(this, "schema", wt);
932
+ a(this, "schema", gt);
1113
933
  }
1114
934
  afterUpdate(e) {
1115
935
  this.deleted || (this.internal.renderCtx = D.use(e), this.renderOnLifecycleChange());
@@ -1122,27 +942,26 @@ class P extends Q {
1122
942
  key: `${this.type}-${this.key}`,
1123
943
  render: this.render.bind(this),
1124
944
  priority: "high",
1125
- canvases: B
945
+ canvases: Y
1126
946
  });
1127
947
  }
1128
948
  render() {
1129
- this.deleted || !this.state.enabled || this.internal.renderCtx.erase(this.state.region, f.construct(0), ...B);
949
+ this.deleted || !this.state.enabled || this.internal.renderCtx.erase(this.state.region, u.construct(0), ...Y);
1130
950
  }
1131
951
  }
1132
- n(P, "TYPE", "eraser");
1133
- const Et = {
952
+ a(P, "TYPE", "eraser");
953
+ const St = {
1134
954
  [P.TYPE]: P
1135
955
  };
1136
956
  export {
1137
957
  D as C,
1138
958
  P as E,
1139
- at as G,
1140
- ft as L,
1141
- ut as M,
1142
- b as P,
1143
- Et as R,
1144
- St as a,
1145
- wt as e,
1146
- j as p,
1147
- tt as u
959
+ ot as G,
960
+ dt as L,
961
+ O as P,
962
+ St as R,
963
+ Ct as a,
964
+ gt as e,
965
+ it as p,
966
+ rt as u
1148
967
  };