@scayle/storefront-devtools 0.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +222 -0
- package/dist/_chunks/clipboard-DrVHc2QA.mjs +61 -0
- package/dist/_chunks/diff-DzJ5arJj.mjs +169 -0
- package/dist/_chunks/panel-uV5ITqhY.mjs +51 -0
- package/dist/_chunks/redact-DmIF-iyk.mjs +96 -0
- package/dist/_chunks/useStore-Db8RZW8T.mjs +10 -0
- package/dist/group.d.ts +42 -0
- package/dist/group.d.ts.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +178 -0
- package/dist/inertia/client/index.d.mts +13 -0
- package/dist/inertia/client/index.d.ts +7 -0
- package/dist/inertia/client/index.d.ts.map +1 -0
- package/dist/inertia/client/index.mjs +694 -0
- package/dist/inertia/core/capture.d.ts +15 -0
- package/dist/inertia/core/capture.d.ts.map +1 -0
- package/dist/inertia/core/correlator.d.ts +91 -0
- package/dist/inertia/core/correlator.d.ts.map +1 -0
- package/dist/inertia/core/diagnostics.d.ts +10 -0
- package/dist/inertia/core/diagnostics.d.ts.map +1 -0
- package/dist/inertia/core/diff.d.ts +33 -0
- package/dist/inertia/core/diff.d.ts.map +1 -0
- package/dist/inertia/core/events-tab.d.ts +20 -0
- package/dist/inertia/core/events-tab.d.ts.map +1 -0
- package/dist/inertia/core/feature-info.d.ts +14 -0
- package/dist/inertia/core/feature-info.d.ts.map +1 -0
- package/dist/inertia/core/features.d.ts +27 -0
- package/dist/inertia/core/features.d.ts.map +1 -0
- package/dist/inertia/core/history-capture.d.ts +15 -0
- package/dist/inertia/core/history-capture.d.ts.map +1 -0
- package/dist/inertia/core/interceptors.d.ts +69 -0
- package/dist/inertia/core/interceptors.d.ts.map +1 -0
- package/dist/inertia/core/markdown.d.ts +10 -0
- package/dist/inertia/core/markdown.d.ts.map +1 -0
- package/dist/inertia/core/network.d.ts +34 -0
- package/dist/inertia/core/network.d.ts.map +1 -0
- package/dist/inertia/core/protocol.d.ts +38 -0
- package/dist/inertia/core/protocol.d.ts.map +1 -0
- package/dist/inertia/core/request-tree.d.ts +18 -0
- package/dist/inertia/core/request-tree.d.ts.map +1 -0
- package/dist/inertia/core/response.d.ts +39 -0
- package/dist/inertia/core/response.d.ts.map +1 -0
- package/dist/inertia/core/session.d.ts +18 -0
- package/dist/inertia/core/session.d.ts.map +1 -0
- package/dist/inertia/core/store.d.ts +40 -0
- package/dist/inertia/core/store.d.ts.map +1 -0
- package/dist/inertia/core/types.d.ts +112 -0
- package/dist/inertia/core/types.d.ts.map +1 -0
- package/dist/inertia/core/url.d.ts +11 -0
- package/dist/inertia/core/url.d.ts.map +1 -0
- package/dist/inertia/plugin.d.ts +11 -0
- package/dist/inertia/plugin.d.ts.map +1 -0
- package/dist/inertia/renderer/index.d.mts +16 -0
- package/dist/inertia/renderer/index.mjs +771 -0
- package/dist/inject.d.ts +12 -0
- package/dist/inject.d.ts.map +1 -0
- package/dist/orpc/client/index.d.mts +13 -0
- package/dist/orpc/client/index.d.ts +7 -0
- package/dist/orpc/client/index.d.ts.map +1 -0
- package/dist/orpc/client/index.mjs +502 -0
- package/dist/orpc/core/capture.d.ts +32 -0
- package/dist/orpc/core/capture.d.ts.map +1 -0
- package/dist/orpc/core/classify.d.ts +14 -0
- package/dist/orpc/core/classify.d.ts.map +1 -0
- package/dist/orpc/core/curl.d.ts +11 -0
- package/dist/orpc/core/curl.d.ts.map +1 -0
- package/dist/orpc/core/markdown.d.ts +12 -0
- package/dist/orpc/core/markdown.d.ts.map +1 -0
- package/dist/orpc/core/orpc-error.d.ts +18 -0
- package/dist/orpc/core/orpc-error.d.ts.map +1 -0
- package/dist/orpc/core/serialize.d.ts +12 -0
- package/dist/orpc/core/serialize.d.ts.map +1 -0
- package/dist/orpc/core/session.d.ts +15 -0
- package/dist/orpc/core/session.d.ts.map +1 -0
- package/dist/orpc/core/store.d.ts +50 -0
- package/dist/orpc/core/store.d.ts.map +1 -0
- package/dist/orpc/core/types.d.ts +67 -0
- package/dist/orpc/core/types.d.ts.map +1 -0
- package/dist/orpc/core/url.d.ts +12 -0
- package/dist/orpc/core/url.d.ts.map +1 -0
- package/dist/orpc/plugin.d.ts +10 -0
- package/dist/orpc/plugin.d.ts.map +1 -0
- package/dist/orpc/renderer/index.d.mts +16 -0
- package/dist/orpc/renderer/index.mjs +457 -0
- package/dist/resource-center/client/index.mjs +21 -0
- package/dist/resource-center/client.d.ts +3 -0
- package/dist/resource-center/client.d.ts.map +1 -0
- package/dist/resource-center/plugin.d.ts +12 -0
- package/dist/resource-center/plugin.d.ts.map +1 -0
- package/dist/shared/clipboard.d.ts +9 -0
- package/dist/shared/clipboard.d.ts.map +1 -0
- package/dist/shared/redact.d.ts +27 -0
- package/dist/shared/redact.d.ts.map +1 -0
- package/dist/shared/safe-clone.d.ts +46 -0
- package/dist/shared/safe-clone.d.ts.map +1 -0
- package/dist/shared/session-storage.d.ts +18 -0
- package/dist/shared/session-storage.d.ts.map +1 -0
- package/dist/shared/use-window-store.d.ts +18 -0
- package/dist/shared/use-window-store.d.ts.map +1 -0
- package/dist/storefront/plugin.d.ts +9 -0
- package/dist/storefront/plugin.d.ts.map +1 -0
- package/dist/storefront/renderer/index.d.mts +16 -0
- package/dist/storefront/renderer/index.mjs +124 -0
- package/dist/vue-devtools/client/index.mjs +4912 -0
- package/dist/vue-devtools/client.d.ts +2 -0
- package/dist/vue-devtools/client.d.ts.map +1 -0
- package/dist/vue-devtools/plugin.d.ts +14 -0
- package/dist/vue-devtools/plugin.d.ts.map +1 -0
- package/dist/vue-devtools/ui/assets/css-8QJvnqUH.js +1 -0
- package/dist/vue-devtools/ui/assets/css-CaJ9TzKE.js +1 -0
- package/dist/vue-devtools/ui/assets/diff-woXpYk--.js +1 -0
- package/dist/vue-devtools/ui/assets/html-BHDw6EPc.js +1 -0
- package/dist/vue-devtools/ui/assets/html-GueGcY0x.js +1 -0
- package/dist/vue-devtools/ui/assets/index-Dby9TIQH.js +156 -0
- package/dist/vue-devtools/ui/assets/index-sSkqWPzY.css +1 -0
- package/dist/vue-devtools/ui/assets/javascript-BzbQS41l.js +1 -0
- package/dist/vue-devtools/ui/assets/javascript-Yelw-5ZN.js +1 -0
- package/dist/vue-devtools/ui/assets/json-B88Oqtu5.js +1 -0
- package/dist/vue-devtools/ui/assets/json-CaljABEy.js +1 -0
- package/dist/vue-devtools/ui/assets/shellscript-CLZ0U2zV.js +1 -0
- package/dist/vue-devtools/ui/assets/typescript-Utq2Cl8c.js +1 -0
- package/dist/vue-devtools/ui/assets/typescript-j_1H8WHN.js +1 -0
- package/dist/vue-devtools/ui/assets/vitesse-dark-BZCL-v6S.js +1 -0
- package/dist/vue-devtools/ui/assets/vitesse-light-VbXTXTou.js +1 -0
- package/dist/vue-devtools/ui/assets/vue-B1Tf5CHw.js +1 -0
- package/dist/vue-devtools/ui/assets/vue-html-CGMs_6qn.js +1 -0
- package/dist/vue-devtools/ui/assets/yaml-rwi0_p6S.js +1 -0
- package/dist/vue-devtools/ui/index.html +13 -0
- package/package.json +101 -0
|
@@ -0,0 +1,771 @@
|
|
|
1
|
+
import { i as e, n as t } from "../../_chunks/diff-DzJ5arJj.mjs";
|
|
2
|
+
import { r as n, t as r } from "../../_chunks/panel-uV5ITqhY.mjs";
|
|
3
|
+
import { n as i, t as a } from "../../_chunks/useStore-Db8RZW8T.mjs";
|
|
4
|
+
import { n as o, r as s, t as c } from "../../_chunks/clipboard-DrVHc2QA.mjs";
|
|
5
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, openBlock as y, ref as b, renderList as x, resolveComponent as S, toDisplayString as C, unref as w, useTemplateRef as T, vModelText as E, watch as D, withDirectives as ee, withKeys as O, withModifiers as k } from "vue";
|
|
6
|
+
//#region src/inertia/panel/prefs.ts
|
|
7
|
+
function A(e, t, n) {
|
|
8
|
+
if (typeof sessionStorage > "u") return t;
|
|
9
|
+
let r = sessionStorage.getItem(e);
|
|
10
|
+
return r && n.includes(r) ? r : t;
|
|
11
|
+
}
|
|
12
|
+
function j(e, t) {
|
|
13
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(e, t);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/inertia/core/request-tree.ts
|
|
17
|
+
function te(e) {
|
|
18
|
+
let t = new Set(e.map((e) => e.visitId));
|
|
19
|
+
return ne(e, M(e, t), t);
|
|
20
|
+
}
|
|
21
|
+
function M(e, t) {
|
|
22
|
+
let n = /* @__PURE__ */ new Map();
|
|
23
|
+
for (let r of e) {
|
|
24
|
+
let e = r.parentVisitId;
|
|
25
|
+
if (e != null && t.has(e)) {
|
|
26
|
+
let t = n.get(e);
|
|
27
|
+
t ? t.push(r) : n.set(e, [r]);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return n;
|
|
31
|
+
}
|
|
32
|
+
function ne(e, t, n) {
|
|
33
|
+
let r = [];
|
|
34
|
+
for (let i of e) {
|
|
35
|
+
let e = i.parentVisitId;
|
|
36
|
+
if (e != null && n.has(e)) continue;
|
|
37
|
+
r.push({
|
|
38
|
+
record: i,
|
|
39
|
+
depth: 0
|
|
40
|
+
});
|
|
41
|
+
let a = t.get(i.visitId);
|
|
42
|
+
if (a) for (let e of a) r.push({
|
|
43
|
+
record: e,
|
|
44
|
+
depth: 1
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return r;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/inertia/panel/RequestList.vue?vue&type=script&setup=true&lang.ts
|
|
51
|
+
var re = ["aria-activedescendant"], ie = {
|
|
52
|
+
class: "sf-dt-filters",
|
|
53
|
+
role: "group",
|
|
54
|
+
"aria-label": "Filter by visit type"
|
|
55
|
+
}, N = ["aria-pressed", "onClick"], P = {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: "sf-dt-prev"
|
|
58
|
+
}, F = ["aria-expanded"], I = {
|
|
59
|
+
key: 0,
|
|
60
|
+
id: "sf-dt-prev-rows",
|
|
61
|
+
class: "sf-dt-prev-rows"
|
|
62
|
+
}, L = { class: "sf-dt-method" }, R = { class: "sf-dt-url" }, z = { class: "sf-dt-type" }, B = {
|
|
63
|
+
key: 0,
|
|
64
|
+
class: "sf-dt-timing"
|
|
65
|
+
}, V = { class: "sf-dt-rows" }, H = [
|
|
66
|
+
"id",
|
|
67
|
+
"aria-selected",
|
|
68
|
+
"onClick"
|
|
69
|
+
], U = {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "sf-dt-nest-marker"
|
|
72
|
+
}, W = { class: "sf-dt-method" }, G = { class: "sf-dt-url" }, K = { class: "sf-dt-type" }, q = { class: "sf-dt-timing" }, J = {
|
|
73
|
+
key: 1,
|
|
74
|
+
class: "sf-dt-diag-count"
|
|
75
|
+
}, Y = {
|
|
76
|
+
key: 1,
|
|
77
|
+
class: "sf-dt-empty"
|
|
78
|
+
}, ae = {
|
|
79
|
+
key: 2,
|
|
80
|
+
class: "sf-dt-evicted"
|
|
81
|
+
}, oe = {
|
|
82
|
+
class: "sf-dt-visually-hidden",
|
|
83
|
+
role: "status",
|
|
84
|
+
"aria-live": "polite"
|
|
85
|
+
}, se = /*#__PURE__*/ r(/* @__PURE__ */ _({
|
|
86
|
+
__name: "RequestList",
|
|
87
|
+
props: {
|
|
88
|
+
requests: {},
|
|
89
|
+
selectedId: {},
|
|
90
|
+
paused: { type: Boolean }
|
|
91
|
+
},
|
|
92
|
+
emits: ["select"],
|
|
93
|
+
setup(e, { expose: t, emit: n }) {
|
|
94
|
+
let r = e, i = n, o = [
|
|
95
|
+
"all",
|
|
96
|
+
"full",
|
|
97
|
+
"partial",
|
|
98
|
+
"deferred",
|
|
99
|
+
"prefetch",
|
|
100
|
+
"redirect",
|
|
101
|
+
"client"
|
|
102
|
+
], s = b(A("inertia-devtools-filter", "all", o));
|
|
103
|
+
D(s, (e) => j("inertia-devtools-filter", e));
|
|
104
|
+
let c = b(""), d = b(!1), g = u(() => a()?.previousSessionRequests ?? []), _ = u(() => r.requests.filter((e) => {
|
|
105
|
+
let t = s.value === "all" || e.type === s.value, n = c.value.trim().toLowerCase(), r = !n || e.url.toLowerCase().includes(n);
|
|
106
|
+
return t && r;
|
|
107
|
+
})), S = u(() => s.value !== "all" || c.value.trim() !== "" ? _.value.map((e) => ({
|
|
108
|
+
record: e,
|
|
109
|
+
depth: 0
|
|
110
|
+
})) : te(_.value)), w = u(() => a()?.evictedCount ?? 0);
|
|
111
|
+
function O(e) {
|
|
112
|
+
let t = _.value;
|
|
113
|
+
if (!t.length) return;
|
|
114
|
+
let n = t.findIndex((e) => e.visitId === r.selectedId);
|
|
115
|
+
e.key === "ArrowDown" ? (e.preventDefault(), i("select", t[Math.min(n + 1, t.length - 1)].visitId)) : e.key === "ArrowUp" && (e.preventDefault(), i("select", t[Math.max(n - 1, 0)].visitId));
|
|
116
|
+
}
|
|
117
|
+
function k(e) {
|
|
118
|
+
return e.duration == null ? e.finishedAt ? "" : "…" : `${Math.round(e.duration)}ms`;
|
|
119
|
+
}
|
|
120
|
+
let M = T("listEl");
|
|
121
|
+
return t({ focus: () => M.value?.focus() }), (t, n) => (y(), p("div", {
|
|
122
|
+
ref_key: "listEl",
|
|
123
|
+
ref: M,
|
|
124
|
+
class: "sf-dt-list",
|
|
125
|
+
tabindex: "0",
|
|
126
|
+
role: "listbox",
|
|
127
|
+
"aria-label": "Requests",
|
|
128
|
+
"aria-activedescendant": e.selectedId == null ? void 0 : `sf-dt-request-${e.selectedId}`,
|
|
129
|
+
onKeydown: O
|
|
130
|
+
}, [
|
|
131
|
+
m("div", ie, [(y(), p(l, null, x(o, (e) => m("button", {
|
|
132
|
+
key: e,
|
|
133
|
+
class: v(["sf-dt-filter", { "is-active": s.value === e }]),
|
|
134
|
+
"aria-pressed": s.value === e,
|
|
135
|
+
onClick: (t) => s.value = e
|
|
136
|
+
}, C(e), 11, N)), 64))]),
|
|
137
|
+
ee(m("input", {
|
|
138
|
+
"onUpdate:modelValue": n[0] ||= (e) => c.value = e,
|
|
139
|
+
class: "sf-dt-search",
|
|
140
|
+
type: "search",
|
|
141
|
+
placeholder: "Filter by URL",
|
|
142
|
+
"aria-label": "Filter requests by URL"
|
|
143
|
+
}, null, 512), [[E, c.value]]),
|
|
144
|
+
g.value.length ? (y(), p("div", P, [m("button", {
|
|
145
|
+
class: "sf-dt-prev-toggle",
|
|
146
|
+
"aria-expanded": d.value,
|
|
147
|
+
"aria-controls": "sf-dt-prev-rows",
|
|
148
|
+
onClick: n[1] ||= (e) => d.value = !d.value
|
|
149
|
+
}, C(d.value ? "▾" : "▸") + " Previous session (" + C(g.value.length) + ") ", 9, F), d.value ? (y(), p("ul", I, [(y(!0), p(l, null, x(g.value, (e) => (y(), p("li", {
|
|
150
|
+
key: e.visitId,
|
|
151
|
+
class: "sf-dt-prev-row"
|
|
152
|
+
}, [
|
|
153
|
+
m("span", L, C(e.method), 1),
|
|
154
|
+
m("span", R, C(e.url), 1),
|
|
155
|
+
m("span", z, C(e.type), 1),
|
|
156
|
+
e.status ? (y(), p("span", B, C(e.status), 1)) : f("", !0)
|
|
157
|
+
]))), 128))])) : f("", !0)])) : f("", !0),
|
|
158
|
+
m("ul", V, [(y(!0), p(l, null, x(S.value, (t) => (y(), p("li", {
|
|
159
|
+
id: `sf-dt-request-${t.record.visitId}`,
|
|
160
|
+
key: t.record.visitId,
|
|
161
|
+
class: v(["sf-dt-row", {
|
|
162
|
+
"is-selected": t.record.visitId === e.selectedId,
|
|
163
|
+
"is-child": t.depth > 0
|
|
164
|
+
}]),
|
|
165
|
+
role: "option",
|
|
166
|
+
"aria-selected": t.record.visitId === e.selectedId,
|
|
167
|
+
onClick: (e) => i("select", t.record.visitId)
|
|
168
|
+
}, [
|
|
169
|
+
t.depth > 0 ? (y(), p("span", U, "┗")) : f("", !0),
|
|
170
|
+
m("span", W, C(t.record.method), 1),
|
|
171
|
+
m("span", G, C(t.record.url), 1),
|
|
172
|
+
m("span", K, C(t.record.type), 1),
|
|
173
|
+
m("span", q, C(k(t.record)), 1),
|
|
174
|
+
t.record.diagnostics.length ? (y(), p("span", J, C(t.record.diagnostics.length), 1)) : f("", !0)
|
|
175
|
+
], 10, H))), 128))]),
|
|
176
|
+
_.value.length ? f("", !0) : (y(), p("div", Y, [r.requests.length ? (y(), p(l, { key: 0 }, [h("No requests match this filter")], 64)) : e.paused ? (y(), p(l, { key: 1 }, [h(" Capture is paused. Resume to see new requests. ")], 64)) : (y(), p(l, { key: 2 }, [h("Navigate the app to see requests appear here.")], 64))])),
|
|
177
|
+
w.value ? (y(), p("div", ae, C(w.value) + " earlier request(s) evicted ", 1)) : f("", !0),
|
|
178
|
+
m("div", oe, C(_.value.length) + " request" + C(_.value.length === 1 ? "" : "s") + " captured ", 1)
|
|
179
|
+
], 40, re));
|
|
180
|
+
}
|
|
181
|
+
}), [["__scopeId", "data-v-ebb3b3d0"]]), ce = {
|
|
182
|
+
partial: {
|
|
183
|
+
description: "Only specific props were requested, reducing response size.",
|
|
184
|
+
docsUrl: "https://inertiajs.com/partial-reloads"
|
|
185
|
+
},
|
|
186
|
+
deferred: {
|
|
187
|
+
description: "Heavy props loaded asynchronously after initial page render.",
|
|
188
|
+
docsUrl: "https://inertiajs.com/deferred-props"
|
|
189
|
+
},
|
|
190
|
+
merge: {
|
|
191
|
+
description: "Props merged with existing values instead of replacing.",
|
|
192
|
+
docsUrl: "https://inertiajs.com/merging-props"
|
|
193
|
+
},
|
|
194
|
+
"deep-merge": {
|
|
195
|
+
description: "Props deep-merged with existing values.",
|
|
196
|
+
docsUrl: "https://inertiajs.com/merging-props"
|
|
197
|
+
},
|
|
198
|
+
prepend: {
|
|
199
|
+
description: "New items prepended to an existing array prop.",
|
|
200
|
+
docsUrl: "https://inertiajs.com/merging-props"
|
|
201
|
+
},
|
|
202
|
+
scroll: {
|
|
203
|
+
description: "Infinite-scroll merge metadata present on the page.",
|
|
204
|
+
docsUrl: "https://inertiajs.com/merging-props"
|
|
205
|
+
},
|
|
206
|
+
once: {
|
|
207
|
+
description: "Props resolved once and reused on later visits.",
|
|
208
|
+
docsUrl: "https://inertiajs.com/the-protocol"
|
|
209
|
+
},
|
|
210
|
+
encrypted: {
|
|
211
|
+
description: "History entry encrypted before storage.",
|
|
212
|
+
docsUrl: "https://inertiajs.com/history-encryption"
|
|
213
|
+
},
|
|
214
|
+
"clear-history": {
|
|
215
|
+
description: "Encrypted history state cleared on this visit.",
|
|
216
|
+
docsUrl: "https://inertiajs.com/history-encryption"
|
|
217
|
+
},
|
|
218
|
+
prefetch: {
|
|
219
|
+
description: "Response fetched ahead of navigation.",
|
|
220
|
+
docsUrl: "https://inertiajs.com/prefetching"
|
|
221
|
+
},
|
|
222
|
+
cached: {
|
|
223
|
+
description: "Served from the prefetch cache, no network request.",
|
|
224
|
+
docsUrl: "https://inertiajs.com/prefetching"
|
|
225
|
+
},
|
|
226
|
+
flash: {
|
|
227
|
+
description: "One-off flash data present on the page.",
|
|
228
|
+
docsUrl: "https://inertiajs.com/shared-data"
|
|
229
|
+
},
|
|
230
|
+
remember: {
|
|
231
|
+
description: "Local component state persisted across history.",
|
|
232
|
+
docsUrl: "https://inertiajs.com/remembering-state"
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
function X(e) {
|
|
236
|
+
return ce[e];
|
|
237
|
+
}
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region src/inertia/panel/FeatureBadges.vue?vue&type=script&setup=true&lang.ts
|
|
240
|
+
var le = {
|
|
241
|
+
key: 0,
|
|
242
|
+
class: "sf-dt-badges"
|
|
243
|
+
}, ue = [
|
|
244
|
+
"id",
|
|
245
|
+
"tabindex",
|
|
246
|
+
"aria-describedby"
|
|
247
|
+
], de = ["id"], fe = ["href"], Z = /*#__PURE__*/ r(/* @__PURE__ */ _({
|
|
248
|
+
__name: "FeatureBadges",
|
|
249
|
+
props: { features: {} },
|
|
250
|
+
setup(e) {
|
|
251
|
+
return (t, n) => e.features.length ? (y(), p("div", le, [(y(!0), p(l, null, x(e.features, (e) => (y(), p("div", {
|
|
252
|
+
key: e.type,
|
|
253
|
+
class: "sf-dt-badge-wrap"
|
|
254
|
+
}, [m("span", {
|
|
255
|
+
id: `sf-dt-badge-${e.type}`,
|
|
256
|
+
class: v(["sf-dt-badge", { "is-expandable": w(X)(e.type) }]),
|
|
257
|
+
tabindex: w(X)(e.type) ? 0 : void 0,
|
|
258
|
+
"aria-describedby": w(X)(e.type) ? `sf-dt-badge-info-${e.type}` : void 0
|
|
259
|
+
}, C(e.label), 11, ue), w(X)(e.type) ? (y(), p("div", {
|
|
260
|
+
key: 0,
|
|
261
|
+
id: `sf-dt-badge-info-${e.type}`,
|
|
262
|
+
class: "sf-dt-badge-info",
|
|
263
|
+
role: "tooltip"
|
|
264
|
+
}, [m("p", null, C(w(X)(e.type)?.description), 1), m("a", {
|
|
265
|
+
class: "sf-dt-doclink",
|
|
266
|
+
href: w(X)(e.type)?.docsUrl,
|
|
267
|
+
target: "_blank",
|
|
268
|
+
rel: "noreferrer"
|
|
269
|
+
}, "Documentation", 8, fe)], 8, de)) : f("", !0)]))), 128))])) : f("", !0);
|
|
270
|
+
}
|
|
271
|
+
}), [["__scopeId", "data-v-aa8d2e22"]]);
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/inertia/core/response.ts
|
|
274
|
+
function pe(e, t, n) {
|
|
275
|
+
return n.deepMergeProps?.includes(e) ? "deep-merged" : n.prependProps?.includes(e) ? "prepended" : n.mergeProps?.includes(e) ? "merged" : t.type === "deferred" ? "deferred" : t.type === "partial" && t.only?.includes(e) ? "partial" : "full";
|
|
276
|
+
}
|
|
277
|
+
function me(e) {
|
|
278
|
+
if (!e.responseProps) return null;
|
|
279
|
+
let t = e.page ?? {}, n = Object.entries(e.responseProps).map(([n, r]) => ({
|
|
280
|
+
key: n,
|
|
281
|
+
value: r,
|
|
282
|
+
kind: pe(n, e, t)
|
|
283
|
+
})), r = (e.only ?? []).filter((t) => !(t in e.responseProps)).map((e) => ({ key: e })), i = new Set(Object.keys(e.responseProps));
|
|
284
|
+
return {
|
|
285
|
+
entries: n,
|
|
286
|
+
missingOnly: r,
|
|
287
|
+
carriedOverCount: (e.previousPage ? Object.keys(e.previousPage.props) : []).filter((e) => !i.has(e)).length
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/inertia/panel/PropsDiff.vue?vue&type=script&setup=true&lang.ts
|
|
292
|
+
var he = { class: "sf-dt-diff" }, ge = [
|
|
293
|
+
"role",
|
|
294
|
+
"tabindex",
|
|
295
|
+
"aria-expanded",
|
|
296
|
+
"onClick",
|
|
297
|
+
"onKeydown"
|
|
298
|
+
], _e = { class: "sf-dt-diff-caret" }, ve = { class: "sf-dt-diff-key" }, ye = { class: "sf-dt-diff-old" }, be = { class: "sf-dt-diff-new" }, xe = { class: "sf-dt-diff-new" }, Se = { class: "sf-dt-diff-old" }, Ce = {
|
|
299
|
+
key: 3,
|
|
300
|
+
class: "sf-dt-diff-dim"
|
|
301
|
+
}, we = {
|
|
302
|
+
key: 0,
|
|
303
|
+
class: "sf-dt-diff-sides"
|
|
304
|
+
}, Te = {
|
|
305
|
+
key: 1,
|
|
306
|
+
class: "sf-dt-diff-side"
|
|
307
|
+
}, Ee = /*#__PURE__*/ r(/* @__PURE__ */ _({
|
|
308
|
+
name: "PropsDiff",
|
|
309
|
+
__name: "PropsDiff",
|
|
310
|
+
props: {
|
|
311
|
+
before: {},
|
|
312
|
+
after: {},
|
|
313
|
+
nodesOverride: {}
|
|
314
|
+
},
|
|
315
|
+
setup(e) {
|
|
316
|
+
let n = e, r = u(() => n.nodesOverride ?? t(n.before, n.after));
|
|
317
|
+
function i(e) {
|
|
318
|
+
return typeof e == "object" && !!e;
|
|
319
|
+
}
|
|
320
|
+
function a(e) {
|
|
321
|
+
return !!e.children || i(e.oldValue) || i(e.newValue);
|
|
322
|
+
}
|
|
323
|
+
function o(e) {
|
|
324
|
+
return typeof e == "string" ? `"${e}"` : Array.isArray(e) ? `Array(${e.length})` : typeof e == "object" && e ? `{ ${Object.keys(e).length} }` : String(e);
|
|
325
|
+
}
|
|
326
|
+
function c(e) {
|
|
327
|
+
return e.type === "removed" ? e.oldValue : e.newValue;
|
|
328
|
+
}
|
|
329
|
+
function h(e) {
|
|
330
|
+
return Array.isArray(e) ? e.map((e, t) => [String(t), e]) : typeof e == "object" && e ? Object.entries(e) : [];
|
|
331
|
+
}
|
|
332
|
+
let _ = b(/* @__PURE__ */ new Set());
|
|
333
|
+
function w(e) {
|
|
334
|
+
return a(e) && _.value.has(e.key);
|
|
335
|
+
}
|
|
336
|
+
function T(e) {
|
|
337
|
+
if (!a(e)) return;
|
|
338
|
+
let t = new Set(_.value);
|
|
339
|
+
t.has(e.key) ? t.delete(e.key) : t.add(e.key), _.value = t;
|
|
340
|
+
}
|
|
341
|
+
return (e, t) => {
|
|
342
|
+
let n = S("PropsDiff", !0);
|
|
343
|
+
return y(), p("ul", he, [(y(!0), p(l, null, x(r.value, (e) => (y(), p("li", {
|
|
344
|
+
key: e.key,
|
|
345
|
+
class: v(`is-${e.type}`)
|
|
346
|
+
}, [m("div", {
|
|
347
|
+
class: "sf-dt-diff-row",
|
|
348
|
+
role: a(e) ? "button" : void 0,
|
|
349
|
+
tabindex: a(e) ? 0 : void 0,
|
|
350
|
+
"aria-expanded": a(e) ? w(e) : void 0,
|
|
351
|
+
onClick: (t) => T(e),
|
|
352
|
+
onKeydown: [O((t) => T(e), ["enter"]), O(k((t) => T(e), ["prevent"]), ["space"])]
|
|
353
|
+
}, [
|
|
354
|
+
m("span", _e, C(a(e) ? w(e) ? "▾" : "▸" : ""), 1),
|
|
355
|
+
m("span", ve, C(e.key) + ":", 1),
|
|
356
|
+
e.type === "changed" ? (y(), p(l, { key: 0 }, [
|
|
357
|
+
m("span", ye, C(o(e.oldValue)), 1),
|
|
358
|
+
t[0] ||= m("span", { class: "sf-dt-diff-arrow" }, "→", -1),
|
|
359
|
+
m("span", be, C(o(e.newValue)), 1)
|
|
360
|
+
], 64)) : e.type === "added" ? (y(), p(l, { key: 1 }, [t[1] ||= m("span", { class: "sf-dt-diff-marker is-added" }, "+", -1), m("span", xe, C(o(e.newValue)), 1)], 64)) : e.type === "removed" ? (y(), p(l, { key: 2 }, [t[2] ||= m("span", { class: "sf-dt-diff-marker is-removed" }, "−", -1), m("span", Se, C(o(e.oldValue)), 1)], 64)) : e.type === "unchanged" ? (y(), p("span", Ce, C(o(e.newValue)), 1)) : f("", !0)
|
|
361
|
+
], 40, ge), w(e) ? (y(), p(l, { key: 0 }, [e.type === "changed" && i(e.newValue) ? (y(), p("div", we, [g(s, {
|
|
362
|
+
label: "before",
|
|
363
|
+
value: e.oldValue
|
|
364
|
+
}, null, 8, ["value"]), g(s, {
|
|
365
|
+
label: "after",
|
|
366
|
+
value: e.newValue
|
|
367
|
+
}, null, 8, ["value"])])) : e.type !== "changed" && !e.children && i(c(e)) ? (y(), p("div", Te, [(y(!0), p(l, null, x(h(c(e)), ([e, t]) => (y(), d(s, {
|
|
368
|
+
key: e,
|
|
369
|
+
label: e,
|
|
370
|
+
value: t
|
|
371
|
+
}, null, 8, ["label", "value"]))), 128))])) : f("", !0), e.children ? (y(), d(n, {
|
|
372
|
+
key: 2,
|
|
373
|
+
class: "sf-dt-diff-nested",
|
|
374
|
+
"nodes-override": e.children
|
|
375
|
+
}, null, 8, ["nodes-override"])) : f("", !0)], 64)) : f("", !0)], 2))), 128))]);
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
}), [["__scopeId", "data-v-41093886"]]), De = { class: "sf-dt-response-tab" }, Oe = { class: "sf-dt-response-head" }, ke = ["aria-pressed"], Ae = { class: "sf-dt-response-entries" }, je = { class: "sf-dt-badge" }, Me = {
|
|
379
|
+
key: 0,
|
|
380
|
+
class: "sf-dt-response-note is-warning"
|
|
381
|
+
}, Ne = {
|
|
382
|
+
key: 1,
|
|
383
|
+
class: "sf-dt-response-note"
|
|
384
|
+
}, Pe = {
|
|
385
|
+
key: 2,
|
|
386
|
+
class: "sf-dt-response-note"
|
|
387
|
+
}, Fe = /*#__PURE__*/ r(/* @__PURE__ */ _({
|
|
388
|
+
__name: "ResponseTab",
|
|
389
|
+
props: { record: {} },
|
|
390
|
+
setup(e) {
|
|
391
|
+
let t = e, n = u(() => me(t.record)), r = b(!1), i = {
|
|
392
|
+
full: "FULL",
|
|
393
|
+
partial: "PARTIAL",
|
|
394
|
+
deferred: "DEFERRED",
|
|
395
|
+
merged: "MERGED",
|
|
396
|
+
prepended: "PREPENDED",
|
|
397
|
+
"deep-merged": "DEEP MERGED"
|
|
398
|
+
}, a = u(() => t.record.previousPage?.props), o = u(() => t.record.page?.props);
|
|
399
|
+
return (e, t) => (y(), p("div", De, [m("div", Oe, [t[1] ||= m("h4", { class: "sf-dt-heading" }, "Response", -1), m("button", {
|
|
400
|
+
class: "sf-dt-copy",
|
|
401
|
+
"aria-pressed": r.value,
|
|
402
|
+
onClick: t[0] ||= (e) => r.value = !r.value
|
|
403
|
+
}, C(r.value ? "Show response" : "Show changes since last page"), 9, ke)]), r.value ? (y(), d(Ee, {
|
|
404
|
+
key: 0,
|
|
405
|
+
before: a.value,
|
|
406
|
+
after: o.value
|
|
407
|
+
}, null, 8, ["before", "after"])) : n.value ? (y(), p(l, { key: 1 }, [
|
|
408
|
+
m("ul", Ae, [(y(!0), p(l, null, x(n.value.entries, (e) => (y(), p("li", {
|
|
409
|
+
key: e.key,
|
|
410
|
+
class: "sf-dt-response-entry"
|
|
411
|
+
}, [m("span", je, C(i[e.kind]), 1), g(s, {
|
|
412
|
+
label: e.key,
|
|
413
|
+
value: e.value
|
|
414
|
+
}, null, 8, ["label", "value"])]))), 128))]),
|
|
415
|
+
n.value.missingOnly.length ? (y(), p("p", Me, [t[2] ||= h(" Requested via `only` but not in the response: ", -1), (y(!0), p(l, null, x(n.value.missingOnly, (e) => (y(), p("code", { key: e.key }, C(e.key), 1))), 128))])) : f("", !0),
|
|
416
|
+
n.value.carriedOverCount ? (y(), p("p", Ne, C(n.value.carriedOverCount) + " prop" + C(n.value.carriedOverCount === 1 ? "" : "s") + " carried over from the previous page, not part of this response. ", 1)) : f("", !0)
|
|
417
|
+
], 64)) : (y(), p("p", Pe, " No response body captured for this request. This happens when Inertia's internal interceptor registry isn't available (a production build, or an Inertia version that removed it). "))]));
|
|
418
|
+
}
|
|
419
|
+
}), [["__scopeId", "data-v-0ed3262b"]]), Ie = { class: "sf-dt-headers-tab" }, Le = {
|
|
420
|
+
key: 0,
|
|
421
|
+
class: "sf-dt-section"
|
|
422
|
+
}, Re = {
|
|
423
|
+
key: 1,
|
|
424
|
+
class: "sf-dt-section"
|
|
425
|
+
}, ze = {
|
|
426
|
+
key: 2,
|
|
427
|
+
class: "sf-dt-muted"
|
|
428
|
+
}, Be = /*#__PURE__*/ r(/* @__PURE__ */ _({
|
|
429
|
+
__name: "HeadersTab",
|
|
430
|
+
props: { record: {} },
|
|
431
|
+
setup(e) {
|
|
432
|
+
return (t, n) => (y(), p("div", Ie, [
|
|
433
|
+
e.record.headers && Object.keys(e.record.headers).length ? (y(), p("section", Le, [n[0] ||= m("h4", { class: "sf-dt-heading" }, "Request headers", -1), g(o, { headers: e.record.headers }, null, 8, ["headers"])])) : f("", !0),
|
|
434
|
+
e.record.responseHeaders && Object.keys(e.record.responseHeaders).length ? (y(), p("section", Re, [n[1] ||= m("h4", { class: "sf-dt-heading" }, "Response headers", -1), g(o, { headers: e.record.responseHeaders }, null, 8, ["headers"])])) : f("", !0),
|
|
435
|
+
!Object.keys(e.record.headers ?? {}).length && !Object.keys(e.record.responseHeaders ?? {}).length ? (y(), p("p", ze, " No headers captured for this request. ")) : f("", !0)
|
|
436
|
+
]));
|
|
437
|
+
}
|
|
438
|
+
}), [["__scopeId", "data-v-adcd65ef"]]), Ve = { class: "sf-dt-network-tab" }, He = { class: "sf-dt-section" }, Ue = { class: "sf-dt-kv" }, We = { class: "sf-dt-section" }, Ge = {
|
|
439
|
+
key: 0,
|
|
440
|
+
class: "sf-dt-kv"
|
|
441
|
+
}, Ke = {
|
|
442
|
+
key: 1,
|
|
443
|
+
class: "sf-dt-muted"
|
|
444
|
+
}, qe = /*#__PURE__*/ r(/* @__PURE__ */ _({
|
|
445
|
+
__name: "NetworkTab",
|
|
446
|
+
props: { record: {} },
|
|
447
|
+
setup(e) {
|
|
448
|
+
let t = e, n = u(() => typeof t.record.visitOptions?.errorBag == "string" ? t.record.visitOptions.errorBag : void 0), r = u(() => Array.isArray(t.record.visitOptions?.reset) ? t.record.visitOptions.reset : void 0);
|
|
449
|
+
function i(e) {
|
|
450
|
+
return e && e.length ? e.join(", ") : "—";
|
|
451
|
+
}
|
|
452
|
+
return (t, a) => (y(), p("div", Ve, [
|
|
453
|
+
m("section", He, [a[6] ||= m("h4", { class: "sf-dt-heading" }, "Protocol", -1), m("dl", Ue, [
|
|
454
|
+
a[0] ||= m("dt", null, "Type", -1),
|
|
455
|
+
m("dd", null, C(e.record.type), 1),
|
|
456
|
+
a[1] ||= m("dt", null, "Asset version", -1),
|
|
457
|
+
m("dd", null, C(e.record.page?.version ?? "—"), 1),
|
|
458
|
+
a[2] ||= m("dt", null, "Only", -1),
|
|
459
|
+
m("dd", null, C(i(e.record.only)), 1),
|
|
460
|
+
a[3] ||= m("dt", null, "Except", -1),
|
|
461
|
+
m("dd", null, C(i(e.record.except)), 1),
|
|
462
|
+
a[4] ||= m("dt", null, "Error bag", -1),
|
|
463
|
+
m("dd", null, C(n.value ?? "—"), 1),
|
|
464
|
+
a[5] ||= m("dt", null, "Reset", -1),
|
|
465
|
+
m("dd", null, C(i(r.value)), 1)
|
|
466
|
+
])]),
|
|
467
|
+
m("section", We, [a[11] ||= m("h4", { class: "sf-dt-heading" }, "Timing", -1), e.record.network ? (y(), p("dl", Ge, [
|
|
468
|
+
a[7] ||= m("dt", null, "Duration", -1),
|
|
469
|
+
m("dd", null, C(Math.round(e.record.network.duration)) + "ms", 1),
|
|
470
|
+
a[8] ||= m("dt", null, "Transfer", -1),
|
|
471
|
+
m("dd", null, C(e.record.network.transferSize ?? 0) + " B", 1),
|
|
472
|
+
a[9] ||= m("dt", null, "Started", -1),
|
|
473
|
+
m("dd", null, C(Math.round(e.record.network.startedAt)), 1),
|
|
474
|
+
a[10] ||= m("dt", null, "Finished", -1),
|
|
475
|
+
m("dd", null, C(Math.round(e.record.network.finishedAt)), 1)
|
|
476
|
+
])) : (y(), p("p", Ke, " No network timing (cache hit or client visit) "))]),
|
|
477
|
+
a[12] ||= m("a", {
|
|
478
|
+
class: "sf-dt-doclink",
|
|
479
|
+
href: "https://inertiajs.com/the-protocol",
|
|
480
|
+
target: "_blank",
|
|
481
|
+
rel: "noreferrer"
|
|
482
|
+
}, " Inertia protocol reference ", -1)
|
|
483
|
+
]));
|
|
484
|
+
}
|
|
485
|
+
}), [["__scopeId", "data-v-d3e4f52b"]]), Je = /* @__PURE__ */ new Set([
|
|
486
|
+
"inertia:before",
|
|
487
|
+
"inertia:start",
|
|
488
|
+
"inertia:success",
|
|
489
|
+
"inertia:error",
|
|
490
|
+
"inertia:networkError",
|
|
491
|
+
"inertia:httpException",
|
|
492
|
+
"inertia:navigate",
|
|
493
|
+
"inertia:finish"
|
|
494
|
+
]);
|
|
495
|
+
function Ye(e) {
|
|
496
|
+
if (e === "inertia:success") return "success";
|
|
497
|
+
if (e === "inertia:error" || e === "inertia:networkError" || e === "inertia:httpException") return "error";
|
|
498
|
+
}
|
|
499
|
+
function Xe(e) {
|
|
500
|
+
if (e.length === 0) return [];
|
|
501
|
+
let t = e[0].timestamp, n = [], r;
|
|
502
|
+
for (let i of e) {
|
|
503
|
+
if (!Je.has(i.name)) continue;
|
|
504
|
+
let e = Ye(i.name);
|
|
505
|
+
e && (r = e), n.push({
|
|
506
|
+
name: i.name.replace("inertia:", ""),
|
|
507
|
+
offset: `+${Math.round(i.timestamp - t)}ms`,
|
|
508
|
+
terminal: e
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
let i = n.at(-1);
|
|
512
|
+
return r && i && (i.terminal = r), n;
|
|
513
|
+
}
|
|
514
|
+
//#endregion
|
|
515
|
+
//#region src/inertia/panel/EventsTab.vue?vue&type=script&setup=true&lang.ts
|
|
516
|
+
var Ze = { class: "sf-dt-events-tab" }, Qe = {
|
|
517
|
+
key: 0,
|
|
518
|
+
class: "sf-dt-section"
|
|
519
|
+
}, $e = { class: "sf-dt-timeline" }, et = { class: "sf-dt-timeline-name" }, tt = { class: "sf-dt-timeline-offset" }, nt = { class: "sf-dt-section" }, rt = { class: "sf-dt-raw-events" }, it = /*#__PURE__*/ r(/* @__PURE__ */ _({
|
|
520
|
+
__name: "EventsTab",
|
|
521
|
+
props: { record: {} },
|
|
522
|
+
setup(e) {
|
|
523
|
+
let t = e, n = u(() => Xe(t.record.events));
|
|
524
|
+
return (t, r) => (y(), p("div", Ze, [n.value.length ? (y(), p("section", Qe, [r[0] ||= m("h4", { class: "sf-dt-heading" }, "Lifecycle", -1), m("ol", $e, [(y(!0), p(l, null, x(n.value, (e, t) => (y(), p("li", {
|
|
525
|
+
key: t,
|
|
526
|
+
class: v(["sf-dt-timeline-step", e.terminal ? `is-${e.terminal}` : ""])
|
|
527
|
+
}, [m("span", et, C(e.name), 1), m("span", tt, C(e.offset), 1)], 2))), 128))])])) : f("", !0), m("section", nt, [r[1] ||= m("h4", { class: "sf-dt-heading" }, "Events", -1), m("ul", rt, [(y(!0), p(l, null, x(e.record.events, (e) => (y(), p("li", { key: e.id }, [g(s, {
|
|
528
|
+
label: e.name,
|
|
529
|
+
value: e.detail
|
|
530
|
+
}, null, 8, ["label", "value"])]))), 128))])])]));
|
|
531
|
+
}
|
|
532
|
+
}), [["__scopeId", "data-v-d5ca53d0"]]);
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region src/inertia/core/markdown.ts
|
|
535
|
+
function Q(e, t) {
|
|
536
|
+
return `### ${e}\n\n\`\`\`json\n${JSON.stringify(t, null, 2)}\n\`\`\``;
|
|
537
|
+
}
|
|
538
|
+
function at(e) {
|
|
539
|
+
let t = e.method ?? "GET", n = e.type === "full" && e.duration === 0 && e.completed, r = e.type === "client", i;
|
|
540
|
+
i = n ? "initial page load" : r ? "client-side" : e.duration == null ? e.finishedAt && e.startedAt ? `${Math.round(e.finishedAt - e.startedAt)}ms` : "in-flight" : `${Math.round(e.duration)}ms`;
|
|
541
|
+
let a = `${t} ${e.url}`;
|
|
542
|
+
e.status && (a += ` → ${e.status}`), a += ` (${i})`;
|
|
543
|
+
let o = [
|
|
544
|
+
"## Inertia Request",
|
|
545
|
+
"",
|
|
546
|
+
`**Navigation:** ${a}`
|
|
547
|
+
];
|
|
548
|
+
if (e.page && o.push(`**Component:** ${e.page.component}`), o.push(`**Type:** ${e.type}`), e.only?.length) {
|
|
549
|
+
let t = e.only.map((e) => `\`${e}\``).join(", ");
|
|
550
|
+
o.push(`**Only:** ${t}`);
|
|
551
|
+
}
|
|
552
|
+
if (e.except?.length) {
|
|
553
|
+
let t = e.except.map((e) => `\`${e}\``).join(", ");
|
|
554
|
+
o.push(`**Except:** ${t}`);
|
|
555
|
+
}
|
|
556
|
+
return e.cancelled && o.push("**Cancelled:** Yes"), e.interrupted && o.push("**Interrupted:** Yes"), o.join("\n");
|
|
557
|
+
}
|
|
558
|
+
function ot(e) {
|
|
559
|
+
let t = [at(e)];
|
|
560
|
+
if (e.features.length > 0) {
|
|
561
|
+
let n = e.features.map((e) => {
|
|
562
|
+
let t = X(e.type), n = t ? ` — ${t.description}` : "";
|
|
563
|
+
return `- **${e.type}**${n}`;
|
|
564
|
+
});
|
|
565
|
+
t.push(`### Features\n\n${n.join("\n")}`);
|
|
566
|
+
}
|
|
567
|
+
return e.error && t.push(`### Error\n\n\`\`\`\n${String(e.error)}\n\`\`\``), e.page && t.push(`### Page Object\n\n\`\`\`json\n${JSON.stringify(e.page, null, 2)}\n\`\`\``), e.headers && Object.keys(e.headers).length > 0 && t.push(Q("Request headers", e.headers)), e.responseHeaders && Object.keys(e.responseHeaders).length > 0 && t.push(Q("Response headers", e.responseHeaders)), t.join("\n\n");
|
|
568
|
+
}
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region src/inertia/panel/RequestDetail.vue?vue&type=script&setup=true&lang.ts
|
|
571
|
+
var st = { class: "sf-dt-detail" }, ct = { class: "sf-dt-detail-head" }, lt = {
|
|
572
|
+
key: 0,
|
|
573
|
+
class: "sf-dt-toast",
|
|
574
|
+
role: "status"
|
|
575
|
+
}, ut = { class: "sf-dt-overview" }, dt = {
|
|
576
|
+
key: 0,
|
|
577
|
+
class: "sf-dt-no-network"
|
|
578
|
+
}, ft = {
|
|
579
|
+
key: 1,
|
|
580
|
+
class: "sf-dt-diags"
|
|
581
|
+
}, $ = {
|
|
582
|
+
class: "sf-dt-subtabs",
|
|
583
|
+
role: "tablist",
|
|
584
|
+
"aria-label": "Request detail views"
|
|
585
|
+
}, pt = [
|
|
586
|
+
"id",
|
|
587
|
+
"aria-selected",
|
|
588
|
+
"onClick"
|
|
589
|
+
], mt = ["aria-labelledby"], ht = /*#__PURE__*/ r(/* @__PURE__ */ _({
|
|
590
|
+
__name: "RequestDetail",
|
|
591
|
+
props: { record: {} },
|
|
592
|
+
emits: ["back"],
|
|
593
|
+
setup(e) {
|
|
594
|
+
let t = e, n = [
|
|
595
|
+
"response",
|
|
596
|
+
"headers",
|
|
597
|
+
"network",
|
|
598
|
+
"events"
|
|
599
|
+
], r = b("response");
|
|
600
|
+
D(() => t.record.visitId, () => {
|
|
601
|
+
r.value = "response";
|
|
602
|
+
});
|
|
603
|
+
let i = u(() => r.value === "network" || t.record.network ? null : t.record.type === "client" ? "Client-side visit. No network request sent, so it never appears in the Network tab." : t.record.features.some((e) => e.type === "cached") ? "Served from the prefetch cache. No network request sent, so it never appears in the Network tab." : "No network request captured for this visit (for example the initial page load, embedded in the HTML).");
|
|
604
|
+
function a(e) {
|
|
605
|
+
return e === "error" ? "is-error" : e === "warning" ? "is-warning" : "is-info";
|
|
606
|
+
}
|
|
607
|
+
let o = b(null), s;
|
|
608
|
+
function h() {
|
|
609
|
+
c(ot(t.record)), o.value = "Copied", clearTimeout(s), s = setTimeout(() => {
|
|
610
|
+
o.value = null;
|
|
611
|
+
}, 2e3);
|
|
612
|
+
}
|
|
613
|
+
return (t, s) => (y(), p("div", st, [
|
|
614
|
+
m("div", ct, [
|
|
615
|
+
m("button", {
|
|
616
|
+
class: "sf-dt-copy sf-dt-back",
|
|
617
|
+
onClick: s[0] ||= (e) => t.$emit("back")
|
|
618
|
+
}, " ← Back "),
|
|
619
|
+
m("button", {
|
|
620
|
+
class: "sf-dt-copy",
|
|
621
|
+
onClick: h
|
|
622
|
+
}, "Copy as Markdown"),
|
|
623
|
+
o.value ? (y(), p("span", lt, C(o.value), 1)) : f("", !0)
|
|
624
|
+
]),
|
|
625
|
+
m("section", ut, [m("dl", null, [
|
|
626
|
+
s[5] ||= m("dt", null, "Method", -1),
|
|
627
|
+
m("dd", null, C(e.record.method), 1),
|
|
628
|
+
s[6] ||= m("dt", null, "URL", -1),
|
|
629
|
+
m("dd", null, C(e.record.url), 1),
|
|
630
|
+
s[7] ||= m("dt", null, "Type", -1),
|
|
631
|
+
m("dd", null, C(e.record.type), 1),
|
|
632
|
+
e.record.status ? (y(), p(l, { key: 0 }, [s[1] ||= m("dt", null, "Status", -1), m("dd", null, C(e.record.status), 1)], 64)) : f("", !0),
|
|
633
|
+
e.record.redirectUrl ? (y(), p(l, { key: 1 }, [s[2] ||= m("dt", null, "Redirect", -1), m("dd", null, C(e.record.redirectUrl), 1)], 64)) : f("", !0),
|
|
634
|
+
e.record.page ? (y(), p(l, { key: 2 }, [s[3] ||= m("dt", null, "Component", -1), m("dd", null, C(e.record.page.component), 1)], 64)) : f("", !0),
|
|
635
|
+
e.record.duration == null ? f("", !0) : (y(), p(l, { key: 3 }, [s[4] ||= m("dt", null, "Duration", -1), m("dd", null, C(Math.round(e.record.duration)) + "ms", 1)], 64))
|
|
636
|
+
])]),
|
|
637
|
+
s[9] ||= m("hr", { class: "sf-dt-meta-divider" }, null, -1),
|
|
638
|
+
i.value ? (y(), p("p", dt, C(i.value), 1)) : f("", !0),
|
|
639
|
+
g(Z, { features: e.record.features }, null, 8, ["features"]),
|
|
640
|
+
e.record.diagnostics.length ? (y(), p("section", ft, [s[8] ||= m("h4", { class: "sf-dt-heading" }, "Diagnostics", -1), m("ul", null, [(y(!0), p(l, null, x(e.record.diagnostics, (e) => (y(), p("li", {
|
|
641
|
+
key: e.id,
|
|
642
|
+
class: v(a(e.severity))
|
|
643
|
+
}, C(e.message), 3))), 128))])])) : f("", !0),
|
|
644
|
+
m("nav", $, [(y(), p(l, null, x(n, (e) => m("button", {
|
|
645
|
+
id: `sf-dt-subtab-${e}`,
|
|
646
|
+
key: e,
|
|
647
|
+
class: v(["sf-dt-subtab", { "is-active": r.value === e }]),
|
|
648
|
+
role: "tab",
|
|
649
|
+
"aria-selected": r.value === e,
|
|
650
|
+
"aria-controls": "sf-dt-subtabpanel",
|
|
651
|
+
onClick: (t) => r.value = e
|
|
652
|
+
}, C(e), 11, pt)), 64))]),
|
|
653
|
+
m("div", {
|
|
654
|
+
id: "sf-dt-subtabpanel",
|
|
655
|
+
class: "sf-dt-tabpanel",
|
|
656
|
+
role: "tabpanel",
|
|
657
|
+
"aria-labelledby": `sf-dt-subtab-${r.value}`
|
|
658
|
+
}, [r.value === "response" ? (y(), d(Fe, {
|
|
659
|
+
key: 0,
|
|
660
|
+
record: e.record
|
|
661
|
+
}, null, 8, ["record"])) : r.value === "headers" ? (y(), d(Be, {
|
|
662
|
+
key: 1,
|
|
663
|
+
record: e.record
|
|
664
|
+
}, null, 8, ["record"])) : r.value === "network" ? (y(), d(qe, {
|
|
665
|
+
key: 2,
|
|
666
|
+
record: e.record
|
|
667
|
+
}, null, 8, ["record"])) : (y(), d(it, {
|
|
668
|
+
key: 3,
|
|
669
|
+
record: e.record
|
|
670
|
+
}, null, 8, ["record"]))], 8, mt)
|
|
671
|
+
]));
|
|
672
|
+
}
|
|
673
|
+
}), [["__scopeId", "data-v-4942f037"]]), gt = { class: "sf-devtools" }, _t = {
|
|
674
|
+
class: "sf-dt-tabs",
|
|
675
|
+
role: "tablist",
|
|
676
|
+
"aria-label": "Inertia panel views"
|
|
677
|
+
}, vt = ["aria-selected"], yt = ["aria-selected"], bt = ["aria-pressed"], xt = {
|
|
678
|
+
key: 1,
|
|
679
|
+
class: "sf-dt-empty"
|
|
680
|
+
}, St = {
|
|
681
|
+
key: 1,
|
|
682
|
+
id: "sf-dt-tabpanel-inertia",
|
|
683
|
+
class: "sf-dt-body sf-dt-page",
|
|
684
|
+
role: "tabpanel",
|
|
685
|
+
"aria-labelledby": "sf-dt-tab-page"
|
|
686
|
+
}, Ct = {
|
|
687
|
+
key: 0,
|
|
688
|
+
class: "sf-dt-page-inner"
|
|
689
|
+
}, wt = {
|
|
690
|
+
key: 1,
|
|
691
|
+
class: "sf-dt-empty"
|
|
692
|
+
}, Tt = /*#__PURE__*/ r(/* @__PURE__ */ _({
|
|
693
|
+
__name: "App",
|
|
694
|
+
setup(t) {
|
|
695
|
+
let n = i(), r = b(A("inertia-devtools-tab", "requests", ["requests", "page"]));
|
|
696
|
+
D(r, (e) => j("inertia-devtools-tab", e));
|
|
697
|
+
let o = u(() => n.value?.paused ?? !1);
|
|
698
|
+
function c() {
|
|
699
|
+
let e = a();
|
|
700
|
+
e && e.setPaused(!e.paused);
|
|
701
|
+
}
|
|
702
|
+
let l = b(null), f = u(() => n.value?.requests ?? []), h = u(() => n.value?.currentPage ?? null), _ = u(() => f.value.find((e) => e.visitId === l.value) ?? null), x = u(() => {
|
|
703
|
+
let t = h.value;
|
|
704
|
+
return t ? e(t) : [];
|
|
705
|
+
}), S = T("requestList");
|
|
706
|
+
function w() {
|
|
707
|
+
a()?.clear(), l.value = null, S.value?.focus();
|
|
708
|
+
}
|
|
709
|
+
function E() {
|
|
710
|
+
l.value = null;
|
|
711
|
+
}
|
|
712
|
+
return (e, t) => (y(), p("div", gt, [m("nav", _t, [
|
|
713
|
+
m("button", {
|
|
714
|
+
id: "sf-dt-tab-requests",
|
|
715
|
+
class: v(["sf-dt-tab", { "is-active": r.value === "requests" }]),
|
|
716
|
+
role: "tab",
|
|
717
|
+
"aria-selected": r.value === "requests",
|
|
718
|
+
"aria-controls": "sf-dt-tabpanel-inertia",
|
|
719
|
+
onClick: t[0] ||= (e) => r.value = "requests"
|
|
720
|
+
}, " Requests ", 10, vt),
|
|
721
|
+
m("button", {
|
|
722
|
+
id: "sf-dt-tab-page",
|
|
723
|
+
class: v(["sf-dt-tab", { "is-active": r.value === "page" }]),
|
|
724
|
+
role: "tab",
|
|
725
|
+
"aria-selected": r.value === "page",
|
|
726
|
+
"aria-controls": "sf-dt-tabpanel-inertia",
|
|
727
|
+
onClick: t[1] ||= (e) => r.value = "page"
|
|
728
|
+
}, " Page ", 10, yt),
|
|
729
|
+
m("button", {
|
|
730
|
+
class: "sf-dt-tab sf-dt-tabs-spacer",
|
|
731
|
+
"aria-pressed": o.value,
|
|
732
|
+
onClick: c
|
|
733
|
+
}, C(o.value ? "Resume" : "Pause"), 9, bt),
|
|
734
|
+
m("button", {
|
|
735
|
+
class: "sf-dt-tab sf-dt-tabs-clear",
|
|
736
|
+
onClick: w
|
|
737
|
+
}, "Clear")
|
|
738
|
+
]), r.value === "requests" ? (y(), p("div", {
|
|
739
|
+
key: 0,
|
|
740
|
+
id: "sf-dt-tabpanel-inertia",
|
|
741
|
+
class: v(["sf-dt-body", { "has-selection": _.value }]),
|
|
742
|
+
role: "tabpanel",
|
|
743
|
+
"aria-labelledby": "sf-dt-tab-requests"
|
|
744
|
+
}, [g(se, {
|
|
745
|
+
ref_key: "requestList",
|
|
746
|
+
ref: S,
|
|
747
|
+
requests: f.value,
|
|
748
|
+
"selected-id": l.value,
|
|
749
|
+
paused: o.value,
|
|
750
|
+
onSelect: t[2] ||= (e) => l.value = e
|
|
751
|
+
}, null, 8, [
|
|
752
|
+
"requests",
|
|
753
|
+
"selected-id",
|
|
754
|
+
"paused"
|
|
755
|
+
]), _.value ? (y(), d(ht, {
|
|
756
|
+
key: 0,
|
|
757
|
+
record: _.value,
|
|
758
|
+
onBack: E
|
|
759
|
+
}, null, 8, ["record"])) : (y(), p("div", xt, "Select a request to inspect it"))], 2)) : (y(), p("div", St, [h.value ? (y(), p("div", Ct, [g(Z, { features: x.value }, null, 8, ["features"]), g(s, {
|
|
760
|
+
label: "props",
|
|
761
|
+
value: h.value.props
|
|
762
|
+
}, null, 8, ["value"])])) : (y(), p("div", wt, "No page captured yet"))]))]));
|
|
763
|
+
}
|
|
764
|
+
}), [["__scopeId", "data-v-2c4fa9e7"]]);
|
|
765
|
+
//#endregion
|
|
766
|
+
//#region src/inertia/panel/renderer.ts
|
|
767
|
+
function Et(e) {
|
|
768
|
+
n(e, Tt);
|
|
769
|
+
}
|
|
770
|
+
//#endregion
|
|
771
|
+
export { Et as default };
|