@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
@@ -0,0 +1,57 @@
1
+ import { defineComponent as v, openBlock as f, createBlock as m, unref as i, withCtx as S, createElementVNode as l, normalizeClass as x, createVNode as h, toDisplayString as w } from "vue";
2
+ import { ScalarDropdownItem as k, ScalarIcon as C } from "@scalar/components";
3
+ import { useWorkspace as b } from "../../store/store.js";
4
+ const g = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, B = /* @__PURE__ */ v({
5
+ __name: "AddressBarServerItem",
6
+ props: {
7
+ serverOption: {},
8
+ type: {}
9
+ },
10
+ setup(a) {
11
+ const r = a, {
12
+ activeCollection: o,
13
+ activeRequest: s,
14
+ activeServer: n,
15
+ collectionMutators: p,
16
+ requestMutators: c
17
+ } = b(), d = (e) => {
18
+ r.type === "collection" && o.value ? p.edit(
19
+ o.value.uid,
20
+ "selectedServerUid",
21
+ e
22
+ ) : r.type === "request" && s.value && c.edit(
23
+ s.value.uid,
24
+ "selectedServerUid",
25
+ e
26
+ );
27
+ }, u = (e) => {
28
+ var t;
29
+ return ((t = n.value) == null ? void 0 : t.uid) === e;
30
+ };
31
+ return (e, t) => (f(), m(i(k), {
32
+ class: "flex !gap-1.5 group font-code text-xxs whitespace-nowrap text-ellipsis overflow-hidden",
33
+ value: e.serverOption.id,
34
+ onClick: t[0] || (t[0] = (y) => d(e.serverOption.id))
35
+ }, {
36
+ default: S(() => [
37
+ l("div", {
38
+ class: x([
39
+ "flex size-4 items-center justify-center rounded-full p-[3px] group-hover:shadow-border",
40
+ u(e.serverOption.id) ? "bg-blue text-b-1" : "text-transparent"
41
+ ])
42
+ }, [
43
+ h(i(C), {
44
+ class: "relative top-[0.5px] size-2.5",
45
+ icon: "Checkmark",
46
+ thickness: "3.5"
47
+ })
48
+ ], 2),
49
+ l("span", g, w(e.serverOption.label), 1)
50
+ ]),
51
+ _: 1
52
+ }, 8, ["value"]));
53
+ }
54
+ });
55
+ export {
56
+ B as default
57
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./AddressBarServerItem.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -18,7 +18,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
18
18
  type?: string;
19
19
  nullable?: boolean;
20
20
  withVariables?: boolean;
21
- withServers?: boolean;
22
21
  }>, {
23
22
  disableCloseBrackets: boolean;
24
23
  disableEnter: boolean;
@@ -27,7 +26,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
27
26
  colorPicker: boolean;
28
27
  nullable: boolean;
29
28
  withVariables: boolean;
30
- withServers: boolean;
31
29
  }>, {
32
30
  focus: () => void;
33
31
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -52,7 +50,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
52
50
  type?: string;
53
51
  nullable?: boolean;
54
52
  withVariables?: boolean;
55
- withServers?: boolean;
56
53
  }>, {
57
54
  disableCloseBrackets: boolean;
58
55
  disableEnter: boolean;
@@ -61,12 +58,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
61
58
  colorPicker: boolean;
62
59
  nullable: boolean;
63
60
  withVariables: boolean;
64
- withServers: boolean;
65
61
  }>>> & {
66
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
67
62
  onSubmit?: ((v: string) => any) | undefined;
63
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
68
64
  }, {
69
- withServers: boolean;
70
65
  colorPicker: boolean;
71
66
  emitOnBlur: boolean;
72
67
  disableTabIndent: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OA0TO,EAGL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAA;;kBAeb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;kBACT,OAAO;;;;;;;;;;;;;;;;kBAlBP,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;kBACT,OAAO;;;;;;;;;;;;;;iBAAP,OAAO;iBAlBP,OAAO;gBAGR,OAAO;sBAGD,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;;qBA4RG,GAAG;kBACN,GAAG;;AAjT9B,wBAqVC;AAMD,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,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":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OAoVO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAcb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;;;;;;;;;;;;;;;kBAjBT,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;;;;;;;;;;;;;iBAjBT,OAAO;gBAGR,OAAO;sBAGD,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;;qBAoTG,GAAG;kBACN,GAAG;;AAzU9B,wBAsXC;AAMD,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,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"}
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d0793c7f"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-44609195"]]);
6
6
  export {
7
- _ as default
7
+ a as default
8
8
  };
@@ -1,20 +1,20 @@
1
- import { defineComponent as E, useAttrs as q, ref as y, toRef as o, watch as I, computed as M, openBlock as t, createElementBlock as s, Fragment as N, createBlock as v, mergeProps as T, unref as A, renderSlot as g, createCommentVNode as B } from "vue";
2
- import { useCodeMirror as U, colorPicker as W } from "@scalar/use-codemirror";
3
- import { nanoid as j } from "nanoid";
4
- import V from "../DataTable/DataTableInputSelect.vue.js";
5
- import { dropdownPlugin as z } from "./codeDropdownWidget.js";
6
- import { pillPlugin as D, backspaceCommand as G } from "./codeVariableWidget.js";
7
- import { useWorkspace as H } from "../../store/workspace.js";
8
- const J = ["id"], K = {
1
+ import { defineComponent as T, useAttrs as A, ref as a, toRef as l, watch as U, computed as _, openBlock as t, createElementBlock as s, Fragment as j, createBlock as c, mergeProps as Q, unref as r, renderSlot as C, createCommentVNode as m } from "vue";
2
+ import { useCodeMirror as W, useDropdown as z, colorPicker as G } from "@scalar/use-codemirror";
3
+ import { nanoid as H } from "nanoid";
4
+ import x from "../DataTable/DataTableInputSelect.vue.js";
5
+ import { pillPlugin as J, backspaceCommand as K } from "./codeVariableWidget.js";
6
+ import L from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
7
+ import { useWorkspace as X } from "../../store/store.js";
8
+ const Y = ["id"], Z = {
9
9
  key: 3,
10
10
  class: "absolute centered-y right-7 text-orange text-xs"
11
- }, L = {
11
+ }, ee = {
12
12
  key: 4,
13
13
  class: "required absolute centered-y right-0 pt-px pr-2 text-xxs text-c-3 bg-b-1 shadow-[-8px_0_4px_var(--scalar-background-1)] opacity-100 duration-150 transition-opacity peer-has-[.cm-focused]:opacity-0 pointer-events-none"
14
- }, Q = {
14
+ }, oe = {
15
15
  inheritAttrs: !1
16
- }, ae = /* @__PURE__ */ E({
17
- ...Q,
16
+ }, se = /* @__PURE__ */ T({
17
+ ...oe,
18
18
  __name: "CodeInput",
19
19
  props: {
20
20
  colorPicker: { type: Boolean, default: !1 },
@@ -34,101 +34,106 @@ const J = ["id"], K = {
34
34
  enum: {},
35
35
  type: {},
36
36
  nullable: { type: Boolean, default: !1 },
37
- withVariables: { type: Boolean, default: !0 },
38
- withServers: { type: Boolean, default: !1 }
37
+ withVariables: { type: Boolean, default: !0 }
39
38
  },
40
39
  emits: ["submit", "update:modelValue"],
41
- setup(k, { expose: w, emit: C }) {
42
- var b;
43
- const e = k, n = C, d = q(), _ = d.id || `id-${j()}`, p = y(!1), {
44
- activeWorkspace: x,
45
- activeParsedEnvironments: c,
46
- isReadOnly: F,
47
- environments: m,
48
- router: S
49
- } = H();
50
- function P(l) {
51
- return l === e.modelValue ? null : e.handleFieldChange ? e.handleFieldChange(l) : n("update:modelValue", l);
40
+ setup(F, { expose: P, emit: S }) {
41
+ var B;
42
+ const e = F, u = S, f = A(), q = f.id || `id-${H()}`, b = a(!1), y = a(!1), h = a(""), v = a({ left: 0, top: 0 }), { activeEnvVariables: g, isReadOnly: V, environments: E, router: $ } = X();
43
+ function O(o) {
44
+ return o === e.modelValue ? null : e.handleFieldChange ? e.handleFieldChange(o) : u("update:modelValue", o);
52
45
  }
53
- function O(l) {
54
- return e.handleFieldSubmit ? e.handleFieldSubmit(l) : n("submit", l);
46
+ function R(o) {
47
+ return e.handleFieldSubmit ? e.handleFieldSubmit(o) : u("submit", o);
55
48
  }
56
- function R(l) {
57
- p.value = !1, e.emitOnBlur && e.modelValue && O(l);
49
+ function D(o) {
50
+ b.value = !1, e.emitOnBlur && e.modelValue && R(o);
58
51
  }
59
- const r = [];
60
- e.colorPicker && r.push(W), e.withVariables && !x.value.isReadOnly && r.push(
61
- z({
62
- withServers: e.withServers,
63
- activeParsedEnvironments: c,
64
- environments: m,
65
- router: S
66
- })
67
- ), r.push(
68
- D({ environments: m, activeParsedEnvironments: c, isReadOnly: F }),
69
- G
52
+ const d = [];
53
+ e.colorPicker && d.push(G), d.push(
54
+ J({
55
+ environments: E,
56
+ activeEnvVariables: g,
57
+ isReadOnly: V
58
+ }),
59
+ K
70
60
  );
71
- const f = y(null), { codeMirror: a } = U({
72
- content: o(
61
+ const w = a(null), { codeMirror: n } = W({
62
+ content: l(
73
63
  () => e.modelValue !== void 0 ? String(e.modelValue) : ""
74
64
  ),
75
- onChange: P,
76
- onFocus: () => p.value = !0,
77
- onBlur: (l) => R(l),
78
- codeMirrorRef: f,
79
- disableTabIndent: o(() => e.disableTabIndent),
80
- disableEnter: o(() => e.disableEnter),
81
- disableCloseBrackets: o(() => e.disableCloseBrackets),
82
- lineNumbers: o(() => e.lineNumbers),
83
- language: o(() => e.language),
84
- lint: o(() => e.lint),
85
- extensions: r,
86
- placeholder: o(() => e.placeholder)
65
+ onChange: (o) => {
66
+ O(o), M();
67
+ },
68
+ onFocus: () => b.value = !0,
69
+ onBlur: (o) => D(o),
70
+ codeMirrorRef: w,
71
+ disableTabIndent: l(() => e.disableTabIndent),
72
+ disableEnter: l(() => e.disableEnter),
73
+ disableCloseBrackets: l(() => e.disableCloseBrackets),
74
+ lineNumbers: l(() => e.lineNumbers),
75
+ language: l(() => e.language),
76
+ lint: l(() => e.lint),
77
+ extensions: d,
78
+ placeholder: l(() => e.placeholder)
87
79
  });
88
- (b = a.value) == null || b.focus(), I(a, () => {
89
- a.value && Object.prototype.hasOwnProperty.call(d, "autofocus") && a.value.focus();
80
+ (B = n.value) == null || B.focus(), U(n, () => {
81
+ n.value && Object.prototype.hasOwnProperty.call(f, "autofocus") && n.value.focus();
90
82
  });
91
- const $ = M(() => {
92
- var l;
93
- return e.type === "boolean" || (l = e.type) != null && l.includes("boolean") || e.nullable ? ["true", "false", "null"] : ["true", "false"];
83
+ const { handleDropdownSelect: I, updateDropdownVisibility: M } = z({
84
+ codeMirror: n,
85
+ query: h,
86
+ showDropdown: y,
87
+ dropdownPosition: v
88
+ }), N = _(() => {
89
+ var o;
90
+ return e.type === "boolean" || (o = e.type) != null && o.includes("boolean") || e.nullable ? ["true", "false", "null"] : ["true", "false"];
94
91
  });
95
- return w({
92
+ return P({
96
93
  focus: () => {
97
- var l;
98
- (l = a.value) == null || l.focus();
94
+ var o;
95
+ (o = n.value) == null || o.focus();
99
96
  }
100
- }), (l, u) => {
101
- var h;
102
- return t(), s(N, null, [
103
- e.enum && e.enum.length ? (t(), v(V, {
97
+ }), (o, i) => {
98
+ var k;
99
+ return t(), s(j, null, [
100
+ e.enum && e.enum.length ? (t(), c(x, {
104
101
  key: 0,
105
102
  modelValue: e.modelValue,
106
103
  value: e.enum,
107
- "onUpdate:modelValue": u[0] || (u[0] = (i) => n("update:modelValue", i))
108
- }, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (h = e.type) != null && h.includes("boolean") ? (t(), v(V, {
104
+ "onUpdate:modelValue": i[0] || (i[0] = (p) => u("update:modelValue", p))
105
+ }, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (k = e.type) != null && k.includes("boolean") ? (t(), c(x, {
109
106
  key: 1,
110
107
  modelValue: e.modelValue,
111
- value: $.value,
112
- "onUpdate:modelValue": u[1] || (u[1] = (i) => n("update:modelValue", i))
113
- }, null, 8, ["modelValue", "value"])) : (t(), s("div", T({
108
+ value: N.value,
109
+ "onUpdate:modelValue": i[1] || (i[1] = (p) => u("update:modelValue", p))
110
+ }, null, 8, ["modelValue", "value"])) : (t(), s("div", Q({
114
111
  key: 2,
115
- id: A(_)
116
- }, l.$attrs, {
112
+ id: r(q)
113
+ }, o.$attrs, {
117
114
  ref_key: "codeMirrorRef",
118
- ref: f,
115
+ ref: w,
119
116
  class: ["peer font-code w-full whitespace-nowrap overflow-hidden text-xs leading-[1.44] relative", {
120
- "flow-code-input--error": l.error
117
+ "flow-code-input--error": o.error
121
118
  }]
122
- }), null, 16, J)),
123
- l.$slots.warning ? (t(), s("div", K, [
124
- g(l.$slots, "warning", {}, void 0, !0)
125
- ])) : B("", !0),
126
- g(l.$slots, "icon", {}, void 0, !0),
127
- l.required ? (t(), s("div", L, " Required ")) : B("", !0)
119
+ }), null, 16, Y)),
120
+ o.$slots.warning ? (t(), s("div", Z, [
121
+ C(o.$slots, "warning", {}, void 0, !0)
122
+ ])) : m("", !0),
123
+ C(o.$slots, "icon", {}, void 0, !0),
124
+ o.required ? (t(), s("div", ee, " Required ")) : m("", !0),
125
+ y.value && e.withVariables && !r(V) ? (t(), c(L, {
126
+ key: 5,
127
+ activeEnvVariables: _(() => r(g)),
128
+ dropdownPosition: v.value,
129
+ query: h.value,
130
+ router: r($),
131
+ onSelect: r(I)
132
+ }, null, 8, ["activeEnvVariables", "dropdownPosition", "query", "router", "onSelect"])) : m("", !0)
128
133
  ], 64);
129
134
  };
130
135
  }
131
136
  });
132
137
  export {
133
- ae as default
138
+ se as default
134
139
  };
@@ -1,11 +1,11 @@
1
- import type { WorkspaceStore } from '../../store/workspace.js';
2
- import type { Environment } from '@scalar/oas-utils/entities/workspace/environment';
1
+ import type { WorkspaceStore } from '../../store/index.js';
2
+ import type { Environment } from '@scalar/oas-utils/entities/environment';
3
3
  import { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate } from '@scalar/use-codemirror';
4
- type ActiveParsedEnvironments = WorkspaceStore['activeParsedEnvironments'];
4
+ type ActiveParsedEnvironments = WorkspaceStore['activeEnvVariables'];
5
5
  type IsReadOnly = WorkspaceStore['isReadOnly'];
6
6
  export declare const pillPlugin: (props: {
7
7
  environments: Record<string, Environment>;
8
- activeParsedEnvironments: ActiveParsedEnvironments;
8
+ activeEnvVariables: ActiveParsedEnvironments;
9
9
  isReadOnly: IsReadOnly;
10
10
  }) => ViewPlugin<{
11
11
  decorations: DecorationSet;
@@ -1 +1 @@
1
- {"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AACnF,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAuB/B,KAAK,wBAAwB,GAAG,cAAc,CAAC,0BAA0B,CAAC,CAAA;AAC1E,KAAK,UAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAA;AA2G9C,eAAO,MAAM,UAAU,UAAW;IAChC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACzC,wBAAwB,EAAE,wBAAwB,CAAA;IAClD,UAAU,EAAE,UAAU,CAAA;CACvB;iBAGkB,aAAa;mBAMX,UAAU;2BAMF,UAAU;EAkCpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
1
+ {"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEzE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAG/B,KAAK,wBAAwB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAA;AACpE,KAAK,UAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAA;AAiH9C,eAAO,MAAM,UAAU,UAAW;IAChC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACzC,kBAAkB,EAAE,wBAAwB,CAAA;IAC5C,UAAU,EAAE,UAAU,CAAA;CACvB;iBAGkB,aAAa;mBAMX,UAAU;2BAMF,UAAU;EAiCpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
@@ -1,34 +1,41 @@
1
- var p = Object.defineProperty;
2
- var v = (n, e, t) => e in n ? p(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var r = (n, e, t) => v(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { ScalarButton as f, ScalarIcon as g, ScalarTooltip as b } from "@scalar/components";
1
+ var v = Object.defineProperty;
2
+ var u = (n, t, e) => t in n ? v(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var l = (n, t, e) => u(n, typeof t != "symbol" ? t + "" : t, e);
4
+ import { ScalarButton as h, ScalarIcon as f, ScalarTooltip as b } from "@scalar/components";
5
+ import { variableRegex as g } from "@scalar/oas-utils/helpers";
5
6
  import { ViewPlugin as x, RangeSetBuilder as y, Decoration as w, EditorView as N, WidgetType as E } from "@scalar/use-codemirror";
6
- import { defineComponent as C, h as i, createApp as D } from "vue";
7
- const S = (n, e) => "_scalarEnvId" in n ? `bg-${e[n._scalarEnvId].color}` : "bg-grey";
8
- class d extends E {
9
- constructor(t, a, s, o) {
7
+ import { defineComponent as V, h as o, createApp as C } from "vue";
8
+ import { parseEnvVariables as k } from "../../libs/environment-parser.js";
9
+ const D = (n) => {
10
+ var e;
11
+ return ((e = n.value.find(
12
+ (a) => a.key === "color"
13
+ )) == null ? void 0 : e.value) || "grey";
14
+ };
15
+ class c extends E {
16
+ constructor(e, a, i, s) {
10
17
  super();
11
- r(this, "app");
12
- r(this, "environments");
13
- r(this, "activeParsedEnvironments");
14
- r(this, "isReadOnly");
15
- this.variableName = t, this.variableName = t, this.environments = a, this.activeParsedEnvironments = s, this.isReadOnly = o;
18
+ l(this, "app");
19
+ l(this, "environments");
20
+ l(this, "activeEnvVariables");
21
+ l(this, "isReadOnly");
22
+ this.variableName = e, this.variableName = e, this.environments = a, this.activeEnvVariables = i, this.isReadOnly = s;
16
23
  }
17
24
  toDOM() {
18
- const t = document.createElement("span");
19
- t.className = "cm-pill", t.textContent = `${this.variableName}`;
20
- const a = C({
25
+ const e = document.createElement("span");
26
+ e.className = "cm-pill", e.textContent = `${this.variableName}`;
27
+ const a = V({
21
28
  props: { variableName: { type: String, default: null } },
22
29
  render: () => {
23
- const s = this.activeParsedEnvironments.value.find(
24
- (c) => c.key === this.variableName
30
+ const i = k(this.activeEnvVariables.value).find(
31
+ (r) => r.key === this.variableName
25
32
  );
26
- s && (t.className += ` ${S(s, this.environments)}`);
27
- const o = s ? i("div", { class: "p-2" }, s.value) : i("div", { class: "divide-y divide-1/2 grid" }, [
28
- i("span", { class: "p-2" }, "Variable not found"),
29
- !this.isReadOnly && i("div", { class: "p-1" }, [
30
- i(
31
- f,
33
+ i && (e.className += ` bg-${D(this.activeEnvVariables)}`);
34
+ const s = i ? o("div", { class: "p-2" }, i.value) : o("div", { class: "divide-y divide-1/2 grid" }, [
35
+ o("span", { class: "p-2" }, "Variable not found"),
36
+ !this.isReadOnly && o("div", { class: "p-1" }, [
37
+ o(
38
+ h,
32
39
  {
33
40
  class: "gap-1.5 justify-start font-normal px-1 py-1.5 h-auto transition-colors rounded no-underline text-xxs w-full hover:bg-b-2",
34
41
  variant: "ghost",
@@ -37,13 +44,13 @@ class d extends E {
37
44
  }
38
45
  },
39
46
  [
40
- i(g, { class: "w-2", icon: "Add", size: "xs" }),
47
+ o(f, { class: "w-2", icon: "Add", size: "xs" }),
41
48
  "Add variable"
42
49
  ]
43
50
  )
44
51
  ])
45
52
  ]);
46
- return i(
53
+ return o(
47
54
  b,
48
55
  {
49
56
  align: "start",
@@ -53,54 +60,54 @@ class d extends E {
53
60
  sideOffset: 6
54
61
  },
55
62
  {
56
- trigger: () => i("span", `${this.variableName}`),
57
- content: () => i(
63
+ trigger: () => o("span", `${this.variableName}`),
64
+ content: () => o(
58
65
  "div",
59
66
  {
60
67
  class: "w-content shadow-lg rounded bg-b-1 text-xxs leading-5 text-c-1"
61
68
  },
62
- o
69
+ s
63
70
  )
64
71
  }
65
72
  );
66
73
  }
67
74
  });
68
- return this.app = D(a, { variableName: this.variableName }), this.app.mount(t), t;
75
+ return this.app = C(a, { variableName: this.variableName }), this.app.mount(e), e;
69
76
  }
70
77
  destroy() {
71
78
  this.app && this.app.unmount();
72
79
  }
73
- eq(t) {
74
- return t instanceof d && t.variableName === this.variableName;
80
+ eq(e) {
81
+ return e instanceof c && e.variableName === this.variableName;
75
82
  }
76
83
  ignoreEvent() {
77
84
  return !1;
78
85
  }
79
86
  }
80
- const $ = (n) => x.fromClass(
87
+ const P = (n) => x.fromClass(
81
88
  class {
82
- constructor(e) {
83
- r(this, "decorations");
84
- this.decorations = this.buildDecorations(e);
89
+ constructor(t) {
90
+ l(this, "decorations");
91
+ this.decorations = this.buildDecorations(t);
85
92
  }
86
- update(e) {
87
- (e.docChanged || e.viewportChanged) && (this.decorations = this.buildDecorations(e.view));
93
+ update(t) {
94
+ (t.docChanged || t.viewportChanged) && (this.decorations = this.buildDecorations(t.view));
88
95
  }
89
- buildDecorations(e) {
90
- const t = new y();
91
- for (const { from: a, to: s } of e.visibleRanges) {
92
- const o = e.state.doc.sliceString(a, s), c = /{{(.*?)}}/g;
93
- let l;
94
- for (; (l = c.exec(o)) !== null; ) {
95
- const m = a + l.index, u = m + l[0].length, h = l[1];
96
- t.add(
96
+ buildDecorations(t) {
97
+ const e = new y();
98
+ for (const { from: a, to: i } of t.visibleRanges) {
99
+ const s = t.state.doc.sliceString(a, i);
100
+ let r;
101
+ for (; (r = g.exec(s)) !== null; ) {
102
+ const d = a + r.index, m = d + r[0].length, p = r[1];
103
+ e.add(
104
+ d,
97
105
  m,
98
- u,
99
106
  w.widget({
100
- widget: new d(
101
- h,
107
+ widget: new c(
108
+ p,
102
109
  n.environments,
103
- n.activeParsedEnvironments,
110
+ n.activeEnvVariables,
104
111
  n.isReadOnly
105
112
  ),
106
113
  side: 1
@@ -108,24 +115,24 @@ const $ = (n) => x.fromClass(
108
115
  );
109
116
  }
110
117
  }
111
- return t.finish();
118
+ return e.finish();
112
119
  }
113
120
  },
114
121
  {
115
- decorations: (e) => e.decorations
122
+ decorations: (t) => t.decorations
116
123
  }
117
- ), A = N.domEventHandlers({
118
- keydown(n, e) {
124
+ ), T = N.domEventHandlers({
125
+ keydown(n, t) {
119
126
  if (n.key === "Backspace") {
120
- const { state: t } = e, { from: a, to: s } = t.selection.main;
121
- if (a === 0 && s === t.doc.length)
122
- return e.dispatch({
123
- changes: { from: 0, to: t.doc.length },
127
+ const { state: e } = t, { from: a, to: i } = e.selection.main;
128
+ if (a === 0 && i === e.doc.length)
129
+ return t.dispatch({
130
+ changes: { from: 0, to: e.doc.length },
124
131
  selection: { anchor: 0 }
125
132
  }), n.preventDefault(), !0;
126
- if (a === s && a > 0 && t.doc.sliceString(a - 2, a) === "}}")
127
- return e.dispatch({
128
- changes: { from: a - 2, to: s },
133
+ if (a === i && a > 0 && e.doc.sliceString(a - 2, a) === "}}")
134
+ return t.dispatch({
135
+ changes: { from: a - 2, to: i },
129
136
  selection: { anchor: a - 2 }
130
137
  }), n.preventDefault(), !0;
131
138
  }
@@ -133,6 +140,6 @@ const $ = (n) => x.fromClass(
133
140
  }
134
141
  });
135
142
  export {
136
- A as backspaceCommand,
137
- $ as pillPlugin
143
+ T as backspaceCommand,
144
+ P as pillPlugin
138
145
  };
@@ -0,0 +1,33 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ options?(_: {}): any;
4
+ submit?(_: {}): any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
7
+ disabled?: boolean;
8
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ submit: () => void;
10
+ cancel: () => void;
11
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
12
+ disabled?: boolean;
13
+ }>>> & {
14
+ onSubmit?: (() => any) | undefined;
15
+ onCancel?: (() => any) | undefined;
16
+ }, {}, {}>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
24
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
+ type __VLS_TypePropsToOption<T> = {
26
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
27
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
28
+ } : {
29
+ type: import('vue').PropType<T[K]>;
30
+ required: true;
31
+ };
32
+ };
33
+ //# sourceMappingURL=CommandActionForm.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionForm.vue"],"names":[],"mappings":"AAuDA,iBAAS,cAAc;qBA8DM,GAAG;qBACH,GAAG;oBACJ,GAAG;EAgB9B;AACD,QAAA,MAAM,eAAe;eAhGR,OAAO;;;;;eAAP,OAAO;;;;UAuGlB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,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"}
@@ -0,0 +1,41 @@
1
+ import { defineComponent as n, openBlock as i, createElementBlock as a, withKeys as d, withModifiers as l, createElementVNode as o, renderSlot as s, createVNode as r, unref as m, withCtx as p, createTextVNode as f } from "vue";
2
+ import { ScalarButton as u } from "@scalar/components";
3
+ const c = { class: "gap-3 rounded min-h-20 relative" }, b = { class: "flex gap-2" }, x = { class: "flex flex-1 max-h-8" }, $ = /* @__PURE__ */ n({
4
+ __name: "CommandActionForm",
5
+ props: {
6
+ disabled: { type: Boolean }
7
+ },
8
+ emits: ["submit", "cancel"],
9
+ setup(h) {
10
+ return (e, t) => (i(), a("form", {
11
+ class: "flex w-full flex-col gap-3",
12
+ onKeydown: t[0] || (t[0] = d(l(() => {
13
+ }, ["stop"]), ["enter"])),
14
+ onSubmit: t[1] || (t[1] = l((v) => e.$emit("submit"), ["prevent", "stop"]))
15
+ }, [
16
+ o("div", c, [
17
+ s(e.$slots, "default")
18
+ ]),
19
+ o("div", b, [
20
+ o("div", x, [
21
+ s(e.$slots, "options")
22
+ ]),
23
+ r(m(u), {
24
+ class: "max-h-8 text-xs p-0 px-3",
25
+ disabled: e.disabled,
26
+ type: "submit"
27
+ }, {
28
+ default: p(() => [
29
+ s(e.$slots, "submit", {}, () => [
30
+ f("Continue")
31
+ ])
32
+ ]),
33
+ _: 3
34
+ }, 8, ["disabled"])
35
+ ])
36
+ ], 32));
37
+ }
38
+ });
39
+ export {
40
+ $ as default
41
+ };