@pinia/colada-devtools 0.1.9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +488 -372
- package/dist/index.js.map +1 -1
- package/dist-panel/(unselected)-95MlHIGa.js +17 -0
- package/dist-panel/(unselected)-95MlHIGa.js.map +1 -0
- package/dist-panel/{index-BNGmSTu0.js → (unselected)-DcyIREPL.js} +5 -5
- package/dist-panel/(unselected)-DcyIREPL.js.map +1 -0
- package/dist-panel/_mutationId_-BfpMyZn5.js +307 -0
- package/dist-panel/_mutationId_-BfpMyZn5.js.map +1 -0
- package/dist-panel/_queryId_-deTdMujv.js +444 -0
- package/dist-panel/_queryId_-deTdMujv.js.map +1 -0
- package/dist-panel/circle-x-CRJfYoJo.js +677 -0
- package/dist-panel/circle-x-CRJfYoJo.js.map +1 -0
- package/dist-panel/index-CEuAAFs8.js +6431 -0
- package/dist-panel/index-CEuAAFs8.js.map +1 -0
- package/dist-panel/{index-goOYcO8U.js → index-DfoOd-Mi.js} +2 -2
- package/dist-panel/{index-goOYcO8U.js.map → index-DfoOd-Mi.js.map} +1 -1
- package/dist-panel/index.js +2 -2
- package/dist-panel/{loader-t1YDOb8H.js → loader-CiXOT2XE.js} +2 -2
- package/dist-panel/loader-CiXOT2XE.js.map +1 -0
- package/dist-panel/{mouse-pointer-click-BMFWvdTu.js → mouse-pointer-click-CR81e5yZ.js} +2 -2
- package/dist-panel/mouse-pointer-click-CR81e5yZ.js.map +1 -0
- package/dist-panel/mutations-Dox_GA2-.js +297 -0
- package/dist-panel/mutations-Dox_GA2-.js.map +1 -0
- package/dist-panel/queries-15p7FQjG.js +286 -0
- package/dist-panel/queries-15p7FQjG.js.map +1 -0
- package/dist-panel/{settings-BRfTfxFz.js → settings-DqjxZlKC.js} +2 -2
- package/dist-panel/{settings-BRfTfxFz.js.map → settings-DqjxZlKC.js.map} +1 -1
- package/dist-panel/use-container-media-query-rzuTymhT.js +555 -0
- package/dist-panel/use-container-media-query-rzuTymhT.js.map +1 -0
- package/dist-shared/index.d.ts +200 -9
- package/dist-shared/index.js +1 -0
- package/dist-shared/index.js.map +1 -1
- package/package.json +9 -10
- package/dist-panel/_queryId_-BizYY_I8.js +0 -701
- package/dist-panel/_queryId_-BizYY_I8.js.map +0 -1
- package/dist-panel/index-BNGmSTu0.js.map +0 -1
- package/dist-panel/index-CIfbEdr_.js +0 -6340
- package/dist-panel/index-CIfbEdr_.js.map +0 -1
- package/dist-panel/loader-t1YDOb8H.js.map +0 -1
- package/dist-panel/mouse-pointer-click-BMFWvdTu.js.map +0 -1
- package/dist-panel/mutations-BNe8aMZH.js +0 -13
- package/dist-panel/mutations-BNe8aMZH.js.map +0 -1
- package/dist-panel/queries-0xQLbzuX.js +0 -795
- package/dist-panel/queries-0xQLbzuX.js.map +0 -1
|
@@ -0,0 +1,677 @@
|
|
|
1
|
+
import { getValueTypeClass as $, formatValue as I, getValueType as ie, isNonSerializableValue as se, isPlainObject as A } from "@pinia/colada-devtools/shared";
|
|
2
|
+
import { m as c, c as o, o as a, a as n, d as P, j as O, l as re, b as p, n as h, T as ue, f as b, e as w, g as s, t as C, J as H, i as d, K as q, X as L, B as y, w as x, F as J, Y as K, Z as G, h as Q, r as ce, Q as de, $ as ve, I as he, a0 as me, P as T, q as pe, _ as fe } from "./index-CEuAAFs8.js";
|
|
3
|
+
const ke = {
|
|
4
|
+
viewBox: "0 0 24 24",
|
|
5
|
+
width: "1.2em",
|
|
6
|
+
height: "1.2em"
|
|
7
|
+
};
|
|
8
|
+
function ge(e, t) {
|
|
9
|
+
return a(), o("svg", ke, [...t[0] || (t[0] = [
|
|
10
|
+
n("path", {
|
|
11
|
+
fill: "none",
|
|
12
|
+
stroke: "currentColor",
|
|
13
|
+
"stroke-linecap": "round",
|
|
14
|
+
"stroke-linejoin": "round",
|
|
15
|
+
"stroke-width": "2",
|
|
16
|
+
d: "m9 18l6-6l-6-6"
|
|
17
|
+
}, null, -1)
|
|
18
|
+
])]);
|
|
19
|
+
}
|
|
20
|
+
const ye = c({ name: "lucide-chevron-right", render: ge }), xe = {
|
|
21
|
+
viewBox: "0 0 24 24",
|
|
22
|
+
width: "1.2em",
|
|
23
|
+
height: "1.2em"
|
|
24
|
+
};
|
|
25
|
+
function be(e, t) {
|
|
26
|
+
return a(), o("svg", xe, [...t[0] || (t[0] = [
|
|
27
|
+
n("path", {
|
|
28
|
+
fill: "none",
|
|
29
|
+
stroke: "currentColor",
|
|
30
|
+
"stroke-linecap": "round",
|
|
31
|
+
"stroke-linejoin": "round",
|
|
32
|
+
"stroke-width": "2",
|
|
33
|
+
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4"
|
|
34
|
+
}, null, -1)
|
|
35
|
+
])]);
|
|
36
|
+
}
|
|
37
|
+
const we = c({ name: "lucide-pencil", render: be }), $e = {
|
|
38
|
+
viewBox: "0 0 24 24",
|
|
39
|
+
width: "1.2em",
|
|
40
|
+
height: "1.2em"
|
|
41
|
+
};
|
|
42
|
+
function Ce(e, t) {
|
|
43
|
+
return a(), o("svg", $e, [...t[0] || (t[0] = [
|
|
44
|
+
n("rect", {
|
|
45
|
+
width: "18",
|
|
46
|
+
height: "18",
|
|
47
|
+
x: "3",
|
|
48
|
+
y: "3",
|
|
49
|
+
fill: "none",
|
|
50
|
+
stroke: "currentColor",
|
|
51
|
+
"stroke-linecap": "round",
|
|
52
|
+
"stroke-linejoin": "round",
|
|
53
|
+
"stroke-width": "2",
|
|
54
|
+
rx: "2"
|
|
55
|
+
}, null, -1)
|
|
56
|
+
])]);
|
|
57
|
+
}
|
|
58
|
+
const Me = c({ name: "lucide-square", render: Ce }), ze = {
|
|
59
|
+
viewBox: "0 0 24 24",
|
|
60
|
+
width: "1.2em",
|
|
61
|
+
height: "1.2em"
|
|
62
|
+
};
|
|
63
|
+
function Be(e, t) {
|
|
64
|
+
return a(), o("svg", ze, [...t[0] || (t[0] = [
|
|
65
|
+
n("g", {
|
|
66
|
+
fill: "none",
|
|
67
|
+
stroke: "currentColor",
|
|
68
|
+
"stroke-linecap": "round",
|
|
69
|
+
"stroke-linejoin": "round",
|
|
70
|
+
"stroke-width": "2"
|
|
71
|
+
}, [
|
|
72
|
+
n("path", { d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344" }),
|
|
73
|
+
n("path", { d: "m9 11l3 3L22 4" })
|
|
74
|
+
], -1)
|
|
75
|
+
])]);
|
|
76
|
+
}
|
|
77
|
+
const Ve = c({ name: "lucide-check-square", render: Be }), Ie = {
|
|
78
|
+
viewBox: "0 0 24 24",
|
|
79
|
+
width: "1.2em",
|
|
80
|
+
height: "1.2em"
|
|
81
|
+
};
|
|
82
|
+
function je(e, t) {
|
|
83
|
+
return a(), o("svg", Ie, [...t[0] || (t[0] = [
|
|
84
|
+
n("path", {
|
|
85
|
+
fill: "none",
|
|
86
|
+
stroke: "currentColor",
|
|
87
|
+
"stroke-linecap": "round",
|
|
88
|
+
"stroke-linejoin": "round",
|
|
89
|
+
"stroke-width": "2",
|
|
90
|
+
d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2a2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1m8 0h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"
|
|
91
|
+
}, null, -1)
|
|
92
|
+
])]);
|
|
93
|
+
}
|
|
94
|
+
const Y = c({ name: "lucide-braces", render: je }), Se = {
|
|
95
|
+
viewBox: "0 0 24 24",
|
|
96
|
+
width: "1.2em",
|
|
97
|
+
height: "1.2em"
|
|
98
|
+
};
|
|
99
|
+
function Ee(e, t) {
|
|
100
|
+
return a(), o("svg", Se, [...t[0] || (t[0] = [
|
|
101
|
+
n("g", {
|
|
102
|
+
fill: "none",
|
|
103
|
+
stroke: "currentColor",
|
|
104
|
+
"stroke-linecap": "round",
|
|
105
|
+
"stroke-linejoin": "round",
|
|
106
|
+
"stroke-width": "2"
|
|
107
|
+
}, [
|
|
108
|
+
n("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
|
|
109
|
+
n("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7M7 3v4a1 1 0 0 0 1 1h7" })
|
|
110
|
+
], -1)
|
|
111
|
+
])]);
|
|
112
|
+
}
|
|
113
|
+
const F = c({ name: "lucide-save", render: Ee }), Ne = {
|
|
114
|
+
viewBox: "0 0 24 24",
|
|
115
|
+
width: "1.2em",
|
|
116
|
+
height: "1.2em"
|
|
117
|
+
};
|
|
118
|
+
function Le(e, t) {
|
|
119
|
+
return a(), o("svg", Ne, [...t[0] || (t[0] = [
|
|
120
|
+
n("g", {
|
|
121
|
+
fill: "none",
|
|
122
|
+
stroke: "currentColor",
|
|
123
|
+
"stroke-linecap": "round",
|
|
124
|
+
"stroke-linejoin": "round",
|
|
125
|
+
"stroke-width": "2"
|
|
126
|
+
}, [
|
|
127
|
+
n("path", { d: "M3 7v6h6" }),
|
|
128
|
+
n("path", { d: "M21 17a9 9 0 0 0-9-9a9 9 0 0 0-6 2.3L3 13" })
|
|
129
|
+
], -1)
|
|
130
|
+
])]);
|
|
131
|
+
}
|
|
132
|
+
const X = c({ name: "lucide-undo", render: Le }), Je = {
|
|
133
|
+
viewBox: "0 0 24 24",
|
|
134
|
+
width: "1.2em",
|
|
135
|
+
height: "1.2em"
|
|
136
|
+
};
|
|
137
|
+
function Oe(e, t) {
|
|
138
|
+
return a(), o("svg", Je, [...t[0] || (t[0] = [
|
|
139
|
+
n("path", {
|
|
140
|
+
fill: "none",
|
|
141
|
+
stroke: "currentColor",
|
|
142
|
+
"stroke-linecap": "round",
|
|
143
|
+
"stroke-linejoin": "round",
|
|
144
|
+
"stroke-width": "2",
|
|
145
|
+
d: "M5 12h14"
|
|
146
|
+
}, null, -1)
|
|
147
|
+
])]);
|
|
148
|
+
}
|
|
149
|
+
const Te = c({ name: "lucide-minus", render: Oe }), Ae = {
|
|
150
|
+
viewBox: "0 0 24 24",
|
|
151
|
+
width: "1.2em",
|
|
152
|
+
height: "1.2em"
|
|
153
|
+
};
|
|
154
|
+
function He(e, t) {
|
|
155
|
+
return a(), o("svg", Ae, [...t[0] || (t[0] = [
|
|
156
|
+
n("path", {
|
|
157
|
+
fill: "none",
|
|
158
|
+
stroke: "currentColor",
|
|
159
|
+
"stroke-linecap": "round",
|
|
160
|
+
"stroke-linejoin": "round",
|
|
161
|
+
"stroke-width": "2",
|
|
162
|
+
d: "M5 12h14m-7-7v14"
|
|
163
|
+
}, null, -1)
|
|
164
|
+
])]);
|
|
165
|
+
}
|
|
166
|
+
const Pe = c({ name: "lucide-plus", render: He }), Re = {
|
|
167
|
+
key: 1,
|
|
168
|
+
class: "flex"
|
|
169
|
+
}, Ue = {
|
|
170
|
+
key: 0,
|
|
171
|
+
class: "inline-flex items-center gap-1"
|
|
172
|
+
}, De = {
|
|
173
|
+
key: 0,
|
|
174
|
+
class: "hidden group-hover:flex gap-0.5 ml-1 align-middle"
|
|
175
|
+
}, qe = {
|
|
176
|
+
key: 2,
|
|
177
|
+
class: "inline-flex items-center gap-1"
|
|
178
|
+
}, Ke = {
|
|
179
|
+
key: 3,
|
|
180
|
+
class: "inline"
|
|
181
|
+
}, Ye = {
|
|
182
|
+
key: 0,
|
|
183
|
+
class: "inline-flex items-center gap-1"
|
|
184
|
+
}, Fe = {
|
|
185
|
+
key: 0,
|
|
186
|
+
class: "hidden group-hover:inline-flex gap-0.5 ml-1 align-middle"
|
|
187
|
+
}, Xe = ["title"], Ge = /* @__PURE__ */ P({
|
|
188
|
+
__name: "JsonItem",
|
|
189
|
+
props: {
|
|
190
|
+
itemKey: {},
|
|
191
|
+
value: { type: [String, Number, Boolean, null, Array, Object, Map, Set] },
|
|
192
|
+
depth: {},
|
|
193
|
+
path: { default: () => [] },
|
|
194
|
+
readonly: { type: Boolean }
|
|
195
|
+
},
|
|
196
|
+
emits: ["update:value"],
|
|
197
|
+
setup(e, { emit: t }) {
|
|
198
|
+
const f = O(null), r = O(""), m = re("inputRef"), v = p(() => ie(e.value)), M = p(() => v.value === "number"), j = p(() => v.value === "bigint"), R = p(() => v.value === "string"), W = p(() => v.value === "boolean"), z = p(() => se(e.value)), Z = p(
|
|
199
|
+
() => !z.value && (M.value || R.value)
|
|
200
|
+
), _ = p(
|
|
201
|
+
() => !z.value && (M.value || R.value)
|
|
202
|
+
), ee = p(() => !z.value && !e.readonly), S = O(!1), k = p(() => Array.isArray(e.value) && e.value.length > 0 || A(e.value) && Object.keys(e.value).length > 0 || e.value instanceof Map && e.value.size > 0 || e.value instanceof Set && e.value.size > 0), te = p(() => {
|
|
203
|
+
const i = e.value;
|
|
204
|
+
return Array.isArray(i) ? i.map((l, g) => [g, l]) : A(i) ? Object.entries(i) : i instanceof Map ? i.entries() : i instanceof Set ? Array.from(i).map((l, g) => [g, l]) : [];
|
|
205
|
+
}), B = t;
|
|
206
|
+
function V(i = "simple") {
|
|
207
|
+
f.value = i, i === "json" ? e.value === void 0 ? r.value = "undefined" : r.value = JSON.stringify(e.value) : i === "simple" && (r.value = String(e.value)), de(() => {
|
|
208
|
+
m.value?.focus();
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function E() {
|
|
212
|
+
let i;
|
|
213
|
+
if (f.value === "json")
|
|
214
|
+
try {
|
|
215
|
+
r.value === "undefined" ? i = void 0 : i = JSON.parse(r.value);
|
|
216
|
+
} catch (l) {
|
|
217
|
+
console.error("Invalid JSON:", l);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
else
|
|
221
|
+
switch (v.value) {
|
|
222
|
+
case "bigint":
|
|
223
|
+
try {
|
|
224
|
+
i = BigInt(r.value);
|
|
225
|
+
} catch (l) {
|
|
226
|
+
console.error("Invalid BigInt:", l);
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
break;
|
|
230
|
+
case "number":
|
|
231
|
+
if (i = Number(r.value), Number.isNaN(i)) {
|
|
232
|
+
console.error("Invalid number");
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
break;
|
|
236
|
+
default:
|
|
237
|
+
i = r.value;
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
B("update:value", e.path, i), f.value = null;
|
|
241
|
+
}
|
|
242
|
+
function N() {
|
|
243
|
+
f.value = null, r.value = "";
|
|
244
|
+
}
|
|
245
|
+
function ne(i) {
|
|
246
|
+
const l = i.shiftKey ? 10 : 1, g = e.value + l;
|
|
247
|
+
B("update:value", e.path, g);
|
|
248
|
+
}
|
|
249
|
+
function ae(i) {
|
|
250
|
+
const l = i.shiftKey ? 10 : 1, g = e.value - l;
|
|
251
|
+
B("update:value", e.path, g);
|
|
252
|
+
}
|
|
253
|
+
function U() {
|
|
254
|
+
B("update:value", e.path, !e.value);
|
|
255
|
+
}
|
|
256
|
+
function D() {
|
|
257
|
+
k.value && (S.value = !S.value);
|
|
258
|
+
}
|
|
259
|
+
return (i, l) => {
|
|
260
|
+
const g = ce("JsonItem", !0);
|
|
261
|
+
return a(), o("div", {
|
|
262
|
+
style: ue({ paddingLeft: `${e.depth * 0.35}em` }),
|
|
263
|
+
class: h(["ring-(--ui-bg-muted)", {
|
|
264
|
+
"hover:ring": k.value,
|
|
265
|
+
"rounded-tl": e.depth > 0
|
|
266
|
+
}])
|
|
267
|
+
}, [
|
|
268
|
+
n("div", {
|
|
269
|
+
class: h(["group flex items-center gap-2 py-0.5 bg-transparent hover:bg-(--ui-bg-muted) duration-200 transition-colors", e.depth > 0 && "rounded-l"])
|
|
270
|
+
}, [
|
|
271
|
+
k.value ? (a(), w(s(ye), {
|
|
272
|
+
key: 0,
|
|
273
|
+
class: h(["size-3 text-(--ui-text-dimmed) transition-transform duration-200 cursor-pointer", { "rotate-90": S.value }]),
|
|
274
|
+
onClick: D
|
|
275
|
+
}, null, 8, ["class"])) : b("", !0),
|
|
276
|
+
n("span", {
|
|
277
|
+
class: h(["text-(--devtools-syntax-gray)", !k.value && "ml-5"])
|
|
278
|
+
}, C(e.itemKey) + ": ", 3),
|
|
279
|
+
!k.value && Z.value ? (a(), o("span", Re, [
|
|
280
|
+
!e.readonly && f.value ? (a(), o("span", Ue, [
|
|
281
|
+
H(n("input", {
|
|
282
|
+
ref_key: "inputRef",
|
|
283
|
+
ref: m,
|
|
284
|
+
"onUpdate:modelValue": l[0] || (l[0] = (u) => r.value = u),
|
|
285
|
+
class: h(["px-1", s($)(e.value)]),
|
|
286
|
+
autocomplete: "off",
|
|
287
|
+
spellcheck: "false",
|
|
288
|
+
autocorrect: "off",
|
|
289
|
+
autocapitalize: "off",
|
|
290
|
+
"data-1p-ignore": "",
|
|
291
|
+
"data-lpignore": "true",
|
|
292
|
+
onKeydown: [
|
|
293
|
+
L(E, ["enter"]),
|
|
294
|
+
L(N, ["escape"])
|
|
295
|
+
]
|
|
296
|
+
}, null, 34), [
|
|
297
|
+
[q, r.value]
|
|
298
|
+
]),
|
|
299
|
+
d(y, {
|
|
300
|
+
size: "xs",
|
|
301
|
+
variant: "outline",
|
|
302
|
+
title: "Cancel changes (Esc)",
|
|
303
|
+
onClick: N
|
|
304
|
+
}, {
|
|
305
|
+
default: x(() => [
|
|
306
|
+
d(s(X), { class: "size-3" })
|
|
307
|
+
]),
|
|
308
|
+
_: 1
|
|
309
|
+
}),
|
|
310
|
+
d(y, {
|
|
311
|
+
size: "xs",
|
|
312
|
+
variant: "outline",
|
|
313
|
+
title: "Save changes (Enter)",
|
|
314
|
+
onClick: E
|
|
315
|
+
}, {
|
|
316
|
+
default: x(() => [
|
|
317
|
+
d(s(F), { class: "size-3" })
|
|
318
|
+
]),
|
|
319
|
+
_: 1
|
|
320
|
+
})
|
|
321
|
+
])) : (a(), o(J, { key: 1 }, [
|
|
322
|
+
n("span", {
|
|
323
|
+
class: h(s($)(e.value)),
|
|
324
|
+
onDblclick: l[1] || (l[1] = K((u) => !e.readonly && V("simple"), ["stop"]))
|
|
325
|
+
}, C(s(I)(e.value)), 35),
|
|
326
|
+
e.readonly ? b("", !0) : (a(), o("span", De, [
|
|
327
|
+
M.value || j.value ? (a(), w(y, {
|
|
328
|
+
key: 0,
|
|
329
|
+
size: "xs",
|
|
330
|
+
variant: "outline",
|
|
331
|
+
title: "Decrement value (Shift for -10)",
|
|
332
|
+
onClick: ae
|
|
333
|
+
}, {
|
|
334
|
+
default: x(() => [
|
|
335
|
+
d(s(Te), { class: "size-3" })
|
|
336
|
+
]),
|
|
337
|
+
_: 1
|
|
338
|
+
})) : b("", !0),
|
|
339
|
+
M.value || j.value ? (a(), w(y, {
|
|
340
|
+
key: 1,
|
|
341
|
+
size: "xs",
|
|
342
|
+
variant: "outline",
|
|
343
|
+
title: "Increment value (Shift for +10)",
|
|
344
|
+
onClick: ne
|
|
345
|
+
}, {
|
|
346
|
+
default: x(() => [
|
|
347
|
+
d(s(Pe), { class: "size-3" })
|
|
348
|
+
]),
|
|
349
|
+
_: 1
|
|
350
|
+
})) : b("", !0),
|
|
351
|
+
_.value ? (a(), w(y, {
|
|
352
|
+
key: 2,
|
|
353
|
+
size: "xs",
|
|
354
|
+
variant: "outline",
|
|
355
|
+
title: "Edit value",
|
|
356
|
+
onClick: l[2] || (l[2] = (u) => V("simple"))
|
|
357
|
+
}, {
|
|
358
|
+
default: x(() => [
|
|
359
|
+
d(s(we), { class: "size-3" })
|
|
360
|
+
]),
|
|
361
|
+
_: 1
|
|
362
|
+
})) : b("", !0),
|
|
363
|
+
ee.value ? (a(), w(y, {
|
|
364
|
+
key: 3,
|
|
365
|
+
size: "xs",
|
|
366
|
+
variant: "outline",
|
|
367
|
+
title: "Edit as JSON",
|
|
368
|
+
onClick: l[3] || (l[3] = (u) => V("json"))
|
|
369
|
+
}, {
|
|
370
|
+
default: x(() => [
|
|
371
|
+
d(s(Y), { class: "size-3" })
|
|
372
|
+
]),
|
|
373
|
+
_: 1
|
|
374
|
+
})) : b("", !0)
|
|
375
|
+
]))
|
|
376
|
+
], 64))
|
|
377
|
+
])) : !k.value && W.value && !z.value ? (a(), o("span", qe, [
|
|
378
|
+
(a(), w(G(e.value ? s(Ve) : s(Me)), {
|
|
379
|
+
class: h(["size-3 text-(--ui-text-muted)", !e.readonly && "cursor-pointer hover:text-(--ui-text)"]),
|
|
380
|
+
title: e.readonly ? void 0 : `Click to toggle (current: ${e.value})`,
|
|
381
|
+
onClick: l[4] || (l[4] = (u) => !e.readonly && U())
|
|
382
|
+
}, null, 8, ["class", "title"])),
|
|
383
|
+
n("span", {
|
|
384
|
+
class: h([s($)(e.value), !e.readonly && "cursor-pointer"]),
|
|
385
|
+
onClick: l[5] || (l[5] = (u) => !e.readonly && U())
|
|
386
|
+
}, C(s(I)(e.value)), 3)
|
|
387
|
+
])) : !k.value && (v.value === "null" || v.value === "undefined") && !z.value ? (a(), o("span", Ke, [
|
|
388
|
+
!e.readonly && f.value ? (a(), o("span", Ye, [
|
|
389
|
+
H(n("input", {
|
|
390
|
+
ref_key: "inputRef",
|
|
391
|
+
ref: m,
|
|
392
|
+
"onUpdate:modelValue": l[6] || (l[6] = (u) => r.value = u),
|
|
393
|
+
class: h(["px-1", s($)(e.value)]),
|
|
394
|
+
autocomplete: "off",
|
|
395
|
+
spellcheck: "false",
|
|
396
|
+
autocorrect: "off",
|
|
397
|
+
autocapitalize: "off",
|
|
398
|
+
"data-1p-ignore": "",
|
|
399
|
+
"data-lpignore": "true",
|
|
400
|
+
onKeydown: [
|
|
401
|
+
L(E, ["enter"]),
|
|
402
|
+
L(N, ["escape"])
|
|
403
|
+
]
|
|
404
|
+
}, null, 34), [
|
|
405
|
+
[q, r.value]
|
|
406
|
+
]),
|
|
407
|
+
d(y, {
|
|
408
|
+
size: "xs",
|
|
409
|
+
variant: "outline",
|
|
410
|
+
title: "Cancel changes (Esc)",
|
|
411
|
+
onClick: N
|
|
412
|
+
}, {
|
|
413
|
+
default: x(() => [
|
|
414
|
+
d(s(X), { class: "size-3" })
|
|
415
|
+
]),
|
|
416
|
+
_: 1
|
|
417
|
+
}),
|
|
418
|
+
d(y, {
|
|
419
|
+
size: "xs",
|
|
420
|
+
variant: "outline",
|
|
421
|
+
title: "Save changes (Enter)",
|
|
422
|
+
onClick: E
|
|
423
|
+
}, {
|
|
424
|
+
default: x(() => [
|
|
425
|
+
d(s(F), { class: "size-3" })
|
|
426
|
+
]),
|
|
427
|
+
_: 1
|
|
428
|
+
})
|
|
429
|
+
])) : (a(), o(J, { key: 1 }, [
|
|
430
|
+
n("span", {
|
|
431
|
+
class: h(s($)(e.value)),
|
|
432
|
+
onDblclick: l[7] || (l[7] = K((u) => !e.readonly && V("json"), ["stop"]))
|
|
433
|
+
}, C(s(I)(e.value)), 35),
|
|
434
|
+
e.readonly ? b("", !0) : (a(), o("span", Fe, [
|
|
435
|
+
d(y, {
|
|
436
|
+
size: "xs",
|
|
437
|
+
variant: "outline",
|
|
438
|
+
title: "Edit as JSON",
|
|
439
|
+
onClick: l[8] || (l[8] = (u) => V("json"))
|
|
440
|
+
}, {
|
|
441
|
+
default: x(() => [
|
|
442
|
+
d(s(Y), { class: "size-3" })
|
|
443
|
+
]),
|
|
444
|
+
_: 1
|
|
445
|
+
})
|
|
446
|
+
]))
|
|
447
|
+
], 64))
|
|
448
|
+
])) : (a(), o("span", {
|
|
449
|
+
key: 4,
|
|
450
|
+
class: h([s($)(e.value), k.value && "cursor-pointer"]),
|
|
451
|
+
title: k.value ? "Click to expand" : void 0,
|
|
452
|
+
onClick: D
|
|
453
|
+
}, C(s(I)(e.value)), 11, Xe))
|
|
454
|
+
], 2),
|
|
455
|
+
k.value && S.value ? (a(!0), o(J, { key: 0 }, Q(te.value, ([u, le]) => (a(), w(g, {
|
|
456
|
+
key: u,
|
|
457
|
+
"item-key": String(u),
|
|
458
|
+
value: le,
|
|
459
|
+
depth: e.depth + 1,
|
|
460
|
+
path: typeof u == "symbol" ? void 0 : [...e.path, u],
|
|
461
|
+
readonly: e.readonly,
|
|
462
|
+
"onUpdate:value": l[9] || (l[9] = (...oe) => B("update:value", ...oe))
|
|
463
|
+
}, null, 8, ["item-key", "value", "depth", "path", "readonly"]))), 128)) : b("", !0)
|
|
464
|
+
], 6);
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
function Qe(e) {
|
|
469
|
+
return !!e && (Array.isArray(e) || A(e) || e instanceof Map || e instanceof Set);
|
|
470
|
+
}
|
|
471
|
+
const ft = /* @__PURE__ */ P({
|
|
472
|
+
__name: "JsonViewer",
|
|
473
|
+
props: {
|
|
474
|
+
data: {},
|
|
475
|
+
readonly: { type: Boolean }
|
|
476
|
+
},
|
|
477
|
+
emits: ["update:value"],
|
|
478
|
+
setup(e, { emit: t }) {
|
|
479
|
+
const f = t;
|
|
480
|
+
return (r, m) => Qe(e.data) ? (a(!0), o(J, { key: 0 }, Q(Object.entries(e.data), ([v, M]) => (a(), w(Ge, {
|
|
481
|
+
key: v,
|
|
482
|
+
"item-key": v,
|
|
483
|
+
value: M,
|
|
484
|
+
depth: 0,
|
|
485
|
+
path: [v],
|
|
486
|
+
readonly: e.readonly,
|
|
487
|
+
"onUpdate:value": m[0] || (m[0] = (...j) => f("update:value", ...j))
|
|
488
|
+
}, null, 8, ["item-key", "value", "path", "readonly"]))), 128)) : (a(), o("span", {
|
|
489
|
+
key: 1,
|
|
490
|
+
class: h(s($)(e.data))
|
|
491
|
+
}, C(s(I)(e.data)), 3));
|
|
492
|
+
}
|
|
493
|
+
}), We = {
|
|
494
|
+
viewBox: "0 0 24 24",
|
|
495
|
+
width: "1.2em",
|
|
496
|
+
height: "1.2em"
|
|
497
|
+
};
|
|
498
|
+
function Ze(e, t) {
|
|
499
|
+
return a(), o("svg", We, [...t[0] || (t[0] = [
|
|
500
|
+
n("path", {
|
|
501
|
+
fill: "none",
|
|
502
|
+
stroke: "currentColor",
|
|
503
|
+
"stroke-linecap": "round",
|
|
504
|
+
"stroke-linejoin": "round",
|
|
505
|
+
"stroke-width": "2",
|
|
506
|
+
d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
|
|
507
|
+
}, null, -1)
|
|
508
|
+
])]);
|
|
509
|
+
}
|
|
510
|
+
const kt = c({ name: "lucide-trash", render: Ze }), _e = {
|
|
511
|
+
viewBox: "0 0 24 24",
|
|
512
|
+
width: "1.2em",
|
|
513
|
+
height: "1.2em"
|
|
514
|
+
};
|
|
515
|
+
function et(e, t) {
|
|
516
|
+
return a(), o("svg", _e, [...t[0] || (t[0] = [
|
|
517
|
+
n("g", {
|
|
518
|
+
fill: "none",
|
|
519
|
+
stroke: "currentColor",
|
|
520
|
+
"stroke-linecap": "round",
|
|
521
|
+
"stroke-linejoin": "round",
|
|
522
|
+
"stroke-width": "2"
|
|
523
|
+
}, [
|
|
524
|
+
n("path", { d: "M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
525
|
+
n("path", { d: "M3 3v5h5" })
|
|
526
|
+
], -1)
|
|
527
|
+
])]);
|
|
528
|
+
}
|
|
529
|
+
const gt = c({ name: "lucide-rotate-ccw", render: et }), tt = { class: "collapse collapse-arrow" }, nt = { class: "collapse-title px-2 py-0.5 bg-neutral-200 dark:bg-neutral-800 theme-neutral" }, at = { class: "font-semibold text-sm flex gap-x-1 items-center" }, lt = /* @__PURE__ */ P({
|
|
530
|
+
__name: "UCollapse.ce",
|
|
531
|
+
props: /* @__PURE__ */ ve({
|
|
532
|
+
title: { type: String },
|
|
533
|
+
icon: { type: null },
|
|
534
|
+
noPadding: { type: Boolean }
|
|
535
|
+
}, {
|
|
536
|
+
open: { type: Boolean, default: !0 },
|
|
537
|
+
openModifiers: {}
|
|
538
|
+
}),
|
|
539
|
+
emits: ["update:open"],
|
|
540
|
+
setup(e) {
|
|
541
|
+
const t = he(e, "open");
|
|
542
|
+
function f(r) {
|
|
543
|
+
if (r.target instanceof HTMLElement) {
|
|
544
|
+
const m = {
|
|
545
|
+
block: "nearest",
|
|
546
|
+
inline: "nearest",
|
|
547
|
+
behavior: "smooth"
|
|
548
|
+
};
|
|
549
|
+
r.target.scrollIntoView(m);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
return (r, m) => (a(), o("div", tt, [
|
|
553
|
+
H(n("input", {
|
|
554
|
+
"onUpdate:modelValue": m[0] || (m[0] = (v) => t.value = v),
|
|
555
|
+
type: "checkbox"
|
|
556
|
+
}, null, 512), [
|
|
557
|
+
[me, t.value]
|
|
558
|
+
]),
|
|
559
|
+
n("div", nt, [
|
|
560
|
+
T(r.$slots, "title", {
|
|
561
|
+
open: t.value,
|
|
562
|
+
title: e.title
|
|
563
|
+
}, () => [
|
|
564
|
+
n("h3", at, [
|
|
565
|
+
T(r.$slots, "icon", {}, () => [
|
|
566
|
+
e.icon ? (a(), w(G(e.icon), {
|
|
567
|
+
key: 0,
|
|
568
|
+
class: "size-4"
|
|
569
|
+
})) : b("", !0)
|
|
570
|
+
], !0),
|
|
571
|
+
pe(" " + C(e.title ?? "Group"), 1)
|
|
572
|
+
])
|
|
573
|
+
], !0)
|
|
574
|
+
]),
|
|
575
|
+
n("div", {
|
|
576
|
+
class: h([!e.noPadding && "px-2", "collapse-content text-sm overflow-hidden"]),
|
|
577
|
+
onTransitionend: f
|
|
578
|
+
}, [
|
|
579
|
+
T(r.$slots, "default", { open: t.value }, void 0, !0)
|
|
580
|
+
], 34)
|
|
581
|
+
]));
|
|
582
|
+
}
|
|
583
|
+
}), ot = '.collapse[data-v-46c2be51]:not(td,tr,colgroup){visibility:visible}.collapse[data-v-46c2be51]{position:relative;display:grid;overflow:hidden;width:100%;grid-template-rows:max-content 0fr;transition:grid-template-rows .2s;isolation:isolate}.collapse>input[data-v-46c2be51]:is([type=checkbox],[type=radio]){grid-column-start:1;grid-row-start:1;appearance:none;opacity:0}.collapse[data-v-46c2be51]:is([open],:focus),.collapse[data-v-46c2be51]:has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:is([open],:focus)>.collapse-content[data-v-46c2be51],.collapse[data-v-46c2be51]:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible;min-height:fit-content}.collapse[data-v-46c2be51]:focus-visible,.collapse[data-v-46c2be51]:has(>input:is([type=checkbox],[type=radio]):focus-visible){outline-color:var(--ui-text);outline-style:solid;outline-width:2px;outline-offset:2px}.collapse:not(.collapse-close)>input[type=checkbox][data-v-46c2be51],.collapse:not(.collapse-close)>input[type=radio][data-v-46c2be51]:not(:checked),.collapse:not(.collapse-close)>.collapse-title[data-v-46c2be51]{cursor:pointer}.collapse:focus:not(.collapse-close,.collapse[open])>.collapse-title[data-v-46c2be51]{cursor:unset}.collapse:is([open]).collapse-arrow>.collapse-title[data-v-46c2be51]:after{transform:translateY(-50%) rotate(225deg)}.collapse.collapse-arrow:focus>.collapse-title[data-v-46c2be51]:after{transform:translateY(-50%) rotate(225deg)}.collapse.collapse-arrow>input:is([type=checkbox],[type=radio]):checked~.collapse-title[data-v-46c2be51]:after{transform:translateY(-50%) rotate(225deg)}.collapse>input[data-v-46c2be51]:is([type=checkbox],[type=radio]){z-index:1;width:100%}.collapse-title[data-v-46c2be51],.collapse-content[data-v-46c2be51]{grid-column-start:1;grid-row-start:1}.collapse-content[data-v-46c2be51]{visibility:hidden;grid-column-start:1;grid-row-start:2;min-height:0;cursor:unset;transition:visibility .2s}.collapse-arrow>.collapse-title[data-v-46c2be51]:after{position:absolute;display:block;height:.5rem;width:.5rem;transform:translateY(-100%) rotate(45deg);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;top:50%;right:.8em;inset-inline-end:.75rem;content:"";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.collapse-title[data-v-46c2be51]{position:relative;width:100%;transition:background-color .2s ease-out}', yt = /* @__PURE__ */ fe(lt, [["styles", [ot]], ["__scopeId", "data-v-46c2be51"]]), it = {
|
|
584
|
+
viewBox: "0 0 24 24",
|
|
585
|
+
width: "1.2em",
|
|
586
|
+
height: "1.2em"
|
|
587
|
+
};
|
|
588
|
+
function st(e, t) {
|
|
589
|
+
return a(), o("svg", it, [...t[0] || (t[0] = [
|
|
590
|
+
n("path", {
|
|
591
|
+
fill: "none",
|
|
592
|
+
stroke: "currentColor",
|
|
593
|
+
"stroke-linecap": "round",
|
|
594
|
+
"stroke-linejoin": "round",
|
|
595
|
+
"stroke-width": "2",
|
|
596
|
+
d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z"
|
|
597
|
+
}, null, -1)
|
|
598
|
+
])]);
|
|
599
|
+
}
|
|
600
|
+
const xt = c({ name: "lucide-wrench", render: st }), rt = {
|
|
601
|
+
viewBox: "0 0 24 24",
|
|
602
|
+
width: "1.2em",
|
|
603
|
+
height: "1.2em"
|
|
604
|
+
};
|
|
605
|
+
function ut(e, t) {
|
|
606
|
+
return a(), o("svg", rt, [...t[0] || (t[0] = [
|
|
607
|
+
n("g", {
|
|
608
|
+
fill: "none",
|
|
609
|
+
stroke: "currentColor",
|
|
610
|
+
"stroke-linecap": "round",
|
|
611
|
+
"stroke-linejoin": "round",
|
|
612
|
+
"stroke-width": "2"
|
|
613
|
+
}, [
|
|
614
|
+
n("circle", {
|
|
615
|
+
cx: "12",
|
|
616
|
+
cy: "12",
|
|
617
|
+
r: "10"
|
|
618
|
+
}),
|
|
619
|
+
n("path", { d: "M12 16v-4m0-4h.01" })
|
|
620
|
+
], -1)
|
|
621
|
+
])]);
|
|
622
|
+
}
|
|
623
|
+
const bt = c({ name: "lucide-info", render: ut }), ct = {
|
|
624
|
+
viewBox: "0 0 24 24",
|
|
625
|
+
width: "1.2em",
|
|
626
|
+
height: "1.2em"
|
|
627
|
+
};
|
|
628
|
+
function dt(e, t) {
|
|
629
|
+
return a(), o("svg", ct, [...t[0] || (t[0] = [
|
|
630
|
+
n("g", {
|
|
631
|
+
fill: "none",
|
|
632
|
+
stroke: "currentColor",
|
|
633
|
+
"stroke-linecap": "round",
|
|
634
|
+
"stroke-linejoin": "round",
|
|
635
|
+
"stroke-width": "2"
|
|
636
|
+
}, [
|
|
637
|
+
n("path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }),
|
|
638
|
+
n("path", { d: "M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8" })
|
|
639
|
+
], -1)
|
|
640
|
+
])]);
|
|
641
|
+
}
|
|
642
|
+
const wt = c({ name: "lucide-file-text", render: dt }), vt = {
|
|
643
|
+
viewBox: "0 0 24 24",
|
|
644
|
+
width: "1.2em",
|
|
645
|
+
height: "1.2em"
|
|
646
|
+
};
|
|
647
|
+
function ht(e, t) {
|
|
648
|
+
return a(), o("svg", vt, [...t[0] || (t[0] = [
|
|
649
|
+
n("g", {
|
|
650
|
+
fill: "none",
|
|
651
|
+
stroke: "currentColor",
|
|
652
|
+
"stroke-linecap": "round",
|
|
653
|
+
"stroke-linejoin": "round",
|
|
654
|
+
"stroke-width": "2"
|
|
655
|
+
}, [
|
|
656
|
+
n("circle", {
|
|
657
|
+
cx: "12",
|
|
658
|
+
cy: "12",
|
|
659
|
+
r: "10"
|
|
660
|
+
}),
|
|
661
|
+
n("path", { d: "m15 9l-6 6m0-6l6 6" })
|
|
662
|
+
], -1)
|
|
663
|
+
])]);
|
|
664
|
+
}
|
|
665
|
+
const $t = c({ name: "lucide-circle-x", render: ht });
|
|
666
|
+
export {
|
|
667
|
+
bt as I,
|
|
668
|
+
yt as _,
|
|
669
|
+
xt as a,
|
|
670
|
+
wt as b,
|
|
671
|
+
$t as c,
|
|
672
|
+
Y as d,
|
|
673
|
+
gt as e,
|
|
674
|
+
kt as f,
|
|
675
|
+
ft as g
|
|
676
|
+
};
|
|
677
|
+
//# sourceMappingURL=circle-x-CRJfYoJo.js.map
|