@weasel-js/ui 1.2.0 → 1.3.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 (267) hide show
  1. package/dist/chunks/{ActionBar-BvPEd_GW.js → ActionBar-BTev_ZZl.js} +21 -21
  2. package/dist/chunks/ActionBar-BTev_ZZl.js.map +1 -0
  3. package/dist/chunks/{ActionsBar-9aR5N3lU.js → ActionsBar-CBi_dV4B.js} +4 -4
  4. package/dist/chunks/{ActionsBar-9aR5N3lU.js.map → ActionsBar-CBi_dV4B.js.map} +1 -1
  5. package/dist/chunks/{Badge-dQzbkk-C.js → Badge-9dPfvYOk.js} +672 -670
  6. package/dist/chunks/Badge-9dPfvYOk.js.map +1 -0
  7. package/dist/chunks/{BandEditor-D3i6l299.js → BandEditor-DeE-Nhyh.js} +46 -46
  8. package/dist/chunks/BandEditor-DeE-Nhyh.js.map +1 -0
  9. package/dist/chunks/{Button-9QNIYugK.js → Button-CIu40Epu.js} +28 -28
  10. package/dist/chunks/Button-CIu40Epu.js.map +1 -0
  11. package/dist/chunks/{Callout-cJHJ4kIN.js → Callout-CxDNb9iE.js} +35 -35
  12. package/dist/chunks/Callout-CxDNb9iE.js.map +1 -0
  13. package/dist/chunks/Checkbox-Chtrlh19.js +47 -0
  14. package/dist/chunks/Checkbox-Chtrlh19.js.map +1 -0
  15. package/dist/chunks/ColorField-CSSRv3jG.js +60 -0
  16. package/dist/chunks/ColorField-CSSRv3jG.js.map +1 -0
  17. package/dist/chunks/{ComboBox-ONQISwtI.js → ComboBox-BIQ8KP4h.js} +28 -28
  18. package/dist/chunks/ComboBox-BIQ8KP4h.js.map +1 -0
  19. package/dist/chunks/{CurveEditor-SmwwvrsA.js → CurveEditor-DiJk0NhK.js} +117 -116
  20. package/dist/chunks/{CurveEditor-SmwwvrsA.js.map → CurveEditor-DiJk0NhK.js.map} +1 -1
  21. package/dist/chunks/DataGrid-BgiEYBLo.js +107 -0
  22. package/dist/chunks/DataGrid-BgiEYBLo.js.map +1 -0
  23. package/dist/chunks/Dialog-RzrboT4Q.js +59 -0
  24. package/dist/chunks/Dialog-RzrboT4Q.js.map +1 -0
  25. package/dist/chunks/DragHandleGlyph-CJbzRigu.js +47 -0
  26. package/dist/chunks/DragHandleGlyph-CJbzRigu.js.map +1 -0
  27. package/dist/chunks/{Field-VQwmrIna.js → Field-DrRby9vo.js} +6 -6
  28. package/dist/chunks/Field-DrRby9vo.js.map +1 -0
  29. package/dist/chunks/GradientEditor-BuVR6pt-.js +308 -0
  30. package/dist/chunks/GradientEditor-BuVR6pt-.js.map +1 -0
  31. package/dist/chunks/InlineRange-B-Jkv8AA.js +24 -0
  32. package/dist/chunks/InlineRange-B-Jkv8AA.js.map +1 -0
  33. package/dist/chunks/Input-BnxOPY4N.js +55 -0
  34. package/dist/chunks/Input-BnxOPY4N.js.map +1 -0
  35. package/dist/chunks/{Keycaps-CFX7UAj8.js → Keycaps-Dk33JOiH.js} +15 -15
  36. package/dist/chunks/Keycaps-Dk33JOiH.js.map +1 -0
  37. package/dist/chunks/LayerStack-DQYvGNPA.js +145 -0
  38. package/dist/chunks/LayerStack-DQYvGNPA.js.map +1 -0
  39. package/dist/chunks/NumberField-BQ-KaK7T.js +59 -0
  40. package/dist/chunks/NumberField-BQ-KaK7T.js.map +1 -0
  41. package/dist/chunks/{OptionsBar-CHvH4n4u.js → OptionsBar-BecAPCID.js} +4 -4
  42. package/dist/chunks/{OptionsBar-CHvH4n4u.js.map → OptionsBar-BecAPCID.js.map} +1 -1
  43. package/dist/chunks/PaintInput-K5W4Uho3.js +205 -0
  44. package/dist/chunks/PaintInput-K5W4Uho3.js.map +1 -0
  45. package/dist/chunks/PatternPicker-BdLSj_f_.js +93 -0
  46. package/dist/chunks/PatternPicker-BdLSj_f_.js.map +1 -0
  47. package/dist/chunks/Plot2D-BEjpJhk-.js +134 -0
  48. package/dist/chunks/Plot2D-BEjpJhk-.js.map +1 -0
  49. package/dist/chunks/{PointPlotter-BUIse9c4.js → PointPlotter-C_tZb122.js} +2 -2
  50. package/dist/chunks/{PointPlotter-BUIse9c4.js.map → PointPlotter-C_tZb122.js.map} +1 -1
  51. package/dist/chunks/{Powerline-BYWdK8QH.js → Powerline-Cc-Av8Pc.js} +2 -2
  52. package/dist/chunks/{Powerline-BYWdK8QH.js.map → Powerline-Cc-Av8Pc.js.map} +1 -1
  53. package/dist/chunks/Prefs-CRTRAud6.js +300 -0
  54. package/dist/chunks/Prefs-CRTRAud6.js.map +1 -0
  55. package/dist/chunks/Properties-BRrWSBHM.js +648 -0
  56. package/dist/chunks/Properties-BRrWSBHM.js.map +1 -0
  57. package/dist/chunks/RadioGroup-BrtV1Clm.js +49 -0
  58. package/dist/chunks/RadioGroup-BrtV1Clm.js.map +1 -0
  59. package/dist/chunks/RangeSlider-CJfhxDn6.js +52 -0
  60. package/dist/chunks/RangeSlider-CJfhxDn6.js.map +1 -0
  61. package/dist/chunks/{ResizeHandle-BOpmtOOj.js → ResizeHandle-Csz3DPew.js} +8 -8
  62. package/dist/chunks/{ResizeHandle-BOpmtOOj.js.map → ResizeHandle-Csz3DPew.js.map} +1 -1
  63. package/dist/chunks/{Select-CHsuQCp0.js → Select-BYhHGmMl.js} +32 -32
  64. package/dist/chunks/Select-BYhHGmMl.js.map +1 -0
  65. package/dist/chunks/SelectionPanel-D2IYlj_K.js +446 -0
  66. package/dist/chunks/SelectionPanel-D2IYlj_K.js.map +1 -0
  67. package/dist/chunks/{Sidebar-DP_nyJze.js → Sidebar-DrBQZ9nP.js} +1 -1
  68. package/dist/chunks/{Sidebar-DP_nyJze.js.map → Sidebar-DrBQZ9nP.js.map} +1 -1
  69. package/dist/chunks/SidebarPanel-Dbqb79Kx.js +59 -0
  70. package/dist/chunks/SidebarPanel-Dbqb79Kx.js.map +1 -0
  71. package/dist/chunks/Slider-DbOt9Dji.js +257 -0
  72. package/dist/chunks/Slider-DbOt9Dji.js.map +1 -0
  73. package/dist/chunks/{StatusBar-DBO0E0Yd.js → StatusBar-B6lPbvrF.js} +6 -6
  74. package/dist/chunks/StatusBar-B6lPbvrF.js.map +1 -0
  75. package/dist/chunks/Switch-BSr-vaAC.js +27 -0
  76. package/dist/chunks/Switch-BSr-vaAC.js.map +1 -0
  77. package/dist/chunks/Tabs-CIa-Idzu.js +41 -0
  78. package/dist/chunks/Tabs-CIa-Idzu.js.map +1 -0
  79. package/dist/chunks/{Toast-DFw4IrD_.js → Toast-C0UnBqQu.js} +31 -31
  80. package/dist/chunks/{Toast-DFw4IrD_.js.map → Toast-C0UnBqQu.js.map} +1 -1
  81. package/dist/chunks/{ToggleBar-BP1zFcvg.js → ToggleBar-1wDRwSGN.js} +11 -10
  82. package/dist/chunks/ToggleBar-1wDRwSGN.js.map +1 -0
  83. package/dist/chunks/{ToolButton-ClPz5L6j.js → ToolButton-Bd9l_I8f.js} +16 -16
  84. package/dist/chunks/ToolButton-Bd9l_I8f.js.map +1 -0
  85. package/dist/chunks/{ToolGroup-BTIwd4U4.js → ToolGroup-gizXwttA.js} +1 -1
  86. package/dist/chunks/{ToolGroup-BTIwd4U4.js.map → ToolGroup-gizXwttA.js.map} +1 -1
  87. package/dist/chunks/{ToolOptionsBar-JvmY7iNe.js → ToolOptionsBar-CXjeTE1d.js} +4 -4
  88. package/dist/chunks/ToolOptionsBar-CXjeTE1d.js.map +1 -0
  89. package/dist/chunks/{ToolPalette-DAiVhdtV.js → ToolPalette-3YpkSNfj.js} +24 -24
  90. package/dist/chunks/ToolPalette-3YpkSNfj.js.map +1 -0
  91. package/dist/chunks/Tooltip-Di7vxbFa.js +40 -0
  92. package/dist/chunks/Tooltip-Di7vxbFa.js.map +1 -0
  93. package/dist/chunks/dlog-CMYiRF3Q.js +38 -0
  94. package/dist/chunks/dlog-CMYiRF3Q.js.map +1 -0
  95. package/dist/chunks/{keyGlyph-BDH5fqkO.js → keyGlyph-D3X08tSp.js} +1 -1
  96. package/dist/chunks/{keyGlyph-BDH5fqkO.js.map → keyGlyph-D3X08tSp.js.map} +1 -1
  97. package/dist/chunks/number-llMRJPJW.js +18 -0
  98. package/dist/chunks/number-llMRJPJW.js.map +1 -0
  99. package/dist/chunks/segmentedControl.module-YXqIjnmu.js +11 -0
  100. package/dist/chunks/segmentedControl.module-YXqIjnmu.js.map +1 -0
  101. package/dist/chunks/useReorderDragList-RSJqj18B.js +109 -0
  102. package/dist/chunks/useReorderDragList-RSJqj18B.js.map +1 -0
  103. package/dist/chunks/{useRovingTabIndex-DBZtq4IH.js → useRovingTabIndex-CuUl6DLF.js} +1 -1
  104. package/dist/chunks/{useRovingTabIndex-DBZtq4IH.js.map → useRovingTabIndex-CuUl6DLF.js.map} +1 -1
  105. package/dist/components/ActionBar/index.js +1 -1
  106. package/dist/components/ActionsBar/index.js +1 -1
  107. package/dist/components/Badge/Badge.d.ts.map +1 -1
  108. package/dist/components/Badge/index.js +1 -1
  109. package/dist/components/BandEditor/index.js +1 -1
  110. package/dist/components/Button/index.js +1 -1
  111. package/dist/components/Callout/index.js +1 -1
  112. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  113. package/dist/components/Checkbox/index.js +1 -1
  114. package/dist/components/ColorField/ColorField.d.ts.map +1 -1
  115. package/dist/components/ColorField/index.js +1 -1
  116. package/dist/components/ComboBox/index.js +1 -1
  117. package/dist/components/CurveEditor/index.js +1 -1
  118. package/dist/components/DataGrid/index.js +1 -1
  119. package/dist/components/Dialog/index.js +1 -1
  120. package/dist/components/DragHandleGlyph/DragHandleGlyph.d.ts +12 -0
  121. package/dist/components/DragHandleGlyph/DragHandleGlyph.d.ts.map +1 -0
  122. package/dist/components/DragHandleGlyph/index.d.ts +3 -0
  123. package/dist/components/DragHandleGlyph/index.d.ts.map +1 -0
  124. package/dist/components/DragHandleGlyph/index.js +2 -0
  125. package/dist/components/Field/index.js +1 -1
  126. package/dist/components/GradientEditor/SceneGradientHandles.d.ts +41 -0
  127. package/dist/components/GradientEditor/SceneGradientHandles.d.ts.map +1 -0
  128. package/dist/components/GradientEditor/index.d.ts +1 -0
  129. package/dist/components/GradientEditor/index.d.ts.map +1 -1
  130. package/dist/components/GradientEditor/index.js +2 -2
  131. package/dist/components/InlineRange/InlineRange.d.ts +17 -0
  132. package/dist/components/InlineRange/InlineRange.d.ts.map +1 -0
  133. package/dist/components/InlineRange/index.d.ts +2 -0
  134. package/dist/components/InlineRange/index.d.ts.map +1 -0
  135. package/dist/components/InlineRange/index.js +2 -0
  136. package/dist/components/Input/Input.d.ts +1 -1
  137. package/dist/components/Input/index.js +1 -1
  138. package/dist/components/Keycaps/index.js +2 -2
  139. package/dist/components/LayerStack/LayerStack.d.ts +49 -0
  140. package/dist/components/LayerStack/LayerStack.d.ts.map +1 -0
  141. package/dist/components/LayerStack/index.d.ts +2 -0
  142. package/dist/components/LayerStack/index.d.ts.map +1 -0
  143. package/dist/components/LayerStack/index.js +2 -0
  144. package/dist/components/NumberField/NumberField.d.ts +1 -1
  145. package/dist/components/NumberField/index.js +1 -1
  146. package/dist/components/OptionsBar/index.js +1 -1
  147. package/dist/components/PaintInput/PaintInput.d.ts +40 -0
  148. package/dist/components/PaintInput/PaintInput.d.ts.map +1 -0
  149. package/dist/components/PaintInput/index.d.ts +2 -0
  150. package/dist/components/PaintInput/index.d.ts.map +1 -0
  151. package/dist/components/PaintInput/index.js +2 -0
  152. package/dist/components/PatternPicker/PatternPicker.d.ts +31 -0
  153. package/dist/components/PatternPicker/PatternPicker.d.ts.map +1 -0
  154. package/dist/components/PatternPicker/index.d.ts +2 -0
  155. package/dist/components/PatternPicker/index.d.ts.map +1 -0
  156. package/dist/components/PatternPicker/index.js +2 -0
  157. package/dist/components/Plot2D/index.js +1 -1
  158. package/dist/components/PointPlotter/index.js +1 -1
  159. package/dist/components/Powerline/index.js +2 -2
  160. package/dist/components/Prefs/PrefsForm.d.ts.map +1 -1
  161. package/dist/components/Prefs/index.d.ts +1 -1
  162. package/dist/components/Prefs/index.d.ts.map +1 -1
  163. package/dist/components/Prefs/index.js +1 -1
  164. package/dist/components/Prefs/schema.d.ts +4 -92
  165. package/dist/components/Prefs/schema.d.ts.map +1 -1
  166. package/dist/components/Properties/CurveField.d.ts +37 -0
  167. package/dist/components/Properties/CurveField.d.ts.map +1 -0
  168. package/dist/components/Properties/EffectCard.d.ts +68 -0
  169. package/dist/components/Properties/EffectCard.d.ts.map +1 -0
  170. package/dist/components/Properties/PropertyGroup.d.ts +24 -0
  171. package/dist/components/Properties/PropertyGroup.d.ts.map +1 -0
  172. package/dist/components/Properties/PropertyPanel.d.ts +181 -0
  173. package/dist/components/Properties/PropertyPanel.d.ts.map +1 -0
  174. package/dist/components/Properties/index.d.ts +9 -0
  175. package/dist/components/Properties/index.d.ts.map +1 -0
  176. package/dist/components/Properties/index.js +2 -0
  177. package/dist/components/Properties/storyLayouts.d.ts +11 -0
  178. package/dist/components/Properties/storyLayouts.d.ts.map +1 -0
  179. package/dist/components/RadioGroup/index.js +1 -1
  180. package/dist/components/RangeSlider/index.js +1 -1
  181. package/dist/components/ResizeHandle/index.js +1 -1
  182. package/dist/components/Select/index.js +1 -1
  183. package/dist/components/SelectionPanel/SelectionPanel.d.ts +32 -1
  184. package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -1
  185. package/dist/components/SelectionPanel/index.js +1 -1
  186. package/dist/components/Sidebar/index.js +1 -1
  187. package/dist/components/SidebarPanel/index.js +1 -1
  188. package/dist/components/Slider/index.js +1 -1
  189. package/dist/components/StatusBar/index.js +1 -1
  190. package/dist/components/Switch/Switch.d.ts +1 -1
  191. package/dist/components/Switch/index.js +1 -1
  192. package/dist/components/Tabs/index.js +1 -1
  193. package/dist/components/Toast/index.js +1 -1
  194. package/dist/components/ToggleBar/ToggleBar.d.ts +1 -1
  195. package/dist/components/ToggleBar/ToggleBar.d.ts.map +1 -1
  196. package/dist/components/ToggleBar/index.js +1 -1
  197. package/dist/components/ToolButton/index.js +1 -1
  198. package/dist/components/ToolGroup/index.js +1 -1
  199. package/dist/components/ToolOptionsBar/index.js +1 -1
  200. package/dist/components/ToolPalette/index.js +1 -1
  201. package/dist/components/Tooltip/index.js +1 -1
  202. package/dist/components/paintValue.d.ts +8 -0
  203. package/dist/components/paintValue.d.ts.map +1 -0
  204. package/dist/format/number.d.ts +13 -0
  205. package/dist/format/number.d.ts.map +1 -1
  206. package/dist/icons/Icon.d.ts +17 -0
  207. package/dist/icons/Icon.d.ts.map +1 -0
  208. package/dist/icons/index.d.ts +50 -0
  209. package/dist/icons/index.d.ts.map +1 -0
  210. package/dist/icons/paths.d.ts +71 -0
  211. package/dist/icons/paths.d.ts.map +1 -0
  212. package/dist/index.d.ts +9 -1
  213. package/dist/index.d.ts.map +1 -1
  214. package/dist/index.js +190 -48
  215. package/dist/index.js.map +1 -1
  216. package/dist/style.css +1 -1
  217. package/package.json +4 -3
  218. package/dist/chunks/ActionBar-BvPEd_GW.js.map +0 -1
  219. package/dist/chunks/Badge-dQzbkk-C.js.map +0 -1
  220. package/dist/chunks/BandEditor-D3i6l299.js.map +0 -1
  221. package/dist/chunks/Button-9QNIYugK.js.map +0 -1
  222. package/dist/chunks/Callout-cJHJ4kIN.js.map +0 -1
  223. package/dist/chunks/Checkbox-KQ5L8APP.js +0 -47
  224. package/dist/chunks/Checkbox-KQ5L8APP.js.map +0 -1
  225. package/dist/chunks/ColorField-ykpiD3XU.js +0 -60
  226. package/dist/chunks/ColorField-ykpiD3XU.js.map +0 -1
  227. package/dist/chunks/ComboBox-ONQISwtI.js.map +0 -1
  228. package/dist/chunks/DataGrid-DZQ4Chbd.js +0 -210
  229. package/dist/chunks/DataGrid-DZQ4Chbd.js.map +0 -1
  230. package/dist/chunks/Dialog-CqwdJv_t.js +0 -59
  231. package/dist/chunks/Dialog-CqwdJv_t.js.map +0 -1
  232. package/dist/chunks/Field-VQwmrIna.js.map +0 -1
  233. package/dist/chunks/GradientEditor-Bg6SX64V.js +0 -280
  234. package/dist/chunks/GradientEditor-Bg6SX64V.js.map +0 -1
  235. package/dist/chunks/Input-DpkwYtUY.js +0 -55
  236. package/dist/chunks/Input-DpkwYtUY.js.map +0 -1
  237. package/dist/chunks/Keycaps-CFX7UAj8.js.map +0 -1
  238. package/dist/chunks/NumberField-BbzI0GtU.js +0 -59
  239. package/dist/chunks/NumberField-BbzI0GtU.js.map +0 -1
  240. package/dist/chunks/Plot2D-CEnhzodm.js +0 -168
  241. package/dist/chunks/Plot2D-CEnhzodm.js.map +0 -1
  242. package/dist/chunks/Prefs-BMR9wMiZ.js +0 -238
  243. package/dist/chunks/Prefs-BMR9wMiZ.js.map +0 -1
  244. package/dist/chunks/RadioGroup-CIpHr3g6.js +0 -49
  245. package/dist/chunks/RadioGroup-CIpHr3g6.js.map +0 -1
  246. package/dist/chunks/RangeSlider-CaDogGTj.js +0 -52
  247. package/dist/chunks/RangeSlider-CaDogGTj.js.map +0 -1
  248. package/dist/chunks/Select-CHsuQCp0.js.map +0 -1
  249. package/dist/chunks/SelectionPanel-D_wk_8ZN.js +0 -303
  250. package/dist/chunks/SelectionPanel-D_wk_8ZN.js.map +0 -1
  251. package/dist/chunks/SidebarPanel-BVTQ1ZyM.js +0 -59
  252. package/dist/chunks/SidebarPanel-BVTQ1ZyM.js.map +0 -1
  253. package/dist/chunks/Slider-tGbqoAZH.js +0 -259
  254. package/dist/chunks/Slider-tGbqoAZH.js.map +0 -1
  255. package/dist/chunks/StatusBar-DBO0E0Yd.js.map +0 -1
  256. package/dist/chunks/Switch-JyVSSAzC.js +0 -27
  257. package/dist/chunks/Switch-JyVSSAzC.js.map +0 -1
  258. package/dist/chunks/Tabs-Df0sDomx.js +0 -41
  259. package/dist/chunks/Tabs-Df0sDomx.js.map +0 -1
  260. package/dist/chunks/ToggleBar-BP1zFcvg.js.map +0 -1
  261. package/dist/chunks/ToolButton-ClPz5L6j.js.map +0 -1
  262. package/dist/chunks/ToolOptionsBar-JvmY7iNe.js.map +0 -1
  263. package/dist/chunks/ToolPalette-DAiVhdtV.js.map +0 -1
  264. package/dist/chunks/Tooltip-DXJbdR5B.js +0 -40
  265. package/dist/chunks/Tooltip-DXJbdR5B.js.map +0 -1
  266. package/dist/chunks/segmentedControl.module-DCyuDbj1.js +0 -11
  267. package/dist/chunks/segmentedControl.module-DCyuDbj1.js.map +0 -1
@@ -0,0 +1,648 @@
1
+ import { t as e } from "./dlog-CMYiRF3Q.js";
2
+ import { n as t, t as n } from "./Tooltip-Di7vxbFa.js";
3
+ import { i as r, n as i } from "./number-llMRJPJW.js";
4
+ import { n as a } from "./CurveEditor-DiJk0NhK.js";
5
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
6
+ import { useCallback as l, useMemo as u, useState as d } from "react";
7
+ import { Focusable as f } from "react-aria-components";
8
+ var p = {
9
+ field: "_field_17u88_1",
10
+ plot: "_plot_17u88_12",
11
+ marks: "_marks_17u88_17",
12
+ actions: "_actions_17u88_23",
13
+ action: "_action_17u88_23"
14
+ };
15
+ //#endregion
16
+ //#region src/components/Properties/CurveField.tsx
17
+ function m({ values: t, min: n, max: r, step: i, width: o, height: d = 110, defaults: f, onChange: m, marks: h }) {
18
+ let g = u(() => {
19
+ let e = [];
20
+ for (let n = 0; n + 1 < t.length; n += 2) e.push({
21
+ x: t[n],
22
+ y: t[n + 1]
23
+ });
24
+ return e;
25
+ }, [t]), _ = l((t) => {
26
+ let a = Array(t.length * 2);
27
+ for (let e = 0; e < t.length; e++) {
28
+ let o = Math.round(t[e].y / i) * i, s = Math.max(n, Math.min(r, o));
29
+ a[e * 2] = t[e].x, a[e * 2 + 1] = s;
30
+ }
31
+ e("curve-field", "handleChange", {
32
+ nLen: t.length,
33
+ flatLen: a.length,
34
+ sample: a.slice(0, 4)
35
+ }), m(a);
36
+ }, [
37
+ m,
38
+ n,
39
+ r,
40
+ i
41
+ ]), v = l(() => {
42
+ let e = [];
43
+ for (let n = 0; n + 1 < t.length; n += 2) e.push({
44
+ x: 1 - t[n],
45
+ y: t[n + 1]
46
+ });
47
+ e.sort((e, t) => e.x - t.x);
48
+ let n = [];
49
+ for (let t of e) n.push(t.x, t.y);
50
+ m(n);
51
+ }, [t, m]), y = l(() => {
52
+ let e = (n + r) / 2, i = Array(t.length);
53
+ for (let n = 0; n + 1 < t.length; n += 2) i[n] = t[n], i[n + 1] = 2 * e - t[n + 1];
54
+ m(i);
55
+ }, [
56
+ t,
57
+ n,
58
+ r,
59
+ m
60
+ ]);
61
+ return /* @__PURE__ */ c("div", {
62
+ className: p.field,
63
+ children: [/* @__PURE__ */ c("div", {
64
+ className: p.plot,
65
+ children: [/* @__PURE__ */ s(a, {
66
+ value: g,
67
+ onInput: _,
68
+ domain: "1d",
69
+ constrain: "function",
70
+ xRange: [0, 1],
71
+ yRange: [n, r],
72
+ width: o,
73
+ height: d,
74
+ endpoints: "pinned-x",
75
+ addPointMode: "click-curve",
76
+ minPoints: 2,
77
+ grid: {},
78
+ history: !1
79
+ }), h && h.length > 0 && /* @__PURE__ */ s("svg", {
80
+ className: p.marks,
81
+ width: o,
82
+ height: d,
83
+ viewBox: `0 0 ${o} ${d}`,
84
+ "aria-hidden": "true",
85
+ children: h.map((e) => {
86
+ let t = e.color ?? "#ffcc00";
87
+ if (e.kind === "band") {
88
+ let n = Math.max(0, Math.min(1, e.x[0])) * o, r = Math.max(0, Math.min(1, e.x[1])) * o, i = Math.min(n, r), a = Math.abs(r - n);
89
+ return /* @__PURE__ */ c("g", { children: [
90
+ /* @__PURE__ */ s("rect", {
91
+ x: i,
92
+ y: 0,
93
+ width: a,
94
+ height: d,
95
+ fill: t,
96
+ fillOpacity: .4
97
+ }),
98
+ /* @__PURE__ */ s("line", {
99
+ x1: i,
100
+ y1: 0,
101
+ x2: i,
102
+ y2: d,
103
+ stroke: t,
104
+ strokeOpacity: .85,
105
+ strokeWidth: 1
106
+ }),
107
+ /* @__PURE__ */ s("line", {
108
+ x1: i + a,
109
+ y1: 0,
110
+ x2: i + a,
111
+ y2: d,
112
+ stroke: t,
113
+ strokeOpacity: .85,
114
+ strokeWidth: 1
115
+ })
116
+ ] }, `band-${e.x[0]}-${e.x[1]}-${t}`);
117
+ }
118
+ let n = Math.max(0, Math.min(1, e.x)) * o;
119
+ return /* @__PURE__ */ s("line", {
120
+ x1: n,
121
+ y1: 0,
122
+ x2: n,
123
+ y2: d,
124
+ stroke: t,
125
+ strokeWidth: 1
126
+ }, `mark-${e.x}-${t}`);
127
+ })
128
+ })]
129
+ }), /* @__PURE__ */ c("div", {
130
+ className: p.actions,
131
+ children: [
132
+ /* @__PURE__ */ s("button", {
133
+ type: "button",
134
+ className: p.action,
135
+ onClick: v,
136
+ children: "Flip horizontally"
137
+ }),
138
+ /* @__PURE__ */ s("button", {
139
+ type: "button",
140
+ className: p.action,
141
+ onClick: y,
142
+ children: "Flip vertically"
143
+ }),
144
+ f && /* @__PURE__ */ s("button", {
145
+ type: "button",
146
+ className: p.action,
147
+ onClick: () => m([...f]),
148
+ children: "Reset"
149
+ })
150
+ ]
151
+ })]
152
+ });
153
+ }
154
+ var h = {
155
+ panel: "_panel_1owtf_9",
156
+ list: "_list_1owtf_3",
157
+ row: "_row_1owtf_4",
158
+ group: "_group_1owtf_4",
159
+ subpanel: "_subpanel_1owtf_3",
160
+ card: "_card_1owtf_14",
161
+ cardList: "_cardList_1owtf_15",
162
+ panelTitle: "_panelTitle_1owtf_35",
163
+ listPairs: "_listPairs_1owtf_3",
164
+ rowColor: "_rowColor_1owtf_4",
165
+ span: "_span_1owtf_66",
166
+ rowLabel: "_rowLabel_1owtf_94",
167
+ readout: "_readout_1owtf_120",
168
+ help: "_help_1owtf_132",
169
+ readoutInput: "_readoutInput_1owtf_164",
170
+ readoutGroup: "_readoutGroup_1owtf_202",
171
+ readoutUnit: "_readoutUnit_1owtf_208",
172
+ rowInline: "_rowInline_1owtf_268",
173
+ toggle: "_toggle_1owtf_281",
174
+ alpha: "_alpha_1owtf_369",
175
+ alphaDisabled: "_alphaDisabled_1owtf_387",
176
+ rowCheckbox: "_rowCheckbox_1owtf_409",
177
+ toggleButton: "_toggleButton_1owtf_441",
178
+ toggleButtonSelected: "_toggleButtonSelected_1owtf_467",
179
+ groupTitle: "_groupTitle_1owtf_486",
180
+ groupBody: "_groupBody_1owtf_4",
181
+ groupPairs: "_groupPairs_1owtf_517",
182
+ subpanelTitle: "_subpanelTitle_1owtf_549",
183
+ cardDragging: "_cardDragging_1owtf_593",
184
+ cardExpanded: "_cardExpanded_1owtf_597",
185
+ cardAccented: "_cardAccented_1owtf_601",
186
+ cardHead: "_cardHead_1owtf_616",
187
+ cardHandle: "_cardHandle_1owtf_637",
188
+ cardIndexBadge: "_cardIndexBadge_1owtf_650",
189
+ cardTitle: "_cardTitle_1owtf_668",
190
+ cardPrimary: "_cardPrimary_1owtf_678",
191
+ cardRemove: "_cardRemove_1owtf_693",
192
+ cardBody: "_cardBody_1owtf_722",
193
+ cardListWrap: "_cardListWrap_1owtf_734",
194
+ cardDropHint: "_cardDropHint_1owtf_738",
195
+ cardListEmpty: "_cardListEmpty_1owtf_746"
196
+ };
197
+ //#endregion
198
+ //#region src/components/Properties/EffectCard.tsx
199
+ function g({ title: e, children: t, className: n }) {
200
+ return /* @__PURE__ */ c("div", {
201
+ className: n ? `${h.subpanel} ${n}` : h.subpanel,
202
+ children: [/* @__PURE__ */ c("h4", {
203
+ className: h.subpanelTitle,
204
+ children: [/* @__PURE__ */ s("span", { children: e }), /* @__PURE__ */ s("hr", {})]
205
+ }), t]
206
+ });
207
+ }
208
+ function _({ title: e, primary: t, accent: n, index: r, expanded: i = !0, onToggleExpanded: a, onRemove: o, draggable: l, onPressHandle: u, onReleaseHandle: d, onDragStart: f, onDragEnd: p, onDragOver: m, onDragLeave: g, onDrop: _, dragging: y, children: b, className: x }) {
209
+ let S = `${i ? ` ${h.cardExpanded}` : ""}${y ? ` ${h.cardDragging}` : ""}${n ? ` ${h.cardAccented}` : ""}`, C = `${h.card}${S}${x ? ` ${x}` : ""}`, w = n ? { "--wzl-effect-card-accent": n } : void 0, T = a ? {
210
+ role: "button",
211
+ tabIndex: 0,
212
+ onClick: a,
213
+ onKeyDown: (e) => {
214
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
215
+ }
216
+ } : {};
217
+ return /* @__PURE__ */ c("div", {
218
+ className: C,
219
+ style: w,
220
+ draggable: l,
221
+ onDragStart: f,
222
+ onDragEnd: p,
223
+ onDragOver: m,
224
+ onDragLeave: g,
225
+ onDrop: _,
226
+ children: [/* @__PURE__ */ c("div", {
227
+ className: h.cardHead,
228
+ ...T,
229
+ children: [
230
+ r == null ? /* @__PURE__ */ s("span", {
231
+ className: h.cardHandle,
232
+ "aria-hidden": "true",
233
+ title: "Drag to reorder",
234
+ onMouseDown: u,
235
+ onMouseUp: d,
236
+ children: /* @__PURE__ */ s(v, {})
237
+ }) : /* @__PURE__ */ s("button", {
238
+ type: "button",
239
+ className: `${h.cardIndexBadge} ${h.cardHandle}`,
240
+ title: "Drag to reorder · click to toggle",
241
+ "aria-label": `Item ${r + 1} — drag to reorder, click to toggle`,
242
+ onMouseDown: u,
243
+ onMouseUp: d,
244
+ onClick: (e) => {
245
+ e.stopPropagation(), a?.();
246
+ },
247
+ children: r + 1
248
+ }),
249
+ /* @__PURE__ */ s("span", {
250
+ className: h.cardTitle,
251
+ children: e
252
+ }),
253
+ t != null && /* @__PURE__ */ s("span", {
254
+ className: h.cardPrimary,
255
+ children: t
256
+ }),
257
+ o && /* @__PURE__ */ s("button", {
258
+ type: "button",
259
+ className: h.cardRemove,
260
+ onClick: (e) => {
261
+ e.stopPropagation(), o();
262
+ },
263
+ title: "Remove",
264
+ "aria-label": "Remove",
265
+ children: "✕"
266
+ })
267
+ ]
268
+ }), i && /* @__PURE__ */ s("div", {
269
+ className: h.cardBody,
270
+ children: b
271
+ })]
272
+ });
273
+ }
274
+ function v() {
275
+ return /* @__PURE__ */ c("svg", {
276
+ width: "10",
277
+ height: "14",
278
+ viewBox: "0 0 10 14",
279
+ "aria-hidden": "true",
280
+ children: [
281
+ /* @__PURE__ */ s("circle", {
282
+ cx: "3",
283
+ cy: "3",
284
+ r: "1.3",
285
+ fill: "currentColor"
286
+ }),
287
+ /* @__PURE__ */ s("circle", {
288
+ cx: "7",
289
+ cy: "3",
290
+ r: "1.3",
291
+ fill: "currentColor"
292
+ }),
293
+ /* @__PURE__ */ s("circle", {
294
+ cx: "3",
295
+ cy: "7",
296
+ r: "1.3",
297
+ fill: "currentColor"
298
+ }),
299
+ /* @__PURE__ */ s("circle", {
300
+ cx: "7",
301
+ cy: "7",
302
+ r: "1.3",
303
+ fill: "currentColor"
304
+ }),
305
+ /* @__PURE__ */ s("circle", {
306
+ cx: "3",
307
+ cy: "11",
308
+ r: "1.3",
309
+ fill: "currentColor"
310
+ }),
311
+ /* @__PURE__ */ s("circle", {
312
+ cx: "7",
313
+ cy: "11",
314
+ r: "1.3",
315
+ fill: "currentColor"
316
+ })
317
+ ]
318
+ });
319
+ }
320
+ function y({ items: e, renderItem: t, onReorder: n, empty: r, defaultExpandedIds: i }) {
321
+ let [a, l] = d(() => new Set(i ?? [])), [u, f] = d(null), [p, m] = d(null), [g, _] = d(null);
322
+ return e.length === 0 ? /* @__PURE__ */ s(o, { children: r ?? /* @__PURE__ */ s("div", {
323
+ className: h.cardListEmpty,
324
+ children: "No items."
325
+ }) }) : /* @__PURE__ */ s("div", {
326
+ className: h.cardList,
327
+ children: e.map((e) => {
328
+ let r = a.has(e.id), i = u === e.id, o = p === e.id, d = g && g.id === e.id && g.position === "before", v = g && g.id === e.id && g.position === "after", y = () => l((t) => {
329
+ let n = new Set(t);
330
+ return n.has(e.id) ? n.delete(e.id) : n.add(e.id), n;
331
+ });
332
+ return /* @__PURE__ */ c("div", {
333
+ className: h.cardListWrap,
334
+ children: [
335
+ d && /* @__PURE__ */ s("div", { className: h.cardDropHint }),
336
+ t(e, {
337
+ isExpanded: r,
338
+ isDragging: i,
339
+ toggleExpanded: y,
340
+ cardProps: {
341
+ expanded: r,
342
+ dragging: i,
343
+ draggable: o,
344
+ onToggleExpanded: y,
345
+ onPressHandle: () => m(e.id),
346
+ onReleaseHandle: () => m(null),
347
+ onDragStart: (t) => {
348
+ t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", String(e.id)), f(e.id);
349
+ },
350
+ onDragEnd: () => {
351
+ f(null), m(null), _(null);
352
+ },
353
+ onDragOver: (t) => {
354
+ if (u === null || u === e.id) return;
355
+ t.preventDefault(), t.dataTransfer.dropEffect = "move";
356
+ let n = t.currentTarget.getBoundingClientRect(), r = t.clientY < n.top + n.height / 2 ? "before" : "after";
357
+ _({
358
+ id: e.id,
359
+ position: r
360
+ });
361
+ },
362
+ onDragLeave: () => {
363
+ _((t) => t && t.id === e.id ? null : t);
364
+ },
365
+ onDrop: (t) => {
366
+ if (t.preventDefault(), u === null || u === e.id) {
367
+ _(null);
368
+ return;
369
+ }
370
+ let r = t.currentTarget.getBoundingClientRect(), i = t.clientY < r.top + r.height / 2 ? "before" : "after";
371
+ n(u, e.id, i), _(null);
372
+ }
373
+ }
374
+ }),
375
+ v && /* @__PURE__ */ s("div", { className: h.cardDropHint })
376
+ ]
377
+ }, String(e.id));
378
+ })
379
+ });
380
+ }
381
+ //#endregion
382
+ //#region src/components/Properties/PropertyGroup.tsx
383
+ function b({ title: e, hidden: t, children: n, className: r, pack: i = "auto-color" }) {
384
+ if (t) return null;
385
+ let a = i === "pairs" ? ` ${h.groupPairs}` : "";
386
+ return /* @__PURE__ */ c("div", {
387
+ className: `${h.group}${a}${r ? ` ${r}` : ""}`,
388
+ children: [/* @__PURE__ */ c("h3", {
389
+ className: h.groupTitle,
390
+ children: [
391
+ /* @__PURE__ */ s("hr", {}),
392
+ /* @__PURE__ */ s("span", { children: e }),
393
+ /* @__PURE__ */ s("hr", {})
394
+ ]
395
+ }), /* @__PURE__ */ s("div", {
396
+ className: h.groupBody,
397
+ children: n
398
+ })]
399
+ });
400
+ }
401
+ //#endregion
402
+ //#region src/components/Properties/PropertyPanel.tsx
403
+ function x({ title: e, children: t, className: n }) {
404
+ return /* @__PURE__ */ c("div", {
405
+ className: n ? `${h.panel} ${n}` : h.panel,
406
+ children: [e != null && /* @__PURE__ */ s("h2", {
407
+ className: h.panelTitle,
408
+ children: e
409
+ }), t]
410
+ });
411
+ }
412
+ function S({ children: e, className: t, pack: n = "auto-color" }) {
413
+ let r = n === "pairs" ? ` ${h.listPairs}` : "";
414
+ return /* @__PURE__ */ s("div", {
415
+ className: `${h.list}${r}${t ? ` ${t}` : ""}`,
416
+ children: e
417
+ });
418
+ }
419
+ function C({ children: e, className: t }) {
420
+ return /* @__PURE__ */ s("div", {
421
+ className: t ? `${h.span} ${t}` : h.span,
422
+ children: e
423
+ });
424
+ }
425
+ function w({ label: e, readout: t, description: n, variant: r = "default", layout: i = "block", span: a, children: o, htmlFor: l, className: u }) {
426
+ let d = r === "color" ? ` ${h.rowColor}` : r === "checkbox" ? ` ${h.rowCheckbox}` : "", f = r === "default" && i === "inline" ? ` ${h.rowInline}` : "", p = a ? ` ${h.span}` : "";
427
+ return /* @__PURE__ */ c("label", {
428
+ className: `${h.row}${d}${f}${p}${u ? ` ${u}` : ""}`,
429
+ htmlFor: l,
430
+ children: [/* @__PURE__ */ c("span", {
431
+ className: h.rowLabel,
432
+ children: [
433
+ e,
434
+ n ? /* @__PURE__ */ s(T, {
435
+ label: e,
436
+ description: n
437
+ }) : null,
438
+ t != null && /* @__PURE__ */ s("em", {
439
+ className: h.readout,
440
+ children: t
441
+ })
442
+ ]
443
+ }), o]
444
+ });
445
+ }
446
+ function T({ label: e, description: r }) {
447
+ let i = typeof e == "string" ? e : "this setting";
448
+ return /* @__PURE__ */ c(t, { children: [/* @__PURE__ */ s(f, { children: /* @__PURE__ */ s("button", {
449
+ type: "button",
450
+ className: h.help,
451
+ "aria-label": `About ${i}`,
452
+ onClick: (e) => {
453
+ e.preventDefault(), e.stopPropagation();
454
+ },
455
+ onMouseDown: (e) => e.stopPropagation(),
456
+ children: "ⓘ"
457
+ }) }), /* @__PURE__ */ s(n, { children: r })] });
458
+ }
459
+ function E({ label: t, value: n, min: r, max: a, step: o = 1, onChange: c, format: l, unit: u, layout: d, description: f }) {
460
+ let p = o >= 1 ? 0 : Math.min(6, Math.max(0, Math.ceil(-Math.log10(o))));
461
+ return /* @__PURE__ */ s(w, {
462
+ label: t,
463
+ readout: /* @__PURE__ */ s(D, {
464
+ value: n,
465
+ min: r,
466
+ max: a,
467
+ format: l ?? ((e) => i(e, {
468
+ useGrouping: !1,
469
+ minimumFractionDigits: p,
470
+ maximumFractionDigits: p
471
+ })),
472
+ unit: u,
473
+ onCommit: c
474
+ }),
475
+ layout: d,
476
+ description: f,
477
+ children: /* @__PURE__ */ s("input", {
478
+ type: "range",
479
+ tabIndex: -1,
480
+ min: r,
481
+ max: a,
482
+ step: o,
483
+ value: n,
484
+ onChange: (n) => {
485
+ let r = Number(n.target.value);
486
+ e("property-panel", "slider", {
487
+ label: t,
488
+ value: r
489
+ }), c(r);
490
+ }
491
+ })
492
+ });
493
+ }
494
+ function D({ value: e, min: t, max: n, format: a, unit: o, onCommit: l }) {
495
+ let [u, f] = d(null), p = (e) => a ? a(e) : i(e, {
496
+ useGrouping: !1,
497
+ maximumFractionDigits: 20
498
+ }), m = u === null ? (() => {
499
+ let t = p(e);
500
+ return typeof t == "string" ? t : String(t);
501
+ })() : u, g = o == null ? null : typeof o == "string" ? /* @__PURE__ */ s("span", {
502
+ className: h.readoutUnit,
503
+ children: o
504
+ }) : o, _ = () => {
505
+ if (u !== null) {
506
+ let e = r(u);
507
+ Number.isFinite(e) && l(Math.min(n, Math.max(t, e)));
508
+ }
509
+ f(null);
510
+ };
511
+ return /* @__PURE__ */ c("span", {
512
+ className: h.readoutGroup,
513
+ children: [/* @__PURE__ */ s("input", {
514
+ type: "text",
515
+ inputMode: "decimal",
516
+ className: h.readoutInput,
517
+ value: m,
518
+ onFocus: (t) => {
519
+ let n = p(e);
520
+ f(typeof n == "string" ? n : String(n)), t.currentTarget.select();
521
+ },
522
+ onChange: (e) => f(e.target.value.replace(/-/g, "−")),
523
+ onBlur: _,
524
+ onClick: (e) => {
525
+ e.preventDefault(), e.stopPropagation(), e.currentTarget.focus();
526
+ },
527
+ onMouseDown: (e) => e.stopPropagation(),
528
+ onKeyDown: (e) => {
529
+ e.key === "Enter" ? (_(), e.currentTarget.blur()) : e.key === "Escape" && (f(null), e.currentTarget.blur());
530
+ }
531
+ }), g]
532
+ });
533
+ }
534
+ function O({ label: e, value: t, onChange: n, alpha: r, onAlphaChange: i, alphaDisabled: a, description: o }) {
535
+ let l = r != null;
536
+ return /* @__PURE__ */ c(w, {
537
+ label: e,
538
+ variant: "color",
539
+ className: a ? h.alphaDisabled : void 0,
540
+ description: o,
541
+ children: [/* @__PURE__ */ s("input", {
542
+ type: "color",
543
+ value: t,
544
+ onChange: (e) => n(e.target.value)
545
+ }), l && /* @__PURE__ */ s("input", {
546
+ type: "range",
547
+ className: h.alpha,
548
+ min: 0,
549
+ max: 1,
550
+ step: .01,
551
+ value: r,
552
+ disabled: a,
553
+ onChange: (e) => i?.(Number(e.target.value))
554
+ })]
555
+ });
556
+ }
557
+ function k({ label: e, value: t, onChange: n, description: r }) {
558
+ return /* @__PURE__ */ s(w, {
559
+ label: e,
560
+ variant: "checkbox",
561
+ description: r,
562
+ children: /* @__PURE__ */ s("input", {
563
+ type: "checkbox",
564
+ checked: t,
565
+ onChange: (e) => n(e.target.checked)
566
+ })
567
+ });
568
+ }
569
+ function A({ label: e, value: t, onChange: n, placeholder: r, maxLength: i, layout: a, description: o }) {
570
+ return /* @__PURE__ */ s(w, {
571
+ label: e,
572
+ layout: a,
573
+ description: o,
574
+ children: /* @__PURE__ */ s("input", {
575
+ type: "text",
576
+ value: t,
577
+ placeholder: r,
578
+ maxLength: i,
579
+ onChange: (e) => n(e.target.value)
580
+ })
581
+ });
582
+ }
583
+ function j({ label: e, value: t, onChange: n, min: r, max: i, step: a, placeholder: o, layout: c, description: l }) {
584
+ return /* @__PURE__ */ s(w, {
585
+ label: e,
586
+ layout: c,
587
+ description: l,
588
+ children: /* @__PURE__ */ s("input", {
589
+ type: "number",
590
+ value: t,
591
+ min: r,
592
+ max: i,
593
+ step: a,
594
+ placeholder: o,
595
+ onChange: (e) => {
596
+ let t = e.target.value;
597
+ if (t === "") return;
598
+ let r = Number(t);
599
+ Number.isFinite(r) && n(r);
600
+ }
601
+ })
602
+ });
603
+ }
604
+ function M({ label: t, value: n, options: r, onChange: i, layout: a, description: o }) {
605
+ return /* @__PURE__ */ s(w, {
606
+ label: t,
607
+ layout: a,
608
+ description: o,
609
+ children: /* @__PURE__ */ s("select", {
610
+ value: n,
611
+ onChange: (n) => {
612
+ let r = n.target.value;
613
+ e("property-panel", "select", {
614
+ label: t,
615
+ value: r
616
+ }), i(r);
617
+ },
618
+ children: r.map((e) => /* @__PURE__ */ s("option", {
619
+ value: e.value,
620
+ children: e.label
621
+ }, e.value))
622
+ })
623
+ });
624
+ }
625
+ function N({ label: e, value: t, options: n, onChange: r, layout: i, description: a }) {
626
+ return /* @__PURE__ */ s(w, {
627
+ label: e,
628
+ layout: i,
629
+ description: a,
630
+ children: /* @__PURE__ */ s("div", {
631
+ className: h.toggle,
632
+ children: n.map((e) => {
633
+ let n = e.value === t;
634
+ return /* @__PURE__ */ s("button", {
635
+ type: "button",
636
+ "aria-pressed": n,
637
+ className: n ? `${h.toggleButton} ${h.toggleButtonSelected}` : h.toggleButton,
638
+ onClick: () => r(e.value),
639
+ children: e.label
640
+ }, e.value);
641
+ })
642
+ })
643
+ });
644
+ }
645
+ //#endregion
646
+ export { x as a, M as c, N as d, b as f, m as g, g as h, S as i, E as l, y as m, O as n, w as o, _ as p, j as r, C as s, k as t, A as u };
647
+
648
+ //# sourceMappingURL=Properties-BRrWSBHM.js.map