@pinia/colada-devtools 0.4.1 → 0.4.3
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 +131 -131
- package/dist/index.js.map +1 -1
- package/dist-panel/{(unselected)-1XtzP47s.js → (unselected)-BQ3qDKQ9.js} +4 -4
- package/dist-panel/{(unselected)-1XtzP47s.js.map → (unselected)-BQ3qDKQ9.js.map} +1 -1
- package/dist-panel/(unselected)-DAm41Y3x.js +17 -0
- package/dist-panel/{(unselected)-CF4tcOEp.js.map → (unselected)-DAm41Y3x.js.map} +1 -1
- package/dist-panel/{_mutationId_-DmzWbpVT.js → _mutationId_int_-erdQKyLR.js} +39 -39
- package/dist-panel/_mutationId_int_-erdQKyLR.js.map +1 -0
- package/dist-panel/{_queryId_-5tGPPWCM.js → _queryId_-B4Df55YE.js} +51 -51
- package/dist-panel/{_queryId_-5tGPPWCM.js.map → _queryId_-B4Df55YE.js.map} +1 -1
- package/dist-panel/{circle-x-eNhJ6QJ3.js → circle-x-InxlHvaS.js} +35 -35
- package/dist-panel/{circle-x-eNhJ6QJ3.js.map → circle-x-InxlHvaS.js.map} +1 -1
- package/dist-panel/index-CYb5D1Be.js +6270 -0
- package/dist-panel/index-CYb5D1Be.js.map +1 -0
- package/dist-panel/index-DLKyTdsm.js +10 -0
- package/dist-panel/{index-C5FekW9K.js.map → index-DLKyTdsm.js.map} +1 -1
- package/dist-panel/index.js +1 -1
- package/dist-panel/{loader-DjhAUFXk.js → loader-Ca7c0zg-.js} +4 -4
- package/dist-panel/loader-Ca7c0zg-.js.map +1 -0
- package/dist-panel/{mouse-pointer-click-BwcHzNw_.js → mouse-pointer-click-ClYfwImy.js} +3 -3
- package/dist-panel/mouse-pointer-click-ClYfwImy.js.map +1 -0
- package/dist-panel/{mutations-Fiuj8fCV.js → mutations-pMmse5fr.js} +15 -15
- package/dist-panel/mutations-pMmse5fr.js.map +1 -0
- package/dist-panel/queries-BM6WYBXZ.js +312 -0
- package/dist-panel/queries-BM6WYBXZ.js.map +1 -0
- package/dist-panel/settings-C2hLj-3B.js +10 -0
- package/dist-panel/{settings-BHmLo73t.js.map → settings-C2hLj-3B.js.map} +1 -1
- package/dist-panel/{use-container-media-query-DHWhgIKV.js → use-container-media-query-CrxtYrv0.js} +43 -43
- package/dist-panel/{use-container-media-query-DHWhgIKV.js.map → use-container-media-query-CrxtYrv0.js.map} +1 -1
- package/package.json +11 -12
- package/dist-panel/(unselected)-CF4tcOEp.js +0 -17
- package/dist-panel/_mutationId_-DmzWbpVT.js.map +0 -1
- package/dist-panel/index-C5FekW9K.js +0 -10
- package/dist-panel/index-D0GQZaew.js +0 -6438
- package/dist-panel/index-D0GQZaew.js.map +0 -1
- package/dist-panel/loader-DjhAUFXk.js.map +0 -1
- package/dist-panel/mouse-pointer-click-BwcHzNw_.js.map +0 -1
- package/dist-panel/mutations-Fiuj8fCV.js.map +0 -1
- package/dist-panel/queries-Czfs9c3l.js +0 -286
- package/dist-panel/queries-Czfs9c3l.js.map +0 -1
- package/dist-panel/settings-BHmLo73t.js +0 -10
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as o } from "./mouse-pointer-click-
|
|
2
|
-
import { _ as c,
|
|
1
|
+
import { _ as o } from "./mouse-pointer-click-ClYfwImy.js";
|
|
2
|
+
import { _ as c, o as s, c as n, a as _, q as a, h as r } from "./index-CYb5D1Be.js";
|
|
3
3
|
const i = {}, l = { class: "py-6 mx-auto" }, p = { class: "flex flex-col text-center items-center gap-2 text-lg px-2" };
|
|
4
4
|
function d(m, e) {
|
|
5
5
|
const t = o;
|
|
6
|
-
return
|
|
6
|
+
return s(), n("div", l, [
|
|
7
7
|
_("p", p, [
|
|
8
8
|
e[0] || (e[0] = a(" Select a Mutation to inspect ", -1)),
|
|
9
9
|
r(t)
|
|
@@ -14,4 +14,4 @@ const f = /* @__PURE__ */ c(i, [["render", d]]);
|
|
|
14
14
|
export {
|
|
15
15
|
f as default
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=(unselected)-
|
|
17
|
+
//# sourceMappingURL=(unselected)-BQ3qDKQ9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"(unselected)-
|
|
1
|
+
{"version":3,"file":"(unselected)-BQ3qDKQ9.js","sources":["../src/panel/pages/mutations/(unselected).vue"],"sourcesContent":["<script setup lang=\"ts\"></script>\n\n<template>\n <div class=\"py-6 mx-auto\">\n <p class=\"flex flex-col text-center items-center gap-2 text-lg px-2\">\n Select a Mutation to inspect\n <i-lucide-mouse-pointer-click />\n </p>\n </div>\n</template>\n"],"names":["_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_component_i_lucide_mouse_pointer_click"],"mappings":";;cAGOA,IAAA,EAAA,OAAM,eAAc,GACpBC,IAAA,EAAA,OAAM,4DAA2D;;;AADtE,SAAAC,EAAA,GAAAC,EAKM,OALNH,GAKM;AAAA,IAJJI,EAGI,KAHJH,GAGI;AAAA,wBAHiE,kCAEnE,EAAA;AAAA,MAAAI,EAAgCC,CAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { _ as o } from "./mouse-pointer-click-ClYfwImy.js";
|
|
2
|
+
import { _ as c, o as s, c as n, a as _, q as a, h as r } from "./index-CYb5D1Be.js";
|
|
3
|
+
const l = {}, i = { class: "py-6 mx-auto" }, p = { class: "flex flex-col text-center items-center gap-2 text-lg px-2" };
|
|
4
|
+
function d(m, e) {
|
|
5
|
+
const t = o;
|
|
6
|
+
return s(), n("div", i, [
|
|
7
|
+
_("p", p, [
|
|
8
|
+
e[0] || (e[0] = a(" Select a Query to inspect ", -1)),
|
|
9
|
+
r(t)
|
|
10
|
+
])
|
|
11
|
+
]);
|
|
12
|
+
}
|
|
13
|
+
const f = /* @__PURE__ */ c(l, [["render", d]]);
|
|
14
|
+
export {
|
|
15
|
+
f as default
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=(unselected)-DAm41Y3x.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"(unselected)-
|
|
1
|
+
{"version":3,"file":"(unselected)-DAm41Y3x.js","sources":["../src/panel/pages/queries/(unselected).vue"],"sourcesContent":["<script setup lang=\"ts\"></script>\n\n<template>\n <div class=\"py-6 mx-auto\">\n <p class=\"flex flex-col text-center items-center gap-2 text-lg px-2\">\n Select a Query to inspect\n <i-lucide-mouse-pointer-click />\n </p>\n </div>\n</template>\n"],"names":["_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_component_i_lucide_mouse_pointer_click"],"mappings":";;cAGOA,IAAA,EAAA,OAAM,eAAc,GACpBC,IAAA,EAAA,OAAM,4DAA2D;;;AADtE,SAAAC,EAAA,GAAAC,EAKM,OALNH,GAKM;AAAA,IAJJI,EAGI,KAHJH,GAGI;AAAA,wBAHiE,+BAEnE,EAAA;AAAA,MAAAI,EAAgCC,CAAA;AAAA;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as q } from "./mouse-pointer-click-
|
|
2
|
-
import { I as G, _ as H, a as J, b as P, c as X, d as K, e as Q, f as Y, g as Z } from "./circle-x-
|
|
3
|
-
import { m as
|
|
4
|
-
import { _ as dt, a as pt } from "./loader-
|
|
1
|
+
import { _ as q } from "./mouse-pointer-click-ClYfwImy.js";
|
|
2
|
+
import { I as G, _ as H, a as J, b as P, c as X, d as K, e as Q, f as Y, g as Z } from "./circle-x-InxlHvaS.js";
|
|
3
|
+
import { m as N, o as n, c as r, a as s, d as tt, s as et, u as st, j as ot, v as at, x as M, l as C, F as V, h as o, w as l, t as g, f as b, e as a, q as p, y as nt, b as x, z as it, n as z, A as I, i as lt, B as ut, p as rt } from "./index-CYb5D1Be.js";
|
|
4
|
+
import { _ as dt, a as pt } from "./loader-Ca7c0zg-.js";
|
|
5
5
|
const mt = {
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
7
7
|
width: "1.2em",
|
|
@@ -22,7 +22,7 @@ function ct($, m) {
|
|
|
22
22
|
], -1)
|
|
23
23
|
])]);
|
|
24
24
|
}
|
|
25
|
-
const _t =
|
|
25
|
+
const _t = N({ name: "lucide-repeat2", render: ct }), vt = {
|
|
26
26
|
viewBox: "0 0 24 24",
|
|
27
27
|
width: "1.2em",
|
|
28
28
|
height: "1.2em"
|
|
@@ -39,7 +39,7 @@ function ft($, m) {
|
|
|
39
39
|
}, null, -1)
|
|
40
40
|
])]);
|
|
41
41
|
}
|
|
42
|
-
const gt =
|
|
42
|
+
const gt = N({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-col divide-y dark:divide-(--ui-border) divide-(--ui-border-accented)" }, kt = { class: "py-1 text-sm" }, yt = { class: "grid grid-cols-[auto_1fr] gap-1" }, ht = { class: "rounded bg-neutral-500/20 p-0.5" }, wt = { class: "grid grid-cols-[auto_1fr] gap-1" }, Ct = { class: "flex items-center gap-1.5" }, bt = { class: "rounded p-0.5 bg-neutral-500/20" }, It = {
|
|
43
43
|
key: 0,
|
|
44
44
|
class: "text-xs text-(--ui-text-muted) italic cursor-help",
|
|
45
45
|
title: "This mutation was created without a custom key"
|
|
@@ -50,32 +50,32 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
50
50
|
key: 0,
|
|
51
51
|
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
52
52
|
title: "When is this mutation entry garbage collected"
|
|
53
|
-
}, Bt = { class: "font-bold" }, Tt = { class: "py-2 gap-2 flex flex-wrap items-center justify-items-start" }, Mt = { class: "py-1" },
|
|
53
|
+
}, Bt = { class: "font-bold" }, Tt = { class: "py-2 gap-2 flex flex-wrap items-center justify-items-start" }, Mt = { class: "py-1" }, Vt = {
|
|
54
54
|
key: 0,
|
|
55
55
|
class: "rounded p-1 overflow-auto max-h-[1200px]"
|
|
56
|
-
},
|
|
56
|
+
}, zt = {
|
|
57
57
|
key: 1,
|
|
58
58
|
class: "text-neutral-500/50"
|
|
59
|
-
},
|
|
59
|
+
}, Nt = { key: 1 }, Ot = {
|
|
60
60
|
key: 1,
|
|
61
61
|
class: "py-6 mx-auto"
|
|
62
62
|
}, At = { class: "flex flex-col text-center items-center gap-2 text-lg px-2" }, Ft = /* @__PURE__ */ tt({
|
|
63
|
-
__name: "[mutationId]",
|
|
63
|
+
__name: "[mutationId=int]",
|
|
64
64
|
setup($) {
|
|
65
|
-
const m =
|
|
65
|
+
const m = et(), O = st(), k = ot(), e = lt(() => {
|
|
66
66
|
const i = m.params.mutationId;
|
|
67
|
-
return k.value.find((t) => t.id ===
|
|
67
|
+
return k.value.find((t) => t.id === i) ?? null;
|
|
68
68
|
}), S = {
|
|
69
69
|
showSecond: !0,
|
|
70
70
|
rounding: "floor",
|
|
71
71
|
max: 1e3 * 60 * 60 * 24
|
|
72
72
|
// 1 day
|
|
73
|
-
}, A =
|
|
73
|
+
}, A = ut(() => e.value?.devtools.updatedAt ?? 0, {
|
|
74
74
|
...S,
|
|
75
75
|
updateInterval: 3e3
|
|
76
|
-
}), _ =
|
|
76
|
+
}), _ = at();
|
|
77
77
|
let y = !1;
|
|
78
|
-
const D =
|
|
78
|
+
const D = rt(0);
|
|
79
79
|
function E(i) {
|
|
80
80
|
D.value = k.value.length, y = !0, _.emit("mutations:replay", i);
|
|
81
81
|
}
|
|
@@ -85,7 +85,7 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
85
85
|
if (y) {
|
|
86
86
|
const i = k.value.toSorted((t, d) => d.id - t.id)[0];
|
|
87
87
|
i && O.push({
|
|
88
|
-
name: "/mutations/[mutationId]",
|
|
88
|
+
name: "/mutations/[mutationId=int]",
|
|
89
89
|
params: { mutationId: i.id }
|
|
90
90
|
}), y = !1;
|
|
91
91
|
}
|
|
@@ -94,18 +94,18 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
94
94
|
deep: !0
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
|
-
const c =
|
|
97
|
+
const c = C("pc:mutation:details:data:open", !1, {}), h = C("pc:mutation:details:vars:open", !0, {});
|
|
98
98
|
let R = c.value, B = null;
|
|
99
|
-
const f =
|
|
99
|
+
const f = C("pc:mutation:details:error:open", !1, {});
|
|
100
100
|
return M(
|
|
101
101
|
() => e.value?.state,
|
|
102
102
|
(i) => {
|
|
103
103
|
!i || B === i.status || (B = i.status, i.status === "error" ? (f.value = !0, R = c.value, c.value = !1) : i.status === "success" && (c.value = R, f.value = !1));
|
|
104
104
|
}
|
|
105
105
|
), (i, t) => {
|
|
106
|
-
const d = H, T = dt, v =
|
|
106
|
+
const d = H, T = dt, v = it, U = pt, j = J, F = _t, W = P, w = K, L = q;
|
|
107
107
|
return n(), r("div", xt, [
|
|
108
|
-
e.value ? (n(), r(
|
|
108
|
+
e.value ? (n(), r(V, { key: 0 }, [
|
|
109
109
|
o(d, {
|
|
110
110
|
title: "Details",
|
|
111
111
|
icon: a(G)
|
|
@@ -120,9 +120,9 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
120
120
|
]),
|
|
121
121
|
s("p", wt, [
|
|
122
122
|
t[10] || (t[10] = s("span", null, "key:", -1)),
|
|
123
|
-
s("span",
|
|
124
|
-
s("code",
|
|
125
|
-
e.value.key ?
|
|
123
|
+
s("span", Ct, [
|
|
124
|
+
s("code", bt, g(e.value.key ?? "undefined"), 1),
|
|
125
|
+
e.value.key ? b("", !0) : (n(), r("span", It, " (anonymous) "))
|
|
126
126
|
])
|
|
127
127
|
]),
|
|
128
128
|
s("p", $t, [
|
|
@@ -130,27 +130,27 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
130
130
|
s("span", St, g(a(A)), 1)
|
|
131
131
|
]),
|
|
132
132
|
!e.value.active && e.value.options ? (n(), r("p", Rt, [
|
|
133
|
-
typeof e.value.options.gcTime == "number" && Number.isFinite(e.value.options.gcTime) ? (n(), r(
|
|
133
|
+
typeof e.value.options.gcTime == "number" && Number.isFinite(e.value.options.gcTime) ? (n(), r(V, { key: 0 }, [
|
|
134
134
|
t[12] || (t[12] = s("span", null, [
|
|
135
135
|
p("Will be "),
|
|
136
136
|
s("i", null, "gced")
|
|
137
137
|
], -1)),
|
|
138
|
-
s("span", Bt, g(a(
|
|
138
|
+
s("span", Bt, g(a(nt)(
|
|
139
139
|
new Date(e.value.devtools.inactiveAt + e.value.options.gcTime),
|
|
140
140
|
{
|
|
141
141
|
...S,
|
|
142
142
|
max: void 0
|
|
143
143
|
}
|
|
144
144
|
)), 1)
|
|
145
|
-
], 64)) :
|
|
146
|
-
])) :
|
|
145
|
+
], 64)) : b("", !0)
|
|
146
|
+
])) : b("", !0)
|
|
147
147
|
])
|
|
148
148
|
]),
|
|
149
149
|
_: 1
|
|
150
150
|
}, 8, ["icon"]),
|
|
151
151
|
o(d, {
|
|
152
152
|
title: "Actions",
|
|
153
|
-
icon: a(
|
|
153
|
+
icon: a(X)
|
|
154
154
|
}, {
|
|
155
155
|
default: l(() => [
|
|
156
156
|
s("div", Tt, [
|
|
@@ -234,9 +234,9 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
234
234
|
}, 8, ["icon"]),
|
|
235
235
|
o(d, {
|
|
236
236
|
open: a(h),
|
|
237
|
-
"onUpdate:open": t[6] || (t[6] = (u) =>
|
|
237
|
+
"onUpdate:open": t[6] || (t[6] = (u) => I(h) ? h.value = u : null),
|
|
238
238
|
title: `Variables${e.value.vars === void 0 ? " (empty)" : ""}`,
|
|
239
|
-
class:
|
|
239
|
+
class: z([e.value.vars === void 0 && "text-(--ui-text-muted)"]),
|
|
240
240
|
icon: a(gt),
|
|
241
241
|
"no-padding": ""
|
|
242
242
|
}, {
|
|
@@ -250,10 +250,10 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
250
250
|
}, 8, ["open", "title", "class", "icon"]),
|
|
251
251
|
o(d, {
|
|
252
252
|
open: a(c),
|
|
253
|
-
"onUpdate:open": t[7] || (t[7] = (u) =>
|
|
253
|
+
"onUpdate:open": t[7] || (t[7] = (u) => I(c) ? c.value = u : null),
|
|
254
254
|
title: `Data${e.value.state.data === void 0 ? " (empty)" : ""}`,
|
|
255
|
-
icon: a(
|
|
256
|
-
class:
|
|
255
|
+
icon: a(Q),
|
|
256
|
+
class: z([e.value.state.data === void 0 && "text-(--ui-text-muted)"]),
|
|
257
257
|
"no-padding": ""
|
|
258
258
|
}, {
|
|
259
259
|
default: l(() => [
|
|
@@ -265,13 +265,13 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
265
265
|
}, 8, ["open", "title", "icon", "class"]),
|
|
266
266
|
o(d, {
|
|
267
267
|
open: a(f),
|
|
268
|
-
"onUpdate:open": t[8] || (t[8] = (u) =>
|
|
268
|
+
"onUpdate:open": t[8] || (t[8] = (u) => I(f) ? f.value = u : null),
|
|
269
269
|
title: `Error${e.value.state.status === "error" ? " (!)" : ""}`,
|
|
270
|
-
icon: a(
|
|
270
|
+
icon: a(Y)
|
|
271
271
|
}, {
|
|
272
272
|
default: l(() => [
|
|
273
273
|
s("div", Mt, [
|
|
274
|
-
e.value.state.error ? (n(), r("pre",
|
|
274
|
+
e.value.state.error ? (n(), r("pre", Vt, g(e.value.state.error), 1)) : (n(), r("p", zt, "No error"))
|
|
275
275
|
])
|
|
276
276
|
]),
|
|
277
277
|
_: 1
|
|
@@ -279,7 +279,7 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
279
279
|
o(d, {
|
|
280
280
|
title: "Options",
|
|
281
281
|
open: !1,
|
|
282
|
-
icon: a(
|
|
282
|
+
icon: a(Z),
|
|
283
283
|
"no-padding": ""
|
|
284
284
|
}, {
|
|
285
285
|
default: l(() => [
|
|
@@ -287,7 +287,7 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
287
287
|
key: 0,
|
|
288
288
|
data: e.value.options,
|
|
289
289
|
readonly: ""
|
|
290
|
-
}, null, 8, ["data"])) : (n(), r("p",
|
|
290
|
+
}, null, 8, ["data"])) : (n(), r("p", Nt, "No options configured for this mutation."))
|
|
291
291
|
]),
|
|
292
292
|
_: 1
|
|
293
293
|
}, 8, ["icon"])
|
|
@@ -304,4 +304,4 @@ const gt = z({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
304
304
|
export {
|
|
305
305
|
Ft as default
|
|
306
306
|
};
|
|
307
|
-
//# sourceMappingURL=
|
|
307
|
+
//# sourceMappingURL=_mutationId_int_-erdQKyLR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_mutationId_int_-erdQKyLR.js","sources":["../src/panel/pages/mutations/[mutationId=int].vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { UseMutationEntryPayload } from '@pinia/colada-devtools/shared'\nimport { computed, ref, watch } from 'vue'\nimport { useDuplexChannel, useMutationEntries } from '../../composables/duplex-channel'\nimport { useRoute, useRouter } from 'vue-router'\nimport type { DataStateStatus } from '@pinia/colada'\n\nimport IWrench from '~icons/lucide/wrench'\nimport IInfoCircle from '~icons/lucide/info'\nimport IFileText from '~icons/lucide/file-text'\nimport ICircleX from '~icons/lucide/circle-x'\nimport IBraces from '~icons/lucide/braces'\nimport IVariable from '~icons/lucide/variable'\nimport { useTimeAgo, useLocalStorage, formatTimeAgo } from '@vueuse/core'\nimport type { FormatTimeAgoOptions } from '@vueuse/core'\n\nconst route = useRoute()\nconst router = useRouter()\nconst mutations = useMutationEntries()\n\nconst selectedMutation = computed<UseMutationEntryPayload | null>(() => {\n const mutationId = route.params.mutationId\n return mutations.value.find((entry) => entry.id === mutationId) ?? null\n})\n\nconst TIME_AGO_OPTIONS: FormatTimeAgoOptions = {\n showSecond: true,\n rounding: 'floor',\n max: 1000 * 60 * 60 * 24, // 1 day\n}\n\nconst lastUpdate = useTimeAgo(() => selectedMutation.value?.devtools.updatedAt ?? 0, {\n ...TIME_AGO_OPTIONS,\n updateInterval: 3000,\n})\n\nconst channel = useDuplexChannel()\n\n// Track when we're replaying to auto-navigate to new mutation\nlet justReplayed = false\nconst mutationCountBeforeReplay = ref(0)\n\nfunction replayMutation(id: UseMutationEntryPayload['id']) {\n // Track state before replay\n mutationCountBeforeReplay.value = mutations.value.length\n justReplayed = true\n\n // Emit the replay event\n channel.emit('mutations:replay', id)\n}\n\n// FIXME: we should move this logic up and auto detect replays maybe with some linking\n// isReplayOf: mutationId\n// and we can display this in the interface too\nwatch(\n () => mutations.value,\n () => {\n if (justReplayed) {\n // Find the latest id\n const newest = mutations.value.toSorted((a, b) => b.id - a.id)[0]\n\n if (newest) {\n router.push({\n name: '/mutations/[mutationId=int]',\n params: { mutationId: newest.id },\n })\n }\n\n justReplayed = false\n }\n },\n {\n deep: true,\n },\n)\n\nconst isDataOpen = useLocalStorage<boolean>('pc:mutation:details:data:open', false, {})\nconst isVarsOpen = useLocalStorage<boolean>('pc:mutation:details:vars:open', true, {})\nlet wasDataOpen = isDataOpen.value\nlet lastStatus: DataStateStatus | null = null\nconst isErrorOpen = useLocalStorage<boolean>('pc:mutation:details:error:open', false, {})\n\nwatch(\n () => selectedMutation.value?.state,\n (state) => {\n if (!state || lastStatus === state.status) return\n lastStatus = state.status\n if (state.status === 'error') {\n isErrorOpen.value = true\n wasDataOpen = isDataOpen.value\n isDataOpen.value = false\n } else if (state.status === 'success') {\n isDataOpen.value = wasDataOpen\n isErrorOpen.value = false\n }\n },\n)\n</script>\n\n<template>\n <div class=\"flex flex-col divide-y dark:divide-(--ui-border) divide-(--ui-border-accented)\">\n <template v-if=\"selectedMutation\">\n <UCollapse title=\"Details\" :icon=\"IInfoCircle\">\n <div class=\"py-1 text-sm\">\n <p class=\"grid grid-cols-[auto_1fr] gap-1\">\n <span>id:</span>\n <span>\n <code class=\"rounded bg-neutral-500/20 p-0.5\">{{ selectedMutation.id }}</code>\n </span>\n </p>\n\n <p class=\"grid grid-cols-[auto_1fr] gap-1\">\n <span>key:</span>\n <span class=\"flex items-center gap-1.5\">\n <code class=\"rounded p-0.5 bg-neutral-500/20\">\n {{ selectedMutation.key ?? 'undefined' }}\n </code>\n <span\n v-if=\"!selectedMutation.key\"\n class=\"text-xs text-(--ui-text-muted) italic cursor-help\"\n title=\"This mutation was created without a custom key\"\n >\n (anonymous)\n </span>\n </span>\n </p>\n\n <p class=\"grid grid-cols-[auto_1fr] gap-x-2\" title=\"When was the mutation last updated\">\n <span>Last update:</span>\n <span class=\"font-bold\">{{ lastUpdate }}</span>\n </p>\n\n <p\n v-if=\"!selectedMutation.active && selectedMutation.options\"\n class=\"grid grid-cols-[auto_1fr] gap-x-2\"\n title=\"When is this mutation entry garbage collected\"\n >\n <template\n v-if=\"\n typeof selectedMutation.options.gcTime === 'number' &&\n Number.isFinite(selectedMutation.options.gcTime)\n \"\n >\n <span>Will be <i>gced</i></span>\n <span class=\"font-bold\">{{\n formatTimeAgo(\n new Date(selectedMutation.devtools.inactiveAt + selectedMutation.options.gcTime),\n {\n ...TIME_AGO_OPTIONS,\n max: undefined,\n },\n )\n }}</span>\n </template>\n </p>\n </div>\n </UCollapse>\n\n <UCollapse title=\"Actions\" :icon=\"IWrench\">\n <div class=\"py-2 gap-2 flex flex-wrap items-center justify-items-start\">\n <UButton\n v-if=\"selectedMutation.devtools.simulate !== 'loading'\"\n class=\"theme-purple\"\n size=\"sm\"\n title=\"Simulate a loading state\"\n @click=\"channel.emit('mutations:simulate:loading', selectedMutation.id)\"\n >\n <i-lucide-loader />\n Simulate loading\n </UButton>\n <UButton\n v-else\n class=\"theme-purple\"\n size=\"sm\"\n title=\"Stop simulating loading state\"\n @click=\"channel.emit('mutations:simulate:loading:stop', selectedMutation.id)\"\n >\n <i-lucide-loader class=\"animate-spin\" />\n Stop loading\n </UButton>\n\n <UButton\n v-if=\"selectedMutation.devtools.simulate !== 'error'\"\n class=\"theme-error\"\n size=\"sm\"\n title=\"Simulate an Error state\"\n @click=\"channel.emit('mutations:simulate:error', selectedMutation.id)\"\n >\n <i-lucide-x-octagon /> Simulate error\n </UButton>\n <UButton\n v-else\n class=\"theme-error\"\n size=\"sm\"\n title=\"Restore the previous state\"\n @click=\"channel.emit('mutations:simulate:error:stop', selectedMutation.id)\"\n >\n <i-lucide-rotate-ccw /> Remove error\n </UButton>\n\n <UButton\n class=\"theme-success\"\n size=\"sm\"\n title=\"Re-trigger this mutation with the same variables\"\n @click=\"replayMutation(selectedMutation.id)\"\n >\n <i-lucide-repeat-2 />\n Replay\n </UButton>\n\n <UButton\n class=\"theme-warning\"\n size=\"sm\"\n title=\"Remove this mutation from the cache\"\n @click=\"channel.emit('mutations:remove', selectedMutation.id)\"\n >\n <i-lucide-trash /> Remove\n </UButton>\n </div>\n </UCollapse>\n\n <UCollapse\n v-model:open=\"isVarsOpen\"\n :title=\"`Variables${selectedMutation.vars === undefined ? ' (empty)' : ''}`\"\n :class=\"[selectedMutation.vars === undefined && 'text-(--ui-text-muted)']\"\n :icon=\"IVariable\"\n no-padding\n >\n <JsonViewer :data=\"selectedMutation.vars\" readonly />\n </UCollapse>\n\n <UCollapse\n v-model:open=\"isDataOpen\"\n :title=\"`Data${selectedMutation.state.data === undefined ? ' (empty)' : ''}`\"\n :icon=\"IFileText\"\n :class=\"[selectedMutation.state.data === undefined && 'text-(--ui-text-muted)']\"\n no-padding\n >\n <JsonViewer :data=\"selectedMutation.state.data\" />\n </UCollapse>\n\n <UCollapse\n v-model:open=\"isErrorOpen\"\n :title=\"`Error${selectedMutation.state.status === 'error' ? ' (!)' : ''}`\"\n :icon=\"ICircleX\"\n >\n <div class=\"py-1\">\n <pre\n v-if=\"selectedMutation.state.error\"\n class=\"rounded p-1 overflow-auto max-h-[1200px]\"\n >{{ selectedMutation.state.error }}</pre\n >\n <p v-else class=\"text-neutral-500/50\">No error</p>\n </div>\n </UCollapse>\n\n <UCollapse title=\"Options\" :open=\"false\" :icon=\"IBraces\" no-padding>\n <JsonViewer v-if=\"selectedMutation.options\" :data=\"selectedMutation.options\" readonly />\n <p v-else>No options configured for this mutation.</p>\n </UCollapse>\n </template>\n\n <template v-else>\n <div class=\"py-6 mx-auto\">\n <p class=\"flex flex-col text-center items-center gap-2 text-lg px-2\">\n Select a Mutation to inspect\n <i-lucide-mouse-pointer-click />\n </p>\n </div>\n </template>\n </div>\n</template>\n"],"names":["route","useRoute","router","useRouter","mutations","useMutationEntries","selectedMutation","computed","mutationId","entry","TIME_AGO_OPTIONS","lastUpdate","useTimeAgo","channel","useDuplexChannel","justReplayed","mutationCountBeforeReplay","ref","replayMutation","id","watch","newest","a","b","isDataOpen","useLocalStorage","isVarsOpen","wasDataOpen","lastStatus","isErrorOpen","state","_openBlock","_createElementBlock","_hoisted_1","_Fragment","_createVNode","_component_UCollapse","_unref","IInfoCircle","_createElementVNode","_hoisted_2","_hoisted_3","_cache","_hoisted_4","_toDisplayString","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","formatTimeAgo","IWrench","_hoisted_13","_createBlock","_component_UButton","_component_i_lucide_loader","_component_i_lucide_x_octagon","_component_i_lucide_rotate_ccw","$event","_component_i_lucide_repeat_2","_component_i_lucide_trash","_normalizeClass","IVariable","_component_JsonViewer","IFileText","ICircleX","_hoisted_14","_hoisted_15","_hoisted_16","IBraces","_hoisted_18","_hoisted_19","_component_i_lucide_mouse_pointer_click"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,UAAMA,IAAQC,GAAA,GACRC,IAASC,GAAA,GACTC,IAAYC,GAAA,GAEZC,IAAmBC,GAAyC,MAAM;AACtE,YAAMC,IAAaR,EAAM,OAAO;AAChC,aAAOI,EAAU,MAAM,KAAK,CAACK,MAAUA,EAAM,OAAOD,CAAU,KAAK;AAAA,IACrE,CAAC,GAEKE,IAAyC;AAAA,MAC7C,YAAY;AAAA,MACZ,UAAU;AAAA,MACV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AEnE,EAAA;AAAA,YAAAvC,EAAgCwC,CAAA;AAAA,UAAA;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as j } from "./mouse-pointer-click-
|
|
2
|
-
import { I as F, _ as U, a as Q, b as W, c as G, d as J, e as P, f as X, g as K } from "./circle-x-
|
|
3
|
-
import { _ as Y, a as Z } from "./loader-
|
|
4
|
-
import { m as $,
|
|
1
|
+
import { _ as j } from "./mouse-pointer-click-ClYfwImy.js";
|
|
2
|
+
import { I as F, _ as U, a as Q, b as W, c as G, d as J, e as P, f as X, g as K } from "./circle-x-InxlHvaS.js";
|
|
3
|
+
import { _ as Y, a as Z } from "./loader-Ca7c0zg-.js";
|
|
4
|
+
import { m as $, o as n, c as u, a as t, d as ee, s as te, C as se, v as oe, l as D, x as ne, F as C, h as l, w as r, t as c, e as o, y as I, f as b, q as m, z as le, b as k, n as z, A as R, g as ae, i as ie, B as re } from "./index-CYb5D1Be.js";
|
|
5
5
|
const ue = {
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
7
7
|
width: "1.2em",
|
|
@@ -21,13 +21,13 @@ function de(v, a) {
|
|
|
21
21
|
], -1)
|
|
22
22
|
])]);
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const pe = $({ name: "lucide-timer-reset", render: de }), ce = {
|
|
25
25
|
viewBox: "0 0 24 24",
|
|
26
26
|
width: "1.2em",
|
|
27
27
|
height: "1.2em"
|
|
28
28
|
};
|
|
29
29
|
function me(v, a) {
|
|
30
|
-
return n(), u("svg",
|
|
30
|
+
return n(), u("svg", ce, [...a[0] || (a[0] = [
|
|
31
31
|
t("g", {
|
|
32
32
|
fill: "none",
|
|
33
33
|
stroke: "currentColor",
|
|
@@ -127,12 +127,12 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
127
127
|
}, Pe = { class: "flex flex-col text-center items-center gap-2 text-lg px-2" }, Xe = { class: "text-center text-sm text-neutral-500 mt-4" }, tt = /* @__PURE__ */ ee({
|
|
128
128
|
__name: "[queryId]",
|
|
129
129
|
setup(v) {
|
|
130
|
-
const a =
|
|
130
|
+
const a = te(), y = se(), s = ie(() => y.value.find((d) => d.keyHash === a.params.queryId) ?? null), w = {
|
|
131
131
|
showSecond: !0,
|
|
132
132
|
rounding: "floor",
|
|
133
133
|
max: 1e3 * 60 * 60 * 24
|
|
134
134
|
// 1 day
|
|
135
|
-
}, A =
|
|
135
|
+
}, A = re(() => s.value?.devtools.updatedAt ?? 0, {
|
|
136
136
|
...w,
|
|
137
137
|
updateInterval: 3e3
|
|
138
138
|
}), g = oe(), h = D("pc:query:details:data:open", !1, {});
|
|
@@ -148,10 +148,10 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
148
148
|
if (e.length === 0)
|
|
149
149
|
return console.error("Cannot set value with empty path"), !1;
|
|
150
150
|
let f = d;
|
|
151
|
-
for (let
|
|
151
|
+
for (let p = 0; p < e.length - 1; p++) {
|
|
152
152
|
if (f == null || typeof f != "object")
|
|
153
|
-
return console.error("Invalid path:", e, "at index",
|
|
154
|
-
f = f[e[
|
|
153
|
+
return console.error("Invalid path:", e, "at index", p, "Current value:", f), !1;
|
|
154
|
+
f = f[e[p]];
|
|
155
155
|
}
|
|
156
156
|
return f == null || typeof f != "object" ? (console.error("Invalid final parent in path:", e), !1) : (f[e.at(-1)] = _, !0);
|
|
157
157
|
}
|
|
@@ -164,7 +164,7 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
164
164
|
g.emit("queries:set:state", s.value.key, s.value.state);
|
|
165
165
|
};
|
|
166
166
|
return (d, e) => {
|
|
167
|
-
const _ = U, f = ve,
|
|
167
|
+
const _ = U, f = ve, p = le, H = pe, B = Y, L = Z, M = Q, O = W, q = J, V = j;
|
|
168
168
|
return n(), u("div", we, [
|
|
169
169
|
s.value ? (n(), u(C, { key: 0 }, [
|
|
170
170
|
l(_, {
|
|
@@ -176,39 +176,39 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
176
176
|
t("p", $e, [
|
|
177
177
|
e[9] || (e[9] = t("span", null, "key:", -1)),
|
|
178
178
|
t("span", null, [
|
|
179
|
-
t("code", qe,
|
|
179
|
+
t("code", qe, c(s.value.key), 1)
|
|
180
180
|
])
|
|
181
181
|
]),
|
|
182
182
|
t("p", Ce, [
|
|
183
183
|
e[10] || (e[10] = t("span", null, "Last update:", -1)),
|
|
184
|
-
t("span", Ie,
|
|
184
|
+
t("span", Ie, c(o(A)), 1)
|
|
185
185
|
]),
|
|
186
186
|
s.value.devtools.history.at(0)?.fetchTime ? (n(), u("p", Te, [
|
|
187
187
|
e[11] || (e[11] = t("span", null, "Last fetch:", -1)),
|
|
188
|
-
t("span", Se,
|
|
188
|
+
t("span", Se, c(o(I)(new Date(s.value.devtools.history.at(0).fetchTime.start), {
|
|
189
189
|
...w,
|
|
190
190
|
max: void 0
|
|
191
191
|
})), 1)
|
|
192
192
|
])) : b("", !0),
|
|
193
193
|
s.value.devtools.history.at(0)?.fetchTime?.end ? (n(), u("p", Be, [
|
|
194
194
|
e[12] || (e[12] = t("span", null, "Fetch duration:", -1)),
|
|
195
|
-
t("span", De,
|
|
195
|
+
t("span", De, c(o(_e)(
|
|
196
196
|
s.value.devtools.history.at(0).fetchTime.end - s.value.devtools.history.at(0).fetchTime.start
|
|
197
197
|
)), 1)
|
|
198
198
|
])) : b("", !0),
|
|
199
199
|
t("p", ze, [
|
|
200
200
|
t("span", null, [
|
|
201
|
-
e[13] || (e[13] =
|
|
202
|
-
t("span", Re,
|
|
201
|
+
e[13] || (e[13] = m("Observers: ", -1)),
|
|
202
|
+
t("span", Re, c(s.value.deps.length), 1)
|
|
203
203
|
])
|
|
204
204
|
]),
|
|
205
205
|
!s.value.active && s.value.options ? (n(), u("p", Ae, [
|
|
206
206
|
typeof s.value.options.gcTime == "number" && Number.isFinite(s.value.options.gcTime) ? (n(), u(C, { key: 0 }, [
|
|
207
207
|
e[14] || (e[14] = t("span", null, [
|
|
208
|
-
|
|
208
|
+
m("Will be "),
|
|
209
209
|
t("i", null, "gced")
|
|
210
210
|
], -1)),
|
|
211
|
-
t("span", Ne,
|
|
211
|
+
t("span", Ne, c(o(I)(
|
|
212
212
|
new Date(s.value.devtools.inactiveAt + s.value.options.gcTime),
|
|
213
213
|
{
|
|
214
214
|
...w,
|
|
@@ -223,11 +223,11 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
223
223
|
}, 8, ["icon"]),
|
|
224
224
|
l(_, {
|
|
225
225
|
title: "Actions",
|
|
226
|
-
icon: o(
|
|
226
|
+
icon: o(G)
|
|
227
227
|
}, {
|
|
228
228
|
default: r(() => [
|
|
229
229
|
t("div", Ee, [
|
|
230
|
-
l(
|
|
230
|
+
l(p, {
|
|
231
231
|
class: "theme-info",
|
|
232
232
|
size: "sm",
|
|
233
233
|
title: "Refetch this query",
|
|
@@ -236,11 +236,11 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
236
236
|
}, {
|
|
237
237
|
default: r(() => [
|
|
238
238
|
l(f, { class: "size-3.5" }),
|
|
239
|
-
e[15] || (e[15] =
|
|
239
|
+
e[15] || (e[15] = m(" Refetch ", -1))
|
|
240
240
|
]),
|
|
241
241
|
_: 1
|
|
242
242
|
}, 8, ["disabled"]),
|
|
243
|
-
l(
|
|
243
|
+
l(p, {
|
|
244
244
|
class: "theme-neutral",
|
|
245
245
|
size: "sm",
|
|
246
246
|
title: "Invalidate this query",
|
|
@@ -248,11 +248,11 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
248
248
|
}, {
|
|
249
249
|
default: r(() => [
|
|
250
250
|
l(H),
|
|
251
|
-
e[16] || (e[16] =
|
|
251
|
+
e[16] || (e[16] = m(" Invalidate ", -1))
|
|
252
252
|
]),
|
|
253
253
|
_: 1
|
|
254
254
|
}),
|
|
255
|
-
s.value.devtools.simulate !== "loading" ? (n(), k(
|
|
255
|
+
s.value.devtools.simulate !== "loading" ? (n(), k(p, {
|
|
256
256
|
key: 0,
|
|
257
257
|
class: "theme-purple",
|
|
258
258
|
size: "sm",
|
|
@@ -261,10 +261,10 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
261
261
|
}, {
|
|
262
262
|
default: r(() => [
|
|
263
263
|
l(B),
|
|
264
|
-
e[17] || (e[17] =
|
|
264
|
+
e[17] || (e[17] = m(" Simulate loading ", -1))
|
|
265
265
|
]),
|
|
266
266
|
_: 1
|
|
267
|
-
})) : (n(), k(
|
|
267
|
+
})) : (n(), k(p, {
|
|
268
268
|
key: 1,
|
|
269
269
|
class: "theme-purple",
|
|
270
270
|
size: "sm",
|
|
@@ -273,11 +273,11 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
273
273
|
}, {
|
|
274
274
|
default: r(() => [
|
|
275
275
|
l(B, { class: "animate-spin" }),
|
|
276
|
-
e[18] || (e[18] =
|
|
276
|
+
e[18] || (e[18] = m(" Stop loading ", -1))
|
|
277
277
|
]),
|
|
278
278
|
_: 1
|
|
279
279
|
})),
|
|
280
|
-
s.value.devtools.simulate !== "error" ? (n(), k(
|
|
280
|
+
s.value.devtools.simulate !== "error" ? (n(), k(p, {
|
|
281
281
|
key: 2,
|
|
282
282
|
class: "theme-error",
|
|
283
283
|
size: "sm",
|
|
@@ -286,10 +286,10 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
286
286
|
}, {
|
|
287
287
|
default: r(() => [
|
|
288
288
|
l(L),
|
|
289
|
-
e[19] || (e[19] =
|
|
289
|
+
e[19] || (e[19] = m(" Simulate error ", -1))
|
|
290
290
|
]),
|
|
291
291
|
_: 1
|
|
292
|
-
})) : (n(), k(
|
|
292
|
+
})) : (n(), k(p, {
|
|
293
293
|
key: 3,
|
|
294
294
|
class: "theme-error",
|
|
295
295
|
size: "sm",
|
|
@@ -298,11 +298,11 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
298
298
|
}, {
|
|
299
299
|
default: r(() => [
|
|
300
300
|
l(M),
|
|
301
|
-
e[20] || (e[20] =
|
|
301
|
+
e[20] || (e[20] = m(" Remove error ", -1))
|
|
302
302
|
]),
|
|
303
303
|
_: 1
|
|
304
304
|
})),
|
|
305
|
-
l(
|
|
305
|
+
l(p, {
|
|
306
306
|
class: "theme-warning",
|
|
307
307
|
size: "sm",
|
|
308
308
|
title: "Reset this query to its initial (pending) state",
|
|
@@ -310,7 +310,7 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
310
310
|
}, {
|
|
311
311
|
default: r(() => [
|
|
312
312
|
l(O),
|
|
313
|
-
e[21] || (e[21] =
|
|
313
|
+
e[21] || (e[21] = m(" Reset ", -1))
|
|
314
314
|
]),
|
|
315
315
|
_: 1
|
|
316
316
|
})
|
|
@@ -322,7 +322,7 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
322
322
|
open: o(h),
|
|
323
323
|
"onUpdate:open": e[7] || (e[7] = (i) => R(h) ? h.value = i : null),
|
|
324
324
|
title: `Data${s.value.state.data === void 0 ? " (empty)" : ""}`,
|
|
325
|
-
icon: o(
|
|
325
|
+
icon: o(P),
|
|
326
326
|
class: z([s.value.state.data === void 0 && "text-(--ui-text-muted)"]),
|
|
327
327
|
"no-padding": ""
|
|
328
328
|
}, {
|
|
@@ -338,13 +338,13 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
338
338
|
open: o(x),
|
|
339
339
|
"onUpdate:open": e[8] || (e[8] = (i) => R(x) ? x.value = i : null),
|
|
340
340
|
title: `Error${s.value.state.status === "error" ? " (!)" : "(empty)"}`,
|
|
341
|
-
icon: o(
|
|
341
|
+
icon: o(X),
|
|
342
342
|
class: z([s.value.state.status !== "error" && "text-(--ui-text-muted)"]),
|
|
343
343
|
disabled: ""
|
|
344
344
|
}, {
|
|
345
345
|
default: r(() => [
|
|
346
346
|
t("div", He, [
|
|
347
|
-
s.value.state.error ? (n(), u("pre", Le,
|
|
347
|
+
s.value.state.error ? (n(), u("pre", Le, c(s.value.state.error), 1)) : (n(), u("p", Me, "No error"))
|
|
348
348
|
])
|
|
349
349
|
]),
|
|
350
350
|
_: 1
|
|
@@ -359,19 +359,19 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
359
359
|
t("p", Ve, [
|
|
360
360
|
e[22] || (e[22] = t("span", null, "Calls:", -1)),
|
|
361
361
|
t("span", null, [
|
|
362
|
-
t("code", je,
|
|
362
|
+
t("code", je, c(s.value.devtools.count.total), 1)
|
|
363
363
|
]),
|
|
364
364
|
e[23] || (e[23] = t("span", null, "Success:", -1)),
|
|
365
365
|
t("span", null, [
|
|
366
|
-
t("code", Fe,
|
|
366
|
+
t("code", Fe, c(s.value.devtools.count.succeed), 1)
|
|
367
367
|
]),
|
|
368
368
|
e[24] || (e[24] = t("span", null, "Errors:", -1)),
|
|
369
369
|
t("span", null, [
|
|
370
|
-
t("code", Ue,
|
|
370
|
+
t("code", Ue, c(s.value.devtools.count.errored), 1)
|
|
371
371
|
]),
|
|
372
372
|
e[25] || (e[25] = t("span", null, "Cancelled:", -1)),
|
|
373
373
|
t("span", null, [
|
|
374
|
-
t("code", Qe,
|
|
374
|
+
t("code", Qe, c(s.value.devtools.count.cancelled), 1)
|
|
375
375
|
])
|
|
376
376
|
])
|
|
377
377
|
])
|
|
@@ -385,7 +385,7 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
385
385
|
}, {
|
|
386
386
|
default: r(() => [
|
|
387
387
|
t("div", We, [
|
|
388
|
-
(n(!0), u(C, null,
|
|
388
|
+
(n(!0), u(C, null, ae(s.value.devtools.history, (i) => (n(), k(_, {
|
|
389
389
|
key: i.updatedAt,
|
|
390
390
|
title: `Entry nº${i.id} (${o(I)(new Date(i.updatedAt), w)})`,
|
|
391
391
|
open: !1,
|
|
@@ -405,8 +405,8 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
405
405
|
}, 8, ["title", "icon"]),
|
|
406
406
|
l(_, {
|
|
407
407
|
title: "Options",
|
|
408
|
-
open: !
|
|
409
|
-
icon: o(
|
|
408
|
+
open: !s.value.options,
|
|
409
|
+
icon: o(K),
|
|
410
410
|
"no-padding": ""
|
|
411
411
|
}, {
|
|
412
412
|
default: r(() => [
|
|
@@ -415,19 +415,19 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
415
415
|
data: s.value.options,
|
|
416
416
|
readonly: ""
|
|
417
417
|
}, null, 8, ["data"])) : (n(), u("p", Ge, [...e[26] || (e[26] = [
|
|
418
|
-
|
|
418
|
+
m(" This Query entry has no options. It might have been created from the server or manually set with ", -1),
|
|
419
419
|
t("code", null, "queryCache.setQueryData()", -1),
|
|
420
|
-
|
|
420
|
+
m(" for prefetching. ", -1)
|
|
421
421
|
])]))
|
|
422
422
|
]),
|
|
423
423
|
_: 1
|
|
424
|
-
}, 8, ["icon"])
|
|
424
|
+
}, 8, ["open", "icon"])
|
|
425
425
|
], 64)) : (n(), u("div", Je, [
|
|
426
426
|
t("p", Pe, [
|
|
427
|
-
e[27] || (e[27] =
|
|
427
|
+
e[27] || (e[27] = m(" Select a Query to inspect ", -1)),
|
|
428
428
|
l(V)
|
|
429
429
|
]),
|
|
430
|
-
t("p", Xe, " No query with key " +
|
|
430
|
+
t("p", Xe, " No query with key " + c(o(a).params.queryId) + " was found in the cache ", 1)
|
|
431
431
|
]))
|
|
432
432
|
]);
|
|
433
433
|
};
|
|
@@ -436,4 +436,4 @@ const xe = $({ name: "lucide-sigma-square", render: ke }), we = { class: "flex f
|
|
|
436
436
|
export {
|
|
437
437
|
tt as default
|
|
438
438
|
};
|
|
439
|
-
//# sourceMappingURL=_queryId_-
|
|
439
|
+
//# sourceMappingURL=_queryId_-B4Df55YE.js.map
|