@pinia/colada-devtools 0.1.5 → 0.1.7
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 +281 -286
- package/dist/index.js.map +1 -1
- package/dist-panel/_queryId_-Belc_zp1.js +701 -0
- package/dist-panel/_queryId_-Belc_zp1.js.map +1 -0
- package/dist-panel/{index-B6c9Loor.js → index-8zera7xN.js} +4 -4
- package/dist-panel/{index-B6c9Loor.js.map → index-8zera7xN.js.map} +1 -1
- package/dist-panel/index-LWD0-6oX.js +6561 -0
- package/dist-panel/index-LWD0-6oX.js.map +1 -0
- package/dist-panel/{index-DsbwSvSM.js → index-ahP8xsZT.js} +2 -2
- package/dist-panel/{index-DsbwSvSM.js.map → index-ahP8xsZT.js.map} +1 -1
- package/dist-panel/index.js +1 -1
- package/dist-panel/{loader-BxXz3POc.js → loader-D4fVpj_e.js} +6 -6
- package/dist-panel/loader-D4fVpj_e.js.map +1 -0
- package/dist-panel/{mouse-pointer-click--GgfMFjw.js → mouse-pointer-click-Ckyof3Oo.js} +4 -4
- package/dist-panel/mouse-pointer-click-Ckyof3Oo.js.map +1 -0
- package/dist-panel/mutations-D5gH6B6q.js +13 -0
- package/dist-panel/mutations-D5gH6B6q.js.map +1 -0
- package/dist-panel/queries-55qwqD5F.js +795 -0
- package/dist-panel/queries-55qwqD5F.js.map +1 -0
- package/dist-panel/{settings-Cl-hr-ie.js → settings-C6gLVIkW.js} +2 -2
- package/dist-panel/{settings-Cl-hr-ie.js.map → settings-C6gLVIkW.js.map} +1 -1
- package/dist-shared/index.d.ts +27 -0
- package/dist-shared/index.js +295 -65
- package/dist-shared/index.js.map +1 -1
- package/package.json +9 -9
- package/dist-panel/_queryId_-Bilvrtoo.js +0 -621
- package/dist-panel/_queryId_-Bilvrtoo.js.map +0 -1
- package/dist-panel/index-D50XbbDk.js +0 -6492
- package/dist-panel/index-D50XbbDk.js.map +0 -1
- package/dist-panel/loader-BxXz3POc.js.map +0 -1
- package/dist-panel/mouse-pointer-click--GgfMFjw.js.map +0 -1
- package/dist-panel/mutations-CNQGJZrN.js +0 -13
- package/dist-panel/mutations-CNQGJZrN.js.map +0 -1
- package/dist-panel/queries-CSBvC4-S.js +0 -813
- package/dist-panel/queries-CSBvC4-S.js.map +0 -1
|
@@ -0,0 +1,701 @@
|
|
|
1
|
+
import { _ as W } from "./mouse-pointer-click-Ckyof3Oo.js";
|
|
2
|
+
import { isPlainObject as H, getValueTypeClass as D, formatValue as L } from "@pinia/colada-devtools/shared";
|
|
3
|
+
import { m as g, c as i, o as l, a as e, d as z, x as Y, b as j, r as G, n as C, H as X, h as M, g as b, t as u, i as a, F as q, j as V, Q as K, l as Z, p as ee, R as te, C as T, P as h, S as oe, _ as ne, M as se, T as le, O, y as ie, k as d, w as p, U as E, V as ae, W as re, X as I, Y as de } from "./index-LWD0-6oX.js";
|
|
4
|
+
import { _ as ue, a as ce } from "./loader-D4fVpj_e.js";
|
|
5
|
+
const pe = {
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
width: "1.2em",
|
|
8
|
+
height: "1.2em"
|
|
9
|
+
};
|
|
10
|
+
function me(s, n) {
|
|
11
|
+
return l(), i("svg", pe, [...n[0] || (n[0] = [
|
|
12
|
+
e("path", {
|
|
13
|
+
fill: "none",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
"stroke-linecap": "round",
|
|
16
|
+
"stroke-linejoin": "round",
|
|
17
|
+
"stroke-width": "2",
|
|
18
|
+
d: "m9 18l6-6l-6-6"
|
|
19
|
+
}, null, -1)
|
|
20
|
+
])]);
|
|
21
|
+
}
|
|
22
|
+
const ve = g({ name: "lucide-chevron-right", render: me }), he = ["title"], fe = /* @__PURE__ */ z({
|
|
23
|
+
__name: "JsonItem",
|
|
24
|
+
props: {
|
|
25
|
+
itemKey: {},
|
|
26
|
+
value: { type: [String, Number, Boolean, null, Array, Object, Map, Set] },
|
|
27
|
+
depth: {}
|
|
28
|
+
},
|
|
29
|
+
setup(s) {
|
|
30
|
+
const n = s, m = Y(!1), o = j(() => {
|
|
31
|
+
const { value: r } = n;
|
|
32
|
+
return Array.isArray(r) && r.length > 0 || H(r) && Object.keys(r).length > 0 || r instanceof Map && r.size > 0 || r instanceof Set && r.size > 0;
|
|
33
|
+
}), y = j(() => {
|
|
34
|
+
const { value: r } = n;
|
|
35
|
+
return Array.isArray(r) ? r.map((f, v) => [v, f]) : H(r) ? Object.entries(r) : r instanceof Map ? r.entries() : r instanceof Set ? Array.from(r).map((f, v) => [v, f]) : [];
|
|
36
|
+
});
|
|
37
|
+
function x() {
|
|
38
|
+
o.value && (m.value = !m.value);
|
|
39
|
+
}
|
|
40
|
+
return (r, f) => {
|
|
41
|
+
const v = ve, B = G("JsonItem", !0);
|
|
42
|
+
return l(), i("div", {
|
|
43
|
+
style: X({ paddingLeft: `${s.depth * 0.35}em` }),
|
|
44
|
+
class: C(["ring-(--ui-bg-muted)", {
|
|
45
|
+
"hover:ring": o.value,
|
|
46
|
+
"rounded-tl": s.depth > 0
|
|
47
|
+
}])
|
|
48
|
+
}, [
|
|
49
|
+
e("div", {
|
|
50
|
+
class: C(["flex items-center gap-2 py-0.5 bg-transparent hover:bg-(--ui-bg-muted) duration-200 transition-colors", s.depth > 0 && "rounded-l"])
|
|
51
|
+
}, [
|
|
52
|
+
o.value ? (l(), b(v, {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: C(["size-3 text-(--ui-text-dimmed) transition-transform duration-200 cursor-pointer", { "rotate-90": m.value }]),
|
|
55
|
+
onClick: x
|
|
56
|
+
}, null, 8, ["class"])) : M("", !0),
|
|
57
|
+
e("span", {
|
|
58
|
+
class: C(["text-(--devtools-syntax-gray)", !o.value && "ml-5"])
|
|
59
|
+
}, u(s.itemKey) + ": ", 3),
|
|
60
|
+
e("span", {
|
|
61
|
+
class: C([a(D)(s.value), o.value && "cursor-pointer"]),
|
|
62
|
+
title: o.value ? "Click to expand" : void 0,
|
|
63
|
+
onClick: x
|
|
64
|
+
}, u(a(L)(s.value)), 11, he)
|
|
65
|
+
], 2),
|
|
66
|
+
o.value && m.value ? (l(!0), i(q, { key: 0 }, V(y.value, ([S, w]) => (l(), b(B, {
|
|
67
|
+
key: S,
|
|
68
|
+
"item-key": String(S),
|
|
69
|
+
value: w,
|
|
70
|
+
depth: s.depth + 1
|
|
71
|
+
}, null, 8, ["item-key", "value", "depth"]))), 128)) : M("", !0)
|
|
72
|
+
], 6);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
function ge(s) {
|
|
77
|
+
return !!s && (Array.isArray(s) || H(s) || s instanceof Map || s instanceof Set);
|
|
78
|
+
}
|
|
79
|
+
const _e = /* @__PURE__ */ z({
|
|
80
|
+
__name: "JsonViewer",
|
|
81
|
+
props: {
|
|
82
|
+
data: {}
|
|
83
|
+
},
|
|
84
|
+
setup(s) {
|
|
85
|
+
return (n, m) => ge(s.data) ? (l(!0), i(q, { key: 0 }, V(Object.entries(s.data), ([o, y]) => (l(), b(fe, {
|
|
86
|
+
key: o,
|
|
87
|
+
"item-key": o,
|
|
88
|
+
value: y,
|
|
89
|
+
depth: 0
|
|
90
|
+
}, null, 8, ["item-key", "value"]))), 128)) : (l(), i("span", {
|
|
91
|
+
key: 1,
|
|
92
|
+
class: C(a(D)(s.data))
|
|
93
|
+
}, u(a(L)(s.data)), 3));
|
|
94
|
+
}
|
|
95
|
+
}), ye = {
|
|
96
|
+
viewBox: "0 0 24 24",
|
|
97
|
+
width: "1.2em",
|
|
98
|
+
height: "1.2em"
|
|
99
|
+
};
|
|
100
|
+
function ke(s, n) {
|
|
101
|
+
return l(), i("svg", ye, [...n[0] || (n[0] = [
|
|
102
|
+
e("path", {
|
|
103
|
+
fill: "none",
|
|
104
|
+
stroke: "currentColor",
|
|
105
|
+
"stroke-linecap": "round",
|
|
106
|
+
"stroke-linejoin": "round",
|
|
107
|
+
"stroke-width": "2",
|
|
108
|
+
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"
|
|
109
|
+
}, null, -1)
|
|
110
|
+
])]);
|
|
111
|
+
}
|
|
112
|
+
const xe = g({ name: "lucide-trash", render: ke }), be = {
|
|
113
|
+
viewBox: "0 0 24 24",
|
|
114
|
+
width: "1.2em",
|
|
115
|
+
height: "1.2em"
|
|
116
|
+
};
|
|
117
|
+
function we(s, n) {
|
|
118
|
+
return l(), i("svg", be, [...n[0] || (n[0] = [
|
|
119
|
+
e("g", {
|
|
120
|
+
fill: "none",
|
|
121
|
+
stroke: "currentColor",
|
|
122
|
+
"stroke-linecap": "round",
|
|
123
|
+
"stroke-linejoin": "round",
|
|
124
|
+
"stroke-width": "2"
|
|
125
|
+
}, [
|
|
126
|
+
e("path", { d: "M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
127
|
+
e("path", { d: "M3 3v5h5" })
|
|
128
|
+
], -1)
|
|
129
|
+
])]);
|
|
130
|
+
}
|
|
131
|
+
const $e = g({ name: "lucide-rotate-ccw", render: we }), Ce = {
|
|
132
|
+
viewBox: "0 0 24 24",
|
|
133
|
+
width: "1.2em",
|
|
134
|
+
height: "1.2em"
|
|
135
|
+
};
|
|
136
|
+
function Me(s, n) {
|
|
137
|
+
return l(), i("svg", Ce, [...n[0] || (n[0] = [
|
|
138
|
+
e("g", {
|
|
139
|
+
fill: "none",
|
|
140
|
+
stroke: "currentColor",
|
|
141
|
+
"stroke-linecap": "round",
|
|
142
|
+
"stroke-linejoin": "round",
|
|
143
|
+
"stroke-width": "2"
|
|
144
|
+
}, [
|
|
145
|
+
e("path", { d: "M10 2h4m-2 12v-4m-8 3a8 8 0 0 1 8-7a8 8 0 1 1-5.3 14L4 17.6" }),
|
|
146
|
+
e("path", { d: "M9 17H4v5" })
|
|
147
|
+
], -1)
|
|
148
|
+
])]);
|
|
149
|
+
}
|
|
150
|
+
const Se = g({ name: "lucide-timer-reset", render: Me }), qe = {
|
|
151
|
+
viewBox: "0 0 24 24",
|
|
152
|
+
width: "1.2em",
|
|
153
|
+
height: "1.2em"
|
|
154
|
+
};
|
|
155
|
+
function Be(s, n) {
|
|
156
|
+
return l(), i("svg", qe, [...n[0] || (n[0] = [
|
|
157
|
+
e("g", {
|
|
158
|
+
fill: "none",
|
|
159
|
+
stroke: "currentColor",
|
|
160
|
+
"stroke-linecap": "round",
|
|
161
|
+
"stroke-linejoin": "round",
|
|
162
|
+
"stroke-width": "2"
|
|
163
|
+
}, [
|
|
164
|
+
e("path", { d: "M3 12a9 9 0 0 1 9-9a9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
165
|
+
e("path", { d: "M21 3v5h-5m5 4a9 9 0 0 1-9 9a9.75 9.75 0 0 1-6.74-2.74L3 16" }),
|
|
166
|
+
e("path", { d: "M8 16H3v5" })
|
|
167
|
+
], -1)
|
|
168
|
+
])]);
|
|
169
|
+
}
|
|
170
|
+
const je = g({ name: "lucide-refresh-cw", render: Be }), ze = { class: "collapse collapse-arrow" }, Te = { class: "collapse-title px-2 py-0.5 bg-neutral-200 dark:bg-neutral-800 theme-neutral" }, Ie = { class: "font-semibold text-sm flex gap-x-1 items-center" }, He = /* @__PURE__ */ z({
|
|
171
|
+
__name: "UCollapse.ce",
|
|
172
|
+
props: /* @__PURE__ */ K({
|
|
173
|
+
title: { type: String },
|
|
174
|
+
icon: { type: null },
|
|
175
|
+
noPadding: { type: Boolean }
|
|
176
|
+
}, {
|
|
177
|
+
open: { type: Boolean, default: !0 },
|
|
178
|
+
openModifiers: {}
|
|
179
|
+
}),
|
|
180
|
+
emits: ["update:open"],
|
|
181
|
+
setup(s) {
|
|
182
|
+
const n = Z(s, "open");
|
|
183
|
+
function m(o) {
|
|
184
|
+
if (o.target instanceof HTMLElement) {
|
|
185
|
+
const y = {
|
|
186
|
+
block: "nearest",
|
|
187
|
+
inline: "nearest",
|
|
188
|
+
behavior: "smooth"
|
|
189
|
+
};
|
|
190
|
+
o.target.scrollIntoView(y);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return (o, y) => (l(), i("div", ze, [
|
|
194
|
+
ee(e("input", {
|
|
195
|
+
"onUpdate:modelValue": y[0] || (y[0] = (x) => n.value = x),
|
|
196
|
+
type: "checkbox"
|
|
197
|
+
}, null, 512), [
|
|
198
|
+
[te, n.value]
|
|
199
|
+
]),
|
|
200
|
+
e("div", Te, [
|
|
201
|
+
T(o.$slots, "title", {
|
|
202
|
+
open: n.value,
|
|
203
|
+
title: s.title
|
|
204
|
+
}, () => [
|
|
205
|
+
e("h3", Ie, [
|
|
206
|
+
T(o.$slots, "icon", {}, () => [
|
|
207
|
+
s.icon ? (l(), b(oe(s.icon), {
|
|
208
|
+
key: 0,
|
|
209
|
+
class: "size-4"
|
|
210
|
+
})) : M("", !0)
|
|
211
|
+
], !0),
|
|
212
|
+
h(" " + u(s.title ?? "Group"), 1)
|
|
213
|
+
])
|
|
214
|
+
], !0)
|
|
215
|
+
]),
|
|
216
|
+
e("div", {
|
|
217
|
+
class: C([!s.noPadding && "px-2", "collapse-content text-sm overflow-hidden"]),
|
|
218
|
+
onTransitionend: m
|
|
219
|
+
}, [
|
|
220
|
+
T(o.$slots, "default", { open: n.value }, void 0, !0)
|
|
221
|
+
], 34)
|
|
222
|
+
]));
|
|
223
|
+
}
|
|
224
|
+
}), Ve = '.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}', Ae = /* @__PURE__ */ ne(He, [["styles", [Ve]], ["__scopeId", "data-v-46c2be51"]]);
|
|
225
|
+
function Oe(s) {
|
|
226
|
+
if (s < 1e3)
|
|
227
|
+
return `${Math.round(s)} ms`;
|
|
228
|
+
const n = s / 1e3;
|
|
229
|
+
if (s < 1e4)
|
|
230
|
+
return `${n.toFixed(3)} seconds`;
|
|
231
|
+
if (s < 6e4)
|
|
232
|
+
return `${Math.floor(n)} seconds`;
|
|
233
|
+
const m = Math.floor(n / 60);
|
|
234
|
+
return s < 36e5 ? `${m} minute${m > 1 ? "s" : ""}` : `${Math.floor(m / 60)}h${m % 60}m${n % 60}s`;
|
|
235
|
+
}
|
|
236
|
+
const Ee = {
|
|
237
|
+
viewBox: "0 0 24 24",
|
|
238
|
+
width: "1.2em",
|
|
239
|
+
height: "1.2em"
|
|
240
|
+
};
|
|
241
|
+
function De(s, n) {
|
|
242
|
+
return l(), i("svg", Ee, [...n[0] || (n[0] = [
|
|
243
|
+
e("path", {
|
|
244
|
+
fill: "none",
|
|
245
|
+
stroke: "currentColor",
|
|
246
|
+
"stroke-linecap": "round",
|
|
247
|
+
"stroke-linejoin": "round",
|
|
248
|
+
"stroke-width": "2",
|
|
249
|
+
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"
|
|
250
|
+
}, null, -1)
|
|
251
|
+
])]);
|
|
252
|
+
}
|
|
253
|
+
const Le = g({ name: "lucide-wrench", render: De }), Re = {
|
|
254
|
+
viewBox: "0 0 24 24",
|
|
255
|
+
width: "1.2em",
|
|
256
|
+
height: "1.2em"
|
|
257
|
+
};
|
|
258
|
+
function Ne(s, n) {
|
|
259
|
+
return l(), i("svg", Re, [...n[0] || (n[0] = [
|
|
260
|
+
e("g", {
|
|
261
|
+
fill: "none",
|
|
262
|
+
stroke: "currentColor",
|
|
263
|
+
"stroke-linecap": "round",
|
|
264
|
+
"stroke-linejoin": "round",
|
|
265
|
+
"stroke-width": "2"
|
|
266
|
+
}, [
|
|
267
|
+
e("circle", {
|
|
268
|
+
cx: "12",
|
|
269
|
+
cy: "12",
|
|
270
|
+
r: "10"
|
|
271
|
+
}),
|
|
272
|
+
e("path", { d: "M12 16v-4m0-4h.01" })
|
|
273
|
+
], -1)
|
|
274
|
+
])]);
|
|
275
|
+
}
|
|
276
|
+
const Ue = g({ name: "lucide-info", render: Ne }), Fe = {
|
|
277
|
+
viewBox: "0 0 24 24",
|
|
278
|
+
width: "1.2em",
|
|
279
|
+
height: "1.2em"
|
|
280
|
+
};
|
|
281
|
+
function Je(s, n) {
|
|
282
|
+
return l(), i("svg", Fe, [...n[0] || (n[0] = [
|
|
283
|
+
e("g", {
|
|
284
|
+
fill: "none",
|
|
285
|
+
stroke: "currentColor",
|
|
286
|
+
"stroke-linecap": "round",
|
|
287
|
+
"stroke-linejoin": "round",
|
|
288
|
+
"stroke-width": "2"
|
|
289
|
+
}, [
|
|
290
|
+
e("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
291
|
+
e("path", { d: "M14 2v4a2 2 0 0 0 2 2h4M10 9H8m8 4H8m8 4H8" })
|
|
292
|
+
], -1)
|
|
293
|
+
])]);
|
|
294
|
+
}
|
|
295
|
+
const Pe = g({ name: "lucide-file-text", render: Je }), Qe = {
|
|
296
|
+
viewBox: "0 0 24 24",
|
|
297
|
+
width: "1.2em",
|
|
298
|
+
height: "1.2em"
|
|
299
|
+
};
|
|
300
|
+
function We(s, n) {
|
|
301
|
+
return l(), i("svg", Qe, [...n[0] || (n[0] = [
|
|
302
|
+
e("g", {
|
|
303
|
+
fill: "none",
|
|
304
|
+
stroke: "currentColor",
|
|
305
|
+
"stroke-linecap": "round",
|
|
306
|
+
"stroke-linejoin": "round",
|
|
307
|
+
"stroke-width": "2"
|
|
308
|
+
}, [
|
|
309
|
+
e("circle", {
|
|
310
|
+
cx: "12",
|
|
311
|
+
cy: "12",
|
|
312
|
+
r: "10"
|
|
313
|
+
}),
|
|
314
|
+
e("path", { d: "m15 9l-6 6m0-6l6 6" })
|
|
315
|
+
], -1)
|
|
316
|
+
])]);
|
|
317
|
+
}
|
|
318
|
+
const Ye = g({ name: "lucide-circle-x", render: We }), Ge = {
|
|
319
|
+
viewBox: "0 0 24 24",
|
|
320
|
+
width: "1.2em",
|
|
321
|
+
height: "1.2em"
|
|
322
|
+
};
|
|
323
|
+
function Xe(s, n) {
|
|
324
|
+
return l(), i("svg", Ge, [...n[0] || (n[0] = [
|
|
325
|
+
e("path", {
|
|
326
|
+
fill: "none",
|
|
327
|
+
stroke: "currentColor",
|
|
328
|
+
"stroke-linecap": "round",
|
|
329
|
+
"stroke-linejoin": "round",
|
|
330
|
+
"stroke-width": "2",
|
|
331
|
+
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"
|
|
332
|
+
}, null, -1)
|
|
333
|
+
])]);
|
|
334
|
+
}
|
|
335
|
+
const Ke = g({ name: "lucide-braces", render: Xe }), Ze = {
|
|
336
|
+
viewBox: "0 0 24 24",
|
|
337
|
+
width: "1.2em",
|
|
338
|
+
height: "1.2em"
|
|
339
|
+
};
|
|
340
|
+
function et(s, n) {
|
|
341
|
+
return l(), i("svg", Ze, [...n[0] || (n[0] = [
|
|
342
|
+
e("g", {
|
|
343
|
+
fill: "none",
|
|
344
|
+
stroke: "currentColor",
|
|
345
|
+
"stroke-linecap": "round",
|
|
346
|
+
"stroke-linejoin": "round",
|
|
347
|
+
"stroke-width": "2"
|
|
348
|
+
}, [
|
|
349
|
+
e("path", { d: "M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
350
|
+
e("path", { d: "M3 3v5h5m4-1v5l4 2" })
|
|
351
|
+
], -1)
|
|
352
|
+
])]);
|
|
353
|
+
}
|
|
354
|
+
const tt = g({ name: "lucide-history", render: et }), ot = {
|
|
355
|
+
viewBox: "0 0 24 24",
|
|
356
|
+
width: "1.2em",
|
|
357
|
+
height: "1.2em"
|
|
358
|
+
};
|
|
359
|
+
function nt(s, n) {
|
|
360
|
+
return l(), i("svg", ot, [...n[0] || (n[0] = [
|
|
361
|
+
e("g", {
|
|
362
|
+
fill: "none",
|
|
363
|
+
stroke: "currentColor",
|
|
364
|
+
"stroke-linecap": "round",
|
|
365
|
+
"stroke-linejoin": "round",
|
|
366
|
+
"stroke-width": "2"
|
|
367
|
+
}, [
|
|
368
|
+
e("rect", {
|
|
369
|
+
width: "18",
|
|
370
|
+
height: "18",
|
|
371
|
+
x: "3",
|
|
372
|
+
y: "3",
|
|
373
|
+
rx: "2"
|
|
374
|
+
}),
|
|
375
|
+
e("path", { d: "M16 8.9V7H8l4 5l-4 5h8v-1.9" })
|
|
376
|
+
], -1)
|
|
377
|
+
])]);
|
|
378
|
+
}
|
|
379
|
+
const st = g({ name: "lucide-sigma-square", render: nt }), lt = { class: "flex flex-col divide-y dark:divide-(--ui-border) divide-(--ui-border-accented)" }, it = { class: "py-1 text-sm" }, at = { class: "grid grid-cols-[auto_1fr] gap-1" }, rt = { class: "rounded bg-neutral-500/20 p-0.5" }, dt = {
|
|
380
|
+
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
381
|
+
title: "When was the query entry last updated"
|
|
382
|
+
}, ut = { class: "font-bold" }, ct = {
|
|
383
|
+
key: 0,
|
|
384
|
+
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
385
|
+
title: "When was the last time the query was fetched"
|
|
386
|
+
}, pt = { class: "font-bold" }, mt = {
|
|
387
|
+
key: 1,
|
|
388
|
+
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
389
|
+
title: "How long did the last query take to fetch"
|
|
390
|
+
}, vt = { class: "font-bold" }, ht = {
|
|
391
|
+
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
392
|
+
title: "How many components and effects are using this query"
|
|
393
|
+
}, ft = { class: "font-bold" }, gt = {
|
|
394
|
+
key: 2,
|
|
395
|
+
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
396
|
+
title: "When is this query entry garbace collected"
|
|
397
|
+
}, _t = { class: "font-bold" }, yt = { class: "py-2 gap-2 flex flex-wrap items-center justify-items-start" }, kt = { class: "py-1" }, xt = {
|
|
398
|
+
key: 0,
|
|
399
|
+
class: "rounded p-1 overflow-auto max-h-[1200px]"
|
|
400
|
+
}, bt = {
|
|
401
|
+
key: 1,
|
|
402
|
+
class: "text-neutral-500/50"
|
|
403
|
+
}, wt = { class: "py-1" }, $t = { class: "grid grid-cols-[auto_1fr] gap-1" }, Ct = { class: "font-bold" }, Mt = { class: "font-bold" }, St = { class: "font-bold" }, qt = { class: "font-bold" }, Bt = { class: "py-1" }, jt = { class: "rounded p-1 overflow-auto max-h-[1200px]" }, zt = { class: "py-1" }, Tt = {
|
|
404
|
+
key: 0,
|
|
405
|
+
class: "rounded bg-neutral-500/20 p-1 overflow-auto max-h-[1200px]"
|
|
406
|
+
}, It = { key: 1 }, Ht = {
|
|
407
|
+
key: 1,
|
|
408
|
+
class: "py-6 mx-auto"
|
|
409
|
+
}, Vt = { class: "flex flex-col text-center items-center gap-2 text-lg px-2" }, Lt = /* @__PURE__ */ z({
|
|
410
|
+
__name: "[queryId]",
|
|
411
|
+
setup(s) {
|
|
412
|
+
const n = ae(), m = se(), o = j(() => m.value.find((_) => _.keyHash === n.params.queryId) ?? null), y = j(() => o.value?.devtools.history.map((_) => {
|
|
413
|
+
let t;
|
|
414
|
+
try {
|
|
415
|
+
t = JSON.stringify(_, null, 2);
|
|
416
|
+
} catch (k) {
|
|
417
|
+
t = `Error serializing entry: ${String(k)}`;
|
|
418
|
+
}
|
|
419
|
+
return {
|
|
420
|
+
..._,
|
|
421
|
+
data: t
|
|
422
|
+
};
|
|
423
|
+
}) ?? []), x = {
|
|
424
|
+
showSecond: !0,
|
|
425
|
+
rounding: "floor",
|
|
426
|
+
max: 1e3 * 60 * 5
|
|
427
|
+
// 5 minutes
|
|
428
|
+
}, r = re(() => o.value?.devtools.updatedAt ?? 0, {
|
|
429
|
+
...x,
|
|
430
|
+
updateInterval: 3e3
|
|
431
|
+
}), f = le(), v = O("pc:query:details:data:open", !1, {});
|
|
432
|
+
let B = v.value, S = null;
|
|
433
|
+
const w = O("pc:query:details:error:open", !1, {});
|
|
434
|
+
return ie(
|
|
435
|
+
() => o.value?.state,
|
|
436
|
+
(_) => {
|
|
437
|
+
!_ || S === _.status || (S = _.status, _.status === "error" ? (w.value = !0, B = v.value, v.value = !1) : _.status === "success" && (v.value = B, w.value = !1));
|
|
438
|
+
}
|
|
439
|
+
), (_, t) => {
|
|
440
|
+
const k = Ae, R = je, $ = de, N = Se, A = ue, U = ce, F = $e, J = xe, P = _e, Q = W;
|
|
441
|
+
return l(), i("div", lt, [
|
|
442
|
+
o.value ? (l(), i(q, { key: 0 }, [
|
|
443
|
+
d(k, {
|
|
444
|
+
title: "Details",
|
|
445
|
+
icon: a(Ue)
|
|
446
|
+
}, {
|
|
447
|
+
default: p(() => [
|
|
448
|
+
e("div", it, [
|
|
449
|
+
e("p", at, [
|
|
450
|
+
t[9] || (t[9] = e("span", null, "key:", -1)),
|
|
451
|
+
e("span", null, [
|
|
452
|
+
e("code", rt, u(o.value.key), 1)
|
|
453
|
+
])
|
|
454
|
+
]),
|
|
455
|
+
e("p", dt, [
|
|
456
|
+
t[10] || (t[10] = e("span", null, "Last update:", -1)),
|
|
457
|
+
e("span", ut, u(a(r)), 1)
|
|
458
|
+
]),
|
|
459
|
+
o.value.devtools.history.at(0)?.fetchTime ? (l(), i("p", ct, [
|
|
460
|
+
t[11] || (t[11] = e("span", null, "Last fetch:", -1)),
|
|
461
|
+
e("span", pt, u(a(I)(new Date(o.value.devtools.history.at(0).fetchTime.start), {
|
|
462
|
+
...x,
|
|
463
|
+
max: void 0
|
|
464
|
+
})), 1)
|
|
465
|
+
])) : M("", !0),
|
|
466
|
+
o.value.devtools.history.at(0)?.fetchTime?.end ? (l(), i("p", mt, [
|
|
467
|
+
t[12] || (t[12] = e("span", null, "Fetch duration:", -1)),
|
|
468
|
+
e("span", vt, u(a(Oe)(
|
|
469
|
+
o.value.devtools.history.at(0).fetchTime.end - o.value.devtools.history.at(0).fetchTime.start
|
|
470
|
+
)), 1)
|
|
471
|
+
])) : M("", !0),
|
|
472
|
+
e("p", ht, [
|
|
473
|
+
e("span", null, [
|
|
474
|
+
t[13] || (t[13] = h("Observers: ", -1)),
|
|
475
|
+
e("span", ft, u(o.value.deps.length), 1)
|
|
476
|
+
])
|
|
477
|
+
]),
|
|
478
|
+
!o.value.active && o.value.options ? (l(), i("p", gt, [
|
|
479
|
+
typeof o.value.options.gcTime == "number" && Number.isFinite(o.value.options.gcTime) ? (l(), i(q, { key: 0 }, [
|
|
480
|
+
t[14] || (t[14] = e("span", null, [
|
|
481
|
+
h("Will be "),
|
|
482
|
+
e("i", null, "gced")
|
|
483
|
+
], -1)),
|
|
484
|
+
e("span", _t, u(a(I)(
|
|
485
|
+
new Date(o.value.devtools.inactiveAt + o.value.options.gcTime),
|
|
486
|
+
{
|
|
487
|
+
...x,
|
|
488
|
+
max: void 0
|
|
489
|
+
}
|
|
490
|
+
)), 1)
|
|
491
|
+
], 64)) : M("", !0)
|
|
492
|
+
])) : M("", !0)
|
|
493
|
+
])
|
|
494
|
+
]),
|
|
495
|
+
_: 1
|
|
496
|
+
}, 8, ["icon"]),
|
|
497
|
+
d(k, {
|
|
498
|
+
title: "Actions",
|
|
499
|
+
icon: a(Le)
|
|
500
|
+
}, {
|
|
501
|
+
default: p(() => [
|
|
502
|
+
e("div", yt, [
|
|
503
|
+
d($, {
|
|
504
|
+
class: "theme-info",
|
|
505
|
+
size: "sm",
|
|
506
|
+
title: "Refetch this query",
|
|
507
|
+
disabled: o.value.options?.enabled === !1,
|
|
508
|
+
onClick: t[0] || (t[0] = (c) => a(f).emit("queries:refetch", o.value.key))
|
|
509
|
+
}, {
|
|
510
|
+
default: p(() => [
|
|
511
|
+
d(R, { class: "size-3.5" }),
|
|
512
|
+
t[15] || (t[15] = h(" Refetch ", -1))
|
|
513
|
+
]),
|
|
514
|
+
_: 1
|
|
515
|
+
}, 8, ["disabled"]),
|
|
516
|
+
d($, {
|
|
517
|
+
class: "theme-neutral",
|
|
518
|
+
size: "sm",
|
|
519
|
+
title: "Invalidate this query",
|
|
520
|
+
onClick: t[1] || (t[1] = (c) => a(f).emit("queries:invalidate", o.value.key))
|
|
521
|
+
}, {
|
|
522
|
+
default: p(() => [
|
|
523
|
+
d(N),
|
|
524
|
+
t[16] || (t[16] = h(" Invalidate ", -1))
|
|
525
|
+
]),
|
|
526
|
+
_: 1
|
|
527
|
+
}),
|
|
528
|
+
o.value.devtools.simulate !== "loading" ? (l(), b($, {
|
|
529
|
+
key: 0,
|
|
530
|
+
class: "theme-purple",
|
|
531
|
+
size: "sm",
|
|
532
|
+
title: "Restore the previous state",
|
|
533
|
+
onClick: t[2] || (t[2] = (c) => a(f).emit("queries:simulate:loading", o.value.key))
|
|
534
|
+
}, {
|
|
535
|
+
default: p(() => [
|
|
536
|
+
d(A),
|
|
537
|
+
t[17] || (t[17] = h(" Simulate loading ", -1))
|
|
538
|
+
]),
|
|
539
|
+
_: 1
|
|
540
|
+
})) : (l(), b($, {
|
|
541
|
+
key: 1,
|
|
542
|
+
class: "theme-purple",
|
|
543
|
+
size: "sm",
|
|
544
|
+
title: "Simulate a loading state",
|
|
545
|
+
onClick: t[3] || (t[3] = (c) => a(f).emit("queries:simulate:loading:stop", o.value.key))
|
|
546
|
+
}, {
|
|
547
|
+
default: p(() => [
|
|
548
|
+
d(A, { class: "animate-spin" }),
|
|
549
|
+
t[18] || (t[18] = h(" Stop loading ", -1))
|
|
550
|
+
]),
|
|
551
|
+
_: 1
|
|
552
|
+
})),
|
|
553
|
+
o.value.devtools.simulate !== "error" ? (l(), b($, {
|
|
554
|
+
key: 2,
|
|
555
|
+
class: "theme-error",
|
|
556
|
+
size: "sm",
|
|
557
|
+
title: "Simulate an Error state",
|
|
558
|
+
onClick: t[4] || (t[4] = (c) => a(f).emit("queries:simulate:error", o.value.key))
|
|
559
|
+
}, {
|
|
560
|
+
default: p(() => [
|
|
561
|
+
d(U),
|
|
562
|
+
t[19] || (t[19] = h(" Simulate error ", -1))
|
|
563
|
+
]),
|
|
564
|
+
_: 1
|
|
565
|
+
})) : (l(), b($, {
|
|
566
|
+
key: 3,
|
|
567
|
+
class: "theme-error",
|
|
568
|
+
size: "sm",
|
|
569
|
+
title: "Restore the previous state",
|
|
570
|
+
onClick: t[5] || (t[5] = (c) => a(f).emit("queries:simulate:error:stop", o.value.key))
|
|
571
|
+
}, {
|
|
572
|
+
default: p(() => [
|
|
573
|
+
d(F),
|
|
574
|
+
t[20] || (t[20] = h(" Remove error ", -1))
|
|
575
|
+
]),
|
|
576
|
+
_: 1
|
|
577
|
+
})),
|
|
578
|
+
d($, {
|
|
579
|
+
class: "theme-warning",
|
|
580
|
+
size: "sm",
|
|
581
|
+
title: "Reset this query to its initial (pending) state",
|
|
582
|
+
onClick: t[6] || (t[6] = (c) => a(f).emit("queries:reset", o.value.key))
|
|
583
|
+
}, {
|
|
584
|
+
default: p(() => [
|
|
585
|
+
d(J),
|
|
586
|
+
t[21] || (t[21] = h(" Reset ", -1))
|
|
587
|
+
]),
|
|
588
|
+
_: 1
|
|
589
|
+
})
|
|
590
|
+
])
|
|
591
|
+
]),
|
|
592
|
+
_: 1
|
|
593
|
+
}, 8, ["icon"]),
|
|
594
|
+
d(k, {
|
|
595
|
+
open: a(v),
|
|
596
|
+
"onUpdate:open": t[7] || (t[7] = (c) => E(v) ? v.value = c : null),
|
|
597
|
+
title: "Data",
|
|
598
|
+
icon: a(Pe),
|
|
599
|
+
class: "font-mono",
|
|
600
|
+
"no-padding": ""
|
|
601
|
+
}, {
|
|
602
|
+
default: p(() => [
|
|
603
|
+
d(P, {
|
|
604
|
+
data: o.value.state.data
|
|
605
|
+
}, null, 8, ["data"])
|
|
606
|
+
]),
|
|
607
|
+
_: 1
|
|
608
|
+
}, 8, ["open", "icon"]),
|
|
609
|
+
d(k, {
|
|
610
|
+
open: a(w),
|
|
611
|
+
"onUpdate:open": t[8] || (t[8] = (c) => E(w) ? w.value = c : null),
|
|
612
|
+
title: `Error${o.value.state.status === "error" ? " (!)" : ""}`,
|
|
613
|
+
icon: a(Ye)
|
|
614
|
+
}, {
|
|
615
|
+
default: p(() => [
|
|
616
|
+
e("div", kt, [
|
|
617
|
+
o.value.state.error ? (l(), i("pre", xt, u(o.value.state.error), 1)) : (l(), i("p", bt, "No error"))
|
|
618
|
+
])
|
|
619
|
+
]),
|
|
620
|
+
_: 1
|
|
621
|
+
}, 8, ["open", "title", "icon"]),
|
|
622
|
+
d(k, {
|
|
623
|
+
title: "Call count",
|
|
624
|
+
icon: a(st),
|
|
625
|
+
open: !1
|
|
626
|
+
}, {
|
|
627
|
+
default: p(() => [
|
|
628
|
+
e("div", wt, [
|
|
629
|
+
e("p", $t, [
|
|
630
|
+
t[22] || (t[22] = e("span", null, "Calls:", -1)),
|
|
631
|
+
e("span", null, [
|
|
632
|
+
e("code", Ct, u(o.value.devtools.count.total), 1)
|
|
633
|
+
]),
|
|
634
|
+
t[23] || (t[23] = e("span", null, "Success:", -1)),
|
|
635
|
+
e("span", null, [
|
|
636
|
+
e("code", Mt, u(o.value.devtools.count.succeed), 1)
|
|
637
|
+
]),
|
|
638
|
+
t[24] || (t[24] = e("span", null, "Errors:", -1)),
|
|
639
|
+
e("span", null, [
|
|
640
|
+
e("code", St, u(o.value.devtools.count.errored), 1)
|
|
641
|
+
]),
|
|
642
|
+
t[25] || (t[25] = e("span", null, "Cancelled:", -1)),
|
|
643
|
+
e("span", null, [
|
|
644
|
+
e("code", qt, u(o.value.devtools.count.cancelled), 1)
|
|
645
|
+
])
|
|
646
|
+
])
|
|
647
|
+
])
|
|
648
|
+
]),
|
|
649
|
+
_: 1
|
|
650
|
+
}, 8, ["icon"]),
|
|
651
|
+
d(k, {
|
|
652
|
+
title: `History (${o.value.devtools.history.length})`,
|
|
653
|
+
icon: a(tt),
|
|
654
|
+
open: !1
|
|
655
|
+
}, {
|
|
656
|
+
default: p(() => [
|
|
657
|
+
e("div", Bt, [
|
|
658
|
+
(l(!0), i(q, null, V(y.value, (c) => (l(), b(k, {
|
|
659
|
+
key: c.updatedAt,
|
|
660
|
+
title: `Entry nº${c.id} (${a(I)(new Date(c.updatedAt), x)})`,
|
|
661
|
+
open: !1
|
|
662
|
+
}, {
|
|
663
|
+
default: p(() => [
|
|
664
|
+
e("pre", jt, u(c.data), 1)
|
|
665
|
+
]),
|
|
666
|
+
_: 2
|
|
667
|
+
}, 1032, ["title"]))), 128))
|
|
668
|
+
])
|
|
669
|
+
]),
|
|
670
|
+
_: 1
|
|
671
|
+
}, 8, ["title", "icon"]),
|
|
672
|
+
d(k, {
|
|
673
|
+
title: "Options",
|
|
674
|
+
open: !1,
|
|
675
|
+
icon: a(Ke)
|
|
676
|
+
}, {
|
|
677
|
+
default: p(() => [
|
|
678
|
+
e("div", zt, [
|
|
679
|
+
o.value.options ? (l(), i("pre", Tt, u(o.value.options), 1)) : (l(), i("p", It, [...t[26] || (t[26] = [
|
|
680
|
+
h(" This Query entry has no options. It might have been created from the server or manually set with ", -1),
|
|
681
|
+
e("code", null, "queryCache.setQueryData()", -1),
|
|
682
|
+
h(" for prefetching. ", -1)
|
|
683
|
+
])]))
|
|
684
|
+
])
|
|
685
|
+
]),
|
|
686
|
+
_: 1
|
|
687
|
+
}, 8, ["icon"])
|
|
688
|
+
], 64)) : (l(), i("div", Ht, [
|
|
689
|
+
e("p", Vt, [
|
|
690
|
+
t[27] || (t[27] = h(" Select a Query to inspect ", -1)),
|
|
691
|
+
d(Q)
|
|
692
|
+
])
|
|
693
|
+
]))
|
|
694
|
+
]);
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
});
|
|
698
|
+
export {
|
|
699
|
+
Lt as default
|
|
700
|
+
};
|
|
701
|
+
//# sourceMappingURL=_queryId_-Belc_zp1.js.map
|