@scalar/api-client 2.1.18 → 2.1.20

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 (213) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts +5 -1
  3. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  5. package/dist/components/AddressBar/AddressBar.vue2.js +70 -69
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  7. package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
  8. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  9. package/dist/components/AddressBar/AddressBarServer.vue.js +29 -29
  10. package/dist/components/CodeInput/CodeInput.vue.d.ts +6 -2
  11. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  12. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  13. package/dist/components/CodeInput/CodeInput.vue2.js +57 -49
  14. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +1 -1
  15. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
  16. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +1 -1
  18. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +1 -1
  19. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +62 -45
  21. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +1 -1
  22. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +1 -1
  23. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +13 -7
  24. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  25. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  26. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +87 -89
  27. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  28. package/dist/components/ContextBar.vue.js +2 -2
  29. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +19 -3
  30. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  31. package/dist/components/DataTable/DataTableCheckbox.vue.js +27 -14
  32. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  33. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -8
  34. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  35. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  36. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +29 -32
  37. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +39 -0
  38. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -0
  39. package/dist/components/ImportCurl/ImportCurlModal.vue.js +7 -0
  40. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +88 -0
  41. package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
  42. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  43. package/dist/components/SideNav/SideNav.vue.js +1 -1
  44. package/dist/components/SideNav/SideNav.vue2.js +37 -26
  45. package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -2
  46. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  47. package/dist/components/SideNav/SideNavLink.vue.js +10 -11
  48. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
  49. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  50. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  51. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  52. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  53. package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
  54. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +24 -3
  55. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  56. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  57. package/dist/components/Sidebar/SidebarListElement.vue2.js +26 -22
  58. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +4 -0
  59. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  60. package/dist/components/Sidebar/SidebarListElementActions.vue.js +35 -32
  61. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  62. package/dist/components/TopNav/TopNav.vue.js +3 -3
  63. package/dist/components/TopNav/TopNav.vue2.js +41 -40
  64. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  65. package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
  66. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  67. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  68. package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
  69. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
  70. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  71. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +11 -11
  72. package/dist/constants.d.ts +4 -0
  73. package/dist/constants.d.ts.map +1 -1
  74. package/dist/constants.js +2 -1
  75. package/dist/hooks/useDarkModeState.d.ts +4 -3
  76. package/dist/hooks/useDarkModeState.d.ts.map +1 -1
  77. package/dist/hooks/useDarkModeState.js +36 -21
  78. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  79. package/dist/layouts/App/ApiClientApp.vue.js +40 -44
  80. package/dist/layouts/App/create-api-client-app.d.ts +46 -36
  81. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  82. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  83. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  84. package/dist/layouts/Modal/ApiClientModal.vue2.js +17 -17
  85. package/dist/layouts/Modal/create-api-client-modal.d.ts +92 -72
  86. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  87. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  88. package/dist/layouts/Web/ApiClientWeb.vue.js +30 -34
  89. package/dist/layouts/Web/create-api-client-web.d.ts +46 -36
  90. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  91. package/dist/libs/create-client.d.ts +46 -36
  92. package/dist/libs/create-client.d.ts.map +1 -1
  93. package/dist/libs/event-bus.d.ts +41 -0
  94. package/dist/libs/event-bus.d.ts.map +1 -0
  95. package/dist/libs/event-bus.js +32 -0
  96. package/dist/libs/{event-busses/hot-keys-bus.d.ts → hot-keys.d.ts} +6 -7
  97. package/dist/libs/hot-keys.d.ts.map +1 -0
  98. package/dist/libs/hot-keys.js +45 -0
  99. package/dist/libs/importers/curl.d.ts +3 -0
  100. package/dist/libs/importers/curl.d.ts.map +1 -0
  101. package/dist/libs/importers/curl.js +61 -0
  102. package/dist/libs/importers/index.d.ts +2 -0
  103. package/dist/libs/importers/index.d.ts.map +1 -0
  104. package/dist/libs/importers/index.js +4 -0
  105. package/dist/libs/index.d.ts +4 -1
  106. package/dist/libs/index.d.ts.map +1 -1
  107. package/dist/libs/index.js +31 -31
  108. package/dist/libs/parse-curl.d.ts +12 -0
  109. package/dist/libs/parse-curl.d.ts.map +1 -0
  110. package/dist/libs/parse-curl.js +70 -0
  111. package/dist/libs/send-request.d.ts +4 -1
  112. package/dist/libs/send-request.d.ts.map +1 -1
  113. package/dist/libs/send-request.js +103 -103
  114. package/dist/router.d.ts +2 -1
  115. package/dist/router.d.ts.map +1 -1
  116. package/dist/router.js +33 -24
  117. package/dist/store/collections.d.ts +4 -4
  118. package/dist/store/cookies.d.ts +4 -4
  119. package/dist/store/environment.d.ts +4 -4
  120. package/dist/store/events.d.ts +29 -0
  121. package/dist/store/events.d.ts.map +1 -0
  122. package/dist/store/events.js +31 -0
  123. package/dist/store/request-example.d.ts +4 -4
  124. package/dist/store/requests.d.ts +4 -4
  125. package/dist/store/router-params.d.ts +1 -0
  126. package/dist/store/router-params.d.ts.map +1 -1
  127. package/dist/store/router-params.js +2 -1
  128. package/dist/store/security-schemes.d.ts +4 -4
  129. package/dist/store/servers.d.ts +4 -4
  130. package/dist/store/store.d.ts +92 -72
  131. package/dist/store/store.d.ts.map +1 -1
  132. package/dist/store/store.js +138 -129
  133. package/dist/store/tags.d.ts +4 -4
  134. package/dist/store/workspace.d.ts +4 -4
  135. package/dist/style.css +1 -1
  136. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  137. package/dist/views/Cookies/Cookies.vue2.js +18 -18
  138. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  139. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
  140. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  141. package/dist/views/Request/Request.vue.js +1 -1
  142. package/dist/views/Request/Request.vue2.js +148 -98
  143. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  145. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +1 -1
  146. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  147. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +4 -4
  148. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  149. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  150. package/dist/views/Request/RequestSidebar.vue2.js +101 -102
  151. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  152. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  153. package/dist/views/Request/RequestSidebarItem.vue2.js +73 -73
  154. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  155. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  156. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +33 -34
  157. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +2 -0
  158. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  159. package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
  160. package/dist/views/Request/RequestSubpageHeader.vue2.js +17 -15
  161. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +16 -0
  162. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -0
  163. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +31 -0
  164. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +5 -0
  165. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  166. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  167. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -33
  168. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  169. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
  170. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +18 -19
  171. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  172. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +20 -20
  173. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  174. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +68 -56
  175. package/dist/views/Request/components/WorkspaceDropdown.vue.js +29 -30
  176. package/dist/views/Settings/Settings.vue.d.ts +4 -0
  177. package/dist/views/Settings/Settings.vue.d.ts.map +1 -0
  178. package/dist/views/Settings/Settings.vue.js +4 -0
  179. package/dist/views/Settings/Settings.vue2.js +59 -0
  180. package/dist/{components/DarkModeToggle/DarkModeIconToggle.vue.d.ts → views/Settings/SettingsGeneral.vue.d.ts} +1 -1
  181. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -0
  182. package/dist/views/Settings/SettingsGeneral.vue.js +124 -0
  183. package/dist/views/Settings/SettingsGeneral.vue2.js +4 -0
  184. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts +3 -0
  185. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -0
  186. package/dist/views/Settings/SettingsGeneralMode.vue.js +78 -0
  187. package/dist/views/Settings/SettingsGeneralMode.vue2.js +4 -0
  188. package/package.json +59 -35
  189. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
  190. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -31
  191. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -4
  192. package/dist/components/DarkModeToggle/index.d.ts +0 -2
  193. package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
  194. package/dist/components/DarkModeToggle/index.js +0 -4
  195. package/dist/components/ScreenReader.vue.js +0 -7
  196. package/dist/components/ScreenReader.vue2.js +0 -18
  197. package/dist/libs/event-busses/cancel-request-bus.d.ts +0 -2
  198. package/dist/libs/event-busses/cancel-request-bus.d.ts.map +0 -1
  199. package/dist/libs/event-busses/cancel-request-bus.js +0 -5
  200. package/dist/libs/event-busses/command-palette-bus.d.ts +0 -14
  201. package/dist/libs/event-busses/command-palette-bus.d.ts.map +0 -1
  202. package/dist/libs/event-busses/command-palette-bus.js +0 -5
  203. package/dist/libs/event-busses/execute-request-bus.d.ts +0 -2
  204. package/dist/libs/event-busses/execute-request-bus.d.ts.map +0 -1
  205. package/dist/libs/event-busses/execute-request-bus.js +0 -5
  206. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +0 -1
  207. package/dist/libs/event-busses/hot-keys-bus.js +0 -47
  208. package/dist/libs/event-busses/index.d.ts +0 -6
  209. package/dist/libs/event-busses/index.d.ts.map +0 -1
  210. package/dist/libs/event-busses/index.js +0 -15
  211. package/dist/libs/event-busses/request-status-bus.d.ts +0 -5
  212. package/dist/libs/event-busses/request-status-bus.d.ts.map +0 -1
  213. package/dist/libs/event-busses/request-status-bus.js +0 -5
@@ -1,7 +1,7 @@
1
- import e from "./RequestSidebarItemMenu.vue2.js";
1
+ import t from "./RequestSidebarItemMenu.vue2.js";
2
2
  /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(e, [["__scopeId", "data-v-eb0a2336"]]);
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ e(t, [["__scopeId", "data-v-65353484"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -1,22 +1,21 @@
1
- import { defineComponent as P, ref as K, watch as U, onMounted as W, onBeforeUnmount as F, openBlock as s, createElementBlock as k, Fragment as v, createBlock as f, unref as n, withKeys as j, withCtx as r, createVNode as l, createCommentVNode as S, createElementVNode as y, createTextVNode as N, pushScopeId as G, popScopeId as H } from "vue";
2
- import J from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
- import O from "../../components/Sidebar/Actions/EditSidebarListCollection.vue.js";
4
- import Q from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
5
- import { PathId as b } from "../../router.js";
6
- import { useModal as q, ScalarDropdown as X, ScalarDropdownItem as w, ScalarIcon as $, ScalarModal as x } from "@scalar/components";
7
- import { useRouter as Y } from "vue-router";
8
- import { useWorkspace as Z } from "../../store/store.js";
9
- import { commandPaletteBus as _ } from "../../libs/event-busses/command-palette-bus.js";
10
- const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z(() => /* @__PURE__ */ y("span", null, "Add Example", -1)), te = /* @__PURE__ */ z(() => /* @__PURE__ */ y("span", null, "Delete", -1)), de = /* @__PURE__ */ P({
1
+ import { defineComponent as K, ref as U, watch as W, onMounted as F, onBeforeUnmount as j, openBlock as s, createElementBlock as k, Fragment as v, createBlock as f, unref as n, withKeys as G, withCtx as r, createVNode as l, createCommentVNode as S, createElementVNode as y, createTextVNode as N, pushScopeId as H, popScopeId as J } from "vue";
2
+ import O from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
+ import Q from "../../components/Sidebar/Actions/EditSidebarListCollection.vue.js";
4
+ import X from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
5
+ import { PathId as q } from "../../router.js";
6
+ import { useModal as x, ScalarDropdown as Y, ScalarDropdownItem as w, ScalarIcon as $, ScalarModal as z } from "@scalar/components";
7
+ import { useRouter as Z } from "vue-router";
8
+ import { useWorkspace as _ } from "../../store/store.js";
9
+ const b = (u) => (H("data-v-65353484"), u = u(), J(), u), ee = /* @__PURE__ */ b(() => /* @__PURE__ */ y("span", null, "Add Example", -1)), te = /* @__PURE__ */ b(() => /* @__PURE__ */ y("span", null, "Delete", -1)), ue = /* @__PURE__ */ K({
11
10
  __name: "RequestSidebarItemMenu",
12
11
  props: {
13
12
  menuItem: {}
14
13
  },
15
14
  emits: ["closeMenu"],
16
15
  setup(u, { emit: B }) {
17
- const a = u, T = B, { replace: E } = Y(), { activeWorkspace: g, activeRouterParams: C } = Z(), d = q(), p = q(), V = () => {
16
+ const a = u, T = B, { replace: E } = Z(), { activeWorkspace: g, activeRouterParams: C, events: V } = _(), d = x(), c = x(), A = () => {
18
17
  var e;
19
- return _.emit({
18
+ return V.commandPalette.emit({
20
19
  commandName: "Add Example",
21
20
  metaData: {
22
21
  itemUid: (e = a.menuItem.item) == null ? void 0 : e.entity.uid
@@ -25,24 +24,24 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
25
24
  }, M = (e, t) => {
26
25
  var m;
27
26
  (m = a.menuItem.item) == null || m.edit(e, t), d.hide();
28
- }, A = () => {
27
+ }, L = () => {
29
28
  var e, t, m;
30
- (e = a.menuItem.item) == null || e.delete(), C.value[b.Request] === ((t = a.menuItem.item) == null ? void 0 : t.entity.uid) && E(`/workspace/${g.value.uid}/request/default`), C.value[b.Examples] === ((m = a.menuItem.item) == null ? void 0 : m.entity.uid) && E(`/workspace/${g.value}/request/default`), p.hide();
31
- }, c = K(null);
32
- U([() => a.menuItem.open, c], async ([e]) => {
29
+ (e = a.menuItem.item) == null || e.delete(), C.value[q.Request] === ((t = a.menuItem.item) == null ? void 0 : t.entity.uid) && E(`/workspace/${g.value.uid}/request/default`), C.value[q.Examples] === ((m = a.menuItem.item) == null ? void 0 : m.entity.uid) && E(`/workspace/${g.value}/request/default`), c.hide();
30
+ }, p = U(null);
31
+ W([() => a.menuItem.open, p], async ([e]) => {
33
32
  var t, m;
34
- e && ((m = (t = c.value) == null ? void 0 : t.$parent) != null && m.$el) && c.value.$parent.$el.focus();
33
+ e && ((m = (t = p.value) == null ? void 0 : t.$parent) != null && m.$el) && p.value.$parent.$el.focus();
35
34
  });
36
35
  const R = () => a.menuItem.open && T("closeMenu");
37
- return W(() => window.addEventListener("click", R)), F(() => window.removeEventListener("click", R)), (e, t) => {
36
+ return F(() => window.addEventListener("click", R)), j(() => window.removeEventListener("click", R)), (e, t) => {
38
37
  var m, h;
39
38
  return s(), k(v, null, [
40
- e.menuItem.targetRef && e.menuItem.open ? (s(), f(n(X), {
39
+ e.menuItem.targetRef && e.menuItem.open ? (s(), f(n(Y), {
41
40
  key: 0,
42
41
  static: "",
43
42
  targetRef: e.menuItem.targetRef,
44
43
  teleport: "",
45
- onKeydown: t[2] || (t[2] = j((o) => e.$emit("closeMenu"), ["escape"]))
44
+ onKeydown: t[2] || (t[2] = G((o) => e.$emit("closeMenu"), ["escape"]))
46
45
  }, {
47
46
  items: r(() => {
48
47
  var o;
@@ -50,7 +49,7 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
50
49
  ((o = e.menuItem.item) == null ? void 0 : o.entity.type) === "request" ? (s(), f(n(w), {
51
50
  key: 0,
52
51
  class: "flex gap-2",
53
- onClick: V
52
+ onClick: A
54
53
  }, {
55
54
  default: r(() => [
56
55
  l(n($), {
@@ -65,7 +64,7 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
65
64
  })) : S("", !0),
66
65
  l(n(w), {
67
66
  ref_key: "menuRef",
68
- ref: c,
67
+ ref: p,
69
68
  class: "flex gap-2",
70
69
  onClick: t[0] || (t[0] = (i) => n(d).show())
71
70
  }, {
@@ -91,7 +90,7 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
91
90
  }, 512),
92
91
  l(n(w), {
93
92
  class: "flex gap-2",
94
- onClick: t[1] || (t[1] = (i) => n(p).show())
93
+ onClick: t[1] || (t[1] = (i) => n(c).show())
95
94
  }, {
96
95
  default: r(() => [
97
96
  l(n($), {
@@ -108,25 +107,25 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
108
107
  }),
109
108
  _: 1
110
109
  }, 8, ["targetRef"])) : S("", !0),
111
- l(n(x), {
110
+ l(n(z), {
112
111
  size: "xxs",
113
- state: n(p),
112
+ state: n(c),
114
113
  title: `Delete ${(m = e.menuItem.item) == null ? void 0 : m.resourceTitle}`
115
114
  }, {
116
115
  default: r(() => {
117
116
  var o, i;
118
117
  return [
119
- l(J, {
118
+ l(O, {
120
119
  variableName: ((o = e.menuItem.item) == null ? void 0 : o.title) ?? "",
121
120
  warningMessage: (i = e.menuItem.item) == null ? void 0 : i.warning,
122
- onClose: t[3] || (t[3] = (I) => n(p).hide()),
123
- onDelete: A
121
+ onClose: t[3] || (t[3] = (I) => n(c).hide()),
122
+ onDelete: L
124
123
  }, null, 8, ["variableName", "warningMessage"])
125
124
  ];
126
125
  }),
127
126
  _: 1
128
127
  }, 8, ["state", "title"]),
129
- l(n(x), {
128
+ l(n(z), {
130
129
  size: "xxs",
131
130
  state: n(d),
132
131
  title: `Edit ${(h = e.menuItem.item) == null ? void 0 : h.resourceTitle}`
@@ -134,16 +133,16 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
134
133
  default: r(() => {
135
134
  var o, i, I, D;
136
135
  return [
137
- ((o = e.menuItem.item) == null ? void 0 : o.resourceTitle) === "Collection" ? (s(), f(O, {
136
+ ((o = e.menuItem.item) == null ? void 0 : o.resourceTitle) === "Collection" ? (s(), f(Q, {
138
137
  key: 0,
139
138
  icon: ((i = e.menuItem.item) == null ? void 0 : i.icon) || "interface-content-folder",
140
139
  name: (I = e.menuItem.item) == null ? void 0 : I.title,
141
- onClose: t[4] || (t[4] = (L) => n(d).hide()),
140
+ onClose: t[4] || (t[4] = (P) => n(d).hide()),
142
141
  onEdit: M
143
- }, null, 8, ["icon", "name"])) : (s(), f(Q, {
142
+ }, null, 8, ["icon", "name"])) : (s(), f(X, {
144
143
  key: 1,
145
144
  name: ((D = e.menuItem.item) == null ? void 0 : D.title) ?? "",
146
- onClose: t[5] || (t[5] = (L) => n(d).hide()),
145
+ onClose: t[5] || (t[5] = (P) => n(d).hide()),
147
146
  onEdit: M
148
147
  }, null, 8, ["name"]))
149
148
  ];
@@ -155,5 +154,5 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
155
154
  }
156
155
  });
157
156
  export {
158
- de as default
157
+ ue as default
159
158
  };
@@ -4,11 +4,13 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
4
4
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
5
  "update:modelValue": (v: boolean) => void;
6
6
  hideModal: () => void;
7
+ importCurl: (value: string) => void;
7
8
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
8
9
  modelValue: boolean;
9
10
  isReadonly: boolean;
10
11
  }>>> & {
11
12
  "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
13
+ onImportCurl?: ((value: string) => any) | undefined;
12
14
  onHideModal?: (() => any) | undefined;
13
15
  }, {}, {}>;
14
16
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":";gBAiEc,OAAO;gBACP,OAAO;;;;;gBADP,OAAO;gBACP,OAAO;;;;;AAkKrB,wBAOG;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":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":";gBAkEc,OAAO;gBACP,OAAO;;;;;;gBADP,OAAO;gBACP,OAAO;;;;;;AAwLrB,wBAOG;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,7 +1,7 @@
1
- import a from "./RequestSubpageHeader.vue2.js";
1
+ import e from "./RequestSubpageHeader.vue2.js";
2
2
  /* empty css */
3
- import e from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ e(a, [["__scopeId", "data-v-a60a547f"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ o(e, [["__scopeId", "data-v-3fe7f3a2"]]);
5
5
  export {
6
- p as default
6
+ f as default
7
7
  };
@@ -1,48 +1,50 @@
1
- import { defineComponent as m, openBlock as l, createElementBlock as d, createElementVNode as r, createVNode as a, createBlock as i, createCommentVNode as n, unref as p, pushScopeId as c, popScopeId as u } from "vue";
1
+ import { defineComponent as n, openBlock as r, createElementBlock as d, createElementVNode as s, createVNode as a, createBlock as i, createCommentVNode as m, unref as p, pushScopeId as u, popScopeId as c } from "vue";
2
2
  import f from "../../components/AddressBar/AddressBar.vue.js";
3
3
  import b from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
4
4
  import g from "../../components/Sidebar/SidebarToggle.vue.js";
5
5
  import { ScalarIcon as h } from "@scalar/components";
6
- const _ = (o) => (c("data-v-a60a547f"), o = o(), u(), o), x = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, y = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, k = /* @__PURE__ */ _(() => /* @__PURE__ */ r("a", {
6
+ const _ = (t) => (u("data-v-3fe7f3a2"), t = t(), c(), t), x = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-1 lg:p-2 lg:p-1 flex-wrap t-app__top-container md:border-b-1/2" }, y = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, k = /* @__PURE__ */ _(() => /* @__PURE__ */ s("a", {
7
7
  class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
8
8
  href: "https://scalar.com/",
9
9
  target: "_blank"
10
- }, " Powered by Scalar.com ", -1)), V = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, C = /* @__PURE__ */ m({
10
+ }, " Powered by Scalar.com ", -1)), V = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, $ = /* @__PURE__ */ n({
11
11
  __name: "RequestSubpageHeader",
12
12
  props: {
13
13
  modelValue: { type: Boolean },
14
14
  isReadonly: { type: Boolean }
15
15
  },
16
- emits: ["update:modelValue", "hideModal"],
17
- setup(o) {
18
- return (e, t) => (l(), d("div", x, [
19
- r("div", y, [
16
+ emits: ["update:modelValue", "hideModal", "importCurl"],
17
+ setup(t) {
18
+ return (e, o) => (r(), d("div", x, [
19
+ s("div", y, [
20
20
  a(g, {
21
21
  class: "gitbook-hidden",
22
22
  modelValue: e.modelValue,
23
- "onUpdate:modelValue": t[0] || (t[0] = (s) => e.$emit("update:modelValue", s))
23
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => e.$emit("update:modelValue", l))
24
24
  }, null, 8, ["modelValue"]),
25
25
  k
26
26
  ]),
27
- a(f),
28
- r("div", V, [
29
- e.isReadonly ? n("", !0) : (l(), i(b, { key: 0 })),
30
- e.isReadonly ? (l(), d("button", {
27
+ a(f, {
28
+ onImportCurl: o[1] || (o[1] = (l) => e.$emit("importCurl", l))
29
+ }),
30
+ s("div", V, [
31
+ e.isReadonly ? m("", !0) : (r(), i(b, { key: 0 })),
32
+ e.isReadonly ? (r(), d("button", {
31
33
  key: 1,
32
34
  class: "text-c-3 hover:bg-b-2 active:text-c-1 p-2 rounded",
33
35
  type: "button",
34
- onClick: t[1] || (t[1] = (s) => e.$emit("hideModal"))
36
+ onClick: o[2] || (o[2] = (l) => e.$emit("hideModal"))
35
37
  }, [
36
38
  a(p(h), {
37
39
  icon: "Close",
38
40
  size: "lg",
39
41
  thickness: "1.75"
40
42
  })
41
- ])) : n("", !0)
43
+ ])) : m("", !0)
42
44
  ])
43
45
  ]));
44
46
  }
45
47
  });
46
48
  export {
47
- C as default
49
+ $ as default
48
50
  };
@@ -0,0 +1,16 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
+ content: string;
3
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
4
+ content: string;
5
+ }>>>, {}, {}>;
6
+ export default _default;
7
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
8
+ type __VLS_TypePropsToOption<T> = {
9
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
10
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
11
+ } : {
12
+ type: import('vue').PropType<T[K]>;
13
+ required: true;
14
+ };
15
+ };
16
+ //# sourceMappingURL=ResponseBodyVirtual.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponseBodyVirtual.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyVirtual.vue"],"names":[],"mappings":";aAgDW,MAAM;;aAAN,MAAM;;AA8EjB,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"}
@@ -0,0 +1,31 @@
1
+ import { defineComponent as n, computed as s, openBlock as a, createBlock as c, withCtx as e, createTextVNode as l, createVNode as i, unref as d, createElementVNode as p } from "vue";
2
+ import m from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
+ import { ScalarVirtualText as u } from "@scalar/components";
4
+ import { formatJsonOrYamlString as x } from "@scalar/oas-utils/helpers";
5
+ const f = /* @__PURE__ */ p("div", { class: "py-1.5 px-2.5 font-code text-xxs border-1/2 rounded-t border-b-0" }, " This response body is massive! Syntax highlighting won’t work here. ", -1), V = /* @__PURE__ */ n({
6
+ __name: "ResponseBodyVirtual",
7
+ props: {
8
+ content: {}
9
+ },
10
+ setup(t) {
11
+ const o = t, r = s(() => x(o.content));
12
+ return (_, h) => (a(), c(m, { class: "response-body-virtual" }, {
13
+ title: e(() => [
14
+ l("Body")
15
+ ]),
16
+ default: e(() => [
17
+ f,
18
+ i(d(u), {
19
+ containerClass: "custom-scroll scalar-code-block border-1/2 rounded-b flex flex-1",
20
+ contentClass: "hljs language-plaintext",
21
+ lineHeight: 20,
22
+ text: r.value
23
+ }, null, 8, ["text"])
24
+ ]),
25
+ _: 1
26
+ }));
27
+ }
28
+ });
29
+ export {
30
+ V as default
31
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./ResponseBodyVirtual.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAyOA,wBAKG"}
1
+ {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AA+NA,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 s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-43fc1968"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cddb96c9"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,62 +1,59 @@
1
- import { defineComponent as y, onMounted as k, onBeforeUnmount as R, openBlock as a, createElementBlock as c, createElementVNode as e, unref as t, createTextVNode as s, toDisplayString as v, createCommentVNode as p, createVNode as n, pushScopeId as g, popScopeId as b } from "vue";
2
- import C from "../../../assets/computer.ascii.js";
3
- import B from "../../../components/ScalarAsciiArt.vue.js";
1
+ import { defineComponent as y, onMounted as k, onBeforeUnmount as R, openBlock as n, createElementBlock as r, createElementVNode as e, unref as t, createTextVNode as c, toDisplayString as b, createCommentVNode as d, createVNode as l, pushScopeId as g, popScopeId as C } from "vue";
2
+ import v from "../../../assets/computer.ascii.js";
3
+ import N from "../../../components/ScalarAsciiArt.vue.js";
4
4
  import u from "../../../components/ScalarHotkey.vue.js";
5
- import { useWorkspace as N } from "../../../store/store.js";
6
- import { hotKeyBus as d } from "../../../libs/event-busses/hot-keys-bus.js";
7
- import { executeRequestBus as S } from "../../../libs/event-busses/execute-request-bus.js";
8
- import { commandPaletteBus as q } from "../../../libs/event-busses/command-palette-bus.js";
9
- const f = (o) => (g("data-v-43fc1968"), o = o(), b(), o), V = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, w = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, E = {
5
+ import { useWorkspace as S } from "../../../store/store.js";
6
+ const f = (o) => (g("data-v-cddb96c9"), o = o(), C(), o), q = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, V = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, B = {
10
7
  key: 0,
11
8
  class: "scalar-version-number"
12
- }, I = /* @__PURE__ */ f(() => /* @__PURE__ */ e("b", null, "Beta", -1)), P = /* @__PURE__ */ f(() => /* @__PURE__ */ e("div", { class: "mt-1" }, [
9
+ }, w = /* @__PURE__ */ f(() => /* @__PURE__ */ e("b", null, "Beta", -1)), E = /* @__PURE__ */ f(() => /* @__PURE__ */ e("div", { class: "mt-1" }, [
13
10
  /* @__PURE__ */ e("a", {
14
11
  href: "https://github.com/scalar/scalar/issues/2669",
15
12
  target: "_blank"
16
13
  }, " Roadmap ")
17
- ], -1)), A = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, T = /* @__PURE__ */ y({
14
+ ], -1)), I = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, j = /* @__PURE__ */ y({
18
15
  __name: "ResponseEmpty",
19
16
  setup(o) {
20
- const { isReadOnly: _, activeWorkspace: h } = N(), r = () => {
21
- q.emit({ commandName: "Create Request" });
22
- }, i = (l) => {
23
- l.openCommandPaletteRequest && r();
24
- }, x = "2.1.18";
25
- return k(() => d.on(i)), R(() => d.off(i)), (l, m) => (a(), c("div", V, [
26
- e("div", w, [
27
- t(h).isReadOnly ? p("", !0) : (a(), c("div", E, [
28
- s(" Scalar V" + v(t(x)) + " ", 1),
29
- I,
30
- s(" Release "),
31
- P
17
+ const { isReadOnly: _, activeWorkspace: h, events: s } = S(), i = () => {
18
+ s.commandPalette.emit({ commandName: "Create Request" });
19
+ }, m = (a) => {
20
+ a != null && a.openCommandPaletteRequest && i();
21
+ }, x = "2.1.20";
22
+ return k(() => s.hotKeys.on(m)), R(() => s.hotKeys.off(m)), (a, p) => (n(), r("div", q, [
23
+ e("div", V, [
24
+ t(h).isReadOnly ? d("", !0) : (n(), r("div", B, [
25
+ c(" Scalar V" + b(t(x)) + " ", 1),
26
+ w,
27
+ c(" Release "),
28
+ E
32
29
  ])),
33
- n(B, {
34
- art: t(C),
30
+ l(N, {
31
+ art: t(v),
35
32
  class: "text-c-3"
36
33
  }, null, 8, ["art"])
37
34
  ]),
38
- e("div", A, [
35
+ e("div", I, [
39
36
  e("button", {
40
37
  class: "flex items-center gap-1.5",
41
38
  type: "button",
42
- onClick: m[0] || (m[0] = (K) => t(S).emit())
39
+ onClick: p[0] || (p[0] = (K) => t(s).executeRequest.emit())
43
40
  }, [
44
- s(" Send Request "),
45
- n(u, { hotkey: "↵" })
41
+ c(" Send Request "),
42
+ l(u, { hotkey: "↵" })
46
43
  ]),
47
- t(_) ? p("", !0) : (a(), c("button", {
44
+ t(_) ? d("", !0) : (n(), r("button", {
48
45
  key: 0,
49
46
  class: "flex items-center gap-1.5",
50
47
  type: "button",
51
- onClick: r
48
+ onClick: i
52
49
  }, [
53
- s(" New Request "),
54
- n(u, { hotkey: "N" })
50
+ c(" New Request "),
51
+ l(u, { hotkey: "N" })
55
52
  ]))
56
53
  ])
57
54
  ]));
58
55
  }
59
56
  });
60
57
  export {
61
- T as default
58
+ j as default
62
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseLoadingOverlay.vue"],"names":[],"mappings":";AA2LA,wBAKG"}
1
+ {"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseLoadingOverlay.vue"],"names":[],"mappings":";AA4LA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseLoadingOverlay.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-7a03bf55"]]);
3
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ef5f83d8"]]);
5
5
  export {
6
- p as default
6
+ f as default
7
7
  };
@@ -1,39 +1,38 @@
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";
1
+ import { defineComponent as c, ref as u, openBlock as i, createBlock as d, Transition as m, withCtx as l, unref as e, createElementBlock as f, createVNode as r, createTextVNode as p, createCommentVNode as g } from "vue";
2
+ import { useLoadingState as _, ScalarLoading as v, ScalarButton as x } from "@scalar/components";
3
+ import { useWorkspace as k } from "../../../store/store.js";
5
4
  const L = {
6
5
  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({
6
+ class: "absolute inset-0 bg-b-1 flex flex-col gap-6 items-center justify-center"
7
+ }, y = /* @__PURE__ */ c({
9
8
  __name: "ResponseLoadingOverlay",
10
9
  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(_), {
10
+ const { events: a } = k(), t = _(), o = u();
11
+ return a.requestStatus.on((n) => {
12
+ n === "start" ? o.value = setTimeout(() => t.startLoading(), 1e3) : (clearTimeout(o.value), o.value = void 0, t.stopLoading());
13
+ }), (n, s) => (i(), d(m, null, {
14
+ default: l(() => [
15
+ e(t).isLoading ? (i(), f("div", L, [
16
+ r(e(v), {
18
17
  class: "text-c-3",
19
18
  loadingState: e(t),
20
19
  size: "3xl"
21
20
  }, null, 8, ["loadingState"]),
22
- r(e(v), {
21
+ r(e(x), {
23
22
  variant: "ghost",
24
- onClick: n[0] || (n[0] = (k) => e(x).emit())
23
+ onClick: s[0] || (s[0] = (C) => e(a).cancelRequest.emit())
25
24
  }, {
26
- default: i(() => [
27
- f(" Cancel ")
25
+ default: l(() => [
26
+ p(" Cancel ")
28
27
  ]),
29
28
  _: 1
30
29
  })
31
- ])) : p("", !0)
30
+ ])) : g("", !0)
32
31
  ]),
33
32
  _: 1
34
33
  }));
35
34
  }
36
35
  });
37
36
  export {
38
- N as default
37
+ y as default
39
38
  };
@@ -1 +1 @@
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,iCAAiC,CAAA;;cAQrC,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
+ {"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAQrC,gBAAgB;;cAAhB,gBAAgB;;AAgIlD,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,45 +1,45 @@
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";
1
+ import { defineComponent as y, ref as i, computed as g, openBlock as t, createElementBlock as s, toDisplayString as o, unref as m, Fragment as d, createElementVNode as C, createCommentVNode as v, createBlock as I, withCtx as B, createTextVNode as S } from "vue";
2
+ import L from "../../../components/HelpfulLink.vue.js";
3
+ import { httpStatusCodes as N } from "@scalar/oas-utils/helpers";
4
+ import V from "pretty-bytes";
5
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({
6
+ import { useWorkspace as w } from "../../../store/store.js";
7
+ const E = { class: "flex gap-1.5 text-c-3 pl-1" }, M = { key: 0 }, q = { key: 0 }, x = { key: 1 }, b = /* @__PURE__ */ y({
8
8
  __name: "ResponseMetaInformation",
9
9
  props: {
10
10
  response: {}
11
11
  },
12
12
  setup(h) {
13
- const _ = h, r = c(), a = c(0);
14
- V.on((e) => {
13
+ const _ = h, { events: k } = w(), r = i(), a = i(0);
14
+ k.requestStatus.on((e) => {
15
15
  e === "start" ? r.value = setInterval(() => a.value += 1e3, 1e3) : (clearInterval(r.value), r.value = void 0, a.value = 0);
16
16
  });
17
17
  const l = (e) => {
18
- var p, i;
18
+ var p, c;
19
19
  const u = parseInt(
20
- ((p = e.headers) == null ? void 0 : p["Content-Length"]) || ((i = e.headers) == null ? void 0 : i["content-length"]) || "0",
20
+ ((p = e.headers) == null ? void 0 : p["Content-Length"]) || ((c = e.headers) == null ? void 0 : c["content-length"]) || "0",
21
21
  10
22
22
  );
23
- return u ? N(u) : void 0;
24
- }, n = k(() => {
23
+ return u ? V(u) : void 0;
24
+ }, n = g(() => {
25
25
  const e = _.response.status;
26
26
  if (e)
27
- return L[e] ?? void 0;
27
+ return N[e] ?? void 0;
28
28
  });
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),
29
+ return (e, u) => (t(), s("div", E, [
30
+ r.value && a.value ? (t(), s("span", M, o(m(f)(a.value)), 1)) : (t(), s(d, { key: 1 }, [
31
+ C("span", null, o(m(f)(e.response.duration)), 1),
32
+ l(e.response) ? (t(), s("span", q, o(l(e.response)), 1)) : v("", !0),
33
33
  n.value ? (t(), s(d, { key: 1 }, [
34
- n.value.url ? (t(), C(S, {
34
+ n.value.url ? (t(), I(L, {
35
35
  key: 0,
36
36
  href: n.value.url
37
37
  }, {
38
38
  default: B(() => [
39
- I(o(e.response.status) + " " + o(n.value.name), 1)
39
+ S(o(e.response.status) + " " + o(n.value.name), 1)
40
40
  ]),
41
41
  _: 1
42
- }, 8, ["href"])) : (t(), s("span", q, o(e.response.status) + " " + o(n.value.name), 1))
42
+ }, 8, ["href"])) : (t(), s("span", x, o(e.response.status) + " " + o(n.value.name), 1))
43
43
  ], 64)) : v("", !0)
44
44
  ], 64))
45
45
  ]));
@@ -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;;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
+ {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA+HA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAkPxC,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"}