@websublime/vite-plugin-open-api-devtools 0.8.5 → 0.9.0-next.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 (82) hide show
  1. package/dist/ModelsPage-OOYQ3USo.js +798 -0
  2. package/dist/ModelsPage-OOYQ3USo.js.map +1 -0
  3. package/dist/{RoutesPage-BCKS0kdj.js → RoutesPage-BgsspZkr.js} +191 -191
  4. package/dist/RoutesPage-BgsspZkr.js.map +1 -0
  5. package/dist/SimulatorPage-g9fGUP4F.js +436 -0
  6. package/dist/SimulatorPage-g9fGUP4F.js.map +1 -0
  7. package/dist/TimelinePage-D_GD3OjL.js +861 -0
  8. package/dist/TimelinePage-D_GD3OjL.js.map +1 -0
  9. package/dist/{check-BZ_jBwd4.js → check-B4mNtdMg.js} +2 -2
  10. package/dist/{check-BZ_jBwd4.js.map → check-B4mNtdMg.js.map} +1 -1
  11. package/dist/devtools.css +1 -1
  12. package/dist/devtools.js +1 -1
  13. package/dist/devtools.umd.cjs +3 -3
  14. package/dist/devtools.umd.cjs.map +1 -1
  15. package/dist/{format-Dq-zmlAN.js → format-Dj37a-xS.js} +2 -2
  16. package/dist/{format-Dq-zmlAN.js.map → format-Dj37a-xS.js.map} +1 -1
  17. package/dist/main-CWgkFc8w.js +620 -0
  18. package/dist/main-CWgkFc8w.js.map +1 -0
  19. package/dist/registry-SW4SCwV5.js +216 -0
  20. package/dist/registry-SW4SCwV5.js.map +1 -0
  21. package/dist/spa/assets/{ModelsPage-8zCKSqIw.css → ModelsPage-CrseRvBH.css} +1 -1
  22. package/dist/spa/assets/ModelsPage-CxzHlUKB.js +4 -0
  23. package/dist/spa/assets/ModelsPage-CxzHlUKB.js.map +1 -0
  24. package/dist/spa/assets/RoutesPage-BchriFi3.js +2 -0
  25. package/dist/spa/assets/RoutesPage-BchriFi3.js.map +1 -0
  26. package/dist/spa/assets/{RoutesPage-BVXzvJ2S.css → RoutesPage-Wp_sf4Io.css} +1 -1
  27. package/dist/spa/assets/SimulatorPage-CHGPhn5Y.js +2 -0
  28. package/dist/spa/assets/SimulatorPage-CHGPhn5Y.js.map +1 -0
  29. package/dist/spa/assets/SimulatorPage-p6R5JJTE.css +1 -0
  30. package/dist/spa/assets/{TimelinePage-BDyp8kvu.css → TimelinePage-ED20f46Y.css} +1 -1
  31. package/dist/spa/assets/TimelinePage-zBBJCjLX.js +2 -0
  32. package/dist/spa/assets/TimelinePage-zBBJCjLX.js.map +1 -0
  33. package/dist/spa/assets/check-CDp1nxJT.js +2 -0
  34. package/dist/spa/assets/{check-DaD3RpI4.js.map → check-CDp1nxJT.js.map} +1 -1
  35. package/dist/spa/assets/{format-er1_KlP8.js → format-DA0n5kox.js} +2 -2
  36. package/dist/spa/assets/{format-er1_KlP8.js.map → format-DA0n5kox.js.map} +1 -1
  37. package/dist/spa/assets/index-Ddu0x8qb.js +3 -0
  38. package/dist/spa/assets/index-Ddu0x8qb.js.map +1 -0
  39. package/dist/spa/assets/registry-CKvK0Ln5.js +2 -0
  40. package/dist/spa/assets/registry-CKvK0Ln5.js.map +1 -0
  41. package/dist/spa/assets/{trash-2-BhRxw6RN.js → trash-2-B1UuFJDm.js} +2 -2
  42. package/dist/spa/assets/{trash-2-BhRxw6RN.js.map → trash-2-B1UuFJDm.js.map} +1 -1
  43. package/dist/spa/assets/{triangle-alert-QXcMwGDR.js → triangle-alert-ITT7135L.js} +2 -2
  44. package/dist/spa/assets/{triangle-alert-QXcMwGDR.js.map → triangle-alert-ITT7135L.js.map} +1 -1
  45. package/dist/spa/assets/{vue-vendor-Bkktf9yg.js → vue-vendor-D62nux6V.js} +2 -2
  46. package/dist/spa/assets/{vue-vendor-Bkktf9yg.js.map → vue-vendor-D62nux6V.js.map} +1 -1
  47. package/dist/spa/assets/x-YOimnrsL.js +2 -0
  48. package/dist/spa/assets/{x-DGt4DUCk.js.map → x-YOimnrsL.js.map} +1 -1
  49. package/dist/spa/index.html +2 -2
  50. package/dist/{trash-2-D9Av3Lfp.js → trash-2-CDLzu4_Y.js} +2 -2
  51. package/dist/{trash-2-D9Av3Lfp.js.map → trash-2-CDLzu4_Y.js.map} +1 -1
  52. package/dist/{triangle-alert-6Spra6HA.js → triangle-alert-BP3-t-po.js} +2 -2
  53. package/dist/{triangle-alert-6Spra6HA.js.map → triangle-alert-BP3-t-po.js.map} +1 -1
  54. package/dist/{x-DI-fqJ3g.js → x-BZzigrBR.js} +2 -2
  55. package/dist/{x-DI-fqJ3g.js.map → x-BZzigrBR.js.map} +1 -1
  56. package/package.json +13 -12
  57. package/dist/ModelsPage-DxcKgz3y.js +0 -757
  58. package/dist/ModelsPage-DxcKgz3y.js.map +0 -1
  59. package/dist/RoutesPage-BCKS0kdj.js.map +0 -1
  60. package/dist/SimulatorPage-BlbxLDdf.js +0 -430
  61. package/dist/SimulatorPage-BlbxLDdf.js.map +0 -1
  62. package/dist/TimelinePage-BhtcWy3o.js +0 -849
  63. package/dist/TimelinePage-BhtcWy3o.js.map +0 -1
  64. package/dist/main-DmyM_bX3.js +0 -537
  65. package/dist/main-DmyM_bX3.js.map +0 -1
  66. package/dist/registry-BQhccWMq.js +0 -153
  67. package/dist/registry-BQhccWMq.js.map +0 -1
  68. package/dist/spa/assets/ModelsPage-Bd7YM0_p.js +0 -4
  69. package/dist/spa/assets/ModelsPage-Bd7YM0_p.js.map +0 -1
  70. package/dist/spa/assets/RoutesPage-YQcTov5t.js +0 -2
  71. package/dist/spa/assets/RoutesPage-YQcTov5t.js.map +0 -1
  72. package/dist/spa/assets/SimulatorPage-DGEq_rzM.css +0 -1
  73. package/dist/spa/assets/SimulatorPage-DPxecZGS.js +0 -2
  74. package/dist/spa/assets/SimulatorPage-DPxecZGS.js.map +0 -1
  75. package/dist/spa/assets/TimelinePage-CbWvtFc_.js +0 -2
  76. package/dist/spa/assets/TimelinePage-CbWvtFc_.js.map +0 -1
  77. package/dist/spa/assets/check-DaD3RpI4.js +0 -2
  78. package/dist/spa/assets/index-x38XzU3c.js +0 -3
  79. package/dist/spa/assets/index-x38XzU3c.js.map +0 -1
  80. package/dist/spa/assets/registry-DjJcdO1T.js +0 -2
  81. package/dist/spa/assets/registry-DjJcdO1T.js.map +0 -1
  82. package/dist/spa/assets/x-DGt4DUCk.js +0 -2
@@ -0,0 +1,861 @@
1
+ import { ref as F, computed as f, defineComponent as ce, createElementBlock as r, openBlock as a, createVNode as q, createElementVNode as e, unref as i, normalizeClass as O, toDisplayString as m, createCommentVNode as C, createTextVNode as A, createBlock as I, resolveDynamicComponent as B, withDirectives as W, Fragment as M, renderList as j, vShow as Z, withModifiers as ye, onMounted as qe, onUnmounted as Ce, watch as $e } from "vue";
2
+ import { g as pe, C as N, a as G, S as _e, F as Se, b as Te } from "./format-Dj37a-xS.js";
3
+ import { c as ve, u as he, C as P, Z as ge, _ as me, a as Ie } from "./main-CWgkFc8w.js";
4
+ import { C as ue } from "./check-B4mNtdMg.js";
5
+ import { T as Ee } from "./triangle-alert-BP3-t-po.js";
6
+ import { defineStore as we } from "pinia";
7
+ import { X as fe } from "./x-BZzigrBR.js";
8
+ import { T as Be } from "./trash-2-CDLzu4_Y.js";
9
+ const Fe = ve("circle-check-big", [
10
+ ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
11
+ ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
12
+ ]);
13
+ const de = ve("copy", [
14
+ ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
15
+ ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
16
+ ]), Re = we("timeline", () => {
17
+ const u = he(), t = F([]), o = F(!1), b = F(null), c = F({
18
+ methods: [],
19
+ statusCodes: [],
20
+ searchQuery: "",
21
+ simulatedOnly: null
22
+ }), $ = F(null), g = F(500), p = /* @__PURE__ */ new Map();
23
+ function D(s) {
24
+ return s < 200 ? "1xx" : s < 300 ? "2xx" : s < 400 ? "3xx" : s < 500 ? "4xx" : "5xx";
25
+ }
26
+ const T = f(() => {
27
+ const s = u.activeSpecFilter;
28
+ return s ? t.value.filter((n) => n.specId === s) : t.value;
29
+ }), R = f(() => {
30
+ let s = T.value;
31
+ if (c.value.searchQuery.trim()) {
32
+ const n = c.value.searchQuery.toLowerCase().trim();
33
+ s = s.filter((d) => d.request.path.toLowerCase().includes(n) || d.request.operationId.toLowerCase().includes(n));
34
+ }
35
+ return c.value.methods.length > 0 && (s = s.filter(
36
+ (n) => c.value.methods.includes(n.request.method.toUpperCase())
37
+ )), c.value.statusCodes.length > 0 && (s = s.filter((n) => {
38
+ if (n.status === null) return !1;
39
+ const d = D(n.status);
40
+ return c.value.statusCodes.includes(d);
41
+ })), c.value.simulatedOnly !== null && (s = s.filter((n) => n.simulated === c.value.simulatedOnly)), s;
42
+ }), H = f(() => $.value ? t.value.find((s) => s.id === $.value) ?? null : null), Q = f(() => T.value.length), z = f(
43
+ () => T.value.filter((s) => s.response !== null).length
44
+ ), L = f(
45
+ () => T.value.filter((s) => s.response === null).length
46
+ ), U = f(() => {
47
+ const s = {
48
+ "1xx": 0,
49
+ "2xx": 0,
50
+ "3xx": 0,
51
+ "4xx": 0,
52
+ "5xx": 0
53
+ };
54
+ for (const n of T.value)
55
+ if (n.status !== null) {
56
+ const d = D(n.status);
57
+ s[d]++;
58
+ }
59
+ return s;
60
+ }), x = f(() => {
61
+ const s = T.value.filter((d) => d.duration !== null);
62
+ if (s.length === 0) return 0;
63
+ const n = s.reduce((d, S) => d + (S.duration ?? 0), 0);
64
+ return Math.round(n / s.length);
65
+ });
66
+ function l(s, n) {
67
+ const d = {
68
+ id: s.id,
69
+ request: s,
70
+ response: null,
71
+ status: null,
72
+ duration: null,
73
+ simulated: !1,
74
+ specId: n
75
+ }, S = p.get(s.id);
76
+ S && (k(d, S), p.delete(s.id)), t.value.unshift(d), t.value.length > g.value && (t.value = t.value.slice(0, g.value));
77
+ }
78
+ function v(s) {
79
+ const n = t.value.find((d) => d.id === s.requestId);
80
+ if (n)
81
+ k(n, s), p.delete(s.requestId);
82
+ else if (p.set(s.requestId, s), p.size > 100) {
83
+ const d = J(s);
84
+ t.value.unshift(d), p.delete(s.requestId), t.value.length > g.value && (t.value = t.value.slice(0, g.value));
85
+ }
86
+ }
87
+ function k(s, n) {
88
+ s.response = n, s.status = n.status, s.duration = n.duration, s.simulated = n.simulated;
89
+ }
90
+ function J(s, n = "unknown") {
91
+ const d = {
92
+ id: s.requestId,
93
+ method: "UNKNOWN",
94
+ path: "/unknown",
95
+ operationId: "unknown",
96
+ timestamp: Date.now(),
97
+ // Use current time as fallback
98
+ headers: {},
99
+ query: {},
100
+ body: void 0
101
+ };
102
+ return {
103
+ id: s.requestId,
104
+ request: d,
105
+ response: s,
106
+ status: s.status,
107
+ duration: s.duration,
108
+ simulated: s.simulated,
109
+ specId: n
110
+ };
111
+ }
112
+ function ie(s) {
113
+ for (const [n, d] of p) {
114
+ const S = s.get(n);
115
+ S ? (k(S, d), p.delete(n)) : (s.set(n, J(d)), p.delete(n));
116
+ }
117
+ }
118
+ function le(s, n) {
119
+ for (const [d, S] of n) {
120
+ const ne = s.get(d);
121
+ ne ? k(ne, S) : p.set(d, S);
122
+ }
123
+ }
124
+ function ae(s) {
125
+ for (const [n, d] of p)
126
+ s.has(n) || (s.set(n, J(d)), p.delete(n));
127
+ }
128
+ function K(s, n) {
129
+ const d = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
130
+ for (const E of s.entries)
131
+ if (E.type === "request") {
132
+ const w = E.data;
133
+ d.set(w.id, {
134
+ id: w.id,
135
+ request: w,
136
+ response: null,
137
+ status: null,
138
+ duration: null,
139
+ simulated: !1,
140
+ specId: n
141
+ });
142
+ } else if (E.type === "response") {
143
+ const w = E.data;
144
+ S.set(w.requestId, w);
145
+ }
146
+ ie(d), le(d, S), ae(d);
147
+ const ne = Array.from(d.values()).sort(
148
+ (E, w) => w.request.timestamp - E.request.timestamp
149
+ ), xe = t.value.filter((E) => E.specId !== n), ke = [...ne, ...xe].sort(
150
+ (E, w) => w.request.timestamp - E.request.timestamp
151
+ );
152
+ t.value = ke.slice(0, g.value), b.value = null;
153
+ }
154
+ function oe(s) {
155
+ s ? t.value = t.value.filter((n) => n.specId !== s) : (t.value = [], p.clear()), $.value = null;
156
+ }
157
+ function V(s) {
158
+ o.value = s;
159
+ }
160
+ function X(s) {
161
+ b.value = s, o.value = !1;
162
+ }
163
+ function Y() {
164
+ b.value = null;
165
+ }
166
+ function ee(s) {
167
+ c.value.searchQuery = s;
168
+ }
169
+ function te(s) {
170
+ const n = c.value.methods.indexOf(s);
171
+ n === -1 ? c.value.methods.push(s) : c.value.methods.splice(n, 1);
172
+ }
173
+ function se(s) {
174
+ const n = c.value.statusCodes.indexOf(s);
175
+ n === -1 ? c.value.statusCodes.push(s) : c.value.statusCodes.splice(n, 1);
176
+ }
177
+ function y(s) {
178
+ c.value.simulatedOnly = s;
179
+ }
180
+ function _() {
181
+ c.value = {
182
+ methods: [],
183
+ statusCodes: [],
184
+ searchQuery: "",
185
+ simulatedOnly: null
186
+ };
187
+ }
188
+ function h() {
189
+ return c.value.searchQuery.trim() !== "" || c.value.methods.length > 0 || c.value.statusCodes.length > 0 || c.value.simulatedOnly !== null;
190
+ }
191
+ function re(s) {
192
+ $.value = s;
193
+ }
194
+ function be(s) {
195
+ const n = Math.max(1, s);
196
+ g.value = n, t.value.length > n && (t.value = t.value.slice(0, n));
197
+ }
198
+ return {
199
+ // State
200
+ entries: t,
201
+ isLoading: o,
202
+ error: b,
203
+ filter: c,
204
+ selectedEntryId: $,
205
+ maxEntries: g,
206
+ // Getters
207
+ filteredEntries: R,
208
+ selectedEntry: H,
209
+ totalCount: Q,
210
+ completedCount: z,
211
+ pendingCount: L,
212
+ statusCounts: U,
213
+ averageDuration: x,
214
+ // Actions
215
+ addRequest: l,
216
+ addResponse: v,
217
+ setTimelineData: K,
218
+ clearTimeline: oe,
219
+ setLoading: V,
220
+ setError: X,
221
+ clearError: Y,
222
+ setSearchQuery: ee,
223
+ toggleMethodFilter: te,
224
+ toggleStatusFilter: se,
225
+ setSimulatedFilter: y,
226
+ clearFilters: _,
227
+ hasActiveFilters: h,
228
+ selectEntry: re,
229
+ setMaxEntries: be
230
+ };
231
+ }), ze = { class: "timeline-detail" }, Oe = {
232
+ key: 0,
233
+ class: "timeline-detail__empty"
234
+ }, De = {
235
+ key: 1,
236
+ class: "timeline-detail__content"
237
+ }, He = { class: "timeline-detail__header" }, Qe = { class: "timeline-detail__summary" }, Le = { class: "timeline-detail__path font-mono" }, Me = { class: "timeline-detail__meta" }, Ae = {
238
+ key: 1,
239
+ class: "status-badge status-badge--pending"
240
+ }, Ne = { class: "timeline-detail__duration" }, je = {
241
+ key: 2,
242
+ class: "timeline-detail__simulated",
243
+ title: "Simulated response"
244
+ }, Pe = { class: "timeline-detail__actions" }, Ue = { class: "timeline-detail__info" }, Je = { class: "timeline-detail__info-item" }, Ve = { class: "timeline-detail__info-value font-mono" }, We = { class: "timeline-detail__info-item" }, Ze = { class: "timeline-detail__info-value font-mono" }, Ge = { class: "timeline-detail__info-item" }, Ke = { class: "timeline-detail__info-value font-mono" }, Xe = { class: "timeline-detail__section" }, Ye = {
245
+ key: 0,
246
+ class: "timeline-detail__subsection"
247
+ }, et = ["aria-expanded"], tt = { class: "text-muted" }, st = {
248
+ id: "requestQuery-panel",
249
+ class: "timeline-detail__subsection-content"
250
+ }, nt = { class: "timeline-detail__kv-key font-mono" }, it = { class: "timeline-detail__kv-value font-mono" }, lt = {
251
+ key: 1,
252
+ class: "timeline-detail__subsection"
253
+ }, at = ["aria-expanded"], ot = { class: "text-muted" }, rt = {
254
+ id: "requestHeaders-panel",
255
+ class: "timeline-detail__subsection-content"
256
+ }, ut = { class: "timeline-detail__kv-key font-mono" }, dt = { class: "timeline-detail__kv-value font-mono" }, ct = {
257
+ key: 2,
258
+ class: "timeline-detail__subsection"
259
+ }, mt = {
260
+ class: "timeline-detail__subsection-header",
261
+ role: "group"
262
+ }, yt = ["aria-expanded"], _t = {
263
+ id: "requestBody-panel",
264
+ class: "timeline-detail__subsection-content"
265
+ }, ft = { class: "timeline-detail__json" }, pt = {
266
+ key: 0,
267
+ class: "timeline-detail__section"
268
+ }, vt = {
269
+ key: 0,
270
+ class: "timeline-detail__subsection"
271
+ }, ht = ["aria-expanded"], gt = { class: "text-muted" }, bt = {
272
+ id: "responseHeaders-panel",
273
+ class: "timeline-detail__subsection-content"
274
+ }, xt = { class: "timeline-detail__kv-key font-mono" }, kt = { class: "timeline-detail__kv-value font-mono" }, qt = {
275
+ key: 1,
276
+ class: "timeline-detail__subsection"
277
+ }, Ct = {
278
+ class: "timeline-detail__subsection-header",
279
+ role: "group"
280
+ }, $t = ["aria-expanded"], St = {
281
+ id: "responseBody-panel",
282
+ class: "timeline-detail__subsection-content"
283
+ }, Tt = { class: "timeline-detail__json" }, It = {
284
+ key: 1,
285
+ class: "timeline-detail__section timeline-detail__section--pending"
286
+ }, Et = { class: "timeline-detail__pending" }, wt = /* @__PURE__ */ ce({
287
+ __name: "TimelineDetail",
288
+ props: {
289
+ entry: {}
290
+ },
291
+ setup(u) {
292
+ const t = u, o = F({
293
+ requestHeaders: !0,
294
+ requestQuery: !0,
295
+ requestBody: !0,
296
+ responseHeaders: !0,
297
+ responseBody: !0
298
+ }), b = F(null), c = f(() => t.entry ? new Date(t.entry.request.timestamp).toLocaleString("en-US", {
299
+ year: "numeric",
300
+ month: "short",
301
+ day: "numeric",
302
+ hour: "2-digit",
303
+ minute: "2-digit",
304
+ second: "2-digit",
305
+ fractionalSecondDigits: 3,
306
+ hour12: !1
307
+ }) : ""), $ = f(() => t.entry?.duration == null ? "pending..." : t.entry.duration < 1e3 ? `${t.entry.duration}ms` : `${(t.entry.duration / 1e3).toFixed(2)}s`), g = f(() => t.entry?.status ? t.entry.status < 200 ? "status-badge--1xx" : t.entry.status < 300 ? "status-badge--2xx" : t.entry.status < 400 ? "status-badge--3xx" : t.entry.status < 500 ? "status-badge--4xx" : "status-badge--5xx" : "status-badge--pending"), p = f(() => t.entry?.request.query ? Object.keys(t.entry.request.query).length > 0 : !1), D = f(() => t.entry?.request.headers ? Object.keys(t.entry.request.headers).length > 0 : !1), T = f(() => t.entry?.request.body !== void 0 && t.entry?.request.body !== null), R = f(() => t.entry?.response?.headers ? Object.keys(t.entry.response.headers).length > 0 : !1), H = f(() => t.entry?.response?.body !== void 0 && t.entry?.response?.body !== null);
308
+ function Q(x) {
309
+ try {
310
+ return JSON.stringify(x, null, 2);
311
+ } catch {
312
+ return String(x);
313
+ }
314
+ }
315
+ function z(x) {
316
+ o.value[x] = !o.value[x];
317
+ }
318
+ async function L(x, l) {
319
+ try {
320
+ await navigator.clipboard.writeText(x), b.value = l, setTimeout(() => {
321
+ b.value = null;
322
+ }, 2e3);
323
+ } catch (v) {
324
+ console.error("Failed to copy:", v);
325
+ }
326
+ }
327
+ async function U() {
328
+ if (!t.entry) return;
329
+ const x = {
330
+ request: t.entry.request,
331
+ response: t.entry.response
332
+ };
333
+ await L(JSON.stringify(x, null, 2), "full");
334
+ }
335
+ return (x, l) => (a(), r("div", ze, [
336
+ u.entry ? (a(), r("div", De, [
337
+ e("div", He, [
338
+ e("div", Qe, [
339
+ e("span", {
340
+ class: O(["method-badge", `method-badge--${u.entry.request.method.toLowerCase()}`])
341
+ }, m(i(pe)(u.entry.request.method)), 3),
342
+ e("span", Le, m(u.entry.request.path), 1)
343
+ ]),
344
+ e("div", Me, [
345
+ u.entry.status !== null ? (a(), r("span", {
346
+ key: 0,
347
+ class: O(["status-badge", g.value])
348
+ }, m(u.entry.status), 3)) : (a(), r("span", Ae, "pending")),
349
+ e("span", Ne, [
350
+ q(i(P), { size: 14 }),
351
+ A(" " + m($.value), 1)
352
+ ]),
353
+ u.entry.simulated ? (a(), r("span", je, [
354
+ q(i(ge), { size: 14 }),
355
+ l[9] || (l[9] = A(" Simulated ", -1))
356
+ ])) : C("", !0)
357
+ ]),
358
+ e("div", Pe, [
359
+ e("button", {
360
+ type: "button",
361
+ class: "btn btn--ghost btn--sm",
362
+ title: "Copy as JSON",
363
+ onClick: U
364
+ }, [
365
+ (a(), I(B(b.value === "full" ? i(ue) : i(de)), { size: 14 })),
366
+ A(" " + m(b.value === "full" ? "Copied!" : "Copy JSON"), 1)
367
+ ])
368
+ ])
369
+ ]),
370
+ e("div", Ue, [
371
+ e("div", Je, [
372
+ l[10] || (l[10] = e("span", { class: "timeline-detail__info-label" }, "Timestamp", -1)),
373
+ e("span", Ve, m(c.value), 1)
374
+ ]),
375
+ e("div", We, [
376
+ l[11] || (l[11] = e("span", { class: "timeline-detail__info-label" }, "Operation ID", -1)),
377
+ e("span", Ze, m(u.entry.request.operationId), 1)
378
+ ]),
379
+ e("div", Ge, [
380
+ l[12] || (l[12] = e("span", { class: "timeline-detail__info-label" }, "Request ID", -1)),
381
+ e("span", Ke, m(u.entry.id), 1)
382
+ ])
383
+ ]),
384
+ e("div", Xe, [
385
+ l[16] || (l[16] = e("h3", { class: "timeline-detail__section-title" }, "Request", -1)),
386
+ p.value ? (a(), r("div", Ye, [
387
+ e("button", {
388
+ type: "button",
389
+ class: "timeline-detail__subsection-header",
390
+ "aria-expanded": o.value.requestQuery,
391
+ "aria-controls": "requestQuery-panel",
392
+ onClick: l[0] || (l[0] = (v) => z("requestQuery"))
393
+ }, [
394
+ (a(), I(B(o.value.requestQuery ? i(N) : i(G)), { size: 16 })),
395
+ l[13] || (l[13] = e("span", null, "Query Parameters", -1)),
396
+ e("span", tt, "(" + m(Object.keys(u.entry.request.query).length) + ")", 1)
397
+ ], 8, et),
398
+ W(e("div", st, [
399
+ (a(!0), r(M, null, j(u.entry.request.query, (v, k) => (a(), r("div", {
400
+ key: k,
401
+ class: "timeline-detail__kv-row"
402
+ }, [
403
+ e("span", nt, m(k), 1),
404
+ e("span", it, m(Array.isArray(v) ? v.join(", ") : v), 1)
405
+ ]))), 128))
406
+ ], 512), [
407
+ [Z, o.value.requestQuery]
408
+ ])
409
+ ])) : C("", !0),
410
+ D.value ? (a(), r("div", lt, [
411
+ e("button", {
412
+ type: "button",
413
+ class: "timeline-detail__subsection-header",
414
+ "aria-expanded": o.value.requestHeaders,
415
+ "aria-controls": "requestHeaders-panel",
416
+ onClick: l[1] || (l[1] = (v) => z("requestHeaders"))
417
+ }, [
418
+ (a(), I(B(o.value.requestHeaders ? i(N) : i(G)), { size: 16 })),
419
+ l[14] || (l[14] = e("span", null, "Headers", -1)),
420
+ e("span", ot, "(" + m(Object.keys(u.entry.request.headers).length) + ")", 1)
421
+ ], 8, at),
422
+ W(e("div", rt, [
423
+ (a(!0), r(M, null, j(u.entry.request.headers, (v, k) => (a(), r("div", {
424
+ key: k,
425
+ class: "timeline-detail__kv-row"
426
+ }, [
427
+ e("span", ut, m(k), 1),
428
+ e("span", dt, m(v), 1)
429
+ ]))), 128))
430
+ ], 512), [
431
+ [Z, o.value.requestHeaders]
432
+ ])
433
+ ])) : C("", !0),
434
+ T.value ? (a(), r("div", ct, [
435
+ e("div", mt, [
436
+ e("button", {
437
+ type: "button",
438
+ class: "timeline-detail__subsection-toggle",
439
+ "aria-expanded": o.value.requestBody,
440
+ "aria-controls": "requestBody-panel",
441
+ onClick: l[2] || (l[2] = (v) => z("requestBody"))
442
+ }, [
443
+ (a(), I(B(o.value.requestBody ? i(N) : i(G)), { size: 16 })),
444
+ l[15] || (l[15] = e("span", null, "Body", -1))
445
+ ], 8, yt),
446
+ e("button", {
447
+ type: "button",
448
+ class: "btn btn--ghost btn--icon btn--sm",
449
+ title: "Copy body",
450
+ onClick: l[3] || (l[3] = ye((v) => L(Q(u.entry.request.body), "reqBody"), ["stop"]))
451
+ }, [
452
+ (a(), I(B(b.value === "reqBody" ? i(ue) : i(de)), { size: 12 }))
453
+ ])
454
+ ]),
455
+ W(e("div", _t, [
456
+ e("pre", ft, m(Q(u.entry.request.body)), 1)
457
+ ], 512), [
458
+ [Z, o.value.requestBody]
459
+ ])
460
+ ])) : C("", !0)
461
+ ]),
462
+ u.entry.response ? (a(), r("div", pt, [
463
+ l[19] || (l[19] = e("h3", { class: "timeline-detail__section-title" }, "Response", -1)),
464
+ R.value ? (a(), r("div", vt, [
465
+ e("button", {
466
+ type: "button",
467
+ class: "timeline-detail__subsection-header",
468
+ "aria-expanded": o.value.responseHeaders,
469
+ "aria-controls": "responseHeaders-panel",
470
+ onClick: l[4] || (l[4] = (v) => z("responseHeaders"))
471
+ }, [
472
+ (a(), I(B(o.value.responseHeaders ? i(N) : i(G)), { size: 16 })),
473
+ l[17] || (l[17] = e("span", null, "Headers", -1)),
474
+ e("span", gt, "(" + m(Object.keys(u.entry.response.headers).length) + ")", 1)
475
+ ], 8, ht),
476
+ W(e("div", bt, [
477
+ (a(!0), r(M, null, j(u.entry.response.headers, (v, k) => (a(), r("div", {
478
+ key: k,
479
+ class: "timeline-detail__kv-row"
480
+ }, [
481
+ e("span", xt, m(k), 1),
482
+ e("span", kt, m(v), 1)
483
+ ]))), 128))
484
+ ], 512), [
485
+ [Z, o.value.responseHeaders]
486
+ ])
487
+ ])) : C("", !0),
488
+ H.value ? (a(), r("div", qt, [
489
+ e("div", Ct, [
490
+ e("button", {
491
+ type: "button",
492
+ class: "timeline-detail__subsection-toggle",
493
+ "aria-expanded": o.value.responseBody,
494
+ "aria-controls": "responseBody-panel",
495
+ onClick: l[5] || (l[5] = (v) => z("responseBody"))
496
+ }, [
497
+ (a(), I(B(o.value.responseBody ? i(N) : i(G)), { size: 16 })),
498
+ l[18] || (l[18] = e("span", null, "Body", -1))
499
+ ], 8, $t),
500
+ e("button", {
501
+ type: "button",
502
+ class: "btn btn--ghost btn--icon btn--sm",
503
+ title: "Copy body",
504
+ onClick: l[6] || (l[6] = ye((v) => L(Q(u.entry.response.body), "resBody"), ["stop"]))
505
+ }, [
506
+ (a(), I(B(b.value === "resBody" ? i(ue) : i(de)), { size: 12 }))
507
+ ])
508
+ ]),
509
+ W(e("div", St, [
510
+ e("pre", Tt, m(Q(u.entry.response.body)), 1)
511
+ ], 512), [
512
+ [Z, o.value.responseBody]
513
+ ])
514
+ ])) : C("", !0)
515
+ ])) : (a(), r("div", It, [
516
+ l[21] || (l[21] = e("h3", { class: "timeline-detail__section-title" }, "Response", -1)),
517
+ e("div", Et, [
518
+ q(i(P), {
519
+ size: 24,
520
+ class: "timeline-detail__pending-icon"
521
+ }),
522
+ l[20] || (l[20] = e("span", { class: "text-muted" }, "Waiting for response...", -1))
523
+ ])
524
+ ]))
525
+ ])) : (a(), r("div", Oe, [
526
+ q(i(P), {
527
+ size: 48,
528
+ class: "timeline-detail__empty-icon"
529
+ }),
530
+ l[7] || (l[7] = e("h3", { class: "timeline-detail__empty-title" }, "Select an entry", -1)),
531
+ l[8] || (l[8] = e("p", { class: "timeline-detail__empty-description" }, " Click on a timeline entry to view its details. ", -1))
532
+ ]))
533
+ ]));
534
+ }
535
+ }), Bt = /* @__PURE__ */ me(wt, [["__scopeId", "data-v-b4bdd2d2"]]), Ft = { class: "timeline-entry__time font-mono text-muted" }, Rt = { class: "timeline-entry__method" }, zt = { class: "timeline-entry__path font-mono" }, Ot = { class: "timeline-entry__status" }, Dt = {
536
+ key: 1,
537
+ class: "status-badge status-badge--pending"
538
+ }, Ht = { class: "timeline-entry__duration font-mono text-muted" }, Qt = {
539
+ key: 0,
540
+ class: "timeline-entry__simulated",
541
+ title: "Simulated response"
542
+ }, Lt = /* @__PURE__ */ ce({
543
+ __name: "TimelineEntry",
544
+ props: {
545
+ entry: {},
546
+ isSelected: { type: Boolean, default: !1 }
547
+ },
548
+ emits: ["select"],
549
+ setup(u, { emit: t }) {
550
+ const o = u, b = t, c = f(() => new Date(o.entry.request.timestamp).toLocaleTimeString("en-US", {
551
+ hour12: !1,
552
+ hour: "2-digit",
553
+ minute: "2-digit",
554
+ second: "2-digit",
555
+ fractionalSecondDigits: 3
556
+ })), $ = f(() => o.entry.duration === null ? "pending..." : o.entry.duration < 1e3 ? `${o.entry.duration}ms` : `${(o.entry.duration / 1e3).toFixed(2)}s`), g = f(() => o.entry.status === null ? "status-badge--pending" : o.entry.status < 200 ? "status-badge--1xx" : o.entry.status < 300 ? "status-badge--2xx" : o.entry.status < 400 ? "status-badge--3xx" : o.entry.status < 500 ? "status-badge--4xx" : "status-badge--5xx"), p = f(() => o.entry.status === null ? P : o.entry.status < 400 ? Fe : Ee), D = f(() => o.entry.response === null);
557
+ function T() {
558
+ b("select", o.entry.id);
559
+ }
560
+ return (R, H) => (a(), r("button", {
561
+ type: "button",
562
+ class: O([
563
+ "timeline-entry",
564
+ { "timeline-entry--selected": u.isSelected },
565
+ { "timeline-entry--pending": D.value },
566
+ { "timeline-entry--simulated": u.entry.simulated }
567
+ ]),
568
+ onClick: T
569
+ }, [
570
+ e("div", Ft, m(c.value), 1),
571
+ e("div", Rt, [
572
+ e("span", {
573
+ class: O(["method-badge", `method-badge--${u.entry.request.method.toLowerCase()}`])
574
+ }, m(i(pe)(u.entry.request.method)), 3)
575
+ ]),
576
+ e("div", zt, m(u.entry.request.path), 1),
577
+ e("div", Ot, [
578
+ u.entry.status !== null ? (a(), r("span", {
579
+ key: 0,
580
+ class: O(["status-badge", g.value])
581
+ }, [
582
+ (a(), I(B(p.value), { size: 12 })),
583
+ A(" " + m(u.entry.status), 1)
584
+ ], 2)) : (a(), r("span", Dt, [
585
+ q(i(P), { size: 12 }),
586
+ H[0] || (H[0] = A(" pending ", -1))
587
+ ]))
588
+ ]),
589
+ e("div", Ht, m($.value), 1),
590
+ u.entry.simulated ? (a(), r("div", Qt, [
591
+ q(i(ge), { size: 14 })
592
+ ])) : C("", !0)
593
+ ], 2));
594
+ }
595
+ }), Mt = /* @__PURE__ */ me(Lt, [["__scopeId", "data-v-a073dbdf"]]), At = { class: "timeline-page" }, Nt = { class: "timeline-toolbar" }, jt = { class: "timeline-search" }, Pt = ["value"], Ut = ["aria-expanded"], Jt = {
596
+ key: 0,
597
+ class: "timeline-filter-toggle__badge"
598
+ }, Vt = { class: "timeline-stats" }, Wt = { class: "timeline-stats__item" }, Zt = {
599
+ key: 0,
600
+ class: "timeline-stats__separator"
601
+ }, Gt = {
602
+ key: 1,
603
+ class: "timeline-stats__item"
604
+ }, Kt = ["disabled"], Xt = {
605
+ key: 0,
606
+ class: "timeline-filters"
607
+ }, Yt = { class: "timeline-filters__section" }, es = { class: "timeline-filters__methods" }, ts = ["onClick"], ss = { class: "timeline-filters__section" }, ns = { class: "timeline-filters__status" }, is = ["onClick"], ls = { class: "timeline-filters__status-count" }, as = { class: "timeline-filters__section" }, os = { class: "timeline-filters__type" }, rs = {
608
+ key: 0,
609
+ class: "timeline-filters__actions"
610
+ }, us = { class: "timeline-content" }, ds = {
611
+ key: 0,
612
+ class: "timeline-loading"
613
+ }, cs = {
614
+ key: 1,
615
+ class: "timeline-error"
616
+ }, ms = { class: "timeline-error__message" }, ys = {
617
+ key: 2,
618
+ class: "timeline-empty empty-state"
619
+ }, _s = {
620
+ key: 3,
621
+ class: "timeline-empty empty-state"
622
+ }, fs = { class: "timeline-list-panel" }, ps = { class: "timeline-list" }, vs = { class: "timeline-detail-panel" }, hs = /* @__PURE__ */ ce({
623
+ __name: "TimelinePage",
624
+ setup(u) {
625
+ const t = Re(), o = he(), { send: b, on: c, connected: $ } = Ie(), g = F(!1), p = F(null), D = [
626
+ "GET",
627
+ "POST",
628
+ "PUT",
629
+ "PATCH",
630
+ "DELETE",
631
+ "OPTIONS",
632
+ "HEAD",
633
+ "TRACE"
634
+ ], T = ["2xx", "3xx", "4xx", "5xx"];
635
+ function R() {
636
+ $.value && (t.setLoading(!0), b({ type: "get:timeline" }));
637
+ }
638
+ function H(y) {
639
+ t.setTimelineData(y, o.specIds[0] ?? "default"), t.setLoading(!1);
640
+ }
641
+ function Q(y) {
642
+ t.addRequest(y, o.specIds[0] ?? "default");
643
+ }
644
+ function z(y) {
645
+ t.addResponse(y);
646
+ }
647
+ function L() {
648
+ t.clearTimeline();
649
+ }
650
+ function U() {
651
+ b({ type: "clear:timeline" }), t.clearTimeline();
652
+ }
653
+ function x(y) {
654
+ t.selectEntry(y);
655
+ }
656
+ function l(y) {
657
+ const _ = y.target;
658
+ t.setSearchQuery(_.value);
659
+ }
660
+ function v() {
661
+ t.setSearchQuery(""), p.value?.focus();
662
+ }
663
+ function k(y) {
664
+ t.toggleMethodFilter(y);
665
+ }
666
+ function J(y) {
667
+ return t.filter.methods.includes(y);
668
+ }
669
+ function ie(y) {
670
+ t.toggleStatusFilter(y);
671
+ }
672
+ function le(y) {
673
+ return t.filter.statusCodes.includes(y);
674
+ }
675
+ function ae() {
676
+ const y = t.filter.simulatedOnly;
677
+ t.setSimulatedFilter(y === !0 ? null : !0);
678
+ }
679
+ function K() {
680
+ t.clearFilters();
681
+ }
682
+ function oe() {
683
+ g.value = !g.value;
684
+ }
685
+ const V = f(() => t.hasActiveFilters()), X = f(() => t.filter.methods.length + t.filter.statusCodes.length + (t.filter.simulatedOnly !== null ? 1 : 0));
686
+ let Y = null, ee = null, te = null, se = null;
687
+ return qe(() => {
688
+ Y = c("timeline", H), ee = c("request", Q), te = c("response", z), se = c("timeline:cleared", L), $.value && R();
689
+ }), Ce(() => {
690
+ Y?.(), ee?.(), te?.(), se?.();
691
+ }), $e($, (y) => {
692
+ y && R();
693
+ }), (y, _) => (a(), r("div", At, [
694
+ e("div", Nt, [
695
+ e("div", jt, [
696
+ q(i(_e), {
697
+ size: 16,
698
+ class: "timeline-search__icon"
699
+ }),
700
+ e("input", {
701
+ ref_key: "searchInputRef",
702
+ ref: p,
703
+ type: "text",
704
+ class: "timeline-search__input input",
705
+ placeholder: "Search by path or operation...",
706
+ value: i(t).filter.searchQuery,
707
+ onInput: l
708
+ }, null, 40, Pt),
709
+ i(t).filter.searchQuery ? (a(), r("button", {
710
+ key: 0,
711
+ type: "button",
712
+ class: "timeline-search__clear btn btn--ghost btn--icon",
713
+ title: "Clear search",
714
+ onClick: v
715
+ }, [
716
+ q(i(fe), { size: 14 })
717
+ ])) : C("", !0)
718
+ ]),
719
+ e("button", {
720
+ type: "button",
721
+ class: O([
722
+ "timeline-filter-toggle btn btn--secondary",
723
+ { "timeline-filter-toggle--active": V.value }
724
+ ]),
725
+ "aria-expanded": g.value,
726
+ onClick: oe
727
+ }, [
728
+ q(i(Se), { size: 16 }),
729
+ _[0] || (_[0] = e("span", null, "Filters", -1)),
730
+ X.value > 0 ? (a(), r("span", Jt, m(X.value), 1)) : C("", !0),
731
+ (a(), I(B(g.value ? i(Te) : i(N)), { size: 14 }))
732
+ ], 10, Ut),
733
+ e("div", Vt, [
734
+ e("span", Wt, m(i(t).filteredEntries.length) + " requests ", 1),
735
+ i(t).averageDuration > 0 ? (a(), r("span", Zt, "|")) : C("", !0),
736
+ i(t).averageDuration > 0 ? (a(), r("span", Gt, " avg " + m(i(t).averageDuration) + "ms ", 1)) : C("", !0)
737
+ ]),
738
+ e("button", {
739
+ type: "button",
740
+ class: "btn btn--secondary btn--icon",
741
+ title: "Clear timeline",
742
+ disabled: i(t).entries.length === 0,
743
+ onClick: U
744
+ }, [
745
+ q(i(Be), { size: 16 })
746
+ ], 8, Kt)
747
+ ]),
748
+ g.value ? (a(), r("div", Xt, [
749
+ e("div", Yt, [
750
+ _[1] || (_[1] = e("h4", { class: "timeline-filters__title" }, "Methods", -1)),
751
+ e("div", es, [
752
+ (a(), r(M, null, j(D, (h) => e("button", {
753
+ key: h,
754
+ type: "button",
755
+ class: O([
756
+ "method-badge",
757
+ `method-badge--${h.toLowerCase()}`,
758
+ { "method-badge--inactive": !J(h) && i(t).filter.methods.length > 0 }
759
+ ]),
760
+ onClick: (re) => k(h)
761
+ }, m(h), 11, ts)), 64))
762
+ ])
763
+ ]),
764
+ e("div", ss, [
765
+ _[2] || (_[2] = e("h4", { class: "timeline-filters__title" }, "Status", -1)),
766
+ e("div", ns, [
767
+ (a(), r(M, null, j(T, (h) => e("button", {
768
+ key: h,
769
+ type: "button",
770
+ class: O([
771
+ "timeline-filters__status-btn",
772
+ `timeline-filters__status-btn--${h}`,
773
+ { "timeline-filters__status-btn--active": le(h) }
774
+ ]),
775
+ onClick: (re) => ie(h)
776
+ }, [
777
+ A(m(h) + " ", 1),
778
+ e("span", ls, " (" + m(i(t).statusCounts[h]) + ") ", 1)
779
+ ], 10, is)), 64))
780
+ ])
781
+ ]),
782
+ e("div", as, [
783
+ _[3] || (_[3] = e("h4", { class: "timeline-filters__title" }, "Type", -1)),
784
+ e("div", os, [
785
+ e("button", {
786
+ type: "button",
787
+ class: O([
788
+ "timeline-filters__status-btn",
789
+ { "timeline-filters__status-btn--active": i(t).filter.simulatedOnly }
790
+ ]),
791
+ onClick: ae
792
+ }, " Simulated only ", 2)
793
+ ])
794
+ ]),
795
+ V.value ? (a(), r("div", rs, [
796
+ e("button", {
797
+ type: "button",
798
+ class: "btn btn--ghost",
799
+ onClick: K
800
+ }, [
801
+ q(i(fe), { size: 14 }),
802
+ _[4] || (_[4] = A(" Clear all filters ", -1))
803
+ ])
804
+ ])) : C("", !0)
805
+ ])) : C("", !0),
806
+ e("div", us, [
807
+ i(t).isLoading ? (a(), r("div", ds, [..._[5] || (_[5] = [
808
+ e("div", { class: "timeline-loading__spinner" }, null, -1),
809
+ e("span", { class: "text-muted" }, "Loading timeline...", -1)
810
+ ])])) : i(t).error ? (a(), r("div", cs, [
811
+ e("p", ms, m(i(t).error), 1),
812
+ e("button", {
813
+ type: "button",
814
+ class: "btn btn--primary",
815
+ onClick: R
816
+ }, " Retry ")
817
+ ])) : i(t).entries.length === 0 ? (a(), r("div", ys, [
818
+ q(i(P), {
819
+ size: 48,
820
+ class: "empty-state__icon"
821
+ }),
822
+ _[6] || (_[6] = e("h3", { class: "empty-state__title" }, "No requests yet", -1)),
823
+ _[7] || (_[7] = e("p", { class: "empty-state__description" }, " API requests will appear here in real-time as they are made. ", -1))
824
+ ])) : i(t).filteredEntries.length === 0 ? (a(), r("div", _s, [
825
+ q(i(_e), {
826
+ size: 48,
827
+ class: "empty-state__icon"
828
+ }),
829
+ _[8] || (_[8] = e("h3", { class: "empty-state__title" }, "No matching requests", -1)),
830
+ _[9] || (_[9] = e("p", { class: "empty-state__description" }, " Try adjusting your search or filters. ", -1)),
831
+ V.value ? (a(), r("button", {
832
+ key: 0,
833
+ type: "button",
834
+ class: "btn btn--secondary",
835
+ onClick: K
836
+ }, " Clear filters ")) : C("", !0)
837
+ ])) : (a(), r(M, { key: 4 }, [
838
+ e("div", fs, [
839
+ e("div", ps, [
840
+ (a(!0), r(M, null, j(i(t).filteredEntries, (h) => (a(), I(Mt, {
841
+ key: h.id,
842
+ entry: h,
843
+ "is-selected": i(t).selectedEntryId === h.id,
844
+ onSelect: x
845
+ }, null, 8, ["entry", "is-selected"]))), 128))
846
+ ])
847
+ ]),
848
+ e("div", vs, [
849
+ q(Bt, {
850
+ entry: i(t).selectedEntry
851
+ }, null, 8, ["entry"])
852
+ ])
853
+ ], 64))
854
+ ])
855
+ ]));
856
+ }
857
+ }), Ts = /* @__PURE__ */ me(hs, [["__scopeId", "data-v-a88e616b"]]);
858
+ export {
859
+ Ts as default
860
+ };
861
+ //# sourceMappingURL=TimelinePage-D_GD3OjL.js.map