@scalar/api-client 2.2.51 → 2.2.53

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 (404) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +30 -30
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  7. package/dist/components/AddressBar/AddressBarHistory.vue2.js +22 -22
  8. package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -1
  9. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  10. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  11. package/dist/components/CodeInput/CodeInput.vue2.js +38 -38
  12. package/dist/components/CommandPalette/CommandActionForm.vue.js +2 -2
  13. package/dist/components/CommandPalette/CommandActionInput.vue.js +1 -1
  14. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  15. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +13 -13
  16. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +143 -114
  18. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  19. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +59 -51
  20. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
  21. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  22. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  23. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +85 -82
  24. package/dist/components/CommandPalette/WatchModeToggle.vue.js +2 -2
  25. package/dist/components/ContextBar.vue.js +2 -2
  26. package/dist/components/ContextBar.vue2.js +2 -2
  27. package/dist/components/DataTable/DataTable.vue.js +1 -1
  28. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  29. package/dist/components/DataTable/DataTableCell.vue.js +11 -11
  30. package/dist/components/DataTable/DataTableCheckbox.vue.js +3 -3
  31. package/dist/components/DataTable/DataTableInput.vue.d.ts +175 -6
  32. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  33. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  34. package/dist/components/DataTable/DataTableInput.vue2.js +57 -48
  35. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  36. package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -1
  37. package/dist/components/DataTable/DataTableText.vue.js +1 -1
  38. package/dist/components/EmptyState.vue.js +1 -1
  39. package/dist/components/EmptyState.vue2.js +4 -4
  40. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  41. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +13 -13
  42. package/dist/components/Form/Form.vue.d.ts.map +1 -1
  43. package/dist/components/Form/Form.vue.js +56 -36
  44. package/dist/components/Form/LabelInput.vue.d.ts +14 -0
  45. package/dist/components/Form/LabelInput.vue.d.ts.map +1 -0
  46. package/dist/components/Form/LabelInput.vue.js +7 -0
  47. package/dist/components/Form/LabelInput.vue2.js +42 -0
  48. package/dist/components/HelpfulLink.vue.js +1 -1
  49. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -1
  50. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  51. package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
  52. package/dist/components/HttpMethod/HttpMethod.vue2.js +1 -1
  53. package/dist/components/IconSelector.vue.js +3 -3
  54. package/dist/components/ImportCollection/DropEventListener.vue.js +3 -3
  55. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  56. package/dist/components/ImportCollection/ImportNowButton.vue.js +8 -8
  57. package/dist/components/ImportCollection/IntegrationLogo.vue.js +1 -1
  58. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +1 -1
  59. package/dist/components/ImportCollection/PrefetchError.vue.js +1 -1
  60. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  61. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -15
  62. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  63. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +2 -2
  64. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
  65. package/dist/components/ImportCurl/ImportCurlModal.vue.js +1 -1
  66. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +13 -13
  67. package/dist/components/ScalarAsciiArt.vue.js +3 -3
  68. package/dist/components/Search/useSearch.d.ts.map +1 -1
  69. package/dist/components/Search/useSearch.js +5 -13
  70. package/dist/components/Server/ServerDropdown.vue.d.ts +0 -1
  71. package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
  72. package/dist/components/Server/ServerDropdown.vue.js +40 -57
  73. package/dist/components/Server/ServerDropdownItem.vue.d.ts +0 -1
  74. package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
  75. package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
  76. package/dist/components/Server/ServerDropdownItem.vue2.js +19 -20
  77. package/dist/components/Server/ServerSelector.vue.d.ts +12 -0
  78. package/dist/components/Server/ServerSelector.vue.d.ts.map +1 -0
  79. package/dist/components/Server/ServerSelector.vue.js +85 -0
  80. package/dist/components/Server/ServerSelector.vue2.js +4 -0
  81. package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
  82. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
  83. package/dist/components/Server/ServerVariablesForm.vue.js +1 -1
  84. package/dist/components/Server/ServerVariablesSelect.vue.js +1 -1
  85. package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -1
  86. package/dist/components/Server/index.d.ts +1 -0
  87. package/dist/components/Server/index.d.ts.map +1 -1
  88. package/dist/components/Server/index.js +6 -4
  89. package/dist/components/Server/types.d.ts.map +1 -1
  90. package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +1 -1
  91. package/dist/components/SideNav/DownloadAppButton.vue.js +2 -2
  92. package/dist/components/SideNav/DownloadAppButton.vue2.js +6 -6
  93. package/dist/components/SideNav/SideHelp.vue.js +12 -12
  94. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  95. package/dist/components/SideNav/SideNav.vue.js +73 -58
  96. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  97. package/dist/components/SideNav/SideNavLink.vue.js +3 -3
  98. package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +2 -2
  99. package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
  100. package/dist/components/SideNav/SideNavRouterLink.vue.js +17 -28
  101. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
  102. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +1 -1
  103. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts.map +1 -1
  104. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +12 -12
  105. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts.map +1 -1
  106. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +4 -4
  107. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +2 -2
  108. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +3 -3
  109. package/dist/components/Sidebar/Sidebar.vue.d.ts +1 -4
  110. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  111. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  112. package/dist/components/Sidebar/Sidebar.vue2.js +34 -34
  113. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  114. package/dist/components/Sidebar/SidebarButton.vue.js +6 -6
  115. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -2
  116. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  117. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  118. package/dist/components/Sidebar/SidebarListElement.vue2.js +36 -46
  119. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  120. package/dist/components/Sidebar/SidebarListElementActions.vue.js +7 -7
  121. package/dist/components/Sidebar/SidebarToggle.vue.d.ts +1 -8
  122. package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
  123. package/dist/components/Sidebar/SidebarToggle.vue.js +20 -21
  124. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  125. package/dist/components/TopNav/TopNav.vue.js +104 -85
  126. package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
  127. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  128. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  129. package/dist/components/TopNav/TopNavItem.vue2.js +1 -1
  130. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  131. package/dist/components/ViewLayout/ViewLayout.vue.js +16 -10
  132. package/dist/components/ViewLayout/ViewLayout.vue2.js +4 -0
  133. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  134. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +29 -29
  135. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
  136. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  137. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +20 -13
  138. package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +4 -0
  139. package/dist/constants.d.ts +16 -12
  140. package/dist/constants.d.ts.map +1 -1
  141. package/dist/constants.js +35 -6
  142. package/dist/hooks/index.d.ts +0 -1
  143. package/dist/hooks/index.d.ts.map +1 -1
  144. package/dist/hooks/index.js +5 -7
  145. package/dist/hooks/useFileDialog.d.ts +1 -1
  146. package/dist/hooks/useFileDialog.d.ts.map +1 -1
  147. package/dist/hooks/useFileDialog.js +1 -6
  148. package/dist/hooks/useResponseBody.d.ts.map +1 -1
  149. package/dist/hooks/useResponseBody.js +3 -9
  150. package/dist/hooks/useSidebar.d.ts +19 -2
  151. package/dist/hooks/useSidebar.d.ts.map +1 -1
  152. package/dist/hooks/useSidebar.js +25 -9
  153. package/dist/hooks/useSidebar.test.d.ts +2 -0
  154. package/dist/hooks/useSidebar.test.d.ts.map +1 -0
  155. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  156. package/dist/layouts/App/ApiClientApp.vue.js +41 -35
  157. package/dist/layouts/App/MainLayout.vue.js +4 -4
  158. package/dist/layouts/App/create-api-client-app.d.ts +207 -255
  159. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  160. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  161. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  162. package/dist/layouts/Modal/ApiClientModal.vue2.js +8 -8
  163. package/dist/layouts/Modal/create-api-client-modal.d.ts +414 -510
  164. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  165. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  166. package/dist/layouts/Web/ApiClientWeb.vue.js +39 -33
  167. package/dist/layouts/Web/create-api-client-web.d.ts +207 -255
  168. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  169. package/dist/libs/create-client.d.ts +200 -248
  170. package/dist/libs/create-client.d.ts.map +1 -1
  171. package/dist/libs/create-client.js +79 -63
  172. package/dist/libs/errors.d.ts.map +1 -1
  173. package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
  174. package/dist/libs/extractAttachmentFilename.js +1 -3
  175. package/dist/libs/find-request.d.ts.map +1 -1
  176. package/dist/libs/getOpenApiDocumentDetails.d.ts.map +1 -1
  177. package/dist/libs/importers/curl.d.ts.map +1 -1
  178. package/dist/libs/importers/curl.js +2 -12
  179. package/dist/libs/isUrl.d.ts.map +1 -1
  180. package/dist/libs/local-storage.d.ts.map +1 -1
  181. package/dist/libs/local-storage.js +1 -9
  182. package/dist/libs/normalize-headers.d.ts.map +1 -1
  183. package/dist/libs/normalize-headers.js +2 -6
  184. package/dist/libs/parse-curl.d.ts.map +1 -1
  185. package/dist/libs/parse-curl.js +1 -5
  186. package/dist/libs/postman.d.ts.map +1 -1
  187. package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
  188. package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -1
  189. package/dist/libs/send-request/create-fetch-body.js +1 -2
  190. package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -1
  191. package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
  192. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  193. package/dist/libs/send-request/create-request-operation.js +6 -12
  194. package/dist/libs/send-request/create-request-operation.test.d.ts +0 -3
  195. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  196. package/dist/libs/string-template.d.ts.map +1 -1
  197. package/dist/libs/string-template.js +1 -4
  198. package/dist/router.d.ts.map +1 -1
  199. package/dist/routes.d.ts +62 -14
  200. package/dist/routes.d.ts.map +1 -1
  201. package/dist/routes.js +93 -75
  202. package/dist/store/active-entities.d.ts +32 -32
  203. package/dist/store/active-entities.d.ts.map +1 -1
  204. package/dist/store/active-entities.js +37 -35
  205. package/dist/store/collections.d.ts +164 -164
  206. package/dist/store/collections.d.ts.map +1 -1
  207. package/dist/store/cookies.d.ts +4 -4
  208. package/dist/store/cookies.d.ts.map +1 -1
  209. package/dist/store/cookies.js +1 -5
  210. package/dist/store/environment.d.ts +4 -4
  211. package/dist/store/request-example.d.ts +2 -2
  212. package/dist/store/requests.d.ts +4 -4
  213. package/dist/store/requests.d.ts.map +1 -1
  214. package/dist/store/security-schemes.d.ts +8 -8
  215. package/dist/store/store-context.d.ts.map +1 -1
  216. package/dist/store/store.d.ts +200 -248
  217. package/dist/store/store.d.ts.map +1 -1
  218. package/dist/store/tags.d.ts.map +1 -1
  219. package/dist/store/workspace.d.ts +4 -4
  220. package/dist/style.css +1 -1
  221. package/dist/tailwind/desktop-variants.d.ts.map +1 -1
  222. package/dist/types/vue.d.ts.map +1 -1
  223. package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
  224. package/dist/views/Collection/Collection.vue.js +4 -0
  225. package/dist/views/Collection/Collection.vue2.js +50 -0
  226. package/dist/views/Collection/CollectionAuthentication.vue.d.ts +3 -0
  227. package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -0
  228. package/dist/views/Collection/CollectionAuthentication.vue.js +4 -0
  229. package/dist/views/Collection/CollectionAuthentication.vue2.js +16 -0
  230. package/dist/views/Collection/CollectionCookies.vue.d.ts +3 -0
  231. package/dist/views/Collection/CollectionCookies.vue.d.ts.map +1 -0
  232. package/dist/views/Collection/CollectionCookies.vue.js +4 -0
  233. package/dist/views/Collection/CollectionCookies.vue2.js +16 -0
  234. package/dist/views/Collection/CollectionEnvironment.vue.d.ts +3 -0
  235. package/dist/views/Collection/CollectionEnvironment.vue.d.ts.map +1 -0
  236. package/dist/views/Collection/CollectionEnvironment.vue.js +4 -0
  237. package/dist/views/Collection/CollectionEnvironment.vue2.js +16 -0
  238. package/dist/views/{Servers/Servers.vue.d.ts → Collection/CollectionInfoForm.vue.d.ts} +1 -1
  239. package/dist/views/Collection/CollectionInfoForm.vue.d.ts.map +1 -0
  240. package/dist/views/Collection/CollectionInfoForm.vue.js +7 -0
  241. package/dist/views/Collection/CollectionInfoForm.vue2.js +70 -0
  242. package/dist/views/Collection/CollectionNavigation.vue.d.ts +6 -0
  243. package/dist/views/Collection/CollectionNavigation.vue.d.ts.map +1 -0
  244. package/dist/views/Collection/CollectionNavigation.vue.js +142 -0
  245. package/dist/views/Collection/CollectionNavigation.vue2.js +4 -0
  246. package/dist/views/Collection/CollectionOverview.vue.d.ts +3 -0
  247. package/dist/views/Collection/CollectionOverview.vue.d.ts.map +1 -0
  248. package/dist/views/Collection/CollectionOverview.vue.js +4 -0
  249. package/dist/views/Collection/CollectionOverview.vue2.js +37 -0
  250. package/dist/views/Collection/CollectionScripts.vue.d.ts +3 -0
  251. package/dist/views/Collection/CollectionScripts.vue.d.ts.map +1 -0
  252. package/dist/views/Collection/CollectionScripts.vue.js +4 -0
  253. package/dist/views/Collection/CollectionScripts.vue2.js +16 -0
  254. package/dist/views/Collection/CollectionServerForm.vue.d.ts +10 -0
  255. package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -0
  256. package/dist/views/Collection/CollectionServerForm.vue.js +74 -0
  257. package/dist/views/Collection/CollectionServerForm.vue2.js +4 -0
  258. package/dist/views/{Servers/ServerForm.vue.d.ts → Collection/CollectionServers.vue.d.ts} +1 -1
  259. package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -0
  260. package/dist/views/Collection/CollectionServers.vue.js +4 -0
  261. package/dist/views/Collection/CollectionServers.vue2.js +124 -0
  262. package/dist/views/Collection/CollectionSettings.vue.d.ts +3 -0
  263. package/dist/views/Collection/CollectionSettings.vue.d.ts.map +1 -0
  264. package/dist/views/Collection/CollectionSettings.vue.js +7 -0
  265. package/dist/views/Collection/CollectionSettings.vue2.js +124 -0
  266. package/dist/views/Collection/CollectionSync.vue.d.ts +3 -0
  267. package/dist/views/Collection/CollectionSync.vue.d.ts.map +1 -0
  268. package/dist/views/Collection/CollectionSync.vue.js +4 -0
  269. package/dist/views/Collection/CollectionSync.vue2.js +16 -0
  270. package/dist/views/Collection/components/MarkdownInput.vue.d.ts +16 -0
  271. package/dist/views/Collection/components/MarkdownInput.vue.d.ts.map +1 -0
  272. package/dist/views/Collection/components/MarkdownInput.vue.js +7 -0
  273. package/dist/views/Collection/components/MarkdownInput.vue2.js +95 -0
  274. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -1
  275. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +7 -7
  276. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
  277. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +1 -3
  278. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
  279. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -5
  280. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
  281. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +1 -5
  282. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  283. package/dist/views/Cookies/CookieForm.vue.js +18 -23
  284. package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -1
  285. package/dist/views/Cookies/CookieModal.vue.js +1 -1
  286. package/dist/views/Cookies/CookieModal.vue2.js +7 -7
  287. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  288. package/dist/views/Cookies/Cookies.vue2.js +96 -78
  289. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  290. package/dist/views/Environment/Environment.vue2.js +125 -112
  291. package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +1 -1
  292. package/dist/views/Environment/EnvironmentColorModal.vue.js +5 -5
  293. package/dist/views/Environment/EnvironmentColors.vue.js +8 -8
  294. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
  295. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  296. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +16 -16
  297. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  298. package/dist/views/Request/Request.vue.js +1 -1
  299. package/dist/views/Request/Request.vue2.js +114 -171
  300. package/dist/views/Request/RequestRoot.vue.d.ts +13 -0
  301. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -0
  302. package/dist/views/Request/RequestRoot.vue.js +7 -0
  303. package/dist/views/Request/RequestRoot.vue2.js +78 -0
  304. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
  305. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  306. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +9 -9
  307. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
  308. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  309. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +5 -5
  310. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  311. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  312. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +104 -89
  313. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +5 -5
  314. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  315. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
  316. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  317. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  318. package/dist/views/Request/RequestSection/RequestBody.vue2.js +59 -65
  319. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  320. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +3 -3
  321. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +22 -23
  322. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
  323. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  324. package/dist/views/Request/RequestSection/RequestParams.vue.js +14 -14
  325. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
  326. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  327. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +6 -6
  328. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
  329. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  330. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  331. package/dist/views/Request/RequestSection/RequestSection.vue2.js +38 -38
  332. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
  333. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  334. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  335. package/dist/views/Request/RequestSection/RequestTable.vue2.js +34 -33
  336. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  337. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +2 -2
  338. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +5 -5
  339. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +1 -1
  340. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +2 -6
  341. package/dist/views/Request/RequestSidebar.vue.d.ts +3 -10
  342. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  343. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  344. package/dist/views/Request/RequestSidebar.vue2.js +186 -188
  345. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  346. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  347. package/dist/views/Request/RequestSidebarItem.vue2.js +290 -173
  348. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  349. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  350. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +13 -13
  351. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -4
  352. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  353. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  354. package/dist/views/Request/RequestSubpageHeader.vue2.js +51 -51
  355. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  356. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  357. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +12 -12
  358. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
  359. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -1
  360. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
  361. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
  362. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +2 -2
  363. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  364. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
  365. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +1 -1
  366. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
  367. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +8 -8
  368. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +1 -1
  369. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  370. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  371. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +20 -20
  372. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +25 -26
  373. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  374. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
  375. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +1 -1
  376. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  377. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +7 -7
  378. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  379. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  380. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +7 -7
  381. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  382. package/dist/views/Request/hooks/useOpenApiWatcher.js +12 -37
  383. package/dist/views/Request/libs/request.d.ts +4 -0
  384. package/dist/views/Request/libs/request.d.ts.map +1 -1
  385. package/dist/views/Request/libs/request.js +2 -1
  386. package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
  387. package/dist/views/Request/libs/watch-mode.js +63 -63
  388. package/dist/views/Request/types/sidebar-item.d.ts +1 -1
  389. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  390. package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
  391. package/dist/views/Settings/Settings.vue2.js +8 -8
  392. package/dist/views/Settings/components/SettingsAppearance.vue.js +6 -6
  393. package/dist/vitest.setup.d.ts +16 -0
  394. package/dist/vitest.setup.d.ts.map +1 -0
  395. package/package.json +16 -21
  396. package/dist/views/Servers/ServerForm.vue.d.ts.map +0 -1
  397. package/dist/views/Servers/ServerForm.vue.js +0 -39
  398. package/dist/views/Servers/ServerForm.vue2.js +0 -4
  399. package/dist/views/Servers/Servers.vue.d.ts.map +0 -1
  400. package/dist/views/Servers/Servers.vue.js +0 -4
  401. package/dist/views/Servers/Servers.vue2.js +0 -168
  402. package/dist/views/Servers/index.d.ts +0 -2
  403. package/dist/views/Servers/index.d.ts.map +0 -1
  404. package/dist/views/Servers/index.js +0 -4
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as R, ref as m, computed as h, onMounted as I, openBlock as r, createBlock as v, unref as l, withCtx as y, createElementVNode as c, normalizeStyle as x, createElementBlock as u, Fragment as P, renderList as T, normalizeClass as j, createTextVNode as b, toDisplayString as k, createVNode as q, createCommentVNode as g } from "vue";
2
- import { getEnvColor as D } from "../../libs/env-helpers.js";
3
- import { ScalarTeleport as F, ScalarIcon as V, ScalarButton as K } from "@scalar/components";
4
- import { onClickOutside as O } from "@vueuse/core";
5
- import G from "fuse.js";
6
- import { useRouter as L } from "vue-router";
2
+ import { ScalarTeleport as D, ScalarIcon as V, ScalarButton as F } from "@scalar/components";
3
+ import { onClickOutside as K } from "@vueuse/core";
4
+ import O from "fuse.js";
5
+ import { useRouter as G } from "vue-router";
6
+ import { getEnvColor as L } from "../../libs/env-helpers.js";
7
7
  import { parseEnvVariables as _ } from "../../libs/environment-parser.js";
8
8
  const M = {
9
9
  key: 0,
10
- class: "flex flex-col gap-1/2"
11
- }, Q = ["onClick"], $ = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis text-right whitespace-nowrap" }, ne = /* @__PURE__ */ R({
10
+ class: "gap-1/2 flex flex-col"
11
+ }, Q = ["onClick"], $ = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis whitespace-nowrap text-right" }, ne = /* @__PURE__ */ R({
12
12
  __name: "EnvironmentVariableDropdown",
13
13
  props: {
14
14
  query: {},
@@ -18,7 +18,7 @@ const M = {
18
18
  },
19
19
  emits: ["select"],
20
20
  setup(C, { expose: S, emit: E }) {
21
- const s = C, z = E, d = m(!0), p = m(null), n = m(0), f = L(), A = () => {
21
+ const s = C, z = E, d = m(!0), p = m(null), n = m(0), f = G(), A = () => {
22
22
  if (!f) return;
23
23
  const { currentRoute: t, push: o } = f, e = t.value.params.workspace;
24
24
  o({
@@ -27,7 +27,7 @@ const M = {
27
27
  workspace: e
28
28
  }
29
29
  }), d.value = !1;
30
- }, B = new G(_(s.envVariables), {
30
+ }, B = new O(_(s.envVariables), {
31
31
  keys: ["key", "value"]
32
32
  }), i = h(() => {
33
33
  const t = s.query;
@@ -60,13 +60,13 @@ const M = {
60
60
  top: (((o = s.dropdownPosition) == null ? void 0 : o.top) ?? 0) + 5 + "px"
61
61
  };
62
62
  });
63
- return O(
63
+ return K(
64
64
  p,
65
65
  () => {
66
66
  d.value = !1;
67
67
  },
68
68
  { ignore: [p] }
69
- ), (t, o) => d.value ? (r(), v(l(F), {
69
+ ), (t, o) => d.value ? (r(), v(l(D), {
70
70
  key: 0,
71
71
  class: "scalar-client"
72
72
  }, {
@@ -74,13 +74,13 @@ const M = {
74
74
  c("div", {
75
75
  ref_key: "dropdownRef",
76
76
  ref: p,
77
- class: "fixed left-0 top-0 flex flex-col p-0.75 max-h-[60svh] w-56 rounded border custom-scroll",
77
+ class: "p-0.75 custom-scroll fixed left-0 top-0 flex max-h-[60svh] w-56 flex-col rounded border",
78
78
  style: x(N.value)
79
79
  }, [
80
80
  i.value.length ? (r(), u("ul", M, [
81
81
  (r(!0), u(P, null, T(i.value, (e, a) => (r(), u("li", {
82
82
  key: e.key,
83
- class: j(["h-8 font-code text-xxs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": a === n.value }]),
83
+ class: j(["font-code text-xxs hover:bg-b-2 flex h-8 cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": a === n.value }]),
84
84
  onClick: (W) => w(e.key)
85
85
  }, [
86
86
  c("div", $, [
@@ -88,7 +88,7 @@ const M = {
88
88
  key: 0,
89
89
  class: "h-2.5 w-2.5 min-w-2.5 rounded-full",
90
90
  style: x({
91
- backgroundColor: l(D)(t.environment)
91
+ backgroundColor: l(L)(t.environment)
92
92
  })
93
93
  }, null, 4)) : (r(), v(l(V), {
94
94
  key: 1,
@@ -99,7 +99,7 @@ const M = {
99
99
  ]),
100
100
  c("span", H, k(e.value), 1)
101
101
  ], 10, Q))), 128))
102
- ])) : l(f) ? (r(), v(l(K), {
102
+ ])) : l(f) ? (r(), v(l(F), {
103
103
  key: 1,
104
104
  class: "font-code text-xxs hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
105
105
  variant: "secondary",
@@ -114,7 +114,7 @@ const M = {
114
114
  ]),
115
115
  _: 1
116
116
  })) : g("", !0),
117
- o[1] || (o[1] = c("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-lg brightness-lifted" }, null, -1))
117
+ o[1] || (o[1] = c("div", { class: "-z-1 bg-b-1 brightness-lifted absolute inset-0 rounded shadow-lg" }, null, -1))
118
118
  ], 4)
119
119
  ]),
120
120
  _: 1
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAsV8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA4cjD,wBAMG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cA0O8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA8UjE,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Request.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-02ba9b2d"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9a0ce942"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,217 +1,160 @@
1
- import { defineComponent as le, ref as V, computed as j, watch as ne, onMounted as ue, onBeforeUnmount as ce, openBlock as i, createElementBlock as g, Fragment as me, unref as t, normalizeClass as z, createElementVNode as ve, createBlock as b, createCommentVNode as B, createVNode as E, withCtx as F } from "vue";
2
- import { isDefined as de } from "@scalar/oas-utils/helpers";
3
- import { safeJSON as pe } from "@scalar/object-utils/parse";
4
- import { useBreakpoints as fe } from "@scalar/use-hooks/useBreakpoints";
5
- import { useToasts as ye } from "@scalar/use-toasts";
6
- import { useRouter as Se } from "vue-router";
7
- import Q from "../../components/EmptyState.vue.js";
8
- import qe from "../../components/ImportCurl/ImportCurlModal.vue.js";
9
- import Re from "../../components/ViewLayout/ViewLayout.vue.js";
10
- import be from "../../components/ViewLayout/ViewLayoutContent.vue.js";
11
- import { importCurlCommand as ke } from "../../libs/importers/curl.js";
12
- import { PathId as I } from "../../routes.js";
13
- import { useActiveEntities as he } from "../../store/active-entities.js";
14
- import { useOpenApiWatcher as xe } from "./hooks/useOpenApiWatcher.js";
15
- import we from "./RequestSection/RequestSection.vue.js";
16
- import Ue from "./RequestSubpageHeader.vue.js";
17
- import Ve from "./ResponseSection/ResponseSection.vue.js";
18
- import Ee from "./RequestSidebar.vue.js";
19
- import { createRequestOperation as Oe } from "../../libs/send-request/create-request-operation.js";
20
- import { ERRORS as Ce } from "../../libs/errors.js";
21
- import { useWorkspace as Ne } from "../../store/store.js";
22
- import { useLayout as ge } from "../../hooks/useLayout.js";
23
- const Be = { class: "flex h-full" }, Ie = {
24
- key: 1,
1
+ import { defineComponent as Y, ref as I, computed as H, openBlock as l, createElementBlock as k, Fragment as Z, unref as e, normalizeClass as M, createElementVNode as ee, createVNode as v, isRef as te, withCtx as L, createBlock as p, createCommentVNode as N } from "vue";
2
+ import { useRouter as oe } from "vue-router";
3
+ import z from "../../components/EmptyState.vue.js";
4
+ import re from "../../components/ImportCurl/ImportCurlModal.vue.js";
5
+ import se from "../../components/ViewLayout/ViewLayout.vue.js";
6
+ import ie from "../../components/ViewLayout/ViewLayoutContent.vue.js";
7
+ import { useSidebar as le } from "../../hooks/useSidebar.js";
8
+ import { importCurlCommand as ae } from "../../libs/importers/curl.js";
9
+ import { PathId as S } from "../../routes.js";
10
+ import { useActiveEntities as ne } from "../../store/active-entities.js";
11
+ import ue from "./RequestSection/RequestSection.vue.js";
12
+ import ce from "./RequestSubpageHeader.vue.js";
13
+ import me from "./ResponseSection/ResponseSection.vue.js";
14
+ import { useLayout as de } from "../../hooks/useLayout.js";
15
+ import { useWorkspace as ve } from "../../store/store.js";
16
+ const pe = { class: "flex h-full" }, fe = {
17
+ key: 0,
25
18
  class: "flex h-full flex-1 flex-col"
26
- }, rt = /* @__PURE__ */ le({
19
+ }, Be = /* @__PURE__ */ Y({
27
20
  __name: "Request",
28
21
  emits: ["newTab"],
29
- setup(We) {
30
- const $ = Ne(), { toast: W } = ye(), { layout: k } = ge(), {
31
- activeCollection: l,
32
- activeExample: v,
33
- activeEnvironment: h,
34
- activeRequest: c,
22
+ setup(ye) {
23
+ const { isSidebarOpen: c } = le(), { layout: h } = de(), {
24
+ activeCollection: a,
25
+ activeExample: f,
26
+ activeRequest: m,
35
27
  activeWorkspace: n,
36
- activeServer: O,
37
- activeEnvVariables: T,
38
- activeWorkspaceCollections: J,
39
- activeWorkspaceRequests: P
40
- } = he(), {
41
- cookies: G,
42
- modalState: d,
43
- requestHistory: D,
44
- showSidebar: K,
45
- securitySchemes: X,
46
- requestMutators: Y,
47
- serverMutators: Z,
48
- servers: ee,
49
- events: x
50
- } = $, m = V(k !== "modal"), M = V(), e = V(), C = V(""), te = Se(), oe = j(
51
- () => D.findLast((r) => {
28
+ activeServer: q,
29
+ activeEnvVariables: x,
30
+ activeEnvironment: b,
31
+ activeWorkspaceCollections: D,
32
+ activeWorkspaceRequests: F
33
+ } = ne(), O = ve(), { modalState: u, requestHistory: $, requestMutators: j, serverMutators: A, servers: P } = O, t = I(), y = I(""), T = oe(), G = H(
34
+ () => $.findLast((s) => {
52
35
  var o;
53
- return r.request.uid === ((o = v.value) == null ? void 0 : o.uid);
36
+ return s.request.uid === ((o = f.value) == null ? void 0 : o.uid);
54
37
  })
55
- ), { mediaQueries: re } = fe();
56
- ne(re.xl, (r) => m.value = r, {
57
- immediate: k !== "modal"
58
- });
59
- const A = j(
38
+ ), J = H(
60
39
  () => {
61
- var r, o;
62
- return (k === "modal" ? (r = l.value) == null ? void 0 : r.selectedSecuritySchemeUids : (o = c.value) == null ? void 0 : o.selectedSecuritySchemeUids) ?? [];
40
+ var s, o;
41
+ return (h === "modal" ? (s = a.value) == null ? void 0 : s.selectedSecuritySchemeUids : (o = m.value) == null ? void 0 : o.selectedSecuritySchemeUids) ?? [];
63
42
  }
64
- ), L = async () => {
65
- var S, q, R, u;
66
- if (!c.value || !v.value || !l.value)
67
- return;
68
- const r = typeof h.value == "object" ? h.value.value : "{}", o = pe.parse(r);
69
- o.error && console.error("INVALID ENVIRONMENT!");
70
- const a = o.error || typeof o.data != "object" ? {} : o.data ?? {}, s = ((S = n.value) == null ? void 0 : S.cookies.map((N) => G[N]).filter(de)) ?? [], w = ((R = (q = l.value) == null ? void 0 : q.info) == null ? void 0 : R.title) === "Drafts" ? void 0 : O.value, [p, f] = Oe({
71
- request: c.value,
72
- example: v.value,
73
- selectedSecuritySchemeUids: A.value,
74
- proxyUrl: ((u = n.value) == null ? void 0 : u.proxyUrl) ?? "",
75
- environment: a,
76
- globalCookies: s,
77
- status: x.requestStatus,
78
- securitySchemes: X,
79
- server: w
80
- });
81
- if (p) {
82
- W(p.message, "error");
83
- return;
84
- }
85
- M.value = f.controller;
86
- const [y, U] = await f.sendRequest();
87
- y ? W(y.message, "error") : D.push(U);
88
- }, se = async () => {
89
- var r;
90
- return (r = M.value) == null ? void 0 : r.abort(Ce.REQUEST_ABORTED);
91
- };
92
- ue(() => {
93
- x.executeRequest.on(L), x.cancelRequest.on(se);
94
- }), xe(), ce(() => x.executeRequest.off(L));
95
- function ae({
96
- requestName: r,
43
+ );
44
+ function K({
45
+ requestName: s,
97
46
  collectionUid: o
98
47
  }) {
99
- var p, f, y, U, S, q, R;
100
- if (!e.value) return;
101
- const a = J.value.find(
102
- (u) => u.uid === o
48
+ var V, w, U, _, C, E, W;
49
+ if (!t.value) return;
50
+ const r = D.value.find(
51
+ (d) => d.uid === o
103
52
  );
104
- if (!a) return;
105
- const s = ((p = a == null ? void 0 : a.info) == null ? void 0 : p.title) === "Drafts";
106
- if (!s && e.value.servers) {
107
- const u = Object.values(ee).find(
108
- (N) => {
109
- var H, _;
110
- return N.url === ((_ = (H = e == null ? void 0 : e.value) == null ? void 0 : H.servers) == null ? void 0 : _[0]);
53
+ if (!r) return;
54
+ const i = ((V = r == null ? void 0 : r.info) == null ? void 0 : V.title) === "Drafts";
55
+ if (!i && t.value.servers) {
56
+ const d = Object.values(P).find(
57
+ (X) => {
58
+ var g, B;
59
+ return X.url === ((B = (g = t == null ? void 0 : t.value) == null ? void 0 : g.servers) == null ? void 0 : B[0]);
111
60
  }
112
61
  );
113
- u ? C.value = u.uid : C.value = Z.add(
114
- { url: e.value.servers[0] ?? "/" },
115
- a.uid
62
+ d ? y.value = d.uid : y.value = A.add(
63
+ { url: t.value.servers[0] ?? "/" },
64
+ r.uid
116
65
  ).uid;
117
66
  }
118
- const w = Y.add(
67
+ const R = j.add(
119
68
  {
120
- summary: r,
121
- path: s ? (f = e == null ? void 0 : e.value) == null ? void 0 : f.url : (y = e == null ? void 0 : e.value) == null ? void 0 : y.path,
122
- method: (U = e == null ? void 0 : e.value) == null ? void 0 : U.method,
123
- parameters: (S = e == null ? void 0 : e.value) == null ? void 0 : S.parameters,
124
- selectedServerUid: s ? void 0 : C.value,
125
- requestBody: (q = e == null ? void 0 : e.value) == null ? void 0 : q.requestBody
69
+ summary: s,
70
+ path: i ? (w = t == null ? void 0 : t.value) == null ? void 0 : w.url : (U = t == null ? void 0 : t.value) == null ? void 0 : U.path,
71
+ method: (_ = t == null ? void 0 : t.value) == null ? void 0 : _.method,
72
+ parameters: (C = t == null ? void 0 : t.value) == null ? void 0 : C.parameters,
73
+ selectedServerUid: i ? void 0 : y.value,
74
+ requestBody: (E = t == null ? void 0 : t.value) == null ? void 0 : E.requestBody
126
75
  },
127
- a.uid
76
+ r.uid
128
77
  );
129
- w && ((R = n.value) != null && R.uid) && te.push({
78
+ R && ((W = n.value) != null && W.uid) && T.push({
130
79
  name: "request",
131
80
  params: {
132
- [I.Workspace]: n.value.uid,
133
- [I.Collection]: a.uid,
134
- [I.Request]: w.uid
81
+ [S.Workspace]: n.value.uid,
82
+ [S.Collection]: r.uid,
83
+ [S.Request]: R.uid
135
84
  }
136
- }), d.hide();
85
+ }), u.hide();
137
86
  }
138
- function ie(r) {
139
- e.value = ke(r), d.show();
87
+ function Q(s) {
88
+ t.value = ae(s), u.show();
140
89
  }
141
- return (r, o) => {
142
- var a;
143
- return i(), g(me, null, [
144
- t(l) && t(n) ? (i(), g("div", {
90
+ return (s, o) => {
91
+ var r;
92
+ return l(), k(Z, null, [
93
+ e(a) && e(n) ? (l(), k("div", {
145
94
  key: 0,
146
- class: z(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
147
- "!mb-0 !mr-0 !border-0": t(k) === "modal"
95
+ class: M(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
96
+ "!mb-0 !mr-0 !border-0": e(h) === "modal"
148
97
  }])
149
98
  }, [
150
- ve("div", Be, [
151
- t(K) ? (i(), b(Ee, {
152
- key: 0,
153
- isSidebarOpen: m.value,
154
- onNewTab: o[0] || (o[0] = (s) => r.$emit("newTab", s)),
155
- "onUpdate:isSidebarOpen": o[1] || (o[1] = (s) => m.value = s)
156
- }, null, 8, ["isSidebarOpen"])) : B("", !0),
157
- t(c) ? (i(), g("div", Ie, [
158
- E(Ue, {
159
- modelValue: m.value,
160
- "onUpdate:modelValue": o[2] || (o[2] = (s) => m.value = s),
161
- collection: t(l),
162
- envVariables: t(T),
163
- environment: t(h),
164
- operation: t(c),
165
- server: t(O),
166
- workspace: t(n),
167
- onHideModal: o[3] || (o[3] = () => t(d).hide()),
168
- onImportCurl: ie
99
+ ee("div", pe, [
100
+ e(m) ? (l(), k("div", fe, [
101
+ v(ce, {
102
+ modelValue: e(c),
103
+ "onUpdate:modelValue": o[0] || (o[0] = (i) => te(c) ? c.value = i : null),
104
+ collection: e(a),
105
+ envVariables: e(x),
106
+ environment: e(b),
107
+ operation: e(m),
108
+ server: e(q),
109
+ workspace: e(n),
110
+ onHideModal: o[1] || (o[1] = () => e(u).hide()),
111
+ onImportCurl: Q
169
112
  }, null, 8, ["modelValue", "collection", "envVariables", "environment", "operation", "server", "workspace"]),
170
- E(Re, null, {
171
- default: F(() => [
172
- t(v) ? (i(), b(be, {
113
+ v(se, null, {
114
+ default: L(() => [
115
+ e(f) ? (l(), p(ie, {
173
116
  key: 0,
174
- class: z(["flex-1", [m.value ? "sidebar-active-hide-layout" : ""]])
117
+ class: M(["flex-1", [e(c) ? "sidebar-active-hide-layout" : ""]])
175
118
  }, {
176
- default: F(() => {
177
- var s;
119
+ default: L(() => {
120
+ var i;
178
121
  return [
179
- E(we, {
180
- collection: t(l),
181
- envVariables: t(T),
182
- environment: t(h),
183
- example: t(v),
184
- operation: t(c),
185
- selectedSecuritySchemeUids: A.value,
186
- server: t(O),
187
- workspace: t(n)
122
+ v(ue, {
123
+ collection: e(a),
124
+ envVariables: e(x),
125
+ environment: e(b),
126
+ example: e(f),
127
+ operation: e(m),
128
+ selectedSecuritySchemeUids: J.value,
129
+ server: e(q),
130
+ workspace: e(n)
188
131
  }, null, 8, ["collection", "envVariables", "environment", "example", "operation", "selectedSecuritySchemeUids", "server", "workspace"]),
189
- E(Ve, {
190
- numWorkspaceRequests: t(P).length,
191
- response: (s = oe.value) == null ? void 0 : s.response
132
+ v(me, {
133
+ numWorkspaceRequests: e(F).length,
134
+ response: (i = G.value) == null ? void 0 : i.response
192
135
  }, null, 8, ["numWorkspaceRequests", "response"])
193
136
  ];
194
137
  }),
195
138
  _: 1
196
- }, 8, ["class"])) : B("", !0)
139
+ }, 8, ["class"])) : N("", !0)
197
140
  ]),
198
141
  _: 1
199
142
  })
200
- ])) : (i(), b(Q, { key: 2 }))
143
+ ])) : (l(), p(z, { key: 1 }))
201
144
  ])
202
- ], 2)) : (i(), b(Q, { key: 1 })),
203
- e.value ? (i(), b(qe, {
145
+ ], 2)) : (l(), p(z, { key: 1 })),
146
+ t.value ? (l(), p(re, {
204
147
  key: 2,
205
- collectionUid: ((a = t(l)) == null ? void 0 : a.uid) ?? "",
206
- parsedCurl: e.value,
207
- state: t(d),
208
- onClose: o[4] || (o[4] = (s) => t(d).hide()),
209
- onImportCurl: ae
210
- }, null, 8, ["collectionUid", "parsedCurl", "state"])) : B("", !0)
148
+ collectionUid: ((r = e(a)) == null ? void 0 : r.uid) ?? "",
149
+ parsedCurl: t.value,
150
+ state: e(u),
151
+ onClose: o[2] || (o[2] = (i) => e(u).hide()),
152
+ onImportCurl: K
153
+ }, null, 8, ["collectionUid", "parsedCurl", "state"])) : N("", !0)
211
154
  ], 64);
212
155
  };
213
156
  }
214
157
  });
215
158
  export {
216
- rt as default
159
+ Be as default
217
160
  };
@@ -0,0 +1,13 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
2
+ newTab: (item: {
3
+ name: string;
4
+ uid: string;
5
+ }) => any;
6
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
7
+ onNewTab?: (item: {
8
+ name: string;
9
+ uid: string;
10
+ }) => any;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
13
+ //# sourceMappingURL=RequestRoot.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;cAoL8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA4NjE,wBAMG"}
@@ -0,0 +1,7 @@
1
+ import o from "./RequestRoot.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7c73b460"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,78 @@
1
+ import { defineComponent as B, ref as D, computed as I, onMounted as J, onBeforeUnmount as W, openBlock as b, createElementBlock as j, normalizeClass as z, unref as c, createElementVNode as h, createBlock as L, createCommentVNode as M, createVNode as H } from "vue";
2
+ import { isDefined as Q } from "@scalar/oas-utils/helpers";
3
+ import { safeJSON as $ } from "@scalar/object-utils/parse";
4
+ import { useToasts as F } from "@scalar/use-toasts";
5
+ import { RouterView as G } from "vue-router";
6
+ import { useActiveEntities as K } from "../../store/active-entities.js";
7
+ import { useOpenApiWatcher as P } from "./hooks/useOpenApiWatcher.js";
8
+ import X from "./RequestSidebar.vue.js";
9
+ import { createRequestOperation as Y } from "../../libs/send-request/create-request-operation.js";
10
+ import { ERRORS as Z } from "../../libs/errors.js";
11
+ import { useWorkspace as ee } from "../../store/store.js";
12
+ import { useLayout as te } from "../../hooks/useLayout.js";
13
+ const oe = { class: "flex h-full" }, re = { class: "flex h-full flex-1 flex-col" }, Se = /* @__PURE__ */ B({
14
+ __name: "RequestRoot",
15
+ emits: ["newTab"],
16
+ setup(se) {
17
+ const E = ee(), { toast: n } = F(), { layout: l } = te(), {
18
+ activeCollection: r,
19
+ activeExample: i,
20
+ activeEnvironment: u,
21
+ activeRequest: s,
22
+ activeWorkspace: m,
23
+ activeServer: N
24
+ } = K(), { cookies: k, requestHistory: _, showSidebar: O, securitySchemes: w, events: o } = E, f = D(), U = I(
25
+ () => {
26
+ var t, e;
27
+ return (l === "modal" ? (t = r.value) == null ? void 0 : t.selectedSecuritySchemeUids : (e = s.value) == null ? void 0 : e.selectedSecuritySchemeUids) ?? [];
28
+ }
29
+ ), p = async () => {
30
+ var S, q, x, y;
31
+ if (!s.value || !i.value || !r.value)
32
+ return;
33
+ const t = typeof u.value == "object" ? u.value.value : "{}", e = $.parse(t);
34
+ e.error && console.error("INVALID ENVIRONMENT!");
35
+ const a = e.error || typeof e.data != "object" ? {} : e.data ?? {}, T = ((S = m.value) == null ? void 0 : S.cookies.map((A) => k[A]).filter(Q)) ?? [], V = ((x = (q = r.value) == null ? void 0 : q.info) == null ? void 0 : x.title) === "Drafts" ? void 0 : N.value, [v, d] = Y({
36
+ request: s.value,
37
+ example: i.value,
38
+ selectedSecuritySchemeUids: U.value,
39
+ proxyUrl: ((y = m.value) == null ? void 0 : y.proxyUrl) ?? "",
40
+ environment: a,
41
+ globalCookies: T,
42
+ status: o.requestStatus,
43
+ securitySchemes: w,
44
+ server: V
45
+ });
46
+ if (v) {
47
+ n(v.message, "error");
48
+ return;
49
+ }
50
+ f.value = d.controller;
51
+ const [R, g] = await d.sendRequest();
52
+ R ? n(R.message, "error") : _.push(JSON.parse(JSON.stringify(g)));
53
+ }, C = async () => {
54
+ var t;
55
+ return (t = f.value) == null ? void 0 : t.abort(Z.REQUEST_ABORTED);
56
+ };
57
+ return J(() => {
58
+ o.executeRequest.on(p), o.cancelRequest.on(C);
59
+ }), P(), W(() => o.executeRequest.off(p)), (t, e) => (b(), j("div", {
60
+ class: z(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
61
+ "!mb-0 !mr-0 !border-0": c(l) === "modal"
62
+ }])
63
+ }, [
64
+ h("div", oe, [
65
+ c(O) ? (b(), L(X, {
66
+ key: 0,
67
+ onNewTab: e[0] || (e[0] = (a) => t.$emit("newTab", a))
68
+ })) : M("", !0),
69
+ h("div", re, [
70
+ H(c(G))
71
+ ])
72
+ ])
73
+ ], 2));
74
+ }
75
+ });
76
+ export {
77
+ Se as default
78
+ };
@@ -1,7 +1,7 @@
1
- import type { EnvVariable } from '../../../../store/active-entities';
2
1
  import type { Environment } from '@scalar/oas-utils/entities/environment';
3
2
  import { type Collection, type Oauth2Flow, type SecuritySchemeOauth2, type Server } from '@scalar/oas-utils/entities/spec';
4
3
  import type { Workspace } from '@scalar/oas-utils/entities/workspace';
4
+ import type { EnvVariable } from '../../../../store/active-entities';
5
5
  type __VLS_Props = {
6
6
  collection: Collection;
7
7
  environment: Environment;
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAiQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,MAAM,EAEZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4eF,wBAMG"}
1
+ {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAkQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAS1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4eF,wBAMG"}
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as b, openBlock as s, createElementBlock as V, Fragment as U, createVNode as a, unref as r, withCtx as o, mergeProps as m, createTextVNode as d, createElementVNode as $, createBlock as k, createCommentVNode as p } from "vue";
2
- import { useWorkspace as C } from "../../../../store/store.js";
3
- import { useLoadingState as P, ScalarButton as z } from "@scalar/components";
4
- import { pkceOptions as L } from "@scalar/oas-utils/entities/spec";
5
- import { useToasts as R } from "@scalar/use-toasts";
2
+ import { useLoadingState as C, ScalarButton as z } from "@scalar/components";
3
+ import { pkceOptions as P } from "@scalar/oas-utils/entities/spec";
4
+ import { useToasts as L } from "@scalar/use-toasts";
5
+ import { useWorkspace as R } from "../../../../store/store.js";
6
6
  import B from "./OAuthScopesInput.vue.js";
7
7
  import w from "./RequestAuthDataTableInput.vue.js";
8
8
  import u from "../../../../components/DataTable/DataTableRow.vue.js";
9
9
  import { authorizeOauth2 as F } from "../../libs/oauth2.js";
10
- const I = { class: "h-8 flex items-center justify-self-end" }, A = { class: "h-8 flex items-center justify-end border-t-1/2 w-full" }, W = /* @__PURE__ */ b({
10
+ const I = { class: "flex h-8 items-center justify-self-end" }, A = { class: "border-t-1/2 flex h-8 w-full items-center justify-end" }, W = /* @__PURE__ */ b({
11
11
  __name: "OAuth2",
12
12
  props: {
13
13
  collection: {},
@@ -19,7 +19,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, A = { class: "h-8
19
19
  workspace: {}
20
20
  },
21
21
  setup(f) {
22
- const y = P(), { toast: g } = R(), { securitySchemeMutators: S } = C(), n = (l, e) => S.edit(f.scheme.uid, l, e), T = async () => {
22
+ const y = C(), { toast: g } = L(), { securitySchemeMutators: S } = R(), n = (l, e) => S.edit(f.scheme.uid, l, e), T = async () => {
23
23
  var t, v;
24
24
  if (y.isLoading || !((t = f.collection) != null && t.uid)) return;
25
25
  if (y.startLoading(), !f.server) {
@@ -60,7 +60,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, A = { class: "h-8
60
60
  default: o(() => [
61
61
  $("div", I, [
62
62
  a(r(z), {
63
- class: "p-0 py-0.5 px-2 mr-1",
63
+ class: "mr-1 p-0 px-2 py-0.5",
64
64
  loading: r(y),
65
65
  size: "sm",
66
66
  variant: "outlined",
@@ -184,7 +184,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, A = { class: "h-8
184
184
  "x-usePkce" in l.flow ? (s(), k(r(u), { key: 3 }, {
185
185
  default: o(() => [
186
186
  a(w, m(i, {
187
- enum: r(L),
187
+ enum: r(P),
188
188
  modelValue: l.flow["x-usePkce"],
189
189
  readOnly: "",
190
190
  "onUpdate:modelValue": e[9] || (e[9] = (t) => n(
@@ -217,7 +217,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, A = { class: "h-8
217
217
  default: o(() => [
218
218
  $("div", A, [
219
219
  a(r(z), {
220
- class: "p-0 py-0.5 px-2 mr-1",
220
+ class: "mr-1 p-0 px-2 py-0.5",
221
221
  loading: r(y),
222
222
  size: "sm",
223
223
  variant: "outlined",
@@ -1,5 +1,5 @@
1
- import type { UpdateScheme } from '../../../../store';
2
1
  import type { Oauth2Flow } from '@scalar/oas-utils/entities/spec';
2
+ import type { UpdateScheme } from '../../../../store';
3
3
  type __VLS_Props = {
4
4
  flow: Oauth2Flow;
5
5
  updateScheme: UpdateScheme;