@websublime/vite-plugin-open-api-devtools 0.5.0 → 0.6.0

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 (31) hide show
  1. package/dist/{ModelsPage-CWTC2dZx.js → ModelsPage-CSuUHUuV.js} +5 -5
  2. package/dist/{ModelsPage-CWTC2dZx.js.map → ModelsPage-CSuUHUuV.js.map} +1 -1
  3. package/dist/RoutesPage-D3FSr2Y6.js +520 -0
  4. package/dist/RoutesPage-D3FSr2Y6.js.map +1 -0
  5. package/dist/SimulatorPage-CzJrwWzc.js +425 -0
  6. package/dist/SimulatorPage-CzJrwWzc.js.map +1 -0
  7. package/dist/{TimelinePage-CwQC37C0.js → TimelinePage-HGh13pF3.js} +7 -7
  8. package/dist/{TimelinePage-CwQC37C0.js.map → TimelinePage-HGh13pF3.js.map} +1 -1
  9. package/dist/{check-Yd6w1NtA.js → check-BLIoatWd.js} +2 -2
  10. package/dist/{check-Yd6w1NtA.js.map → check-BLIoatWd.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-mVjPq6hT.js → format-lBEBG5Y6.js} +2 -2
  16. package/dist/{format-mVjPq6hT.js.map → format-lBEBG5Y6.js.map} +1 -1
  17. package/dist/{main-BxRf_QJn.js → main-DKt7pJsx.js} +5 -5
  18. package/dist/{main-BxRf_QJn.js.map → main-DKt7pJsx.js.map} +1 -1
  19. package/dist/registry-BQhccWMq.js +153 -0
  20. package/dist/registry-BQhccWMq.js.map +1 -0
  21. package/dist/{trash-2-kFFQD_yH.js → trash-2-RxS9jzWT.js} +2 -2
  22. package/dist/{trash-2-kFFQD_yH.js.map → trash-2-RxS9jzWT.js.map} +1 -1
  23. package/dist/{triangle-alert-jXNj-fTF.js → triangle-alert-gLhIcFT5.js} +2 -2
  24. package/dist/{triangle-alert-jXNj-fTF.js.map → triangle-alert-gLhIcFT5.js.map} +1 -1
  25. package/dist/{x-BkudkKl_.js → x-UqfnjULc.js} +2 -2
  26. package/dist/{x-BkudkKl_.js.map → x-UqfnjULc.js.map} +1 -1
  27. package/package.json +13 -13
  28. package/dist/RoutesPage-C2CUh7EQ.js +0 -666
  29. package/dist/RoutesPage-C2CUh7EQ.js.map +0 -1
  30. package/dist/SimulatorPage-BeGppUDC.js +0 -230
  31. package/dist/SimulatorPage-BeGppUDC.js.map +0 -1
@@ -1,666 +0,0 @@
1
- import { ref as $, computed as C, defineComponent as B, createElementBlock as l, openBlock as a, createVNode as p, createElementVNode as e, unref as i, normalizeClass as H, toDisplayString as _, createCommentVNode as m, createTextVNode as T, Fragment as w, renderList as M, withDirectives as de, createBlock as Y, resolveDynamicComponent as ee, vShow as re, onMounted as ue, onUnmounted as ce, watch as pe } from "vue";
2
- import { g as te, C as se, a as _e, S as X, F as he, b as fe } from "./format-mVjPq6hT.js";
3
- import { c as E, _ as P, u as ge, R as me } from "./main-BxRf_QJn.js";
4
- import { defineStore as ve } from "pinia";
5
- import { X as Z } from "./x-BkudkKl_.js";
6
- const U = E("code", [
7
- ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
8
- ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
9
- ]);
10
- const O = E("file-json", [
11
- ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
12
- ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
13
- [
14
- "path",
15
- { d: "M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1", key: "1oajmo" }
16
- ],
17
- [
18
- "path",
19
- { d: "M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1", key: "mpwhp6" }
20
- ]
21
- ]);
22
- const ye = E("lock", [
23
- ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
24
- ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
25
- ]);
26
- const ke = E("shield", [
27
- [
28
- "path",
29
- {
30
- d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
31
- key: "oel41y"
32
- }
33
- ]
34
- ]);
35
- const J = E("sprout", [
36
- ["path", { d: "M7 20h10", key: "e6iznv" }],
37
- ["path", { d: "M10 20c5.5-2.5.8-6.4 3-10", key: "161w41" }],
38
- [
39
- "path",
40
- {
41
- d: "M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z",
42
- key: "9gtqwd"
43
- }
44
- ],
45
- [
46
- "path",
47
- {
48
- d: "M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z",
49
- key: "bkxnd2"
50
- }
51
- ]
52
- ]);
53
- const Se = E("tag", [
54
- [
55
- "path",
56
- {
57
- d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
58
- key: "vktsd0"
59
- }
60
- ],
61
- ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }]
62
- ]), be = ve("registry", () => {
63
- const d = $([]), n = $({
64
- totalEndpoints: 0,
65
- withCustomHandler: 0,
66
- totalSchemas: 0,
67
- withCustomSeed: 0,
68
- autoGenerated: 0
69
- }), S = $(!1), k = $(null), h = $(""), s = $({
70
- methods: [],
71
- hasHandler: null,
72
- hasSeed: null,
73
- tags: []
74
- }), f = $(null), g = $(/* @__PURE__ */ new Set()), b = C(() => {
75
- const t = /* @__PURE__ */ new Set();
76
- for (const o of d.value)
77
- for (const u of o.tags)
78
- t.add(u);
79
- return Array.from(t).sort();
80
- }), v = C(() => {
81
- const t = /* @__PURE__ */ new Set();
82
- for (const o of d.value)
83
- o.responseSchema && t.add(o.responseSchema);
84
- return Array.from(t).sort();
85
- }), y = C(() => {
86
- let t = d.value;
87
- if (h.value.trim()) {
88
- const o = h.value.toLowerCase().trim();
89
- t = t.filter((u) => u.path.toLowerCase().includes(o) || u.operationId.toLowerCase().includes(o) || u.summary?.toLowerCase().includes(o) || u.tags.some((D) => D.toLowerCase().includes(o)));
90
- }
91
- return s.value.methods.length > 0 && (t = t.filter((o) => s.value.methods.includes(o.method))), s.value.hasHandler !== null && (t = t.filter((o) => o.hasHandler === s.value.hasHandler)), s.value.hasSeed !== null && (t = t.filter((o) => o.hasSeed === s.value.hasSeed)), s.value.tags.length > 0 && (t = t.filter(
92
- (o) => o.tags.some((u) => s.value.tags.includes(u))
93
- )), t;
94
- }), F = C(() => {
95
- const t = /* @__PURE__ */ new Map();
96
- for (const o of y.value) {
97
- let u;
98
- o.tags.length > 0 ? u = o.tags[0] : o.responseSchema ? u = o.responseSchema : u = o.path.split("/").filter(Boolean)[0] || "Other", t.has(u) || t.set(u, []), t.get(u)?.push(o);
99
- }
100
- return Array.from(t.entries()).map(([o, u]) => ({
101
- tag: o,
102
- endpoints: u.sort((D, le) => D.path.localeCompare(le.path)),
103
- isExpanded: g.value.has(o)
104
- })).sort((o, u) => o.tag.localeCompare(u.tag));
105
- }), N = C(() => f.value ? d.value.find((t) => t.key === f.value) ?? null : null), G = C(() => d.value.filter((t) => t.hasHandler).length), V = C(() => d.value.filter((t) => t.hasSeed).length);
106
- function q(t) {
107
- d.value = t.endpoints, n.value = t.stats, k.value = null;
108
- for (const o of t.endpoints)
109
- o.tags.length > 0 && g.value.add(o.tags[0]);
110
- }
111
- function Q(t) {
112
- S.value = t;
113
- }
114
- function j(t) {
115
- k.value = t, S.value = !1;
116
- }
117
- function L() {
118
- k.value = null;
119
- }
120
- function K(t) {
121
- h.value = t;
122
- }
123
- function z(t) {
124
- const o = s.value.methods.indexOf(t);
125
- o === -1 ? s.value.methods.push(t) : s.value.methods.splice(o, 1);
126
- }
127
- function R(t) {
128
- s.value.hasHandler = t;
129
- }
130
- function A(t) {
131
- s.value.hasSeed = t;
132
- }
133
- function I(t) {
134
- const o = s.value.tags.indexOf(t);
135
- o === -1 ? s.value.tags.push(t) : s.value.tags.splice(o, 1);
136
- }
137
- function c() {
138
- s.value = {
139
- methods: [],
140
- hasHandler: null,
141
- hasSeed: null,
142
- tags: []
143
- }, h.value = "";
144
- }
145
- function r() {
146
- return h.value.trim() !== "" || s.value.methods.length > 0 || s.value.hasHandler !== null || s.value.hasSeed !== null || s.value.tags.length > 0;
147
- }
148
- function x(t) {
149
- f.value = t;
150
- }
151
- function W(t) {
152
- g.value.has(t) ? g.value.delete(t) : g.value.add(t);
153
- }
154
- function ne() {
155
- for (const t of F.value)
156
- g.value.add(t.tag);
157
- }
158
- function oe() {
159
- g.value.clear();
160
- }
161
- function ie(t) {
162
- const o = new Set(t);
163
- for (const u of d.value)
164
- u.hasHandler = o.has(u.operationId);
165
- }
166
- function ae(t) {
167
- const o = new Set(t);
168
- for (const u of d.value)
169
- u.hasSeed = u.responseSchema ? o.has(u.responseSchema) : !1;
170
- }
171
- return {
172
- // State
173
- endpoints: d,
174
- stats: n,
175
- isLoading: S,
176
- error: k,
177
- searchQuery: h,
178
- filter: s,
179
- selectedEndpointKey: f,
180
- expandedTags: g,
181
- // Getters
182
- allTags: b,
183
- allSchemas: v,
184
- filteredEndpoints: y,
185
- groupedEndpoints: F,
186
- selectedEndpoint: N,
187
- handlerCount: G,
188
- seedCount: V,
189
- // Actions
190
- setRegistryData: q,
191
- setLoading: Q,
192
- setError: j,
193
- clearError: L,
194
- setSearchQuery: K,
195
- toggleMethodFilter: z,
196
- setHandlerFilter: R,
197
- setSeedFilter: A,
198
- toggleTagFilter: I,
199
- clearFilters: c,
200
- hasActiveFilters: r,
201
- selectEndpoint: x,
202
- toggleGroup: W,
203
- expandAllGroups: ne,
204
- collapseAllGroups: oe,
205
- updateHandlerStatus: ie,
206
- updateSeedStatus: ae
207
- };
208
- }), $e = { class: "endpoint-detail" }, Ce = {
209
- key: 0,
210
- class: "endpoint-detail__empty"
211
- }, xe = {
212
- key: 1,
213
- class: "endpoint-detail__content"
214
- }, He = { class: "endpoint-detail__header" }, ze = { class: "endpoint-detail__path font-mono" }, we = { class: "endpoint-detail__status" }, Ee = {
215
- key: 0,
216
- class: "endpoint-detail__status-item endpoint-detail__status-item--handler"
217
- }, Fe = {
218
- key: 1,
219
- class: "endpoint-detail__status-item endpoint-detail__status-item--seed"
220
- }, Me = {
221
- key: 2,
222
- class: "endpoint-detail__status-item endpoint-detail__status-item--security"
223
- }, Le = {
224
- key: 3,
225
- class: "endpoint-detail__status-item endpoint-detail__status-item--auto"
226
- }, Re = { class: "endpoint-detail__sections" }, Ae = { class: "endpoint-detail__section" }, Ie = { class: "endpoint-detail__section-content font-mono" }, De = {
227
- key: 0,
228
- class: "endpoint-detail__section"
229
- }, Te = { class: "endpoint-detail__section-title" }, Ne = { class: "endpoint-detail__tags" }, Ge = {
230
- key: 1,
231
- class: "endpoint-detail__section"
232
- }, Ve = { class: "endpoint-detail__section-content" }, qe = {
233
- key: 2,
234
- class: "endpoint-detail__section"
235
- }, Qe = { class: "endpoint-detail__section-content endpoint-detail__description" }, je = {
236
- key: 3,
237
- class: "endpoint-detail__section"
238
- }, Ke = { class: "endpoint-detail__section-title" }, Oe = { class: "endpoint-detail__section-content font-mono" }, Be = {
239
- key: 4,
240
- class: "endpoint-detail__section"
241
- }, Pe = { class: "endpoint-detail__section-title" }, Ue = { class: "endpoint-detail__security" }, Je = { class: "endpoint-detail__security-name font-mono" }, We = { class: "endpoint-detail__security-scopes text-muted" }, Xe = /* @__PURE__ */ B({
242
- __name: "EndpointDetail",
243
- props: {
244
- endpoint: {}
245
- },
246
- setup(d) {
247
- const n = d, S = C(() => n.endpoint?.security && n.endpoint.security.length > 0), k = C(() => n.endpoint?.security ? n.endpoint.security.map((h) => ({
248
- name: h.name,
249
- scopes: h.scopes.length > 0 ? h.scopes.join(", ") : "No scopes"
250
- })) : []);
251
- return (h, s) => (a(), l("div", $e, [
252
- d.endpoint ? (a(), l("div", xe, [
253
- e("header", He, [
254
- e("span", {
255
- class: H([
256
- "method-badge",
257
- "method-badge--large",
258
- `method-badge--${d.endpoint.method}`
259
- ])
260
- }, _(i(te)(d.endpoint.method)), 3),
261
- e("h2", ze, _(d.endpoint.path), 1)
262
- ]),
263
- e("div", we, [
264
- d.endpoint.hasHandler ? (a(), l("div", Ee, [
265
- p(i(U), { size: 14 }),
266
- s[2] || (s[2] = e("span", null, "Has custom handler", -1))
267
- ])) : m("", !0),
268
- d.endpoint.hasSeed ? (a(), l("div", Fe, [
269
- p(i(J), { size: 14 }),
270
- s[3] || (s[3] = e("span", null, "Has seed data", -1))
271
- ])) : m("", !0),
272
- S.value ? (a(), l("div", Me, [
273
- p(i(ye), { size: 14 }),
274
- s[4] || (s[4] = e("span", null, "Requires authentication", -1))
275
- ])) : m("", !0),
276
- !d.endpoint.hasHandler && !d.endpoint.hasSeed ? (a(), l("div", Le, [
277
- p(i(O), { size: 14 }),
278
- s[5] || (s[5] = e("span", null, "Auto-generated response", -1))
279
- ])) : m("", !0)
280
- ]),
281
- e("div", Re, [
282
- e("section", Ae, [
283
- s[6] || (s[6] = e("h3", { class: "endpoint-detail__section-title" }, "Operation", -1)),
284
- e("p", Ie, _(d.endpoint.operationId), 1)
285
- ]),
286
- d.endpoint.tags.length > 0 ? (a(), l("section", De, [
287
- e("h3", Te, [
288
- p(i(Se), { size: 14 }),
289
- s[7] || (s[7] = T(" Tags ", -1))
290
- ]),
291
- e("div", Ne, [
292
- (a(!0), l(w, null, M(d.endpoint.tags, (f) => (a(), l("span", {
293
- key: f,
294
- class: "endpoint-detail__tag"
295
- }, _(f), 1))), 128))
296
- ])
297
- ])) : m("", !0),
298
- d.endpoint.summary ? (a(), l("section", Ge, [
299
- s[8] || (s[8] = e("h3", { class: "endpoint-detail__section-title" }, "Summary", -1)),
300
- e("p", Ve, _(d.endpoint.summary), 1)
301
- ])) : m("", !0),
302
- d.endpoint.description ? (a(), l("section", qe, [
303
- s[9] || (s[9] = e("h3", { class: "endpoint-detail__section-title" }, "Description", -1)),
304
- e("p", Qe, _(d.endpoint.description), 1)
305
- ])) : m("", !0),
306
- d.endpoint.responseSchema ? (a(), l("section", je, [
307
- e("h3", Ke, [
308
- p(i(O), { size: 14 }),
309
- s[10] || (s[10] = T(" Response Schema ", -1))
310
- ]),
311
- e("p", Oe, _(d.endpoint.responseSchema), 1)
312
- ])) : m("", !0),
313
- S.value ? (a(), l("section", Be, [
314
- e("h3", Pe, [
315
- p(i(ke), { size: 14 }),
316
- s[11] || (s[11] = T(" Security ", -1))
317
- ]),
318
- e("div", Ue, [
319
- (a(!0), l(w, null, M(k.value, (f) => (a(), l("div", {
320
- key: f.name,
321
- class: "endpoint-detail__security-item"
322
- }, [
323
- e("span", Je, _(f.name), 1),
324
- e("span", We, _(f.scopes), 1)
325
- ]))), 128))
326
- ])
327
- ])) : m("", !0)
328
- ])
329
- ])) : (a(), l("div", Ce, [
330
- p(i(O), {
331
- size: 48,
332
- class: "endpoint-detail__empty-icon"
333
- }),
334
- s[0] || (s[0] = e("h3", { class: "endpoint-detail__empty-title" }, "No endpoint selected", -1)),
335
- s[1] || (s[1] = e("p", { class: "endpoint-detail__empty-text text-muted" }, " Select an endpoint from the list to view its details ", -1))
336
- ]))
337
- ]));
338
- }
339
- }), Ze = /* @__PURE__ */ P(Xe, [["__scopeId", "data-v-c66a0f52"]]), Ye = { class: "endpoint-list" }, et = {
340
- key: 0,
341
- class: "endpoint-list__empty"
342
- }, tt = {
343
- key: 1,
344
- class: "endpoint-list__groups"
345
- }, st = ["aria-expanded", "aria-controls", "onClick"], nt = { class: "endpoint-group__tag" }, ot = { class: "endpoint-group__count text-muted" }, it = ["id", "aria-label"], at = ["aria-selected", "onClick"], lt = { class: "endpoint-item__path font-mono" }, dt = { class: "endpoint-item__indicators" }, rt = {
346
- key: 0,
347
- class: "endpoint-item__indicator endpoint-item__indicator--handler",
348
- title: "Has custom handler"
349
- }, ut = {
350
- key: 1,
351
- class: "endpoint-item__indicator endpoint-item__indicator--seed",
352
- title: "Has seed data"
353
- }, ct = /* @__PURE__ */ B({
354
- __name: "EndpointList",
355
- props: {
356
- groups: {},
357
- selectedKey: {}
358
- },
359
- emits: ["select", "toggle-group"],
360
- setup(d, { emit: n }) {
361
- const S = d, k = n;
362
- function h(g) {
363
- k("select", g.key);
364
- }
365
- function s(g) {
366
- k("toggle-group", g);
367
- }
368
- function f(g) {
369
- return S.selectedKey === g.key;
370
- }
371
- return (g, b) => (a(), l("div", Ye, [
372
- d.groups.length === 0 ? (a(), l("div", et, [...b[0] || (b[0] = [
373
- e("p", { class: "text-muted" }, "No endpoints found", -1)
374
- ])])) : (a(), l("div", tt, [
375
- (a(!0), l(w, null, M(d.groups, (v) => (a(), l("div", {
376
- key: v.tag,
377
- class: "endpoint-group"
378
- }, [
379
- e("button", {
380
- type: "button",
381
- class: "endpoint-group__header",
382
- "aria-expanded": v.isExpanded,
383
- "aria-controls": `group-${v.tag}`,
384
- onClick: (y) => s(v.tag)
385
- }, [
386
- (a(), Y(ee(v.isExpanded ? i(se) : i(_e)), {
387
- size: 16,
388
- class: "endpoint-group__chevron"
389
- })),
390
- e("span", nt, _(v.tag), 1),
391
- e("span", ot, " (" + _(v.endpoints.length) + ") ", 1)
392
- ], 8, st),
393
- de(e("div", {
394
- id: `group-${v.tag}`,
395
- class: "endpoint-group__items",
396
- role: "group",
397
- "aria-label": `${v.tag} endpoints`
398
- }, [
399
- (a(!0), l(w, null, M(v.endpoints, (y) => (a(), l("button", {
400
- key: y.key,
401
- type: "button",
402
- class: H([
403
- "endpoint-item",
404
- { "endpoint-item--selected": f(y) }
405
- ]),
406
- "aria-selected": f(y),
407
- onClick: (F) => h(y)
408
- }, [
409
- e("span", {
410
- class: H([
411
- "method-badge",
412
- `method-badge--${y.method}`
413
- ])
414
- }, _(i(te)(y.method)), 3),
415
- e("span", lt, _(y.path), 1),
416
- e("div", dt, [
417
- y.hasHandler ? (a(), l("span", rt, [
418
- p(i(U), { size: 12 })
419
- ])) : m("", !0),
420
- y.hasSeed ? (a(), l("span", ut, [
421
- p(i(J), { size: 12 })
422
- ])) : m("", !0)
423
- ])
424
- ], 10, at))), 128))
425
- ], 8, it), [
426
- [re, v.isExpanded]
427
- ])
428
- ]))), 128))
429
- ]))
430
- ]));
431
- }
432
- }), pt = /* @__PURE__ */ P(ct, [["__scopeId", "data-v-554ffe63"]]), _t = { class: "routes-page" }, ht = { class: "routes-toolbar" }, ft = { class: "routes-search" }, gt = ["value"], mt = ["aria-expanded"], vt = {
433
- key: 0,
434
- class: "routes-filter-toggle__badge"
435
- }, yt = { class: "routes-stats" }, kt = { class: "routes-stats__item" }, St = { class: "routes-stats__item" }, bt = {
436
- key: 0,
437
- class: "routes-filters"
438
- }, $t = { class: "routes-filters__section" }, Ct = { class: "routes-filters__methods" }, xt = ["onClick"], Ht = { class: "routes-filters__section" }, zt = { class: "routes-filters__status" }, wt = {
439
- key: 0,
440
- class: "routes-filters__actions"
441
- }, Et = { class: "routes-content" }, Ft = {
442
- key: 0,
443
- class: "routes-loading"
444
- }, Mt = {
445
- key: 1,
446
- class: "routes-error"
447
- }, Lt = { class: "routes-error__message" }, Rt = {
448
- key: 2,
449
- class: "routes-empty empty-state"
450
- }, At = {
451
- key: 3,
452
- class: "routes-empty empty-state"
453
- }, It = { class: "routes-list-panel" }, Dt = { class: "routes-detail-panel" }, Tt = /* @__PURE__ */ B({
454
- __name: "RoutesPage",
455
- setup(d) {
456
- const n = be(), { send: S, on: k, connected: h } = ge(), s = $(!1), f = $(null), g = [
457
- "get",
458
- "post",
459
- "put",
460
- "patch",
461
- "delete",
462
- "options",
463
- "head",
464
- "trace"
465
- ];
466
- function b() {
467
- h.value && (n.setLoading(!0), S({ type: "get:registry" }));
468
- }
469
- function v(c) {
470
- n.setRegistryData(c), n.setLoading(!1);
471
- }
472
- function y(c) {
473
- n.selectEndpoint(c);
474
- }
475
- function F(c) {
476
- n.toggleGroup(c);
477
- }
478
- function N(c) {
479
- const r = c.target;
480
- n.setSearchQuery(r.value);
481
- }
482
- function G() {
483
- n.setSearchQuery(""), f.value?.focus();
484
- }
485
- function V(c) {
486
- n.toggleMethodFilter(c);
487
- }
488
- function q(c) {
489
- return n.filter.methods.includes(c);
490
- }
491
- function Q() {
492
- const c = n.filter.hasHandler;
493
- n.setHandlerFilter(c === !0 ? null : !0);
494
- }
495
- function j() {
496
- const c = n.filter.hasSeed;
497
- n.setSeedFilter(c === !0 ? null : !0);
498
- }
499
- function L() {
500
- n.clearFilters();
501
- }
502
- function K() {
503
- s.value = !s.value;
504
- }
505
- const z = C(() => n.hasActiveFilters());
506
- let R = null, A = null, I = null;
507
- return ue(() => {
508
- R = k("registry", v), A = k("handlers:updated", () => b()), I = k("seeds:updated", () => b()), h.value && b();
509
- }), ce(() => {
510
- R?.(), A?.(), I?.();
511
- }), pe(h, (c) => {
512
- c && b();
513
- }), (c, r) => (a(), l("div", _t, [
514
- e("div", ht, [
515
- e("div", ft, [
516
- p(i(X), {
517
- size: 16,
518
- class: "routes-search__icon"
519
- }),
520
- e("input", {
521
- ref_key: "searchInputRef",
522
- ref: f,
523
- type: "text",
524
- class: "routes-search__input input",
525
- placeholder: "Search endpoints...",
526
- value: i(n).searchQuery,
527
- onInput: N
528
- }, null, 40, gt),
529
- i(n).searchQuery ? (a(), l("button", {
530
- key: 0,
531
- type: "button",
532
- class: "routes-search__clear btn btn--ghost btn--icon",
533
- title: "Clear search",
534
- onClick: G
535
- }, [
536
- p(i(Z), { size: 14 })
537
- ])) : m("", !0)
538
- ]),
539
- e("button", {
540
- type: "button",
541
- class: H([
542
- "routes-filter-toggle btn btn--secondary",
543
- { "routes-filter-toggle--active": z.value }
544
- ]),
545
- "aria-expanded": s.value,
546
- onClick: K
547
- }, [
548
- p(i(he), { size: 16 }),
549
- r[0] || (r[0] = e("span", null, "Filters", -1)),
550
- z.value ? (a(), l("span", vt, _(i(n).filter.methods.length + (i(n).filter.hasHandler ? 1 : 0) + (i(n).filter.hasSeed ? 1 : 0)), 1)) : m("", !0),
551
- (a(), Y(ee(s.value ? i(fe) : i(se)), { size: 14 }))
552
- ], 10, mt),
553
- e("div", yt, [
554
- e("span", kt, _(i(n).filteredEndpoints.length) + " endpoints ", 1),
555
- r[1] || (r[1] = e("span", { class: "routes-stats__separator" }, "|", -1)),
556
- e("span", St, _(i(n).allTags.length) + " tags ", 1)
557
- ])
558
- ]),
559
- s.value ? (a(), l("div", bt, [
560
- e("div", $t, [
561
- r[2] || (r[2] = e("h4", { class: "routes-filters__title" }, "Methods", -1)),
562
- e("div", Ct, [
563
- (a(), l(w, null, M(g, (x) => e("button", {
564
- key: x,
565
- type: "button",
566
- class: H([
567
- "method-badge",
568
- `method-badge--${x}`,
569
- { "method-badge--inactive": !q(x) && i(n).filter.methods.length > 0 }
570
- ]),
571
- onClick: (W) => V(x)
572
- }, _(x.toUpperCase()), 11, xt)), 64))
573
- ])
574
- ]),
575
- e("div", Ht, [
576
- r[5] || (r[5] = e("h4", { class: "routes-filters__title" }, "Status", -1)),
577
- e("div", zt, [
578
- e("button", {
579
- type: "button",
580
- class: H([
581
- "routes-filters__status-btn",
582
- { "routes-filters__status-btn--active": i(n).filter.hasHandler }
583
- ]),
584
- onClick: Q
585
- }, [
586
- p(i(U), { size: 14 }),
587
- r[3] || (r[3] = e("span", null, "Has Handler", -1))
588
- ], 2),
589
- e("button", {
590
- type: "button",
591
- class: H([
592
- "routes-filters__status-btn",
593
- { "routes-filters__status-btn--active": i(n).filter.hasSeed }
594
- ]),
595
- onClick: j
596
- }, [
597
- p(i(J), { size: 14 }),
598
- r[4] || (r[4] = e("span", null, "Has Seed", -1))
599
- ], 2)
600
- ])
601
- ]),
602
- z.value ? (a(), l("div", wt, [
603
- e("button", {
604
- type: "button",
605
- class: "btn btn--ghost",
606
- onClick: L
607
- }, [
608
- p(i(Z), { size: 14 }),
609
- r[6] || (r[6] = T(" Clear all filters ", -1))
610
- ])
611
- ])) : m("", !0)
612
- ])) : m("", !0),
613
- e("div", Et, [
614
- i(n).isLoading ? (a(), l("div", Ft, [...r[7] || (r[7] = [
615
- e("div", { class: "routes-loading__spinner" }, null, -1),
616
- e("span", { class: "text-muted" }, "Loading endpoints...", -1)
617
- ])])) : i(n).error ? (a(), l("div", Mt, [
618
- e("p", Lt, _(i(n).error), 1),
619
- e("button", {
620
- type: "button",
621
- class: "btn btn--primary",
622
- onClick: b
623
- }, " Retry ")
624
- ])) : i(n).endpoints.length === 0 ? (a(), l("div", Rt, [
625
- p(i(me), {
626
- size: 48,
627
- class: "empty-state__icon"
628
- }),
629
- r[8] || (r[8] = e("h3", { class: "empty-state__title" }, "No endpoints found", -1)),
630
- r[9] || (r[9] = e("p", { class: "empty-state__description" }, " No API endpoints are available. Make sure your OpenAPI spec is loaded. ", -1))
631
- ])) : i(n).filteredEndpoints.length === 0 ? (a(), l("div", At, [
632
- p(i(X), {
633
- size: 48,
634
- class: "empty-state__icon"
635
- }),
636
- r[10] || (r[10] = e("h3", { class: "empty-state__title" }, "No matching endpoints", -1)),
637
- r[11] || (r[11] = e("p", { class: "empty-state__description" }, " Try adjusting your search or filters. ", -1)),
638
- z.value ? (a(), l("button", {
639
- key: 0,
640
- type: "button",
641
- class: "btn btn--secondary",
642
- onClick: L
643
- }, " Clear filters ")) : m("", !0)
644
- ])) : (a(), l(w, { key: 4 }, [
645
- e("div", It, [
646
- p(pt, {
647
- groups: i(n).groupedEndpoints,
648
- "selected-key": i(n).selectedEndpointKey,
649
- onSelect: y,
650
- onToggleGroup: F
651
- }, null, 8, ["groups", "selected-key"])
652
- ]),
653
- e("div", Dt, [
654
- p(Ze, {
655
- endpoint: i(n).selectedEndpoint
656
- }, null, 8, ["endpoint"])
657
- ])
658
- ], 64))
659
- ])
660
- ]));
661
- }
662
- }), jt = /* @__PURE__ */ P(Tt, [["__scopeId", "data-v-bdd419e3"]]);
663
- export {
664
- jt as default
665
- };
666
- //# sourceMappingURL=RoutesPage-C2CUh7EQ.js.map