@serendie/ui 2.1.3 → 2.2.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 (122) hide show
  1. package/dist/client.js +79 -74
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Avatar/Avatar.d.ts +1 -1
  4. package/dist/components/Banner/Banner.d.ts +1 -1
  5. package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
  6. package/dist/components/Button/Button.d.ts +2 -2
  7. package/dist/components/Button/Button.js +22 -21
  8. package/dist/components/DatePicker/DatePicker.d.ts +13 -0
  9. package/dist/components/DatePicker/DatePicker.js +203 -0
  10. package/dist/components/DatePicker/index.d.ts +2 -0
  11. package/dist/components/DatePicker/index.js +6 -0
  12. package/dist/components/DatePicker/parseDate.d.ts +1 -0
  13. package/dist/components/DatePicker/styles.d.ts +1 -0
  14. package/dist/components/DatePicker/styles.js +224 -0
  15. package/dist/components/IconButton/IconButton.d.ts +3 -3
  16. package/dist/components/List/ListItem.d.ts +1 -1
  17. package/dist/components/ModalDialog/ModalDialog.d.ts +1 -1
  18. package/dist/components/NotificationBadge/NotificationBadge.d.ts +1 -1
  19. package/dist/components/Pagination/Pagination.d.ts +1 -1
  20. package/dist/components/ProgressIndicator/AnimatedArc.d.ts +6 -0
  21. package/dist/components/ProgressIndicator/AnimatedArc.js +46 -0
  22. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +11 -29
  23. package/dist/components/ProgressIndicator/ProgressIndicator.js +201 -43
  24. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +10 -0
  25. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +215 -0
  26. package/dist/components/ProgressIndicator/index.d.ts +4 -1
  27. package/dist/components/ProgressIndicator/index.js +3 -2
  28. package/dist/components/ProgressIndicator/util.d.ts +1 -0
  29. package/dist/components/ProgressIndicator/util.js +13 -0
  30. package/dist/components/Search/Search.d.ts +1 -1
  31. package/dist/components/Select/Select.d.ts +1 -1
  32. package/dist/components/Switch/Switch.d.ts +1 -1
  33. package/dist/components/Tabs/Tabs.d.ts +1 -1
  34. package/dist/components/TextField/TextField.js +59 -156
  35. package/dist/components/Toast/Toast.d.ts +1 -1
  36. package/dist/components/TopAppBar/TopAppBar.d.ts +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.js +80 -75
  39. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +15 -0
  40. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +5 -0
  41. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +13 -0
  42. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +14 -0
  43. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +13 -0
  44. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +13 -0
  45. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -0
  46. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +14 -0
  47. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -0
  48. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +55 -0
  49. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +14 -0
  50. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +19 -0
  51. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +26 -0
  52. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +14 -0
  53. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +14 -0
  54. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +14 -0
  55. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +16 -0
  56. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +13 -0
  57. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +14 -0
  58. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +23 -0
  59. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +13 -0
  60. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +5 -0
  61. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +10 -0
  62. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +10 -0
  63. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +10 -0
  64. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +12 -0
  65. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +18 -0
  66. package/dist/node_modules/@ark-ui/react/dist/components/factory.js +11 -12
  67. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +5 -4
  68. package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +0 -1
  69. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +36 -36
  70. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +238 -235
  71. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +88 -83
  72. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +68 -67
  73. package/dist/node_modules/@internationalized/date/dist/CalendarDate.js +178 -0
  74. package/dist/node_modules/@internationalized/date/dist/DateFormatter.js +99 -0
  75. package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +98 -0
  76. package/dist/node_modules/@internationalized/date/dist/conversion.js +135 -0
  77. package/dist/node_modules/@internationalized/date/dist/manipulation.js +205 -0
  78. package/dist/node_modules/@internationalized/date/dist/queries.js +202 -0
  79. package/dist/node_modules/@internationalized/date/dist/string.js +41 -0
  80. package/dist/node_modules/@internationalized/date/dist/utils.js +6 -0
  81. package/dist/node_modules/@internationalized/date/dist/weekStartData.js +100 -0
  82. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +7 -0
  83. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.js +7 -0
  84. package/dist/node_modules/@zag-js/anatomy/dist/index.js +15 -14
  85. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +23 -23
  86. package/dist/node_modules/@zag-js/collection/dist/index.js +102 -71
  87. package/dist/node_modules/@zag-js/combobox/dist/index.js +482 -426
  88. package/dist/node_modules/@zag-js/date-picker/dist/index.js +1826 -0
  89. package/dist/node_modules/@zag-js/date-utils/dist/index.js +366 -0
  90. package/dist/node_modules/@zag-js/dialog/dist/index.js +66 -64
  91. package/dist/node_modules/@zag-js/dismissable/dist/index.js +94 -69
  92. package/dist/node_modules/@zag-js/dom-query/dist/index.js +359 -300
  93. package/dist/node_modules/@zag-js/live-region/dist/index.js +39 -0
  94. package/dist/node_modules/@zag-js/menu/dist/index.js +357 -340
  95. package/dist/node_modules/@zag-js/popper/dist/index.js +123 -120
  96. package/dist/node_modules/@zag-js/presence/dist/index.js +17 -17
  97. package/dist/node_modules/@zag-js/radio-group/dist/index.js +118 -117
  98. package/dist/node_modules/@zag-js/react/dist/index.js +124 -121
  99. package/dist/node_modules/@zag-js/select/dist/index.js +211 -197
  100. package/dist/node_modules/@zag-js/toast/dist/index.js +73 -71
  101. package/dist/node_modules/@zag-js/tooltip/dist/index.js +31 -30
  102. package/dist/node_modules/@zag-js/utils/dist/index.js +150 -104
  103. package/dist/preset.d.ts +11 -1
  104. package/dist/recipes/index.d.ts +3 -2
  105. package/dist/recipes/index.js +5 -2
  106. package/dist/recipes/textFieldRecipe.d.ts +6 -0
  107. package/dist/recipes/textFieldRecipe.js +107 -0
  108. package/dist/styled-system/css/cva.js +43 -38
  109. package/dist/styled-system/recipes/create-recipe.js +37 -0
  110. package/dist/styled-system/recipes/text-field-recipe.js +61 -0
  111. package/dist/styles.css +1 -1
  112. package/dist/tokens/keyframes/index.d.ts +8 -0
  113. package/dist/tokens/keyframes/index.js +6 -2
  114. package/package.json +3 -3
  115. package/styled-system/recipes/create-recipe.js +82 -0
  116. package/styled-system/recipes/index.d.ts +2 -0
  117. package/styled-system/recipes/index.js +1 -0
  118. package/styled-system/recipes/text-field-recipe.d.ts +28 -0
  119. package/styled-system/recipes/text-field-recipe.js +72 -0
  120. package/styled-system/types/prop-type.d.ts +1 -1
  121. package/dist/node_modules/@zag-js/store/dist/index.js +0 -131
  122. package/dist/node_modules/proxy-compare/dist/index.js +0 -7
@@ -1,86 +1,86 @@
1
- import { createScope as Y, MachineStatus as V, INIT_STATE as O } from "../../core/dist/index.js";
2
- import { mergeProps as yt } from "../../core/dist/index.js";
1
+ import { createScope as Y, MachineStatus as V, INIT_STATE as L } from "../../core/dist/index.js";
2
+ import { mergeProps as bt } from "../../core/dist/index.js";
3
3
  import { compact as Z, ensure as h, identity as tt, isFunction as j, warn as H, toArray as et, isString as rt } from "../../utils/dist/index.js";
4
- import { useMemo as nt, useRef as g, useLayoutEffect as ut, useEffect as w, useState as K } from "react";
5
- import { flushSync as $ } from "react-dom";
4
+ import { useMemo as nt, useRef as d, useLayoutEffect as ut, useEffect as w, useState as K } from "react";
5
+ import { flushSync as O } from "react-dom";
6
6
  import { createNormalizer as ot } from "../../types/dist/index.js";
7
7
  import "react/jsx-runtime";
8
8
  var U = typeof globalThis.document < "u" ? ut : w;
9
- function L(t) {
10
- const o = t().value ?? t().defaultValue, c = t().isEqual ?? Object.is, [i] = K(o), [v, y] = K(i), z = t().value !== void 0, b = g(v);
11
- b.current = z ? t().value : v;
12
- const R = g(b.current);
9
+ function $(t) {
10
+ const o = t().value ?? t().defaultValue, s = t().isEqual ?? Object.is, [l] = K(o), [S, b] = K(l), z = t().value !== void 0, y = d(S);
11
+ y.current = z ? t().value : S;
12
+ const R = d(y.current);
13
13
  U(() => {
14
- R.current = b.current;
15
- }, [v, t().value]);
16
- const M = (d) => {
17
- var N, m;
18
- const f = R.current, a = j(d) ? d(f) : d;
19
- t().debug && console.log(`[bindable > ${t().debug}] setValue`, { next: a, prev: f }), z || y(a), c(a, f) || (m = (N = t()).onChange) == null || m.call(N, a, f);
14
+ R.current = y.current;
15
+ }, [S, t().value]);
16
+ const E = (g) => {
17
+ var M, m;
18
+ const i = R.current, f = j(g) ? g(i) : g;
19
+ t().debug && console.log(`[bindable > ${t().debug}] setValue`, { next: f, prev: i }), z || b(f), s(f, i) || (m = (M = t()).onChange) == null || m.call(M, f, i);
20
20
  };
21
21
  function C() {
22
- return z ? t().value : v;
22
+ return z ? t().value : S;
23
23
  }
24
24
  return {
25
- initial: i,
26
- ref: b,
25
+ initial: l,
26
+ ref: y,
27
27
  get: C,
28
- set(d) {
29
- (t().sync ? $ : tt)(() => M(d));
28
+ set(g) {
29
+ (t().sync ? O : tt)(() => E(g));
30
30
  },
31
- invoke(d, f) {
32
- var a, N;
33
- (N = (a = t()).onChange) == null || N.call(a, d, f);
31
+ invoke(g, i) {
32
+ var f, M;
33
+ (M = (f = t()).onChange) == null || M.call(f, g, i);
34
34
  },
35
- hash(d) {
36
- var f, a;
37
- return ((a = (f = t()).hash) == null ? void 0 : a.call(f, d)) ?? String(d);
35
+ hash(g) {
36
+ var i, f;
37
+ return ((f = (i = t()).hash) == null ? void 0 : f.call(i, g)) ?? String(g);
38
38
  }
39
39
  };
40
40
  }
41
- L.cleanup = (t) => {
41
+ $.cleanup = (t) => {
42
42
  w(() => t, []);
43
43
  };
44
- L.ref = (t) => {
45
- const o = g(t);
44
+ $.ref = (t) => {
45
+ const o = d(t);
46
46
  return {
47
47
  get: () => o.current,
48
- set: (c) => {
49
- o.current = c;
48
+ set: (s) => {
49
+ o.current = s;
50
50
  }
51
51
  };
52
52
  };
53
- function st(t) {
54
- const o = g(t);
53
+ function ct(t) {
54
+ const o = d(t);
55
55
  return {
56
- get(c) {
57
- return o.current[c];
56
+ get(s) {
57
+ return o.current[s];
58
58
  },
59
- set(c, i) {
60
- o.current[c] = i;
59
+ set(s, l) {
60
+ o.current[s] = l;
61
61
  }
62
62
  };
63
63
  }
64
- var ct = (t, o) => {
65
- const c = g(!1), i = g(!1);
64
+ var st = (t, o) => {
65
+ const s = d(!1), l = d(!1);
66
66
  w(() => {
67
- if (c.current && i.current) return o();
68
- i.current = !0;
69
- }, [...(t ?? []).map((v) => typeof v == "function" ? v() : v)]), w(() => (c.current = !0, () => {
70
- c.current = !1;
67
+ if (s.current && l.current) return o();
68
+ l.current = !0;
69
+ }, [...(t ?? []).map((S) => typeof S == "function" ? S() : S)]), w(() => (s.current = !0, () => {
70
+ s.current = !1;
71
71
  }), []);
72
72
  };
73
- function St(t, o = {}) {
73
+ function vt(t, o = {}) {
74
74
  var P, _, D, G;
75
- const c = nt(() => {
75
+ const s = nt(() => {
76
76
  const { id: r, ids: e, getRootNode: n } = o;
77
77
  return Y({ id: r, ids: e, getRootNode: n });
78
- }, [o]), i = (...r) => {
78
+ }, [o]), l = (...r) => {
79
79
  t.debug && console.log(...r);
80
- }, v = ((P = t.props) == null ? void 0 : P.call(t, { props: Z(o), scope: c })) ?? o, y = ft(v), z = (_ = t.context) == null ? void 0 : _.call(t, {
81
- prop: y,
82
- bindable: L,
83
- scope: c,
80
+ }, S = ((P = t.props) == null ? void 0 : P.call(t, { props: Z(o), scope: s })) ?? o, b = it(S), z = (_ = t.context) == null ? void 0 : _.call(t, {
81
+ prop: b,
82
+ bindable: $,
83
+ scope: s,
84
84
  flush: Q,
85
85
  getContext() {
86
86
  return R;
@@ -90,34 +90,37 @@ function St(t, o = {}) {
90
90
  },
91
91
  getRefs() {
92
92
  return m;
93
+ },
94
+ getEvent() {
95
+ return f();
93
96
  }
94
- }), b = W(z), R = {
97
+ }), y = W(z), R = {
95
98
  get(r) {
96
99
  var e;
97
- return (e = b.current) == null ? void 0 : e[r].ref.current;
100
+ return (e = y.current) == null ? void 0 : e[r].ref.current;
98
101
  },
99
102
  set(r, e) {
100
103
  var n;
101
- (n = b.current) == null || n[r].set(e);
104
+ (n = y.current) == null || n[r].set(e);
102
105
  },
103
106
  initial(r) {
104
107
  var e;
105
- return (e = b.current) == null ? void 0 : e[r].initial;
108
+ return (e = y.current) == null ? void 0 : e[r].initial;
106
109
  },
107
110
  hash(r) {
108
111
  var n, u;
109
- const e = (n = b.current) == null ? void 0 : n[r].get();
110
- return (u = b.current) == null ? void 0 : u[r].hash(e);
112
+ const e = (n = y.current) == null ? void 0 : n[r].get();
113
+ return (u = y.current) == null ? void 0 : u[r].hash(e);
111
114
  }
112
- }, M = g(/* @__PURE__ */ new Map()), C = g(null), d = g(null), f = g({ type: "" }), a = () => ({
113
- ...f.current,
115
+ }, E = d(/* @__PURE__ */ new Map()), C = d(null), g = d(null), i = d({ type: "" }), f = () => ({
116
+ ...i.current,
114
117
  current() {
115
- return f.current;
118
+ return i.current;
116
119
  },
117
120
  previous() {
118
- return d.current;
121
+ return g.current;
119
122
  }
120
- }), N = () => ({
123
+ }), M = () => ({
121
124
  ...p,
122
125
  matches(...r) {
123
126
  return r.includes(p.ref.current);
@@ -126,141 +129,141 @@ function St(t, o = {}) {
126
129
  var e, n;
127
130
  return !!((n = (e = t.states[p.ref.current]) == null ? void 0 : e.tags) != null && n.includes(r));
128
131
  }
129
- }), m = st(((D = t.refs) == null ? void 0 : D.call(t, { prop: y, context: R })) ?? {}), E = () => ({
130
- state: N(),
132
+ }), m = ct(((D = t.refs) == null ? void 0 : D.call(t, { prop: b, context: R })) ?? {}), N = () => ({
133
+ state: M(),
131
134
  context: R,
132
- event: a(),
133
- prop: y,
135
+ event: f(),
136
+ prop: b,
134
137
  send: B,
135
138
  action: q,
136
139
  guard: A,
137
- track: ct,
140
+ track: st,
138
141
  refs: m,
139
142
  computed: k,
140
143
  flush: Q,
141
- scope: c,
144
+ scope: s,
142
145
  choose: I
143
146
  }), q = (r) => {
144
- const e = j(r) ? r(E()) : r;
147
+ const e = j(r) ? r(N()) : r;
145
148
  if (!e) return;
146
149
  const n = e.map((u) => {
147
- var l, x;
148
- const s = (x = (l = t.implementations) == null ? void 0 : l.actions) == null ? void 0 : x[u];
149
- return s || H(`[zag-js] No implementation found for action "${JSON.stringify(u)}"`), s;
150
+ var a, x;
151
+ const c = (x = (a = t.implementations) == null ? void 0 : a.actions) == null ? void 0 : x[u];
152
+ return c || H(`[zag-js] No implementation found for action "${JSON.stringify(u)}"`), c;
150
153
  });
151
154
  for (const u of n)
152
- u == null || u(E());
155
+ u == null || u(N());
153
156
  }, A = (r) => {
154
157
  var e, n;
155
- return j(r) ? r(E()) : (n = (e = t.implementations) == null ? void 0 : e.guards) == null ? void 0 : n[r](E());
158
+ return j(r) ? r(N()) : (n = (e = t.implementations) == null ? void 0 : e.guards) == null ? void 0 : n[r](N());
156
159
  }, F = (r) => {
157
- const e = j(r) ? r(E()) : r;
160
+ const e = j(r) ? r(N()) : r;
158
161
  if (!e) return;
159
- const n = e.map((s) => {
160
- var x, S;
161
- const l = (S = (x = t.implementations) == null ? void 0 : x.effects) == null ? void 0 : S[s];
162
- return l || H(`[zag-js] No implementation found for effect "${JSON.stringify(s)}"`), l;
162
+ const n = e.map((c) => {
163
+ var x, v;
164
+ const a = (v = (x = t.implementations) == null ? void 0 : x.effects) == null ? void 0 : v[c];
165
+ return a || H(`[zag-js] No implementation found for effect "${JSON.stringify(c)}"`), a;
163
166
  }), u = [];
164
- for (const s of n) {
165
- const l = s == null ? void 0 : s(E());
166
- l && u.push(l);
167
+ for (const c of n) {
168
+ const a = c == null ? void 0 : c(N());
169
+ a && u.push(a);
167
170
  }
168
- return () => u.forEach((s) => s == null ? void 0 : s());
171
+ return () => u.forEach((c) => c == null ? void 0 : c());
169
172
  }, I = (r) => et(r).find((e) => {
170
173
  let n = !e.guard;
171
- return rt(e.guard) ? n = !!A(e.guard) : j(e.guard) && (n = e.guard(E())), n;
174
+ return rt(e.guard) ? n = !!A(e.guard) : j(e.guard) && (n = e.guard(N())), n;
172
175
  }), k = (r) => {
173
176
  h(t.computed, () => "[zag-js] No computed object found on machine");
174
177
  const e = t.computed[r];
175
178
  return e({
176
179
  context: R,
177
- event: a(),
178
- prop: y,
180
+ event: f(),
181
+ prop: b,
179
182
  refs: m,
180
- scope: c,
183
+ scope: s,
181
184
  computed: k
182
185
  });
183
- }, p = L(() => ({
184
- defaultValue: t.initialState({ prop: y }),
186
+ }, p = $(() => ({
187
+ defaultValue: t.initialState({ prop: b }),
185
188
  onChange(r, e) {
186
- var u, s, l, x;
189
+ var u, c, a, x;
187
190
  if (e) {
188
- const S = M.current.get(e);
189
- S == null || S(), M.current.delete(e);
191
+ const v = E.current.get(e);
192
+ v == null || v(), E.current.delete(e);
190
193
  }
191
- e && q((u = t.states[e]) == null ? void 0 : u.exit), q((s = C.current) == null ? void 0 : s.actions);
192
- const n = F((l = t.states[r]) == null ? void 0 : l.effects);
193
- if (n && M.current.set(r, n), e === O) {
194
+ e && q((u = t.states[e]) == null ? void 0 : u.exit), q((c = C.current) == null ? void 0 : c.actions);
195
+ const n = F((a = t.states[r]) == null ? void 0 : a.effects);
196
+ if (n && E.current.set(r, n), e === L) {
194
197
  q(t.entry);
195
- const S = F(t.effects);
196
- S && M.current.set(O, S);
198
+ const v = F(t.effects);
199
+ v && E.current.set(L, v);
197
200
  }
198
201
  q((x = t.states[r]) == null ? void 0 : x.entry);
199
202
  }
200
- })), J = g(void 0), T = g(V.NotStarted);
203
+ })), J = d(void 0), T = d(V.NotStarted);
201
204
  U(() => {
202
205
  queueMicrotask(() => {
203
206
  const n = T.current === V.Started;
204
- T.current = V.Started, i(n ? "rehydrating..." : "initializing...");
207
+ T.current = V.Started, l(n ? "rehydrating..." : "initializing...");
205
208
  const u = J.current ?? p.initial;
206
- p.invoke(u, n ? p.get() : O);
209
+ p.invoke(u, n ? p.get() : L);
207
210
  });
208
- const r = M.current, e = p.ref.current;
211
+ const r = E.current, e = p.ref.current;
209
212
  return () => {
210
- i("unmounting..."), J.current = e, T.current = V.Stopped, r.forEach((n) => n == null ? void 0 : n()), M.current = /* @__PURE__ */ new Map(), C.current = null, queueMicrotask(() => {
213
+ l("unmounting..."), J.current = e, T.current = V.Stopped, r.forEach((n) => n == null ? void 0 : n()), E.current = /* @__PURE__ */ new Map(), C.current = null, queueMicrotask(() => {
211
214
  q(t.exit);
212
215
  });
213
216
  };
214
217
  }, []);
215
218
  const X = () => "ref" in p ? p.ref.current : p.get(), B = (r) => {
216
219
  queueMicrotask(() => {
217
- var x, S;
220
+ var x, v;
218
221
  if (T.current !== V.Started) return;
219
- d.current = f.current, f.current = r, i("send", r);
222
+ g.current = i.current, i.current = r;
220
223
  let e = X();
221
224
  const n = (
222
225
  // @ts-ignore
223
226
  ((x = t.states[e].on) == null ? void 0 : x[r.type]) ?? // @ts-ignore
224
- ((S = t.on) == null ? void 0 : S[r.type])
227
+ ((v = t.on) == null ? void 0 : v[r.type])
225
228
  ), u = I(n);
226
229
  if (!u) return;
227
230
  C.current = u;
228
- const s = u.target ?? e;
229
- i("transition", u);
230
- const l = s !== e;
231
- l ? $(() => p.set(s)) : u.reenter && !l ? p.invoke(e, e) : q(u.actions ?? []);
231
+ const c = u.target ?? e;
232
+ l("transition", r.type, u.target || e, `(${u.actions})`);
233
+ const a = c !== e;
234
+ a ? O(() => p.set(c)) : u.reenter && !a ? p.invoke(e, e) : q(u.actions ?? []);
232
235
  });
233
236
  };
234
- return (G = t.watch) == null || G.call(t, E()), {
235
- state: N(),
237
+ return (G = t.watch) == null || G.call(t, N()), {
238
+ state: M(),
236
239
  send: B,
237
240
  context: R,
238
- prop: y,
239
- scope: c,
241
+ prop: b,
242
+ scope: s,
240
243
  refs: m,
241
244
  computed: k,
242
- event: a(),
245
+ event: f(),
243
246
  getStatus: () => T.current
244
247
  };
245
248
  }
246
249
  function W(t) {
247
- const o = g(t);
250
+ const o = d(t);
248
251
  return o.current = t, o;
249
252
  }
250
- function ft(t) {
253
+ function it(t) {
251
254
  const o = W(t);
252
- return function(i) {
253
- return o.current[i];
255
+ return function(l) {
256
+ return o.current[l];
254
257
  };
255
258
  }
256
259
  function Q(t) {
257
260
  queueMicrotask(() => {
258
- $(() => t());
261
+ O(() => t());
259
262
  });
260
263
  }
261
- var vt = ot((t) => t);
264
+ var St = ot((t) => t);
262
265
  export {
263
- yt as mergeProps,
264
- vt as normalizeProps,
265
- St as useMachine
266
+ bt as mergeProps,
267
+ St as normalizeProps,
268
+ vt as useMachine
266
269
  };