@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.
Files changed (44) hide show
  1. package/dist/index.js +488 -372
  2. package/dist/index.js.map +1 -1
  3. package/dist-panel/(unselected)-95MlHIGa.js +17 -0
  4. package/dist-panel/(unselected)-95MlHIGa.js.map +1 -0
  5. package/dist-panel/{index-BNGmSTu0.js → (unselected)-DcyIREPL.js} +5 -5
  6. package/dist-panel/(unselected)-DcyIREPL.js.map +1 -0
  7. package/dist-panel/_mutationId_-BfpMyZn5.js +307 -0
  8. package/dist-panel/_mutationId_-BfpMyZn5.js.map +1 -0
  9. package/dist-panel/_queryId_-deTdMujv.js +444 -0
  10. package/dist-panel/_queryId_-deTdMujv.js.map +1 -0
  11. package/dist-panel/circle-x-CRJfYoJo.js +677 -0
  12. package/dist-panel/circle-x-CRJfYoJo.js.map +1 -0
  13. package/dist-panel/index-CEuAAFs8.js +6431 -0
  14. package/dist-panel/index-CEuAAFs8.js.map +1 -0
  15. package/dist-panel/{index-goOYcO8U.js → index-DfoOd-Mi.js} +2 -2
  16. package/dist-panel/{index-goOYcO8U.js.map → index-DfoOd-Mi.js.map} +1 -1
  17. package/dist-panel/index.js +2 -2
  18. package/dist-panel/{loader-t1YDOb8H.js → loader-CiXOT2XE.js} +2 -2
  19. package/dist-panel/loader-CiXOT2XE.js.map +1 -0
  20. package/dist-panel/{mouse-pointer-click-BMFWvdTu.js → mouse-pointer-click-CR81e5yZ.js} +2 -2
  21. package/dist-panel/mouse-pointer-click-CR81e5yZ.js.map +1 -0
  22. package/dist-panel/mutations-Dox_GA2-.js +297 -0
  23. package/dist-panel/mutations-Dox_GA2-.js.map +1 -0
  24. package/dist-panel/queries-15p7FQjG.js +286 -0
  25. package/dist-panel/queries-15p7FQjG.js.map +1 -0
  26. package/dist-panel/{settings-BRfTfxFz.js → settings-DqjxZlKC.js} +2 -2
  27. package/dist-panel/{settings-BRfTfxFz.js.map → settings-DqjxZlKC.js.map} +1 -1
  28. package/dist-panel/use-container-media-query-rzuTymhT.js +555 -0
  29. package/dist-panel/use-container-media-query-rzuTymhT.js.map +1 -0
  30. package/dist-shared/index.d.ts +200 -9
  31. package/dist-shared/index.js +1 -0
  32. package/dist-shared/index.js.map +1 -1
  33. package/package.json +9 -10
  34. package/dist-panel/_queryId_-BizYY_I8.js +0 -701
  35. package/dist-panel/_queryId_-BizYY_I8.js.map +0 -1
  36. package/dist-panel/index-BNGmSTu0.js.map +0 -1
  37. package/dist-panel/index-CIfbEdr_.js +0 -6340
  38. package/dist-panel/index-CIfbEdr_.js.map +0 -1
  39. package/dist-panel/loader-t1YDOb8H.js.map +0 -1
  40. package/dist-panel/mouse-pointer-click-BMFWvdTu.js.map +0 -1
  41. package/dist-panel/mutations-BNe8aMZH.js +0 -13
  42. package/dist-panel/mutations-BNe8aMZH.js.map +0 -1
  43. package/dist-panel/queries-0xQLbzuX.js +0 -795
  44. package/dist-panel/queries-0xQLbzuX.js.map +0 -1
@@ -0,0 +1,444 @@
1
+ import { _ as F } from "./mouse-pointer-click-CR81e5yZ.js";
2
+ import { I as U, _ as Q, a as W, b as J, c as G, d as P, e as X, f as K, g as Y } from "./circle-x-CRJfYoJo.js";
3
+ import { _ as Z, a as ee } from "./loader-CiXOT2XE.js";
4
+ import { m as q, c as i, o as n, a as t, d as te, C as se, b as z, s as oe, p as B, v as ne, F as b, i as a, w as d, g as o, x as D, q as _, t as c, y as le, f as $, z as ae, A as C, e as x, B as re, h as ie } from "./index-CEuAAFs8.js";
5
+ const ue = {
6
+ viewBox: "0 0 24 24",
7
+ width: "1.2em",
8
+ height: "1.2em"
9
+ };
10
+ function de(v, l) {
11
+ return n(), i("svg", ue, [...l[0] || (l[0] = [
12
+ t("g", {
13
+ fill: "none",
14
+ stroke: "currentColor",
15
+ "stroke-linecap": "round",
16
+ "stroke-linejoin": "round",
17
+ "stroke-width": "2"
18
+ }, [
19
+ t("path", { d: "M10 2h4m-2 12v-4m-8 3a8 8 0 0 1 8-7a8 8 0 1 1-5.3 14L4 17.6" }),
20
+ t("path", { d: "M9 17H4v5" })
21
+ ], -1)
22
+ ])]);
23
+ }
24
+ const ce = q({ name: "lucide-timer-reset", render: de }), pe = {
25
+ viewBox: "0 0 24 24",
26
+ width: "1.2em",
27
+ height: "1.2em"
28
+ };
29
+ function me(v, l) {
30
+ return n(), i("svg", pe, [...l[0] || (l[0] = [
31
+ t("g", {
32
+ fill: "none",
33
+ stroke: "currentColor",
34
+ "stroke-linecap": "round",
35
+ "stroke-linejoin": "round",
36
+ "stroke-width": "2"
37
+ }, [
38
+ t("path", { d: "M3 12a9 9 0 0 1 9-9a9.75 9.75 0 0 1 6.74 2.74L21 8" }),
39
+ t("path", { d: "M21 3v5h-5m5 4a9 9 0 0 1-9 9a9.75 9.75 0 0 1-6.74-2.74L3 16" }),
40
+ t("path", { d: "M8 16H3v5" })
41
+ ], -1)
42
+ ])]);
43
+ }
44
+ const _e = q({ name: "lucide-refresh-cw", render: me });
45
+ function ve(v) {
46
+ if (v < 1e3)
47
+ return `${Math.round(v)} ms`;
48
+ const l = v / 1e3;
49
+ if (v < 1e4)
50
+ return `${l.toFixed(3)} seconds`;
51
+ if (v < 6e4)
52
+ return `${Math.floor(l)} seconds`;
53
+ const y = Math.floor(l / 60);
54
+ return v < 36e5 ? `${y} minute${y > 1 ? "s" : ""}` : `${Math.floor(y / 60)}h${y % 60}m${l % 60}s`;
55
+ }
56
+ const fe = {
57
+ viewBox: "0 0 24 24",
58
+ width: "1.2em",
59
+ height: "1.2em"
60
+ };
61
+ function he(v, l) {
62
+ return n(), i("svg", fe, [...l[0] || (l[0] = [
63
+ t("g", {
64
+ fill: "none",
65
+ stroke: "currentColor",
66
+ "stroke-linecap": "round",
67
+ "stroke-linejoin": "round",
68
+ "stroke-width": "2"
69
+ }, [
70
+ t("path", { d: "M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8" }),
71
+ t("path", { d: "M3 3v5h5m4-1v5l4 2" })
72
+ ], -1)
73
+ ])]);
74
+ }
75
+ const ge = q({ name: "lucide-history", render: he }), ye = {
76
+ viewBox: "0 0 24 24",
77
+ width: "1.2em",
78
+ height: "1.2em"
79
+ };
80
+ function ke(v, l) {
81
+ return n(), i("svg", ye, [...l[0] || (l[0] = [
82
+ t("g", {
83
+ fill: "none",
84
+ stroke: "currentColor",
85
+ "stroke-linecap": "round",
86
+ "stroke-linejoin": "round",
87
+ "stroke-width": "2"
88
+ }, [
89
+ t("rect", {
90
+ width: "18",
91
+ height: "18",
92
+ x: "3",
93
+ y: "3",
94
+ rx: "2"
95
+ }),
96
+ t("path", { d: "M16 8.9V7H8l4 5l-4 5h8v-1.9" })
97
+ ], -1)
98
+ ])]);
99
+ }
100
+ const xe = q({ name: "lucide-sigma-square", render: ke }), we = { class: "flex flex-col divide-y dark:divide-(--ui-border) divide-(--ui-border-accented)" }, $e = { class: "py-1 text-sm" }, qe = { class: "grid grid-cols-[auto_1fr] gap-1" }, be = { class: "rounded bg-neutral-500/20 p-0.5" }, Ce = {
101
+ class: "grid grid-cols-[auto_1fr] gap-x-2",
102
+ title: "When was the query entry last updated"
103
+ }, Se = { class: "font-bold" }, Ie = {
104
+ key: 0,
105
+ class: "grid grid-cols-[auto_1fr] gap-x-2",
106
+ title: "When was the last time the query was fetched"
107
+ }, Te = { class: "font-bold" }, ze = {
108
+ key: 1,
109
+ class: "grid grid-cols-[auto_1fr] gap-x-2",
110
+ title: "How long did the last query take to fetch"
111
+ }, Be = { class: "font-bold" }, De = {
112
+ class: "grid grid-cols-[auto_1fr] gap-x-2",
113
+ title: "How many components and effects are using this query"
114
+ }, Ee = { class: "font-bold" }, Ne = {
115
+ key: 2,
116
+ class: "grid grid-cols-[auto_1fr] gap-x-2",
117
+ title: "When is this query entry garbace collected"
118
+ }, Re = { class: "font-bold" }, Ae = { class: "py-2 gap-2 flex flex-wrap items-center justify-items-start" }, He = { class: "py-1" }, Oe = {
119
+ key: 0,
120
+ class: "rounded p-1 overflow-auto max-h-[1200px]"
121
+ }, Le = {
122
+ key: 1,
123
+ class: "text-neutral-500/50"
124
+ }, Me = { class: "py-1" }, Ve = { class: "grid grid-cols-[auto_1fr] gap-1" }, je = { class: "font-bold" }, Fe = { class: "font-bold" }, Ue = { class: "font-bold" }, Qe = { class: "font-bold" }, We = { class: "py-1" }, Je = { class: "rounded p-1 overflow-auto max-h-[1200px]" }, Ge = { class: "py-1" }, Pe = {
125
+ key: 0,
126
+ class: "rounded bg-neutral-500/20 p-1 overflow-auto max-h-[1200px]"
127
+ }, Xe = { key: 1 }, Ke = {
128
+ key: 1,
129
+ class: "py-6 mx-auto"
130
+ }, Ye = { class: "flex flex-col text-center items-center gap-2 text-lg px-2" }, Ze = { class: "text-center text-sm text-neutral-500 mt-4" }, nt = /* @__PURE__ */ te({
131
+ __name: "[queryId]",
132
+ setup(v) {
133
+ const l = le(), y = se(), s = z(() => y.value.find((r) => r.keyHash === l.params.queryId) ?? null), E = z(() => s.value?.devtools.history.map((r) => {
134
+ let e;
135
+ try {
136
+ e = JSON.stringify(r, null, 2);
137
+ } catch (p) {
138
+ e = `Error serializing entry: ${String(p)}`;
139
+ }
140
+ return {
141
+ ...r,
142
+ data: e
143
+ };
144
+ }) ?? []), w = {
145
+ showSecond: !0,
146
+ rounding: "floor",
147
+ max: 1e3 * 60 * 60 * 24
148
+ // 1 day
149
+ }, N = ae(() => s.value?.devtools.updatedAt ?? 0, {
150
+ ...w,
151
+ updateInterval: 3e3
152
+ }), h = oe(), g = B("pc:query:details:data:open", !1, {});
153
+ let S = g.value, I = null;
154
+ const k = B("pc:query:details:error:open", !1, {});
155
+ ne(
156
+ () => s.value?.state,
157
+ (r) => {
158
+ !r || I === r.status || (I = r.status, r.status === "error" ? (k.value = !0, S = g.value, g.value = !1) : r.status === "success" && (g.value = S, k.value = !1));
159
+ }
160
+ );
161
+ function R(r, e, p) {
162
+ if (e.length === 0)
163
+ return console.error("Cannot set value with empty path"), !1;
164
+ let f = r;
165
+ for (let m = 0; m < e.length - 1; m++) {
166
+ if (f == null || typeof f != "object")
167
+ return console.error("Invalid path:", e, "at index", m, "Current value:", f), !1;
168
+ f = f[e[m]];
169
+ }
170
+ return f == null || typeof f != "object" ? (console.error("Invalid final parent in path:", e), !1) : (f[e.at(-1)] = p, !0);
171
+ }
172
+ const A = (r, e) => {
173
+ if (!s.value) return;
174
+ if (!R(s.value.state.data, r, e)) {
175
+ console.error("Failed to update value at path:", r);
176
+ return;
177
+ }
178
+ h.emit("queries:set:state", s.value.key, s.value.state);
179
+ };
180
+ return (r, e) => {
181
+ const p = Q, f = _e, m = re, H = ce, T = Z, O = ee, L = X, M = K, V = Y, j = F;
182
+ return n(), i("div", we, [
183
+ s.value ? (n(), i(b, { key: 0 }, [
184
+ a(p, {
185
+ title: "Details",
186
+ icon: o(U)
187
+ }, {
188
+ default: d(() => [
189
+ t("div", $e, [
190
+ t("p", qe, [
191
+ e[9] || (e[9] = t("span", null, "key:", -1)),
192
+ t("span", null, [
193
+ t("code", be, c(s.value.key), 1)
194
+ ])
195
+ ]),
196
+ t("p", Ce, [
197
+ e[10] || (e[10] = t("span", null, "Last update:", -1)),
198
+ t("span", Se, c(o(N)), 1)
199
+ ]),
200
+ s.value.devtools.history.at(0)?.fetchTime ? (n(), i("p", Ie, [
201
+ e[11] || (e[11] = t("span", null, "Last fetch:", -1)),
202
+ t("span", Te, c(o(C)(new Date(s.value.devtools.history.at(0).fetchTime.start), {
203
+ ...w,
204
+ max: void 0
205
+ })), 1)
206
+ ])) : $("", !0),
207
+ s.value.devtools.history.at(0)?.fetchTime?.end ? (n(), i("p", ze, [
208
+ e[12] || (e[12] = t("span", null, "Fetch duration:", -1)),
209
+ t("span", Be, c(o(ve)(
210
+ s.value.devtools.history.at(0).fetchTime.end - s.value.devtools.history.at(0).fetchTime.start
211
+ )), 1)
212
+ ])) : $("", !0),
213
+ t("p", De, [
214
+ t("span", null, [
215
+ e[13] || (e[13] = _("Observers: ", -1)),
216
+ t("span", Ee, c(s.value.deps.length), 1)
217
+ ])
218
+ ]),
219
+ !s.value.active && s.value.options ? (n(), i("p", Ne, [
220
+ typeof s.value.options.gcTime == "number" && Number.isFinite(s.value.options.gcTime) ? (n(), i(b, { key: 0 }, [
221
+ e[14] || (e[14] = t("span", null, [
222
+ _("Will be "),
223
+ t("i", null, "gced")
224
+ ], -1)),
225
+ t("span", Re, c(o(C)(
226
+ new Date(s.value.devtools.inactiveAt + s.value.options.gcTime),
227
+ {
228
+ ...w,
229
+ max: void 0
230
+ }
231
+ )), 1)
232
+ ], 64)) : $("", !0)
233
+ ])) : $("", !0)
234
+ ])
235
+ ]),
236
+ _: 1
237
+ }, 8, ["icon"]),
238
+ a(p, {
239
+ title: "Actions",
240
+ icon: o(W)
241
+ }, {
242
+ default: d(() => [
243
+ t("div", Ae, [
244
+ a(m, {
245
+ class: "theme-info",
246
+ size: "sm",
247
+ title: "Refetch this query",
248
+ disabled: s.value.options?.enabled === !1,
249
+ onClick: e[0] || (e[0] = (u) => o(h).emit("queries:refetch", s.value.key))
250
+ }, {
251
+ default: d(() => [
252
+ a(f, { class: "size-3.5" }),
253
+ e[15] || (e[15] = _(" Refetch ", -1))
254
+ ]),
255
+ _: 1
256
+ }, 8, ["disabled"]),
257
+ a(m, {
258
+ class: "theme-neutral",
259
+ size: "sm",
260
+ title: "Invalidate this query",
261
+ onClick: e[1] || (e[1] = (u) => o(h).emit("queries:invalidate", s.value.key))
262
+ }, {
263
+ default: d(() => [
264
+ a(H),
265
+ e[16] || (e[16] = _(" Invalidate ", -1))
266
+ ]),
267
+ _: 1
268
+ }),
269
+ s.value.devtools.simulate !== "loading" ? (n(), x(m, {
270
+ key: 0,
271
+ class: "theme-purple",
272
+ size: "sm",
273
+ title: "Restore the previous state",
274
+ onClick: e[2] || (e[2] = (u) => o(h).emit("queries:simulate:loading", s.value.key))
275
+ }, {
276
+ default: d(() => [
277
+ a(T),
278
+ e[17] || (e[17] = _(" Simulate loading ", -1))
279
+ ]),
280
+ _: 1
281
+ })) : (n(), x(m, {
282
+ key: 1,
283
+ class: "theme-purple",
284
+ size: "sm",
285
+ title: "Simulate a loading state",
286
+ onClick: e[3] || (e[3] = (u) => o(h).emit("queries:simulate:loading:stop", s.value.key))
287
+ }, {
288
+ default: d(() => [
289
+ a(T, { class: "animate-spin" }),
290
+ e[18] || (e[18] = _(" Stop loading ", -1))
291
+ ]),
292
+ _: 1
293
+ })),
294
+ s.value.devtools.simulate !== "error" ? (n(), x(m, {
295
+ key: 2,
296
+ class: "theme-error",
297
+ size: "sm",
298
+ title: "Simulate an Error state",
299
+ onClick: e[4] || (e[4] = (u) => o(h).emit("queries:simulate:error", s.value.key))
300
+ }, {
301
+ default: d(() => [
302
+ a(O),
303
+ e[19] || (e[19] = _(" Simulate error ", -1))
304
+ ]),
305
+ _: 1
306
+ })) : (n(), x(m, {
307
+ key: 3,
308
+ class: "theme-error",
309
+ size: "sm",
310
+ title: "Restore the previous state",
311
+ onClick: e[5] || (e[5] = (u) => o(h).emit("queries:simulate:error:stop", s.value.key))
312
+ }, {
313
+ default: d(() => [
314
+ a(L),
315
+ e[20] || (e[20] = _(" Remove error ", -1))
316
+ ]),
317
+ _: 1
318
+ })),
319
+ a(m, {
320
+ class: "theme-warning",
321
+ size: "sm",
322
+ title: "Reset this query to its initial (pending) state",
323
+ onClick: e[6] || (e[6] = (u) => o(h).emit("queries:reset", s.value.key))
324
+ }, {
325
+ default: d(() => [
326
+ a(M),
327
+ e[21] || (e[21] = _(" Reset ", -1))
328
+ ]),
329
+ _: 1
330
+ })
331
+ ])
332
+ ]),
333
+ _: 1
334
+ }, 8, ["icon"]),
335
+ a(p, {
336
+ open: o(g),
337
+ "onUpdate:open": e[7] || (e[7] = (u) => D(g) ? g.value = u : null),
338
+ title: "Data",
339
+ icon: o(J),
340
+ class: "font-mono",
341
+ "no-padding": ""
342
+ }, {
343
+ default: d(() => [
344
+ a(V, {
345
+ data: s.value.state.data,
346
+ "onUpdate:value": A
347
+ }, null, 8, ["data"])
348
+ ]),
349
+ _: 1
350
+ }, 8, ["open", "icon"]),
351
+ a(p, {
352
+ open: o(k),
353
+ "onUpdate:open": e[8] || (e[8] = (u) => D(k) ? k.value = u : null),
354
+ title: `Error${s.value.state.status === "error" ? " (!)" : ""}`,
355
+ icon: o(G)
356
+ }, {
357
+ default: d(() => [
358
+ t("div", He, [
359
+ s.value.state.error ? (n(), i("pre", Oe, c(s.value.state.error), 1)) : (n(), i("p", Le, "No error"))
360
+ ])
361
+ ]),
362
+ _: 1
363
+ }, 8, ["open", "title", "icon"]),
364
+ a(p, {
365
+ title: "Call count",
366
+ icon: o(xe),
367
+ open: !1
368
+ }, {
369
+ default: d(() => [
370
+ t("div", Me, [
371
+ t("p", Ve, [
372
+ e[22] || (e[22] = t("span", null, "Calls:", -1)),
373
+ t("span", null, [
374
+ t("code", je, c(s.value.devtools.count.total), 1)
375
+ ]),
376
+ e[23] || (e[23] = t("span", null, "Success:", -1)),
377
+ t("span", null, [
378
+ t("code", Fe, c(s.value.devtools.count.succeed), 1)
379
+ ]),
380
+ e[24] || (e[24] = t("span", null, "Errors:", -1)),
381
+ t("span", null, [
382
+ t("code", Ue, c(s.value.devtools.count.errored), 1)
383
+ ]),
384
+ e[25] || (e[25] = t("span", null, "Cancelled:", -1)),
385
+ t("span", null, [
386
+ t("code", Qe, c(s.value.devtools.count.cancelled), 1)
387
+ ])
388
+ ])
389
+ ])
390
+ ]),
391
+ _: 1
392
+ }, 8, ["icon"]),
393
+ a(p, {
394
+ title: `History (${s.value.devtools.history.length})`,
395
+ icon: o(ge),
396
+ open: !1
397
+ }, {
398
+ default: d(() => [
399
+ t("div", We, [
400
+ (n(!0), i(b, null, ie(E.value, (u) => (n(), x(p, {
401
+ key: u.updatedAt,
402
+ title: `Entry nº${u.id} (${o(C)(new Date(u.updatedAt), w)})`,
403
+ open: !1
404
+ }, {
405
+ default: d(() => [
406
+ t("pre", Je, c(u.data), 1)
407
+ ]),
408
+ _: 2
409
+ }, 1032, ["title"]))), 128))
410
+ ])
411
+ ]),
412
+ _: 1
413
+ }, 8, ["title", "icon"]),
414
+ a(p, {
415
+ title: "Options",
416
+ open: !1,
417
+ icon: o(P)
418
+ }, {
419
+ default: d(() => [
420
+ t("div", Ge, [
421
+ s.value.options ? (n(), i("pre", Pe, c(s.value.options), 1)) : (n(), i("p", Xe, [...e[26] || (e[26] = [
422
+ _(" This Query entry has no options. It might have been created from the server or manually set with ", -1),
423
+ t("code", null, "queryCache.setQueryData()", -1),
424
+ _(" for prefetching. ", -1)
425
+ ])]))
426
+ ])
427
+ ]),
428
+ _: 1
429
+ }, 8, ["icon"])
430
+ ], 64)) : (n(), i("div", Ke, [
431
+ t("p", Ye, [
432
+ e[27] || (e[27] = _(" Select a Query to inspect ", -1)),
433
+ a(j)
434
+ ]),
435
+ t("p", Ze, " No query with key " + c(o(l).params.queryId) + " was found in the cache ", 1)
436
+ ]))
437
+ ]);
438
+ };
439
+ }
440
+ });
441
+ export {
442
+ nt as default
443
+ };
444
+ //# sourceMappingURL=_queryId_-deTdMujv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_queryId_-deTdMujv.js","sources":["../src/panel/utils/time.ts","../src/panel/pages/queries/[queryId].vue"],"sourcesContent":["export function formatDuration(timeInMs: number): string {\n if (timeInMs < 1000) {\n return `${Math.round(timeInMs)} ms`\n }\n\n const seconds = timeInMs / 1000\n if (timeInMs < 10_000) {\n return `${seconds.toFixed(3)} seconds`\n }\n\n if (timeInMs < 60_000) {\n return `${Math.floor(seconds)} seconds`\n }\n\n const minutes = Math.floor(seconds / 60)\n\n if (timeInMs < 3_600_000) {\n return `${minutes} minute${minutes > 1 ? 's' : ''}`\n }\n\n const hours = Math.floor(minutes / 60)\n\n return `${hours}h${minutes % 60}m${seconds % 60}s`\n}\n","<script setup lang=\"ts\">\nimport type { UseQueryEntryPayload } from '@pinia/colada-devtools/shared'\nimport { computed, watch } from 'vue'\nimport { useDuplexChannel, useQueryEntries } from '../../composables/duplex-channel'\nimport { formatDuration } from '../../utils/time'\nimport { useRoute } 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 IHistory from '~icons/lucide/history'\nimport ISigmaSquare from '~icons/lucide/sigma-square'\nimport { useTimeAgo, formatTimeAgo, useLocalStorage } from '@vueuse/core'\nimport type { FormatTimeAgoOptions } from '@vueuse/core'\n\nconst route = useRoute()\nconst queries = useQueryEntries()\n\nconst selectedQuery = computed<UseQueryEntryPayload | null>(() => {\n return queries.value.find((entry) => entry.keyHash === route.params.queryId) ?? null\n})\n\nconst serializedHistoryEntries = computed(() => {\n return (\n selectedQuery.value?.devtools.history.map((entry) => {\n let value: string\n try {\n value = JSON.stringify(entry, null, 2)\n } catch (error) {\n value = `Error serializing entry: ${String(error)}`\n }\n return {\n ...entry,\n data: value,\n }\n }) ?? []\n )\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(() => selectedQuery.value?.devtools.updatedAt ?? 0, {\n ...TIME_AGO_OPTIONS,\n updateInterval: 3000,\n})\n\n// TODO: we should be able to highlight components using this query\n// const el = useTemplateRef('me')\n// TODO: add ref=\"me\" to the div\n// watch(\n// // also trigger if the selectedQuery changes\n// () => [el.value, selectedQuery.value?.id] as const,\n// ([el]) => {\n// if (!el || !selectedQuery.value) return\n//\n// const observingComponents = findVueComponents(\n// el,\n// selectedQuery.value.deps.filter((c) => c.type === 'component').map((c) => c.uid) ?? [],\n// )\n//\n// console.log('elements', observingComponents)\n// },\n// )\n\nconst channel = useDuplexChannel()\n\nconst isDataOpen = useLocalStorage<boolean>('pc:query:details:data:open', false, {})\nlet wasDataOpen = isDataOpen.value\nlet lastStatus: DataStateStatus | null = null\nconst isErrorOpen = useLocalStorage<boolean>('pc:query:details:error:open', false, {})\nwatch(\n () => selectedQuery.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 // preserve it for later\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\n// Helper function to set nested value\nfunction setNestedValue(obj: any, path: Array<string | number>, value: unknown): boolean {\n if (path.length === 0) {\n console.error('Cannot set value with empty path')\n return false\n }\n\n let current = obj\n // Navigate to parent of target value\n for (let i = 0; i < path.length - 1; i++) {\n if (current == null || typeof current !== 'object') {\n console.error('Invalid path:', path, 'at index', i, 'Current value:', current)\n return false\n }\n current = current[path[i]!]\n }\n\n // Validate the final parent exists\n if (current == null || typeof current !== 'object') {\n console.error('Invalid final parent in path:', path)\n return false\n }\n\n // Set the final value\n current[path.at(-1)!] = value\n return true\n}\n\n// Handle value updates from JsonViewer\nconst handleValueUpdate = (path: Array<string | number>, value: unknown) => {\n if (!selectedQuery.value) return\n\n // Update the value at the path\n const success = setNestedValue(selectedQuery.value.state.data, path, value)\n\n if (!success) {\n console.error('Failed to update value at path:', path)\n return\n }\n\n // Send to app via RPC\n channel.emit('queries:set:state', selectedQuery.value.key, selectedQuery.value.state)\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=\"selectedQuery\">\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>key:</span>\n <span>\n <code class=\"rounded bg-neutral-500/20 p-0.5\">{{ selectedQuery.key }}</code>\n </span>\n </p>\n\n <p\n class=\"grid grid-cols-[auto_1fr] gap-x-2\"\n title=\"When was the query entry last updated\"\n >\n <span>Last update:</span>\n <span class=\"font-bold\">{{ lastUpdate }}</span>\n </p>\n\n <p\n v-if=\"selectedQuery.devtools.history.at(0)?.fetchTime\"\n class=\"grid grid-cols-[auto_1fr] gap-x-2\"\n title=\"When was the last time the query was fetched\"\n >\n <span>Last fetch:</span>\n <span class=\"font-bold\">{{\n formatTimeAgo(new Date(selectedQuery.devtools.history.at(0)!.fetchTime!.start), {\n ...TIME_AGO_OPTIONS,\n max: undefined,\n })\n }}</span>\n </p>\n\n <p\n v-if=\"selectedQuery.devtools.history.at(0)?.fetchTime?.end\"\n class=\"grid grid-cols-[auto_1fr] gap-x-2\"\n title=\"How long did the last query take to fetch\"\n >\n <span>Fetch duration:</span>\n <span class=\"font-bold\">{{\n formatDuration(\n selectedQuery.devtools.history.at(0)!.fetchTime!.end! -\n selectedQuery.devtools.history.at(0)!.fetchTime!.start,\n )\n }}</span>\n </p>\n\n <p\n class=\"grid grid-cols-[auto_1fr] gap-x-2\"\n title=\"How many components and effects are using this query\"\n >\n <span\n >Observers: <span class=\"font-bold\">{{ selectedQuery.deps.length }}</span></span\n >\n </p>\n\n <p\n v-if=\"!selectedQuery.active && selectedQuery.options\"\n class=\"grid grid-cols-[auto_1fr] gap-x-2\"\n title=\"When is this query entry garbace collected\"\n >\n <template\n v-if=\"\n typeof selectedQuery.options.gcTime === 'number' &&\n Number.isFinite(selectedQuery.options.gcTime)\n \"\n >\n <span>Will be <i>gced</i></span>\n <span class=\"font-bold\">{{\n formatTimeAgo(\n new Date(selectedQuery.devtools.inactiveAt + selectedQuery.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 class=\"theme-info\"\n size=\"sm\"\n title=\"Refetch this query\"\n :disabled=\"selectedQuery.options?.enabled === false\"\n @click=\"channel.emit('queries:refetch', selectedQuery.key)\"\n >\n <i-lucide-refresh-cw class=\"size-3.5\" /> Refetch\n </UButton>\n\n <UButton\n class=\"theme-neutral\"\n size=\"sm\"\n title=\"Invalidate this query\"\n @click=\"channel.emit('queries:invalidate', selectedQuery.key)\"\n >\n <i-lucide-timer-reset /> Invalidate\n </UButton>\n\n <UButton\n v-if=\"selectedQuery.devtools.simulate !== 'loading'\"\n class=\"theme-purple\"\n size=\"sm\"\n title=\"Restore the previous state\"\n @click=\"channel.emit('queries:simulate:loading', selectedQuery.key)\"\n >\n <i-lucide-loader />\n Simulate loading\n </UButton>\n <UButton\n v-else\n class=\"theme-purple\"\n size=\"sm\"\n title=\"Simulate a loading state\"\n @click=\"channel.emit('queries:simulate:loading:stop', selectedQuery.key)\"\n >\n <i-lucide-loader class=\"animate-spin\" />\n Stop loading\n </UButton>\n\n <UButton\n v-if=\"selectedQuery.devtools.simulate !== 'error'\"\n class=\"theme-error\"\n size=\"sm\"\n title=\"Simulate an Error state\"\n @click=\"channel.emit('queries:simulate:error', selectedQuery.key)\"\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('queries:simulate:error:stop', selectedQuery.key)\"\n >\n <i-lucide-rotate-ccw /> Remove error\n </UButton>\n\n <UButton\n class=\"theme-warning\"\n size=\"sm\"\n title=\"Reset this query to its initial (pending) state\"\n @click=\"channel.emit('queries:reset', selectedQuery.key)\"\n >\n <i-lucide-trash /> Reset\n </UButton>\n </div>\n </UCollapse>\n\n <UCollapse\n v-model:open=\"isDataOpen\"\n title=\"Data\"\n :icon=\"IFileText\"\n class=\"font-mono\"\n no-padding\n >\n <JsonViewer :data=\"selectedQuery.state.data\" @update:value=\"handleValueUpdate\" />\n </UCollapse>\n\n <UCollapse\n v-model:open=\"isErrorOpen\"\n :title=\"`Error${selectedQuery.state.status === 'error' ? ' (!)' : ''}`\"\n :icon=\"ICircleX\"\n >\n <div class=\"py-1\">\n <pre v-if=\"selectedQuery.state.error\" class=\"rounded p-1 overflow-auto max-h-[1200px]\">{{\n selectedQuery.state.error\n }}</pre>\n <p v-else class=\"text-neutral-500/50\">No error</p>\n </div>\n </UCollapse>\n\n <UCollapse title=\"Call count\" :icon=\"ISigmaSquare\" :open=\"false\">\n <div class=\"py-1\">\n <p class=\"grid grid-cols-[auto_1fr] gap-1\">\n <span>Calls:</span>\n <span>\n <code class=\"font-bold\">{{ selectedQuery.devtools.count.total }}</code>\n </span>\n <span>Success:</span>\n <span>\n <code class=\"font-bold\">{{ selectedQuery.devtools.count.succeed }}</code>\n </span>\n <span>Errors:</span>\n <span>\n <code class=\"font-bold\">{{ selectedQuery.devtools.count.errored }}</code>\n </span>\n <span>Cancelled:</span>\n <span>\n <code class=\"font-bold\">{{ selectedQuery.devtools.count.cancelled }}</code>\n </span>\n </p>\n </div>\n </UCollapse>\n\n <UCollapse\n :title=\"`History (${selectedQuery.devtools.history.length})`\"\n :icon=\"IHistory\"\n :open=\"false\"\n >\n <div class=\"py-1\">\n <UCollapse\n v-for=\"entry of serializedHistoryEntries\"\n :key=\"entry.updatedAt\"\n :title=\"`Entry nº${entry.id} (${formatTimeAgo(new Date(entry.updatedAt), TIME_AGO_OPTIONS)})`\"\n :open=\"false\"\n >\n <pre class=\"rounded p-1 overflow-auto max-h-[1200px]\">{{ entry.data }}</pre>\n </UCollapse>\n </div>\n </UCollapse>\n\n <UCollapse title=\"Options\" :open=\"false\" :icon=\"IBraces\">\n <div class=\"py-1\">\n <pre\n v-if=\"selectedQuery.options\"\n class=\"rounded bg-neutral-500/20 p-1 overflow-auto max-h-[1200px]\"\n >{{ selectedQuery.options }}</pre\n >\n <p v-else>\n This Query entry has no options. It might have been created from the server or manually\n set with\n <code>queryCache.setQueryData()</code> for prefetching.\n </p>\n </div>\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 Query to inspect\n <i-lucide-mouse-pointer-click />\n </p>\n <p class=\"text-center text-sm text-neutral-500 mt-4\">\n No query with key {{ route.params.queryId }} was found in the cache\n </p>\n </div>\n </template>\n </div>\n</template>\n"],"names":["formatDuration","timeInMs","seconds","minutes","route","useRoute","queries","useQueryEntries","selectedQuery","computed","entry","serializedHistoryEntries","value","error","TIME_AGO_OPTIONS","lastUpdate","useTimeAgo","channel","useDuplexChannel","isDataOpen","useLocalStorage","wasDataOpen","lastStatus","isErrorOpen","watch","state","setNestedValue","obj","path","current","i","handleValueUpdate","_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","formatTimeAgo","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","IWrench","_hoisted_15","_component_UButton","_component_i_lucide_refresh_cw","_component_i_lucide_timer_reset","_createBlock","_component_i_lucide_loader","_component_i_lucide_x_octagon","_component_i_lucide_rotate_ccw","_component_i_lucide_trash","$event","IFileText","_component_JsonViewer","ICircleX","_hoisted_16","_hoisted_17","_hoisted_18","ISigmaSquare","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","IHistory","_hoisted_25","_renderList","_hoisted_26","IBraces","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_component_i_lucide_mouse_pointer_click","_hoisted_32"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,SAASA,GAAeC,GAA0B;AACvD,MAAIA,IAAW;AACb,WAAO,GAAG,KAAK,MAAMA,CAAQ,CAAC;AAGhC,QAAMC,IAAUD,IAAW;AAC3B,MAAIA,IAAW;AACb,WAAO,GAAGC,EAAQ,QAAQ,CAAC,CAAC;AAG9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