@scalar/api-client 2.5.32 → 2.5.34

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 (235) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue2.js +120 -128
  4. package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
  5. package/dist/components/AddressBar/AddressBarHistory.vue2.js +57 -63
  6. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  7. package/dist/components/CodeInput/CodeInput.vue2.js +143 -150
  8. package/dist/components/CodeInput/codeVariableWidget.js +70 -75
  9. package/dist/components/CommandPalette/CommandActionInput.vue.js +17 -19
  10. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -27
  11. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +53 -55
  12. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +129 -133
  13. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +1 -1
  14. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +84 -98
  15. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +64 -74
  16. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -11
  17. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  18. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +164 -183
  19. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  20. package/dist/components/DataTable/DataTableInput.vue.js +4 -4
  21. package/dist/components/DataTable/DataTableInput.vue2.js +31 -31
  22. package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -2
  23. package/dist/components/EmptyState.vue.js +1 -1
  24. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +75 -84
  25. package/dist/components/Form/LabelInput.vue.js +1 -1
  26. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  27. package/dist/components/HttpMethod/HttpMethod.vue2.js +11 -11
  28. package/dist/components/ImportCollection/DropEventListener.vue.js +42 -44
  29. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -23
  30. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +141 -149
  31. package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +1 -1
  32. package/dist/components/ImportCollection/ImportNowButton.vue.js +22 -23
  33. package/dist/components/ImportCollection/IntegrationLogo.vue.js +12 -13
  34. package/dist/components/ImportCollection/PasteEventListener.vue.js +11 -12
  35. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +69 -76
  36. package/dist/components/ImportCollection/utils/get-openapi-version.js +8 -8
  37. package/dist/components/ImportCollection/utils/import-collection.js +14 -14
  38. package/dist/components/OpenApiClientButton.vue.js +1 -1
  39. package/dist/components/OpenApiClientButton.vue2.js +10 -10
  40. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  41. package/dist/components/ScalarAsciiArt.vue2.js +19 -22
  42. package/dist/components/Search/useSearch.js +51 -61
  43. package/dist/components/SectionFilter.vue.js +1 -1
  44. package/dist/components/SectionFilter.vue2.js +26 -29
  45. package/dist/components/Server/ServerDropdown.vue.js +70 -96
  46. package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
  47. package/dist/components/Server/ServerDropdownItem.vue2.js +57 -67
  48. package/dist/components/Server/ServerSelector.vue.js +44 -55
  49. package/dist/components/Server/ServerVariablesForm.vue.js +36 -42
  50. package/dist/components/Server/ServerVariablesSelect.vue.js +6 -6
  51. package/dist/components/SideNav/DownloadAppButton.vue.js +1 -1
  52. package/dist/components/SideNav/SideNav.vue.js +68 -74
  53. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
  54. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  55. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  56. package/dist/components/TopNav/TopNav.vue.js +107 -122
  57. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  58. package/dist/hooks/useFileDialog.js +12 -12
  59. package/dist/hooks/useResponseBody.js +14 -16
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.js +2 -2
  62. package/dist/layouts/App/ApiClientApp.vue.js +50 -56
  63. package/dist/layouts/App/ApiClientApp.vue3.js +1 -1
  64. package/dist/layouts/App/create-api-client-app.js +19 -20
  65. package/dist/layouts/App/index.js +1 -1
  66. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  67. package/dist/layouts/Modal/ApiClientModal.vue2.js +18 -21
  68. package/dist/layouts/Web/ApiClientWeb.vue.js +45 -51
  69. package/dist/layouts/Web/ApiClientWeb.vue3.js +1 -1
  70. package/dist/layouts/Web/create-api-client-web.js +19 -20
  71. package/dist/layouts/Web/index.js +1 -1
  72. package/dist/libs/create-client.js +102 -109
  73. package/dist/libs/env-helpers.js +3 -3
  74. package/dist/libs/event-bus.js +15 -15
  75. package/dist/libs/extractAttachmentFilename.js +5 -6
  76. package/dist/libs/find-request.js +9 -10
  77. package/dist/libs/get-request-uid-by-path-method.js +12 -12
  78. package/dist/libs/getOpenApiDocumentDetails.js +7 -7
  79. package/dist/libs/importers/curl.js +3 -3
  80. package/dist/libs/normalize-headers.js +9 -10
  81. package/dist/libs/postman.js +15 -17
  82. package/dist/libs/send-request/build-request-security.js +9 -10
  83. package/dist/libs/send-request/create-fetch-body.js +11 -12
  84. package/dist/libs/send-request/create-fetch-query-params.js +13 -13
  85. package/dist/libs/send-request/create-request-operation.js +83 -84
  86. package/dist/libs/send-request/decode-buffer.d.ts.map +1 -1
  87. package/dist/libs/send-request/set-request-cookies.js +12 -12
  88. package/dist/libs/string-template.js +21 -21
  89. package/dist/libs/validate-parameters.js +5 -8
  90. package/dist/plugins/plugin-manager.js +11 -17
  91. package/dist/store/active-entities.js +90 -117
  92. package/dist/store/collections.js +41 -42
  93. package/dist/store/import-spec.js +25 -26
  94. package/dist/store/request-example.js +20 -24
  95. package/dist/store/requests.js +63 -81
  96. package/dist/store/router-params.js +7 -7
  97. package/dist/store/security-schemes.js +35 -36
  98. package/dist/store/store.js +2 -2
  99. package/dist/store/tags.js +20 -21
  100. package/dist/style.css +1 -1
  101. package/dist/views/Collection/Collection.vue2.js +21 -22
  102. package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
  103. package/dist/views/Collection/CollectionAuthentication.vue2.js +43 -47
  104. package/dist/views/Collection/CollectionEnvironment.vue.js +1 -1
  105. package/dist/views/Collection/CollectionEnvironment.vue2.js +196 -207
  106. package/dist/views/Collection/CollectionInfoForm.vue.js +1 -1
  107. package/dist/views/Collection/CollectionInfoForm.vue2.js +34 -41
  108. package/dist/views/Collection/CollectionNavigation.vue.js +116 -125
  109. package/dist/views/Collection/CollectionOverview.vue2.js +22 -25
  110. package/dist/views/Collection/CollectionServerForm.vue.js +39 -45
  111. package/dist/views/Collection/CollectionServers.vue2.js +88 -98
  112. package/dist/views/Collection/CollectionSettings.vue.js +1 -1
  113. package/dist/views/Collection/CollectionSettings.vue2.js +101 -108
  114. package/dist/views/Collection/components/EnvironmentForm.vue.js +1 -1
  115. package/dist/views/Collection/components/EnvironmentForm.vue2.js +141 -145
  116. package/dist/views/Collection/components/MarkdownInput.vue.js +1 -1
  117. package/dist/views/Collection/components/MarkdownInput.vue2.js +1 -2
  118. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +15 -15
  119. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +15 -16
  120. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +61 -64
  121. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +9 -10
  122. package/dist/views/Cookies/CookieModal.vue.js +1 -1
  123. package/dist/views/Cookies/Cookies.vue2.js +90 -93
  124. package/dist/views/Environment/Environment.vue2.js +267 -295
  125. package/dist/views/Environment/EnvironmentModal.vue.js +63 -70
  126. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -42
  127. package/dist/views/Request/Request.vue.js +1 -1
  128. package/dist/views/Request/Request.vue2.js +60 -67
  129. package/dist/views/Request/RequestRoot.vue.js +1 -1
  130. package/dist/views/Request/RequestRoot.vue2.js +78 -89
  131. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +37 -44
  132. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +44 -45
  133. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -127
  134. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  135. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +120 -139
  136. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
  137. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +97 -97
  138. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  139. package/dist/views/Request/RequestSection/RequestBody.vue2.js +287 -310
  140. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +1 -1
  141. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +86 -94
  142. package/dist/views/Request/RequestSection/RequestParams.vue.js +37 -38
  143. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +36 -38
  144. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  145. package/dist/views/Request/RequestSection/RequestSection.vue2.js +28 -31
  146. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  147. package/dist/views/Request/RequestSection/RequestTable.vue2.js +49 -52
  148. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
  149. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +16 -16
  150. package/dist/views/Request/RequestSection/helpers/getting-started.js +7 -11
  151. package/dist/views/Request/RequestSection/helpers/update-scheme.js +7 -8
  152. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  153. package/dist/views/Request/RequestSidebar.vue2.js +199 -211
  154. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  155. package/dist/views/Request/RequestSidebarItem.vue2.js +332 -349
  156. package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
  157. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +210 -240
  158. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  159. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +38 -41
  160. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
  161. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +58 -64
  162. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -2
  163. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
  164. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
  165. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +20 -23
  166. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +1 -1
  167. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  168. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +29 -30
  169. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +38 -41
  170. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
  171. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +28 -29
  172. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  173. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +128 -140
  174. package/dist/views/Request/components/WorkspaceDropdown.vue.js +116 -124
  175. package/dist/views/Request/consts/mediaTypes.js +2 -3
  176. package/dist/views/Request/handle-drag.js +24 -28
  177. package/dist/views/Request/hooks/useOpenApiWatcher.js +26 -33
  178. package/dist/views/Request/libs/auth.js +37 -43
  179. package/dist/views/Request/libs/oauth2.js +30 -32
  180. package/dist/views/Request/libs/watch-mode.js +100 -103
  181. package/dist/views/Settings/SettingsGeneral.vue.js +206 -236
  182. package/package.json +22 -22
  183. package/dist/components/AddressBar/AddressBar.vue3.js +0 -4
  184. package/dist/components/AddressBar/AddressBarHistory.vue3.js +0 -4
  185. package/dist/components/CodeInput/CodeInput.vue3.js +0 -4
  186. package/dist/components/CodeInput/CodeInput.vue4.js +0 -4
  187. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue3.js +0 -4
  188. package/dist/components/CommandPalette/TheCommandPalette.vue3.js +0 -4
  189. package/dist/components/DataTable/DataTableInput.vue3.js +0 -4
  190. package/dist/components/EmptyState.vue3.js +0 -4
  191. package/dist/components/Form/LabelInput.vue3.js +0 -4
  192. package/dist/components/HttpMethod/HttpMethod.vue3.js +0 -4
  193. package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
  194. package/dist/components/OpenApiClientButton.vue3.js +0 -4
  195. package/dist/components/ScalarAsciiArt.vue3.js +0 -4
  196. package/dist/components/SectionFilter.vue3.js +0 -4
  197. package/dist/components/Server/ServerDropdownItem.vue3.js +0 -4
  198. package/dist/components/SideNav/DownloadAppButton.vue3.js +0 -4
  199. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue3.js +0 -4
  200. package/dist/components/Sidebar/Sidebar.vue3.js +0 -4
  201. package/dist/components/Sidebar/SidebarListElement.vue3.js +0 -4
  202. package/dist/components/Sidebar/SidebarListElement.vue4.js +0 -4
  203. package/dist/components/TopNav/TopNavItem.vue3.js +0 -4
  204. package/dist/layouts/App/ApiClientApp.vue2.js +0 -4
  205. package/dist/layouts/Modal/ApiClientModal.vue3.js +0 -4
  206. package/dist/layouts/Web/ApiClientWeb.vue2.js +0 -4
  207. package/dist/style.css.js +0 -4
  208. package/dist/views/Collection/CollectionAuthentication.vue3.js +0 -4
  209. package/dist/views/Collection/CollectionEnvironment.vue3.js +0 -4
  210. package/dist/views/Collection/CollectionInfoForm.vue3.js +0 -4
  211. package/dist/views/Collection/CollectionSettings.vue3.js +0 -4
  212. package/dist/views/Collection/components/EnvironmentForm.vue3.js +0 -4
  213. package/dist/views/Collection/components/MarkdownInput.vue3.js +0 -4
  214. package/dist/views/Cookies/CookieModal.vue3.js +0 -4
  215. package/dist/views/Request/Request.vue3.js +0 -4
  216. package/dist/views/Request/RequestRoot.vue3.js +0 -4
  217. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue3.js +0 -4
  218. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue3.js +0 -4
  219. package/dist/views/Request/RequestSection/RequestBody.vue3.js +0 -4
  220. package/dist/views/Request/RequestSection/RequestCodeExample.vue3.js +0 -4
  221. package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -4
  222. package/dist/views/Request/RequestSection/RequestTable.vue3.js +0 -4
  223. package/dist/views/Request/RequestSection/RequestTableTooltip.vue3.js +0 -4
  224. package/dist/views/Request/RequestSidebar.vue3.js +0 -4
  225. package/dist/views/Request/RequestSidebarItem.vue3.js +0 -4
  226. package/dist/views/Request/RequestSidebarItem.vue4.js +0 -4
  227. package/dist/views/Request/RequestSidebarItemMenu.vue3.js +0 -4
  228. package/dist/views/Request/RequestSubpageHeader.vue3.js +0 -4
  229. package/dist/views/Request/ResponseSection/ResponseBody.vue3.js +0 -4
  230. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue3.js +0 -4
  231. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue3.js +0 -4
  232. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue2.js +0 -4
  233. package/dist/views/Request/ResponseSection/ResponseEmpty.vue3.js +0 -4
  234. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue3.js +0 -4
  235. package/dist/views/Request/ResponseSection/ResponseSection.vue3.js +0 -4
@@ -13,16 +13,16 @@ const N = {
13
13
  },
14
14
  emits: ["change"],
15
15
  setup(u, { emit: m }) {
16
- const a = u, d = m, o = r(
17
- () => a.enum.map((e) => ({ id: e, label: e }))
16
+ const o = u, p = m, a = r(
17
+ () => o.enum.map((e) => ({ id: e, label: e }))
18
18
  ), n = r({
19
- get: () => o.value.find((e) => e.id === a.value),
20
- set: (e) => d("change", (e == null ? void 0 : e.id) ?? "")
19
+ get: () => a.value.find((e) => e.id === o.value),
20
+ set: (e) => p("change", e?.id ?? "")
21
21
  });
22
22
  return (e, l) => (s(), v(t(k), {
23
23
  modelValue: n.value,
24
- "onUpdate:modelValue": l[0] || (l[0] = (p) => n.value = p),
25
- options: o.value
24
+ "onUpdate:modelValue": l[0] || (l[0] = (d) => n.value = d),
25
+ options: a.value
26
26
  }, {
27
27
  default: c(() => [
28
28
  i(t(x), {
@@ -1,5 +1,5 @@
1
1
  import o from "./DownloadAppButton.vue2.js";
2
- import "./DownloadAppButton.vue3.js";
2
+ /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cb45fa05"]]);
5
5
  export {
@@ -1,103 +1,97 @@
1
- import { defineComponent as w, createElementBlock as r, openBlock as n, normalizeClass as d, unref as e, createVNode as t, withCtx as a, createElementVNode as c, Fragment as k, renderList as b, createTextVNode as u, toDisplayString as y, createCommentVNode as C } from "vue";
2
- import { ScalarIcon as S } from "@scalar/components";
3
- import { useRouter as L } from "vue-router";
4
- import { ROUTES as B } from "../../constants.js";
5
- import { PathId as _ } from "../../routes.js";
6
- import E from "./DownloadAppButton.vue.js";
7
- import N from "./SideHelp.vue.js";
8
- import g from "./SideNavGroup.vue.js";
9
- import v from "./SideNavRouterLink.vue.js";
10
- import { useActiveEntities as V } from "../../store/active-entities.js";
11
- import { useLayout as j } from "../../hooks/useLayout.js";
12
- const A = { class: "flex items-center" }, R = { class: "flex items-center" }, W = {
1
+ import { defineComponent as h, createElementBlock as o, openBlock as r, normalizeClass as f, unref as e, createVNode as t, withCtx as n, createElementVNode as c, Fragment as w, renderList as k, createTextVNode as d, toDisplayString as b, createCommentVNode as y } from "vue";
2
+ import { ScalarIcon as C } from "@scalar/components";
3
+ import { useRouter as S } from "vue-router";
4
+ import { ROUTES as L } from "../../constants.js";
5
+ import { PathId as u } from "../../routes.js";
6
+ import B from "./DownloadAppButton.vue.js";
7
+ import E from "./SideHelp.vue.js";
8
+ import _ from "./SideNavGroup.vue.js";
9
+ import g from "./SideNavRouterLink.vue.js";
10
+ import { useActiveEntities as N } from "../../store/active-entities.js";
11
+ import { useLayout as V } from "../../hooks/useLayout.js";
12
+ const j = { class: "flex items-center" }, A = { class: "flex items-center" }, R = {
13
13
  key: 0,
14
14
  class: "hidden items-center justify-center sm:ml-1.5 sm:flex"
15
- }, K = /* @__PURE__ */ w({
15
+ }, J = /* @__PURE__ */ h({
16
16
  __name: "SideNav",
17
- setup($) {
18
- const { currentRoute: s } = L(), { layout: i } = j(), { activeWorkspace: l } = V();
19
- return (z, p) => (n(), r("nav", {
17
+ setup(W) {
18
+ const { currentRoute: a } = S(), { layout: s } = V(), { activeWorkspace: l } = N();
19
+ return ($, p) => (r(), o("nav", {
20
20
  "aria-label": "App Navigation",
21
- class: d([
21
+ class: f([
22
22
  "app-drag-region flex items-center justify-center gap-1.5 pt-2 sm:justify-between",
23
- e(i) === "web" ? "h-header border !pt-0" : "px-2 pb-2 sm:flex-col"
23
+ e(s) === "web" ? "h-header border !pt-0" : "px-2 pb-2 sm:flex-col"
24
24
  ]),
25
25
  role: "navigation"
26
26
  }, [
27
- t(g, { class: "app-no-drag-region" }, {
28
- default: a(() => [
27
+ t(_, { class: "app-no-drag-region" }, {
28
+ default: n(() => [
29
29
  c("a", {
30
- class: d(["mr-3 ml-1 hidden items-center", {
31
- "sm:flex": e(i) === "web"
30
+ class: f(["mr-3 ml-1 hidden items-center", {
31
+ "sm:flex": e(s) === "web"
32
32
  }]),
33
33
  href: "https://www.scalar.com",
34
34
  target: "_blank"
35
35
  }, [
36
- t(e(S), {
36
+ t(e(C), {
37
37
  icon: "Logo",
38
38
  size: "xl"
39
39
  })
40
40
  ], 2),
41
- (n(!0), r(k, null, b(e(B).filter(
42
- (o) => o.to.name !== "settings.default"
43
- ), ({ icon: o, to: x, displayName: m }, h) => {
44
- var f;
45
- return n(), r("li", { key: h }, [
46
- t(v, {
47
- active: e(s).name === m.toLowerCase() || m.toLowerCase() === "environment" && e(s).name === "environment.collection",
48
- icon: o,
49
- to: {
50
- ...x,
51
- params: {
52
- [e(_).Workspace]: ((f = e(l)) == null ? void 0 : f.uid) ?? "default"
53
- }
41
+ (r(!0), o(w, null, k(e(L).filter(
42
+ (i) => i.to.name !== "settings.default"
43
+ ), ({ icon: i, to: v, displayName: m }, x) => (r(), o("li", { key: x }, [
44
+ t(g, {
45
+ active: e(a).name === m.toLowerCase() || m.toLowerCase() === "environment" && e(a).name === "environment.collection",
46
+ icon: i,
47
+ to: {
48
+ ...v,
49
+ params: {
50
+ [e(u).Workspace]: e(l)?.uid ?? "default"
54
51
  }
55
- }, {
56
- default: a(() => [
57
- u(y(m), 1)
58
- ]),
59
- _: 2
60
- }, 1032, ["active", "icon", "to"])
61
- ]);
62
- }), 128))
52
+ }
53
+ }, {
54
+ default: n(() => [
55
+ d(b(m), 1)
56
+ ]),
57
+ _: 2
58
+ }, 1032, ["active", "icon", "to"])
59
+ ]))), 128))
63
60
  ]),
64
61
  _: 1
65
62
  }),
66
- t(g, { class: "app-no-drag-region" }, {
67
- default: a(() => {
68
- var o;
69
- return [
70
- c("li", A, [
71
- t(v, {
72
- active: e(s).name === "settings",
73
- icon: "Settings",
74
- to: {
75
- name: "settings.default",
76
- params: {
77
- [e(_).Workspace]: (o = e(l)) == null ? void 0 : o.uid
78
- }
63
+ t(_, { class: "app-no-drag-region" }, {
64
+ default: n(() => [
65
+ c("li", j, [
66
+ t(g, {
67
+ active: e(a).name === "settings",
68
+ icon: "Settings",
69
+ to: {
70
+ name: "settings.default",
71
+ params: {
72
+ [e(u).Workspace]: e(l)?.uid
79
73
  }
80
- }, {
81
- default: a(() => p[0] || (p[0] = [
82
- u(" Settings ")
83
- ])),
84
- _: 1,
85
- __: [0]
86
- }, 8, ["active", "to"])
87
- ]),
88
- c("li", R, [
89
- t(N)
90
- ]),
91
- e(i) !== "desktop" ? (n(), r("li", W, [
92
- t(E)
93
- ])) : C("", !0)
94
- ];
95
- }),
74
+ }
75
+ }, {
76
+ default: n(() => p[0] || (p[0] = [
77
+ d(" Settings ")
78
+ ])),
79
+ _: 1,
80
+ __: [0]
81
+ }, 8, ["active", "to"])
82
+ ]),
83
+ c("li", A, [
84
+ t(E)
85
+ ]),
86
+ e(s) !== "desktop" ? (r(), o("li", R, [
87
+ t(B)
88
+ ])) : y("", !0)
89
+ ]),
96
90
  _: 1
97
91
  })
98
92
  ], 2));
99
93
  }
100
94
  });
101
95
  export {
102
- K as default
96
+ J as default
103
97
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./SidebarListElementForm.vue2.js";
2
- import "./SidebarListElementForm.vue3.js";
2
+ /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
4
  const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a93bfefe"]]);
5
5
  export {
@@ -1,5 +1,5 @@
1
1
  import o from "./Sidebar.vue2.js";
2
- import "./Sidebar.vue3.js";
2
+ /* empty css */
3
3
  import a from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-72824faa"]]);
5
5
  export {
@@ -1,6 +1,6 @@
1
1
  import t from "./SidebarListElement.vue2.js";
2
- import "./SidebarListElement.vue3.js";
3
- import "./SidebarListElement.vue4.js";
2
+ /* empty css */
3
+ /* empty css */
4
4
  import o from "../../_virtual/_plugin-vue_export-helper.js";
5
5
  const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-0b6c70e4"]]);
6
6
  export {
@@ -1,114 +1,105 @@
1
- import { defineComponent as O, reactive as W, ref as D, computed as L, watch as I, onMounted as K, onBeforeUnmount as q, createElementBlock as g, openBlock as p, createElementVNode as h, createVNode as r, unref as n, withCtx as f, createTextVNode as U, createBlock as k, createCommentVNode as F, toDisplayString as H, Fragment as G, renderList as J } from "vue";
2
- import { ScalarContextMenu as P, ScalarFloating as Q, ScalarDropdownMenu as X, ScalarDropdownButton as A, ScalarIcon as b, ScalarHotkey as Y } from "@scalar/components";
3
- import { LibraryIcon as Z } from "@scalar/icons/library";
4
- import { useClipboard as ee } from "@scalar/use-hooks/useClipboard";
5
- import { useRouter as te } from "vue-router";
6
- import { ROUTES as oe } from "../../constants.js";
7
- import { useActiveEntities as le } from "../../store/active-entities.js";
8
- import ae from "./TopNavItem.vue.js";
9
- import { useWorkspace as ne } from "../../store/store.js";
10
- const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se = { class: "relative flex h-10 flex-1 items-center gap-1.5 overflow-hidden pr-2.5 text-base font-medium" }, re = {
1
+ import { defineComponent as V, reactive as $, ref as j, computed as _, watch as S, onMounted as O, onBeforeUnmount as W, createElementBlock as C, openBlock as c, createElementVNode as v, createVNode as n, unref as a, withCtx as u, createTextVNode as L, createBlock as g, createCommentVNode as D, toDisplayString as K, Fragment as q, renderList as F } from "vue";
2
+ import { ScalarContextMenu as H, ScalarFloating as G, ScalarDropdownMenu as J, ScalarDropdownButton as I, ScalarIcon as d, ScalarHotkey as P } from "@scalar/components";
3
+ import { LibraryIcon as Q } from "@scalar/icons/library";
4
+ import { useClipboard as X } from "@scalar/use-hooks/useClipboard";
5
+ import { useRouter as Y } from "vue-router";
6
+ import { ROUTES as Z } from "../../constants.js";
7
+ import { useActiveEntities as ee } from "../../store/active-entities.js";
8
+ import te from "./TopNavItem.vue.js";
9
+ import { useWorkspace as oe } from "../../store/store.js";
10
+ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae = { class: "relative flex h-10 flex-1 items-center gap-1.5 overflow-hidden pr-2.5 text-base font-medium" }, ne = {
11
11
  key: 0,
12
12
  class: "h-full w-full overflow-hidden"
13
- }, Ce = /* @__PURE__ */ O({
13
+ }, de = /* @__PURE__ */ V({
14
14
  __name: "TopNav",
15
15
  props: {
16
16
  openNewTab: {}
17
17
  },
18
- setup(E) {
19
- const M = E, { activeRequest: z, activeCollection: v } = le(), c = te(), { events: T } = ne(), { copyToClipboard: B } = ee(), t = W([
18
+ setup(U) {
19
+ const A = U, { activeRequest: E, activeCollection: f } = ee(), i = Y(), { events: k } = oe(), { copyToClipboard: M } = X(), t = $([
20
20
  {
21
21
  label: "",
22
22
  path: "",
23
23
  icon: "Add",
24
24
  isCollection: !1
25
25
  }
26
- ]), a = D(0), y = L(() => a.value), N = L(() => {
27
- var e;
28
- return (e = c.currentRoute.value.name) == null ? void 0 : e.toString().startsWith("collection.");
29
- });
30
- function x() {
31
- var o, l, i, u, s;
32
- if (N.value) {
33
- t[a.value] = {
34
- label: ((l = (o = v.value) == null ? void 0 : o.info) == null ? void 0 : l.title) || "Untitled Collection",
35
- path: c.currentRoute.value.path,
36
- icon: ((i = v.value) == null ? void 0 : i["x-scalar-icon"]) || "Collection",
26
+ ]), l = j(0), T = _(() => l.value), y = _(() => i.currentRoute.value.name?.toString().startsWith("collection."));
27
+ function N() {
28
+ if (y.value) {
29
+ t[l.value] = {
30
+ label: f.value?.info?.title || "Untitled Collection",
31
+ path: i.currentRoute.value.path,
32
+ icon: f.value?.["x-scalar-icon"] || "Collection",
37
33
  isCollection: !0
38
34
  };
39
35
  return;
40
36
  }
41
- if ((u = c.currentRoute.value.name) != null && u.toString().startsWith("request")) {
42
- t[a.value] = {
43
- label: ((s = z.value) == null ? void 0 : s.summary) || "",
44
- path: c.currentRoute.value.path,
37
+ if (i.currentRoute.value.name?.toString().startsWith("request")) {
38
+ t[l.value] = {
39
+ label: E.value?.summary || "",
40
+ path: i.currentRoute.value.path,
45
41
  icon: "ExternalLink",
46
42
  isCollection: !1
47
43
  };
48
44
  return;
49
45
  }
50
- const e = oe.find((j) => {
51
- var S;
52
- return j.to.name.startsWith(
53
- ((S = c.currentRoute.value.name) == null ? void 0 : S.toString()) ?? ""
54
- );
55
- });
46
+ const e = Z.find((o) => o.to.name.startsWith(
47
+ i.currentRoute.value.name?.toString() ?? ""
48
+ ));
56
49
  if (e) {
57
- t[a.value] = {
50
+ t[l.value] = {
58
51
  label: e.displayName,
59
- path: c.currentRoute.value.path,
52
+ path: i.currentRoute.value.path,
60
53
  icon: e.icon,
61
54
  isCollection: !1
62
55
  };
63
56
  return;
64
57
  }
65
58
  }
66
- function C() {
67
- var o;
68
- const e = (o = t[a.value]) == null ? void 0 : o.path;
69
- e && c.push(e);
59
+ function h() {
60
+ const e = t[l.value]?.path;
61
+ e && i.push(e);
70
62
  }
71
- function d() {
63
+ function m() {
72
64
  t.push({
73
65
  label: "",
74
66
  path: "",
75
67
  icon: "Add",
76
68
  isCollection: !1
77
- }), a.value = t.length - 1, x();
69
+ }), l.value = t.length - 1, N();
78
70
  }
79
- function m(e) {
80
- a.value = e, C();
71
+ function p(e) {
72
+ l.value = e, h();
81
73
  }
82
- I(
83
- () => c.currentRoute.value.path,
74
+ S(
75
+ () => i.currentRoute.value.path,
84
76
  () => {
85
- x();
77
+ N();
86
78
  },
87
79
  { immediate: !0 }
88
80
  );
89
- function w(e) {
90
- t.splice(e, 1), a.value = Math.min(
91
- a.value,
81
+ function x(e) {
82
+ t.splice(e, 1), l.value = Math.min(
83
+ l.value,
92
84
  t.length - 1
93
- ), C();
85
+ ), h();
94
86
  }
95
- const R = (e) => {
96
- var l;
97
- if (!((l = t[e]) != null && l.path))
87
+ const w = (e) => {
88
+ if (!t[e]?.path)
98
89
  return;
99
90
  const o = new URL(window.location.href);
100
- o.pathname = t[e].path, B(o.toString());
101
- }, V = (e) => {
102
- t.splice(0, e), t.splice(1), a.value = 0, C();
103
- }, _ = (e) => {
91
+ o.pathname = t[e].path, M(o.toString());
92
+ }, z = (e) => {
93
+ t.splice(0, e), t.splice(1), l.value = 0, h();
94
+ }, R = (e) => {
104
95
  if (e) {
105
- if (e.addTopNav && d(), e.closeTopNav && w(a.value), e.navigateTopNavLeft && m(Math.max(a.value - 1, 0)), e.navigateTopNavRight && m(Math.min(a.value + 1, t.length - 1)), e.jumpToTab) {
96
+ if (e.addTopNav && m(), e.closeTopNav && x(l.value), e.navigateTopNavLeft && p(Math.max(l.value - 1, 0)), e.navigateTopNavRight && p(Math.min(l.value + 1, t.length - 1)), e.jumpToTab) {
106
97
  const o = Number(e.jumpToTab.key) - 1;
107
- o >= 0 && o < t.length && m(o);
98
+ o >= 0 && o < t.length && p(o);
108
99
  }
109
- e.jumpToLastTab && m(t.length - 1);
100
+ e.jumpToLastTab && p(t.length - 1);
110
101
  }
111
- }, $ = (e) => {
102
+ }, B = (e) => {
112
103
  t.push({
113
104
  label: e.name,
114
105
  path: e.uid,
@@ -116,50 +107,47 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
116
107
  isCollection: !1
117
108
  });
118
109
  };
119
- return I(
120
- () => M.openNewTab,
110
+ return S(
111
+ () => A.openNewTab,
121
112
  (e) => {
122
- e && $(e);
113
+ e && B(e);
123
114
  },
124
115
  { immediate: !0 }
125
- ), K(() => T.hotKeys.on(_)), q(() => T.hotKeys.off(_)), (e, o) => (p(), g("nav", ie, [
126
- o[3] || (o[3] = h("div", { class: "app-drag-region absolute inset-0" }, null, -1)),
127
- h("div", se, [
128
- t.length === 1 ? (p(), g("div", re, [
129
- r(n(P), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
130
- trigger: f(() => {
131
- var l, i, u, s;
132
- return [
133
- N.value ? (p(), k(n(Z), {
134
- key: 0,
135
- class: "size-3.5 min-w-3.5 stroke-2",
136
- src: ((l = n(v)) == null ? void 0 : l["x-scalar-icon"]) || "Collection"
137
- }, null, 8, ["src"])) : (i = t[0]) != null && i.icon ? (p(), k(n(b), {
138
- key: 1,
139
- icon: (u = t[0]) == null ? void 0 : u.icon,
140
- size: "xs",
141
- thickness: "2.5"
142
- }, null, 8, ["icon"])) : F("", !0),
143
- h("span", null, H((s = t[0]) == null ? void 0 : s.label), 1)
144
- ];
145
- }),
146
- content: f(() => [
147
- r(n(Q), { placement: "right-start" }, {
148
- floating: f(() => [
149
- r(n(X), { class: "scalar-app scalar-client" }, {
150
- default: f(() => [
151
- r(n(A), {
116
+ ), O(() => k.hotKeys.on(R)), W(() => k.hotKeys.off(R)), (e, o) => (c(), C("nav", le, [
117
+ o[3] || (o[3] = v("div", { class: "app-drag-region absolute inset-0" }, null, -1)),
118
+ v("div", ae, [
119
+ t.length === 1 ? (c(), C("div", ne, [
120
+ n(a(H), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
121
+ trigger: u(() => [
122
+ y.value ? (c(), g(a(Q), {
123
+ key: 0,
124
+ class: "size-3.5 min-w-3.5 stroke-2",
125
+ src: a(f)?.["x-scalar-icon"] || "Collection"
126
+ }, null, 8, ["src"])) : t[0]?.icon ? (c(), g(a(d), {
127
+ key: 1,
128
+ icon: t[0]?.icon,
129
+ size: "xs",
130
+ thickness: "2.5"
131
+ }, null, 8, ["icon"])) : D("", !0),
132
+ v("span", null, K(t[0]?.label), 1)
133
+ ]),
134
+ content: u(() => [
135
+ n(a(G), { placement: "right-start" }, {
136
+ floating: u(() => [
137
+ n(a(J), { class: "scalar-app scalar-client" }, {
138
+ default: u(() => [
139
+ n(a(I), {
152
140
  class: "flex items-center gap-1.5",
153
- onClick: d
141
+ onClick: m
154
142
  }, {
155
- default: f(() => [
156
- r(n(b), {
143
+ default: u(() => [
144
+ n(a(d), {
157
145
  icon: "AddTab",
158
146
  size: "sm",
159
147
  thickness: "1.5"
160
148
  }),
161
- o[1] || (o[1] = U(" New Tab ")),
162
- r(n(Y), {
149
+ o[1] || (o[1] = L(" New Tab ")),
150
+ n(a(P), {
163
151
  class: "bg-b-2 ml-auto",
164
152
  hotkey: "T"
165
153
  })
@@ -167,17 +155,17 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
167
155
  _: 1,
168
156
  __: [1]
169
157
  }),
170
- r(n(A), {
158
+ n(a(I), {
171
159
  class: "flex items-center gap-1.5",
172
- onClick: o[0] || (o[0] = (l) => R(y.value))
160
+ onClick: o[0] || (o[0] = (s) => w(T.value))
173
161
  }, {
174
- default: f(() => [
175
- r(n(b), {
162
+ default: u(() => [
163
+ n(a(d), {
176
164
  icon: "Link",
177
165
  size: "sm",
178
166
  thickness: "1.5"
179
167
  }),
180
- o[2] || (o[2] = U(" Copy URL "))
168
+ o[2] || (o[2] = L(" Copy URL "))
181
169
  ]),
182
170
  _: 1,
183
171
  __: [2]
@@ -191,28 +179,25 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
191
179
  ]),
192
180
  _: 1
193
181
  })
194
- ])) : (p(!0), g(G, { key: 1 }, J(t, (l, i) => {
195
- var u;
196
- return p(), k(ae, {
197
- key: l.path,
198
- active: i === y.value,
199
- hotkey: (i + 1).toString(),
200
- icon: l.isCollection ? ((u = n(v)) == null ? void 0 : u["x-scalar-icon"]) || "Collection" : l.icon,
201
- isCollection: l.isCollection || !1,
202
- label: l.label,
203
- onClick: (s) => m(i),
204
- onClose: (s) => w(i),
205
- onCloseOtherTabs: (s) => V(i),
206
- onCopyUrl: (s) => R(i),
207
- onNewTab: d
208
- }, null, 8, ["active", "hotkey", "icon", "isCollection", "label", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]);
209
- }), 128)),
210
- h("button", {
182
+ ])) : (c(!0), C(q, { key: 1 }, F(t, (s, r) => (c(), g(te, {
183
+ key: s.path,
184
+ active: r === T.value,
185
+ hotkey: (r + 1).toString(),
186
+ icon: s.isCollection ? a(f)?.["x-scalar-icon"] || "Collection" : s.icon,
187
+ isCollection: s.isCollection || !1,
188
+ label: s.label,
189
+ onClick: (b) => p(r),
190
+ onClose: (b) => x(r),
191
+ onCloseOtherTabs: (b) => z(r),
192
+ onCopyUrl: (b) => w(r),
193
+ onNewTab: m
194
+ }, null, 8, ["active", "hotkey", "icon", "isCollection", "label", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]))), 128)),
195
+ v("button", {
211
196
  class: "text-c-3 hover:bg-b-3 app-no-drag-region rounded p-1.5",
212
197
  type: "button",
213
- onClick: d
198
+ onClick: m
214
199
  }, [
215
- r(n(b), {
200
+ n(a(d), {
216
201
  icon: "Add",
217
202
  size: "sm",
218
203
  thickness: "2.5"
@@ -223,5 +208,5 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
223
208
  }
224
209
  });
225
210
  export {
226
- Ce as default
211
+ de as default
227
212
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./TopNavItem.vue2.js";
2
- import "./TopNavItem.vue3.js";
2
+ /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-507381a3"]]);
5
5
  export {
@@ -1,21 +1,21 @@
1
- import { ref as m, readonly as d } from "vue";
2
- function n({ multiple: u, accept: c, onChange: l, onError: t } = {}) {
3
- const i = m(null);
1
+ import { ref as f, readonly as p } from "vue";
2
+ function s({ multiple: l, accept: i, onChange: o, onError: n } = {}) {
3
+ const t = f(null);
4
4
  let e;
5
- typeof document < "u" && (e = document.createElement("input"), e.type = "file", e.onchange = (p) => {
6
- const s = p.target;
7
- i.value = s.files, l == null || l(i.value);
8
- }, e.onerror = () => t == null ? void 0 : t(), e.multiple = u, e.accept = c);
9
- const f = () => {
5
+ typeof document < "u" && (e = document.createElement("input"), e.type = "file", e.onchange = (c) => {
6
+ const r = c.target;
7
+ t.value = r.files, o?.(t.value);
8
+ }, e.onerror = () => n?.(), e.multiple = l, e.accept = i);
9
+ const u = () => {
10
10
  if (!e)
11
- return t == null ? void 0 : t();
11
+ return n?.();
12
12
  e.click();
13
13
  };
14
14
  return {
15
- files: d(i),
16
- open: f
15
+ files: p(t),
16
+ open: u
17
17
  };
18
18
  }
19
19
  export {
20
- n as useFileDialog
20
+ s as useFileDialog
21
21
  };