@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,130 +1,117 @@
1
- import { defineComponent as K, ref as d, computed as v, onMounted as W, openBlock as k, createElementBlock as P, createElementVNode as n, withDirectives as $, withKeys as G, withModifiers as H, vModelText as L, createVNode as s, unref as u, withCtx as r, normalizeClass as M, toDisplayString as S, createBlock as O, createCommentVNode as A, createTextVNode as J } from "vue";
2
- import Q from "../HttpMethod/HttpMethod.vue.js";
3
- import { useWorkspace as X } from "../../store/workspace.js";
4
- import { ScalarListbox as U, ScalarButton as p, ScalarIcon as N } from "@scalar/components";
5
- import { useToasts as Y } from "@scalar/use-toasts";
6
- import { useRouter as Z } from "vue-router";
7
- const ee = { class: "flex w-full flex-col gap-3" }, te = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, le = /* @__PURE__ */ n("label", {
8
- class: "absolute w-full h-full opacity-0 cursor-text",
9
- for: "requestname"
10
- }, null, -1), ae = ["onKeydown"], oe = { class: "flex" }, se = { class: "flex flex-1 gap-2 max-h-8" }, me = /* @__PURE__ */ K({
1
+ import { defineComponent as P, ref as c, computed as g, openBlock as x, createBlock as h, withCtx as u, createElementVNode as f, createVNode as i, unref as n, normalizeClass as C, toDisplayString as V, createCommentVNode as W, createTextVNode as j } from "vue";
2
+ import E from "../HttpMethod/HttpMethod.vue.js";
3
+ import { ScalarListbox as q, ScalarButton as _, ScalarIcon as w } from "@scalar/components";
4
+ import { useToasts as H } from "@scalar/use-toasts";
5
+ import { useRouter as I } from "vue-router";
6
+ import L from "./CommandActionForm.vue.js";
7
+ import A from "./CommandActionInput.vue.js";
8
+ import { isHTTPMethod as F } from "../HttpMethod/helpers.js";
9
+ import { useWorkspace as G } from "../../store/store.js";
10
+ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
11
11
  __name: "CommandPaletteRequest",
12
+ props: {
13
+ metaData: {}
14
+ },
12
15
  emits: ["close"],
13
- setup(ue, { emit: R }) {
14
- var C, q;
15
- const I = R, { push: B } = Z(), { toast: D } = Y(), {
16
- activeCollection: E,
17
- activeWorkspace: T,
18
- activeWorkspaceCollections: h,
19
- requestMutators: j,
20
- activeRequest: z,
21
- folders: x
22
- } = X(), a = d(""), m = d("GET"), c = d(((C = E.value) == null ? void 0 : C.uid) ?? ""), b = v(
23
- () => h.value.map((e) => {
24
- var t;
16
+ setup(D, { emit: S }) {
17
+ const r = D, k = S, { push: M } = I(), { toast: N } = H(), {
18
+ activeCollection: R,
19
+ activeWorkspace: U,
20
+ activeWorkspaceCollections: b,
21
+ requestMutators: T,
22
+ activeRequest: y,
23
+ tags: $
24
+ } = G(), o = c(""), d = c("get"), v = g(
25
+ () => b.value.map((t) => {
26
+ var e;
25
27
  return {
26
- id: e.uid,
27
- label: ((t = e.spec.info) == null ? void 0 : t.title) ?? "Unititled Collection"
28
+ id: t.uid,
29
+ label: ((e = t.info) == null ? void 0 : e.title) ?? "Unititled Collection"
28
30
  };
29
31
  })
30
- ), i = v({
31
- get: () => b.value.find(({ id: e }) => e === c.value),
32
- set: (e) => {
33
- e != null && e.id && (c.value = e.id);
34
- }
35
- }), f = v(
36
- () => h.value.flatMap(
37
- (e) => e.uid === c.value ? e.childUids.flatMap((t) => {
38
- const l = x[t];
39
- return l ? [
40
- {
41
- id: l.uid,
42
- label: l.name
43
- }
44
- ] : [];
45
- }) : []
32
+ ), m = g(
33
+ () => b.value.flatMap(
34
+ (t) => {
35
+ var e;
36
+ return t.uid === ((e = l.value) == null ? void 0 : e.id) ? t.tags.flatMap((a) => {
37
+ const p = $[a];
38
+ return p ? [
39
+ {
40
+ id: p.uid,
41
+ label: p.name
42
+ }
43
+ ] : [];
44
+ }) : [];
45
+ }
46
46
  )
47
- ), _ = d(
48
- ((q = Object.values(x).find(
49
- (e) => {
50
- var t;
51
- return e.childUids.includes((t = z.value) == null ? void 0 : t.uid);
47
+ ), l = c(
48
+ r.metaData ? v.value.find(
49
+ (t) => {
50
+ var e, a;
51
+ return t.id === ((e = r.metaData) == null ? void 0 : e.itemUid) || t.id === ((a = r.metaData) == null ? void 0 : a.parentUid);
52
52
  }
53
- )) == null ? void 0 : q.uid) ?? ""
54
- ), o = v({
55
- get: () => f.value.find(({ id: e }) => e === _.value),
56
- set: (e) => {
57
- e != null && e.id && (_.value = e.id);
58
- }
59
- });
60
- function F(e) {
61
- m.value = e;
62
- }
63
- const w = () => {
64
- var l, y, V;
65
- if (!a.value.trim()) {
66
- D("Please enter a name before creating a request.", "error");
53
+ ) : v.value.find(
54
+ (t) => {
55
+ var e;
56
+ return t.id === ((e = R.value) == null ? void 0 : e.uid);
57
+ }
58
+ )
59
+ ), s = c(
60
+ r.metaData ? m.value.find((t) => {
61
+ var e;
62
+ return t.id === ((e = r.metaData) == null ? void 0 : e.itemUid);
63
+ }) : m.value.find((t) => {
64
+ var e, a;
65
+ return t.label === ((a = (e = y.value) == null ? void 0 : e.tags) == null ? void 0 : a[0]);
66
+ })
67
+ ), z = (t) => d.value = t, B = () => {
68
+ var e;
69
+ if (!o.value.trim()) {
70
+ N("Please enter a name before creating a request.", "error");
67
71
  return;
68
72
  }
69
- if (!c.value && !((l = o.value) != null && l.id)) return;
70
- const e = ((y = o.value) == null ? void 0 : y.id) ?? ((V = i.value) == null ? void 0 : V.id), t = j.add(
73
+ if (!((e = l.value) != null && e.id) || !F(d.value))
74
+ return;
75
+ const t = T.add(
71
76
  {
72
77
  path: "",
73
- method: m.value.toUpperCase(),
74
- description: a.value,
75
- operationId: a.value,
76
- summary: a.value,
77
- tags: ["default"]
78
+ method: d.value,
79
+ description: o.value,
80
+ operationId: o.value,
81
+ summary: o.value,
82
+ tags: s.value ? [s.value.label] : []
78
83
  },
79
- e
84
+ l.value.id
80
85
  );
81
- B(`/workspace/${T.value.uid}/request/${t.uid}`), I("close");
82
- }, g = d(null);
83
- return W(() => {
84
- var e;
85
- (e = g.value) == null || e.focus();
86
- }), (e, t) => (k(), P("div", ee, [
87
- n("div", te, [
88
- le,
89
- $(n("input", {
90
- id: "requestname",
91
- ref_key: "requestInput",
92
- ref: g,
93
- "onUpdate:modelValue": t[0] || (t[0] = (l) => a.value = l),
94
- autocomplete: "off",
95
- class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
96
- "data-form-type": "other",
97
- "data-lpignore": "true",
98
- label: "Request Name",
99
- placeholder: "Request Name",
100
- onKeydown: G(H(w, ["prevent"]), ["enter"])
101
- }, null, 40, ae), [
102
- [L, a.value]
103
- ])
104
- ]),
105
- n("div", oe, [
106
- n("div", se, [
107
- s(Q, {
86
+ t && M(`/workspace/${U.value.uid}/request/${t.uid}`), k("close");
87
+ };
88
+ return (t, e) => (x(), h(L, {
89
+ disabled: !o.value.trim(),
90
+ onSubmit: B
91
+ }, {
92
+ options: u(() => [
93
+ f("div", J, [
94
+ i(E, {
108
95
  isEditable: !0,
109
96
  isSquare: "",
110
- method: m.value,
111
- onChange: F
97
+ method: d.value,
98
+ onChange: z
112
99
  }, null, 8, ["method"]),
113
- s(u(U), {
114
- modelValue: i.value,
115
- "onUpdate:modelValue": t[1] || (t[1] = (l) => i.value = l),
116
- options: b.value
100
+ i(n(q), {
101
+ modelValue: l.value,
102
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => l.value = a),
103
+ options: v.value
117
104
  }, {
118
- default: r(() => [
119
- s(u(p), {
105
+ default: u(() => [
106
+ i(n(_), {
120
107
  class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
121
108
  variant: "outlined"
122
109
  }, {
123
- default: r(() => [
124
- n("span", {
125
- class: M(i.value ? "text-c-1" : "text-c-3")
126
- }, S(i.value ? i.value.label : "Select Collection"), 3),
127
- s(u(N), {
110
+ default: u(() => [
111
+ f("span", {
112
+ class: C(l.value ? "text-c-1" : "text-c-3")
113
+ }, V(l.value ? l.value.label : "Select Collection"), 3),
114
+ i(n(w), {
128
115
  class: "text-c-3",
129
116
  icon: "ChevronDown",
130
117
  size: "xs"
@@ -135,22 +122,22 @@ const ee = { class: "flex w-full flex-col gap-3" }, te = { class: "gap-3 rounded
135
122
  ]),
136
123
  _: 1
137
124
  }, 8, ["modelValue", "options"]),
138
- f.value.length ? (k(), O(u(U), {
125
+ m.value.length ? (x(), h(n(q), {
139
126
  key: 0,
140
- modelValue: o.value,
141
- "onUpdate:modelValue": t[2] || (t[2] = (l) => o.value = l),
142
- options: f.value
127
+ modelValue: s.value,
128
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => s.value = a),
129
+ options: m.value
143
130
  }, {
144
- default: r(() => [
145
- s(u(p), {
131
+ default: u(() => [
132
+ i(n(_), {
146
133
  class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
147
134
  variant: "outlined"
148
135
  }, {
149
- default: r(() => [
150
- n("span", {
151
- class: M(o.value ? "text-c-1" : "text-c-3")
152
- }, S(o.value ? o.value.label : "Select Folder"), 3),
153
- s(u(N), {
136
+ default: u(() => [
137
+ f("span", {
138
+ class: C(s.value ? "text-c-1" : "text-c-3")
139
+ }, V(s.value ? s.value.label : "Select Tag"), 3),
140
+ i(n(w), {
154
141
  class: "text-c-3",
155
142
  icon: "ChevronDown",
156
143
  size: "xs"
@@ -160,22 +147,24 @@ const ee = { class: "flex w-full flex-col gap-3" }, te = { class: "gap-3 rounded
160
147
  })
161
148
  ]),
162
149
  _: 1
163
- }, 8, ["modelValue", "options"])) : A("", !0)
164
- ]),
165
- s(u(p), {
166
- class: "max-h-8 text-xs p-0 px-3",
167
- disabled: !a.value.trim(),
168
- onClick: w
169
- }, {
170
- default: r(() => [
171
- J(" Create Request ")
172
- ]),
173
- _: 1
174
- }, 8, ["disabled"])
175
- ])
176
- ]));
150
+ }, 8, ["modelValue", "options"])) : W("", !0)
151
+ ])
152
+ ]),
153
+ submit: u(() => [
154
+ j("Create Request")
155
+ ]),
156
+ default: u(() => [
157
+ i(A, {
158
+ modelValue: o.value,
159
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => o.value = a),
160
+ label: "Request Name",
161
+ placeholder: "Request Name"
162
+ }, null, 8, ["modelValue"])
163
+ ]),
164
+ _: 1
165
+ }, 8, ["disabled"]));
177
166
  }
178
167
  });
179
168
  export {
180
- me as default
169
+ le as default
181
170
  };
@@ -4,4 +4,4 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
4
4
  onClose?: (() => any) | undefined;
5
5
  }, {}, {}>;
6
6
  export default _default;
7
- //# sourceMappingURL=CommandPaletteFolder.vue.d.ts.map
7
+ //# sourceMappingURL=CommandPaletteServer.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":";;;;;AAqSA,wBAMG"}
@@ -0,0 +1,92 @@
1
+ import { defineComponent as S, ref as u, computed as C, openBlock as _, createBlock as V, withCtx as r, createVNode as i, unref as s, createElementVNode as U, normalizeClass as g, toDisplayString as k, createTextVNode as w } from "vue";
2
+ import { ScalarListbox as h, ScalarButton as B, ScalarIcon as D } from "@scalar/components";
3
+ import { useToasts as L } from "@scalar/use-toasts";
4
+ import M from "./CommandActionForm.vue.js";
5
+ import N from "./CommandActionInput.vue.js";
6
+ import { useWorkspace as y } from "../../store/store.js";
7
+ const E = /* @__PURE__ */ S({
8
+ __name: "CommandPaletteServer",
9
+ emits: ["close"],
10
+ setup(z, { emit: c }) {
11
+ const d = c, { toast: m } = L(), {
12
+ activeCollection: v,
13
+ activeWorkspaceCollections: f,
14
+ collectionMutators: p,
15
+ serverMutators: b
16
+ } = y(), a = u(""), n = C(
17
+ () => f.value.flatMap(
18
+ (t) => {
19
+ var e, l;
20
+ return ((e = t.info) == null ? void 0 : e.title) === "Drafts" ? [] : {
21
+ id: t.uid,
22
+ label: ((l = t.info) == null ? void 0 : l.title) ?? "Unititled Collection"
23
+ };
24
+ }
25
+ )
26
+ ), o = u(
27
+ n.value.find(
28
+ (t) => {
29
+ var e;
30
+ return t.id === ((e = v.value) == null ? void 0 : e.uid);
31
+ }
32
+ )
33
+ ), x = () => {
34
+ var l;
35
+ if (!a.value.trim()) {
36
+ m("Please enter a valid url before creating a server.", "error");
37
+ return;
38
+ }
39
+ const t = (l = o.value) == null ? void 0 : l.id;
40
+ if (!t) return;
41
+ const e = b.add({ url: a.value }, t);
42
+ p.edit(t, "selectedServerUid", e.uid), d("close");
43
+ };
44
+ return (t, e) => (_(), V(M, {
45
+ disabled: !a.value.trim(),
46
+ onSubmit: x
47
+ }, {
48
+ options: r(() => [
49
+ i(s(h), {
50
+ modelValue: o.value,
51
+ "onUpdate:modelValue": e[1] || (e[1] = (l) => o.value = l),
52
+ options: n.value
53
+ }, {
54
+ default: r(() => [
55
+ i(s(B), {
56
+ class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
57
+ variant: "outlined"
58
+ }, {
59
+ default: r(() => [
60
+ U("span", {
61
+ class: g(o.value ? "text-c-1" : "text-c-3")
62
+ }, k(o.value ? o.value.label : "Select Collection"), 3),
63
+ i(s(D), {
64
+ class: "text-c-3",
65
+ icon: "ChevronDown",
66
+ size: "xs"
67
+ })
68
+ ]),
69
+ _: 1
70
+ })
71
+ ]),
72
+ _: 1
73
+ }, 8, ["modelValue", "options"])
74
+ ]),
75
+ submit: r(() => [
76
+ w("Create Server")
77
+ ]),
78
+ default: r(() => [
79
+ i(N, {
80
+ modelValue: a.value,
81
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => a.value = l),
82
+ label: "Server URL",
83
+ placeholder: "Server URL"
84
+ }, null, 8, ["modelValue"])
85
+ ]),
86
+ _: 1
87
+ }, 8, ["disabled"]));
88
+ }
89
+ });
90
+ export {
91
+ E as default
92
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CommandPaletteServer.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
+ close: () => void;
3
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
4
+ onClose?: (() => any) | undefined;
5
+ }, {}, {}>;
6
+ export default _default;
7
+ //# sourceMappingURL=CommandPaletteTag.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPaletteTag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteTag.vue"],"names":[],"mappings":";;;;;AA+QA,wBAMG"}
@@ -0,0 +1,87 @@
1
+ import { defineComponent as g, computed as x, ref as u, openBlock as C, createBlock as _, withCtx as o, createVNode as n, unref as i, createElementVNode as V, normalizeClass as S, toDisplayString as T, createTextVNode as N } from "vue";
2
+ import { ScalarListbox as k, ScalarButton as w, ScalarIcon as h } from "@scalar/components";
3
+ import { useToasts as B } from "@scalar/use-toasts";
4
+ import y from "./CommandActionForm.vue.js";
5
+ import z from "./CommandActionInput.vue.js";
6
+ import { useWorkspace as D } from "../../store/store.js";
7
+ const L = /* @__PURE__ */ g({
8
+ __name: "CommandPaletteTag",
9
+ emits: ["close"],
10
+ setup(P, { emit: m }) {
11
+ const c = m, { activeWorkspaceCollections: d, activeCollection: p, tagMutators: f } = D(), { toast: v } = B(), r = x(
12
+ () => d.value.map((l) => {
13
+ var e;
14
+ return {
15
+ id: l.uid,
16
+ label: ((e = l.info) == null ? void 0 : e.title) ?? ""
17
+ };
18
+ })
19
+ ), t = u(""), a = u(
20
+ r.value.find(
21
+ (l) => {
22
+ var e;
23
+ return l.id === ((e = p.value) == null ? void 0 : e.uid);
24
+ }
25
+ )
26
+ ), b = () => {
27
+ if (!t.value) {
28
+ v("Please enter a name before creating a tag.", "error");
29
+ return;
30
+ }
31
+ if (!t.value || !a.value) return;
32
+ f.add(
33
+ {
34
+ name: t.value
35
+ },
36
+ a.value.id
37
+ ) && c("close");
38
+ };
39
+ return (l, e) => (C(), _(y, {
40
+ disabled: !t.value.trim(),
41
+ onSubmit: b
42
+ }, {
43
+ options: o(() => [
44
+ n(i(k), {
45
+ modelValue: a.value,
46
+ "onUpdate:modelValue": e[1] || (e[1] = (s) => a.value = s),
47
+ options: r.value
48
+ }, {
49
+ default: o(() => [
50
+ n(i(w), {
51
+ class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
52
+ variant: "outlined"
53
+ }, {
54
+ default: o(() => [
55
+ V("span", {
56
+ class: S(a.value ? "text-c-1" : "text-c-3")
57
+ }, T(a.value ? a.value.label : "Select Collection"), 3),
58
+ n(i(h), {
59
+ class: "text-c-3",
60
+ icon: "ChevronDown",
61
+ size: "xs"
62
+ })
63
+ ]),
64
+ _: 1
65
+ })
66
+ ]),
67
+ _: 1
68
+ }, 8, ["modelValue", "options"])
69
+ ]),
70
+ submit: o(() => [
71
+ N("Create Tag")
72
+ ]),
73
+ default: o(() => [
74
+ n(z, {
75
+ modelValue: t.value,
76
+ "onUpdate:modelValue": e[0] || (e[0] = (s) => t.value = s),
77
+ label: "Tag Name",
78
+ placeholder: "Tag Name"
79
+ }, null, 8, ["modelValue"])
80
+ ]),
81
+ _: 1
82
+ }, 8, ["disabled"]));
83
+ }
84
+ });
85
+ export {
86
+ L as default
87
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CommandPaletteTag.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;AAsMA,wBAMG"}
1
+ {"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;AAoJA,wBAMG"}
@@ -1,58 +1,42 @@
1
- import { defineComponent as d, ref as l, onMounted as m, openBlock as f, createElementBlock as h, createElementVNode as o, withDirectives as w, withKeys as _, withModifiers as x, vModelText as k, createVNode as v, unref as b, withCtx as y, createTextVNode as g } from "vue";
2
- import { useWorkspace as N } from "../../store/workspace.js";
3
- import { ScalarButton as C } from "@scalar/components";
4
- import { useRouter as M } from "vue-router";
5
- const V = { 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" }, B = /* @__PURE__ */ o("label", {
6
- class: "absolute w-full h-full opacity-0 cursor-text",
7
- for: "workspacename"
8
- }, null, -1), K = ["onKeydown"], E = { class: "flex" }, I = /* @__PURE__ */ o("div", { class: "flex flex-1 gap-2 max-h-8" }, null, -1), U = /* @__PURE__ */ d({
1
+ import { defineComponent as u, ref as i, openBlock as d, createBlock as f, withCtx as t, createTextVNode as k, createVNode as _ } from "vue";
2
+ import { useToasts as b } from "@scalar/use-toasts";
3
+ import { useRouter as w } from "vue-router";
4
+ import v from "./CommandActionForm.vue.js";
5
+ import N from "./CommandActionInput.vue.js";
6
+ import { useWorkspace as V } from "../../store/store.js";
7
+ const S = /* @__PURE__ */ u({
9
8
  __name: "CommandPaletteWorkspace",
10
9
  emits: ["close"],
11
- setup(S, { emit: r }) {
12
- const c = r, { push: i } = M(), { workspaceMutators: u } = N(), t = l(""), s = () => {
13
- const e = u.add({
14
- name: t.value
10
+ setup(W, { emit: r }) {
11
+ const s = r, { push: m } = w(), { toast: c } = b(), { workspaceMutators: l } = V(), e = i(""), n = () => {
12
+ if (!e.value.trim()) {
13
+ c("Please enter a name before creating a workspace.", "error");
14
+ return;
15
+ }
16
+ const o = l.add({
17
+ name: e.value
15
18
  });
16
- i(`/workspace/${e.uid}`), c("close");
17
- }, a = l(null);
18
- return m(() => {
19
- var e;
20
- (e = a.value) == null || e.focus();
21
- }), (e, n) => (f(), h("div", V, [
22
- o("div", W, [
23
- B,
24
- w(o("input", {
25
- id: "workspacename",
26
- ref_key: "workspaceInput",
27
- ref: a,
28
- "onUpdate:modelValue": n[0] || (n[0] = (p) => t.value = p),
29
- autocomplete: "off",
30
- autofocus: "",
31
- class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
32
- "data-form-type": "other",
33
- "data-lpignore": "true",
19
+ m(`/workspace/${o.uid}`), s("close");
20
+ };
21
+ return (o, a) => (d(), f(v, {
22
+ disabled: !e.value.trim(),
23
+ onSubmit: n
24
+ }, {
25
+ submit: t(() => [
26
+ k("Create Workspace")
27
+ ]),
28
+ default: t(() => [
29
+ _(N, {
30
+ modelValue: e.value,
31
+ "onUpdate:modelValue": a[0] || (a[0] = (p) => e.value = p),
34
32
  label: "Workspace Name",
35
- placeholder: "Workspace Name",
36
- onKeydown: _(x(s, ["prevent"]), ["enter"])
37
- }, null, 40, K), [
38
- [k, t.value]
39
- ])
33
+ placeholder: "Workspace Name"
34
+ }, null, 8, ["modelValue"])
40
35
  ]),
41
- o("div", E, [
42
- I,
43
- v(b(C), {
44
- class: "max-h-8 text-xs p-0 px-3",
45
- onClick: s
46
- }, {
47
- default: y(() => [
48
- g(" Continue ")
49
- ]),
50
- _: 1
51
- })
52
- ])
53
- ]));
36
+ _: 1
37
+ }, 8, ["disabled"]));
54
38
  }
55
39
  });
56
40
  export {
57
- U as default
41
+ S as default
58
42
  };