@synnaxlabs/pluto 0.40.1 → 0.42.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 (569) hide show
  1. package/dist/{Center-CFEPOi_x.js → Center-CNcAEDgS.js} +3 -3
  2. package/dist/Center-Map6aflE.cjs +1 -0
  3. package/dist/ContextMenu-DmRPxhnI.cjs +1 -0
  4. package/dist/ContextMenu-fLU0wr9S.js +95 -0
  5. package/dist/DateTime-CP3OmEGY.cjs +1 -0
  6. package/dist/{DateTime-Djw6pb3W.js → DateTime-CWAcEwXO.js} +2 -2
  7. package/dist/{Divider-CMyzWvRC.js → Divider-BTLn5ucU.js} +597 -512
  8. package/dist/Divider-Dvb6dsgX.cjs +22 -0
  9. package/dist/Dropdown-CaGzfZRa.cjs +1 -0
  10. package/dist/Dropdown-nw8kRSbl.js +327 -0
  11. package/dist/Haul-B8zGWk0I.cjs +1 -0
  12. package/dist/{Haul-CaLW9ULm.js → Haul-Cnuzk7Z-.js} +34 -35
  13. package/dist/Item-BzrQqxRC.cjs +1 -0
  14. package/dist/Item-FmwC-twg.js +109 -0
  15. package/dist/Keyboard-BfvjkBgh.cjs +1 -0
  16. package/dist/{Keyboard--YA9DHRz.js → Keyboard-Cevv7vrQ.js} +11 -9
  17. package/dist/{Link-Bhto2KVL.cjs → Link-DI7BZ5dL.cjs} +1 -1
  18. package/dist/{Link-BT_Kwmlr.js → Link-Dljdu4e9.js} +1 -1
  19. package/dist/Pack-lJqoOmHx.cjs +1 -0
  20. package/dist/Pack-to0DG2iP.js +48 -0
  21. package/dist/Provider-BlM1x1cF.cjs +1 -0
  22. package/dist/Provider-C_B463cg.js +461 -0
  23. package/dist/Space-C2oZDkE1.js +100 -0
  24. package/dist/Space-DfcVsxz8.cjs +1 -0
  25. package/dist/Text-BXADoWYY.js +137 -0
  26. package/dist/Text-BiYpGaEZ.js +35 -0
  27. package/dist/Text-BjHlLKsp.cjs +1 -0
  28. package/dist/{Text-B7AC8Z1e.js → Text-CWiPrDI1.js} +320 -308
  29. package/dist/Text-DrIBbnml.cjs +1 -0
  30. package/dist/Text-ZJqK1cI3.cjs +4 -0
  31. package/dist/Toggle-CeUVv58o.js +377 -0
  32. package/dist/Toggle-CfwYy9fe.cjs +1 -0
  33. package/dist/{Video-TjJf_tXI.js → Video-BZ1XTEez.js} +1 -1
  34. package/dist/{Video-hdvNT3La.cjs → Video-C7YoF37-.cjs} +1 -1
  35. package/dist/WithIcon-DG7VJxsE.cjs +1 -0
  36. package/dist/WithIcon-pBZ7H9Lq.js +98 -0
  37. package/dist/align.cjs +1 -1
  38. package/dist/align.js +1 -1
  39. package/dist/button.cjs +1 -1
  40. package/dist/button.js +1 -1
  41. package/dist/color.cjs +1 -1
  42. package/dist/color.js +1 -1
  43. package/dist/css-B7c7_G5h.js +4746 -0
  44. package/dist/css-hg3QdDDt.cjs +15 -0
  45. package/dist/css.cjs +1 -1
  46. package/dist/css.js +2 -2
  47. package/dist/deep-B1etRzze.cjs +1 -0
  48. package/dist/deep-BytImVW-.js +102 -0
  49. package/dist/dimensions-Cz-q0Mok.cjs +1 -0
  50. package/dist/dimensions-DcjW7X3n.js +19 -0
  51. package/dist/dropdown.cjs +1 -1
  52. package/dist/dropdown.js +1 -1
  53. package/dist/eraser-BOx6Xhwn.cjs +11 -0
  54. package/dist/eraser-Bsb4kKS3.js +1148 -0
  55. package/dist/ether.cjs +1 -1
  56. package/dist/ether.js +68 -75
  57. package/dist/{external-DTjOTICM.js → external-1KJXZcr9.js} +2 -2
  58. package/dist/{external-dLVcM8tt.cjs → external-BHHC7TQ_.cjs} +1 -1
  59. package/dist/external-BLEs2AYM.cjs +46 -0
  60. package/dist/external-BdVuZd3H.cjs +1 -0
  61. package/dist/external-BiBhgCdz.cjs +1 -0
  62. package/dist/external-C75Z9Zbn.cjs +1 -0
  63. package/dist/external-CEfSeJMr.js +432 -0
  64. package/dist/external-CLTPcWrI.cjs +1 -0
  65. package/dist/{external-C3e9emVy.js → external-CRNR1bD0.js} +29 -28
  66. package/dist/{external-D_21zZAf.cjs → external-Cfj1plcw.cjs} +1 -1
  67. package/dist/{external-B9nbHICv.js → external-Ck1rVwUu.js} +3263 -3285
  68. package/dist/external-Cni9ftkW.cjs +1 -0
  69. package/dist/external-DCcp3sQD.js +28 -0
  70. package/dist/{external-Cs8oKwvw.cjs → external-DCfs7IFi.cjs} +1 -1
  71. package/dist/external-DDD_nc3x.js +400 -0
  72. package/dist/external-DNT-gmZx.cjs +1 -0
  73. package/dist/{external-CcIx4j5m.js → external-DeCeUbqe.js} +18 -17
  74. package/dist/{external-DCflyFdb.js → external-DgSaeiBz.js} +3 -3
  75. package/dist/{external-ClyfPgqG.cjs → external-DhfASB4W.cjs} +37 -37
  76. package/dist/{external-upiAayc4.js → external-bkwgRzLc.js} +29 -29
  77. package/dist/{external-_b4lTCfZ.js → external-hgzjVlDR.js} +2171 -2184
  78. package/dist/external-pUEPQrp_.cjs +1 -0
  79. package/dist/{external-D12g_huj.js → external-qwaFowDe.js} +14 -14
  80. package/dist/{external-JNlv7kxI.js → external-sUHGRdqd.js} +2 -2
  81. package/dist/{font-Bas26Jn-.cjs → font-BFTKtIQk.cjs} +1 -1
  82. package/dist/{font-CcRdsA3n.js → font-Crn-D_ua.js} +2 -2
  83. package/dist/fontString-DQLaRHQV.cjs +1 -0
  84. package/dist/fontString-DjnDxFrE.js +28 -0
  85. package/dist/header.cjs +1 -1
  86. package/dist/header.js +1 -1
  87. package/dist/hooks-CM9HWxYc.js +296 -0
  88. package/dist/hooks-CTKCi-OE.cjs +1 -0
  89. package/dist/index.cjs +7 -7
  90. package/dist/index.js +10618 -9594
  91. package/dist/input.cjs +1 -1
  92. package/dist/input.js +1 -1
  93. package/dist/list.cjs +1 -1
  94. package/dist/list.js +1 -1
  95. package/dist/menu.cjs +1 -1
  96. package/dist/menu.js +1 -1
  97. package/dist/pluto.css +1 -1
  98. package/dist/provider-BDFfcHVT.js +12851 -0
  99. package/dist/provider-XPRFhwnl.cjs +58 -0
  100. package/dist/src/aether/aether/aether.d.ts +17 -18
  101. package/dist/src/aether/aether/aether.d.ts.map +1 -1
  102. package/dist/src/aether/aether/aether.spec.spec.d.ts +1 -5
  103. package/dist/src/aether/aether/aether.spec.spec.d.ts.map +1 -1
  104. package/dist/src/aether/main.d.ts +48 -0
  105. package/dist/src/aether/main.d.ts.map +1 -1
  106. package/dist/src/aether/main.spec.d.ts +1 -5
  107. package/dist/src/aether/main.spec.d.ts.map +1 -1
  108. package/dist/src/aether/message.d.ts +11 -1
  109. package/dist/src/aether/message.d.ts.map +1 -1
  110. package/dist/src/alamos/aether/alamos.d.ts +19 -25
  111. package/dist/src/alamos/aether/alamos.d.ts.map +1 -1
  112. package/dist/src/align/Center.d.ts +2 -2
  113. package/dist/src/align/Center.d.ts.map +1 -1
  114. package/dist/src/align/Pack.d.ts +3 -3
  115. package/dist/src/align/Pack.d.ts.map +1 -1
  116. package/dist/src/align/Space.d.ts +25 -10
  117. package/dist/src/align/Space.d.ts.map +1 -1
  118. package/dist/src/align/Stack.d.ts +7 -0
  119. package/dist/src/align/Stack.d.ts.map +1 -0
  120. package/dist/src/align/external.d.ts +1 -0
  121. package/dist/src/align/external.d.ts.map +1 -1
  122. package/dist/src/breadcrumb/Breadcrumb.d.ts +2 -2
  123. package/dist/src/breadcrumb/Breadcrumb.d.ts.map +1 -1
  124. package/dist/src/button/Button.d.ts +4 -6
  125. package/dist/src/button/Button.d.ts.map +1 -1
  126. package/dist/src/button/Icon.d.ts +4 -1
  127. package/dist/src/button/Icon.d.ts.map +1 -1
  128. package/dist/src/button/Toggle.d.ts +0 -1
  129. package/dist/src/button/Toggle.d.ts.map +1 -1
  130. package/dist/src/button/color.d.ts +2 -2
  131. package/dist/src/button/color.d.ts.map +1 -1
  132. package/dist/src/caret/Animated.d.ts +3 -2
  133. package/dist/src/caret/Animated.d.ts.map +1 -1
  134. package/dist/src/channel/LinePlot.d.ts +5 -5
  135. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  136. package/dist/src/channel/Select.d.ts +3 -3
  137. package/dist/src/channel/Select.d.ts.map +1 -1
  138. package/dist/src/color/BaseSwatch.d.ts +3 -3
  139. package/dist/src/color/BaseSwatch.d.ts.map +1 -1
  140. package/dist/src/color/GradientPicker.d.ts +1 -2
  141. package/dist/src/color/GradientPicker.d.ts.map +1 -1
  142. package/dist/src/color/Picker.d.ts +1 -1
  143. package/dist/src/color/Picker.d.ts.map +1 -1
  144. package/dist/src/color/Provider.d.ts +8 -100
  145. package/dist/src/color/Provider.d.ts.map +1 -1
  146. package/dist/src/color/external.d.ts +0 -4
  147. package/dist/src/color/external.d.ts.map +1 -1
  148. package/dist/src/css/color.d.ts +2 -2
  149. package/dist/src/css/color.d.ts.map +1 -1
  150. package/dist/src/css/css.d.ts +2 -1
  151. package/dist/src/css/css.d.ts.map +1 -1
  152. package/dist/src/divider/Divider.d.ts +6 -5
  153. package/dist/src/divider/Divider.d.ts.map +1 -1
  154. package/dist/src/dropdown/Dropdown.d.ts +2 -1
  155. package/dist/src/dropdown/Dropdown.d.ts.map +1 -1
  156. package/dist/src/ether.d.ts +0 -1
  157. package/dist/src/ether.d.ts.map +1 -1
  158. package/dist/src/form/Form.d.ts +1 -1
  159. package/dist/src/form/Form.d.ts.map +1 -1
  160. package/dist/src/generic/Generic.d.ts +4 -5
  161. package/dist/src/generic/Generic.d.ts.map +1 -1
  162. package/dist/src/hardware/device/Select.d.ts.map +1 -1
  163. package/dist/src/haul/Haul.d.ts +7 -63
  164. package/dist/src/haul/Haul.d.ts.map +1 -1
  165. package/dist/src/hooks/useResize.d.ts.map +1 -1
  166. package/dist/src/icon/Icon.d.ts.map +1 -1
  167. package/dist/src/index.d.ts +1 -0
  168. package/dist/src/index.d.ts.map +1 -1
  169. package/dist/src/input/DateTime.d.ts.map +1 -1
  170. package/dist/src/input/Item.d.ts +1 -1
  171. package/dist/src/input/Item.d.ts.map +1 -1
  172. package/dist/src/input/Text.d.ts +4 -4
  173. package/dist/src/input/Text.d.ts.map +1 -1
  174. package/dist/src/input/types.d.ts +0 -1
  175. package/dist/src/input/types.d.ts.map +1 -1
  176. package/dist/src/list/Column.d.ts +3 -3
  177. package/dist/src/list/Column.d.ts.map +1 -1
  178. package/dist/src/list/Core.d.ts +1 -1
  179. package/dist/src/list/Core.d.ts.map +1 -1
  180. package/dist/src/list/Hover.d.ts +3 -2
  181. package/dist/src/list/Hover.d.ts.map +1 -1
  182. package/dist/src/list/Item.d.ts +1 -1
  183. package/dist/src/list/Item.d.ts.map +1 -1
  184. package/dist/src/main.d.ts.map +1 -1
  185. package/dist/src/menu/ContextMenu.d.ts +5 -3
  186. package/dist/src/menu/ContextMenu.d.ts.map +1 -1
  187. package/dist/src/menu/Item.d.ts.map +1 -1
  188. package/dist/src/menu/Menu.d.ts +3 -2
  189. package/dist/src/menu/Menu.d.ts.map +1 -1
  190. package/dist/src/modal/Modal.d.ts +7 -3
  191. package/dist/src/modal/Modal.d.ts.map +1 -1
  192. package/dist/src/mosaic/Mosaic.d.ts +5 -3
  193. package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
  194. package/dist/src/mosaic/tree.d.ts +4 -3
  195. package/dist/src/mosaic/tree.d.ts.map +1 -1
  196. package/dist/src/mosaic/types.d.ts +6 -66
  197. package/dist/src/mosaic/types.d.ts.map +1 -1
  198. package/dist/src/nav/Bar.d.ts +2 -1
  199. package/dist/src/nav/Bar.d.ts.map +1 -1
  200. package/dist/src/nav/Drawer.d.ts +3 -2
  201. package/dist/src/nav/Drawer.d.ts.map +1 -1
  202. package/dist/src/notation/Select.d.ts +2 -3
  203. package/dist/src/notation/Select.d.ts.map +1 -1
  204. package/dist/src/notation/index.d.ts +1 -1
  205. package/dist/src/notation/index.d.ts.map +1 -1
  206. package/dist/src/os/Controls/Windows.d.ts +1 -1
  207. package/dist/src/os/Controls/Windows.d.ts.map +1 -1
  208. package/dist/src/os/Controls/types.d.ts +2 -0
  209. package/dist/src/os/Controls/types.d.ts.map +1 -1
  210. package/dist/src/pluto/Pluto.d.ts.map +1 -1
  211. package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
  212. package/dist/src/ranger/TimeRangeChip.d.ts +2 -1
  213. package/dist/src/ranger/TimeRangeChip.d.ts.map +1 -1
  214. package/dist/src/resize/Core.d.ts +5 -4
  215. package/dist/src/resize/Core.d.ts.map +1 -1
  216. package/dist/src/resize/Multiple.d.ts.map +1 -1
  217. package/dist/src/resize/Single.d.ts.map +1 -1
  218. package/dist/src/select/Button.d.ts.map +1 -1
  219. package/dist/src/select/List.d.ts.map +1 -1
  220. package/dist/src/select/Multiple.d.ts +2 -3
  221. package/dist/src/select/Multiple.d.ts.map +1 -1
  222. package/dist/src/state/state.d.ts +1 -2
  223. package/dist/src/state/state.d.ts.map +1 -1
  224. package/dist/src/status/Circle.d.ts.map +1 -1
  225. package/dist/src/status/Notification.d.ts.map +1 -1
  226. package/dist/src/status/aether/aggregator.d.ts +34 -96
  227. package/dist/src/status/aether/aggregator.d.ts.map +1 -1
  228. package/dist/src/status/aether/types.d.ts +23 -27
  229. package/dist/src/status/aether/types.d.ts.map +1 -1
  230. package/dist/src/status/colors.d.ts +1 -1
  231. package/dist/src/status/colors.d.ts.map +1 -1
  232. package/dist/src/synnax/Provider.d.ts +4 -0
  233. package/dist/src/synnax/Provider.d.ts.map +1 -1
  234. package/dist/src/synnax/aether/provider.d.ts +54 -388
  235. package/dist/src/synnax/aether/provider.d.ts.map +1 -1
  236. package/dist/src/table/aether/Table.d.ts +58 -418
  237. package/dist/src/table/aether/Table.d.ts.map +1 -1
  238. package/dist/src/table/cells/Cells.d.ts +38 -153
  239. package/dist/src/table/cells/Cells.d.ts.map +1 -1
  240. package/dist/src/table/cells/Forms.d.ts.map +1 -1
  241. package/dist/src/table/cells/registry.d.ts +6 -3
  242. package/dist/src/table/cells/registry.d.ts.map +1 -1
  243. package/dist/src/tabs/Selector.d.ts +5 -2
  244. package/dist/src/tabs/Selector.d.ts.map +1 -1
  245. package/dist/src/tabs/Tabs.d.ts +2 -3
  246. package/dist/src/tabs/Tabs.d.ts.map +1 -1
  247. package/dist/src/tabs/types.d.ts +5 -38
  248. package/dist/src/tabs/types.d.ts.map +1 -1
  249. package/dist/src/tag/Tag.d.ts +3 -4
  250. package/dist/src/tag/Tag.d.ts.map +1 -1
  251. package/dist/src/telem/aether/context.d.ts +8 -8
  252. package/dist/src/telem/aether/context.d.ts.map +1 -1
  253. package/dist/src/telem/aether/factory.d.ts +6 -2
  254. package/dist/src/telem/aether/factory.d.ts.map +1 -1
  255. package/dist/src/telem/aether/noop.d.ts.map +1 -1
  256. package/dist/src/telem/aether/pipeline.d.ts +25 -215
  257. package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
  258. package/dist/src/telem/aether/provider.d.ts +7 -5
  259. package/dist/src/telem/aether/provider.d.ts.map +1 -1
  260. package/dist/src/telem/aether/remote.d.ts +62 -183
  261. package/dist/src/telem/aether/remote.d.ts.map +1 -1
  262. package/dist/src/telem/aether/static.d.ts +21 -74
  263. package/dist/src/telem/aether/static.d.ts.map +1 -1
  264. package/dist/src/telem/aether/telem.d.ts +60 -284
  265. package/dist/src/telem/aether/telem.d.ts.map +1 -1
  266. package/dist/src/telem/aether/transformers.d.ts +79 -321
  267. package/dist/src/telem/aether/transformers.d.ts.map +1 -1
  268. package/dist/src/telem/client/cache/cache.d.ts +1 -1
  269. package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
  270. package/dist/src/telem/client/cache/dynamic.d.ts +5 -5
  271. package/dist/src/telem/client/cache/dynamic.d.ts.map +1 -1
  272. package/dist/src/telem/client/cache/static.d.ts +3 -3
  273. package/dist/src/telem/client/cache/static.d.ts.map +1 -1
  274. package/dist/src/telem/client/cache/unary.d.ts +3 -3
  275. package/dist/src/telem/client/cache/unary.d.ts.map +1 -1
  276. package/dist/src/telem/client/client.d.ts +8 -12
  277. package/dist/src/telem/client/client.d.ts.map +1 -1
  278. package/dist/src/telem/client/external.d.ts +0 -1
  279. package/dist/src/telem/client/external.d.ts.map +1 -1
  280. package/dist/src/telem/client/reader.d.ts +28 -10
  281. package/dist/src/telem/client/reader.d.ts.map +1 -1
  282. package/dist/src/telem/client/reader.spec.d.ts +6 -1
  283. package/dist/src/telem/client/reader.spec.d.ts.map +1 -1
  284. package/dist/src/telem/client/streamer.d.ts +6 -6
  285. package/dist/src/telem/client/streamer.d.ts.map +1 -1
  286. package/dist/src/telem/client/streamer.spec.d.ts +2 -0
  287. package/dist/src/telem/client/streamer.spec.d.ts.map +1 -0
  288. package/dist/src/telem/control/Indicator.d.ts.map +1 -1
  289. package/dist/src/telem/control/aether/chip.d.ts +44 -232
  290. package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
  291. package/dist/src/telem/control/aether/controller.d.ts +36 -73
  292. package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
  293. package/dist/src/telem/control/aether/indicator.d.ts +49 -257
  294. package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
  295. package/dist/src/telem/control/aether/legend.d.ts +18 -132
  296. package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
  297. package/dist/src/telem/control/aether/state.d.ts +10 -44
  298. package/dist/src/telem/control/aether/state.d.ts.map +1 -1
  299. package/dist/src/text/Editable.d.ts.map +1 -1
  300. package/dist/src/text/Keyboard.d.ts +1 -1
  301. package/dist/src/text/Keyboard.d.ts.map +1 -1
  302. package/dist/src/text/Text.d.ts +5 -4
  303. package/dist/src/text/Text.d.ts.map +1 -1
  304. package/dist/src/text/WithIcon.d.ts +3 -2
  305. package/dist/src/text/WithIcon.d.ts.map +1 -1
  306. package/dist/src/text/core/types.d.ts +17 -14
  307. package/dist/src/text/core/types.d.ts.map +1 -1
  308. package/dist/src/text/dimensions.d.ts +1 -0
  309. package/dist/src/text/dimensions.d.ts.map +1 -1
  310. package/dist/src/theming/Provider.d.ts.map +1 -1
  311. package/dist/src/theming/aether/provider.d.ts +899 -5915
  312. package/dist/src/theming/aether/provider.d.ts.map +1 -1
  313. package/dist/src/theming/core/fontString.d.ts.map +1 -1
  314. package/dist/src/theming/core/theme.d.ts +368 -1860
  315. package/dist/src/theming/core/theme.d.ts.map +1 -1
  316. package/dist/src/theming/css.d.ts +1 -1
  317. package/dist/src/theming/css.d.ts.map +1 -1
  318. package/dist/src/theming/static/generate.d.ts +2 -0
  319. package/dist/src/theming/static/generate.d.ts.map +1 -0
  320. package/dist/src/tooltip/Dialog.d.ts.map +1 -1
  321. package/dist/src/tree/Tree.d.ts +1 -1
  322. package/dist/src/tree/Tree.d.ts.map +1 -1
  323. package/dist/src/tree/core.d.ts +2 -2
  324. package/dist/src/tree/core.d.ts.map +1 -1
  325. package/dist/src/triggers/Provider.d.ts.map +1 -1
  326. package/dist/src/triggers/Text.d.ts.map +1 -1
  327. package/dist/src/triggers/hooks.d.ts +1 -0
  328. package/dist/src/triggers/hooks.d.ts.map +1 -1
  329. package/dist/src/triggers/triggers.d.ts +248 -9
  330. package/dist/src/triggers/triggers.d.ts.map +1 -1
  331. package/dist/src/util/component.d.ts +8 -2
  332. package/dist/src/util/component.d.ts.map +1 -1
  333. package/dist/src/viewport/use.d.ts +8 -1
  334. package/dist/src/viewport/use.d.ts.map +1 -1
  335. package/dist/src/vis/axis/axis.d.ts +17 -48
  336. package/dist/src/vis/axis/axis.d.ts.map +1 -1
  337. package/dist/src/vis/axis/canvas.d.ts +17 -20
  338. package/dist/src/vis/axis/canvas.d.ts.map +1 -1
  339. package/dist/src/vis/axis/preciseTimeScale.d.ts +1 -2
  340. package/dist/src/vis/axis/preciseTimeScale.d.ts.map +1 -1
  341. package/dist/src/vis/axis/ticks.d.ts +11 -11
  342. package/dist/src/vis/axis/ticks.d.ts.map +1 -1
  343. package/dist/src/vis/button/aether/button.d.ts +10 -80
  344. package/dist/src/vis/button/aether/button.d.ts.map +1 -1
  345. package/dist/src/vis/canvas/Canvas.d.ts +2 -2
  346. package/dist/src/vis/canvas/Canvas.d.ts.map +1 -1
  347. package/dist/src/vis/canvas/aether/canvas.d.ts +45 -193
  348. package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
  349. package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
  350. package/dist/src/vis/diagram/aether/Diagram.d.ts +62 -469
  351. package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
  352. package/dist/src/vis/diagram/aether/types.d.ts +29 -249
  353. package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
  354. package/dist/src/vis/diagram/edge/Edge.d.ts +2 -3
  355. package/dist/src/vis/diagram/edge/Edge.d.ts.map +1 -1
  356. package/dist/src/vis/diagram/edge/connector/connector.d.ts +5 -8
  357. package/dist/src/vis/diagram/edge/connector/connector.d.ts.map +1 -1
  358. package/dist/src/vis/diagram/edge/paths.d.ts +3 -4
  359. package/dist/src/vis/diagram/edge/paths.d.ts.map +1 -1
  360. package/dist/src/vis/draw2d/canvas.d.ts +21 -3
  361. package/dist/src/vis/draw2d/canvas.d.ts.map +1 -1
  362. package/dist/src/vis/draw2d/index.d.ts +18 -4
  363. package/dist/src/vis/draw2d/index.d.ts.map +1 -1
  364. package/dist/src/vis/eraser/aether/eraser.d.ts +30 -170
  365. package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
  366. package/dist/src/vis/eraser/use.d.ts +2 -2
  367. package/dist/src/vis/eraser/use.d.ts.map +1 -1
  368. package/dist/src/vis/grid/grid.d.ts +14 -24
  369. package/dist/src/vis/grid/grid.d.ts.map +1 -1
  370. package/dist/src/vis/legend/Container.d.ts +41 -85
  371. package/dist/src/vis/legend/Container.d.ts.map +1 -1
  372. package/dist/src/vis/legend/Simple.d.ts +11 -4
  373. package/dist/src/vis/legend/Simple.d.ts.map +1 -1
  374. package/dist/src/vis/light/aether/light.d.ts +10 -80
  375. package/dist/src/vis/light/aether/light.d.ts.map +1 -1
  376. package/dist/src/vis/line/aether/line.d.ts +19 -101
  377. package/dist/src/vis/line/aether/line.d.ts.map +1 -1
  378. package/dist/src/vis/lineplot/Axis.d.ts.map +1 -1
  379. package/dist/src/vis/lineplot/Legend.d.ts.map +1 -1
  380. package/dist/src/vis/lineplot/LinePlot.d.ts +2 -3
  381. package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
  382. package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts +35 -0
  383. package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts.map +1 -0
  384. package/dist/src/vis/lineplot/aether/LinePlot.d.ts +82 -489
  385. package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
  386. package/dist/src/vis/lineplot/aether/XAxis.d.ts +51 -191
  387. package/dist/src/vis/lineplot/aether/XAxis.d.ts.map +1 -1
  388. package/dist/src/vis/lineplot/aether/YAxis.d.ts +49 -194
  389. package/dist/src/vis/lineplot/aether/YAxis.d.ts.map +1 -1
  390. package/dist/src/vis/lineplot/aether/axis.d.ts +27 -98
  391. package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
  392. package/dist/src/vis/lineplot/aether/external.d.ts +1 -0
  393. package/dist/src/vis/lineplot/aether/external.d.ts.map +1 -1
  394. package/dist/src/vis/lineplot/external.d.ts +1 -0
  395. package/dist/src/vis/lineplot/external.d.ts.map +1 -1
  396. package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
  397. package/dist/src/vis/lineplot/range/aether/annotation.d.ts +15 -52
  398. package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
  399. package/dist/src/vis/lineplot/range/aether/provider.d.ts +43 -294
  400. package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
  401. package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts +17 -154
  402. package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
  403. package/dist/src/vis/lineplot/useBoundQuerier.d.ts +11 -0
  404. package/dist/src/vis/lineplot/useBoundQuerier.d.ts.map +1 -0
  405. package/dist/src/vis/log/Log.d.ts.map +1 -1
  406. package/dist/src/vis/log/aether/Log.d.ts +82 -461
  407. package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
  408. package/dist/src/vis/measure/aether/measure.d.ts +24 -249
  409. package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
  410. package/dist/src/vis/performance/Performance.d.ts +2 -0
  411. package/dist/src/vis/performance/Performance.d.ts.map +1 -0
  412. package/dist/src/vis/performance/aether/index.d.ts +2 -0
  413. package/dist/src/vis/performance/aether/index.d.ts.map +1 -0
  414. package/dist/src/vis/performance/aether/performance.d.ts +15 -0
  415. package/dist/src/vis/performance/aether/performance.d.ts.map +1 -0
  416. package/dist/src/vis/performance/index.d.ts +2 -0
  417. package/dist/src/vis/performance/index.d.ts.map +1 -0
  418. package/dist/src/vis/render/GLProgram.d.ts +1 -2
  419. package/dist/src/vis/render/GLProgram.d.ts.map +1 -1
  420. package/dist/src/vis/render/context.d.ts +1 -0
  421. package/dist/src/vis/render/context.d.ts.map +1 -1
  422. package/dist/src/vis/render/controller.d.ts +7 -12
  423. package/dist/src/vis/render/controller.d.ts.map +1 -1
  424. package/dist/src/vis/render/loop.d.ts +15 -5
  425. package/dist/src/vis/render/loop.d.ts.map +1 -1
  426. package/dist/src/vis/rule/Rule.d.ts +1 -1
  427. package/dist/src/vis/rule/Rule.d.ts.map +1 -1
  428. package/dist/src/vis/rule/aether/aether.d.ts +8 -57
  429. package/dist/src/vis/rule/aether/aether.d.ts.map +1 -1
  430. package/dist/src/vis/schematic/Forms.d.ts +7 -1
  431. package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
  432. package/dist/src/vis/schematic/Symbols.d.ts +57 -9
  433. package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
  434. package/dist/src/vis/schematic/primitives/Primitives.d.ts +68 -29
  435. package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
  436. package/dist/src/vis/schematic/registry.d.ts +96 -1
  437. package/dist/src/vis/schematic/registry.d.ts.map +1 -1
  438. package/dist/src/vis/setpoint/aether/setpoint.d.ts +16 -155
  439. package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
  440. package/dist/src/vis/text/atlas.d.ts +32 -0
  441. package/dist/src/vis/text/atlas.d.ts.map +1 -0
  442. package/dist/src/vis/text/index.d.ts +2 -0
  443. package/dist/src/vis/text/index.d.ts.map +1 -0
  444. package/dist/src/vis/toggle/aether/toggle.d.ts +16 -150
  445. package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
  446. package/dist/src/vis/value/Form.d.ts.map +1 -1
  447. package/dist/src/vis/value/aether/value.d.ts +144 -569
  448. package/dist/src/vis/value/aether/value.d.ts.map +1 -1
  449. package/dist/src/vis/value/use.d.ts +55 -199
  450. package/dist/src/vis/value/use.d.ts.map +1 -1
  451. package/dist/state-CjGemC7S.js +88 -0
  452. package/dist/state-_FFrG5nH.cjs +1 -0
  453. package/dist/tabs.cjs +1 -1
  454. package/dist/tabs.js +1 -1
  455. package/dist/text.cjs +1 -1
  456. package/dist/text.js +2 -2
  457. package/dist/theme.css +1600 -0
  458. package/dist/theming.cjs +1 -1
  459. package/dist/theming.js +2 -2
  460. package/dist/{toArray-Dvn9FA_3.js → toArray-B7nD2CTw.js} +1 -1
  461. package/dist/{toArray-DRKOku1s.cjs → toArray-BvVYuN_b.cjs} +1 -1
  462. package/dist/tree.cjs +1 -1
  463. package/dist/tree.js +1 -1
  464. package/dist/triggers.cjs +1 -1
  465. package/dist/triggers.js +1 -1
  466. package/dist/units-CKKNRQlP.cjs +1 -0
  467. package/dist/units-a8CggrTe.js +11 -0
  468. package/dist/{useClickOutside-N6MHxbOe.js → useClickOutside-CKMnqdvH.js} +20 -21
  469. package/dist/useClickOutside-CPAEkvf8.cjs +1 -0
  470. package/dist/{useDebouncedCallback-D4Ec7whQ.js → useDebouncedCallback-Cyd6pZ59.js} +1 -1
  471. package/dist/useDebouncedCallback-DsKlBI86.cjs +1 -0
  472. package/dist/{useMemoCompare-Cq_C2ddc.js → useMemoCompare-B930TM0g.js} +2 -2
  473. package/dist/useMemoCompare-DprA41gC.cjs +1 -0
  474. package/dist/{useVirtualCursorDragWebKit-BBTGd7Xe.js → useVirtualCursorDragWebKit-BrSOJpYY.js} +5 -5
  475. package/dist/useVirtualCursorDragWebKit-Cvp93Pya.cjs +1 -0
  476. package/dist/value-B7u8K1CW.cjs +57 -0
  477. package/dist/value-BdZLWVof.js +5974 -0
  478. package/dist/video.cjs +1 -1
  479. package/dist/video.js +1 -1
  480. package/package.json +22 -19
  481. package/dist/Center-bD2cOjI8.cjs +0 -1
  482. package/dist/ContextMenu-BXNN2_7t.js +0 -101
  483. package/dist/ContextMenu-CNSewKSD.cjs +0 -1
  484. package/dist/DateTime-BfnGq6C2.cjs +0 -1
  485. package/dist/Divider-CJNDIsD4.cjs +0 -22
  486. package/dist/Dropdown-CL7BefC8.cjs +0 -1
  487. package/dist/Dropdown-D-aMufnM.js +0 -261
  488. package/dist/Haul-4OcHX8__.cjs +0 -1
  489. package/dist/Item-CW2A2nuL.js +0 -108
  490. package/dist/Item-CpAZC-dF.cjs +0 -1
  491. package/dist/Keyboard-DHGtnfsf.cjs +0 -1
  492. package/dist/Pack-C4NdZWyf.cjs +0 -1
  493. package/dist/Pack-UzJJ9OhY.js +0 -46
  494. package/dist/Provider-BH1uv6QX.js +0 -436
  495. package/dist/Provider-lJARiq5i.cjs +0 -1
  496. package/dist/Space-BrQoodma.cjs +0 -1
  497. package/dist/Space-I_hidXYi.js +0 -76
  498. package/dist/Text-C-o1z9sP.js +0 -124
  499. package/dist/Text-C_j_F67Q.cjs +0 -1
  500. package/dist/Text-ClTuQXMF.cjs +0 -4
  501. package/dist/Text-DEbr1cmH.cjs +0 -1
  502. package/dist/Text-DVv04lTs.js +0 -32
  503. package/dist/Toggle-CYB9Vt6b.cjs +0 -1
  504. package/dist/Toggle-v77mEVLE.js +0 -356
  505. package/dist/WithIcon-BnDZ-Qu7.js +0 -92
  506. package/dist/WithIcon-tr8ELI3W.cjs +0 -1
  507. package/dist/aggregator-AgOKLWHz.js +0 -83
  508. package/dist/aggregator-QqWwGnYH.cjs +0 -1
  509. package/dist/css-CU7tous7.cjs +0 -1
  510. package/dist/css-rxwBYwM1.js +0 -1194
  511. package/dist/deep-DsH2ji6Z.cjs +0 -1
  512. package/dist/deep-T1-57GfG.js +0 -105
  513. package/dist/dimensions-C9PXLcE0.js +0 -18
  514. package/dist/dimensions-e5IPRZhn.cjs +0 -1
  515. package/dist/eraser-D2I1qgOg.cjs +0 -11
  516. package/dist/eraser-Dmishn8h.js +0 -823
  517. package/dist/external-B1ttDWzy.cjs +0 -1
  518. package/dist/external-BWb18P9x.cjs +0 -46
  519. package/dist/external-BdxbwUpI.js +0 -343
  520. package/dist/external-BpvGU0dZ.cjs +0 -1
  521. package/dist/external-C7Hy9XdI.js +0 -418
  522. package/dist/external-CqhOyYDl.cjs +0 -1
  523. package/dist/external-Csg4_wkz.js +0 -15
  524. package/dist/external-CwvJvXL5.cjs +0 -1
  525. package/dist/external-Cztvb3-K.cjs +0 -1
  526. package/dist/external-DMEzx_kb.cjs +0 -1
  527. package/dist/external-DkQnAvKo.cjs +0 -1
  528. package/dist/fontString-C7H8Imxd.cjs +0 -1
  529. package/dist/fontString-DdV9bi9l.js +0 -12
  530. package/dist/hooks-B7ZV7Hz6.js +0 -293
  531. package/dist/hooks-CJnV8Pt4.cjs +0 -1
  532. package/dist/provider-BrBEjlx5.cjs +0 -53
  533. package/dist/provider-Dq9t3iAH.js +0 -10312
  534. package/dist/src/color/core/color.d.ts +0 -143
  535. package/dist/src/color/core/color.d.ts.map +0 -1
  536. package/dist/src/color/core/color.spec.d.ts +0 -2
  537. package/dist/src/color/core/color.spec.d.ts.map +0 -1
  538. package/dist/src/color/core/external.d.ts +0 -5
  539. package/dist/src/color/core/external.d.ts.map +0 -1
  540. package/dist/src/color/core/gradient.d.ts +0 -58
  541. package/dist/src/color/core/gradient.d.ts.map +0 -1
  542. package/dist/src/color/core/index.d.ts +0 -2
  543. package/dist/src/color/core/index.d.ts.map +0 -1
  544. package/dist/src/color/core/palette.d.ts +0 -74
  545. package/dist/src/color/core/palette.d.ts.map +0 -1
  546. package/dist/src/color/core/transformColorsToHex.d.ts +0 -6
  547. package/dist/src/color/core/transformColorsToHex.d.ts.map +0 -1
  548. package/dist/src/notation/external.d.ts +0 -3
  549. package/dist/src/notation/external.d.ts.map +0 -1
  550. package/dist/src/notation/notation.d.ts +0 -33
  551. package/dist/src/notation/notation.d.ts.map +0 -1
  552. package/dist/src/notation/notation.spec.d.ts +0 -2
  553. package/dist/src/notation/notation.spec.d.ts.map +0 -1
  554. package/dist/src/telem/client/types.d.ts +0 -20
  555. package/dist/src/telem/client/types.d.ts.map +0 -1
  556. package/dist/state-CUPEHHgf.js +0 -2405
  557. package/dist/state-LaBGf4_k.cjs +0 -15
  558. package/dist/transformColorsToHex-B2Bui-Wf.cjs +0 -1
  559. package/dist/transformColorsToHex-B6dG2LA6.js +0 -14
  560. package/dist/units-CvIf5nF_.cjs +0 -1
  561. package/dist/units-D7qkgH-s.js +0 -8
  562. package/dist/useClickOutside-PFl3AvPU.cjs +0 -1
  563. package/dist/useDebouncedCallback-vg2DKTH7.cjs +0 -1
  564. package/dist/useMemoCompare-BGEWpAJU.cjs +0 -1
  565. package/dist/useVirtualCursorDragWebKit-Rnok8Nft.cjs +0 -1
  566. package/dist/value-C6JZdCF2.cjs +0 -57
  567. package/dist/value-Dk2DJbst.js +0 -5911
  568. /package/dist/{Pack-BbwDtaE6.cjs → Stack-BbwDtaE6.cjs} +0 -0
  569. /package/dist/{Pack-D50qN0Vu.js → Stack-D50qN0Vu.js} +0 -0
@@ -0,0 +1,1148 @@
1
+ var V = Object.defineProperty;
2
+ var $ = (h, t, e) => t in h ? V(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
3
+ var n = (h, t, e) => $(h, typeof t != "symbol" ? t + "" : t, e);
4
+ import { $ as c, s as x, J as f, _ as G, z as y, b as K, C as H } from "./css-B7c7_G5h.js";
5
+ import { z as m } from "zod";
6
+ import { h as _, j as J, Q as Z, L as Q } from "./provider-BDFfcHVT.js";
7
+ import { a as M } from "./dimensions-DcjW7X3n.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 {
14
+ constructor() {
15
+ super(...arguments);
16
+ n(this, "schema", j);
17
+ }
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({
22
+ key: "aether",
23
+ logger: new _.Logger({ filters: i })
24
+ }), e.set(A, this.internal.ins);
25
+ }
26
+ }
27
+ n(b, "TYPE", "alamos.Provider");
28
+ const tt = (h, t) => {
29
+ const e = h.get(A);
30
+ if (e == null) throw new Error("No instrumentation provider");
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
39
+ );
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");
56
+ this.wrapped = t, this.scale_ = i, this.atlasRegistry = e, this.dpr = s;
57
+ }
58
+ get fontStretch() {
59
+ return this.wrapped.fontStretch;
60
+ }
61
+ set fontStretch(t) {
62
+ this.wrapped.fontStretch = t;
63
+ }
64
+ get fontVariantCaps() {
65
+ return this.wrapped.fontVariantCaps;
66
+ }
67
+ set fontVariantCaps(t) {
68
+ this.wrapped.fontVariantCaps = t;
69
+ }
70
+ isContextLost() {
71
+ return this.wrapped.isContextLost();
72
+ }
73
+ get wordSpacing() {
74
+ return this.wrapped.wordSpacing;
75
+ }
76
+ set wordSpacing(t) {
77
+ this.wrapped.wordSpacing = t;
78
+ }
79
+ get letterSpacing() {
80
+ return this.wrapped.letterSpacing;
81
+ }
82
+ set letterSpacing(t) {
83
+ this.wrapped.letterSpacing = t;
84
+ }
85
+ get textRendering() {
86
+ return this.wrapped.textRendering;
87
+ }
88
+ set textRendering(t) {
89
+ this.wrapped.textRendering = t;
90
+ }
91
+ reset() {
92
+ this.wrapped.reset();
93
+ }
94
+ applyScale(t) {
95
+ return new R(
96
+ this,
97
+ this.atlasRegistry,
98
+ this.dpr,
99
+ t
100
+ );
101
+ }
102
+ get canvas() {
103
+ return this.wrapped.canvas;
104
+ }
105
+ get miterLimit() {
106
+ return this.cachedMiterLimit ?? this.wrapped.miterLimit;
107
+ }
108
+ set miterLimit(t) {
109
+ const e = this.scale_.x.dim(t);
110
+ e !== this.cachedMiterLimit && (this.cachedMiterLimit = e, this.wrapped.miterLimit = e);
111
+ }
112
+ get globalAlpha() {
113
+ return this.cachedGlobalAlpha ?? this.wrapped.globalAlpha;
114
+ }
115
+ set globalAlpha(t) {
116
+ t !== this.cachedGlobalAlpha && (this.cachedGlobalAlpha = t, this.wrapped.globalAlpha = t);
117
+ }
118
+ get globalCompositeOperation() {
119
+ return this.wrapped.globalCompositeOperation;
120
+ }
121
+ set globalCompositeOperation(t) {
122
+ this.wrapped.globalCompositeOperation = t;
123
+ }
124
+ get fillStyle() {
125
+ return this.cachedFillStyle ?? this.wrapped.fillStyle;
126
+ }
127
+ set fillStyle(t) {
128
+ t !== this.cachedFillStyle && (this.cachedFillStyle = t, this.wrapped.fillStyle = t);
129
+ }
130
+ get strokeStyle() {
131
+ return this.cachedStrokeStyle ?? this.wrapped.strokeStyle;
132
+ }
133
+ set strokeStyle(t) {
134
+ t !== this.cachedStrokeStyle && (this.cachedStrokeStyle = t, this.wrapped.strokeStyle = t);
135
+ }
136
+ drawImage(t, e, s, i, r, a, l, p, d) {
137
+ this.wrapped.drawImage(
138
+ t,
139
+ e,
140
+ s,
141
+ i,
142
+ 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,
146
+ d != null ? this.scale_.y.dim(d) : d
147
+ );
148
+ }
149
+ beginPath() {
150
+ this.wrapped.beginPath();
151
+ }
152
+ clip(t, e) {
153
+ this.wrapped.clip(t, e);
154
+ }
155
+ fill(t, e) {
156
+ if (t == null) return this.wrapped.fill();
157
+ this.wrapped.fill(t, e);
158
+ }
159
+ isPointInPath(t, e, s, i) {
160
+ return this.wrapped.isPointInPath(t, e, s, i);
161
+ }
162
+ isPointInStroke(t, e, s) {
163
+ return this.wrapped.isPointInStroke(t, e, s);
164
+ }
165
+ stroke(t) {
166
+ if (t == null) return this.wrapped.stroke();
167
+ this.wrapped.stroke(t);
168
+ }
169
+ createConicGradient(t, e, s) {
170
+ return this.wrapped.createConicGradient(t, e, s);
171
+ }
172
+ createLinearGradient(t, e, s, i) {
173
+ return this.wrapped.createLinearGradient(t, e, s, i);
174
+ }
175
+ createPattern(t, e) {
176
+ return this.wrapped.createPattern(t, e);
177
+ }
178
+ createRadialGradient(t, e, s, i, r, a) {
179
+ return this.wrapped.createRadialGradient(t, e, s, i, r, a);
180
+ }
181
+ get filter() {
182
+ return this.wrapped.filter;
183
+ }
184
+ set filter(t) {
185
+ this.wrapped.filter = t;
186
+ }
187
+ createImageData(t, e, s) {
188
+ return this.wrapped.createImageData(t, e, s);
189
+ }
190
+ getImageData(t, e, s, i, r) {
191
+ return this.wrapped.getImageData(t, e, s, i, r);
192
+ }
193
+ putImageData(t, e, s, i, r, a, l) {
194
+ this.wrapped.putImageData(
195
+ // @ts-expect-error - typescript overloads cause issues here
196
+ t,
197
+ e,
198
+ s,
199
+ i,
200
+ r,
201
+ a,
202
+ l
203
+ );
204
+ }
205
+ get imageSmoothingEnabled() {
206
+ return this.wrapped.imageSmoothingEnabled;
207
+ }
208
+ set imageSmoothingEnabled(t) {
209
+ this.wrapped.imageSmoothingEnabled = t;
210
+ }
211
+ get imageSmoothingQuality() {
212
+ return this.wrapped.imageSmoothingQuality;
213
+ }
214
+ set imageSmoothingQuality(t) {
215
+ this.wrapped.imageSmoothingQuality = t;
216
+ }
217
+ arc(t, e, s, i, r, a) {
218
+ this.wrapped.arc(
219
+ this.scale_.x.pos(t),
220
+ this.scale_.y.pos(e),
221
+ this.scale_.x.dim(s),
222
+ i,
223
+ r,
224
+ a
225
+ );
226
+ }
227
+ arcTo(t, e, s, i, r) {
228
+ this.wrapped.arcTo(
229
+ this.scale_.x.pos(t),
230
+ this.scale_.y.pos(e),
231
+ this.scale_.x.pos(s),
232
+ this.scale_.y.pos(i),
233
+ this.scale_.x.dim(r)
234
+ );
235
+ }
236
+ bezierCurveTo(t, e, s, i, r, a) {
237
+ this.wrapped.bezierCurveTo(
238
+ this.scale_.x.pos(t),
239
+ this.scale_.y.pos(e),
240
+ this.scale_.x.pos(s),
241
+ this.scale_.y.pos(i),
242
+ this.scale_.x.pos(r),
243
+ this.scale_.y.pos(a)
244
+ );
245
+ }
246
+ closePath() {
247
+ this.wrapped.closePath();
248
+ }
249
+ ellipse(t, e, s, i, r, a, l, p) {
250
+ this.wrapped.ellipse(
251
+ this.scale_.x.pos(t),
252
+ this.scale_.y.pos(e),
253
+ this.scale_.x.dim(s),
254
+ this.scale_.y.dim(i),
255
+ r,
256
+ a,
257
+ l,
258
+ p
259
+ );
260
+ }
261
+ lineTo(t, e) {
262
+ this.wrapped.lineTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
263
+ }
264
+ moveTo(t, e) {
265
+ this.wrapped.moveTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
266
+ }
267
+ quadraticCurveTo(t, e, s, i) {
268
+ this.wrapped.quadraticCurveTo(
269
+ this.scale_.x.pos(t),
270
+ this.scale_.y.pos(e),
271
+ this.scale_.x.pos(s),
272
+ this.scale_.y.pos(i)
273
+ );
274
+ }
275
+ rect(t, e, s, i) {
276
+ this.wrapped.rect(
277
+ this.scale_.x.pos(t),
278
+ this.scale_.y.pos(e),
279
+ this.scale_.x.dim(s),
280
+ this.scale_.y.dim(i)
281
+ );
282
+ }
283
+ roundRect(t, e, s, i, r) {
284
+ this.wrapped.roundRect(
285
+ this.scale_.x.pos(t),
286
+ this.scale_.y.pos(e),
287
+ this.scale_.x.dim(s),
288
+ this.scale_.y.dim(i),
289
+ typeof r == "number" ? this.scale_.x.dim(r) : r
290
+ );
291
+ }
292
+ get lineCap() {
293
+ return this.cachedLineCap ?? this.wrapped.lineCap;
294
+ }
295
+ set lineCap(t) {
296
+ t !== this.cachedLineCap && (this.cachedLineCap = t, this.wrapped.lineCap = t);
297
+ }
298
+ get lineDashOffset() {
299
+ return this.wrapped.lineDashOffset;
300
+ }
301
+ set lineDashOffset(t) {
302
+ this.wrapped.lineDashOffset = this.scale_.x.dim(t);
303
+ }
304
+ get lineJoin() {
305
+ return this.cachedLineJoin ?? this.wrapped.lineJoin;
306
+ }
307
+ set lineJoin(t) {
308
+ t !== this.cachedLineJoin && (this.cachedLineJoin = t, this.wrapped.lineJoin = t);
309
+ }
310
+ get lineWidth() {
311
+ return this.cachedLineWidth ?? this.wrapped.lineWidth;
312
+ }
313
+ set lineWidth(t) {
314
+ const e = this.scale_.x.dim(t);
315
+ e !== this.cachedLineWidth && (this.cachedLineWidth = e, this.wrapped.lineWidth = e);
316
+ }
317
+ getLineDash() {
318
+ return this.wrapped.getLineDash();
319
+ }
320
+ setLineDash(t) {
321
+ const e = Array.from(t).map((s) => this.scale_.x.dim(s));
322
+ this.wrapped.setLineDash(e);
323
+ }
324
+ clearRect(t, e, s, i) {
325
+ this.wrapped.clearRect(t, e, s, i);
326
+ }
327
+ fillRect(t, e, s, i) {
328
+ this.wrapped.fillRect(
329
+ this.scale_.x.pos(t),
330
+ this.scale_.y.pos(e),
331
+ this.scale_.x.dim(s),
332
+ this.scale_.y.dim(i)
333
+ );
334
+ }
335
+ strokeRect(t, e, s, i) {
336
+ this.wrapped.strokeRect(
337
+ this.scale_.x.pos(t),
338
+ this.scale_.y.pos(e),
339
+ this.scale_.x.dim(s),
340
+ this.scale_.y.dim(i)
341
+ );
342
+ }
343
+ get shadowBlur() {
344
+ return this.wrapped.shadowBlur;
345
+ }
346
+ set shadowBlur(t) {
347
+ this.wrapped.shadowBlur = t;
348
+ }
349
+ get shadowColor() {
350
+ return this.wrapped.shadowColor;
351
+ }
352
+ set shadowColor(t) {
353
+ this.wrapped.shadowColor = t;
354
+ }
355
+ get shadowOffsetX() {
356
+ return this.wrapped.shadowOffsetX;
357
+ }
358
+ set shadowOffsetX(t) {
359
+ this.wrapped.shadowOffsetX = t;
360
+ }
361
+ get shadowOffsetY() {
362
+ return this.wrapped.shadowOffsetY;
363
+ }
364
+ restore() {
365
+ 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();
366
+ }
367
+ save() {
368
+ this.wrapped.save();
369
+ }
370
+ 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);
378
+ return;
379
+ }
380
+ this.wrapped.fillText(
381
+ t,
382
+ this.scale_.x.pos(e),
383
+ this.scale_.y.pos(s),
384
+ i != null ? this.scale_.x.dim(i) : void 0
385
+ );
386
+ }
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
+ measureText(t) {
395
+ return this.wrapped.measureText(t);
396
+ }
397
+ textDimensions(t, e = {}) {
398
+ const { useAtlas: s } = e;
399
+ let i;
400
+ return s ? i = this.atlasMeasureText(t) : i = M(this.measureText(t)), i;
401
+ }
402
+ strokeText(t, e, s, i) {
403
+ this.wrapped.strokeText(
404
+ t,
405
+ this.scale_.x.pos(e),
406
+ this.scale_.y.pos(s),
407
+ i != null ? this.scale_.x.dim(i) : void 0
408
+ );
409
+ }
410
+ get direction() {
411
+ return this.wrapped.direction;
412
+ }
413
+ set direction(t) {
414
+ this.wrapped.direction = t;
415
+ }
416
+ get font() {
417
+ return this.cachedFont != null ? this.cachedFont : this.wrapped.font;
418
+ }
419
+ set font(t) {
420
+ t !== this.cachedFont && (this.cachedFont = t, this.wrapped.font = this.cachedFont);
421
+ }
422
+ get fontKerning() {
423
+ return this.wrapped.fontKerning;
424
+ }
425
+ set fontKerning(t) {
426
+ this.wrapped.fontKerning = t;
427
+ }
428
+ get textAlign() {
429
+ return this.cachedTextAlign ?? this.wrapped.textAlign;
430
+ }
431
+ set textAlign(t) {
432
+ t !== this.cachedTextAlign && (this.cachedTextAlign = t, this.wrapped.textAlign = t);
433
+ }
434
+ get textBaseline() {
435
+ return this.cachedTextBaseline ?? this.wrapped.textBaseline;
436
+ }
437
+ set textBaseline(t) {
438
+ t !== this.cachedTextBaseline && (this.cachedTextBaseline = t, this.wrapped.textBaseline = t);
439
+ }
440
+ getTransform() {
441
+ return this.wrapped.getTransform();
442
+ }
443
+ resetTransform() {
444
+ this.wrapped.resetTransform();
445
+ }
446
+ rotate(t) {
447
+ this.wrapped.rotate(t);
448
+ }
449
+ scale(t, e) {
450
+ this.wrapped.scale(t, e), this.dpr = t;
451
+ }
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();
455
+ }
456
+ setTransform(t, e, s, i, r, a) {
457
+ this.wrapped.setTransform(t, e, s, i, r, a);
458
+ }
459
+ transform(t, e, s, i, r, a) {
460
+ this.wrapped.transform(t, e, s, i, r, a);
461
+ }
462
+ translate(t, e) {
463
+ this.wrapped.translate(t, e);
464
+ }
465
+ }
466
+ class et {
467
+ constructor(t = x.XY.IDENTITY, e) {
468
+ n(this, "scale_");
469
+ n(this, "path");
470
+ this.scale_ = t, e instanceof Path2D || typeof e == "string" ? this.path = new Path2D(e) : this.path = new Path2D();
471
+ }
472
+ addPath(t, e) {
473
+ this.path.addPath(t, e);
474
+ }
475
+ arc(t, e, s, i, r, a) {
476
+ this.path.arc(
477
+ this.scale_.x.pos(t),
478
+ this.scale_.y.pos(e),
479
+ this.scale_.x.dim(s),
480
+ i,
481
+ r,
482
+ a
483
+ );
484
+ }
485
+ arcTo(t, e, s, i, r) {
486
+ this.path.arcTo(
487
+ this.scale_.x.pos(t),
488
+ this.scale_.y.pos(e),
489
+ this.scale_.x.pos(s),
490
+ this.scale_.y.pos(i),
491
+ this.scale_.x.dim(r)
492
+ );
493
+ }
494
+ bezierCurveTo(t, e, s, i, r, a) {
495
+ this.path.bezierCurveTo(
496
+ this.scale_.x.pos(t),
497
+ this.scale_.y.pos(e),
498
+ this.scale_.x.pos(s),
499
+ this.scale_.y.pos(i),
500
+ this.scale_.x.pos(r),
501
+ this.scale_.y.pos(a)
502
+ );
503
+ }
504
+ closePath() {
505
+ this.path.closePath();
506
+ }
507
+ ellipse(t, e, s, i, r, a, l, p) {
508
+ this.path.ellipse(
509
+ this.scale_.x.pos(t),
510
+ this.scale_.y.pos(e),
511
+ this.scale_.x.dim(s),
512
+ this.scale_.y.dim(i),
513
+ r,
514
+ a,
515
+ l,
516
+ p
517
+ );
518
+ }
519
+ lineTo(t, e) {
520
+ this.path.lineTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
521
+ }
522
+ moveTo(t, e) {
523
+ this.path.moveTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
524
+ }
525
+ quadraticCurveTo(t, e, s, i) {
526
+ this.path.quadraticCurveTo(
527
+ this.scale_.x.pos(t),
528
+ this.scale_.y.pos(e),
529
+ this.scale_.x.pos(s),
530
+ this.scale_.y.pos(i)
531
+ );
532
+ }
533
+ rect(t, e, s, i) {
534
+ this.path.rect(
535
+ this.scale_.x.pos(t),
536
+ this.scale_.y.pos(e),
537
+ this.scale_.x.dim(s),
538
+ this.scale_.y.dim(i)
539
+ );
540
+ }
541
+ roundRect(t, e, s, i, r) {
542
+ const a = this.scaleRadii(r);
543
+ this.path.roundRect(
544
+ this.scale_.x.pos(t),
545
+ this.scale_.y.pos(e),
546
+ this.scale_.x.dim(s),
547
+ this.scale_.y.dim(i),
548
+ a
549
+ );
550
+ }
551
+ // Helper method to scale radii for roundRect
552
+ scaleRadii(t) {
553
+ return t == null ? t : typeof t == "number" ? this.scale_.x.dim(t) : Array.isArray(t) ? t.map((e) => this.scaleRadius(e)) : this.scaleRadius(t);
554
+ }
555
+ scaleRadius(t) {
556
+ return typeof t == "number" ? this.scale_.x.dim(t) : {
557
+ x: this.scale_.x.dim(t.x ?? 0),
558
+ y: this.scale_.y.dim(t.y ?? 0)
559
+ };
560
+ }
561
+ // Method to retrieve the underlying Path2D
562
+ getPath() {
563
+ return this.path;
564
+ }
565
+ }
566
+ const st = `precision mediump float;
567
+
568
+ void main(void) {
569
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
570
+ }
571
+ `, it = `attribute vec4 a_position;
572
+
573
+ void main(void) {
574
+ gl_Position = a_position;
575
+ }
576
+ `, k = (h) => new Error(`failed to compile webgl program: ${h}`), rt = new Error("null shader encountered");
577
+ let at = class {
578
+ /**
579
+ * @constructor compiles the given vertex and fragment shaders under the given
580
+ * render context into a program.
581
+ *
582
+ * @param ctx - The render context to use.
583
+ * @param vertShader - The vertex shader code.
584
+ * @param fragShader - The fragment shader code.
585
+ */
586
+ constructor(t, e, s) {
587
+ /** The render context used by this program. */
588
+ n(this, "renderCtx");
589
+ /** The underlying webgl program. */
590
+ n(this, "prog");
591
+ /** The code for the vertex shader. */
592
+ n(this, "vertShader");
593
+ /** The code for the fragment shader. */
594
+ n(this, "fragShader");
595
+ n(this, "uniformLocCache", /* @__PURE__ */ new Map());
596
+ this.renderCtx = t;
597
+ const i = t.gl.createProgram();
598
+ if (i == null) throw k("failed to create program");
599
+ this.prog = i, this.vertShader = e, this.fragShader = s, this.compile();
600
+ }
601
+ /** Sets the current program as the active program used by the context. */
602
+ setAsActive() {
603
+ return this.renderCtx.gl.useProgram(this.prog), () => this.renderCtx.gl.useProgram(null);
604
+ }
605
+ /**
606
+ * Sets a uniform XY coordinate value.
607
+ *
608
+ * @param name - The name of the uniform.
609
+ * @param value - The value to set.
610
+ */
611
+ uniformXY(t, e) {
612
+ this.renderCtx.gl.uniform2fv(this.getUniformLoc(t), f.couple(e));
613
+ }
614
+ /**
615
+ * Sets a uniform color value.
616
+ *
617
+ * @param name - The name of the uniform.
618
+ * @param value - The value to set.
619
+ */
620
+ uniformColor(t, e) {
621
+ this.renderCtx.gl.uniform4fv(this.getUniformLoc(t), y.rgba1(e));
622
+ }
623
+ getUniformLoc(t) {
624
+ const e = this.uniformLocCache.get(t);
625
+ if (e != null) return e;
626
+ const s = this.renderCtx.gl.getUniformLocation(this.prog, t);
627
+ if (s == null) throw new Error(`unexpected missing uniform ${t}`);
628
+ return this.uniformLocCache.set(t, s), s;
629
+ }
630
+ compile() {
631
+ const t = this.renderCtx.gl;
632
+ this.compileShader(this.vertShader, t.VERTEX_SHADER), this.compileShader(this.fragShader, t.FRAGMENT_SHADER), t.linkProgram(this.prog);
633
+ }
634
+ compileShader(t, e) {
635
+ const s = this.renderCtx.gl, i = s.createShader(e);
636
+ if (i == null) throw rt;
637
+ 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");
640
+ }
641
+ s.attachShader(this.prog, i);
642
+ }
643
+ };
644
+ const nt = new Float32Array([0, 0, 0, 0, 0, 0]);
645
+ class ht extends at {
646
+ constructor(e) {
647
+ super(e, it, st);
648
+ n(this, "positionBuffer");
649
+ 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);
652
+ }
653
+ exec() {
654
+ const { gl: e } = this.renderCtx, s = e.getAttribLocation(this.prog, "a_position");
655
+ e.bindBuffer(e.ARRAY_BUFFER, this.positionBuffer);
656
+ const i = e.createVertexArray();
657
+ e.bindVertexArray(i), e.enableVertexAttribArray(s), e.vertexAttribPointer(s, 2, e.FLOAT, !1, 0, 0), this.setAsActive(), e.drawArrays(e.TRIANGLES, 0, 3);
658
+ }
659
+ }
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 {
834
+ constructor({
835
+ afterRender: t,
836
+ instrumentation: e = _.Instrumentation.NOOP
837
+ }) {
838
+ /** To lock things so renders don't collide */
839
+ n(this, "mutex", new ut());
840
+ /** Stores the current requests for rendering. */
841
+ n(this, "requests", /* @__PURE__ */ new Map());
842
+ /** Stores render cleanup functions for clearing canvases and other resources. */
843
+ n(this, "cleanup", /* @__PURE__ */ new Map());
844
+ /** A callback to run after each render call. */
845
+ n(this, "afterRender");
846
+ /** 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();
851
+ }
852
+ /**
853
+ * Sets a new request in the queue according to a set of rules:
854
+ *
855
+ * 1. If no request with the same key exists, add the request to the queue.
856
+ * 2. If a request with the same key exists, replace it if the new request has a
857
+ * greater or equal priority and a greater or equal number of canvases that are
858
+ * being rendered to.
859
+ *
860
+ * @param req - The request to set.
861
+ */
862
+ set(t) {
863
+ const e = this.requests.get(t.key);
864
+ if (e == null) this.requests.set(t.key, t);
865
+ else {
866
+ const s = F[t.priority] >= F[e.priority], i = t.canvases.length >= e.canvases.length;
867
+ s && i && this.requests.set(t.key, t);
868
+ }
869
+ }
870
+ /** Execute the render. */
871
+ render() {
872
+ var r;
873
+ 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);
879
+ }
880
+ runCleanupsSync() {
881
+ const { cleanup: t, requests: e } = this;
882
+ t.forEach((s, i) => {
883
+ const r = e.get(i);
884
+ r != null && (s(r), t.delete(i));
885
+ });
886
+ }
887
+ renderSync() {
888
+ const { requests: t } = this;
889
+ t.forEach((e) => {
890
+ try {
891
+ const s = e.render();
892
+ s != null && this.cleanup.set(e.key, s);
893
+ } catch (s) {
894
+ console.error(s);
895
+ }
896
+ });
897
+ }
898
+ /** Starts the rendering loop. */
899
+ async start() {
900
+ const t = () => {
901
+ try {
902
+ this.render();
903
+ } catch (e) {
904
+ console.error(e);
905
+ }
906
+ requestAnimationFrame(t);
907
+ };
908
+ requestAnimationFrame(t);
909
+ }
910
+ }
911
+ const T = 2, v = class v {
912
+ constructor(t) {
913
+ // A canvas buffer that holds rendered characters.
914
+ n(this, "atlas");
915
+ // Cached dimensions of a character.
916
+ n(this, "charDims");
917
+ // The device pixel ratio of the atlas.
918
+ n(this, "dpr");
919
+ // 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);
928
+ this.atlas = new OffscreenCanvas(
929
+ u * S * this.dpr,
930
+ C * (W + 1) * this.dpr
931
+ );
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), z = U * u, X = (N + 1) * C;
935
+ w.fillText(I, z, X), this.charMap.set(I, L);
936
+ });
937
+ }
938
+ 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);
944
+ t.drawImage(
945
+ 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,
952
+ r,
953
+ a
954
+ );
955
+ }
956
+ }
957
+ measureText(t) {
958
+ return { width: t.length * this.charDims.width, height: this.charDims.height };
959
+ }
960
+ };
961
+ // The default characters to include in the atlas.
962
+ n(v, "DEFAULT_CHARS", "0123456789.:-umsNa∞ᴇ");
963
+ let O = v;
964
+ class gt {
965
+ constructor() {
966
+ n(this, "atlases");
967
+ this.atlases = /* @__PURE__ */ new Map();
968
+ }
969
+ /**
970
+ * @returns at atlas from the registry compatible with the given props. If the
971
+ * atlas does not exist in the registry, it is created and added to the registry.
972
+ */
973
+ get(t) {
974
+ const e = `${t.font}-${y.hex(t.textColor)}-${t.dpr}-${t.characters}`;
975
+ if (this.atlases.has(e)) return this.atlases.get(e);
976
+ const s = new O(t);
977
+ return this.atlases.set(e, s), s;
978
+ }
979
+ }
980
+ const q = (h) => (h.textRendering = "optimizeSpeed", h.imageSmoothingEnabled = !1, h), g = class g {
981
+ constructor(t, e, s, i, r) {
982
+ /* The canvas element used by WebGL. */
983
+ n(this, "glCanvas");
984
+ /** The canvas element used by the 2D canvas. */
985
+ n(this, "upper2dCanvas");
986
+ /** The canvas element used by the 2D canvas. */
987
+ n(this, "lower2dCanvas");
988
+ /** The WebGL rendering context. */
989
+ n(this, "gl");
990
+ /** A 2D canvas that sits below the WebGL canvas. */
991
+ n(this, "lower2d");
992
+ /** A 2D canvas that sits above the WebGL canvas. */
993
+ n(this, "upper2d");
994
+ /** The region the canvas occupies in pixel space */
995
+ n(this, "region");
996
+ /** The device pixel ratio of the canvas */
997
+ n(this, "dpr");
998
+ /** queue render transitions onto the stack */
999
+ n(this, "loop");
1000
+ /** See the @link{clear.Program} for why this is necessary. */
1001
+ n(this, "clearProgram");
1002
+ n(this, "os");
1003
+ n(this, "instrumentation");
1004
+ 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)
1010
+ );
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)
1015
+ );
1016
+ const d = {
1017
+ preserveDrawingBuffer: !0,
1018
+ powerPreference: "high-performance",
1019
+ stencil: !1,
1020
+ 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 = () => {
1025
+ this.gl.flush(), this.gl.finish();
1026
+ };
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));
1031
+ }
1032
+ static create(t, e, s, i, r) {
1033
+ const a = tt(t, "render_context"), l = new g(
1034
+ e,
1035
+ s,
1036
+ i,
1037
+ r,
1038
+ a
1039
+ );
1040
+ return t.set(g.CONTEXT_KEY, l), l;
1041
+ }
1042
+ static useOptional(t) {
1043
+ return t.getOptional(g.CONTEXT_KEY);
1044
+ }
1045
+ static use(t) {
1046
+ return t.get(g.CONTEXT_KEY);
1047
+ }
1048
+ update(t) {
1049
+ t.set(g.CONTEXT_KEY, this);
1050
+ }
1051
+ /**
1052
+ * Resizes the canvas to the given region and device pixel ratio. Ensuring
1053
+ * that all drawing operations and viewports are scaled correctly.
1054
+ */
1055
+ 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));
1057
+ }
1058
+ resizeCanvas(t) {
1059
+ t.width = c.width(this.region) * this.dpr, t.height = c.height(this.region) * this.dpr;
1060
+ }
1061
+ /** @returns the aspect ratio of the canvas. */
1062
+ get aspect() {
1063
+ return c.aspect(this.region);
1064
+ }
1065
+ /**
1066
+ * Takes the given box in PIXEL space and produces a transform
1067
+ * in CLIP space representing the sub-region represented by the box
1068
+ * in the canvas.
1069
+ */
1070
+ scaleRegion(t) {
1071
+ return new x.XY(
1072
+ // 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),
1074
+ // 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()
1076
+ );
1077
+ }
1078
+ scissor(t, e = f.ZERO, s) {
1079
+ const i = [];
1080
+ 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
+ }
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
1088
+ ), () => this.gl.disable(this.gl.SCISSOR_TEST);
1089
+ }
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);
1092
+ }
1093
+ eraseGL(t, e = f.ZERO) {
1094
+ var r;
1095
+ const { gl: s } = this, i = this.scissorGL(E(t, e));
1096
+ s.clearColor(...y.rgba1(y.ZERO)), s.clear(s.COLOR_BUFFER_BIT), this.os === "Windows" && ((r = this.clearProgram) == null || r.exec()), i();
1097
+ }
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)));
1101
+ }
1102
+ };
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 {
1110
+ constructor() {
1111
+ super(...arguments);
1112
+ n(this, "schema", wt);
1113
+ }
1114
+ afterUpdate(e) {
1115
+ this.deleted || (this.internal.renderCtx = D.use(e), this.renderOnLifecycleChange());
1116
+ }
1117
+ afterDelete() {
1118
+ this.renderOnLifecycleChange();
1119
+ }
1120
+ renderOnLifecycleChange() {
1121
+ this.internal.renderCtx.loop.set({
1122
+ key: `${this.type}-${this.key}`,
1123
+ render: this.render.bind(this),
1124
+ priority: "high",
1125
+ canvases: B
1126
+ });
1127
+ }
1128
+ render() {
1129
+ this.deleted || !this.state.enabled || this.internal.renderCtx.erase(this.state.region, f.construct(0), ...B);
1130
+ }
1131
+ }
1132
+ n(P, "TYPE", "eraser");
1133
+ const Et = {
1134
+ [P.TYPE]: P
1135
+ };
1136
+ export {
1137
+ D as C,
1138
+ 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
1148
+ };