@synnaxlabs/pluto 0.40.1 → 0.41.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 (352) hide show
  1. package/dist/{Center-CFEPOi_x.js → Center-Dr9Np3yZ.js} +3 -3
  2. package/dist/Center-sJghNsrv.cjs +1 -0
  3. package/dist/ContextMenu-DCxj35_j.cjs +1 -0
  4. package/dist/ContextMenu-GUed89mt.js +96 -0
  5. package/dist/DateTime-D6J8sRSH.cjs +1 -0
  6. package/dist/{DateTime-Djw6pb3W.js → DateTime-DEbT6v4l.js} +2 -2
  7. package/dist/{Divider-CMyzWvRC.js → Divider-Bpe7zJig.js} +585 -506
  8. package/dist/Divider-CloQr3vQ.cjs +22 -0
  9. package/dist/Dropdown-4Cti-bbQ.js +328 -0
  10. package/dist/Dropdown-C7Im-qW-.cjs +1 -0
  11. package/dist/{Haul-CaLW9ULm.js → Haul-Bw54Yj6J.js} +9 -9
  12. package/dist/{Haul-4OcHX8__.cjs → Haul-hv7TLQ7N.cjs} +1 -1
  13. package/dist/Item-9WCCzBv2.js +110 -0
  14. package/dist/Item-piF6rFAm.cjs +1 -0
  15. package/dist/{Keyboard--YA9DHRz.js → Keyboard-634856lT.js} +11 -9
  16. package/dist/Keyboard-CZFi6COK.cjs +1 -0
  17. package/dist/{Link-BT_Kwmlr.js → Link-BEheZd26.js} +1 -1
  18. package/dist/{Link-Bhto2KVL.cjs → Link-fkoogssj.cjs} +1 -1
  19. package/dist/Pack-D6Z6WuZl.cjs +1 -0
  20. package/dist/Pack-DhZO_rza.js +48 -0
  21. package/dist/Provider-DNTq46b0.cjs +1 -0
  22. package/dist/Provider-UAXPVomG.js +452 -0
  23. package/dist/Space-BtaH1buB.cjs +1 -0
  24. package/dist/Space-DunsWl06.js +100 -0
  25. package/dist/{Text-B7AC8Z1e.js → Text-3PiRcn8q.js} +313 -299
  26. package/dist/Text-BTEov6di.cjs +1 -0
  27. package/dist/Text-CaRMYy3U.js +135 -0
  28. package/dist/Text-DNspRcte.js +36 -0
  29. package/dist/Text-DylGoRKw.cjs +4 -0
  30. package/dist/Text-X_BHez8W.cjs +1 -0
  31. package/dist/Toggle-BKKBcuTj.cjs +1 -0
  32. package/dist/Toggle-CZd8L4GI.js +379 -0
  33. package/dist/{Video-TjJf_tXI.js → Video-4XQ1qozd.js} +1 -1
  34. package/dist/{Video-hdvNT3La.cjs → Video-BM9uJLaQ.cjs} +1 -1
  35. package/dist/WithIcon-CC-RSx6r.js +93 -0
  36. package/dist/WithIcon-Dn8eAoMj.cjs +1 -0
  37. package/dist/{aggregator-QqWwGnYH.cjs → aggregator-74jWxDne.cjs} +1 -1
  38. package/dist/{aggregator-AgOKLWHz.js → aggregator-DMvP8cai.js} +6 -6
  39. package/dist/align.cjs +1 -1
  40. package/dist/align.js +1 -1
  41. package/dist/button.cjs +1 -1
  42. package/dist/button.js +1 -1
  43. package/dist/color.cjs +1 -1
  44. package/dist/color.js +1 -1
  45. package/dist/css-Cj2UCGXB.cjs +1 -0
  46. package/dist/{css-rxwBYwM1.js → css-Dyt-QnKy.js} +467 -462
  47. package/dist/css.cjs +1 -1
  48. package/dist/css.js +2 -2
  49. package/dist/{deep-T1-57GfG.js → deep-Cvb4bVYY.js} +1 -1
  50. package/dist/{deep-DsH2ji6Z.cjs → deep-ICSlPm58.cjs} +1 -1
  51. package/dist/{dimensions-C9PXLcE0.js → dimensions-Cc0z-IDd.js} +1 -1
  52. package/dist/dimensions-Djqdrqi0.cjs +1 -0
  53. package/dist/dropdown.cjs +1 -1
  54. package/dist/dropdown.js +1 -1
  55. package/dist/{eraser-D2I1qgOg.cjs → eraser-9-LOWZvk.cjs} +3 -3
  56. package/dist/{eraser-Dmishn8h.js → eraser-BjtEI-1I.js} +10 -10
  57. package/dist/ether.cjs +1 -1
  58. package/dist/ether.js +32 -31
  59. package/dist/{external-Cs8oKwvw.cjs → external-B-Cao-ae.cjs} +1 -1
  60. package/dist/external-B-UNCzPY.cjs +1 -0
  61. package/dist/external-B18FBGpk.cjs +1 -0
  62. package/dist/{external-upiAayc4.js → external-BCUxzSzk.js} +32 -31
  63. package/dist/{external-DCflyFdb.js → external-BFOrrNde.js} +3 -3
  64. package/dist/external-BG1mV1W8.cjs +1 -0
  65. package/dist/{external-_b4lTCfZ.js → external-BIwhkj24.js} +455 -453
  66. package/dist/external-BWeX0nyq.js +399 -0
  67. package/dist/{external-CcIx4j5m.js → external-BY2AjzRx.js} +10 -10
  68. package/dist/external-BbmpRAH3.cjs +1 -0
  69. package/dist/{external-JNlv7kxI.js → external-BbrPEGJw.js} +2 -2
  70. package/dist/external-BlUic3Vz.js +29 -0
  71. package/dist/{external-C3e9emVy.js → external-C0ZRdtdj.js} +21 -20
  72. package/dist/{external-D12g_huj.js → external-CH66YjTZ.js} +18 -17
  73. package/dist/{external-DTjOTICM.js → external-CVGidiDt.js} +2 -2
  74. package/dist/{external-D_21zZAf.cjs → external-CnxSp7fm.cjs} +1 -1
  75. package/dist/{external-BWb18P9x.cjs → external-D2vS6j9c.cjs} +2 -2
  76. package/dist/external-DHmQqAfL.js +435 -0
  77. package/dist/{external-B9nbHICv.js → external-DNF8yEwq.js} +3261 -3282
  78. package/dist/{external-DkQnAvKo.cjs → external-DRGfSFQT.cjs} +1 -1
  79. package/dist/{external-dLVcM8tt.cjs → external-DVajt6X6.cjs} +1 -1
  80. package/dist/external-DX4m-5qT.cjs +1 -0
  81. package/dist/external-DlywBW-S.cjs +1 -0
  82. package/dist/{external-ClyfPgqG.cjs → external-kZf9CjYn.cjs} +14 -14
  83. package/dist/{font-CcRdsA3n.js → font-BXKdXsr5.js} +2 -2
  84. package/dist/{font-Bas26Jn-.cjs → font-DCE90lco.cjs} +1 -1
  85. package/dist/fontString-BBvH9Ypy.cjs +1 -0
  86. package/dist/fontString-C7Q9Laqk.js +28 -0
  87. package/dist/header.cjs +1 -1
  88. package/dist/header.js +1 -1
  89. package/dist/hooks-BQJQyGWV.js +293 -0
  90. package/dist/hooks-ClXSlga9.cjs +1 -0
  91. package/dist/{state-CUPEHHgf.js → index-CSKP1UPN.js} +292 -354
  92. package/dist/index-Ch3utIMa.cjs +15 -0
  93. package/dist/index.cjs +7 -7
  94. package/dist/index.js +7413 -6474
  95. package/dist/input.cjs +1 -1
  96. package/dist/input.js +1 -1
  97. package/dist/list.cjs +1 -1
  98. package/dist/list.js +1 -1
  99. package/dist/menu.cjs +1 -1
  100. package/dist/menu.js +1 -1
  101. package/dist/pluto.css +1 -1
  102. package/dist/{provider-Dq9t3iAH.js → provider-CH0eoGfz.js} +2131 -2085
  103. package/dist/provider-D054LCpB.cjs +53 -0
  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/align/Center.d.ts +2 -2
  107. package/dist/src/align/Center.d.ts.map +1 -1
  108. package/dist/src/align/Pack.d.ts +3 -3
  109. package/dist/src/align/Pack.d.ts.map +1 -1
  110. package/dist/src/align/Space.d.ts +25 -10
  111. package/dist/src/align/Space.d.ts.map +1 -1
  112. package/dist/src/align/Stack.d.ts +7 -0
  113. package/dist/src/align/Stack.d.ts.map +1 -0
  114. package/dist/src/align/external.d.ts +1 -0
  115. package/dist/src/align/external.d.ts.map +1 -1
  116. package/dist/src/breadcrumb/Breadcrumb.d.ts +2 -2
  117. package/dist/src/breadcrumb/Breadcrumb.d.ts.map +1 -1
  118. package/dist/src/button/Button.d.ts +2 -4
  119. package/dist/src/button/Button.d.ts.map +1 -1
  120. package/dist/src/button/Icon.d.ts +4 -1
  121. package/dist/src/button/Icon.d.ts.map +1 -1
  122. package/dist/src/button/Toggle.d.ts +0 -1
  123. package/dist/src/button/Toggle.d.ts.map +1 -1
  124. package/dist/src/caret/Animated.d.ts +3 -2
  125. package/dist/src/caret/Animated.d.ts.map +1 -1
  126. package/dist/src/channel/LinePlot.d.ts +1 -1
  127. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  128. package/dist/src/channel/Select.d.ts +3 -3
  129. package/dist/src/channel/Select.d.ts.map +1 -1
  130. package/dist/src/color/Picker.d.ts.map +1 -1
  131. package/dist/src/css/css.d.ts +2 -1
  132. package/dist/src/css/css.d.ts.map +1 -1
  133. package/dist/src/divider/Divider.d.ts +4 -4
  134. package/dist/src/divider/Divider.d.ts.map +1 -1
  135. package/dist/src/dropdown/Dropdown.d.ts +2 -1
  136. package/dist/src/dropdown/Dropdown.d.ts.map +1 -1
  137. package/dist/src/generic/Generic.d.ts +4 -5
  138. package/dist/src/generic/Generic.d.ts.map +1 -1
  139. package/dist/src/hardware/device/Select.d.ts.map +1 -1
  140. package/dist/src/icon/Icon.d.ts.map +1 -1
  141. package/dist/src/input/DateTime.d.ts.map +1 -1
  142. package/dist/src/input/Item.d.ts +1 -1
  143. package/dist/src/input/Item.d.ts.map +1 -1
  144. package/dist/src/input/Text.d.ts +1 -1
  145. package/dist/src/input/Text.d.ts.map +1 -1
  146. package/dist/src/input/types.d.ts +0 -1
  147. package/dist/src/input/types.d.ts.map +1 -1
  148. package/dist/src/list/Column.d.ts +3 -3
  149. package/dist/src/list/Column.d.ts.map +1 -1
  150. package/dist/src/list/Core.d.ts +1 -1
  151. package/dist/src/list/Core.d.ts.map +1 -1
  152. package/dist/src/list/Hover.d.ts +3 -2
  153. package/dist/src/list/Hover.d.ts.map +1 -1
  154. package/dist/src/list/Item.d.ts +1 -1
  155. package/dist/src/list/Item.d.ts.map +1 -1
  156. package/dist/src/main.d.ts.map +1 -1
  157. package/dist/src/menu/ContextMenu.d.ts +5 -3
  158. package/dist/src/menu/ContextMenu.d.ts.map +1 -1
  159. package/dist/src/menu/Item.d.ts.map +1 -1
  160. package/dist/src/menu/Menu.d.ts +3 -2
  161. package/dist/src/menu/Menu.d.ts.map +1 -1
  162. package/dist/src/modal/Modal.d.ts +7 -3
  163. package/dist/src/modal/Modal.d.ts.map +1 -1
  164. package/dist/src/mosaic/Mosaic.d.ts +5 -3
  165. package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
  166. package/dist/src/mosaic/tree.d.ts +4 -3
  167. package/dist/src/mosaic/tree.d.ts.map +1 -1
  168. package/dist/src/mosaic/types.d.ts +6 -6
  169. package/dist/src/nav/Bar.d.ts +2 -1
  170. package/dist/src/nav/Bar.d.ts.map +1 -1
  171. package/dist/src/nav/Drawer.d.ts +3 -2
  172. package/dist/src/nav/Drawer.d.ts.map +1 -1
  173. package/dist/src/notation/Select.d.ts +2 -3
  174. package/dist/src/notation/Select.d.ts.map +1 -1
  175. package/dist/src/notation/index.d.ts +1 -1
  176. package/dist/src/notation/index.d.ts.map +1 -1
  177. package/dist/src/os/Controls/Windows.d.ts +1 -1
  178. package/dist/src/os/Controls/Windows.d.ts.map +1 -1
  179. package/dist/src/os/Controls/types.d.ts +2 -0
  180. package/dist/src/os/Controls/types.d.ts.map +1 -1
  181. package/dist/src/ranger/TimeRangeChip.d.ts +2 -1
  182. package/dist/src/ranger/TimeRangeChip.d.ts.map +1 -1
  183. package/dist/src/resize/Core.d.ts +5 -4
  184. package/dist/src/resize/Core.d.ts.map +1 -1
  185. package/dist/src/resize/Multiple.d.ts.map +1 -1
  186. package/dist/src/resize/Single.d.ts.map +1 -1
  187. package/dist/src/select/Button.d.ts.map +1 -1
  188. package/dist/src/select/List.d.ts.map +1 -1
  189. package/dist/src/select/Multiple.d.ts.map +1 -1
  190. package/dist/src/status/Notification.d.ts.map +1 -1
  191. package/dist/src/status/aether/aggregator.d.ts +8 -8
  192. package/dist/src/status/aether/types.d.ts +2 -2
  193. package/dist/src/status/colors.d.ts +1 -1
  194. package/dist/src/status/colors.d.ts.map +1 -1
  195. package/dist/src/table/aether/Table.d.ts +3 -3
  196. package/dist/src/table/cells/Cells.d.ts +2 -2
  197. package/dist/src/tabs/Selector.d.ts +5 -2
  198. package/dist/src/tabs/Selector.d.ts.map +1 -1
  199. package/dist/src/tabs/Tabs.d.ts +2 -3
  200. package/dist/src/tabs/Tabs.d.ts.map +1 -1
  201. package/dist/src/tabs/types.d.ts +4 -4
  202. package/dist/src/tag/Tag.d.ts.map +1 -1
  203. package/dist/src/telem/aether/transformers.d.ts +6 -6
  204. package/dist/src/telem/aether/transformers.d.ts.map +1 -1
  205. package/dist/src/telem/control/aether/chip.d.ts +8 -8
  206. package/dist/src/telem/control/aether/indicator.d.ts +8 -8
  207. package/dist/src/text/Editable.d.ts.map +1 -1
  208. package/dist/src/text/Keyboard.d.ts +1 -1
  209. package/dist/src/text/Keyboard.d.ts.map +1 -1
  210. package/dist/src/text/WithIcon.d.ts +3 -2
  211. package/dist/src/text/WithIcon.d.ts.map +1 -1
  212. package/dist/src/text/core/types.d.ts.map +1 -1
  213. package/dist/src/theming/Provider.d.ts.map +1 -1
  214. package/dist/src/theming/aether/provider.d.ts +650 -530
  215. package/dist/src/theming/aether/provider.d.ts.map +1 -1
  216. package/dist/src/theming/core/fontString.d.ts.map +1 -1
  217. package/dist/src/theming/core/theme.d.ts +229 -187
  218. package/dist/src/theming/core/theme.d.ts.map +1 -1
  219. package/dist/src/theming/css.d.ts +1 -1
  220. package/dist/src/theming/css.d.ts.map +1 -1
  221. package/dist/src/theming/static/generate.d.ts +2 -0
  222. package/dist/src/theming/static/generate.d.ts.map +1 -0
  223. package/dist/src/tooltip/Dialog.d.ts.map +1 -1
  224. package/dist/src/tree/Tree.d.ts +1 -1
  225. package/dist/src/tree/Tree.d.ts.map +1 -1
  226. package/dist/src/tree/core.d.ts +2 -2
  227. package/dist/src/tree/core.d.ts.map +1 -1
  228. package/dist/src/triggers/Provider.d.ts.map +1 -1
  229. package/dist/src/triggers/Text.d.ts.map +1 -1
  230. package/dist/src/triggers/hooks.d.ts +1 -0
  231. package/dist/src/triggers/hooks.d.ts.map +1 -1
  232. package/dist/src/util/component.d.ts +2 -2
  233. package/dist/src/util/component.d.ts.map +1 -1
  234. package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
  235. package/dist/src/vis/diagram/aether/Diagram.d.ts +3 -3
  236. package/dist/src/vis/diagram/aether/types.d.ts +8 -8
  237. package/dist/src/vis/draw2d/index.d.ts +16 -1
  238. package/dist/src/vis/draw2d/index.d.ts.map +1 -1
  239. package/dist/src/vis/eraser/use.d.ts +2 -2
  240. package/dist/src/vis/eraser/use.d.ts.map +1 -1
  241. package/dist/src/vis/legend/Container.d.ts +6 -6
  242. package/dist/src/vis/legend/Container.d.ts.map +1 -1
  243. package/dist/src/vis/legend/Simple.d.ts +9 -1
  244. package/dist/src/vis/legend/Simple.d.ts.map +1 -1
  245. package/dist/src/vis/line/aether/line.d.ts +3 -2
  246. package/dist/src/vis/line/aether/line.d.ts.map +1 -1
  247. package/dist/src/vis/lineplot/Legend.d.ts.map +1 -1
  248. package/dist/src/vis/lineplot/aether/XAxis.d.ts +6 -6
  249. package/dist/src/vis/lineplot/aether/YAxis.d.ts +6 -6
  250. package/dist/src/vis/lineplot/aether/axis.d.ts +3 -3
  251. package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
  252. package/dist/src/vis/lineplot/range/aether/annotation.d.ts +6 -6
  253. package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
  254. package/dist/src/vis/log/Log.d.ts.map +1 -1
  255. package/dist/src/vis/log/aether/Log.d.ts +12 -12
  256. package/dist/src/vis/rule/Rule.d.ts.map +1 -1
  257. package/dist/src/vis/schematic/Forms.d.ts +7 -1
  258. package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
  259. package/dist/src/vis/schematic/Symbols.d.ts +54 -5
  260. package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
  261. package/dist/src/vis/schematic/primitives/Primitives.d.ts +41 -1
  262. package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
  263. package/dist/src/vis/schematic/registry.d.ts +1 -1
  264. package/dist/src/vis/schematic/registry.d.ts.map +1 -1
  265. package/dist/src/vis/value/Form.d.ts.map +1 -1
  266. package/dist/src/vis/value/aether/value.d.ts +6 -6
  267. package/dist/src/vis/value/aether/value.d.ts.map +1 -1
  268. package/dist/src/vis/value/use.d.ts +2 -2
  269. package/dist/state-Bd_8X2jl.cjs +1 -0
  270. package/dist/state-CjGemC7S.js +88 -0
  271. package/dist/tabs.cjs +1 -1
  272. package/dist/tabs.js +1 -1
  273. package/dist/text.cjs +1 -1
  274. package/dist/text.js +2 -2
  275. package/dist/theme.css +1600 -0
  276. package/dist/theming.cjs +1 -1
  277. package/dist/theming.js +2 -2
  278. package/dist/{transformColorsToHex-B2Bui-Wf.cjs → transformColorsToHex-DE7uEs1w.cjs} +1 -1
  279. package/dist/{transformColorsToHex-B6dG2LA6.js → transformColorsToHex-UBrryWh5.js} +1 -1
  280. package/dist/tree.cjs +1 -1
  281. package/dist/tree.js +1 -1
  282. package/dist/triggers.cjs +1 -1
  283. package/dist/triggers.js +1 -1
  284. package/dist/{units-CvIf5nF_.cjs → units-DjoHPrqM.cjs} +1 -1
  285. package/dist/{units-D7qkgH-s.js → units-MBd0L3ff.js} +1 -1
  286. package/dist/useClickOutside-4k9PAT_i.cjs +1 -0
  287. package/dist/{useClickOutside-N6MHxbOe.js → useClickOutside-BYjsXGgb.js} +28 -28
  288. package/dist/{useDebouncedCallback-vg2DKTH7.cjs → useDebouncedCallback-BBsAgC9k.cjs} +1 -1
  289. package/dist/{useDebouncedCallback-D4Ec7whQ.js → useDebouncedCallback-Dg4BDGP-.js} +1 -1
  290. package/dist/{useMemoCompare-Cq_C2ddc.js → useMemoCompare-BEDaTIXL.js} +2 -2
  291. package/dist/useMemoCompare-DORTZbzY.cjs +1 -0
  292. package/dist/useVirtualCursorDragWebKit-BSafZVD_.cjs +1 -0
  293. package/dist/{useVirtualCursorDragWebKit-BBTGd7Xe.js → useVirtualCursorDragWebKit-BixysrXI.js} +25 -24
  294. package/dist/{value-Dk2DJbst.js → value-CudL8z5e.js} +1626 -1580
  295. package/dist/value-DT0qJqgQ.cjs +57 -0
  296. package/dist/video.cjs +1 -1
  297. package/dist/video.js +1 -1
  298. package/package.json +22 -20
  299. package/dist/Center-bD2cOjI8.cjs +0 -1
  300. package/dist/ContextMenu-BXNN2_7t.js +0 -101
  301. package/dist/ContextMenu-CNSewKSD.cjs +0 -1
  302. package/dist/DateTime-BfnGq6C2.cjs +0 -1
  303. package/dist/Divider-CJNDIsD4.cjs +0 -22
  304. package/dist/Dropdown-CL7BefC8.cjs +0 -1
  305. package/dist/Dropdown-D-aMufnM.js +0 -261
  306. package/dist/Item-CW2A2nuL.js +0 -108
  307. package/dist/Item-CpAZC-dF.cjs +0 -1
  308. package/dist/Keyboard-DHGtnfsf.cjs +0 -1
  309. package/dist/Pack-C4NdZWyf.cjs +0 -1
  310. package/dist/Pack-UzJJ9OhY.js +0 -46
  311. package/dist/Provider-BH1uv6QX.js +0 -436
  312. package/dist/Provider-lJARiq5i.cjs +0 -1
  313. package/dist/Space-BrQoodma.cjs +0 -1
  314. package/dist/Space-I_hidXYi.js +0 -76
  315. package/dist/Text-C-o1z9sP.js +0 -124
  316. package/dist/Text-C_j_F67Q.cjs +0 -1
  317. package/dist/Text-ClTuQXMF.cjs +0 -4
  318. package/dist/Text-DEbr1cmH.cjs +0 -1
  319. package/dist/Text-DVv04lTs.js +0 -32
  320. package/dist/Toggle-CYB9Vt6b.cjs +0 -1
  321. package/dist/Toggle-v77mEVLE.js +0 -356
  322. package/dist/WithIcon-BnDZ-Qu7.js +0 -92
  323. package/dist/WithIcon-tr8ELI3W.cjs +0 -1
  324. package/dist/css-CU7tous7.cjs +0 -1
  325. package/dist/dimensions-e5IPRZhn.cjs +0 -1
  326. package/dist/external-B1ttDWzy.cjs +0 -1
  327. package/dist/external-BdxbwUpI.js +0 -343
  328. package/dist/external-BpvGU0dZ.cjs +0 -1
  329. package/dist/external-C7Hy9XdI.js +0 -418
  330. package/dist/external-CqhOyYDl.cjs +0 -1
  331. package/dist/external-Csg4_wkz.js +0 -15
  332. package/dist/external-CwvJvXL5.cjs +0 -1
  333. package/dist/external-Cztvb3-K.cjs +0 -1
  334. package/dist/external-DMEzx_kb.cjs +0 -1
  335. package/dist/fontString-C7H8Imxd.cjs +0 -1
  336. package/dist/fontString-DdV9bi9l.js +0 -12
  337. package/dist/hooks-B7ZV7Hz6.js +0 -293
  338. package/dist/hooks-CJnV8Pt4.cjs +0 -1
  339. package/dist/provider-BrBEjlx5.cjs +0 -53
  340. package/dist/src/notation/external.d.ts +0 -3
  341. package/dist/src/notation/external.d.ts.map +0 -1
  342. package/dist/src/notation/notation.d.ts +0 -33
  343. package/dist/src/notation/notation.d.ts.map +0 -1
  344. package/dist/src/notation/notation.spec.d.ts +0 -2
  345. package/dist/src/notation/notation.spec.d.ts.map +0 -1
  346. package/dist/state-LaBGf4_k.cjs +0 -15
  347. package/dist/useClickOutside-PFl3AvPU.cjs +0 -1
  348. package/dist/useMemoCompare-BGEWpAJU.cjs +0 -1
  349. package/dist/useVirtualCursorDragWebKit-Rnok8Nft.cjs +0 -1
  350. package/dist/value-C6JZdCF2.cjs +0 -57
  351. /package/dist/{Pack-BbwDtaE6.cjs → Stack-BbwDtaE6.cjs} +0 -0
  352. /package/dist/{Pack-D50qN0Vu.js → Stack-D50qN0Vu.js} +0 -0
package/dist/css.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./css-CU7tous7.cjs"),t=require("./units-CvIf5nF_.cjs");exports.CSS=e.CSS;exports.newBEM=e.newBEM;exports.createHexOpacityVariants=t.createHexOpacityVariants;exports.unitProperty=t.unitProperty;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./css-Cj2UCGXB.cjs"),t=require("./units-DjoHPrqM.cjs");exports.CSS=e.CSS;exports.newBEM=e.newBEM;exports.createHexOpacityVariants=t.createHexOpacityVariants;exports.unitProperty=t.unitProperty;
package/dist/css.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as e, n as t } from "./css-rxwBYwM1.js";
2
- import { c as s, u as n } from "./units-D7qkgH-s.js";
1
+ import { C as e, n as t } from "./css-Dyt-QnKy.js";
2
+ import { c as s, u as n } from "./units-MBd0L3ff.js";
3
3
  export {
4
4
  e as CSS,
5
5
  s as createHexOpacityVariants,
@@ -1,4 +1,4 @@
1
- import { u as b, f as j, h as d, y as O, g as m, c as A, p as $, o as c } from "./state-CUPEHHgf.js";
1
+ import { u as b, f as j, h as d, y as O, g as m, c as A, p as $, o as c } from "./index-CSKP1UPN.js";
2
2
  const k = (e) => JSON.parse(JSON.stringify(e)), v = (e, ...f) => (f.forEach((a) => {
3
3
  let t = e;
4
4
  const o = a.split(".");
@@ -1 +1 @@
1
- "use strict";const i=require("./state-LaBGf4_k.cjs"),g=e=>JSON.parse(JSON.stringify(e)),j=(e,...n)=>(n.forEach(a=>{let t=e;const o=a.split(".");o.forEach((s,r)=>{r===o.length-1?delete t[s]:s in t&&(t=t[s])})}),e),d=(e,n,a="")=>{const t={},o=(s,r,l)=>{if(typeof s!=typeof r||s===null||r===null){t[l]=[s,r];return}if(typeof s=="object"&&typeof r=="object")if(Array.isArray(s)&&Array.isArray(r)){if(s.length!==r.length){t[l]=[s,r];return}for(let f=0;f<s.length;f++)o(s[f],r[f],`${l}[${f}]`)}else new Set([...Object.keys(s),...Object.keys(r)]).forEach(f=>{o(s[f],r[f],l!==""?`${l}.${f}`:f)});else s!==r&&(t[l]=[s,r])};return o(e,n,a),t},u=(e,n)=>{const a=Array.isArray(e),t=Array.isArray(n);if(a!==t)return!1;if(a&&t){const r=e,l=n;if(r.length!==l.length)return!1;for(let f=0;f<r.length;f++)if(!u(r[f],l[f]))return!1;return!0}if(e==null||n==null||typeof e!="object"||typeof n!="object")return e===n;if("equals"in e)return e.equals(n);const o=Object.keys(e),s=Object.keys(n);if(o.length!==s.length)return!1;for(const r of o){const l=e[r],f=n[r];if(typeof l=="object"&&typeof f=="object"){if(!u(l,f))return!1}else if(l!==f)return!1}return!0},p=(e,n)=>{if(typeof e!="object"||e==null)return e===n;const a=Object.keys(e),t=Object.keys(n);if(t.length>a.length)return!1;for(const o of t){const s=e[o],r=n[o];if(typeof s=="object"&&typeof r=="object"){if(!p(s,r))return!1}else if(s!==r)return!1}return!0},y=(e,...n)=>{if(n.length===0)return e;const a=n.shift();if(i.o(e)&&i.o(a))for(const t in a)try{i.o(a[t])?(t in e||Object.assign(e,{[t]:{}}),y(e[t],a[t])):Object.assign(e,{[t]:a[t]})}catch(o){throw o instanceof TypeError?new TypeError(`.${t}: ${o.message}`):o}return y(e,...n)},O=(e,n,a)=>{const t=(o,s,r)=>{for(const l in s){const f=s[l],c=b(r);if(c!=null&&c[l]){const h=c[l].safeParse(f);h.success&&(o[l]=h.data)}else typeof f=="object"&&!Array.isArray(f)&&f!==null&&r&&r.shape&&r.shape[l]&&(o[l]||(o[l]={}),t(o[l],f,r.shape[l]))}return o};return t({...e},n,a)},b=e=>{var n;return((n=e._def)==null?void 0:n.typeName)==="ZodEffects"?b(e._def.schema):e==null?void 0:e.shape},A=Object.freeze(Object.defineProperty({__proto__:null,copy:g,deleteD:j,difference:d,element:i.p,equal:u,get:i.c,has:i.g,override:y,overrideValidItems:O,partialEqual:p,pathsMatch:i.y,remove:i.h,set:i.f,transformPath:i.u},Symbol.toStringTag,{value:"Module"}));exports.I=A;
1
+ "use strict";const i=require("./index-Ch3utIMa.cjs"),g=e=>JSON.parse(JSON.stringify(e)),j=(e,...n)=>(n.forEach(a=>{let t=e;const o=a.split(".");o.forEach((s,r)=>{r===o.length-1?delete t[s]:s in t&&(t=t[s])})}),e),d=(e,n,a="")=>{const t={},o=(s,r,l)=>{if(typeof s!=typeof r||s===null||r===null){t[l]=[s,r];return}if(typeof s=="object"&&typeof r=="object")if(Array.isArray(s)&&Array.isArray(r)){if(s.length!==r.length){t[l]=[s,r];return}for(let f=0;f<s.length;f++)o(s[f],r[f],`${l}[${f}]`)}else new Set([...Object.keys(s),...Object.keys(r)]).forEach(f=>{o(s[f],r[f],l!==""?`${l}.${f}`:f)});else s!==r&&(t[l]=[s,r])};return o(e,n,a),t},u=(e,n)=>{const a=Array.isArray(e),t=Array.isArray(n);if(a!==t)return!1;if(a&&t){const r=e,l=n;if(r.length!==l.length)return!1;for(let f=0;f<r.length;f++)if(!u(r[f],l[f]))return!1;return!0}if(e==null||n==null||typeof e!="object"||typeof n!="object")return e===n;if("equals"in e)return e.equals(n);const o=Object.keys(e),s=Object.keys(n);if(o.length!==s.length)return!1;for(const r of o){const l=e[r],f=n[r];if(typeof l=="object"&&typeof f=="object"){if(!u(l,f))return!1}else if(l!==f)return!1}return!0},p=(e,n)=>{if(typeof e!="object"||e==null)return e===n;const a=Object.keys(e),t=Object.keys(n);if(t.length>a.length)return!1;for(const o of t){const s=e[o],r=n[o];if(typeof s=="object"&&typeof r=="object"){if(!p(s,r))return!1}else if(s!==r)return!1}return!0},y=(e,...n)=>{if(n.length===0)return e;const a=n.shift();if(i.o(e)&&i.o(a))for(const t in a)try{i.o(a[t])?(t in e||Object.assign(e,{[t]:{}}),y(e[t],a[t])):Object.assign(e,{[t]:a[t]})}catch(o){throw o instanceof TypeError?new TypeError(`.${t}: ${o.message}`):o}return y(e,...n)},O=(e,n,a)=>{const t=(o,s,r)=>{for(const l in s){const f=s[l],c=b(r);if(c!=null&&c[l]){const h=c[l].safeParse(f);h.success&&(o[l]=h.data)}else typeof f=="object"&&!Array.isArray(f)&&f!==null&&r&&r.shape&&r.shape[l]&&(o[l]||(o[l]={}),t(o[l],f,r.shape[l]))}return o};return t({...e},n,a)},b=e=>{var n;return((n=e._def)==null?void 0:n.typeName)==="ZodEffects"?b(e._def.schema):e==null?void 0:e.shape},A=Object.freeze(Object.defineProperty({__proto__:null,copy:g,deleteD:j,difference:d,element:i.p,equal:u,get:i.c,has:i.g,override:y,overrideValidItems:O,partialEqual:p,pathsMatch:i.y,remove:i.h,set:i.f,transformPath:i.u},Symbol.toStringTag,{value:"Module"}));exports.I=A;
@@ -1,4 +1,4 @@
1
- import { S as s } from "./state-CUPEHHgf.js";
1
+ import { S as s } from "./index-CSKP1UPN.js";
2
2
  let n = null;
3
3
  const u = () => (n ?? (n = document.createElement("canvas")), n), i = (e, o, a) => {
4
4
  if (s.RUNTIME === "node") return { width: 0, height: 0 };
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./index-Ch3utIMa.cjs");let e=null;const u=()=>(e??(e=document.createElement("canvas")),e),c=(a,s,n)=>{if(i.S.RUNTIME==="node")return{width:0,height:0};n??(n=u().getContext("2d")),n.font=s;const t=n.measureText(a);return{width:Math.trunc(Math.abs(t.actualBoundingBoxLeft)+Math.abs(t.actualBoundingBoxRight)),height:Math.trunc(Math.abs(t.actualBoundingBoxAscent)+Math.abs(t.actualBoundingBoxDescent))}};exports.dimensions=c;
package/dist/dropdown.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Dropdown-CL7BefC8.cjs");exports.Dropdown=o.Dropdown;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Dropdown-C7Im-qW-.cjs");exports.Dropdown=o.Dropdown;
package/dist/dropdown.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as p } from "./Dropdown-D-aMufnM.js";
1
+ import { D as p } from "./Dropdown-4Cti-bbQ.js";
2
2
  export {
3
3
  p as Dropdown
4
4
  };
@@ -1,11 +1,11 @@
1
- "use strict";var L=Object.defineProperty;var P=(h,e,t)=>e in h?L(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var n=(h,e,t)=>P(h,typeof e!="symbol"?e+"":e,t);const v=require("./state-LaBGf4_k.cjs"),x=require("zod"),_=require("./provider-BrBEjlx5.cjs"),a=require("./css-CU7tous7.cjs"),d=(h,e)=>a.Mo.construct(a.Mo.left(h)-e.x,a.Mo.top(h)-e.y,a.Mo.width(h)+e.x*2,a.Mo.height(h)+e.y*2);class u{constructor(e,t=a.b.XY.IDENTITY){n(this,"scale_");n(this,"wrapped");this.wrapped=e,this.scale_=t}get fontStretch(){return this.wrapped.fontStretch}set fontStretch(e){this.wrapped.fontStretch=e}get fontVariantCaps(){return this.wrapped.fontVariantCaps}set fontVariantCaps(e){this.wrapped.fontVariantCaps=e}isContextLost(){return this.wrapped.isContextLost()}get wordSpacing(){return this.wrapped.wordSpacing}set wordSpacing(e){this.wrapped.wordSpacing=e}get letterSpacing(){return this.wrapped.letterSpacing}set letterSpacing(e){this.wrapped.letterSpacing=e}get textRendering(){return this.wrapped.textRendering}set textRendering(e){this.wrapped.textRendering=e}reset(){this.wrapped.reset()}applyScale(e){return new u(this,e)}get canvas(){return this.wrapped.canvas}get miterLimit(){return this.wrapped.miterLimit}set miterLimit(e){this.wrapped.miterLimit=this.scale_.x.dim(e)}get globalAlpha(){return this.wrapped.globalAlpha}set globalAlpha(e){this.wrapped.globalAlpha=e}get globalCompositeOperation(){return this.wrapped.globalCompositeOperation}set globalCompositeOperation(e){this.wrapped.globalCompositeOperation=e}get fillStyle(){return this.wrapped.fillStyle}set fillStyle(e){this.wrapped.fillStyle=e}get strokeStyle(){return this.wrapped.strokeStyle}set strokeStyle(e){this.wrapped.strokeStyle=e}drawImage(e,t,s,r,i,o,p,l,f){this.wrapped.drawImage(e,t,s,r,i,o,p,l,f)}beginPath(){this.wrapped.beginPath()}clip(e,t){this.wrapped.clip(e,t)}fill(e,t){if(e==null)return this.wrapped.fill();this.wrapped.fill(e,t)}isPointInPath(e,t,s,r){return this.wrapped.isPointInPath(e,t,s,r)}isPointInStroke(e,t,s){return this.wrapped.isPointInStroke(e,t,s)}stroke(e){if(e==null)return this.wrapped.stroke();this.wrapped.stroke(e)}createConicGradient(e,t,s){return this.wrapped.createConicGradient(e,t,s)}createLinearGradient(e,t,s,r){return this.wrapped.createLinearGradient(e,t,s,r)}createPattern(e,t){return this.wrapped.createPattern(e,t)}createRadialGradient(e,t,s,r,i,o){return this.wrapped.createRadialGradient(e,t,s,r,i,o)}get filter(){return this.wrapped.filter}set filter(e){this.wrapped.filter=e}createImageData(e,t,s){return this.wrapped.createImageData(e,t,s)}getImageData(e,t,s,r,i){return this.wrapped.getImageData(e,t,s,r,i)}putImageData(e,t,s,r,i,o,p){this.wrapped.putImageData(e,t,s,r,i,o,p)}get imageSmoothingEnabled(){return this.wrapped.imageSmoothingEnabled}set imageSmoothingEnabled(e){this.wrapped.imageSmoothingEnabled=e}get imageSmoothingQuality(){return this.wrapped.imageSmoothingQuality}set imageSmoothingQuality(e){this.wrapped.imageSmoothingQuality=e}arc(e,t,s,r,i,o){this.wrapped.arc(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),r,i,o)}arcTo(e,t,s,r,i){this.wrapped.arcTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.dim(i))}bezierCurveTo(e,t,s,r,i,o){this.wrapped.bezierCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.pos(i),this.scale_.y.pos(o))}closePath(){this.wrapped.closePath()}ellipse(e,t,s,r,i,o,p,l){this.wrapped.ellipse(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),i,o,p,l)}lineTo(e,t){this.wrapped.lineTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}moveTo(e,t){this.wrapped.moveTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}quadraticCurveTo(e,t,s,r){this.wrapped.quadraticCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r))}rect(e,t,s,r){this.wrapped.rect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}roundRect(e,t,s,r,i){this.wrapped.roundRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),typeof i=="number"?this.scale_.x.dim(i):i)}get lineCap(){return this.wrapped.lineCap}set lineCap(e){this.wrapped.lineCap=e}get lineDashOffset(){return this.wrapped.lineDashOffset}set lineDashOffset(e){this.wrapped.lineDashOffset=this.scale_.x.dim(e)}get lineJoin(){return this.wrapped.lineJoin}set lineJoin(e){this.wrapped.lineJoin=e}get lineWidth(){return this.wrapped.lineWidth}set lineWidth(e){this.wrapped.lineWidth=this.scale_.x.dim(e)}getLineDash(){return this.wrapped.getLineDash()}setLineDash(e){const t=Array.from(e).map(s=>this.scale_.x.dim(s));this.wrapped.setLineDash(t)}clearRect(e,t,s,r){this.wrapped.clearRect(e,t,s,r)}fillRect(e,t,s,r){this.wrapped.fillRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}strokeRect(e,t,s,r){this.wrapped.strokeRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}get shadowBlur(){return this.wrapped.shadowBlur}set shadowBlur(e){this.wrapped.shadowBlur=e}get shadowColor(){return this.wrapped.shadowColor}set shadowColor(e){this.wrapped.shadowColor=e}get shadowOffsetX(){return this.wrapped.shadowOffsetX}set shadowOffsetX(e){this.wrapped.shadowOffsetX=e}get shadowOffsetY(){return this.wrapped.shadowOffsetY}restore(){this.wrapped.restore()}save(){this.wrapped.save()}fillText(e,t,s,r){this.wrapped.fillText(e,this.scale_.x.pos(t),this.scale_.y.pos(s),r!=null?this.scale_.x.dim(r):void 0)}measureText(e){this.wrapped.font=m(this.wrapped.font,this.scale_.x.reverse());const t=this.wrapped.measureText(e);return this.wrapped.font=m(this.wrapped.font,this.scale_.x),t}strokeText(e,t,s,r){this.wrapped.strokeText(e,this.scale_.x.pos(t),this.scale_.y.pos(s),r!=null?this.scale_.x.dim(r):void 0)}get direction(){return this.wrapped.direction}set direction(e){this.wrapped.direction=e}get font(){return this.wrapped.font}set font(e){this.wrapped.font=m(e,this.scale_.x)}get fontKerning(){return this.wrapped.fontKerning}set fontKerning(e){this.wrapped.fontKerning=e}get textAlign(){return this.wrapped.textAlign}set textAlign(e){this.wrapped.textAlign=e}get textBaseline(){return this.wrapped.textBaseline}set textBaseline(e){this.wrapped.textBaseline=e}getTransform(){return this.wrapped.getTransform()}resetTransform(){this.wrapped.resetTransform()}rotate(e){this.wrapped.rotate(e)}scale(e,t){this.wrapped.scale(e,t)}scissor(e,t=a.G.ZERO){const s=new D(this.scale_);return e=d(e,t),s.rect(...a.G.couple(a.Mo.topLeft(e)),...a._.couple(a.Mo.dims(e))),this.save(),this.clip(s.getPath()),()=>this.restore()}setTransform(e,t,s,r,i,o){this.wrapped.setTransform(e,t,s,r,i,o)}transform(e,t,s,r,i,o){this.wrapped.transform(e,t,s,r,i,o)}translate(e,t){this.wrapped.translate(e,t)}}const y=/(\d+(\.\d+)?)px/,m=(h,e)=>{var r;const t=Number((r=h.match(y))==null?void 0:r[1]);if(t==null)return h;const s=e.dim(t);return h.replace(y,`${s}px`)};class D{constructor(e=a.b.XY.IDENTITY,t){n(this,"scale_");n(this,"path");this.scale_=e,t instanceof Path2D||typeof t=="string"?this.path=new Path2D(t):this.path=new Path2D}addPath(e,t){this.path.addPath(e,t)}arc(e,t,s,r,i,o){this.path.arc(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),r,i,o)}arcTo(e,t,s,r,i){this.path.arcTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.dim(i))}bezierCurveTo(e,t,s,r,i,o){this.path.bezierCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.pos(i),this.scale_.y.pos(o))}closePath(){this.path.closePath()}ellipse(e,t,s,r,i,o,p,l){this.path.ellipse(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),i,o,p,l)}lineTo(e,t){this.path.lineTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}moveTo(e,t){this.path.moveTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}quadraticCurveTo(e,t,s,r){this.path.quadraticCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r))}rect(e,t,s,r){this.path.rect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}roundRect(e,t,s,r,i){const o=this.scaleRadii(i);this.path.roundRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),o)}scaleRadii(e){return e==null?e:typeof e=="number"?this.scale_.x.dim(e):Array.isArray(e)?e.map(t=>this.scaleRadius(t)):this.scaleRadius(e)}scaleRadius(e){return typeof e=="number"?this.scale_.x.dim(e):{x:this.scale_.x.dim(e.x??0),y:this.scale_.y.dim(e.y??0)}}getPath(){return this.path}}const M=`precision mediump float;
1
+ "use strict";var L=Object.defineProperty;var P=(h,e,t)=>e in h?L(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var n=(h,e,t)=>P(h,typeof e!="symbol"?e+"":e,t);const v=require("./index-Ch3utIMa.cjs"),x=require("zod"),_=require("./provider-D054LCpB.cjs"),a=require("./css-Cj2UCGXB.cjs"),d=(h,e)=>a.$t.construct(a.$t.left(h)-e.x,a.$t.top(h)-e.y,a.$t.width(h)+e.x*2,a.$t.height(h)+e.y*2);class u{constructor(e,t=a.b.XY.IDENTITY){n(this,"scale_");n(this,"wrapped");this.wrapped=e,this.scale_=t}get fontStretch(){return this.wrapped.fontStretch}set fontStretch(e){this.wrapped.fontStretch=e}get fontVariantCaps(){return this.wrapped.fontVariantCaps}set fontVariantCaps(e){this.wrapped.fontVariantCaps=e}isContextLost(){return this.wrapped.isContextLost()}get wordSpacing(){return this.wrapped.wordSpacing}set wordSpacing(e){this.wrapped.wordSpacing=e}get letterSpacing(){return this.wrapped.letterSpacing}set letterSpacing(e){this.wrapped.letterSpacing=e}get textRendering(){return this.wrapped.textRendering}set textRendering(e){this.wrapped.textRendering=e}reset(){this.wrapped.reset()}applyScale(e){return new u(this,e)}get canvas(){return this.wrapped.canvas}get miterLimit(){return this.wrapped.miterLimit}set miterLimit(e){this.wrapped.miterLimit=this.scale_.x.dim(e)}get globalAlpha(){return this.wrapped.globalAlpha}set globalAlpha(e){this.wrapped.globalAlpha=e}get globalCompositeOperation(){return this.wrapped.globalCompositeOperation}set globalCompositeOperation(e){this.wrapped.globalCompositeOperation=e}get fillStyle(){return this.wrapped.fillStyle}set fillStyle(e){this.wrapped.fillStyle=e}get strokeStyle(){return this.wrapped.strokeStyle}set strokeStyle(e){this.wrapped.strokeStyle=e}drawImage(e,t,s,r,i,o,p,l,f){this.wrapped.drawImage(e,t,s,r,i,o,p,l,f)}beginPath(){this.wrapped.beginPath()}clip(e,t){this.wrapped.clip(e,t)}fill(e,t){if(e==null)return this.wrapped.fill();this.wrapped.fill(e,t)}isPointInPath(e,t,s,r){return this.wrapped.isPointInPath(e,t,s,r)}isPointInStroke(e,t,s){return this.wrapped.isPointInStroke(e,t,s)}stroke(e){if(e==null)return this.wrapped.stroke();this.wrapped.stroke(e)}createConicGradient(e,t,s){return this.wrapped.createConicGradient(e,t,s)}createLinearGradient(e,t,s,r){return this.wrapped.createLinearGradient(e,t,s,r)}createPattern(e,t){return this.wrapped.createPattern(e,t)}createRadialGradient(e,t,s,r,i,o){return this.wrapped.createRadialGradient(e,t,s,r,i,o)}get filter(){return this.wrapped.filter}set filter(e){this.wrapped.filter=e}createImageData(e,t,s){return this.wrapped.createImageData(e,t,s)}getImageData(e,t,s,r,i){return this.wrapped.getImageData(e,t,s,r,i)}putImageData(e,t,s,r,i,o,p){this.wrapped.putImageData(e,t,s,r,i,o,p)}get imageSmoothingEnabled(){return this.wrapped.imageSmoothingEnabled}set imageSmoothingEnabled(e){this.wrapped.imageSmoothingEnabled=e}get imageSmoothingQuality(){return this.wrapped.imageSmoothingQuality}set imageSmoothingQuality(e){this.wrapped.imageSmoothingQuality=e}arc(e,t,s,r,i,o){this.wrapped.arc(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),r,i,o)}arcTo(e,t,s,r,i){this.wrapped.arcTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.dim(i))}bezierCurveTo(e,t,s,r,i,o){this.wrapped.bezierCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.pos(i),this.scale_.y.pos(o))}closePath(){this.wrapped.closePath()}ellipse(e,t,s,r,i,o,p,l){this.wrapped.ellipse(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),i,o,p,l)}lineTo(e,t){this.wrapped.lineTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}moveTo(e,t){this.wrapped.moveTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}quadraticCurveTo(e,t,s,r){this.wrapped.quadraticCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r))}rect(e,t,s,r){this.wrapped.rect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}roundRect(e,t,s,r,i){this.wrapped.roundRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),typeof i=="number"?this.scale_.x.dim(i):i)}get lineCap(){return this.wrapped.lineCap}set lineCap(e){this.wrapped.lineCap=e}get lineDashOffset(){return this.wrapped.lineDashOffset}set lineDashOffset(e){this.wrapped.lineDashOffset=this.scale_.x.dim(e)}get lineJoin(){return this.wrapped.lineJoin}set lineJoin(e){this.wrapped.lineJoin=e}get lineWidth(){return this.wrapped.lineWidth}set lineWidth(e){this.wrapped.lineWidth=this.scale_.x.dim(e)}getLineDash(){return this.wrapped.getLineDash()}setLineDash(e){const t=Array.from(e).map(s=>this.scale_.x.dim(s));this.wrapped.setLineDash(t)}clearRect(e,t,s,r){this.wrapped.clearRect(e,t,s,r)}fillRect(e,t,s,r){this.wrapped.fillRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}strokeRect(e,t,s,r){this.wrapped.strokeRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}get shadowBlur(){return this.wrapped.shadowBlur}set shadowBlur(e){this.wrapped.shadowBlur=e}get shadowColor(){return this.wrapped.shadowColor}set shadowColor(e){this.wrapped.shadowColor=e}get shadowOffsetX(){return this.wrapped.shadowOffsetX}set shadowOffsetX(e){this.wrapped.shadowOffsetX=e}get shadowOffsetY(){return this.wrapped.shadowOffsetY}restore(){this.wrapped.restore()}save(){this.wrapped.save()}fillText(e,t,s,r){this.wrapped.fillText(e,this.scale_.x.pos(t),this.scale_.y.pos(s),r!=null?this.scale_.x.dim(r):void 0)}measureText(e){this.wrapped.font=m(this.wrapped.font,this.scale_.x.reverse());const t=this.wrapped.measureText(e);return this.wrapped.font=m(this.wrapped.font,this.scale_.x),t}strokeText(e,t,s,r){this.wrapped.strokeText(e,this.scale_.x.pos(t),this.scale_.y.pos(s),r!=null?this.scale_.x.dim(r):void 0)}get direction(){return this.wrapped.direction}set direction(e){this.wrapped.direction=e}get font(){return this.wrapped.font}set font(e){this.wrapped.font=m(e,this.scale_.x)}get fontKerning(){return this.wrapped.fontKerning}set fontKerning(e){this.wrapped.fontKerning=e}get textAlign(){return this.wrapped.textAlign}set textAlign(e){this.wrapped.textAlign=e}get textBaseline(){return this.wrapped.textBaseline}set textBaseline(e){this.wrapped.textBaseline=e}getTransform(){return this.wrapped.getTransform()}resetTransform(){this.wrapped.resetTransform()}rotate(e){this.wrapped.rotate(e)}scale(e,t){this.wrapped.scale(e,t)}scissor(e,t=a.J.ZERO){const s=new $(this.scale_);return e=d(e,t),s.rect(...a.J.couple(a.$t.topLeft(e)),...a._.couple(a.$t.dims(e))),this.save(),this.clip(s.getPath()),()=>this.restore()}setTransform(e,t,s,r,i,o){this.wrapped.setTransform(e,t,s,r,i,o)}transform(e,t,s,r,i,o){this.wrapped.transform(e,t,s,r,i,o)}translate(e,t){this.wrapped.translate(e,t)}}const y=/(\d+(\.\d+)?)px/,m=(h,e)=>{var r;const t=Number((r=h.match(y))==null?void 0:r[1]);if(t==null)return h;const s=e.dim(t);return h.replace(y,`${s}px`)};class ${constructor(e=a.b.XY.IDENTITY,t){n(this,"scale_");n(this,"path");this.scale_=e,t instanceof Path2D||typeof t=="string"?this.path=new Path2D(t):this.path=new Path2D}addPath(e,t){this.path.addPath(e,t)}arc(e,t,s,r,i,o){this.path.arc(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),r,i,o)}arcTo(e,t,s,r,i){this.path.arcTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.dim(i))}bezierCurveTo(e,t,s,r,i,o){this.path.bezierCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.pos(i),this.scale_.y.pos(o))}closePath(){this.path.closePath()}ellipse(e,t,s,r,i,o,p,l){this.path.ellipse(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),i,o,p,l)}lineTo(e,t){this.path.lineTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}moveTo(e,t){this.path.moveTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}quadraticCurveTo(e,t,s,r){this.path.quadraticCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r))}rect(e,t,s,r){this.path.rect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}roundRect(e,t,s,r,i){const o=this.scaleRadii(i);this.path.roundRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),o)}scaleRadii(e){return e==null?e:typeof e=="number"?this.scale_.x.dim(e):Array.isArray(e)?e.map(t=>this.scaleRadius(t)):this.scaleRadius(e)}scaleRadius(e){return typeof e=="number"?this.scale_.x.dim(e):{x:this.scale_.x.dim(e.x??0),y:this.scale_.y.dim(e.y??0)}}getPath(){return this.path}}const D=`precision mediump float;
2
2
 
3
3
  void main(void) {
4
4
  gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
5
5
  }
6
- `,G=`attribute vec4 a_position;
6
+ `,I=`attribute vec4 a_position;
7
7
 
8
8
  void main(void) {
9
9
  gl_Position = a_position;
10
10
  }
11
- `,C=h=>new Error(`failed to compile webgl program: ${h}`),I=new Error("null shader encountered");let b=class{constructor(e,t,s){n(this,"renderCtx");n(this,"prog");n(this,"vertShader");n(this,"fragShader");n(this,"uniformLocCache",new Map);this.renderCtx=e;const r=e.gl.createProgram();if(r==null)throw C("failed to create program");this.prog=r,this.vertShader=t,this.fragShader=s,this.compile()}setAsActive(){return this.renderCtx.gl.useProgram(this.prog),()=>this.renderCtx.gl.useProgram(null)}uniformXY(e,t){this.renderCtx.gl.uniform2fv(this.getUniformLoc(e),a.G.couple(t))}uniformColor(e,t){this.renderCtx.gl.uniform4fv(this.getUniformLoc(e),t.rgba1)}getUniformLoc(e){const t=this.uniformLocCache.get(e);if(t!=null)return t;const s=this.renderCtx.gl.getUniformLocation(this.prog,e);if(s==null)throw new Error(`unexpected missing uniform ${e}`);return this.uniformLocCache.set(e,s),s}compile(){const e=this.renderCtx.gl;this.compileShader(this.vertShader,e.VERTEX_SHADER),this.compileShader(this.fragShader,e.FRAGMENT_SHADER),e.linkProgram(this.prog)}compileShader(e,t){const s=this.renderCtx.gl,r=s.createShader(t);if(r==null)throw I;if(s.shaderSource(r,e),s.compileShader(r),!s.getShaderParameter(r,s.COMPILE_STATUS)){const o=s.getShaderInfoLog(r);throw s.deleteShader(r),C(o??"unknown")}s.attachShader(this.prog,r)}};const B=new Float32Array([0,0,0,0,0,0]);class k extends b{constructor(t){super(t,G,M);n(this,"positionBuffer");const s=t.gl.createBuffer();if(s==null)throw new _.Me("webgl: failed to create buffer");this.positionBuffer=s,t.gl.bindBuffer(t.gl.ARRAY_BUFFER,this.positionBuffer),t.gl.bufferData(t.gl.ARRAY_BUFFER,B,t.gl.STATIC_DRAW)}exec(){const{gl:t}=this.renderCtx,s=t.getAttribLocation(this.prog,"a_position");t.bindBuffer(t.ARRAY_BUFFER,this.positionBuffer);const r=t.createVertexArray();t.bindVertexArray(r),t.enableVertexAttribArray(s),t.vertexAttribPointer(s,2,t.FLOAT,!1,0,0),this.setAsActive(),t.drawArrays(t.TRIANGLES,0,3)}}const S={high:1,low:0},T=v.$.hz(45);class O{constructor(e){n(this,"mutex",new _.Mutex);n(this,"requests",new Map);n(this,"cleanup",new Map);n(this,"afterRender");this.start(),this.afterRender=e}async set(e){let t;e.priority==="high"&&(t=await this.mutex.acquire());const s=this.requests.get(e.key);if(s==null)this.requests.set(e.key,e);else{const r=S[e.priority]>=S[s.priority],i=e.canvases.length>=s.canvases.length;r&&i&&this.requests.set(e.key,e)}t==null||t()}async render(){await this.mutex.runExclusive(async()=>{var i;const e=performance.now(),{requests:t}=this;if(t.size===0)return;await this.runCleanupsSync(),await this.renderSync();const s=performance.now(),r=v.y$1.milliseconds(s-e);r.greaterThan(T.period)&&console.warn(`Render loop for ${this.requests.size} took longer than ${T.period.toString()} to execute: ${r.milliseconds}`),this.requests.clear(),(i=this.afterRender)==null||i.call(this)})}async runCleanupsSync(){const{cleanup:e,requests:t}=this;for(const[s,r]of e.entries()){const i=t.get(s);i!=null&&(await r(i),e.delete(s))}}async renderSync(){const{requests:e}=this;for(const t of e.values())try{const s=await t.render();s!=null&&this.cleanup.set(t.key,s)}catch(s){console.error(s)}}async start(){do{try{await this.render()}catch(e){console.error(e)}await this.sleep()}while(!0)}async sleep(){return await new Promise(requestAnimationFrame)}}const R=h=>(h.textRendering="optimizeSpeed",h.imageSmoothingEnabled=!1,h),c=class c{constructor(e,t,s,r){n(this,"glCanvas");n(this,"upper2dCanvas");n(this,"lower2dCanvas");n(this,"gl");n(this,"lower2d");n(this,"upper2d");n(this,"region");n(this,"dpr");n(this,"loop");n(this,"clearProgram");n(this,"os");this.upper2dCanvas=s,this.lower2dCanvas=t,this.glCanvas=e,this.os=r;const i=this.lower2dCanvas.getContext("2d");if(i==null)throw new Error("Could not get 2D context");this.lower2d=R(new u(i));const o=this.upper2dCanvas.getContext("2d");if(o==null)throw new Error("Could not get 2D context");this.upper2d=R(new u(o));const p={preserveDrawingBuffer:!0,powerPreference:"high-performance",stencil:!1,depth:!1},l=this.glCanvas.getContext("webgl2",p);if(l==null)throw new Error("Could not get WebGL context");l.disable(l.DEPTH_TEST),l.disable(l.STENCIL_TEST),l.disable(l.CULL_FACE),l.disable(l.DITHER),this.gl=l,this.glCanvas.oncontextlost=console.log;const f=()=>{this.gl.flush(),this.gl.finish()};this.loop=new O(f),this.region=a.Mo.ZERO,this.dpr=1,this.os==="Windows"&&(this.clearProgram=new k(this))}static create(e,t,s,r,i){const o=new c(t,s,r,i);return e.set(c.CONTEXT_KEY,o),o}static useOptional(e){return e.getOptional(c.CONTEXT_KEY)}static use(e){return e.get(c.CONTEXT_KEY)}update(e){e.set(c.CONTEXT_KEY,this)}resize(e,t){a.Mo.equals(this.region,e)&&this.dpr===t||(this.region=e,this.dpr=t,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,a.Mo.width(e)*t,a.Mo.height(e)*t))}resizeCanvas(e){e.width=a.Mo.width(this.region)*this.dpr,e.height=a.Mo.height(this.region)*this.dpr}get aspect(){return a.Mo.aspect(this.region)}scaleRegion(e){return new a.b.XY(a.b.Scale.scale(0,1).scale(a.Mo.width(e)).translate(a.Mo.left(e)).reBound(a.Mo.width(this.region)).scale(-1,1),a.b.Scale.scale(0,1).scale(a.Mo.height(e)).invert().translate(a.Mo.top(e)).reBound(a.Mo.height(this.region)).scale(-1,1).invert())}scissor(e,t=a.G.ZERO,s){const r=[];return s.includes("upper2d")&&r.push(this.upper2d.scissor(e,t)),s.includes("lower2d")&&r.push(this.lower2d.scissor(e,t)),s.includes("gl")&&r.push(this.scissorGL(e,t)),()=>r.forEach(i=>i())}scissorGL(e,t=a.G.ZERO){return this.gl.enable(this.gl.SCISSOR_TEST),e=d(e,t),this.gl.scissor(a.Mo.left(e)*this.dpr,(a.Mo.height(this.region)-a.Mo.bottom(e))*this.dpr,a.Mo.width(e)*this.dpr,a.Mo.height(e)*this.dpr),()=>this.gl.disable(this.gl.SCISSOR_TEST)}erase(e,t=a.G.ZERO,...s){t=a.G.construct(t),s.length===0&&(s=["upper2d","lower2d","gl"]),s.includes("upper2d")&&this.eraseCanvas(this.upper2d,e,t),s.includes("lower2d")&&this.eraseCanvas(this.lower2d,e,t),s.includes("gl")&&this.eraseGL(e,t)}eraseGL(e,t=a.G.ZERO){var i;const{gl:s}=this,r=this.scissorGL(d(e,t));s.clearColor(...a.ZERO.rgba1),s.clear(s.COLOR_BUFFER_BIT),this.os==="Windows"&&((i=this.clearProgram)==null||i.exec()),r()}eraseCanvas(e,t,s=a.G.ZERO){const r=d(t,s);e.clearRect(...a.G.couple(a.Mo.topLeft(r)),...a._.couple(a.Mo.dims(r)))}};n(c,"CONTEXT_KEY",a.CSS.B("render-context"));let g=c;const A=x.z.object({region:a.Mo.box,enabled:x.z.boolean().optional().default(!1)}),E=["gl","lower2d","upper2d"];class w extends _.Leaf{constructor(){super(...arguments);n(this,"schema",A)}async afterUpdate(t){this.deleted||(this.internal.renderCtx=g.use(t),await this.renderOnLifecycleChange())}async afterDelete(){await this.renderOnLifecycleChange()}async renderOnLifecycleChange(){await this.internal.renderCtx.loop.set({key:`${this.type}-${this.key}`,render:this.render.bind(this),priority:"high",canvases:E})}async render(){this.deleted||!this.state.enabled||this.internal.renderCtx.erase(this.state.region,a.G.construct(0),...E)}}n(w,"TYPE","eraser");const Y={[w.TYPE]:w};exports.Context=g;exports.Eraser=w;exports.GLProgram=b;exports.Loop=O;exports.REGISTRY=Y;exports.eraserStateZ=A;
11
+ `,C=h=>new Error(`failed to compile webgl program: ${h}`),B=new Error("null shader encountered");let b=class{constructor(e,t,s){n(this,"renderCtx");n(this,"prog");n(this,"vertShader");n(this,"fragShader");n(this,"uniformLocCache",new Map);this.renderCtx=e;const r=e.gl.createProgram();if(r==null)throw C("failed to create program");this.prog=r,this.vertShader=t,this.fragShader=s,this.compile()}setAsActive(){return this.renderCtx.gl.useProgram(this.prog),()=>this.renderCtx.gl.useProgram(null)}uniformXY(e,t){this.renderCtx.gl.uniform2fv(this.getUniformLoc(e),a.J.couple(t))}uniformColor(e,t){this.renderCtx.gl.uniform4fv(this.getUniformLoc(e),t.rgba1)}getUniformLoc(e){const t=this.uniformLocCache.get(e);if(t!=null)return t;const s=this.renderCtx.gl.getUniformLocation(this.prog,e);if(s==null)throw new Error(`unexpected missing uniform ${e}`);return this.uniformLocCache.set(e,s),s}compile(){const e=this.renderCtx.gl;this.compileShader(this.vertShader,e.VERTEX_SHADER),this.compileShader(this.fragShader,e.FRAGMENT_SHADER),e.linkProgram(this.prog)}compileShader(e,t){const s=this.renderCtx.gl,r=s.createShader(t);if(r==null)throw B;if(s.shaderSource(r,e),s.compileShader(r),!s.getShaderParameter(r,s.COMPILE_STATUS)){const o=s.getShaderInfoLog(r);throw s.deleteShader(r),C(o??"unknown")}s.attachShader(this.prog,r)}};const k=new Float32Array([0,0,0,0,0,0]);class G extends b{constructor(t){super(t,I,D);n(this,"positionBuffer");const s=t.gl.createBuffer();if(s==null)throw new _.Ze("webgl: failed to create buffer");this.positionBuffer=s,t.gl.bindBuffer(t.gl.ARRAY_BUFFER,this.positionBuffer),t.gl.bufferData(t.gl.ARRAY_BUFFER,k,t.gl.STATIC_DRAW)}exec(){const{gl:t}=this.renderCtx,s=t.getAttribLocation(this.prog,"a_position");t.bindBuffer(t.ARRAY_BUFFER,this.positionBuffer);const r=t.createVertexArray();t.bindVertexArray(r),t.enableVertexAttribArray(s),t.vertexAttribPointer(s,2,t.FLOAT,!1,0,0),this.setAsActive(),t.drawArrays(t.TRIANGLES,0,3)}}const S={high:1,low:0},T=v.$.hz(45);class O{constructor(e){n(this,"mutex",new _.Mutex);n(this,"requests",new Map);n(this,"cleanup",new Map);n(this,"afterRender");this.start(),this.afterRender=e}async set(e){let t;e.priority==="high"&&(t=await this.mutex.acquire());const s=this.requests.get(e.key);if(s==null)this.requests.set(e.key,e);else{const r=S[e.priority]>=S[s.priority],i=e.canvases.length>=s.canvases.length;r&&i&&this.requests.set(e.key,e)}t==null||t()}async render(){await this.mutex.runExclusive(async()=>{var i;const e=performance.now(),{requests:t}=this;if(t.size===0)return;await this.runCleanupsSync(),await this.renderSync();const s=performance.now(),r=v.w.milliseconds(s-e);r.greaterThan(T.period)&&console.warn(`Render loop for ${this.requests.size} took longer than ${T.period.toString()} to execute: ${r.milliseconds}`),this.requests.clear(),(i=this.afterRender)==null||i.call(this)})}async runCleanupsSync(){const{cleanup:e,requests:t}=this;for(const[s,r]of e.entries()){const i=t.get(s);i!=null&&(await r(i),e.delete(s))}}async renderSync(){const{requests:e}=this;for(const t of e.values())try{const s=await t.render();s!=null&&this.cleanup.set(t.key,s)}catch(s){console.error(s)}}async start(){do{try{await this.render()}catch(e){console.error(e)}await this.sleep()}while(!0)}async sleep(){return await new Promise(requestAnimationFrame)}}const R=h=>(h.textRendering="optimizeSpeed",h.imageSmoothingEnabled=!1,h),c=class c{constructor(e,t,s,r){n(this,"glCanvas");n(this,"upper2dCanvas");n(this,"lower2dCanvas");n(this,"gl");n(this,"lower2d");n(this,"upper2d");n(this,"region");n(this,"dpr");n(this,"loop");n(this,"clearProgram");n(this,"os");this.upper2dCanvas=s,this.lower2dCanvas=t,this.glCanvas=e,this.os=r;const i=this.lower2dCanvas.getContext("2d");if(i==null)throw new Error("Could not get 2D context");this.lower2d=R(new u(i));const o=this.upper2dCanvas.getContext("2d");if(o==null)throw new Error("Could not get 2D context");this.upper2d=R(new u(o));const p={preserveDrawingBuffer:!0,powerPreference:"high-performance",stencil:!1,depth:!1},l=this.glCanvas.getContext("webgl2",p);if(l==null)throw new Error("Could not get WebGL context");l.disable(l.DEPTH_TEST),l.disable(l.STENCIL_TEST),l.disable(l.CULL_FACE),l.disable(l.DITHER),this.gl=l,this.glCanvas.oncontextlost=console.log;const f=()=>{this.gl.flush(),this.gl.finish()};this.loop=new O(f),this.region=a.$t.ZERO,this.dpr=1,this.os==="Windows"&&(this.clearProgram=new G(this))}static create(e,t,s,r,i){const o=new c(t,s,r,i);return e.set(c.CONTEXT_KEY,o),o}static useOptional(e){return e.getOptional(c.CONTEXT_KEY)}static use(e){return e.get(c.CONTEXT_KEY)}update(e){e.set(c.CONTEXT_KEY,this)}resize(e,t){a.$t.equals(this.region,e)&&this.dpr===t||(this.region=e,this.dpr=t,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,a.$t.width(e)*t,a.$t.height(e)*t))}resizeCanvas(e){e.width=a.$t.width(this.region)*this.dpr,e.height=a.$t.height(this.region)*this.dpr}get aspect(){return a.$t.aspect(this.region)}scaleRegion(e){return new a.b.XY(a.b.Scale.scale(0,1).scale(a.$t.width(e)).translate(a.$t.left(e)).reBound(a.$t.width(this.region)).scale(-1,1),a.b.Scale.scale(0,1).scale(a.$t.height(e)).invert().translate(a.$t.top(e)).reBound(a.$t.height(this.region)).scale(-1,1).invert())}scissor(e,t=a.J.ZERO,s){const r=[];return s.includes("upper2d")&&r.push(this.upper2d.scissor(e,t)),s.includes("lower2d")&&r.push(this.lower2d.scissor(e,t)),s.includes("gl")&&r.push(this.scissorGL(e,t)),()=>r.forEach(i=>i())}scissorGL(e,t=a.J.ZERO){return this.gl.enable(this.gl.SCISSOR_TEST),e=d(e,t),this.gl.scissor(a.$t.left(e)*this.dpr,(a.$t.height(this.region)-a.$t.bottom(e))*this.dpr,a.$t.width(e)*this.dpr,a.$t.height(e)*this.dpr),()=>this.gl.disable(this.gl.SCISSOR_TEST)}erase(e,t=a.J.ZERO,...s){t=a.J.construct(t),s.length===0&&(s=["upper2d","lower2d","gl"]),s.includes("upper2d")&&this.eraseCanvas(this.upper2d,e,t),s.includes("lower2d")&&this.eraseCanvas(this.lower2d,e,t),s.includes("gl")&&this.eraseGL(e,t)}eraseGL(e,t=a.J.ZERO){var i;const{gl:s}=this,r=this.scissorGL(d(e,t));s.clearColor(...a.ZERO.rgba1),s.clear(s.COLOR_BUFFER_BIT),this.os==="Windows"&&((i=this.clearProgram)==null||i.exec()),r()}eraseCanvas(e,t,s=a.J.ZERO){const r=d(t,s);e.clearRect(...a.J.couple(a.$t.topLeft(r)),...a._.couple(a.$t.dims(r)))}};n(c,"CONTEXT_KEY",a.CSS.B("render-context"));let g=c;const A=x.z.object({region:a.$t.box,enabled:x.z.boolean().optional().default(!1)}),E=["gl","lower2d","upper2d"];class w extends _.Leaf{constructor(){super(...arguments);n(this,"schema",A)}async afterUpdate(t){this.deleted||(this.internal.renderCtx=g.use(t),await this.renderOnLifecycleChange())}async afterDelete(){await this.renderOnLifecycleChange()}async renderOnLifecycleChange(){await this.internal.renderCtx.loop.set({key:`${this.type}-${this.key}`,render:this.render.bind(this),priority:"high",canvases:E})}async render(){this.deleted||!this.state.enabled||this.internal.renderCtx.erase(this.state.region,a.J.construct(0),...E)}}n(w,"TYPE","eraser");const Y={[w.TYPE]:w};exports.Context=g;exports.Eraser=w;exports.GLProgram=b;exports.Loop=O;exports.REGISTRY=Y;exports.eraserStateZ=A;
@@ -1,10 +1,10 @@
1
1
  var b = Object.defineProperty;
2
2
  var A = (h, e, t) => e in h ? b(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t;
3
3
  var o = (h, e, t) => A(h, typeof e != "symbol" ? e + "" : e, t);
4
- import { $ as L, i as P } from "./state-CUPEHHgf.js";
4
+ import { $ as L, w as P } from "./index-CSKP1UPN.js";
5
5
  import { z as y } from "zod";
6
- import { M as D, d as I, L as B } from "./provider-Dq9t3iAH.js";
7
- import { M as n, r as u, G as p, _ as O, C as k, Z as G } from "./css-rxwBYwM1.js";
6
+ import { Z as D, M as I, L as B } from "./provider-CH0eoGfz.js";
7
+ import { $ as n, q as u, J as p, _ as O, C as k, Z as G } from "./css-Dyt-QnKy.js";
8
8
  const g = (h, e) => n.construct(
9
9
  n.left(h) - e.x,
10
10
  n.top(h) - e.y,
@@ -575,7 +575,7 @@ let N = class {
575
575
  }
576
576
  };
577
577
  const q = new Float32Array([0, 0, 0, 0, 0, 0]);
578
- class K extends N {
578
+ class Z extends N {
579
579
  constructor(t) {
580
580
  super(t, z, F);
581
581
  o(this, "positionBuffer");
@@ -591,7 +591,7 @@ class K extends N {
591
591
  }
592
592
  }
593
593
  const T = { high: 1, low: 0 }, R = L.hz(45);
594
- class U {
594
+ class K {
595
595
  constructor(e) {
596
596
  /** To lock things so renders don't collide */
597
597
  o(this, "mutex", new I());
@@ -713,7 +713,7 @@ const E = (h) => (h.textRendering = "optimizeSpeed", h.imageSmoothingEnabled = !
713
713
  const f = () => {
714
714
  this.gl.flush(), this.gl.finish();
715
715
  };
716
- this.loop = new U(f), this.region = n.ZERO, this.dpr = 1, this.os === "Windows" && (this.clearProgram = new K(this));
716
+ this.loop = new K(f), this.region = n.ZERO, this.dpr = 1, this.os === "Windows" && (this.clearProgram = new Z(this));
717
717
  }
718
718
  static create(e, t, s, i, r) {
719
719
  const a = new d(t, s, i, r);
@@ -782,14 +782,14 @@ const E = (h) => (h.textRendering = "optimizeSpeed", h.imageSmoothingEnabled = !
782
782
  };
783
783
  o(d, "CONTEXT_KEY", k.B("render-context"));
784
784
  let _ = d;
785
- const M = y.object({
785
+ const U = y.object({
786
786
  region: n.box,
787
787
  enabled: y.boolean().optional().default(!1)
788
788
  }), v = ["gl", "lower2d", "upper2d"];
789
789
  class x extends B {
790
790
  constructor() {
791
791
  super(...arguments);
792
- o(this, "schema", M);
792
+ o(this, "schema", U);
793
793
  }
794
794
  async afterUpdate(t) {
795
795
  this.deleted || (this.internal.renderCtx = _.use(t), await this.renderOnLifecycleChange());
@@ -817,7 +817,7 @@ export {
817
817
  _ as C,
818
818
  x as E,
819
819
  N as G,
820
- U as L,
820
+ K as L,
821
821
  Q as R,
822
- M as e
822
+ U as e
823
823
  };
package/dist/ether.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./provider-BrBEjlx5.cjs"),r=require("./css-CU7tous7.cjs"),a=require("./transformColorsToHex-B2Bui-Wf.cjs");require("./state-LaBGf4_k.cjs");const e=require("./value-C6JZdCF2.cjs"),i=require("./aggregator-QqWwGnYH.cjs"),o=require("./eraser-D2I1qgOg.cjs"),s=require("./fontString-C7H8Imxd.cjs"),T=Object.freeze(Object.defineProperty({__proto__:null,Color:r.Color,ZERO:r.ZERO,crudeZ:r.crudeZ,cssString:r.cssString,fromGradient:r.fromGradient,fromHSLA:r.fromHSLA,gradientZ:r.gradientZ,paletteZ:r.paletteZ,stopZ:r.stopZ,toHex:r.toHex,transformColorsToHex:a.transformColorsToHex},Symbol.toStringTag,{value:"Module"})),u=Object.freeze(Object.defineProperty({__proto__:null,Provider:t.Provider,REGISTRY:t.REGISTRY,SYNNAX_DARK:t.SYNNAX_DARK,SYNNAX_LIGHT:t.SYNNAX_LIGHT,SYNNAX_THEMES:t.SYNNAX_THEMES,fontSpecZ:t.fontSpecZ,fontString:s.fontString,themeZ:t.themeZ,use:t.use},Symbol.toStringTag,{value:"Module"})),E=Object.freeze(Object.defineProperty({__proto__:null,Context:o.Context,Controller:e.Controller,GLProgram:o.GLProgram,Loop:o.Loop,REASON_DATA:e.REASON_DATA,REASON_LAYOUT:e.REASON_LAYOUT,REASON_TOOL:e.REASON_TOOL},Symbol.toStringTag,{value:"Module"})),c=Object.freeze(Object.defineProperty({__proto__:null,LinePlot:e.LinePlot,REGISTRY:e.REGISTRY,XAxis:e.XAxis,YAxis:e.YAxis,linePlotStateZ:e.linePlotStateZ,xAxisStateZ:e.xAxisStateZ,yAxisStateZ:e.yAxisStateZ},Symbol.toStringTag,{value:"Module"})),Y=()=>{const n=new t.l((l,R)=>postMessage(l,R));onmessage=n.handle.bind(n);const S={...e.REGISTRY$18,...e.REGISTRY$17,...e.REGISTRY$16,...e.REGISTRY$15,...e.REGISTRY$14,...o.REGISTRY,...e.REGISTRY$13,...e.REGISTRY$12,...e.REGISTRY,...e.REGISTRY$11,...e.REGISTRY$10,...e.REGISTRY$9,...e.REGISTRY$8,...i.REGISTRY,...e.REGISTRY$7,...e.REGISTRY$6,...t.REGISTRY,...e.REGISTRY$5,...e.REGISTRY$4,...e.REGISTRY$3,...e.REGISTRY$2,...e.REGISTRY$1};t.render({comms:n.route("vis"),registry:S})},G=Object.freeze(Object.defineProperty({__proto__:null,render:Y},Symbol.toStringTag,{value:"Module"}));exports.aether=t.aether;exports.canvas=e.canvas;exports.diagram=e.Diagram;exports.measure=e.measure;exports.rule=e.aether;exports.synnax=e.provider;exports.telem=e.external;exports.tooltip=e.tooltip;exports.value=e.value;exports.color=T;exports.lineplot=c;exports.pluto=G;exports.render=E;exports.theming=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./provider-D054LCpB.cjs"),r=require("./css-Cj2UCGXB.cjs"),a=require("./transformColorsToHex-DE7uEs1w.cjs");require("./index-Ch3utIMa.cjs");const e=require("./value-DT0qJqgQ.cjs"),i=require("./aggregator-74jWxDne.cjs");require("./state-Bd_8X2jl.cjs");const o=require("./eraser-9-LOWZvk.cjs"),s=require("./fontString-BBvH9Ypy.cjs"),T=Object.freeze(Object.defineProperty({__proto__:null,Color:r.Color,ZERO:r.ZERO,crudeZ:r.crudeZ,cssString:r.cssString,fromGradient:r.fromGradient,fromHSLA:r.fromHSLA,gradientZ:r.gradientZ,paletteZ:r.paletteZ,stopZ:r.stopZ,toHex:r.toHex,transformColorsToHex:a.transformColorsToHex},Symbol.toStringTag,{value:"Module"})),u=Object.freeze(Object.defineProperty({__proto__:null,Provider:t.Provider,REGISTRY:t.REGISTRY,SYNNAX_DARK:t.SYNNAX_DARK,SYNNAX_LIGHT:t.SYNNAX_LIGHT,SYNNAX_THEMES:t.SYNNAX_THEMES,fontSpecZ:t.fontSpecZ,fontString:s.fontString,themeZ:t.themeZ,use:t.use},Symbol.toStringTag,{value:"Module"})),E=Object.freeze(Object.defineProperty({__proto__:null,Context:o.Context,Controller:e.Controller,GLProgram:o.GLProgram,Loop:o.Loop,REASON_DATA:e.REASON_DATA,REASON_LAYOUT:e.REASON_LAYOUT,REASON_TOOL:e.REASON_TOOL},Symbol.toStringTag,{value:"Module"})),c=Object.freeze(Object.defineProperty({__proto__:null,LinePlot:e.LinePlot,REGISTRY:e.REGISTRY,XAxis:e.XAxis,YAxis:e.YAxis,linePlotStateZ:e.linePlotStateZ,xAxisStateZ:e.xAxisStateZ,yAxisStateZ:e.yAxisStateZ},Symbol.toStringTag,{value:"Module"})),Y=()=>{const n=new t.l((l,R)=>postMessage(l,R));onmessage=n.handle.bind(n);const S={...e.REGISTRY$18,...e.REGISTRY$17,...e.REGISTRY$16,...e.REGISTRY$15,...e.REGISTRY$14,...o.REGISTRY,...e.REGISTRY$13,...e.REGISTRY$12,...e.REGISTRY,...e.REGISTRY$11,...e.REGISTRY$10,...e.REGISTRY$9,...e.REGISTRY$8,...i.REGISTRY,...e.REGISTRY$7,...e.REGISTRY$6,...t.REGISTRY,...e.REGISTRY$5,...e.REGISTRY$4,...e.REGISTRY$3,...e.REGISTRY$2,...e.REGISTRY$1};t.render({comms:n.route("vis"),registry:S})},G=Object.freeze(Object.defineProperty({__proto__:null,render:Y},Symbol.toStringTag,{value:"Module"}));exports.aether=t.aether;exports.canvas=e.canvas;exports.diagram=e.Diagram;exports.measure=e.measure;exports.rule=e.aether;exports.synnax=e.provider;exports.telem=e.external;exports.tooltip=e.tooltip;exports.value=e.value;exports.color=T;exports.lineplot=c;exports.pluto=G;exports.render=E;exports.theming=u;
package/dist/ether.js CHANGED
@@ -1,14 +1,15 @@
1
- import { P as R, R as e, S as n, a as l, b as S, f as i, t as m, u as T, l as p, r as E } from "./provider-Dq9t3iAH.js";
2
- import { c as ua } from "./provider-Dq9t3iAH.js";
3
- import { a as G, Z as Y, h as c, c as f, j as $, k as _, o as I, p as u, s as d, q as g } from "./css-rxwBYwM1.js";
4
- import { t as b } from "./transformColorsToHex-B6dG2LA6.js";
5
- import "./state-CUPEHHgf.js";
6
- import { C as x, R as O, a as A, b as y, L as j, c as s, X as v, Y as P, l as Z, x as L, y as N, d as h, e as M, f as z, g as C, h as H, i as X, j as k, k as w, m as D, n as q, o as B, p as F, q as K, r as U, s as J, t as Q, u as V, v as W } from "./value-Dk2DJbst.js";
7
- import { A as ga, D as ba, E as xa, F as Oa, w as Aa, z as ya, B as ja, G as va } from "./value-Dk2DJbst.js";
8
- import { R as aa } from "./aggregator-AgOKLWHz.js";
9
- import { C as ea, G as sa, L as oa, R as ta } from "./eraser-Dmishn8h.js";
10
- import { f as ra } from "./fontString-DdV9bi9l.js";
11
- const Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1
+ import { P as R, R as e, S as n, a as l, b as S, f as i, t as m, u as T, l as p, r as E } from "./provider-CH0eoGfz.js";
2
+ import { c as da } from "./provider-CH0eoGfz.js";
3
+ import { a as G, Z as Y, j as c, c as f, k as $, l as _, m as I, p as u, s as d, o as g } from "./css-Dyt-QnKy.js";
4
+ import { t as b } from "./transformColorsToHex-UBrryWh5.js";
5
+ import "./index-CSKP1UPN.js";
6
+ import { C as x, R as O, a as A, b as y, L as j, c as s, X as v, Y as P, l as Z, x as L, y as N, d as M, e as h, f as z, g as C, h as H, i as X, j as k, k as w, m as D, n as q, o as B, p as F, q as K, r as U, s as J, t as Q, u as V, v as W } from "./value-CudL8z5e.js";
7
+ import { A as ba, D as xa, E as Oa, F as Aa, w as ya, z as ja, B as va, G as Pa } from "./value-CudL8z5e.js";
8
+ import { R as aa } from "./aggregator-DMvP8cai.js";
9
+ import "./state-CjGemC7S.js";
10
+ import { C as ea, G as sa, L as oa, R as ta } from "./eraser-BjtEI-1I.js";
11
+ import { f as ra } from "./fontString-C7Q9Laqk.js";
12
+ const Ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12
13
  __proto__: null,
13
14
  Color: G,
14
15
  ZERO: Y,
@@ -21,7 +22,7 @@ const Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
21
22
  stopZ: d,
22
23
  toHex: g,
23
24
  transformColorsToHex: b
24
- }, Symbol.toStringTag, { value: "Module" })), Ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
25
+ }, Symbol.toStringTag, { value: "Module" })), ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
25
26
  __proto__: null,
26
27
  Provider: R,
27
28
  REGISTRY: e,
@@ -32,7 +33,7 @@ const Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32
33
  fontString: ra,
33
34
  themeZ: m,
34
35
  use: T
35
- }, Symbol.toStringTag, { value: "Module" })), ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
36
+ }, Symbol.toStringTag, { value: "Module" })), fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
36
37
  __proto__: null,
37
38
  Context: ea,
38
39
  Controller: x,
@@ -41,7 +42,7 @@ const Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41
42
  REASON_DATA: O,
42
43
  REASON_LAYOUT: A,
43
44
  REASON_TOOL: y
44
- }, Symbol.toStringTag, { value: "Module" })), fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45
+ }, Symbol.toStringTag, { value: "Module" })), $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45
46
  __proto__: null,
46
47
  LinePlot: j,
47
48
  REGISTRY: s,
@@ -74,27 +75,27 @@ const Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
74
75
  ...H,
75
76
  ...C,
76
77
  ...z,
77
- ...M,
78
- ...h
78
+ ...h,
79
+ ...M
79
80
  };
80
81
  E({ comms: a.route("vis"), registry: o });
81
- }, $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82
+ }, _a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82
83
  __proto__: null,
83
84
  render: Ra
84
85
  }, Symbol.toStringTag, { value: "Module" }));
85
86
  export {
86
- ua as aether,
87
- ga as canvas,
88
- Ga as color,
89
- ba as diagram,
90
- fa as lineplot,
91
- xa as measure,
92
- $a as pluto,
93
- ca as render,
94
- Oa as rule,
95
- Aa as synnax,
96
- ya as telem,
97
- Ya as theming,
98
- ja as tooltip,
99
- va as value
87
+ da as aether,
88
+ ba as canvas,
89
+ Ya as color,
90
+ xa as diagram,
91
+ $a as lineplot,
92
+ Oa as measure,
93
+ _a as pluto,
94
+ fa as render,
95
+ Aa as rule,
96
+ ya as synnax,
97
+ ja as telem,
98
+ ca as theming,
99
+ va as tooltip,
100
+ Pa as value
100
101
  };
@@ -1 +1 @@
1
- "use strict";const t=require("./ContextMenu-CNSewKSD.cjs"),e=require("./Item-CpAZC-dF.cjs"),n=Object.freeze(Object.defineProperty({__proto__:null,CONTEXT_SELECTED:t.CONTEXT_SELECTED,CONTEXT_TARGET:t.CONTEXT_TARGET,ContextMenu:t.ContextMenu,CoreItem:e.CoreItem,Divider:e.Divider,Item:e.Item,ItemIcon:e.ItemIcon,ItemLink:e.ItemLink,Menu:e.Menu,useContext:e.useContext,useContextMenu:t.useContextMenu},Symbol.toStringTag,{value:"Module"}));exports.external=n;
1
+ "use strict";const t=require("./ContextMenu-DCxj35_j.cjs"),e=require("./Item-piF6rFAm.cjs"),n=Object.freeze(Object.defineProperty({__proto__:null,CONTEXT_SELECTED:t.CONTEXT_SELECTED,CONTEXT_TARGET:t.CONTEXT_TARGET,ContextMenu:t.ContextMenu,CoreItem:e.CoreItem,Divider:e.Divider,Item:e.Item,ItemIcon:e.ItemIcon,ItemLink:e.ItemLink,Menu:e.Menu,useContext:e.useContext,useContextMenu:t.useContextMenu},Symbol.toStringTag,{value:"Module"}));exports.external=n;
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./Center-sJghNsrv.cjs"),a=require("./Pack-D6Z6WuZl.cjs"),e=require("./Space-BtaH1buB.cjs"),r=require("./jsx-runtime-CITbqOLs.cjs");require("./Stack-BbwDtaE6.cjs");require("./index-Ch3utIMa.cjs");const u=require("./css-Cj2UCGXB.cjs"),S=require("./toArray-DRKOku1s.cjs"),l=({className:p,children:t,...s})=>{const c=S.A(t);return r.jsxRuntimeExports.jsxs(e.Space,{x:!0,className:u.CSS.B("stack"),...s,children:[r.jsxRuntimeExports.jsx("div",{}),c.map((n,o)=>r.jsxRuntimeExports.jsx("div",{children:n},o))]})},x=Object.freeze(Object.defineProperty({__proto__:null,ALIGNMENTS:e.ALIGNMENTS,Center:i.Center,Core:e.Core,JUSTIFICATIONS:e.JUSTIFICATIONS,Pack:a.Pack,Space:e.Space,Stack:l,parseDirection:e.parseDirection,shouldReverse:e.shouldReverse},Symbol.toStringTag,{value:"Module"}));exports.external=x;
@@ -0,0 +1 @@
1
+ "use strict";const o=require("./jsx-runtime-CITbqOLs.cjs"),g=require("./Divider-CloQr3vQ.cjs");require("./index-Ch3utIMa.cjs");const a=require("react");require("./Stack-BbwDtaE6.cjs");const k=require("./Space-BtaH1buB.cjs"),r=require("./css-Cj2UCGXB.cjs"),H=require("./Pack-D6Z6WuZl.cjs"),L=require("./Toggle-BKKBcuTj.cjs"),Q=require("./deep-ICSlPm58.cjs"),T=require("./ContextMenu-DCxj35_j.cjs");require("./Item-piF6rFAm.cjs");const z=require("./state-Bd_8X2jl.cjs"),C=require("zod"),O=(e,s)=>a.cloneElement(e,{className:r.CSS(e.props.className,r.CSS.B("sub"),r.CSS.M(s))}),P=({topRight:e,topLeft:s,bottomLeft:t,bottomRight:l,children:n,className:c,...u})=>o.jsxRuntimeExports.jsxs("div",{className:r.CSS(c,r.CSS.B("icon")),...u,children:[e&&O(e,"topRight"),s&&O(s,"topLeft"),t&&O(t,"bottomLeft"),l&&O(l,"bottomRight"),n]}),Y=e=>o.jsxRuntimeExports.jsx(P,{topRight:o.jsxRuntimeExports.jsx(g.y4.Add,{}),...e}),K=e=>o.jsxRuntimeExports.jsx(P,{topRight:o.jsxRuntimeExports.jsx(g.y4.Import,{}),...e}),B=(e,s)=>{if(e!=null){if(typeof e=="string")try{const t=Q.I.get(g.y4,e);return o.jsxRuntimeExports.jsx(t,{...s})}catch{throw new Error(`Unable to find icon with path ${e} in registry`)}return a.cloneElement(e,s)}},ee=Object.freeze(Object.defineProperty({__proto__:null,Create:Y,Icon:P,Import:K,resolve:B},Symbol.toStringTag,{value:"Module"})),$=a.createContext({tabs:[]}),D=$,I=()=>a.use($),q="tabs-selector",A=({className:e,altColor:s=!1,size:t="medium",direction:l="x",contextMenu:n,addTooltip:c,...u})=>{const{tabs:x,selected:d,onSelect:m,onClose:R,closable:E,onDragEnd:b,onDragStart:v,onDrop:S,onRename:y,onCreate:h}=I(),f=T.useContextMenu(),[N,j]=a.useState(!1);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[n!=null&&o.jsxRuntimeExports.jsx(T.ContextMenu,{style:{height:"fit-content"},...f,menu:n}),o.jsxRuntimeExports.jsxs(k.Space,{className:r.CSS(r.CSS.B(q),r.CSS.size(t),e,f.className,N&&r.CSS.M("drag-over")),align:"center",justify:"spaceBetween",empty:!0,direction:l,onContextMenu:f.open,onDrop:S,...u,children:[o.jsxRuntimeExports.jsxs(k.Space,{direction:l,className:r.CSS.BE(q,"tabs"),empty:!0,children:[x.map(i=>o.jsxRuntimeExports.jsx(ne,{selected:d,altColor:s,onSelect:m,onClose:R,onDragStart:v,onDragEnd:b,onRename:y,closable:i.closable??E,size:t,...i},i.tabKey)),S!=null&&o.jsxRuntimeExports.jsx(k.Space,{onDragOver:()=>j(!0),onDragLeave:()=>j(!1),onDragEnd:()=>j(!1),onDrop:()=>j(!1),grow:!0})]}),h!=null&&o.jsxRuntimeExports.jsx(k.Space,{className:r.CSS.BE(q,"actions"),children:o.jsxRuntimeExports.jsx(L.Icon,{size:t,sharp:!0,onClick:h,tooltip:c,children:o.jsxRuntimeExports.jsx(g.y4.Add,{})})})]})]})},te=({unsavedChanges:e,...s})=>{const t=o.jsxRuntimeExports.jsx(g.y4.Close,{...s});return e?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(g.y4.Circle,{}),t]}):t},se=e=>{const s=r.$t.construct(e.target.closest(".pluto-tabs-selector__btn")),t=r.J.construct(e);return r.b.Scale.scale(r.$t.left(s),r.$t.right(s)).scale(0,1).pos(t.x)<.5?"left":"right"},ne=({selected:e,altColor:s=!1,onSelect:t,onClose:l,tabKey:n,name:c,onDragStart:u,onDragEnd:x,onRename:d,closable:m=!0,icon:R,size:E,editable:b=!0,unsavedChanges:v=!1,onDrop:S})=>{const y=a.useCallback(p=>u==null?void 0:u(p,{tabKey:n,name:c}),[u,n,c]),h=a.useCallback(p=>x==null?void 0:x(p,{tabKey:n,name:c}),[x,n,c]),f=a.useCallback(p=>{p.preventDefault(),p.stopPropagation(),l==null||l(n)},[l,n]),N=a.useCallback(()=>t==null?void 0:t(n),[t,n]),[j,i]=a.useState(null),_=a.useCallback(p=>{i(se(p))},[i,S]),U=a.useCallback(p=>{S==null||S(p),i(null)},[S,i]),w=e===n,M=z.ComponentSizeLevels[E];return o.jsxRuntimeExports.jsxs(H.Pack,{size:E,id:n,className:r.CSS(r.CSS.BE(q,"btn"),T.CONTEXT_TARGET,w&&T.CONTEXT_SELECTED,r.CSS.selected(w),r.CSS.altColor(s),m&&l!=null&&r.CSS.M("closable"),r.CSS.editable(b&&d!=null),j!=null&&r.CSS.M("drag-over"),j!=null&&r.CSS.loc(j)),draggable:!0,x:!0,justify:"center",align:"center",onClick:N,onDragOver:_,onDrop:U,onDragLeave:()=>i(null),onDragStart:y,onDragEnd:p=>{i(null),h(p)},bordered:!1,rounded:!1,children:[B(R,{className:r.CSS.BE(q,"icon"),style:{color:r.CSS.shadeVar(9),height:r.CSS.levelSizeVar(M),width:r.CSS.levelSizeVar(M)}}),o.jsxRuntimeExports.jsx(re,{name:c,tabKey:n,onRename:d,editable:b,level:z.ComponentSizeLevels[E]}),m&&l!=null&&o.jsxRuntimeExports.jsx(L.Icon,{"aria-label":"pluto-tabs__close",onClick:f,className:r.CSS.E("close"),children:o.jsxRuntimeExports.jsx(te,{unsavedChanges:v})})]})},re=({onRename:e,name:s,tabKey:t,editable:l=!0,...n})=>e==null||!l?o.jsxRuntimeExports.jsx(g.Text,{noWrap:!0,...n,children:s}):o.jsxRuntimeExports.jsx(g.Editable,{id:r.CSS.B(`tab-${t}`),onChange:c=>e(t,c),value:s,noWrap:!0,...n}),V=(e="",s=[])=>{var t;if(s.length!==0)return s.find(l=>l.tabKey===e)!=null?e:(t=s[s.length-1])==null?void 0:t.tabKey},Z=(e,s,t)=>{if(s=s.trim(),s.length===0)return t;const l=t.find(n=>n.tabKey===e);return l==null||l.name===s?t:t.map(n=>n.tabKey===e?{...n,name:s}:n)},F=({tabs:e,content:s,selected:t,onSelect:l})=>{var d;const[n,c]=z.usePurePassthrough({initial:t??((d=e[0])==null?void 0:d.tabKey)??"",value:t,onChange:l}),u=g.useSyncedRef(t??n),x=a.useCallback(m=>{c(m),u.current==null&&(l==null||l(m))},[n,l]);return{tabs:e,selected:n,content:s,onSelect:x}},W=({id:e,content:s,children:t,onSelect:l,selected:n,selectedAltColor:c,closable:u,tabs:x,onClose:d,onDragStart:m,onDragEnd:R,onCreate:E,onRename:b,emptyContent:v,className:S,onDragOver:y,onDrop:h,contextMenu:f,addTooltip:N,size:j="medium",direction:i="y",..._})=>o.jsxRuntimeExports.jsx(k.Space,{id:e,empty:!0,className:r.CSS(r.CSS.B("tabs"),S),onDragOver:y,onDrop:h,direction:i,..._,children:o.jsxRuntimeExports.jsxs(D,{value:{tabs:x,emptyContent:v,selected:n,closable:u,content:t??s,onSelect:l,onClose:d,onDragStart:m,onDragEnd:R,onRename:b,onCreate:E,onDrop:h},children:[o.jsxRuntimeExports.jsx(A,{size:j,direction:r.g.swap(i),altColor:c,contextMenu:f,addTooltip:N}),o.jsxRuntimeExports.jsx(X,{})]})}),X=()=>{const{tabs:e,selected:s,content:t,emptyContent:l,onSelect:n}=I();let c=null;const u=e.find(x=>x.tabKey===s);return s==null||u==null?c=l??null:t!=null?typeof t=="function"?c=t(u):c=t:u.content!=null&&(c=u.content),o.jsxRuntimeExports.jsx("div",{className:r.CSS.B("tabs-content"),onClick:()=>s!=null&&(n==null?void 0:n(s)),children:c})},G=C.z.object({tabKey:C.z.string(),name:C.z.string(),closable:C.z.boolean().optional(),icon:C.z.unknown().optional(),editable:C.z.boolean().optional(),visible:C.z.boolean().optional(),unsavedChanges:C.z.boolean().optional()}),J=G.extend({content:C.z.unknown().optional()}),oe=Object.freeze(Object.defineProperty({__proto__:null,Content:X,Provider:D,Selector:A,Tabs:W,rename:Z,resetSelection:V,specZ:G,tabZ:J,useContext:I,useStatic:F},Symbol.toStringTag,{value:"Module"}));exports.Icon=ee;exports.Tabs=W;exports.external=oe;exports.rename=Z;exports.resetSelection=V;exports.resolve=B;exports.tabZ=J;exports.useStatic=F;
@@ -1,15 +1,16 @@
1
- import { a as ce, b as Ye, T, c as We, C as ze, D as He, H as Ve, I as Ue, L as Ge, S as Je, s as Qe, d as Xe, e as Ze, f as qe, g as et, h as tt, i as st, u as rt, j as nt, k as it, l as ut } from "./Text-B7AC8Z1e.js";
1
+ import { a as ce, b as Ye, T, c as We, C as ze, D as He, H as Ve, I as Ue, L as Ge, S as Je, s as Qe, d as Xe, e as Ze, f as qe, g as et, h as tt, i as st, u as rt, j as nt, k as it, l as ut } from "./Text-3PiRcn8q.js";
2
2
  import { j as C } from "./jsx-runtime-C5mzlN2N.js";
3
3
  import { useCallback as X, useRef as H, useEffect as de } from "react";
4
- import { S as ct, k as De } from "./state-CUPEHHgf.js";
5
- import { u as Me } from "./useDebouncedCallback-D4Ec7whQ.js";
6
- import { T as Be } from "./Text-C-o1z9sP.js";
7
- import { f as ot, d as at } from "./Divider-CMyzWvRC.js";
8
- import "./aggregator-AgOKLWHz.js";
9
- import "./Pack-D50qN0Vu.js";
10
- import "./css-rxwBYwM1.js";
11
- import "./Toggle-v77mEVLE.js";
12
- const _e = Symbol(), oe = Symbol(), L = "a", N = "w";
4
+ import { S as ct } from "./index-CSKP1UPN.js";
5
+ import { c as De } from "./state-CjGemC7S.js";
6
+ import { u as Me } from "./useDebouncedCallback-Dg4BDGP-.js";
7
+ import { T as Be } from "./Text-CaRMYy3U.js";
8
+ import { d as ot, y as at } from "./Divider-Bpe7zJig.js";
9
+ import "./aggregator-DMvP8cai.js";
10
+ import "./Stack-D50qN0Vu.js";
11
+ import "./css-Dyt-QnKy.js";
12
+ import "./Toggle-CZd8L4GI.js";
13
+ const _e = Symbol(), oe = Symbol(), k = "a", N = "w";
13
14
  let lt = (t, e) => new Proxy(t, e);
14
15
  const Z = Object.getPrototypeOf, ge = /* @__PURE__ */ new WeakMap(), ae = (t) => t && (ge.has(t) ? ge.get(t) : Z(t) === Object.prototype || Z(t) === Array.prototype), pe = (t) => typeof t == "object" && t !== null, Ae = /* @__PURE__ */ new WeakMap(), Se = (t) => t[oe] || t, xe = (t, e, s) => {
15
16
  if (!ae(t)) return t;
@@ -20,14 +21,14 @@ const Z = Object.getPrototypeOf, ge = /* @__PURE__ */ new WeakMap(), ae = (t) =>
20
21
  let a = !1;
21
22
  const l = (h, f) => {
22
23
  if (!a) {
23
- let p = o[L].get(u);
24
- if (p || (p = {}, o[L].set(u, p)), h === N) p[N] = !0;
24
+ let p = o[k].get(u);
25
+ if (p || (p = {}, o[k].set(u, p)), h === N) p[N] = !0;
25
26
  else {
26
27
  let A = p[h];
27
28
  A || (A = /* @__PURE__ */ new Set(), p[h] = A), A.add(f);
28
29
  }
29
30
  }
30
- }, g = { get: (h, f) => f === oe ? u : (l("k", f), xe(Reflect.get(h, f), o[L], o.c)), has: (h, f) => f === _e ? (a = !0, o[L].delete(u), !0) : (l("h", f), Reflect.has(h, f)), getOwnPropertyDescriptor: (h, f) => (l("o", f), Reflect.getOwnPropertyDescriptor(h, f)), ownKeys: (h) => (l(N), Reflect.ownKeys(h)) };
31
+ }, g = { get: (h, f) => f === oe ? u : (l("k", f), xe(Reflect.get(h, f), o[k], o.c)), has: (h, f) => f === _e ? (a = !0, o[k].delete(u), !0) : (l("h", f), Reflect.has(h, f)), getOwnPropertyDescriptor: (h, f) => (l("o", f), Reflect.getOwnPropertyDescriptor(h, f)), ownKeys: (h) => (l(N), Reflect.ownKeys(h)) };
31
32
  return c && (g.set = g.deleteProperty = () => !1), [g, o];
32
33
  })(r, n), i[1].p = lt(n ? ((u) => {
33
34
  let c = Ae.get(u);
@@ -42,7 +43,7 @@ const Z = Object.getPrototypeOf, ge = /* @__PURE__ */ new WeakMap(), ae = (t) =>
42
43
  Ae.set(u, c);
43
44
  }
44
45
  return c;
45
- })(r) : r, i[0]), s && s.set(r, i)), i[1][L] = e, i[1].c = s, i[1].p;
46
+ })(r) : r, i[0]), s && s.set(r, i)), i[1][k] = e, i[1].c = s, i[1].p;
46
47
  }, Re = (t, e, s, r) => {
47
48
  if (Object.is(t, e)) return !1;
48
49
  if (!pe(t) || !pe(e)) return !0;
@@ -381,11 +382,11 @@ class le {
381
382
  };
382
383
  }
383
384
  }
384
- function ke(t, e, { getFn: s = d.getFn, fieldNormWeight: r = d.fieldNormWeight } = {}) {
385
+ function Le(t, e, { getFn: s = d.getFn, fieldNormWeight: r = d.fieldNormWeight } = {}) {
385
386
  const n = new le({ getFn: s, fieldNormWeight: r });
386
387
  return n.setKeys(t.map(Pe)), n.setSources(e), n.create(), n;
387
388
  }
388
- function kt(t, { getFn: e = d.getFn, fieldNormWeight: s = d.fieldNormWeight } = {}) {
389
+ function Lt(t, { getFn: e = d.getFn, fieldNormWeight: s = d.fieldNormWeight } = {}) {
389
390
  const { keys: r, records: n } = t, i = new le({ getFn: e, fieldNormWeight: s });
390
391
  return i.setKeys(r), i.setIndexRecords(n), i;
391
392
  }
@@ -402,7 +403,7 @@ function $(t, {
402
403
  const c = Math.abs(r - s);
403
404
  return n ? u + c / n : c ? 1 : u;
404
405
  }
405
- function Lt(t = [], e = d.minMatchCharLength) {
406
+ function kt(t = [], e = d.minMatchCharLength) {
406
407
  let s = [], r = -1, n = -1, i = 0;
407
408
  for (let u = t.length; i < u; i += 1) {
408
409
  let c = t[i];
@@ -485,7 +486,7 @@ function Tt(t, e, s, {
485
486
  score: Math.max(1e-3, R)
486
487
  };
487
488
  if (A) {
488
- const m = Lt(y, c);
489
+ const m = kt(y, c);
489
490
  m.length ? o && (B.indices = m) : B.isMatch = !1;
490
491
  }
491
492
  return B;
@@ -499,7 +500,7 @@ function jt(t) {
499
500
  return e;
500
501
  }
501
502
  const K = String.prototype.normalize ? (t) => t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "") : (t) => t;
502
- class Le {
503
+ class ke {
503
504
  constructor(e, {
504
505
  location: s = d.location,
505
506
  threshold: r = d.threshold,
@@ -740,7 +741,7 @@ class Te extends I {
740
741
  ignoreDiacritics: a = d.ignoreDiacritics,
741
742
  ignoreLocation: l = d.ignoreLocation
742
743
  } = {}) {
743
- super(e), this._bitapSearch = new Le(e, {
744
+ super(e), this._bitapSearch = new ke(e, {
744
745
  location: s,
745
746
  threshold: r,
746
747
  distance: n,
@@ -902,7 +903,7 @@ function ne(t, e) {
902
903
  if (n.condition(t, e))
903
904
  return new n(t, e);
904
905
  }
905
- return new Le(t, e);
906
+ return new ke(t, e);
906
907
  }
907
908
  const Y = {
908
909
  AND: "$and",
@@ -987,14 +988,14 @@ function ss(t, e, {
987
988
  }), c;
988
989
  });
989
990
  }
990
- class k {
991
+ class L {
991
992
  constructor(e, s = {}, r) {
992
993
  this.options = { ...d, ...s }, this.options.useExtendedSearch, this._keyStore = new xt(this.options.keys), this.setCollection(e, r);
993
994
  }
994
995
  setCollection(e, s) {
995
996
  if (this._docs = e, s && !(s instanceof le))
996
997
  throw new Error(Dt);
997
- this._myIndex = s || ke(this.options.keys, this._docs, {
998
+ this._myIndex = s || Le(this.options.keys, this._docs, {
998
999
  getFn: this.options.getFn,
999
1000
  fieldNormWeight: this.options.fieldNormWeight
1000
1001
  });
@@ -1124,16 +1125,16 @@ class k {
1124
1125
  return n;
1125
1126
  }
1126
1127
  }
1127
- k.version = "7.1.0";
1128
- k.createIndex = ke;
1129
- k.parseIndex = kt;
1130
- k.config = d;
1131
- k.parseQuery = $e;
1128
+ L.version = "7.1.0";
1129
+ L.createIndex = Le;
1130
+ L.parseIndex = Lt;
1131
+ L.config = d;
1132
+ L.parseQuery = $e;
1132
1133
  Qt(Jt);
1133
1134
  const rs = {
1134
1135
  threshold: 0.3
1135
1136
  }, ns = (t) => (e) => {
1136
- const s = new k(e, {
1137
+ const s = new L(e, {
1137
1138
  keys: Object.keys(e[0]),
1138
1139
  ...rs,
1139
1140
  ...t
@@ -1229,7 +1230,7 @@ const rs = {
1229
1230
  }, fs = (t) => /* @__PURE__ */ C.jsx(Be, { placeholder: "Search", ...t }), ds = ({
1230
1231
  children: t = fs,
1231
1232
  ...e
1232
- }) => t(Ke(e)), Ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1233
+ }) => t(Ke(e)), xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1233
1234
  __proto__: null,
1234
1235
  Column: We,
1235
1236
  Core: ze,
@@ -1259,7 +1260,7 @@ export {
1259
1260
  cs as F,
1260
1261
  ds as S,
1261
1262
  us as c,
1262
- Ss as e,
1263
+ xs as e,
1263
1264
  ns as f,
1264
1265
  Et as p
1265
1266
  };
@@ -1,6 +1,6 @@
1
- import { S as e, a, b as o, t as r } from "./provider-Dq9t3iAH.js";
2
- import { P as t, S as s, t as S, u, a as i, b as m } from "./Provider-BH1uv6QX.js";
3
- import { u as p } from "./font-CcRdsA3n.js";
1
+ import { S as e, a, b as o, t as r } from "./provider-CH0eoGfz.js";
2
+ import { P as t, S as s, t as S, u, a as i, b as m } from "./Provider-UAXPVomG.js";
3
+ import { u as p } from "./font-BXKdXsr5.js";
4
4
  const N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
6
  Provider: t,
@@ -0,0 +1 @@
1
+ "use strict";const U=require("./index-Ch3utIMa.cjs"),G=require("./toArray-DRKOku1s.cjs"),y=require("./jsx-runtime-CITbqOLs.cjs"),E=require("./Divider-CloQr3vQ.cjs"),p=require("react"),D=require("./Toggle-BKKBcuTj.cjs"),pe=require("./Link-fkoogssj.cjs"),u=require("./css-Cj2UCGXB.cjs"),ge=require("./Haul-hv7TLQ7N.cjs"),A=require("./Text-DylGoRKw.cjs");require("./Stack-BbwDtaE6.cjs");const xe=require("./state-Bd_8X2jl.cjs"),Z=require("./ContextMenu-DCxj35_j.cjs");require("./aggregator-74jWxDne.cjs");const Ce=require("./hooks-ClXSlga9.cjs"),z=({className:e,enabledLoc:t,disabledLoc:n,enabled:r,...s})=>y.jsxRuntimeExports.jsx(E.y4.Caret.Up,{className:u.CSS(u.CSS.B("caret-animated"),u.CSS.loc(r?t:n),e),...s}),Se=Object.freeze(Object.defineProperty({__proto__:null,Animated:z},Symbol.toStringTag,{value:"Module"})),ee=(e,t)=>t.includes(e.key),te=(e,t)=>U.F.stringsWithNumbers(e.name,t.name),F=(e,t=te)=>{typeof t=="function"&&e.sort(t);let n=!1;for(let r=0;r<e.length;r++){const s=e[r];s.forcePosition!=null&&r!==s.forcePosition&&(n=!0,e.splice(r,1),e.splice(s.forcePosition,0,s))}return n?F(e,!1):e},W=({nodes:e,expanded:t,depth:n=0,sort:r,path:s=""})=>{n===0&&r!=!1&&(e=e.sort((l,c)=>l.name.localeCompare(c.name)));const i=[];return e.forEach((l,c)=>{const d=`${s}${l.key}/`,h=ee(l,t);i.push({...l,depth:n,expanded:h,index:c,path:d}),h&&l.children!=null&&(l.children=F(l.children,r),i.push(...W({nodes:l.children,expanded:t,depth:n+1,sort:r,path:d})))}),i},ye=({tree:e,destination:t,keys:n})=>(n=G.A(n),t==null?[...se({tree:e,keys:n}),...e.filter(s=>!n.includes(s.key))]:(n.forEach(r=>{const s=N({tree:e,key:r});s!=null&&(ne({tree:e,keys:r}),re({tree:e,destination:t,additions:s}))}),e)),ne=({tree:e,keys:t})=>{t=G.A(t);const n=e.map(r=>r.key);return t.forEach(r=>{var i;const s=n.indexOf(r);if(s!==-1)e.splice(s,1);else{const l=O({tree:e,key:r});l!=null&&(l.children=(i=l.children)==null?void 0:i.filter(c=>c.key!==r))}}),e},re=({tree:e,destination:t,additions:n})=>{n=G.A(n);const r=U.c$1.by(n,l=>l.key,!1),s=r.map(l=>l.key);if(t==null)return[...r,...e.filter(l=>!s.includes(l.key))];const i=N({tree:e,key:t});if(i==null)throw new Error(`Could not find node with key ${t}`);return i.children??(i.children=[]),i.children=[...r,...i.children.filter(l=>!s.includes(l.key))],e},be=({tree:e,key:t,updater:n,throwOnMissing:r=!0})=>{var l,c;const s=N({tree:e,key:t});if(s==null){if(r)throw new Error(`Could not find node with key ${t}`);return e}const i=O({tree:e,key:t});if(i!=null){const d=(l=i.children)==null?void 0:l.findIndex(h=>h.key===t);d!=null&&d!==-1&&((c=i.children)==null||c.splice(d,1,n(s)))}else e.splice(e.findIndex(d=>d.key===t),1,n(s));return e},je=({tree:e,parent:t,updater:n,throwOnMissing:r=!0})=>{const s=N({tree:e,key:t});if(s==null){if(r)throw new Error(`Could not find node with key ${t}`);return e}return s.children=n(s.children??[]),e},N=({tree:e,key:t,depth:n=0})=>{for(let r=0;r<e.length;r++){const s=e[r];if(s.key===t){const i=s;return i.depth=n,i.position=r,i}if(s.children!=null){const i=N({tree:s.children,key:t,depth:n+1});if(i!=null)return i}}return null},se=({tree:e,keys:t})=>{const n=[];for(const r of t){const s=N({tree:e,key:r});s!=null&&n.push(s)}return n},O=({tree:e,key:t})=>{for(const n of e)if(n.children!=null){if(n.children.some(s=>s.key===t))return n;const r=O({tree:n.children,key:t});if(r!=null)return r}return null},le=e=>e.map(t=>({...t,children:le(t.children??[])})),ie=(...e)=>{const t=[];return e.forEach(n=>{t.push(n),n.children!=null&&t.push(...ie(...n.children))}),t},Ee=e=>{if(e.length===0)return[];let t=1/0;for(const{depth:n}of e)n<t&&(t=n);return e.filter(({depth:n})=>n===t)},K="tree-item",Ne=[["Shift"]],Te=({onExpand:e,nodes:t,initialExpanded:n=[],sort:r,selected:s,onSelectedChange:i})=>{const[l,c,d]=E.useCombinedStateAndRef(n),[h,b]=xe.usePassthrough({initial:[],value:s,onChange:i}),T=p.useMemo(()=>W({nodes:t,expanded:l,sort:r}),[t,l,r]),q=E.useSyncedRef(T),I=Ce.useHeldRef({triggers:Ne}),w=p.useCallback((f,{clicked:o})=>{b(f);const C=q.current.find(S=>S.key===o);if((C==null?void 0:C.hasChildren)===!1||o==null||I.current.held)return;const m=d.current,v=m.some(S=>S===o)?"contract":"expand";let j;v==="contract"?j=m.filter(S=>S!==o):j=[...m,o],c(j),e==null||e({current:j,action:v,clicked:o})},[e,q,c,b]),a=p.useCallback(f=>{c(o=>U.c$1.unique([...o,f])),e==null||e({current:l,action:"expand",clicked:f})},[c]),$=p.useCallback((...f)=>{c(o=>o.filter(C=>!f.includes(C))),f.forEach(o=>{e==null||e({current:l,action:"contract",clicked:o})})},[c]),R=p.useCallback(()=>c([]),[c]);return{onSelect:w,selected:h,expanded:l,contract:$,expand:a,nodes:T,clearExpanded:R}},X=p.memo(({entry:e,selected:t,onSelect:n,onDrop:r,onRename:s,onSuccessfulDrop:i,onDoubleClick:l,loading:c=!1,useMargin:d=!0,translate:h,children:b,index:T,sourceIndex:q,hovered:I,...w})=>{const{key:a,hasChildren:$=!1,allowRename:R=!1,children:f,icon:o,name:C,depth:m,expanded:v,href:j,haulItems:S=[]}=e,{getSelected:ce}=A.useSelectionUtils(),{getSourceData:ae}=A.useDataUtils(),_=$||f!=null&&f.length>0,L=[];_&&L.push(y.jsxRuntimeExports.jsx(z,{enabled:v,enabledLoc:"bottom",disabledLoc:"right"},"caret")),o!=null&&L.push(o);const Y=[];c&&Y.push(y.jsxRuntimeExports.jsx(E.y4.Loading,{className:u.CSS.B("loading-indicator")},"loading-indicator"));const[oe,P]=p.useState(!1),{startDrag:V,...de}=ge.useDragAndDrop({type:"Tree.Item",key:a,canDrop:p.useCallback(({items:g,source:B})=>{const x=g.map(k=>k.key);return P(!1),B.type==="Tree.Item"&&!x.includes(a)},[]),onDrop:p.useCallback(g=>(r==null?void 0:r(a,g))??[],[a,r]),onDragOver:p.useCallback(()=>P(!0),[])}),ue=()=>{const g=ce(),B=ae().filter(x=>g.includes(x.key));if(g.includes(a)){const x=B.map(({key:k,haulItems:H,depth:J})=>[{type:K,key:k,data:{depth:J}},...(H==null?void 0:H.map(Q=>({...Q,data:{...Q.data,depth:J}})))??[]]).flat();return V(x,k=>i==null?void 0:i(a,k))}V([{type:K,key:a,data:{depth:m}},...S.map(x=>({...x,data:{...x.data,depth:m}}))],x=>i==null?void 0:i(a,x))},fe=d?"marginLeft":"paddingLeft";let M=m*2.5+1.5;_&&(M-=.5);const he={id:a,variant:"text",draggable:S.length>0,className:u.CSS(u.CSS.BE("list","item"),Z.CONTEXT_TARGET,oe&&u.CSS.M("dragging-over"),t&&Z.CONTEXT_SELECTED,u.CSS.selected(t),_&&u.CSS.M("has-children"),u.CSS.BM("depth",m.toString())),onDragLeave:()=>P(!1),onDragStart:ue,onClick:()=>n==null?void 0:n(a),style:{border:"none",position:h!=null?"absolute":"relative",transform:`translateY(${h}px)`,[fe]:`${M}rem`,"--pluto-tree-indicator-offset":`${M-1.5}rem`},startIcon:L,iconSpacing:"small",noWrap:!0,endIcon:Y,onDoubleClick:g=>l==null?void 0:l(a,g),href:j,...de},me=j!=null?pe.Link:D.Button;return y.jsxRuntimeExports.jsx(me,{className:u.CSS.BE("list","item"),...he,align:"center",...w,children:b!=null?b({key:a,loading:c,useMargin:d,onDrop:r,onRename:s,onSuccessfulDrop:i,onDoubleClick:l,entry:e,selected:t,onSelect:n,index:T,sourceIndex:q,hovered:I}):y.jsxRuntimeExports.jsx(E.MaybeEditable,{id:`text-${a}`,level:"p",allowDoubleClick:!1,value:C,disabled:!R,onChange:g=>s==null?void 0:s(a,g)})})});X.displayName="Tree.Item";const qe=D.componentRenderProp(X),Re=({nodes:e,selected:t=[],onSelect:n,onDrop:r,onRename:s,onSuccessfulDrop:i,onDoubleClick:l,className:c,children:d=qe,itemHeight:h=27,useMargin:b=!1,showRules:T=!1,virtual:q=!0,clearExpanded:I,expand:w,contract:a,emptyContent:$,loading:R,...f})=>{const o=q?A.Core.Virtual:A.Core,C=p.useCallback(({key:m,...v})=>d({...v,key:m,loading:R===m,useMargin:b,onDrop:r,onRename:s,onSuccessfulDrop:i,onDoubleClick:l}),[d,R,r,l,s,i]);return y.jsxRuntimeExports.jsx(A.List,{data:e,emptyContent:$,children:y.jsxRuntimeExports.jsx(A.Selector,{value:t,onChange:n,allowMultiple:!0,replaceOnSingle:!0,children:y.jsxRuntimeExports.jsx(o,{itemHeight:h,className:u.CSS(c,u.CSS.B("tree"),T&&u.CSS.M("rules")),...f,children:C})})})},ve=(e,t)=>E.edit(`text-${e}`,t),Ae=e=>E.asyncEdit(`text-${e}`),$e=Object.freeze(Object.defineProperty({__proto__:null,DefaultItem:X,HAUL_TYPE:K,Tree:Re,asyncRename:Ae,deepCopy:le,defaultSort:te,findNode:N,findNodeParent:O,findNodes:se,flatten:W,getAllNodesOfMinDepth:Ee,getDescendants:ie,moveNode:ye,removeNode:ne,setNode:re,shouldExpand:ee,sortAndSplice:F,startRenaming:ve,updateNode:be,updateNodeChildren:je,use:Te},Symbol.toStringTag,{value:"Module"}));exports.Animated=z;exports.Animated$1=Se;exports.external=$e;