@scalar/api-client 2.3.31 → 2.3.33

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 (112) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  3. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  4. package/dist/components/CodeInput/CodeInput.vue2.js +63 -61
  5. package/dist/components/DataTable/DataTable.vue.js +1 -1
  6. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  7. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +58 -48
  8. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -2
  9. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  10. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +34 -32
  11. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  12. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
  13. package/dist/hooks/useClientConfig.d.ts +3 -0
  14. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  15. package/dist/layouts/App/create-api-client-app.d.ts +64 -24
  16. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  17. package/dist/layouts/Modal/create-api-client-modal.d.ts +128 -48
  18. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  19. package/dist/layouts/Web/create-api-client-web.d.ts +64 -24
  20. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  21. package/dist/libs/create-client.d.ts +64 -24
  22. package/dist/libs/create-client.d.ts.map +1 -1
  23. package/dist/libs/index.js +26 -25
  24. package/dist/libs/local-storage.d.ts +8 -0
  25. package/dist/libs/local-storage.d.ts.map +1 -1
  26. package/dist/libs/local-storage.js +28 -24
  27. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  28. package/dist/libs/send-request/create-request-operation.js +8 -8
  29. package/dist/libs/send-request/create-request-operation.test.d.ts +2 -2
  30. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  31. package/dist/libs/send-request/decode-buffer.js +4 -4
  32. package/dist/store/active-entities.d.ts +2 -2
  33. package/dist/store/active-entities.d.ts.map +1 -1
  34. package/dist/store/request-example.d.ts +22 -22
  35. package/dist/store/request-example.d.ts.map +1 -1
  36. package/dist/store/security-schemes.d.ts +42 -2
  37. package/dist/store/security-schemes.d.ts.map +1 -1
  38. package/dist/store/store.d.ts +64 -24
  39. package/dist/store/store.d.ts.map +1 -1
  40. package/dist/style.css +1 -1
  41. package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -1
  42. package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
  43. package/dist/views/Collection/CollectionAuthentication.vue2.js +32 -32
  44. package/dist/views/Collection/CollectionEnvironment.vue.d.ts.map +1 -1
  45. package/dist/views/Collection/CollectionEnvironment.vue.js +3 -2
  46. package/dist/views/Collection/CollectionEnvironment.vue2.js +233 -9
  47. package/dist/views/Collection/CollectionNavigation.vue.js +36 -36
  48. package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
  49. package/dist/views/Collection/CollectionServers.vue2.js +6 -6
  50. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +13 -0
  51. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +1 -0
  52. package/dist/views/Collection/components/EnvironmentForm.vue.js +7 -0
  53. package/dist/views/Collection/components/EnvironmentForm.vue2.js +274 -0
  54. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +2 -0
  55. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -1
  56. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +15 -13
  57. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
  58. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +35 -34
  59. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +3 -1
  60. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
  61. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +74 -31
  62. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +3 -1
  63. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
  64. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +8 -6
  65. package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
  66. package/dist/views/Environment/EnvironmentModal.vue.js +32 -28
  67. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -0
  68. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  69. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +67 -65
  70. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  71. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +94 -97
  72. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -0
  73. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  74. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  75. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +116 -99
  76. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -0
  77. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  78. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
  79. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +27 -25
  80. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -0
  81. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  82. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
  83. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +114 -73
  84. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +2 -0
  85. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  86. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  87. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +54 -59
  88. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  89. package/dist/views/Request/RequestSection/RequestSection.vue.js +3 -3
  90. package/dist/views/Request/RequestSection/RequestSection.vue2.js +27 -26
  91. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +8 -0
  92. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -0
  93. package/dist/views/Request/RequestSection/helpers/update-scheme.js +17 -0
  94. package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts +2 -0
  95. package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts.map +1 -0
  96. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  97. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  98. package/dist/views/Request/RequestSidebar.vue2.js +87 -84
  99. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  100. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +21 -21
  101. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
  102. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +11 -11
  103. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  104. package/dist/views/Request/consts/index.js +7 -5
  105. package/dist/views/Request/consts/mediaTypes.d.ts +4 -0
  106. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  107. package/dist/views/Request/consts/mediaTypes.js +22 -4
  108. package/dist/views/Request/consts/mediaTypes.test.d.ts +2 -0
  109. package/dist/views/Request/consts/mediaTypes.test.d.ts.map +1 -0
  110. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  111. package/dist/views/Request/libs/oauth2.js +53 -47
  112. package/package.json +16 -16
@@ -1,63 +1,63 @@
1
- import { defineComponent as ge, useId as Se, reactive as ke, ref as Re, watch as H, onMounted as ye, onBeforeUnmount as xe, computed as D, createElementBlock as b, openBlock as r, Fragment as $, withDirectives as K, createBlock as u, createCommentVNode as p, createVNode as v, unref as t, normalizeClass as g, createSlots as we, withCtx as d, createElementVNode as n, createTextVNode as q, toDisplayString as B, withKeys as M, withModifiers as S, isRef as Ie, vShow as U, renderList as G, nextTick as Ce } from "vue";
2
- import { ScalarButton as De, ScalarIcon as P, ScalarSearchInput as $e, ScalarSearchResultList as qe, ScalarSearchResultItem as Me } from "@scalar/components";
3
- import { LibraryIcon as Pe } from "@scalar/icons/library";
4
- import { useToasts as Te } from "@scalar/use-toasts";
5
- import { useRouter as _e } from "vue-router";
6
- import Ve from "../../assets/rabbit.ascii.js";
7
- import Ee from "../../assets/rabbitjump.ascii.js";
8
- import Le from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
9
- import Ne from "../../components/HttpMethod/HttpMethod.vue.js";
1
+ import { defineComponent as Se, useId as ke, reactive as Re, ref as ye, watch as B, onMounted as xe, onBeforeUnmount as we, computed as D, createElementBlock as b, openBlock as r, Fragment as $, withDirectives as H, createBlock as u, createCommentVNode as v, createVNode as h, unref as t, normalizeClass as g, createSlots as Ie, withCtx as d, createElementVNode as n, createTextVNode as q, toDisplayString as K, withKeys as M, withModifiers as S, isRef as Ce, vShow as U, renderList as G, nextTick as De } from "vue";
2
+ import { ScalarButton as $e, ScalarIcon as P, ScalarSearchInput as qe, ScalarSearchResultList as Me, ScalarSearchResultItem as Pe } from "@scalar/components";
3
+ import { LibraryIcon as Te } from "@scalar/icons/library";
4
+ import { useToasts as _e } from "@scalar/use-toasts";
5
+ import { useRouter as Ve } from "vue-router";
6
+ import Ee from "../../assets/rabbit.ascii.js";
7
+ import Le from "../../assets/rabbitjump.ascii.js";
8
+ import Ne from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
9
+ import Oe from "../../components/HttpMethod/HttpMethod.vue.js";
10
10
  import j from "../../components/ScalarAsciiArt.vue.js";
11
- import { useSearch as Oe } from "../../components/Search/useSearch.js";
12
- import ze from "../../components/Sidebar/SidebarButton.vue.js";
13
- import { useLayout as Fe } from "../../hooks/useLayout.js";
14
- import { useSidebar as We } from "../../hooks/useSidebar.js";
11
+ import { useSearch as ze } from "../../components/Search/useSearch.js";
12
+ import Fe from "../../components/Sidebar/SidebarButton.vue.js";
13
+ import { useLayout as We } from "../../hooks/useLayout.js";
14
+ import { useSidebar as Ae } from "../../hooks/useSidebar.js";
15
15
  import { PathId as J } from "../../routes.js";
16
- import { useActiveEntities as Ae } from "../../store/active-entities.js";
16
+ import { useActiveEntities as Be } from "../../store/active-entities.js";
17
17
  import { createInitialRequest as He } from "../../store/requests.js";
18
18
  import { dragHandlerFactory as Ke } from "./handle-drag.js";
19
- import Be from "./RequestSidebarItemMenu.vue.js";
20
- import { isGettingStarted as Ue } from "./RequestSection/helpers/getting-started.js";
21
- import Ge from "./RequestSidebarItem.vue.js";
22
- import je from "../../components/Sidebar/Sidebar.vue.js";
23
- import Je from "./components/WorkspaceDropdown.vue.js";
24
- import { useWorkspace as Qe } from "../../store/store.js";
25
- const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye = {
19
+ import Ue from "./RequestSidebarItemMenu.vue.js";
20
+ import { isGettingStarted as Ge } from "./RequestSection/helpers/getting-started.js";
21
+ import je from "./RequestSidebarItem.vue.js";
22
+ import Je from "../../components/Sidebar/Sidebar.vue.js";
23
+ import Qe from "./components/WorkspaceDropdown.vue.js";
24
+ import { useWorkspace as Xe } from "../../store/store.js";
25
+ const Ye = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ze = {
26
26
  key: 1,
27
27
  class: "text-c-3"
28
- }, Ze = ["aria-pressed"], et = { class: "sr-only" }, tt = {
28
+ }, et = ["aria-pressed"], tt = { class: "sr-only" }, ot = {
29
29
  class: "search-button-fade sticky top-12 z-10 px-3 py-2.5 pt-0 focus-within:z-20",
30
30
  role: "search"
31
- }, ot = {
31
+ }, st = {
32
32
  key: 1,
33
33
  class: "contents"
34
- }, st = {
34
+ }, at = {
35
35
  key: 0,
36
36
  class: "empty-sidebar-item-content px-2.5 py-2.5"
37
- }, at = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, Mt = /* @__PURE__ */ ge({
37
+ }, rt = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, Pt = /* @__PURE__ */ Se({
38
38
  __name: "RequestSidebar",
39
39
  emits: ["newTab", "clearDrafts"],
40
- setup(rt, { emit: Q }) {
40
+ setup(lt, { emit: Q }) {
41
41
  const X = Q, {
42
42
  collapsedSidebarFolders: Y,
43
43
  isSidebarOpen: T,
44
44
  setCollapsedSidebarFolder: Z,
45
45
  toggleSidebarOpen: ee
46
- } = We(), { layout: i } = Fe(), _ = Qe(), {
46
+ } = Ae(), { layout: i } = We(), _ = Xe(), {
47
47
  activeCollection: V,
48
48
  activeWorkspaceCollections: c,
49
49
  activeRequest: te,
50
50
  activeWorkspaceRequests: E,
51
51
  activeWorkspace: oe
52
- } = Ae(), { findRequestParents: se, events: R, requestMutators: L, requests: x } = _, { handleDragEnd: ae, isDroppable: re } = Ke(
52
+ } = Be(), { findRequestParents: se, events: R, requestMutators: L, requests: x } = _, { handleDragEnd: ae, isDroppable: re } = Ke(
53
53
  oe,
54
54
  _
55
- ), { replace: N } = _e(), le = () => {
55
+ ), { replace: N } = Ve(), le = () => {
56
56
  R.commandPalette.emit({
57
57
  commandName: "Import from OpenAPI/Swagger/Postman/cURL"
58
58
  });
59
- }, O = Se(), { toast: ne } = Te(), k = ke({ open: !1 }), m = Re(!1);
60
- H(
59
+ }, O = ke(), { toast: ne } = _e(), k = Re({ open: !1 }), m = ye(!1);
60
+ B(
61
61
  te,
62
62
  (s) => {
63
63
  s && se(s).forEach(
@@ -67,7 +67,7 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
67
67
  { immediate: !0 }
68
68
  );
69
69
  const {
70
- searchText: h,
70
+ searchText: f,
71
71
  searchResultsWithPlaceholderResults: w,
72
72
  selectedSearchResult: I,
73
73
  onSearchResultClick: ie,
@@ -76,11 +76,11 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
76
76
  searchResultRefs: ce,
77
77
  navigateSearchResults: z,
78
78
  selectSearchResult: de
79
- } = Oe(), F = (s) => {
79
+ } = ze(), F = (s) => {
80
80
  var e;
81
81
  s && (s.toggleSidebar && ee(), s.focusRequestSearch && ((e = C.value) == null || e.focus()));
82
82
  };
83
- ye(() => R.hotKeys.on(F)), xe(() => {
83
+ xe(() => R.hotKeys.on(F)), we(() => {
84
84
  R.hotKeys.off(F);
85
85
  });
86
86
  const me = (s) => {
@@ -92,32 +92,32 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
92
92
  e && (e.watchMode = s.watchMode);
93
93
  }
94
94
  };
95
- H(
95
+ B(
96
96
  () => c.value.map(
97
97
  (s) => s.watchMode
98
98
  ),
99
99
  (s, e) => {
100
100
  s.forEach((o, a) => {
101
- var l, f, W;
102
- if (i !== "modal" && o !== e[a] && ((f = (l = c.value[a]) == null ? void 0 : l.info) == null ? void 0 : f.title) !== "Drafts" && c.value[a]) {
101
+ var l, p, W;
102
+ if (i !== "modal" && o !== e[a] && ((p = (l = c.value[a]) == null ? void 0 : l.info) == null ? void 0 : p.title) !== "Drafts" && c.value[a]) {
103
103
  const A = c.value[a];
104
104
  if (!A)
105
105
  return;
106
- const be = `${(W = A.info) == null ? void 0 : W.title}: Watch Mode ${o ? "enabled" : "disabled"}`;
107
- ne(be, "info");
106
+ const ge = `${(W = A.info) == null ? void 0 : W.title}: Watch Mode ${o ? "enabled" : "disabled"}`;
107
+ ne(ge, "info");
108
108
  }
109
109
  });
110
110
  }
111
111
  );
112
112
  const fe = D(() => {
113
- var f;
113
+ var p;
114
114
  const s = w.value;
115
115
  if (!s.length)
116
116
  return "No results found";
117
- const e = (f = s[I.value]) == null ? void 0 : f.item;
117
+ const e = (p = s[I.value]) == null ? void 0 : p.item;
118
118
  if (!e)
119
119
  return "No result selected";
120
- const o = h.value.length ? `${s.length} result${s.length === 1 ? "" : "s"} found, ` : "", a = `, HTTP Method ${e.httpVerb}, Path ${e.path}`, l = `${e.title} ${a}`;
120
+ const o = f.value.length ? `${s.length} result${s.length === 1 ? "" : "s"} found, ` : "", a = `, HTTP Method ${e.httpVerb}, Path ${e.path}`, l = `${e.title} ${a}`;
121
121
  return `${o}Selected: ${l}`;
122
122
  }), pe = () => {
123
123
  const s = c.value.find(
@@ -146,48 +146,50 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
146
146
  }));
147
147
  }
148
148
  }, ve = () => {
149
- m.value = !m.value, m.value || (h.value = ""), m.value && Ce(() => {
149
+ m.value = !m.value, m.value || (f.value = ""), m.value && De(() => {
150
150
  var s;
151
151
  return (s = C.value) == null ? void 0 : s.focus();
152
152
  });
153
153
  }, y = D(
154
- () => Ue(
154
+ () => Ge(
155
155
  c.value,
156
156
  E.value,
157
157
  x
158
158
  )
159
- ), he = D(() => i === "modal" && V.value ? [V.value] : c.value);
159
+ ), he = D(() => i === "modal" && V.value ? [V.value] : c.value), be = () => {
160
+ f.value || (m.value = !1);
161
+ };
160
162
  return (s, e) => (r(), b($, null, [
161
- K(v(t(je), {
163
+ H(h(t(Je), {
162
164
  class: g([t(T) ? "sidebar-active-width" : ""])
163
- }, we({
165
+ }, Ie({
164
166
  content: d(() => [
165
- n("div", Xe, [
167
+ n("div", Ye, [
166
168
  n("div", {
167
169
  class: g(["size-8", { "xl:hidden": t(i) !== "modal" }])
168
170
  }, null, 2),
169
- t(i) !== "modal" ? (r(), u(t(Je), { key: 0 })) : p("", !0),
170
- t(i) !== "modal" ? (r(), b("span", Ye, " / ")) : p("", !0),
171
- t(i) !== "modal" ? (r(), u(Le, { key: 2 })) : p("", !0),
171
+ t(i) !== "modal" ? (r(), u(t(Qe), { key: 0 })) : v("", !0),
172
+ t(i) !== "modal" ? (r(), b("span", Ze, " / ")) : v("", !0),
173
+ t(i) !== "modal" ? (r(), u(Ne, { key: 2 })) : v("", !0),
172
174
  n("button", {
173
175
  "aria-pressed": m.value,
174
176
  class: "ml-auto",
175
177
  type: "button",
176
178
  onClick: ve
177
179
  }, [
178
- n("span", et, B(m.value ? "Hide" : "Show") + " search ", 1),
179
- v(t(P), {
180
+ n("span", tt, K(m.value ? "Hide" : "Show") + " search ", 1),
181
+ h(t(P), {
180
182
  class: "text-c-3 hover:bg-b-2 p-1.75 max-h-8 max-w-8 rounded-lg text-sm",
181
183
  icon: "Search"
182
184
  })
183
- ], 8, Ze)
185
+ ], 8, et)
184
186
  ]),
185
- K(n("div", tt, [
186
- v(t($e), {
187
+ H(n("div", ot, [
188
+ h(t(qe), {
187
189
  ref_key: "searchInputRef",
188
190
  ref: C,
189
- modelValue: t(h),
190
- "onUpdate:modelValue": e[0] || (e[0] = (o) => Ie(h) ? h.value = o : null),
191
+ modelValue: t(f),
192
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => Ce(f) ? f.value = o : null),
191
193
  "aria-controls": t(O),
192
194
  label: fe.value,
193
195
  sidebar: "",
@@ -196,7 +198,8 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
196
198
  e[1] || (e[1] = M(S((o) => t(z)("down"), ["stop"]), ["down"])),
197
199
  e[2] || (e[2] = M(S((o) => t(de)(), ["stop"]), ["enter"])),
198
200
  e[3] || (e[3] = M(S((o) => t(z)("up"), ["stop"]), ["up"]))
199
- ]
201
+ ],
202
+ onBlur: be
200
203
  }, null, 8, ["modelValue", "aria-controls", "label", "onInput"])
201
204
  ], 512), [
202
205
  [U, m.value]
@@ -215,7 +218,7 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
215
218
  onDragover: e[7] || (e[7] = S(() => {
216
219
  }, ["prevent"]))
217
220
  }, [
218
- t(h) ? (r(), u(t(qe), {
221
+ t(f) ? (r(), u(t(Me), {
219
222
  key: 0,
220
223
  id: t(O),
221
224
  "aria-label": "Search Results",
@@ -223,12 +226,12 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
223
226
  noResults: !t(w).length
224
227
  }, {
225
228
  default: d(() => [
226
- (r(!0), b($, null, G(t(w), (o, a) => (r(), u(t(Me), {
229
+ (r(!0), b($, null, G(t(w), (o, a) => (r(), u(t(Pe), {
227
230
  id: `#search-input-${o.item.id}`,
228
231
  key: o.refIndex,
229
232
  ref_for: !0,
230
233
  ref: (l) => t(ce)[a] = l,
231
- active: t(I) === a,
234
+ selected: t(I) === a,
232
235
  class: "px-2",
233
236
  href: o.item.link,
234
237
  onClick: S((l) => t(ie)(o), ["prevent"]),
@@ -236,29 +239,29 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
236
239
  }, {
237
240
  addon: d(() => [
238
241
  e[9] || (e[9] = n("span", { class: "sr-only" }, "HTTP Method:", -1)),
239
- v(Ne, {
242
+ h(Oe, {
240
243
  class: "font-bold",
241
244
  method: o.item.httpVerb ?? "get"
242
245
  }, null, 8, ["method"])
243
246
  ]),
244
247
  default: d(() => [
245
- q(B(o.item.title) + " ", 1)
248
+ q(K(o.item.title) + " ", 1)
246
249
  ]),
247
250
  _: 2
248
- }, 1032, ["id", "active", "href", "onClick", "onFocus"]))), 128))
251
+ }, 1032, ["id", "selected", "href", "onClick", "onFocus"]))), 128))
249
252
  ]),
250
253
  _: 1
251
- }, 8, ["id", "noResults"])) : (r(), b("nav", ot, [
254
+ }, 8, ["id", "noResults"])) : (r(), b("nav", st, [
252
255
  (r(!0), b($, null, G(he.value, (o) => {
253
256
  var a;
254
- return r(), u(Ge, {
257
+ return r(), u(je, {
255
258
  key: o.uid,
256
259
  isDraggable: t(i) !== "modal" && ((a = o.info) == null ? void 0 : a.title) !== "Drafts",
257
260
  isDroppable: t(re),
258
261
  menuItem: k,
259
262
  parentUids: [],
260
263
  uid: o.uid,
261
- onNewTab: e[4] || (e[4] = (l, f) => X("newTab", { name: l, uid: f })),
264
+ onNewTab: e[4] || (e[4] = (l, p) => X("newTab", { name: l, uid: p })),
262
265
  onOnDragEnd: t(ae),
263
266
  onOpenMenu: e[5] || (e[5] = (l) => Object.assign(k, l))
264
267
  }, {
@@ -270,7 +273,7 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
270
273
  class: "text-sidebar-c-2 group-hover:hidden",
271
274
  icon: "Scribble",
272
275
  thickness: "2.25"
273
- })) : (r(), u(t(Pe), {
276
+ })) : (r(), u(t(Te), {
274
277
  key: 1,
275
278
  class: "text-sidebar-c-2 size-3.5 min-w-3.5 stroke-2 group-hover:hidden",
276
279
  src: o["x-scalar-icon"] || "interface-content-folder"
@@ -280,7 +283,7 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
280
283
  "rotate-90": t(Y)[o.uid]
281
284
  })
282
285
  }, [
283
- v(t(P), {
286
+ h(t(P), {
284
287
  class: "text-c-3 hover:text-c-1 hidden text-sm group-hover:block",
285
288
  icon: "ChevronRight",
286
289
  size: "md"
@@ -300,14 +303,14 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
300
303
  "empty-sidebar-item": y.value
301
304
  })
302
305
  }, [
303
- y.value ? (r(), b("div", st, [
304
- n("div", at, [
305
- v(j, {
306
- art: t(Ve),
306
+ y.value ? (r(), b("div", at, [
307
+ n("div", rt, [
308
+ h(j, {
309
+ art: t(Ee),
307
310
  class: "rabbitsit font-bold"
308
311
  }, null, 8, ["art"]),
309
- v(j, {
310
- art: t(Ee),
312
+ h(j, {
313
+ art: t(Le),
311
314
  class: "rabbitjump absolute left-0 top-0 font-bold"
312
315
  }, null, 8, ["art"])
313
316
  ]),
@@ -315,8 +318,8 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
315
318
  n("b", { class: "font-medium" }, "Let's Get Started"),
316
319
  n("p", { class: "mt-2" }, " Create request, folder, collection or import from OpenAPI/Postman ")
317
320
  ], -1))
318
- ])) : p("", !0),
319
- t(i) !== "modal" ? (r(), u(t(De), {
321
+ ])) : v("", !0),
322
+ t(i) !== "modal" ? (r(), u(t($e), {
320
323
  key: 1,
321
324
  class: g(["mb-1.5 hidden h-fit w-full p-1.5 opacity-0", {
322
325
  "flex opacity-100": y.value
@@ -327,8 +330,8 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
327
330
  q(" Import Collection ")
328
331
  ])),
329
332
  _: 1
330
- }, 8, ["class"])) : p("", !0),
331
- t(i) !== "modal" ? (r(), u(ze, {
333
+ }, 8, ["class"])) : v("", !0),
334
+ t(i) !== "modal" ? (r(), u(Fe, {
332
335
  key: 2,
333
336
  click: t(R).commandPalette.emit,
334
337
  hotkey: "K"
@@ -337,7 +340,7 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
337
340
  q(" Add Item ")
338
341
  ])),
339
342
  _: 1
340
- }, 8, ["click"])) : p("", !0)
343
+ }, 8, ["click"])) : v("", !0)
341
344
  ], 2)
342
345
  ]),
343
346
  _: 2
@@ -350,16 +353,16 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
350
353
  ]), 1032, ["class"]), [
351
354
  [U, t(T)]
352
355
  ]),
353
- t(i) !== "modal" && k ? (r(), u(Be, {
356
+ t(i) !== "modal" && k ? (r(), u(Ue, {
354
357
  key: 0,
355
358
  menuItem: k,
356
359
  onClearDrafts: pe,
357
360
  onCloseMenu: e[8] || (e[8] = (o) => k.open = !1),
358
361
  onToggleWatchMode: me
359
- }, null, 8, ["menuItem"])) : p("", !0)
362
+ }, null, 8, ["menuItem"])) : v("", !0)
360
363
  ], 64));
361
364
  }
362
365
  });
363
366
  export {
364
- Mt as default
367
+ Pt as default
365
368
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-96392ac5"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2dcbd6aa"]]);
5
5
  export {
6
- a as default
6
+ s as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as C, ref as N, computed as m, toRef as w, createBlock as n, openBlock as o, createSlots as T, withCtx as d, createElementBlock as $, createCommentVNode as s, createElementVNode as g, toDisplayString as _, unref as a, createTextVNode as x, createVNode as E } from "vue";
1
+ import { defineComponent as C, ref as N, computed as m, toRef as w, createBlock as n, openBlock as o, createSlots as T, withCtx as d, createElementBlock as $, createCommentVNode as r, createElementVNode as g, toDisplayString as _, unref as a, createTextVNode as x, createVNode as E } from "vue";
2
2
  import P from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
3
  import { useResponseBody as S } from "../../../hooks/useResponseBody.js";
4
4
  import U from "./ResponseBodyDownload.vue.js";
@@ -6,11 +6,11 @@ import j from "./ResponseBodyInfo.vue.js";
6
6
  import D from "./ResponseBodyPreview.vue.js";
7
7
  import F from "./ResponseBodyRaw.vue.js";
8
8
  import I from "./ResponseBodyToggle.vue.js";
9
- import { mediaTypes as q } from "../consts/mediaTypes.js";
10
- const z = {
9
+ import { getMediaTypeConfig as M } from "../consts/mediaTypes.js";
10
+ const q = {
11
11
  key: 0,
12
12
  class: "bg-b-1 flex max-h-[calc(100%-32px)] flex-col overflow-hidden"
13
- }, A = { class: "box-content flex min-h-8 items-center justify-between border-y px-3" }, G = { class: "text-xxs font-code leading-3" }, Y = /* @__PURE__ */ C({
13
+ }, z = { class: "box-content flex min-h-8 items-center justify-between border-y px-3" }, A = { class: "text-xxs font-code leading-3" }, Y = /* @__PURE__ */ C({
14
14
  __name: "ResponseBody",
15
15
  props: {
16
16
  title: {},
@@ -19,16 +19,16 @@ const z = {
19
19
  headers: {}
20
20
  },
21
21
  setup(k) {
22
- const c = k, r = N(!0), p = m(
22
+ const c = k, s = N(!0), p = m(
23
23
  () => {
24
24
  var t;
25
25
  return !!((t = e.value) != null && t.raw && e.value.preview);
26
26
  }
27
- ), B = m(() => r.value || !p.value), R = m(() => !r.value || !p.value), { mimeType: u, attachmentFilename: V, dataUrl: l } = S({
27
+ ), B = m(() => s.value || !p.value), R = m(() => !s.value || !p.value), { mimeType: i, attachmentFilename: V, dataUrl: l } = S({
28
28
  data: w(c, "data"),
29
29
  headers: w(c, "headers")
30
- }), e = m(() => q[u.value.essence]);
31
- return (t, i) => (o(), n(P, {
30
+ }), e = m(() => M(i.value.essence));
31
+ return (t, u) => (o(), n(P, {
32
32
  class: "max-h-content overflow-y-hidden",
33
33
  layout: t.layout
34
34
  }, T({
@@ -38,34 +38,34 @@ const z = {
38
38
  default: d(() => {
39
39
  var f, v, y, h;
40
40
  return [
41
- t.data ? (o(), $("div", z, [
42
- g("div", A, [
43
- g("span", G, _(a(u).essence), 1),
41
+ t.data ? (o(), $("div", q, [
42
+ g("div", z, [
43
+ g("span", A, _(a(i).essence), 1),
44
44
  p.value ? (o(), n(I, {
45
45
  key: 0,
46
- modelValue: r.value,
47
- "onUpdate:modelValue": i[0] || (i[0] = (b) => r.value = b)
48
- }, null, 8, ["modelValue"])) : s("", !0)
46
+ modelValue: s.value,
47
+ "onUpdate:modelValue": u[0] || (u[0] = (b) => s.value = b)
48
+ }, null, 8, ["modelValue"])) : r("", !0)
49
49
  ]),
50
50
  (f = e.value) != null && f.raw && R.value ? (o(), n(F, {
51
51
  key: a(l),
52
52
  content: t.data,
53
53
  language: e.value.language
54
- }, null, 8, ["content", "language"])) : s("", !0),
54
+ }, null, 8, ["content", "language"])) : r("", !0),
55
55
  (v = e.value) != null && v.preview && B.value ? (o(), n(D, {
56
56
  key: a(l),
57
57
  alpha: e.value.alpha,
58
58
  mode: e.value.preview,
59
59
  src: a(l),
60
- type: a(u).essence
61
- }, null, 8, ["alpha", "mode", "src", "type"])) : s("", !0),
60
+ type: a(i).essence
61
+ }, null, 8, ["alpha", "mode", "src", "type"])) : r("", !0),
62
62
  !((y = e.value) != null && y.raw) && !((h = e.value) != null && h.preview) ? (o(), n(j, { key: 2 }, {
63
- default: d(() => i[1] || (i[1] = [
63
+ default: d(() => u[1] || (u[1] = [
64
64
  x(" Binary file ")
65
65
  ])),
66
66
  _: 1
67
- })) : s("", !0)
68
- ])) : s("", !0)
67
+ })) : r("", !0)
68
+ ])) : r("", !0)
69
69
  ];
70
70
  }),
71
71
  _: 2
@@ -76,7 +76,7 @@ const z = {
76
76
  E(U, {
77
77
  filename: a(V),
78
78
  href: a(l),
79
- type: a(u).essence
79
+ type: a(i).essence
80
80
  }, null, 8, ["filename", "href", "type"])
81
81
  ]),
82
82
  key: "0"
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBodyDownload.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyDownload.vue"],"names":[],"mappings":"AAyCA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;;AAgFF,wBAOG"}
1
+ {"version":3,"file":"ResponseBodyDownload.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyDownload.vue"],"names":[],"mappings":"AA0CA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;;AAiFF,wBAOG"}
@@ -1,17 +1,17 @@
1
- import { defineComponent as l, computed as p, createElementBlock as a, openBlock as i, withModifiers as d, createVNode as m, createElementVNode as s, unref as f } from "vue";
1
+ import { defineComponent as l, computed as p, createElementBlock as a, openBlock as i, withModifiers as d, createVNode as f, createElementVNode as t, unref as m } from "vue";
2
2
  import { ScalarIcon as c } from "@scalar/components";
3
- import { mediaTypes as u } from "../consts/mediaTypes.js";
4
- const x = ["download", "href"], k = /* @__PURE__ */ l({
3
+ import { getMediaTypeConfig as u } from "../consts/mediaTypes.js";
4
+ const x = ["download", "href"], h = /* @__PURE__ */ l({
5
5
  __name: "ResponseBodyDownload",
6
6
  props: {
7
7
  href: {},
8
8
  type: {},
9
9
  filename: {}
10
10
  },
11
- setup(t) {
12
- const n = t, r = p(() => {
11
+ setup(s) {
12
+ const n = s, r = p(() => {
13
13
  var e;
14
- const o = ((e = u[n.type ?? ""]) == null ? void 0 : e.extension) ?? ".unknown";
14
+ const o = ((e = u(n.type ?? "")) == null ? void 0 : e.extension) ?? ".unknown";
15
15
  return n.filename ? n.filename : `response${o}`;
16
16
  });
17
17
  return (o, e) => (i(), a("a", {
@@ -21,17 +21,17 @@ const x = ["download", "href"], k = /* @__PURE__ */ l({
21
21
  onClick: e[0] || (e[0] = d(() => {
22
22
  }, ["stop"]))
23
23
  }, [
24
- m(f(c), {
24
+ f(m(c), {
25
25
  icon: "Download",
26
26
  size: "xs"
27
27
  }),
28
- e[1] || (e[1] = s("span", null, [
29
- s("span", null, "Download"),
30
- s("span", { class: "sr-only" }, "Response Body")
28
+ e[1] || (e[1] = t("span", null, [
29
+ t("span", null, "Download"),
30
+ t("span", { class: "sr-only" }, "Response Body")
31
31
  ], -1))
32
32
  ], 8, x));
33
33
  }
34
34
  });
35
35
  export {
36
- k as default
36
+ h as default
37
37
  };
@@ -34,7 +34,7 @@ const W = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, $ = {
34
34
  }));
35
35
  }, k = (o) => {
36
36
  o != null && o.createNew && x.name === "request" && f();
37
- }, w = "2.3.31";
37
+ }, w = "2.3.33";
38
38
  return R(() => a.hotKeys.on(k)), v(() => a.hotKeys.off(k)), (o, e) => (u(), l("div", W, [
39
39
  s("div", {
40
40
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
@@ -1,8 +1,10 @@
1
- import { mediaTypes as D, textMediaTypes as o } from "./mediaTypes.js";
2
- import { ADD_AUTH_DICT as r, ADD_AUTH_OPTIONS as t } from "./new-auth-options.js";
1
+ import { getMediaTypeConfig as i, isTextMediaType as p, mediaTypes as t, textMediaTypes as o } from "./mediaTypes.js";
2
+ import { ADD_AUTH_DICT as a, ADD_AUTH_OPTIONS as d } from "./new-auth-options.js";
3
3
  export {
4
- r as ADD_AUTH_DICT,
5
- t as ADD_AUTH_OPTIONS,
6
- D as mediaTypes,
4
+ a as ADD_AUTH_DICT,
5
+ d as ADD_AUTH_OPTIONS,
6
+ i as getMediaTypeConfig,
7
+ p as isTextMediaType,
8
+ t as mediaTypes,
7
9
  o as textMediaTypes
8
10
  };
@@ -13,4 +13,8 @@ export declare const mediaTypes: {
13
13
  };
14
14
  /** Media Types (MIME Types) that can be displayed as raw text */
15
15
  export declare const textMediaTypes: string[];
16
+ /** Get the config for a media type */
17
+ export declare function getMediaTypeConfig(type: string): MediaConfig | undefined;
18
+ /** Check if a media type that can be displayed as raw text */
19
+ export declare function isTextMediaType(type: string): boolean;
16
20
  //# sourceMappingURL=mediaTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CA6GjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
1
+ {"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CA8GjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA;AAExB,sCAAsC;AACtC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAgBxE;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD"}
@@ -1,4 +1,4 @@
1
- const n = {
1
+ const i = {
2
2
  "application/epub+zip": { extension: ".epub" },
3
3
  "application/gzip": { extension: ".gz" },
4
4
  "application/java-archive": { extension: ".jar" },
@@ -11,6 +11,7 @@ const n = {
11
11
  language: "json"
12
12
  },
13
13
  "application/vnd.api+json": { extension: ".json", raw: !0, language: "json" },
14
+ "application/dns-json": { extension: ".json", raw: !0, language: "json" },
14
15
  "application/msword": { extension: ".doc" },
15
16
  "application/octet-stream": { extension: ".bin" },
16
17
  "application/ogg": { extension: ".ogx" },
@@ -107,8 +108,25 @@ const n = {
107
108
  "video/ogg": { extension: ".ogv" },
108
109
  "video/webm": { extension: ".webm", preview: "video" },
109
110
  "video/x-msvideo": { extension: ".avi" }
110
- }, i = Object.entries(n).filter(([, e]) => e == null ? void 0 : e.raw).map(([e]) => e);
111
+ }, a = Object.entries(i).filter(([, e]) => e == null ? void 0 : e.raw).map(([e]) => e);
112
+ function t(e) {
113
+ const n = i[e];
114
+ if (n)
115
+ return n;
116
+ if (e.endsWith("+json"))
117
+ return {
118
+ extension: ".json",
119
+ raw: !0,
120
+ language: "json"
121
+ };
122
+ }
123
+ function o(e) {
124
+ var n;
125
+ return !!((n = t(e)) != null && n.raw);
126
+ }
111
127
  export {
112
- n as mediaTypes,
113
- i as textMediaTypes
128
+ t as getMediaTypeConfig,
129
+ o as isTextMediaType,
130
+ i as mediaTypes,
131
+ a as textMediaTypes
114
132
  };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=mediaTypes.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mediaTypes.test.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.test.ts"],"names":[],"mappings":""}