@scalar/api-client 2.0.57 → 2.0.58

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 (57) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +61 -58
  5. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +31 -25
  7. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  8. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +51 -45
  9. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +47 -41
  11. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -40
  13. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  14. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +67 -61
  15. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  16. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +30 -30
  17. package/dist/components/TopNav/TopNav.vue.d.ts +20 -1
  18. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  19. package/dist/components/TopNav/TopNav.vue.js +2 -2
  20. package/dist/components/TopNav/TopNav.vue2.js +64 -49
  21. package/dist/layouts/App/ApiClientApp.vue.d.ts +11 -1
  22. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  23. package/dist/layouts/App/ApiClientApp.vue.js +53 -49
  24. package/dist/libs/event-busses/cancel-request-bus.d.ts +2 -0
  25. package/dist/libs/event-busses/cancel-request-bus.d.ts.map +1 -0
  26. package/dist/libs/event-busses/cancel-request-bus.js +5 -0
  27. package/dist/libs/event-busses/hot-keys-bus.d.ts +3 -1
  28. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
  29. package/dist/libs/event-busses/hot-keys-bus.js +1 -0
  30. package/dist/libs/event-busses/index.d.ts +2 -1
  31. package/dist/libs/event-busses/index.d.ts.map +1 -1
  32. package/dist/libs/event-busses/index.js +11 -8
  33. package/dist/libs/index.js +21 -18
  34. package/dist/libs/local-storage.js +1 -1
  35. package/dist/libs/sendRequest.d.ts +2 -2
  36. package/dist/libs/sendRequest.d.ts.map +1 -1
  37. package/dist/libs/sendRequest.js +22 -21
  38. package/dist/store/workspace.d.ts.map +1 -1
  39. package/dist/store/workspace.js +100 -103
  40. package/dist/style.css +1 -1
  41. package/dist/views/Request/Request.vue.d.ts +11 -1
  42. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  43. package/dist/views/Request/Request.vue.js +3 -3
  44. package/dist/views/Request/Request.vue2.js +184 -174
  45. package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -0
  46. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  47. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  48. package/dist/views/Request/RequestSidebarItem.vue2.js +139 -130
  49. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts +3 -0
  50. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -0
  51. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +7 -0
  52. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +39 -0
  53. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  54. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -30
  55. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  56. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +23 -21
  57. package/package.json +7 -7
@@ -1,14 +1,15 @@
1
- import { defineComponent as pe, useCssVars as ce, computed as n, ref as H, resolveComponent as ve, openBlock as m, createElementBlock as M, Fragment as G, createElementVNode as l, normalizeClass as v, unref as i, createVNode as o, withCtx as d, createBlock as b, toDisplayString as J, createCommentVNode as y, createTextVNode as D, renderSlot as be, withDirectives as ge, renderList as he, vShow as Ue, withKeys as we, withModifiers as ye, pushScopeId as De, popScopeId as ke } from "vue";
2
- import qe from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
- import { PathId as I } from "../../router.js";
4
- import { useWorkspace as Re } from "../../store/workspace.js";
5
- import { useModal as Q, ScalarContextMenu as X, ScalarIcon as $e, ScalarModal as Y, ScalarTextField as xe, ScalarButton as Z } from "@scalar/components";
6
- import { Draggable as Se } from "@scalar/draggable";
7
- import { useRouter as Ce, RouterLink as Me } from "vue-router";
8
- import q from "./RequestSidebarItemMenu.vue.js";
9
- import Ie from "../../components/HttpMethod/HttpMethod.vue.js";
10
- import { useSidebar as Te } from "../../hooks/useSidebar.js";
11
- const Ee = (g) => (De("data-v-f405c234"), g = g(), ke(), g), ze = { class: "flex flex-row gap-1 items-center" }, Ne = { class: "relative" }, Ve = { class: "flex items-start" }, Oe = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, Be = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, Fe = { class: "relative flex h-fit" }, je = /* @__PURE__ */ Ee(() => /* @__PURE__ */ l("span", null, " ", -1)), Ke = { key: 2 }, Le = { class: "flex gap-3" }, _ = "hover:bg-sidebar-active-b indent-padding-left", _e = /* @__PURE__ */ pe({
1
+ import { defineComponent as he, useCssVars as Ue, computed as o, ref as J, resolveComponent as we, openBlock as f, createElementBlock as I, Fragment as Q, createElementVNode as l, normalizeClass as b, unref as i, createVNode as d, withCtx as u, createBlock as g, withModifiers as X, toDisplayString as Y, createCommentVNode as y, createTextVNode as D, renderSlot as ye, withDirectives as De, renderList as ke, vShow as qe, withKeys as $e, pushScopeId as Re, popScopeId as Ce } from "vue";
2
+ import Se from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
+ import { PathId as E } from "../../router.js";
4
+ import { useWorkspace as xe } from "../../store/workspace.js";
5
+ import { useModal as Z, ScalarContextMenu as _, ScalarIcon as Me, ScalarModal as ee, ScalarTextField as Te, ScalarButton as te } from "@scalar/components";
6
+ import { Draggable as Ie } from "@scalar/draggable";
7
+ import { useRouter as Ee, RouterLink as Ne } from "vue-router";
8
+ import R from "./RequestSidebarItemMenu.vue.js";
9
+ import ze from "../../components/HttpMethod/HttpMethod.vue.js";
10
+ import { useSidebar as Ve } from "../../hooks/useSidebar.js";
11
+ import { getModifiers as Oe } from "../../libs/event-busses/hot-keys-bus.js";
12
+ const Be = (h) => (Re("data-v-12eca20d"), h = h(), Ce(), h), Fe = { class: "flex flex-row gap-1 items-center" }, je = { class: "relative" }, Pe = { class: "flex items-start" }, Ke = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, Le = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, We = { class: "relative flex h-fit" }, Ae = /* @__PURE__ */ Be(() => /* @__PURE__ */ l("span", null, " ", -1)), He = { key: 2 }, Ge = { class: "flex gap-3" }, ie = "hover:bg-sidebar-active-b indent-padding-left", lt = /* @__PURE__ */ he({
12
13
  __name: "RequestSidebarItem",
13
14
  props: {
14
15
  isDraggable: { type: Boolean, default: !1 },
@@ -16,154 +17,161 @@ const Ee = (g) => (De("data-v-f405c234"), g = g(), ke(), g), ze = { class: "flex
16
17
  parentUids: {},
17
18
  item: {}
18
19
  },
19
- emits: ["onDragEnd"],
20
- setup(g) {
21
- ce((e) => ({
22
- 49329293: se.value,
23
- f2dc136a: le.value
20
+ emits: ["onDragEnd", "newTab"],
21
+ setup(h, { emit: se }) {
22
+ Ue((e) => ({
23
+ "4347e458": de.value,
24
+ a65fb12c: ue.value
24
25
  }));
25
- const t = g, {
26
- activeRequest: T,
27
- activeRouterParams: R,
28
- activeWorkspace: h,
29
- collections: E,
30
- folders: ee,
26
+ const t = h, re = se, {
27
+ activeRequest: N,
28
+ activeRouterParams: C,
29
+ activeWorkspace: U,
30
+ collections: z,
31
+ folders: le,
31
32
  isReadOnly: a,
32
- requests: z,
33
- requestExamples: $,
34
- collectionMutators: N,
35
- folderMutators: V,
36
- requestMutators: O,
37
- requestExampleMutators: B
38
- } = Re(), { replace: F } = Ce(), { collapsedSidebarFolders: j, toggleSidebarFolder: te } = Te(), ie = n(() => "childUids" in t.item), K = n(() => "spec" in t.item), L = n(() => "summary" in t.item), se = n(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), le = n(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), x = (e) => {
33
+ requests: V,
34
+ requestExamples: S,
35
+ collectionMutators: O,
36
+ folderMutators: B,
37
+ requestMutators: F,
38
+ requestExampleMutators: j,
39
+ router: ae
40
+ } = xe(), { replace: P } = Ee(), { collapsedSidebarFolders: K, toggleSidebarFolder: ne } = Ve(), oe = o(() => "childUids" in t.item), L = o(() => "spec" in t.item), W = o(() => "summary" in t.item), de = o(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), ue = o(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), k = (e) => {
39
41
  var s;
40
42
  return "spec" in e ? (s = e.spec.info) == null ? void 0 : s.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
41
- }, re = n(() => ("requestUid" in t.item ? z[t.item.requestUid] : t.item).method), ae = n(
43
+ }, me = o(() => ("requestUid" in t.item ? V[t.item.requestUid] : t.item).method), fe = o(
42
44
  () => {
43
45
  var e;
44
- return j[t.item.uid] || ((e = T.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
46
+ return K[t.item.uid] || ((e = N.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
45
47
  }
46
- ), ne = () => "requestUid" in t.item ? `/workspace/${h.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${h.value.uid}/request/${t.item.uid}`, oe = n(
47
- () => R.value[I.Request] === "default" && T.value.uid === t.item.uid
48
- ), S = H(null), W = n(() => {
48
+ ), A = () => "requestUid" in t.item ? `/workspace/${U.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${U.value.uid}/request/${t.item.uid}`, pe = o(
49
+ () => C.value[E.Request] === "default" && N.value.uid === t.item.uid
50
+ ), x = J(null), H = o(() => {
49
51
  let e = 0.5, s = 0.5;
50
- if (!S.value) return { ceiling: e, floor: s };
51
- const { draggingItem: w } = S.value;
52
- return !E[w == null ? void 0 : w.id] && K.value ? (e = 1, s = 0) : ie.value && !L.value && !K.value && (e = 0.8, s = 0.2), { ceiling: e, floor: s };
53
- }), de = (e, s) => !(h.value.isReadOnly || $[s.id] || E[e.id]), p = H(""), k = Q(), U = Q(), P = () => {
54
- "summary" in t.item ? O.edit(t.item.uid, "summary", p.value) : "requestUid" in t.item ? B.edit(t.item.uid, "name", p.value) : "spec" in t.item ? N.edit(t.item.uid, "spec.info.title", p.value) : V.edit(t.item.uid, "name", p.value), k.hide();
55
- }, C = () => {
56
- p.value = x(t.item) || "", k.show();
57
- }, ue = () => {
58
- "requestUid" in t.item ? (B.delete(t.item), R.value[I.Examples] === t.item.uid && F(`/workspace/${h.value}/request/default`)) : "summary" in t.item ? (O.delete(
52
+ if (!x.value) return { ceiling: e, floor: s };
53
+ const { draggingItem: v } = x.value;
54
+ return !z[v == null ? void 0 : v.id] && L.value ? (e = 1, s = 0) : oe.value && !W.value && !L.value && (e = 0.8, s = 0.2), { ceiling: e, floor: s };
55
+ }), ce = (e, s) => !(U.value.isReadOnly || S[s.id] || z[e.id]), p = J(""), q = Z(), w = Z(), G = () => {
56
+ "summary" in t.item ? F.edit(t.item.uid, "summary", p.value) : "requestUid" in t.item ? j.edit(t.item.uid, "name", p.value) : "spec" in t.item ? O.edit(t.item.uid, "spec.info.title", p.value) : B.edit(t.item.uid, "name", p.value), q.hide();
57
+ }, M = () => {
58
+ p.value = k(t.item) || "", q.show();
59
+ }, ve = () => {
60
+ "requestUid" in t.item ? (j.delete(t.item), C.value[E.Examples] === t.item.uid && P(`/workspace/${U.value}/request/default`)) : "summary" in t.item ? (F.delete(
59
61
  t.item,
60
62
  t.parentUids[t.parentUids.length - 1]
61
- ), R.value[I.Request] === t.item.uid && F(`/workspace/${h.value.uid}/request/default`)) : "spec" in t.item ? N.delete(t.item) : "name" in t.item && V.delete(
63
+ ), C.value[E.Request] === t.item.uid && P(`/workspace/${U.value.uid}/request/default`)) : "spec" in t.item ? O.delete(t.item) : "name" in t.item && B.delete(
62
64
  t.item,
63
65
  t.parentUids[t.parentUids.length - 1]
64
66
  );
65
- }, me = n(() => {
67
+ }, be = o(() => {
66
68
  var e;
67
69
  return "summary" in t.item ? t.item.summary || "" : "name" in t.item ? t.item.name || "" : "spec" in t.item && ((e = t.item.spec.info) == null ? void 0 : e.title) || "";
68
- }), c = n(() => "requestUid" in t.item ? "Example" : "summary" in t.item ? "Request" : "spec" in t.item ? "Collection" : "Folder");
70
+ }), c = o(() => "requestUid" in t.item ? "Example" : "summary" in t.item ? "Request" : "spec" in t.item ? "Collection" : "Folder"), ge = (e, s) => {
71
+ e && (Oe(["default"]).some(($) => e[$]) ? re("newTab", k(s) || "", s.uid) : ae.push(A()));
72
+ };
69
73
  return (e, s) => {
70
- const w = ve("RequestSidebarItem", !0);
71
- return m(), M(G, null, [
74
+ const v = we("RequestSidebarItem", !0);
75
+ return f(), I(Q, null, [
72
76
  l("div", {
73
- class: v(["relative flex flex-row", [
77
+ class: b(["relative flex flex-row", [
74
78
  i(a) && e.parentUids.length > 1 || !i(a) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
75
79
  ]])
76
80
  }, [
77
- o(i(Se), {
81
+ d(i(Ie), {
78
82
  id: e.item.uid,
79
83
  ref_key: "draggableRef",
80
- ref: S,
81
- ceiling: W.value.ceiling,
84
+ ref: x,
85
+ ceiling: H.value.ceiling,
82
86
  class: "flex flex-1 flex-col gap-[.5px] text-sm",
83
- floor: W.value.floor,
87
+ floor: H.value.floor,
84
88
  isDraggable: e.isDraggable,
85
89
  isDroppable: e.isDroppable,
86
90
  parentIds: e.parentUids,
87
- onOnDragEnd: s[5] || (s[5] = (...f) => e.$emit("onDragEnd", ...f))
91
+ onOnDragEnd: s[6] || (s[6] = (...m) => e.$emit("onDragEnd", ...m))
88
92
  }, {
89
- default: d(() => {
90
- var f, A;
93
+ default: u(() => {
94
+ var m, $;
91
95
  return [
92
- "summary" in e.item || "requestUid" in e.item ? (m(), b(i(Me), {
96
+ "summary" in e.item || "requestUid" in e.item ? (f(), g(i(Ne), {
93
97
  key: 0,
94
98
  class: "no-underline",
95
- to: ne()
99
+ to: A(),
100
+ onClick: s[2] || (s[2] = X(
101
+ (r) => ge(r, e.item),
102
+ ["prevent"]
103
+ ))
96
104
  }, {
97
- default: d(({ isExactActive: r }) => [
98
- o(i(X), { disabled: i(a) }, {
99
- trigger: d(() => [
105
+ default: u(({ isExactActive: r }) => [
106
+ d(i(_), { disabled: i(a) }, {
107
+ trigger: u(() => [
100
108
  l("div", {
101
- class: v(["group relative flex min-h-8 cursor-pointer flex-row items-start justify-between gap-2 py-1.5 pr-2 rounded editable-sidebar-hover w-full", [
102
- _,
103
- r || oe.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
109
+ class: b(["group relative flex min-h-8 cursor-pointer flex-row items-start justify-between gap-2 py-1.5 pr-2 rounded editable-sidebar-hover w-full", [
110
+ ie,
111
+ r || pe.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
104
112
  ]]),
105
113
  tabindex: "0"
106
114
  }, [
107
115
  l("span", {
108
- class: v(["z-10 font-medium w-full pl-2 word-break-break-word", {
116
+ class: b(["z-10 font-medium w-full pl-2 word-break-break-word", {
109
117
  "editable-sidebar-hover-item": !i(a)
110
118
  }])
111
- }, J(x(e.item)), 3),
112
- l("div", ze, [
113
- l("div", Ne, [
114
- i(a) ? y("", !0) : (m(), b(q, {
119
+ }, Y(k(e.item)), 3),
120
+ l("div", Fe, [
121
+ l("div", je, [
122
+ i(a) ? y("", !0) : (f(), g(R, {
115
123
  key: 0,
116
124
  item: e.item,
117
125
  parentUids: e.parentUids,
118
126
  resourceTitle: c.value,
119
- onDelete: s[0] || (s[0] = (u) => i(U).show()),
120
- onRename: C
127
+ onDelete: s[0] || (s[0] = (n) => i(w).show()),
128
+ onRename: M
121
129
  }, null, 8, ["item", "parentUids", "resourceTitle"]))
122
130
  ]),
123
- l("span", Ve, [
131
+ l("span", Pe, [
124
132
  D("   "),
125
- o(i(Ie), {
133
+ d(i(ze), {
126
134
  class: "font-bold",
127
- method: re.value
135
+ method: me.value
128
136
  }, null, 8, ["method"])
129
137
  ])
130
138
  ])
131
139
  ], 2)
132
140
  ]),
133
- content: d(() => [
134
- o(q, {
141
+ content: u(() => [
142
+ d(R, {
135
143
  item: e.item,
136
144
  parentUids: e.parentUids,
137
145
  resourceTitle: c.value,
138
146
  static: "",
139
- onDelete: s[1] || (s[1] = (u) => i(U).show()),
140
- onRename: C
147
+ onDelete: s[1] || (s[1] = (n) => i(w).show()),
148
+ onRename: M
141
149
  }, null, 8, ["item", "parentUids", "resourceTitle"])
142
150
  ]),
143
151
  _: 2
144
152
  }, 1032, ["disabled"])
145
153
  ]),
146
154
  _: 1
147
- }, 8, ["to"])) : !i(a) || e.parentUids.length ? (m(), b(i(X), {
155
+ }, 8, ["to"])) : !i(a) || e.parentUids.length ? (f(), g(i(_), {
148
156
  key: 1,
149
- disabled: i(a) || ((A = (f = e.item.spec) == null ? void 0 : f.info) == null ? void 0 : A.title) === "Drafts"
157
+ disabled: i(a) || (($ = (m = e.item.spec) == null ? void 0 : m.info) == null ? void 0 : $.title) === "Drafts"
150
158
  }, {
151
- trigger: d(() => {
152
- var r, u;
159
+ trigger: u(() => {
160
+ var r, n;
153
161
  return [
154
162
  l("button", {
155
- class: v(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", _]),
163
+ class: b(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", ie]),
156
164
  type: "button",
157
- onClick: s[2] || (s[2] = (fe) => i(te)(e.item.uid))
165
+ onClick: s[3] || (s[3] = (T) => i(ne)(e.item.uid))
158
166
  }, [
159
- l("span", Oe, [
160
- be(e.$slots, "leftIcon", {}, () => [
167
+ l("span", Ke, [
168
+ ye(e.$slots, "leftIcon", {}, () => [
161
169
  l("div", {
162
- class: v({
163
- "rotate-90": i(j)[e.item.uid]
170
+ class: b({
171
+ "rotate-90": i(K)[e.item.uid]
164
172
  })
165
173
  }, [
166
- o(i($e), {
174
+ d(i(Me), {
167
175
  class: "text-c-3 text-sm",
168
176
  icon: "ChevronRight",
169
177
  size: "sm",
@@ -173,104 +181,105 @@ const Ee = (g) => (De("data-v-f405c234"), g = g(), ke(), g), ze = { class: "flex
173
181
  ], !0),
174
182
  D("   ")
175
183
  ]),
176
- l("div", Be, [
184
+ l("div", Le, [
177
185
  l("span", {
178
- class: v(["z-10 font-medium text-left w-full word-break-break-word", {
186
+ class: b(["z-10 font-medium text-left w-full word-break-break-word", {
179
187
  "editable-sidebar-hover-item": !i(a)
180
188
  }])
181
- }, J(x(e.item)), 3),
182
- l("div", Fe, [
183
- !i(a) && ((u = (r = e.item.spec) == null ? void 0 : r.info) == null ? void 0 : u.title) !== "Drafts" ? (m(), b(q, {
189
+ }, Y(k(e.item)), 3),
190
+ l("div", We, [
191
+ !i(a) && ((n = (r = e.item.spec) == null ? void 0 : r.info) == null ? void 0 : n.title) !== "Drafts" ? (f(), g(R, {
184
192
  key: 0,
185
193
  item: e.item,
186
194
  parentUids: e.parentUids,
187
195
  resourceTitle: c.value
188
196
  }, null, 8, ["item", "parentUids", "resourceTitle"])) : y("", !0),
189
- je
197
+ Ae
190
198
  ])
191
199
  ])
192
200
  ])
193
201
  ];
194
202
  }),
195
- content: d(() => {
196
- var r, u;
203
+ content: u(() => {
204
+ var r, n;
197
205
  return [
198
- !i(a) && ((u = (r = e.item.spec) == null ? void 0 : r.info) == null ? void 0 : u.title) !== "Drafts" ? (m(), b(q, {
206
+ !i(a) && ((n = (r = e.item.spec) == null ? void 0 : r.info) == null ? void 0 : n.title) !== "Drafts" ? (f(), g(R, {
199
207
  key: 0,
200
208
  item: e.item,
201
209
  parentUids: e.parentUids,
202
210
  resourceTitle: c.value,
203
211
  static: "",
204
- onDelete: s[3] || (s[3] = (fe) => i(U).show()),
205
- onRename: C
212
+ onDelete: s[4] || (s[4] = (T) => i(w).show()),
213
+ onRename: M
206
214
  }, null, 8, ["item", "parentUids", "resourceTitle"])) : y("", !0)
207
215
  ];
208
216
  }),
209
- default: d(() => [
217
+ default: u(() => [
210
218
  D(" > ")
211
219
  ]),
212
220
  _: 3
213
221
  }, 8, ["disabled"])) : y("", !0),
214
- "childUids" in e.item ? ge((m(), M("div", Ke, [
215
- (m(!0), M(G, null, he(L.value ? e.item.childUids.slice(1) : e.item.childUids, (r) => (m(), b(w, {
222
+ "childUids" in e.item ? De((f(), I("div", He, [
223
+ (f(!0), I(Q, null, ke(W.value ? e.item.childUids.slice(1) : e.item.childUids, (r) => (f(), g(v, {
216
224
  key: r,
217
- isDraggable: !i($)[r],
218
- isDroppable: de,
219
- item: i(ee)[r] || i(z)[r] || i($)[r],
225
+ isDraggable: !i(S)[r],
226
+ isDroppable: ce,
227
+ item: i(le)[r] || i(V)[r] || i(S)[r],
220
228
  parentUids: [...e.parentUids, e.item.uid],
221
- onOnDragEnd: s[4] || (s[4] = (...u) => e.$emit("onDragEnd", ...u))
222
- }, null, 8, ["isDraggable", "item", "parentUids"]))), 128))
229
+ onNewTab: (n, T) => e.$emit("newTab", n, T),
230
+ onOnDragEnd: s[5] || (s[5] = (...n) => e.$emit("onDragEnd", ...n))
231
+ }, null, 8, ["isDraggable", "item", "parentUids", "onNewTab"]))), 128))
223
232
  ], 512)), [
224
- [Ue, ae.value]
233
+ [qe, fe.value]
225
234
  ]) : y("", !0)
226
235
  ];
227
236
  }),
228
237
  _: 3
229
238
  }, 8, ["id", "ceiling", "floor", "isDraggable", "isDroppable", "parentIds"])
230
239
  ], 2),
231
- o(i(Y), {
240
+ d(i(ee), {
232
241
  size: "sm",
233
- state: i(U),
242
+ state: i(w),
234
243
  title: `Delete ${c.value}`
235
244
  }, {
236
- default: d(() => [
237
- o(qe, {
238
- variableName: me.value,
245
+ default: u(() => [
246
+ d(Se, {
247
+ variableName: be.value,
239
248
  warningMessage: "Warning: Deleting this will delete all items inside of this",
240
- onClose: s[6] || (s[6] = (f) => i(U).hide()),
241
- onDelete: ue
249
+ onClose: s[7] || (s[7] = (m) => i(w).hide()),
250
+ onDelete: ve
242
251
  }, null, 8, ["variableName"])
243
252
  ]),
244
253
  _: 1
245
254
  }, 8, ["state", "title"]),
246
- o(i(Y), {
247
- state: i(k),
255
+ d(i(ee), {
256
+ state: i(q),
248
257
  title: `Rename ${c.value}`
249
258
  }, {
250
- default: d(() => [
251
- o(i(xe), {
259
+ default: u(() => [
260
+ d(i(Te), {
252
261
  modelValue: p.value,
253
- "onUpdate:modelValue": s[7] || (s[7] = (f) => p.value = f),
262
+ "onUpdate:modelValue": s[8] || (s[8] = (m) => p.value = m),
254
263
  label: c.value,
255
- onKeydown: we(ye(P, ["prevent"]), ["enter"])
264
+ onKeydown: $e(X(G, ["prevent"]), ["enter"])
256
265
  }, null, 8, ["modelValue", "label", "onKeydown"]),
257
- l("div", Le, [
258
- o(i(Z), {
266
+ l("div", Ge, [
267
+ d(i(te), {
259
268
  class: "flex-1",
260
269
  variant: "outlined",
261
- onClick: s[8] || (s[8] = (f) => i(k).hide())
270
+ onClick: s[9] || (s[9] = (m) => i(q).hide())
262
271
  }, {
263
- default: d(() => [
272
+ default: u(() => [
264
273
  D(" Cancel ")
265
274
  ]),
266
275
  _: 1
267
276
  }),
268
- o(i(Z), {
277
+ d(i(te), {
269
278
  class: "flex-1",
270
279
  type: "submit",
271
- onClick: P
280
+ onClick: G
272
281
  }, {
273
- default: d(() => [
282
+ default: u(() => [
274
283
  D(" Save ")
275
284
  ]),
276
285
  _: 1
@@ -284,5 +293,5 @@ const Ee = (g) => (De("data-v-f405c234"), g = g(), ke(), g), ze = { class: "flex
284
293
  }
285
294
  });
286
295
  export {
287
- _e as default
296
+ lt as default
288
297
  };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
3
+ //# sourceMappingURL=ResponseLoadingOverlay.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseLoadingOverlay.vue"],"names":[],"mappings":";AA2LA,wBAKG"}
@@ -0,0 +1,7 @@
1
+ import o from "./ResponseLoadingOverlay.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-7a03bf55"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,39 @@
1
+ import { defineComponent as l, ref as c, openBlock as s, createBlock as u, Transition as d, withCtx as i, unref as e, createElementBlock as m, createVNode as r, createTextVNode as f, createCommentVNode as p } from "vue";
2
+ import { useLoadingState as g, ScalarLoading as _, ScalarButton as v } from "@scalar/components";
3
+ import { cancelRequestBus as x } from "../../../libs/event-busses/cancel-request-bus.js";
4
+ import { requestStatusBus as B } from "../../../libs/event-busses/request-status-bus.js";
5
+ const L = {
6
+ key: 0,
7
+ class: "absolute inset-0 bg-b-1 z-10 flex flex-col gap-6 items-center justify-center"
8
+ }, N = /* @__PURE__ */ l({
9
+ __name: "ResponseLoadingOverlay",
10
+ setup(S) {
11
+ const t = g(), o = c();
12
+ return B.on((a) => {
13
+ a === "start" ? o.value = setTimeout(() => t.startLoading(), 1e3) : (clearTimeout(o.value), o.value = void 0, t.stopLoading());
14
+ }), (a, n) => (s(), u(d, null, {
15
+ default: i(() => [
16
+ e(t).isLoading ? (s(), m("div", L, [
17
+ r(e(_), {
18
+ class: "text-c-3",
19
+ loadingState: e(t),
20
+ size: "3xl"
21
+ }, null, 8, ["loadingState"]),
22
+ r(e(v), {
23
+ variant: "ghost",
24
+ onClick: n[0] || (n[0] = (k) => e(x).emit())
25
+ }, {
26
+ default: i(() => [
27
+ f(" Cancel ")
28
+ ]),
29
+ _: 1
30
+ })
31
+ ])) : p("", !0)
32
+ ]),
33
+ _: 1
34
+ }));
35
+ }
36
+ });
37
+ export {
38
+ N as default
39
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cAQ/C,gBAAgB;;cAAhB,gBAAgB;;AAqGlD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cAQ/C,gBAAgB;;cAAhB,gBAAgB;;AA+HlD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,43 +1,50 @@
1
- import { defineComponent as c, computed as l, openBlock as n, createElementBlock as s, createElementVNode as d, toDisplayString as t, unref as f, createCommentVNode as u, Fragment as h, createBlock as _, withCtx as v, createTextVNode as y } from "vue";
2
- import g from "../../../components/HelpfulLink.vue.js";
3
- import { httpStatusCodes as k } from "@scalar/oas-utils/helpers";
4
- import C from "pretty-bytes";
5
- import B from "pretty-ms";
6
- const I = { class: "flex gap-1.5 text-c-3 pl-1" }, N = { key: 0 }, S = { key: 1 }, x = /* @__PURE__ */ c({
1
+ import { defineComponent as y, ref as c, computed as k, openBlock as t, createElementBlock as s, toDisplayString as o, unref as m, Fragment as d, createElementVNode as g, createCommentVNode as v, createBlock as C, withCtx as B, createTextVNode as I } from "vue";
2
+ import S from "../../../components/HelpfulLink.vue.js";
3
+ import { httpStatusCodes as L } from "@scalar/oas-utils/helpers";
4
+ import N from "pretty-bytes";
5
+ import f from "pretty-ms";
6
+ import { requestStatusBus as V } from "../../../libs/event-busses/request-status-bus.js";
7
+ const w = { class: "flex gap-1.5 text-c-3 pl-1" }, E = { key: 0 }, M = { key: 0 }, q = { key: 1 }, b = /* @__PURE__ */ y({
7
8
  __name: "ResponseMetaInformation",
8
9
  props: {
9
10
  response: {}
10
11
  },
11
- setup(i) {
12
- const m = i, a = (e) => {
13
- var p;
14
- const r = parseInt(
15
- ((p = e.headers) == null ? void 0 : p["content-length"]) || "0",
12
+ setup(h) {
13
+ const _ = h, r = c(), a = c(0);
14
+ V.on((e) => {
15
+ e === "start" ? r.value = setInterval(() => a.value += 1e3, 1e3) : (clearInterval(r.value), r.value = void 0, a.value = 0);
16
+ });
17
+ const l = (e) => {
18
+ var p, i;
19
+ const u = parseInt(
20
+ ((p = e.headers) == null ? void 0 : p["Content-Length"]) || ((i = e.headers) == null ? void 0 : i["content-length"]) || "0",
16
21
  10
17
22
  );
18
- return r ? C(r) : void 0;
19
- }, o = l(() => {
20
- const e = m.response.status;
23
+ return u ? N(u) : void 0;
24
+ }, n = k(() => {
25
+ const e = _.response.status;
21
26
  if (e)
22
- return k[e] ?? void 0;
27
+ return L[e] ?? void 0;
23
28
  });
24
- return (e, r) => (n(), s("div", I, [
25
- d("span", null, t(f(B)(e.response.duration)), 1),
26
- a(e.response) ? (n(), s("span", N, t(a(e.response)), 1)) : u("", !0),
27
- o.value ? (n(), s(h, { key: 1 }, [
28
- o.value.url ? (n(), _(g, {
29
- key: 0,
30
- href: o.value.url
31
- }, {
32
- default: v(() => [
33
- y(t(e.response.status) + " " + t(o.value.name), 1)
34
- ]),
35
- _: 1
36
- }, 8, ["href"])) : (n(), s("span", S, t(e.response.status) + " " + t(o.value.name), 1))
37
- ], 64)) : u("", !0)
29
+ return (e, u) => (t(), s("div", w, [
30
+ r.value && a.value ? (t(), s("span", E, o(m(f)(a.value)), 1)) : (t(), s(d, { key: 1 }, [
31
+ g("span", null, o(m(f)(e.response.duration)), 1),
32
+ l(e.response) ? (t(), s("span", M, o(l(e.response)), 1)) : v("", !0),
33
+ n.value ? (t(), s(d, { key: 1 }, [
34
+ n.value.url ? (t(), C(S, {
35
+ key: 0,
36
+ href: n.value.url
37
+ }, {
38
+ default: B(() => [
39
+ I(o(e.response.status) + " " + o(n.value.name), 1)
40
+ ]),
41
+ _: 1
42
+ }, 8, ["href"])) : (t(), s("span", q, o(e.response.status) + " " + o(n.value.name), 1))
43
+ ], 64)) : v("", !0)
44
+ ], 64))
38
45
  ]));
39
46
  }
40
47
  });
41
48
  export {
42
- x as default
49
+ b as default
43
50
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAyGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cASrE,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAkNxC,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA6GA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cASrE,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AA2NxC,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}