@scalar/api-client 2.1.8 → 2.1.9

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 (78) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/assets/rabbit.ascii.js +11 -0
  3. package/dist/assets/rabbitjump.ascii.js +11 -0
  4. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  5. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  6. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +7 -7
  8. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  9. package/dist/components/ContextBar.vue.js +2 -2
  10. package/dist/components/ContextBar.vue2.js +22 -13
  11. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +1 -1
  12. package/dist/components/IconSelector.vue.d.ts.map +1 -1
  13. package/dist/components/IconSelector.vue.js +4 -3
  14. package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
  15. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  16. package/dist/components/ScalarAsciiArt.vue2.js +10 -10
  17. package/dist/components/SideNav/SideHelp.vue.js +1 -1
  18. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  19. package/dist/components/SideNav/SideNav.vue.js +2 -2
  20. package/dist/components/SideNav/SideNav.vue2.js +19 -22
  21. package/dist/components/SideNav/SideNavLink.vue.d.ts +0 -2
  22. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  23. package/dist/components/SideNav/SideNavLink.vue.js +19 -21
  24. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  25. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  26. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  27. package/dist/components/Sidebar/SidebarButton.vue.js +24 -26
  28. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
  29. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  30. package/dist/layouts/App/ApiClientApp.vue.js +4 -4
  31. package/dist/layouts/App/create-api-client-app.d.ts +2 -2
  32. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  33. package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -4
  34. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  35. package/dist/layouts/Modal/create-api-client-modal.js +19 -17
  36. package/dist/libs/create-client.d.ts +7 -18
  37. package/dist/libs/create-client.d.ts.map +1 -1
  38. package/dist/store/import-spec.d.ts +3 -2
  39. package/dist/store/import-spec.d.ts.map +1 -1
  40. package/dist/store/import-spec.js +34 -26
  41. package/dist/store/store.d.ts +4 -4
  42. package/dist/style.css +1 -1
  43. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  44. package/dist/views/Cookies/Cookies.vue2.js +74 -80
  45. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  46. package/dist/views/Environment/Environment.vue2.js +86 -92
  47. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  48. package/dist/views/Request/Request.vue.js +1 -1
  49. package/dist/views/Request/Request.vue2.js +26 -26
  50. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  51. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  52. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +88 -80
  53. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  54. package/dist/views/Request/RequestSection/RequestSection.vue.js +45 -45
  55. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  56. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  57. package/dist/views/Request/RequestSidebar.vue2.js +131 -108
  58. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  59. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  60. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +8 -5
  61. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  62. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +33 -33
  63. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  64. package/dist/views/Servers/Servers.vue2.js +48 -54
  65. package/package.json +5 -9
  66. package/dist/components/Search/SearchButton.vue.d.ts +0 -7
  67. package/dist/components/Search/SearchButton.vue.d.ts.map +0 -1
  68. package/dist/components/Search/SearchModal.vue.d.ts +0 -17
  69. package/dist/components/Search/SearchModal.vue.d.ts.map +0 -1
  70. package/dist/components/Search/SearchModal.vue.js +0 -7
  71. package/dist/components/Search/SearchModal.vue2.js +0 -142
  72. package/dist/components/Search/index.d.ts +0 -3
  73. package/dist/components/Search/index.d.ts.map +0 -1
  74. package/dist/components/Search/index.js +0 -4
  75. package/dist/components/SideNav/WorkspaceProfileIcon.vue.js +0 -31
  76. package/dist/components/SideNav/WorkspaceProfileIcon.vue3.js +0 -5
  77. package/dist/components/SubpageHeader.vue.js +0 -7
  78. package/dist/components/SubpageHeader.vue2.js +0 -34
@@ -1,142 +1,148 @@
1
- import { defineComponent as G, reactive as J, watch as Q, onMounted as X, onBeforeUnmount as Y, openBlock as s, createElementBlock as c, Fragment as b, withDirectives as Z, createVNode as l, unref as t, normalizeClass as f, createSlots as _, withCtx as a, createElementVNode as h, isRef as ee, withKeys as S, withModifiers as u, createBlock as m, renderList as C, createTextVNode as D, toDisplayString as te, createCommentVNode as $, vShow as oe } from "vue";
2
- import re from "../../components/HttpMethod/HttpMethod.vue.js";
3
- import { useSearch as se } from "../../components/Search/useSearch.js";
4
- import ae from "../../components/Sidebar/SidebarButton.vue.js";
5
- import ne from "./RequestSidebarItemMenu.vue.js";
6
- import { dragHandlerFactory as ie } from "./handle-drag.js";
7
- import { ScalarSearchInput as le, ScalarSearchResultList as de, ScalarSearchResultItem as ue, ScalarIcon as me } from "@scalar/components";
8
- import { LibraryIcon as pe } from "@scalar/icons";
9
- import fe from "./RequestSidebarItem.vue.js";
10
- import ce from "../../components/Sidebar/Sidebar.vue.js";
11
- import be from "./components/WorkspaceDropdown.vue.js";
12
- import { useSidebar as he } from "../../hooks/useSidebar.js";
13
- import { useWorkspace as Se } from "../../store/store.js";
14
- import { hotKeyBus as x } from "../../libs/event-busses/hot-keys-bus.js";
15
- import { commandPaletteBus as B } from "../../libs/event-busses/command-palette-bus.js";
16
- const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /* @__PURE__ */ G({
1
+ import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as _, createVNode as i, unref as e, normalizeClass as b, createSlots as ee, withCtx as n, createElementVNode as s, isRef as te, withKeys as v, withModifiers as u, createBlock as c, renderList as D, createTextVNode as $, toDisplayString as oe, createCommentVNode as B, vShow as re, pushScopeId as se, popScopeId as ae } from "vue";
2
+ import ie from "../../assets/rabbit.ascii.js";
3
+ import ne from "../../assets/rabbitjump.ascii.js";
4
+ import le from "../../components/HttpMethod/HttpMethod.vue.js";
5
+ import V from "../../components/ScalarAsciiArt.vue.js";
6
+ import { useSearch as de } from "../../components/Search/useSearch.js";
7
+ import me from "../../components/Sidebar/SidebarButton.vue.js";
8
+ import pe from "./RequestSidebarItemMenu.vue.js";
9
+ import { dragHandlerFactory as ue } from "./handle-drag.js";
10
+ import { ScalarSearchInput as ce, ScalarSearchResultList as fe, ScalarSearchResultItem as be, ScalarIcon as he } from "@scalar/components";
11
+ import { LibraryIcon as Se } from "@scalar/icons";
12
+ import ve from "./RequestSidebarItem.vue.js";
13
+ import Re from "../../components/Sidebar/Sidebar.vue.js";
14
+ import we from "./components/WorkspaceDropdown.vue.js";
15
+ import { useSidebar as ye } from "../../hooks/useSidebar.js";
16
+ import { useWorkspace as ge } from "../../store/store.js";
17
+ import { hotKeyBus as q } from "../../libs/event-busses/hot-keys-bus.js";
18
+ import { commandPaletteBus as P } from "../../libs/event-busses/command-palette-bus.js";
19
+ const ke = (m) => (se("data-v-07523d65"), m = m(), ae(), m), Ie = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, xe = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, Ce = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, De = /* @__PURE__ */ ke(() => /* @__PURE__ */ s("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
20
+ /* @__PURE__ */ s("b", { class: "font-medium" }, "Let's Get Started"),
21
+ /* @__PURE__ */ s("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI, Postman or Insomnia ")
22
+ ], -1)), je = /* @__PURE__ */ J({
17
23
  __name: "RequestSidebar",
18
24
  props: {
19
25
  showSidebar: { type: Boolean },
20
26
  isReadonly: { type: Boolean }
21
27
  },
22
28
  emits: ["update:showSidebar", "newTab"],
23
- setup(V, { emit: q }) {
24
- const E = V, v = q, R = Se(), {
25
- activeWorkspaceCollections: F,
26
- activeRequest: M,
27
- activeWorkspaceRequests: N,
28
- findRequestParents: O,
29
- isReadOnly: P
30
- } = R, { handleDragEnd: T, isDroppable: z } = ie(R), { collapsedSidebarFolders: K, setCollapsedSidebarFolder: U } = he(), d = J({ open: !1 });
31
- Q(
32
- M,
29
+ setup(m, { emit: E }) {
30
+ const F = m, R = E, w = ge(), {
31
+ activeWorkspaceCollections: M,
32
+ activeRequest: O,
33
+ activeWorkspaceRequests: y,
34
+ findRequestParents: z,
35
+ isReadOnly: N
36
+ } = w, { handleDragEnd: T, isDroppable: A } = ue(w), { collapsedSidebarFolders: K, setCollapsedSidebarFolder: L } = ye(), p = Q({ open: !1 });
37
+ X(
38
+ O,
33
39
  (r) => {
34
- r && O(r).forEach(
35
- (e) => U(e, !0)
40
+ r && z(r).forEach(
41
+ (t) => L(t, !0)
36
42
  );
37
43
  },
38
44
  { immediate: !0 }
39
45
  );
40
46
  const {
41
- searchText: p,
42
- searchResultsWithPlaceholderResults: w,
43
- selectedSearchResult: g,
44
- onSearchResultClick: W,
45
- fuseSearch: H,
46
- searchInputRef: k,
47
- searchResultRefs: L,
48
- navigateSearchResults: y,
47
+ searchText: f,
48
+ searchResultsWithPlaceholderResults: g,
49
+ selectedSearchResult: k,
50
+ onSearchResultClick: U,
51
+ fuseSearch: W,
52
+ searchInputRef: I,
53
+ searchResultRefs: H,
54
+ navigateSearchResults: x,
49
55
  selectSearchResult: j
50
- } = se(), I = (r) => {
51
- var e;
52
- r.toggleSidebar && v("update:showSidebar", E.showSidebar), r.openCommandPalette && (r.openCommandPalette.preventDefault(), B.emit()), r.focusRequestSearch && ((e = k.value) == null || e.focus());
56
+ } = de(), C = (r) => {
57
+ var t;
58
+ r.toggleSidebar && R("update:showSidebar", F.showSidebar), r.openCommandPalette && (r.openCommandPalette.preventDefault(), P.emit()), r.focusRequestSearch && ((t = I.value) == null || t.focus());
53
59
  };
54
- return X(() => x.on(I)), Y(() => {
55
- x.off(I);
56
- }), (r, e) => (s(), c(b, null, [
57
- Z(l(t(ce), {
58
- class: f([r.showSidebar ? "sidebar-active-width" : ""]),
60
+ return Y(() => q.on(C)), Z(() => {
61
+ q.off(C);
62
+ }), (r, t) => (a(), h(S, null, [
63
+ _(i(e(Re), {
64
+ class: b([r.showSidebar ? "sidebar-active-width" : ""]),
59
65
  showSidebar: r.showSidebar,
60
- "onUpdate:showSidebar": e[8] || (e[8] = (o) => r.$emit("update:showSidebar", o))
61
- }, _({
62
- content: a(() => [
63
- h("div", ve, [
64
- l(t(le), {
66
+ "onUpdate:showSidebar": t[8] || (t[8] = (o) => r.$emit("update:showSidebar", o))
67
+ }, ee({
68
+ content: n(() => [
69
+ s("div", Ie, [
70
+ i(e(ce), {
65
71
  ref_key: "searchInputRef",
66
- ref: k,
67
- modelValue: t(p),
68
- "onUpdate:modelValue": e[0] || (e[0] = (o) => ee(p) ? p.value = o : null),
72
+ ref: I,
73
+ modelValue: e(f),
74
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => te(f) ? f.value = o : null),
69
75
  sidebar: "",
70
- onInput: t(H),
76
+ onInput: e(W),
71
77
  onKeydown: [
72
- e[1] || (e[1] = S(u((o) => t(y)("down"), ["stop"]), ["down"])),
73
- e[2] || (e[2] = S(u((o) => t(j)(), ["stop"]), ["enter"])),
74
- e[3] || (e[3] = S(u((o) => t(y)("up"), ["stop"]), ["up"]))
78
+ t[1] || (t[1] = v(u((o) => e(x)("down"), ["stop"]), ["down"])),
79
+ t[2] || (t[2] = v(u((o) => e(j)(), ["stop"]), ["enter"])),
80
+ t[3] || (t[3] = v(u((o) => e(x)("up"), ["stop"]), ["up"]))
75
81
  ]
76
82
  }, null, 8, ["modelValue", "onInput"])
77
83
  ]),
78
- h("div", {
79
- class: f(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
84
+ s("div", {
85
+ class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
80
86
  "pb-14": !r.isReadonly
81
87
  }]),
82
- onDragenter: e[6] || (e[6] = u(() => {
88
+ onDragenter: t[6] || (t[6] = u(() => {
83
89
  }, ["prevent"])),
84
- onDragover: e[7] || (e[7] = u(() => {
90
+ onDragover: t[7] || (t[7] = u(() => {
85
91
  }, ["prevent"]))
86
92
  }, [
87
- t(p) ? (s(), m(t(de), {
93
+ e(f) ? (a(), c(e(fe), {
88
94
  key: 0,
89
95
  class: "gap-px custom-scroll",
90
- noResults: !t(w).length
96
+ noResults: !e(g).length
91
97
  }, {
92
- default: a(() => [
93
- (s(!0), c(b, null, C(t(w), (o, i) => (s(), m(t(ue), {
98
+ default: n(() => [
99
+ (a(!0), h(S, null, D(e(g), (o, d) => (a(), c(e(be), {
94
100
  id: `#search-input-${o.item.id}`,
95
101
  key: o.refIndex,
96
102
  ref_for: !0,
97
- ref: (n) => t(L)[i] = n,
98
- active: t(g) === i,
103
+ ref: (l) => e(H)[d] = l,
104
+ active: e(k) === d,
99
105
  class: "px-2",
100
- onClick: (n) => t(W)(o),
101
- onFocus: (n) => g.value = i
106
+ onClick: (l) => e(U)(o),
107
+ onFocus: (l) => k.value = d
102
108
  }, {
103
- addon: a(() => [
104
- l(re, {
109
+ addon: n(() => [
110
+ i(le, {
105
111
  class: "font-bold",
106
112
  method: o.item.httpVerb ?? "get"
107
113
  }, null, 8, ["method"])
108
114
  ]),
109
- default: a(() => [
110
- D(te(o.item.title) + " ", 1)
115
+ default: n(() => [
116
+ $(oe(o.item.title) + " ", 1)
111
117
  ]),
112
118
  _: 2
113
119
  }, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
114
120
  ]),
115
121
  _: 1
116
- }, 8, ["noResults"])) : (s(!0), c(b, { key: 1 }, C(t(F), (o) => {
117
- var i;
118
- return s(), m(fe, {
122
+ }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, D(e(M), (o) => {
123
+ var d;
124
+ return a(), c(ve, {
119
125
  key: o.uid,
120
- isDraggable: !r.isReadonly && ((i = o.info) == null ? void 0 : i.title) !== "Drafts",
121
- isDroppable: t(z),
122
- menuItem: d,
126
+ isDraggable: !r.isReadonly && ((d = o.info) == null ? void 0 : d.title) !== "Drafts",
127
+ isDroppable: e(A),
128
+ menuItem: p,
123
129
  parentUids: [],
124
130
  uid: o.uid,
125
- onNewTab: e[4] || (e[4] = (n, A) => v("newTab", { name: n, uid: A })),
126
- onOnDragEnd: t(T),
127
- onOpenMenu: e[5] || (e[5] = (n) => Object.assign(d, n))
131
+ onNewTab: t[4] || (t[4] = (l, G) => R("newTab", { name: l, uid: G })),
132
+ onOnDragEnd: e(T),
133
+ onOpenMenu: t[5] || (t[5] = (l) => Object.assign(p, l))
128
134
  }, {
129
- leftIcon: a(() => [
130
- l(t(pe), {
131
- class: "text-sidebar-c-2 size-3.5 group-hover:hidden",
135
+ leftIcon: n(() => [
136
+ i(e(Se), {
137
+ class: "text-sidebar-c-2 size-3.5 stroke-[2.5] group-hover:hidden",
132
138
  src: o["x-scalar-icon"] || "interface-content-folder"
133
139
  }, null, 8, ["src"]),
134
- h("div", {
135
- class: f({
136
- "rotate-90": t(K)[o.uid]
140
+ s("div", {
141
+ class: b({
142
+ "rotate-90": e(K)[o.uid]
137
143
  })
138
144
  }, [
139
- l(t(me), {
145
+ i(e(he), {
140
146
  class: "text-c-3 hidden text-sm group-hover:block",
141
147
  icon: "ChevronRight",
142
148
  size: "sm"
@@ -148,40 +154,57 @@ const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /
148
154
  }), 128))
149
155
  ], 34)
150
156
  ]),
151
- button: a(() => [
152
- r.isReadonly ? $("", !0) : (s(), m(ae, {
153
- key: 0,
154
- class: f({
155
- "empty-sidebar-item": t(N).length === 1
156
- }),
157
- click: t(B).emit
158
- }, {
159
- title: a(() => [
160
- D("Add Item")
157
+ button: n(() => [
158
+ s("div", {
159
+ class: b(["relative z-10 pt-0 md:px-2.5 md:pb-2.5 -translate-y-full w-[inherit]", {
160
+ "empty-sidebar-item": e(y).length <= 1,
161
+ "border-t-1/2": e(y).length <= 1
162
+ }])
163
+ }, [
164
+ s("div", xe, [
165
+ s("div", Ce, [
166
+ i(V, {
167
+ art: e(ie),
168
+ class: "font-bold rabbitsit"
169
+ }, null, 8, ["art"]),
170
+ i(V, {
171
+ art: e(ne),
172
+ class: "font-bold absolute top-0 left-0 rabbitjump"
173
+ }, null, 8, ["art"])
174
+ ]),
175
+ De
161
176
  ]),
162
- _: 1
163
- }, 8, ["class", "click"]))
177
+ r.isReadonly ? B("", !0) : (a(), c(me, {
178
+ key: 0,
179
+ click: e(P).emit
180
+ }, {
181
+ title: n(() => [
182
+ $("Add Item")
183
+ ]),
184
+ _: 1
185
+ }, 8, ["click"]))
186
+ ], 2)
164
187
  ]),
165
188
  _: 2
166
189
  }, [
167
190
  r.isReadonly ? void 0 : {
168
191
  name: "header",
169
- fn: a(() => [
170
- l(t(be))
192
+ fn: n(() => [
193
+ i(e(we))
171
194
  ]),
172
195
  key: "0"
173
196
  }
174
197
  ]), 1032, ["class", "showSidebar"]), [
175
- [oe, r.showSidebar]
198
+ [re, r.showSidebar]
176
199
  ]),
177
- !t(P) && d ? (s(), m(ne, {
200
+ !e(N) && p ? (a(), c(pe, {
178
201
  key: 0,
179
- menuItem: d,
180
- onCloseMenu: e[9] || (e[9] = (o) => d.open = !1)
181
- }, null, 8, ["menuItem"])) : $("", !0)
202
+ menuItem: p,
203
+ onCloseMenu: t[9] || (t[9] = (o) => p.open = !1)
204
+ }, null, 8, ["menuItem"])) : B("", !0)
182
205
  ], 64));
183
206
  }
184
207
  });
185
208
  export {
186
- Me as default
209
+ je as default
187
210
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAgOA,wBAKG"}
1
+ {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAmOA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseEmpty.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c180e370"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-54db086c"]]);
5
5
  export {
6
- r as default
6
+ s as default
7
7
  };
@@ -6,7 +6,7 @@ import { useWorkspace as g } from "../../../store/store.js";
6
6
  import { hotKeyBus as d } from "../../../libs/event-busses/hot-keys-bus.js";
7
7
  import { executeRequestBus as N } from "../../../libs/event-busses/execute-request-bus.js";
8
8
  import { commandPaletteBus as q } from "../../../libs/event-busses/command-palette-bus.js";
9
- const f = (t) => (R("data-v-c180e370"), t = t(), v(), t), B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, S = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, V = {
9
+ const f = (t) => (R("data-v-54db086c"), t = t(), v(), t), B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, S = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, V = {
10
10
  key: 0,
11
11
  class: "scalar-version-number"
12
12
  }, w = /* @__PURE__ */ f(() => /* @__PURE__ */ e("b", null, "Alpha", -1)), A = /* @__PURE__ */ f(() => /* @__PURE__ */ e("div", { class: "mt-1" }, [
@@ -19,10 +19,10 @@ const f = (t) => (R("data-v-c180e370"), t = t(), v(), t), B = { class: "relative
19
19
  setup(t) {
20
20
  const { isReadOnly: _, activeWorkspace: h } = g(), r = () => {
21
21
  q.emit({ commandName: "Create Request" });
22
- }, m = (l) => {
23
- l.openCommandPaletteRequest && r();
22
+ }, l = (m) => {
23
+ m.openCommandPaletteRequest && r();
24
24
  };
25
- return y(() => d.on(m)), k(() => d.off(m)), (l, i) => (a(), c("div", B, [
25
+ return y(() => d.on(l)), k(() => d.off(l)), (m, i) => (a(), c("div", B, [
26
26
  e("div", S, [
27
27
  o(h).isReadOnly ? p("", !0) : (a(), c("div", V, [
28
28
  s(" Scalar V1.0.6 "),
@@ -30,7 +30,10 @@ const f = (t) => (R("data-v-c180e370"), t = t(), v(), t), B = { class: "relative
30
30
  s(" Release "),
31
31
  A
32
32
  ])),
33
- n(C, { art: o(b) }, null, 8, ["art"])
33
+ n(C, {
34
+ art: o(b),
35
+ class: "text-c-3"
36
+ }, null, 8, ["art"])
34
37
  ]),
35
38
  e("div", E, [
36
39
  e("button", {
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAS3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AA6NxC,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":"AA+GA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAS3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AA4NxC,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,4 +1,4 @@
1
- import { defineComponent as h, computed as u, ref as x, openBlock as r, createBlock as n, withCtx as d, createVNode as c, unref as y, createElementVNode as f, createTextVNode as C, createCommentVNode as i, createElementBlock as A, Fragment as B } from "vue";
1
+ import { defineComponent as h, computed as u, ref as x, openBlock as r, createBlock as n, withCtx as d, createVNode as i, unref as y, createElementVNode as f, createTextVNode as C, createCommentVNode as l, createElementBlock as A, Fragment as B } from "vue";
2
2
  import S from "../../../components/ContextBar.vue.js";
3
3
  import $ from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
4
  import g from "./ResponseBody.vue.js";
@@ -14,36 +14,36 @@ const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll rel
14
14
  response: {}
15
15
  },
16
16
  setup(v) {
17
- const a = v, m = u(() => {
17
+ const a = v, c = u(() => {
18
18
  var s;
19
- const e = (s = a.response) == null ? void 0 : s.headers;
20
- return e ? Object.keys(e).map((o) => ({
21
- name: o,
22
- value: e[o],
19
+ const o = (s = a.response) == null ? void 0 : s.headers;
20
+ return o ? Object.keys(o).map((e) => ({
21
+ name: e,
22
+ value: o[e],
23
23
  required: !1
24
24
  })).filter(
25
- (o) => ![
25
+ (e) => ![
26
26
  "rest-api-client-content-length",
27
27
  "X-API-Client-Content-Length"
28
- ].includes(o.name)
28
+ ].includes(e.name)
29
29
  ) : [];
30
30
  }), k = u(
31
31
  () => {
32
- var e;
33
- return ((e = a.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((s) => {
34
- var l, p;
35
- const o = (p = (l = a.response) == null ? void 0 : l.headers) == null ? void 0 : p[s];
36
- return o ? {
32
+ var o;
33
+ return ((o = a.response) == null ? void 0 : o.cookieHeaderKeys.flatMap((s) => {
34
+ var m, p;
35
+ const e = (p = (m = a.response) == null ? void 0 : m.headers) == null ? void 0 : p[s];
36
+ return e ? {
37
37
  name: s,
38
- value: o,
38
+ value: e,
39
39
  required: !1
40
40
  } : [];
41
41
  })) ?? [];
42
42
  }
43
43
  ), _ = ["Cookies", "Headers", "Body", "All"], t = x("All");
44
- return (e, s) => (r(), n($, null, {
44
+ return (o, s) => (r(), n($, null, {
45
45
  title: d(() => [
46
- c(y(R), {
46
+ i(y(R), {
47
47
  class: "text-c-3 mr-2 rotate-180",
48
48
  icon: "ExternalLink",
49
49
  size: "sm",
@@ -51,39 +51,39 @@ const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll rel
51
51
  }),
52
52
  f("div", q, [
53
53
  C(" Response "),
54
- e.response ? (r(), n(N, {
54
+ o.response ? (r(), n(N, {
55
55
  key: 0,
56
- response: e.response
57
- }, null, 8, ["response"])) : i("", !0)
56
+ response: o.response
57
+ }, null, 8, ["response"])) : l("", !0),
58
+ i(S, {
59
+ activeSection: t.value,
60
+ sections: _,
61
+ onSetActiveSection: s[0] || (s[0] = (e) => t.value = e)
62
+ }, null, 8, ["activeSection"])
58
63
  ])
59
64
  ]),
60
65
  default: d(() => {
61
- var o;
66
+ var e;
62
67
  return [
63
68
  f("div", I, [
64
- e.response ? (r(), A(B, { key: 1 }, [
65
- c(S, {
66
- activeSection: t.value,
67
- sections: _,
68
- onSetActiveSection: s[0] || (s[0] = (l) => t.value = l)
69
- }, null, 8, ["activeSection"]),
69
+ o.response ? (r(), A(B, { key: 1 }, [
70
70
  t.value === "All" || t.value === "Cookies" ? (r(), n(V, {
71
71
  key: 0,
72
72
  cookies: k.value
73
- }, null, 8, ["cookies"])) : i("", !0),
73
+ }, null, 8, ["cookies"])) : l("", !0),
74
74
  t.value === "All" || t.value === "Headers" ? (r(), n(L, {
75
75
  key: 1,
76
- headers: m.value
77
- }, null, 8, ["headers"])) : i("", !0),
76
+ headers: c.value
77
+ }, null, 8, ["headers"])) : l("", !0),
78
78
  t.value === "All" || t.value === "Body" ? (r(), n(g, {
79
79
  key: 2,
80
80
  active: !0,
81
- data: (o = a.response) == null ? void 0 : o.data,
82
- headers: m.value,
81
+ data: (e = a.response) == null ? void 0 : e.data,
82
+ headers: c.value,
83
83
  title: "Body"
84
- }, null, 8, ["data", "headers"])) : i("", !0)
84
+ }, null, 8, ["data", "headers"])) : l("", !0)
85
85
  ], 64)) : (r(), n(E, { key: 0 })),
86
- c(H)
86
+ i(H)
87
87
  ])
88
88
  ];
89
89
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAiOA,wBAKG"}
1
+ {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAoNA,wBAKG"}
@@ -1,66 +1,60 @@
1
- import { defineComponent as d, openBlock as l, createBlock as i, withCtx as e, createVNode as r, unref as n, createElementVNode as p, createElementBlock as _, Fragment as v, renderList as S, createTextVNode as x } from "vue";
2
- import b from "../../components/Sidebar/SidebarButton.vue.js";
3
- import h from "../../components/Sidebar/SidebarList.vue.js";
1
+ import { defineComponent as d, openBlock as s, createBlock as i, withCtx as e, createVNode as r, unref as l, createElementVNode as p, createElementBlock as _, Fragment as v, renderList as S, createTextVNode as x } from "vue";
2
+ import h from "../../components/Sidebar/SidebarButton.vue.js";
3
+ import b from "../../components/Sidebar/SidebarList.vue.js";
4
4
  import k from "../../components/Sidebar/SidebarListElement.vue.js";
5
- import L from "../../components/SubpageHeader.vue.js";
6
- import V from "../../components/ViewLayout/ViewLayout.vue.js";
7
- import w from "../../components/ViewLayout/ViewLayoutContent.vue.js";
8
- import { serverSchema as C } from "@scalar/oas-utils/entities/spec";
9
- import { useRouter as y } from "vue-router";
10
- import B from "./ServerForm.vue.js";
11
- import { useWorkspace as E } from "../../store/store.js";
12
- import N from "../../components/Sidebar/Sidebar.vue.js";
13
- const $ = { class: "flex-1" }, J = /* @__PURE__ */ d({
5
+ import L from "../../components/ViewLayout/ViewLayout.vue.js";
6
+ import V from "../../components/ViewLayout/ViewLayoutContent.vue.js";
7
+ import { serverSchema as w } from "@scalar/oas-utils/entities/spec";
8
+ import { useRouter as C } from "vue-router";
9
+ import y from "./ServerForm.vue.js";
10
+ import { useWorkspace as B } from "../../store/store.js";
11
+ import E from "../../components/Sidebar/Sidebar.vue.js";
12
+ const N = { class: "flex-1" }, G = /* @__PURE__ */ d({
14
13
  __name: "Servers",
15
- setup(g) {
16
- const { activeCollection: t, servers: m, serverMutators: u } = E(), { push: c } = y(), f = () => {
14
+ setup($) {
15
+ const { activeCollection: t, servers: m, serverMutators: c } = B(), { push: u } = C(), f = () => {
17
16
  if (!t.value) return;
18
- const o = C.parse({ url: "http://localhost" });
19
- u.add(o, t.value.uid), c(`/servers/${o.uid}`);
17
+ const o = w.parse({ url: "http://localhost" });
18
+ c.add(o, t.value.uid), u(`/servers/${o.uid}`);
20
19
  };
21
- return (o, H) => (l(), i(L, null, {
20
+ return (o, g) => (s(), i(L, null, {
22
21
  default: e(() => [
23
- r(V, null, {
24
- default: e(() => [
25
- r(n(N), { title: "Servers" }, {
26
- content: e(() => [
27
- p("div", $, [
28
- r(h, null, {
29
- default: e(() => {
30
- var s;
31
- return [
32
- (l(!0), _(v, null, S((s = n(t)) == null ? void 0 : s.servers, (a) => (l(), i(k, {
33
- key: a,
34
- class: "text-xs",
35
- variable: {
36
- name: n(m)[a].url ?? "",
37
- uid: a
38
- }
39
- }, null, 8, ["variable"]))), 128))
40
- ];
41
- }),
42
- _: 1
43
- })
44
- ])
45
- ]),
46
- button: e(() => [
47
- r(b, { click: f }, {
48
- title: e(() => [
49
- x("Add Server")
50
- ]),
51
- _: 1
52
- })
53
- ]),
54
- _: 1
55
- }),
56
- r(w, { class: "flex-1" }, {
57
- default: e(() => [
58
- r(B)
22
+ r(l(E), { title: "Servers" }, {
23
+ content: e(() => [
24
+ p("div", N, [
25
+ r(b, null, {
26
+ default: e(() => {
27
+ var n;
28
+ return [
29
+ (s(!0), _(v, null, S((n = l(t)) == null ? void 0 : n.servers, (a) => (s(), i(k, {
30
+ key: a,
31
+ class: "text-xs",
32
+ variable: {
33
+ name: l(m)[a].url ?? "",
34
+ uid: a
35
+ }
36
+ }, null, 8, ["variable"]))), 128))
37
+ ];
38
+ }),
39
+ _: 1
40
+ })
41
+ ])
42
+ ]),
43
+ button: e(() => [
44
+ r(h, { click: f }, {
45
+ title: e(() => [
46
+ x("Add Server")
59
47
  ]),
60
48
  _: 1
61
49
  })
62
50
  ]),
63
51
  _: 1
52
+ }),
53
+ r(V, { class: "flex-1" }, {
54
+ default: e(() => [
55
+ r(y)
56
+ ]),
57
+ _: 1
64
58
  })
65
59
  ]),
66
60
  _: 1
@@ -68,5 +62,5 @@ const $ = { class: "flex-1" }, J = /* @__PURE__ */ d({
68
62
  }
69
63
  });
70
64
  export {
71
- J as default
65
+ G as default
72
66
  };