tmex-cli 0.4.0 → 0.4.2
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.
- package/dist/runtime/server.js +736 -186
- package/package.json +1 -1
- package/resources/fe-dist/assets/DevicePage-CKaPUo7L.js +26 -0
- package/resources/fe-dist/assets/DevicePage-CKaPUo7L.js.map +1 -0
- package/resources/fe-dist/assets/DevicesPage-FqU-Dxhu.js +17 -0
- package/resources/fe-dist/assets/{DevicesPage-CtNzaW_c.js.map → DevicesPage-FqU-Dxhu.js.map} +1 -1
- package/resources/fe-dist/assets/SettingsPage-BfkOW0fc.js +17 -0
- package/resources/fe-dist/assets/SettingsPage-BfkOW0fc.js.map +1 -0
- package/resources/fe-dist/assets/index-EgHfq93I.js +449 -0
- package/resources/fe-dist/assets/index-EgHfq93I.js.map +1 -0
- package/resources/fe-dist/assets/index-Ytlj3p_q.css +1 -0
- package/resources/fe-dist/assets/select-CNlE6MiW.js +17 -0
- package/resources/fe-dist/assets/{select-BNsiC9zT.js.map → select-CNlE6MiW.js.map} +1 -1
- package/resources/fe-dist/assets/switch-CxkzOIL6.js +12 -0
- package/resources/fe-dist/assets/{switch-CIU4AisU.js.map → switch-CxkzOIL6.js.map} +1 -1
- package/resources/fe-dist/assets/useValueChanged-CO2U5MoL.js +7 -0
- package/resources/fe-dist/assets/{useValueChanged-V23H0VpC.js.map → useValueChanged-CO2U5MoL.js.map} +1 -1
- package/resources/fe-dist/index.html +2 -2
- package/resources/gateway-drizzle/0002_broad_vengeance.sql +3 -0
- package/resources/gateway-drizzle/meta/0000_snapshot.json +17 -6
- package/resources/gateway-drizzle/meta/0001_snapshot.json +17 -6
- package/resources/gateway-drizzle/meta/0002_snapshot.json +535 -0
- package/resources/gateway-drizzle/meta/_journal.json +8 -1
- package/resources/fe-dist/assets/DevicePage-iSkEDEpS.js +0 -4570
- package/resources/fe-dist/assets/DevicePage-iSkEDEpS.js.map +0 -1
- package/resources/fe-dist/assets/DevicesPage-CtNzaW_c.js +0 -2143
- package/resources/fe-dist/assets/SettingsPage-D25_d6j9.js +0 -1144
- package/resources/fe-dist/assets/SettingsPage-D25_d6j9.js.map +0 -1
- package/resources/fe-dist/assets/index-CJaX5rlK.css +0 -4527
- package/resources/fe-dist/assets/index-dsVN7rgz.js +0 -200
- package/resources/fe-dist/assets/index-dsVN7rgz.js.map +0 -1
- package/resources/fe-dist/assets/select-BNsiC9zT.js +0 -2805
- package/resources/fe-dist/assets/switch-CIU4AisU.js +0 -234
- package/resources/fe-dist/assets/useValueChanged-V23H0VpC.js +0 -351
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
y as L,
|
|
3
|
-
c as N,
|
|
4
|
-
b6 as ce,
|
|
5
|
-
p as de,
|
|
6
|
-
j as f,
|
|
7
|
-
Z as fe,
|
|
8
|
-
bm as he,
|
|
9
|
-
w as ie,
|
|
10
|
-
b7 as ke,
|
|
11
|
-
s as le,
|
|
12
|
-
E as me,
|
|
13
|
-
a5 as oe,
|
|
14
|
-
bn as pe,
|
|
15
|
-
x as re,
|
|
16
|
-
r as s,
|
|
17
|
-
ac as se,
|
|
18
|
-
v as ue,
|
|
19
|
-
k as ve,
|
|
20
|
-
} from './index-dsVN7rgz.js';
|
|
21
|
-
import {
|
|
22
|
-
k as Ce,
|
|
23
|
-
u as S,
|
|
24
|
-
l as be,
|
|
25
|
-
m as ge,
|
|
26
|
-
n as we,
|
|
27
|
-
i as xe,
|
|
28
|
-
j as ye,
|
|
29
|
-
} from './useValueChanged-V23H0VpC.js'; /**
|
|
30
|
-
* @license lucide-react v0.564.0 - ISC
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the ISC license.
|
|
33
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/
|
|
35
|
-
const ze = [['path', { d: 'M21 12a9 9 0 1 1-6.219-8.56', key: '13zald' }]],
|
|
36
|
-
Ke = N('loader-circle', ze); /**
|
|
37
|
-
* @license lucide-react v0.564.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/
|
|
42
|
-
const Ee = [
|
|
43
|
-
[
|
|
44
|
-
'path',
|
|
45
|
-
{
|
|
46
|
-
d: 'M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z',
|
|
47
|
-
key: '1ffxy3',
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
['path', { d: 'm21.854 2.147-10.94 10.939', key: '12cjpa' }],
|
|
51
|
-
],
|
|
52
|
-
Ve = N('send', Ee),
|
|
53
|
-
T = s.createContext(void 0);
|
|
54
|
-
function Pe() {
|
|
55
|
-
const e = s.useContext(T);
|
|
56
|
-
if (e === void 0) throw new Error(de(63));
|
|
57
|
-
return e;
|
|
58
|
-
}
|
|
59
|
-
const F = ((e) => (
|
|
60
|
-
(e.checked = 'data-checked'),
|
|
61
|
-
(e.unchecked = 'data-unchecked'),
|
|
62
|
-
(e.disabled = 'data-disabled'),
|
|
63
|
-
(e.readonly = 'data-readonly'),
|
|
64
|
-
(e.required = 'data-required'),
|
|
65
|
-
(e.valid = 'data-valid'),
|
|
66
|
-
(e.invalid = 'data-invalid'),
|
|
67
|
-
(e.touched = 'data-touched'),
|
|
68
|
-
(e.dirty = 'data-dirty'),
|
|
69
|
-
(e.filled = 'data-filled'),
|
|
70
|
-
(e.focused = 'data-focused'),
|
|
71
|
-
e
|
|
72
|
-
))({});
|
|
73
|
-
const _ = {
|
|
74
|
-
...be,
|
|
75
|
-
checked(e) {
|
|
76
|
-
return e ? { [F.checked]: '' } : { [F.unchecked]: '' };
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
Ie = s.forwardRef((i, o) => {
|
|
80
|
-
const {
|
|
81
|
-
checked: w,
|
|
82
|
-
className: q,
|
|
83
|
-
defaultChecked: k,
|
|
84
|
-
id: v,
|
|
85
|
-
inputRef: b,
|
|
86
|
-
name: g,
|
|
87
|
-
nativeButton: x = !1,
|
|
88
|
-
onCheckedChange: O,
|
|
89
|
-
readOnly: h = !1,
|
|
90
|
-
required: l = !1,
|
|
91
|
-
disabled: H = !1,
|
|
92
|
-
render: Me,
|
|
93
|
-
uncheckedValue: z,
|
|
94
|
-
value: y,
|
|
95
|
-
...J
|
|
96
|
-
} = i,
|
|
97
|
-
{ clearErrors: U } = ge(),
|
|
98
|
-
{
|
|
99
|
-
state: E,
|
|
100
|
-
setTouched: Y,
|
|
101
|
-
setDirty: Z,
|
|
102
|
-
validityData: $,
|
|
103
|
-
setFilled: C,
|
|
104
|
-
setFocused: P,
|
|
105
|
-
shouldValidateOnChange: G,
|
|
106
|
-
validationMode: Q,
|
|
107
|
-
disabled: W,
|
|
108
|
-
name: X,
|
|
109
|
-
validation: n,
|
|
110
|
-
} = S(),
|
|
111
|
-
{ labelId: D } = xe(),
|
|
112
|
-
d = W || H,
|
|
113
|
-
r = X ?? g,
|
|
114
|
-
p = se(O),
|
|
115
|
-
c = s.useRef(null),
|
|
116
|
-
I = ie(c, b, n.inputRef),
|
|
117
|
-
m = s.useRef(null),
|
|
118
|
-
R = re(),
|
|
119
|
-
M = ye({ id: v, implicit: !1, controlRef: m }),
|
|
120
|
-
j = x ? void 0 : M,
|
|
121
|
-
[t, B] = ce({ controlled: w, default: !!k, name: 'Switch', state: 'checked' });
|
|
122
|
-
Ce({ id: R, commit: n.commit, value: t, controlRef: m, name: r, getValue: () => t }),
|
|
123
|
-
oe(() => {
|
|
124
|
-
c.current && C(c.current.checked);
|
|
125
|
-
}, [c, C]),
|
|
126
|
-
we(t, () => {
|
|
127
|
-
U(r), Z(t !== $.initialValue), C(t), G() ? n.commit(t) : n.commit(t, !0);
|
|
128
|
-
});
|
|
129
|
-
const { getButtonProps: A, buttonRef: ee } = le({ disabled: d, native: x }),
|
|
130
|
-
ae = {
|
|
131
|
-
id: x ? M : R,
|
|
132
|
-
role: 'switch',
|
|
133
|
-
'aria-checked': t,
|
|
134
|
-
'aria-readonly': h || void 0,
|
|
135
|
-
'aria-required': l || void 0,
|
|
136
|
-
'aria-labelledby': D,
|
|
137
|
-
onFocus() {
|
|
138
|
-
d || P(!0);
|
|
139
|
-
},
|
|
140
|
-
onBlur() {
|
|
141
|
-
const a = c.current;
|
|
142
|
-
!a || d || (Y(!0), P(!1), Q === 'onBlur' && n.commit(a.checked));
|
|
143
|
-
},
|
|
144
|
-
onClick(a) {
|
|
145
|
-
var u;
|
|
146
|
-
h ||
|
|
147
|
-
d ||
|
|
148
|
-
(a.preventDefault(),
|
|
149
|
-
(u = c.current) == null ||
|
|
150
|
-
u.dispatchEvent(
|
|
151
|
-
new PointerEvent('click', {
|
|
152
|
-
bubbles: !0,
|
|
153
|
-
shiftKey: a.shiftKey,
|
|
154
|
-
ctrlKey: a.ctrlKey,
|
|
155
|
-
altKey: a.altKey,
|
|
156
|
-
metaKey: a.metaKey,
|
|
157
|
-
})
|
|
158
|
-
));
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
te = s.useMemo(
|
|
162
|
-
() =>
|
|
163
|
-
ue(
|
|
164
|
-
{
|
|
165
|
-
checked: t,
|
|
166
|
-
disabled: d,
|
|
167
|
-
id: j,
|
|
168
|
-
name: r,
|
|
169
|
-
required: l,
|
|
170
|
-
style: r ? he : pe,
|
|
171
|
-
tabIndex: -1,
|
|
172
|
-
type: 'checkbox',
|
|
173
|
-
'aria-hidden': !0,
|
|
174
|
-
ref: I,
|
|
175
|
-
onChange(a) {
|
|
176
|
-
if (a.nativeEvent.defaultPrevented) return;
|
|
177
|
-
const u = a.target.checked,
|
|
178
|
-
V = me(ke, a.nativeEvent);
|
|
179
|
-
p == null || p(u, V), !V.isCanceled && B(u);
|
|
180
|
-
},
|
|
181
|
-
onFocus() {
|
|
182
|
-
var a;
|
|
183
|
-
(a = m.current) == null || a.focus();
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
|
-
n.getInputValidationProps,
|
|
187
|
-
y !== void 0 ? { value: y } : fe
|
|
188
|
-
),
|
|
189
|
-
[t, d, I, j, r, p, l, B, n, y]
|
|
190
|
-
),
|
|
191
|
-
K = s.useMemo(
|
|
192
|
-
() => ({ ...E, checked: t, disabled: d, readOnly: h, required: l }),
|
|
193
|
-
[E, t, d, h, l]
|
|
194
|
-
),
|
|
195
|
-
ne = L('span', i, {
|
|
196
|
-
state: K,
|
|
197
|
-
ref: [o, m, ee],
|
|
198
|
-
props: [ae, n.getValidationProps, J, A],
|
|
199
|
-
stateAttributesMapping: _,
|
|
200
|
-
});
|
|
201
|
-
return f.jsxs(T.Provider, {
|
|
202
|
-
value: K,
|
|
203
|
-
children: [
|
|
204
|
-
ne,
|
|
205
|
-
!t && r && z !== void 0 && f.jsx('input', { type: 'hidden', name: r, value: z }),
|
|
206
|
-
f.jsx('input', { ...te }),
|
|
207
|
-
],
|
|
208
|
-
});
|
|
209
|
-
}),
|
|
210
|
-
Re = s.forwardRef((i, o) => {
|
|
211
|
-
const { render: w, className: q, ...k } = i,
|
|
212
|
-
{ state: v } = S(),
|
|
213
|
-
b = Pe(),
|
|
214
|
-
g = { ...v, ...b };
|
|
215
|
-
return L('span', i, { state: g, ref: o, stateAttributesMapping: _, props: k });
|
|
216
|
-
});
|
|
217
|
-
function Fe({ className: e, size: i = 'default', ...o }) {
|
|
218
|
-
return f.jsx(Ie, {
|
|
219
|
-
'data-slot': 'switch',
|
|
220
|
-
'data-size': i,
|
|
221
|
-
className: ve(
|
|
222
|
-
'data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50',
|
|
223
|
-
e
|
|
224
|
-
),
|
|
225
|
-
...o,
|
|
226
|
-
children: f.jsx(Re, {
|
|
227
|
-
'data-slot': 'switch-thumb',
|
|
228
|
-
className:
|
|
229
|
-
'bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform',
|
|
230
|
-
}),
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
export { Ke as L, Fe as S, Ve as a };
|
|
234
|
-
//# sourceMappingURL=switch-CIU4AisU.js.map
|
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
g as A,
|
|
3
|
-
Z as C,
|
|
4
|
-
aE as E,
|
|
5
|
-
Y as I,
|
|
6
|
-
n as L,
|
|
7
|
-
bE as M,
|
|
8
|
-
l as N,
|
|
9
|
-
m as O,
|
|
10
|
-
bF as P,
|
|
11
|
-
c as R,
|
|
12
|
-
h as S,
|
|
13
|
-
bH as T,
|
|
14
|
-
p as V,
|
|
15
|
-
o as _,
|
|
16
|
-
r as c,
|
|
17
|
-
bC as i,
|
|
18
|
-
B as j,
|
|
19
|
-
x as k,
|
|
20
|
-
j as n,
|
|
21
|
-
k as p,
|
|
22
|
-
a5 as v,
|
|
23
|
-
bG as w,
|
|
24
|
-
ac as y,
|
|
25
|
-
bD as z,
|
|
26
|
-
} from './index-dsVN7rgz.js'; /**
|
|
27
|
-
* @license lucide-react v0.564.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/
|
|
32
|
-
const B = [
|
|
33
|
-
['path', { d: 'M10 11v6', key: 'nco0om' }],
|
|
34
|
-
['path', { d: 'M14 11v6', key: 'outv1u' }],
|
|
35
|
-
['path', { d: 'M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6', key: 'miytrc' }],
|
|
36
|
-
['path', { d: 'M3 6h18', key: 'd0wm0j' }],
|
|
37
|
-
['path', { d: 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2', key: 'e791ji' }],
|
|
38
|
-
],
|
|
39
|
-
$ = R('trash-2', B);
|
|
40
|
-
const D = ((e) => (
|
|
41
|
-
(e.disabled = 'data-disabled'),
|
|
42
|
-
(e.valid = 'data-valid'),
|
|
43
|
-
(e.invalid = 'data-invalid'),
|
|
44
|
-
(e.touched = 'data-touched'),
|
|
45
|
-
(e.dirty = 'data-dirty'),
|
|
46
|
-
(e.filled = 'data-filled'),
|
|
47
|
-
(e.focused = 'data-focused'),
|
|
48
|
-
e
|
|
49
|
-
))({});
|
|
50
|
-
const F = {
|
|
51
|
-
badInput: !1,
|
|
52
|
-
customError: !1,
|
|
53
|
-
patternMismatch: !1,
|
|
54
|
-
rangeOverflow: !1,
|
|
55
|
-
rangeUnderflow: !1,
|
|
56
|
-
stepMismatch: !1,
|
|
57
|
-
tooLong: !1,
|
|
58
|
-
tooShort: !1,
|
|
59
|
-
typeMismatch: !1,
|
|
60
|
-
valid: null,
|
|
61
|
-
valueMissing: !1,
|
|
62
|
-
},
|
|
63
|
-
ee = {
|
|
64
|
-
valid(e) {
|
|
65
|
-
return e === null ? null : e ? { [D.valid]: '' } : { [D.invalid]: '' };
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
H = c.createContext({
|
|
69
|
-
invalid: void 0,
|
|
70
|
-
name: void 0,
|
|
71
|
-
validityData: { state: F, errors: [], error: '', value: '', initialValue: null },
|
|
72
|
-
setValidityData: i,
|
|
73
|
-
disabled: void 0,
|
|
74
|
-
touched: !1,
|
|
75
|
-
setTouched: i,
|
|
76
|
-
dirty: !1,
|
|
77
|
-
setDirty: i,
|
|
78
|
-
filled: !1,
|
|
79
|
-
setFilled: i,
|
|
80
|
-
focused: !1,
|
|
81
|
-
setFocused: i,
|
|
82
|
-
validate: () => null,
|
|
83
|
-
validationMode: 'onSubmit',
|
|
84
|
-
validationDebounceTime: 0,
|
|
85
|
-
shouldValidateOnChange: () => !1,
|
|
86
|
-
state: { disabled: !1, valid: null, touched: !1, dirty: !1, filled: !1, focused: !1 },
|
|
87
|
-
markedDirtyRef: { current: !1 },
|
|
88
|
-
validation: {
|
|
89
|
-
getValidationProps: (e = C) => e,
|
|
90
|
-
getInputValidationProps: (e = C) => e,
|
|
91
|
-
inputRef: { current: null },
|
|
92
|
-
commit: async () => {},
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
function U(e = !0) {
|
|
96
|
-
const t = c.useContext(H);
|
|
97
|
-
if (t.setValidityData === i && !e) throw new Error(V(28));
|
|
98
|
-
return t;
|
|
99
|
-
}
|
|
100
|
-
const Y = c.createContext({
|
|
101
|
-
formRef: { current: { fields: new Map() } },
|
|
102
|
-
errors: {},
|
|
103
|
-
clearErrors: i,
|
|
104
|
-
validationMode: 'onSubmit',
|
|
105
|
-
submitAttemptedRef: { current: !1 },
|
|
106
|
-
});
|
|
107
|
-
function G() {
|
|
108
|
-
return c.useContext(Y);
|
|
109
|
-
}
|
|
110
|
-
const J = c.createContext({
|
|
111
|
-
controlId: void 0,
|
|
112
|
-
registerControlId: i,
|
|
113
|
-
labelId: void 0,
|
|
114
|
-
setLabelId: i,
|
|
115
|
-
messageIds: [],
|
|
116
|
-
setMessageIds: i,
|
|
117
|
-
getDescriptionProps: (e) => e,
|
|
118
|
-
});
|
|
119
|
-
function W() {
|
|
120
|
-
return c.useContext(J);
|
|
121
|
-
}
|
|
122
|
-
function Z(e, t) {
|
|
123
|
-
return { ...e, state: { ...e.state, valid: !t && e.state.valid } };
|
|
124
|
-
}
|
|
125
|
-
function te(e = {}) {
|
|
126
|
-
const { id: t, implicit: o = !1, controlRef: l } = e,
|
|
127
|
-
{ controlId: h, registerControlId: f } = W(),
|
|
128
|
-
g = k(t),
|
|
129
|
-
d = o ? h : void 0,
|
|
130
|
-
m = I(() => Symbol('labelable-control')),
|
|
131
|
-
x = c.useRef(!1),
|
|
132
|
-
s = c.useRef(t != null),
|
|
133
|
-
u = y(() => {
|
|
134
|
-
!x.current || f === i || ((x.current = !1), f(m.current, void 0));
|
|
135
|
-
});
|
|
136
|
-
return (
|
|
137
|
-
v(() => {
|
|
138
|
-
if (f === i) return;
|
|
139
|
-
let a;
|
|
140
|
-
if (o) {
|
|
141
|
-
const r = l == null ? void 0 : l.current;
|
|
142
|
-
z(r) && r.closest('label') != null ? (a = t ?? null) : (a = d ?? g);
|
|
143
|
-
} else if (t != null) (s.current = !0), (a = t);
|
|
144
|
-
else if (s.current) a = g;
|
|
145
|
-
else {
|
|
146
|
-
u();
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
if (a === void 0) {
|
|
150
|
-
u();
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
(x.current = !0), f(m.current, a);
|
|
154
|
-
}, [t, l, d, f, o, g, m, u]),
|
|
155
|
-
c.useEffect(() => u, [u]),
|
|
156
|
-
h ?? g
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
function ae(e) {
|
|
160
|
-
const { enabled: t = !0, value: o, id: l, name: h, controlRef: f, commit: g } = e,
|
|
161
|
-
{ formRef: d } = G(),
|
|
162
|
-
{ invalid: m, markedDirtyRef: x, validityData: s, setValidityData: u } = U(),
|
|
163
|
-
a = y(e.getValue);
|
|
164
|
-
v(() => {
|
|
165
|
-
if (!t) return;
|
|
166
|
-
let r = o;
|
|
167
|
-
r === void 0 && (r = a()),
|
|
168
|
-
s.initialValue === null && r !== null && u((b) => ({ ...b, initialValue: r }));
|
|
169
|
-
}, [t, u, o, s.initialValue, a]),
|
|
170
|
-
v(() => {
|
|
171
|
-
!t ||
|
|
172
|
-
!l ||
|
|
173
|
-
d.current.fields.set(l, {
|
|
174
|
-
getValue: a,
|
|
175
|
-
name: h,
|
|
176
|
-
controlRef: f,
|
|
177
|
-
validityData: Z(s, m),
|
|
178
|
-
validate(r = !0) {
|
|
179
|
-
let b = o;
|
|
180
|
-
b === void 0 && (b = a()), (x.current = !0), r ? E.flushSync(() => g(b)) : g(b);
|
|
181
|
-
},
|
|
182
|
-
});
|
|
183
|
-
}, [g, f, t, d, a, l, m, x, h, s, o]),
|
|
184
|
-
v(() => {
|
|
185
|
-
const r = d.current.fields;
|
|
186
|
-
return () => {
|
|
187
|
-
l && r.delete(l);
|
|
188
|
-
};
|
|
189
|
-
}, [d, l]);
|
|
190
|
-
}
|
|
191
|
-
function q(e) {
|
|
192
|
-
const {
|
|
193
|
-
children: t,
|
|
194
|
-
open: o,
|
|
195
|
-
defaultOpen: l = !1,
|
|
196
|
-
onOpenChange: h,
|
|
197
|
-
onOpenChangeComplete: f,
|
|
198
|
-
actionsRef: g,
|
|
199
|
-
handle: d,
|
|
200
|
-
triggerId: m,
|
|
201
|
-
defaultTriggerId: x = null,
|
|
202
|
-
} = e,
|
|
203
|
-
s = M(),
|
|
204
|
-
u = !!s,
|
|
205
|
-
a = I(
|
|
206
|
-
() =>
|
|
207
|
-
(d == null ? void 0 : d.store) ??
|
|
208
|
-
new T({
|
|
209
|
-
open: l,
|
|
210
|
-
openProp: o,
|
|
211
|
-
activeTriggerId: x,
|
|
212
|
-
triggerIdProp: m,
|
|
213
|
-
modal: !0,
|
|
214
|
-
disablePointerDismissal: !0,
|
|
215
|
-
nested: u,
|
|
216
|
-
role: 'alertdialog',
|
|
217
|
-
})
|
|
218
|
-
).current;
|
|
219
|
-
a.useControlledProp('openProp', o),
|
|
220
|
-
a.useControlledProp('triggerIdProp', m),
|
|
221
|
-
a.useSyncedValue('nested', u),
|
|
222
|
-
a.useContextCallback('onOpenChange', h),
|
|
223
|
-
a.useContextCallback('onOpenChangeComplete', f);
|
|
224
|
-
const r = a.useState('payload');
|
|
225
|
-
P({ store: a, actionsRef: g, parentContext: s == null ? void 0 : s.store.context });
|
|
226
|
-
const b = c.useMemo(() => ({ store: a }), [a]);
|
|
227
|
-
return n.jsx(w.Provider, { value: b, children: typeof t == 'function' ? t({ payload: r }) : t });
|
|
228
|
-
}
|
|
229
|
-
function oe({ ...e }) {
|
|
230
|
-
return n.jsx(q, { 'data-slot': 'alert-dialog', ...e });
|
|
231
|
-
}
|
|
232
|
-
function K({ ...e }) {
|
|
233
|
-
return n.jsx(L, { 'data-slot': 'alert-dialog-portal', ...e });
|
|
234
|
-
}
|
|
235
|
-
function Q({ className: e, ...t }) {
|
|
236
|
-
return n.jsx(_, {
|
|
237
|
-
'data-slot': 'alert-dialog-overlay',
|
|
238
|
-
className: p(
|
|
239
|
-
'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50',
|
|
240
|
-
e
|
|
241
|
-
),
|
|
242
|
-
...t,
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
function le({ className: e, size: t = 'default', ...o }) {
|
|
246
|
-
return n.jsxs(K, {
|
|
247
|
-
children: [
|
|
248
|
-
n.jsx(Q, {}),
|
|
249
|
-
n.jsx(A, {
|
|
250
|
-
'data-slot': 'alert-dialog-content',
|
|
251
|
-
'data-size': t,
|
|
252
|
-
className: p(
|
|
253
|
-
'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-4 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none',
|
|
254
|
-
e
|
|
255
|
-
),
|
|
256
|
-
...o,
|
|
257
|
-
}),
|
|
258
|
-
],
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
function ne({ className: e, ...t }) {
|
|
262
|
-
return n.jsx('div', {
|
|
263
|
-
'data-slot': 'alert-dialog-header',
|
|
264
|
-
className: p(
|
|
265
|
-
'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',
|
|
266
|
-
e
|
|
267
|
-
),
|
|
268
|
-
...t,
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
function re({ className: e, ...t }) {
|
|
272
|
-
return n.jsx('div', {
|
|
273
|
-
'data-slot': 'alert-dialog-footer',
|
|
274
|
-
className: p(
|
|
275
|
-
'bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',
|
|
276
|
-
e
|
|
277
|
-
),
|
|
278
|
-
...t,
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
function se({ className: e, ...t }) {
|
|
282
|
-
return n.jsx('div', {
|
|
283
|
-
'data-slot': 'alert-dialog-media',
|
|
284
|
-
className: p(
|
|
285
|
-
"bg-muted mb-2 inline-flex size-10 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",
|
|
286
|
-
e
|
|
287
|
-
),
|
|
288
|
-
...t,
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
function ie({ className: e, ...t }) {
|
|
292
|
-
return n.jsx(N, {
|
|
293
|
-
'data-slot': 'alert-dialog-title',
|
|
294
|
-
className: p(
|
|
295
|
-
'text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',
|
|
296
|
-
e
|
|
297
|
-
),
|
|
298
|
-
...t,
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
function de({ className: e, ...t }) {
|
|
302
|
-
return n.jsx(O, {
|
|
303
|
-
'data-slot': 'alert-dialog-description',
|
|
304
|
-
className: p(
|
|
305
|
-
'text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3',
|
|
306
|
-
e
|
|
307
|
-
),
|
|
308
|
-
...t,
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
function ue({ className: e, ...t }) {
|
|
312
|
-
return n.jsx(j, { 'data-slot': 'alert-dialog-action', className: p(e), ...t });
|
|
313
|
-
}
|
|
314
|
-
function ce({ className: e, variant: t = 'outline', size: o = 'default', ...l }) {
|
|
315
|
-
return n.jsx(S, {
|
|
316
|
-
'data-slot': 'alert-dialog-cancel',
|
|
317
|
-
className: p(e),
|
|
318
|
-
render: n.jsx(j, { variant: t, size: o }),
|
|
319
|
-
...l,
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
function fe(e, t) {
|
|
323
|
-
const o = c.useRef(e),
|
|
324
|
-
l = y(t);
|
|
325
|
-
v(() => {
|
|
326
|
-
o.current !== e && l(o.current);
|
|
327
|
-
}, [e, l]),
|
|
328
|
-
v(() => {
|
|
329
|
-
o.current = e;
|
|
330
|
-
}, [e]);
|
|
331
|
-
}
|
|
332
|
-
export {
|
|
333
|
-
oe as A,
|
|
334
|
-
$ as T,
|
|
335
|
-
le as a,
|
|
336
|
-
ne as b,
|
|
337
|
-
ie as c,
|
|
338
|
-
de as d,
|
|
339
|
-
re as e,
|
|
340
|
-
ce as f,
|
|
341
|
-
ue as g,
|
|
342
|
-
se as h,
|
|
343
|
-
W as i,
|
|
344
|
-
te as j,
|
|
345
|
-
ae as k,
|
|
346
|
-
ee as l,
|
|
347
|
-
G as m,
|
|
348
|
-
fe as n,
|
|
349
|
-
U as u,
|
|
350
|
-
};
|
|
351
|
-
//# sourceMappingURL=useValueChanged-V23H0VpC.js.map
|