@weasel-js/ui 1.7.3 → 1.8.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 (155) hide show
  1. package/dist/chunks/{Callout-BUn0dP_S.js → Callout-DpTO3fkb.js} +10 -10
  2. package/dist/chunks/Callout-DpTO3fkb.js.map +1 -0
  3. package/dist/chunks/{Checkbox-DFn-x0JO.js → Checkbox-d4IfhiXh.js} +2 -2
  4. package/dist/chunks/{Checkbox-DFn-x0JO.js.map → Checkbox-d4IfhiXh.js.map} +1 -1
  5. package/dist/chunks/{CloseButton-BmNmRVtb.js → CloseButton-wb7Or5Eg.js} +2 -2
  6. package/dist/chunks/{CloseButton-BmNmRVtb.js.map → CloseButton-wb7Or5Eg.js.map} +1 -1
  7. package/dist/chunks/{ColorModeControl-DaVJ-SyX.js → ColorModeControl-DET6Itwq.js} +3 -3
  8. package/dist/chunks/{ColorModeControl-DaVJ-SyX.js.map → ColorModeControl-DET6Itwq.js.map} +1 -1
  9. package/dist/chunks/{DataGrid-CmHJe57v.js → DataGrid-B6IS9vUk.js} +2 -2
  10. package/dist/chunks/{DataGrid-CmHJe57v.js.map → DataGrid-B6IS9vUk.js.map} +1 -1
  11. package/dist/chunks/{DetentSlider-DNTAk8xP.js → DetentSlider-D40V8Oma.js} +2 -2
  12. package/dist/chunks/{DetentSlider-DNTAk8xP.js.map → DetentSlider-D40V8Oma.js.map} +1 -1
  13. package/dist/chunks/{Dialog-DKfsk5VN.js → Dialog-h-5MeYpu.js} +9 -9
  14. package/dist/chunks/{Dialog-DKfsk5VN.js.map → Dialog-h-5MeYpu.js.map} +1 -1
  15. package/dist/chunks/{Disclosure-Ch2KxYuB.js → Disclosure-CpWt87nO.js} +7 -7
  16. package/dist/chunks/{Disclosure-Ch2KxYuB.js.map → Disclosure-CpWt87nO.js.map} +1 -1
  17. package/dist/chunks/FitLabel-BzZGkWfL.js +76 -0
  18. package/dist/chunks/FitLabel-BzZGkWfL.js.map +1 -0
  19. package/dist/chunks/{GradientEditor-DD2OjQtn.js → GradientEditor-vz771M-N.js} +4 -4
  20. package/dist/chunks/{GradientEditor-DD2OjQtn.js.map → GradientEditor-vz771M-N.js.map} +1 -1
  21. package/dist/chunks/{Icon--B1ME-6c.js → Icon-DPRUIo3G.js} +4 -1
  22. package/dist/chunks/Icon-DPRUIo3G.js.map +1 -0
  23. package/dist/chunks/{Jog-BrkzdGV2.js → Jog-TE6QI9i1.js} +3 -3
  24. package/dist/chunks/{Jog-BrkzdGV2.js.map → Jog-TE6QI9i1.js.map} +1 -1
  25. package/dist/chunks/{LayerList-BqeWFuGc.js → LayerList-BXTAjK-4.js} +6 -6
  26. package/dist/chunks/{LayerList-BqeWFuGc.js.map → LayerList-BXTAjK-4.js.map} +1 -1
  27. package/dist/chunks/{ListEditor-OQDzG4A5.js → ListEditor-DGtwj99m.js} +2 -2
  28. package/dist/chunks/{ListEditor-OQDzG4A5.js.map → ListEditor-DGtwj99m.js.map} +1 -1
  29. package/dist/chunks/{MeshEditor-DWpvg8H6.js → MeshEditor-8CRsu-Td.js} +2 -2
  30. package/dist/chunks/{MeshEditor-DWpvg8H6.js.map → MeshEditor-8CRsu-Td.js.map} +1 -1
  31. package/dist/chunks/{NumberField-DS0WSiin.js → NumberField-BXFrOi5M.js} +8 -5
  32. package/dist/chunks/{NumberField-DS0WSiin.js.map → NumberField-BXFrOi5M.js.map} +1 -1
  33. package/dist/chunks/{PaintField-BdmQM53v.js → PaintField-DX4uYlF9.js} +2 -2
  34. package/dist/chunks/{PaintField-BdmQM53v.js.map → PaintField-DX4uYlF9.js.map} +1 -1
  35. package/dist/chunks/{PaintInput-DaQMeBsI.js → PaintInput-CWyOJXUM.js} +5 -5
  36. package/dist/chunks/{PaintInput-DaQMeBsI.js.map → PaintInput-CWyOJXUM.js.map} +1 -1
  37. package/dist/chunks/{PatternPicker-B3HcMZWg.js → PatternPicker-0j51aDJ3.js} +9 -9
  38. package/dist/chunks/PatternPicker-0j51aDJ3.js.map +1 -0
  39. package/dist/chunks/{Prefs-BnVEyfWO.js → Prefs-gbjYqvSD.js} +41 -41
  40. package/dist/chunks/Prefs-gbjYqvSD.js.map +1 -0
  41. package/dist/chunks/{Properties-BoG2MMHR.js → Properties-BbNuMiic.js} +4 -4
  42. package/dist/chunks/{Properties-BoG2MMHR.js.map → Properties-BbNuMiic.js.map} +1 -1
  43. package/dist/chunks/PropertyField-CWUtNK1w.js +751 -0
  44. package/dist/chunks/PropertyField-CWUtNK1w.js.map +1 -0
  45. package/dist/chunks/{SelectionPanel-COZ6z9_P.js → SelectionPanel-BpUqP75b.js} +2 -2
  46. package/dist/chunks/{SelectionPanel-COZ6z9_P.js.map → SelectionPanel-BpUqP75b.js.map} +1 -1
  47. package/dist/chunks/{SidebarPanel-AXQ0jRDx.js → SidebarPanel--dJ-k9-V.js} +3 -3
  48. package/dist/chunks/{SidebarPanel-AXQ0jRDx.js.map → SidebarPanel--dJ-k9-V.js.map} +1 -1
  49. package/dist/chunks/Slider-CHBQ8uUC.js +439 -0
  50. package/dist/chunks/Slider-CHBQ8uUC.js.map +1 -0
  51. package/dist/chunks/{SwatchGrid-9ZPiDmxd.js → SwatchGrid-DxK9e_IV.js} +3 -3
  52. package/dist/chunks/SwatchGrid-DxK9e_IV.js.map +1 -0
  53. package/dist/chunks/{SwatchStrip-Bi9iPLoh.js → SwatchStrip-BY6A511W.js} +2 -2
  54. package/dist/chunks/{SwatchStrip-Bi9iPLoh.js.map → SwatchStrip-BY6A511W.js.map} +1 -1
  55. package/dist/chunks/{ThemeSwitcher-DiBmMh_B.js → ThemeSwitcher-tnATkIo1.js} +2 -2
  56. package/dist/chunks/{ThemeSwitcher-DiBmMh_B.js.map → ThemeSwitcher-tnATkIo1.js.map} +1 -1
  57. package/dist/chunks/{Timeline-sMCH2fah.js → Timeline-FlLUm8nd.js} +4 -4
  58. package/dist/chunks/{Timeline-sMCH2fah.js.map → Timeline-FlLUm8nd.js.map} +1 -1
  59. package/dist/chunks/{Toast-C3ozq11V.js → Toast-CuHkT0x0.js} +2 -2
  60. package/dist/chunks/{Toast-C3ozq11V.js.map → Toast-CuHkT0x0.js.map} +1 -1
  61. package/dist/chunks/ToggleBar-BZ4Gk1IU.js +84 -0
  62. package/dist/chunks/ToggleBar-BZ4Gk1IU.js.map +1 -0
  63. package/dist/chunks/{TokenPanel-WtKGY2Db.js → TokenPanel-DongdiZM.js} +23 -23
  64. package/dist/chunks/{TokenPanel-WtKGY2Db.js.map → TokenPanel-DongdiZM.js.map} +1 -1
  65. package/dist/chunks/ToolOptionsBar-wTPJFfOn.js +94 -0
  66. package/dist/chunks/ToolOptionsBar-wTPJFfOn.js.map +1 -0
  67. package/dist/chunks/{Tree-Cc8lIzgM.js → Tree-hzIbj2q1.js} +2 -2
  68. package/dist/chunks/{Tree-Cc8lIzgM.js.map → Tree-hzIbj2q1.js.map} +1 -1
  69. package/dist/chunks/checkbox.module-Dcx8ILgR.js +5 -0
  70. package/dist/chunks/checkbox.module-Dcx8ILgR.js.map +1 -0
  71. package/dist/chunks/{icons-Dr2-r30x.js → icons-CofIOTiI.js} +2 -2
  72. package/dist/chunks/{icons-Dr2-r30x.js.map → icons-CofIOTiI.js.map} +1 -1
  73. package/dist/chunks/{model-B6zuQg6b.js → model-qQj8Ny9w.js} +134 -133
  74. package/dist/chunks/model-qQj8Ny9w.js.map +1 -0
  75. package/dist/chunks/{prefField-BE_Ytr2H.js → prefField-CCm_nzlM.js} +81 -75
  76. package/dist/chunks/prefField-CCm_nzlM.js.map +1 -0
  77. package/dist/components/Callout/index.js +1 -1
  78. package/dist/components/Checkbox/index.js +1 -1
  79. package/dist/components/CloseButton/index.js +1 -1
  80. package/dist/components/ColorModeControl/index.js +1 -1
  81. package/dist/components/DataGrid/index.js +1 -1
  82. package/dist/components/DetentSlider/index.js +1 -1
  83. package/dist/components/Dialog/index.js +1 -1
  84. package/dist/components/Disclosure/index.js +1 -1
  85. package/dist/components/FitLabel/FitLabel.d.ts +41 -0
  86. package/dist/components/FitLabel/FitLabel.d.ts.map +1 -0
  87. package/dist/components/FitLabel/index.d.ts +3 -0
  88. package/dist/components/FitLabel/index.d.ts.map +1 -0
  89. package/dist/components/FitLabel/index.js +2 -0
  90. package/dist/components/GradientEditor/index.js +1 -1
  91. package/dist/components/InlineRange/InlineRange.d.ts +1 -1
  92. package/dist/components/Jog/index.js +1 -1
  93. package/dist/components/LayerList/index.js +1 -1
  94. package/dist/components/ListEditor/index.js +1 -1
  95. package/dist/components/MeshEditor/index.js +1 -1
  96. package/dist/components/NumberField/UnitField.d.ts.map +1 -1
  97. package/dist/components/NumberField/index.js +1 -1
  98. package/dist/components/PaintField/index.js +1 -1
  99. package/dist/components/PaintInput/index.js +1 -1
  100. package/dist/components/PatternPicker/index.js +1 -1
  101. package/dist/components/Prefs/index.js +2 -2
  102. package/dist/components/Prefs/prefField.d.ts.map +1 -1
  103. package/dist/components/Properties/NumberControls.d.ts +16 -0
  104. package/dist/components/Properties/NumberControls.d.ts.map +1 -0
  105. package/dist/components/Properties/PropertyField.d.ts +18 -8
  106. package/dist/components/Properties/PropertyField.d.ts.map +1 -1
  107. package/dist/components/Properties/index.js +2 -2
  108. package/dist/components/SelectionPanel/index.js +2 -2
  109. package/dist/components/SelectionPanel/renderLeaf.d.ts.map +1 -1
  110. package/dist/components/SidebarPanel/index.js +1 -1
  111. package/dist/components/Slider/Slider.d.ts +6 -0
  112. package/dist/components/Slider/Slider.d.ts.map +1 -1
  113. package/dist/components/Slider/index.js +1 -1
  114. package/dist/components/SwatchGrid/index.js +1 -1
  115. package/dist/components/SwatchStrip/index.js +1 -1
  116. package/dist/components/ThemeSwitcher/index.js +1 -1
  117. package/dist/components/Timeline/index.js +1 -1
  118. package/dist/components/Toast/index.js +1 -1
  119. package/dist/components/ToggleBar/ToggleBar.d.ts.map +1 -1
  120. package/dist/components/ToggleBar/index.js +1 -1
  121. package/dist/components/TokenPanel/index.js +1 -1
  122. package/dist/components/ToolOptionsBar/ToolOptionsBar.d.ts +1 -1
  123. package/dist/components/ToolOptionsBar/ToolOptionsBar.d.ts.map +1 -1
  124. package/dist/components/ToolOptionsBar/index.js +1 -1
  125. package/dist/components/Tree/index.js +1 -1
  126. package/dist/components/stanceCss.d.ts +6 -0
  127. package/dist/components/stanceCss.d.ts.map +1 -1
  128. package/dist/components/stanceSurfaces.d.ts.map +1 -1
  129. package/dist/endless.d.ts +7 -0
  130. package/dist/endless.d.ts.map +1 -0
  131. package/dist/icons/paths.d.ts +2 -0
  132. package/dist/icons/paths.d.ts.map +1 -1
  133. package/dist/index.d.ts +1 -0
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +72 -70
  136. package/dist/index.js.map +1 -1
  137. package/dist/style.css +1 -1
  138. package/package.json +9 -9
  139. package/dist/chunks/Callout-BUn0dP_S.js.map +0 -1
  140. package/dist/chunks/Icon--B1ME-6c.js.map +0 -1
  141. package/dist/chunks/PatternPicker-B3HcMZWg.js.map +0 -1
  142. package/dist/chunks/Prefs-BnVEyfWO.js.map +0 -1
  143. package/dist/chunks/PropertyField-PMrqBA0n.js +0 -743
  144. package/dist/chunks/PropertyField-PMrqBA0n.js.map +0 -1
  145. package/dist/chunks/Slider-DSrlMEq8.js +0 -389
  146. package/dist/chunks/Slider-DSrlMEq8.js.map +0 -1
  147. package/dist/chunks/SwatchGrid-9ZPiDmxd.js.map +0 -1
  148. package/dist/chunks/ToggleBar-Z2jZiguF.js +0 -80
  149. package/dist/chunks/ToggleBar-Z2jZiguF.js.map +0 -1
  150. package/dist/chunks/ToolOptionsBar-BJKwnemU.js +0 -88
  151. package/dist/chunks/ToolOptionsBar-BJKwnemU.js.map +0 -1
  152. package/dist/chunks/checkbox.module-DLQV9tMX.js +0 -5
  153. package/dist/chunks/checkbox.module-DLQV9tMX.js.map +0 -1
  154. package/dist/chunks/model-B6zuQg6b.js.map +0 -1
  155. package/dist/chunks/prefField-BE_Ytr2H.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as e, t } from "./chunks/dlog-F0I8KsIW.js";
2
- import { a as n, i as r, n as i, r as a, t as o } from "./chunks/Icon--B1ME-6c.js";
3
- import { $ as s, A as c, At as l, B as u, C as d, Ct as f, D as p, Dt as m, E as ee, Et as te, F as ne, Ft as re, G as ie, H as ae, I as oe, It as se, J as ce, K as le, L as ue, M as de, Mt as h, N as g, Nt as _, O as v, Ot as y, P as b, Pt as x, Q as S, R as C, S as w, St as T, T as E, Tt as D, U as O, V as k, W as A, X as j, Y as M, Z as N, _ as P, _t as F, a as I, at as L, b as R, bt as z, c as B, ct as V, d as H, dt as fe, et as pe, f as me, ft as he, g as ge, gt as _e, h as ve, ht as ye, i as be, it as xe, j as Se, jt as Ce, k as we, kt as Te, l as Ee, lt as De, m as Oe, mt as ke, n as Ae, nt as je, o as Me, ot as Ne, p as Pe, pt as Fe, q as Ie, r as Le, rt as Re, s as ze, st as Be, t as Ve, tt as He, u as Ue, ut as We, v as Ge, vt as Ke, w as qe, wt as Je, x as Ye, xt as Xe, y as Ze, yt as Qe, z as $e } from "./chunks/icons-Dr2-r30x.js";
2
+ import { a as n, i as r, n as i, r as a, t as o } from "./chunks/Icon-DPRUIo3G.js";
3
+ import { $ as s, A as c, At as l, B as u, C as d, Ct as f, D as p, Dt as m, E as ee, Et as te, F as ne, Ft as re, G as ie, H as ae, I as oe, It as se, J as ce, K as le, L as ue, M as de, Mt as h, N as g, Nt as _, O as v, Ot as y, P as b, Pt as x, Q as S, R as C, S as w, St as T, T as E, Tt as D, U as O, V as k, W as A, X as j, Y as M, Z as N, _ as P, _t as F, a as I, at as L, b as R, bt as z, c as B, ct as V, d as H, dt as fe, et as pe, f as me, ft as he, g as ge, gt as _e, h as ve, ht as ye, i as be, it as xe, j as Se, jt as Ce, k as we, kt as Te, l as Ee, lt as De, m as Oe, mt as ke, n as Ae, nt as je, o as Me, ot as Ne, p as Pe, pt as Fe, q as Ie, r as Le, rt as Re, s as ze, st as Be, t as Ve, tt as He, u as Ue, ut as We, v as Ge, vt as Ke, w as qe, wt as Je, x as Ye, xt as Xe, y as Ze, yt as Qe, z as $e } from "./chunks/icons-CofIOTiI.js";
4
4
  import { n as et, r as tt } from "./chunks/paintValue-BpaGPjV3.js";
5
5
  import { i as nt, n as rt, r as it, t as at } from "./chunks/portalHost-CE70wLzo.js";
6
6
  import { n as ot, r as st, t as ct } from "./chunks/Tooltip-C6eFCYxw.js";
@@ -11,11 +11,11 @@ import { n as pt, t as mt } from "./chunks/Badge-jYQjrTKc.js";
11
11
  import { t as ht } from "./chunks/stance-BFQpS_fL.js";
12
12
  import { t as gt } from "./chunks/Badge-CTc9Lkwn.js";
13
13
  import { t as _t } from "./chunks/Button-XB-T75YL.js";
14
- import { t as vt } from "./chunks/CloseButton-BmNmRVtb.js";
14
+ import { t as vt } from "./chunks/CloseButton-wb7Or5Eg.js";
15
15
  import { t as yt } from "./chunks/Code-AsKpgnv6.js";
16
16
  import { t as bt } from "./chunks/useReorderDragList-CStYKjHl.js";
17
- import { n as xt, r as St, t as Ct } from "./chunks/Disclosure-Ch2KxYuB.js";
18
- import { t as wt } from "./chunks/DataGrid-CmHJe57v.js";
17
+ import { n as xt, r as St, t as Ct } from "./chunks/Disclosure-CpWt87nO.js";
18
+ import { t as wt } from "./chunks/DataGrid-B6IS9vUk.js";
19
19
  import { n as Tt, t as Et } from "./chunks/DetailList-BpU50XVe.js";
20
20
  import { t as Dt } from "./chunks/DragGhost-BeYDJyLZ.js";
21
21
  import { t as Ot } from "./chunks/DragGrip-AoIZXfZb.js";
@@ -25,73 +25,75 @@ import { a as Wt, i as Gt, n as Kt, r as qt, t as Jt } from "./chunks/CurveEdito
25
25
  import { i as Yt, n as Xt, r as Zt, t as Qt } from "./chunks/createKeyframeLayer-DSVf13Su.js";
26
26
  import { n as $t, r as en, t as tn } from "./chunks/handles-CqVANLtu.js";
27
27
  import { t as nn } from "./chunks/snap-DRjbOiG9.js";
28
- import { i as rn, n as an, r as on, t as sn } from "./chunks/Properties-BoG2MMHR.js";
29
- import { t as cn } from "./chunks/Dialog-DKfsk5VN.js";
30
- import { a as ln, c as un, i as dn, l as fn, n as pn, o as mn, s as hn, t as gn } from "./chunks/PropertyField-PMrqBA0n.js";
31
- import { a as _n, i as U, n as vn, o as yn, r as bn, t as xn } from "./chunks/RecentColorsProvider-DHcfk25u.js";
28
+ import { i as rn, n as an, r as on, t as sn } from "./chunks/Properties-BbNuMiic.js";
29
+ import { t as cn } from "./chunks/Dialog-h-5MeYpu.js";
30
+ import { a as ln, c as un, i as dn, l as fn, n as pn, o as mn, s as hn, t as gn } from "./chunks/PropertyField-CWUtNK1w.js";
31
+ import { a as _n, i as vn, n as yn, o as bn, r as xn, t as U } from "./chunks/RecentColorsProvider-DHcfk25u.js";
32
32
  import { t as Sn } from "./chunks/InlineRange-DPjIsJB3.js";
33
33
  import { t as Cn } from "./chunks/ColorField-BwlelY26.js";
34
34
  import { n as wn, r as Tn, t as En } from "./chunks/Select-ouV8O6cp.js";
35
35
  import { t as Dn } from "./chunks/FontFamilySelect-DEvMXyZd.js";
36
36
  import { n as On, t as kn } from "./chunks/FontWeightSelect-BLQ_LMJF.js";
37
37
  import { t as An } from "./chunks/Input-D7SDKbST.js";
38
- import { r as jn, t as Mn } from "./chunks/NumberField-DS0WSiin.js";
39
- import { t as Nn } from "./chunks/paintPreview-CuSZiHpR.js";
40
- import { t as Pn } from "./chunks/Slider-DSrlMEq8.js";
41
- import { t as Fn } from "./chunks/ToggleBar-Z2jZiguF.js";
42
- import { t as In } from "./chunks/useRovingTabIndex-D7u22Ia_.js";
43
- import { o as Ln, s as Rn, t as zn } from "./chunks/MeshEditor-DWpvg8H6.js";
44
- import { i as Bn, n as Vn, r as Hn, t as Un } from "./chunks/GradientEditor-DD2OjQtn.js";
45
- import { n as Wn, t as Gn } from "./chunks/PatternPicker-B3HcMZWg.js";
46
- import { t as Kn } from "./chunks/PaintInput-DaQMeBsI.js";
47
- import { t as qn } from "./chunks/PaintField-BdmQM53v.js";
48
- import { n as Jn, t as Yn } from "./chunks/Field-DiX_WByH.js";
49
- import { n as Xn, t as Zn } from "./chunks/RadioGroup-B70_M-gT.js";
50
- import { t as Qn } from "./chunks/Switch-CSYmcM8y.js";
51
- import { n as $n, r as er, t as tr } from "./chunks/LayerList-BqeWFuGc.js";
52
- import { t as nr } from "./chunks/ItemList-CRu9y7hL.js";
53
- import { t as rr } from "./chunks/ListEditor-OQDzG4A5.js";
54
- import { t as ir } from "./chunks/ColorModeControl-DaVJ-SyX.js";
55
- import { n as ar, t as or } from "./chunks/ThemeSwitcher-DiBmMh_B.js";
56
- import { t as sr } from "./chunks/OptionsBar-DeTAjVb7.js";
57
- import { t as cr } from "./chunks/ButtonBar-CIMKPPRS.js";
58
- import { a as lr, i as ur, n as dr, o as fr, r as pr, s as mr, t as hr } from "./chunks/prefField-BE_Ytr2H.js";
59
- import { i as gr, l as _r, n as vr, o as yr, r as br, s as xr, t as Sr } from "./chunks/model-B6zuQg6b.js";
60
- import { t as Cr } from "./chunks/ToolOptionsBar-BJKwnemU.js";
61
- import { t as wr } from "./chunks/FillStrokeSwatch-C4h3rUFM.js";
62
- import { t as Tr } from "./chunks/SwatchGrid-9ZPiDmxd.js";
63
- import { a as Er, i as Dr, n as Or, r as kr, t as Ar } from "./chunks/SwatchStrip-Bi9iPLoh.js";
64
- import { t as jr } from "./chunks/Powerline-6wIFmDik.js";
65
- import { n as Mr, t as Nr } from "./chunks/GestureRoute-BXESrHI0.js";
66
- import { t as Pr } from "./chunks/FallthroughDiagram-CS1IhQaU.js";
67
- import { a as Fr, i as Ir, n as Lr, o as Rr, r as zr, t as Br } from "./chunks/Prefs-BnVEyfWO.js";
68
- import { t as Vr } from "./chunks/SelectionPanel-COZ6z9_P.js";
69
- import { t as Hr } from "./chunks/ResizeHandle-CbAgCQOt.js";
70
- import { t as Ur } from "./chunks/Sidebar-BZ0m4afn.js";
71
- import { t as Wr } from "./chunks/SidebarPanel-AXQ0jRDx.js";
72
- import { n as Gr, r as Kr, t as qr } from "./chunks/StatusBar-BEOfOX0D.js";
73
- import { t as Jr } from "./chunks/ToolButton-BURp4YIO.js";
74
- import { t as Yr } from "./chunks/ToolGroup-Dpg1LN0l.js";
75
- import { t as Xr } from "./chunks/ToolPalette-DKDFWOX-.js";
38
+ import { t as jn } from "./chunks/paintPreview-CuSZiHpR.js";
39
+ import { t as Mn } from "./chunks/Slider-CHBQ8uUC.js";
40
+ import { t as Nn } from "./chunks/ToggleBar-BZ4Gk1IU.js";
41
+ import { t as Pn } from "./chunks/useRovingTabIndex-D7u22Ia_.js";
42
+ import { i as Fn, n as In, r as Ln, t as Rn } from "./chunks/FitLabel-BzZGkWfL.js";
43
+ import { o as zn, s as Bn, t as Vn } from "./chunks/MeshEditor-8CRsu-Td.js";
44
+ import { i as Hn, n as Un, r as Wn, t as Gn } from "./chunks/GradientEditor-vz771M-N.js";
45
+ import { r as Kn, t as qn } from "./chunks/NumberField-BXFrOi5M.js";
46
+ import { n as Jn, t as Yn } from "./chunks/PatternPicker-0j51aDJ3.js";
47
+ import { t as Xn } from "./chunks/PaintInput-CWyOJXUM.js";
48
+ import { t as Zn } from "./chunks/PaintField-DX4uYlF9.js";
49
+ import { n as Qn, t as $n } from "./chunks/Field-DiX_WByH.js";
50
+ import { n as er, t as tr } from "./chunks/RadioGroup-B70_M-gT.js";
51
+ import { t as nr } from "./chunks/Switch-CSYmcM8y.js";
52
+ import { n as rr, r as ir, t as ar } from "./chunks/LayerList-BXTAjK-4.js";
53
+ import { t as or } from "./chunks/ItemList-CRu9y7hL.js";
54
+ import { t as sr } from "./chunks/ListEditor-DGtwj99m.js";
55
+ import "./components/FitLabel/index.js";
56
+ import { t as cr } from "./chunks/ColorModeControl-DET6Itwq.js";
57
+ import { n as lr, t as ur } from "./chunks/ThemeSwitcher-tnATkIo1.js";
58
+ import { t as dr } from "./chunks/OptionsBar-DeTAjVb7.js";
59
+ import { t as fr } from "./chunks/ButtonBar-CIMKPPRS.js";
60
+ import { a as pr, i as mr, n as hr, o as gr, r as _r, s as vr, t as yr } from "./chunks/prefField-CCm_nzlM.js";
61
+ import { i as br, l as xr, n as Sr, o as Cr, r as wr, s as Tr, t as Er } from "./chunks/model-qQj8Ny9w.js";
62
+ import { t as Dr } from "./chunks/ToolOptionsBar-wTPJFfOn.js";
63
+ import { t as Or } from "./chunks/FillStrokeSwatch-C4h3rUFM.js";
64
+ import { t as kr } from "./chunks/SwatchGrid-DxK9e_IV.js";
65
+ import { a as Ar, i as jr, n as Mr, r as Nr, t as Pr } from "./chunks/SwatchStrip-BY6A511W.js";
66
+ import { t as Fr } from "./chunks/Powerline-6wIFmDik.js";
67
+ import { n as Ir, t as Lr } from "./chunks/GestureRoute-BXESrHI0.js";
68
+ import { t as Rr } from "./chunks/FallthroughDiagram-CS1IhQaU.js";
69
+ import { a as zr, i as Br, n as Vr, o as Hr, r as Ur, t as Wr } from "./chunks/Prefs-gbjYqvSD.js";
70
+ import { t as Gr } from "./chunks/SelectionPanel-BpUqP75b.js";
71
+ import { t as Kr } from "./chunks/ResizeHandle-CbAgCQOt.js";
72
+ import { t as qr } from "./chunks/Sidebar-BZ0m4afn.js";
73
+ import { t as Jr } from "./chunks/SidebarPanel--dJ-k9-V.js";
74
+ import { n as Yr, r as Xr, t as Zr } from "./chunks/StatusBar-BEOfOX0D.js";
75
+ import { t as Qr } from "./chunks/ToolButton-BURp4YIO.js";
76
+ import { t as $r } from "./chunks/ToolGroup-Dpg1LN0l.js";
77
+ import { t as ei } from "./chunks/ToolPalette-DKDFWOX-.js";
76
78
  import "./components/Field/index.js";
77
- import { t as Zr } from "./chunks/Checkbox-DFn-x0JO.js";
78
- import { i as Qr, n as $r, r as ei, t as ti } from "./chunks/Tabs-BbpzLLdY.js";
79
- import { n as ni, r as ri, t as ii } from "./chunks/Tree-Cc8lIzgM.js";
80
- import { t as ai } from "./chunks/MenuButton-TAFg88Lp.js";
81
- import { n as oi, t as si } from "./chunks/ComboBox-DKln_mOd.js";
82
- import { t as ci } from "./chunks/RangeSlider-DO5TZVk7.js";
83
- import { t as li } from "./chunks/DetentSlider-DNTAk8xP.js";
84
- import { n as ui, t as di } from "./chunks/Callout-BUn0dP_S.js";
85
- import { a as fi, i as pi, n as mi, r as hi, t as gi } from "./chunks/Toast-C3ozq11V.js";
86
- import { t as _i } from "./chunks/PointPlotter-BBXpQ_QD.js";
87
- import { a as vi, i as yi, n as bi, r as xi, t as Si } from "./chunks/TokenPanel-WtKGY2Db.js";
88
- import { n as Ci, r as wi, t as Ti } from "./chunks/BandEditor-B4jUAHQ8.js";
89
- import { t as Ei } from "./chunks/Jog-BrkzdGV2.js";
90
- import { a as Di, c as Oi, i as ki, l as Ai, n as ji, o as Mi, r as Ni, s as Pi, t as Fi } from "./chunks/Timeline-sMCH2fah.js";
91
- import { hexToOklchDeg as W, hexToRgba as Ii, interpolateSrgb as G, oklchDegToHex as Li, rgbaToHex as K, useLatest as Ri } from "@weasel-js/core";
92
- import { useCallback as zi, useEffect as q, useRef as J, useState as Y } from "react";
79
+ import { t as ti } from "./chunks/Checkbox-d4IfhiXh.js";
80
+ import { i as ni, n as ri, r as ii, t as ai } from "./chunks/Tabs-BbpzLLdY.js";
81
+ import { n as oi, r as si, t as ci } from "./chunks/Tree-hzIbj2q1.js";
82
+ import { t as li } from "./chunks/MenuButton-TAFg88Lp.js";
83
+ import { n as ui, t as di } from "./chunks/ComboBox-DKln_mOd.js";
84
+ import { t as fi } from "./chunks/RangeSlider-DO5TZVk7.js";
85
+ import { t as pi } from "./chunks/DetentSlider-D40V8Oma.js";
86
+ import { n as mi, t as hi } from "./chunks/Callout-DpTO3fkb.js";
87
+ import { a as gi, i as _i, n as vi, r as yi, t as bi } from "./chunks/Toast-CuHkT0x0.js";
88
+ import { t as xi } from "./chunks/PointPlotter-BBXpQ_QD.js";
89
+ import { a as Si, i as Ci, n as wi, r as Ti, t as Ei } from "./chunks/TokenPanel-DongdiZM.js";
90
+ import { n as Di, r as Oi, t as ki } from "./chunks/BandEditor-B4jUAHQ8.js";
91
+ import { t as Ai } from "./chunks/Jog-TE6QI9i1.js";
92
+ import { a as ji, c as Mi, i as Ni, l as Pi, n as Fi, o as Ii, r as Li, s as Ri, t as zi } from "./chunks/Timeline-FlLUm8nd.js";
93
+ import { hexToOklchDeg as W, hexToRgba as Bi, interpolateSrgb as G, oklchDegToHex as Vi, rgbaToHex as K, useLatest as Hi } from "@weasel-js/core";
94
+ import { useCallback as Ui, useEffect as q, useRef as J, useState as Y } from "react";
93
95
  //#region src/color/oklch.ts
94
- var X = Li;
96
+ var X = Vi;
95
97
  function Z(e, t) {
96
98
  let [n, r] = t.lRange;
97
99
  return e <= n ? t.cBot : e >= r ? t.cTop : e <= t.midL ? t.cBot + (t.cPeak - t.cBot) * ((e - n) / (t.midL - n)) : t.cPeak + (t.cTop - t.cPeak) * ((e - t.midL) / (r - t.midL));
@@ -99,7 +101,7 @@ function Z(e, t) {
99
101
  //#endregion
100
102
  //#region src/color/ramp.ts
101
103
  var Q = (e) => {
102
- let [t, n, r] = Ii(e);
104
+ let [t, n, r] = Bi(e);
103
105
  return [
104
106
  t,
105
107
  n,
@@ -112,13 +114,13 @@ function $(e, t, n, r = {}) {
112
114
  let u = W(l), d = u.C > 1e-4 ? u.H : W(K(G(s, c, n, "oklch", a))).H;
113
115
  return X(u.L, Z(u.L, o), d);
114
116
  }
115
- function Bi(e, t, n, r = {}) {
117
+ function Wi(e, t, n, r = {}) {
116
118
  return n <= 1 ? n === 1 ? [$(e, t, 0, r)] : [] : Array.from({ length: n }, (i, a) => $(e, t, a / (n - 1), r));
117
119
  }
118
120
  //#endregion
119
121
  //#region src/useAsyncOptions.ts
120
- function Vi({ load: e, debounceMs: t = 150, minLength: n = 0 }) {
121
- let [r, i] = Y(""), [a, o] = Y([]), [s, c] = Y(!1), [l, u] = Y(null), d = Ri(e), f = J(0), p = J(0), m = J(null);
122
+ function Gi({ load: e, debounceMs: t = 150, minLength: n = 0 }) {
123
+ let [r, i] = Y(""), [a, o] = Y([]), [s, c] = Y(!1), [l, u] = Y(null), d = Hi(e), f = J(0), p = J(0), m = J(null);
122
124
  return q(() => {
123
125
  if (r.length < n) {
124
126
  m.current?.abort(), m.current = null, p.current = f.current, o([]), c(!1), u(null);
@@ -143,10 +145,10 @@ function Vi({ load: e, debounceMs: t = 150, minLength: n = 0 }) {
143
145
  isLoading: s,
144
146
  loadError: l,
145
147
  inputValue: r,
146
- onInputChange: zi((e) => i(e), [])
148
+ onInputChange: Ui((e) => i(e), [])
147
149
  };
148
150
  }
149
151
  //#endregion
150
- export { ft as ActionBar, Ve as AddIcon, Ae as AlignBottomIcon, Le as AlignCenterXIcon, be as AlignCenterYIcon, I as AlignLeftIcon, Me as AlignRightIcon, ze as AlignTopIcon, Fi as AnimatedTimeline, B as ArrowIcon, gt as BADGE_STATUS_ICONS, kr as BASIC_PALETTE, Dr as BUILTIN_PALETTES, mt as Badge, Ti as BandEditor, Ee as BringForwardIcon, Ue as BringToFrontIcon, H as BusyIcon, _t as Button, cr as ButtonBar, or as COLOR_MODE_OPTIONS, di as Callout, ui as CalloutTrigger, me as CheckIcon, Zr as Checkbox, Pe as ChevronIcon, Oe as CloneIcon, vt as CloseButton, ve as CloseIcon, yt as Code, ge as CollapseIcon, Cn as ColorField, ir as ColorModeControl, si as ComboBox, oi as ComboBoxItem, P as CompareIcon, Ge as CopyIcon, Ze as CrosshairIcon, Kt as CurveEditor, rn as CurveField, R as CutIcon, wt as DataGrid, Ye as DeleteIcon, Et as DetailList, Tt as DetailRow, li as DetentSlider, cn as Dialog, on as DialogRow, Ct as Disclosure, xt as DisclosureMark, St as DisclosureRow, w as DistributeHorizontalIcon, d as DistributeVerticalIcon, Dt as DragGhost, Ot as DragGrip, qe as DuplicateIcon, Mi as EASING_NAMES, pt as EDGE_PROFILES, Di as EasingPicker, E as EllipseIcon, ee as ErrorIcon, p as ExpandIcon, v as ExportIcon, we as EyedropperIcon, Pr as FallthroughDiagram, Yn as Field, wr as FillStrokeSwatch, c as FilterIcon, Se as FitIcon, de as FlipXIcon, g as FlipYIcon, ct as Focusable, Dn as FontFamilySelect, kn as FontWeightSelect, b as FullscreenIcon, Nr as GestureRoute, Hn as GradientEditor, Vn as GradientHandles, ne as GridIcon, oe as GroupIcon, tn as HANDLE_SIZE_TOKENS, ue as HandIcon, C as HiddenIcon, a as ICON_FILLS, r as ICON_GROUPS, n as ICON_PATHS, o as Icon, $e as ImageIcon, u as InfoIcon, Sn as InlineRange, An as Input, nr as ItemList, Ei as Jog, Nt as KeyCap, jt as KeySequence, k as LassoIcon, $n as LayerList, Yt as LayeredCurveEditor, ae as LayersIcon, O as LayoutColumnsIcon, A as LayoutGridIcon, ie as LayoutRowsIcon, le as LineIcon, Ie as LinkIcon, rr as ListEditor, ce as LockIcon, M as LoupeIcon, Sr as MIXED, j as MeasureIcon, ai as MenuButton, Ln as MeshEditor, zn as MeshHandles, N as ModeAutoIcon, S as ModeDarkIcon, s as ModeLightIcon, jn as NumberField, sr as OptionsBar, at as OverlayPortalProvider, pe as PageIcon, qn as PaintField, Kn as PaintInput, He as PanIcon, je as PasteIcon, Gn as PatternPicker, Re as PauseIcon, xe as PenIcon, L as PencilIcon, Ne as PinIcon, Be as PlayIcon, Ut as Plot2D, _i as PointPlotter, V as PolygonIcon, jr as Powerline, Br as PrefsDialog, Lr as PrefsForm, Ir as PrefsPane, zr as PrefsRail, gn as PropertyControl, pn as PropertyField, an as PropertyGroup, dn as PropertyHelp, ln as PropertyList, mn as PropertyNote, hn as PropertyPanel, un as PropertyRow, fn as PropertySpan, Zn as Radio, Xn as RadioGroup, De as RandomizeIcon, ci as RangeSlider, xn as RecentColorsProvider, We as RectIcon, fe as RedoIcon, he as RefreshIcon, Fe as RemoveIcon, ke as ResetIcon, Hr as ResizeHandle, Er as STANDARD_PALETTE, Un as SceneGradientHandles, ye as SearchIcon, En as Select, _e as SelectIcon, wn as SelectItem, Tn as SelectSection, Vr as SelectionPanel, F as SendBackwardIcon, Ke as SendToBackIcon, Ur as Sidebar, Wr as SidebarPanel, Pn as Slider, Qe as SnapIcon, z as SnapshotIcon, Xe as SortIcon, T as StarIcon, qr as StatusBar, Gr as StatusBarItem, Kr as StatusBarSpacer, f as StepBackIcon, Je as StepForwardIcon, D as StepIcon, te as StopIcon, sn as Subpanel, Tr as SwatchGrid, Ar as SwatchStrip, Qn as Switch, bi as TOKEN_CATEGORIES, ti as Tab, $r as TabList, ei as TabPanel, Qr as Tabs, m as TextIcon, ar as ThemeSwitcher, ji as Timeline, mi as ToastQueue, gi as ToastRegion, Fn as ToggleBar, Si as TokenPanel, Jr as ToolButton, Yr as ToolGroup, Cr as ToolOptionsBar, Xr as ToolPalette, ot as Tooltip, st as TooltipTrigger, ki as Transport, ii as Tree, y as TuneIcon, Te as UndoIcon, l as UngroupIcon, Mn as UnitField, Ce as UnknownIcon, h as UnlockIcon, _ as VisibleIcon, x as WarningIcon, re as ZoomInIcon, se as ZoomOutIcon, vr as aggregateValue, Qt as applyKeyframeDrag, Z as chromaAt, br as classifyKind, Bi as colorRamp, qt as createFunctionLayer, Xt as createKeyframeLayer, _n as createRecentColorsStore, Jt as createSetCurveOp, hi as createToastQueue, pi as defaultToastQueue, Or as describeColor, kt as detectPlatform, t as dlog, Pi as easingBezier, Oi as easingLabel, gr as effectiveSections, Jn as fieldClasses, dr as filterPrefSubtree, ni as filterTree, On as fontWeightLabel, dt as formatShortcut, ut as formatShortcutParts, zt as formatTick, Gt as functionLayerState, Mr as gestureRouteSegments, $t as handleHalf, en as handleSize, At as inferKeycapKind, xi as inferTokenType, e as isDebugEnabled, i as isFillable, Rn as isMeshPaint, pr as isPrefLeaf, lt as keyGlyph, Mt as keySpecFromKey, Pt as keySpecsFromMods, Ft as keySpecsFromShortcut, Zt as keyframeLayerState, yr as kindBreakdown, Ci as linearScale, wi as logScale, Ht as modelToPlot, er as moveLayers, rt as nearestPortalHost, Vt as niceStep, Rt as niceTicks, xr as nodeValueAt, yn as normalizeRecentColor, X as oklchToHex, Bn as paintGradientTrack, Nn as paintPreviewCss, Fr as pickActiveSection, Lt as plotToModel, ur as prefDisplayBounds, hr as prefFieldProps, lr as prefRailItems, fr as prefValueAtPath, $ as rampColor, yi as refitScale, Ni as samePath, Wt as sampleByInterpolation, Ai as sampleEasing, Wn as seedPattern, _r as setAtPath, nn as snapToNearest, et as solidColorOf, It as stepDecimals, tt as strokeColorOf, Bt as tickDecimals, fi as toast, vi as tokenCategory, ri as treeBranchIds, it as useAssignedPortalContainer, Vi as useAsyncOptions, nt as useOverlayPortal, vn as useRecentColors, bn as useRecentColorsStore, U as useRecordRecentColor, bt as useReorderDragList, In as useRovingTabIndex, tr as useSceneLayerList, Rr as useScrollSpy, ht as useStance, mr as visiblePrefSubtree };
152
+ export { ft as ActionBar, Ve as AddIcon, Ae as AlignBottomIcon, Le as AlignCenterXIcon, be as AlignCenterYIcon, I as AlignLeftIcon, Me as AlignRightIcon, ze as AlignTopIcon, zi as AnimatedTimeline, B as ArrowIcon, gt as BADGE_STATUS_ICONS, Nr as BASIC_PALETTE, jr as BUILTIN_PALETTES, mt as Badge, ki as BandEditor, Ee as BringForwardIcon, Ue as BringToFrontIcon, H as BusyIcon, _t as Button, fr as ButtonBar, ur as COLOR_MODE_OPTIONS, hi as Callout, mi as CalloutTrigger, me as CheckIcon, ti as Checkbox, Pe as ChevronIcon, Oe as CloneIcon, vt as CloseButton, ve as CloseIcon, yt as Code, ge as CollapseIcon, Cn as ColorField, cr as ColorModeControl, di as ComboBox, ui as ComboBoxItem, P as CompareIcon, Ge as CopyIcon, Ze as CrosshairIcon, Kt as CurveEditor, rn as CurveField, R as CutIcon, wt as DataGrid, Ye as DeleteIcon, Et as DetailList, Tt as DetailRow, pi as DetentSlider, cn as Dialog, on as DialogRow, Ct as Disclosure, xt as DisclosureMark, St as DisclosureRow, w as DistributeHorizontalIcon, d as DistributeVerticalIcon, Dt as DragGhost, Ot as DragGrip, qe as DuplicateIcon, Ii as EASING_NAMES, pt as EDGE_PROFILES, ji as EasingPicker, E as EllipseIcon, ee as ErrorIcon, p as ExpandIcon, v as ExportIcon, we as EyedropperIcon, Rr as FallthroughDiagram, $n as Field, Or as FillStrokeSwatch, c as FilterIcon, Se as FitIcon, Rn as FitLabel, In as FitScope, de as FlipXIcon, g as FlipYIcon, ct as Focusable, Dn as FontFamilySelect, kn as FontWeightSelect, b as FullscreenIcon, Lr as GestureRoute, Wn as GradientEditor, Un as GradientHandles, ne as GridIcon, oe as GroupIcon, tn as HANDLE_SIZE_TOKENS, ue as HandIcon, C as HiddenIcon, a as ICON_FILLS, r as ICON_GROUPS, n as ICON_PATHS, o as Icon, $e as ImageIcon, u as InfoIcon, Sn as InlineRange, An as Input, or as ItemList, Ai as Jog, Nt as KeyCap, jt as KeySequence, k as LassoIcon, rr as LayerList, Yt as LayeredCurveEditor, ae as LayersIcon, O as LayoutColumnsIcon, A as LayoutGridIcon, ie as LayoutRowsIcon, le as LineIcon, Ie as LinkIcon, sr as ListEditor, ce as LockIcon, M as LoupeIcon, Er as MIXED, j as MeasureIcon, li as MenuButton, zn as MeshEditor, Vn as MeshHandles, N as ModeAutoIcon, S as ModeDarkIcon, s as ModeLightIcon, Kn as NumberField, dr as OptionsBar, at as OverlayPortalProvider, pe as PageIcon, Zn as PaintField, Xn as PaintInput, He as PanIcon, je as PasteIcon, Yn as PatternPicker, Re as PauseIcon, xe as PenIcon, L as PencilIcon, Ne as PinIcon, Be as PlayIcon, Ut as Plot2D, xi as PointPlotter, V as PolygonIcon, Fr as Powerline, Wr as PrefsDialog, Vr as PrefsForm, Br as PrefsPane, Ur as PrefsRail, gn as PropertyControl, pn as PropertyField, an as PropertyGroup, dn as PropertyHelp, ln as PropertyList, mn as PropertyNote, hn as PropertyPanel, un as PropertyRow, fn as PropertySpan, tr as Radio, er as RadioGroup, De as RandomizeIcon, fi as RangeSlider, U as RecentColorsProvider, We as RectIcon, fe as RedoIcon, he as RefreshIcon, Fe as RemoveIcon, ke as ResetIcon, Kr as ResizeHandle, Ar as STANDARD_PALETTE, Gn as SceneGradientHandles, ye as SearchIcon, En as Select, _e as SelectIcon, wn as SelectItem, Tn as SelectSection, Gr as SelectionPanel, F as SendBackwardIcon, Ke as SendToBackIcon, qr as Sidebar, Jr as SidebarPanel, Mn as Slider, Qe as SnapIcon, z as SnapshotIcon, Xe as SortIcon, T as StarIcon, Zr as StatusBar, Yr as StatusBarItem, Xr as StatusBarSpacer, f as StepBackIcon, Je as StepForwardIcon, D as StepIcon, te as StopIcon, sn as Subpanel, kr as SwatchGrid, Pr as SwatchStrip, nr as Switch, wi as TOKEN_CATEGORIES, ai as Tab, ri as TabList, ii as TabPanel, ni as Tabs, m as TextIcon, lr as ThemeSwitcher, Fi as Timeline, vi as ToastQueue, bi as ToastRegion, Nn as ToggleBar, Ei as TokenPanel, Qr as ToolButton, $r as ToolGroup, Dr as ToolOptionsBar, ei as ToolPalette, ot as Tooltip, st as TooltipTrigger, Ni as Transport, ci as Tree, y as TuneIcon, Te as UndoIcon, l as UngroupIcon, qn as UnitField, Ce as UnknownIcon, h as UnlockIcon, _ as VisibleIcon, x as WarningIcon, re as ZoomInIcon, se as ZoomOutIcon, Sr as aggregateValue, Qt as applyKeyframeDrag, Z as chromaAt, wr as classifyKind, Wi as colorRamp, qt as createFunctionLayer, Xt as createKeyframeLayer, _n as createRecentColorsStore, Jt as createSetCurveOp, yi as createToastQueue, _i as defaultToastQueue, Mr as describeColor, kt as detectPlatform, t as dlog, Ri as easingBezier, Mi as easingLabel, br as effectiveSections, Qn as fieldClasses, hr as filterPrefSubtree, oi as filterTree, On as fontWeightLabel, dt as formatShortcut, ut as formatShortcutParts, zt as formatTick, Gt as functionLayerState, Ir as gestureRouteSegments, $t as handleHalf, en as handleSize, At as inferKeycapKind, Ti as inferTokenType, e as isDebugEnabled, i as isFillable, Bn as isMeshPaint, _r as isPrefLeaf, lt as keyGlyph, Mt as keySpecFromKey, Pt as keySpecsFromMods, Ft as keySpecsFromShortcut, Zt as keyframeLayerState, Cr as kindBreakdown, Ln as labelForms, Di as linearScale, Oi as logScale, Ht as modelToPlot, ir as moveLayers, rt as nearestPortalHost, Vt as niceStep, Rt as niceTicks, Tr as nodeValueAt, bn as normalizeRecentColor, X as oklchToHex, Hn as paintGradientTrack, jn as paintPreviewCss, zr as pickActiveSection, Lt as plotToModel, mr as prefDisplayBounds, yr as prefFieldProps, pr as prefRailItems, gr as prefValueAtPath, $ as rampColor, Ci as refitScale, Li as samePath, Wt as sampleByInterpolation, Pi as sampleEasing, Jn as seedPattern, xr as setAtPath, nn as snapToNearest, et as solidColorOf, It as stepDecimals, tt as strokeColorOf, Bt as tickDecimals, gi as toast, Si as tokenCategory, si as treeBranchIds, it as useAssignedPortalContainer, Gi as useAsyncOptions, Fn as useFitScope, nt as useOverlayPortal, yn as useRecentColors, xn as useRecentColorsStore, vn as useRecordRecentColor, bt as useReorderDragList, Pn as useRovingTabIndex, ar as useSceneLayerList, Hr as useScrollSpy, ht as useStance, vr as visiblePrefSubtree };
151
153
 
152
154
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["isDebugEnabled","ICON_PATHS","ICON_GROUPS","isFillable","ICON_FILLS","Icon","ModeLightIcon","FilterIcon","UngroupIcon","InfoIcon","DistributeVerticalIcon","StepBackIcon","ExpandIcon","TextIcon","ErrorIcon","StopIcon","GridIcon","ZoomInIcon","LayoutRowsIcon","LayersIcon","GroupIcon","ZoomOutIcon","LockIcon","LineIcon","HandIcon","FlipXIcon","UnlockIcon","FlipYIcon","VisibleIcon","ExportIcon","TuneIcon","FullscreenIcon","WarningIcon","ModeDarkIcon","HiddenIcon","DistributeHorizontalIcon","StarIcon","EllipseIcon","StepIcon","LayoutColumnsIcon","LassoIcon","LayoutGridIcon","MeasureIcon","LoupeIcon","ModeAutoIcon","CompareIcon","SendBackwardIcon","AlignLeftIcon","PencilIcon","CutIcon","SnapshotIcon","ArrowIcon","PolygonIcon","BusyIcon","RedoIcon","PageIcon","CheckIcon","RefreshIcon","CollapseIcon","SelectIcon","CloseIcon","SearchIcon","AlignCenterYIcon","PenIcon","FitIcon","UnknownIcon","EyedropperIcon","UndoIcon","BringForwardIcon","RandomizeIcon","CloneIcon","ResetIcon","AlignBottomIcon","PasteIcon","AlignRightIcon","PinIcon","ChevronIcon","RemoveIcon","LinkIcon","AlignCenterXIcon","PauseIcon","AlignTopIcon","PlayIcon","AddIcon","PanIcon","BringToFrontIcon","RectIcon","CopyIcon","SendToBackIcon","DuplicateIcon","StepForwardIcon","DeleteIcon","SortIcon","CrosshairIcon","SnapIcon","ImageIcon","solidColorOf","strokeColorOf","useOverlayPortal","nearestPortalHost","useAssignedPortalContainer","OverlayPortalProvider","Tooltip","TooltipTrigger","Focusable","keyGlyph","formatShortcutParts","formatShortcut","ActionBar","EDGE_PROFILES","Badge","useStance","BADGE_STATUS_ICONS","Button","CloseButton","Code","useReorderDragList","DisclosureMark","DisclosureRow","Disclosure","DataGrid","DetailRow","DetailList","DragGhost","DragGrip","detectPlatform","inferKeycapKind","KeySequence","keySpecFromKey","KeyCap","keySpecsFromMods","keySpecsFromShortcut","stepDecimals","plotToModel","niceTicks","formatTick","tickDecimals","niceStep","modelToPlot","Plot2D","sampleByInterpolation","functionLayerState","CurveEditor","createFunctionLayer","createSetCurveOp","LayeredCurveEditor","createKeyframeLayer","keyframeLayerState","applyKeyframeDrag","handleHalf","handleSize","HANDLE_SIZE_TOKENS","snapToNearest","CurveField","PropertyGroup","DialogRow","Subpanel","Dialog","PropertyList","PropertyRow","PropertyHelp","PropertySpan","PropertyField","PropertyNote","PropertyPanel","PropertyControl","createRecentColorsStore","useRecordRecentColor","useRecentColors","normalizeRecentColor","useRecentColorsStore","RecentColorsProvider","InlineRange","ColorField","SelectItem","SelectSection","Select","FontFamilySelect","fontWeightLabel","FontWeightSelect","Input","NumberField","UnitField","paintPreviewCss","Slider","ToggleBar","useRovingTabIndex","MeshEditor","isMeshPaint","MeshHandles","paintGradientTrack","GradientHandles","GradientEditor","SceneGradientHandles","seedPattern","PatternPicker","PaintInput","PaintField","fieldClasses","Field","RadioGroup","Radio","Switch","LayerList","moveLayers","useSceneLayerList","ItemList","ListEditor","ColorModeControl","ThemeSwitcher","COLOR_MODE_OPTIONS","OptionsBar","ButtonBar","prefRailItems","prefDisplayBounds","filterPrefSubtree","prefValueAtPath","isPrefLeaf","visiblePrefSubtree","prefFieldProps","effectiveSections","setAtPath","aggregateValue","kindBreakdown","classifyKind","nodeValueAt","MIXED","ToolOptionsBar","FillStrokeSwatch","SwatchGrid","STANDARD_PALETTE","BUILTIN_PALETTES","describeColor","BASIC_PALETTE","SwatchStrip","Powerline","gestureRouteSegments","GestureRoute","FallthroughDiagram","pickActiveSection","PrefsPane","PrefsForm","useScrollSpy","PrefsRail","PrefsDialog","SelectionPanel","ResizeHandle","Sidebar","SidebarPanel","StatusBarItem","StatusBarSpacer","StatusBar","ToolButton","ToolGroup","ToolPalette","Checkbox","Tabs","TabList","TabPanel","Tab","filterTree","treeBranchIds","Tree","MenuButton","ComboBoxItem","ComboBox","RangeSlider","DetentSlider","DialogTrigger","Callout","toast","defaultToastQueue","ToastQueue","createToastQueue","ToastRegion","PointPlotter","tokenCategory","refitScale","TOKEN_CATEGORIES","inferTokenType","TokenPanel","linearScale","logScale","BandEditor","Jog","EasingPicker","easingLabel","Transport","sampleEasing","Timeline","EASING_NAMES","samePath","easingBezier","AnimatedTimeline","oklchToHex","oklchDegToHex","chromaAt","lo","hi","curve","L","rgb","r","g","b","hexToRgba","hex","rampColor","options","a","from","to","rgbaToHex","interpolateSrgb","t","space","hue","chroma","s","hexToOklchDeg","H","colorRamp","steps","i","useAsyncOptions","inputValue","setInputValue","useState","setOptions","isLoading","setIsLoading","loadError","setLoadError","loadRef","useLatest","load","issued","useRef","applied","inFlight","useEffect","minLength","timer","mine","controller","next","error","debounceMs","useCallback","dlog"],"sources":["../src/color/oklch.ts","../src/color/ramp.ts","../src/useAsyncOptions.ts"],"sourcesContent":["// OKLCH math from Björn Ottosson: https://bottosson.github.io/posts/oklab/\nimport { oklchDegToHex } from '@weasel-js/core';\n\n/**\n * A chroma envelope over lightness, as three linear segments: flat at `cBot`\n * below `lRange[0]`, rising to `cPeak` at `midL`, falling to `cTop` at\n * `lRange[1]`, flat beyond. Keeps a color ramp inside gamut at the light and\n * dark ends while staying saturated through the middle.\n */\nexport type ChromaCurve = {\n lRange: [number, number];\n midL: number;\n cBot: number;\n cPeak: number;\n cTop: number;\n};\n\n/** A single lightness/chroma sample. */\nexport type ChromaCurvePoint = { L: number; C: number };\n\n/**\n * Converts an OKLCH color to a gamut-clipped `#rrggbb` string. Hue is in\n * degrees, unlike the kit's OKLab helpers which take radians.\n */\nexport const oklchToHex = oklchDegToHex;\n\n/** Evaluates a {@link ChromaCurve} at a lightness, clamping outside its range. */\nexport function chromaAt(L: number, curve: ChromaCurve): number {\n const [lo, hi] = curve.lRange;\n if (L <= lo) return curve.cBot;\n if (L >= hi) return curve.cTop;\n if (L <= curve.midL) return curve.cBot + (curve.cPeak - curve.cBot) * ((L - lo) / (curve.midL - lo));\n return curve.cPeak + (curve.cTop - curve.cPeak) * ((L - curve.midL) / (hi - curve.midL));\n}\n","import {\n hexToOklchDeg,\n hexToRgba,\n interpolateSrgb,\n rgbaToHex,\n type ColorInterpolationSpace,\n type HueInterpolation,\n} from '@weasel-js/core';\nimport { chromaAt, oklchToHex, type ChromaCurve } from './oklch';\n\n/**\n * How {@link rampColor} and {@link colorRamp} travel between two endpoints.\n *\n * What each space interpolates:\n *\n * | `space` | components lerped | hue |\n * | --------------- | ---------------------------- | -------------------- |\n * | `'oklch'` | L, C, H | around the wheel |\n * | `'hsl'` | H, S, L | around the wheel |\n * | `'oklab'` | L, a, b | through the wheel |\n * | `'srgb'` | gamma-encoded R, G, B | through the wheel |\n * | `'srgb-linear'` | linear-light R, G, B | through the wheel |\n *\n * A lightness ramp is two endpoints that differ in lightness, and a hue ramp\n * two that differ in hue: the polar spaces keep chroma or saturation fixed\n * while they move, and the others cut a straight line between the two colors,\n * which for a hue ramp passes through gray.\n *\n * `chroma` is an OKLCH envelope in every space, since {@link ChromaCurve}'s\n * numbers are OKLCH chroma over OKLCH lightness. It runs after the\n * interpolation: each sample keeps its lightness and hue, and its chroma is\n * replaced with the curve's value at that lightness. A sample left with no\n * hue (a gray midpoint) takes the hue an OKLCH ramp would have had there.\n */\nexport interface ColorRampOptions {\n /** Default `'oklch'`. */\n space?: ColorInterpolationSpace;\n /** Polar spaces only. Default `'shorter'`. */\n hue?: HueInterpolation;\n chroma?: ChromaCurve;\n}\n\nconst rgb = (hex: string): [number, number, number] => {\n const [r, g, b] = hexToRgba(hex);\n return [r, g, b];\n};\n\n/** One sample of a ramp from `from` to `to` (`#rrggbb`), `t` in 0..1. */\nexport function rampColor(from: string, to: string, t: number, options: ColorRampOptions = {}): string {\n const { space = 'oklch', hue = 'shorter', chroma } = options;\n const a = rgb(from);\n const b = rgb(to);\n const hex = rgbaToHex(interpolateSrgb(a, b, t, space, hue));\n if (!chroma) return hex;\n const s = hexToOklchDeg(hex);\n const H = s.C > 1e-4 ? s.H : hexToOklchDeg(rgbaToHex(interpolateSrgb(a, b, t, 'oklch', hue))).H;\n return oklchToHex(s.L, chromaAt(s.L, chroma), H);\n}\n\n/** `steps` evenly spaced samples from `from` to `to`, both ends included. */\nexport function colorRamp(from: string, to: string, steps: number, options: ColorRampOptions = {}): string[] {\n if (steps <= 1) return steps === 1 ? [rampColor(from, to, 0, options)] : [];\n return Array.from({ length: steps }, (_, i) => rampColor(from, to, i / (steps - 1), options));\n}\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport { useLatest } from '@weasel-js/core';\nimport type { ComboBoxOption } from './components/ComboBox/ComboBox';\n\ntype Key = string | number;\n\n/** An option list keyed to the value type its combo box commits. */\nexport type AsyncOption<T extends Key> = ComboBoxOption & { value: T };\n\n/** Options for {@link useAsyncOptions}. */\nexport type UseAsyncOptionsProps<T extends Key> = {\n /**\n * Fetches the options for a query. The signal aborts when a later keystroke\n * supersedes this call, so a `fetch` should forward it.\n */\n load: (query: string, signal: AbortSignal) => Promise<ReadonlyArray<AsyncOption<T>>>;\n /** Quiet period before a query is sent. */\n debounceMs?: number;\n /** Shorter queries are not sent, and empty the options. */\n minLength?: number;\n};\n\n/** What {@link useAsyncOptions} returns, shaped to spread into a `ComboBox`. */\nexport type AsyncOptionsResult<T extends Key> = {\n options: ReadonlyArray<AsyncOption<T>>;\n isLoading: boolean;\n loadError: unknown | null;\n inputValue: string;\n onInputChange: (next: string) => void;\n};\n\n/**\n * Drives a combo box whose options come from a server: debounces the query,\n * discards responses overtaken by a later one, and reports a failed load\n * separately from an empty result.\n *\n * `options` holds the last *resolved* list and is never emptied to mean\n * \"working\", so the previous results stay on screen — and stay arrowable —\n * while the next request is in flight.\n */\nexport function useAsyncOptions<T extends Key = string>({\n load,\n debounceMs = 150,\n minLength = 0,\n}: UseAsyncOptionsProps<T>): AsyncOptionsResult<T> {\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState<ReadonlyArray<AsyncOption<T>>>([]);\n const [isLoading, setIsLoading] = useState(false);\n const [loadError, setLoadError] = useState<unknown | null>(null);\n\n // Read through a ref: a consumer passing an inline arrow re-creates `load`\n // every render, and depending on it directly would refire the request.\n const loadRef = useLatest(load);\n\n // A monotonic id per request, and the highest one whose result has been\n // applied. A liveness flag cannot do this job: two requests from adjacent\n // keystrokes are both live, so the slower one overwrites the newer result\n // if it lands second.\n const issued = useRef(0);\n const applied = useRef(0);\n const inFlight = useRef<AbortController | null>(null);\n\n useEffect(() => {\n if (inputValue.length < minLength) {\n inFlight.current?.abort();\n inFlight.current = null;\n applied.current = issued.current;\n setOptions([]);\n setIsLoading(false);\n setLoadError(null);\n return;\n }\n\n const timer = setTimeout(() => {\n const mine = ++issued.current;\n const controller = new AbortController();\n inFlight.current?.abort();\n inFlight.current = controller;\n setIsLoading(true);\n\n loadRef.current(inputValue, controller.signal).then(\n (next) => {\n if (mine <= applied.current) return;\n applied.current = mine;\n setOptions(next);\n setLoadError(null);\n setIsLoading(false);\n },\n (error: unknown) => {\n if (controller.signal.aborted || mine <= applied.current) return;\n applied.current = mine;\n setLoadError(error);\n setIsLoading(false);\n },\n );\n }, debounceMs);\n\n return () => clearTimeout(timer);\n }, [inputValue, debounceMs, minLength, loadRef]);\n\n useEffect(() => () => inFlight.current?.abort(), []);\n\n const onInputChange = useCallback((next: string) => setInputValue(next), []);\n\n return { options, isLoading, loadError, inputValue, onInputChange };\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","names":["isDebugEnabled","ICON_PATHS","ICON_GROUPS","isFillable","ICON_FILLS","Icon","ModeLightIcon","FilterIcon","UngroupIcon","InfoIcon","DistributeVerticalIcon","StepBackIcon","ExpandIcon","TextIcon","ErrorIcon","StopIcon","GridIcon","ZoomInIcon","LayoutRowsIcon","LayersIcon","GroupIcon","ZoomOutIcon","LockIcon","LineIcon","HandIcon","FlipXIcon","UnlockIcon","FlipYIcon","VisibleIcon","ExportIcon","TuneIcon","FullscreenIcon","WarningIcon","ModeDarkIcon","HiddenIcon","DistributeHorizontalIcon","StarIcon","EllipseIcon","StepIcon","LayoutColumnsIcon","LassoIcon","LayoutGridIcon","MeasureIcon","LoupeIcon","ModeAutoIcon","CompareIcon","SendBackwardIcon","AlignLeftIcon","PencilIcon","CutIcon","SnapshotIcon","ArrowIcon","PolygonIcon","BusyIcon","RedoIcon","PageIcon","CheckIcon","RefreshIcon","CollapseIcon","SelectIcon","CloseIcon","SearchIcon","AlignCenterYIcon","PenIcon","FitIcon","UnknownIcon","EyedropperIcon","UndoIcon","BringForwardIcon","RandomizeIcon","CloneIcon","ResetIcon","AlignBottomIcon","PasteIcon","AlignRightIcon","PinIcon","ChevronIcon","RemoveIcon","LinkIcon","AlignCenterXIcon","PauseIcon","AlignTopIcon","PlayIcon","AddIcon","PanIcon","BringToFrontIcon","RectIcon","CopyIcon","SendToBackIcon","DuplicateIcon","StepForwardIcon","DeleteIcon","SortIcon","CrosshairIcon","SnapIcon","ImageIcon","solidColorOf","strokeColorOf","useOverlayPortal","nearestPortalHost","useAssignedPortalContainer","OverlayPortalProvider","Tooltip","TooltipTrigger","Focusable","keyGlyph","formatShortcutParts","formatShortcut","ActionBar","EDGE_PROFILES","Badge","useStance","BADGE_STATUS_ICONS","Button","CloseButton","Code","useReorderDragList","DisclosureMark","DisclosureRow","Disclosure","DataGrid","DetailRow","DetailList","DragGhost","DragGrip","detectPlatform","inferKeycapKind","KeySequence","keySpecFromKey","KeyCap","keySpecsFromMods","keySpecsFromShortcut","stepDecimals","plotToModel","niceTicks","formatTick","tickDecimals","niceStep","modelToPlot","Plot2D","sampleByInterpolation","functionLayerState","CurveEditor","createFunctionLayer","createSetCurveOp","LayeredCurveEditor","createKeyframeLayer","keyframeLayerState","applyKeyframeDrag","handleHalf","handleSize","HANDLE_SIZE_TOKENS","snapToNearest","CurveField","PropertyGroup","DialogRow","Subpanel","Dialog","PropertyList","PropertyRow","PropertyHelp","PropertySpan","PropertyField","PropertyNote","PropertyPanel","PropertyControl","createRecentColorsStore","useRecordRecentColor","useRecentColors","normalizeRecentColor","useRecentColorsStore","RecentColorsProvider","InlineRange","ColorField","SelectItem","SelectSection","Select","FontFamilySelect","fontWeightLabel","FontWeightSelect","Input","paintPreviewCss","Slider","ToggleBar","useRovingTabIndex","useFitScope","FitScope","labelForms","FitLabel","MeshEditor","isMeshPaint","MeshHandles","paintGradientTrack","GradientHandles","GradientEditor","SceneGradientHandles","NumberField","UnitField","seedPattern","PatternPicker","PaintInput","PaintField","fieldClasses","Field","RadioGroup","Radio","Switch","LayerList","moveLayers","useSceneLayerList","ItemList","ListEditor","ColorModeControl","ThemeSwitcher","COLOR_MODE_OPTIONS","OptionsBar","ButtonBar","prefRailItems","prefDisplayBounds","filterPrefSubtree","prefValueAtPath","isPrefLeaf","visiblePrefSubtree","prefFieldProps","effectiveSections","setAtPath","aggregateValue","kindBreakdown","classifyKind","nodeValueAt","MIXED","ToolOptionsBar","FillStrokeSwatch","SwatchGrid","STANDARD_PALETTE","BUILTIN_PALETTES","describeColor","BASIC_PALETTE","SwatchStrip","Powerline","gestureRouteSegments","GestureRoute","FallthroughDiagram","pickActiveSection","PrefsPane","PrefsForm","useScrollSpy","PrefsRail","PrefsDialog","SelectionPanel","ResizeHandle","Sidebar","SidebarPanel","StatusBarItem","StatusBarSpacer","StatusBar","ToolButton","ToolGroup","ToolPalette","Checkbox","Tabs","TabList","TabPanel","Tab","filterTree","treeBranchIds","Tree","MenuButton","ComboBoxItem","ComboBox","RangeSlider","DetentSlider","DialogTrigger","Callout","toast","defaultToastQueue","ToastQueue","createToastQueue","ToastRegion","PointPlotter","tokenCategory","refitScale","TOKEN_CATEGORIES","inferTokenType","TokenPanel","linearScale","logScale","BandEditor","Jog","EasingPicker","easingLabel","Transport","sampleEasing","Timeline","EASING_NAMES","samePath","easingBezier","AnimatedTimeline","oklchToHex","oklchDegToHex","chromaAt","lo","hi","curve","L","rgb","r","g","b","hexToRgba","hex","rampColor","options","a","from","to","rgbaToHex","interpolateSrgb","t","space","hue","chroma","s","hexToOklchDeg","H","colorRamp","steps","i","useAsyncOptions","inputValue","setInputValue","useState","setOptions","isLoading","setIsLoading","loadError","setLoadError","loadRef","useLatest","load","issued","useRef","applied","inFlight","useEffect","minLength","timer","mine","controller","next","error","debounceMs","useCallback","dlog"],"sources":["../src/color/oklch.ts","../src/color/ramp.ts","../src/useAsyncOptions.ts"],"sourcesContent":["// OKLCH math from Björn Ottosson: https://bottosson.github.io/posts/oklab/\nimport { oklchDegToHex } from '@weasel-js/core';\n\n/**\n * A chroma envelope over lightness, as three linear segments: flat at `cBot`\n * below `lRange[0]`, rising to `cPeak` at `midL`, falling to `cTop` at\n * `lRange[1]`, flat beyond. Keeps a color ramp inside gamut at the light and\n * dark ends while staying saturated through the middle.\n */\nexport type ChromaCurve = {\n lRange: [number, number];\n midL: number;\n cBot: number;\n cPeak: number;\n cTop: number;\n};\n\n/** A single lightness/chroma sample. */\nexport type ChromaCurvePoint = { L: number; C: number };\n\n/**\n * Converts an OKLCH color to a gamut-clipped `#rrggbb` string. Hue is in\n * degrees, unlike the kit's OKLab helpers which take radians.\n */\nexport const oklchToHex = oklchDegToHex;\n\n/** Evaluates a {@link ChromaCurve} at a lightness, clamping outside its range. */\nexport function chromaAt(L: number, curve: ChromaCurve): number {\n const [lo, hi] = curve.lRange;\n if (L <= lo) return curve.cBot;\n if (L >= hi) return curve.cTop;\n if (L <= curve.midL) return curve.cBot + (curve.cPeak - curve.cBot) * ((L - lo) / (curve.midL - lo));\n return curve.cPeak + (curve.cTop - curve.cPeak) * ((L - curve.midL) / (hi - curve.midL));\n}\n","import {\n hexToOklchDeg,\n hexToRgba,\n interpolateSrgb,\n rgbaToHex,\n type ColorInterpolationSpace,\n type HueInterpolation,\n} from '@weasel-js/core';\nimport { chromaAt, oklchToHex, type ChromaCurve } from './oklch';\n\n/**\n * How {@link rampColor} and {@link colorRamp} travel between two endpoints.\n *\n * What each space interpolates:\n *\n * | `space` | components lerped | hue |\n * | --------------- | ---------------------------- | -------------------- |\n * | `'oklch'` | L, C, H | around the wheel |\n * | `'hsl'` | H, S, L | around the wheel |\n * | `'oklab'` | L, a, b | through the wheel |\n * | `'srgb'` | gamma-encoded R, G, B | through the wheel |\n * | `'srgb-linear'` | linear-light R, G, B | through the wheel |\n *\n * A lightness ramp is two endpoints that differ in lightness, and a hue ramp\n * two that differ in hue: the polar spaces keep chroma or saturation fixed\n * while they move, and the others cut a straight line between the two colors,\n * which for a hue ramp passes through gray.\n *\n * `chroma` is an OKLCH envelope in every space, since {@link ChromaCurve}'s\n * numbers are OKLCH chroma over OKLCH lightness. It runs after the\n * interpolation: each sample keeps its lightness and hue, and its chroma is\n * replaced with the curve's value at that lightness. A sample left with no\n * hue (a gray midpoint) takes the hue an OKLCH ramp would have had there.\n */\nexport interface ColorRampOptions {\n /** Default `'oklch'`. */\n space?: ColorInterpolationSpace;\n /** Polar spaces only. Default `'shorter'`. */\n hue?: HueInterpolation;\n chroma?: ChromaCurve;\n}\n\nconst rgb = (hex: string): [number, number, number] => {\n const [r, g, b] = hexToRgba(hex);\n return [r, g, b];\n};\n\n/** One sample of a ramp from `from` to `to` (`#rrggbb`), `t` in 0..1. */\nexport function rampColor(from: string, to: string, t: number, options: ColorRampOptions = {}): string {\n const { space = 'oklch', hue = 'shorter', chroma } = options;\n const a = rgb(from);\n const b = rgb(to);\n const hex = rgbaToHex(interpolateSrgb(a, b, t, space, hue));\n if (!chroma) return hex;\n const s = hexToOklchDeg(hex);\n const H = s.C > 1e-4 ? s.H : hexToOklchDeg(rgbaToHex(interpolateSrgb(a, b, t, 'oklch', hue))).H;\n return oklchToHex(s.L, chromaAt(s.L, chroma), H);\n}\n\n/** `steps` evenly spaced samples from `from` to `to`, both ends included. */\nexport function colorRamp(from: string, to: string, steps: number, options: ColorRampOptions = {}): string[] {\n if (steps <= 1) return steps === 1 ? [rampColor(from, to, 0, options)] : [];\n return Array.from({ length: steps }, (_, i) => rampColor(from, to, i / (steps - 1), options));\n}\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport { useLatest } from '@weasel-js/core';\nimport type { ComboBoxOption } from './components/ComboBox/ComboBox';\n\ntype Key = string | number;\n\n/** An option list keyed to the value type its combo box commits. */\nexport type AsyncOption<T extends Key> = ComboBoxOption & { value: T };\n\n/** Options for {@link useAsyncOptions}. */\nexport type UseAsyncOptionsProps<T extends Key> = {\n /**\n * Fetches the options for a query. The signal aborts when a later keystroke\n * supersedes this call, so a `fetch` should forward it.\n */\n load: (query: string, signal: AbortSignal) => Promise<ReadonlyArray<AsyncOption<T>>>;\n /** Quiet period before a query is sent. */\n debounceMs?: number;\n /** Shorter queries are not sent, and empty the options. */\n minLength?: number;\n};\n\n/** What {@link useAsyncOptions} returns, shaped to spread into a `ComboBox`. */\nexport type AsyncOptionsResult<T extends Key> = {\n options: ReadonlyArray<AsyncOption<T>>;\n isLoading: boolean;\n loadError: unknown | null;\n inputValue: string;\n onInputChange: (next: string) => void;\n};\n\n/**\n * Drives a combo box whose options come from a server: debounces the query,\n * discards responses overtaken by a later one, and reports a failed load\n * separately from an empty result.\n *\n * `options` holds the last *resolved* list and is never emptied to mean\n * \"working\", so the previous results stay on screen — and stay arrowable —\n * while the next request is in flight.\n */\nexport function useAsyncOptions<T extends Key = string>({\n load,\n debounceMs = 150,\n minLength = 0,\n}: UseAsyncOptionsProps<T>): AsyncOptionsResult<T> {\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState<ReadonlyArray<AsyncOption<T>>>([]);\n const [isLoading, setIsLoading] = useState(false);\n const [loadError, setLoadError] = useState<unknown | null>(null);\n\n // Read through a ref: a consumer passing an inline arrow re-creates `load`\n // every render, and depending on it directly would refire the request.\n const loadRef = useLatest(load);\n\n // A monotonic id per request, and the highest one whose result has been\n // applied. A liveness flag cannot do this job: two requests from adjacent\n // keystrokes are both live, so the slower one overwrites the newer result\n // if it lands second.\n const issued = useRef(0);\n const applied = useRef(0);\n const inFlight = useRef<AbortController | null>(null);\n\n useEffect(() => {\n if (inputValue.length < minLength) {\n inFlight.current?.abort();\n inFlight.current = null;\n applied.current = issued.current;\n setOptions([]);\n setIsLoading(false);\n setLoadError(null);\n return;\n }\n\n const timer = setTimeout(() => {\n const mine = ++issued.current;\n const controller = new AbortController();\n inFlight.current?.abort();\n inFlight.current = controller;\n setIsLoading(true);\n\n loadRef.current(inputValue, controller.signal).then(\n (next) => {\n if (mine <= applied.current) return;\n applied.current = mine;\n setOptions(next);\n setLoadError(null);\n setIsLoading(false);\n },\n (error: unknown) => {\n if (controller.signal.aborted || mine <= applied.current) return;\n applied.current = mine;\n setLoadError(error);\n setIsLoading(false);\n },\n );\n }, debounceMs);\n\n return () => clearTimeout(timer);\n }, [inputValue, debounceMs, minLength, loadRef]);\n\n useEffect(() => () => inFlight.current?.abort(), []);\n\n const onInputChange = useCallback((next: string) => setInputValue(next), []);\n\n return { options, isLoading, loadError, inputValue, onInputChange };\n}\n"],"mappings":"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"}