@weasel-js/ui 1.3.0-pre.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 (172) hide show
  1. package/dist/chunks/{ActionsBar-gTuCtkv8.js → ActionsBar-CBi_dV4B.js} +3 -3
  2. package/dist/chunks/{ActionsBar-gTuCtkv8.js.map → ActionsBar-CBi_dV4B.js.map} +1 -1
  3. package/dist/chunks/{BandEditor-DKbcHG2_.js → BandEditor-DeE-Nhyh.js} +1 -1
  4. package/dist/chunks/{BandEditor-DKbcHG2_.js.map → BandEditor-DeE-Nhyh.js.map} +1 -1
  5. package/dist/chunks/{Callout-CHs98djt.js → Callout-CxDNb9iE.js} +1 -1
  6. package/dist/chunks/{Callout-CHs98djt.js.map → Callout-CxDNb9iE.js.map} +1 -1
  7. package/dist/chunks/{Checkbox-BLEw-wEb.js → Checkbox-Chtrlh19.js} +1 -1
  8. package/dist/chunks/{Checkbox-BLEw-wEb.js.map → Checkbox-Chtrlh19.js.map} +1 -1
  9. package/dist/chunks/{ColorField-D1t-BdSa.js → ColorField-CSSRv3jG.js} +2 -2
  10. package/dist/chunks/{ColorField-D1t-BdSa.js.map → ColorField-CSSRv3jG.js.map} +1 -1
  11. package/dist/chunks/{ComboBox-cvdKolWv.js → ComboBox-BIQ8KP4h.js} +2 -2
  12. package/dist/chunks/{ComboBox-cvdKolWv.js.map → ComboBox-BIQ8KP4h.js.map} +1 -1
  13. package/dist/chunks/{CurveEditor-BaA-PabB.js → CurveEditor-DiJk0NhK.js} +3 -2
  14. package/dist/chunks/{CurveEditor-BaA-PabB.js.map → CurveEditor-DiJk0NhK.js.map} +1 -1
  15. package/dist/chunks/DataGrid-BgiEYBLo.js +107 -0
  16. package/dist/chunks/DataGrid-BgiEYBLo.js.map +1 -0
  17. package/dist/chunks/{Dialog-DC1x46Sq.js → Dialog-RzrboT4Q.js} +1 -1
  18. package/dist/chunks/{Dialog-DC1x46Sq.js.map → Dialog-RzrboT4Q.js.map} +1 -1
  19. package/dist/chunks/DragHandleGlyph-CJbzRigu.js +47 -0
  20. package/dist/chunks/DragHandleGlyph-CJbzRigu.js.map +1 -0
  21. package/dist/chunks/{Field-BjFl_yng.js → Field-DrRby9vo.js} +1 -1
  22. package/dist/chunks/{Field-BjFl_yng.js.map → Field-DrRby9vo.js.map} +1 -1
  23. package/dist/chunks/{GradientEditor-BJRD0n1g.js → GradientEditor-BuVR6pt-.js} +4 -4
  24. package/dist/chunks/{GradientEditor-BJRD0n1g.js.map → GradientEditor-BuVR6pt-.js.map} +1 -1
  25. package/dist/chunks/{InlineRange-C6UYKxLD.js → InlineRange-B-Jkv8AA.js} +1 -1
  26. package/dist/chunks/{InlineRange-C6UYKxLD.js.map → InlineRange-B-Jkv8AA.js.map} +1 -1
  27. package/dist/chunks/{Input-DhWBgpRx.js → Input-BnxOPY4N.js} +2 -2
  28. package/dist/chunks/{Input-DhWBgpRx.js.map → Input-BnxOPY4N.js.map} +1 -1
  29. package/dist/chunks/{Keycaps-BhCKdyws.js → Keycaps-Dk33JOiH.js} +1 -1
  30. package/dist/chunks/{Keycaps-BhCKdyws.js.map → Keycaps-Dk33JOiH.js.map} +1 -1
  31. package/dist/chunks/LayerStack-DQYvGNPA.js +145 -0
  32. package/dist/chunks/LayerStack-DQYvGNPA.js.map +1 -0
  33. package/dist/chunks/{NumberField-ZdVa4bpJ.js → NumberField-BQ-KaK7T.js} +2 -2
  34. package/dist/chunks/{NumberField-ZdVa4bpJ.js.map → NumberField-BQ-KaK7T.js.map} +1 -1
  35. package/dist/chunks/{OptionsBar-DahCI4Aq.js → OptionsBar-BecAPCID.js} +3 -3
  36. package/dist/chunks/{OptionsBar-DahCI4Aq.js.map → OptionsBar-BecAPCID.js.map} +1 -1
  37. package/dist/chunks/{PaintInput-Cggm9OIl.js → PaintInput-K5W4Uho3.js} +5 -5
  38. package/dist/chunks/{PaintInput-Cggm9OIl.js.map → PaintInput-K5W4Uho3.js.map} +1 -1
  39. package/dist/chunks/{PatternPicker-B63SlDoF.js → PatternPicker-BdLSj_f_.js} +2 -2
  40. package/dist/chunks/{PatternPicker-B63SlDoF.js.map → PatternPicker-BdLSj_f_.js.map} +1 -1
  41. package/dist/chunks/Plot2D-BEjpJhk-.js +134 -0
  42. package/dist/chunks/Plot2D-BEjpJhk-.js.map +1 -0
  43. package/dist/chunks/{PointPlotter-CLd9u5Bq.js → PointPlotter-C_tZb122.js} +2 -2
  44. package/dist/chunks/{PointPlotter-CLd9u5Bq.js.map → PointPlotter-C_tZb122.js.map} +1 -1
  45. package/dist/chunks/{Powerline-DhQJYaUg.js → Powerline-Cc-Av8Pc.js} +1 -1
  46. package/dist/chunks/{Powerline-DhQJYaUg.js.map → Powerline-Cc-Av8Pc.js.map} +1 -1
  47. package/dist/chunks/{Prefs-BSJ0lMmJ.js → Prefs-CRTRAud6.js} +10 -10
  48. package/dist/chunks/{Prefs-BSJ0lMmJ.js.map → Prefs-CRTRAud6.js.map} +1 -1
  49. package/dist/chunks/Properties-BRrWSBHM.js +648 -0
  50. package/dist/chunks/Properties-BRrWSBHM.js.map +1 -0
  51. package/dist/chunks/{RadioGroup-vtwjRiUm.js → RadioGroup-BrtV1Clm.js} +2 -2
  52. package/dist/chunks/{RadioGroup-vtwjRiUm.js.map → RadioGroup-BrtV1Clm.js.map} +1 -1
  53. package/dist/chunks/{RangeSlider-B-n_7AgJ.js → RangeSlider-CJfhxDn6.js} +1 -1
  54. package/dist/chunks/{RangeSlider-B-n_7AgJ.js.map → RangeSlider-CJfhxDn6.js.map} +1 -1
  55. package/dist/chunks/{ResizeHandle--ZExnMfa.js → ResizeHandle-Csz3DPew.js} +1 -1
  56. package/dist/chunks/{ResizeHandle--ZExnMfa.js.map → ResizeHandle-Csz3DPew.js.map} +1 -1
  57. package/dist/chunks/{Select--BVTi-j0.js → Select-BYhHGmMl.js} +2 -2
  58. package/dist/chunks/{Select--BVTi-j0.js.map → Select-BYhHGmMl.js.map} +1 -1
  59. package/dist/chunks/{SelectionPanel-C7kygTFE.js → SelectionPanel-D2IYlj_K.js} +9 -9
  60. package/dist/chunks/{SelectionPanel-C7kygTFE.js.map → SelectionPanel-D2IYlj_K.js.map} +1 -1
  61. package/dist/chunks/{Sidebar-CtwBdr4n.js → Sidebar-DrBQZ9nP.js} +1 -1
  62. package/dist/chunks/{Sidebar-CtwBdr4n.js.map → Sidebar-DrBQZ9nP.js.map} +1 -1
  63. package/dist/chunks/{SidebarPanel-AeSc7wNR.js → SidebarPanel-Dbqb79Kx.js} +1 -1
  64. package/dist/chunks/{SidebarPanel-AeSc7wNR.js.map → SidebarPanel-Dbqb79Kx.js.map} +1 -1
  65. package/dist/chunks/Slider-DbOt9Dji.js +257 -0
  66. package/dist/chunks/Slider-DbOt9Dji.js.map +1 -0
  67. package/dist/chunks/{StatusBar-D_wu-SZh.js → StatusBar-B6lPbvrF.js} +1 -1
  68. package/dist/chunks/{StatusBar-D_wu-SZh.js.map → StatusBar-B6lPbvrF.js.map} +1 -1
  69. package/dist/chunks/{Switch-CtZwp5zm.js → Switch-BSr-vaAC.js} +1 -1
  70. package/dist/chunks/{Switch-CtZwp5zm.js.map → Switch-BSr-vaAC.js.map} +1 -1
  71. package/dist/chunks/{Tabs-lB0IB4TX.js → Tabs-CIa-Idzu.js} +1 -1
  72. package/dist/chunks/{Tabs-lB0IB4TX.js.map → Tabs-CIa-Idzu.js.map} +1 -1
  73. package/dist/chunks/{Toast-hr9BYsho.js → Toast-C0UnBqQu.js} +1 -1
  74. package/dist/chunks/{Toast-hr9BYsho.js.map → Toast-C0UnBqQu.js.map} +1 -1
  75. package/dist/chunks/{ToggleBar-BxgWq-wO.js → ToggleBar-1wDRwSGN.js} +2 -2
  76. package/dist/chunks/{ToggleBar-BxgWq-wO.js.map → ToggleBar-1wDRwSGN.js.map} +1 -1
  77. package/dist/chunks/{ToolButton-CJrPjbsj.js → ToolButton-Bd9l_I8f.js} +1 -1
  78. package/dist/chunks/{ToolButton-CJrPjbsj.js.map → ToolButton-Bd9l_I8f.js.map} +1 -1
  79. package/dist/chunks/{ToolGroup-D_lDzkvU.js → ToolGroup-gizXwttA.js} +1 -1
  80. package/dist/chunks/{ToolGroup-D_lDzkvU.js.map → ToolGroup-gizXwttA.js.map} +1 -1
  81. package/dist/chunks/{ToolOptionsBar-BA6Sb3U2.js → ToolOptionsBar-CXjeTE1d.js} +1 -1
  82. package/dist/chunks/{ToolOptionsBar-BA6Sb3U2.js.map → ToolOptionsBar-CXjeTE1d.js.map} +1 -1
  83. package/dist/chunks/{ToolPalette-TMvkaJwr.js → ToolPalette-3YpkSNfj.js} +5 -5
  84. package/dist/chunks/{ToolPalette-TMvkaJwr.js.map → ToolPalette-3YpkSNfj.js.map} +1 -1
  85. package/dist/chunks/dlog-CMYiRF3Q.js +38 -0
  86. package/dist/chunks/dlog-CMYiRF3Q.js.map +1 -0
  87. package/dist/chunks/{keyGlyph-DNpLxF8u.js → keyGlyph-D3X08tSp.js} +1 -1
  88. package/dist/chunks/{keyGlyph-DNpLxF8u.js.map → keyGlyph-D3X08tSp.js.map} +1 -1
  89. package/dist/chunks/number-llMRJPJW.js +18 -0
  90. package/dist/chunks/number-llMRJPJW.js.map +1 -0
  91. package/dist/chunks/{segmentedControl.module-D4b7x19O.js → segmentedControl.module-YXqIjnmu.js} +1 -1
  92. package/dist/chunks/{segmentedControl.module-D4b7x19O.js.map → segmentedControl.module-YXqIjnmu.js.map} +1 -1
  93. package/dist/chunks/useReorderDragList-RSJqj18B.js +109 -0
  94. package/dist/chunks/useReorderDragList-RSJqj18B.js.map +1 -0
  95. package/dist/chunks/{useRovingTabIndex-CQz8EiKh.js → useRovingTabIndex-CuUl6DLF.js} +1 -1
  96. package/dist/chunks/{useRovingTabIndex-CQz8EiKh.js.map → useRovingTabIndex-CuUl6DLF.js.map} +1 -1
  97. package/dist/components/ActionsBar/index.js +1 -1
  98. package/dist/components/BandEditor/index.js +1 -1
  99. package/dist/components/Callout/index.js +1 -1
  100. package/dist/components/Checkbox/index.js +1 -1
  101. package/dist/components/ColorField/index.js +1 -1
  102. package/dist/components/ComboBox/index.js +1 -1
  103. package/dist/components/CurveEditor/index.js +1 -1
  104. package/dist/components/DataGrid/index.js +1 -1
  105. package/dist/components/Dialog/index.js +1 -1
  106. package/dist/components/DragHandleGlyph/DragHandleGlyph.d.ts +12 -0
  107. package/dist/components/DragHandleGlyph/DragHandleGlyph.d.ts.map +1 -0
  108. package/dist/components/DragHandleGlyph/index.d.ts +3 -0
  109. package/dist/components/DragHandleGlyph/index.d.ts.map +1 -0
  110. package/dist/components/DragHandleGlyph/index.js +2 -0
  111. package/dist/components/Field/index.js +1 -1
  112. package/dist/components/GradientEditor/index.js +1 -1
  113. package/dist/components/InlineRange/index.js +1 -1
  114. package/dist/components/Input/index.js +1 -1
  115. package/dist/components/Keycaps/index.js +2 -2
  116. package/dist/components/LayerStack/LayerStack.d.ts +49 -0
  117. package/dist/components/LayerStack/LayerStack.d.ts.map +1 -0
  118. package/dist/components/LayerStack/index.d.ts +2 -0
  119. package/dist/components/LayerStack/index.d.ts.map +1 -0
  120. package/dist/components/LayerStack/index.js +2 -0
  121. package/dist/components/NumberField/index.js +1 -1
  122. package/dist/components/OptionsBar/index.js +1 -1
  123. package/dist/components/PaintInput/index.js +1 -1
  124. package/dist/components/PatternPicker/index.js +1 -1
  125. package/dist/components/Plot2D/index.js +1 -1
  126. package/dist/components/PointPlotter/index.js +1 -1
  127. package/dist/components/Powerline/index.js +1 -1
  128. package/dist/components/Prefs/index.js +1 -1
  129. package/dist/components/Properties/CurveField.d.ts +37 -0
  130. package/dist/components/Properties/CurveField.d.ts.map +1 -0
  131. package/dist/components/Properties/EffectCard.d.ts +68 -0
  132. package/dist/components/Properties/EffectCard.d.ts.map +1 -0
  133. package/dist/components/Properties/PropertyGroup.d.ts +24 -0
  134. package/dist/components/Properties/PropertyGroup.d.ts.map +1 -0
  135. package/dist/components/Properties/PropertyPanel.d.ts +181 -0
  136. package/dist/components/Properties/PropertyPanel.d.ts.map +1 -0
  137. package/dist/components/Properties/index.d.ts +9 -0
  138. package/dist/components/Properties/index.d.ts.map +1 -0
  139. package/dist/components/Properties/index.js +2 -0
  140. package/dist/components/Properties/storyLayouts.d.ts +11 -0
  141. package/dist/components/Properties/storyLayouts.d.ts.map +1 -0
  142. package/dist/components/RadioGroup/index.js +1 -1
  143. package/dist/components/RangeSlider/index.js +1 -1
  144. package/dist/components/ResizeHandle/index.js +1 -1
  145. package/dist/components/Select/index.js +1 -1
  146. package/dist/components/SelectionPanel/index.js +1 -1
  147. package/dist/components/Sidebar/index.js +1 -1
  148. package/dist/components/SidebarPanel/index.js +1 -1
  149. package/dist/components/Slider/index.js +1 -1
  150. package/dist/components/StatusBar/index.js +1 -1
  151. package/dist/components/Switch/index.js +1 -1
  152. package/dist/components/Tabs/index.js +1 -1
  153. package/dist/components/Toast/index.js +1 -1
  154. package/dist/components/ToggleBar/index.js +1 -1
  155. package/dist/components/ToolButton/index.js +1 -1
  156. package/dist/components/ToolGroup/index.js +1 -1
  157. package/dist/components/ToolOptionsBar/index.js +1 -1
  158. package/dist/components/ToolPalette/index.js +1 -1
  159. package/dist/format/number.d.ts +13 -0
  160. package/dist/format/number.d.ts.map +1 -1
  161. package/dist/index.d.ts +4 -1
  162. package/dist/index.d.ts.map +1 -1
  163. package/dist/index.js +100 -94
  164. package/dist/index.js.map +1 -1
  165. package/dist/style.css +1 -1
  166. package/package.json +4 -4
  167. package/dist/chunks/DataGrid-D15I779H.js +0 -210
  168. package/dist/chunks/DataGrid-D15I779H.js.map +0 -1
  169. package/dist/chunks/Plot2D-sPXTw_-l.js +0 -168
  170. package/dist/chunks/Plot2D-sPXTw_-l.js.map +0 -1
  171. package/dist/chunks/Slider-cxWR47gi.js +0 -259
  172. package/dist/chunks/Slider-cxWR47gi.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