@scalar/api-client 2.2.44 → 2.2.47

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 (388) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +1 -2
  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 +35 -30
  8. package/dist/components/AddressBar/index.d.ts +1 -1
  9. package/dist/components/CodeInput/CodeInput.vue.d.ts +5 -5
  10. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  11. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  12. package/dist/components/CodeInput/CodeInput.vue2.js +70 -64
  13. package/dist/components/CodeInput/codeVariableWidget.d.ts +5 -5
  14. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  15. package/dist/components/CodeInput/codeVariableWidget.js +2 -3
  16. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +4 -4
  17. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  18. package/dist/components/CommandPalette/CommandActionForm.vue.js +10 -10
  19. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +2 -2
  20. package/dist/components/CommandPalette/CommandActionInput.vue.js +1 -1
  21. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -2
  22. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +2 -2
  23. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  24. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +46 -40
  25. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -2
  26. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -2
  27. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +2 -2
  28. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +2 -2
  29. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +2 -2
  30. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +14 -14
  31. package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +1 -1
  32. package/dist/components/CommandPalette/WatchModeToggle.vue.js +1 -1
  33. package/dist/components/CommandPalette/index.d.ts +1 -1
  34. package/dist/components/ContextBar.vue.d.ts +1 -1
  35. package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
  36. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  37. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +1 -1
  38. package/dist/components/DataTable/DataTableCheckbox.vue.js +6 -6
  39. package/dist/components/DataTable/DataTableInput.vue.d.ts +6 -6
  40. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  41. package/dist/components/DataTable/DataTableInput.vue.js +4 -4
  42. package/dist/components/DataTable/DataTableInput.vue2.js +22 -23
  43. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +3 -3
  44. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  45. package/dist/components/DataTable/DataTableInputSelect.vue.js +39 -39
  46. package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
  47. package/dist/components/DataTable/index.d.ts +8 -8
  48. package/dist/components/EmptyState.vue.d.ts +3 -0
  49. package/dist/components/EmptyState.vue.d.ts.map +1 -0
  50. package/dist/components/EmptyState.vue.js +7 -0
  51. package/dist/components/EmptyState.vue2.js +31 -0
  52. package/dist/components/Form/Form.vue.d.ts.map +1 -1
  53. package/dist/components/Form/Form.vue.js +1 -1
  54. package/dist/components/HelpfulLink.vue.d.ts.map +1 -1
  55. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -1
  56. package/dist/components/HttpMethod/index.d.ts +1 -1
  57. package/dist/components/IconSelector.vue.d.ts +1 -1
  58. package/dist/components/IconSelector.vue.d.ts.map +1 -1
  59. package/dist/components/ImportCollection/DropEventListener.vue.d.ts +1 -1
  60. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +1 -1
  61. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +1 -1
  62. package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +1 -1
  63. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +1 -1
  64. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +2 -2
  65. package/dist/components/ImportCollection/index.d.ts +1 -1
  66. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +3 -3
  67. package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
  68. package/dist/components/ScalarHotkey.vue.js +12 -7
  69. package/dist/components/ScreenReader.vue.d.ts.map +1 -1
  70. package/dist/components/Search/useSearch.d.ts +4 -2
  71. package/dist/components/Search/useSearch.d.ts.map +1 -1
  72. package/dist/components/Search/useSearch.js +63 -56
  73. package/dist/components/Search/useSearch.test.d.ts +2 -0
  74. package/dist/components/Search/useSearch.test.d.ts.map +1 -0
  75. package/dist/components/Server/ServerDropdown.test.d.ts +2 -0
  76. package/dist/components/Server/ServerDropdown.test.d.ts.map +1 -0
  77. package/dist/components/Server/ServerDropdownItem.vue.d.ts +1 -1
  78. package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
  79. package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
  80. package/dist/components/Server/ServerDropdownItem.vue2.js +27 -28
  81. package/dist/components/Server/ServerVariablesForm.vue.d.ts +2 -2
  82. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
  83. package/dist/components/Server/ServerVariablesSelect.vue.d.ts +2 -2
  84. package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
  85. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +2 -2
  86. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
  87. package/dist/components/Server/ServerVariablesTextbox.vue.js +9 -9
  88. package/dist/components/Server/index.d.ts +2 -2
  89. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  90. package/dist/components/SideNav/SideNav.vue.js +19 -19
  91. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  92. package/dist/components/SideNav/SideNavLink.vue.js +11 -11
  93. package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +1 -1
  94. package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
  95. package/dist/components/SideNav/SideNavRouterLink.vue.js +19 -13
  96. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +3 -3
  97. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
  98. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +2 -2
  99. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts +2 -2
  100. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts +2 -2
  101. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  102. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  103. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  104. package/dist/components/Sidebar/Sidebar.vue2.js +5 -5
  105. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  106. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +3 -3
  107. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  108. package/dist/components/Sidebar/SidebarListElement.vue2.js +9 -9
  109. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +3 -3
  110. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  111. package/dist/components/Sidebar/SidebarToggle.vue.d.ts +1 -1
  112. package/dist/components/Sidebar/index.d.ts +1 -1
  113. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  114. package/dist/components/TopNav/TopNav.vue.js +74 -73
  115. package/dist/components/TopNav/TopNavItem.vue.d.ts +5 -5
  116. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  117. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  118. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +3 -3
  119. package/dist/components/index.d.ts +3 -3
  120. package/dist/hooks/index.d.ts +5 -4
  121. package/dist/hooks/index.d.ts.map +1 -1
  122. package/dist/hooks/index.js +4 -2
  123. package/dist/hooks/useResponseBody.d.ts +18 -0
  124. package/dist/hooks/useResponseBody.d.ts.map +1 -0
  125. package/dist/hooks/useResponseBody.js +28 -0
  126. package/dist/hooks/useResponseBody.test.d.ts +2 -0
  127. package/dist/hooks/useResponseBody.test.d.ts.map +1 -0
  128. package/dist/index.d.ts +4 -4
  129. package/dist/layouts/App/ApiClientApp.vue.d.ts +2 -2
  130. package/dist/layouts/App/create-api-client-app.d.ts +106 -66
  131. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  132. package/dist/layouts/App/create-api-client-app.test.d.ts +2 -0
  133. package/dist/layouts/App/create-api-client-app.test.d.ts.map +1 -0
  134. package/dist/layouts/App/index.d.ts +2 -2
  135. package/dist/layouts/Modal/create-api-client-modal.d.ts +215 -135
  136. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  137. package/dist/layouts/Modal/create-api-client-modal.test.d.ts +2 -0
  138. package/dist/layouts/Modal/create-api-client-modal.test.d.ts.map +1 -0
  139. package/dist/layouts/Modal/index.d.ts +2 -2
  140. package/dist/layouts/Web/create-api-client-web.d.ts +106 -66
  141. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  142. package/dist/layouts/Web/create-api-client-web.test.d.ts +2 -0
  143. package/dist/layouts/Web/create-api-client-web.test.d.ts.map +1 -0
  144. package/dist/layouts/Web/index.d.ts +2 -2
  145. package/dist/libs/create-client.d.ts +106 -66
  146. package/dist/libs/create-client.d.ts.map +1 -1
  147. package/dist/libs/create-client.js +56 -57
  148. package/dist/libs/env-helpers.test.d.ts +2 -0
  149. package/dist/libs/env-helpers.test.d.ts.map +1 -0
  150. package/dist/libs/environment-parser.d.ts +1 -1
  151. package/dist/libs/event-bus.test.d.ts +2 -0
  152. package/dist/libs/event-bus.test.d.ts.map +1 -0
  153. package/dist/libs/extractAttachmentFilename.test.d.ts +2 -0
  154. package/dist/libs/extractAttachmentFilename.test.d.ts.map +1 -0
  155. package/dist/libs/find-request.test.d.ts +2 -0
  156. package/dist/libs/find-request.test.d.ts.map +1 -0
  157. package/dist/libs/getOpenApiDocumentDetails.d.ts +1 -1
  158. package/dist/libs/getOpenApiDocumentDetails.d.ts.map +1 -1
  159. package/dist/libs/hot-keys.d.ts +1 -1
  160. package/dist/libs/importers/curl.js +1 -1
  161. package/dist/libs/importers/curl.test.d.ts +2 -0
  162. package/dist/libs/importers/curl.test.d.ts.map +1 -0
  163. package/dist/libs/importers/index.d.ts +1 -1
  164. package/dist/libs/index.d.ts +16 -16
  165. package/dist/libs/index.js +31 -33
  166. package/dist/libs/local-storage.d.ts +1 -1
  167. package/dist/libs/normalize-headers.test.d.ts +2 -0
  168. package/dist/libs/normalize-headers.test.d.ts.map +1 -0
  169. package/dist/libs/parse-curl.test.d.ts +2 -0
  170. package/dist/libs/parse-curl.test.d.ts.map +1 -0
  171. package/dist/libs/send-request/build-request-security.d.ts +17 -0
  172. package/dist/libs/send-request/build-request-security.d.ts.map +1 -0
  173. package/dist/libs/send-request/build-request-security.js +32 -0
  174. package/dist/libs/send-request/build-request-security.test.d.ts +2 -0
  175. package/dist/libs/send-request/build-request-security.test.d.ts.map +1 -0
  176. package/dist/libs/send-request/create-fetch-auth.test.d.ts +2 -0
  177. package/dist/libs/send-request/create-fetch-auth.test.d.ts.map +1 -0
  178. package/dist/libs/send-request/create-fetch-body.d.ts +18 -0
  179. package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -0
  180. package/dist/libs/send-request/create-fetch-body.js +26 -0
  181. package/dist/libs/send-request/create-fetch-body.test.d.ts +2 -0
  182. package/dist/libs/send-request/create-fetch-body.test.d.ts.map +1 -0
  183. package/dist/libs/send-request/create-fetch-headers.d.ts +4 -0
  184. package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -0
  185. package/dist/libs/send-request/create-fetch-headers.js +11 -0
  186. package/dist/libs/send-request/create-fetch-headers.test.d.ts +2 -0
  187. package/dist/libs/send-request/create-fetch-headers.test.d.ts.map +1 -0
  188. package/dist/libs/send-request/create-fetch-query-params.d.ts +4 -0
  189. package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -0
  190. package/dist/libs/send-request/create-fetch-query-params.js +10 -0
  191. package/dist/libs/send-request/create-fetch-query-params.test.d.ts +2 -0
  192. package/dist/libs/send-request/create-fetch-query-params.test.d.ts.map +1 -0
  193. package/dist/libs/send-request/create-request-operation.d.ts +29 -0
  194. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -0
  195. package/dist/libs/send-request/create-request-operation.js +111 -0
  196. package/dist/libs/send-request/create-request-operation.test.d.ts +171 -0
  197. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -0
  198. package/dist/libs/send-request/decode-buffer.d.ts +3 -0
  199. package/dist/libs/send-request/decode-buffer.d.ts.map +1 -0
  200. package/dist/libs/send-request/decode-buffer.js +9 -0
  201. package/dist/libs/send-request/decode-buffer.test.d.ts +2 -0
  202. package/dist/libs/send-request/decode-buffer.test.d.ts.map +1 -0
  203. package/dist/libs/send-request/index.d.ts +2 -1
  204. package/dist/libs/send-request/index.d.ts.map +1 -1
  205. package/dist/libs/send-request/index.js +4 -6
  206. package/dist/libs/send-request/set-request-cookies.d.ts +1 -1
  207. package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
  208. package/dist/libs/send-request/set-request-cookies.test.d.ts +2 -0
  209. package/dist/libs/send-request/set-request-cookies.test.d.ts.map +1 -0
  210. package/dist/libs/string-template.test.d.ts +2 -0
  211. package/dist/libs/string-template.test.d.ts.map +1 -0
  212. package/dist/router.d.ts +1 -1
  213. package/dist/routes.d.ts +27 -27
  214. package/dist/routes.js +4 -4
  215. package/dist/routes.test.d.ts +2 -0
  216. package/dist/routes.test.d.ts.map +1 -0
  217. package/dist/store/active-entities.d.ts +10 -6
  218. package/dist/store/active-entities.d.ts.map +1 -1
  219. package/dist/store/collections.d.ts +1 -1
  220. package/dist/store/collections.d.ts.map +1 -1
  221. package/dist/store/collections.js +17 -14
  222. package/dist/store/collections.test.d.ts +2 -0
  223. package/dist/store/collections.test.d.ts.map +1 -0
  224. package/dist/store/events.d.ts +7 -7
  225. package/dist/store/import-spec.d.ts +1 -1
  226. package/dist/store/index.d.ts +2 -2
  227. package/dist/store/request-example.d.ts +52 -52
  228. package/dist/store/request-example.d.ts.map +1 -1
  229. package/dist/store/request.test.d.ts +2 -0
  230. package/dist/store/request.test.d.ts.map +1 -0
  231. package/dist/store/requests.d.ts +1 -1
  232. package/dist/store/router-params.d.ts +1 -1
  233. package/dist/store/store.d.ts +103 -63
  234. package/dist/store/store.d.ts.map +1 -1
  235. package/dist/store/store.js +1 -1
  236. package/dist/store/workspace.d.ts +44 -4
  237. package/dist/store/workspace.d.ts.map +1 -1
  238. package/dist/style.css +1 -1
  239. package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts +2 -0
  240. package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts.map +1 -0
  241. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +13 -0
  242. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -0
  243. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +46 -0
  244. package/dist/views/Components/CodeSnippet/CodeSnippet.vue2.js +4 -0
  245. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts +28 -0
  246. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -0
  247. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +64 -0
  248. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts +2 -0
  249. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts.map +1 -0
  250. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +12 -0
  251. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -0
  252. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +47 -0
  253. package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts +2 -0
  254. package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts.map +1 -0
  255. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +13 -0
  256. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -0
  257. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +47 -0
  258. package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts +2 -0
  259. package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts.map +1 -0
  260. package/dist/views/Components/CodeSnippet/index.d.ts +5 -0
  261. package/dist/views/Components/CodeSnippet/index.d.ts.map +1 -0
  262. package/dist/views/Components/CodeSnippet/index.js +10 -0
  263. package/dist/views/Cookies/CookieModal.vue.d.ts +3 -3
  264. package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -1
  265. package/dist/views/Cookies/CookieModal.vue.js +2 -2
  266. package/dist/views/Cookies/CookieModal.vue2.js +11 -11
  267. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  268. package/dist/views/Cookies/Cookies.vue2.js +84 -76
  269. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  270. package/dist/views/Environment/Environment.vue2.js +127 -113
  271. package/dist/views/Environment/EnvironmentColorModal.vue.d.ts +2 -2
  272. package/dist/views/Environment/EnvironmentColors.vue.d.ts +1 -1
  273. package/dist/views/Environment/EnvironmentModal.vue.d.ts +6 -6
  274. package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
  275. package/dist/views/Environment/EnvironmentModal.vue.js +1 -1
  276. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +2 -2
  277. package/dist/views/Request/Request.vue.d.ts +2 -2
  278. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  279. package/dist/views/Request/Request.vue.js +2 -2
  280. package/dist/views/Request/Request.vue2.js +92 -86
  281. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +2 -2
  282. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
  283. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts +2 -0
  284. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts.map +1 -0
  285. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
  286. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  287. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  288. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +4 -4
  289. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  290. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +2 -2
  291. package/dist/views/Request/RequestSection/RequestBody.test.d.ts +2 -0
  292. package/dist/views/Request/RequestSection/RequestBody.test.d.ts.map +1 -0
  293. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  294. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  295. package/dist/views/Request/RequestSection/RequestBody.vue2.js +105 -103
  296. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +3 -0
  297. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -0
  298. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +7 -0
  299. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +141 -0
  300. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  301. package/dist/views/Request/RequestSection/RequestParams.vue.js +70 -74
  302. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  303. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  304. package/dist/views/Request/RequestSection/RequestSection.vue2.js +71 -62
  305. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +8 -8
  306. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  307. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  308. package/dist/views/Request/RequestSection/RequestTable.vue2.js +60 -59
  309. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts +6 -0
  310. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +1 -0
  311. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +20 -0
  312. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts +2 -0
  313. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts.map +1 -0
  314. package/dist/views/Request/RequestSection/helpers/getting-started.d.ts +6 -0
  315. package/dist/views/Request/RequestSection/helpers/getting-started.d.ts.map +1 -0
  316. package/dist/views/Request/RequestSection/helpers/getting-started.js +17 -0
  317. package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts +2 -0
  318. package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts.map +1 -0
  319. package/dist/views/Request/RequestSection/index.d.ts +2 -1
  320. package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
  321. package/dist/views/Request/RequestSection/index.js +4 -2
  322. package/dist/views/Request/RequestSidebar.vue.d.ts +5 -5
  323. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  324. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  325. package/dist/views/Request/RequestSidebar.vue2.js +211 -193
  326. package/dist/views/Request/RequestSidebarItem.vue.d.ts +18 -31
  327. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  328. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  329. package/dist/views/Request/RequestSidebarItem.vue2.js +134 -141
  330. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +5 -5
  331. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  332. package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
  333. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +120 -101
  334. package/dist/views/Request/RequestSubpageHeader.test.d.ts +2 -0
  335. package/dist/views/Request/RequestSubpageHeader.test.d.ts.map +1 -0
  336. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +3 -3
  337. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  338. package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
  339. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  340. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  341. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +50 -64
  342. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +3 -3
  343. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
  344. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
  345. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +27 -27
  346. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +1 -1
  347. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  348. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
  349. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts +1 -1
  350. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts +2 -0
  351. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts.map +1 -0
  352. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +6 -0
  353. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
  354. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +38 -19
  355. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  356. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  357. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +39 -57
  358. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  359. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  360. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +30 -28
  361. package/dist/views/Request/ResponseSection/index.d.ts +1 -1
  362. package/dist/views/Request/components/index.d.ts +1 -1
  363. package/dist/views/Request/consts/index.d.ts +3 -3
  364. package/dist/views/Request/handle-drag.d.ts +2 -2
  365. package/dist/views/Request/libs/auth.d.ts +1 -1
  366. package/dist/views/Request/libs/auth.test.d.ts +2 -0
  367. package/dist/views/Request/libs/auth.test.d.ts.map +1 -0
  368. package/dist/views/Request/libs/index.d.ts +2 -2
  369. package/dist/views/Request/libs/oauth2.d.ts +2 -2
  370. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  371. package/dist/views/Request/libs/oauth2.js +7 -7
  372. package/dist/views/Request/libs/oauth2.test.d.ts +2 -0
  373. package/dist/views/Request/libs/oauth2.test.d.ts.map +1 -0
  374. package/dist/views/Request/libs/request.test.d.ts +2 -0
  375. package/dist/views/Request/libs/request.test.d.ts.map +1 -0
  376. package/dist/views/Request/libs/watch-mode.d.ts +2 -2
  377. package/dist/views/Request/libs/watch-mode.test.d.ts +2 -0
  378. package/dist/views/Request/libs/watch-mode.test.d.ts.map +1 -0
  379. package/dist/views/Request/types/sidebar-item.d.ts +2 -2
  380. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  381. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  382. package/dist/views/Servers/Servers.vue2.js +86 -73
  383. package/dist/views/Servers/index.d.ts +1 -1
  384. package/dist/views/Settings/components/SettingsAppearance.vue.js +6 -6
  385. package/package.json +21 -15
  386. package/dist/libs/send-request/send-request.d.ts +0 -51
  387. package/dist/libs/send-request/send-request.d.ts.map +0 -1
  388. package/dist/libs/send-request/send-request.js +0 -177
@@ -1,11 +1,11 @@
1
- import { defineComponent as ae, computed as w, ref as te, watch as $, openBlock as g, createBlock as x, withCtx as v, createTextVNode as H, toDisplayString as _, createVNode as f, unref as m, createElementVNode as D, createCommentVNode as oe, createElementBlock as V, Fragment as le, nextTick as ne } from "vue";
1
+ import { defineComponent as ae, computed as w, ref as te, watch as $, openBlock as g, createBlock as x, withCtx as f, createTextVNode as H, toDisplayString as _, createVNode as p, unref as m, createElementVNode as F, createCommentVNode as oe, createElementBlock as V, Fragment as ne, nextTick as le } from "vue";
2
2
  import re from "../../../components/CodeInput/CodeInput.vue.js";
3
3
  import ue from "../../../components/DataTable/DataTable.vue.js";
4
4
  import ie from "../../../components/DataTable/DataTableHeader.vue.js";
5
5
  import C from "../../../components/DataTable/DataTableRow.vue.js";
6
6
  import de from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
7
  import { useActiveEntities as se } from "../../../store/active-entities.js";
8
- import { ScalarListbox as X, ScalarButton as U, ScalarIcon as P } from "@scalar/components";
8
+ import { ScalarListbox as X, ScalarButton as T, ScalarIcon as P } from "@scalar/components";
9
9
  import { requestExampleParametersSchema as Y } from "@scalar/oas-utils/entities/spec";
10
10
  import { canMethodHaveBody as ce } from "@scalar/oas-utils/helpers";
11
11
  import G from "./RequestTable.vue.js";
@@ -23,13 +23,13 @@ const ve = {
23
23
  title: {}
24
24
  },
25
25
  setup(ye) {
26
- const { activeRequest: p, activeExample: o } = se(), { requestExampleMutators: i } = me(), Q = {
26
+ const { activeRequest: v, activeExample: o } = se(), { requestExampleMutators: i } = me(), Q = {
27
27
  json: "json",
28
28
  xml: "xml",
29
29
  yaml: "yaml",
30
30
  edn: "edn",
31
31
  other: "html"
32
- }, F = Object.entries({
32
+ }, k = Object.entries({
33
33
  multipartForm: "Multipart Form",
34
34
  formUrlEncoded: "Form URL Encoded",
35
35
  binaryFile: "Binary File",
@@ -42,13 +42,15 @@ const ve = {
42
42
  }).map(([e, a]) => ({
43
43
  id: e,
44
44
  label: a
45
- })), E = w(() => {
46
- var e, a;
47
- return o.value ? o.value.body.activeBody === "formData" ? ((e = o.value.body.formData) == null ? void 0 : e.encoding) === "urlencoded" ? "formUrlEncoded" : "multipartForm" : o.value.body.activeBody === "binary" ? "binaryFile" : o.value.body.activeBody === "raw" && ((a = o.value.body.raw) != null && a.encoding) ? o.value.body.raw.encoding === "html" ? "other" : o.value.body.raw.encoding : "none" : "none";
45
+ })), U = w(() => {
46
+ var a, t, n, l;
47
+ return o.value ? o.value.body.activeBody === "formData" ? ((a = o.value.body.formData) == null ? void 0 : a.encoding) === "urlencoded" ? "formUrlEncoded" : "multipartForm" : o.value.body.activeBody === "binary" ? "binaryFile" : o.value.body.activeBody === "raw" && ((t = o.value.body.raw) != null && t.encoding) ? o.value.body.raw.encoding === "html" ? "other" : o.value.body.raw.encoding : Object.keys(
48
+ ((l = (n = v.value) == null ? void 0 : n.requestBody) == null ? void 0 : l.content) || {}
49
+ )[0] || "none" : "none";
48
50
  }), y = w({
49
- get: () => F.find(
50
- (e) => e.id === E.value
51
- ) ?? F[F.length - 1],
51
+ get: () => k.find(
52
+ (e) => e.id === U.value
53
+ ) ?? k[k.length - 1] ?? k[0],
52
54
  set: (e) => {
53
55
  e != null && e.id && W(e.id);
54
56
  }
@@ -60,19 +62,19 @@ const ve = {
60
62
  function N() {
61
63
  console.log("deleteRow");
62
64
  }
63
- const S = (e, a, t) => {
64
- var n, r, s, u, d, h, B;
65
- if (!p.value || !o.value) return;
66
- const l = b.value;
67
- if (l.length > e) {
68
- const c = [...l];
65
+ const j = (e, a, t) => {
66
+ var l, r, s, u, d, h, D;
67
+ if (!v.value || !o.value) return;
68
+ const n = b.value;
69
+ if (n.length > e) {
70
+ const c = [...n];
69
71
  c[e] = {
70
72
  ...c[e],
71
- value: ((n = c[e]) == null ? void 0 : n.value) || "",
73
+ value: ((l = c[e]) == null ? void 0 : l.value) || "",
72
74
  key: ((r = c[e]) == null ? void 0 : r.key) || "",
73
75
  enabled: ((s = c[e]) == null ? void 0 : s.enabled) ?? !1,
74
76
  [a]: t || ""
75
- }, (((u = c[e]) == null ? void 0 : u.key) !== "" || ((d = c[e]) == null ? void 0 : d.value) !== "") && (c[e].enabled = !0), ((h = c[e]) == null ? void 0 : h.key) === "" && ((B = c[e]) == null ? void 0 : B.value) === "" && c.splice(e, 1), i.edit(
77
+ }, (((u = c[e]) == null ? void 0 : u.key) !== "" || ((d = c[e]) == null ? void 0 : d.value) !== "") && (c[e].enabled = !0), ((h = c[e]) == null ? void 0 : h.key) === "" && ((D = c[e]) == null ? void 0 : D.value) === "" && c.splice(e, 1), i.edit(
76
78
  o.value.uid,
77
79
  "body.formData.value",
78
80
  c
@@ -83,23 +85,23 @@ const ve = {
83
85
  o.value.uid,
84
86
  "body.formData.value",
85
87
  c
86
- ), ne(() => {
88
+ ), le(() => {
87
89
  var A;
88
90
  if (!R.value) return;
89
91
  (A = R.value.querySelectorAll("input")[a === "key" ? 0 : 1]) == null || A.focus();
90
92
  });
91
93
  }
92
- e === l.length - 1 && O();
94
+ e === n.length - 1 && S();
93
95
  }, b = w(
94
96
  () => {
95
97
  var e, a, t;
96
98
  return ((t = (a = (e = o.value) == null ? void 0 : e.body) == null ? void 0 : a.formData) == null ? void 0 : t.value) ?? [];
97
99
  }
98
- ), j = () => {
100
+ ), O = () => {
99
101
  const e = b.value[b.value.length - 1];
100
- (!e || e.key !== "" || e.value !== "") && O();
101
- }, O = () => {
102
- if (!p.value || !o.value) return;
102
+ (!e || e.key !== "" || e.value !== "") && S();
103
+ }, S = () => {
104
+ if (!v.value || !o.value) return;
103
105
  const e = Y.parse({
104
106
  enabled: !1
105
107
  }), a = [...b.value, e];
@@ -112,18 +114,18 @@ const ve = {
112
114
  encoding: "form-data"
113
115
  });
114
116
  }, q = (e, a) => {
115
- if (!p.value || !o.value) return;
117
+ if (!v.value || !o.value) return;
116
118
  const t = b.value;
117
119
  if (t.length > e) {
118
- const l = [...t];
119
- l[e] && (l[e].enabled = a), i.edit(
120
+ const n = [...t];
121
+ n[e] && (n[e].enabled = a), i.edit(
120
122
  o.value.uid,
121
123
  "body.formData.value",
122
- l
124
+ n
123
125
  );
124
126
  }
125
127
  }, L = (e) => {
126
- !p.value || !o.value || i.edit(o.value.uid, "body.raw.value", e);
128
+ !v.value || !o.value || i.edit(o.value.uid, "body.raw.value", e);
127
129
  }, M = (e) => e === "multipartForm" ? {
128
130
  activeBody: "formData",
129
131
  encoding: "form-data",
@@ -159,7 +161,7 @@ const ve = {
159
161
  } : { activeBody: "raw", encoding: void 0, header: void 0 }, W = (e) => {
160
162
  var s, u;
161
163
  if (!o.value) return;
162
- const { activeBody: a, encoding: t, header: l } = M(e);
164
+ const { activeBody: a, encoding: t, header: n } = M(e);
163
165
  if (i.edit(
164
166
  o.value.uid,
165
167
  "body.activeBody",
@@ -178,40 +180,40 @@ const ve = {
178
180
  const { raw: d, ...h } = o.value.body;
179
181
  i.edit(o.value.uid, "body", h);
180
182
  }
181
- const n = [...o.value.parameters.headers], r = n.findIndex(
183
+ const l = [...o.value.parameters.headers], r = l.findIndex(
182
184
  (d) => d.key.toLowerCase() === "content-type"
183
185
  );
184
186
  if (r >= 0)
185
- l && n[r] ? n[r].value = l : n[r] && n.splice(r, 1);
186
- else if (l) {
187
- const d = n[n.length - 1];
188
- d && d.key === "" && d.value === "" ? n.splice(n.length - 1, 0, {
187
+ n && l[r] ? l[r].value = n : l[r] && l.splice(r, 1);
188
+ else if (n) {
189
+ const d = l[l.length - 1];
190
+ d && d.key === "" && d.value === "" ? l.splice(l.length - 1, 0, {
189
191
  key: "Content-Type",
190
- value: l,
192
+ value: n,
191
193
  enabled: !0
192
- }) : n.push({
194
+ }) : l.push({
193
195
  key: "Content-Type",
194
- value: l,
196
+ value: n,
195
197
  enabled: !0
196
198
  });
197
199
  }
198
200
  i.edit(
199
201
  o.value.uid,
200
202
  "parameters.headers",
201
- n
203
+ l
202
204
  );
203
205
  }, z = async (e) => {
204
206
  const { open: a } = K({
205
207
  onChange: async (t) => {
206
- var n, r;
207
- const l = t == null ? void 0 : t[0];
208
- if (l && p.value && o.value) {
208
+ var l, r;
209
+ const n = t == null ? void 0 : t[0];
210
+ if (n && v.value && o.value) {
209
211
  const u = [...b.value];
210
212
  u[e] = {
211
213
  ...u[e],
212
- file: l,
213
- value: ((n = u[e]) == null ? void 0 : n.value) || l.name,
214
- key: ((r = u[e]) == null ? void 0 : r.key) || l.name,
214
+ file: n,
215
+ value: ((l = u[e]) == null ? void 0 : l.value) || n.name,
216
+ key: ((r = u[e]) == null ? void 0 : r.key) || n.name,
215
217
  enabled: !0
216
218
  }, i.edit(
217
219
  o.value.uid,
@@ -226,10 +228,10 @@ const ve = {
226
228
  a();
227
229
  };
228
230
  function I() {
229
- !p.value || !o.value || i.edit(o.value.uid, "body.binary", void 0);
231
+ !v.value || !o.value || i.edit(o.value.uid, "body.binary", void 0);
230
232
  }
231
233
  function J(e) {
232
- if (!p.value || !o.value) return;
234
+ if (!v.value || !o.value) return;
233
235
  const t = [...b.value];
234
236
  t[e] = {
235
237
  ...t[e],
@@ -247,7 +249,7 @@ const ve = {
247
249
  const { open: e } = K({
248
250
  onChange: async (a) => {
249
251
  const t = a == null ? void 0 : a[0];
250
- t && p.value && o.value && i.edit(
252
+ t && v.value && o.value && i.edit(
251
253
  o.value.uid,
252
254
  "body.binary",
253
255
  t
@@ -261,7 +263,7 @@ const ve = {
261
263
  $(
262
264
  y,
263
265
  (e) => {
264
- ["multipartForm", "formUrlEncoded"].includes((e == null ? void 0 : e.id) || "") && j();
266
+ ["multipartForm", "formUrlEncoded"].includes((e == null ? void 0 : e.id) || "") && O();
265
267
  },
266
268
  { immediate: !0 }
267
269
  ), $(
@@ -271,32 +273,32 @@ const ve = {
271
273
  },
272
274
  () => {
273
275
  var e;
274
- (e = p.value) != null && e.method && ce(p.value.method) && W(E.value), ["multipartForm", "formUrlEncoded"].includes(
275
- E.value
276
- ) && j();
276
+ (e = v.value) != null && e.method && ce(v.value.method) && W(U.value), ["multipartForm", "formUrlEncoded"].includes(
277
+ U.value
278
+ ) && O();
277
279
  },
278
280
  { immediate: !0 }
279
281
  );
280
- const k = w(() => {
281
- var n, r, s, u;
282
- const e = (n = y.value) == null ? void 0 : n.id, { header: a } = M(e), t = ((s = (r = p.value) == null ? void 0 : r.requestBody) == null ? void 0 : s.content) || {}, l = a ? ((u = t[a]) == null ? void 0 : u.examples) || {} : {};
283
- return Object.entries(l).map(([d, h]) => ({
282
+ const B = w(() => {
283
+ var l, r, s, u;
284
+ const e = (l = y.value) == null ? void 0 : l.id, { header: a } = M(e), t = ((s = (r = v.value) == null ? void 0 : r.requestBody) == null ? void 0 : s.content) || {}, n = a ? ((u = t[a]) == null ? void 0 : u.examples) || {} : {};
285
+ return Object.entries(n).map(([d, h]) => ({
284
286
  id: d,
285
287
  label: d,
286
288
  value: h
287
289
  }));
288
- }), T = w({
290
+ }), E = w({
289
291
  get: () => {
290
- var l, n;
291
- const e = ((n = (l = o.value) == null ? void 0 : l.body.raw) == null ? void 0 : n.value) ?? "{}", a = JSON.parse(e);
292
- return k.value.find((r) => {
292
+ var n, l;
293
+ const e = ((l = (n = o.value) == null ? void 0 : n.body.raw) == null ? void 0 : l.value) ?? "{}", a = JSON.parse(e);
294
+ return B.value.find((r) => {
293
295
  const s = r.value;
294
296
  return JSON.stringify(s.value) === JSON.stringify(a);
295
- }) ?? k.value[0];
297
+ }) ?? B.value[0];
296
298
  },
297
299
  set: (e) => {
298
300
  if (e != null && e.id) {
299
- const a = k.value.find(
301
+ const a = B.value.find(
300
302
  (t) => t.id === e.id
301
303
  );
302
304
  if (a) {
@@ -307,33 +309,33 @@ const ve = {
307
309
  }
308
310
  });
309
311
  return (e, a) => (g(), x(de, null, {
310
- title: v(() => [
312
+ title: f(() => [
311
313
  H(_(e.title), 1)
312
314
  ]),
313
- default: v(() => [
314
- f(ue, { columns: [""] }, {
315
- default: v(() => [
316
- f(C, null, {
317
- default: v(() => [
318
- f(ie, { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between !p-0" }, {
319
- default: v(() => [
320
- f(m(X), {
315
+ default: f(() => [
316
+ p(ue, { columns: [""] }, {
317
+ default: f(() => [
318
+ p(C, null, {
319
+ default: f(() => [
320
+ p(ie, { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between !p-0" }, {
321
+ default: f(() => [
322
+ p(m(X), {
321
323
  modelValue: y.value,
322
324
  "onUpdate:modelValue": a[0] || (a[0] = (t) => y.value = t),
323
- options: m(F),
325
+ options: m(k),
324
326
  teleport: ""
325
327
  }, {
326
- default: v(() => [
327
- f(m(U), {
328
+ default: f(() => [
329
+ p(m(T), {
328
330
  class: "flex gap-1.5 h-full px-3 text-c-2 font-normal hover:text-c-1 w-fit",
329
331
  fullWidth: "",
330
332
  variant: "ghost"
331
333
  }, {
332
- default: v(() => {
334
+ default: f(() => {
333
335
  var t;
334
336
  return [
335
- D("span", null, _((t = y.value) == null ? void 0 : t.label), 1),
336
- f(m(P), {
337
+ F("span", null, _((t = y.value) == null ? void 0 : t.label), 1),
338
+ p(m(P), {
337
339
  icon: "ChevronDown",
338
340
  size: "md"
339
341
  })
@@ -344,25 +346,25 @@ const ve = {
344
346
  ]),
345
347
  _: 1
346
348
  }, 8, ["modelValue", "options"]),
347
- k.value.length > 0 ? (g(), x(m(X), {
349
+ B.value.length > 0 ? (g(), x(m(X), {
348
350
  key: 0,
349
- modelValue: T.value,
350
- "onUpdate:modelValue": a[1] || (a[1] = (t) => T.value = t),
351
- options: k.value,
351
+ modelValue: E.value,
352
+ "onUpdate:modelValue": a[1] || (a[1] = (t) => E.value = t),
353
+ options: B.value,
352
354
  side: "left",
353
355
  teleport: ""
354
356
  }, {
355
- default: v(() => [
356
- f(m(U), {
357
+ default: f(() => [
358
+ p(m(T), {
357
359
  class: "flex gap-1.5 h-full px-2 text-c-2 font-normal hover:text-c-1 w-fit",
358
360
  fullWidth: "",
359
361
  variant: "ghost"
360
362
  }, {
361
- default: v(() => {
363
+ default: f(() => {
362
364
  var t;
363
365
  return [
364
- D("span", null, _((t = T.value) == null ? void 0 : t.label), 1),
365
- f(m(P), {
366
+ F("span", null, _((t = E.value) == null ? void 0 : t.label), 1),
367
+ p(m(P), {
366
368
  icon: "ChevronDown",
367
369
  size: "md"
368
370
  })
@@ -379,36 +381,36 @@ const ve = {
379
381
  ]),
380
382
  _: 1
381
383
  }),
382
- f(C, null, {
383
- default: v(() => {
384
- var t, l, n, r, s, u, d, h, B;
384
+ p(C, null, {
385
+ default: f(() => {
386
+ var t, n, l, r, s, u, d, h, D;
385
387
  return [
386
388
  ((t = y.value) == null ? void 0 : t.id) === "none" ? (g(), V("div", ve, a[2] || (a[2] = [
387
- D("span", null, "No Body", -1)
388
- ]))) : ((l = y.value) == null ? void 0 : l.id) === "binaryFile" ? (g(), V("div", fe, [
389
- (n = m(o)) != null && n.body.binary ? (g(), V(le, { key: 0 }, [
390
- D("span", pe, _(((r = m(o)) == null ? void 0 : r.body.binary).name), 1),
391
- f(m(U), {
389
+ F("span", null, "No Body", -1)
390
+ ]))) : ((n = y.value) == null ? void 0 : n.id) === "binaryFile" ? (g(), V("div", fe, [
391
+ (l = m(o)) != null && l.body.binary ? (g(), V(ne, { key: 0 }, [
392
+ F("span", pe, _(((r = m(o)) == null ? void 0 : r.body.binary).name), 1),
393
+ p(m(T), {
392
394
  class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1 shadow-none",
393
395
  size: "sm",
394
396
  variant: "outlined",
395
397
  onClick: I
396
398
  }, {
397
- default: v(() => a[3] || (a[3] = [
399
+ default: f(() => a[3] || (a[3] = [
398
400
  H(" Delete ")
399
401
  ])),
400
402
  _: 1
401
403
  })
402
- ], 64)) : (g(), x(m(U), {
404
+ ], 64)) : (g(), x(m(T), {
403
405
  key: 1,
404
406
  class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 shadow-none",
405
407
  size: "sm",
406
408
  variant: "outlined",
407
409
  onClick: ee
408
410
  }, {
409
- default: v(() => [
410
- a[4] || (a[4] = D("span", null, "Upload File", -1)),
411
- f(m(P), {
411
+ default: f(() => [
412
+ a[4] || (a[4] = F("span", null, "Upload File", -1)),
413
+ p(m(P), {
412
414
  class: "ml-1",
413
415
  icon: "UploadSimple",
414
416
  size: "xs",
@@ -428,7 +430,7 @@ const ve = {
428
430
  onDeleteRow: N,
429
431
  onRemoveFile: J,
430
432
  onToggleRow: q,
431
- onUpdateRow: S,
433
+ onUpdateRow: j,
432
434
  onUploadFile: z
433
435
  }, null, 8, ["items"])) : ((u = y.value) == null ? void 0 : u.id) == "formUrlEncoded" ? (g(), x(G, {
434
436
  key: 3,
@@ -441,7 +443,7 @@ const ve = {
441
443
  onDeleteRow: N,
442
444
  onRemoveFile: J,
443
445
  onToggleRow: q,
444
- onUpdateRow: S,
446
+ onUpdateRow: j,
445
447
  onUploadFile: z
446
448
  }, null, 8, ["items"])) : (g(), x(re, {
447
449
  key: 4,
@@ -450,14 +452,14 @@ const ve = {
450
452
  language: Z.value,
451
453
  lineNumbers: "",
452
454
  lint: "",
453
- modelValue: ((B = (h = (d = m(o)) == null ? void 0 : d.body) == null ? void 0 : h.raw) == null ? void 0 : B.value) ?? "",
455
+ modelValue: ((D = (h = (d = m(o)) == null ? void 0 : d.body) == null ? void 0 : h.raw) == null ? void 0 : D.value) ?? "",
454
456
  "onUpdate:modelValue": L
455
457
  }, null, 8, ["language", "modelValue"]))
456
458
  ];
457
459
  }),
458
460
  _: 1
459
461
  }),
460
- f(C)
462
+ p(C)
461
463
  ]),
462
464
  _: 1
463
465
  })
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
2
+ export default _default;
3
+ //# sourceMappingURL=RequestCodeExample.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":";AAsbA,wBAMG"}
@@ -0,0 +1,7 @@
1
+ import o from "./RequestCodeExample.vue2.js";
2
+ /* empty css */
3
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-54e084d9"]]);
5
+ export {
6
+ r as default
7
+ };
@@ -0,0 +1,141 @@
1
+ import { defineComponent as S, computed as a, openBlock as w, createElementBlock as $, createVNode as s, withCtx as i, createTextVNode as g, createElementVNode as u, unref as c, toDisplayString as k } from "vue";
2
+ import K from "../../../components/DataTable/DataTable.vue.js";
3
+ import V from "../../../components/DataTable/DataTableRow.vue.js";
4
+ import E from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
5
+ import { useActiveEntities as H } from "../../../store/active-entities.js";
6
+ import { ScalarCombobox as R, ScalarButton as j, ScalarIcon as q } from "@scalar/components";
7
+ import { snippetz as B } from "@scalar/snippetz";
8
+ import { filterSecurityRequirements as D } from "./helpers/filter-security-requirements.js";
9
+ import N from "../../Components/CodeSnippet/CodeSnippet.vue.js";
10
+ import { useWorkspace as T } from "../../../store/store.js";
11
+ const U = { class: "w-full" }, W = { class: "flex flex-1 -mx-1" }, z = { class: "bg-b-1 border-t flex items-center justify-center overflow-hidden" }, Y = /* @__PURE__ */ S({
12
+ __name: "RequestCodeExample",
13
+ setup(I) {
14
+ const {
15
+ activeRequest: m,
16
+ activeExample: f,
17
+ activeServer: v,
18
+ activeCollection: p,
19
+ activeWorkspace: n
20
+ } = H(), { securitySchemes: _, workspaceMutators: y } = T(), h = a(
21
+ () => {
22
+ var e, t, l;
23
+ return D(
24
+ ((e = m.value) == null ? void 0 : e.security) || ((t = p.value) == null ? void 0 : t.security) || [],
25
+ (l = p.value) == null ? void 0 : l.selectedSecuritySchemeUids,
26
+ _
27
+ );
28
+ }
29
+ ), r = a(() => {
30
+ const e = {};
31
+ return {
32
+ options: B().clients().map((l) => ({
33
+ label: l.title,
34
+ options: l.clients.map((o) => (e[`${l.key},${o.client}`] = o.title, {
35
+ id: `${l.key},${o.client}`,
36
+ label: o.title
37
+ }))
38
+ })),
39
+ dict: e
40
+ };
41
+ }), d = a(() => {
42
+ var l, o;
43
+ const e = (l = n.value) == null ? void 0 : l.selectedHttpClient;
44
+ if (!e)
45
+ return ((o = r.value.options[0]) == null ? void 0 : o.options[0]) ?? {
46
+ id: "js,fetch",
47
+ label: "Fetch"
48
+ };
49
+ const t = `${e.targetKey},${e.clientKey}`;
50
+ return {
51
+ id: t,
52
+ label: r.value.dict[t] ?? "Unknown"
53
+ };
54
+ }), x = a(
55
+ () => {
56
+ var e, t;
57
+ return ((t = (e = n.value) == null ? void 0 : e.selectedHttpClient) == null ? void 0 : t.targetKey) ?? "js";
58
+ }
59
+ ), b = a(
60
+ () => {
61
+ var e, t;
62
+ return ((t = (e = n.value) == null ? void 0 : e.selectedHttpClient) == null ? void 0 : t.clientKey) ?? "fetch";
63
+ }
64
+ ), C = ({ id: e }) => {
65
+ const [t, l] = e.split(",");
66
+ !n.value || !t || !l || y.edit(n.value.uid, "selectedHttpClient", {
67
+ targetKey: t,
68
+ clientKey: l
69
+ });
70
+ };
71
+ return (e, t) => (w(), $("div", U, [
72
+ s(E, {
73
+ class: "group/preview -mt-0.25 w-full",
74
+ defaultOpen: !1,
75
+ hasIcon: !1
76
+ }, {
77
+ title: i(() => t[0] || (t[0] = [
78
+ g("Code Snippet")
79
+ ])),
80
+ actions: i(() => [
81
+ u("div", W, [
82
+ s(c(R), {
83
+ modelValue: d.value,
84
+ options: r.value.options,
85
+ placement: "bottom-end",
86
+ "onUpdate:modelValue": C
87
+ }, {
88
+ default: i(() => [
89
+ s(c(j), {
90
+ class: "flex gap-1.5 h-full px-1.5 py-0.75 font-normal text-c-1 w-fit hover:bg-b-3",
91
+ fullWidth: "",
92
+ variant: "ghost"
93
+ }, {
94
+ default: i(() => {
95
+ var l;
96
+ return [
97
+ u("span", null, k((l = d.value) == null ? void 0 : l.label), 1),
98
+ s(c(q), {
99
+ icon: "ChevronDown",
100
+ size: "md"
101
+ })
102
+ ];
103
+ }),
104
+ _: 1
105
+ })
106
+ ]),
107
+ _: 1
108
+ }, 8, ["modelValue", "options"])
109
+ ])
110
+ ]),
111
+ default: i(() => [
112
+ s(K, { columns: [""] }, {
113
+ default: i(() => [
114
+ s(V, null, {
115
+ default: i(() => [
116
+ u("div", z, [
117
+ s(c(N), {
118
+ class: "px-3 py-1.5",
119
+ client: b.value,
120
+ example: c(f),
121
+ operation: c(m),
122
+ securitySchemes: h.value,
123
+ server: c(v),
124
+ target: x.value
125
+ }, null, 8, ["client", "example", "operation", "securitySchemes", "server", "target"])
126
+ ])
127
+ ]),
128
+ _: 1
129
+ })
130
+ ]),
131
+ _: 1
132
+ })
133
+ ]),
134
+ _: 1
135
+ })
136
+ ]));
137
+ }
138
+ });
139
+ export {
140
+ Y as default
141
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AAqOA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;CACJ,CAAC;;AAwVF,wBAOG"}
1
+ {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AAsOA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;CACJ,CAAC;;AA8VF,wBAOG"}