@pinia/colada-devtools 0.4.3 → 0.4.4
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 +73 -70
- package/dist/index.js.map +1 -1
- package/dist-panel/{(unselected)-BQ3qDKQ9.js → (unselected)-CfGTwdQr.js} +3 -3
- package/dist-panel/{(unselected)-BQ3qDKQ9.js.map → (unselected)-CfGTwdQr.js.map} +1 -1
- package/dist-panel/{(unselected)-DAm41Y3x.js → (unselected)-Gyt_DICV.js} +3 -3
- package/dist-panel/{(unselected)-DAm41Y3x.js.map → (unselected)-Gyt_DICV.js.map} +1 -1
- package/dist-panel/{_mutationId_int_-erdQKyLR.js → _mutationId_int_-DoZP9m6J.js} +5 -5
- package/dist-panel/{_mutationId_int_-erdQKyLR.js.map → _mutationId_int_-DoZP9m6J.js.map} +1 -1
- package/dist-panel/_queryId_-DJ8QloFh.js +483 -0
- package/dist-panel/_queryId_-DJ8QloFh.js.map +1 -0
- package/dist-panel/{circle-x-InxlHvaS.js → circle-x-oV8tKj9F.js} +2 -2
- package/dist-panel/{circle-x-InxlHvaS.js.map → circle-x-oV8tKj9F.js.map} +1 -1
- package/dist-panel/{index-CYb5D1Be.js → index-Bg8BPb2M.js} +11 -11
- package/dist-panel/index-Bg8BPb2M.js.map +1 -0
- package/dist-panel/{index-DLKyTdsm.js → index-JNCqJ48C.js} +2 -2
- package/dist-panel/{index-DLKyTdsm.js.map → index-JNCqJ48C.js.map} +1 -1
- package/dist-panel/index.js +1 -1
- package/dist-panel/{loader-Ca7c0zg-.js → loader-BUrJGpKp.js} +2 -2
- package/dist-panel/loader-BUrJGpKp.js.map +1 -0
- package/dist-panel/{mouse-pointer-click-ClYfwImy.js → mouse-pointer-click-C0IkTwLI.js} +2 -2
- package/dist-panel/mouse-pointer-click-C0IkTwLI.js.map +1 -0
- package/dist-panel/{mutations-pMmse5fr.js → mutations-DpeNZasu.js} +4 -4
- package/dist-panel/{mutations-pMmse5fr.js.map → mutations-DpeNZasu.js.map} +1 -1
- package/dist-panel/{queries-BM6WYBXZ.js → queries-4P91M55i.js} +4 -4
- package/dist-panel/{queries-BM6WYBXZ.js.map → queries-4P91M55i.js.map} +1 -1
- package/dist-panel/{settings-C2hLj-3B.js → settings-TL5tZ1Lj.js} +2 -2
- package/dist-panel/{settings-C2hLj-3B.js.map → settings-TL5tZ1Lj.js.map} +1 -1
- package/dist-panel/{use-container-media-query-CrxtYrv0.js → use-container-media-query-BDdy_fp6.js} +2 -2
- package/dist-panel/{use-container-media-query-CrxtYrv0.js.map → use-container-media-query-BDdy_fp6.js.map} +1 -1
- package/dist-shared/index.d.ts +1 -0
- package/dist-shared/index.js.map +1 -1
- package/package.json +6 -6
- package/dist-panel/_queryId_-B4Df55YE.js +0 -439
- package/dist-panel/_queryId_-B4Df55YE.js.map +0 -1
- package/dist-panel/index-CYb5D1Be.js.map +0 -1
- package/dist-panel/loader-Ca7c0zg-.js.map +0 -1
- package/dist-panel/mouse-pointer-click-ClYfwImy.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o } from "./mouse-pointer-click-
|
|
2
|
-
import { _ as c, o as s, c as n, a as _, q as a, h as r } from "./index-
|
|
1
|
+
import { _ as o } from "./mouse-pointer-click-C0IkTwLI.js";
|
|
2
|
+
import { _ as c, o as s, c as n, a as _, q as a, h as r } from "./index-Bg8BPb2M.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;
|
|
@@ -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)-CfGTwdQr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"(unselected)-
|
|
1
|
+
{"version":3,"file":"(unselected)-CfGTwdQr.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;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o } from "./mouse-pointer-click-
|
|
2
|
-
import { _ as c, o as s, c as n, a as _, q as a, h as r } from "./index-
|
|
1
|
+
import { _ as o } from "./mouse-pointer-click-C0IkTwLI.js";
|
|
2
|
+
import { _ as c, o as s, c as n, a as _, q as a, h as r } from "./index-Bg8BPb2M.js";
|
|
3
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
4
|
function d(m, e) {
|
|
5
5
|
const t = o;
|
|
@@ -14,4 +14,4 @@ const f = /* @__PURE__ */ c(l, [["render", d]]);
|
|
|
14
14
|
export {
|
|
15
15
|
f as default
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=(unselected)-
|
|
17
|
+
//# sourceMappingURL=(unselected)-Gyt_DICV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"(unselected)-
|
|
1
|
+
{"version":3,"file":"(unselected)-Gyt_DICV.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 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-
|
|
4
|
-
import { _ as dt, a as pt } from "./loader-
|
|
1
|
+
import { _ as q } from "./mouse-pointer-click-C0IkTwLI.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-oV8tKj9F.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-Bg8BPb2M.js";
|
|
4
|
+
import { _ as dt, a as pt } from "./loader-BUrJGpKp.js";
|
|
5
5
|
const mt = {
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
7
7
|
width: "1.2em",
|
|
@@ -304,4 +304,4 @@ const gt = N({ name: "lucide-variable", render: ft }), xt = { class: "flex flex-
|
|
|
304
304
|
export {
|
|
305
305
|
Ft as default
|
|
306
306
|
};
|
|
307
|
-
//# sourceMappingURL=_mutationId_int_-
|
|
307
|
+
//# sourceMappingURL=_mutationId_int_-DoZP9m6J.js.map
|
|
@@ -1 +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,KAAK,MAAO,KAAK,KAAK;AAAA;AAAA,IAAA,GAGlBC,IAAaC,GAAW,MAAMN,EAAiB,OAAO,SAAS,aAAa,GAAG;AAAA,MACnF,GAAGI;AAAA,MACH,gBAAgB;AAAA,IAAA,CACjB,GAEKG,IAAUC,GAAA;AAGhB,QAAIC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8B,CAAA;AAAA,YACN,UAAQ7D,EAAA,MAAiB,MAAM,SAAS,UAAS,wBAAA,CAAA;AAAA,YAClD,cAAA;AAAA,UAAA;uBAEA,MAAkD;AAAA,cAAlD6B,EAAkD+B,GAAA;AAAA,gBAArC,MAAM5D,EAAA,MAAiB,MAAM;AAAA,cAAA;;;;UAG5C6B,EAaYC,GAAA;AAAA,YAZF,MAAMC,EAAAR,CAAA;AAAA,2DAAAA,EAAW,QAAAgC,IAAA;AAAA,YACxB,OAAK,QAAUvD,EAAA,MAAiB,MAAM,WAAM,UAAA,SAAA,EAAA;AAAA,YAC5C,MAAM+B,EAAA+B,CAAA;AAAA,UAAA;uBAEP,MAOM;AAAA,cAPN7B,EAOM,OAPN8B,IAOM;AAAA,gBALI/D,EAAA,MAAiB,MAAM,SAD/ByB,KAAAC,EAIC,OAJDsC,IAIC1B,EADKtC,QAAiB,MAAM,KAAK,GAAA,CAAA,WAElC0B,EAAkD,KAAlDuC,IAAsC,UAAQ;AAAA,cAAA;;;;UAIlDpC,EAGYC,GAAA;AAAA,YAHD,OAAM;AAAA,YAAW,MAAM;AAAA,YAAQ,MAAMC,EAAAmC,CAAA;AAAA,YAAS,cAAA;AAAA,UAAA;uBACvD,MAAwF;AAAA,cAAtElE,EAAA,MAAiB,gBAAnCkD,EAAwFU,GAAA;AAAA;gBAA3C,MAAM5D,EAAA,MAAiB;AAAA,gBAAS,UAAA;AAAA,cAAA,0BAC7EyB,EAAA,GAAAC,EAAsD,SAA5C,0CAAwC;AAAA,YAAA;;;mBAKpDD,KAAAC,EAKM,OALNyC,IAKM;AAAA,UAJJlC,EAGI,KAHJmC,IAGI;AAAA,gCAHiE,kCAEnE,EAAA;AAAA,YAAAvC,EAAgCwC,CAAA;AAAA,UAAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"_mutationId_int_-DoZP9m6J.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,KAAK,MAAO,KAAK,KAAK;AAAA;AAAA,IAAA,GAGlBC,IAAaC,GAAW,MAAMN,EAAiB,OAAO,SAAS,aAAa,GAAG;AAAA,MACnF,GAAGI;AAAA,MACH,gBAAgB;AAAA,IAAA,CACjB,GAEKG,IAAUC,GAAA;AAGhB,QAAIC,IAAe;AACnB,UAAMC,IAA4BC,GAAI,CAAC;AAEvC,aAASC,EAAeC,GAAmC;AAEzD,MAAAH,EAA0B,QAAQZ,EAAU,MAAM,QAClDW,IAAe,IAGfF,EAAQ,KAAK,oBAAoBM,CAAE;AAAA,IACrC;AAKA,IAAAC;AAAA,MACE,MAAMhB,EAAU;AAAA,MAChB,MAAM;AACJ,YAAIW,GAAc;AAEhB,gBAAMM,IAASjB,EAAU,MAAM,SAAS,CAACkB,GAAGC,MAAMA,EAAE,KAAKD,EAAE,EAAE,EAAE,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,WAAM,UAAA,SAAA,EAAA;AAAA,YAC5C,MAAM+B,EAAA+B,CAAA;AAAA,UAAA;uBAEP,MAOM;AAAA,cAPN7B,EAOM,OAPN8B,IAOM;AAAA,gBALI/D,EAAA,MAAiB,MAAM,SAD/ByB,KAAAC,EAIC,OAJDsC,IAIC1B,EADKtC,QAAiB,MAAM,KAAK,GAAA,CAAA,WAElC0B,EAAkD,KAAlDuC,IAAsC,UAAQ;AAAA,cAAA;;;;UAIlDpC,EAGYC,GAAA;AAAA,YAHD,OAAM;AAAA,YAAW,MAAM;AAAA,YAAQ,MAAMC,EAAAmC,CAAA;AAAA,YAAS,cAAA;AAAA,UAAA;uBACvD,MAAwF;AAAA,cAAtElE,EAAA,MAAiB,gBAAnCkD,EAAwFU,GAAA;AAAA;gBAA3C,MAAM5D,EAAA,MAAiB;AAAA,gBAAS,UAAA;AAAA,cAAA,0BAC7EyB,EAAA,GAAAC,EAAsD,SAA5C,0CAAwC;AAAA,YAAA;;;mBAKpDD,KAAAC,EAKM,OALNyC,IAKM;AAAA,UAJJlC,EAGI,KAHJmC,IAGI;AAAA,gCAHiE,kCAEnE,EAAA;AAAA,YAAAvC,EAAgCwC,CAAA;AAAA,UAAA;;;;;;"}
|
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
import { _ as U } from "./mouse-pointer-click-C0IkTwLI.js";
|
|
2
|
+
import { I as Q, _ as W, d as P, a as Z, b as G, c as J, e as X, f as K, g as Y } from "./circle-x-oV8tKj9F.js";
|
|
3
|
+
import { _ as ee, a as te } from "./loader-BUrJGpKp.js";
|
|
4
|
+
import { m as $, o, c as u, a as t, d as se, s as oe, C as ne, v as le, l as D, x as ae, F as C, h as a, w as i, t as v, e as n, y as I, f as b, q as _, b as g, g as L, z as re, n as M, A as R, i as ie, B as ue } from "./index-Bg8BPb2M.js";
|
|
5
|
+
const de = {
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
width: "1.2em",
|
|
8
|
+
height: "1.2em"
|
|
9
|
+
};
|
|
10
|
+
function pe(m, l) {
|
|
11
|
+
return o(), u("svg", de, [...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 = $({ name: "lucide-timer-reset", render: pe }), me = {
|
|
25
|
+
viewBox: "0 0 24 24",
|
|
26
|
+
width: "1.2em",
|
|
27
|
+
height: "1.2em"
|
|
28
|
+
};
|
|
29
|
+
function ve(m, l) {
|
|
30
|
+
return o(), u("svg", me, [...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 = $({ name: "lucide-refresh-cw", render: ve });
|
|
45
|
+
function fe(m) {
|
|
46
|
+
if (m < 1e3)
|
|
47
|
+
return `${Math.round(m)} ms`;
|
|
48
|
+
const l = m / 1e3;
|
|
49
|
+
if (m < 1e4)
|
|
50
|
+
return `${l.toFixed(3)} seconds`;
|
|
51
|
+
if (m < 6e4)
|
|
52
|
+
return `${Math.floor(l)} seconds`;
|
|
53
|
+
const k = Math.floor(l / 60);
|
|
54
|
+
return m < 36e5 ? `${k} minute${k > 1 ? "s" : ""}` : `${Math.floor(k / 60)}h${k % 60}m${l % 60}s`;
|
|
55
|
+
}
|
|
56
|
+
const ge = {
|
|
57
|
+
viewBox: "0 0 24 24",
|
|
58
|
+
width: "1.2em",
|
|
59
|
+
height: "1.2em"
|
|
60
|
+
};
|
|
61
|
+
function he(m, l) {
|
|
62
|
+
return o(), u("svg", ge, [...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 ye = $({ name: "lucide-history", render: he }), ke = {
|
|
76
|
+
viewBox: "0 0 24 24",
|
|
77
|
+
width: "1.2em",
|
|
78
|
+
height: "1.2em"
|
|
79
|
+
};
|
|
80
|
+
function xe(m, l) {
|
|
81
|
+
return o(), u("svg", ke, [...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 we = $({ name: "lucide-sigma-square", render: xe }), be = {
|
|
101
|
+
viewBox: "0 0 24 24",
|
|
102
|
+
width: "1.2em",
|
|
103
|
+
height: "1.2em"
|
|
104
|
+
};
|
|
105
|
+
function $e(m, l) {
|
|
106
|
+
return o(), u("svg", be, [...l[0] || (l[0] = [
|
|
107
|
+
t("path", {
|
|
108
|
+
fill: "none",
|
|
109
|
+
stroke: "currentColor",
|
|
110
|
+
"stroke-linecap": "round",
|
|
111
|
+
"stroke-linejoin": "round",
|
|
112
|
+
"stroke-width": "2",
|
|
113
|
+
d: "M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6l-2.3 2.3a2.4 2.4 0 0 0 0 3.4ZM2 22l3-3m2.5-5.5L10 11m.5 5.5L13 14m5-11l-4 4h6l-4 4"
|
|
114
|
+
}, null, -1)
|
|
115
|
+
])]);
|
|
116
|
+
}
|
|
117
|
+
const qe = $({ name: "lucide-plug-zap", render: $e }), Ce = { class: "flex flex-col divide-y dark:divide-(--ui-border) divide-(--ui-border-accented)" }, Ie = { class: "py-1 text-sm" }, Se = { class: "grid grid-cols-[auto_1fr] gap-1" }, Te = { class: "rounded bg-neutral-500/20 p-0.5" }, Be = {
|
|
118
|
+
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
119
|
+
title: "When was the query entry last updated"
|
|
120
|
+
}, ze = { class: "font-bold" }, De = {
|
|
121
|
+
key: 0,
|
|
122
|
+
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
123
|
+
title: "When was the last time the query was fetched"
|
|
124
|
+
}, Le = { class: "font-bold" }, Me = {
|
|
125
|
+
key: 1,
|
|
126
|
+
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
127
|
+
title: "How long did the last query take to fetch"
|
|
128
|
+
}, Re = { class: "font-bold" }, je = {
|
|
129
|
+
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
130
|
+
title: "How many components and effects are using this query"
|
|
131
|
+
}, Ae = { class: "font-bold" }, Ne = {
|
|
132
|
+
key: 2,
|
|
133
|
+
class: "grid grid-cols-[auto_1fr] gap-x-2",
|
|
134
|
+
title: "When is this query entry garbace collected"
|
|
135
|
+
}, Oe = { class: "font-bold" }, Ee = { class: "py-1 space-y-1" }, He = { class: "py-2 gap-2 flex flex-wrap items-center justify-items-start" }, Ve = { class: "py-1" }, Fe = {
|
|
136
|
+
key: 0,
|
|
137
|
+
class: "rounded p-1 overflow-auto max-h-[1200px]"
|
|
138
|
+
}, Ue = {
|
|
139
|
+
key: 1,
|
|
140
|
+
class: "text-(--ui-text-muted)/50"
|
|
141
|
+
}, Qe = { class: "py-1" }, We = { class: "grid grid-cols-[auto_1fr] gap-1" }, Pe = { class: "font-bold" }, Ze = { class: "font-bold" }, Ge = { class: "font-bold" }, Je = { class: "font-bold" }, Xe = { class: "py-1" }, Ke = { key: 1 }, Ye = {
|
|
142
|
+
key: 1,
|
|
143
|
+
class: "py-6 mx-auto"
|
|
144
|
+
}, et = { class: "flex flex-col text-center items-center gap-2 text-lg px-2" }, tt = { class: "text-center text-sm text-neutral-500 mt-4" }, at = /* @__PURE__ */ se({
|
|
145
|
+
__name: "[queryId]",
|
|
146
|
+
setup(m) {
|
|
147
|
+
const l = oe(), k = ne(), s = ie(() => k.value.find((d) => d.keyHash === l.params.queryId) ?? null), q = {
|
|
148
|
+
showSecond: !0,
|
|
149
|
+
rounding: "floor",
|
|
150
|
+
max: 1e3 * 60 * 60 * 24
|
|
151
|
+
// 1 day
|
|
152
|
+
}, j = ue(() => s.value?.devtools.updatedAt ?? 0, {
|
|
153
|
+
...q,
|
|
154
|
+
updateInterval: 3e3
|
|
155
|
+
}), f = le(), h = D("pc:query:details:data:open", !1, {});
|
|
156
|
+
let S = h.value, T = null;
|
|
157
|
+
const w = D("pc:query:details:error:open", !1, {});
|
|
158
|
+
ae(
|
|
159
|
+
() => s.value?.state,
|
|
160
|
+
(d) => {
|
|
161
|
+
!d || T === d.status || (T = d.status, d.status === "error" ? (w.value = !0, S = h.value, h.value = !1) : d.status === "success" && (h.value = S, w.value = !1));
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
function A(d, e, p) {
|
|
165
|
+
if (e.length === 0)
|
|
166
|
+
return console.error("Cannot set value with empty path"), !1;
|
|
167
|
+
let c = d;
|
|
168
|
+
for (let x = 0; x < e.length - 1; x++) {
|
|
169
|
+
if (c == null || typeof c != "object")
|
|
170
|
+
return console.error("Invalid path:", e, "at index", x, "Current value:", c), !1;
|
|
171
|
+
c = c[e[x]];
|
|
172
|
+
}
|
|
173
|
+
return c == null || typeof c != "object" ? (console.error("Invalid final parent in path:", e), !1) : (c[e.at(-1)] = p, !0);
|
|
174
|
+
}
|
|
175
|
+
const N = (d, e) => {
|
|
176
|
+
if (!s.value) return;
|
|
177
|
+
if (!A(s.value.state.data, d, e)) {
|
|
178
|
+
console.error("Failed to update value at path:", d);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
f.emit("queries:set:state", s.value.key, s.value.state);
|
|
182
|
+
};
|
|
183
|
+
return (d, e) => {
|
|
184
|
+
const p = W, c = P, x = _e, y = re, O = ce, B = ee, E = te, H = Z, V = G, F = U;
|
|
185
|
+
return o(), u("div", Ce, [
|
|
186
|
+
s.value ? (o(), u(C, { key: 0 }, [
|
|
187
|
+
a(p, {
|
|
188
|
+
title: "Details",
|
|
189
|
+
icon: n(Q)
|
|
190
|
+
}, {
|
|
191
|
+
default: i(() => [
|
|
192
|
+
t("div", Ie, [
|
|
193
|
+
t("p", Se, [
|
|
194
|
+
e[9] || (e[9] = t("span", null, "key:", -1)),
|
|
195
|
+
t("span", null, [
|
|
196
|
+
t("code", Te, v(s.value.key), 1)
|
|
197
|
+
])
|
|
198
|
+
]),
|
|
199
|
+
t("p", Be, [
|
|
200
|
+
e[10] || (e[10] = t("span", null, "Last update:", -1)),
|
|
201
|
+
t("span", ze, v(n(j)), 1)
|
|
202
|
+
]),
|
|
203
|
+
s.value.devtools.history.at(0)?.fetchTime ? (o(), u("p", De, [
|
|
204
|
+
e[11] || (e[11] = t("span", null, "Last fetch:", -1)),
|
|
205
|
+
t("span", Le, v(n(I)(new Date(s.value.devtools.history.at(0).fetchTime.start), {
|
|
206
|
+
...q,
|
|
207
|
+
max: void 0
|
|
208
|
+
})), 1)
|
|
209
|
+
])) : b("", !0),
|
|
210
|
+
s.value.devtools.history.at(0)?.fetchTime?.end ? (o(), u("p", Me, [
|
|
211
|
+
e[12] || (e[12] = t("span", null, "Fetch duration:", -1)),
|
|
212
|
+
t("span", Re, v(n(fe)(
|
|
213
|
+
s.value.devtools.history.at(0).fetchTime.end - s.value.devtools.history.at(0).fetchTime.start
|
|
214
|
+
)), 1)
|
|
215
|
+
])) : b("", !0),
|
|
216
|
+
t("p", je, [
|
|
217
|
+
t("span", null, [
|
|
218
|
+
e[13] || (e[13] = _("Observers: ", -1)),
|
|
219
|
+
t("span", Ae, v(s.value.deps.length), 1)
|
|
220
|
+
])
|
|
221
|
+
]),
|
|
222
|
+
!s.value.active && s.value.options ? (o(), u("p", Ne, [
|
|
223
|
+
typeof s.value.options.gcTime == "number" && Number.isFinite(s.value.options.gcTime) ? (o(), u(C, { key: 0 }, [
|
|
224
|
+
e[14] || (e[14] = t("span", null, [
|
|
225
|
+
_("Will be "),
|
|
226
|
+
t("i", null, "gced")
|
|
227
|
+
], -1)),
|
|
228
|
+
t("span", Oe, v(n(I)(
|
|
229
|
+
new Date(s.value.devtools.inactiveAt + s.value.options.gcTime),
|
|
230
|
+
{
|
|
231
|
+
...q,
|
|
232
|
+
max: void 0
|
|
233
|
+
}
|
|
234
|
+
)), 1)
|
|
235
|
+
], 64)) : b("", !0)
|
|
236
|
+
])) : b("", !0)
|
|
237
|
+
])
|
|
238
|
+
]),
|
|
239
|
+
_: 1
|
|
240
|
+
}, 8, ["icon"]),
|
|
241
|
+
Object.keys(s.value.plugins).length ? (o(), g(p, {
|
|
242
|
+
key: 0,
|
|
243
|
+
title: "Plugins",
|
|
244
|
+
icon: n(qe),
|
|
245
|
+
open: !0
|
|
246
|
+
}, {
|
|
247
|
+
default: i(() => [
|
|
248
|
+
t("div", Ee, [
|
|
249
|
+
(o(!0), u(C, null, L(s.value.plugins, (r, z) => (o(), g(p, {
|
|
250
|
+
key: z,
|
|
251
|
+
title: String(z),
|
|
252
|
+
open: !0,
|
|
253
|
+
"no-padding": "",
|
|
254
|
+
class: "rounded border border-(--ui-border) overflow-hidden"
|
|
255
|
+
}, {
|
|
256
|
+
default: i(() => [
|
|
257
|
+
a(c, {
|
|
258
|
+
data: r,
|
|
259
|
+
readonly: ""
|
|
260
|
+
}, null, 8, ["data"])
|
|
261
|
+
]),
|
|
262
|
+
_: 2
|
|
263
|
+
}, 1032, ["title"]))), 128))
|
|
264
|
+
])
|
|
265
|
+
]),
|
|
266
|
+
_: 1
|
|
267
|
+
}, 8, ["icon"])) : b("", !0),
|
|
268
|
+
a(p, {
|
|
269
|
+
title: "Actions",
|
|
270
|
+
icon: n(J)
|
|
271
|
+
}, {
|
|
272
|
+
default: i(() => [
|
|
273
|
+
t("div", He, [
|
|
274
|
+
a(y, {
|
|
275
|
+
class: "theme-info",
|
|
276
|
+
size: "sm",
|
|
277
|
+
title: "Refetch this query",
|
|
278
|
+
disabled: s.value.options?.enabled === !1,
|
|
279
|
+
onClick: e[0] || (e[0] = (r) => n(f).emit("queries:refetch", s.value.key))
|
|
280
|
+
}, {
|
|
281
|
+
default: i(() => [
|
|
282
|
+
a(x, { class: "size-3.5" }),
|
|
283
|
+
e[15] || (e[15] = _(" Refetch ", -1))
|
|
284
|
+
]),
|
|
285
|
+
_: 1
|
|
286
|
+
}, 8, ["disabled"]),
|
|
287
|
+
a(y, {
|
|
288
|
+
class: "theme-neutral",
|
|
289
|
+
size: "sm",
|
|
290
|
+
title: "Invalidate this query",
|
|
291
|
+
onClick: e[1] || (e[1] = (r) => n(f).emit("queries:invalidate", s.value.key))
|
|
292
|
+
}, {
|
|
293
|
+
default: i(() => [
|
|
294
|
+
a(O),
|
|
295
|
+
e[16] || (e[16] = _(" Invalidate ", -1))
|
|
296
|
+
]),
|
|
297
|
+
_: 1
|
|
298
|
+
}),
|
|
299
|
+
s.value.devtools.simulate !== "loading" ? (o(), g(y, {
|
|
300
|
+
key: 0,
|
|
301
|
+
class: "theme-purple",
|
|
302
|
+
size: "sm",
|
|
303
|
+
title: "Restore the previous state",
|
|
304
|
+
onClick: e[2] || (e[2] = (r) => n(f).emit("queries:simulate:loading", s.value.key))
|
|
305
|
+
}, {
|
|
306
|
+
default: i(() => [
|
|
307
|
+
a(B),
|
|
308
|
+
e[17] || (e[17] = _(" Simulate loading ", -1))
|
|
309
|
+
]),
|
|
310
|
+
_: 1
|
|
311
|
+
})) : (o(), g(y, {
|
|
312
|
+
key: 1,
|
|
313
|
+
class: "theme-purple",
|
|
314
|
+
size: "sm",
|
|
315
|
+
title: "Simulate a loading state",
|
|
316
|
+
onClick: e[3] || (e[3] = (r) => n(f).emit("queries:simulate:loading:stop", s.value.key))
|
|
317
|
+
}, {
|
|
318
|
+
default: i(() => [
|
|
319
|
+
a(B, { class: "animate-spin" }),
|
|
320
|
+
e[18] || (e[18] = _(" Stop loading ", -1))
|
|
321
|
+
]),
|
|
322
|
+
_: 1
|
|
323
|
+
})),
|
|
324
|
+
s.value.devtools.simulate !== "error" ? (o(), g(y, {
|
|
325
|
+
key: 2,
|
|
326
|
+
class: "theme-error",
|
|
327
|
+
size: "sm",
|
|
328
|
+
title: "Simulate an Error state",
|
|
329
|
+
onClick: e[4] || (e[4] = (r) => n(f).emit("queries:simulate:error", s.value.key))
|
|
330
|
+
}, {
|
|
331
|
+
default: i(() => [
|
|
332
|
+
a(E),
|
|
333
|
+
e[19] || (e[19] = _(" Simulate error ", -1))
|
|
334
|
+
]),
|
|
335
|
+
_: 1
|
|
336
|
+
})) : (o(), g(y, {
|
|
337
|
+
key: 3,
|
|
338
|
+
class: "theme-error",
|
|
339
|
+
size: "sm",
|
|
340
|
+
title: "Restore the previous state",
|
|
341
|
+
onClick: e[5] || (e[5] = (r) => n(f).emit("queries:simulate:error:stop", s.value.key))
|
|
342
|
+
}, {
|
|
343
|
+
default: i(() => [
|
|
344
|
+
a(H),
|
|
345
|
+
e[20] || (e[20] = _(" Remove error ", -1))
|
|
346
|
+
]),
|
|
347
|
+
_: 1
|
|
348
|
+
})),
|
|
349
|
+
a(y, {
|
|
350
|
+
class: "theme-warning",
|
|
351
|
+
size: "sm",
|
|
352
|
+
title: "Reset this query to its initial (pending) state",
|
|
353
|
+
onClick: e[6] || (e[6] = (r) => n(f).emit("queries:reset", s.value.key))
|
|
354
|
+
}, {
|
|
355
|
+
default: i(() => [
|
|
356
|
+
a(V),
|
|
357
|
+
e[21] || (e[21] = _(" Reset ", -1))
|
|
358
|
+
]),
|
|
359
|
+
_: 1
|
|
360
|
+
})
|
|
361
|
+
])
|
|
362
|
+
]),
|
|
363
|
+
_: 1
|
|
364
|
+
}, 8, ["icon"]),
|
|
365
|
+
a(p, {
|
|
366
|
+
open: n(h),
|
|
367
|
+
"onUpdate:open": e[7] || (e[7] = (r) => R(h) ? h.value = r : null),
|
|
368
|
+
title: `Data${s.value.state.data === void 0 ? " (empty)" : ""}`,
|
|
369
|
+
icon: n(X),
|
|
370
|
+
class: M([s.value.state.data === void 0 && "text-(--ui-text-muted)"]),
|
|
371
|
+
"no-padding": ""
|
|
372
|
+
}, {
|
|
373
|
+
default: i(() => [
|
|
374
|
+
a(c, {
|
|
375
|
+
data: s.value.state.data,
|
|
376
|
+
"onUpdate:value": N
|
|
377
|
+
}, null, 8, ["data"])
|
|
378
|
+
]),
|
|
379
|
+
_: 1
|
|
380
|
+
}, 8, ["open", "title", "icon", "class"]),
|
|
381
|
+
a(p, {
|
|
382
|
+
open: n(w),
|
|
383
|
+
"onUpdate:open": e[8] || (e[8] = (r) => R(w) ? w.value = r : null),
|
|
384
|
+
title: `Error${s.value.state.status === "error" ? " (!)" : "(empty)"}`,
|
|
385
|
+
icon: n(K),
|
|
386
|
+
class: M([s.value.state.status !== "error" && "text-(--ui-text-muted)"]),
|
|
387
|
+
disabled: ""
|
|
388
|
+
}, {
|
|
389
|
+
default: i(() => [
|
|
390
|
+
t("div", Ve, [
|
|
391
|
+
s.value.state.error ? (o(), u("pre", Fe, v(s.value.state.error), 1)) : (o(), u("p", Ue, "No error"))
|
|
392
|
+
])
|
|
393
|
+
]),
|
|
394
|
+
_: 1
|
|
395
|
+
}, 8, ["open", "title", "icon", "class"]),
|
|
396
|
+
a(p, {
|
|
397
|
+
title: "Call count",
|
|
398
|
+
icon: n(we),
|
|
399
|
+
open: !1
|
|
400
|
+
}, {
|
|
401
|
+
default: i(() => [
|
|
402
|
+
t("div", Qe, [
|
|
403
|
+
t("p", We, [
|
|
404
|
+
e[22] || (e[22] = t("span", null, "Calls:", -1)),
|
|
405
|
+
t("span", null, [
|
|
406
|
+
t("code", Pe, v(s.value.devtools.count.total), 1)
|
|
407
|
+
]),
|
|
408
|
+
e[23] || (e[23] = t("span", null, "Success:", -1)),
|
|
409
|
+
t("span", null, [
|
|
410
|
+
t("code", Ze, v(s.value.devtools.count.succeed), 1)
|
|
411
|
+
]),
|
|
412
|
+
e[24] || (e[24] = t("span", null, "Errors:", -1)),
|
|
413
|
+
t("span", null, [
|
|
414
|
+
t("code", Ge, v(s.value.devtools.count.errored), 1)
|
|
415
|
+
]),
|
|
416
|
+
e[25] || (e[25] = t("span", null, "Cancelled:", -1)),
|
|
417
|
+
t("span", null, [
|
|
418
|
+
t("code", Je, v(s.value.devtools.count.cancelled), 1)
|
|
419
|
+
])
|
|
420
|
+
])
|
|
421
|
+
])
|
|
422
|
+
]),
|
|
423
|
+
_: 1
|
|
424
|
+
}, 8, ["icon"]),
|
|
425
|
+
a(p, {
|
|
426
|
+
title: `History (${s.value.devtools.history.length})`,
|
|
427
|
+
icon: n(ye),
|
|
428
|
+
open: !1
|
|
429
|
+
}, {
|
|
430
|
+
default: i(() => [
|
|
431
|
+
t("div", Xe, [
|
|
432
|
+
(o(!0), u(C, null, L(s.value.devtools.history, (r) => (o(), g(p, {
|
|
433
|
+
key: r.updatedAt,
|
|
434
|
+
title: `Entry nº${r.id} (${n(I)(new Date(r.updatedAt), q)})`,
|
|
435
|
+
open: !1,
|
|
436
|
+
class: "border border-neutral-200 dark:border-neutral-800"
|
|
437
|
+
}, {
|
|
438
|
+
default: i(() => [
|
|
439
|
+
a(c, {
|
|
440
|
+
data: r,
|
|
441
|
+
readonly: ""
|
|
442
|
+
}, null, 8, ["data"])
|
|
443
|
+
]),
|
|
444
|
+
_: 2
|
|
445
|
+
}, 1032, ["title"]))), 128))
|
|
446
|
+
])
|
|
447
|
+
]),
|
|
448
|
+
_: 1
|
|
449
|
+
}, 8, ["title", "icon"]),
|
|
450
|
+
a(p, {
|
|
451
|
+
title: "Options",
|
|
452
|
+
open: !s.value.options,
|
|
453
|
+
icon: n(Y),
|
|
454
|
+
"no-padding": ""
|
|
455
|
+
}, {
|
|
456
|
+
default: i(() => [
|
|
457
|
+
s.value.options ? (o(), g(c, {
|
|
458
|
+
key: 0,
|
|
459
|
+
data: s.value.options,
|
|
460
|
+
readonly: ""
|
|
461
|
+
}, null, 8, ["data"])) : (o(), u("p", Ke, [...e[26] || (e[26] = [
|
|
462
|
+
_(" This Query entry has no options. It might have been created from the server or manually set with ", -1),
|
|
463
|
+
t("code", null, "queryCache.setQueryData()", -1),
|
|
464
|
+
_(" for prefetching. ", -1)
|
|
465
|
+
])]))
|
|
466
|
+
]),
|
|
467
|
+
_: 1
|
|
468
|
+
}, 8, ["open", "icon"])
|
|
469
|
+
], 64)) : (o(), u("div", Ye, [
|
|
470
|
+
t("p", et, [
|
|
471
|
+
e[27] || (e[27] = _(" Select a Query to inspect ", -1)),
|
|
472
|
+
a(F)
|
|
473
|
+
]),
|
|
474
|
+
t("p", tt, " No query with key " + v(n(l).params.queryId) + " was found in the cache ", 1)
|
|
475
|
+
]))
|
|
476
|
+
]);
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
export {
|
|
481
|
+
at as default
|
|
482
|
+
};
|
|
483
|
+
//# sourceMappingURL=_queryId_-DJ8QloFh.js.map
|