@ark-ui/solid 4.10.2 → 5.0.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 (255) hide show
  1. package/README.md +6 -9
  2. package/dist/chunk/{E72NMPSK.jsx → 2FYSIKNK.jsx} +5 -13
  3. package/dist/chunk/{ASCGEGA5.jsx → 2TEQVFZN.jsx} +11 -15
  4. package/dist/chunk/{2H4WHODR.js → 3CUJRNYI.js} +7 -10
  5. package/dist/chunk/{MRQ2UYM4.jsx → 3VB4UGEY.jsx} +8 -10
  6. package/dist/chunk/{ATMUKDFF.js → 44YJVOL2.js} +8 -10
  7. package/dist/chunk/{7YIHAT7J.jsx → 4D76BVTD.jsx} +35 -17
  8. package/dist/chunk/{VARNCRUN.js → 4E5OPUFZ.js} +16 -18
  9. package/dist/chunk/{5JS7LFUQ.js → 4GOBFWQB.js} +9 -8
  10. package/dist/chunk/{RAEDLHD3.js → 55NHLACH.js} +11 -14
  11. package/dist/chunk/{2HTNQLGP.jsx → 676ULDTZ.jsx} +9 -13
  12. package/dist/chunk/{U7SPBSDD.jsx → 6AKFQH4M.jsx} +8 -13
  13. package/dist/chunk/{QODB3C3M.js → 6MQ6S5JP.js} +8 -5
  14. package/dist/chunk/{CIPYIXIW.js → 6NMPU3T3.js} +8 -10
  15. package/dist/chunk/{FNEB2RAF.js → 6VITT55B.js} +9 -10
  16. package/dist/chunk/{MQDN267C.jsx → 7AJYNPOZ.jsx} +8 -11
  17. package/dist/chunk/{EHJDQTTW.jsx → 7IAJIOJR.jsx} +3 -16
  18. package/dist/chunk/{UGKLUHKU.js → A4HLKXDW.js} +8 -11
  19. package/dist/chunk/{3LRXHWW2.js → A6LAAZDX.js} +32 -27
  20. package/dist/chunk/{LVPQ6GR4.js → AIQ2GVFX.js} +6 -7
  21. package/dist/chunk/{JVXNYKNA.js → ANDTZLCB.js} +8 -10
  22. package/dist/chunk/{5O4RWSWO.jsx → BPYAMTER.jsx} +6 -4
  23. package/dist/chunk/{AIQFNVCU.jsx → BTPWLTJU.jsx} +9 -18
  24. package/dist/chunk/{6MXKM4GA.js → C4WAO4VB.js} +9 -10
  25. package/dist/chunk/{2W32Z6JZ.js → DBAO7VQW.js} +9 -10
  26. package/dist/chunk/{5SRZ3YYC.js → DEA5DIWS.js} +7 -8
  27. package/dist/chunk/{CCA5XJM6.jsx → DH5DKFFF.jsx} +19 -37
  28. package/dist/chunk/{Y4LH2CR6.jsx → DS2MX7YY.jsx} +8 -11
  29. package/dist/chunk/{34OZO53S.js → DVI7TRLG.js} +9 -12
  30. package/dist/chunk/{QQUR4MWN.js → E2TLJMGI.js} +15 -17
  31. package/dist/chunk/{H4RSHLA7.jsx → EH5LPBSV.jsx} +9 -13
  32. package/dist/chunk/{F3QPTRGW.jsx → EIGYBOW2.jsx} +27 -34
  33. package/dist/chunk/{HU7FZMJI.jsx → ENXUS2WG.jsx} +9 -14
  34. package/dist/chunk/{AX5SMQMA.js → EUXWRO3A.js} +16 -17
  35. package/dist/chunk/{K54W24N6.jsx → FHWNUAQM.jsx} +10 -15
  36. package/dist/chunk/{7S43DIPW.js → FX6TOMB3.js} +13 -25
  37. package/dist/chunk/{MBQQASZE.js → GUQTNAZU.js} +9 -10
  38. package/dist/chunk/{B7LE23PE.jsx → H5QZC4VW.jsx} +9 -13
  39. package/dist/chunk/{NK4T7LIZ.jsx → H7SWP54F.jsx} +7 -11
  40. package/dist/chunk/{M2FICVVI.js → HQEG6EKY.js} +9 -11
  41. package/dist/chunk/{U3XJZI3X.jsx → I4VF53LH.jsx} +15 -25
  42. package/dist/chunk/{G2WIACWP.js → JOWPVE6E.js} +8 -9
  43. package/dist/chunk/{SN5TXTB6.jsx → JZ7ZQZT4.jsx} +17 -54
  44. package/dist/chunk/{X3BMEEJH.js → KMFRZGLF.js} +34 -14
  45. package/dist/chunk/{GZVCPLKK.jsx → KQ4BIFPS.jsx} +9 -10
  46. package/dist/chunk/{WPFSEVTX.js → LFWIA7VB.js} +11 -14
  47. package/dist/chunk/{3O5VTKDF.jsx → LKOJO4VB.jsx} +16 -32
  48. package/dist/chunk/{5XD5ZSBX.js → M2C67TPA.js} +13 -17
  49. package/dist/chunk/{2GATVLPK.js → M63JXHU4.js} +7 -8
  50. package/dist/chunk/MOG4V2NQ.jsx +15 -0
  51. package/dist/chunk/{XUVXUPEH.js → MZD7ZKWI.js} +2 -7
  52. package/dist/chunk/{YCYZZGN2.jsx → NCURFCYQ.jsx} +9 -8
  53. package/dist/chunk/{5ONYCKM3.jsx → NEBB7COJ.jsx} +1 -1
  54. package/dist/chunk/{Q7NPTAJI.js → NNZQ2FQW.js} +8 -9
  55. package/dist/chunk/{QGV2SUTQ.jsx → O5AHG7DQ.jsx} +16 -19
  56. package/dist/chunk/{6YQ3EF2J.js → O62NKGT4.js} +9 -11
  57. package/dist/chunk/{2J42A7KM.js → OA5UZFKE.js} +2 -2
  58. package/dist/chunk/{CPMYIT5J.jsx → OAH52ZNM.jsx} +11 -12
  59. package/dist/chunk/OAPCRIL5.js +8 -0
  60. package/dist/chunk/{T4NRAKVA.jsx → OEZAIQU2.jsx} +9 -10
  61. package/dist/chunk/{YV5BACLX.js → OIGKROX4.js} +9 -9
  62. package/dist/chunk/{IQJBNZOX.jsx → PES3MXH3.jsx} +8 -6
  63. package/dist/chunk/{DXYB7RYX.js → PJNGX4UT.js} +9 -8
  64. package/dist/chunk/{3HMZSTYX.js → PL4PGQFF.js} +8 -10
  65. package/dist/chunk/{PRMWTLUY.jsx → POFK2TVP.jsx} +8 -9
  66. package/dist/chunk/{WKVZFHUH.jsx → PVOFTEOB.jsx} +14 -25
  67. package/dist/chunk/{HPDOBQ3V.js → QEMQBM6W.js} +1 -1
  68. package/dist/chunk/{L7OSYHVR.js → QFAL6GWC.js} +1 -1
  69. package/dist/chunk/{PSLLOEMD.js → QKFZ3XTM.js} +14 -28
  70. package/dist/chunk/{IZC6PKGT.jsx → QZQUUXCF.jsx} +10 -14
  71. package/dist/chunk/{MMS6MJ72.js → R6Q7TUSQ.js} +8 -11
  72. package/dist/chunk/{3QQZKR3F.jsx → RCXMZN3G.jsx} +1 -1
  73. package/dist/chunk/{WM2IZOYM.jsx → RG3IJESS.jsx} +48 -80
  74. package/dist/chunk/{SWUA2VFC.js → SAI3RCJY.js} +7 -10
  75. package/dist/chunk/{ZC6KWJ4T.jsx → SBKJA5N2.jsx} +7 -12
  76. package/dist/chunk/{RZBYC7DR.jsx → SBLZHOW2.jsx} +3 -12
  77. package/dist/chunk/SDD2HKR3.js +71 -0
  78. package/dist/chunk/{WIVXL7HJ.jsx → SL2ZPLSH.jsx} +9 -13
  79. package/dist/chunk/{3WGLTS6O.js → SRPSYZUL.js} +7 -8
  80. package/dist/chunk/{DOPROT6M.jsx → SWZSXMPJ.jsx} +10 -8
  81. package/dist/chunk/{BY62F4IV.jsx → TEZHN26Z.jsx} +8 -11
  82. package/dist/chunk/{5EVN6V64.js → TMTD3AUG.js} +12 -15
  83. package/dist/chunk/{I5UG2QUO.js → TROPIN4C.js} +1 -7
  84. package/dist/chunk/{NMGUCD2L.jsx → TVCIHLER.jsx} +2 -11
  85. package/dist/chunk/{5CYHETDY.js → UIAQFG6P.js} +7 -7
  86. package/dist/chunk/{7PKUSZKY.jsx → USV2CYTP.jsx} +9 -9
  87. package/dist/chunk/{GXWVYON6.js → V2YBSJKS.js} +8 -10
  88. package/dist/chunk/{WQQVH7YG.jsx → VLUE7XIS.jsx} +34 -19
  89. package/dist/chunk/{TC2QHQ47.jsx → WPEIDU6T.jsx} +17 -42
  90. package/dist/chunk/{LCESUDZB.js → WRLQ7Y6E.js} +5 -13
  91. package/dist/chunk/{34MDPAG6.js → WT3OTYHP.js} +27 -11
  92. package/dist/chunk/{IOTZAUDA.jsx → WUTUKX4C.jsx} +1 -1
  93. package/dist/chunk/{DU4TY3XA.jsx → WZ7FNJXM.jsx} +11 -15
  94. package/dist/chunk/X34KVQNW.js +1 -1
  95. package/dist/chunk/{P7I44WC4.jsx → XHA6B6L2.jsx} +21 -22
  96. package/dist/chunk/{TOVWS5LG.jsx → XNZ7GOP4.jsx} +15 -24
  97. package/dist/chunk/{MYMGOYXH.js → XR4WJDUT.js} +2 -2
  98. package/dist/chunk/{SJSLQDBZ.jsx → YE6V66JY.jsx} +10 -18
  99. package/dist/chunk/{W43X4SNE.js → YS6KIHEB.js} +6 -6
  100. package/dist/chunk/{QZYE5W7T.jsx → ZOMTU4P2.jsx} +11 -19
  101. package/dist/components/accordion/index.d.ts +2 -7
  102. package/dist/components/accordion/index.js +1 -1
  103. package/dist/components/accordion/index.jsx +7 -8
  104. package/dist/components/avatar/index.d.ts +2 -2
  105. package/dist/components/avatar/index.js +1 -1
  106. package/dist/components/avatar/index.jsx +5 -6
  107. package/dist/components/carousel/index.d.ts +3 -8
  108. package/dist/components/carousel/index.js +1 -1
  109. package/dist/components/carousel/index.jsx +5 -6
  110. package/dist/components/checkbox/index.d.ts +3 -8
  111. package/dist/components/checkbox/index.js +1 -1
  112. package/dist/components/checkbox/index.jsx +8 -9
  113. package/dist/components/clipboard/index.d.ts +2 -2
  114. package/dist/components/clipboard/index.js +1 -1
  115. package/dist/components/clipboard/index.jsx +5 -6
  116. package/dist/components/collapsible/index.d.ts +2 -7
  117. package/dist/components/collapsible/index.js +1 -1
  118. package/dist/components/collapsible/index.jsx +6 -7
  119. package/dist/components/collection.d.ts +3 -3
  120. package/dist/components/collection.js +1 -1
  121. package/dist/components/collection.jsx +1 -1
  122. package/dist/components/color-picker/index.d.ts +4 -14
  123. package/dist/components/color-picker/index.js +1 -1
  124. package/dist/components/color-picker/index.jsx +10 -10
  125. package/dist/components/combobox/index.d.ts +3 -13
  126. package/dist/components/combobox/index.js +2 -2
  127. package/dist/components/combobox/index.jsx +12 -12
  128. package/dist/components/date-picker/index.d.ts +4 -16
  129. package/dist/components/date-picker/index.js +1 -1
  130. package/dist/components/date-picker/index.jsx +7 -8
  131. package/dist/components/dialog/index.d.ts +3 -8
  132. package/dist/components/dialog/index.js +1 -1
  133. package/dist/components/dialog/index.jsx +7 -8
  134. package/dist/components/editable/index.d.ts +2 -12
  135. package/dist/components/editable/index.js +1 -1
  136. package/dist/components/editable/index.jsx +8 -8
  137. package/dist/components/field/index.d.ts +2 -2
  138. package/dist/components/field/index.js +1 -1
  139. package/dist/components/field/index.jsx +4 -3
  140. package/dist/components/fieldset/index.d.ts +2 -2
  141. package/dist/components/fieldset/index.js +1 -1
  142. package/dist/components/fieldset/index.jsx +2 -2
  143. package/dist/components/file-upload/index.d.ts +2 -2
  144. package/dist/components/file-upload/index.js +1 -1
  145. package/dist/components/file-upload/index.jsx +8 -8
  146. package/dist/components/focus-trap/index.d.ts +1 -1
  147. package/dist/components/format/index.js +1 -1
  148. package/dist/components/format/index.jsx +4 -5
  149. package/dist/components/frame/index.js +1 -1
  150. package/dist/components/frame/index.jsx +4 -5
  151. package/dist/components/hover-card/index.d.ts +3 -8
  152. package/dist/components/hover-card/index.js +1 -1
  153. package/dist/components/hover-card/index.jsx +7 -8
  154. package/dist/components/index.d.ts +2 -1
  155. package/dist/components/index.js +45 -45
  156. package/dist/components/index.jsx +295 -297
  157. package/dist/components/menu/index.d.ts +4 -9
  158. package/dist/components/menu/index.js +1 -1
  159. package/dist/components/menu/index.jsx +7 -8
  160. package/dist/components/number-input/index.d.ts +2 -7
  161. package/dist/components/number-input/index.js +1 -1
  162. package/dist/components/number-input/index.jsx +8 -8
  163. package/dist/components/pagination/index.d.ts +2 -7
  164. package/dist/components/pagination/index.js +1 -1
  165. package/dist/components/pagination/index.jsx +5 -6
  166. package/dist/components/pin-input/index.d.ts +2 -7
  167. package/dist/components/pin-input/index.js +1 -1
  168. package/dist/components/pin-input/index.jsx +8 -8
  169. package/dist/components/popover/index.d.ts +3 -8
  170. package/dist/components/popover/index.js +1 -1
  171. package/dist/components/popover/index.jsx +7 -8
  172. package/dist/components/presence/index.d.ts +2 -2
  173. package/dist/components/presence/index.js +1 -1
  174. package/dist/components/presence/index.jsx +3 -3
  175. package/dist/components/progress/index.d.ts +2 -7
  176. package/dist/components/progress/index.js +1 -1
  177. package/dist/components/progress/index.jsx +5 -6
  178. package/dist/components/qr-code/index.d.ts +2 -7
  179. package/dist/components/qr-code/index.js +1 -1
  180. package/dist/components/qr-code/index.jsx +5 -6
  181. package/dist/components/radio-group/index.d.ts +2 -7
  182. package/dist/components/radio-group/index.js +1 -1
  183. package/dist/components/radio-group/index.jsx +5 -6
  184. package/dist/components/rating-group/index.d.ts +5 -10
  185. package/dist/components/rating-group/index.js +1 -1
  186. package/dist/components/rating-group/index.jsx +8 -8
  187. package/dist/components/segment-group/index.d.ts +3 -8
  188. package/dist/components/segment-group/index.js +1 -1
  189. package/dist/components/segment-group/index.jsx +5 -6
  190. package/dist/components/select/index.d.ts +3 -13
  191. package/dist/components/select/index.js +2 -2
  192. package/dist/components/select/index.jsx +12 -12
  193. package/dist/components/signature-pad/index.d.ts +2 -2
  194. package/dist/components/signature-pad/index.js +1 -1
  195. package/dist/components/signature-pad/index.jsx +8 -8
  196. package/dist/components/slider/index.d.ts +3 -8
  197. package/dist/components/slider/index.js +1 -1
  198. package/dist/components/slider/index.jsx +5 -6
  199. package/dist/components/splitter/index.d.ts +3 -8
  200. package/dist/components/splitter/index.js +1 -1
  201. package/dist/components/splitter/index.jsx +5 -6
  202. package/dist/components/steps/index.d.ts +6 -10
  203. package/dist/components/steps/index.js +1 -1
  204. package/dist/components/steps/index.jsx +5 -6
  205. package/dist/components/switch/index.d.ts +2 -7
  206. package/dist/components/switch/index.js +1 -1
  207. package/dist/components/switch/index.jsx +8 -8
  208. package/dist/components/tabs/index.d.ts +2 -7
  209. package/dist/components/tabs/index.js +1 -1
  210. package/dist/components/tabs/index.jsx +7 -8
  211. package/dist/components/tags-input/index.d.ts +2 -7
  212. package/dist/components/tags-input/index.js +1 -1
  213. package/dist/components/tags-input/index.jsx +8 -8
  214. package/dist/components/time-picker/index.d.ts +3 -13
  215. package/dist/components/time-picker/index.js +1 -1
  216. package/dist/components/time-picker/index.jsx +7 -8
  217. package/dist/components/timer/index.d.ts +2 -2
  218. package/dist/components/timer/index.js +1 -1
  219. package/dist/components/timer/index.jsx +5 -6
  220. package/dist/components/toast/index.d.ts +6 -7
  221. package/dist/components/toast/index.js +1 -1
  222. package/dist/components/toast/index.jsx +5 -2
  223. package/dist/components/toggle/index.d.ts +5 -34
  224. package/dist/components/toggle/index.js +1 -1
  225. package/dist/components/toggle/index.jsx +2 -4
  226. package/dist/components/toggle-group/index.d.ts +3 -8
  227. package/dist/components/toggle-group/index.js +1 -1
  228. package/dist/components/toggle-group/index.jsx +5 -6
  229. package/dist/components/tooltip/index.d.ts +3 -8
  230. package/dist/components/tooltip/index.js +1 -1
  231. package/dist/components/tooltip/index.jsx +7 -8
  232. package/dist/components/tour/index.d.ts +4 -4
  233. package/dist/components/tour/index.js +1 -1
  234. package/dist/components/tour/index.jsx +7 -8
  235. package/dist/components/tree-view/index.d.ts +6 -16
  236. package/dist/components/tree-view/index.js +2 -2
  237. package/dist/components/tree-view/index.jsx +9 -10
  238. package/dist/index.d.ts +2 -1
  239. package/dist/index.js +47 -47
  240. package/dist/index.jsx +295 -297
  241. package/dist/providers/environment/index.js +1 -1
  242. package/dist/providers/environment/index.jsx +2 -3
  243. package/dist/providers/index.js +2 -2
  244. package/dist/providers/index.jsx +3 -4
  245. package/dist/providers/locale/index.js +1 -1
  246. package/dist/providers/locale/index.jsx +2 -2
  247. package/dist/{use-presence-Ct1onT3-.d.ts → use-presence-C07V_WCb.d.ts} +1 -1
  248. package/package.json +71 -78
  249. package/dist/chunk/52WUF3CY.jsx +0 -26
  250. package/dist/chunk/BSPFGETO.js +0 -21
  251. package/dist/chunk/CTTG4GSG.js +0 -30
  252. package/dist/chunk/DT73WLR4.js +0 -5
  253. package/dist/chunk/JHG4EID2.jsx +0 -233
  254. package/dist/chunk/KGOB2IMX.jsx +0 -7
  255. package/dist/chunk/MV3KTL7M.js +0 -107
@@ -1,6 +1,3 @@
1
- import {
2
- useControllableState
3
- } from "./52WUF3CY.jsx";
4
1
  import {
5
2
  createSplitProps
6
3
  } from "./6WEDGJKQ.jsx";
@@ -9,7 +6,7 @@ import {
9
6
  } from "./UFYZ7HLU.jsx";
10
7
  import {
11
8
  createContext
12
- } from "./NMGUCD2L.jsx";
9
+ } from "./TVCIHLER.jsx";
13
10
  import {
14
11
  __export
15
12
  } from "./7IUG3E2V.jsx";
@@ -37,13 +34,13 @@ import { mergeProps } from "@zag-js/solid";
37
34
  import { Show } from "solid-js";
38
35
  var ToggleIndicator = (props) => {
39
36
  const { children, fallback, ...restProps } = props;
40
- const toggle = useToggleContext();
41
- const mergedProps = mergeProps(() => toggle().getIndicatorProps(), restProps);
37
+ const toggle2 = useToggleContext();
38
+ const mergedProps = mergeProps(() => toggle2().getIndicatorProps(), restProps);
42
39
  return <ark.div {...mergedProps}>
43
40
  {
44
41
  /* @ts-ignore */
45
42
  }
46
- <Show when={toggle().pressed} fallback={fallback}>
43
+ <Show when={toggle2().pressed} fallback={fallback}>
47
44
  {children}
48
45
  </Show>
49
46
  </ark.div>;
@@ -53,51 +50,12 @@ var ToggleIndicator = (props) => {
53
50
  import { mergeProps as mergeProps2 } from "@zag-js/solid";
54
51
 
55
52
  // src/components/toggle/use-toggle.ts
56
- import { dataAttr } from "@zag-js/dom-query";
53
+ import { normalizeProps, useMachine } from "@zag-js/solid";
54
+ import * as toggle from "@zag-js/toggle";
57
55
  import { createMemo } from "solid-js";
58
-
59
- // src/components/toggle/toggle.anatomy.ts
60
- import { createAnatomy } from "@zag-js/anatomy";
61
- var toggleAnatomy = createAnatomy("toggle", ["root", "indicator"]);
62
- var parts = toggleAnatomy.build();
63
-
64
- // src/components/toggle/use-toggle.ts
65
56
  function useToggle(props) {
66
- const { defaultPressed, pressed, onPressedChange, disabled } = props;
67
- const [pressedState, setPressedState] = useControllableState({
68
- defaultValue: !!defaultPressed,
69
- value: pressed,
70
- onChange: onPressedChange
71
- });
72
- return createMemo(() => ({
73
- pressed: pressedState(),
74
- disabled: !!disabled,
75
- setPressed: setPressedState,
76
- getRootProps() {
77
- return {
78
- ...parts.root.attrs,
79
- type: "button",
80
- disabled,
81
- "aria-pressed": pressedState(),
82
- "data-state": pressedState() ? "on" : "off",
83
- "data-pressed": dataAttr(pressedState()),
84
- "data-disabled": dataAttr(disabled),
85
- onClick(event) {
86
- if (event.defaultPrevented) return;
87
- if (disabled) return;
88
- setPressedState(!pressedState());
89
- }
90
- };
91
- },
92
- getIndicatorProps() {
93
- return {
94
- ...parts.indicator.attrs,
95
- "data-disabled": dataAttr(disabled),
96
- "data-pressed": dataAttr(pressedState()),
97
- "data-state": pressedState() ? "on" : "off"
98
- };
99
- }
100
- }));
57
+ const service = useMachine(toggle.machine, props);
58
+ return createMemo(() => toggle.connect(service, normalizeProps));
101
59
  }
102
60
 
103
61
  // src/components/toggle/toggle-root.tsx
@@ -108,19 +66,24 @@ var ToggleRoot = (props) => {
108
66
  "disabled",
109
67
  "onPressedChange"
110
68
  ]);
111
- const toggle = useToggle(useToggleProps);
112
- const mergedProps = mergeProps2(() => toggle().getRootProps(), localProps);
113
- return <ToggleProvider value={toggle}>
69
+ const toggle2 = useToggle(useToggleProps);
70
+ const mergedProps = mergeProps2(() => toggle2().getRootProps(), localProps);
71
+ return <ToggleProvider value={toggle2}>
114
72
  <button {...mergedProps} />
115
73
  </ToggleProvider>;
116
74
  };
117
75
 
76
+ // src/components/toggle/toggle.anatomy.ts
77
+ import { createAnatomy } from "@zag-js/anatomy";
78
+ var toggleAnatomy = createAnatomy("toggle", ["root", "indicator"]);
79
+ var parts = toggleAnatomy.build();
80
+
118
81
  export {
119
82
  useToggleContext,
120
83
  ToggleContext,
121
84
  ToggleIndicator,
122
- toggleAnatomy,
123
85
  useToggle,
124
86
  ToggleRoot,
87
+ toggleAnatomy,
125
88
  toggle_exports
126
89
  };
@@ -1,12 +1,13 @@
1
- import { useFieldsetContext } from './XUVXUPEH.js';
1
+ import { useFieldsetContext } from './MZD7ZKWI.js';
2
+ import { composeRefs } from './XN6EERRM.js';
2
3
  import { createSplitProps } from './ZMHI4GDJ.js';
3
4
  import { ark } from './EPLBB4QN.js';
4
- import { createContext } from './I5UG2QUO.js';
5
+ import { createContext } from './TROPIN4C.js';
5
6
  import { __export } from './ESLJRKWD.js';
6
7
  import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
7
8
  import { mergeProps } from '@zag-js/solid';
8
- import { Show, createEffect, mergeProps as mergeProps$2, createSignal, createUniqueId, createMemo } from 'solid-js';
9
- import { dataAttr, ariaAttr } from '@zag-js/dom-query';
9
+ import { createEffect, Show, mergeProps as mergeProps$2, createSignal, createUniqueId, onMount, onCleanup, createMemo } from 'solid-js';
10
+ import { getWindow, dataAttr, ariaAttr } from '@zag-js/dom-query';
10
11
  import { createAnatomy } from '@zag-js/anatomy';
11
12
  import { autoresizeTextarea } from '@zag-js/auto-resize';
12
13
 
@@ -87,13 +88,24 @@ var useField = (props) => {
87
88
  const [hasErrorText, setHasErrorText] = createSignal(false);
88
89
  const [hasHelperText, setHasHelperText] = createSignal(false);
89
90
  const id = fieldProps.id ?? createUniqueId();
90
- let rootRef;
91
+ const [rootRef, setRootRef] = createSignal(void 0);
91
92
  const rootId = fieldProps.ids?.control ?? `field::${id}`;
92
93
  const errorTextId = fieldProps.ids?.errorText ?? `field::${id}::error-text`;
93
94
  const helperTextId = fieldProps.ids?.helperText ?? `field::${id}::helper-text`;
94
95
  const labelId = fieldProps.ids?.label ?? `field::${id}::label`;
95
- createEffect(() => {
96
- return;
96
+ onMount(() => {
97
+ const rootNode = rootRef();
98
+ if (!rootNode) return;
99
+ const win = getWindow(rootNode);
100
+ const doc = win.document;
101
+ const checkTextElements = () => {
102
+ setHasErrorText(!!doc.getElementById(errorTextId));
103
+ setHasHelperText(!!doc.getElementById(helperTextId));
104
+ };
105
+ checkTextElements();
106
+ const observer = new win.MutationObserver(checkTextElements);
107
+ observer.observe(rootNode, { childList: true, subtree: true });
108
+ onCleanup(() => observer.disconnect());
97
109
  });
98
110
  const getRootProps = () => ({
99
111
  ...parts.root.attrs,
@@ -111,11 +123,14 @@ var useField = (props) => {
111
123
  "data-readonly": dataAttr(fieldProps.readOnly),
112
124
  htmlFor: id
113
125
  });
114
- const labelIds = [];
115
- if (hasErrorText() && fieldProps.invalid) labelIds.push(errorTextId);
116
- if (hasHelperText()) labelIds.push(helperTextId);
126
+ const labelIds = createMemo(() => {
127
+ const ids = [];
128
+ if (hasErrorText() && fieldProps.invalid) ids.push(errorTextId);
129
+ if (hasHelperText()) ids.push(helperTextId);
130
+ return ids;
131
+ });
117
132
  const getControlProps = () => ({
118
- "aria-describedby": labelIds.join(" ") || void 0,
133
+ "aria-describedby": labelIds().join(" ") || void 0,
119
134
  "aria-invalid": ariaAttr(fieldProps.invalid),
120
135
  "data-invalid": dataAttr(fieldProps.invalid),
121
136
  "data-required": dataAttr(fieldProps.required),
@@ -152,7 +167,7 @@ var useField = (props) => {
152
167
  ...parts.requiredIndicator.attrs
153
168
  });
154
169
  return createMemo(() => ({
155
- ariaDescribedby: labelIds.join(" "),
170
+ ariaDescribedby: labelIds().join(" "),
156
171
  ids: {
157
172
  control: id,
158
173
  label: labelId,
@@ -160,7 +175,7 @@ var useField = (props) => {
160
175
  helperText: helperTextId
161
176
  },
162
177
  refs: {
163
- rootRef
178
+ rootRef: setRootRef
164
179
  },
165
180
  disabled: fieldProps.disabled,
166
181
  invalid: fieldProps.invalid,
@@ -185,7 +200,12 @@ var FieldRoot = (props) => {
185
200
  return createComponent(FieldProvider, {
186
201
  value: field,
187
202
  get children() {
188
- return createComponent(ark.div, mergedProps);
203
+ return createComponent(ark.div, mergeProps$1(mergedProps, {
204
+ ref(r$) {
205
+ var _ref$ = composeRefs(field().refs.rootRef, props.ref);
206
+ typeof _ref$ === "function" && _ref$(r$);
207
+ }
208
+ }));
189
209
  }
190
210
  });
191
211
  };
@@ -6,13 +6,13 @@ import {
6
6
  } from "./UFYZ7HLU.jsx";
7
7
  import {
8
8
  useEnvironmentContext
9
- } from "./5O4RWSWO.jsx";
9
+ } from "./BPYAMTER.jsx";
10
10
  import {
11
11
  useLocaleContext
12
- } from "./3QQZKR3F.jsx";
12
+ } from "./RCXMZN3G.jsx";
13
13
  import {
14
14
  createContext
15
- } from "./NMGUCD2L.jsx";
15
+ } from "./TVCIHLER.jsx";
16
16
  import {
17
17
  __export
18
18
  } from "./7IUG3E2V.jsx";
@@ -83,7 +83,7 @@ var StepsItem = (props) => {
83
83
  const itemState = createMemo(() => steps2().getItemState(itemProps));
84
84
  return <StepsItemPropsProvider value={itemProps}>
85
85
  <StepsItemProvider value={itemState}>
86
- <ark.li {...mergedProps} />
86
+ <ark.div {...mergedProps} />
87
87
  </StepsItemProvider>
88
88
  </StepsItemPropsProvider>;
89
89
  };
@@ -99,7 +99,7 @@ import { mergeProps as mergeProps5 } from "@zag-js/solid";
99
99
  var StepsList = (props) => {
100
100
  const steps2 = useStepsContext();
101
101
  const mergedProps = mergeProps5(() => steps2().getListProps(), props);
102
- return <ark.ol {...mergedProps} />;
102
+ return <ark.div {...mergedProps} />;
103
103
  };
104
104
 
105
105
  // src/components/steps/steps-next-trigger.tsx
@@ -134,18 +134,17 @@ import { normalizeProps, useMachine } from "@zag-js/solid";
134
134
  import * as steps from "@zag-js/steps";
135
135
  import { createMemo as createMemo2, createUniqueId } from "solid-js";
136
136
  function useSteps(props = {}) {
137
+ const id = createUniqueId();
137
138
  const environment = useEnvironmentContext();
138
139
  const locale = useLocaleContext();
139
- const id = createUniqueId();
140
- const context = createMemo2(() => ({
140
+ const machineProps = createMemo2(() => ({
141
141
  id,
142
142
  dir: locale().dir,
143
143
  getRootNode: environment().getRootNode,
144
- step: props.defaultStep,
145
144
  ...props
146
145
  }));
147
- const [state, send] = useMachine(steps.machine(context()), { context });
148
- return createMemo2(() => steps.connect(state, send, normalizeProps));
146
+ const service = useMachine(steps.machine, machineProps);
147
+ return createMemo2(() => steps.connect(service, normalizeProps));
149
148
  }
150
149
 
151
150
  // src/components/steps/steps-root.tsx
@@ -1,17 +1,17 @@
1
- import { useFieldContext } from './X3BMEEJH.js';
2
- import { usePresenceContext, splitPresenceProps, usePresence, PresenceProvider } from './LCESUDZB.js';
1
+ import { useFieldContext } from './KMFRZGLF.js';
2
+ import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './WRLQ7Y6E.js';
3
3
  import { createSplitProps } from './ZMHI4GDJ.js';
4
4
  import { ark } from './EPLBB4QN.js';
5
- import { useEnvironmentContext } from './QODB3C3M.js';
6
- import { useLocaleContext } from './HPDOBQ3V.js';
7
- import { createContext } from './I5UG2QUO.js';
5
+ import { useEnvironmentContext } from './6MQ6S5JP.js';
6
+ import { useLocaleContext } from './QEMQBM6W.js';
7
+ import { createContext } from './TROPIN4C.js';
8
8
  import { __export } from './ESLJRKWD.js';
9
9
  import * as colorPicker from '@zag-js/color-picker';
10
10
  import { anatomy } from '@zag-js/color-picker';
11
11
  export { parse } from '@zag-js/color-picker';
12
12
  import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
13
13
  import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
14
- import { Show, Index, createUniqueId, createMemo } from 'solid-js';
14
+ import { Show, createMemo, Index, createUniqueId } from 'solid-js';
15
15
 
16
16
  // src/components/color-picker/use-color-picker-area-props-context.ts
17
17
  var [ColorPickerAreaPropsProvider, useColorPickerAreaPropsContext] = createContext({
@@ -195,11 +195,11 @@ var ColorPickerPositioner = (props) => {
195
195
  });
196
196
  };
197
197
  var useColorPicker = (props = {}) => {
198
+ const id = createUniqueId();
198
199
  const locale = useLocaleContext();
199
200
  const environment = useEnvironmentContext();
200
201
  const field = useFieldContext();
201
- const id = createUniqueId();
202
- const context = createMemo(() => ({
202
+ const machineProps = createMemo(() => ({
203
203
  id,
204
204
  ids: {
205
205
  label: field?.().ids.label,
@@ -211,19 +211,16 @@ var useColorPicker = (props = {}) => {
211
211
  readOnly: field?.().readOnly,
212
212
  required: field?.().required,
213
213
  getRootNode: environment().getRootNode,
214
- open: props.defaultOpen,
215
- "open.controlled": props.open !== void 0,
216
- value: props.defaultValue,
217
214
  ...props
218
215
  }));
219
- const [state, send] = useMachine(colorPicker.machine(context()), { context });
220
- return createMemo(() => colorPicker.connect(state, send, normalizeProps));
216
+ const service = useMachine(colorPicker.machine, machineProps);
217
+ return createMemo(() => colorPicker.connect(service, normalizeProps));
221
218
  };
222
219
 
223
220
  // src/components/color-picker/color-picker-root.tsx
224
221
  var ColorPickerRoot = (props) => {
225
222
  const [presenceProps, colorPickerProps] = splitPresenceProps(props);
226
- const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, ["closeOnSelect", "defaultOpen", "defaultValue", "disabled", "format", "id", "ids", "initialFocusEl", "invalid", "name", "name", "onFocusOutside", "onFormatChange", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "onValueChange", "onValueChangeEnd", "open", "openAutoFocus", "positioning", "readOnly", "required", "value"]);
223
+ const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, ["closeOnSelect", "defaultOpen", "defaultValue", "defaultFormat", "disabled", "format", "id", "ids", "initialFocusEl", "invalid", "name", "name", "onFocusOutside", "onFormatChange", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "onValueChange", "onValueChangeEnd", "open", "openAutoFocus", "positioning", "readOnly", "required", "value"]);
227
224
  const api = useColorPicker(useColorPickerProps);
228
225
  const apiPresence = usePresence(mergeProps(presenceProps, () => ({
229
226
  present: api().open
@@ -1,12 +1,12 @@
1
+ import {
2
+ useFieldContext
3
+ } from "./XHA6B6L2.jsx";
1
4
  import {
2
5
  PresenceProvider,
3
6
  splitPresenceProps,
4
7
  usePresence,
5
8
  usePresenceContext
6
- } from "./E72NMPSK.jsx";
7
- import {
8
- useFieldContext
9
- } from "./P7I44WC4.jsx";
9
+ } from "./2FYSIKNK.jsx";
10
10
  import {
11
11
  createSplitProps
12
12
  } from "./6WEDGJKQ.jsx";
@@ -15,13 +15,13 @@ import {
15
15
  } from "./UFYZ7HLU.jsx";
16
16
  import {
17
17
  useEnvironmentContext
18
- } from "./5O4RWSWO.jsx";
18
+ } from "./BPYAMTER.jsx";
19
19
  import {
20
20
  useLocaleContext
21
- } from "./3QQZKR3F.jsx";
21
+ } from "./RCXMZN3G.jsx";
22
22
  import {
23
23
  createContext
24
- } from "./NMGUCD2L.jsx";
24
+ } from "./TVCIHLER.jsx";
25
25
  import {
26
26
  __export
27
27
  } from "./7IUG3E2V.jsx";
@@ -158,10 +158,7 @@ import { mergeProps as mergeProps8 } from "@zag-js/solid";
158
158
  var SelectItemGroupLabel = (props) => {
159
159
  const select2 = useSelectContext();
160
160
  const itemGroupProps = useSelectItemGroupPropsContext();
161
- const mergedProps = mergeProps8(
162
- () => select2().getItemGroupLabelProps({ htmlFor: itemGroupProps.id }),
163
- props
164
- );
161
+ const mergedProps = mergeProps8(() => select2().getItemGroupLabelProps({ htmlFor: itemGroupProps.id }), props);
165
162
  return <ark.div {...mergedProps} />;
166
163
  };
167
164
 
@@ -217,13 +214,13 @@ import { mergeProps as mergeProps14 } from "@zag-js/solid";
217
214
  // src/components/select/use-select.ts
218
215
  import * as select from "@zag-js/select";
219
216
  import { normalizeProps, useMachine } from "@zag-js/solid";
220
- import { createEffect, createMemo as createMemo3, createUniqueId as createUniqueId2, splitProps } from "solid-js";
217
+ import { createMemo as createMemo3, createUniqueId as createUniqueId2 } from "solid-js";
221
218
  var useSelect = (props) => {
219
+ const id = createUniqueId2();
222
220
  const locale = useLocaleContext();
223
221
  const environment = useEnvironmentContext();
224
- const id = createUniqueId2();
225
222
  const field = useFieldContext();
226
- const initialContext = createMemo3(() => ({
223
+ const machineProps = createMemo3(() => ({
227
224
  id,
228
225
  ids: {
229
226
  label: field?.().ids.label,
@@ -235,22 +232,10 @@ var useSelect = (props) => {
235
232
  required: field?.().required,
236
233
  dir: locale().dir,
237
234
  getRootNode: environment().getRootNode,
238
- open: props.defaultOpen,
239
- value: props.defaultValue,
240
- "open.controlled": props.open !== void 0,
241
235
  ...props
242
236
  }));
243
- const context = createMemo3(() => {
244
- const [, restProps] = splitProps(initialContext(), ["collection"]);
245
- return restProps;
246
- });
247
- const [state, send, service] = useMachine(select.machine(initialContext()), {
248
- context
249
- });
250
- createEffect(() => {
251
- service.setContext({ collection: props.collection });
252
- });
253
- return createMemo3(() => select.connect(state, send, normalizeProps));
237
+ const service = useMachine(select.machine, machineProps);
238
+ return createMemo3(() => select.connect(service, normalizeProps));
254
239
  };
255
240
 
256
241
  // src/components/select/select-root.tsx
@@ -258,8 +243,9 @@ var SelectRoot = (props) => {
258
243
  const [presenceProps, selectProps] = splitPresenceProps(props);
259
244
  const [useSelectProps, localProps] = createSplitProps()(selectProps, [
260
245
  "closeOnSelect",
261
- "composite",
262
246
  "collection",
247
+ "composite",
248
+ "defaultHighlightedValue",
263
249
  "defaultOpen",
264
250
  "defaultValue",
265
251
  "deselectable",
@@ -299,9 +285,7 @@ var SelectRoot = (props) => {
299
285
  import { mergeProps as mergeProps15 } from "@zag-js/solid";
300
286
  var SelectRootProvider = (props) => {
301
287
  const [presenceProps, selectProps] = splitPresenceProps(props);
302
- const [{ value: select2 }, localProps] = createSplitProps()(selectProps, [
303
- "value"
304
- ]);
288
+ const [{ value: select2 }, localProps] = createSplitProps()(selectProps, ["value"]);
305
289
  const presence = usePresence(mergeProps15(() => ({ present: select2().open }), presenceProps));
306
290
  const mergedProps = mergeProps15(() => select2().getRootProps(), localProps);
307
291
  return <SelectProvider value={select2}>
@@ -1,10 +1,10 @@
1
- import { collapsible_exports } from './3HMZSTYX.js';
2
- import { useRenderStrategyContext, splitRenderStrategyProps, RenderStrategyProvider } from './L7OSYHVR.js';
1
+ import { collapsible_exports } from './PL4PGQFF.js';
2
+ import { splitRenderStrategyProps, RenderStrategyProvider, useRenderStrategyContext } from './QFAL6GWC.js';
3
3
  import { createSplitProps } from './ZMHI4GDJ.js';
4
4
  import { ark } from './EPLBB4QN.js';
5
- import { useEnvironmentContext } from './QODB3C3M.js';
6
- import { useLocaleContext } from './HPDOBQ3V.js';
7
- import { createContext } from './I5UG2QUO.js';
5
+ import { useEnvironmentContext } from './6MQ6S5JP.js';
6
+ import { useLocaleContext } from './QEMQBM6W.js';
7
+ import { createContext } from './TROPIN4C.js';
8
8
  import { __export } from './ESLJRKWD.js';
9
9
  import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
10
10
  import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
@@ -113,12 +113,10 @@ var TreeViewLabel = (props) => {
113
113
  };
114
114
 
115
115
  // src/components/tree-view/use-tree-view-node-context.ts
116
- var [TreeViewNodeProvider, useTreeViewNodeContext] = createContext(
117
- {
118
- hookName: "useTreeViewNodeContext",
119
- providerName: "<TreeViewNodeProvider />"
120
- }
121
- );
116
+ var [TreeViewNodeProvider, useTreeViewNodeContext] = createContext({
117
+ hookName: "useTreeViewNodeContext",
118
+ providerName: "<TreeViewNodeProvider />"
119
+ });
122
120
 
123
121
  // src/components/tree-view/tree-view-node-context.ts
124
122
  var TreeViewNodeContext = (props) => props.children(useTreeViewNodeContext());
@@ -132,19 +130,17 @@ function TreeViewNodeProvider2(props) {
132
130
  });
133
131
  }
134
132
  var useTreeView = (props) => {
133
+ const id = createUniqueId();
135
134
  const locale = useLocaleContext();
136
135
  const environment = useEnvironmentContext();
137
- const id = createUniqueId();
138
- const context = createMemo(() => ({
136
+ const machineProps = createMemo(() => ({
139
137
  id,
140
138
  dir: locale().dir,
141
139
  getRootNode: environment().getRootNode,
142
- selectedValue: props.defaultSelectedValue,
143
- expandedValue: props.defaultExpandedValue,
144
140
  ...props
145
141
  }));
146
- const [state, send] = useMachine(treeView.machine(context()), { context });
147
- return createMemo(() => treeView.connect(state, send, normalizeProps));
142
+ const service = useMachine(treeView.machine, machineProps);
143
+ return createMemo(() => treeView.connect(service, normalizeProps));
148
144
  };
149
145
 
150
146
  // src/components/tree-view/tree-view-root.tsx
@@ -1,8 +1,8 @@
1
1
  import { createSplitProps } from './ZMHI4GDJ.js';
2
2
  import { ark } from './EPLBB4QN.js';
3
- import { useEnvironmentContext } from './QODB3C3M.js';
4
- import { useLocaleContext } from './HPDOBQ3V.js';
5
- import { createContext } from './I5UG2QUO.js';
3
+ import { useEnvironmentContext } from './6MQ6S5JP.js';
4
+ import { useLocaleContext } from './QEMQBM6W.js';
5
+ import { createContext } from './TROPIN4C.js';
6
6
  import { __export } from './ESLJRKWD.js';
7
7
  import { createComponent } from 'solid-js/web';
8
8
  import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
@@ -44,20 +44,19 @@ var usePagination = (props) => {
44
44
  const locale = useLocaleContext();
45
45
  const environment = useEnvironmentContext();
46
46
  const id = createUniqueId();
47
- const context = createMemo(() => ({
47
+ const machineProps = createMemo(() => ({
48
48
  id,
49
49
  dir: locale().dir,
50
50
  getRootNode: environment().getRootNode,
51
- page: props.defaultPage,
52
51
  ...props
53
52
  }));
54
- const [state, send] = useMachine(pagination.machine(context()), { context });
55
- return createMemo(() => pagination.connect(state, send, normalizeProps));
53
+ const service = useMachine(pagination.machine, machineProps);
54
+ return createMemo(() => pagination.connect(service, normalizeProps));
56
55
  };
57
56
 
58
57
  // src/components/pagination/pagination-root.tsx
59
58
  var PaginationRoot = (props) => {
60
- const [usePaginationProps, localProps] = createSplitProps()(props, ["count", "defaultPage", "id", "ids", "onPageChange", "onPageSizeChange", "page", "pageSize", "siblingCount", "translations", "type"]);
59
+ const [usePaginationProps, localProps] = createSplitProps()(props, ["count", "defaultPage", "defaultPageSize", "id", "ids", "onPageChange", "onPageSizeChange", "page", "pageSize", "siblingCount", "translations", "type"]);
61
60
  const api = usePagination(usePaginationProps);
62
61
  const mergedProps = mergeProps(() => api().getRootProps(), localProps);
63
62
  return createComponent(PaginationProvider, {
@@ -0,0 +1,15 @@
1
+ // src/components/collection.ts
2
+ import {
3
+ ListCollection,
4
+ TreeCollection,
5
+ filePathToTree
6
+ } from "@zag-js/collection";
7
+ var createListCollection = (options) => new ListCollection(options);
8
+ var createTreeCollection = (options) => new TreeCollection(options);
9
+ var createFileTreeCollection = (paths) => filePathToTree(paths);
10
+
11
+ export {
12
+ createListCollection,
13
+ createTreeCollection,
14
+ createFileTreeCollection
15
+ };
@@ -1,6 +1,6 @@
1
1
  import { createSplitProps } from './ZMHI4GDJ.js';
2
2
  import { ark } from './EPLBB4QN.js';
3
- import { createContext } from './I5UG2QUO.js';
3
+ import { createContext } from './TROPIN4C.js';
4
4
  import { __export } from './ESLJRKWD.js';
5
5
  import { createComponent } from 'solid-js/web';
6
6
  import { mergeProps } from '@zag-js/solid';
@@ -38,12 +38,7 @@ var FieldsetLegend = (props) => {
38
38
  const mergedProps = mergeProps(() => fieldset().getLegendProps(), props);
39
39
  return createComponent(ark.legend, mergedProps);
40
40
  };
41
- var fieldsetAnatomy = createAnatomy("fieldset").parts(
42
- "root",
43
- "errorText",
44
- "helperText",
45
- "legend"
46
- );
41
+ var fieldsetAnatomy = createAnatomy("fieldset").parts("root", "errorText", "helperText", "legend");
47
42
  var parts = fieldsetAnatomy.build();
48
43
 
49
44
  // src/components/fieldset/use-fieldset.ts
@@ -6,10 +6,10 @@ import {
6
6
  } from "./UFYZ7HLU.jsx";
7
7
  import {
8
8
  useEnvironmentContext
9
- } from "./5O4RWSWO.jsx";
9
+ } from "./BPYAMTER.jsx";
10
10
  import {
11
11
  createContext
12
- } from "./NMGUCD2L.jsx";
12
+ } from "./TVCIHLER.jsx";
13
13
  import {
14
14
  __export
15
15
  } from "./7IUG3E2V.jsx";
@@ -25,8 +25,9 @@ var [TimerProvider, useTimerContext] = createContext({
25
25
 
26
26
  // src/components/timer/timer-action-trigger.tsx
27
27
  var TimerActionTrigger = (props) => {
28
+ const [actionTriggerProps, localProps] = createSplitProps()(props, ["action"]);
28
29
  const timer2 = useTimerContext();
29
- const mergedProps = mergeProps(() => timer2().getActionTriggerProps(props), props);
30
+ const mergedProps = mergeProps(() => timer2().getActionTriggerProps(actionTriggerProps), localProps);
30
31
  return <ark.button {...mergedProps} />;
31
32
  };
32
33
 
@@ -66,15 +67,15 @@ import { normalizeProps, useMachine } from "@zag-js/solid";
66
67
  import * as timer from "@zag-js/timer";
67
68
  import { createMemo, createUniqueId } from "solid-js";
68
69
  var useTimer = (props = {}) => {
69
- const env = useEnvironmentContext();
70
70
  const id = createUniqueId();
71
- const context = createMemo(() => ({
71
+ const environment = useEnvironmentContext();
72
+ const machineProps = createMemo(() => ({
72
73
  id,
73
- getRootNode: env().getRootNode,
74
+ getRootNode: environment().getRootNode,
74
75
  ...props
75
76
  }));
76
- const [state, send] = useMachine(timer.machine(context()), { context });
77
- return createMemo(() => timer.connect(state, send, normalizeProps));
77
+ const service = useMachine(timer.machine, machineProps);
78
+ return createMemo(() => timer.connect(service, normalizeProps));
78
79
  };
79
80
 
80
81
  // src/components/timer/timer-root.tsx
@@ -3,7 +3,7 @@ import {
3
3
  } from "./6WEDGJKQ.jsx";
4
4
  import {
5
5
  createContext
6
- } from "./NMGUCD2L.jsx";
6
+ } from "./TVCIHLER.jsx";
7
7
 
8
8
  // src/utils/render-strategy.ts
9
9
  var [RenderStrategyProvider, useRenderStrategyContext] = createContext({