@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
@@ -1,4 +1,4 @@
1
- import { defineComponent as D, computed as v, useId as P, ref as M, watch as S, createBlock as d, openBlock as r, withCtx as c, createElementVNode as h, withDirectives as s, createCommentVNode as k, createElementBlock as f, createVNode as i, unref as n, vShow as u, Fragment as K, renderList as L, resolveDynamicComponent as Q, toDisplayString as $ } from "vue";
1
+ import { defineComponent as D, computed as v, useId as P, ref as M, watch as S, createBlock as d, openBlock as n, withCtx as c, createElementVNode as h, withDirectives as s, createCommentVNode as k, createElementBlock as f, createVNode as i, unref as o, vShow as u, Fragment as K, renderList as L, resolveDynamicComponent as Q, toDisplayString as $ } from "vue";
2
2
  import { ScalarErrorBoundary as C } from "@scalar/components";
3
3
  import { canMethodHaveBody as b, isDefined as j, REGEX as R } from "@scalar/oas-utils/helpers";
4
4
  import F from "../../../components/SectionFilter.vue.js";
@@ -40,7 +40,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
40
40
  ], { requestMutators: w, cookies: B, securitySchemes: A } = Z(), { layout: m } = x(), q = v(() => {
41
41
  const e = /* @__PURE__ */ new Set(["All", ...O]);
42
42
  return l.example.parameters.path.length || e.delete("Variables"), b(l.operation.method ?? "get") || e.delete("Body"), y.value && e.delete("Auth"), [...e];
43
- }), t = v(
43
+ }), r = v(
44
44
  () => Object.fromEntries(
45
45
  q.value.map((e) => [e, P()])
46
46
  )
@@ -54,14 +54,11 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
54
54
  }
55
55
  );
56
56
  const E = (e) => {
57
- const o = e.target;
58
- w.edit(l.operation.uid, "summary", o.value);
57
+ const t = e.target;
58
+ w.edit(l.operation.uid, "summary", t.value);
59
59
  }, H = v(
60
60
  () => (l.workspace.cookies ?? []).map((e) => B[e]).filter(j).filter((e) => e.name).filter(
61
- (e) => {
62
- var o;
63
- return W(((o = l.server) == null ? void 0 : o.url) || l.operation.path, e.domain);
64
- }
61
+ (e) => W(l.server?.url || l.operation.path, e.domain)
65
62
  ).map((e) => ({
66
63
  key: e.name,
67
64
  value: e.value,
@@ -73,52 +70,52 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
73
70
  },
74
71
  enabled: !0
75
72
  }))
76
- ), N = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(R.PROTOCOL, "") ? l.operation.path.replace(R.PROTOCOL, "") : "Request Name", g = P(), I = Y().getViewComponents("request.section"), U = (e, o) => w.edit(l.operation.uid, e, o);
73
+ ), N = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(R.PROTOCOL, "") ? l.operation.path.replace(R.PROTOCOL, "") : "Request Name", g = P(), I = Y().getViewComponents("request.section"), U = (e, t) => w.edit(l.operation.uid, e, t);
77
74
  return S(
78
75
  () => y.value,
79
76
  (e) => {
80
77
  e && a.value === "Auth" && (a.value = "All");
81
78
  }
82
- ), (e, o) => (r(), d(T, {
79
+ ), (e, t) => (n(), d(T, {
83
80
  "aria-label": `Request: ${e.operation.summary}`
84
81
  }, {
85
82
  title: c(() => [
86
83
  h("div", _, [
87
- n(m) !== "modal" ? (r(), f("label", {
84
+ o(m) !== "modal" ? (n(), f("label", {
88
85
  key: 0,
89
86
  class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
90
- for: n(g)
87
+ for: o(g)
91
88
  }, null, 8, ee)) : k("", !0),
92
- n(m) !== "modal" ? (r(), f("input", {
89
+ o(m) !== "modal" ? (n(), f("input", {
93
90
  key: 1,
94
- id: n(g),
91
+ id: o(g),
95
92
  class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
96
93
  placeholder: N(),
97
94
  value: e.operation.summary,
98
95
  onInput: E
99
- }, null, 40, ae)) : (r(), f("span", le, $(e.operation.summary), 1))
96
+ }, null, 40, ae)) : (n(), f("span", le, $(e.operation.summary), 1))
100
97
  ]),
101
98
  i(F, {
102
99
  modelValue: a.value,
103
- "onUpdate:modelValue": o[0] || (o[0] = (p) => a.value = p),
104
- filterIds: t.value,
100
+ "onUpdate:modelValue": t[0] || (t[0] = (p) => a.value = p),
101
+ filterIds: r.value,
105
102
  filters: q.value
106
103
  }, null, 8, ["modelValue", "filterIds", "filters"])
107
104
  ]),
108
105
  default: c(() => [
109
106
  h("div", {
110
- id: t.value.All,
107
+ id: r.value.All,
111
108
  class: "request-section-content custom-scroll relative flex flex-1 flex-col",
112
109
  role: a.value === "All" ? "tabpanel" : "none"
113
110
  }, [
114
- e.collection && e.workspace && (n(m) !== "modal" || Object.keys(n(A) ?? {}).length) ? s((r(), d(X, {
111
+ e.collection && e.workspace && (o(m) !== "modal" || Object.keys(o(A) ?? {}).length) ? s((n(), d(X, {
115
112
  key: 0,
116
- id: t.value.Auth,
113
+ id: r.value.Auth,
117
114
  class: "request-section-content-auth",
118
115
  collection: e.collection,
119
116
  envVariables: e.envVariables,
120
117
  environment: e.environment,
121
- isReadOnly: n(m) === "modal",
118
+ isReadOnly: o(m) === "modal",
122
119
  layout: "client",
123
120
  operation: e.operation,
124
121
  role: a.value === "All" ? "none" : "tabpanel",
@@ -133,7 +130,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
133
130
  ]
134
131
  ]) : k("", !0),
135
132
  s(i(G, {
136
- id: t.value.Variables,
133
+ id: r.value.Variables,
137
134
  class: "request-section-content-path-params",
138
135
  envVariables: e.envVariables,
139
136
  environment: e.environment,
@@ -151,7 +148,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
151
148
  ]
152
149
  ]),
153
150
  s(i(V, {
154
- id: t.value.Cookies,
151
+ id: r.value.Cookies,
155
152
  class: "request-section-content-cookies",
156
153
  envVariables: e.envVariables,
157
154
  environment: e.environment,
@@ -168,7 +165,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
168
165
  [u, a.value === "All" || a.value === "Cookies"]
169
166
  ]),
170
167
  s(i(V, {
171
- id: t.value.Headers,
168
+ id: r.value.Headers,
172
169
  class: "request-section-content-headers",
173
170
  envVariables: e.envVariables,
174
171
  environment: e.environment,
@@ -184,7 +181,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
184
181
  [u, a.value === "All" || a.value === "Headers"]
185
182
  ]),
186
183
  s(i(V, {
187
- id: t.value.Query,
184
+ id: r.value.Query,
188
185
  class: "request-section-content-query",
189
186
  envVariables: e.envVariables,
190
187
  environment: e.environment,
@@ -199,9 +196,9 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
199
196
  }, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
200
197
  [u, a.value === "All" || a.value === "Query"]
201
198
  ]),
202
- e.operation.method && (a.value === "All" || a.value === "Body") && n(b)(e.operation.method) ? (r(), d(z, {
199
+ e.operation.method && (a.value === "All" || a.value === "Body") && o(b)(e.operation.method) ? (n(), d(z, {
203
200
  key: 1,
204
- id: t.value.Body,
201
+ id: r.value.Body,
205
202
  class: "request-section-content-body",
206
203
  envVariables: e.envVariables,
207
204
  environment: e.environment,
@@ -211,11 +208,11 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
211
208
  title: "Body",
212
209
  workspace: e.workspace
213
210
  }, null, 8, ["id", "envVariables", "environment", "example", "operation", "role", "workspace"])) : k("", !0),
214
- (r(!0), f(K, null, L(n(I), (p) => (r(), d(n(C), {
211
+ (n(!0), f(K, null, L(o(I), (p) => (n(), d(o(C), {
215
212
  key: p.component
216
213
  }, {
217
214
  default: c(() => [
218
- s((r(), d(Q(p.component), {
215
+ s((n(), d(Q(p.component), {
219
216
  operation: e.operation,
220
217
  "onUpdate:operation": U
221
218
  }, null, 40, ["operation"])), [
@@ -224,8 +221,8 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
224
221
  ]),
225
222
  _: 2
226
223
  }, 1024))), 128)),
227
- o[1] || (o[1] = h("div", { class: "flex flex-grow" }, null, -1)),
228
- i(n(C), null, {
224
+ t[1] || (t[1] = h("div", { class: "flex flex-grow" }, null, -1)),
225
+ i(o(C), null, {
229
226
  default: c(() => [
230
227
  i(J, {
231
228
  class: "request-section-content-code-example -mt-1/2 border-t",
@@ -1,5 +1,5 @@
1
1
  import o from "./RequestTable.vue2.js";
2
- import "./RequestTable.vue3.js";
2
+ /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
4
  const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-04661eb4"]]);
5
5
  export {
@@ -1,19 +1,19 @@
1
- import { defineComponent as z, createBlock as i, openBlock as u, withCtx as n, createVNode as r, createElementBlock as b, createTextVNode as f, toDisplayString as c, Fragment as g, renderList as q, normalizeClass as v, unref as s, createCommentVNode as k, createElementVNode as p } from "vue";
2
- import { ScalarTooltip as D, ScalarIcon as B, ScalarButton as R } from "@scalar/components";
3
- import { ScalarIconTrash as E } from "@scalar/icons";
4
- import { RouterLink as G } from "vue-router";
1
+ import { defineComponent as I, createBlock as i, openBlock as u, withCtx as n, createVNode as r, createElementBlock as b, createTextVNode as f, toDisplayString as c, Fragment as g, renderList as z, normalizeClass as v, unref as s, createCommentVNode as k, createElementVNode as p } from "vue";
2
+ import { ScalarTooltip as q, ScalarIcon as B, ScalarButton as R } from "@scalar/components";
3
+ import { ScalarIconTrash as D } from "@scalar/icons";
4
+ import { RouterLink as E } from "vue-router";
5
5
  import C from "../../../components/CodeInput/CodeInput.vue.js";
6
- import N from "../../../components/DataTable/DataTable.vue.js";
6
+ import G from "../../../components/DataTable/DataTable.vue.js";
7
7
  import y from "../../../components/DataTable/DataTableCell.vue.js";
8
- import P from "../../../components/DataTable/DataTableCheckbox.vue.js";
8
+ import N from "../../../components/DataTable/DataTableCheckbox.vue.js";
9
9
  import V from "../../../components/DataTable/DataTableHeader.vue.js";
10
10
  import $ from "../../../components/DataTable/DataTableRow.vue.js";
11
- import { parameterIsInvalid as j, hasItemProperties as h } from "../libs/request.js";
12
- import K from "./RequestTableTooltip.vue.js";
13
- const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify-end overflow-hidden p-1" }, A = ["onClick"], L = {
11
+ import { parameterIsInvalid as P, hasItemProperties as h } from "../libs/request.js";
12
+ import j from "./RequestTableTooltip.vue.js";
13
+ const K = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify-end overflow-hidden p-1" }, O = ["onClick"], A = {
14
14
  key: 1,
15
15
  class: "p-0.5"
16
- }, ne = /* @__PURE__ */ z({
16
+ }, oe = /* @__PURE__ */ I({
17
17
  __name: "RequestTable",
18
18
  props: {
19
19
  items: {},
@@ -34,7 +34,7 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
34
34
  }, U = (e) => {
35
35
  t("uploadFile", e);
36
36
  }, S = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default, T = (e) => !!(e.key || e.value);
37
- return (e, o) => (u(), i(N, {
37
+ return (e, o) => (u(), i(G, {
38
38
  class: "group/table flex-1",
39
39
  columns: _
40
40
  }, {
@@ -62,23 +62,23 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
62
62
  ]),
63
63
  _: 1
64
64
  }),
65
- (u(!0), b(g, null, q(e.items, (l, d) => (u(), i($, {
65
+ (u(!0), b(g, null, z(e.items, (l, d) => (u(), i($, {
66
66
  id: l.key,
67
67
  key: d,
68
68
  class: v({
69
- alert: s(j)(l).value,
69
+ alert: s(P)(l).value,
70
70
  error: e.invalidParams && e.invalidParams.has(l.key)
71
71
  })
72
72
  }, {
73
73
  default: n(() => [
74
- e.isGlobal ? (u(), i(s(G), {
74
+ e.isGlobal ? (u(), i(s(E), {
75
75
  key: 0,
76
76
  class: "text-c-2 flex items-center justify-center border-t !border-r",
77
77
  to: l.route ?? {}
78
78
  }, {
79
79
  default: n(() => [
80
80
  o[4] || (o[4] = p("span", { class: "sr-only" }, "Global", -1)),
81
- r(s(D), {
81
+ r(s(q), {
82
82
  content: "Global cookies are shared across the whole workspace.",
83
83
  placement: "top"
84
84
  }, {
@@ -95,7 +95,7 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
95
95
  ]),
96
96
  _: 2,
97
97
  __: [4]
98
- }, 1032, ["to"])) : (u(), i(P, {
98
+ }, 1032, ["to"])) : (u(), i(N, {
99
99
  key: 1,
100
100
  class: "!border-r",
101
101
  disabled: m.hasCheckboxDisabled,
@@ -165,11 +165,11 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
165
165
  onClick: (a) => t("deleteRow", d)
166
166
  }, {
167
167
  default: n(() => [
168
- r(s(E), { class: "size-3.5" })
168
+ r(s(D), { class: "size-3.5" })
169
169
  ]),
170
170
  _: 2
171
171
  }, 1032, ["class", "onClick"])) : k("", !0),
172
- s(h)(l) ? (u(), i(K, {
172
+ s(h)(l) ? (u(), i(j, {
173
173
  key: 1,
174
174
  item: { ...l, default: S(l) }
175
175
  }, null, 8, ["item"])) : k("", !0)
@@ -183,40 +183,37 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
183
183
  key: 2,
184
184
  class: "group/upload flex items-center justify-center whitespace-nowrap"
185
185
  }, {
186
- default: n(() => {
187
- var a;
188
- return [
189
- l.file ? (u(), b(g, { key: 0 }, [
190
- p("div", O, [
191
- p("span", null, c((a = l.file) == null ? void 0 : a.name), 1)
186
+ default: n(() => [
187
+ l.file ? (u(), b(g, { key: 0 }, [
188
+ p("div", K, [
189
+ p("span", null, c(l.file?.name), 1)
190
+ ]),
191
+ p("button", {
192
+ class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
193
+ type: "button",
194
+ onClick: (a) => t("removeFile", d)
195
+ }, " Delete ", 8, O)
196
+ ], 64)) : (u(), b("div", A, [
197
+ r(s(R), {
198
+ class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
199
+ size: "sm",
200
+ variant: "outlined",
201
+ onClick: (a) => U(d)
202
+ }, {
203
+ default: n(() => [
204
+ o[5] || (o[5] = p("span", null, "Upload File", -1)),
205
+ r(s(B), {
206
+ class: "ml-1",
207
+ icon: "Upload",
208
+ size: "xs",
209
+ thickness: "2.5"
210
+ })
192
211
  ]),
193
- p("button", {
194
- class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
195
- type: "button",
196
- onClick: (I) => t("removeFile", d)
197
- }, " Delete ", 8, A)
198
- ], 64)) : (u(), b("div", L, [
199
- r(s(R), {
200
- class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
201
- size: "sm",
202
- variant: "outlined",
203
- onClick: (I) => U(d)
204
- }, {
205
- default: n(() => [
206
- o[5] || (o[5] = p("span", null, "Upload File", -1)),
207
- r(s(B), {
208
- class: "ml-1",
209
- icon: "Upload",
210
- size: "xs",
211
- thickness: "2.5"
212
- })
213
- ]),
214
- _: 2,
215
- __: [5]
216
- }, 1032, ["onClick"])
217
- ]))
218
- ];
219
- }),
212
+ _: 2,
213
+ __: [5]
214
+ }, 1032, ["onClick"])
215
+ ]))
216
+ ]),
220
217
  _: 2
221
218
  }, 1024)) : k("", !0)
222
219
  ]),
@@ -228,5 +225,5 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
228
225
  }
229
226
  });
230
227
  export {
231
- ne as default
228
+ oe as default
232
229
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./RequestTableTooltip.vue2.js";
2
- import "./RequestTableTooltip.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-4df72868"]]);
5
5
  export {
@@ -1,29 +1,29 @@
1
- const m = (s, f = [], a = {}) => {
1
+ const l = (s, f = [], a = {}) => {
2
2
  if (!s || s.length === 0)
3
3
  return [];
4
- const r = s.filter((n) => Object.keys(n).length > 0);
5
- if (r.length === 0)
4
+ const o = s.filter((e) => Object.keys(e).length > 0);
5
+ if (o.length === 0)
6
6
  return [];
7
7
  if (f.length === 0) {
8
- const n = r[0], i = n ? Object.keys(n)[0] : void 0, t = Object.values(a).find((e) => e.nameKey === i);
9
- return t ? [t] : [];
8
+ const e = o[0], r = e ? Object.keys(e)[0] : void 0, n = Object.values(a).find((t) => t.nameKey === r);
9
+ return n ? [n] : [];
10
10
  }
11
- const l = new Set(
12
- r.map((n) => Object.keys(n).sort().join(","))
11
+ const m = new Set(
12
+ o.map((e) => Object.keys(e).sort().join(","))
13
13
  ), h = [];
14
- for (const n of f) {
15
- const i = Array.isArray(n) ? n : [n], t = [], e = [];
16
- for (const c of i) {
17
- const o = a[c];
18
- o != null && o.nameKey && (t.push(o), e.push(o.nameKey));
14
+ for (const e of f) {
15
+ const r = Array.isArray(e) ? e : [e], n = [], t = [];
16
+ for (const i of r) {
17
+ const c = a[i];
18
+ c?.nameKey && (n.push(c), t.push(c.nameKey));
19
19
  }
20
- if (e.length > 0) {
21
- const c = e.sort().join(",");
22
- l.has(c) && h.push(...t);
20
+ if (t.length > 0) {
21
+ const i = t.sort().join(",");
22
+ m.has(i) && h.push(...n);
23
23
  }
24
24
  }
25
25
  return h;
26
26
  };
27
27
  export {
28
- m as filterSecurityRequirements
28
+ l as filterSecurityRequirements
29
29
  };
@@ -1,17 +1,13 @@
1
- const q = (u, t, i) => {
2
- var n;
3
- const s = u.find((m) => {
4
- var r;
5
- return ((r = m.info) == null ? void 0 : r.title) === "Drafts";
6
- }), f = t.length === 1;
1
+ const u = (n, t, r) => {
2
+ const e = n.find((l) => l.info?.title === "Drafts"), i = t.length === 1;
7
3
  if (!t[0])
8
4
  return !1;
9
- const e = s == null ? void 0 : s.requests.includes(t[0]);
10
- if (!e)
5
+ const s = e?.requests.includes(t[0]);
6
+ if (!s)
11
7
  return !1;
12
- const g = ((n = i[(s == null ? void 0 : s.requests[0]) ?? ""]) == null ? void 0 : n.summary) !== "My First Request";
13
- return f && e && !g;
8
+ const f = r[e?.requests[0] ?? ""]?.summary !== "My First Request";
9
+ return i && s && !f;
14
10
  };
15
11
  export {
16
- q as isGettingStarted
12
+ u as isGettingStarted
17
13
  };
@@ -1,17 +1,16 @@
1
1
  import { safeLocalStorage as s, CLIENT_LS_KEYS as m } from "@scalar/helpers/object/local-storage";
2
- const g = (o, r, n, { securitySchemeMutators: a, securitySchemes: S }, f = !1) => {
3
- var c;
4
- if (a.edit(o, r, n), !!f)
2
+ const h = (t, o, r, { securitySchemeMutators: n, securitySchemes: a }, S = !1) => {
3
+ if (n.edit(t, o, r), !!S)
5
4
  try {
6
- const e = JSON.parse(s().getItem(m.AUTH) ?? "{}"), t = S[o];
7
- if (e && (t != null && t.nameKey)) {
8
- const i = e[c = t.nameKey] || (e[c] = {});
9
- i[r] = n, s().setItem(m.AUTH, JSON.stringify(e));
5
+ const e = JSON.parse(s().getItem(m.AUTH) ?? "{}"), c = a[t];
6
+ if (e && c?.nameKey) {
7
+ const f = e[c.nameKey] ||= {};
8
+ f[o] = r, s().setItem(m.AUTH, JSON.stringify(e));
10
9
  }
11
10
  } catch (e) {
12
11
  console.error(e);
13
12
  }
14
13
  };
15
14
  export {
16
- g as updateScheme
15
+ h as updateScheme
17
16
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./RequestSidebar.vue2.js";
2
- import "./RequestSidebar.vue3.js";
2
+ /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bca9c474"]]);
5
5
  export {