@scalar/api-client 2.0.64 → 2.1.0

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 (326) hide show
  1. package/CHANGELOG.md +44 -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 +64 -62
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +77 -69
  7. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  8. package/dist/components/AddressBar/AddressBarServer.vue.js +121 -0
  9. package/dist/components/AddressBar/AddressBarServer.vue2.js +4 -0
  10. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts +22 -0
  11. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -0
  12. package/dist/components/AddressBar/AddressBarServerItem.vue.js +57 -0
  13. package/dist/components/AddressBar/AddressBarServerItem.vue2.js +4 -0
  14. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -6
  15. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  16. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  17. package/dist/components/CodeInput/CodeInput.vue2.js +87 -82
  18. package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
  19. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  20. package/dist/components/CodeInput/codeVariableWidget.js +70 -63
  21. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +33 -0
  22. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -0
  23. package/dist/components/CommandPalette/CommandActionForm.vue.js +41 -0
  24. package/dist/components/CommandPalette/CommandActionForm.vue2.js +4 -0
  25. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +20 -0
  26. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -0
  27. package/dist/components/CommandPalette/CommandActionInput.vue.js +42 -0
  28. package/dist/components/CommandPalette/CommandActionInput.vue2.js +4 -0
  29. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  30. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +33 -56
  31. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  32. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +88 -109
  33. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  34. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -73
  35. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +21 -2
  36. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  37. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +122 -133
  38. package/dist/components/CommandPalette/{CommandPaletteFolder.vue.d.ts → CommandPaletteServer.vue.d.ts} +1 -1
  39. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -0
  40. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +92 -0
  41. package/dist/components/CommandPalette/CommandPaletteServer.vue2.js +4 -0
  42. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +7 -0
  43. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -0
  44. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +87 -0
  45. package/dist/components/CommandPalette/CommandPaletteTag.vue2.js +4 -0
  46. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
  47. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +33 -49
  48. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +22 -3
  49. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  50. package/dist/components/CommandPalette/TheCommandPalette.vue.js +3 -3
  51. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +107 -101
  52. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  53. package/dist/components/ContextBar.vue.js +2 -2
  54. package/dist/components/ContextBar.vue2.js +2 -2
  55. package/dist/components/DataTable/DataTable.vue.js +1 -1
  56. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  57. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  58. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  59. package/dist/components/DataTable/DataTableInput.vue2.js +13 -13
  60. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  61. package/dist/components/DataTable/DataTableInputSelect.vue.js +39 -40
  62. package/dist/components/DataTable/index.js +12 -12
  63. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +7 -7
  64. package/dist/components/Form/Form.vue.js +1 -1
  65. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  66. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  67. package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
  68. package/dist/components/HttpMethod/HttpMethod.vue2.js +30 -30
  69. package/dist/components/HttpMethod/helpers.d.ts +4 -0
  70. package/dist/components/HttpMethod/helpers.d.ts.map +1 -0
  71. package/dist/components/HttpMethod/helpers.js +5 -0
  72. package/dist/components/HttpMethod/index.d.ts +1 -0
  73. package/dist/components/HttpMethod/index.d.ts.map +1 -1
  74. package/dist/components/HttpMethod/index.js +4 -2
  75. package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
  76. package/dist/components/Search/SearchModal.vue.js +2 -2
  77. package/dist/components/Search/SearchModal.vue2.js +29 -27
  78. package/dist/components/Search/useSearch.js +35 -35
  79. package/dist/components/SideNav/SideNavLink.vue.js +6 -6
  80. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
  81. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +14 -17
  82. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.d.ts +22 -0
  83. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.d.ts.map +1 -0
  84. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.js +29 -0
  85. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue2.js +4 -0
  86. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  87. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
  88. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +38 -35
  89. package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -1
  90. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  91. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  92. package/dist/components/Sidebar/Sidebar.vue2.js +37 -34
  93. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  94. package/dist/components/Sidebar/SidebarButton.vue.js +11 -11
  95. package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
  96. package/dist/components/SubpageHeader.vue.js +3 -3
  97. package/dist/components/SubpageHeader.vue2.js +3 -3
  98. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  99. package/dist/components/TopNav/TopNav.vue.js +2 -2
  100. package/dist/components/TopNav/TopNav.vue2.js +23 -23
  101. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  102. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  103. package/dist/components/TopNav/TopNavItem.vue2.js +21 -21
  104. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  105. package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
  106. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  107. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +5 -5
  108. package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
  109. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +4 -4
  110. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  111. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
  112. package/dist/index.d.ts +1 -1
  113. package/dist/index.d.ts.map +1 -1
  114. package/dist/index.js +1 -1
  115. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  116. package/dist/layouts/App/ApiClientApp.vue.js +39 -53
  117. package/dist/layouts/App/create-api-client-app.d.ts +2058 -1941
  118. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  119. package/dist/layouts/App/create-api-client-app.js +12 -12
  120. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  121. package/dist/layouts/Modal/ApiClientModal.vue2.js +6 -6
  122. package/dist/layouts/Modal/create-api-client-modal.d.ts +4590 -4356
  123. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  124. package/dist/layouts/Modal/create-api-client-modal.js +18 -23
  125. package/dist/libs/create-client.d.ts +2086 -1972
  126. package/dist/libs/create-client.d.ts.map +1 -1
  127. package/dist/libs/create-client.js +85 -76
  128. package/dist/libs/environment-parser.d.ts +9 -0
  129. package/dist/libs/environment-parser.d.ts.map +1 -0
  130. package/dist/libs/environment-parser.js +17 -0
  131. package/dist/libs/errors.d.ts +21 -0
  132. package/dist/libs/errors.d.ts.map +1 -0
  133. package/dist/libs/errors.js +14 -0
  134. package/dist/libs/event-busses/command-palette-bus.d.ts +1 -1
  135. package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -1
  136. package/dist/libs/event-busses/hot-keys-bus.d.ts +4 -4
  137. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
  138. package/dist/libs/event-busses/hot-keys-bus.js +17 -19
  139. package/dist/libs/index.d.ts +5 -2
  140. package/dist/libs/index.d.ts.map +1 -1
  141. package/dist/libs/index.js +31 -24
  142. package/dist/libs/local-storage.d.ts +3 -3
  143. package/dist/libs/local-storage.d.ts.map +1 -1
  144. package/dist/libs/local-storage.js +24 -12
  145. package/dist/libs/normalize-headers.d.ts +14 -0
  146. package/dist/libs/normalize-headers.d.ts.map +1 -0
  147. package/dist/libs/normalize-headers.js +32 -0
  148. package/dist/libs/send-request.d.ts +28 -0
  149. package/dist/libs/send-request.d.ts.map +1 -0
  150. package/dist/libs/send-request.js +186 -0
  151. package/dist/libs/string-template.d.ts +19 -0
  152. package/dist/libs/string-template.d.ts.map +1 -0
  153. package/dist/libs/string-template.js +30 -0
  154. package/dist/router.d.ts +5 -0
  155. package/dist/router.d.ts.map +1 -1
  156. package/dist/router.js +36 -27
  157. package/dist/store/collections.d.ts +705 -0
  158. package/dist/store/collections.d.ts.map +1 -0
  159. package/dist/store/collections.js +63 -0
  160. package/dist/store/cookies.d.ts +135 -0
  161. package/dist/store/cookies.d.ts.map +1 -0
  162. package/dist/store/cookies.js +29 -0
  163. package/dist/store/environment.d.ts +80 -0
  164. package/dist/store/environment.d.ts.map +1 -0
  165. package/dist/store/environment.js +39 -0
  166. package/dist/store/import-spec.d.ts +8 -0
  167. package/dist/store/import-spec.d.ts.map +1 -0
  168. package/dist/store/import-spec.js +45 -0
  169. package/dist/store/index.d.ts +1 -1
  170. package/dist/store/index.d.ts.map +1 -1
  171. package/dist/store/index.js +1 -1
  172. package/dist/store/request-example.d.ts +1111 -0
  173. package/dist/store/request-example.d.ts.map +1 -0
  174. package/dist/store/request-example.js +47 -0
  175. package/dist/store/requests.d.ts +371 -0
  176. package/dist/store/requests.d.ts.map +1 -0
  177. package/dist/store/requests.js +107 -0
  178. package/dist/store/router-params.d.ts +15 -0
  179. package/dist/store/router-params.d.ts.map +1 -0
  180. package/dist/store/router-params.js +21 -0
  181. package/dist/store/security-schemes.d.ts +616 -0
  182. package/dist/store/security-schemes.d.ts.map +1 -0
  183. package/dist/store/security-schemes.js +68 -0
  184. package/dist/store/servers.d.ts +99 -0
  185. package/dist/store/servers.d.ts.map +1 -0
  186. package/dist/store/servers.js +46 -0
  187. package/dist/store/store-context.d.ts +29 -0
  188. package/dist/store/store-context.d.ts.map +1 -0
  189. package/dist/store/store.d.ts +7504 -0
  190. package/dist/store/store.d.ts.map +1 -0
  191. package/dist/store/store.js +200 -0
  192. package/dist/store/tags.d.ts +169 -0
  193. package/dist/store/tags.d.ts.map +1 -0
  194. package/dist/store/tags.js +57 -0
  195. package/dist/store/workspace.d.ts +93 -7150
  196. package/dist/store/workspace.d.ts.map +1 -1
  197. package/dist/store/workspace.js +49 -543
  198. package/dist/style.css +1 -1
  199. package/dist/views/Cookies/CookieForm.vue.js +2 -2
  200. package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
  201. package/dist/views/Cookies/CookieRaw.vue.js +10 -10
  202. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  203. package/dist/views/Cookies/Cookies.vue2.js +21 -23
  204. package/dist/views/Environment/Environment.vue2.js +27 -28
  205. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +11 -5
  206. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  207. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +79 -59
  208. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  209. package/dist/views/Request/Request.vue.js +2 -2
  210. package/dist/views/Request/Request.vue2.js +87 -318
  211. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +36 -0
  212. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -0
  213. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +59 -0
  214. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue2.js +4 -0
  215. package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuth2.vue.d.ts +3 -1
  216. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -0
  217. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +216 -0
  218. package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue.d.ts +2 -2
  219. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -0
  220. package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue.js +3 -3
  221. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
  222. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +7 -0
  223. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +183 -0
  224. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +30 -0
  225. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +1 -0
  226. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +3 -0
  227. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -0
  228. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +140 -0
  229. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +4 -0
  230. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  231. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  232. package/dist/views/Request/RequestSection/RequestBody.vue.js +167 -186
  233. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
  234. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  235. package/dist/views/Request/RequestSection/RequestParams.vue.js +49 -49
  236. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
  237. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  238. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +26 -22
  239. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  240. package/dist/views/Request/RequestSection/RequestSection.vue.js +103 -102
  241. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +5 -5
  242. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  243. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  244. package/dist/views/Request/RequestSection/RequestTable.vue2.js +1 -1
  245. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts +1 -1
  246. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  247. package/dist/views/Request/RequestSidebar.vue.d.ts +30 -0
  248. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -0
  249. package/dist/views/Request/RequestSidebar.vue.js +7 -0
  250. package/dist/views/Request/RequestSidebar.vue2.js +179 -0
  251. package/dist/views/Request/RequestSidebarItem.vue.d.ts +6 -7
  252. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  253. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  254. package/dist/views/Request/RequestSidebarItem.vue2.js +283 -254
  255. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -5
  256. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  257. package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
  258. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +9 -7
  259. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +24 -0
  260. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -0
  261. package/dist/views/Request/RequestSubpageHeader.vue.js +7 -0
  262. package/dist/views/Request/RequestSubpageHeader.vue2.js +48 -0
  263. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  264. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
  265. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  266. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +3 -3
  267. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +17 -16
  268. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  269. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  270. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +37 -30
  271. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts +1 -1
  272. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  273. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
  274. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  275. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
  276. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  277. package/dist/views/Request/components/WorkspaceDropdown.vue.js +69 -90
  278. package/dist/views/Request/components/index.d.ts +0 -1
  279. package/dist/views/Request/components/index.d.ts.map +1 -1
  280. package/dist/views/Request/components/index.js +2 -4
  281. package/dist/views/Request/consts/new-auth-options.d.ts +11 -1
  282. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  283. package/dist/views/Request/consts/new-auth-options.js +17 -7
  284. package/dist/views/Request/handle-drag.d.ts +8 -0
  285. package/dist/views/Request/handle-drag.d.ts.map +1 -0
  286. package/dist/views/Request/handle-drag.js +56 -0
  287. package/dist/views/Request/libs/auth.d.ts +35 -0
  288. package/dist/views/Request/libs/auth.d.ts.map +1 -0
  289. package/dist/views/Request/libs/auth.js +14 -0
  290. package/dist/views/Request/libs/index.d.ts +1 -0
  291. package/dist/views/Request/libs/index.d.ts.map +1 -1
  292. package/dist/views/Request/libs/index.js +7 -3
  293. package/dist/views/Request/libs/oauth2.d.ts +12 -3
  294. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  295. package/dist/views/Request/libs/oauth2.js +42 -27
  296. package/dist/views/Servers/ServerForm.vue.js +22 -22
  297. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  298. package/dist/views/Servers/Servers.vue2.js +17 -14
  299. package/package.json +9 -9
  300. package/dist/components/CodeInput/codeDropdownWidget.d.ts +0 -32
  301. package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +0 -1
  302. package/dist/components/CodeInput/codeDropdownWidget.js +0 -121
  303. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +0 -1
  304. package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +0 -106
  305. package/dist/components/CommandPalette/CommandPaletteFolder.vue2.js +0 -4
  306. package/dist/errors.d.ts +0 -5
  307. package/dist/errors.d.ts.map +0 -1
  308. package/dist/errors.js +0 -7
  309. package/dist/libs/normalizeHeaders.d.ts +0 -11
  310. package/dist/libs/normalizeHeaders.d.ts.map +0 -1
  311. package/dist/libs/normalizeHeaders.js +0 -25
  312. package/dist/libs/pathParams.d.ts +0 -10
  313. package/dist/libs/pathParams.d.ts.map +0 -1
  314. package/dist/libs/pathParams.js +0 -36
  315. package/dist/libs/sendRequest.d.ts +0 -14
  316. package/dist/libs/sendRequest.d.ts.map +0 -1
  317. package/dist/libs/sendRequest.js +0 -163
  318. package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +0 -1
  319. package/dist/views/Request/RequestSection/RequestAuth.vue.js +0 -7
  320. package/dist/views/Request/RequestSection/RequestAuth.vue2.js +0 -351
  321. package/dist/views/Request/components/OAuth2.vue.d.ts.map +0 -1
  322. package/dist/views/Request/components/OAuth2.vue.js +0 -208
  323. package/dist/views/Request/components/OAuthScopesInput.vue.d.ts.map +0 -1
  324. /package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuth2.vue2.js +0 -0
  325. /package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue2.js +0 -0
  326. /package/dist/views/Request/RequestSection/{RequestAuth.vue.d.ts → RequestAuth/RequestAuth.vue.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 88a4ec3: feat: releasing the api-client openapi compliant
8
+
9
+ ### Patch Changes
10
+
11
+ - b8fdc19: feat: foldable code blocks
12
+ - 18c58af: fix: request header style
13
+ - dd06d00: fix(api-client): path only urls in send-request
14
+ - 7e5dfbb: feat: server variables from examples
15
+ - 641c1ec: style: new modal layout
16
+ - b8fdc19: feat: favors useDropdown hook over dropdown widget
17
+ - 9d88423: feat: added one way auth sync from references to client
18
+ - 86e1f46: feat(api-client): fix up and polish command palette
19
+ - 44f3300: feat(api-client): disable sidebar resizing on small screens
20
+ - 7df5770: fix: sidebar width and long request content handling
21
+ - 9269f5a: fix: environment and cookie mutators
22
+ - 73f728e: chore: cherrypicking refactor branch for object utils changes
23
+ - b8fdc19: feat: adds create request button in request sidebar
24
+ - a002783: fix: command palette consistency and styles
25
+ - c030024: feat(api-client): track active workspace in local storage
26
+ - 6fd83dc: style: sets context bar back to previous position
27
+ - Updated dependencies [b8fdc19]
28
+ - Updated dependencies [7e5dfbb]
29
+ - Updated dependencies [b8fdc19]
30
+ - Updated dependencies [9d88423]
31
+ - Updated dependencies [674922f]
32
+ - Updated dependencies [a08aa37]
33
+ - Updated dependencies [e15b021]
34
+ - Updated dependencies [73f728e]
35
+ - Updated dependencies [ee22a82]
36
+ - Updated dependencies [9cd23e3]
37
+ - Updated dependencies [6fd83dc]
38
+ - Updated dependencies [121bc7e]
39
+ - @scalar/use-codemirror@0.11.11
40
+ - @scalar/oas-utils@0.2.44
41
+ - @scalar/openapi-parser@0.8.3
42
+ - @scalar/components@0.12.45
43
+ - @scalar/object-utils@1.1.8
44
+ - @scalar/themes@0.9.30
45
+ - @scalar/types@0.0.9
46
+
3
47
  ## 2.0.64
4
48
 
5
49
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";AAutBA,wBAKG"}
1
+ {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";AA6uBA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./AddressBar.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0989c8b5"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-44c3e67a"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -1,86 +1,87 @@
1
- import { defineComponent as L, ref as n, watch as O, onMounted as K, onBeforeUnmount as N, unref as l, openBlock as T, createElementBlock as A, createElementVNode as o, createVNode as u, withCtx as y, normalizeClass as B, normalizeStyle as $, createCommentVNode as D, pushScopeId as Q, popScopeId as W } from "vue";
2
- import j from "../CodeInput/CodeInput.vue.js";
3
- import { useWorkspace as F } from "../../store/workspace.js";
4
- import { Listbox as G } from "@headlessui/vue";
5
- import { ScalarButton as J, ScalarIcon as P } from "@scalar/components";
6
- import { REQUEST_METHODS as X } from "@scalar/oas-utils/helpers";
7
- import { isMacOS as Y } from "@scalar/use-tooltip";
8
- import { useMagicKeys as Z, whenever as ee } from "@vueuse/core";
9
- import te from "../HttpMethod/HttpMethod.vue.js";
10
- import le from "./AddressBarHistory.vue.js";
1
+ import { defineComponent as H, ref as i, watch as L, onMounted as O, onBeforeUnmount as K, unref as l, openBlock as N, createElementBlock as T, createElementVNode as o, createVNode as s, withCtx as w, normalizeClass as B, normalizeStyle as $, createCommentVNode as A, pushScopeId as D, popScopeId as P } from "vue";
2
+ import Q from "../CodeInput/CodeInput.vue.js";
3
+ import { Listbox as W } from "@headlessui/vue";
4
+ import { ScalarButton as j, ScalarIcon as F } from "@scalar/components";
5
+ import { REQUEST_METHODS as G } from "@scalar/oas-utils/helpers";
6
+ import { isMacOS as J } from "@scalar/use-tooltip";
7
+ import { useMagicKeys as X, whenever as Y } from "@vueuse/core";
8
+ import Z from "../HttpMethod/HttpMethod.vue.js";
9
+ import ee from "./AddressBarHistory.vue.js";
10
+ import te from "./AddressBarServer.vue.js";
11
11
  import { executeRequestBus as k } from "../../libs/event-busses/execute-request-bus.js";
12
+ import { useWorkspace as le } from "../../store/store.js";
12
13
  import { requestStatusBus as oe } from "../../libs/event-busses/request-status-bus.js";
13
- import { hotKeyBus as E } from "../../libs/event-busses/hot-keys-bus.js";
14
- const m = (c) => (Q("data-v-0989c8b5"), c = c(), W(), c), ae = {
14
+ import { hotKeyBus as S } from "../../libs/event-busses/hot-keys-bus.js";
15
+ const m = (c) => (D("data-v-44c3e67a"), c = c(), P(), c), ae = {
15
16
  key: 0,
16
17
  class: "order-last lg:order-none lg:w-auto w-full"
17
- }, re = { class: "m-auto flex basis-1/2 flex-row items-center" }, se = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, ne = { class: "flex gap-1" }, ue = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, ie = /* @__PURE__ */ m(() => /* @__PURE__ */ o("div", { class: "fade-left" }, null, -1)), de = /* @__PURE__ */ m(() => /* @__PURE__ */ o("div", { class: "fade-right" }, null, -1)), ce = /* @__PURE__ */ m(() => /* @__PURE__ */ o("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), Se = /* @__PURE__ */ L({
18
+ }, re = { class: "m-auto flex flex-row items-center" }, se = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, ne = { class: "flex gap-1" }, ie = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, ue = /* @__PURE__ */ m(() => /* @__PURE__ */ o("div", { class: "fade-left" }, null, -1)), de = /* @__PURE__ */ m(() => /* @__PURE__ */ o("div", { class: "fade-right" }, null, -1)), ce = /* @__PURE__ */ m(() => /* @__PURE__ */ o("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), qe = /* @__PURE__ */ H({
18
19
  __name: "AddressBar",
19
20
  setup(c) {
20
21
  const {
21
22
  activeRequest: t,
22
- activeExample: f,
23
+ activeExample: y,
23
24
  isReadOnly: v,
24
- requestMutators: p,
25
- requestExampleMutators: S,
26
- requestsHistory: q
27
- } = F(), h = n(q.value[0]), x = n(null), _ = Z();
28
- ee(
29
- Y() ? _.meta_enter : _.ctrl_enter,
25
+ requestMutators: f,
26
+ requestHistory: q
27
+ } = le(), p = i(q[0]), h = i(null), _ = X();
28
+ Y(
29
+ J() ? _.meta_enter : _.ctrl_enter,
30
30
  () => k.emit()
31
31
  );
32
32
  const C = (e) => {
33
- !t.value || t.value.path === e || p.edit(t.value.uid, "path", e);
33
+ !t.value || t.value.path === e || f.edit(t.value.uid, "path", e);
34
34
  };
35
- O(
35
+ L(
36
36
  () => {
37
37
  var e;
38
38
  return (e = t.value) == null ? void 0 : e.path;
39
39
  },
40
40
  (e) => {
41
- t.value && C(e);
41
+ !t.value || !e || C(e);
42
42
  }
43
43
  );
44
- const a = n(100), b = n(0), r = n(!1), s = n();
44
+ const a = i(100), x = i(0), r = i(!1), n = i();
45
+ function E() {
46
+ r.value ? a.value -= (a.value - 15) / 60 : a.value -= x.value / 20, a.value <= 0 && (clearInterval(n.value), n.value = void 0, a.value = 100, r.value = !1);
47
+ }
45
48
  function R() {
46
- r.value ? a.value -= (a.value - 15) / 60 : a.value -= b.value / 20, a.value <= 0 && (clearInterval(s.value), s.value = void 0, a.value = 100, r.value = !1);
49
+ n.value || (r.value = !0, n.value = setInterval(E, 20));
47
50
  }
48
51
  function I() {
49
- s.value || (r.value = !0, s.value = setInterval(R, 20));
52
+ x.value = a.value, r.value = !1;
50
53
  }
51
54
  function V() {
52
- b.value = a.value, r.value = !1;
53
- }
54
- function M() {
55
- clearInterval(s.value), s.value = void 0, a.value = 100, r.value = !1;
55
+ clearInterval(n.value), n.value = void 0, a.value = 100, r.value = !1;
56
56
  }
57
57
  oe.on((e) => {
58
- e === "start" && I(), e === "stop" && V(), e === "abort" && M();
58
+ e === "start" && R(), e === "stop" && I(), e === "abort" && V();
59
59
  });
60
60
  function z(e) {
61
- t.value && p.edit(t.value.uid, "method", e);
61
+ t.value && f.edit(t.value.uid, "method", e);
62
62
  }
63
- function U() {
63
+ function M() {
64
64
  if (!t.value) return;
65
65
  const { method: e } = t.value;
66
- return X[e].backgroundColor;
66
+ return G[e].backgroundColor;
67
67
  }
68
- function g() {
68
+ function b() {
69
69
  r.value || (r.value = !0, k.emit());
70
70
  }
71
- const H = (e) => {
72
- S.edit(f.value.uid, "url", e);
73
- }, w = (e) => {
74
- var i;
75
- e.focusAddressBar && ((i = x.value) == null || i.focus());
76
- };
77
- return K(() => E.on(w)), N(() => E.off(w)), (e, i) => l(t) && l(f) ? (T(), A("div", ae, [
71
+ function U(e) {
72
+ t.value && f.edit(t.value.uid, "path", e);
73
+ }
74
+ function g(e) {
75
+ var u;
76
+ e.focusAddressBar && ((u = h.value) == null || u.focus());
77
+ }
78
+ return O(() => S.on(g)), K(() => S.off(g)), (e, u) => l(t) && l(y) ? (N(), T("div", ae, [
78
79
  o("div", re, [
79
- u(l(G), {
80
- modelValue: h.value,
81
- "onUpdate:modelValue": i[0] || (i[0] = (d) => h.value = d)
80
+ s(l(W), {
81
+ modelValue: p.value,
82
+ "onUpdate:modelValue": u[0] || (u[0] = (d) => p.value = d)
82
83
  }, {
83
- default: y(({ open: d }) => [
84
+ default: w(({ open: d }) => [
84
85
  o("div", {
85
86
  class: B([
86
87
  "addressbar-bg-states text-xxs relative flex w-full lg:min-w-[720px] lg:max-w-[720px] order-last lg:order-none flex-1 flex-row items-stretch rounded-lg border-1/2 p-[3px]",
@@ -90,44 +91,45 @@ const m = (c) => (Q("data-v-0989c8b5"), c = c(), W(), c), ae = {
90
91
  }, [
91
92
  o("div", se, [
92
93
  o("div", {
93
- class: B(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 h-full w-full", U()]),
94
+ class: B(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 h-full w-full", M()]),
94
95
  style: $({ transform: `translate3d(-${a.value}%,0,0)` })
95
96
  }, null, 6)
96
97
  ]),
97
98
  o("div", ne, [
98
- u(te, {
99
+ s(Z, {
99
100
  isEditable: !l(v),
100
101
  isSquare: "",
101
102
  method: l(t).method,
102
103
  onChange: z
103
104
  }, null, 8, ["isEditable", "method"])
104
105
  ]),
105
- o("div", ue, [
106
- ie,
107
- u(j, {
106
+ o("div", ie, [
107
+ ue,
108
+ s(te),
109
+ s(Q, {
108
110
  ref_key: "addressBarRef",
109
- ref: x,
111
+ ref: h,
110
112
  disableCloseBrackets: "",
111
113
  disabled: l(v),
112
114
  disableEnter: "",
113
115
  disableTabIndent: "",
114
116
  emitOnBlur: !1,
115
- modelValue: l(f).url,
117
+ modelValue: l(t).path,
116
118
  placeholder: "Enter URL to get started",
117
119
  server: "",
118
- onSubmit: g,
119
- "onUpdate:modelValue": H
120
+ onSubmit: b,
121
+ "onUpdate:modelValue": U
120
122
  }, null, 8, ["disabled", "modelValue"]),
121
123
  de
122
124
  ]),
123
- u(le, { open: d }, null, 8, ["open"]),
124
- u(l(J), {
125
+ s(ee, { open: d }, null, 8, ["open"]),
126
+ s(l(j), {
125
127
  class: "relative h-auto shrink-0 gap-1 overflow-hidden pl-2 pr-2.5 py-1 z-[1] font-bold",
126
128
  disabled: r.value,
127
- onClick: g
129
+ onClick: b
128
130
  }, {
129
- default: y(() => [
130
- u(l(P), {
131
+ default: w(() => [
132
+ s(l(F), {
131
133
  class: "relative z-10 shrink-0 fill-current",
132
134
  icon: "Play",
133
135
  size: "xs"
@@ -141,9 +143,9 @@ const m = (c) => (Q("data-v-0989c8b5"), c = c(), W(), c), ae = {
141
143
  _: 1
142
144
  }, 8, ["modelValue"])
143
145
  ])
144
- ])) : D("", !0);
146
+ ])) : A("", !0);
145
147
  }
146
148
  });
147
149
  export {
148
- Se as default
150
+ qe as default
149
151
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":";UA0GQ,OAAO;;UAAP,OAAO;;AAmOf,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":";UAyHQ,OAAO;;UAAP,OAAO;;AA4Of,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,81 +1,89 @@
1
- import { defineComponent as C, computed as w, openBlock as n, createElementBlock as d, Fragment as m, unref as t, createBlock as i, withCtx as p, createVNode as f, createCommentVNode as h, createElementVNode as r, normalizeClass as b, renderList as U, toDisplayString as l } from "vue";
2
- import { formatMs as L } from "../../libs/formatters.js";
3
- import { useWorkspace as q } from "../../store/workspace.js";
4
- import { ListboxButton as y, ListboxOptions as B, ListboxOption as S } from "@headlessui/vue";
5
- import { ScalarIcon as H } from "@scalar/components";
6
- import { httpStatusCodes as P } from "@scalar/oas-utils/helpers";
7
- import { useRouter as R } from "vue-router";
8
- import z from "../HttpMethod/HttpMethod.vue.js";
9
- import { getStatusCodeColor as E } from "./httpStatusCodeColors.js";
10
- const M = { class: "min-w-0" }, N = { class: "min-w-0 truncate text-c-1" }, J = /* @__PURE__ */ C({
1
+ import { defineComponent as q, computed as w, openBlock as u, createElementBlock as b, Fragment as x, createBlock as i, unref as o, withCtx as p, createVNode as h, createCommentVNode as v, createElementVNode as r, normalizeClass as k, renderList as B, toDisplayString as a } from "vue";
2
+ import { formatMs as H } from "../../libs/formatters.js";
3
+ import { ListboxButton as y, ListboxOptions as L, ListboxOption as S } from "@headlessui/vue";
4
+ import { ScalarIcon as z } from "@scalar/components";
5
+ import { httpStatusCodes as E } from "@scalar/oas-utils/helpers";
6
+ import { useRouter as M } from "vue-router";
7
+ import N from "../HttpMethod/HttpMethod.vue.js";
8
+ import { getStatusCodeColor as U } from "./httpStatusCodeColors.js";
9
+ import { useWorkspace as V } from "../../store/store.js";
10
+ const $ = { class: "min-w-0" }, I = { class: "min-w-0 truncate text-c-1" }, P = /* @__PURE__ */ q({
11
11
  __name: "AddressBarHistory",
12
12
  props: {
13
13
  open: { type: Boolean }
14
14
  },
15
- setup(V) {
16
- const { activeRequest: u, requestExampleMutators: x } = q(), g = R(), v = w(() => u.value.history.slice().reverse());
17
- function _(o) {
18
- const c = new URL(o), s = new URLSearchParams(c.search).get("scalar_url");
19
- return s ? new URL(s).href : c.href;
15
+ setup(O) {
16
+ const { activeRequest: c, requestHistory: _, requestExampleMutators: g } = V(), d = M(), m = w(
17
+ () => _.filter((t) => {
18
+ var s;
19
+ return t.request.requestUid === ((s = c.value) == null ? void 0 : s.uid);
20
+ }).slice().reverse()
21
+ );
22
+ function C(t) {
23
+ var n;
24
+ const s = d.currentRoute.value.params.workspace;
25
+ ((n = c.value) == null ? void 0 : n.uid) !== t.request.requestUid && d.push(
26
+ `/workspace/${s}/request/${t.request.requestUid}`
27
+ ), g.set({ ...t.request });
20
28
  }
21
- function k(o) {
22
- u.value.uid !== o.request.requestUid && g.push(`/request/${o.request.requestUid}`), x.set({ ...o.request });
23
- }
24
- return (o, c) => (n(), d(m, null, [
25
- t(u).history.length ? (n(), i(t(y), {
26
- key: 0,
27
- class: "adressbar-history-button mr-1 rounded p-1.5 text-c-3 focus:text-c-1"
28
- }, {
29
- default: p(() => [
30
- f(t(H), {
31
- icon: "History",
32
- size: "sm",
33
- thickness: "2.25"
34
- })
35
- ]),
36
- _: 1
37
- })) : h("", !0),
38
- r("div", {
39
- class: b([
40
- "absolute left-0 top-[33px] w-full rounded before:pointer-events-none before:absolute before:left-0 before:top-[-33px] before:h-[calc(100%+33px)] before:w-full before:rounded z-50",
41
- { "before:shadow-lg": o.open }
42
- ])
43
- }, [
44
- f(t(B), { class: "bg-b-1 custom-scroll bg-mix-transparent bg-mix-amount-30 max-h-[300px] rounded-b p-[3px] pt-0 backdrop-blur grid grid-cols-[44px,1fr,repeat(3,auto)] items-center" }, {
29
+ return (t, s) => {
30
+ var n;
31
+ return u(), b(x, null, [
32
+ (n = m.value) != null && n.length ? (u(), i(o(y), {
33
+ key: 0,
34
+ class: "adressbar-history-button mr-1 rounded p-1.5 text-c-3 focus:text-c-1"
35
+ }, {
45
36
  default: p(() => [
46
- (n(!0), d(m, null, U(v.value, (e, s) => (n(), i(t(S), {
47
- key: s,
48
- class: "contents font-code text-sm *:rounded-none first:*:rounded-l last:*:rounded-r *:h-8 *:hover:bg-b-2 *:flex *:items-center *:cursor-pointer *:px-1.5 text-c-2 font-medium",
49
- value: s,
50
- onClick: (a) => k(e)
51
- }, {
52
- default: p(() => {
53
- var a;
54
- return [
55
- e.response.config.method ? (n(), i(z, {
56
- key: 0,
57
- class: "text-[11px]",
58
- method: e.response.config.method
59
- }, null, 8, ["method"])) : h("", !0),
60
- r("div", M, [
61
- r("div", N, l(_(e.response.config.url)), 1)
62
- ]),
63
- r("div", null, l(t(L)(e.response.duration)), 1),
64
- r("div", {
65
- class: b([t(E)(e.response.status).color])
66
- }, l(e.response.status), 3),
67
- r("div", null, l((a = t(P)[e.response.status]) == null ? void 0 : a.name), 1)
68
- ];
69
- }),
70
- _: 2
71
- }, 1032, ["value", "onClick"]))), 128))
37
+ h(o(z), {
38
+ icon: "History",
39
+ size: "sm",
40
+ thickness: "2.25"
41
+ })
72
42
  ]),
73
43
  _: 1
74
- })
75
- ], 2)
76
- ], 64));
44
+ })) : v("", !0),
45
+ r("div", {
46
+ class: k([
47
+ "absolute left-0 top-[33px] w-full rounded before:pointer-events-none before:absolute before:left-0 before:top-[-33px] before:h-[calc(100%+33px)] before:w-full before:rounded z-50",
48
+ { "before:shadow-lg": t.open }
49
+ ])
50
+ }, [
51
+ h(o(L), { class: "bg-b-1 custom-scroll bg-mix-transparent bg-mix-amount-30 max-h-[300px] rounded-b p-[3px] pt-0 backdrop-blur grid grid-cols-[44px,1fr,repeat(3,auto)] items-center" }, {
52
+ default: p(() => [
53
+ (u(!0), b(x, null, B(m.value, (e, f) => (u(), i(o(S), {
54
+ key: f,
55
+ class: "contents font-code text-sm *:rounded-none first:*:rounded-l last:*:rounded-r *:h-8 *:hover:bg-b-2 *:flex *:items-center *:cursor-pointer *:px-1.5 text-c-2 font-medium",
56
+ value: f,
57
+ onClick: (l) => C(e)
58
+ }, {
59
+ default: p(() => {
60
+ var l;
61
+ return [
62
+ e.response.method ? (u(), i(N, {
63
+ key: 0,
64
+ class: "text-[11px]",
65
+ method: e.response.method
66
+ }, null, 8, ["method"])) : v("", !0),
67
+ r("div", $, [
68
+ r("div", I, a(e.response.path), 1)
69
+ ]),
70
+ r("div", null, a(o(H)(e.response.duration)), 1),
71
+ r("div", {
72
+ class: k([o(U)(e.response.status).color])
73
+ }, a(e.response.status), 3),
74
+ r("div", null, a((l = o(E)[e.response.status]) == null ? void 0 : l.name), 1)
75
+ ];
76
+ }),
77
+ _: 2
78
+ }, 1032, ["value", "onClick"]))), 128))
79
+ ]),
80
+ _: 1
81
+ })
82
+ ], 2)
83
+ ], 64);
84
+ };
77
85
  }
78
86
  });
79
87
  export {
80
- J as default
88
+ P as default
81
89
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";AA6ZA,wBAKG"}
1
+ {"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";AA4XA,wBAKG"}
@@ -0,0 +1,121 @@
1
+ import { defineComponent as O, computed as x, watch as R, openBlock as r, createBlock as f, unref as o, withCtx as _, createElementBlock as a, createCommentVNode as d, Fragment as i, renderList as b, createVNode as u, createElementVNode as c, withModifiers as U, toDisplayString as g } from "vue";
2
+ import { ScalarDropdown as V, ScalarDropdownDivider as C, ScalarDropdownItem as E, ScalarIcon as I } from "@scalar/components";
3
+ import D from "./AddressBarServerItem.vue.js";
4
+ import { useWorkspace as L } from "../../store/store.js";
5
+ import { commandPaletteBus as M } from "../../libs/event-busses/command-palette-bus.js";
6
+ const j = {
7
+ key: 0,
8
+ class: "text-xxs text-c-2 ml-8"
9
+ }, z = /* @__PURE__ */ c("div", { class: "text-xxs text-c-2 ml-8" }, "Collection Servers", -1), F = { class: "flex items-center justify-center h-4 w-4" }, P = /* @__PURE__ */ c("span", null, "Add Server", -1), W = {
10
+ key: 1,
11
+ class: "flex whitespace-nowrap items-center font-code lg:text-sm text-xs"
12
+ }, Q = /* @__PURE__ */ O({
13
+ __name: "AddressBarServer",
14
+ setup($) {
15
+ const {
16
+ activeRequest: h,
17
+ activeCollection: S,
18
+ activeServer: m,
19
+ isReadOnly: A,
20
+ servers: k,
21
+ collectionMutators: B
22
+ } = L(), p = x(
23
+ () => {
24
+ var t, e;
25
+ return (e = (t = h.value) == null ? void 0 : t.servers) == null ? void 0 : e.map((s) => {
26
+ var l;
27
+ return {
28
+ id: s,
29
+ label: ((l = k[s]) == null ? void 0 : l.url) ?? "Unknown server"
30
+ };
31
+ });
32
+ }
33
+ ), v = x(
34
+ () => {
35
+ var t, e;
36
+ return (e = (t = S.value) == null ? void 0 : t.servers) == null ? void 0 : e.map((s) => {
37
+ var l;
38
+ return {
39
+ id: s,
40
+ label: ((l = k[s]) == null ? void 0 : l.url) ?? "Unknown server"
41
+ };
42
+ });
43
+ }
44
+ ), w = x(
45
+ () => {
46
+ var t, e;
47
+ return ((t = p.value) == null ? void 0 : t.length) && ((e = v.value) == null ? void 0 : e.length);
48
+ }
49
+ );
50
+ R([S, h], ([t, e]) => {
51
+ !t || t.selectedServerUid || e != null && e.selectedServerUid || B.edit(
52
+ t.uid,
53
+ "selectedServerUid",
54
+ t.servers[0]
55
+ );
56
+ });
57
+ const N = () => M.emit({
58
+ commandName: "Add Server"
59
+ });
60
+ return (t, e) => {
61
+ var s, l, y;
62
+ return (s = p.value) != null && s.length || (l = v.value) != null && l.length ? (r(), f(o(V), {
63
+ key: 0,
64
+ teleport: ".scalar-client"
65
+ }, {
66
+ items: _(() => [
67
+ w.value ? (r(), a("div", j, " Request Servers ")) : d("", !0),
68
+ (r(!0), a(i, null, b(p.value, (n) => (r(), f(D, {
69
+ key: n.id,
70
+ serverOption: n,
71
+ type: "request"
72
+ }, null, 8, ["serverOption"]))), 128)),
73
+ w.value ? (r(), a(i, { key: 1 }, [
74
+ u(o(C)),
75
+ z
76
+ ], 64)) : d("", !0),
77
+ (r(!0), a(i, null, b(v.value, (n) => (r(), f(D, {
78
+ key: n.id,
79
+ serverOption: n,
80
+ type: "collection"
81
+ }, null, 8, ["serverOption"]))), 128)),
82
+ o(A) ? d("", !0) : (r(), a(i, { key: 2 }, [
83
+ u(o(C)),
84
+ u(o(E), null, {
85
+ default: _(() => [
86
+ c("div", {
87
+ class: "font-code text-xxs flex items-center gap-1.5",
88
+ onClick: N
89
+ }, [
90
+ c("div", F, [
91
+ u(o(I), {
92
+ class: "h-2.5",
93
+ icon: "Add"
94
+ })
95
+ ]),
96
+ P
97
+ ])
98
+ ]),
99
+ _: 1
100
+ })
101
+ ], 64))
102
+ ]),
103
+ default: _(() => {
104
+ var n;
105
+ return [
106
+ c("button", {
107
+ class: "font-code lg:text-sm text-xs whitespace-nowrap border border-b-3 border-solid rounded px-1.5 py-0.5 text-c-2 z-[1]",
108
+ type: "button",
109
+ onClick: e[0] || (e[0] = U(() => {
110
+ }, ["stop"]))
111
+ }, g((n = o(m)) == null ? void 0 : n.url), 1)
112
+ ];
113
+ }),
114
+ _: 1
115
+ })) : (y = o(m)) != null && y.url ? (r(), a("div", W, g(o(m).url), 1)) : d("", !0);
116
+ };
117
+ }
118
+ });
119
+ export {
120
+ Q as default
121
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./AddressBarServer.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,22 @@
1
+ export type ServerOption = {
2
+ id: string;
3
+ label: string;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
6
+ serverOption: ServerOption;
7
+ type: "collection" | "request";
8
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
+ serverOption: ServerOption;
10
+ type: "collection" | "request";
11
+ }>>>, {}, {}>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToOption<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
22
+ //# sourceMappingURL=AddressBarServerItem.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddressBarServerItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServerItem.vue"],"names":[],"mappings":"AAuEA,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;;kBAIxC,YAAY;UACpB,YAAY,GAAG,SAAS;;kBADhB,YAAY;UACpB,YAAY,GAAG,SAAS;;AAJhC,wBAkKK;AAML,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}