@scalar/api-client 2.0.63 → 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 (329) hide show
  1. package/CHANGELOG.md +63 -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 +5 -54
  92. package/dist/components/Sidebar/Sidebar.vue2.js +59 -0
  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/Sidebar/index.js +2 -3
  96. package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
  97. package/dist/components/SubpageHeader.vue.js +3 -3
  98. package/dist/components/SubpageHeader.vue2.js +3 -3
  99. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  100. package/dist/components/TopNav/TopNav.vue.js +2 -2
  101. package/dist/components/TopNav/TopNav.vue2.js +23 -23
  102. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  103. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  104. package/dist/components/TopNav/TopNavItem.vue2.js +21 -21
  105. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  106. package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
  107. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  108. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +5 -5
  109. package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
  110. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +4 -4
  111. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  112. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
  113. package/dist/components/index.js +4 -5
  114. package/dist/index.d.ts +1 -1
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js +1 -1
  117. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  118. package/dist/layouts/App/ApiClientApp.vue.js +39 -53
  119. package/dist/layouts/App/create-api-client-app.d.ts +2058 -1941
  120. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  121. package/dist/layouts/App/create-api-client-app.js +12 -12
  122. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  123. package/dist/layouts/Modal/ApiClientModal.vue2.js +6 -6
  124. package/dist/layouts/Modal/create-api-client-modal.d.ts +4590 -4356
  125. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  126. package/dist/layouts/Modal/create-api-client-modal.js +18 -23
  127. package/dist/libs/create-client.d.ts +2086 -1972
  128. package/dist/libs/create-client.d.ts.map +1 -1
  129. package/dist/libs/create-client.js +85 -76
  130. package/dist/libs/environment-parser.d.ts +9 -0
  131. package/dist/libs/environment-parser.d.ts.map +1 -0
  132. package/dist/libs/environment-parser.js +17 -0
  133. package/dist/libs/errors.d.ts +21 -0
  134. package/dist/libs/errors.d.ts.map +1 -0
  135. package/dist/libs/errors.js +14 -0
  136. package/dist/libs/event-busses/command-palette-bus.d.ts +1 -1
  137. package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -1
  138. package/dist/libs/event-busses/hot-keys-bus.d.ts +4 -4
  139. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
  140. package/dist/libs/event-busses/hot-keys-bus.js +17 -19
  141. package/dist/libs/index.d.ts +5 -2
  142. package/dist/libs/index.d.ts.map +1 -1
  143. package/dist/libs/index.js +31 -24
  144. package/dist/libs/local-storage.d.ts +3 -3
  145. package/dist/libs/local-storage.d.ts.map +1 -1
  146. package/dist/libs/local-storage.js +24 -12
  147. package/dist/libs/normalize-headers.d.ts +14 -0
  148. package/dist/libs/normalize-headers.d.ts.map +1 -0
  149. package/dist/libs/normalize-headers.js +32 -0
  150. package/dist/libs/send-request.d.ts +28 -0
  151. package/dist/libs/send-request.d.ts.map +1 -0
  152. package/dist/libs/send-request.js +186 -0
  153. package/dist/libs/string-template.d.ts +19 -0
  154. package/dist/libs/string-template.d.ts.map +1 -0
  155. package/dist/libs/string-template.js +30 -0
  156. package/dist/router.d.ts +5 -0
  157. package/dist/router.d.ts.map +1 -1
  158. package/dist/router.js +36 -27
  159. package/dist/store/collections.d.ts +705 -0
  160. package/dist/store/collections.d.ts.map +1 -0
  161. package/dist/store/collections.js +63 -0
  162. package/dist/store/cookies.d.ts +135 -0
  163. package/dist/store/cookies.d.ts.map +1 -0
  164. package/dist/store/cookies.js +29 -0
  165. package/dist/store/environment.d.ts +80 -0
  166. package/dist/store/environment.d.ts.map +1 -0
  167. package/dist/store/environment.js +39 -0
  168. package/dist/store/import-spec.d.ts +8 -0
  169. package/dist/store/import-spec.d.ts.map +1 -0
  170. package/dist/store/import-spec.js +45 -0
  171. package/dist/store/index.d.ts +1 -1
  172. package/dist/store/index.d.ts.map +1 -1
  173. package/dist/store/index.js +1 -1
  174. package/dist/store/request-example.d.ts +1111 -0
  175. package/dist/store/request-example.d.ts.map +1 -0
  176. package/dist/store/request-example.js +47 -0
  177. package/dist/store/requests.d.ts +371 -0
  178. package/dist/store/requests.d.ts.map +1 -0
  179. package/dist/store/requests.js +107 -0
  180. package/dist/store/router-params.d.ts +15 -0
  181. package/dist/store/router-params.d.ts.map +1 -0
  182. package/dist/store/router-params.js +21 -0
  183. package/dist/store/security-schemes.d.ts +616 -0
  184. package/dist/store/security-schemes.d.ts.map +1 -0
  185. package/dist/store/security-schemes.js +68 -0
  186. package/dist/store/servers.d.ts +99 -0
  187. package/dist/store/servers.d.ts.map +1 -0
  188. package/dist/store/servers.js +46 -0
  189. package/dist/store/store-context.d.ts +29 -0
  190. package/dist/store/store-context.d.ts.map +1 -0
  191. package/dist/store/store.d.ts +7504 -0
  192. package/dist/store/store.d.ts.map +1 -0
  193. package/dist/store/store.js +200 -0
  194. package/dist/store/tags.d.ts +169 -0
  195. package/dist/store/tags.d.ts.map +1 -0
  196. package/dist/store/tags.js +57 -0
  197. package/dist/store/workspace.d.ts +93 -7150
  198. package/dist/store/workspace.d.ts.map +1 -1
  199. package/dist/store/workspace.js +49 -543
  200. package/dist/style.css +1 -1
  201. package/dist/views/Cookies/CookieForm.vue.js +2 -2
  202. package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
  203. package/dist/views/Cookies/CookieRaw.vue.js +10 -10
  204. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  205. package/dist/views/Cookies/Cookies.vue2.js +29 -32
  206. package/dist/views/Environment/Environment.vue2.js +31 -33
  207. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +11 -5
  208. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  209. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +79 -59
  210. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  211. package/dist/views/Request/Request.vue.js +2 -2
  212. package/dist/views/Request/Request.vue2.js +87 -319
  213. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +36 -0
  214. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -0
  215. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +59 -0
  216. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue2.js +4 -0
  217. package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuth2.vue.d.ts +3 -1
  218. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -0
  219. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +216 -0
  220. package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue.d.ts +2 -2
  221. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -0
  222. package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue.js +3 -3
  223. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
  224. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +7 -0
  225. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +183 -0
  226. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +30 -0
  227. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +1 -0
  228. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +3 -0
  229. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -0
  230. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +140 -0
  231. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +4 -0
  232. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  233. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  234. package/dist/views/Request/RequestSection/RequestBody.vue.js +167 -186
  235. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
  236. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  237. package/dist/views/Request/RequestSection/RequestParams.vue.js +49 -49
  238. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
  239. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  240. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +26 -22
  241. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  242. package/dist/views/Request/RequestSection/RequestSection.vue.js +103 -102
  243. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +5 -5
  244. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  245. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  246. package/dist/views/Request/RequestSection/RequestTable.vue2.js +1 -1
  247. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts +1 -1
  248. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  249. package/dist/views/Request/RequestSidebar.vue.d.ts +30 -0
  250. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -0
  251. package/dist/views/Request/RequestSidebar.vue.js +7 -0
  252. package/dist/views/Request/RequestSidebar.vue2.js +179 -0
  253. package/dist/views/Request/RequestSidebarItem.vue.d.ts +6 -7
  254. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  255. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  256. package/dist/views/Request/RequestSidebarItem.vue2.js +283 -254
  257. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -5
  258. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  259. package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
  260. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +9 -7
  261. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +24 -0
  262. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -0
  263. package/dist/views/Request/RequestSubpageHeader.vue.js +7 -0
  264. package/dist/views/Request/RequestSubpageHeader.vue2.js +48 -0
  265. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  266. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
  267. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  268. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +3 -3
  269. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +17 -16
  270. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  271. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  272. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +37 -30
  273. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts +1 -1
  274. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  275. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
  276. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  277. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
  278. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  279. package/dist/views/Request/components/WorkspaceDropdown.vue.js +69 -90
  280. package/dist/views/Request/components/index.d.ts +0 -1
  281. package/dist/views/Request/components/index.d.ts.map +1 -1
  282. package/dist/views/Request/components/index.js +2 -4
  283. package/dist/views/Request/consts/new-auth-options.d.ts +11 -1
  284. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  285. package/dist/views/Request/consts/new-auth-options.js +17 -7
  286. package/dist/views/Request/handle-drag.d.ts +8 -0
  287. package/dist/views/Request/handle-drag.d.ts.map +1 -0
  288. package/dist/views/Request/handle-drag.js +56 -0
  289. package/dist/views/Request/libs/auth.d.ts +35 -0
  290. package/dist/views/Request/libs/auth.d.ts.map +1 -0
  291. package/dist/views/Request/libs/auth.js +14 -0
  292. package/dist/views/Request/libs/index.d.ts +1 -0
  293. package/dist/views/Request/libs/index.d.ts.map +1 -1
  294. package/dist/views/Request/libs/index.js +7 -3
  295. package/dist/views/Request/libs/oauth2.d.ts +12 -3
  296. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  297. package/dist/views/Request/libs/oauth2.js +42 -27
  298. package/dist/views/Servers/ServerForm.vue.js +22 -22
  299. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  300. package/dist/views/Servers/Servers.vue2.js +18 -16
  301. package/package.json +11 -11
  302. package/dist/components/CodeInput/codeDropdownWidget.d.ts +0 -32
  303. package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +0 -1
  304. package/dist/components/CodeInput/codeDropdownWidget.js +0 -121
  305. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +0 -1
  306. package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +0 -106
  307. package/dist/components/CommandPalette/CommandPaletteFolder.vue2.js +0 -4
  308. package/dist/components/Sidebar/Sidebar.vue3.js +0 -5
  309. package/dist/errors.d.ts +0 -5
  310. package/dist/errors.d.ts.map +0 -1
  311. package/dist/errors.js +0 -7
  312. package/dist/libs/normalizeHeaders.d.ts +0 -11
  313. package/dist/libs/normalizeHeaders.d.ts.map +0 -1
  314. package/dist/libs/normalizeHeaders.js +0 -25
  315. package/dist/libs/pathParams.d.ts +0 -10
  316. package/dist/libs/pathParams.d.ts.map +0 -1
  317. package/dist/libs/pathParams.js +0 -36
  318. package/dist/libs/sendRequest.d.ts +0 -14
  319. package/dist/libs/sendRequest.d.ts.map +0 -1
  320. package/dist/libs/sendRequest.js +0 -163
  321. package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +0 -1
  322. package/dist/views/Request/RequestSection/RequestAuth.vue.js +0 -7
  323. package/dist/views/Request/RequestSection/RequestAuth.vue2.js +0 -351
  324. package/dist/views/Request/components/OAuth2.vue.d.ts.map +0 -1
  325. package/dist/views/Request/components/OAuth2.vue.js +0 -208
  326. package/dist/views/Request/components/OAuthScopesInput.vue.d.ts.map +0 -1
  327. /package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuth2.vue2.js +0 -0
  328. /package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue2.js +0 -0
  329. /package/dist/views/Request/RequestSection/{RequestAuth.vue.d.ts → RequestAuth/RequestAuth.vue.d.ts} +0 -0
@@ -1,48 +1,62 @@
1
- const p = (t) => new Promise((r, n) => {
1
+ const y = (t) => t.type.startsWith("oauth"), _ = (t, r) => new Promise((i, a) => {
2
+ const e = t.flow.selectedScopes.join(" ");
2
3
  if (t.flow.type === "clientCredentials" || t.flow.type === "password")
3
- u(t).then(r).catch(n);
4
+ p(
5
+ t,
6
+ r,
7
+ e
8
+ ).then(i).catch(a);
4
9
  else {
5
- const e = t.flow.selectedScopes.join(" "), a = (Math.random() + 1).toString(36).substring(7), o = new URL(t.flow.authorizationUrl);
6
- t.flow.type === "implicit" ? o.searchParams.set("response_type", "token") : t.flow.type === "authorizationCode" && o.searchParams.set("response_type", "code"), o.searchParams.set("client_id", t.clientId), o.searchParams.set("redirect_uri", t.flow.redirectUri), o.searchParams.set("scope", e), o.searchParams.set("state", a);
7
- const i = window.open(o, "openAuth2Window", "left=100,top=100,width=800,height=600");
8
- if (i) {
9
- const d = setInterval(function() {
10
- var f;
11
- let s = null, c = null;
10
+ const c = (Math.random() + 1).toString(36).substring(7), o = new URL(t.flow.authorizationUrl);
11
+ t.flow.type === "implicit" ? o.searchParams.set("response_type", "token") : t.flow.type === "authorizationCode" && o.searchParams.set("response_type", "code"), o.searchParams.set("client_id", t["x-scalar-client-id"]), o.searchParams.set("redirect_uri", t.flow["x-scalar-redirect-uri"]), o.searchParams.set("scope", e), o.searchParams.set("state", c);
12
+ const s = window.open(o, "openAuth2Window", "left=100,top=100,width=800,height=600");
13
+ if (s) {
14
+ const f = setInterval(function() {
15
+ var h;
16
+ let n = null, l = null;
12
17
  try {
13
- const l = new URL(i.location.href).searchParams;
14
- s = l.get("access_token"), c = l.get("code");
18
+ const w = new URL(s.location.href).searchParams;
19
+ n = w.get("access_token"), l = w.get("code");
20
+ const u = new URLSearchParams(
21
+ s.location.href.split("#")[1]
22
+ );
23
+ n || (n = u.get("access_token")), l || (l = u.get("code"));
15
24
  } catch {
16
25
  }
17
- if (i.closed || s || c)
18
- if (clearInterval(d), i.close(), s) {
19
- const l = (f = i.location.href.match(/state=([^&]*)/)) == null ? void 0 : f[1];
20
- s && l === a && r(s);
21
- } else c ? u(t, c).then(r).catch(n) : (clearInterval(d), n(
26
+ if (s.closed || n || l)
27
+ if (clearInterval(f), s.close(), n) {
28
+ const w = (h = s.location.href.match(/state=([^&]*)/)) == null ? void 0 : h[1];
29
+ n && w === c && i(n);
30
+ } else l ? p(
31
+ t,
32
+ r,
33
+ e,
34
+ l
35
+ ).then(i).catch(a) : (clearInterval(f), a(
22
36
  new Error("Window was closed without granting authorization")
23
37
  ));
24
38
  }, 200);
25
39
  }
26
40
  }
27
- }), u = async (t, r) => {
28
- if (!("clientSecret" in t.flow))
41
+ }), p = async (t, r, i, a) => {
42
+ if (!("clientSecret" in r))
29
43
  throw new Error(
30
44
  "Authorize Servers only works for Client Credentials or Authorization Code flow"
31
45
  );
32
46
  if (!t.flow) throw new Error("OAuth2 flow was not defined");
33
- const n = t.flow.selectedScopes.join(" "), e = new URLSearchParams();
34
- e.set("client_id", t.clientId), e.set("scope", n), t.flow.clientSecret && e.set("client_secret", t.flow.clientSecret), "redirectUri" in t.flow && e.set("redirect_uri", t.flow.redirectUri), r && (e.set("code", r), e.set("grant_type", "authorization_code")), "secondValue" in t.flow ? (e.set("grant_type", "password"), e.set("username", t.flow.value), e.set("password", t.flow.secondValue)) : e.set("grant_type", "client_credentials");
47
+ const e = new URLSearchParams();
48
+ e.set("client_id", t["x-scalar-client-id"]), e.set("scope", i), r.clientSecret && e.set("client_secret", r.clientSecret), "x-scalar-redirect-uri" in t.flow && e.set("redirect_uri", t.flow["x-scalar-redirect-uri"]), a ? (e.set("code", a), e.set("grant_type", "authorization_code")) : r.type === "oauth-password" ? (e.set("grant_type", "password"), e.set("username", r.username), e.set("password", r.password)) : e.set("grant_type", "client_credentials");
35
49
  try {
36
- const a = {
50
+ const c = {
37
51
  "Content-Type": "application/x-www-form-urlencoded"
38
52
  };
39
- t.clientId && t.flow.clientSecret && (a.Authorization = `Basic ${btoa(`${t.clientId}:${t.flow.clientSecret}`)}`);
53
+ t["x-scalar-client-id"] && r.clientSecret && (c.Authorization = `Basic ${btoa(`${t["x-scalar-client-id"]}:${r.clientSecret}`)}`);
40
54
  const o = await fetch(t.flow.tokenUrl, {
41
55
  method: "POST",
42
- headers: a,
56
+ headers: c,
43
57
  body: e
44
- }), { access_token: w } = await o.json();
45
- return w;
58
+ }), { access_token: d } = await o.json();
59
+ return d;
46
60
  } catch {
47
61
  throw new Error(
48
62
  "Failed to get an access token. Please check your credentials."
@@ -50,6 +64,7 @@ const p = (t) => new Promise((r, n) => {
50
64
  }
51
65
  };
52
66
  export {
53
- p as authorizeOauth2,
54
- u as authorizeServers
67
+ _ as authorizeOauth2,
68
+ p as authorizeServers,
69
+ y as isOauth2Example
55
70
  };
@@ -1,64 +1,64 @@
1
- import { defineComponent as U, computed as l, openBlock as u, createElementBlock as p, Fragment as y, createVNode as O, createBlock as S, createCommentVNode as i } from "vue";
1
+ import { defineComponent as S, computed as l, openBlock as u, createElementBlock as d, Fragment as b, createVNode as g, createBlock as y, createCommentVNode as p } from "vue";
2
2
  import m from "../../components/Form/Form.vue.js";
3
- import { useWorkspace as V } from "../../store/workspace.js";
4
- import { useRoute as b } from "vue-router";
5
- const j = { class: "w-full" }, L = /* @__PURE__ */ U({
3
+ import { useRoute as O } from "vue-router";
4
+ import { useWorkspace as V } from "../../store/store.js";
5
+ const j = { class: "w-full" }, L = /* @__PURE__ */ S({
6
6
  __name: "ServerForm",
7
7
  setup(B) {
8
- const { activeCollection: o, servers: v, serverMutators: n } = V(), f = [
8
+ const { activeCollection: a, servers: v, serverMutators: n } = V(), f = [
9
9
  { label: "URL", key: "url", placeholder: "https://void.scalar.com/api" },
10
10
  {
11
11
  label: "Label",
12
12
  key: "description",
13
13
  placeholder: "Production"
14
14
  }
15
- ], c = b(), a = l(
15
+ ], c = O(), o = l(
16
16
  () => {
17
17
  var e, t;
18
- return v[o.value && c.params.server === "default" ? (e = o.value) == null ? void 0 : e.spec.serverUids[0] : ((t = o.value) == null ? void 0 : t.spec.serverUids.find(
18
+ return v[a.value && c.params.server === "default" ? (e = a.value) == null ? void 0 : e.servers[0] : ((t = a.value) == null ? void 0 : t.servers.find(
19
19
  (r) => r === c.params.server
20
20
  )) ?? ""];
21
21
  }
22
22
  ), _ = (e, t) => {
23
- o.value && n.edit(a.value.uid, e, t);
23
+ a.value && n.edit(o.value.uid, e, t);
24
24
  }, k = (e, t) => {
25
- o.value && n.edit(a.value.uid, `variables.${e}.value`, t);
25
+ a.value && n.edit(o.value.uid, `variables.${e}.value`, t);
26
26
  }, h = l(
27
27
  () => {
28
28
  var e;
29
- return Object.entries(((e = a.value) == null ? void 0 : e.variables) ?? {}).map(
29
+ return Object.entries(((e = o.value) == null ? void 0 : e.variables) ?? {}).map(
30
30
  ([t, r]) => {
31
31
  var s;
32
32
  return {
33
33
  key: t,
34
34
  label: t,
35
- placeholder: r.default ?? ((s = r == null ? void 0 : r.enum) == null ? void 0 : s[0]) ?? ""
35
+ placeholder: (r.default ?? ((s = r == null ? void 0 : r.enum) == null ? void 0 : s[0]) ?? "").toString()
36
36
  };
37
37
  }
38
38
  );
39
39
  }
40
- ), d = l(
41
- () => Object.entries(a.value.variables ?? {}).reduce((e, [t, r]) => {
40
+ ), i = l(
41
+ () => Object.entries(o.value.variables ?? {}).reduce((e, [t, r]) => {
42
42
  var s;
43
- return e[t] = r.value ?? r.default ?? ((s = r == null ? void 0 : r.enum) == null ? void 0 : s[0]) ?? "", e;
43
+ return e[t] = (r.default ?? ((s = r == null ? void 0 : r.enum) == null ? void 0 : s[0]) ?? "").toString(), e;
44
44
  }, {})
45
45
  );
46
- return (e, t) => (u(), p("div", j, [
47
- a.value ? (u(), p(y, { key: 0 }, [
48
- O(m, {
49
- data: a.value,
46
+ return (e, t) => (u(), d("div", j, [
47
+ o.value ? (u(), d(b, { key: 0 }, [
48
+ g(m, {
49
+ data: o.value,
50
50
  onUpdate: _,
51
51
  options: f,
52
52
  title: "Server"
53
53
  }, null, 8, ["data"]),
54
- Object.keys(d.value).length ? (u(), S(m, {
54
+ Object.keys(i.value).length ? (u(), y(m, {
55
55
  key: 0,
56
- data: d.value,
56
+ data: i.value,
57
57
  onUpdate: k,
58
58
  options: h.value,
59
59
  title: "Variables"
60
- }, null, 8, ["data", "options"])) : i("", !0)
61
- ], 64)) : i("", !0)
60
+ }, null, 8, ["data", "options"])) : p("", !0)
61
+ ], 64)) : p("", !0)
62
62
  ]));
63
63
  }
64
64
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAqNA,wBAKG"}
1
+ {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAiOA,wBAKG"}
@@ -1,39 +1,41 @@
1
- import { defineComponent as d, openBlock as l, createBlock as s, withCtx as e, createVNode as r, unref as n, createElementVNode as p, createElementBlock as _, Fragment as v, renderList as S, createTextVNode as x } from "vue";
1
+ import { defineComponent as d, openBlock as l, createBlock as i, withCtx as e, createVNode as r, unref as n, createElementVNode as p, createElementBlock as _, Fragment as v, renderList as S, createTextVNode as x } from "vue";
2
2
  import b from "../../components/Sidebar/SidebarButton.vue.js";
3
3
  import h from "../../components/Sidebar/SidebarList.vue.js";
4
4
  import k from "../../components/Sidebar/SidebarListElement.vue.js";
5
5
  import L from "../../components/SubpageHeader.vue.js";
6
6
  import V from "../../components/ViewLayout/ViewLayout.vue.js";
7
7
  import w from "../../components/ViewLayout/ViewLayoutContent.vue.js";
8
- import { useWorkspace as C } from "../../store/workspace.js";
9
- import { createServer as $ } from "@scalar/oas-utils/entities/workspace/server";
8
+ import { serverSchema as C } from "@scalar/oas-utils/entities/spec";
10
9
  import { useRouter as y } from "vue-router";
11
10
  import B from "./ServerForm.vue.js";
12
- import E from "../../components/Sidebar/Sidebar.vue.js";
13
- /* empty css */
14
- const N = { class: "flex-1" }, K = /* @__PURE__ */ d({
11
+ import { useWorkspace as E } from "../../store/store.js";
12
+ import N from "../../components/Sidebar/Sidebar.vue.js";
13
+ const $ = { class: "flex-1" }, J = /* @__PURE__ */ d({
15
14
  __name: "Servers",
16
15
  setup(g) {
17
- const { activeCollection: t, servers: m, serverMutators: c } = C(), { push: u } = y(), f = () => {
16
+ const { activeCollection: t, servers: m, serverMutators: u } = E(), { push: c } = y(), f = () => {
18
17
  if (!t.value) return;
19
- const o = $({ url: "http://localhost" });
20
- c.add(o, t.value.uid), u(`/servers/${o.uid}`);
18
+ const o = C.parse({ url: "http://localhost" });
19
+ u.add(o, t.value.uid), c(`/servers/${o.uid}`);
21
20
  };
22
- return (o, H) => (l(), s(L, null, {
21
+ return (o, H) => (l(), i(L, null, {
23
22
  default: e(() => [
24
23
  r(V, null, {
25
24
  default: e(() => [
26
- r(n(E), { title: "Servers" }, {
25
+ r(n(N), { title: "Servers" }, {
27
26
  content: e(() => [
28
- p("div", N, [
27
+ p("div", $, [
29
28
  r(h, null, {
30
29
  default: e(() => {
31
- var i;
30
+ var s;
32
31
  return [
33
- (l(!0), _(v, null, S((i = n(t)) == null ? void 0 : i.spec.serverUids, (a) => (l(), s(k, {
32
+ (l(!0), _(v, null, S((s = n(t)) == null ? void 0 : s.servers, (a) => (l(), i(k, {
34
33
  key: a,
35
34
  class: "text-xs",
36
- variable: { name: n(m)[a].url, uid: a }
35
+ variable: {
36
+ name: n(m)[a].url ?? "",
37
+ uid: a
38
+ }
37
39
  }, null, 8, ["variable"]))), 128))
38
40
  ];
39
41
  }),
@@ -66,5 +68,5 @@ const N = { class: "flex-1" }, K = /* @__PURE__ */ d({
66
68
  }
67
69
  });
68
70
  export {
69
- K as default
71
+ J as default
70
72
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.63",
21
+ "version": "2.1.0",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -124,16 +124,16 @@
124
124
  "vue": "^3.4.29",
125
125
  "vue-router": "^4.3.0",
126
126
  "whatwg-mimetype": "^4.0.0",
127
- "zod": "^3.22.4",
128
- "@scalar/components": "0.12.43",
129
- "@scalar/oas-utils": "0.2.42",
130
- "@scalar/draggable": "0.1.4",
131
- "@scalar/openapi-parser": "0.8.1",
132
- "@scalar/object-utils": "1.1.7",
133
- "@scalar/openapi-types": "0.1.0",
134
- "@scalar/themes": "0.9.28",
135
- "@scalar/use-codemirror": "0.11.10",
136
- "@scalar/types": "0.0.7",
127
+ "zod": "^3.23.8",
128
+ "@scalar/components": "0.12.45",
129
+ "@scalar/draggable": "0.1.5",
130
+ "@scalar/oas-utils": "0.2.44",
131
+ "@scalar/openapi-parser": "0.8.3",
132
+ "@scalar/openapi-types": "0.1.1",
133
+ "@scalar/types": "0.0.9",
134
+ "@scalar/object-utils": "1.1.8",
135
+ "@scalar/use-codemirror": "0.11.11",
136
+ "@scalar/themes": "0.9.30",
137
137
  "@scalar/use-toasts": "0.7.6",
138
138
  "@scalar/use-tooltip": "1.0.2"
139
139
  },
@@ -1,32 +0,0 @@
1
- import type { WorkspaceStore } from '../../store/index.js';
2
- import { type DecorationSet, type EditorView, ViewPlugin, type ViewUpdate, WidgetType } from '@scalar/use-codemirror';
3
- import type { Router } from 'vue-router';
4
- declare class DropdownWidget extends WidgetType {
5
- private queryTerm;
6
- private onSelect;
7
- private dropdown;
8
- private withServers?;
9
- private activeParsedEnvironments;
10
- private environments;
11
- private router;
12
- constructor(queryTerm: string, onSelect: (item: string) => void, activeParsedEnvironments: WorkspaceStore['activeParsedEnvironments'], environments: WorkspaceStore['environments'], router: Router, withServers?: boolean);
13
- updateQueryTerm(newQueryTerm: string): void;
14
- getQueryTerm(): string;
15
- toDOM(view: EditorView): HTMLSpanElement;
16
- destroy(): void;
17
- eq(other: WidgetType): boolean;
18
- }
19
- export declare const dropdownPlugin: (props: {
20
- withServers?: boolean;
21
- activeParsedEnvironments: WorkspaceStore["activeParsedEnvironments"];
22
- environments: WorkspaceStore["environments"];
23
- router: Router;
24
- }) => ViewPlugin<{
25
- decorations: DecorationSet;
26
- widget: DropdownWidget | null;
27
- view: EditorView;
28
- handleDropdownSelect(item: string): void;
29
- update(update: ViewUpdate): void;
30
- }>;
31
- export {};
32
- //# sourceMappingURL=codeDropdownWidget.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codeDropdownWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeDropdownWidget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,UAAU,EACV,KAAK,UAAU,EACf,UAAU,EACX,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,cAAM,cAAe,SAAQ,UAAU;IACrC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,QAAQ,CAAY;IAC5B,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,wBAAwB,CAA4C;IAC5E,OAAO,CAAC,YAAY,CAAgC;IACpD,OAAO,CAAC,MAAM,CAAQ;gBAGpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAChC,wBAAwB,EAAE,cAAc,CAAC,0BAA0B,CAAC,EACpE,YAAY,EAAE,cAAc,CAAC,cAAc,CAAC,EAC5C,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,OAAO;IAWvB,eAAe,CAAC,YAAY,EAAE,MAAM;IAMpC,YAAY;IAIZ,KAAK,CAAC,IAAI,EAAE,UAAU;IAuCtB,OAAO;IAOP,EAAE,CAAC,KAAK,EAAE,UAAU;CAGrB;AAED,eAAO,MAAM,cAAc,UAAW;IACpC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,wBAAwB,EAAE,cAAc,CAAC,0BAA0B,CAAC,CAAA;IACpE,YAAY,EAAE,cAAc,CAAC,cAAc,CAAC,CAAA;IAC5C,MAAM,EAAE,MAAM,CAAA;CACf;iBAGkB,aAAa;YAClB,cAAc,GAAG,IAAI;UACvB,UAAU;+BAQW,MAAM;mBAwClB,UAAU;EAyC5B,CAAA"}
@@ -1,121 +0,0 @@
1
- var g = Object.defineProperty;
2
- var f = (s, t, e) => t in s ? g(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var o = (s, t, e) => f(s, typeof t != "symbol" ? t + "" : t, e);
4
- import { ViewPlugin as p, Decoration as h, StateEffect as v, WidgetType as y } from "@scalar/use-codemirror";
5
- import { createApp as T, h as w, Teleport as S } from "vue";
6
- import q from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
7
- class u extends y {
8
- constructor(e, i, d, n, c, r) {
9
- super();
10
- o(this, "queryTerm");
11
- o(this, "onSelect");
12
- o(this, "dropdown", null);
13
- o(this, "withServers");
14
- o(this, "activeParsedEnvironments");
15
- o(this, "environments");
16
- o(this, "router");
17
- this.queryTerm = e, this.onSelect = i, this.withServers = r, this.activeParsedEnvironments = d, this.environments = n, this.router = c;
18
- }
19
- updateQueryTerm(e) {
20
- this.queryTerm !== e && (this.queryTerm = e);
21
- }
22
- getQueryTerm() {
23
- return this.queryTerm;
24
- }
25
- toDOM(e) {
26
- const i = document.createElement("span");
27
- return i.style.position = "fixed", setTimeout(() => {
28
- var c;
29
- const d = e.state.selection.main.head, n = e.coordsAtPos(d - this.queryTerm.length - 2);
30
- if (n) {
31
- const r = (c = document.querySelector(".scalar-client")) == null ? void 0 : c.getBoundingClientRect();
32
- r && (this.dropdown = T({
33
- render: () => w(S, { to: ".scalar-client" }, [
34
- w(q, {
35
- query: this.queryTerm,
36
- onSelect: this.onSelect,
37
- withServers: this.withServers,
38
- activeParsedEnvironments: this.activeParsedEnvironments,
39
- environments: this.environments,
40
- router: this.router,
41
- style: {
42
- position: "absolute",
43
- left: `${n.left - r.left}px`,
44
- top: `calc(${n.bottom - r.top}px + 6px)`
45
- }
46
- })
47
- ])
48
- })), this.dropdown.use(this.router), this.dropdown.mount(i);
49
- }
50
- }, 0), i;
51
- }
52
- destroy() {
53
- this.dropdown && (this.dropdown.unmount(), this.dropdown = null);
54
- }
55
- eq(e) {
56
- return e instanceof u && this.queryTerm === e.queryTerm;
57
- }
58
- }
59
- const C = (s) => p.fromClass(
60
- class {
61
- constructor(t) {
62
- o(this, "decorations");
63
- o(this, "widget", null);
64
- o(this, "view");
65
- this.view = t, this.decorations = h.none, this.handleDropdownSelect = this.handleDropdownSelect.bind(this);
66
- }
67
- handleDropdownSelect(t) {
68
- var m;
69
- if (!this.widget) return;
70
- const { state: e, dispatch: i } = this.view, d = e.selection.main.head, n = Math.max(0, d - this.widget.getQueryTerm().length - 2), c = d, r = `{{${t}}}`;
71
- i({
72
- changes: { from: n, to: c, insert: r }
73
- }), (m = this.widget) == null || m.destroy(), this.widget = null, this.decorations = h.none, this.view.dispatch({
74
- effects: v.appendConfig.of([])
75
- });
76
- const a = n + r.length, l = "";
77
- this.widget = new u(
78
- l,
79
- this.handleDropdownSelect,
80
- s.activeParsedEnvironments,
81
- s.environments,
82
- s.router,
83
- s.withServers
84
- ), this.decorations = h.set([
85
- h.widget({
86
- widget: this.widget,
87
- side: 1
88
- }).range(a)
89
- ]), this.view.dispatch({
90
- selection: { anchor: a }
91
- }), this.view.focus();
92
- }
93
- update(t) {
94
- var r, a;
95
- const e = t.state.selection.main.head, i = t.state.doc.sliceString(0, e), d = [], n = i.lastIndexOf("{{"), c = i.lastIndexOf("}}");
96
- if (n > c) {
97
- const l = i.slice(n + 2);
98
- !this.widget || this.widget.getQueryTerm() !== l ? ((r = this.widget) == null || r.destroy(), this.widget = new u(
99
- l,
100
- this.handleDropdownSelect,
101
- s.activeParsedEnvironments,
102
- s.environments,
103
- s.router
104
- )) : this.widget.updateQueryTerm(l), d.push(
105
- h.widget({
106
- widget: this.widget,
107
- side: 1
108
- }).range(e)
109
- );
110
- } else
111
- (a = this.widget) == null || a.destroy(), this.widget = null;
112
- this.decorations = h.set(d);
113
- }
114
- },
115
- {
116
- decorations: (t) => t.decorations
117
- }
118
- );
119
- export {
120
- C as dropdownPlugin
121
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommandPaletteFolder.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteFolder.vue"],"names":[],"mappings":";;;;;AA6UA,wBAMG"}
@@ -1,106 +0,0 @@
1
- import { defineComponent as y, ref as d, computed as v, onMounted as V, openBlock as k, createElementBlock as N, createElementVNode as s, withDirectives as S, withKeys as F, withModifiers as I, vModelText as M, createVNode as n, unref as i, withCtx as u, normalizeClass as B, toDisplayString as D, createTextVNode as K } from "vue";
2
- import { useWorkspace as T } from "../../store/workspace.js";
3
- import { ScalarListbox as z, ScalarButton as x, ScalarIcon as E } from "@scalar/components";
4
- import { useToasts as P } from "@scalar/use-toasts";
5
- const U = { class: "flex w-full flex-col gap-3" }, W = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, j = /* @__PURE__ */ s("label", {
6
- class: "absolute w-full h-full opacity-0 cursor-text",
7
- for: "foldername"
8
- }, null, -1), L = ["onKeydown"], q = { class: "flex" }, A = { class: "flex flex-1 gap-2 max-h-8" }, R = /* @__PURE__ */ y({
9
- __name: "CommandPaletteFolder",
10
- emits: ["close"],
11
- setup(G, { emit: h }) {
12
- var p;
13
- const b = h, { activeWorkspaceCollections: _, folderMutators: w, activeCollection: C } = T(), t = d(""), r = d(((p = C.value) == null ? void 0 : p.uid) ?? ""), { toast: g } = P(), c = v(
14
- () => _.value.map((e) => {
15
- var l, a;
16
- return {
17
- id: e.uid,
18
- label: ((a = (l = e.spec) == null ? void 0 : l.info) == null ? void 0 : a.title) ?? ""
19
- };
20
- })
21
- ), o = v({
22
- get: () => c.value.find(
23
- ({ id: e }) => e === r.value
24
- ),
25
- set: (e) => {
26
- e != null && e.id && (r.value = e.id);
27
- }
28
- }), f = () => {
29
- if (!t.value) {
30
- g("Please enter a name before creating a folder.", "error");
31
- return;
32
- }
33
- t.value && o.value && (w.add(
34
- {
35
- name: t.value
36
- },
37
- r.value
38
- ), b("close"));
39
- }, m = d(null);
40
- return V(() => {
41
- var e;
42
- (e = m.value) == null || e.focus();
43
- }), (e, l) => (k(), N("div", U, [
44
- s("div", W, [
45
- j,
46
- S(s("input", {
47
- id: "foldername",
48
- ref_key: "folderInput",
49
- ref: m,
50
- "onUpdate:modelValue": l[0] || (l[0] = (a) => t.value = a),
51
- autocomplete: "off",
52
- class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
53
- "data-form-type": "other",
54
- "data-lpignore": "true",
55
- label: "Folder Name",
56
- placeholder: "Folder Name",
57
- onKeydown: F(I(f, ["prevent"]), ["enter"])
58
- }, null, 40, L), [
59
- [M, t.value]
60
- ])
61
- ]),
62
- s("div", q, [
63
- s("div", A, [
64
- n(i(z), {
65
- modelValue: o.value,
66
- "onUpdate:modelValue": l[1] || (l[1] = (a) => o.value = a),
67
- options: c.value
68
- }, {
69
- default: u(() => [
70
- n(i(x), {
71
- class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
72
- variant: "outlined"
73
- }, {
74
- default: u(() => [
75
- s("span", {
76
- class: B(o.value ? "text-c-1" : "text-c-3")
77
- }, D(o.value ? o.value.label : "Select Collection"), 3),
78
- n(i(E), {
79
- class: "text-c-3",
80
- icon: "ChevronDown",
81
- size: "xs"
82
- })
83
- ]),
84
- _: 1
85
- })
86
- ]),
87
- _: 1
88
- }, 8, ["modelValue", "options"])
89
- ]),
90
- n(i(x), {
91
- class: "max-h-8 text-xs p-0 px-3",
92
- disabled: !t.value.trim(),
93
- onClick: f
94
- }, {
95
- default: u(() => [
96
- K(" Create Folder ")
97
- ]),
98
- _: 1
99
- }, 8, ["disabled"])
100
- ])
101
- ]));
102
- }
103
- });
104
- export {
105
- R as default
106
- };
@@ -1,4 +0,0 @@
1
- import f from "./CommandPaletteFolder.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1,5 +0,0 @@
1
- import o from "./Sidebar.vue.js";
2
- /* empty css */
3
- export {
4
- o as default
5
- };
package/dist/errors.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export declare const ERRORS: {
2
- URL_EMPTY: string;
3
- INVALID_URL: string;
4
- };
5
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;CAGlB,CAAA"}
package/dist/errors.js DELETED
@@ -1,7 +0,0 @@
1
- const e = {
2
- URL_EMPTY: "The adress bar seems to be empty. Try adding an URL.",
3
- INVALID_URL: "The URL seems to be invalid. Try adding a valid URL."
4
- };
5
- export {
6
- e as ERRORS
7
- };
@@ -1,11 +0,0 @@
1
- /**
2
- * Normalize headers:
3
- *
4
- * - Electron modifies the headers to allow CORS, this function hides the modifications
5
- * - Restores original headers
6
- * - Normalizes the header keys
7
- * - Sorts headers alphabetically
8
- *
9
- */
10
- export declare function normalizeHeaders(headers: Record<string, string>): Record<string, string>;
11
- //# sourceMappingURL=normalizeHeaders.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeHeaders.d.ts","sourceRoot":"","sources":["../../src/libs/normalizeHeaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgDxB"}
@@ -1,25 +0,0 @@
1
- function l(o) {
2
- var r, c;
3
- const e = Object.keys(o).find(
4
- (t) => t.toLowerCase() === "x-scalar-modified-headers"
5
- ), n = e ? ((c = (r = o[e]) == null ? void 0 : r.toString().split(", ")) == null ? void 0 : c.map((t) => t.toLowerCase())) ?? [] : [];
6
- return Object.keys(o).forEach((t) => {
7
- n.includes(t.toLowerCase()) && delete o[t];
8
- }), e && delete o[e], Object.keys(o).forEach((t) => {
9
- if (t.toLowerCase().startsWith("x-scalar-original-")) {
10
- const i = t.replace("X-Scalar-Original-", "");
11
- o[i] = o[t], delete o[t];
12
- }
13
- }), Object.keys(o).forEach((t) => {
14
- const i = a(t);
15
- t !== i && (o[i] = o[t], delete o[t]);
16
- }), Object.fromEntries(
17
- Object.entries(o).sort(([t], [i]) => t.localeCompare(i))
18
- );
19
- }
20
- function a(o) {
21
- return o.split("-").map((e) => e.charAt(0).toUpperCase() + e.toLowerCase().slice(1)).join("-");
22
- }
23
- export {
24
- l as normalizeHeaders
25
- };
@@ -1,10 +0,0 @@
1
- import { type RequestExample, type RequestExampleParameter } from '@scalar/oas-utils/entities/workspace/spec';
2
- import type { Path } from '@scalar/object-utils/nested';
3
- /**
4
- * Uses the new, and old URL values to update/create/delete path params
5
- */
6
- export declare const syncPathParamsFromURL: <P extends Path<RequestExample>>(newURL?: string, oldURL?: string, pathParams?: RequestExampleParameter[]) => {
7
- key: P;
8
- value: string | RequestExampleParameter[];
9
- } | null;
10
- //# sourceMappingURL=pathParams.d.ts.map