json-schema-builder-react 0.0.3 → 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/README.md +186 -138
- package/dist-lib/components/JsonSchemaBuilder.d.ts +6 -1
- package/dist-lib/components/PropertyDocument.d.ts +2 -1
- package/dist-lib/components/PropertyEditDialog.d.ts +2 -1
- package/dist-lib/components/ui/button.d.ts +1 -1
- package/dist-lib/components/ui/dialog.d.ts +1 -1
- package/dist-lib/hooks/useChildManager.d.ts +60 -0
- package/dist-lib/hooks/useDialogManager.d.ts +75 -0
- package/dist-lib/hooks/useInlineEditor.d.ts +71 -0
- package/dist-lib/hooks/usePropertyEditor.d.ts +1 -1
- package/dist-lib/hooks/useTypeSelector.d.ts +49 -0
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +1182 -1045
- package/dist-lib/index.js.map +1 -1
- package/package.json +8 -7
package/dist-lib/index.js
CHANGED
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { Slot as
|
|
5
|
-
import {
|
|
6
|
-
import * as
|
|
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
|
|
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
|
|
12
|
-
var r, t,
|
|
13
|
-
if (typeof e == "string" || typeof e == "number")
|
|
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
|
|
16
|
-
for (r = 0; r <
|
|
17
|
-
} else for (t in e) e[t] && (
|
|
18
|
-
return
|
|
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
|
|
21
|
-
for (var e, r, t = 0,
|
|
22
|
-
return
|
|
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
|
|
25
|
-
var
|
|
26
|
-
if ((r == null ? void 0 : r.variants) == null) return
|
|
27
|
-
const { variants:
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
}),
|
|
33
|
-
let [
|
|
34
|
-
return
|
|
35
|
-
}, {}),
|
|
36
|
-
let { class:
|
|
37
|
-
return Object.entries(
|
|
38
|
-
let [
|
|
39
|
-
return Array.isArray(
|
|
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
|
-
...
|
|
42
|
-
}[
|
|
41
|
+
...l
|
|
42
|
+
}[x]) : {
|
|
43
43
|
...i,
|
|
44
|
-
...
|
|
45
|
-
}[
|
|
44
|
+
...l
|
|
45
|
+
}[x] === p;
|
|
46
46
|
}) ? [
|
|
47
|
-
...
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
] :
|
|
47
|
+
...m,
|
|
48
|
+
f,
|
|
49
|
+
g
|
|
50
|
+
] : m;
|
|
51
51
|
}, []);
|
|
52
|
-
return
|
|
53
|
-
}, ve = "-",
|
|
54
|
-
const r =
|
|
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:
|
|
56
|
+
conflictingClassGroupModifiers: o
|
|
57
57
|
} = e;
|
|
58
58
|
return {
|
|
59
59
|
getClassGroupId: (s) => {
|
|
60
|
-
const
|
|
61
|
-
return
|
|
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,
|
|
64
|
-
const
|
|
65
|
-
return
|
|
63
|
+
getConflictingClassGroupIds: (s, l) => {
|
|
64
|
+
const h = t[s] || [];
|
|
65
|
+
return l && o[s] ? [...h, ...o[s]] : h;
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
},
|
|
68
|
+
}, Ge = (e, r) => {
|
|
69
69
|
var s;
|
|
70
70
|
if (e.length === 0)
|
|
71
71
|
return r.classGroupId;
|
|
72
|
-
const t = e[0],
|
|
73
|
-
if (
|
|
74
|
-
return
|
|
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:
|
|
80
|
-
}) =>
|
|
81
|
-
},
|
|
82
|
-
if (
|
|
83
|
-
const r =
|
|
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
|
-
},
|
|
87
|
+
}, kt = (e) => {
|
|
88
88
|
const {
|
|
89
89
|
theme: r,
|
|
90
90
|
prefix: t
|
|
91
|
-
} = e,
|
|
91
|
+
} = e, o = {
|
|
92
92
|
nextPart: /* @__PURE__ */ new Map(),
|
|
93
93
|
validators: []
|
|
94
94
|
};
|
|
95
|
-
return
|
|
96
|
-
le(s,
|
|
97
|
-
}),
|
|
98
|
-
}, le = (e, r, t,
|
|
99
|
-
e.forEach((
|
|
100
|
-
if (typeof
|
|
101
|
-
const i =
|
|
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
|
|
106
|
-
if (
|
|
107
|
-
le(o
|
|
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:
|
|
111
|
+
validator: a,
|
|
112
112
|
classGroupId: t
|
|
113
113
|
});
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
Object.entries(
|
|
117
|
-
le(s,
|
|
116
|
+
Object.entries(a).forEach(([i, s]) => {
|
|
117
|
+
le(s, Ae(r, i), t, o);
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
|
-
},
|
|
120
|
+
}, Ae = (e, r) => {
|
|
121
121
|
let t = e;
|
|
122
|
-
return r.split(ve).forEach((
|
|
123
|
-
t.nextPart.has(
|
|
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(
|
|
126
|
+
}), t = t.nextPart.get(o);
|
|
127
127
|
}), t;
|
|
128
|
-
},
|
|
129
|
-
const
|
|
130
|
-
return [t,
|
|
131
|
-
}) : 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(),
|
|
140
|
-
const
|
|
141
|
-
t.set(i, s), r++, r > e && (r = 0,
|
|
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 =
|
|
149
|
-
return
|
|
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) :
|
|
152
|
+
t.has(i) ? t.set(i, s) : a(i, s);
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
|
-
}, Ve = "!",
|
|
155
|
+
}, Ve = "!", zt = (e) => {
|
|
156
156
|
const {
|
|
157
157
|
separator: r,
|
|
158
158
|
experimentalParseClassName: t
|
|
159
|
-
} = e,
|
|
160
|
-
const
|
|
161
|
-
let
|
|
162
|
-
for (let
|
|
163
|
-
let
|
|
164
|
-
if (
|
|
165
|
-
if (
|
|
166
|
-
|
|
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 (
|
|
170
|
-
|
|
169
|
+
if (N === "/") {
|
|
170
|
+
f = p;
|
|
171
171
|
continue;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
N === "[" ? m++ : N === "]" && m--;
|
|
175
175
|
}
|
|
176
|
-
const
|
|
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:
|
|
179
|
-
hasImportantModifier:
|
|
180
|
-
baseClassName:
|
|
181
|
-
maybePostfixModifierPosition:
|
|
178
|
+
modifiers: h,
|
|
179
|
+
hasImportantModifier: w,
|
|
180
|
+
baseClassName: v,
|
|
181
|
+
maybePostfixModifierPosition: x
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
|
-
return t ? (
|
|
185
|
-
className:
|
|
184
|
+
return t ? (l) => t({
|
|
185
|
+
className: l,
|
|
186
186
|
parseClassName: s
|
|
187
187
|
}) : s;
|
|
188
|
-
},
|
|
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((
|
|
194
|
-
|
|
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
|
-
},
|
|
197
|
-
cache:
|
|
198
|
-
parseClassName:
|
|
199
|
-
...
|
|
200
|
-
}),
|
|
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:
|
|
204
|
-
getConflictingClassGroupIds:
|
|
205
|
-
} = r, i = [], s = e.trim().split(
|
|
206
|
-
let
|
|
207
|
-
for (let
|
|
208
|
-
const
|
|
209
|
-
modifiers:
|
|
210
|
-
hasImportantModifier:
|
|
211
|
-
baseClassName:
|
|
212
|
-
maybePostfixModifierPosition:
|
|
213
|
-
} = t(
|
|
214
|
-
let
|
|
215
|
-
if (!
|
|
216
|
-
if (!
|
|
217
|
-
|
|
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 (
|
|
221
|
-
|
|
220
|
+
if (x = o(g), !x) {
|
|
221
|
+
l = m + (l.length > 0 ? " " + l : l);
|
|
222
222
|
continue;
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
v = !1;
|
|
225
225
|
}
|
|
226
|
-
const
|
|
227
|
-
if (i.includes(
|
|
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(
|
|
230
|
-
const
|
|
231
|
-
for (let
|
|
232
|
-
const
|
|
233
|
-
i.push(
|
|
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
|
-
|
|
235
|
+
l = m + (l.length > 0 ? " " + l : l);
|
|
236
236
|
}
|
|
237
|
-
return
|
|
237
|
+
return l;
|
|
238
238
|
};
|
|
239
|
-
function
|
|
240
|
-
let e = 0, r, t,
|
|
239
|
+
function Lt() {
|
|
240
|
+
let e = 0, r, t, o = "";
|
|
241
241
|
for (; e < arguments.length; )
|
|
242
|
-
(r = arguments[e++]) && (t =
|
|
243
|
-
return
|
|
242
|
+
(r = arguments[e++]) && (t = $e(r)) && (o && (o += " "), o += t);
|
|
243
|
+
return o;
|
|
244
244
|
}
|
|
245
|
-
const
|
|
245
|
+
const $e = (e) => {
|
|
246
246
|
if (typeof e == "string")
|
|
247
247
|
return e;
|
|
248
248
|
let r, t = "";
|
|
249
|
-
for (let
|
|
250
|
-
e[
|
|
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
|
|
254
|
-
let t,
|
|
255
|
-
function s(
|
|
256
|
-
const
|
|
257
|
-
return t =
|
|
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
|
|
260
|
-
const
|
|
261
|
-
if (
|
|
262
|
-
return
|
|
263
|
-
const
|
|
264
|
-
return
|
|
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(
|
|
267
|
+
return i(Lt.apply(null, arguments));
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
const
|
|
270
|
+
const I = (e) => {
|
|
271
271
|
const r = (t) => t[e] || [];
|
|
272
272
|
return r.isThemeGetter = !0, r;
|
|
273
|
-
},
|
|
274
|
-
const
|
|
275
|
-
return
|
|
276
|
-
},
|
|
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
|
-
|
|
281
|
-
),
|
|
282
|
-
const e =
|
|
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: [
|
|
288
|
-
spacing: [
|
|
289
|
-
blur: ["none", "",
|
|
290
|
-
brightness:
|
|
287
|
+
colors: [Z],
|
|
288
|
+
spacing: [F, G],
|
|
289
|
+
blur: ["none", "", V, y],
|
|
290
|
+
brightness: q(),
|
|
291
291
|
borderColor: [e],
|
|
292
|
-
borderRadius: ["none", "", "full",
|
|
293
|
-
borderSpacing:
|
|
294
|
-
borderWidth:
|
|
295
|
-
contrast:
|
|
296
|
-
grayscale:
|
|
297
|
-
hueRotate:
|
|
298
|
-
invert:
|
|
299
|
-
gap:
|
|
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: [
|
|
302
|
-
inset:
|
|
303
|
-
margin:
|
|
304
|
-
opacity:
|
|
305
|
-
padding:
|
|
306
|
-
saturate:
|
|
307
|
-
scale:
|
|
308
|
-
sepia:
|
|
309
|
-
skew:
|
|
310
|
-
space:
|
|
311
|
-
translate:
|
|
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",
|
|
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: [
|
|
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":
|
|
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":
|
|
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: [...
|
|
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:
|
|
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":
|
|
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":
|
|
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:
|
|
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":
|
|
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":
|
|
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: [
|
|
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": [
|
|
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": [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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",
|
|
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:
|
|
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",
|
|
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:
|
|
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:
|
|
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",
|
|
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": [
|
|
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",
|
|
593
|
-
},
|
|
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":
|
|
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":
|
|
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": [
|
|
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: [
|
|
623
|
-
},
|
|
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":
|
|
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":
|
|
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",
|
|
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",
|
|
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: [
|
|
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": [
|
|
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": [
|
|
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", ...
|
|
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", ...
|
|
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": [...
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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": [
|
|
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": [
|
|
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",
|
|
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": [
|
|
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": [
|
|
916
|
-
screen: [
|
|
917
|
-
},
|
|
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: [
|
|
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": [
|
|
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": [
|
|
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: [
|
|
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",
|
|
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: [
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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": [
|
|
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": [
|
|
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: [...
|
|
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",
|
|
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",
|
|
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:
|
|
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",
|
|
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",
|
|
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": [
|
|
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: [...
|
|
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",
|
|
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
|
-
},
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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: [...
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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:
|
|
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: [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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: [
|
|
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: ["", ...
|
|
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": [
|
|
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: [
|
|
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:
|
|
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": [
|
|
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": [
|
|
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",
|
|
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: [
|
|
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: [
|
|
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": [...
|
|
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":
|
|
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: [
|
|
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: [
|
|
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",
|
|
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: [
|
|
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": [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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",
|
|
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:
|
|
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",
|
|
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:
|
|
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",
|
|
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: [
|
|
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": [
|
|
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": [
|
|
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: [
|
|
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": [
|
|
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": [
|
|
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",
|
|
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",
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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",
|
|
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: [
|
|
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
|
-
},
|
|
2310
|
+
}, Yt = /* @__PURE__ */ Et(Qt);
|
|
2311
2311
|
function C(...e) {
|
|
2312
|
-
return
|
|
2312
|
+
return Yt(Fe(e));
|
|
2313
2313
|
}
|
|
2314
|
-
const
|
|
2315
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-
|
|
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
|
|
2320
|
-
destructive: "bg-destructive text-destructive-foreground
|
|
2321
|
-
outline:
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
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: "
|
|
2335
|
-
sm: "
|
|
2336
|
-
lg: "
|
|
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
|
-
),
|
|
2346
|
-
({ className: e, variant: r, size: t, asChild:
|
|
2347
|
-
|
|
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(
|
|
2342
|
+
className: C(er({ variant: r, size: t, className: e })),
|
|
2350
2343
|
ref: i,
|
|
2351
|
-
...
|
|
2344
|
+
...a
|
|
2352
2345
|
}
|
|
2353
2346
|
)
|
|
2354
2347
|
);
|
|
2355
|
-
|
|
2356
|
-
const
|
|
2357
|
-
({ className: e, type: r, ...t },
|
|
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-
|
|
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:
|
|
2358
|
+
ref: o,
|
|
2366
2359
|
...t
|
|
2367
2360
|
}
|
|
2368
2361
|
)
|
|
2369
2362
|
);
|
|
2370
|
-
|
|
2371
|
-
const
|
|
2372
|
-
|
|
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:
|
|
2367
|
+
ref: o,
|
|
2375
2368
|
sideOffset: r,
|
|
2376
2369
|
className: C(
|
|
2377
|
-
"z-50 overflow-hidden rounded-md
|
|
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
|
-
|
|
2384
|
-
const
|
|
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
|
|
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
|
-
|
|
2396
|
-
const
|
|
2397
|
-
/* @__PURE__ */ n(
|
|
2398
|
-
/* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
2410
|
-
/* @__PURE__ */ n(
|
|
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
|
-
|
|
2418
|
-
const
|
|
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
|
-
|
|
2432
|
-
const
|
|
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
|
-
|
|
2446
|
-
const
|
|
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
|
-
|
|
2458
|
-
const
|
|
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
|
-
|
|
2467
|
-
const
|
|
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
|
-
),
|
|
2470
|
-
|
|
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(
|
|
2570
|
+
className: C(dr(), e),
|
|
2553
2571
|
...r
|
|
2554
2572
|
}
|
|
2555
2573
|
));
|
|
2556
|
-
|
|
2557
|
-
const
|
|
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
|
|
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("
|
|
2595
|
-
children: /* @__PURE__ */ n(
|
|
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 =
|
|
2594
|
+
const xe = S.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n(
|
|
2602
2595
|
"textarea",
|
|
2603
2596
|
{
|
|
2604
2597
|
className: C(
|
|
2605
|
-
"flex min-h-[
|
|
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
|
|
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 =
|
|
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
|
-
},
|
|
2640
|
+
}, et = nt({
|
|
2648
2641
|
getTypeLabel: (e) => ue[e],
|
|
2649
2642
|
typeLabels: ue
|
|
2650
2643
|
});
|
|
2651
|
-
function
|
|
2644
|
+
function ur({
|
|
2652
2645
|
children: e,
|
|
2653
2646
|
customLabels: r = {}
|
|
2654
2647
|
}) {
|
|
2655
|
-
const t = { ...ue, ...r },
|
|
2656
|
-
return /* @__PURE__ */ n(
|
|
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
|
|
2659
|
-
return
|
|
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:
|
|
2666
|
-
isArrayItem:
|
|
2658
|
+
onUpdate: o,
|
|
2659
|
+
isArrayItem: a = !1,
|
|
2667
2660
|
isNewProperty: i = !1,
|
|
2668
2661
|
propertyLabel: s = { singular: "Property", plural: "Properties" },
|
|
2669
|
-
showRegex:
|
|
2662
|
+
showRegex: l = !1,
|
|
2663
|
+
keyEditable: h = !1
|
|
2670
2664
|
}) {
|
|
2671
|
-
var
|
|
2672
|
-
const { typeLabels: m } =
|
|
2665
|
+
var A;
|
|
2666
|
+
const { typeLabels: m } = tt(), [d, f] = B(e);
|
|
2673
2667
|
be(() => {
|
|
2674
|
-
r &&
|
|
2668
|
+
r && f(e);
|
|
2675
2669
|
}, [e, r]);
|
|
2676
2670
|
const {
|
|
2677
|
-
handleTitleChange:
|
|
2678
|
-
handleTitleBlur:
|
|
2679
|
-
handleKeyChange:
|
|
2680
|
-
handleFieldChange:
|
|
2671
|
+
handleTitleChange: g,
|
|
2672
|
+
handleTitleBlur: w,
|
|
2673
|
+
handleKeyChange: v,
|
|
2674
|
+
handleFieldChange: x,
|
|
2681
2675
|
handleConstraintChange: p
|
|
2682
|
-
} =
|
|
2676
|
+
} = mr(d, f, i, h), N = () => {
|
|
2683
2677
|
var u;
|
|
2684
|
-
(u = d.title) != null && u.trim() && (
|
|
2685
|
-
},
|
|
2686
|
-
|
|
2678
|
+
(u = d.title) != null && u.trim() && (o(d), t(!1));
|
|
2679
|
+
}, b = () => {
|
|
2680
|
+
f(e), t(!1);
|
|
2687
2681
|
};
|
|
2688
|
-
return /* @__PURE__ */ n(
|
|
2689
|
-
|
|
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(
|
|
2695
|
-
/* @__PURE__ */
|
|
2696
|
-
/* @__PURE__ */
|
|
2697
|
-
/* @__PURE__ */
|
|
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__ */
|
|
2702
|
-
|
|
2695
|
+
/* @__PURE__ */ c(
|
|
2696
|
+
de,
|
|
2703
2697
|
{
|
|
2704
2698
|
value: d.type,
|
|
2705
|
-
onValueChange: (u) =>
|
|
2699
|
+
onValueChange: (u) => x("type", u),
|
|
2706
2700
|
"data-testid": "select-type-dialog",
|
|
2707
2701
|
children: [
|
|
2708
|
-
/* @__PURE__ */ n(
|
|
2709
|
-
/* @__PURE__ */
|
|
2710
|
-
/* @__PURE__ */ n(
|
|
2711
|
-
/* @__PURE__ */ n(
|
|
2712
|
-
/* @__PURE__ */ n(
|
|
2713
|
-
/* @__PURE__ */ n(
|
|
2714
|
-
/* @__PURE__ */ n(
|
|
2715
|
-
/* @__PURE__ */ n(
|
|
2716
|
-
/* @__PURE__ */ n(
|
|
2717
|
-
/* @__PURE__ */ n(
|
|
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__ */
|
|
2724
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
2723
|
+
E,
|
|
2730
2724
|
{
|
|
2731
2725
|
value: d.title || "",
|
|
2732
|
-
onChange: (u) =>
|
|
2733
|
-
onBlur:
|
|
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__ */
|
|
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__ */
|
|
2745
|
-
/* @__PURE__ */ n(
|
|
2738
|
+
(i || h) && /* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
2739
|
+
/* @__PURE__ */ n(T, { children: "Key" }),
|
|
2746
2740
|
/* @__PURE__ */ n(
|
|
2747
|
-
|
|
2741
|
+
E,
|
|
2748
2742
|
{
|
|
2749
2743
|
value: d.key,
|
|
2750
|
-
onChange: (u) =>
|
|
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__ */
|
|
2757
|
-
/* @__PURE__ */ n(
|
|
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) =>
|
|
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__ */
|
|
2770
|
-
/* @__PURE__ */
|
|
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__ */
|
|
2775
|
-
/* @__PURE__ */
|
|
2776
|
-
/* @__PURE__ */ n(
|
|
2777
|
-
/* @__PURE__ */
|
|
2778
|
-
|
|
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) =>
|
|
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(
|
|
2790
|
-
/* @__PURE__ */
|
|
2791
|
-
/* @__PURE__ */ n(
|
|
2792
|
-
/* @__PURE__ */ n(
|
|
2793
|
-
/* @__PURE__ */ n(
|
|
2794
|
-
/* @__PURE__ */ n(
|
|
2795
|
-
/* @__PURE__ */ n(
|
|
2796
|
-
/* @__PURE__ */ n(
|
|
2797
|
-
/* @__PURE__ */ n(
|
|
2798
|
-
/* @__PURE__ */ n(
|
|
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__ */
|
|
2805
|
-
/* @__PURE__ */ n(
|
|
2799
|
+
/* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
2800
|
+
/* @__PURE__ */ n(T, { children: "Item Title" }),
|
|
2806
2801
|
/* @__PURE__ */ n(
|
|
2807
|
-
|
|
2802
|
+
E,
|
|
2808
2803
|
{
|
|
2809
2804
|
value: d.items.title || "",
|
|
2810
|
-
onChange: (u) =>
|
|
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__ */
|
|
2822
|
-
|
|
2816
|
+
/* @__PURE__ */ c(
|
|
2817
|
+
L,
|
|
2823
2818
|
{
|
|
2824
2819
|
variant: "ghost",
|
|
2825
2820
|
size: "sm",
|
|
2826
2821
|
className: "mt-2",
|
|
2827
|
-
onClick: () =>
|
|
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__ */
|
|
2836
|
-
|
|
2830
|
+
] }) : /* @__PURE__ */ c(
|
|
2831
|
+
L,
|
|
2837
2832
|
{
|
|
2838
2833
|
variant: "outline",
|
|
2839
2834
|
size: "sm",
|
|
2840
2835
|
onClick: () => {
|
|
2841
|
-
|
|
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
|
-
!
|
|
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) =>
|
|
2860
|
+
onCheckedChange: (u) => x("required", u),
|
|
2866
2861
|
"data-testid": "checkbox-edit-required"
|
|
2867
2862
|
}
|
|
2868
2863
|
),
|
|
2869
|
-
/* @__PURE__ */ n(
|
|
2864
|
+
/* @__PURE__ */ n(T, { htmlFor: "prop-required", className: "cursor-pointer", children: "Required field" })
|
|
2870
2865
|
] }),
|
|
2871
|
-
d.type === "string" && /* @__PURE__ */
|
|
2872
|
-
/* @__PURE__ */ n("summary", { className: "p-4 cursor-pointer hover:bg-accent/50 transition-colors", children: /* @__PURE__ */
|
|
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__ */
|
|
2877
|
-
/* @__PURE__ */
|
|
2878
|
-
/* @__PURE__ */
|
|
2879
|
-
/* @__PURE__ */ n(
|
|
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
|
-
|
|
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__ */
|
|
2896
|
-
/* @__PURE__ */ n(
|
|
2890
|
+
/* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
2891
|
+
/* @__PURE__ */ n(T, { htmlFor: "max-length", children: "Maximum Length" }),
|
|
2897
2892
|
/* @__PURE__ */ n(
|
|
2898
|
-
|
|
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
|
-
|
|
2914
|
-
/* @__PURE__ */ n(
|
|
2908
|
+
l && /* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
2909
|
+
/* @__PURE__ */ n(T, { htmlFor: "pattern", children: "Pattern (regex)" }),
|
|
2915
2910
|
/* @__PURE__ */ n(
|
|
2916
|
-
|
|
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__ */
|
|
2928
|
-
/* @__PURE__ */ n(
|
|
2929
|
-
/* @__PURE__ */ n("div", { className: "space-y-2", children: [...d.enum || [], ""].map((u,
|
|
2930
|
-
var
|
|
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
|
-
|
|
2927
|
+
E,
|
|
2933
2928
|
{
|
|
2934
|
-
placeholder:
|
|
2929
|
+
placeholder: j === ((($ = d.enum) == null ? void 0 : $.length) || 0) ? "Add new value..." : "Enum value",
|
|
2935
2930
|
value: u,
|
|
2936
|
-
onChange: (
|
|
2937
|
-
const
|
|
2938
|
-
if (
|
|
2939
|
-
|
|
2940
|
-
...
|
|
2941
|
-
|
|
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 (
|
|
2944
|
-
const
|
|
2945
|
-
|
|
2938
|
+
else if (P.trim()) {
|
|
2939
|
+
const M = [...O];
|
|
2940
|
+
M[j] = P.trim(), p("enum", M);
|
|
2946
2941
|
} else {
|
|
2947
|
-
const
|
|
2948
|
-
(
|
|
2942
|
+
const M = O.filter(
|
|
2943
|
+
(Y, k) => k !== j
|
|
2949
2944
|
);
|
|
2950
2945
|
p(
|
|
2951
2946
|
"enum",
|
|
2952
|
-
|
|
2947
|
+
M.length > 0 ? M : void 0
|
|
2953
2948
|
);
|
|
2954
2949
|
}
|
|
2955
2950
|
},
|
|
2956
|
-
"data-testid": `input-edit-enum-${
|
|
2951
|
+
"data-testid": `input-edit-enum-${j}`
|
|
2957
2952
|
},
|
|
2958
|
-
|
|
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__ */
|
|
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__ */
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */ n(
|
|
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
|
-
|
|
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__ */
|
|
2986
|
-
/* @__PURE__ */ n(
|
|
2980
|
+
/* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
2981
|
+
/* @__PURE__ */ n(T, { htmlFor: "maximum", children: "Maximum Value" }),
|
|
2987
2982
|
/* @__PURE__ */ n(
|
|
2988
|
-
|
|
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__ */
|
|
3005
|
-
/* @__PURE__ */ n("summary", { className: "p-4 cursor-pointer hover:bg-accent/50 transition-colors", children: /* @__PURE__ */
|
|
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__ */
|
|
3010
|
-
/* @__PURE__ */
|
|
3011
|
-
/* @__PURE__ */
|
|
3012
|
-
/* @__PURE__ */ n(
|
|
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
|
-
|
|
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__ */
|
|
3029
|
-
/* @__PURE__ */ n(
|
|
3023
|
+
/* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
3024
|
+
/* @__PURE__ */ n(T, { htmlFor: "max-items", children: "Maximum Items" }),
|
|
3030
3025
|
/* @__PURE__ */ n(
|
|
3031
|
-
|
|
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__ */
|
|
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(
|
|
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__ */
|
|
3056
|
+
/* @__PURE__ */ c(Qe, { className: "px-6 py-4 border-t bg-background shrink-0", children: [
|
|
3062
3057
|
/* @__PURE__ */ n(
|
|
3063
|
-
|
|
3058
|
+
L,
|
|
3064
3059
|
{
|
|
3065
3060
|
variant: "outline",
|
|
3066
|
-
onClick:
|
|
3061
|
+
onClick: b,
|
|
3067
3062
|
"data-testid": "button-cancel",
|
|
3068
3063
|
children: "Cancel"
|
|
3069
3064
|
}
|
|
3070
3065
|
),
|
|
3071
3066
|
/* @__PURE__ */ n(
|
|
3072
|
-
|
|
3067
|
+
L,
|
|
3073
3068
|
{
|
|
3074
|
-
onClick:
|
|
3069
|
+
onClick: N,
|
|
3075
3070
|
"data-testid": "button-save",
|
|
3076
|
-
disabled: !((
|
|
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:
|
|
3091
|
-
isArrayItem:
|
|
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:
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
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
|
-
}[
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
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
|
-
|
|
3154
|
-
|
|
3221
|
+
d.isEditing ? /* @__PURE__ */ n(
|
|
3222
|
+
E,
|
|
3155
3223
|
{
|
|
3156
|
-
value:
|
|
3157
|
-
onChange: (
|
|
3158
|
-
onBlur:
|
|
3159
|
-
onKeyDown:
|
|
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:
|
|
3229
|
+
className: N,
|
|
3162
3230
|
placeholder: "Enter title"
|
|
3163
3231
|
}
|
|
3164
|
-
) : /* @__PURE__ */
|
|
3165
|
-
/* @__PURE__ */
|
|
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: `${
|
|
3170
|
-
onClick:
|
|
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
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
e.type
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
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
|
-
|
|
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:
|
|
3283
|
+
onClick: w.addChild,
|
|
3196
3284
|
"data-testid": `button-add-child-${e.id}`,
|
|
3197
|
-
children: /* @__PURE__ */ n(
|
|
3285
|
+
children: /* @__PURE__ */ n(Q, { className: "!w-5 !h-5" })
|
|
3198
3286
|
}
|
|
3199
3287
|
)
|
|
3200
3288
|
] }),
|
|
3201
|
-
|
|
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__ */
|
|
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
|
-
|
|
3320
|
+
L,
|
|
3214
3321
|
{
|
|
3215
3322
|
variant: "ghost",
|
|
3216
3323
|
size: "icon",
|
|
3217
3324
|
className: "h-7 w-7",
|
|
3218
|
-
onClick: () => m(
|
|
3325
|
+
onClick: () => m.open(e),
|
|
3219
3326
|
"data-testid": `button-edit-${e.id}`,
|
|
3220
|
-
children: /* @__PURE__ */ n(
|
|
3327
|
+
children: /* @__PURE__ */ n(ht, { className: "w-3 h-3" })
|
|
3221
3328
|
}
|
|
3222
3329
|
),
|
|
3223
|
-
|
|
3224
|
-
|
|
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:
|
|
3336
|
+
onClick: w.addChild,
|
|
3230
3337
|
"data-testid": `button-add-child-${e.id}`,
|
|
3231
|
-
children: /* @__PURE__ */ n(
|
|
3338
|
+
children: /* @__PURE__ */ n(Q, { className: "w-3 h-3" })
|
|
3232
3339
|
}
|
|
3233
3340
|
),
|
|
3234
3341
|
/* @__PURE__ */ n(
|
|
3235
|
-
|
|
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(
|
|
3349
|
+
children: /* @__PURE__ */ n(De, { className: "w-3 h-3" })
|
|
3243
3350
|
}
|
|
3244
3351
|
)
|
|
3245
3352
|
] })
|
|
3246
3353
|
] }),
|
|
3247
|
-
|
|
3354
|
+
p && /* @__PURE__ */ n(
|
|
3248
3355
|
"div",
|
|
3249
3356
|
{
|
|
3250
|
-
className:
|
|
3251
|
-
children: e.children.map((
|
|
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:
|
|
3255
|
-
onUpdate: (
|
|
3256
|
-
onDelete: () =>
|
|
3257
|
-
level:
|
|
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
|
-
|
|
3368
|
+
b.id
|
|
3261
3369
|
))
|
|
3262
3370
|
}
|
|
3263
3371
|
),
|
|
3264
|
-
e.type === "array" && e.items && /* @__PURE__ */
|
|
3372
|
+
e.type === "array" && e.items && /* @__PURE__ */ c(
|
|
3265
3373
|
"div",
|
|
3266
3374
|
{
|
|
3267
|
-
className:
|
|
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__ */
|
|
3270
|
-
|
|
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: (
|
|
3385
|
+
onUpdate: (b) => r({ ...e, items: b }),
|
|
3278
3386
|
onDelete: () => r({ ...e, items: void 0 }),
|
|
3279
|
-
level:
|
|
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:
|
|
3292
|
-
onOpenChange: m,
|
|
3293
|
-
onUpdate:
|
|
3294
|
-
|
|
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
|
-
|
|
3411
|
+
w.addChildDialog.isOpen && w.addChildDialog.data && /* @__PURE__ */ n(
|
|
3300
3412
|
pe,
|
|
3301
3413
|
{
|
|
3302
|
-
property:
|
|
3303
|
-
open:
|
|
3414
|
+
property: w.addChildDialog.data,
|
|
3415
|
+
open: w.addChildDialog.isOpen,
|
|
3304
3416
|
isNewProperty: !0,
|
|
3305
|
-
onOpenChange:
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
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
|
|
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
|
-
"
|
|
3430
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
3320
3431
|
e
|
|
3321
3432
|
),
|
|
3322
3433
|
...r
|
|
3323
3434
|
}
|
|
3324
3435
|
));
|
|
3325
|
-
|
|
3326
|
-
const
|
|
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
|
-
|
|
3335
|
-
const
|
|
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
|
-
|
|
3347
|
-
const
|
|
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
|
-
|
|
3356
|
-
const
|
|
3357
|
-
|
|
3358
|
-
const
|
|
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
|
-
|
|
3367
|
-
const
|
|
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 = (
|
|
3477
|
+
t.type = "file", t.accept = ".json", t.onchange = (o) => {
|
|
3370
3478
|
var s;
|
|
3371
|
-
const
|
|
3372
|
-
if (!
|
|
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 = (
|
|
3378
|
-
var
|
|
3485
|
+
i.onload = (l) => {
|
|
3486
|
+
var h;
|
|
3379
3487
|
try {
|
|
3380
|
-
const
|
|
3381
|
-
e(
|
|
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(
|
|
3493
|
+
}, i.onerror = () => r(new Error("Failed to read file")), i.readAsText(a);
|
|
3386
3494
|
}, t.click();
|
|
3387
|
-
}),
|
|
3388
|
-
const t = JSON.stringify(e, null, 2),
|
|
3389
|
-
i.href =
|
|
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
|
|
3392
|
-
const [r, t] =
|
|
3393
|
-
return /* @__PURE__ */
|
|
3394
|
-
/* @__PURE__ */
|
|
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__ */
|
|
3504
|
+
/* @__PURE__ */ c("div", { className: "flex gap-2", children: [
|
|
3397
3505
|
/* @__PURE__ */ n(
|
|
3398
|
-
|
|
3506
|
+
L,
|
|
3399
3507
|
{
|
|
3400
3508
|
variant: "outline",
|
|
3401
3509
|
size: "sm",
|
|
3402
3510
|
onClick: async () => {
|
|
3403
|
-
await navigator.clipboard.writeText(
|
|
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(
|
|
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
|
-
|
|
3518
|
+
L,
|
|
3411
3519
|
{
|
|
3412
3520
|
variant: "outline",
|
|
3413
3521
|
size: "sm",
|
|
3414
3522
|
onClick: () => {
|
|
3415
|
-
|
|
3523
|
+
rt(e, "schema.json");
|
|
3416
3524
|
},
|
|
3417
3525
|
"data-testid": "button-download",
|
|
3418
|
-
children: /* @__PURE__ */ n(
|
|
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(
|
|
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:
|
|
3536
|
+
children: /* @__PURE__ */ n("code", { children: o })
|
|
3429
3537
|
}
|
|
3430
3538
|
) }) })
|
|
3431
3539
|
] });
|
|
3432
3540
|
}
|
|
3433
|
-
function
|
|
3541
|
+
function Nr({
|
|
3434
3542
|
title: e,
|
|
3435
3543
|
description: r,
|
|
3436
3544
|
version: t,
|
|
3437
|
-
onUpdate:
|
|
3545
|
+
onUpdate: o
|
|
3438
3546
|
}) {
|
|
3439
|
-
const [
|
|
3440
|
-
return /* @__PURE__ */
|
|
3441
|
-
/* @__PURE__ */
|
|
3442
|
-
|
|
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(!
|
|
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
|
-
|
|
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
|
-
|
|
3455
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
|
|
3573
|
+
E,
|
|
3466
3574
|
{
|
|
3467
3575
|
id: "schema-title",
|
|
3468
3576
|
placeholder: "My Schema",
|
|
3469
3577
|
value: e,
|
|
3470
|
-
onChange: (s) =>
|
|
3578
|
+
onChange: (s) => o("title", s.target.value),
|
|
3471
3579
|
"data-testid": "input-title"
|
|
3472
3580
|
}
|
|
3473
3581
|
)
|
|
3474
3582
|
] }),
|
|
3475
|
-
/* @__PURE__ */
|
|
3583
|
+
/* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
3476
3584
|
/* @__PURE__ */ n(
|
|
3477
|
-
|
|
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) =>
|
|
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__ */
|
|
3605
|
+
/* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
3498
3606
|
/* @__PURE__ */ n(
|
|
3499
|
-
|
|
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
|
-
|
|
3615
|
+
E,
|
|
3508
3616
|
{
|
|
3509
3617
|
id: "schema-version",
|
|
3510
3618
|
placeholder: "1.0.0",
|
|
3511
3619
|
value: t,
|
|
3512
|
-
onChange: (s) =>
|
|
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
|
|
3521
|
-
const
|
|
3628
|
+
const re = (e, r, t = !0) => {
|
|
3629
|
+
const o = {
|
|
3522
3630
|
type: "object"
|
|
3523
3631
|
};
|
|
3524
|
-
t && r && (r.title && (
|
|
3525
|
-
const
|
|
3526
|
-
Object.keys(
|
|
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 && (
|
|
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
|
|
3534
|
-
if (t.title && (
|
|
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
|
-
|
|
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 && (
|
|
3647
|
+
i.length > 0 && (a.required = i);
|
|
3540
3648
|
}
|
|
3541
|
-
r[t.key] =
|
|
3649
|
+
r[t.key] = a;
|
|
3542
3650
|
}), r;
|
|
3543
|
-
},
|
|
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,
|
|
3557
|
-
const
|
|
3558
|
-
let i = typeof
|
|
3559
|
-
i === "string" &&
|
|
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
|
|
3671
|
+
title: typeof a.title == "string" ? a.title : void 0,
|
|
3564
3672
|
type: i,
|
|
3565
|
-
description: typeof
|
|
3673
|
+
description: typeof a.description == "string" ? a.description : void 0,
|
|
3566
3674
|
required: r.includes(t)
|
|
3567
3675
|
};
|
|
3568
|
-
return
|
|
3569
|
-
{ item:
|
|
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((
|
|
3572
|
-
|
|
3573
|
-
Array.isArray(
|
|
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
|
-
}) : [],
|
|
3683
|
+
}) : [], kr = ({
|
|
3576
3684
|
schema: e,
|
|
3577
3685
|
onChange: r,
|
|
3578
3686
|
includeMetadata: t = !0
|
|
3579
3687
|
}) => {
|
|
3580
|
-
const { properties:
|
|
3581
|
-
() =>
|
|
3688
|
+
const { properties: o, metadata: a } = ot(
|
|
3689
|
+
() => Cr(e),
|
|
3582
3690
|
[e]
|
|
3583
|
-
), i =
|
|
3691
|
+
), i = o, s = a || {
|
|
3584
3692
|
title: "",
|
|
3585
3693
|
description: "",
|
|
3586
3694
|
version: ""
|
|
3587
|
-
},
|
|
3695
|
+
}, l = _(() => ({
|
|
3588
3696
|
id: we(),
|
|
3589
3697
|
key: "",
|
|
3590
3698
|
type: "string",
|
|
3591
3699
|
required: !1
|
|
3592
|
-
}), []),
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
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
|
-
}, [
|
|
3608
|
-
|
|
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:
|
|
3617
|
-
updateProperty:
|
|
3618
|
-
deleteProperty:
|
|
3619
|
-
clearAll:
|
|
3620
|
-
updateMetadata:
|
|
3621
|
-
importSchema:
|
|
3622
|
-
downloadSchema:
|
|
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
|
|
3626
|
-
const [e, r] =
|
|
3754
|
+
function Ir() {
|
|
3755
|
+
const [e, r] = B("light");
|
|
3627
3756
|
return be(() => {
|
|
3628
|
-
const
|
|
3629
|
-
r(
|
|
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
|
-
|
|
3760
|
+
L,
|
|
3632
3761
|
{
|
|
3633
3762
|
variant: "ghost",
|
|
3634
3763
|
size: "icon",
|
|
3635
3764
|
onClick: () => {
|
|
3636
|
-
const
|
|
3637
|
-
r(
|
|
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(
|
|
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
|
|
3773
|
+
function Pr({
|
|
3645
3774
|
schema: e,
|
|
3646
3775
|
onChange: r,
|
|
3647
3776
|
showMetadata: t = !1,
|
|
3648
|
-
showImport:
|
|
3649
|
-
showClear:
|
|
3777
|
+
showImport: o = !0,
|
|
3778
|
+
showClear: a = !0,
|
|
3650
3779
|
showOutput: i = !0,
|
|
3651
3780
|
showHeader: s = !0,
|
|
3652
|
-
className:
|
|
3653
|
-
showSummary:
|
|
3654
|
-
typeLabels:
|
|
3655
|
-
propertyLabel:
|
|
3656
|
-
showRegex:
|
|
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
|
|
3659
|
-
properties:
|
|
3788
|
+
const {
|
|
3789
|
+
properties: w,
|
|
3660
3790
|
metadata: v,
|
|
3661
|
-
addProperty:
|
|
3662
|
-
updateProperty:
|
|
3663
|
-
deleteProperty:
|
|
3664
|
-
clearAll:
|
|
3665
|
-
updateMetadata:
|
|
3666
|
-
importSchema:
|
|
3667
|
-
} =
|
|
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
|
-
}),
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
},
|
|
3677
|
-
|
|
3678
|
-
},
|
|
3679
|
-
|
|
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(
|
|
3684
|
-
s && /* @__PURE__ */ n("header", { className: "h-16 border-b flex items-center justify-between px-6", children: /* @__PURE__ */
|
|
3685
|
-
|
|
3686
|
-
|
|
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:
|
|
3818
|
+
onClick: K,
|
|
3691
3819
|
"data-testid": "button-import",
|
|
3692
|
-
children: /* @__PURE__ */ n(
|
|
3820
|
+
children: /* @__PURE__ */ n(wt, { className: "w-4 h-4" })
|
|
3693
3821
|
}
|
|
3694
3822
|
),
|
|
3695
|
-
|
|
3696
|
-
|
|
3823
|
+
a && /* @__PURE__ */ n(
|
|
3824
|
+
L,
|
|
3697
3825
|
{
|
|
3698
3826
|
variant: "outline",
|
|
3699
3827
|
size: "sm",
|
|
3700
|
-
onClick:
|
|
3701
|
-
disabled:
|
|
3828
|
+
onClick: $,
|
|
3829
|
+
disabled: w.length === 0,
|
|
3702
3830
|
"data-testid": "button-clear",
|
|
3703
|
-
children: /* @__PURE__ */ n(
|
|
3831
|
+
children: /* @__PURE__ */ n(De, { className: "w-4 h-4" })
|
|
3704
3832
|
}
|
|
3705
3833
|
),
|
|
3706
|
-
/* @__PURE__ */ n(
|
|
3834
|
+
/* @__PURE__ */ n(Ir, {})
|
|
3707
3835
|
] }) }),
|
|
3708
|
-
/* @__PURE__ */
|
|
3709
|
-
/* @__PURE__ */ n("div", { className: i ? "w-3/5 border-r" : "w-full", children: /* @__PURE__ */
|
|
3710
|
-
|
|
3711
|
-
|
|
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
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
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
|
-
|
|
3762
|
-
/* @__PURE__ */
|
|
3763
|
-
|
|
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
|
-
|
|
3858
|
+
d.singular
|
|
3766
3859
|
] }),
|
|
3767
|
-
/* @__PURE__ */
|
|
3768
|
-
|
|
3769
|
-
|
|
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(
|
|
3912
|
+
i && /* @__PURE__ */ n("div", { className: "w-2/5", children: /* @__PURE__ */ n(wr, { schema: e }) })
|
|
3775
3913
|
] }),
|
|
3776
|
-
|
|
3914
|
+
j.isOpen && j.data && /* @__PURE__ */ n(
|
|
3777
3915
|
pe,
|
|
3778
3916
|
{
|
|
3779
|
-
property:
|
|
3780
|
-
open:
|
|
3917
|
+
property: j.data,
|
|
3918
|
+
open: j.isOpen,
|
|
3781
3919
|
isNewProperty: !0,
|
|
3782
|
-
onOpenChange:
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
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
|
-
|
|
3930
|
+
Pr as JsonSchemaBuilder
|
|
3794
3931
|
};
|
|
3795
3932
|
//# sourceMappingURL=index.js.map
|