@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,15 +1,15 @@
1
1
  import { defineComponent as q, ref as x, computed as B, openBlock as i, createBlock as b, withCtx as l, createVNode as r, unref as n, createElementVNode as k, createElementBlock as P, Fragment as W, renderList as $, createTextVNode as u, toDisplayString as h, createCommentVNode as I } from "vue";
2
+ import { ScalarDropdown as j, ScalarDropdownItem as z, ScalarButton as M, ScalarIcon as T } from "@scalar/components";
3
+ import { isDefined as U } from "@scalar/oas-utils/helpers";
4
+ import { useToasts as A } from "@scalar/use-toasts";
5
+ import { useRouter as F } from "vue-router";
2
6
  import _ from "../HttpMethod/HttpMethod.vue.js";
3
7
  import { PathId as c } from "../../routes.js";
4
- import { useActiveEntities as j } from "../../store/active-entities.js";
5
- import { ScalarDropdown as z, ScalarDropdownItem as M, ScalarButton as T, ScalarIcon as U } from "@scalar/components";
6
- import { isDefined as A } from "@scalar/oas-utils/helpers";
7
- import { useToasts as F } from "@scalar/use-toasts";
8
- import { useRouter as H } from "vue-router";
8
+ import { useActiveEntities as H } from "../../store/active-entities.js";
9
9
  import L from "./CommandActionForm.vue.js";
10
10
  import O from "./CommandActionInput.vue.js";
11
11
  import { useWorkspace as G } from "../../store/store.js";
12
- const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-scroll" }, ne = /* @__PURE__ */ q({
12
+ const J = { class: "flex items-center gap-2" }, K = { class: "custom-scroll max-h-40" }, ne = /* @__PURE__ */ q({
13
13
  __name: "CommandPaletteExample",
14
14
  props: {
15
15
  metaData: {}
@@ -17,7 +17,7 @@ const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-sc
17
17
  emits: ["close", "back"],
18
18
  setup(C, { emit: E }) {
19
19
  var v;
20
- const w = C, p = E, { push: D } = H(), { activeRequest: S, activeWorkspace: g, activeWorkspaceRequests: y } = j(), { requests: s, requestExampleMutators: N } = G(), { toast: d } = F(), m = x(""), a = x(
20
+ const w = C, p = E, { push: D } = F(), { activeRequest: S, activeWorkspace: g, activeWorkspaceRequests: y } = H(), { requests: s, requestExampleMutators: N } = G(), { toast: d } = A(), m = x(""), a = x(
21
21
  // Ensure we pre-select the correct request
22
22
  s[((v = w.metaData) == null ? void 0 : v.itemUid) ?? ""] ?? S.value
23
23
  ), f = (o) => a.value = o, V = () => {
@@ -43,7 +43,7 @@ const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-sc
43
43
  }
44
44
  }), p("close"));
45
45
  }, R = B(
46
- () => y.value.map((o) => s == null ? void 0 : s[o]).filter(A)
46
+ () => y.value.map((o) => s == null ? void 0 : s[o]).filter(U)
47
47
  );
48
48
  return (o, e) => a.value ? (i(), b(L, {
49
49
  key: 0,
@@ -51,13 +51,13 @@ const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-sc
51
51
  onSubmit: V
52
52
  }, {
53
53
  options: l(() => [
54
- r(n(z), {
54
+ r(n(j), {
55
55
  placement: "bottom",
56
56
  resize: ""
57
57
  }, {
58
58
  items: l(() => [
59
59
  k("div", K, [
60
- (i(!0), P(W, null, $(R.value, (t) => (i(), b(n(M), {
60
+ (i(!0), P(W, null, $(R.value, (t) => (i(), b(n(z), {
61
61
  key: t.uid,
62
62
  class: "flex h-7 w-full items-center justify-between px-1 pr-[26px]",
63
63
  onClick: (Q) => f(t)
@@ -73,8 +73,8 @@ const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-sc
73
73
  ])
74
74
  ]),
75
75
  default: l(() => [
76
- r(n(T), {
77
- class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
76
+ r(n(M), {
77
+ class: "hover:bg-b-2 max-h-8 w-full justify-between gap-1 p-2 text-xs",
78
78
  variant: "outlined",
79
79
  onClick: e[2] || (e[2] = (t) => f(a.value))
80
80
  }, {
@@ -84,7 +84,7 @@ const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-sc
84
84
  r(_, {
85
85
  method: a.value.method
86
86
  }, null, 8, ["method"]),
87
- r(n(U), {
87
+ r(n(T), {
88
88
  class: "text-c-3",
89
89
  icon: "ChevronDown",
90
90
  size: "md"
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;AAmqBA,wBAOG"}
1
+ {"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;AAqtBA,wBAOG"}
@@ -1,113 +1,142 @@
1
- import { defineComponent as j, ref as D, computed as I, watch as L, openBlock as l, createBlock as U, unref as r, withCtx as m, createElementVNode as y, createVNode as x, createTextVNode as d, createElementBlock as i, Fragment as v, toDisplayString as V, createCommentVNode as E } from "vue";
2
- import { useLoadingState as W, ScalarButton as R, ScalarIcon as J, ScalarTooltip as Y, ScalarCodeBlock as q } from "@scalar/components";
3
- import { useToasts as G } from "@scalar/use-toasts";
4
- import { useActiveEntities as H } from "../../store/active-entities.js";
5
- import K from "./CommandActionForm.vue.js";
6
- import Q from "./CommandActionInput.vue.js";
7
- import X from "./WatchModeToggle.vue.js";
8
- import { isPostmanCollection as P, getPostmanDocumentDetails as Z, convertPostmanToOpenApi as F } from "../../libs/postman.js";
9
- import { getOpenApiDocumentDetails as ee } from "../../libs/getOpenApiDocumentDetails.js";
10
- import { isUrl as C } from "../../libs/isUrl.js";
11
- import { useFileDialog as te } from "../../hooks/useFileDialog.js";
12
- import { useWorkspace as oe } from "../../store/store.js";
13
- const ae = { class: "flex justify-between" }, le = { class: "flex w-full flex-row items-center justify-between gap-3" }, ne = { class: "w-content bg-b-1 z-100 text-xxs text-c-1 pointer-events-none z-10 grid max-w-[320px] gap-1.5 rounded p-2 leading-5 shadow-lg" }, se = { class: "text-c-2 flex items-center" }, re = {
1
+ import { defineComponent as J, ref as L, computed as C, watch as R, openBlock as i, createBlock as U, unref as s, withCtx as v, createElementVNode as w, createVNode as b, createTextVNode as f, createElementBlock as c, Fragment as g, toDisplayString as V, createCommentVNode as Y } from "vue";
2
+ import { useLoadingState as q, ScalarButton as T, ScalarIcon as G, ScalarTooltip as H, ScalarCodeBlock as K } from "@scalar/components";
3
+ import { useToasts as Q } from "@scalar/use-toasts";
4
+ import { useRouter as X } from "vue-router";
5
+ import { useActiveEntities as Z } from "../../store/active-entities.js";
6
+ import ee from "./CommandActionForm.vue.js";
7
+ import te from "./CommandActionInput.vue.js";
8
+ import oe from "./WatchModeToggle.vue.js";
9
+ import { isPostmanCollection as _, getPostmanDocumentDetails as le, convertPostmanToOpenApi as F } from "../../libs/postman.js";
10
+ import { getOpenApiDocumentDetails as ae } from "../../libs/getOpenApiDocumentDetails.js";
11
+ import { isUrl as P } from "../../libs/isUrl.js";
12
+ import { useFileDialog as ne } from "../../hooks/useFileDialog.js";
13
+ import { PathId as M } from "../../routes.js";
14
+ import { useWorkspace as ie } from "../../store/store.js";
15
+ const re = { class: "flex justify-between" }, se = { class: "flex w-full flex-row items-center justify-between gap-3" }, ue = { class: "w-content bg-b-1 z-100 text-xxs text-c-1 pointer-events-none z-10 grid max-w-[320px] gap-1.5 rounded p-2 leading-5 shadow-lg" }, ce = { class: "text-c-2 flex items-center" }, me = {
14
16
  key: 0,
15
17
  class: "text-pretty"
16
- }, ie = {
18
+ }, de = {
17
19
  key: 1,
18
20
  class: "text-pretty"
19
- }, he = /* @__PURE__ */ j({
21
+ }, _e = /* @__PURE__ */ J({
20
22
  __name: "CommandPaletteImport",
21
23
  emits: ["close", "back"],
22
- setup(ue, { emit: T }) {
23
- const S = T, { activeWorkspace: p } = H(), { importSpecFile: w, importSpecFromUrl: M } = oe(), { toast: u } = G(), c = W(), t = D(""), f = D(!0), s = I(() => P(t.value) ? Z(t.value) : ee(t.value)), _ = I(
24
- () => s.value ? s.value.type : "json"
25
- ), g = I(() => C(t.value)), $ = I(() => !!s.value), { open: z } = te({
26
- onChange: async (a) => {
27
- const e = a == null ? void 0 : a[0];
24
+ setup(pe, { emit: $ }) {
25
+ const S = $, z = X(), { activeWorkspace: m } = Z(), { importSpecFile: k, importSpecFromUrl: B } = ie(), { toast: d } = Q(), p = q(), o = L(""), y = L(!0), r = C(() => _(o.value) ? le(o.value) : ae(o.value)), A = C(
26
+ () => r.value ? r.value.type : "json"
27
+ );
28
+ function x(l) {
29
+ var e;
30
+ l && z.push({
31
+ name: "collection",
32
+ params: {
33
+ [M.Workspace]: (e = m.value) == null ? void 0 : e.uid,
34
+ [M.Collection]: l.uid
35
+ }
36
+ });
37
+ }
38
+ const h = C(() => P(o.value)), N = C(() => !!r.value), { open: j } = ne({
39
+ onChange: async (l) => {
40
+ const e = l == null ? void 0 : l[0];
28
41
  if (e) {
29
- const o = new FileReader();
30
- o.onload = async (k) => {
31
- var b, A, O;
32
- const n = (b = k.target) == null ? void 0 : b.result;
42
+ const a = new FileReader();
43
+ a.onload = async (I) => {
44
+ var u, O, D;
45
+ const t = (u = I.target) == null ? void 0 : u.result;
33
46
  try {
34
- P(n) ? await w(
35
- await F(n),
36
- ((A = p.value) == null ? void 0 : A.uid) ?? ""
37
- ) : await w(n, ((O = p.value) == null ? void 0 : O.uid) ?? ""), u("Import successful", "info"), S("close");
38
- } catch (h) {
39
- console.error(h);
40
- const N = (h == null ? void 0 : h.message) || "Unknown error";
41
- u(`Import failed: ${N}`, "error");
47
+ if (_(t)) {
48
+ const n = await k(
49
+ await F(t),
50
+ ((O = m.value) == null ? void 0 : O.uid) ?? ""
51
+ );
52
+ x(n == null ? void 0 : n.collection);
53
+ } else {
54
+ const n = await k(
55
+ t,
56
+ ((D = m.value) == null ? void 0 : D.uid) ?? ""
57
+ );
58
+ x(n == null ? void 0 : n.collection);
59
+ }
60
+ d("Import successful", "info"), S("close");
61
+ } catch (n) {
62
+ console.error(n);
63
+ const E = (n == null ? void 0 : n.message) || "Unknown error";
64
+ d(`Import failed: ${E}`, "error");
42
65
  }
43
- }, o.readAsText(e);
66
+ }, a.readAsText(e);
44
67
  }
45
68
  },
46
69
  multiple: !1,
47
70
  accept: ".json,.yaml,.yml"
48
71
  });
49
- L(g, (a) => {
50
- a || (f.value = !1);
51
- }), L(t, (a) => {
52
- C(a) || (f.value = !1);
72
+ R(h, (l) => {
73
+ l || (y.value = !1);
74
+ }), R(o, (l) => {
75
+ P(l) || (y.value = !1);
53
76
  });
54
- async function B() {
55
- var a, e, o, k;
56
- if (!(!t.value || c.isLoading)) {
57
- c.startLoading();
77
+ async function W() {
78
+ var l, e, a, I;
79
+ if (!(!o.value || p.isLoading)) {
80
+ p.startLoading();
58
81
  try {
59
- if (g.value) {
60
- const [n] = await M(
61
- t.value,
62
- ((a = p.value) == null ? void 0 : a.uid) ?? "",
82
+ if (h.value) {
83
+ const [t, u] = await B(
84
+ o.value,
85
+ ((l = m.value) == null ? void 0 : l.uid) ?? "",
63
86
  {
64
- proxyUrl: (e = p.value) == null ? void 0 : e.proxyUrl,
65
- watchMode: f.value
87
+ proxyUrl: (e = m.value) == null ? void 0 : e.proxyUrl,
88
+ watchMode: y.value
66
89
  }
67
90
  );
68
- if (n) {
69
- u(
91
+ if (x(u == null ? void 0 : u.collection), t) {
92
+ d(
70
93
  "There was a possible CORS error while importing your spec, please make sure this server is allowed in the CORS policy of your OpenAPI document.",
71
94
  "error",
72
95
  { timeout: 5e3 }
73
- ), c.invalidate(2e3, !0);
96
+ ), p.invalidate(2e3, !0);
74
97
  return;
75
98
  }
76
- } else if ($.value)
77
- P(t.value) ? (await w(
78
- await F(t.value),
79
- ((o = p.value) == null ? void 0 : o.uid) ?? ""
80
- ), u("Successfully converted Postman collection", "info")) : await w(
81
- t.value,
82
- ((k = p.value) == null ? void 0 : k.uid) ?? ""
83
- );
99
+ } else if (N.value)
100
+ if (_(o.value)) {
101
+ const t = await k(
102
+ await F(o.value),
103
+ ((a = m.value) == null ? void 0 : a.uid) ?? ""
104
+ );
105
+ x(t == null ? void 0 : t.collection), d("Successfully converted Postman collection", "info");
106
+ } else {
107
+ const t = await k(
108
+ o.value,
109
+ ((I = m.value) == null ? void 0 : I.uid) ?? ""
110
+ );
111
+ x(t == null ? void 0 : t.collection);
112
+ }
84
113
  else {
85
- u("Import failed: Invalid URL or OpenAPI document", "error"), c.invalidate(2e3, !0);
114
+ d("Import failed: Invalid URL or OpenAPI document", "error"), p.invalidate(2e3, !0);
86
115
  return;
87
116
  }
88
- c.clear(), S("close"), u("Import successful", "info");
89
- } catch (n) {
90
- console.error("[importCollection]", n);
91
- const b = (n == null ? void 0 : n.message) || "Unknown error";
92
- c.invalidate(2e3, !0), u(`Import failed: ${b}`, "error");
117
+ p.clear(), S("close"), d("Import successful", "info");
118
+ } catch (t) {
119
+ console.error("[importCollection]", t);
120
+ const u = (t == null ? void 0 : t.message) || "Unknown error";
121
+ p.invalidate(2e3, !0), d(`Import failed: ${u}`, "error");
93
122
  }
94
123
  }
95
124
  }
96
- return (a, e) => (l(), U(K, {
97
- disabled: !t.value.trim(),
98
- loading: r(c),
99
- onSubmit: B
125
+ return (l, e) => (i(), U(ee, {
126
+ disabled: !o.value.trim(),
127
+ loading: s(p),
128
+ onSubmit: W
100
129
  }, {
101
- options: m(() => [
102
- y("div", le, [
103
- x(r(R), {
130
+ options: v(() => [
131
+ w("div", se, [
132
+ b(s(T), {
104
133
  class: "hover:bg-b-2 relative max-h-8 gap-1.5 p-2 text-xs",
105
134
  variant: "outlined",
106
- onClick: r(z)
135
+ onClick: s(j)
107
136
  }, {
108
- default: m(() => [
109
- e[6] || (e[6] = d(" JSON, or YAML File ")),
110
- x(r(J), {
137
+ default: v(() => [
138
+ e[6] || (e[6] = f(" JSON, or YAML File ")),
139
+ b(s(G), {
111
140
  class: "text-c-3",
112
141
  icon: "UploadSimple",
113
142
  size: "md"
@@ -115,23 +144,23 @@ const ae = { class: "flex justify-between" }, le = { class: "flex w-full flex-ro
115
144
  ]),
116
145
  _: 1
117
146
  }, 8, ["onClick"]),
118
- x(r(Y), {
147
+ b(s(H), {
119
148
  as: "div",
120
149
  class: "z-[10001]",
121
150
  side: "bottom",
122
151
  sideOffset: 5
123
152
  }, {
124
- trigger: m(() => [
125
- x(X, {
126
- modelValue: f.value,
127
- "onUpdate:modelValue": e[3] || (e[3] = (o) => f.value = o),
128
- disabled: !g.value
153
+ trigger: v(() => [
154
+ b(oe, {
155
+ modelValue: y.value,
156
+ "onUpdate:modelValue": e[3] || (e[3] = (a) => y.value = a),
157
+ disabled: !h.value
129
158
  }, null, 8, ["modelValue", "disabled"])
130
159
  ]),
131
- content: m(() => [
132
- y("div", ne, [
133
- y("div", se, [
134
- g.value ? (l(), i("span", re, " Automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date. ")) : (l(), i("span", ie, " Watch Mode is only available for URL imports. It automatically updates the API client when the OpenAPI URL content changes. "))
160
+ content: v(() => [
161
+ w("div", ue, [
162
+ w("div", ce, [
163
+ h.value ? (i(), c("span", me, " Automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date. ")) : (i(), c("span", de, " Watch Mode is only available for URL imports. It automatically updates the API client when the OpenAPI URL content changes. "))
135
164
  ])
136
165
  ])
137
166
  ]),
@@ -139,48 +168,48 @@ const ae = { class: "flex justify-between" }, le = { class: "flex w-full flex-ro
139
168
  })
140
169
  ])
141
170
  ]),
142
- submit: m(() => [
143
- e[7] || (e[7] = d(" Import ")),
144
- g.value ? (l(), i(v, { key: 0 }, [
145
- d(" from URL ")
146
- ], 64)) : s.value && _.value ? (l(), i(v, { key: 1 }, [
147
- s.value.title ? (l(), i(v, { key: 0 }, [
148
- d(' "' + V(s.value.title) + '" ', 1)
149
- ], 64)) : (l(), i(v, { key: 1 }, [
150
- d(V(s.value.version), 1)
171
+ submit: v(() => [
172
+ e[7] || (e[7] = f(" Import ")),
173
+ h.value ? (i(), c(g, { key: 0 }, [
174
+ f(" from URL ")
175
+ ], 64)) : r.value && A.value ? (i(), c(g, { key: 1 }, [
176
+ r.value.title ? (i(), c(g, { key: 0 }, [
177
+ f(' "' + V(r.value.title) + '" ', 1)
178
+ ], 64)) : (i(), c(g, { key: 1 }, [
179
+ f(V(r.value.version), 1)
151
180
  ], 64))
152
- ], 64)) : (l(), i(v, { key: 2 }, [
153
- d(" Collection ")
181
+ ], 64)) : (i(), c(g, { key: 2 }, [
182
+ f(" Collection ")
154
183
  ], 64))
155
184
  ]),
156
- default: m(() => [
157
- !s.value || r(C)(t.value) ? (l(), U(Q, {
185
+ default: v(() => [
186
+ !r.value || s(P)(o.value) ? (i(), U(te, {
158
187
  key: 0,
159
- modelValue: t.value,
160
- "onUpdate:modelValue": e[0] || (e[0] = (o) => t.value = o),
188
+ modelValue: o.value,
189
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => o.value = a),
161
190
  placeholder: "OpenAPI/Swagger/Postman URL or document",
162
- onOnDelete: e[1] || (e[1] = (o) => S("back", o))
163
- }, null, 8, ["modelValue"])) : (l(), i(v, { key: 1 }, [
164
- y("div", ae, [
165
- e[5] || (e[5] = y("div", { class: "text-c-2 min-h-8 py-2 pl-8 text-xs" }, "Preview", -1)),
166
- x(r(R), {
191
+ onOnDelete: e[1] || (e[1] = (a) => S("back", a))
192
+ }, null, 8, ["modelValue"])) : (i(), c(g, { key: 1 }, [
193
+ w("div", re, [
194
+ e[5] || (e[5] = w("div", { class: "text-c-2 min-h-8 py-2 pl-8 text-xs" }, "Preview", -1)),
195
+ b(s(T), {
167
196
  class: "hover:bg-b-2 relative ml-auto max-h-8 gap-1.5 p-2 text-xs",
168
197
  variant: "ghost",
169
- onClick: e[2] || (e[2] = (o) => t.value = "")
198
+ onClick: e[2] || (e[2] = (a) => o.value = "")
170
199
  }, {
171
- default: m(() => e[4] || (e[4] = [
172
- d(" Clear ")
200
+ default: v(() => e[4] || (e[4] = [
201
+ f(" Clear ")
173
202
  ])),
174
203
  _: 1
175
204
  })
176
205
  ]),
177
- s.value && !r(C)(t.value) ? (l(), U(r(q), {
206
+ r.value && !s(P)(o.value) ? (i(), U(s(K), {
178
207
  key: 0,
179
208
  class: "bg-b-2 mt-1 max-h-[40dvh] rounded border [--scalar-small:--scalar-font-size-4]",
180
- content: t.value,
209
+ content: o.value,
181
210
  copy: !1,
182
- lang: _.value
183
- }, null, 8, ["content", "lang"])) : E("", !0)
211
+ lang: A.value
212
+ }, null, 8, ["content", "lang"])) : Y("", !0)
184
213
  ], 64))
185
214
  ]),
186
215
  _: 1
@@ -188,5 +217,5 @@ const ae = { class: "flex justify-between" }, le = { class: "flex w-full flex-ro
188
217
  }
189
218
  });
190
219
  export {
191
- he as default
220
+ _e as default
192
221
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":"AAqIA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACF,CAAC;;;;;;;;AA2PF,wBAQG"}
1
+ {"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":"AAoJA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACF,CAAC;;;;;;;;AAsQF,wBAQG"}
@@ -1,92 +1,100 @@
1
- import { defineComponent as _, ref as p, computed as N, openBlock as u, createBlock as c, withCtx as l, createVNode as d, unref as n, createElementVNode as f, normalizeClass as P, toDisplayString as B, createTextVNode as L } from "vue";
2
- import { ScalarListbox as M, ScalarButton as b, ScalarIcon as T } from "@scalar/components";
3
- import { useToasts as j } from "@scalar/use-toasts";
4
- import { useActiveEntities as z } from "../../store/active-entities.js";
5
- import E from "./CommandActionForm.vue.js";
6
- import R from "./CommandActionInput.vue.js";
7
- import { useWorkspace as W } from "../../store/store.js";
8
- const G = /* @__PURE__ */ _({
1
+ import { defineComponent as N, ref as p, computed as h, openBlock as u, createBlock as c, withCtx as l, createVNode as m, unref as s, createElementVNode as f, normalizeClass as B, toDisplayString as M, createTextVNode as T } from "vue";
2
+ import { ScalarListbox as j, ScalarButton as b, ScalarIcon as z } from "@scalar/components";
3
+ import { useToasts as E } from "@scalar/use-toasts";
4
+ import { useRouter as I } from "vue-router";
5
+ import { useActiveEntities as L } from "../../store/active-entities.js";
6
+ import R from "./CommandActionForm.vue.js";
7
+ import W from "./CommandActionInput.vue.js";
8
+ import { PathId as C } from "../../routes.js";
9
+ import { useWorkspace as $ } from "../../store/store.js";
10
+ const X = /* @__PURE__ */ N({
9
11
  __name: "CommandPaletteServer",
10
12
  props: {
11
13
  metaData: {}
12
14
  },
13
15
  emits: ["close", "back"],
14
- setup(C, { emit: x }) {
15
- const s = C, m = x, { toast: v } = j(), { activeCollection: S, activeWorkspaceCollections: k } = z(), {
16
- collectionMutators: V,
17
- serverMutators: g,
18
- events: D,
19
- collections: U
20
- } = W(), r = p(""), i = N(
21
- () => k.value.flatMap(
22
- (o) => {
23
- var e, t;
24
- return ((e = o.info) == null ? void 0 : e.title) === "Drafts" ? [] : {
25
- id: o.uid,
26
- label: ((t = o.info) == null ? void 0 : t.title) ?? "Unititled Collection"
16
+ setup(x, { emit: S }) {
17
+ const n = x, d = S, k = I(), { toast: v } = E(), { activeCollection: V, activeWorkspaceCollections: g } = L(), {
18
+ collectionMutators: D,
19
+ serverMutators: U,
20
+ events: w,
21
+ collections: y
22
+ } = $(), r = p(""), i = h(
23
+ () => g.value.flatMap(
24
+ (t) => {
25
+ var e, o;
26
+ return ((e = t.info) == null ? void 0 : e.title) === "Drafts" ? [] : {
27
+ id: t.uid,
28
+ label: ((o = t.info) == null ? void 0 : o.title) ?? "Unititled Collection"
27
29
  };
28
30
  }
29
31
  )
30
32
  ), a = p(
31
- s.metaData ? i.value.find(
32
- (o) => {
33
- var e, t;
34
- return o.id === ((e = s.metaData) == null ? void 0 : e.itemUid) || o.id === ((t = s.metaData) == null ? void 0 : t.parentUid);
33
+ n.metaData ? i.value.find(
34
+ (t) => {
35
+ var e, o;
36
+ return t.id === ((e = n.metaData) == null ? void 0 : e.itemUid) || t.id === ((o = n.metaData) == null ? void 0 : o.parentUid);
35
37
  }
36
38
  ) : i.value.find(
37
- (o) => {
39
+ (t) => {
38
40
  var e;
39
- return o.id === ((e = S.value) == null ? void 0 : e.uid);
41
+ return t.id === ((e = V.value) == null ? void 0 : e.uid);
40
42
  }
41
43
  )
42
- ), w = () => {
43
- var t;
44
+ ), P = () => {
45
+ var o;
44
46
  if (!r.value.trim()) {
45
47
  v("Please enter a valid url before creating a server.", "error");
46
48
  return;
47
49
  }
48
- const o = U[((t = a.value) == null ? void 0 : t.id) ?? ""];
49
- if (!o) {
50
+ const t = y[((o = a.value) == null ? void 0 : o.id) ?? ""];
51
+ if (!t) {
50
52
  v("Please select a collection before creating a server.", "error");
51
53
  return;
52
54
  }
53
- const e = g.add({ url: r.value }, o.uid);
54
- V.edit(o.uid, "selectedServerUid", e.uid), m("close");
55
- }, y = () => {
56
- D.commandPalette.emit({ commandName: "Create Collection" });
55
+ const e = U.add({ url: r.value }, t.uid);
56
+ D.edit(t.uid, "selectedServerUid", e.uid), k.push({
57
+ name: "collection.servers.edit",
58
+ params: {
59
+ [C.Collection]: t.uid,
60
+ [C.Servers]: e.uid
61
+ }
62
+ }), d("close");
63
+ }, _ = () => {
64
+ w.commandPalette.emit({ commandName: "Create Collection" });
57
65
  };
58
- return (o, e) => (u(), c(E, {
66
+ return (t, e) => (u(), c(R, {
59
67
  disabled: !r.value.trim() || !a.value,
60
- onSubmit: w
68
+ onSubmit: P
61
69
  }, {
62
70
  options: l(() => [
63
- d(n(M), {
71
+ m(s(j), {
64
72
  modelValue: a.value,
65
- "onUpdate:modelValue": e[2] || (e[2] = (t) => a.value = t),
73
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => a.value = o),
66
74
  options: i.value
67
75
  }, {
68
76
  default: l(() => [
69
- i.value.length > 0 ? (u(), c(n(b), {
77
+ i.value.length > 0 ? (u(), c(s(b), {
70
78
  key: 0,
71
79
  class: "hover:bg-b-2 max-h-8 w-fit justify-between gap-1 p-2 text-xs",
72
80
  variant: "outlined"
73
81
  }, {
74
82
  default: l(() => [
75
83
  f("span", {
76
- class: P(a.value ? "text-c-1" : "text-c-3")
77
- }, B(a.value ? a.value.label : "Select Collection"), 3),
78
- d(n(T), {
84
+ class: B(a.value ? "text-c-1" : "text-c-3")
85
+ }, M(a.value ? a.value.label : "Select Collection"), 3),
86
+ m(s(z), {
79
87
  class: "text-c-3",
80
88
  icon: "ChevronDown",
81
89
  size: "md"
82
90
  })
83
91
  ]),
84
92
  _: 1
85
- })) : (u(), c(n(b), {
93
+ })) : (u(), c(s(b), {
86
94
  key: 1,
87
95
  class: "hover:bg-b-2 max-h-8 w-fit justify-between gap-1 p-2 text-xs",
88
96
  variant: "outlined",
89
- onClick: y
97
+ onClick: _
90
98
  }, {
91
99
  default: l(() => e[3] || (e[3] = [
92
100
  f("span", { class: "text-c-1" }, "Create Collection", -1)
@@ -98,15 +106,15 @@ const G = /* @__PURE__ */ _({
98
106
  }, 8, ["modelValue", "options"])
99
107
  ]),
100
108
  submit: l(() => e[4] || (e[4] = [
101
- L(" Create Server ")
109
+ T(" Create Server ")
102
110
  ])),
103
111
  default: l(() => [
104
- d(R, {
112
+ m(W, {
105
113
  modelValue: r.value,
106
- "onUpdate:modelValue": e[0] || (e[0] = (t) => r.value = t),
114
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => r.value = o),
107
115
  label: "Server URL",
108
- placeholder: "Server URL",
109
- onOnDelete: e[1] || (e[1] = (t) => m("back", t))
116
+ placeholder: "https://void.scalar.com",
117
+ onOnDelete: e[1] || (e[1] = (o) => d("back", o))
110
118
  }, null, 8, ["modelValue"])
111
119
  ]),
112
120
  _: 1
@@ -114,5 +122,5 @@ const G = /* @__PURE__ */ _({
114
122
  }
115
123
  });
116
124
  export {
117
- G as default
125
+ X as default
118
126
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;;;AAsMA,wBAOG"}
1
+ {"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;;;AAwMA,wBAOG"}
@@ -1 +1 @@
1
- {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAoZA;;;;GAIG;;AACH,wBAieI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA9f9B,CA/OuC;qBA+OvC,CA9Oc;;;;;;;mBA8Od,CA/OuC;qBA+OvC,CA9Oc;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAovBJ,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
1
+ {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAoZA;;;;GAIG;;AACH,wBAieI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA9f9B,CAhOY;qBAgOZ,CAhOmC;;;;;;;mBAgOnC,CAhOY;qBAgOZ,CAhOmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsuBzB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
@@ -2,8 +2,8 @@ import o from "./TheCommandPalette.vue2.js";
2
2
  import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e9fd9234"]]);
5
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3a12eca9"]]);
6
6
  export {
7
7
  s as PaletteComponents,
8
- a as default
8
+ r as default
9
9
  };