@scalar/api-client 2.5.31 → 2.5.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/CHANGELOG.md +33 -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 +1 -1
  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,41 +1,40 @@
1
- import { defineComponent as c, ref as n, computed as l, watch as p, createBlock as _, openBlock as d, withCtx as s, createVNode as r, createElementVNode as h, unref as x } from "vue";
2
- import { useScroll as v } from "@vueuse/core";
3
- import { useRouter as w, RouterView as k } from "vue-router";
4
- import y from "../../components/ViewLayout/ViewLayout.vue.js";
5
- import q from "../../components/ViewLayout/ViewLayoutSection.vue.js";
6
- import C from "./CollectionNavigation.vue.js";
7
- import { useActiveEntities as R } from "../../store/active-entities.js";
8
- import { PathId as S } from "../../routes.js";
9
- const V = { class: "w-full md:mx-auto md:max-w-[720px]" }, g = /* @__PURE__ */ c({
1
+ import { defineComponent as f, ref as l, computed as u, watch as n, createBlock as p, openBlock as _, withCtx as s, createVNode as e, createElementVNode as d, unref as h } from "vue";
2
+ import { useScroll as x } from "@vueuse/core";
3
+ import { useRouter as v, RouterView as w } from "vue-router";
4
+ import k from "../../components/ViewLayout/ViewLayout.vue.js";
5
+ import y from "../../components/ViewLayout/ViewLayoutSection.vue.js";
6
+ import q from "./CollectionNavigation.vue.js";
7
+ import { useActiveEntities as C } from "../../store/active-entities.js";
8
+ import { PathId as R } from "../../routes.js";
9
+ const S = { class: "w-full md:mx-auto md:max-w-[720px]" }, P = /* @__PURE__ */ f({
10
10
  __name: "Collection",
11
- setup($) {
12
- const { activeCollection: i } = R(), m = w(), o = n(null), { y: a } = v(o), f = l(() => a.value > 104);
13
- return p(
11
+ setup(V) {
12
+ const { activeCollection: i } = C(), m = v(), o = l(null), { y: c } = x(o), a = u(() => c.value > 104);
13
+ return n(
14
14
  i,
15
15
  (t) => {
16
- var e;
17
- if (((e = t == null ? void 0 : t.info) == null ? void 0 : e.title) === "Drafts") {
18
- const u = t.requests[0];
16
+ if (t?.info?.title === "Drafts") {
17
+ const r = t.requests[0];
19
18
  m.push({
20
19
  name: "request",
21
- params: { [S.Request]: u }
20
+ params: { [R.Request]: r }
22
21
  });
23
22
  }
24
23
  },
25
24
  {
26
25
  immediate: !0
27
26
  }
28
- ), (t, e) => (d(), _(y, {
27
+ ), (t, r) => (_(), p(k, {
29
28
  ref_key: "el",
30
29
  ref: o,
31
30
  class: "h-fit overflow-auto pb-6 xl:overflow-auto"
32
31
  }, {
33
32
  default: s(() => [
34
- r(q, { class: "xl:h-fit" }, {
33
+ e(y, { class: "xl:h-fit" }, {
35
34
  default: s(() => [
36
- r(C, { isSticky: f.value }, null, 8, ["isSticky"]),
37
- h("div", V, [
38
- r(x(k))
35
+ e(q, { isSticky: a.value }, null, 8, ["isSticky"]),
36
+ d("div", S, [
37
+ e(h(w))
39
38
  ])
40
39
  ]),
41
40
  _: 1
@@ -46,5 +45,5 @@ const V = { class: "w-full md:mx-auto md:max-w-[720px]" }, g = /* @__PURE__ */ c
46
45
  }
47
46
  });
48
47
  export {
49
- g as default
48
+ P as default
50
49
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./CollectionAuthentication.vue2.js";
2
- import "./CollectionAuthentication.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-cc87292e"]]);
5
5
  export {
@@ -1,60 +1,56 @@
1
- import { defineComponent as f, createElementBlock as h, openBlock as a, createElementVNode as o, createBlock as y, createCommentVNode as S, createVNode as x, unref as e, normalizeClass as _ } from "vue";
2
- import { ScalarToggle as C } from "@scalar/components";
3
- import { useActiveEntities as V } from "../../store/active-entities.js";
4
- import { useWorkspace as g } from "../../store/store.js";
5
- import k from "../Request/RequestSection/RequestAuth/RequestAuth.vue.js";
6
- const b = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, w = { class: "flex flex-col gap-4" }, A = { class: "flex flex-col gap-2" }, E = { class: "flex h-8 items-center justify-between" }, j = /* @__PURE__ */ f({
1
+ import { defineComponent as d, createElementBlock as m, openBlock as c, createElementVNode as o, createBlock as p, createCommentVNode as v, createVNode as f, unref as e, normalizeClass as h } from "vue";
2
+ import { ScalarToggle as y } from "@scalar/components";
3
+ import { useActiveEntities as S } from "../../store/active-entities.js";
4
+ import { useWorkspace as x } from "../../store/store.js";
5
+ import _ from "../Request/RequestSection/RequestAuth/RequestAuth.vue.js";
6
+ const C = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, V = { class: "flex flex-col gap-4" }, g = { class: "flex flex-col gap-2" }, k = { class: "flex h-8 items-center justify-between" }, N = /* @__PURE__ */ d({
7
7
  __name: "CollectionAuthentication",
8
- setup(U) {
8
+ setup(b) {
9
9
  const {
10
10
  activeCollection: t,
11
- activeEnvVariables: u,
12
- activeEnvironment: d,
13
- activeServer: m,
14
- activeWorkspace: c
15
- } = V(), { collectionMutators: p } = g(), v = () => {
16
- var i;
17
- (i = t.value) != null && i.uid && p.edit(
11
+ activeEnvVariables: n,
12
+ activeEnvironment: s,
13
+ activeServer: r,
14
+ activeWorkspace: i
15
+ } = S(), { collectionMutators: a } = x(), u = () => {
16
+ t.value?.uid && a.edit(
18
17
  t.value.uid,
19
18
  "useCollectionSecurity",
20
19
  !t.value.useCollectionSecurity
21
20
  );
22
21
  };
23
- return (i, l) => {
24
- var n, s, r;
25
- return a(), h("div", b, [
26
- o("div", w, [
27
- o("div", A, [
28
- o("div", E, [
29
- l[0] || (l[0] = o("h3", { class: "font-bold" }, "Authentication", -1)),
30
- x(e(C), {
31
- class: "w-4",
32
- modelValue: ((n = e(t)) == null ? void 0 : n.useCollectionSecurity) ?? !1,
33
- "onUpdate:modelValue": v
34
- }, null, 8, ["modelValue"])
35
- ]),
36
- l[1] || (l[1] = o("p", { class: "pr-6 text-sm" }, " Added authentication will apply to all requests under this collection. You can override this by specifying another one in the request. ", -1))
22
+ return (w, l) => (c(), m("div", C, [
23
+ o("div", V, [
24
+ o("div", g, [
25
+ o("div", k, [
26
+ l[0] || (l[0] = o("h3", { class: "font-bold" }, "Authentication", -1)),
27
+ f(e(y), {
28
+ class: "w-4",
29
+ modelValue: e(t)?.useCollectionSecurity ?? !1,
30
+ "onUpdate:modelValue": u
31
+ }, null, 8, ["modelValue"])
37
32
  ]),
38
- e(t) && e(c) ? (a(), y(e(k), {
39
- key: 0,
40
- class: _([
41
- "scalar-collection-auth",
42
- !((s = e(t)) != null && s.useCollectionSecurity) && "pointer-events-none opacity-50 mix-blend-luminosity"
43
- ]),
44
- collection: e(t),
45
- envVariables: e(u),
46
- environment: e(d),
47
- layout: "client",
48
- selectedSecuritySchemeUids: ((r = e(t)) == null ? void 0 : r.selectedSecuritySchemeUids) ?? [],
49
- server: e(m),
50
- title: "Authentication",
51
- workspace: e(c)
52
- }, null, 8, ["class", "collection", "envVariables", "environment", "selectedSecuritySchemeUids", "server", "workspace"])) : S("", !0)
53
- ])
54
- ]);
55
- };
33
+ l[1] || (l[1] = o("p", { class: "pr-6 text-sm" }, " Added authentication will apply to all requests under this collection. You can override this by specifying another one in the request. ", -1))
34
+ ]),
35
+ e(t) && e(i) ? (c(), p(e(_), {
36
+ key: 0,
37
+ class: h([
38
+ "scalar-collection-auth",
39
+ !e(t)?.useCollectionSecurity && "pointer-events-none opacity-50 mix-blend-luminosity"
40
+ ]),
41
+ collection: e(t),
42
+ envVariables: e(n),
43
+ environment: e(s),
44
+ layout: "client",
45
+ selectedSecuritySchemeUids: e(t)?.selectedSecuritySchemeUids ?? [],
46
+ server: e(r),
47
+ title: "Authentication",
48
+ workspace: e(i)
49
+ }, null, 8, ["class", "collection", "envVariables", "environment", "selectedSecuritySchemeUids", "server", "workspace"])) : v("", !0)
50
+ ])
51
+ ]));
56
52
  }
57
53
  });
58
54
  export {
59
- j as default
55
+ N as default
60
56
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./CollectionEnvironment.vue2.js";
2
- import "./CollectionEnvironment.vue3.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,241 +1,230 @@
1
- import { defineComponent as J, ref as F, computed as L, createBlock as y, openBlock as C, withCtx as u, createElementVNode as r, createVNode as c, createElementBlock as U, createTextVNode as I, Fragment as G, renderList as H, unref as t, createCommentVNode as K, normalizeStyle as P, toDisplayString as Q } from "vue";
2
- import { useModal as k, ScalarButton as w, ScalarIcon as X, ScalarModal as S } from "@scalar/components";
3
- import { Draggable as Y } from "@scalar/draggable";
4
- import { ScalarIconTrash as Z } from "@scalar/icons";
5
- import ee from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
6
- import te from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
7
- import ne from "../../components/ViewLayout/ViewLayoutSection.vue.js";
8
- import oe from "../Environment/EnvironmentColorModal.vue.js";
9
- import le from "../Environment/EnvironmentModal.vue.js";
10
- import se from "./components/EnvironmentForm.vue.js";
11
- import { useActiveEntities as ae } from "../../store/active-entities.js";
12
- import { useWorkspace as re } from "../../store/store.js";
13
- const ie = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, ce = { class: "flex flex-col gap-4" }, de = { class: "rounded-lg border" }, ue = { class: "bg-b-2 flex cursor-grab items-center justify-between rounded-t-lg px-1 py-1 text-sm" }, ve = { class: "flex items-center" }, me = ["onClick"], fe = { class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4" }, Me = /* @__PURE__ */ J({
1
+ import { defineComponent as q, ref as k, computed as J, createBlock as F, openBlock as E, withCtx as u, createElementVNode as a, createVNode as r, createElementBlock as L, createTextVNode as M, Fragment as U, renderList as G, unref as e, createCommentVNode as H, normalizeStyle as K, toDisplayString as P } from "vue";
2
+ import { useModal as C, ScalarButton as y, ScalarIcon as Q, ScalarModal as I } from "@scalar/components";
3
+ import { Draggable as X } from "@scalar/draggable";
4
+ import { ScalarIconTrash as Y } from "@scalar/icons";
5
+ import Z from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
6
+ import ee from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
7
+ import te from "../../components/ViewLayout/ViewLayoutSection.vue.js";
8
+ import ne from "../Environment/EnvironmentColorModal.vue.js";
9
+ import oe from "../Environment/EnvironmentModal.vue.js";
10
+ import le from "./components/EnvironmentForm.vue.js";
11
+ import { useActiveEntities as se } from "../../store/active-entities.js";
12
+ import { useWorkspace as ae } from "../../store/store.js";
13
+ const re = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, ie = { class: "flex flex-col gap-4" }, ce = { class: "rounded-lg border" }, de = { class: "bg-b-2 flex cursor-grab items-center justify-between rounded-t-lg px-1 py-1 text-sm" }, ue = { class: "flex items-center" }, ve = ["onClick"], me = { class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4" }, $e = /* @__PURE__ */ q({
14
14
  __name: "CollectionEnvironment",
15
- setup(pe) {
16
- const { activeCollection: l, activeWorkspace: $, activeEnvVariables: D } = ae(), { collectionMutators: m } = re(), b = k(), h = k(), g = k(), _ = k(), M = F(""), s = F(null), E = F(void 0), V = L(() => {
17
- var n;
18
- return (n = l.value) != null && n["x-scalar-environments"] ? Object.entries(l.value["x-scalar-environments"]).map(
19
- ([e, i]) => ({
20
- uid: e,
21
- name: e,
22
- value: JSON.stringify(i.variables || {}),
23
- color: i.color || "#FFFFFF"
24
- })
25
- ) : [];
26
- }), N = () => {
27
- var n;
28
- !((n = l.value) != null && n.uid) || !s.value || (m.removeEnvironment(
29
- s.value,
30
- l.value.uid
31
- ), h.hide());
32
- }, j = (n) => {
33
- s.value = n, h.show();
34
- }, z = (n) => {
35
- var e;
36
- (e = l.value) != null && e.uid && (m.addEnvironment(
37
- n.name,
15
+ setup(fe) {
16
+ const { activeCollection: n, activeWorkspace: w, activeEnvVariables: S } = se(), { collectionMutators: m } = ae(), x = C(), b = C(), h = C(), g = C(), $ = k(""), l = k(null), _ = k(void 0), D = J(() => n.value?.["x-scalar-environments"] ? Object.entries(n.value["x-scalar-environments"]).map(
17
+ ([o, t]) => ({
18
+ uid: o,
19
+ name: o,
20
+ value: JSON.stringify(t.variables || {}),
21
+ color: t.color || "#FFFFFF"
22
+ })
23
+ ) : []), V = () => {
24
+ !n.value?.uid || !l.value || (m.removeEnvironment(
25
+ l.value,
26
+ n.value.uid
27
+ ), b.hide());
28
+ }, N = (o) => {
29
+ l.value = o, b.show();
30
+ }, j = (o) => {
31
+ n.value?.uid && (m.addEnvironment(
32
+ o.name,
38
33
  {
39
34
  variables: {},
40
- color: n.color
35
+ color: o.color
41
36
  },
42
- l.value.uid
43
- ), g.hide());
44
- }, O = (n) => {
45
- s.value = n.name, M.value = n.color || "#FFFFFF", b.show();
46
- }, A = (n) => {
47
- var i, o, a;
48
- if (!((i = l.value) != null && i.uid) || !s.value)
37
+ n.value.uid
38
+ ), h.hide());
39
+ }, z = (o) => {
40
+ l.value = o.name, $.value = o.color || "#FFFFFF", x.show();
41
+ }, O = (o) => {
42
+ if (!n.value?.uid || !l.value)
49
43
  return;
50
- const e = {
51
- ...l.value["x-scalar-environments"],
52
- [s.value]: {
53
- variables: ((a = (o = l.value["x-scalar-environments"]) == null ? void 0 : o[s.value]) == null ? void 0 : a.variables) || {},
54
- color: n
44
+ const t = {
45
+ ...n.value["x-scalar-environments"],
46
+ [l.value]: {
47
+ variables: n.value["x-scalar-environments"]?.[l.value]?.variables || {},
48
+ color: o
55
49
  }
56
50
  };
57
51
  m.edit(
58
- l.value.uid,
52
+ n.value.uid,
59
53
  "x-scalar-environments",
60
- e
61
- ), b.hide();
62
- }, B = (n) => {
63
- s.value = n, E.value = n, _.show();
64
- }, W = () => {
65
- s.value = null, E.value = void 0, _.hide();
66
- }, R = (n) => {
67
- var p;
68
- if (!((p = l.value) != null && p.uid) || !s.value)
54
+ t
55
+ ), x.hide();
56
+ }, A = (o) => {
57
+ l.value = o, _.value = o, g.show();
58
+ }, B = () => {
59
+ l.value = null, _.value = void 0, g.hide();
60
+ }, W = (o) => {
61
+ if (!n.value?.uid || !l.value)
69
62
  return;
70
- const e = { ...l.value["x-scalar-environments"] };
71
- if (!e[s.value])
63
+ const t = { ...n.value["x-scalar-environments"] };
64
+ if (!t[l.value])
72
65
  return;
73
- const o = {}, a = Object.entries(e), f = a.findIndex(
74
- ([v]) => v === s.value
66
+ const i = {}, c = Object.entries(t), f = c.findIndex(
67
+ ([v]) => v === l.value
75
68
  );
76
- a.forEach(([v, x], d) => {
77
- d === f ? o[n] = x : o[v] = x;
69
+ c.forEach(([v, p], d) => {
70
+ d === f ? i[o] = p : i[v] = p;
78
71
  }), m.edit(
79
- l.value.uid,
72
+ n.value.uid,
80
73
  "x-scalar-environments",
81
- o
82
- ), s.value = null, E.value = void 0, _.hide();
83
- }, T = (n, e) => {
84
- var x;
85
- if (!((x = l.value) != null && x.uid))
74
+ i
75
+ ), l.value = null, _.value = void 0, g.hide();
76
+ }, R = (o, t) => {
77
+ if (!n.value?.uid)
86
78
  return;
87
- const i = { ...l.value["x-scalar-environments"] }, o = {}, a = Object.entries(i), f = a.findIndex(([d]) => d === n.id), p = a.findIndex(([d]) => d === e.id);
88
- if (f === -1 || p === -1)
79
+ const s = { ...n.value["x-scalar-environments"] }, i = {}, c = Object.entries(s), f = c.findIndex(([d]) => d === o.id), v = c.findIndex(([d]) => d === t.id);
80
+ if (f === -1 || v === -1)
89
81
  return;
90
- const v = a[f];
91
- v && (a.splice(f, 1), a.splice(p, 0, v), a.forEach(([d, q]) => {
92
- o[d] = q;
82
+ const p = c[f];
83
+ p && (c.splice(f, 1), c.splice(v, 0, p), c.forEach(([d, T]) => {
84
+ i[d] = T;
93
85
  }), m.edit(
94
- l.value.uid,
86
+ n.value.uid,
95
87
  "x-scalar-environments",
96
- o
88
+ i
97
89
  ));
98
90
  };
99
- return (n, e) => (C(), y(ne, null, {
100
- default: u(() => {
101
- var i;
102
- return [
103
- r("div", ie, [
104
- r("div", ce, [
105
- e[5] || (e[5] = r("div", { class: "flex items-start justify-between gap-2" }, [
106
- r("div", { class: "flex flex-col gap-2" }, [
107
- r("div", { class: "flex h-8 items-center" }, [
108
- r("h3", { class: "font-bold" }, "Environment Variables")
109
- ]),
110
- r("p", { class: "text-sm" }, [
111
- I(" Set environment variables at your collection level. Use "),
112
- r("code", { class: "font-code text-c-2" }, "{{ variable }}"),
113
- I(" to add / search among the selected environment's variables in your request inputs. ")
114
- ])
91
+ return (o, t) => (E(), F(te, null, {
92
+ default: u(() => [
93
+ a("div", re, [
94
+ a("div", ie, [
95
+ t[5] || (t[5] = a("div", { class: "flex items-start justify-between gap-2" }, [
96
+ a("div", { class: "flex flex-col gap-2" }, [
97
+ a("div", { class: "flex h-8 items-center" }, [
98
+ a("h3", { class: "font-bold" }, "Environment Variables")
99
+ ]),
100
+ a("p", { class: "text-sm" }, [
101
+ M(" Set environment variables at your collection level. Use "),
102
+ a("code", { class: "font-code text-c-2" }, "{{ variable }}"),
103
+ M(" to add / search among the selected environment's variables in your request inputs. ")
115
104
  ])
116
- ], -1)),
117
- (C(!0), U(G, null, H(V.value, (o) => (C(), y(t(Y), {
118
- key: o.name,
119
- id: o.name,
120
- isDraggable: !0,
121
- isDroppable: !0,
122
- parentIds: [],
123
- onOnDragEnd: T
124
- }, {
125
- default: u(() => [
126
- r("div", de, [
127
- r("div", ue, [
128
- r("div", ve, [
129
- c(t(w), {
130
- class: "hover:bg-b-3 flex h-6 w-6 p-1",
131
- onClick: (a) => O(o),
132
- variant: "ghost"
133
- }, {
134
- default: u(() => [
135
- r("span", {
136
- style: P({ backgroundColor: o.color || "#FFFFFF" }),
137
- class: "h-2.5 w-2.5 rounded-full"
138
- }, null, 4)
139
- ]),
140
- _: 2
141
- }, 1032, ["onClick"]),
142
- r("button", {
143
- class: "hover:bg-b-3 rounded px-1 py-0.5 text-sm",
144
- onClick: (a) => B(o.name)
145
- }, Q(o.name), 9, me)
146
- ]),
147
- c(t(w), {
148
- class: "hover:bg-b-3 hover:text-c-1 h-fit p-1.25",
149
- variant: "ghost",
150
- onClick: (a) => j(o.name)
105
+ ])
106
+ ], -1)),
107
+ (E(!0), L(U, null, G(D.value, (s) => (E(), F(e(X), {
108
+ key: s.name,
109
+ id: s.name,
110
+ isDraggable: !0,
111
+ isDroppable: !0,
112
+ parentIds: [],
113
+ onOnDragEnd: R
114
+ }, {
115
+ default: u(() => [
116
+ a("div", ce, [
117
+ a("div", de, [
118
+ a("div", ue, [
119
+ r(e(y), {
120
+ class: "hover:bg-b-3 flex h-6 w-6 p-1",
121
+ onClick: (i) => z(s),
122
+ variant: "ghost"
151
123
  }, {
152
124
  default: u(() => [
153
- c(t(Z), { class: "size-3.5" })
125
+ a("span", {
126
+ style: K({ backgroundColor: s.color || "#FFFFFF" }),
127
+ class: "h-2.5 w-2.5 rounded-full"
128
+ }, null, 4)
154
129
  ]),
155
130
  _: 2
156
- }, 1032, ["onClick"])
131
+ }, 1032, ["onClick"]),
132
+ a("button", {
133
+ class: "hover:bg-b-3 rounded px-1 py-0.5 text-sm",
134
+ onClick: (i) => A(s.name)
135
+ }, P(s.name), 9, ve)
157
136
  ]),
158
- t(l) && t($) ? (C(), y(se, {
159
- key: 0,
160
- collection: t(l),
161
- environment: o,
162
- envVariables: t(D),
163
- workspace: t($)
164
- }, null, 8, ["collection", "environment", "envVariables", "workspace"])) : K("", !0)
165
- ])
166
- ]),
167
- _: 2
168
- }, 1032, ["id"]))), 128)),
169
- r("div", fe, [
170
- c(t(w), {
171
- class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
172
- size: "sm",
173
- variant: "ghost",
174
- onClick: e[0] || (e[0] = (o) => t(g).show())
175
- }, {
176
- default: u(() => [
177
- c(t(X), {
178
- class: "inline-flex",
179
- icon: "Add",
180
- size: "sm",
181
- thickness: "1.5"
182
- }),
183
- e[4] || (e[4] = r("span", null, "Add Environment", -1))
137
+ r(e(y), {
138
+ class: "hover:bg-b-3 hover:text-c-1 h-fit p-1.25",
139
+ variant: "ghost",
140
+ onClick: (i) => N(s.name)
141
+ }, {
142
+ default: u(() => [
143
+ r(e(Y), { class: "size-3.5" })
144
+ ]),
145
+ _: 2
146
+ }, 1032, ["onClick"])
184
147
  ]),
185
- _: 1,
186
- __: [4]
187
- })
188
- ])
189
- ]),
190
- c(t(S), {
191
- size: "xxs",
192
- state: t(h),
193
- title: `Delete ${s.value || "Environment"}`
194
- }, {
195
- default: u(() => [
196
- c(ee, {
197
- variableName: "Environment",
198
- warningMessage: "Are you sure you want to delete this environment? This action cannot be undone.",
199
- onClose: e[1] || (e[1] = (o) => t(h).hide()),
200
- onDelete: N
201
- })
202
- ]),
203
- _: 1
204
- }, 8, ["state", "title"]),
205
- c(le, {
206
- activeWorkspaceCollections: t(l) ? [t(l)] : [],
207
- collectionId: (i = t(l)) == null ? void 0 : i.uid,
208
- state: t(g),
209
- onCancel: e[2] || (e[2] = (o) => t(g).hide()),
210
- onSubmit: z
211
- }, null, 8, ["activeWorkspaceCollections", "collectionId", "state"]),
212
- c(oe, {
213
- selectedColor: M.value,
214
- state: t(b),
215
- onCancel: e[3] || (e[3] = (o) => t(b).hide()),
216
- onSubmit: A
217
- }, null, 8, ["selectedColor", "state"]),
218
- c(t(S), {
219
- size: "xxs",
220
- state: t(_),
221
- title: `Edit ${s.value}`
222
- }, {
223
- default: u(() => [
224
- c(te, {
225
- name: E.value ?? "",
226
- onClose: W,
227
- onEdit: R
228
- }, null, 8, ["name"])
148
+ e(n) && e(w) ? (E(), F(le, {
149
+ key: 0,
150
+ collection: e(n),
151
+ environment: s,
152
+ envVariables: e(S),
153
+ workspace: e(w)
154
+ }, null, 8, ["collection", "environment", "envVariables", "workspace"])) : H("", !0)
155
+ ])
229
156
  ]),
230
- _: 1
231
- }, 8, ["state", "title"])
232
- ])
233
- ];
234
- }),
157
+ _: 2
158
+ }, 1032, ["id"]))), 128)),
159
+ a("div", me, [
160
+ r(e(y), {
161
+ class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
162
+ size: "sm",
163
+ variant: "ghost",
164
+ onClick: t[0] || (t[0] = (s) => e(h).show())
165
+ }, {
166
+ default: u(() => [
167
+ r(e(Q), {
168
+ class: "inline-flex",
169
+ icon: "Add",
170
+ size: "sm",
171
+ thickness: "1.5"
172
+ }),
173
+ t[4] || (t[4] = a("span", null, "Add Environment", -1))
174
+ ]),
175
+ _: 1,
176
+ __: [4]
177
+ })
178
+ ])
179
+ ]),
180
+ r(e(I), {
181
+ size: "xxs",
182
+ state: e(b),
183
+ title: `Delete ${l.value || "Environment"}`
184
+ }, {
185
+ default: u(() => [
186
+ r(Z, {
187
+ variableName: "Environment",
188
+ warningMessage: "Are you sure you want to delete this environment? This action cannot be undone.",
189
+ onClose: t[1] || (t[1] = (s) => e(b).hide()),
190
+ onDelete: V
191
+ })
192
+ ]),
193
+ _: 1
194
+ }, 8, ["state", "title"]),
195
+ r(oe, {
196
+ activeWorkspaceCollections: e(n) ? [e(n)] : [],
197
+ collectionId: e(n)?.uid,
198
+ state: e(h),
199
+ onCancel: t[2] || (t[2] = (s) => e(h).hide()),
200
+ onSubmit: j
201
+ }, null, 8, ["activeWorkspaceCollections", "collectionId", "state"]),
202
+ r(ne, {
203
+ selectedColor: $.value,
204
+ state: e(x),
205
+ onCancel: t[3] || (t[3] = (s) => e(x).hide()),
206
+ onSubmit: O
207
+ }, null, 8, ["selectedColor", "state"]),
208
+ r(e(I), {
209
+ size: "xxs",
210
+ state: e(g),
211
+ title: `Edit ${l.value}`
212
+ }, {
213
+ default: u(() => [
214
+ r(ee, {
215
+ name: _.value ?? "",
216
+ onClose: B,
217
+ onEdit: W
218
+ }, null, 8, ["name"])
219
+ ]),
220
+ _: 1
221
+ }, 8, ["state", "title"])
222
+ ])
223
+ ]),
235
224
  _: 1
236
225
  }));
237
226
  }
238
227
  });
239
228
  export {
240
- Me as default
229
+ $e as default
241
230
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./CollectionInfoForm.vue2.js";
2
- import "./CollectionInfoForm.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-68d5218e"]]);
5
5
  export {