@scalar/api-client 2.5.32 → 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 +20 -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,91 +1,90 @@
1
- import { defineComponent as ge, useId as Se, reactive as ke, ref as K, watch as C, onMounted as Re, onBeforeUnmount as ye, computed as $, createElementBlock as h, openBlock as r, Fragment as D, withDirectives as xe, createBlock as u, createCommentVNode as m, createVNode as b, unref as t, normalizeClass as g, createSlots as we, withCtx as d, createElementVNode as i, createTextVNode as q, toDisplayString as U, withKeys as M, withModifiers as S, isRef as Ie, renderList as G, vShow as Ce } from "vue";
2
- import { ScalarButton as $e, ScalarIcon as T, ScalarSidebarSearchInput as De, ScalarSearchResultList as qe, ScalarSearchResultItem as Me } from "@scalar/components";
3
- import { LibraryIcon as Te } from "@scalar/icons/library";
4
- import { useToasts as Pe } from "@scalar/use-toasts";
5
- import { useRouter as _e } from "vue-router";
6
- import Ve from "../../assets/rabbit.ascii.js";
7
- import Ee from "../../assets/rabbitjump.ascii.js";
8
- import Le from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
9
- import Ne from "../../components/HttpMethod/HttpMethod.vue.js";
10
- import j from "../../components/ScalarAsciiArt.vue.js";
11
- import { useSearch as Oe } from "../../components/Search/useSearch.js";
12
- import ze from "../../components/Sidebar/SidebarButton.vue.js";
13
- import { useLayout as Be } from "../../hooks/useLayout.js";
14
- import { useSidebar as Fe } from "../../hooks/useSidebar.js";
15
- import { PathId as J } from "../../routes.js";
16
- import { useActiveEntities as We } from "../../store/active-entities.js";
17
- import { createInitialRequest as Ae } from "../../store/requests.js";
18
- import { dragHandlerFactory as He } from "./handle-drag.js";
19
- import Ke from "./RequestSidebarItemMenu.vue.js";
20
- import { isGettingStarted as Ue } from "./RequestSection/helpers/getting-started.js";
21
- import Ge from "./RequestSidebarItem.vue.js";
22
- import je from "../../components/Sidebar/Sidebar.vue.js";
23
- import Je from "./components/WorkspaceDropdown.vue.js";
24
- import { useWorkspace as Qe } from "../../store/store.js";
25
- const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye = {
1
+ import { defineComponent as ve, useId as he, reactive as be, ref as W, watch as C, onMounted as ge, onBeforeUnmount as Se, computed as I, createElementBlock as v, openBlock as a, Fragment as $, withDirectives as ke, createBlock as u, createCommentVNode as m, createVNode as h, unref as t, normalizeClass as b, createSlots as Re, withCtx as d, createElementVNode as n, createTextVNode as D, toDisplayString as A, withKeys as q, withModifiers as g, isRef as ye, renderList as H, vShow as xe } from "vue";
2
+ import { ScalarButton as we, ScalarIcon as M, ScalarSidebarSearchInput as Ce, ScalarSearchResultList as Ie, ScalarSearchResultItem as $e } from "@scalar/components";
3
+ import { LibraryIcon as De } from "@scalar/icons/library";
4
+ import { useToasts as qe } from "@scalar/use-toasts";
5
+ import { useRouter as Me } from "vue-router";
6
+ import Te from "../../assets/rabbit.ascii.js";
7
+ import Pe from "../../assets/rabbitjump.ascii.js";
8
+ import _e from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
9
+ import Ve from "../../components/HttpMethod/HttpMethod.vue.js";
10
+ import K from "../../components/ScalarAsciiArt.vue.js";
11
+ import { useSearch as Ee } from "../../components/Search/useSearch.js";
12
+ import Le from "../../components/Sidebar/SidebarButton.vue.js";
13
+ import { useLayout as Ne } from "../../hooks/useLayout.js";
14
+ import { useSidebar as Oe } from "../../hooks/useSidebar.js";
15
+ import { PathId as U } from "../../routes.js";
16
+ import { useActiveEntities as ze } from "../../store/active-entities.js";
17
+ import { createInitialRequest as Be } from "../../store/requests.js";
18
+ import { dragHandlerFactory as Fe } from "./handle-drag.js";
19
+ import We from "./RequestSidebarItemMenu.vue.js";
20
+ import { isGettingStarted as Ae } from "./RequestSection/helpers/getting-started.js";
21
+ import He from "./RequestSidebarItem.vue.js";
22
+ import Ke from "../../components/Sidebar/Sidebar.vue.js";
23
+ import Ue from "./components/WorkspaceDropdown.vue.js";
24
+ import { useWorkspace as Ge } from "../../store/store.js";
25
+ const je = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Je = {
26
26
  key: 1,
27
27
  class: "text-c-3"
28
- }, Ze = ["aria-pressed"], et = { class: "sr-only" }, tt = {
28
+ }, Qe = ["aria-pressed"], Xe = { class: "sr-only" }, Ye = {
29
29
  key: 0,
30
30
  class: "search-button-fade sticky top-12 z-10 px-3 py-2.5 pt-0 focus-within:z-20",
31
31
  role: "search"
32
- }, ot = {
32
+ }, Ze = {
33
33
  key: 1,
34
34
  class: "contents"
35
- }, st = {
35
+ }, et = {
36
36
  key: 0,
37
37
  class: "empty-sidebar-item-content px-2.5 py-2.5"
38
- }, at = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, Mt = /* @__PURE__ */ ge({
38
+ }, tt = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, $t = /* @__PURE__ */ ve({
39
39
  __name: "RequestSidebar",
40
40
  emits: ["newTab", "clearDrafts"],
41
- setup(rt, { emit: Q }) {
42
- const X = Q, {
43
- collapsedSidebarFolders: Y,
44
- isSidebarOpen: P,
45
- setCollapsedSidebarFolder: Z,
46
- toggleSidebarOpen: ee
47
- } = Fe(), { layout: n } = Be(), _ = Qe(), {
48
- activeCollection: V,
41
+ setup(ot, { emit: G }) {
42
+ const j = G, {
43
+ collapsedSidebarFolders: J,
44
+ isSidebarOpen: T,
45
+ setCollapsedSidebarFolder: Q,
46
+ toggleSidebarOpen: X
47
+ } = Oe(), { layout: l } = Ne(), P = Ge(), {
48
+ activeCollection: _,
49
49
  activeWorkspaceCollections: c,
50
- activeRequest: te,
51
- activeWorkspaceRequests: E,
52
- activeWorkspace: oe
53
- } = We(), { findRequestParents: se, events: R, requestMutators: L, requests: x } = _, { handleDragEnd: ae, isDroppable: re } = He(
54
- oe,
55
- _
56
- ), { replace: N } = _e(), le = () => {
57
- R.commandPalette.emit({
50
+ activeRequest: Y,
51
+ activeWorkspaceRequests: V,
52
+ activeWorkspace: Z
53
+ } = ze(), { findRequestParents: ee, events: k, requestMutators: E, requests: y } = P, { handleDragEnd: te, isDroppable: oe } = Fe(
54
+ Z,
55
+ P
56
+ ), { replace: L } = Me(), se = () => {
57
+ k.commandPalette.emit({
58
58
  commandName: "Import from OpenAPI/Swagger/Postman/cURL"
59
59
  });
60
- }, O = Se(), { toast: ne } = Pe(), k = ke({ open: !1 }), f = K(!1);
60
+ }, N = he(), { toast: re } = qe(), S = be({ open: !1 }), f = W(!1);
61
61
  C(
62
- te,
62
+ Y,
63
63
  (s) => {
64
- s && se(s).forEach(
65
- (e) => Z(e, !0)
64
+ s && ee(s).forEach(
65
+ (e) => Q(e, !0)
66
66
  );
67
67
  },
68
68
  { immediate: !0 }
69
69
  );
70
70
  const {
71
71
  searchText: p,
72
- searchResultsWithPlaceholderResults: w,
73
- selectedSearchResult: I,
74
- onSearchResultClick: ie,
75
- fuseSearch: ue,
76
- searchInputRef: z,
77
- searchResultRefs: ce,
78
- navigateSearchResults: B,
79
- selectSearchResult: de
80
- } = Oe(), F = K(), W = (s) => {
81
- var e;
82
- s && (s.toggleSidebar && ee(), s.focusRequestSearch && ((e = z.value) == null || e.focus()));
72
+ searchResultsWithPlaceholderResults: x,
73
+ selectedSearchResult: w,
74
+ onSearchResultClick: ae,
75
+ fuseSearch: le,
76
+ searchInputRef: O,
77
+ searchResultRefs: ne,
78
+ navigateSearchResults: z,
79
+ selectSearchResult: ie
80
+ } = Ee(), B = W(), F = (s) => {
81
+ s && (s.toggleSidebar && X(), s.focusRequestSearch && O.value?.focus());
83
82
  };
84
- Re(() => R.hotKeys.on(W)), ye(() => {
85
- R.hotKeys.off(W);
83
+ ge(() => k.hotKeys.on(F)), Se(() => {
84
+ k.hotKeys.off(F);
86
85
  });
87
- const me = (s) => {
88
- if (s != null && s.documentUrl) {
86
+ const ue = (s) => {
87
+ if (s?.documentUrl) {
89
88
  s.watchMode = !s.watchMode;
90
89
  const e = c.value.find(
91
90
  (o) => o.uid === s.entity.uid
@@ -98,51 +97,46 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
98
97
  (s) => s.watchMode
99
98
  ),
100
99
  (s, e) => {
101
- s.forEach((o, a) => {
102
- var l, v, A;
103
- if (n !== "modal" && o !== e[a] && ((v = (l = c.value[a]) == null ? void 0 : l.info) == null ? void 0 : v.title) !== "Drafts" && c.value[a]) {
104
- const H = c.value[a];
105
- if (!H)
100
+ s.forEach((o, r) => {
101
+ if (l !== "modal" && o !== e[r] && c.value[r]?.info?.title !== "Drafts" && c.value[r]) {
102
+ const i = c.value[r];
103
+ if (!i)
106
104
  return;
107
- const be = `${(A = H.info) == null ? void 0 : A.title}: Watch Mode ${o ? "enabled" : "disabled"}`;
108
- ne(be, "info");
105
+ const pe = `${i.info?.title}: Watch Mode ${o ? "enabled" : "disabled"}`;
106
+ re(pe, "info");
109
107
  }
110
108
  });
111
109
  }
112
110
  );
113
- const fe = $(() => {
114
- var v;
115
- const s = w.value;
111
+ const ce = I(() => {
112
+ const s = x.value;
116
113
  if (!s.length)
117
114
  return "No results found";
118
- const e = (v = s[I.value]) == null ? void 0 : v.item;
115
+ const e = s[w.value]?.item;
119
116
  if (!e)
120
117
  return "No result selected";
121
- const o = p.value.length ? `${s.length} result${s.length === 1 ? "" : "s"} found, ` : "", a = `, HTTP Method ${e.httpVerb}, Path ${e.path}`, l = `${e.title} ${a}`;
122
- return `${o}Selected: ${l}`;
123
- }), pe = () => {
118
+ const o = p.value.length ? `${s.length} result${s.length === 1 ? "" : "s"} found, ` : "", r = `, HTTP Method ${e.httpVerb}, Path ${e.path}`, i = `${e.title} ${r}`;
119
+ return `${o}Selected: ${i}`;
120
+ }), de = () => {
124
121
  const s = c.value.find(
125
- (o) => {
126
- var a;
127
- return ((a = o.info) == null ? void 0 : a.title) === "Drafts";
128
- }
122
+ (o) => o.info?.title === "Drafts"
129
123
  );
130
124
  if (s && s.requests.forEach((o) => {
131
- x[o] && L.delete(x[o], s.uid);
132
- }), E.value.length) {
133
- const o = c.value[0], a = o == null ? void 0 : o.requests[0];
134
- a && N({
125
+ y[o] && E.delete(y[o], s.uid);
126
+ }), V.value.length) {
127
+ const r = c.value[0]?.requests[0];
128
+ r && L({
135
129
  name: "request",
136
130
  params: {
137
- [J.Request]: a
131
+ [U.Request]: r
138
132
  }
139
133
  });
140
134
  } else {
141
- const { request: o } = Ae();
142
- s && (L.add(o, s.uid), N({
135
+ const { request: o } = Be();
136
+ s && (E.add(o, s.uid), L({
143
137
  name: "request",
144
138
  params: {
145
- [J.Request]: o.uid
139
+ [U.Request]: o.uid
146
140
  }
147
141
  }));
148
142
  }
@@ -150,196 +144,190 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
150
144
  C(f, (s) => {
151
145
  s || (p.value = "");
152
146
  });
153
- const y = $(
154
- () => Ue(
147
+ const R = I(
148
+ () => Ae(
155
149
  c.value,
156
- E.value,
157
- x
150
+ V.value,
151
+ y
158
152
  )
159
- ), ve = $(() => n === "modal" && V.value ? [V.value] : c.value);
160
- function he(s) {
161
- !p.value && s.relatedTarget !== F.value && (f.value = !1);
153
+ ), me = I(() => l === "modal" && _.value ? [_.value] : c.value);
154
+ function fe(s) {
155
+ !p.value && s.relatedTarget !== B.value && (f.value = !1);
162
156
  }
163
- return (s, e) => (r(), h(D, null, [
164
- xe(b(t(je), {
165
- class: g([t(P) ? "sidebar-active-width" : ""])
166
- }, we({
157
+ return (s, e) => (a(), v($, null, [
158
+ ke(h(t(Ke), {
159
+ class: b([t(T) ? "sidebar-active-width" : ""])
160
+ }, Re({
167
161
  content: d(() => [
168
- i("div", Xe, [
169
- i("div", {
170
- class: g(["size-8", { "xl:hidden": t(n) !== "modal" }])
162
+ n("div", je, [
163
+ n("div", {
164
+ class: b(["size-8", { "xl:hidden": t(l) !== "modal" }])
171
165
  }, null, 2),
172
- t(n) !== "modal" ? (r(), u(t(Je), { key: 0 })) : m("", !0),
173
- t(n) !== "modal" ? (r(), h("span", Ye, " / ")) : m("", !0),
174
- t(n) !== "modal" ? (r(), u(Le, { key: 2 })) : m("", !0),
175
- i("button", {
166
+ t(l) !== "modal" ? (a(), u(t(Ue), { key: 0 })) : m("", !0),
167
+ t(l) !== "modal" ? (a(), v("span", Je, " / ")) : m("", !0),
168
+ t(l) !== "modal" ? (a(), u(_e, { key: 2 })) : m("", !0),
169
+ n("button", {
176
170
  ref_key: "searchToggleRef",
177
- ref: F,
171
+ ref: B,
178
172
  "aria-pressed": f.value,
179
173
  class: "ml-auto",
180
174
  type: "button",
181
175
  onClick: e[0] || (e[0] = (o) => f.value = !f.value)
182
176
  }, [
183
- i("span", et, U(f.value ? "Hide" : "Show") + " search ", 1),
184
- b(t(T), {
177
+ n("span", Xe, A(f.value ? "Hide" : "Show") + " search ", 1),
178
+ h(t(M), {
185
179
  class: "text-c-3 hover:bg-b-2 max-h-8 max-w-8 rounded-lg p-1.75 text-sm",
186
180
  icon: "Search"
187
181
  })
188
- ], 8, Ze)
182
+ ], 8, Qe)
189
183
  ]),
190
- f.value ? (r(), h("div", tt, [
191
- b(t(De), {
184
+ f.value ? (a(), v("div", Ye, [
185
+ h(t(Ce), {
192
186
  ref_key: "searchInputRef",
193
- ref: z,
187
+ ref: O,
194
188
  modelValue: t(p),
195
- "onUpdate:modelValue": e[1] || (e[1] = (o) => Ie(p) ? p.value = o : null),
189
+ "onUpdate:modelValue": e[1] || (e[1] = (o) => ye(p) ? p.value = o : null),
196
190
  autofocus: "",
197
- "aria-controls": t(O),
198
- label: fe.value,
199
- onInput: t(ue),
191
+ "aria-controls": t(N),
192
+ label: ce.value,
193
+ onInput: t(le),
200
194
  onKeydown: [
201
- e[2] || (e[2] = M(S((o) => t(B)("down"), ["stop"]), ["down"])),
202
- e[3] || (e[3] = M(S((o) => t(de)(), ["stop"]), ["enter"])),
203
- e[4] || (e[4] = M(S((o) => t(B)("up"), ["stop"]), ["up"]))
195
+ e[2] || (e[2] = q(g((o) => t(z)("down"), ["stop"]), ["down"])),
196
+ e[3] || (e[3] = q(g((o) => t(ie)(), ["stop"]), ["enter"])),
197
+ e[4] || (e[4] = q(g((o) => t(z)("up"), ["stop"]), ["up"]))
204
198
  ],
205
- onBlur: he
199
+ onBlur: fe
206
200
  }, null, 8, ["modelValue", "aria-controls", "label", "onInput"])
207
201
  ])) : m("", !0),
208
- i("div", {
209
- class: g(["gap-1/2 flex flex-1 flex-col overflow-visible overflow-y-auto px-3 pt-0 pb-3", [
202
+ n("div", {
203
+ class: b(["gap-1/2 flex flex-1 flex-col overflow-visible overflow-y-auto px-3 pt-0 pb-3", [
210
204
  {
211
- "pb-14": t(n) !== "modal"
205
+ "pb-14": t(l) !== "modal"
212
206
  },
213
207
  {
214
- "h-[calc(100%-273.5px)]": y.value
208
+ "h-[calc(100%-273.5px)]": R.value
215
209
  }
216
210
  ]]),
217
- onDragenter: e[7] || (e[7] = S(() => {
211
+ onDragenter: e[7] || (e[7] = g(() => {
218
212
  }, ["prevent"])),
219
- onDragover: e[8] || (e[8] = S(() => {
213
+ onDragover: e[8] || (e[8] = g(() => {
220
214
  }, ["prevent"]))
221
215
  }, [
222
- t(p) ? (r(), u(t(qe), {
216
+ t(p) ? (a(), u(t(Ie), {
223
217
  key: 0,
224
- id: t(O),
218
+ id: t(N),
225
219
  "aria-label": "Search Results",
226
220
  class: "gap-px",
227
- noResults: !t(w).length
221
+ noResults: !t(x).length
228
222
  }, {
229
223
  default: d(() => [
230
- (r(!0), h(D, null, G(t(w), (o, a) => (r(), u(t(Me), {
224
+ (a(!0), v($, null, H(t(x), (o, r) => (a(), u(t($e), {
231
225
  id: `#search-input-${o.item.id}`,
232
226
  key: o.refIndex,
233
227
  ref_for: !0,
234
- ref: (l) => t(ce)[a] = l,
235
- selected: t(I) === a,
228
+ ref: (i) => t(ne)[r] = i,
229
+ selected: t(w) === r,
236
230
  class: "px-2",
237
231
  href: o.item.link,
238
- onClick: S((l) => t(ie)(o), ["prevent"]),
239
- onFocus: (l) => I.value = a
232
+ onClick: g((i) => t(ae)(o), ["prevent"]),
233
+ onFocus: (i) => w.value = r
240
234
  }, {
241
235
  addon: d(() => [
242
- e[10] || (e[10] = i("span", { class: "sr-only" }, "HTTP Method:", -1)),
243
- b(Ne, {
236
+ e[10] || (e[10] = n("span", { class: "sr-only" }, "HTTP Method:", -1)),
237
+ h(Ve, {
244
238
  class: "font-bold",
245
239
  method: o.item.httpVerb ?? "get"
246
240
  }, null, 8, ["method"])
247
241
  ]),
248
242
  default: d(() => [
249
- q(U(o.item.title) + " ", 1)
243
+ D(A(o.item.title) + " ", 1)
250
244
  ]),
251
245
  _: 2
252
246
  }, 1032, ["id", "selected", "href", "onClick", "onFocus"]))), 128))
253
247
  ]),
254
248
  _: 1
255
- }, 8, ["id", "noResults"])) : (r(), h("nav", ot, [
256
- (r(!0), h(D, null, G(ve.value, (o) => {
257
- var a;
258
- return r(), u(Ge, {
259
- key: o.uid,
260
- isDraggable: t(n) !== "modal" && ((a = o.info) == null ? void 0 : a.title) !== "Drafts",
261
- isDroppable: t(re),
262
- menuItem: k,
263
- parentUids: [],
264
- uid: o.uid,
265
- onNewTab: e[5] || (e[5] = (l, v) => X("newTab", { name: l, uid: v })),
266
- onOnDragEnd: t(ae),
267
- onOpenMenu: e[6] || (e[6] = (l) => Object.assign(k, l))
268
- }, {
269
- leftIcon: d(() => {
270
- var l;
271
- return [
272
- ((l = o.info) == null ? void 0 : l.title) === "Drafts" ? (r(), u(t(T), {
273
- key: 0,
274
- class: "text-sidebar-c-2 group-hover:hidden",
275
- icon: "Scribble",
276
- thickness: "2.25"
277
- })) : (r(), u(t(Te), {
278
- key: 1,
279
- class: "text-sidebar-c-2 size-3.5 min-w-3.5 stroke-2 group-hover:hidden",
280
- src: o["x-scalar-icon"] || "interface-content-folder"
281
- }, null, 8, ["src"])),
282
- i("div", {
283
- class: g({
284
- "rotate-90": t(Y)[o.uid]
285
- })
286
- }, [
287
- b(t(T), {
288
- class: "text-c-3 hover:text-c-1 hidden text-sm group-hover:block",
289
- icon: "ChevronRight",
290
- size: "md"
291
- })
292
- ], 2)
293
- ];
294
- }),
295
- _: 2
296
- }, 1032, ["isDraggable", "isDroppable", "menuItem", "uid", "onOnDragEnd"]);
297
- }), 128))
249
+ }, 8, ["id", "noResults"])) : (a(), v("nav", Ze, [
250
+ (a(!0), v($, null, H(me.value, (o) => (a(), u(He, {
251
+ key: o.uid,
252
+ isDraggable: t(l) !== "modal" && o.info?.title !== "Drafts",
253
+ isDroppable: t(oe),
254
+ menuItem: S,
255
+ parentUids: [],
256
+ uid: o.uid,
257
+ onNewTab: e[5] || (e[5] = (r, i) => j("newTab", { name: r, uid: i })),
258
+ onOnDragEnd: t(te),
259
+ onOpenMenu: e[6] || (e[6] = (r) => Object.assign(S, r))
260
+ }, {
261
+ leftIcon: d(() => [
262
+ o.info?.title === "Drafts" ? (a(), u(t(M), {
263
+ key: 0,
264
+ class: "text-sidebar-c-2 group-hover:hidden",
265
+ icon: "Scribble",
266
+ thickness: "2.25"
267
+ })) : (a(), u(t(De), {
268
+ key: 1,
269
+ class: "text-sidebar-c-2 size-3.5 min-w-3.5 stroke-2 group-hover:hidden",
270
+ src: o["x-scalar-icon"] || "interface-content-folder"
271
+ }, null, 8, ["src"])),
272
+ n("div", {
273
+ class: b({
274
+ "rotate-90": t(J)[o.uid]
275
+ })
276
+ }, [
277
+ h(t(M), {
278
+ class: "text-c-3 hover:text-c-1 hidden text-sm group-hover:block",
279
+ icon: "ChevronRight",
280
+ size: "md"
281
+ })
282
+ ], 2)
283
+ ]),
284
+ _: 2
285
+ }, 1032, ["isDraggable", "isDroppable", "menuItem", "uid", "onOnDragEnd"]))), 128))
298
286
  ]))
299
287
  ], 34)
300
288
  ]),
301
289
  button: d(() => [
302
- i("div", {
303
- class: g({
304
- "empty-sidebar-item": y.value
290
+ n("div", {
291
+ class: b({
292
+ "empty-sidebar-item": R.value
305
293
  })
306
294
  }, [
307
- y.value ? (r(), h("div", st, [
308
- i("div", at, [
309
- b(j, {
310
- art: t(Ve),
295
+ R.value ? (a(), v("div", et, [
296
+ n("div", tt, [
297
+ h(K, {
298
+ art: t(Te),
311
299
  class: "rabbitsit font-bold"
312
300
  }, null, 8, ["art"]),
313
- b(j, {
314
- art: t(Ee),
301
+ h(K, {
302
+ art: t(Pe),
315
303
  class: "rabbitjump absolute top-0 left-0 font-bold"
316
304
  }, null, 8, ["art"])
317
305
  ]),
318
- e[11] || (e[11] = i("div", { class: "mt-2 mb-2 text-center text-sm text-balance" }, [
319
- i("b", { class: "font-medium" }, "Let's Get Started"),
320
- i("p", { class: "mt-2" }, " Create request, folder, collection or import from OpenAPI/Postman ")
306
+ e[11] || (e[11] = n("div", { class: "mt-2 mb-2 text-center text-sm text-balance" }, [
307
+ n("b", { class: "font-medium" }, "Let's Get Started"),
308
+ n("p", { class: "mt-2" }, " Create request, folder, collection or import from OpenAPI/Postman ")
321
309
  ], -1))
322
310
  ])) : m("", !0),
323
- t(n) !== "modal" ? (r(), u(t($e), {
311
+ t(l) !== "modal" ? (a(), u(t(we), {
324
312
  key: 1,
325
- class: g(["mb-1.5 hidden h-fit w-full p-1.5 opacity-0", {
326
- "flex opacity-100": y.value
313
+ class: b(["mb-1.5 hidden h-fit w-full p-1.5 opacity-0", {
314
+ "flex opacity-100": R.value
327
315
  }]),
328
- onClick: le
316
+ onClick: se
329
317
  }, {
330
318
  default: d(() => e[12] || (e[12] = [
331
- q(" Import Collection ")
319
+ D(" Import Collection ")
332
320
  ])),
333
321
  _: 1,
334
322
  __: [12]
335
323
  }, 8, ["class"])) : m("", !0),
336
- t(n) !== "modal" ? (r(), u(ze, {
324
+ t(l) !== "modal" ? (a(), u(Le, {
337
325
  key: 2,
338
- click: t(R).commandPalette.emit,
326
+ click: t(k).commandPalette.emit,
339
327
  hotkey: "K"
340
328
  }, {
341
329
  title: d(() => e[13] || (e[13] = [
342
- q(" Add Item ")
330
+ D(" Add Item ")
343
331
  ])),
344
332
  _: 1
345
333
  }, 8, ["click"])) : m("", !0)
@@ -347,24 +335,24 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
347
335
  ]),
348
336
  _: 2
349
337
  }, [
350
- t(n) !== "modal" ? {
338
+ t(l) !== "modal" ? {
351
339
  name: "header",
352
340
  fn: d(() => []),
353
341
  key: "0"
354
342
  } : void 0
355
343
  ]), 1032, ["class"]), [
356
- [Ce, t(P)]
344
+ [xe, t(T)]
357
345
  ]),
358
- t(n) !== "modal" && k ? (r(), u(Ke, {
346
+ t(l) !== "modal" && S ? (a(), u(We, {
359
347
  key: 0,
360
- menuItem: k,
361
- onClearDrafts: pe,
362
- onCloseMenu: e[9] || (e[9] = (o) => k.open = !1),
363
- onToggleWatchMode: me
348
+ menuItem: S,
349
+ onClearDrafts: de,
350
+ onCloseMenu: e[9] || (e[9] = (o) => S.open = !1),
351
+ onToggleWatchMode: ue
364
352
  }, null, 8, ["menuItem"])) : m("", !0)
365
353
  ], 64));
366
354
  }
367
355
  });
368
356
  export {
369
- Mt as default
357
+ $t as default
370
358
  };
@@ -1,6 +1,6 @@
1
1
  import t from "./RequestSidebarItem.vue2.js";
2
- import "./RequestSidebarItem.vue3.js";
3
- import "./RequestSidebarItem.vue4.js";
2
+ /* empty css */
3
+ /* empty css */
4
4
  import o from "../../_virtual/_plugin-vue_export-helper.js";
5
5
  const d = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4dedda07"]]);
6
6
  export {