json-schema-builder-react 0.0.4 → 0.0.5

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-lib/index.js CHANGED
@@ -1,134 +1,134 @@
1
- import { jsx as n, jsxs as l, Fragment as et } from "react/jsx-runtime";
2
- import * as I from "react";
3
- import { createContext as tt, useContext as rt, useState as V, useEffect as be, useMemo as nt, useCallback as H } from "react";
4
- import { Slot as ot } from "@radix-ui/react-slot";
5
- import { X as at, ChevronDown as ye, Check as Re, ChevronUp as it, Type as st, Hash as Se, CheckSquare as lt, Braces as dt, List as ct, FileText as mt, Plus as re, Pencil as ut, Trash2 as Le, CheckCircle2 as pt, Copy as ht, Download as ft, ChevronRight as gt, Moon as bt, Sun as yt, Upload as vt } from "lucide-react";
6
- import * as ne from "@radix-ui/react-tooltip";
1
+ import { jsx as n, jsxs as c, Fragment as Ee } from "react/jsx-runtime";
2
+ import * as S from "react";
3
+ import { createContext as nt, useContext as at, useState as B, useEffect as be, useMemo as ot, useCallback as _ } from "react";
4
+ import { Slot as it } from "@radix-ui/react-slot";
5
+ import { ChevronDown as ye, Check as Oe, ChevronUp as st, X as lt, Type as dt, Hash as ze, CheckSquare as ct, Braces as mt, List as ut, FileText as pt, Plus as Q, Pencil as ht, Trash2 as De, CheckCircle2 as ft, Copy as gt, Download as bt, ChevronRight as yt, Moon as vt, Sun as xt, Upload as wt } from "lucide-react";
6
+ import * as U from "@radix-ui/react-tooltip";
7
+ import * as z from "@radix-ui/react-select";
7
8
  import * as D from "@radix-ui/react-dialog";
8
- import * as qe from "@radix-ui/react-label";
9
- import * as P from "@radix-ui/react-select";
9
+ import * as Me from "@radix-ui/react-label";
10
10
  import * as se from "@radix-ui/react-checkbox";
11
- function Ee(e) {
12
- var r, t, a = "";
13
- if (typeof e == "string" || typeof e == "number") a += e;
11
+ function qe(e) {
12
+ var r, t, o = "";
13
+ if (typeof e == "string" || typeof e == "number") o += e;
14
14
  else if (typeof e == "object") if (Array.isArray(e)) {
15
- var o = e.length;
16
- for (r = 0; r < o; r++) e[r] && (t = Ee(e[r])) && (a && (a += " "), a += t);
17
- } else for (t in e) e[t] && (a && (a += " "), a += t);
18
- return a;
15
+ var a = e.length;
16
+ for (r = 0; r < a; r++) e[r] && (t = qe(e[r])) && (o && (o += " "), o += t);
17
+ } else for (t in e) e[t] && (o && (o += " "), o += t);
18
+ return o;
19
19
  }
20
- function Me() {
21
- for (var e, r, t = 0, a = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = Ee(e)) && (a && (a += " "), a += r);
22
- return a;
20
+ function Fe() {
21
+ for (var e, r, t = 0, o = "", a = arguments.length; t < a; t++) (e = arguments[t]) && (r = qe(e)) && (o && (o += " "), o += r);
22
+ return o;
23
23
  }
24
- const Ie = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Te = Me, Fe = (e, r) => (t) => {
25
- var a;
26
- if ((r == null ? void 0 : r.variants) == null) return Te(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
27
- const { variants: o, defaultVariants: i } = r, s = Object.keys(o).map((d) => {
28
- const g = t == null ? void 0 : t[d], N = i == null ? void 0 : i[d];
29
- if (g === null) return null;
30
- const x = Ie(g) || Ie(N);
31
- return o[d][x];
32
- }), c = t && Object.entries(t).reduce((d, g) => {
33
- let [N, x] = g;
34
- return x === void 0 || (d[N] = x), d;
35
- }, {}), m = r == null || (a = r.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((d, g) => {
36
- let { class: N, className: x, ...S } = g;
37
- return Object.entries(S).every((y) => {
38
- let [p, h] = y;
39
- return Array.isArray(h) ? h.includes({
24
+ const je = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Pe = Fe, Be = (e, r) => (t) => {
25
+ var o;
26
+ if ((r == null ? void 0 : r.variants) == null) return Pe(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
27
+ const { variants: a, defaultVariants: i } = r, s = Object.keys(a).map((m) => {
28
+ const d = t == null ? void 0 : t[m], f = i == null ? void 0 : i[m];
29
+ if (d === null) return null;
30
+ const g = je(d) || je(f);
31
+ return a[m][g];
32
+ }), l = t && Object.entries(t).reduce((m, d) => {
33
+ let [f, g] = d;
34
+ return g === void 0 || (m[f] = g), m;
35
+ }, {}), h = r == null || (o = r.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((m, d) => {
36
+ let { class: f, className: g, ...w } = d;
37
+ return Object.entries(w).every((v) => {
38
+ let [x, p] = v;
39
+ return Array.isArray(p) ? p.includes({
40
40
  ...i,
41
- ...c
42
- }[p]) : {
41
+ ...l
42
+ }[x]) : {
43
43
  ...i,
44
- ...c
45
- }[p] === h;
44
+ ...l
45
+ }[x] === p;
46
46
  }) ? [
47
- ...d,
48
- N,
49
- x
50
- ] : d;
47
+ ...m,
48
+ f,
49
+ g
50
+ ] : m;
51
51
  }, []);
52
- return Te(e, s, m, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
53
- }, ve = "-", xt = (e) => {
54
- const r = Nt(e), {
52
+ return Pe(e, s, h, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
53
+ }, ve = "-", Nt = (e) => {
54
+ const r = kt(e), {
55
55
  conflictingClassGroups: t,
56
- conflictingClassGroupModifiers: a
56
+ conflictingClassGroupModifiers: o
57
57
  } = e;
58
58
  return {
59
59
  getClassGroupId: (s) => {
60
- const c = s.split(ve);
61
- return c[0] === "" && c.length !== 1 && c.shift(), Oe(c, r) || wt(s);
60
+ const l = s.split(ve);
61
+ return l[0] === "" && l.length !== 1 && l.shift(), Ge(l, r) || Ct(s);
62
62
  },
63
- getConflictingClassGroupIds: (s, c) => {
64
- const m = t[s] || [];
65
- return c && a[s] ? [...m, ...a[s]] : m;
63
+ getConflictingClassGroupIds: (s, l) => {
64
+ const h = t[s] || [];
65
+ return l && o[s] ? [...h, ...o[s]] : h;
66
66
  }
67
67
  };
68
- }, Oe = (e, r) => {
68
+ }, Ge = (e, r) => {
69
69
  var s;
70
70
  if (e.length === 0)
71
71
  return r.classGroupId;
72
- const t = e[0], a = r.nextPart.get(t), o = a ? Oe(e.slice(1), a) : void 0;
73
- if (o)
74
- return o;
72
+ const t = e[0], o = r.nextPart.get(t), a = o ? Ge(e.slice(1), o) : void 0;
73
+ if (a)
74
+ return a;
75
75
  if (r.validators.length === 0)
76
76
  return;
77
77
  const i = e.join(ve);
78
78
  return (s = r.validators.find(({
79
- validator: c
80
- }) => c(i))) == null ? void 0 : s.classGroupId;
81
- }, ze = /^\[(.+)\]$/, wt = (e) => {
82
- if (ze.test(e)) {
83
- const r = ze.exec(e)[1], t = r == null ? void 0 : r.substring(0, r.indexOf(":"));
79
+ validator: l
80
+ }) => l(i))) == null ? void 0 : s.classGroupId;
81
+ }, Re = /^\[(.+)\]$/, Ct = (e) => {
82
+ if (Re.test(e)) {
83
+ const r = Re.exec(e)[1], t = r == null ? void 0 : r.substring(0, r.indexOf(":"));
84
84
  if (t)
85
85
  return "arbitrary.." + t;
86
86
  }
87
- }, Nt = (e) => {
87
+ }, kt = (e) => {
88
88
  const {
89
89
  theme: r,
90
90
  prefix: t
91
- } = e, a = {
91
+ } = e, o = {
92
92
  nextPart: /* @__PURE__ */ new Map(),
93
93
  validators: []
94
94
  };
95
- return kt(Object.entries(e.classGroups), t).forEach(([i, s]) => {
96
- le(s, a, i, r);
97
- }), a;
98
- }, le = (e, r, t, a) => {
99
- e.forEach((o) => {
100
- if (typeof o == "string") {
101
- const i = o === "" ? r : Pe(r, o);
95
+ return St(Object.entries(e.classGroups), t).forEach(([i, s]) => {
96
+ le(s, o, i, r);
97
+ }), o;
98
+ }, le = (e, r, t, o) => {
99
+ e.forEach((a) => {
100
+ if (typeof a == "string") {
101
+ const i = a === "" ? r : Ae(r, a);
102
102
  i.classGroupId = t;
103
103
  return;
104
104
  }
105
- if (typeof o == "function") {
106
- if (Ct(o)) {
107
- le(o(a), r, t, a);
105
+ if (typeof a == "function") {
106
+ if (It(a)) {
107
+ le(a(o), r, t, o);
108
108
  return;
109
109
  }
110
110
  r.validators.push({
111
- validator: o,
111
+ validator: a,
112
112
  classGroupId: t
113
113
  });
114
114
  return;
115
115
  }
116
- Object.entries(o).forEach(([i, s]) => {
117
- le(s, Pe(r, i), t, a);
116
+ Object.entries(a).forEach(([i, s]) => {
117
+ le(s, Ae(r, i), t, o);
118
118
  });
119
119
  });
120
- }, Pe = (e, r) => {
120
+ }, Ae = (e, r) => {
121
121
  let t = e;
122
- return r.split(ve).forEach((a) => {
123
- t.nextPart.has(a) || t.nextPart.set(a, {
122
+ return r.split(ve).forEach((o) => {
123
+ t.nextPart.has(o) || t.nextPart.set(o, {
124
124
  nextPart: /* @__PURE__ */ new Map(),
125
125
  validators: []
126
- }), t = t.nextPart.get(a);
126
+ }), t = t.nextPart.get(o);
127
127
  }), t;
128
- }, Ct = (e) => e.isThemeGetter, kt = (e, r) => r ? e.map(([t, a]) => {
129
- const o = a.map((i) => typeof i == "string" ? r + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([s, c]) => [r + s, c])) : i);
130
- return [t, o];
131
- }) : e, St = (e) => {
128
+ }, It = (e) => e.isThemeGetter, St = (e, r) => r ? e.map(([t, o]) => {
129
+ const a = o.map((i) => typeof i == "string" ? r + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([s, l]) => [r + s, l])) : i);
130
+ return [t, a];
131
+ }) : e, Tt = (e) => {
132
132
  if (e < 1)
133
133
  return {
134
134
  get: () => {
@@ -136,179 +136,179 @@ const Ie = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Te = Me, F
136
136
  set: () => {
137
137
  }
138
138
  };
139
- let r = 0, t = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
140
- const o = (i, s) => {
141
- t.set(i, s), r++, r > e && (r = 0, a = t, t = /* @__PURE__ */ new Map());
139
+ let r = 0, t = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
140
+ const a = (i, s) => {
141
+ t.set(i, s), r++, r > e && (r = 0, o = t, t = /* @__PURE__ */ new Map());
142
142
  };
143
143
  return {
144
144
  get(i) {
145
145
  let s = t.get(i);
146
146
  if (s !== void 0)
147
147
  return s;
148
- if ((s = a.get(i)) !== void 0)
149
- return o(i, s), s;
148
+ if ((s = o.get(i)) !== void 0)
149
+ return a(i, s), s;
150
150
  },
151
151
  set(i, s) {
152
- t.has(i) ? t.set(i, s) : o(i, s);
152
+ t.has(i) ? t.set(i, s) : a(i, s);
153
153
  }
154
154
  };
155
- }, Ve = "!", It = (e) => {
155
+ }, Ve = "!", zt = (e) => {
156
156
  const {
157
157
  separator: r,
158
158
  experimentalParseClassName: t
159
- } = e, a = r.length === 1, o = r[0], i = r.length, s = (c) => {
160
- const m = [];
161
- let d = 0, g = 0, N;
162
- for (let h = 0; h < c.length; h++) {
163
- let v = c[h];
164
- if (d === 0) {
165
- if (v === o && (a || c.slice(h, h + i) === r)) {
166
- m.push(c.slice(g, h)), g = h + i;
159
+ } = e, o = r.length === 1, a = r[0], i = r.length, s = (l) => {
160
+ const h = [];
161
+ let m = 0, d = 0, f;
162
+ for (let p = 0; p < l.length; p++) {
163
+ let N = l[p];
164
+ if (m === 0) {
165
+ if (N === a && (o || l.slice(p, p + i) === r)) {
166
+ h.push(l.slice(d, p)), d = p + i;
167
167
  continue;
168
168
  }
169
- if (v === "/") {
170
- N = h;
169
+ if (N === "/") {
170
+ f = p;
171
171
  continue;
172
172
  }
173
173
  }
174
- v === "[" ? d++ : v === "]" && d--;
174
+ N === "[" ? m++ : N === "]" && m--;
175
175
  }
176
- const x = m.length === 0 ? c : c.substring(g), S = x.startsWith(Ve), y = S ? x.substring(1) : x, p = N && N > g ? N - g : void 0;
176
+ const g = h.length === 0 ? l : l.substring(d), w = g.startsWith(Ve), v = w ? g.substring(1) : g, x = f && f > d ? f - d : void 0;
177
177
  return {
178
- modifiers: m,
179
- hasImportantModifier: S,
180
- baseClassName: y,
181
- maybePostfixModifierPosition: p
178
+ modifiers: h,
179
+ hasImportantModifier: w,
180
+ baseClassName: v,
181
+ maybePostfixModifierPosition: x
182
182
  };
183
183
  };
184
- return t ? (c) => t({
185
- className: c,
184
+ return t ? (l) => t({
185
+ className: l,
186
186
  parseClassName: s
187
187
  }) : s;
188
- }, Tt = (e) => {
188
+ }, jt = (e) => {
189
189
  if (e.length <= 1)
190
190
  return e;
191
191
  const r = [];
192
192
  let t = [];
193
- return e.forEach((a) => {
194
- a[0] === "[" ? (r.push(...t.sort(), a), t = []) : t.push(a);
193
+ return e.forEach((o) => {
194
+ o[0] === "[" ? (r.push(...t.sort(), o), t = []) : t.push(o);
195
195
  }), r.push(...t.sort()), r;
196
- }, zt = (e) => ({
197
- cache: St(e.cacheSize),
198
- parseClassName: It(e),
199
- ...xt(e)
200
- }), Pt = /\s+/, At = (e, r) => {
196
+ }, Pt = (e) => ({
197
+ cache: Tt(e.cacheSize),
198
+ parseClassName: zt(e),
199
+ ...Nt(e)
200
+ }), Rt = /\s+/, At = (e, r) => {
201
201
  const {
202
202
  parseClassName: t,
203
- getClassGroupId: a,
204
- getConflictingClassGroupIds: o
205
- } = r, i = [], s = e.trim().split(Pt);
206
- let c = "";
207
- for (let m = s.length - 1; m >= 0; m -= 1) {
208
- const d = s[m], {
209
- modifiers: g,
210
- hasImportantModifier: N,
211
- baseClassName: x,
212
- maybePostfixModifierPosition: S
213
- } = t(d);
214
- let y = !!S, p = a(y ? x.substring(0, S) : x);
215
- if (!p) {
216
- if (!y) {
217
- c = d + (c.length > 0 ? " " + c : c);
203
+ getClassGroupId: o,
204
+ getConflictingClassGroupIds: a
205
+ } = r, i = [], s = e.trim().split(Rt);
206
+ let l = "";
207
+ for (let h = s.length - 1; h >= 0; h -= 1) {
208
+ const m = s[h], {
209
+ modifiers: d,
210
+ hasImportantModifier: f,
211
+ baseClassName: g,
212
+ maybePostfixModifierPosition: w
213
+ } = t(m);
214
+ let v = !!w, x = o(v ? g.substring(0, w) : g);
215
+ if (!x) {
216
+ if (!v) {
217
+ l = m + (l.length > 0 ? " " + l : l);
218
218
  continue;
219
219
  }
220
- if (p = a(x), !p) {
221
- c = d + (c.length > 0 ? " " + c : c);
220
+ if (x = o(g), !x) {
221
+ l = m + (l.length > 0 ? " " + l : l);
222
222
  continue;
223
223
  }
224
- y = !1;
224
+ v = !1;
225
225
  }
226
- const h = Tt(g).join(":"), v = N ? h + Ve : h, T = v + p;
227
- if (i.includes(T))
226
+ const p = jt(d).join(":"), N = f ? p + Ve : p, b = N + x;
227
+ if (i.includes(b))
228
228
  continue;
229
- i.push(T);
230
- const u = o(p, y);
231
- for (let A = 0; A < u.length; ++A) {
232
- const O = u[A];
233
- i.push(v + O);
229
+ i.push(b);
230
+ const A = a(x, v);
231
+ for (let u = 0; u < A.length; ++u) {
232
+ const j = A[u];
233
+ i.push(N + j);
234
234
  }
235
- c = d + (c.length > 0 ? " " + c : c);
235
+ l = m + (l.length > 0 ? " " + l : l);
236
236
  }
237
- return c;
237
+ return l;
238
238
  };
239
- function jt() {
240
- let e = 0, r, t, a = "";
239
+ function Lt() {
240
+ let e = 0, r, t, o = "";
241
241
  for (; e < arguments.length; )
242
- (r = arguments[e++]) && (t = De(r)) && (a && (a += " "), a += t);
243
- return a;
242
+ (r = arguments[e++]) && (t = $e(r)) && (o && (o += " "), o += t);
243
+ return o;
244
244
  }
245
- const De = (e) => {
245
+ const $e = (e) => {
246
246
  if (typeof e == "string")
247
247
  return e;
248
248
  let r, t = "";
249
- for (let a = 0; a < e.length; a++)
250
- e[a] && (r = De(e[a])) && (t && (t += " "), t += r);
249
+ for (let o = 0; o < e.length; o++)
250
+ e[o] && (r = $e(e[o])) && (t && (t += " "), t += r);
251
251
  return t;
252
252
  };
253
- function Rt(e, ...r) {
254
- let t, a, o, i = s;
255
- function s(m) {
256
- const d = r.reduce((g, N) => N(g), e());
257
- return t = zt(d), a = t.cache.get, o = t.cache.set, i = c, c(m);
253
+ function Et(e, ...r) {
254
+ let t, o, a, i = s;
255
+ function s(h) {
256
+ const m = r.reduce((d, f) => f(d), e());
257
+ return t = Pt(m), o = t.cache.get, a = t.cache.set, i = l, l(h);
258
258
  }
259
- function c(m) {
260
- const d = a(m);
261
- if (d)
262
- return d;
263
- const g = At(m, t);
264
- return o(m, g), g;
259
+ function l(h) {
260
+ const m = o(h);
261
+ if (m)
262
+ return m;
263
+ const d = At(h, t);
264
+ return a(h, d), d;
265
265
  }
266
266
  return function() {
267
- return i(jt.apply(null, arguments));
267
+ return i(Lt.apply(null, arguments));
268
268
  };
269
269
  }
270
- const k = (e) => {
270
+ const I = (e) => {
271
271
  const r = (t) => t[e] || [];
272
272
  return r.isThemeGetter = !0, r;
273
- }, Ge = /^\[(?:([a-z-]+):)?(.+)\]$/i, Lt = /^\d+\/\d+$/, qt = /* @__PURE__ */ new Set(["px", "full", "screen"]), Et = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Mt = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ft = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Ot = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Vt = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, $ = (e) => Z(e) || qt.has(e) || Lt.test(e), U = (e) => Q(e, "length", Wt), Z = (e) => !!e && !Number.isNaN(Number(e)), ie = (e) => Q(e, "number", Z), ee = (e) => !!e && Number.isInteger(Number(e)), Dt = (e) => e.endsWith("%") && Z(e.slice(0, -1)), b = (e) => Ge.test(e), W = (e) => Et.test(e), Gt = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Bt = (e) => Q(e, Gt, Be), $t = (e) => Q(e, "position", Be), _t = /* @__PURE__ */ new Set(["image", "url"]), Jt = (e) => Q(e, _t, Ht), Ut = (e) => Q(e, "", Kt), te = () => !0, Q = (e, r, t) => {
274
- const a = Ge.exec(e);
275
- return a ? a[1] ? typeof r == "string" ? a[1] === r : r.has(a[1]) : t(a[2]) : !1;
276
- }, Wt = (e) => (
273
+ }, _e = /^\[(?:([a-z-]+):)?(.+)\]$/i, Ot = /^\d+\/\d+$/, Dt = /* @__PURE__ */ new Set(["px", "full", "screen"]), Mt = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, qt = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ft = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Bt = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Gt = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, F = (e) => J(e) || Dt.has(e) || Ot.test(e), G = (e) => W(e, "length", Ht), J = (e) => !!e && !Number.isNaN(Number(e)), ie = (e) => W(e, "number", J), X = (e) => !!e && Number.isInteger(Number(e)), Vt = (e) => e.endsWith("%") && J(e.slice(0, -1)), y = (e) => _e.test(e), V = (e) => Mt.test(e), $t = /* @__PURE__ */ new Set(["length", "size", "percentage"]), _t = (e) => W(e, $t, Ke), Kt = (e) => W(e, "position", Ke), Jt = /* @__PURE__ */ new Set(["image", "url"]), Ut = (e) => W(e, Jt, Zt), Wt = (e) => W(e, "", Xt), Z = () => !0, W = (e, r, t) => {
274
+ const o = _e.exec(e);
275
+ return o ? o[1] ? typeof r == "string" ? o[1] === r : r.has(o[1]) : t(o[2]) : !1;
276
+ }, Ht = (e) => (
277
277
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
278
278
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
279
279
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
280
- Mt.test(e) && !Ft.test(e)
281
- ), Be = () => !1, Kt = (e) => Ot.test(e), Ht = (e) => Vt.test(e), Xt = () => {
282
- const e = k("colors"), r = k("spacing"), t = k("blur"), a = k("brightness"), o = k("borderColor"), i = k("borderRadius"), s = k("borderSpacing"), c = k("borderWidth"), m = k("contrast"), d = k("grayscale"), g = k("hueRotate"), N = k("invert"), x = k("gap"), S = k("gradientColorStops"), y = k("gradientColorStopPositions"), p = k("inset"), h = k("margin"), v = k("opacity"), T = k("padding"), u = k("saturate"), A = k("scale"), O = k("sepia"), _ = k("skew"), M = k("space"), F = k("translate"), E = () => ["auto", "contain", "none"], J = () => ["auto", "hidden", "clip", "visible", "scroll"], G = () => ["auto", b, r], w = () => [b, r], f = () => ["", $, U], q = () => ["auto", Z, b], X = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], K = () => ["solid", "dashed", "dotted", "double", "none"], Ce = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], ae = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], Y = () => ["", "0", b], ke = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], B = () => [Z, b];
280
+ qt.test(e) && !Ft.test(e)
281
+ ), Ke = () => !1, Xt = (e) => Bt.test(e), Zt = (e) => Gt.test(e), Qt = () => {
282
+ const e = I("colors"), r = I("spacing"), t = I("blur"), o = I("brightness"), a = I("borderColor"), i = I("borderRadius"), s = I("borderSpacing"), l = I("borderWidth"), h = I("contrast"), m = I("grayscale"), d = I("hueRotate"), f = I("invert"), g = I("gap"), w = I("gradientColorStops"), v = I("gradientColorStopPositions"), x = I("inset"), p = I("margin"), N = I("opacity"), b = I("padding"), A = I("saturate"), u = I("scale"), j = I("sepia"), $ = I("skew"), K = I("space"), P = I("translate"), O = () => ["auto", "contain", "none"], M = () => ["auto", "hidden", "clip", "visible", "scroll"], Y = () => ["auto", y, r], k = () => [y, r], ke = () => ["", F, G], ee = () => ["auto", J, y], Ie = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], te = () => ["solid", "dashed", "dotted", "double", "none"], Se = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], oe = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], H = () => ["", "0", y], Te = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], q = () => [J, y];
283
283
  return {
284
284
  cacheSize: 500,
285
285
  separator: ":",
286
286
  theme: {
287
- colors: [te],
288
- spacing: [$, U],
289
- blur: ["none", "", W, b],
290
- brightness: B(),
287
+ colors: [Z],
288
+ spacing: [F, G],
289
+ blur: ["none", "", V, y],
290
+ brightness: q(),
291
291
  borderColor: [e],
292
- borderRadius: ["none", "", "full", W, b],
293
- borderSpacing: w(),
294
- borderWidth: f(),
295
- contrast: B(),
296
- grayscale: Y(),
297
- hueRotate: B(),
298
- invert: Y(),
299
- gap: w(),
292
+ borderRadius: ["none", "", "full", V, y],
293
+ borderSpacing: k(),
294
+ borderWidth: ke(),
295
+ contrast: q(),
296
+ grayscale: H(),
297
+ hueRotate: q(),
298
+ invert: H(),
299
+ gap: k(),
300
300
  gradientColorStops: [e],
301
- gradientColorStopPositions: [Dt, U],
302
- inset: G(),
303
- margin: G(),
304
- opacity: B(),
305
- padding: w(),
306
- saturate: B(),
307
- scale: B(),
308
- sepia: Y(),
309
- skew: B(),
310
- space: w(),
311
- translate: w()
301
+ gradientColorStopPositions: [Vt, G],
302
+ inset: Y(),
303
+ margin: Y(),
304
+ opacity: q(),
305
+ padding: k(),
306
+ saturate: q(),
307
+ scale: q(),
308
+ sepia: H(),
309
+ skew: q(),
310
+ space: k(),
311
+ translate: k()
312
312
  },
313
313
  classGroups: {
314
314
  // Layout
@@ -317,7 +317,7 @@ const k = (e) => {
317
317
  * @see https://tailwindcss.com/docs/aspect-ratio
318
318
  */
319
319
  aspect: [{
320
- aspect: ["auto", "square", "video", b]
320
+ aspect: ["auto", "square", "video", y]
321
321
  }],
322
322
  /**
323
323
  * Container
@@ -329,21 +329,21 @@ const k = (e) => {
329
329
  * @see https://tailwindcss.com/docs/columns
330
330
  */
331
331
  columns: [{
332
- columns: [W]
332
+ columns: [V]
333
333
  }],
334
334
  /**
335
335
  * Break After
336
336
  * @see https://tailwindcss.com/docs/break-after
337
337
  */
338
338
  "break-after": [{
339
- "break-after": ke()
339
+ "break-after": Te()
340
340
  }],
341
341
  /**
342
342
  * Break Before
343
343
  * @see https://tailwindcss.com/docs/break-before
344
344
  */
345
345
  "break-before": [{
346
- "break-before": ke()
346
+ "break-before": Te()
347
347
  }],
348
348
  /**
349
349
  * Break Inside
@@ -402,49 +402,49 @@ const k = (e) => {
402
402
  * @see https://tailwindcss.com/docs/object-position
403
403
  */
404
404
  "object-position": [{
405
- object: [...X(), b]
405
+ object: [...Ie(), y]
406
406
  }],
407
407
  /**
408
408
  * Overflow
409
409
  * @see https://tailwindcss.com/docs/overflow
410
410
  */
411
411
  overflow: [{
412
- overflow: J()
412
+ overflow: M()
413
413
  }],
414
414
  /**
415
415
  * Overflow X
416
416
  * @see https://tailwindcss.com/docs/overflow
417
417
  */
418
418
  "overflow-x": [{
419
- "overflow-x": J()
419
+ "overflow-x": M()
420
420
  }],
421
421
  /**
422
422
  * Overflow Y
423
423
  * @see https://tailwindcss.com/docs/overflow
424
424
  */
425
425
  "overflow-y": [{
426
- "overflow-y": J()
426
+ "overflow-y": M()
427
427
  }],
428
428
  /**
429
429
  * Overscroll Behavior
430
430
  * @see https://tailwindcss.com/docs/overscroll-behavior
431
431
  */
432
432
  overscroll: [{
433
- overscroll: E()
433
+ overscroll: O()
434
434
  }],
435
435
  /**
436
436
  * Overscroll Behavior X
437
437
  * @see https://tailwindcss.com/docs/overscroll-behavior
438
438
  */
439
439
  "overscroll-x": [{
440
- "overscroll-x": E()
440
+ "overscroll-x": O()
441
441
  }],
442
442
  /**
443
443
  * Overscroll Behavior Y
444
444
  * @see https://tailwindcss.com/docs/overscroll-behavior
445
445
  */
446
446
  "overscroll-y": [{
447
- "overscroll-y": E()
447
+ "overscroll-y": O()
448
448
  }],
449
449
  /**
450
450
  * Position
@@ -456,63 +456,63 @@ const k = (e) => {
456
456
  * @see https://tailwindcss.com/docs/top-right-bottom-left
457
457
  */
458
458
  inset: [{
459
- inset: [p]
459
+ inset: [x]
460
460
  }],
461
461
  /**
462
462
  * Right / Left
463
463
  * @see https://tailwindcss.com/docs/top-right-bottom-left
464
464
  */
465
465
  "inset-x": [{
466
- "inset-x": [p]
466
+ "inset-x": [x]
467
467
  }],
468
468
  /**
469
469
  * Top / Bottom
470
470
  * @see https://tailwindcss.com/docs/top-right-bottom-left
471
471
  */
472
472
  "inset-y": [{
473
- "inset-y": [p]
473
+ "inset-y": [x]
474
474
  }],
475
475
  /**
476
476
  * Start
477
477
  * @see https://tailwindcss.com/docs/top-right-bottom-left
478
478
  */
479
479
  start: [{
480
- start: [p]
480
+ start: [x]
481
481
  }],
482
482
  /**
483
483
  * End
484
484
  * @see https://tailwindcss.com/docs/top-right-bottom-left
485
485
  */
486
486
  end: [{
487
- end: [p]
487
+ end: [x]
488
488
  }],
489
489
  /**
490
490
  * Top
491
491
  * @see https://tailwindcss.com/docs/top-right-bottom-left
492
492
  */
493
493
  top: [{
494
- top: [p]
494
+ top: [x]
495
495
  }],
496
496
  /**
497
497
  * Right
498
498
  * @see https://tailwindcss.com/docs/top-right-bottom-left
499
499
  */
500
500
  right: [{
501
- right: [p]
501
+ right: [x]
502
502
  }],
503
503
  /**
504
504
  * Bottom
505
505
  * @see https://tailwindcss.com/docs/top-right-bottom-left
506
506
  */
507
507
  bottom: [{
508
- bottom: [p]
508
+ bottom: [x]
509
509
  }],
510
510
  /**
511
511
  * Left
512
512
  * @see https://tailwindcss.com/docs/top-right-bottom-left
513
513
  */
514
514
  left: [{
515
- left: [p]
515
+ left: [x]
516
516
  }],
517
517
  /**
518
518
  * Visibility
@@ -524,7 +524,7 @@ const k = (e) => {
524
524
  * @see https://tailwindcss.com/docs/z-index
525
525
  */
526
526
  z: [{
527
- z: ["auto", ee, b]
527
+ z: ["auto", X, y]
528
528
  }],
529
529
  // Flexbox and Grid
530
530
  /**
@@ -532,7 +532,7 @@ const k = (e) => {
532
532
  * @see https://tailwindcss.com/docs/flex-basis
533
533
  */
534
534
  basis: [{
535
- basis: G()
535
+ basis: Y()
536
536
  }],
537
537
  /**
538
538
  * Flex Direction
@@ -553,35 +553,35 @@ const k = (e) => {
553
553
  * @see https://tailwindcss.com/docs/flex
554
554
  */
555
555
  flex: [{
556
- flex: ["1", "auto", "initial", "none", b]
556
+ flex: ["1", "auto", "initial", "none", y]
557
557
  }],
558
558
  /**
559
559
  * Flex Grow
560
560
  * @see https://tailwindcss.com/docs/flex-grow
561
561
  */
562
562
  grow: [{
563
- grow: Y()
563
+ grow: H()
564
564
  }],
565
565
  /**
566
566
  * Flex Shrink
567
567
  * @see https://tailwindcss.com/docs/flex-shrink
568
568
  */
569
569
  shrink: [{
570
- shrink: Y()
570
+ shrink: H()
571
571
  }],
572
572
  /**
573
573
  * Order
574
574
  * @see https://tailwindcss.com/docs/order
575
575
  */
576
576
  order: [{
577
- order: ["first", "last", "none", ee, b]
577
+ order: ["first", "last", "none", X, y]
578
578
  }],
579
579
  /**
580
580
  * Grid Template Columns
581
581
  * @see https://tailwindcss.com/docs/grid-template-columns
582
582
  */
583
583
  "grid-cols": [{
584
- "grid-cols": [te]
584
+ "grid-cols": [Z]
585
585
  }],
586
586
  /**
587
587
  * Grid Column Start / End
@@ -589,29 +589,29 @@ const k = (e) => {
589
589
  */
590
590
  "col-start-end": [{
591
591
  col: ["auto", {
592
- span: ["full", ee, b]
593
- }, b]
592
+ span: ["full", X, y]
593
+ }, y]
594
594
  }],
595
595
  /**
596
596
  * Grid Column Start
597
597
  * @see https://tailwindcss.com/docs/grid-column
598
598
  */
599
599
  "col-start": [{
600
- "col-start": q()
600
+ "col-start": ee()
601
601
  }],
602
602
  /**
603
603
  * Grid Column End
604
604
  * @see https://tailwindcss.com/docs/grid-column
605
605
  */
606
606
  "col-end": [{
607
- "col-end": q()
607
+ "col-end": ee()
608
608
  }],
609
609
  /**
610
610
  * Grid Template Rows
611
611
  * @see https://tailwindcss.com/docs/grid-template-rows
612
612
  */
613
613
  "grid-rows": [{
614
- "grid-rows": [te]
614
+ "grid-rows": [Z]
615
615
  }],
616
616
  /**
617
617
  * Grid Row Start / End
@@ -619,22 +619,22 @@ const k = (e) => {
619
619
  */
620
620
  "row-start-end": [{
621
621
  row: ["auto", {
622
- span: [ee, b]
623
- }, b]
622
+ span: [X, y]
623
+ }, y]
624
624
  }],
625
625
  /**
626
626
  * Grid Row Start
627
627
  * @see https://tailwindcss.com/docs/grid-row
628
628
  */
629
629
  "row-start": [{
630
- "row-start": q()
630
+ "row-start": ee()
631
631
  }],
632
632
  /**
633
633
  * Grid Row End
634
634
  * @see https://tailwindcss.com/docs/grid-row
635
635
  */
636
636
  "row-end": [{
637
- "row-end": q()
637
+ "row-end": ee()
638
638
  }],
639
639
  /**
640
640
  * Grid Auto Flow
@@ -648,42 +648,42 @@ const k = (e) => {
648
648
  * @see https://tailwindcss.com/docs/grid-auto-columns
649
649
  */
650
650
  "auto-cols": [{
651
- "auto-cols": ["auto", "min", "max", "fr", b]
651
+ "auto-cols": ["auto", "min", "max", "fr", y]
652
652
  }],
653
653
  /**
654
654
  * Grid Auto Rows
655
655
  * @see https://tailwindcss.com/docs/grid-auto-rows
656
656
  */
657
657
  "auto-rows": [{
658
- "auto-rows": ["auto", "min", "max", "fr", b]
658
+ "auto-rows": ["auto", "min", "max", "fr", y]
659
659
  }],
660
660
  /**
661
661
  * Gap
662
662
  * @see https://tailwindcss.com/docs/gap
663
663
  */
664
664
  gap: [{
665
- gap: [x]
665
+ gap: [g]
666
666
  }],
667
667
  /**
668
668
  * Gap X
669
669
  * @see https://tailwindcss.com/docs/gap
670
670
  */
671
671
  "gap-x": [{
672
- "gap-x": [x]
672
+ "gap-x": [g]
673
673
  }],
674
674
  /**
675
675
  * Gap Y
676
676
  * @see https://tailwindcss.com/docs/gap
677
677
  */
678
678
  "gap-y": [{
679
- "gap-y": [x]
679
+ "gap-y": [g]
680
680
  }],
681
681
  /**
682
682
  * Justify Content
683
683
  * @see https://tailwindcss.com/docs/justify-content
684
684
  */
685
685
  "justify-content": [{
686
- justify: ["normal", ...ae()]
686
+ justify: ["normal", ...oe()]
687
687
  }],
688
688
  /**
689
689
  * Justify Items
@@ -704,7 +704,7 @@ const k = (e) => {
704
704
  * @see https://tailwindcss.com/docs/align-content
705
705
  */
706
706
  "align-content": [{
707
- content: ["normal", ...ae(), "baseline"]
707
+ content: ["normal", ...oe(), "baseline"]
708
708
  }],
709
709
  /**
710
710
  * Align Items
@@ -725,7 +725,7 @@ const k = (e) => {
725
725
  * @see https://tailwindcss.com/docs/place-content
726
726
  */
727
727
  "place-content": [{
728
- "place-content": [...ae(), "baseline"]
728
+ "place-content": [...oe(), "baseline"]
729
729
  }],
730
730
  /**
731
731
  * Place Items
@@ -747,133 +747,133 @@ const k = (e) => {
747
747
  * @see https://tailwindcss.com/docs/padding
748
748
  */
749
749
  p: [{
750
- p: [T]
750
+ p: [b]
751
751
  }],
752
752
  /**
753
753
  * Padding X
754
754
  * @see https://tailwindcss.com/docs/padding
755
755
  */
756
756
  px: [{
757
- px: [T]
757
+ px: [b]
758
758
  }],
759
759
  /**
760
760
  * Padding Y
761
761
  * @see https://tailwindcss.com/docs/padding
762
762
  */
763
763
  py: [{
764
- py: [T]
764
+ py: [b]
765
765
  }],
766
766
  /**
767
767
  * Padding Start
768
768
  * @see https://tailwindcss.com/docs/padding
769
769
  */
770
770
  ps: [{
771
- ps: [T]
771
+ ps: [b]
772
772
  }],
773
773
  /**
774
774
  * Padding End
775
775
  * @see https://tailwindcss.com/docs/padding
776
776
  */
777
777
  pe: [{
778
- pe: [T]
778
+ pe: [b]
779
779
  }],
780
780
  /**
781
781
  * Padding Top
782
782
  * @see https://tailwindcss.com/docs/padding
783
783
  */
784
784
  pt: [{
785
- pt: [T]
785
+ pt: [b]
786
786
  }],
787
787
  /**
788
788
  * Padding Right
789
789
  * @see https://tailwindcss.com/docs/padding
790
790
  */
791
791
  pr: [{
792
- pr: [T]
792
+ pr: [b]
793
793
  }],
794
794
  /**
795
795
  * Padding Bottom
796
796
  * @see https://tailwindcss.com/docs/padding
797
797
  */
798
798
  pb: [{
799
- pb: [T]
799
+ pb: [b]
800
800
  }],
801
801
  /**
802
802
  * Padding Left
803
803
  * @see https://tailwindcss.com/docs/padding
804
804
  */
805
805
  pl: [{
806
- pl: [T]
806
+ pl: [b]
807
807
  }],
808
808
  /**
809
809
  * Margin
810
810
  * @see https://tailwindcss.com/docs/margin
811
811
  */
812
812
  m: [{
813
- m: [h]
813
+ m: [p]
814
814
  }],
815
815
  /**
816
816
  * Margin X
817
817
  * @see https://tailwindcss.com/docs/margin
818
818
  */
819
819
  mx: [{
820
- mx: [h]
820
+ mx: [p]
821
821
  }],
822
822
  /**
823
823
  * Margin Y
824
824
  * @see https://tailwindcss.com/docs/margin
825
825
  */
826
826
  my: [{
827
- my: [h]
827
+ my: [p]
828
828
  }],
829
829
  /**
830
830
  * Margin Start
831
831
  * @see https://tailwindcss.com/docs/margin
832
832
  */
833
833
  ms: [{
834
- ms: [h]
834
+ ms: [p]
835
835
  }],
836
836
  /**
837
837
  * Margin End
838
838
  * @see https://tailwindcss.com/docs/margin
839
839
  */
840
840
  me: [{
841
- me: [h]
841
+ me: [p]
842
842
  }],
843
843
  /**
844
844
  * Margin Top
845
845
  * @see https://tailwindcss.com/docs/margin
846
846
  */
847
847
  mt: [{
848
- mt: [h]
848
+ mt: [p]
849
849
  }],
850
850
  /**
851
851
  * Margin Right
852
852
  * @see https://tailwindcss.com/docs/margin
853
853
  */
854
854
  mr: [{
855
- mr: [h]
855
+ mr: [p]
856
856
  }],
857
857
  /**
858
858
  * Margin Bottom
859
859
  * @see https://tailwindcss.com/docs/margin
860
860
  */
861
861
  mb: [{
862
- mb: [h]
862
+ mb: [p]
863
863
  }],
864
864
  /**
865
865
  * Margin Left
866
866
  * @see https://tailwindcss.com/docs/margin
867
867
  */
868
868
  ml: [{
869
- ml: [h]
869
+ ml: [p]
870
870
  }],
871
871
  /**
872
872
  * Space Between X
873
873
  * @see https://tailwindcss.com/docs/space
874
874
  */
875
875
  "space-x": [{
876
- "space-x": [M]
876
+ "space-x": [K]
877
877
  }],
878
878
  /**
879
879
  * Space Between X Reverse
@@ -885,7 +885,7 @@ const k = (e) => {
885
885
  * @see https://tailwindcss.com/docs/space
886
886
  */
887
887
  "space-y": [{
888
- "space-y": [M]
888
+ "space-y": [K]
889
889
  }],
890
890
  /**
891
891
  * Space Between Y Reverse
@@ -898,51 +898,51 @@ const k = (e) => {
898
898
  * @see https://tailwindcss.com/docs/width
899
899
  */
900
900
  w: [{
901
- w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", b, r]
901
+ w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", y, r]
902
902
  }],
903
903
  /**
904
904
  * Min-Width
905
905
  * @see https://tailwindcss.com/docs/min-width
906
906
  */
907
907
  "min-w": [{
908
- "min-w": [b, r, "min", "max", "fit"]
908
+ "min-w": [y, r, "min", "max", "fit"]
909
909
  }],
910
910
  /**
911
911
  * Max-Width
912
912
  * @see https://tailwindcss.com/docs/max-width
913
913
  */
914
914
  "max-w": [{
915
- "max-w": [b, r, "none", "full", "min", "max", "fit", "prose", {
916
- screen: [W]
917
- }, W]
915
+ "max-w": [y, r, "none", "full", "min", "max", "fit", "prose", {
916
+ screen: [V]
917
+ }, V]
918
918
  }],
919
919
  /**
920
920
  * Height
921
921
  * @see https://tailwindcss.com/docs/height
922
922
  */
923
923
  h: [{
924
- h: [b, r, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
924
+ h: [y, r, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
925
925
  }],
926
926
  /**
927
927
  * Min-Height
928
928
  * @see https://tailwindcss.com/docs/min-height
929
929
  */
930
930
  "min-h": [{
931
- "min-h": [b, r, "min", "max", "fit", "svh", "lvh", "dvh"]
931
+ "min-h": [y, r, "min", "max", "fit", "svh", "lvh", "dvh"]
932
932
  }],
933
933
  /**
934
934
  * Max-Height
935
935
  * @see https://tailwindcss.com/docs/max-height
936
936
  */
937
937
  "max-h": [{
938
- "max-h": [b, r, "min", "max", "fit", "svh", "lvh", "dvh"]
938
+ "max-h": [y, r, "min", "max", "fit", "svh", "lvh", "dvh"]
939
939
  }],
940
940
  /**
941
941
  * Size
942
942
  * @see https://tailwindcss.com/docs/size
943
943
  */
944
944
  size: [{
945
- size: [b, r, "auto", "min", "max", "fit"]
945
+ size: [y, r, "auto", "min", "max", "fit"]
946
946
  }],
947
947
  // Typography
948
948
  /**
@@ -950,7 +950,7 @@ const k = (e) => {
950
950
  * @see https://tailwindcss.com/docs/font-size
951
951
  */
952
952
  "font-size": [{
953
- text: ["base", W, U]
953
+ text: ["base", V, G]
954
954
  }],
955
955
  /**
956
956
  * Font Smoothing
@@ -974,7 +974,7 @@ const k = (e) => {
974
974
  * @see https://tailwindcss.com/docs/font-family
975
975
  */
976
976
  "font-family": [{
977
- font: [te]
977
+ font: [Z]
978
978
  }],
979
979
  /**
980
980
  * Font Variant Numeric
@@ -1011,35 +1011,35 @@ const k = (e) => {
1011
1011
  * @see https://tailwindcss.com/docs/letter-spacing
1012
1012
  */
1013
1013
  tracking: [{
1014
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", b]
1014
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", y]
1015
1015
  }],
1016
1016
  /**
1017
1017
  * Line Clamp
1018
1018
  * @see https://tailwindcss.com/docs/line-clamp
1019
1019
  */
1020
1020
  "line-clamp": [{
1021
- "line-clamp": ["none", Z, ie]
1021
+ "line-clamp": ["none", J, ie]
1022
1022
  }],
1023
1023
  /**
1024
1024
  * Line Height
1025
1025
  * @see https://tailwindcss.com/docs/line-height
1026
1026
  */
1027
1027
  leading: [{
1028
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", $, b]
1028
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", F, y]
1029
1029
  }],
1030
1030
  /**
1031
1031
  * List Style Image
1032
1032
  * @see https://tailwindcss.com/docs/list-style-image
1033
1033
  */
1034
1034
  "list-image": [{
1035
- "list-image": ["none", b]
1035
+ "list-image": ["none", y]
1036
1036
  }],
1037
1037
  /**
1038
1038
  * List Style Type
1039
1039
  * @see https://tailwindcss.com/docs/list-style-type
1040
1040
  */
1041
1041
  "list-style-type": [{
1042
- list: ["none", "disc", "decimal", b]
1042
+ list: ["none", "disc", "decimal", y]
1043
1043
  }],
1044
1044
  /**
1045
1045
  * List Style Position
@@ -1061,7 +1061,7 @@ const k = (e) => {
1061
1061
  * @see https://tailwindcss.com/docs/placeholder-opacity
1062
1062
  */
1063
1063
  "placeholder-opacity": [{
1064
- "placeholder-opacity": [v]
1064
+ "placeholder-opacity": [N]
1065
1065
  }],
1066
1066
  /**
1067
1067
  * Text Alignment
@@ -1082,7 +1082,7 @@ const k = (e) => {
1082
1082
  * @see https://tailwindcss.com/docs/text-opacity
1083
1083
  */
1084
1084
  "text-opacity": [{
1085
- "text-opacity": [v]
1085
+ "text-opacity": [N]
1086
1086
  }],
1087
1087
  /**
1088
1088
  * Text Decoration
@@ -1094,21 +1094,21 @@ const k = (e) => {
1094
1094
  * @see https://tailwindcss.com/docs/text-decoration-style
1095
1095
  */
1096
1096
  "text-decoration-style": [{
1097
- decoration: [...K(), "wavy"]
1097
+ decoration: [...te(), "wavy"]
1098
1098
  }],
1099
1099
  /**
1100
1100
  * Text Decoration Thickness
1101
1101
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1102
1102
  */
1103
1103
  "text-decoration-thickness": [{
1104
- decoration: ["auto", "from-font", $, U]
1104
+ decoration: ["auto", "from-font", F, G]
1105
1105
  }],
1106
1106
  /**
1107
1107
  * Text Underline Offset
1108
1108
  * @see https://tailwindcss.com/docs/text-underline-offset
1109
1109
  */
1110
1110
  "underline-offset": [{
1111
- "underline-offset": ["auto", $, b]
1111
+ "underline-offset": ["auto", F, y]
1112
1112
  }],
1113
1113
  /**
1114
1114
  * Text Decoration Color
@@ -1139,14 +1139,14 @@ const k = (e) => {
1139
1139
  * @see https://tailwindcss.com/docs/text-indent
1140
1140
  */
1141
1141
  indent: [{
1142
- indent: w()
1142
+ indent: k()
1143
1143
  }],
1144
1144
  /**
1145
1145
  * Vertical Alignment
1146
1146
  * @see https://tailwindcss.com/docs/vertical-align
1147
1147
  */
1148
1148
  "vertical-align": [{
1149
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", b]
1149
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", y]
1150
1150
  }],
1151
1151
  /**
1152
1152
  * Whitespace
@@ -1174,7 +1174,7 @@ const k = (e) => {
1174
1174
  * @see https://tailwindcss.com/docs/content
1175
1175
  */
1176
1176
  content: [{
1177
- content: ["none", b]
1177
+ content: ["none", y]
1178
1178
  }],
1179
1179
  // Backgrounds
1180
1180
  /**
@@ -1197,7 +1197,7 @@ const k = (e) => {
1197
1197
  * @see https://tailwindcss.com/docs/background-opacity
1198
1198
  */
1199
1199
  "bg-opacity": [{
1200
- "bg-opacity": [v]
1200
+ "bg-opacity": [N]
1201
1201
  }],
1202
1202
  /**
1203
1203
  * Background Origin
@@ -1211,7 +1211,7 @@ const k = (e) => {
1211
1211
  * @see https://tailwindcss.com/docs/background-position
1212
1212
  */
1213
1213
  "bg-position": [{
1214
- bg: [...X(), $t]
1214
+ bg: [...Ie(), Kt]
1215
1215
  }],
1216
1216
  /**
1217
1217
  * Background Repeat
@@ -1227,7 +1227,7 @@ const k = (e) => {
1227
1227
  * @see https://tailwindcss.com/docs/background-size
1228
1228
  */
1229
1229
  "bg-size": [{
1230
- bg: ["auto", "cover", "contain", Bt]
1230
+ bg: ["auto", "cover", "contain", _t]
1231
1231
  }],
1232
1232
  /**
1233
1233
  * Background Image
@@ -1236,7 +1236,7 @@ const k = (e) => {
1236
1236
  "bg-image": [{
1237
1237
  bg: ["none", {
1238
1238
  "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1239
- }, Jt]
1239
+ }, Ut]
1240
1240
  }],
1241
1241
  /**
1242
1242
  * Background Color
@@ -1250,42 +1250,42 @@ const k = (e) => {
1250
1250
  * @see https://tailwindcss.com/docs/gradient-color-stops
1251
1251
  */
1252
1252
  "gradient-from-pos": [{
1253
- from: [y]
1253
+ from: [v]
1254
1254
  }],
1255
1255
  /**
1256
1256
  * Gradient Color Stops Via Position
1257
1257
  * @see https://tailwindcss.com/docs/gradient-color-stops
1258
1258
  */
1259
1259
  "gradient-via-pos": [{
1260
- via: [y]
1260
+ via: [v]
1261
1261
  }],
1262
1262
  /**
1263
1263
  * Gradient Color Stops To Position
1264
1264
  * @see https://tailwindcss.com/docs/gradient-color-stops
1265
1265
  */
1266
1266
  "gradient-to-pos": [{
1267
- to: [y]
1267
+ to: [v]
1268
1268
  }],
1269
1269
  /**
1270
1270
  * Gradient Color Stops From
1271
1271
  * @see https://tailwindcss.com/docs/gradient-color-stops
1272
1272
  */
1273
1273
  "gradient-from": [{
1274
- from: [S]
1274
+ from: [w]
1275
1275
  }],
1276
1276
  /**
1277
1277
  * Gradient Color Stops Via
1278
1278
  * @see https://tailwindcss.com/docs/gradient-color-stops
1279
1279
  */
1280
1280
  "gradient-via": [{
1281
- via: [S]
1281
+ via: [w]
1282
1282
  }],
1283
1283
  /**
1284
1284
  * Gradient Color Stops To
1285
1285
  * @see https://tailwindcss.com/docs/gradient-color-stops
1286
1286
  */
1287
1287
  "gradient-to": [{
1288
- to: [S]
1288
+ to: [w]
1289
1289
  }],
1290
1290
  // Borders
1291
1291
  /**
@@ -1398,84 +1398,84 @@ const k = (e) => {
1398
1398
  * @see https://tailwindcss.com/docs/border-width
1399
1399
  */
1400
1400
  "border-w": [{
1401
- border: [c]
1401
+ border: [l]
1402
1402
  }],
1403
1403
  /**
1404
1404
  * Border Width X
1405
1405
  * @see https://tailwindcss.com/docs/border-width
1406
1406
  */
1407
1407
  "border-w-x": [{
1408
- "border-x": [c]
1408
+ "border-x": [l]
1409
1409
  }],
1410
1410
  /**
1411
1411
  * Border Width Y
1412
1412
  * @see https://tailwindcss.com/docs/border-width
1413
1413
  */
1414
1414
  "border-w-y": [{
1415
- "border-y": [c]
1415
+ "border-y": [l]
1416
1416
  }],
1417
1417
  /**
1418
1418
  * Border Width Start
1419
1419
  * @see https://tailwindcss.com/docs/border-width
1420
1420
  */
1421
1421
  "border-w-s": [{
1422
- "border-s": [c]
1422
+ "border-s": [l]
1423
1423
  }],
1424
1424
  /**
1425
1425
  * Border Width End
1426
1426
  * @see https://tailwindcss.com/docs/border-width
1427
1427
  */
1428
1428
  "border-w-e": [{
1429
- "border-e": [c]
1429
+ "border-e": [l]
1430
1430
  }],
1431
1431
  /**
1432
1432
  * Border Width Top
1433
1433
  * @see https://tailwindcss.com/docs/border-width
1434
1434
  */
1435
1435
  "border-w-t": [{
1436
- "border-t": [c]
1436
+ "border-t": [l]
1437
1437
  }],
1438
1438
  /**
1439
1439
  * Border Width Right
1440
1440
  * @see https://tailwindcss.com/docs/border-width
1441
1441
  */
1442
1442
  "border-w-r": [{
1443
- "border-r": [c]
1443
+ "border-r": [l]
1444
1444
  }],
1445
1445
  /**
1446
1446
  * Border Width Bottom
1447
1447
  * @see https://tailwindcss.com/docs/border-width
1448
1448
  */
1449
1449
  "border-w-b": [{
1450
- "border-b": [c]
1450
+ "border-b": [l]
1451
1451
  }],
1452
1452
  /**
1453
1453
  * Border Width Left
1454
1454
  * @see https://tailwindcss.com/docs/border-width
1455
1455
  */
1456
1456
  "border-w-l": [{
1457
- "border-l": [c]
1457
+ "border-l": [l]
1458
1458
  }],
1459
1459
  /**
1460
1460
  * Border Opacity
1461
1461
  * @see https://tailwindcss.com/docs/border-opacity
1462
1462
  */
1463
1463
  "border-opacity": [{
1464
- "border-opacity": [v]
1464
+ "border-opacity": [N]
1465
1465
  }],
1466
1466
  /**
1467
1467
  * Border Style
1468
1468
  * @see https://tailwindcss.com/docs/border-style
1469
1469
  */
1470
1470
  "border-style": [{
1471
- border: [...K(), "hidden"]
1471
+ border: [...te(), "hidden"]
1472
1472
  }],
1473
1473
  /**
1474
1474
  * Divide Width X
1475
1475
  * @see https://tailwindcss.com/docs/divide-width
1476
1476
  */
1477
1477
  "divide-x": [{
1478
- "divide-x": [c]
1478
+ "divide-x": [l]
1479
1479
  }],
1480
1480
  /**
1481
1481
  * Divide Width X Reverse
@@ -1487,7 +1487,7 @@ const k = (e) => {
1487
1487
  * @see https://tailwindcss.com/docs/divide-width
1488
1488
  */
1489
1489
  "divide-y": [{
1490
- "divide-y": [c]
1490
+ "divide-y": [l]
1491
1491
  }],
1492
1492
  /**
1493
1493
  * Divide Width Y Reverse
@@ -1499,105 +1499,105 @@ const k = (e) => {
1499
1499
  * @see https://tailwindcss.com/docs/divide-opacity
1500
1500
  */
1501
1501
  "divide-opacity": [{
1502
- "divide-opacity": [v]
1502
+ "divide-opacity": [N]
1503
1503
  }],
1504
1504
  /**
1505
1505
  * Divide Style
1506
1506
  * @see https://tailwindcss.com/docs/divide-style
1507
1507
  */
1508
1508
  "divide-style": [{
1509
- divide: K()
1509
+ divide: te()
1510
1510
  }],
1511
1511
  /**
1512
1512
  * Border Color
1513
1513
  * @see https://tailwindcss.com/docs/border-color
1514
1514
  */
1515
1515
  "border-color": [{
1516
- border: [o]
1516
+ border: [a]
1517
1517
  }],
1518
1518
  /**
1519
1519
  * Border Color X
1520
1520
  * @see https://tailwindcss.com/docs/border-color
1521
1521
  */
1522
1522
  "border-color-x": [{
1523
- "border-x": [o]
1523
+ "border-x": [a]
1524
1524
  }],
1525
1525
  /**
1526
1526
  * Border Color Y
1527
1527
  * @see https://tailwindcss.com/docs/border-color
1528
1528
  */
1529
1529
  "border-color-y": [{
1530
- "border-y": [o]
1530
+ "border-y": [a]
1531
1531
  }],
1532
1532
  /**
1533
1533
  * Border Color S
1534
1534
  * @see https://tailwindcss.com/docs/border-color
1535
1535
  */
1536
1536
  "border-color-s": [{
1537
- "border-s": [o]
1537
+ "border-s": [a]
1538
1538
  }],
1539
1539
  /**
1540
1540
  * Border Color E
1541
1541
  * @see https://tailwindcss.com/docs/border-color
1542
1542
  */
1543
1543
  "border-color-e": [{
1544
- "border-e": [o]
1544
+ "border-e": [a]
1545
1545
  }],
1546
1546
  /**
1547
1547
  * Border Color Top
1548
1548
  * @see https://tailwindcss.com/docs/border-color
1549
1549
  */
1550
1550
  "border-color-t": [{
1551
- "border-t": [o]
1551
+ "border-t": [a]
1552
1552
  }],
1553
1553
  /**
1554
1554
  * Border Color Right
1555
1555
  * @see https://tailwindcss.com/docs/border-color
1556
1556
  */
1557
1557
  "border-color-r": [{
1558
- "border-r": [o]
1558
+ "border-r": [a]
1559
1559
  }],
1560
1560
  /**
1561
1561
  * Border Color Bottom
1562
1562
  * @see https://tailwindcss.com/docs/border-color
1563
1563
  */
1564
1564
  "border-color-b": [{
1565
- "border-b": [o]
1565
+ "border-b": [a]
1566
1566
  }],
1567
1567
  /**
1568
1568
  * Border Color Left
1569
1569
  * @see https://tailwindcss.com/docs/border-color
1570
1570
  */
1571
1571
  "border-color-l": [{
1572
- "border-l": [o]
1572
+ "border-l": [a]
1573
1573
  }],
1574
1574
  /**
1575
1575
  * Divide Color
1576
1576
  * @see https://tailwindcss.com/docs/divide-color
1577
1577
  */
1578
1578
  "divide-color": [{
1579
- divide: [o]
1579
+ divide: [a]
1580
1580
  }],
1581
1581
  /**
1582
1582
  * Outline Style
1583
1583
  * @see https://tailwindcss.com/docs/outline-style
1584
1584
  */
1585
1585
  "outline-style": [{
1586
- outline: ["", ...K()]
1586
+ outline: ["", ...te()]
1587
1587
  }],
1588
1588
  /**
1589
1589
  * Outline Offset
1590
1590
  * @see https://tailwindcss.com/docs/outline-offset
1591
1591
  */
1592
1592
  "outline-offset": [{
1593
- "outline-offset": [$, b]
1593
+ "outline-offset": [F, y]
1594
1594
  }],
1595
1595
  /**
1596
1596
  * Outline Width
1597
1597
  * @see https://tailwindcss.com/docs/outline-width
1598
1598
  */
1599
1599
  "outline-w": [{
1600
- outline: [$, U]
1600
+ outline: [F, G]
1601
1601
  }],
1602
1602
  /**
1603
1603
  * Outline Color
@@ -1611,7 +1611,7 @@ const k = (e) => {
1611
1611
  * @see https://tailwindcss.com/docs/ring-width
1612
1612
  */
1613
1613
  "ring-w": [{
1614
- ring: f()
1614
+ ring: ke()
1615
1615
  }],
1616
1616
  /**
1617
1617
  * Ring Width Inset
@@ -1630,14 +1630,14 @@ const k = (e) => {
1630
1630
  * @see https://tailwindcss.com/docs/ring-opacity
1631
1631
  */
1632
1632
  "ring-opacity": [{
1633
- "ring-opacity": [v]
1633
+ "ring-opacity": [N]
1634
1634
  }],
1635
1635
  /**
1636
1636
  * Ring Offset Width
1637
1637
  * @see https://tailwindcss.com/docs/ring-offset-width
1638
1638
  */
1639
1639
  "ring-offset-w": [{
1640
- "ring-offset": [$, U]
1640
+ "ring-offset": [F, G]
1641
1641
  }],
1642
1642
  /**
1643
1643
  * Ring Offset Color
@@ -1652,35 +1652,35 @@ const k = (e) => {
1652
1652
  * @see https://tailwindcss.com/docs/box-shadow
1653
1653
  */
1654
1654
  shadow: [{
1655
- shadow: ["", "inner", "none", W, Ut]
1655
+ shadow: ["", "inner", "none", V, Wt]
1656
1656
  }],
1657
1657
  /**
1658
1658
  * Box Shadow Color
1659
1659
  * @see https://tailwindcss.com/docs/box-shadow-color
1660
1660
  */
1661
1661
  "shadow-color": [{
1662
- shadow: [te]
1662
+ shadow: [Z]
1663
1663
  }],
1664
1664
  /**
1665
1665
  * Opacity
1666
1666
  * @see https://tailwindcss.com/docs/opacity
1667
1667
  */
1668
1668
  opacity: [{
1669
- opacity: [v]
1669
+ opacity: [N]
1670
1670
  }],
1671
1671
  /**
1672
1672
  * Mix Blend Mode
1673
1673
  * @see https://tailwindcss.com/docs/mix-blend-mode
1674
1674
  */
1675
1675
  "mix-blend": [{
1676
- "mix-blend": [...Ce(), "plus-lighter", "plus-darker"]
1676
+ "mix-blend": [...Se(), "plus-lighter", "plus-darker"]
1677
1677
  }],
1678
1678
  /**
1679
1679
  * Background Blend Mode
1680
1680
  * @see https://tailwindcss.com/docs/background-blend-mode
1681
1681
  */
1682
1682
  "bg-blend": [{
1683
- "bg-blend": Ce()
1683
+ "bg-blend": Se()
1684
1684
  }],
1685
1685
  // Filters
1686
1686
  /**
@@ -1703,56 +1703,56 @@ const k = (e) => {
1703
1703
  * @see https://tailwindcss.com/docs/brightness
1704
1704
  */
1705
1705
  brightness: [{
1706
- brightness: [a]
1706
+ brightness: [o]
1707
1707
  }],
1708
1708
  /**
1709
1709
  * Contrast
1710
1710
  * @see https://tailwindcss.com/docs/contrast
1711
1711
  */
1712
1712
  contrast: [{
1713
- contrast: [m]
1713
+ contrast: [h]
1714
1714
  }],
1715
1715
  /**
1716
1716
  * Drop Shadow
1717
1717
  * @see https://tailwindcss.com/docs/drop-shadow
1718
1718
  */
1719
1719
  "drop-shadow": [{
1720
- "drop-shadow": ["", "none", W, b]
1720
+ "drop-shadow": ["", "none", V, y]
1721
1721
  }],
1722
1722
  /**
1723
1723
  * Grayscale
1724
1724
  * @see https://tailwindcss.com/docs/grayscale
1725
1725
  */
1726
1726
  grayscale: [{
1727
- grayscale: [d]
1727
+ grayscale: [m]
1728
1728
  }],
1729
1729
  /**
1730
1730
  * Hue Rotate
1731
1731
  * @see https://tailwindcss.com/docs/hue-rotate
1732
1732
  */
1733
1733
  "hue-rotate": [{
1734
- "hue-rotate": [g]
1734
+ "hue-rotate": [d]
1735
1735
  }],
1736
1736
  /**
1737
1737
  * Invert
1738
1738
  * @see https://tailwindcss.com/docs/invert
1739
1739
  */
1740
1740
  invert: [{
1741
- invert: [N]
1741
+ invert: [f]
1742
1742
  }],
1743
1743
  /**
1744
1744
  * Saturate
1745
1745
  * @see https://tailwindcss.com/docs/saturate
1746
1746
  */
1747
1747
  saturate: [{
1748
- saturate: [u]
1748
+ saturate: [A]
1749
1749
  }],
1750
1750
  /**
1751
1751
  * Sepia
1752
1752
  * @see https://tailwindcss.com/docs/sepia
1753
1753
  */
1754
1754
  sepia: [{
1755
- sepia: [O]
1755
+ sepia: [j]
1756
1756
  }],
1757
1757
  /**
1758
1758
  * Backdrop Filter
@@ -1774,56 +1774,56 @@ const k = (e) => {
1774
1774
  * @see https://tailwindcss.com/docs/backdrop-brightness
1775
1775
  */
1776
1776
  "backdrop-brightness": [{
1777
- "backdrop-brightness": [a]
1777
+ "backdrop-brightness": [o]
1778
1778
  }],
1779
1779
  /**
1780
1780
  * Backdrop Contrast
1781
1781
  * @see https://tailwindcss.com/docs/backdrop-contrast
1782
1782
  */
1783
1783
  "backdrop-contrast": [{
1784
- "backdrop-contrast": [m]
1784
+ "backdrop-contrast": [h]
1785
1785
  }],
1786
1786
  /**
1787
1787
  * Backdrop Grayscale
1788
1788
  * @see https://tailwindcss.com/docs/backdrop-grayscale
1789
1789
  */
1790
1790
  "backdrop-grayscale": [{
1791
- "backdrop-grayscale": [d]
1791
+ "backdrop-grayscale": [m]
1792
1792
  }],
1793
1793
  /**
1794
1794
  * Backdrop Hue Rotate
1795
1795
  * @see https://tailwindcss.com/docs/backdrop-hue-rotate
1796
1796
  */
1797
1797
  "backdrop-hue-rotate": [{
1798
- "backdrop-hue-rotate": [g]
1798
+ "backdrop-hue-rotate": [d]
1799
1799
  }],
1800
1800
  /**
1801
1801
  * Backdrop Invert
1802
1802
  * @see https://tailwindcss.com/docs/backdrop-invert
1803
1803
  */
1804
1804
  "backdrop-invert": [{
1805
- "backdrop-invert": [N]
1805
+ "backdrop-invert": [f]
1806
1806
  }],
1807
1807
  /**
1808
1808
  * Backdrop Opacity
1809
1809
  * @see https://tailwindcss.com/docs/backdrop-opacity
1810
1810
  */
1811
1811
  "backdrop-opacity": [{
1812
- "backdrop-opacity": [v]
1812
+ "backdrop-opacity": [N]
1813
1813
  }],
1814
1814
  /**
1815
1815
  * Backdrop Saturate
1816
1816
  * @see https://tailwindcss.com/docs/backdrop-saturate
1817
1817
  */
1818
1818
  "backdrop-saturate": [{
1819
- "backdrop-saturate": [u]
1819
+ "backdrop-saturate": [A]
1820
1820
  }],
1821
1821
  /**
1822
1822
  * Backdrop Sepia
1823
1823
  * @see https://tailwindcss.com/docs/backdrop-sepia
1824
1824
  */
1825
1825
  "backdrop-sepia": [{
1826
- "backdrop-sepia": [O]
1826
+ "backdrop-sepia": [j]
1827
1827
  }],
1828
1828
  // Tables
1829
1829
  /**
@@ -1874,35 +1874,35 @@ const k = (e) => {
1874
1874
  * @see https://tailwindcss.com/docs/transition-property
1875
1875
  */
1876
1876
  transition: [{
1877
- transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", b]
1877
+ transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", y]
1878
1878
  }],
1879
1879
  /**
1880
1880
  * Transition Duration
1881
1881
  * @see https://tailwindcss.com/docs/transition-duration
1882
1882
  */
1883
1883
  duration: [{
1884
- duration: B()
1884
+ duration: q()
1885
1885
  }],
1886
1886
  /**
1887
1887
  * Transition Timing Function
1888
1888
  * @see https://tailwindcss.com/docs/transition-timing-function
1889
1889
  */
1890
1890
  ease: [{
1891
- ease: ["linear", "in", "out", "in-out", b]
1891
+ ease: ["linear", "in", "out", "in-out", y]
1892
1892
  }],
1893
1893
  /**
1894
1894
  * Transition Delay
1895
1895
  * @see https://tailwindcss.com/docs/transition-delay
1896
1896
  */
1897
1897
  delay: [{
1898
- delay: B()
1898
+ delay: q()
1899
1899
  }],
1900
1900
  /**
1901
1901
  * Animation
1902
1902
  * @see https://tailwindcss.com/docs/animation
1903
1903
  */
1904
1904
  animate: [{
1905
- animate: ["none", "spin", "ping", "pulse", "bounce", b]
1905
+ animate: ["none", "spin", "ping", "pulse", "bounce", y]
1906
1906
  }],
1907
1907
  // Transforms
1908
1908
  /**
@@ -1917,63 +1917,63 @@ const k = (e) => {
1917
1917
  * @see https://tailwindcss.com/docs/scale
1918
1918
  */
1919
1919
  scale: [{
1920
- scale: [A]
1920
+ scale: [u]
1921
1921
  }],
1922
1922
  /**
1923
1923
  * Scale X
1924
1924
  * @see https://tailwindcss.com/docs/scale
1925
1925
  */
1926
1926
  "scale-x": [{
1927
- "scale-x": [A]
1927
+ "scale-x": [u]
1928
1928
  }],
1929
1929
  /**
1930
1930
  * Scale Y
1931
1931
  * @see https://tailwindcss.com/docs/scale
1932
1932
  */
1933
1933
  "scale-y": [{
1934
- "scale-y": [A]
1934
+ "scale-y": [u]
1935
1935
  }],
1936
1936
  /**
1937
1937
  * Rotate
1938
1938
  * @see https://tailwindcss.com/docs/rotate
1939
1939
  */
1940
1940
  rotate: [{
1941
- rotate: [ee, b]
1941
+ rotate: [X, y]
1942
1942
  }],
1943
1943
  /**
1944
1944
  * Translate X
1945
1945
  * @see https://tailwindcss.com/docs/translate
1946
1946
  */
1947
1947
  "translate-x": [{
1948
- "translate-x": [F]
1948
+ "translate-x": [P]
1949
1949
  }],
1950
1950
  /**
1951
1951
  * Translate Y
1952
1952
  * @see https://tailwindcss.com/docs/translate
1953
1953
  */
1954
1954
  "translate-y": [{
1955
- "translate-y": [F]
1955
+ "translate-y": [P]
1956
1956
  }],
1957
1957
  /**
1958
1958
  * Skew X
1959
1959
  * @see https://tailwindcss.com/docs/skew
1960
1960
  */
1961
1961
  "skew-x": [{
1962
- "skew-x": [_]
1962
+ "skew-x": [$]
1963
1963
  }],
1964
1964
  /**
1965
1965
  * Skew Y
1966
1966
  * @see https://tailwindcss.com/docs/skew
1967
1967
  */
1968
1968
  "skew-y": [{
1969
- "skew-y": [_]
1969
+ "skew-y": [$]
1970
1970
  }],
1971
1971
  /**
1972
1972
  * Transform Origin
1973
1973
  * @see https://tailwindcss.com/docs/transform-origin
1974
1974
  */
1975
1975
  "transform-origin": [{
1976
- origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", b]
1976
+ origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", y]
1977
1977
  }],
1978
1978
  // Interactivity
1979
1979
  /**
@@ -1995,7 +1995,7 @@ const k = (e) => {
1995
1995
  * @see https://tailwindcss.com/docs/cursor
1996
1996
  */
1997
1997
  cursor: [{
1998
- cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", b]
1998
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", y]
1999
1999
  }],
2000
2000
  /**
2001
2001
  * Caret Color
@@ -2030,126 +2030,126 @@ const k = (e) => {
2030
2030
  * @see https://tailwindcss.com/docs/scroll-margin
2031
2031
  */
2032
2032
  "scroll-m": [{
2033
- "scroll-m": w()
2033
+ "scroll-m": k()
2034
2034
  }],
2035
2035
  /**
2036
2036
  * Scroll Margin X
2037
2037
  * @see https://tailwindcss.com/docs/scroll-margin
2038
2038
  */
2039
2039
  "scroll-mx": [{
2040
- "scroll-mx": w()
2040
+ "scroll-mx": k()
2041
2041
  }],
2042
2042
  /**
2043
2043
  * Scroll Margin Y
2044
2044
  * @see https://tailwindcss.com/docs/scroll-margin
2045
2045
  */
2046
2046
  "scroll-my": [{
2047
- "scroll-my": w()
2047
+ "scroll-my": k()
2048
2048
  }],
2049
2049
  /**
2050
2050
  * Scroll Margin Start
2051
2051
  * @see https://tailwindcss.com/docs/scroll-margin
2052
2052
  */
2053
2053
  "scroll-ms": [{
2054
- "scroll-ms": w()
2054
+ "scroll-ms": k()
2055
2055
  }],
2056
2056
  /**
2057
2057
  * Scroll Margin End
2058
2058
  * @see https://tailwindcss.com/docs/scroll-margin
2059
2059
  */
2060
2060
  "scroll-me": [{
2061
- "scroll-me": w()
2061
+ "scroll-me": k()
2062
2062
  }],
2063
2063
  /**
2064
2064
  * Scroll Margin Top
2065
2065
  * @see https://tailwindcss.com/docs/scroll-margin
2066
2066
  */
2067
2067
  "scroll-mt": [{
2068
- "scroll-mt": w()
2068
+ "scroll-mt": k()
2069
2069
  }],
2070
2070
  /**
2071
2071
  * Scroll Margin Right
2072
2072
  * @see https://tailwindcss.com/docs/scroll-margin
2073
2073
  */
2074
2074
  "scroll-mr": [{
2075
- "scroll-mr": w()
2075
+ "scroll-mr": k()
2076
2076
  }],
2077
2077
  /**
2078
2078
  * Scroll Margin Bottom
2079
2079
  * @see https://tailwindcss.com/docs/scroll-margin
2080
2080
  */
2081
2081
  "scroll-mb": [{
2082
- "scroll-mb": w()
2082
+ "scroll-mb": k()
2083
2083
  }],
2084
2084
  /**
2085
2085
  * Scroll Margin Left
2086
2086
  * @see https://tailwindcss.com/docs/scroll-margin
2087
2087
  */
2088
2088
  "scroll-ml": [{
2089
- "scroll-ml": w()
2089
+ "scroll-ml": k()
2090
2090
  }],
2091
2091
  /**
2092
2092
  * Scroll Padding
2093
2093
  * @see https://tailwindcss.com/docs/scroll-padding
2094
2094
  */
2095
2095
  "scroll-p": [{
2096
- "scroll-p": w()
2096
+ "scroll-p": k()
2097
2097
  }],
2098
2098
  /**
2099
2099
  * Scroll Padding X
2100
2100
  * @see https://tailwindcss.com/docs/scroll-padding
2101
2101
  */
2102
2102
  "scroll-px": [{
2103
- "scroll-px": w()
2103
+ "scroll-px": k()
2104
2104
  }],
2105
2105
  /**
2106
2106
  * Scroll Padding Y
2107
2107
  * @see https://tailwindcss.com/docs/scroll-padding
2108
2108
  */
2109
2109
  "scroll-py": [{
2110
- "scroll-py": w()
2110
+ "scroll-py": k()
2111
2111
  }],
2112
2112
  /**
2113
2113
  * Scroll Padding Start
2114
2114
  * @see https://tailwindcss.com/docs/scroll-padding
2115
2115
  */
2116
2116
  "scroll-ps": [{
2117
- "scroll-ps": w()
2117
+ "scroll-ps": k()
2118
2118
  }],
2119
2119
  /**
2120
2120
  * Scroll Padding End
2121
2121
  * @see https://tailwindcss.com/docs/scroll-padding
2122
2122
  */
2123
2123
  "scroll-pe": [{
2124
- "scroll-pe": w()
2124
+ "scroll-pe": k()
2125
2125
  }],
2126
2126
  /**
2127
2127
  * Scroll Padding Top
2128
2128
  * @see https://tailwindcss.com/docs/scroll-padding
2129
2129
  */
2130
2130
  "scroll-pt": [{
2131
- "scroll-pt": w()
2131
+ "scroll-pt": k()
2132
2132
  }],
2133
2133
  /**
2134
2134
  * Scroll Padding Right
2135
2135
  * @see https://tailwindcss.com/docs/scroll-padding
2136
2136
  */
2137
2137
  "scroll-pr": [{
2138
- "scroll-pr": w()
2138
+ "scroll-pr": k()
2139
2139
  }],
2140
2140
  /**
2141
2141
  * Scroll Padding Bottom
2142
2142
  * @see https://tailwindcss.com/docs/scroll-padding
2143
2143
  */
2144
2144
  "scroll-pb": [{
2145
- "scroll-pb": w()
2145
+ "scroll-pb": k()
2146
2146
  }],
2147
2147
  /**
2148
2148
  * Scroll Padding Left
2149
2149
  * @see https://tailwindcss.com/docs/scroll-padding
2150
2150
  */
2151
2151
  "scroll-pl": [{
2152
- "scroll-pl": w()
2152
+ "scroll-pl": k()
2153
2153
  }],
2154
2154
  /**
2155
2155
  * Scroll Snap Align
@@ -2217,7 +2217,7 @@ const k = (e) => {
2217
2217
  * @see https://tailwindcss.com/docs/will-change
2218
2218
  */
2219
2219
  "will-change": [{
2220
- "will-change": ["auto", "scroll", "contents", "transform", b]
2220
+ "will-change": ["auto", "scroll", "contents", "transform", y]
2221
2221
  }],
2222
2222
  // SVG
2223
2223
  /**
@@ -2232,7 +2232,7 @@ const k = (e) => {
2232
2232
  * @see https://tailwindcss.com/docs/stroke-width
2233
2233
  */
2234
2234
  "stroke-w": [{
2235
- stroke: [$, U, ie]
2235
+ stroke: [F, G, ie]
2236
2236
  }],
2237
2237
  /**
2238
2238
  * Stroke
@@ -2307,33 +2307,26 @@ const k = (e) => {
2307
2307
  "font-size": ["leading"]
2308
2308
  }
2309
2309
  };
2310
- }, Zt = /* @__PURE__ */ Rt(Xt);
2310
+ }, Yt = /* @__PURE__ */ Et(Qt);
2311
2311
  function C(...e) {
2312
- return Zt(Me(e));
2312
+ return Yt(Fe(e));
2313
2313
  }
2314
- const Qt = Fe(
2315
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover-elevate active-elevate-2",
2314
+ const er = Be(
2315
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
2316
2316
  {
2317
2317
  variants: {
2318
2318
  variant: {
2319
- default: "bg-primary text-primary-foreground border border-primary-border",
2320
- destructive: "bg-destructive text-destructive-foreground border border-destructive-border",
2321
- outline: (
2322
- // Shows the background color of whatever card / sidebar / accent background it is inside of.
2323
- // Inherits the current text color.
2324
- " border [border-color:var(--button-outline)] shadow-xs active:shadow-none "
2325
- ),
2326
- secondary: "border bg-secondary text-secondary-foreground border border-secondary-border ",
2327
- // Add a transparent border so that when someone toggles a border on later, it doesn't shift layout/size.
2328
- ghost: "border border-transparent"
2319
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
2320
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
2321
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
2322
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
2323
+ ghost: "hover:bg-accent hover:text-accent-foreground",
2324
+ link: "text-primary underline-offset-4 hover:underline"
2329
2325
  },
2330
- // Heights are set as "min" heights, because sometimes Ai will place large amount of content
2331
- // inside buttons. With a min-height they will look appropriate with small amounts of content,
2332
- // but will expand to fit large amounts of content.
2333
2326
  size: {
2334
- default: "min-h-9 px-4 py-2",
2335
- sm: "min-h-8 rounded-md px-3 text-xs",
2336
- lg: "min-h-10 rounded-md px-8",
2327
+ default: "h-9 px-4 py-2",
2328
+ sm: "h-8 rounded-full px-3 text-xs",
2329
+ lg: "h-10 rounded-full px-8",
2337
2330
  icon: "h-9 w-9"
2338
2331
  }
2339
2332
  },
@@ -2342,63 +2335,167 @@ const Qt = Fe(
2342
2335
  size: "default"
2343
2336
  }
2344
2337
  }
2345
- ), R = I.forwardRef(
2346
- ({ className: e, variant: r, size: t, asChild: a = !1, ...o }, i) => /* @__PURE__ */ n(
2347
- a ? ot : "button",
2338
+ ), L = S.forwardRef(
2339
+ ({ className: e, variant: r, size: t, asChild: o = !1, ...a }, i) => /* @__PURE__ */ n(
2340
+ o ? it : "button",
2348
2341
  {
2349
- className: C(Qt({ variant: r, size: t, className: e })),
2342
+ className: C(er({ variant: r, size: t, className: e })),
2350
2343
  ref: i,
2351
- ...o
2344
+ ...a
2352
2345
  }
2353
2346
  )
2354
2347
  );
2355
- R.displayName = "Button";
2356
- const L = I.forwardRef(
2357
- ({ className: e, type: r, ...t }, a) => /* @__PURE__ */ n(
2348
+ L.displayName = "Button";
2349
+ const E = S.forwardRef(
2350
+ ({ className: e, type: r, ...t }, o) => /* @__PURE__ */ n(
2358
2351
  "input",
2359
2352
  {
2360
2353
  type: r,
2361
2354
  className: C(
2362
- "flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
2355
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
2363
2356
  e
2364
2357
  ),
2365
- ref: a,
2358
+ ref: o,
2366
2359
  ...t
2367
2360
  }
2368
2361
  )
2369
2362
  );
2370
- L.displayName = "Input";
2371
- const Yt = ne.Provider, er = ne.Root, tr = ne.Trigger, $e = I.forwardRef(({ className: e, sideOffset: r = 4, ...t }, a) => /* @__PURE__ */ n(
2372
- ne.Content,
2363
+ E.displayName = "Input";
2364
+ const tr = U.Provider, rr = U.Root, nr = U.Trigger, Je = S.forwardRef(({ className: e, sideOffset: r = 4, ...t }, o) => /* @__PURE__ */ n(U.Portal, { children: /* @__PURE__ */ n(
2365
+ U.Content,
2373
2366
  {
2374
- ref: a,
2367
+ ref: o,
2375
2368
  sideOffset: r,
2376
2369
  className: C(
2377
- "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",
2370
+ "z-50 overflow-hidden rounded-md bg-popover px-3 py-1.5 text-xs text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",
2378
2371
  e
2379
2372
  ),
2380
2373
  ...t
2381
2374
  }
2375
+ ) }));
2376
+ Je.displayName = U.Content.displayName;
2377
+ const de = z.Root, ce = z.Value, ne = S.forwardRef(({ className: e, children: r, ...t }, o) => /* @__PURE__ */ c(
2378
+ z.Trigger,
2379
+ {
2380
+ ref: o,
2381
+ className: C(
2382
+ "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
2383
+ e
2384
+ ),
2385
+ ...t,
2386
+ children: [
2387
+ r,
2388
+ /* @__PURE__ */ n(z.Icon, { asChild: !0, children: /* @__PURE__ */ n(ye, { className: "h-4 w-4 opacity-50" }) })
2389
+ ]
2390
+ }
2391
+ ));
2392
+ ne.displayName = z.Trigger.displayName;
2393
+ const Ue = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2394
+ z.ScrollUpButton,
2395
+ {
2396
+ ref: t,
2397
+ className: C(
2398
+ "flex cursor-default items-center justify-center py-1",
2399
+ e
2400
+ ),
2401
+ ...r,
2402
+ children: /* @__PURE__ */ n(st, { className: "h-4 w-4" })
2403
+ }
2404
+ ));
2405
+ Ue.displayName = z.ScrollUpButton.displayName;
2406
+ const We = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2407
+ z.ScrollDownButton,
2408
+ {
2409
+ ref: t,
2410
+ className: C(
2411
+ "flex cursor-default items-center justify-center py-1",
2412
+ e
2413
+ ),
2414
+ ...r,
2415
+ children: /* @__PURE__ */ n(ye, { className: "h-4 w-4" })
2416
+ }
2382
2417
  ));
2383
- $e.displayName = ne.Content.displayName;
2384
- const rr = D.Root, nr = D.Portal, _e = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2418
+ We.displayName = z.ScrollDownButton.displayName;
2419
+ const ae = S.forwardRef(({ className: e, children: r, position: t = "popper", ...o }, a) => /* @__PURE__ */ n(z.Portal, { children: /* @__PURE__ */ c(
2420
+ z.Content,
2421
+ {
2422
+ ref: a,
2423
+ className: C(
2424
+ "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
2425
+ t === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
2426
+ e
2427
+ ),
2428
+ position: t,
2429
+ ...o,
2430
+ children: [
2431
+ /* @__PURE__ */ n(Ue, {}),
2432
+ /* @__PURE__ */ n(
2433
+ z.Viewport,
2434
+ {
2435
+ className: C(
2436
+ "p-1",
2437
+ t === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
2438
+ ),
2439
+ children: r
2440
+ }
2441
+ ),
2442
+ /* @__PURE__ */ n(We, {})
2443
+ ]
2444
+ }
2445
+ ) }));
2446
+ ae.displayName = z.Content.displayName;
2447
+ const ar = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2448
+ z.Label,
2449
+ {
2450
+ ref: t,
2451
+ className: C("px-2 py-1.5 text-sm font-semibold", e),
2452
+ ...r
2453
+ }
2454
+ ));
2455
+ ar.displayName = z.Label.displayName;
2456
+ const R = S.forwardRef(({ className: e, children: r, ...t }, o) => /* @__PURE__ */ c(
2457
+ z.Item,
2458
+ {
2459
+ ref: o,
2460
+ className: C(
2461
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2462
+ e
2463
+ ),
2464
+ ...t,
2465
+ children: [
2466
+ /* @__PURE__ */ n("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n(z.ItemIndicator, { children: /* @__PURE__ */ n(Oe, { className: "h-4 w-4" }) }) }),
2467
+ /* @__PURE__ */ n(z.ItemText, { children: r })
2468
+ ]
2469
+ }
2470
+ ));
2471
+ R.displayName = z.Item.displayName;
2472
+ const or = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2473
+ z.Separator,
2474
+ {
2475
+ ref: t,
2476
+ className: C("-mx-1 my-1 h-px bg-muted", e),
2477
+ ...r
2478
+ }
2479
+ ));
2480
+ or.displayName = z.Separator.displayName;
2481
+ const ir = D.Root, sr = D.Portal, He = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2385
2482
  D.Overlay,
2386
2483
  {
2387
2484
  ref: t,
2388
2485
  className: C(
2389
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
2486
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
2390
2487
  e
2391
2488
  ),
2392
2489
  ...r
2393
2490
  }
2394
2491
  ));
2395
- _e.displayName = D.Overlay.displayName;
2396
- const Je = I.forwardRef(({ className: e, children: r, ...t }, a) => /* @__PURE__ */ l(nr, { children: [
2397
- /* @__PURE__ */ n(_e, {}),
2398
- /* @__PURE__ */ l(
2492
+ He.displayName = D.Overlay.displayName;
2493
+ const Xe = S.forwardRef(({ className: e, children: r, ...t }, o) => /* @__PURE__ */ c(sr, { children: [
2494
+ /* @__PURE__ */ n(He, {}),
2495
+ /* @__PURE__ */ c(
2399
2496
  D.Content,
2400
2497
  {
2401
- ref: a,
2498
+ ref: o,
2402
2499
  className: C(
2403
2500
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
2404
2501
  e
@@ -2406,16 +2503,16 @@ const Je = I.forwardRef(({ className: e, children: r, ...t }, a) => /* @__PURE__
2406
2503
  ...t,
2407
2504
  children: [
2408
2505
  r,
2409
- /* @__PURE__ */ l(D.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
2410
- /* @__PURE__ */ n(at, { className: "h-4 w-4" }),
2506
+ /* @__PURE__ */ c(D.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
2507
+ /* @__PURE__ */ n(lt, { className: "h-4 w-4" }),
2411
2508
  /* @__PURE__ */ n("span", { className: "sr-only", children: "Close" })
2412
2509
  ] })
2413
2510
  ]
2414
2511
  }
2415
2512
  )
2416
2513
  ] }));
2417
- Je.displayName = D.Content.displayName;
2418
- const Ue = ({
2514
+ Xe.displayName = D.Content.displayName;
2515
+ const Ze = ({
2419
2516
  className: e,
2420
2517
  ...r
2421
2518
  }) => /* @__PURE__ */ n(
@@ -2428,8 +2525,8 @@ const Ue = ({
2428
2525
  ...r
2429
2526
  }
2430
2527
  );
2431
- Ue.displayName = "DialogHeader";
2432
- const We = ({
2528
+ Ze.displayName = "DialogHeader";
2529
+ const Qe = ({
2433
2530
  className: e,
2434
2531
  ...r
2435
2532
  }) => /* @__PURE__ */ n(
@@ -2442,8 +2539,8 @@ const We = ({
2442
2539
  ...r
2443
2540
  }
2444
2541
  );
2445
- We.displayName = "DialogFooter";
2446
- const Ke = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2542
+ Qe.displayName = "DialogFooter";
2543
+ const Ye = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2447
2544
  D.Title,
2448
2545
  {
2449
2546
  ref: t,
@@ -2454,8 +2551,8 @@ const Ke = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2454
2551
  ...r
2455
2552
  }
2456
2553
  ));
2457
- Ke.displayName = D.Title.displayName;
2458
- const or = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2554
+ Ye.displayName = D.Title.displayName;
2555
+ const lr = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2459
2556
  D.Description,
2460
2557
  {
2461
2558
  ref: t,
@@ -2463,146 +2560,42 @@ const or = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2463
2560
  ...r
2464
2561
  }
2465
2562
  ));
2466
- or.displayName = D.Description.displayName;
2467
- const ar = Fe(
2563
+ lr.displayName = D.Description.displayName;
2564
+ const dr = Be(
2468
2565
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
2469
- ), z = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2470
- qe.Root,
2471
- {
2472
- ref: t,
2473
- className: C(ar(), e),
2474
- ...r
2475
- }
2476
- ));
2477
- z.displayName = qe.Root.displayName;
2478
- const Ae = P.Root, je = P.Value, de = I.forwardRef(({ className: e, children: r, ...t }, a) => /* @__PURE__ */ l(
2479
- P.Trigger,
2480
- {
2481
- ref: a,
2482
- className: C(
2483
- "flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
2484
- e
2485
- ),
2486
- ...t,
2487
- children: [
2488
- r,
2489
- /* @__PURE__ */ n(P.Icon, { asChild: !0, children: /* @__PURE__ */ n(ye, { className: "h-4 w-4 opacity-50" }) })
2490
- ]
2491
- }
2492
- ));
2493
- de.displayName = P.Trigger.displayName;
2494
- const He = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2495
- P.ScrollUpButton,
2496
- {
2497
- ref: t,
2498
- className: C(
2499
- "flex cursor-default items-center justify-center py-1",
2500
- e
2501
- ),
2502
- ...r,
2503
- children: /* @__PURE__ */ n(it, { className: "h-4 w-4" })
2504
- }
2505
- ));
2506
- He.displayName = P.ScrollUpButton.displayName;
2507
- const Xe = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2508
- P.ScrollDownButton,
2509
- {
2510
- ref: t,
2511
- className: C(
2512
- "flex cursor-default items-center justify-center py-1",
2513
- e
2514
- ),
2515
- ...r,
2516
- children: /* @__PURE__ */ n(ye, { className: "h-4 w-4" })
2517
- }
2518
- ));
2519
- Xe.displayName = P.ScrollDownButton.displayName;
2520
- const ce = I.forwardRef(({ className: e, children: r, position: t = "popper", ...a }, o) => /* @__PURE__ */ n(P.Portal, { children: /* @__PURE__ */ l(
2521
- P.Content,
2522
- {
2523
- ref: o,
2524
- className: C(
2525
- "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
2526
- t === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
2527
- e
2528
- ),
2529
- position: t,
2530
- ...a,
2531
- children: [
2532
- /* @__PURE__ */ n(He, {}),
2533
- /* @__PURE__ */ n(
2534
- P.Viewport,
2535
- {
2536
- className: C(
2537
- "p-1",
2538
- t === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
2539
- ),
2540
- children: r
2541
- }
2542
- ),
2543
- /* @__PURE__ */ n(Xe, {})
2544
- ]
2545
- }
2546
- ) }));
2547
- ce.displayName = P.Content.displayName;
2548
- const ir = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2549
- P.Label,
2566
+ ), T = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2567
+ Me.Root,
2550
2568
  {
2551
2569
  ref: t,
2552
- className: C("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
2570
+ className: C(dr(), e),
2553
2571
  ...r
2554
2572
  }
2555
2573
  ));
2556
- ir.displayName = P.Label.displayName;
2557
- const j = I.forwardRef(({ className: e, children: r, ...t }, a) => /* @__PURE__ */ l(
2558
- P.Item,
2559
- {
2560
- ref: a,
2561
- className: C(
2562
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2563
- e
2564
- ),
2565
- ...t,
2566
- children: [
2567
- /* @__PURE__ */ n("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n(P.ItemIndicator, { children: /* @__PURE__ */ n(Re, { className: "h-4 w-4" }) }) }),
2568
- /* @__PURE__ */ n(P.ItemText, { children: r })
2569
- ]
2570
- }
2571
- ));
2572
- j.displayName = P.Item.displayName;
2573
- const sr = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2574
- P.Separator,
2575
- {
2576
- ref: t,
2577
- className: C("-mx-1 my-1 h-px bg-muted", e),
2578
- ...r
2579
- }
2580
- ));
2581
- sr.displayName = P.Separator.displayName;
2582
- const me = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2574
+ T.displayName = Me.Root.displayName;
2575
+ const me = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2583
2576
  se.Root,
2584
2577
  {
2585
2578
  ref: t,
2586
2579
  className: C(
2587
- "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
2580
+ "grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
2588
2581
  e
2589
2582
  ),
2590
2583
  ...r,
2591
2584
  children: /* @__PURE__ */ n(
2592
2585
  se.Indicator,
2593
2586
  {
2594
- className: C("flex items-center justify-center text-current"),
2595
- children: /* @__PURE__ */ n(Re, { className: "h-4 w-4" })
2587
+ className: C("grid place-content-center text-current"),
2588
+ children: /* @__PURE__ */ n(Oe, { className: "h-4 w-4" })
2596
2589
  }
2597
2590
  )
2598
2591
  }
2599
2592
  ));
2600
2593
  me.displayName = se.Root.displayName;
2601
- const xe = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2594
+ const xe = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2602
2595
  "textarea",
2603
2596
  {
2604
2597
  className: C(
2605
- "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
2598
+ "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
2606
2599
  e
2607
2600
  ),
2608
2601
  ref: t,
@@ -2610,7 +2603,7 @@ const xe = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
2610
2603
  }
2611
2604
  ));
2612
2605
  xe.displayName = "Textarea";
2613
- const lr = (e) => e.trim().toLowerCase().replace(/[^\w\s]/g, "").replace(/\s+/g, "_"), dr = (e, r, t = !1) => {
2606
+ const cr = (e) => e.trim().toLowerCase().replace(/[^\w\s]/g, "").replace(/\s+/g, "_"), mr = (e, r, t = !1, o = !1) => {
2614
2607
  const a = (m, d) => {
2615
2608
  r({ ...e, [m]: d });
2616
2609
  };
@@ -2620,12 +2613,12 @@ const lr = (e) => e.trim().toLowerCase().replace(/[^\w\s]/g, "").replace(/\s+/g,
2620
2613
  },
2621
2614
  handleTitleBlur: () => {
2622
2615
  if (t && e.title) {
2623
- const m = lr(e.title);
2616
+ const m = cr(e.title);
2624
2617
  a("key", m);
2625
2618
  }
2626
2619
  },
2627
2620
  handleKeyChange: (m) => {
2628
- t && a("key", m);
2621
+ (t || o) && a("key", m);
2629
2622
  },
2630
2623
  handleFieldChange: a,
2631
2624
  handleConstraintChange: (m, d) => {
@@ -2644,141 +2637,143 @@ const lr = (e) => e.trim().toLowerCase().replace(/[^\w\s]/g, "").replace(/\s+/g,
2644
2637
  array: "Array",
2645
2638
  null: "Null",
2646
2639
  file: "File"
2647
- }, Ze = tt({
2640
+ }, et = nt({
2648
2641
  getTypeLabel: (e) => ue[e],
2649
2642
  typeLabels: ue
2650
2643
  });
2651
- function cr({
2644
+ function ur({
2652
2645
  children: e,
2653
2646
  customLabels: r = {}
2654
2647
  }) {
2655
- const t = { ...ue, ...r }, a = (o) => t[o] || o;
2656
- return /* @__PURE__ */ n(Ze.Provider, { value: { getTypeLabel: a, typeLabels: t }, children: e });
2648
+ const t = { ...ue, ...r }, o = (a) => t[a] || a;
2649
+ return /* @__PURE__ */ n(et.Provider, { value: { getTypeLabel: o, typeLabels: t }, children: e });
2657
2650
  }
2658
- function Qe() {
2659
- return rt(Ze);
2651
+ function tt() {
2652
+ return at(et);
2660
2653
  }
2661
2654
  function pe({
2662
2655
  property: e,
2663
2656
  open: r,
2664
2657
  onOpenChange: t,
2665
- onUpdate: a,
2666
- isArrayItem: o = !1,
2658
+ onUpdate: o,
2659
+ isArrayItem: a = !1,
2667
2660
  isNewProperty: i = !1,
2668
2661
  propertyLabel: s = { singular: "Property", plural: "Properties" },
2669
- showRegex: c = !1
2662
+ showRegex: l = !1,
2663
+ keyEditable: h = !1
2670
2664
  }) {
2671
- var T;
2672
- const { typeLabels: m } = Qe(), [d, g] = V(e);
2665
+ var A;
2666
+ const { typeLabels: m } = tt(), [d, f] = B(e);
2673
2667
  be(() => {
2674
- r && g(e);
2668
+ r && f(e);
2675
2669
  }, [e, r]);
2676
2670
  const {
2677
- handleTitleChange: N,
2678
- handleTitleBlur: x,
2679
- handleKeyChange: S,
2680
- handleFieldChange: y,
2671
+ handleTitleChange: g,
2672
+ handleTitleBlur: w,
2673
+ handleKeyChange: v,
2674
+ handleFieldChange: x,
2681
2675
  handleConstraintChange: p
2682
- } = dr(d, g, i), h = () => {
2676
+ } = mr(d, f, i, h), N = () => {
2683
2677
  var u;
2684
- (u = d.title) != null && u.trim() && (a(d), t(!1));
2685
- }, v = () => {
2686
- g(e), t(!1);
2678
+ (u = d.title) != null && u.trim() && (o(d), t(!1));
2679
+ }, b = () => {
2680
+ f(e), t(!1);
2687
2681
  };
2688
- return /* @__PURE__ */ n(rr, { open: r, onOpenChange: t, children: /* @__PURE__ */ l(
2689
- Je,
2682
+ return /* @__PURE__ */ n(ir, { open: r, onOpenChange: t, children: /* @__PURE__ */ c(
2683
+ Xe,
2690
2684
  {
2691
2685
  className: "max-w-2xl max-h-[80vh] flex flex-col gap-0 p-0",
2692
2686
  "data-testid": "dialog-edit-property",
2693
2687
  children: [
2694
- /* @__PURE__ */ n(Ue, { className: "px-6 pt-6 pb-4 shrink-0", children: /* @__PURE__ */ n(Ke, { children: i ? `Add ${s.singular}` : `Edit ${s.singular}` }) }),
2695
- /* @__PURE__ */ l("div", { className: "space-y-6 px-6 pb-4 overflow-y-auto flex-1 min-h-0", children: [
2696
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2697
- /* @__PURE__ */ l(z, { className: "flex items-center gap-1.5", children: [
2688
+ /* @__PURE__ */ n(Ze, { className: "px-6 pt-6 pb-4 shrink-0", children: /* @__PURE__ */ n(Ye, { children: i ? `Add ${s.singular}` : `Edit ${s.singular}` }) }),
2689
+ /* @__PURE__ */ c("div", { className: "space-y-6 px-6 pb-4 overflow-y-auto flex-1 min-h-0", children: [
2690
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2691
+ /* @__PURE__ */ c(T, { className: "flex items-center gap-1.5", children: [
2698
2692
  /* @__PURE__ */ n("span", { className: "w-1.5 h-1.5 rounded-full bg-red-500" }),
2699
2693
  "Type"
2700
2694
  ] }),
2701
- /* @__PURE__ */ l(
2702
- Ae,
2695
+ /* @__PURE__ */ c(
2696
+ de,
2703
2697
  {
2704
2698
  value: d.type,
2705
- onValueChange: (u) => y("type", u),
2699
+ onValueChange: (u) => x("type", u),
2706
2700
  "data-testid": "select-type-dialog",
2707
2701
  children: [
2708
- /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(je, {}) }),
2709
- /* @__PURE__ */ l(ce, { children: [
2710
- /* @__PURE__ */ n(j, { value: "string", children: m.string }),
2711
- /* @__PURE__ */ n(j, { value: "number", children: m.number }),
2712
- /* @__PURE__ */ n(j, { value: "integer", children: m.integer }),
2713
- /* @__PURE__ */ n(j, { value: "boolean", children: m.boolean }),
2714
- /* @__PURE__ */ n(j, { value: "object", children: m.object }),
2715
- /* @__PURE__ */ n(j, { value: "array", children: m.array }),
2716
- /* @__PURE__ */ n(j, { value: "file", children: m.file }),
2717
- /* @__PURE__ */ n(j, { value: "null", children: m.null })
2702
+ /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(ce, {}) }),
2703
+ /* @__PURE__ */ c(ae, { children: [
2704
+ /* @__PURE__ */ n(R, { value: "string", children: m.string }),
2705
+ /* @__PURE__ */ n(R, { value: "number", children: m.number }),
2706
+ /* @__PURE__ */ n(R, { value: "integer", children: m.integer }),
2707
+ /* @__PURE__ */ n(R, { value: "boolean", children: m.boolean }),
2708
+ /* @__PURE__ */ n(R, { value: "object", children: m.object }),
2709
+ /* @__PURE__ */ n(R, { value: "array", children: m.array }),
2710
+ /* @__PURE__ */ n(R, { value: "file", children: m.file }),
2711
+ /* @__PURE__ */ n(R, { value: "null", children: m.null })
2718
2712
  ] })
2719
2713
  ]
2720
2714
  }
2721
2715
  )
2722
2716
  ] }),
2723
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2724
- /* @__PURE__ */ l(z, { className: "flex items-center gap-1.5", children: [
2717
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2718
+ /* @__PURE__ */ c(T, { className: "flex items-center gap-1.5", children: [
2725
2719
  /* @__PURE__ */ n("span", { className: "w-1.5 h-1.5 rounded-full bg-red-500" }),
2726
2720
  "Title"
2727
2721
  ] }),
2728
2722
  /* @__PURE__ */ n(
2729
- L,
2723
+ E,
2730
2724
  {
2731
2725
  value: d.title || "",
2732
- onChange: (u) => N(u.target.value),
2733
- onBlur: x,
2726
+ onChange: (u) => g(u.target.value),
2727
+ onBlur: w,
2734
2728
  placeholder: "Property Title",
2735
2729
  "data-testid": "input-title-dialog",
2736
2730
  required: !0
2737
2731
  }
2738
2732
  ),
2739
- !i && d.key && /* @__PURE__ */ l("p", { className: "text-xs text-muted-foreground font-mono", children: [
2733
+ !i && d.key && /* @__PURE__ */ c("p", { className: "text-xs text-muted-foreground font-mono", children: [
2740
2734
  "Key: ",
2741
2735
  d.key
2742
2736
  ] })
2743
2737
  ] }),
2744
- i && /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2745
- /* @__PURE__ */ n(z, { children: "Key" }),
2738
+ (i || h) && /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2739
+ /* @__PURE__ */ n(T, { children: "Key" }),
2746
2740
  /* @__PURE__ */ n(
2747
- L,
2741
+ E,
2748
2742
  {
2749
2743
  value: d.key,
2750
- onChange: (u) => S(u.target.value),
2744
+ onChange: (u) => v(u.target.value),
2751
2745
  placeholder: "property_key",
2752
2746
  "data-testid": "input-key-dialog"
2753
2747
  }
2754
- )
2748
+ ),
2749
+ !i && /* @__PURE__ */ n("p", { className: "text-xs text-yellow-600 dark:text-yellow-500", children: "⚠️ Changing the key may break existing references to this property" })
2755
2750
  ] }),
2756
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2757
- /* @__PURE__ */ n(z, { children: "Description" }),
2751
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2752
+ /* @__PURE__ */ n(T, { children: "Description" }),
2758
2753
  /* @__PURE__ */ n(
2759
2754
  xe,
2760
2755
  {
2761
2756
  placeholder: "Optional description",
2762
2757
  value: d.description || "",
2763
- onChange: (u) => y("description", u.target.value),
2758
+ onChange: (u) => x("description", u.target.value),
2764
2759
  rows: 2,
2765
2760
  "data-testid": "input-edit-description"
2766
2761
  }
2767
2762
  )
2768
2763
  ] }),
2769
- d.type === "array" && /* @__PURE__ */ l("div", { className: "space-y-2 border-l-2 border-border pl-4 mt-2", children: [
2770
- /* @__PURE__ */ l(z, { className: "font-semibold text-xs text-muted-foreground", children: [
2764
+ d.type === "array" && /* @__PURE__ */ c("div", { className: "space-y-2 border-l-2 border-border pl-4 mt-2", children: [
2765
+ /* @__PURE__ */ c(T, { className: "font-semibold text-xs text-muted-foreground", children: [
2771
2766
  m.array,
2772
2767
  " Items"
2773
2768
  ] }),
2774
- d.items ? /* @__PURE__ */ l("div", { className: "bg-muted/40 p-2 rounded", children: [
2775
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2776
- /* @__PURE__ */ n(z, { children: "Item Type" }),
2777
- /* @__PURE__ */ l(
2778
- Ae,
2769
+ d.items ? /* @__PURE__ */ c("div", { className: "bg-muted/40 p-2 rounded", children: [
2770
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2771
+ /* @__PURE__ */ n(T, { children: "Item Type" }),
2772
+ /* @__PURE__ */ c(
2773
+ de,
2779
2774
  {
2780
2775
  value: d.items.type,
2781
- onValueChange: (u) => g({
2776
+ onValueChange: (u) => f({
2782
2777
  ...d,
2783
2778
  items: {
2784
2779
  ...d.items,
@@ -2786,28 +2781,28 @@ function pe({
2786
2781
  }
2787
2782
  }),
2788
2783
  children: [
2789
- /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(je, {}) }),
2790
- /* @__PURE__ */ l(ce, { children: [
2791
- /* @__PURE__ */ n(j, { value: "string", children: m.string }),
2792
- /* @__PURE__ */ n(j, { value: "number", children: m.number }),
2793
- /* @__PURE__ */ n(j, { value: "integer", children: m.integer }),
2794
- /* @__PURE__ */ n(j, { value: "boolean", children: m.boolean }),
2795
- /* @__PURE__ */ n(j, { value: "object", children: m.object }),
2796
- /* @__PURE__ */ n(j, { value: "array", children: m.array }),
2797
- /* @__PURE__ */ n(j, { value: "file", children: m.file }),
2798
- /* @__PURE__ */ n(j, { value: "null", children: m.null })
2784
+ /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(ce, {}) }),
2785
+ /* @__PURE__ */ c(ae, { children: [
2786
+ /* @__PURE__ */ n(R, { value: "string", children: m.string }),
2787
+ /* @__PURE__ */ n(R, { value: "number", children: m.number }),
2788
+ /* @__PURE__ */ n(R, { value: "integer", children: m.integer }),
2789
+ /* @__PURE__ */ n(R, { value: "boolean", children: m.boolean }),
2790
+ /* @__PURE__ */ n(R, { value: "object", children: m.object }),
2791
+ /* @__PURE__ */ n(R, { value: "array", children: m.array }),
2792
+ /* @__PURE__ */ n(R, { value: "file", children: m.file }),
2793
+ /* @__PURE__ */ n(R, { value: "null", children: m.null })
2799
2794
  ] })
2800
2795
  ]
2801
2796
  }
2802
2797
  )
2803
2798
  ] }),
2804
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2805
- /* @__PURE__ */ n(z, { children: "Item Title" }),
2799
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2800
+ /* @__PURE__ */ n(T, { children: "Item Title" }),
2806
2801
  /* @__PURE__ */ n(
2807
- L,
2802
+ E,
2808
2803
  {
2809
2804
  value: d.items.title || "",
2810
- onChange: (u) => g({
2805
+ onChange: (u) => f({
2811
2806
  ...d,
2812
2807
  items: {
2813
2808
  ...d.items,
@@ -2818,13 +2813,13 @@ function pe({
2818
2813
  }
2819
2814
  )
2820
2815
  ] }),
2821
- /* @__PURE__ */ l(
2822
- R,
2816
+ /* @__PURE__ */ c(
2817
+ L,
2823
2818
  {
2824
2819
  variant: "ghost",
2825
2820
  size: "sm",
2826
2821
  className: "mt-2",
2827
- onClick: () => g({ ...d, items: void 0 }),
2822
+ onClick: () => f({ ...d, items: void 0 }),
2828
2823
  children: [
2829
2824
  "Remove ",
2830
2825
  m.array,
@@ -2832,13 +2827,13 @@ function pe({
2832
2827
  ]
2833
2828
  }
2834
2829
  )
2835
- ] }) : /* @__PURE__ */ l(
2836
- R,
2830
+ ] }) : /* @__PURE__ */ c(
2831
+ L,
2837
2832
  {
2838
2833
  variant: "outline",
2839
2834
  size: "sm",
2840
2835
  onClick: () => {
2841
- g({
2836
+ f({
2842
2837
  ...d,
2843
2838
  items: {
2844
2839
  id: Date.now().toString() + Math.random(),
@@ -2856,29 +2851,29 @@ function pe({
2856
2851
  }
2857
2852
  )
2858
2853
  ] }),
2859
- !o && /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
2854
+ !a && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
2860
2855
  /* @__PURE__ */ n(
2861
2856
  me,
2862
2857
  {
2863
2858
  id: "prop-required",
2864
2859
  checked: d.required,
2865
- onCheckedChange: (u) => y("required", u),
2860
+ onCheckedChange: (u) => x("required", u),
2866
2861
  "data-testid": "checkbox-edit-required"
2867
2862
  }
2868
2863
  ),
2869
- /* @__PURE__ */ n(z, { htmlFor: "prop-required", className: "cursor-pointer", children: "Required field" })
2864
+ /* @__PURE__ */ n(T, { htmlFor: "prop-required", className: "cursor-pointer", children: "Required field" })
2870
2865
  ] }),
2871
- d.type === "string" && /* @__PURE__ */ l("details", { className: "border rounded-md", children: [
2872
- /* @__PURE__ */ n("summary", { className: "p-4 cursor-pointer hover:bg-accent/50 transition-colors", children: /* @__PURE__ */ l("h4", { className: "text-sm font-medium inline", children: [
2866
+ d.type === "string" && /* @__PURE__ */ c("details", { className: "border rounded-md", children: [
2867
+ /* @__PURE__ */ n("summary", { className: "p-4 cursor-pointer hover:bg-accent/50 transition-colors", children: /* @__PURE__ */ c("h4", { className: "text-sm font-medium inline", children: [
2873
2868
  m.string,
2874
2869
  " Constraints"
2875
2870
  ] }) }),
2876
- /* @__PURE__ */ l("div", { className: "space-y-4 p-4 pt-0", children: [
2877
- /* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-4", children: [
2878
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2879
- /* @__PURE__ */ n(z, { htmlFor: "min-length", children: "Minimum Length" }),
2871
+ /* @__PURE__ */ c("div", { className: "space-y-4 p-4 pt-0", children: [
2872
+ /* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-4", children: [
2873
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2874
+ /* @__PURE__ */ n(T, { htmlFor: "min-length", children: "Minimum Length" }),
2880
2875
  /* @__PURE__ */ n(
2881
- L,
2876
+ E,
2882
2877
  {
2883
2878
  id: "min-length",
2884
2879
  type: "number",
@@ -2892,10 +2887,10 @@ function pe({
2892
2887
  }
2893
2888
  )
2894
2889
  ] }),
2895
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2896
- /* @__PURE__ */ n(z, { htmlFor: "max-length", children: "Maximum Length" }),
2890
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2891
+ /* @__PURE__ */ n(T, { htmlFor: "max-length", children: "Maximum Length" }),
2897
2892
  /* @__PURE__ */ n(
2898
- L,
2893
+ E,
2899
2894
  {
2900
2895
  id: "max-length",
2901
2896
  type: "number",
@@ -2910,10 +2905,10 @@ function pe({
2910
2905
  )
2911
2906
  ] })
2912
2907
  ] }),
2913
- c && /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2914
- /* @__PURE__ */ n(z, { htmlFor: "pattern", children: "Pattern (regex)" }),
2908
+ l && /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2909
+ /* @__PURE__ */ n(T, { htmlFor: "pattern", children: "Pattern (regex)" }),
2915
2910
  /* @__PURE__ */ n(
2916
- L,
2911
+ E,
2917
2912
  {
2918
2913
  id: "pattern",
2919
2914
  placeholder: "^[a-z]+$",
@@ -2924,51 +2919,51 @@ function pe({
2924
2919
  }
2925
2920
  )
2926
2921
  ] }),
2927
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2928
- /* @__PURE__ */ n(z, { children: "Enum Values" }),
2929
- /* @__PURE__ */ n("div", { className: "space-y-2", children: [...d.enum || [], ""].map((u, A) => {
2930
- var O;
2922
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2923
+ /* @__PURE__ */ n(T, { children: "Enum Values" }),
2924
+ /* @__PURE__ */ n("div", { className: "space-y-2", children: [...d.enum || [], ""].map((u, j) => {
2925
+ var $;
2931
2926
  return /* @__PURE__ */ n(
2932
- L,
2927
+ E,
2933
2928
  {
2934
- placeholder: A === (((O = d.enum) == null ? void 0 : O.length) || 0) ? "Add new value..." : "Enum value",
2929
+ placeholder: j === ((($ = d.enum) == null ? void 0 : $.length) || 0) ? "Add new value..." : "Enum value",
2935
2930
  value: u,
2936
- onChange: (_) => {
2937
- const M = _.target.value, F = d.enum || [];
2938
- if (A === F.length)
2939
- M.trim() && p("enum", [
2940
- ...F,
2941
- M.trim()
2931
+ onChange: (K) => {
2932
+ const P = K.target.value, O = d.enum || [];
2933
+ if (j === O.length)
2934
+ P.trim() && p("enum", [
2935
+ ...O,
2936
+ P.trim()
2942
2937
  ]);
2943
- else if (M.trim()) {
2944
- const E = [...F];
2945
- E[A] = M.trim(), p("enum", E);
2938
+ else if (P.trim()) {
2939
+ const M = [...O];
2940
+ M[j] = P.trim(), p("enum", M);
2946
2941
  } else {
2947
- const E = F.filter(
2948
- (J, G) => G !== A
2942
+ const M = O.filter(
2943
+ (Y, k) => k !== j
2949
2944
  );
2950
2945
  p(
2951
2946
  "enum",
2952
- E.length > 0 ? E : void 0
2947
+ M.length > 0 ? M : void 0
2953
2948
  );
2954
2949
  }
2955
2950
  },
2956
- "data-testid": `input-edit-enum-${A}`
2951
+ "data-testid": `input-edit-enum-${j}`
2957
2952
  },
2958
- A
2953
+ j
2959
2954
  );
2960
2955
  }) }),
2961
2956
  /* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground", children: "Enter allowed values (empty fields will be removed)" })
2962
2957
  ] })
2963
2958
  ] })
2964
2959
  ] }),
2965
- (d.type === "number" || d.type === "integer") && /* @__PURE__ */ l("details", { className: "border rounded-md", children: [
2960
+ (d.type === "number" || d.type === "integer") && /* @__PURE__ */ c("details", { className: "border rounded-md", children: [
2966
2961
  /* @__PURE__ */ n("summary", { className: "p-4 cursor-pointer hover:bg-accent/50 transition-colors", children: /* @__PURE__ */ n("h4", { className: "text-sm font-medium inline", children: "Numeric Constraints" }) }),
2967
- /* @__PURE__ */ n("div", { className: "space-y-4 p-4 pt-0", children: /* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-4", children: [
2968
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2969
- /* @__PURE__ */ n(z, { htmlFor: "minimum", children: "Minimum Value" }),
2962
+ /* @__PURE__ */ n("div", { className: "space-y-4 p-4 pt-0", children: /* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-4", children: [
2963
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2964
+ /* @__PURE__ */ n(T, { htmlFor: "minimum", children: "Minimum Value" }),
2970
2965
  /* @__PURE__ */ n(
2971
- L,
2966
+ E,
2972
2967
  {
2973
2968
  id: "minimum",
2974
2969
  type: "number",
@@ -2982,10 +2977,10 @@ function pe({
2982
2977
  }
2983
2978
  )
2984
2979
  ] }),
2985
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
2986
- /* @__PURE__ */ n(z, { htmlFor: "maximum", children: "Maximum Value" }),
2980
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
2981
+ /* @__PURE__ */ n(T, { htmlFor: "maximum", children: "Maximum Value" }),
2987
2982
  /* @__PURE__ */ n(
2988
- L,
2983
+ E,
2989
2984
  {
2990
2985
  id: "maximum",
2991
2986
  type: "number",
@@ -3001,17 +2996,17 @@ function pe({
3001
2996
  ] })
3002
2997
  ] }) })
3003
2998
  ] }),
3004
- d.type === "array" && /* @__PURE__ */ l("details", { className: "border rounded-md", children: [
3005
- /* @__PURE__ */ n("summary", { className: "p-4 cursor-pointer hover:bg-accent/50 transition-colors", children: /* @__PURE__ */ l("h4", { className: "text-sm font-medium inline", children: [
2999
+ d.type === "array" && /* @__PURE__ */ c("details", { className: "border rounded-md", children: [
3000
+ /* @__PURE__ */ n("summary", { className: "p-4 cursor-pointer hover:bg-accent/50 transition-colors", children: /* @__PURE__ */ c("h4", { className: "text-sm font-medium inline", children: [
3006
3001
  m.array,
3007
3002
  " Constraints"
3008
3003
  ] }) }),
3009
- /* @__PURE__ */ l("div", { className: "space-y-4 p-4 pt-0", children: [
3010
- /* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-4", children: [
3011
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
3012
- /* @__PURE__ */ n(z, { htmlFor: "min-items", children: "Minimum Items" }),
3004
+ /* @__PURE__ */ c("div", { className: "space-y-4 p-4 pt-0", children: [
3005
+ /* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-4", children: [
3006
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
3007
+ /* @__PURE__ */ n(T, { htmlFor: "min-items", children: "Minimum Items" }),
3013
3008
  /* @__PURE__ */ n(
3014
- L,
3009
+ E,
3015
3010
  {
3016
3011
  id: "min-items",
3017
3012
  type: "number",
@@ -3025,10 +3020,10 @@ function pe({
3025
3020
  }
3026
3021
  )
3027
3022
  ] }),
3028
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
3029
- /* @__PURE__ */ n(z, { htmlFor: "max-items", children: "Maximum Items" }),
3023
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
3024
+ /* @__PURE__ */ n(T, { htmlFor: "max-items", children: "Maximum Items" }),
3030
3025
  /* @__PURE__ */ n(
3031
- L,
3026
+ E,
3032
3027
  {
3033
3028
  id: "max-items",
3034
3029
  type: "number",
@@ -3043,7 +3038,7 @@ function pe({
3043
3038
  )
3044
3039
  ] })
3045
3040
  ] }),
3046
- /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
3041
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
3047
3042
  /* @__PURE__ */ n(
3048
3043
  me,
3049
3044
  {
@@ -3053,27 +3048,27 @@ function pe({
3053
3048
  "data-testid": "checkbox-edit-unique"
3054
3049
  }
3055
3050
  ),
3056
- /* @__PURE__ */ n(z, { htmlFor: "unique-items", className: "cursor-pointer", children: "All items must be unique" })
3051
+ /* @__PURE__ */ n(T, { htmlFor: "unique-items", className: "cursor-pointer", children: "All items must be unique" })
3057
3052
  ] })
3058
3053
  ] })
3059
3054
  ] })
3060
3055
  ] }),
3061
- /* @__PURE__ */ l(We, { className: "px-6 py-4 border-t bg-background shrink-0", children: [
3056
+ /* @__PURE__ */ c(Qe, { className: "px-6 py-4 border-t bg-background shrink-0", children: [
3062
3057
  /* @__PURE__ */ n(
3063
- R,
3058
+ L,
3064
3059
  {
3065
3060
  variant: "outline",
3066
- onClick: v,
3061
+ onClick: b,
3067
3062
  "data-testid": "button-cancel",
3068
3063
  children: "Cancel"
3069
3064
  }
3070
3065
  ),
3071
3066
  /* @__PURE__ */ n(
3072
- R,
3067
+ L,
3073
3068
  {
3074
- onClick: h,
3069
+ onClick: N,
3075
3070
  "data-testid": "button-save",
3076
- disabled: !((T = d.title) != null && T.trim()),
3071
+ disabled: !((A = d.title) != null && A.trim()),
3077
3072
  children: "Save Changes"
3078
3073
  }
3079
3074
  )
@@ -3082,66 +3077,139 @@ function pe({
3082
3077
  }
3083
3078
  ) });
3084
3079
  }
3080
+ function Le(e, r, t = {}) {
3081
+ const { allowEmpty: o = !1, onEditStart: a, onEditCancel: i } = t, [s, l] = B(!1), [h, m] = B(e);
3082
+ be(() => {
3083
+ s || m(e);
3084
+ }, [e, s]);
3085
+ const d = () => {
3086
+ m(e), l(!0), a == null || a();
3087
+ }, f = (v) => {
3088
+ m(v);
3089
+ }, g = () => {
3090
+ const v = h.trim();
3091
+ if (!o && !v) {
3092
+ m(e), l(!1);
3093
+ return;
3094
+ }
3095
+ v !== e && r(v), l(!1);
3096
+ };
3097
+ return {
3098
+ isEditing: s,
3099
+ value: h,
3100
+ startEdit: d,
3101
+ handleChange: f,
3102
+ handleBlur: g,
3103
+ handleKeyDown: (v) => {
3104
+ v.key === "Enter" ? g() : v.key === "Escape" && (m(e), l(!1), i == null || i());
3105
+ }
3106
+ };
3107
+ }
3108
+ function pr(e, r) {
3109
+ const [t, o] = B(!1);
3110
+ return {
3111
+ isChangingType: t,
3112
+ setIsChangingType: o,
3113
+ handleTypeChange: (s) => {
3114
+ const l = { ...e, type: s };
3115
+ s !== "string" && (delete l.minLength, delete l.maxLength, delete l.pattern, delete l.enum), s !== "number" && s !== "integer" && (delete l.minimum, delete l.maximum), s !== "array" && (delete l.minItems, delete l.maxItems, delete l.uniqueItems, delete l.items), s !== "object" && delete l.children, r(l), o(!1);
3116
+ },
3117
+ availableTypes: [
3118
+ "string",
3119
+ "number",
3120
+ "integer",
3121
+ "boolean",
3122
+ "object",
3123
+ "array",
3124
+ "file"
3125
+ ]
3126
+ };
3127
+ }
3085
3128
  const we = () => `${Date.now()}-${Math.random()}`;
3129
+ function Ne(e = {}) {
3130
+ const { onConfirm: r, onCancel: t, createInitialData: o } = e, [a, i] = B(!1), [s, l] = B(null), h = (g) => {
3131
+ const w = g ?? (o ? o() : null);
3132
+ l(w), i(!0);
3133
+ }, m = () => {
3134
+ i(!1), l(null), t == null || t();
3135
+ };
3136
+ return {
3137
+ isOpen: a,
3138
+ data: s,
3139
+ open: h,
3140
+ close: m,
3141
+ confirm: (g) => {
3142
+ r == null || r(g), i(!1), l(null);
3143
+ },
3144
+ setIsOpen: (g) => {
3145
+ g ? i(!0) : m();
3146
+ }
3147
+ };
3148
+ }
3149
+ function hr(e, r) {
3150
+ const t = Ne({
3151
+ createInitialData: () => ({
3152
+ id: we(),
3153
+ key: "",
3154
+ type: "string",
3155
+ required: !1
3156
+ }),
3157
+ onConfirm: (i) => {
3158
+ r({
3159
+ ...e,
3160
+ children: [...e.children || [], i]
3161
+ });
3162
+ }
3163
+ });
3164
+ return {
3165
+ addChild: () => t.open(),
3166
+ updateChild: (i, s) => {
3167
+ const l = e.children.map(
3168
+ (h) => h.id === i ? s : h
3169
+ );
3170
+ r({ ...e, children: l });
3171
+ },
3172
+ deleteChild: (i) => {
3173
+ const s = e.children.filter((l) => l.id !== i);
3174
+ r({ ...e, children: s });
3175
+ },
3176
+ addChildDialog: {
3177
+ isOpen: t.isOpen,
3178
+ data: t.data,
3179
+ setIsOpen: t.setIsOpen,
3180
+ confirm: t.confirm
3181
+ }
3182
+ };
3183
+ }
3086
3184
  function he({
3087
3185
  property: e,
3088
3186
  onUpdate: r,
3089
3187
  onDelete: t,
3090
- level: a = 1,
3091
- isArrayItem: o = !1,
3092
- showRegex: i = !1
3188
+ level: o = 1,
3189
+ isArrayItem: a = !1,
3190
+ showRegex: i = !1,
3191
+ keyEditable: s = !1
3093
3192
  }) {
3094
- const { getTypeLabel: s } = Qe(), [c, m] = V(!1), [d, g] = V(null), [N, x] = V(!1), [S, y] = V(!1), [p, h] = V(e.title || "");
3095
- be(() => {
3096
- S || h(e.title || "");
3097
- }, [e.title, S]);
3098
- const v = `h${Math.min(a, 6)}`, T = e.type === "object", u = T && e.children && e.children.length > 0, A = {
3193
+ const { getTypeLabel: l, typeLabels: h } = tt(), m = Ne(), d = Le(
3194
+ e.title || e.key || "",
3195
+ (b) => r({ ...e, title: b }),
3196
+ { allowEmpty: !1 }
3197
+ ), f = Le(
3198
+ e.description || "",
3199
+ (b) => r({ ...e, description: b || void 0 }),
3200
+ { allowEmpty: !0 }
3201
+ ), g = pr(e, r), w = hr(e, r), v = `h${Math.min(o, 6)}`, x = e.type === "object", p = x && e.children && e.children.length > 0, N = {
3099
3202
  1: "text-lg font-semibold",
3100
3203
  2: "text-base",
3101
3204
  3: "text-base",
3102
3205
  4: "text-base",
3103
3206
  5: "text-sm",
3104
3207
  6: "text-sm"
3105
- }[a] || "text-sm", O = (f, q) => {
3106
- const X = e.children.map(
3107
- (K) => K.id === f ? q : K
3108
- );
3109
- r({ ...e, children: X });
3110
- }, _ = (f) => {
3111
- const q = e.children.filter((X) => X.id !== f);
3112
- r({ ...e, children: q });
3113
- }, M = () => {
3114
- const f = {
3115
- id: we(),
3116
- key: "",
3117
- type: "string",
3118
- required: !1
3119
- };
3120
- g(f), x(!0);
3121
- }, F = (f) => {
3122
- r({
3123
- ...e,
3124
- children: [...e.children || [], f]
3125
- }), x(!1), g(null);
3126
- }, E = () => {
3127
- x(!1), g(null);
3128
- }, J = () => {
3129
- const f = e.title || e.key || "";
3130
- h(f), y(!0);
3131
- }, G = () => {
3132
- const f = p.trim();
3133
- if (!f) {
3134
- h(e.title || ""), y(!1);
3135
- return;
3136
- }
3137
- f !== e.title && r({ ...e, title: f }), y(!1);
3138
- }, w = (f) => {
3139
- f.key === "Enter" ? G() : f.key === "Escape" && (h(e.title || ""), y(!1));
3140
- };
3141
- return /* @__PURE__ */ l("div", { className: "group", children: [
3142
- /* @__PURE__ */ l("div", { className: "flex gap-4 items-center rounded-md -mx-2 px-2 py-1 transition-colors hover:bg-accent/50", children: [
3143
- /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ l("div", { className: "flex items-start gap-3", children: [
3144
- !o && /* @__PURE__ */ n(
3208
+ }[o] || "text-sm";
3209
+ return /* @__PURE__ */ c("div", { className: "group", children: [
3210
+ /* @__PURE__ */ c("div", { className: "flex gap-4 items-center rounded-md -mx-2 px-2 py-1 transition-colors hover:bg-accent/50", children: [
3211
+ /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ c("div", { className: "flex items-start gap-3", children: [
3212
+ !a && /* @__PURE__ */ n(
3145
3213
  "button",
3146
3214
  {
3147
3215
  onClick: () => r({ ...e, required: !e.required }),
@@ -3150,135 +3218,176 @@ function he({
3150
3218
  children: e.required ? /* @__PURE__ */ n("span", { className: "block w-4 h-4 rounded-full bg-primary" }) : /* @__PURE__ */ n("span", { className: "block w-4 h-4 rounded-full border border-dashed border-gray-400" })
3151
3219
  }
3152
3220
  ),
3153
- S ? /* @__PURE__ */ n(
3154
- L,
3221
+ d.isEditing ? /* @__PURE__ */ n(
3222
+ E,
3155
3223
  {
3156
- value: p,
3157
- onChange: (f) => h(f.target.value),
3158
- onBlur: G,
3159
- onKeyDown: w,
3224
+ value: d.value,
3225
+ onChange: (b) => d.handleChange(b.target.value),
3226
+ onBlur: d.handleBlur,
3227
+ onKeyDown: d.handleKeyDown,
3160
3228
  autoFocus: !0,
3161
- className: A,
3229
+ className: N,
3162
3230
  placeholder: "Enter title"
3163
3231
  }
3164
- ) : /* @__PURE__ */ l("div", { className: "flex gap-2 flex-wrap", children: [
3165
- /* @__PURE__ */ l("div", { className: "flex items-start gap-2", children: [
3232
+ ) : /* @__PURE__ */ c("div", { className: "flex gap-2 flex-wrap flex-1", children: [
3233
+ /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
3166
3234
  /* @__PURE__ */ n(
3167
3235
  v,
3168
3236
  {
3169
- className: `${A} cursor-pointer hover:text-primary transition-colors leading-none`,
3170
- onClick: J,
3237
+ className: `${N} cursor-pointer hover:text-primary transition-colors leading-none`,
3238
+ onClick: d.startEdit,
3171
3239
  children: e.title || e.key || /* @__PURE__ */ n("span", { className: "text-muted-foreground italic", children: "unnamed" })
3172
3240
  }
3173
3241
  ),
3174
- /* @__PURE__ */ n(Yt, { children: /* @__PURE__ */ l(er, { children: [
3175
- /* @__PURE__ */ n(tr, { asChild: !0, children: /* @__PURE__ */ l("span", { children: [
3176
- e.type === "string" && /* @__PURE__ */ n(st, { className: "w-5 h-5 text-muted-foreground" }),
3177
- e.type === "number" && /* @__PURE__ */ n(Se, { className: "w-5 h-5 text-muted-foreground" }),
3178
- e.type === "integer" && /* @__PURE__ */ n(Se, { className: "w-5 h-5 text-muted-foreground" }),
3179
- e.type === "boolean" && /* @__PURE__ */ n(lt, { className: "w-5 h-5 text-muted-foreground" }),
3180
- e.type === "object" && /* @__PURE__ */ n(dt, { className: "w-5 h-5 text-muted-foreground" }),
3181
- e.type === "array" && /* @__PURE__ */ n(ct, { className: "w-5 h-5 text-muted-foreground" }),
3182
- e.type === "file" && /* @__PURE__ */ n(mt, { className: "w-5 h-5 text-muted-foreground" })
3183
- ] }) }),
3184
- /* @__PURE__ */ l($e, { side: "top", children: [
3185
- s(e.type),
3186
- e.type === "array" && e.items ? ` of ${s(e.items.type)}` : ""
3242
+ g.isChangingType ? /* @__PURE__ */ c(
3243
+ de,
3244
+ {
3245
+ value: e.type,
3246
+ onValueChange: (b) => g.handleTypeChange(b),
3247
+ open: g.isChangingType,
3248
+ onOpenChange: g.setIsChangingType,
3249
+ children: [
3250
+ /* @__PURE__ */ n(ne, { className: "w-[140px] h-7", children: /* @__PURE__ */ n(ce, {}) }),
3251
+ /* @__PURE__ */ n(ae, { children: g.availableTypes.map((b) => /* @__PURE__ */ n(R, { value: b, children: h[b] }, b)) })
3252
+ ]
3253
+ }
3254
+ ) : /* @__PURE__ */ n(tr, { children: /* @__PURE__ */ c(rr, { children: [
3255
+ /* @__PURE__ */ n(nr, { asChild: !0, children: /* @__PURE__ */ c(
3256
+ "button",
3257
+ {
3258
+ onClick: () => g.setIsChangingType(!0),
3259
+ className: "cursor-pointer hover:bg-accent rounded p-0.5 transition-colors",
3260
+ children: [
3261
+ e.type === "string" && /* @__PURE__ */ n(dt, { className: "w-5 h-5 text-muted-foreground" }),
3262
+ e.type === "number" && /* @__PURE__ */ n(ze, { className: "w-5 h-5 text-muted-foreground" }),
3263
+ e.type === "integer" && /* @__PURE__ */ n(ze, { className: "w-5 h-5 text-muted-foreground" }),
3264
+ e.type === "boolean" && /* @__PURE__ */ n(ct, { className: "w-5 h-5 text-muted-foreground" }),
3265
+ e.type === "object" && /* @__PURE__ */ n(mt, { className: "w-5 h-5 text-muted-foreground" }),
3266
+ e.type === "array" && /* @__PURE__ */ n(ut, { className: "w-5 h-5 text-muted-foreground" }),
3267
+ e.type === "file" && /* @__PURE__ */ n(pt, { className: "w-5 h-5 text-muted-foreground" })
3268
+ ]
3269
+ }
3270
+ ) }),
3271
+ /* @__PURE__ */ c(Je, { children: [
3272
+ l(e.type),
3273
+ e.type === "array" && e.items ? ` of ${l(e.items.type)}` : "",
3274
+ /* @__PURE__ */ n("div", { className: "text-xs text-muted-foreground mt-1", children: "Click to change type" })
3187
3275
  ] })
3188
3276
  ] }) }),
3189
3277
  e.type === "object" && /* @__PURE__ */ n(
3190
- R,
3278
+ L,
3191
3279
  {
3192
3280
  variant: "ghost",
3193
3281
  size: "icon",
3194
3282
  className: "opacity-0 group-hover:opacity-100 h-6 w-6",
3195
- onClick: M,
3283
+ onClick: w.addChild,
3196
3284
  "data-testid": `button-add-child-${e.id}`,
3197
- children: /* @__PURE__ */ n(re, { className: "!w-5 !h-5" })
3285
+ children: /* @__PURE__ */ n(Q, { className: "!w-5 !h-5" })
3198
3286
  }
3199
3287
  )
3200
3288
  ] }),
3201
- e.description && /* @__PURE__ */ n(
3289
+ /* @__PURE__ */ n("div", { className: "flex-1", children: f.isEditing ? /* @__PURE__ */ n(
3290
+ E,
3291
+ {
3292
+ value: f.value,
3293
+ onChange: (b) => f.handleChange(b.target.value),
3294
+ onBlur: f.handleBlur,
3295
+ onKeyDown: f.handleKeyDown,
3296
+ autoFocus: !0,
3297
+ className: "text-sm flex-1",
3298
+ placeholder: "Enter description"
3299
+ }
3300
+ ) : /* @__PURE__ */ n(Ee, { children: e.description ? /* @__PURE__ */ n(
3202
3301
  "p",
3203
3302
  {
3204
- className: "text-sm text-muted-foreground flex-1 min-w-[200px]",
3303
+ className: "text-sm text-muted-foreground flex-1 min-w-[200px] cursor-pointer hover:text-foreground transition-colors",
3205
3304
  "data-testid": `text-description-${e.id}`,
3305
+ onClick: f.startEdit,
3206
3306
  children: e.description
3207
3307
  }
3208
- )
3308
+ ) : /* @__PURE__ */ n(
3309
+ "p",
3310
+ {
3311
+ className: "text-sm text-muted-foreground/50 flex-1 min-w-[200px] cursor-pointer hover:text-muted-foreground italic transition-colors",
3312
+ onClick: f.startEdit,
3313
+ children: "Add description..."
3314
+ }
3315
+ ) }) })
3209
3316
  ] })
3210
3317
  ] }) }),
3211
- /* @__PURE__ */ l("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0", children: [
3318
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0", children: [
3212
3319
  /* @__PURE__ */ n(
3213
- R,
3320
+ L,
3214
3321
  {
3215
3322
  variant: "ghost",
3216
3323
  size: "icon",
3217
3324
  className: "h-7 w-7",
3218
- onClick: () => m(!0),
3325
+ onClick: () => m.open(e),
3219
3326
  "data-testid": `button-edit-${e.id}`,
3220
- children: /* @__PURE__ */ n(ut, { className: "w-3 h-3" })
3327
+ children: /* @__PURE__ */ n(ht, { className: "w-3 h-3" })
3221
3328
  }
3222
3329
  ),
3223
- T && e.type !== "object" && /* @__PURE__ */ n(
3224
- R,
3330
+ x && e.type !== "object" && /* @__PURE__ */ n(
3331
+ L,
3225
3332
  {
3226
3333
  variant: "ghost",
3227
3334
  size: "icon",
3228
3335
  className: "h-7 w-7",
3229
- onClick: M,
3336
+ onClick: w.addChild,
3230
3337
  "data-testid": `button-add-child-${e.id}`,
3231
- children: /* @__PURE__ */ n(re, { className: "w-3 h-3" })
3338
+ children: /* @__PURE__ */ n(Q, { className: "w-3 h-3" })
3232
3339
  }
3233
3340
  ),
3234
3341
  /* @__PURE__ */ n(
3235
- R,
3342
+ L,
3236
3343
  {
3237
3344
  variant: "ghost",
3238
3345
  size: "icon",
3239
3346
  className: "h-7 w-7 text-muted-foreground hover:text-destructive",
3240
3347
  onClick: t,
3241
3348
  "data-testid": `button-delete-${e.id}`,
3242
- children: /* @__PURE__ */ n(Le, { className: "w-3 h-3" })
3349
+ children: /* @__PURE__ */ n(De, { className: "w-3 h-3" })
3243
3350
  }
3244
3351
  )
3245
3352
  ] })
3246
3353
  ] }),
3247
- u && /* @__PURE__ */ n(
3354
+ p && /* @__PURE__ */ n(
3248
3355
  "div",
3249
3356
  {
3250
- className: a === 1 ? "ml-6 mt-1 border-l-2 border-border pl-6" : "ml-4 mt-1 border-l border-border pl-4",
3251
- children: e.children.map((f) => /* @__PURE__ */ n(
3357
+ className: o === 1 ? "ml-6 mt-1 border-l-2 border-border pl-6" : "ml-4 mt-1 border-l border-border pl-4",
3358
+ children: e.children.map((b) => /* @__PURE__ */ n(
3252
3359
  he,
3253
3360
  {
3254
- property: f,
3255
- onUpdate: (q) => O(f.id, q),
3256
- onDelete: () => _(f.id),
3257
- level: a + 1,
3258
- showRegex: i
3361
+ property: b,
3362
+ onUpdate: (A) => w.updateChild(b.id, A),
3363
+ onDelete: () => w.deleteChild(b.id),
3364
+ level: o + 1,
3365
+ showRegex: i,
3366
+ keyEditable: s
3259
3367
  },
3260
- f.id
3368
+ b.id
3261
3369
  ))
3262
3370
  }
3263
3371
  ),
3264
- e.type === "array" && e.items && /* @__PURE__ */ l(
3372
+ e.type === "array" && e.items && /* @__PURE__ */ c(
3265
3373
  "div",
3266
3374
  {
3267
- className: a === 1 ? "ml-6 mt-1 border-l-2 border-border pl-6" : "ml-4 mt-1 border-l border-border pl-4",
3375
+ className: o === 1 ? "ml-6 mt-1 border-l-2 border-border pl-6" : "ml-4 mt-1 border-l border-border pl-4",
3268
3376
  children: [
3269
- /* @__PURE__ */ l("div", { className: "mb-2 text-xs text-muted-foreground font-semibold uppercase", children: [
3270
- s("array"),
3377
+ /* @__PURE__ */ c("div", { className: "mb-2 text-xs text-muted-foreground font-semibold uppercase", children: [
3378
+ l("array"),
3271
3379
  " Items"
3272
3380
  ] }),
3273
3381
  /* @__PURE__ */ n(
3274
3382
  he,
3275
3383
  {
3276
3384
  property: e.items,
3277
- onUpdate: (f) => r({ ...e, items: f }),
3385
+ onUpdate: (b) => r({ ...e, items: b }),
3278
3386
  onDelete: () => r({ ...e, items: void 0 }),
3279
- level: a + 1,
3387
+ level: o + 1,
3280
3388
  isArrayItem: !0,
3281
- showRegex: i
3389
+ showRegex: i,
3390
+ keyEditable: s
3282
3391
  }
3283
3392
  )
3284
3393
  ]
@@ -3287,43 +3396,45 @@ function he({
3287
3396
  /* @__PURE__ */ n(
3288
3397
  pe,
3289
3398
  {
3290
- property: e,
3291
- open: c,
3292
- onOpenChange: m,
3293
- onUpdate: r,
3294
- isArrayItem: o,
3399
+ property: m.data || e,
3400
+ open: m.isOpen,
3401
+ onOpenChange: m.setIsOpen,
3402
+ onUpdate: (b) => {
3403
+ r(b), m.close();
3404
+ },
3405
+ isArrayItem: a,
3295
3406
  isNewProperty: !1,
3296
- showRegex: i
3407
+ showRegex: i,
3408
+ keyEditable: s
3297
3409
  }
3298
3410
  ),
3299
- N && d && /* @__PURE__ */ n(
3411
+ w.addChildDialog.isOpen && w.addChildDialog.data && /* @__PURE__ */ n(
3300
3412
  pe,
3301
3413
  {
3302
- property: d,
3303
- open: N,
3414
+ property: w.addChildDialog.data,
3415
+ open: w.addChildDialog.isOpen,
3304
3416
  isNewProperty: !0,
3305
- onOpenChange: (f) => {
3306
- f || E();
3307
- },
3308
- onUpdate: F,
3309
- showRegex: i
3417
+ onOpenChange: w.addChildDialog.setIsOpen,
3418
+ onUpdate: w.addChildDialog.confirm,
3419
+ showRegex: i,
3420
+ keyEditable: s
3310
3421
  }
3311
3422
  )
3312
3423
  ] });
3313
3424
  }
3314
- const Ne = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3425
+ const Ce = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3315
3426
  "div",
3316
3427
  {
3317
3428
  ref: t,
3318
3429
  className: C(
3319
- "shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",
3430
+ "rounded-xl border bg-card text-card-foreground shadow",
3320
3431
  e
3321
3432
  ),
3322
3433
  ...r
3323
3434
  }
3324
3435
  ));
3325
- Ne.displayName = "Card";
3326
- const mr = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3436
+ Ce.displayName = "Card";
3437
+ const fr = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3327
3438
  "div",
3328
3439
  {
3329
3440
  ref: t,
@@ -3331,20 +3442,17 @@ const mr = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3331
3442
  ...r
3332
3443
  }
3333
3444
  ));
3334
- mr.displayName = "CardHeader";
3335
- const ur = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3445
+ fr.displayName = "CardHeader";
3446
+ const gr = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3336
3447
  "div",
3337
3448
  {
3338
3449
  ref: t,
3339
- className: C(
3340
- "text-2xl font-semibold leading-none tracking-tight",
3341
- e
3342
- ),
3450
+ className: C("font-semibold leading-none tracking-tight", e),
3343
3451
  ...r
3344
3452
  }
3345
3453
  ));
3346
- ur.displayName = "CardTitle";
3347
- const pr = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3454
+ gr.displayName = "CardTitle";
3455
+ const br = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3348
3456
  "div",
3349
3457
  {
3350
3458
  ref: t,
@@ -3352,10 +3460,10 @@ const pr = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3352
3460
  ...r
3353
3461
  }
3354
3462
  ));
3355
- pr.displayName = "CardDescription";
3356
- const hr = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n("div", { ref: t, className: C("p-6 pt-0", e), ...r }));
3357
- hr.displayName = "CardContent";
3358
- const fr = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3463
+ br.displayName = "CardDescription";
3464
+ const yr = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n("div", { ref: t, className: C("p-6 pt-0", e), ...r }));
3465
+ yr.displayName = "CardContent";
3466
+ const vr = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3359
3467
  "div",
3360
3468
  {
3361
3469
  ref: t,
@@ -3363,98 +3471,98 @@ const fr = I.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
3363
3471
  ...r
3364
3472
  }
3365
3473
  ));
3366
- fr.displayName = "CardFooter";
3367
- const gr = () => new Promise((e, r) => {
3474
+ vr.displayName = "CardFooter";
3475
+ const xr = () => new Promise((e, r) => {
3368
3476
  const t = document.createElement("input");
3369
- t.type = "file", t.accept = ".json", t.onchange = (a) => {
3477
+ t.type = "file", t.accept = ".json", t.onchange = (o) => {
3370
3478
  var s;
3371
- const o = (s = a.target.files) == null ? void 0 : s[0];
3372
- if (!o) {
3479
+ const a = (s = o.target.files) == null ? void 0 : s[0];
3480
+ if (!a) {
3373
3481
  r(new Error("No file selected"));
3374
3482
  return;
3375
3483
  }
3376
3484
  const i = new FileReader();
3377
- i.onload = (c) => {
3378
- var m;
3485
+ i.onload = (l) => {
3486
+ var h;
3379
3487
  try {
3380
- const d = JSON.parse((m = c.target) == null ? void 0 : m.result);
3381
- e(d);
3488
+ const m = JSON.parse((h = l.target) == null ? void 0 : h.result);
3489
+ e(m);
3382
3490
  } catch {
3383
3491
  r(new Error("Invalid JSON file"));
3384
3492
  }
3385
- }, i.onerror = () => r(new Error("Failed to read file")), i.readAsText(o);
3493
+ }, i.onerror = () => r(new Error("Failed to read file")), i.readAsText(a);
3386
3494
  }, t.click();
3387
- }), Ye = (e, r = "schema.json") => {
3388
- const t = JSON.stringify(e, null, 2), a = new Blob([t], { type: "application/json" }), o = URL.createObjectURL(a), i = document.createElement("a");
3389
- i.href = o, i.download = r, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(o);
3495
+ }), rt = (e, r = "schema.json") => {
3496
+ const t = JSON.stringify(e, null, 2), o = new Blob([t], { type: "application/json" }), a = URL.createObjectURL(o), i = document.createElement("a");
3497
+ i.href = a, i.download = r, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(a);
3390
3498
  };
3391
- function br({ schema: e }) {
3392
- const [r, t] = V(!1), a = JSON.stringify(e, null, 2);
3393
- return /* @__PURE__ */ l("div", { className: "h-full flex flex-col", children: [
3394
- /* @__PURE__ */ l("div", { className: "flex items-center justify-between p-4 border-b", children: [
3499
+ function wr({ schema: e }) {
3500
+ const [r, t] = B(!1), o = JSON.stringify(e, null, 2);
3501
+ return /* @__PURE__ */ c("div", { className: "h-full flex flex-col", children: [
3502
+ /* @__PURE__ */ c("div", { className: "flex items-center justify-between p-4 border-b", children: [
3395
3503
  /* @__PURE__ */ n("h2", { className: "text-sm font-medium", children: "JSON Schema Output" }),
3396
- /* @__PURE__ */ l("div", { className: "flex gap-2", children: [
3504
+ /* @__PURE__ */ c("div", { className: "flex gap-2", children: [
3397
3505
  /* @__PURE__ */ n(
3398
- R,
3506
+ L,
3399
3507
  {
3400
3508
  variant: "outline",
3401
3509
  size: "sm",
3402
3510
  onClick: async () => {
3403
- await navigator.clipboard.writeText(a), t(!0), setTimeout(() => t(!1), 2e3);
3511
+ await navigator.clipboard.writeText(o), t(!0), setTimeout(() => t(!1), 2e3);
3404
3512
  },
3405
3513
  "data-testid": "button-copy",
3406
- children: r ? /* @__PURE__ */ n(pt, { className: "w-4 h-4" }) : /* @__PURE__ */ n(ht, { className: "w-4 h-4" })
3514
+ children: r ? /* @__PURE__ */ n(ft, { className: "w-4 h-4" }) : /* @__PURE__ */ n(gt, { className: "w-4 h-4" })
3407
3515
  }
3408
3516
  ),
3409
3517
  /* @__PURE__ */ n(
3410
- R,
3518
+ L,
3411
3519
  {
3412
3520
  variant: "outline",
3413
3521
  size: "sm",
3414
3522
  onClick: () => {
3415
- Ye(e, "schema.json");
3523
+ rt(e, "schema.json");
3416
3524
  },
3417
3525
  "data-testid": "button-download",
3418
- children: /* @__PURE__ */ n(ft, { className: "w-4 h-4" })
3526
+ children: /* @__PURE__ */ n(bt, { className: "w-4 h-4" })
3419
3527
  }
3420
3528
  )
3421
3529
  ] })
3422
3530
  ] }),
3423
- /* @__PURE__ */ n("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ n(Ne, { className: "m-4 bg-muted/30", children: /* @__PURE__ */ n(
3531
+ /* @__PURE__ */ n("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ n(Ce, { className: "m-4 bg-muted/30", children: /* @__PURE__ */ n(
3424
3532
  "pre",
3425
3533
  {
3426
3534
  className: "p-6 text-xs font-mono overflow-auto",
3427
3535
  "data-testid": "text-json-output",
3428
- children: /* @__PURE__ */ n("code", { children: a })
3536
+ children: /* @__PURE__ */ n("code", { children: o })
3429
3537
  }
3430
3538
  ) }) })
3431
3539
  ] });
3432
3540
  }
3433
- function yr({
3541
+ function Nr({
3434
3542
  title: e,
3435
3543
  description: r,
3436
3544
  version: t,
3437
- onUpdate: a
3545
+ onUpdate: o
3438
3546
  }) {
3439
- const [o, i] = V(!1);
3440
- return /* @__PURE__ */ l(Ne, { className: "p-4", children: [
3441
- /* @__PURE__ */ l(
3442
- R,
3547
+ const [a, i] = B(!1);
3548
+ return /* @__PURE__ */ c(Ce, { className: "p-4", children: [
3549
+ /* @__PURE__ */ c(
3550
+ L,
3443
3551
  {
3444
3552
  variant: "ghost",
3445
- onClick: () => i(!o),
3553
+ onClick: () => i(!a),
3446
3554
  className: "w-full justify-between px-2 h-auto hover:bg-transparent",
3447
3555
  "data-testid": "button-toggle-metadata",
3448
3556
  children: [
3449
3557
  /* @__PURE__ */ n("h3", { className: "text-sm font-medium", children: "Schema Metadata" }),
3450
- o ? /* @__PURE__ */ n(ye, { className: "w-4 h-4" }) : /* @__PURE__ */ n(gt, { className: "w-4 h-4" })
3558
+ a ? /* @__PURE__ */ n(ye, { className: "w-4 h-4" }) : /* @__PURE__ */ n(yt, { className: "w-4 h-4" })
3451
3559
  ]
3452
3560
  }
3453
3561
  ),
3454
- o && /* @__PURE__ */ l("div", { className: "mt-4 space-y-4", children: [
3455
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
3562
+ a && /* @__PURE__ */ c("div", { className: "mt-4 space-y-4", children: [
3563
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
3456
3564
  /* @__PURE__ */ n(
3457
- z,
3565
+ T,
3458
3566
  {
3459
3567
  htmlFor: "schema-title",
3460
3568
  className: "text-xs text-muted-foreground",
@@ -3462,19 +3570,19 @@ function yr({
3462
3570
  }
3463
3571
  ),
3464
3572
  /* @__PURE__ */ n(
3465
- L,
3573
+ E,
3466
3574
  {
3467
3575
  id: "schema-title",
3468
3576
  placeholder: "My Schema",
3469
3577
  value: e,
3470
- onChange: (s) => a("title", s.target.value),
3578
+ onChange: (s) => o("title", s.target.value),
3471
3579
  "data-testid": "input-title"
3472
3580
  }
3473
3581
  )
3474
3582
  ] }),
3475
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
3583
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
3476
3584
  /* @__PURE__ */ n(
3477
- z,
3585
+ T,
3478
3586
  {
3479
3587
  htmlFor: "schema-description",
3480
3588
  className: "text-xs text-muted-foreground",
@@ -3487,16 +3595,16 @@ function yr({
3487
3595
  id: "schema-description",
3488
3596
  placeholder: "Describe your schema...",
3489
3597
  value: r,
3490
- onChange: (s) => a("description", s.target.value),
3598
+ onChange: (s) => o("description", s.target.value),
3491
3599
  className: "resize-none",
3492
3600
  rows: 3,
3493
3601
  "data-testid": "input-schema-description"
3494
3602
  }
3495
3603
  )
3496
3604
  ] }),
3497
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
3605
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
3498
3606
  /* @__PURE__ */ n(
3499
- z,
3607
+ T,
3500
3608
  {
3501
3609
  htmlFor: "schema-version",
3502
3610
  className: "text-xs text-muted-foreground",
@@ -3504,12 +3612,12 @@ function yr({
3504
3612
  }
3505
3613
  ),
3506
3614
  /* @__PURE__ */ n(
3507
- L,
3615
+ E,
3508
3616
  {
3509
3617
  id: "schema-version",
3510
3618
  placeholder: "1.0.0",
3511
3619
  value: t,
3512
- onChange: (s) => a("version", s.target.value),
3620
+ onChange: (s) => o("version", s.target.value),
3513
3621
  "data-testid": "input-version"
3514
3622
  }
3515
3623
  )
@@ -3517,30 +3625,30 @@ function yr({
3517
3625
  ] })
3518
3626
  ] });
3519
3627
  }
3520
- const oe = (e, r, t = !0) => {
3521
- const a = {
3628
+ const re = (e, r, t = !0) => {
3629
+ const o = {
3522
3630
  type: "object"
3523
3631
  };
3524
- t && r && (r.title && (a.title = r.title), r.description && (a.description = r.description));
3525
- const o = fe(e);
3526
- Object.keys(o).length > 0 && (a.properties = o);
3632
+ t && r && (r.title && (o.title = r.title), r.description && (o.description = r.description));
3633
+ const a = fe(e);
3634
+ Object.keys(a).length > 0 && (o.properties = a);
3527
3635
  const i = e.filter((s) => s.required && s.key).map((s) => s.key);
3528
- return i.length > 0 && (a.required = i), a;
3636
+ return i.length > 0 && (o.required = i), o;
3529
3637
  }, fe = (e) => {
3530
3638
  const r = {};
3531
3639
  return e.forEach((t) => {
3532
3640
  if (!t.key) return;
3533
- const o = { type: t.type === "file" ? "string" : t.type };
3534
- if (t.title && (o.title = t.title), t.description && (o.description = t.description), t.type === "file" && (o.format = "filename"), t.type === "string" && (t.minLength !== void 0 && (o.minLength = t.minLength), t.maxLength !== void 0 && (o.maxLength = t.maxLength), t.pattern && (o.pattern = t.pattern), t.enum && t.enum.length > 0 && (o.enum = t.enum)), (t.type === "number" || t.type === "integer") && (t.minimum !== void 0 && (o.minimum = t.minimum), t.maximum !== void 0 && (o.maximum = t.maximum)), t.type === "array" && (t.minItems !== void 0 && (o.minItems = t.minItems), t.maxItems !== void 0 && (o.maxItems = t.maxItems), t.uniqueItems && (o.uniqueItems = t.uniqueItems), t.items && (o.items = fe([t.items])[t.items.key] || {
3641
+ const a = { type: t.type === "file" ? "string" : t.type };
3642
+ if (t.title && (a.title = t.title), t.description && (a.description = t.description), t.type === "file" && (a.format = "filename"), t.type === "string" && (t.minLength !== void 0 && (a.minLength = t.minLength), t.maxLength !== void 0 && (a.maxLength = t.maxLength), t.pattern && (a.pattern = t.pattern), t.enum && t.enum.length > 0 && (a.enum = t.enum)), (t.type === "number" || t.type === "integer") && (t.minimum !== void 0 && (a.minimum = t.minimum), t.maximum !== void 0 && (a.maximum = t.maximum)), t.type === "array" && (t.minItems !== void 0 && (a.minItems = t.minItems), t.maxItems !== void 0 && (a.maxItems = t.maxItems), t.uniqueItems && (a.uniqueItems = t.uniqueItems), t.items && (a.items = fe([t.items])[t.items.key] || {
3535
3643
  type: t.items.type
3536
3644
  })), t.type === "object" && t.children && t.children.length > 0) {
3537
- o.properties = fe(t.children);
3645
+ a.properties = fe(t.children);
3538
3646
  const i = t.children.filter((s) => s.required && s.key).map((s) => s.key);
3539
- i.length > 0 && (o.required = i);
3647
+ i.length > 0 && (a.required = i);
3540
3648
  }
3541
- r[t.key] = o;
3649
+ r[t.key] = a;
3542
3650
  }), r;
3543
- }, vr = (e) => {
3651
+ }, Cr = (e) => {
3544
3652
  const r = {
3545
3653
  properties: []
3546
3654
  };
@@ -3553,243 +3661,272 @@ const oe = (e, r, t = !0) => {
3553
3661
  e.properties,
3554
3662
  Array.isArray(e.required) ? e.required : []
3555
3663
  )), r;
3556
- }, ge = (e, r = []) => e ? Object.entries(e).filter(([, t]) => typeof t == "object").map(([t, a]) => {
3557
- const o = a;
3558
- let i = typeof o.type == "string" ? o.type : "string";
3559
- i === "string" && o.format === "filename" && (i = "file");
3664
+ }, ge = (e, r = []) => e ? Object.entries(e).filter(([, t]) => typeof t == "object").map(([t, o]) => {
3665
+ const a = o;
3666
+ let i = typeof a.type == "string" ? a.type : "string";
3667
+ i === "string" && a.format === "filename" && (i = "file");
3560
3668
  const s = {
3561
3669
  id: we(),
3562
3670
  key: t,
3563
- title: typeof o.title == "string" ? o.title : void 0,
3671
+ title: typeof a.title == "string" ? a.title : void 0,
3564
3672
  type: i,
3565
- description: typeof o.description == "string" ? o.description : void 0,
3673
+ description: typeof a.description == "string" ? a.description : void 0,
3566
3674
  required: r.includes(t)
3567
3675
  };
3568
- return o.minLength !== void 0 && (s.minLength = o.minLength), o.maxLength !== void 0 && (s.maxLength = o.maxLength), o.pattern && (s.pattern = o.pattern), o.enum && Array.isArray(o.enum) && (s.enum = o.enum), o.minimum !== void 0 && (s.minimum = o.minimum), o.maximum !== void 0 && (s.maximum = o.maximum), o.minItems !== void 0 && (s.minItems = o.minItems), o.maxItems !== void 0 && (s.maxItems = o.maxItems), o.uniqueItems && (s.uniqueItems = o.uniqueItems), s.type === "array" && o.items && typeof o.items == "object" && !Array.isArray(o.items) && (s.items = ge(
3569
- { item: o.items },
3676
+ return a.minLength !== void 0 && (s.minLength = a.minLength), a.maxLength !== void 0 && (s.maxLength = a.maxLength), a.pattern && (s.pattern = a.pattern), a.enum && Array.isArray(a.enum) && (s.enum = a.enum), a.minimum !== void 0 && (s.minimum = a.minimum), a.maximum !== void 0 && (s.maximum = a.maximum), a.minItems !== void 0 && (s.minItems = a.minItems), a.maxItems !== void 0 && (s.maxItems = a.maxItems), a.uniqueItems && (s.uniqueItems = a.uniqueItems), s.type === "array" && a.items && typeof a.items == "object" && !Array.isArray(a.items) && (s.items = ge(
3677
+ { item: a.items },
3570
3678
  []
3571
- ).find((c) => c.key === "item")), o.properties && typeof o.properties == "object" && (s.children = ge(
3572
- o.properties,
3573
- Array.isArray(o.required) ? o.required : []
3679
+ ).find((l) => l.key === "item")), a.properties && typeof a.properties == "object" && (s.children = ge(
3680
+ a.properties,
3681
+ Array.isArray(a.required) ? a.required : []
3574
3682
  )), s;
3575
- }) : [], xr = ({
3683
+ }) : [], kr = ({
3576
3684
  schema: e,
3577
3685
  onChange: r,
3578
3686
  includeMetadata: t = !0
3579
3687
  }) => {
3580
- const { properties: a, metadata: o } = nt(
3581
- () => vr(e),
3688
+ const { properties: o, metadata: a } = ot(
3689
+ () => Cr(e),
3582
3690
  [e]
3583
- ), i = a, s = o || {
3691
+ ), i = o, s = a || {
3584
3692
  title: "",
3585
3693
  description: "",
3586
3694
  version: ""
3587
- }, c = H(() => ({
3695
+ }, l = _(() => ({
3588
3696
  id: we(),
3589
3697
  key: "",
3590
3698
  type: "string",
3591
3699
  required: !1
3592
- }), []), m = H((y, p) => {
3593
- const h = i.some((u) => u.id === y);
3594
- let v;
3595
- h ? v = i.map((u) => u.id === y ? p : u) : v = [...i, p];
3596
- const T = oe(v, s, t);
3597
- r(T);
3598
- }, [i, s, t, r]), d = H((y) => {
3599
- const p = i.filter((v) => v.id !== y), h = oe(p, s, t);
3600
- r(h);
3601
- }, [i, s, t, r]), g = H(() => {
3602
- const p = oe([], { title: "", description: "" }, t);
3603
- r(p);
3604
- }, [t, r]), N = H((y, p) => {
3605
- const h = { ...s, [y]: p }, v = oe(i, h, t);
3700
+ }), []), h = _(
3701
+ (v, x) => {
3702
+ const p = i.some((A) => A.id === v);
3703
+ let N;
3704
+ p ? N = i.map((A) => A.id === v ? x : A) : N = [...i, x];
3705
+ const b = re(
3706
+ N,
3707
+ s,
3708
+ t
3709
+ );
3710
+ r(b);
3711
+ },
3712
+ [i, s, t, r]
3713
+ ), m = _(
3714
+ (v) => {
3715
+ const x = i.filter((N) => N.id !== v), p = re(
3716
+ x,
3717
+ s,
3718
+ t
3719
+ );
3720
+ r(p);
3721
+ },
3722
+ [i, s, t, r]
3723
+ ), d = _(() => {
3724
+ const x = re([], { title: "", description: "" }, t);
3725
+ r(x);
3726
+ }, [t, r]), f = _(
3727
+ (v, x) => {
3728
+ const p = { ...s, [v]: x }, N = re(
3729
+ i,
3730
+ p,
3731
+ t
3732
+ );
3733
+ r(N);
3734
+ },
3735
+ [i, s, t, r]
3736
+ ), g = _(async () => {
3737
+ const v = await xr();
3606
3738
  r(v);
3607
- }, [i, s, t, r]), x = H(async () => {
3608
- const y = await gr();
3609
- r(y);
3610
- }, [r]), S = H(() => {
3611
- Ye(e, "schema.json");
3739
+ }, [r]), w = _(() => {
3740
+ rt(e, "schema.json");
3612
3741
  }, [e]);
3613
3742
  return {
3614
3743
  properties: i,
3615
3744
  metadata: s,
3616
- addProperty: c,
3617
- updateProperty: m,
3618
- deleteProperty: d,
3619
- clearAll: g,
3620
- updateMetadata: N,
3621
- importSchema: x,
3622
- downloadSchema: S
3745
+ addProperty: l,
3746
+ updateProperty: h,
3747
+ deleteProperty: m,
3748
+ clearAll: d,
3749
+ updateMetadata: f,
3750
+ importSchema: g,
3751
+ downloadSchema: w
3623
3752
  };
3624
3753
  };
3625
- function wr() {
3626
- const [e, r] = V("light");
3754
+ function Ir() {
3755
+ const [e, r] = B("light");
3627
3756
  return be(() => {
3628
- const o = localStorage.getItem("theme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
3629
- r(o), document.documentElement.classList.toggle("dark", o === "dark");
3757
+ const a = localStorage.getItem("theme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
3758
+ r(a), document.documentElement.classList.toggle("dark", a === "dark");
3630
3759
  }, []), /* @__PURE__ */ n(
3631
- R,
3760
+ L,
3632
3761
  {
3633
3762
  variant: "ghost",
3634
3763
  size: "icon",
3635
3764
  onClick: () => {
3636
- const a = e === "light" ? "dark" : "light";
3637
- r(a), localStorage.setItem("theme", a), document.documentElement.classList.toggle("dark", a === "dark");
3765
+ const o = e === "light" ? "dark" : "light";
3766
+ r(o), localStorage.setItem("theme", o), document.documentElement.classList.toggle("dark", o === "dark");
3638
3767
  },
3639
3768
  "data-testid": "button-theme-toggle",
3640
- children: e === "light" ? /* @__PURE__ */ n(bt, { className: "w-4 h-4" }) : /* @__PURE__ */ n(yt, { className: "w-4 h-4" })
3769
+ children: e === "light" ? /* @__PURE__ */ n(vt, { className: "w-4 h-4" }) : /* @__PURE__ */ n(xt, { className: "w-4 h-4" })
3641
3770
  }
3642
3771
  );
3643
3772
  }
3644
- function Ir({
3773
+ function Pr({
3645
3774
  schema: e,
3646
3775
  onChange: r,
3647
3776
  showMetadata: t = !1,
3648
- showImport: a = !0,
3649
- showClear: o = !0,
3777
+ showImport: o = !0,
3778
+ showClear: a = !0,
3650
3779
  showOutput: i = !0,
3651
3780
  showHeader: s = !0,
3652
- className: c = "",
3653
- showSummary: m = !1,
3654
- typeLabels: d,
3655
- propertyLabel: g = { singular: "property", plural: "properties" },
3656
- showRegex: N = !1
3781
+ className: l = "",
3782
+ showSummary: h = !1,
3783
+ typeLabels: m,
3784
+ propertyLabel: d = { singular: "property", plural: "properties" },
3785
+ showRegex: f = !1,
3786
+ keyEditable: g = !1
3657
3787
  }) {
3658
- const [x, S] = V(null), [y, p] = V(!1), {
3659
- properties: h,
3788
+ const {
3789
+ properties: w,
3660
3790
  metadata: v,
3661
- addProperty: T,
3662
- updateProperty: u,
3663
- deleteProperty: A,
3664
- clearAll: O,
3665
- updateMetadata: _,
3666
- importSchema: M
3667
- } = xr({
3791
+ addProperty: x,
3792
+ updateProperty: p,
3793
+ deleteProperty: N,
3794
+ clearAll: b,
3795
+ updateMetadata: A,
3796
+ importSchema: u
3797
+ } = kr({
3668
3798
  schema: e,
3669
3799
  onChange: r,
3670
3800
  includeMetadata: t
3671
- }), F = () => {
3672
- const f = T();
3673
- S(f), p(!0);
3674
- }, E = (f) => {
3675
- u(f.id, f), p(!1), S(null);
3676
- }, J = () => {
3677
- p(!1), S(null);
3678
- }, G = () => {
3679
- O();
3680
- }, w = async () => {
3681
- await M();
3801
+ }), j = Ne({
3802
+ createInitialData: () => x(),
3803
+ onConfirm: (P) => {
3804
+ p(P.id, P);
3805
+ }
3806
+ }), $ = () => {
3807
+ b();
3808
+ }, K = async () => {
3809
+ await u();
3682
3810
  };
3683
- return /* @__PURE__ */ n(cr, { customLabels: d, children: /* @__PURE__ */ l("div", { className: `${c} flex flex-col json-schema-builder-react`, children: [
3684
- s && /* @__PURE__ */ n("header", { className: "h-16 border-b flex items-center justify-between px-6", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
3685
- a && /* @__PURE__ */ n(
3686
- R,
3811
+ return /* @__PURE__ */ n(ur, { customLabels: m, children: /* @__PURE__ */ c("div", { className: `${l} flex flex-col json-schema-builder-react`, children: [
3812
+ s && /* @__PURE__ */ n("header", { className: "h-16 border-b flex items-center justify-between px-6", children: /* @__PURE__ */ c("div", { className: "flex items-center gap-3", children: [
3813
+ o && /* @__PURE__ */ n(
3814
+ L,
3687
3815
  {
3688
3816
  variant: "outline",
3689
3817
  size: "sm",
3690
- onClick: w,
3818
+ onClick: K,
3691
3819
  "data-testid": "button-import",
3692
- children: /* @__PURE__ */ n(vt, { className: "w-4 h-4" })
3820
+ children: /* @__PURE__ */ n(wt, { className: "w-4 h-4" })
3693
3821
  }
3694
3822
  ),
3695
- o && /* @__PURE__ */ n(
3696
- R,
3823
+ a && /* @__PURE__ */ n(
3824
+ L,
3697
3825
  {
3698
3826
  variant: "outline",
3699
3827
  size: "sm",
3700
- onClick: G,
3701
- disabled: h.length === 0,
3828
+ onClick: $,
3829
+ disabled: w.length === 0,
3702
3830
  "data-testid": "button-clear",
3703
- children: /* @__PURE__ */ n(Le, { className: "w-4 h-4" })
3831
+ children: /* @__PURE__ */ n(De, { className: "w-4 h-4" })
3704
3832
  }
3705
3833
  ),
3706
- /* @__PURE__ */ n(wr, {})
3834
+ /* @__PURE__ */ n(Ir, {})
3707
3835
  ] }) }),
3708
- /* @__PURE__ */ l("div", { className: "flex-1 flex overflow-hidden", children: [
3709
- /* @__PURE__ */ n("div", { className: i ? "w-3/5 border-r" : "w-full", children: /* @__PURE__ */ l("div", { className: "h-full overflow-auto p-2 space-y-4", children: [
3710
- t && /* @__PURE__ */ n(
3711
- yr,
3712
- {
3713
- title: v.title,
3714
- description: v.description,
3715
- version: v.version,
3716
- onUpdate: (f, q) => _(f, q)
3717
- }
3718
- ),
3719
- h.length === 0 ? /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
3720
- /* @__PURE__ */ n("div", { className: "w-16 h-16 rounded-full bg-muted flex items-center justify-center mb-4", children: /* @__PURE__ */ n(re, { className: "w-8 h-8 text-muted-foreground" }) }),
3721
- /* @__PURE__ */ l("h2", { className: "text-lg font-medium mb-2", children: [
3722
- "No ",
3723
- g.plural,
3724
- " yet"
3725
- ] }),
3726
- /* @__PURE__ */ l("p", { className: "text-sm text-muted-foreground mb-6 max-w-sm", children: [
3727
- "Start building your JSON schema by adding your first",
3728
- " ",
3729
- g.singular
3730
- ] }),
3731
- /* @__PURE__ */ l(R, { onClick: F, "data-testid": "button-add-first", children: [
3732
- /* @__PURE__ */ n(re, { className: "w-4 h-4 mr-2" }),
3733
- "Add ",
3734
- g.singular
3735
- ] })
3736
- ] }) : /* @__PURE__ */ l(et, { children: [
3737
- /* @__PURE__ */ n("div", { className: "space-y-1", children: h.map((f) => /* @__PURE__ */ n(
3738
- he,
3739
- {
3740
- property: f,
3741
- onUpdate: (q) => u(f.id, q),
3742
- onDelete: () => A(f.id),
3743
- showRegex: N
3744
- },
3745
- f.id
3746
- )) }),
3747
- /* @__PURE__ */ n("div", { className: "pt-6", children: /* @__PURE__ */ l(
3748
- R,
3836
+ /* @__PURE__ */ c("div", { className: "flex-1 flex overflow-hidden", children: [
3837
+ /* @__PURE__ */ n("div", { className: i ? "w-3/5 border-r" : "w-full", children: /* @__PURE__ */ c("div", { className: "h-full flex flex-col", children: [
3838
+ /* @__PURE__ */ c("div", { className: "flex-1 overflow-auto p-2 space-y-4", children: [
3839
+ t && /* @__PURE__ */ n(
3840
+ Nr,
3749
3841
  {
3750
- onClick: F,
3751
- className: "w-full",
3752
- variant: "outline",
3753
- "data-testid": "button-add-property",
3754
- children: [
3755
- /* @__PURE__ */ n(re, { className: "w-4 h-4 mr-2" }),
3756
- "Add ",
3757
- g.singular
3758
- ]
3842
+ title: v.title,
3843
+ description: v.description,
3844
+ version: v.version,
3845
+ onUpdate: (P, O) => A(P, O)
3759
3846
  }
3760
- ) }),
3761
- m && /* @__PURE__ */ l("div", { className: "pt-4 border-t flex items-center justify-between text-sm text-muted-foreground", children: [
3762
- /* @__PURE__ */ l("span", { children: [
3763
- h.length,
3847
+ ),
3848
+ w.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
3849
+ /* @__PURE__ */ n("div", { className: "w-16 h-16 rounded-full bg-muted flex items-center justify-center mb-4", children: /* @__PURE__ */ n(Q, { className: "w-8 h-8 text-muted-foreground" }) }),
3850
+ /* @__PURE__ */ c("h2", { className: "text-lg font-medium mb-2", children: [
3851
+ "No ",
3852
+ d.plural,
3853
+ " yet"
3854
+ ] }),
3855
+ /* @__PURE__ */ c("p", { className: "text-sm text-muted-foreground mb-6 max-w-sm", children: [
3856
+ "Start building your JSON schema by adding your first",
3764
3857
  " ",
3765
- h.length === 1 ? g.singular : g.plural
3858
+ d.singular
3766
3859
  ] }),
3767
- /* @__PURE__ */ l("span", { children: [
3768
- h.filter((f) => f.required).length,
3769
- " required"
3860
+ /* @__PURE__ */ c(
3861
+ L,
3862
+ {
3863
+ onClick: () => j.open(),
3864
+ "data-testid": "button-add-first",
3865
+ children: [
3866
+ /* @__PURE__ */ n(Q, { className: "w-4 h-4 mr-2" }),
3867
+ "Add ",
3868
+ d.singular
3869
+ ]
3870
+ }
3871
+ )
3872
+ ] }) : /* @__PURE__ */ c(Ee, { children: [
3873
+ /* @__PURE__ */ n("div", { className: "space-y-1", children: w.map((P) => /* @__PURE__ */ n(
3874
+ he,
3875
+ {
3876
+ property: P,
3877
+ onUpdate: (O) => p(P.id, O),
3878
+ onDelete: () => N(P.id),
3879
+ showRegex: f,
3880
+ keyEditable: g
3881
+ },
3882
+ P.id
3883
+ )) }),
3884
+ h && /* @__PURE__ */ c("div", { className: "pt-4 border-t flex items-center justify-between text-sm text-muted-foreground", children: [
3885
+ /* @__PURE__ */ c("span", { children: [
3886
+ w.length,
3887
+ " ",
3888
+ w.length === 1 ? d.singular : d.plural
3889
+ ] }),
3890
+ /* @__PURE__ */ c("span", { children: [
3891
+ w.filter((P) => P.required).length,
3892
+ " required"
3893
+ ] })
3770
3894
  ] })
3771
3895
  ] })
3772
- ] })
3896
+ ] }),
3897
+ w.length > 0 && /* @__PURE__ */ n("div", { className: "border-t p-2 pt-4 bg-background", children: /* @__PURE__ */ c(
3898
+ L,
3899
+ {
3900
+ onClick: () => j.open(),
3901
+ className: "w-full",
3902
+ variant: "outline",
3903
+ "data-testid": "button-add-property",
3904
+ children: [
3905
+ /* @__PURE__ */ n(Q, { className: "w-4 h-4" }),
3906
+ "Add ",
3907
+ d.singular
3908
+ ]
3909
+ }
3910
+ ) })
3773
3911
  ] }) }),
3774
- i && /* @__PURE__ */ n("div", { className: "w-2/5", children: /* @__PURE__ */ n(br, { schema: e }) })
3912
+ i && /* @__PURE__ */ n("div", { className: "w-2/5", children: /* @__PURE__ */ n(wr, { schema: e }) })
3775
3913
  ] }),
3776
- y && x && /* @__PURE__ */ n(
3914
+ j.isOpen && j.data && /* @__PURE__ */ n(
3777
3915
  pe,
3778
3916
  {
3779
- property: x,
3780
- open: y,
3917
+ property: j.data,
3918
+ open: j.isOpen,
3781
3919
  isNewProperty: !0,
3782
- onOpenChange: (f) => {
3783
- f || J();
3784
- },
3785
- propertyLabel: g,
3786
- onUpdate: E,
3787
- showRegex: N
3920
+ onOpenChange: j.setIsOpen,
3921
+ propertyLabel: d,
3922
+ onUpdate: j.confirm,
3923
+ showRegex: f,
3924
+ keyEditable: g
3788
3925
  }
3789
3926
  )
3790
3927
  ] }) });
3791
3928
  }
3792
3929
  export {
3793
- Ir as JsonSchemaBuilder
3930
+ Pr as JsonSchemaBuilder
3794
3931
  };
3795
3932
  //# sourceMappingURL=index.js.map