@scalar/api-client 2.18.0 → 2.18.3

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 (294) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/dist/components/AddressBar/AddressBar.vue2.js +52 -52
  3. package/dist/components/AddressBar/AddressBarHistory.vue2.js +15 -15
  4. package/dist/components/AddressBar/httpStatusCodeColors.d.ts +0 -33
  5. package/dist/components/AddressBar/httpStatusCodeColors.d.ts.map +1 -1
  6. package/dist/components/AddressBar/httpStatusCodeColors.js +0 -1
  7. package/dist/components/CodeInput/CodeInput.vue2.js +112 -112
  8. package/dist/components/CommandPalette/CommandActionForm.vue.js +18 -18
  9. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +25 -25
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +2 -2
  11. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -4
  13. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -1
  14. package/dist/components/CommandPalette/WatchModeToggle.vue.js +14 -14
  15. package/dist/components/DataTable/DataTable.vue.js +17 -17
  16. package/dist/components/DataTable/DataTableCell.vue.js +9 -9
  17. package/dist/components/DataTable/DataTableCheckbox.vue.js +17 -17
  18. package/dist/components/DataTable/DataTableInput.vue2.js +48 -48
  19. package/dist/components/DataTable/DataTableInputSelect.vue.js +35 -35
  20. package/dist/components/DataTable/DataTableText.vue.js +10 -10
  21. package/dist/components/Form/Form.vue.js +32 -32
  22. package/dist/components/Form/LabelInput.vue2.js +15 -15
  23. package/dist/components/HelpfulLink.vue.js +7 -7
  24. package/dist/components/HttpMethod/HttpMethod.vue2.js +22 -22
  25. package/dist/components/IconSelector.vue.js +16 -16
  26. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +50 -50
  27. package/dist/components/ImportCollection/ImportNowButton.vue.js +23 -23
  28. package/dist/components/ImportCollection/PrefetchError.vue.js +8 -8
  29. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +0 -7
  30. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  31. package/dist/components/ScalarAsciiArt.vue2.js +16 -16
  32. package/dist/components/SectionFilter.vue2.js +21 -21
  33. package/dist/components/SectionFilterButton.vue.js +7 -7
  34. package/dist/components/Server/ServerDropdown.vue.js +32 -32
  35. package/dist/components/Server/ServerDropdownItem.vue2.js +39 -39
  36. package/dist/components/Server/ServerSelector.vue.js +27 -27
  37. package/dist/components/Server/ServerVariablesForm.vue.js +26 -26
  38. package/dist/components/Server/ServerVariablesSelect.vue.js +21 -21
  39. package/dist/components/Server/ServerVariablesTextbox.vue.js +10 -10
  40. package/dist/components/Server/types.d.ts +2 -1
  41. package/dist/components/Server/types.d.ts.map +1 -1
  42. package/dist/components/SideNav/SideNavLink.vue.js +18 -18
  43. package/dist/components/SideNav/SideNavRouterLink.vue.js +13 -13
  44. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +11 -11
  45. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +16 -16
  46. package/dist/components/Sidebar/Sidebar.vue2.js +28 -28
  47. package/dist/components/Sidebar/SidebarButton.vue.js +12 -12
  48. package/dist/components/Sidebar/SidebarListElement.vue2.js +34 -34
  49. package/dist/components/Sidebar/SidebarListElementActions.vue.js +33 -33
  50. package/dist/components/TopNav/TopNavItem.vue2.js +41 -41
  51. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +43 -43
  52. package/dist/data/httpHeaders.d.ts +2 -1
  53. package/dist/data/httpHeaders.d.ts.map +1 -1
  54. package/dist/hooks/useClientConfig.js +1 -1
  55. package/dist/hooks/useLayout.js +1 -1
  56. package/dist/hooks/useSidebar.js +1 -1
  57. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  58. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  59. package/dist/libs/create-client.d.ts.map +1 -1
  60. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  61. package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -1
  62. package/dist/plugins/hooks/usePluginManager.js +5 -5
  63. package/dist/plugins/index.d.ts +1 -1
  64. package/dist/plugins/index.d.ts.map +1 -1
  65. package/dist/plugins/index.js +5 -5
  66. package/dist/plugins/plugin-manager.d.ts +0 -2
  67. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  68. package/dist/routes.d.ts +0 -10
  69. package/dist/routes.d.ts.map +1 -1
  70. package/dist/routes.js +0 -1
  71. package/dist/store/active-entities.js +1 -1
  72. package/dist/store/security-schemes.d.ts.map +1 -1
  73. package/dist/store/store.d.ts.map +1 -1
  74. package/dist/style.css +1 -1
  75. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  76. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +44 -44
  77. package/dist/v2/blocks/operation-block/components/Header.vue2.js +20 -20
  78. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  79. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +14 -14
  80. package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -2
  81. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +12 -12
  82. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +65 -65
  83. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -1
  84. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  85. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +6 -6
  86. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +4 -3
  87. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -1
  88. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +9 -7
  89. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  90. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +40 -32
  91. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -3
  92. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  93. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -1
  94. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  95. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  96. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +144 -149
  97. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +25 -45
  98. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  99. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  100. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +90 -139
  101. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +22 -0
  102. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -0
  103. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +77 -0
  104. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +4 -0
  105. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +4 -4
  106. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  107. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +34 -34
  108. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
  109. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
  111. package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -32
  112. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
  113. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  114. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +64 -64
  115. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +29 -29
  116. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +2 -2
  117. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  118. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +12 -13
  119. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +8 -0
  120. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -0
  121. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +9 -0
  122. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -1
  123. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
  124. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +9 -8
  125. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +67 -67
  126. package/dist/v2/blocks/response-block/components/Headers.vue.js +35 -35
  127. package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +24 -24
  128. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +10 -10
  129. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +24 -24
  130. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +10 -10
  131. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +11 -11
  132. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +14 -14
  133. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +11 -11
  134. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +33 -33
  135. package/dist/v2/blocks/response-block/helpers/media-types.d.ts +3 -6
  136. package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
  137. package/dist/v2/blocks/response-block/helpers/media-types.js +0 -1
  138. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +72 -72
  139. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +9 -9
  140. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts +0 -33
  141. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts.map +1 -1
  142. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -1
  143. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  144. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +83 -82
  145. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +10 -10
  146. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +121 -121
  147. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +13 -13
  148. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +33 -33
  149. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  150. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -26
  151. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +26 -26
  152. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
  153. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  154. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +130 -122
  155. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +0 -21
  156. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  157. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -3
  158. package/dist/v2/components/code-input/CodeInput.vue2.js +93 -93
  159. package/dist/v2/components/data-table/DataTable.vue.js +17 -17
  160. package/dist/v2/components/data-table/DataTableCell.vue.js +9 -9
  161. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +17 -17
  162. package/dist/v2/components/data-table/DataTableInput.vue2.js +48 -48
  163. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +35 -35
  164. package/dist/v2/components/data-table/DataTableText.vue.js +10 -10
  165. package/dist/v2/components/forms/ConfirmationForm.vue.js +13 -13
  166. package/dist/v2/components/layout/CollapsibleSection.vue.js +42 -42
  167. package/dist/v2/components/modals/DeleteModal.vue.js +13 -13
  168. package/dist/v2/components/resize/Resize.vue2.js +11 -11
  169. package/dist/v2/components/server/ServerDropdown.vue.js +30 -30
  170. package/dist/v2/components/server/ServerDropdownItem.vue2.js +27 -27
  171. package/dist/v2/components/sidebar/Sidebar.vue.js +32 -32
  172. package/dist/v2/components/sidebar/SidebarMenu.vue.js +20 -20
  173. package/dist/v2/features/app/App.vue.js +25 -25
  174. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  175. package/dist/v2/features/app/app-events.js +55 -61
  176. package/dist/v2/features/app/components/AppSidebar.vue2.js +97 -97
  177. package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +20 -20
  178. package/dist/v2/features/app/components/DesktopTab.vue2.js +59 -59
  179. package/dist/v2/features/app/components/DesktopTabs.vue.js +22 -22
  180. package/dist/v2/features/app/components/SidebarItemMenu.vue.js +6 -6
  181. package/dist/v2/features/app/components/WebTopNav.vue.js +9 -9
  182. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -5
  183. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  184. package/dist/v2/features/app/helpers/create-api-client-app.js +1 -2
  185. package/dist/v2/features/app/helpers/routes.d.ts +5 -1
  186. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  187. package/dist/v2/features/collection/DocumentCollection.vue.js +31 -31
  188. package/dist/v2/features/collection/WorkspaceCollection.vue.js +17 -17
  189. package/dist/v2/features/collection/components/Authentication.vue2.js +18 -18
  190. package/dist/v2/features/collection/components/Cookies.vue.js +10 -10
  191. package/dist/v2/features/collection/components/Environment.vue.js +10 -10
  192. package/dist/v2/features/collection/components/Form.vue.js +21 -21
  193. package/dist/v2/features/collection/components/Overview.vue2.js +25 -25
  194. package/dist/v2/features/collection/components/Servers.vue.js +37 -37
  195. package/dist/v2/features/collection/components/Settings.vue.js +22 -22
  196. package/dist/v2/features/collection/components/Tabs.vue.js +18 -18
  197. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +20 -20
  198. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +17 -17
  199. package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +68 -68
  200. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +11 -11
  201. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +2 -1
  202. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -1
  203. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +2 -1
  204. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -1
  205. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +3 -3
  206. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  207. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -1
  208. package/dist/v2/features/command-palette/types.d.ts +11 -10
  209. package/dist/v2/features/command-palette/types.d.ts.map +1 -1
  210. package/dist/v2/features/environments/EnvironmentsList.vue.js +36 -36
  211. package/dist/v2/features/environments/components/Environment.vue.js +16 -16
  212. package/dist/v2/features/environments/components/EnvironmentColors.vue.js +37 -37
  213. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +19 -19
  214. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +14 -14
  215. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +24 -24
  216. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +58 -58
  217. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +23 -23
  218. package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
  219. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  220. package/dist/v2/features/modal/Modal.vue.js +1 -1
  221. package/dist/v2/features/modal/Modal.vue2.js +57 -56
  222. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +5 -4
  223. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  224. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -1
  225. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +17 -21
  226. package/dist/v2/features/operation/Operation.vue.d.ts +5 -1
  227. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  228. package/dist/v2/features/operation/Operation.vue.js +41 -39
  229. package/dist/v2/features/search/components/SearchButton.vue.js +40 -40
  230. package/dist/v2/features/search/components/SearchModal.vue2.js +43 -43
  231. package/dist/v2/features/search/components/SearchResult.vue.js +34 -34
  232. package/dist/v2/features/search/types.d.ts +5 -4
  233. package/dist/v2/features/search/types.d.ts.map +1 -1
  234. package/dist/v2/features/settings/CollectionSettings.vue.js +51 -51
  235. package/dist/v2/features/settings/DocumentSettings.vue.js +25 -25
  236. package/dist/v2/features/settings/components/Appearance.vue.js +27 -27
  237. package/dist/v2/helpers/handle-hotkeys.d.ts +1 -12
  238. package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
  239. package/dist/v2/helpers/handle-hotkeys.js +0 -2
  240. package/dist/v2/helpers/plugins.d.ts +2 -2
  241. package/dist/v2/helpers/plugins.d.ts.map +1 -1
  242. package/dist/views/Collection/CollectionNavigation.vue.js +13 -13
  243. package/dist/views/Collection/components/EnvironmentForm.vue2.js +114 -114
  244. package/dist/views/Collection/components/MarkdownInput.vue2.js +31 -31
  245. package/dist/views/Cookies/CookieModal.vue2.js +26 -26
  246. package/dist/views/Environment/EnvironmentColorModal.vue.js +10 -10
  247. package/dist/views/Environment/EnvironmentColors.vue.js +56 -56
  248. package/dist/views/Environment/EnvironmentModal.vue.js +26 -26
  249. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +24 -24
  250. package/dist/views/Request/Request.vue2.js +55 -55
  251. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +17 -17
  252. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +102 -102
  253. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -27
  254. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  255. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +91 -91
  256. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  257. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +36 -36
  258. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +101 -101
  259. package/dist/views/Request/RequestSection/RequestBody.vue2.js +154 -154
  260. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +35 -35
  261. package/dist/views/Request/RequestSection/RequestParams.vue.js +81 -81
  262. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +47 -47
  263. package/dist/views/Request/RequestSection/RequestSection.vue2.js +90 -90
  264. package/dist/views/Request/RequestSection/RequestTable.vue2.js +111 -111
  265. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +29 -29
  266. package/dist/views/Request/RequestSection/index.d.ts +1 -1
  267. package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
  268. package/dist/views/Request/RequestSection/index.js +4 -4
  269. package/dist/views/Request/RequestSidebarItem.vue2.js +149 -149
  270. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +79 -79
  271. package/dist/views/Request/RequestSubpageHeader.vue2.js +30 -30
  272. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +29 -29
  273. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +37 -37
  274. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +10 -10
  275. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +24 -24
  276. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +10 -10
  277. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +16 -16
  278. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +21 -21
  279. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +30 -30
  280. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -37
  281. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +61 -61
  282. package/package.json +24 -24
  283. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +0 -6
  284. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +0 -1
  285. package/dist/components/ImportCollection/OperationBadge.vue.d.ts +0 -8
  286. package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +0 -1
  287. package/dist/components/ScreenReader.vue.d.ts +0 -20
  288. package/dist/components/ScreenReader.vue.d.ts.map +0 -1
  289. package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts +0 -9
  290. package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts.map +0 -1
  291. package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts +0 -3
  292. package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts.map +0 -1
  293. package/dist/views/Request/RequestSection/types/post-response.d.ts +0 -7
  294. package/dist/views/Request/RequestSection/types/post-response.d.ts.map +0 -1
@@ -1,9 +1,9 @@
1
- import { defineComponent as c, createBlock as r, openBlock as e, unref as f, withCtx as t, createElementBlock as s, Fragment as i, renderList as u, createVNode as a, createTextVNode as p } from "vue";
2
- import k from "../../../../components/DataTable/DataTable.vue.js";
3
- import _ from "../../../../components/DataTable/DataTableRow.vue.js";
1
+ import { defineComponent as c, createBlock as r, openBlock as e, unref as f, withCtx as t, createElementBlock as s, Fragment as i, renderList as u, createVNode as a, createTextVNode as k } from "vue";
2
+ import x from "../../../../components/DataTable/DataTable.vue.js";
3
+ import d from "../../../../components/DataTable/DataTableRow.vue.js";
4
4
  import m from "../../../../components/DataTable/DataTableText.vue.js";
5
- import d from "../../../components/layout/CollapsibleSection.vue.js";
6
- const x = {
5
+ import p from "../../../components/layout/CollapsibleSection.vue.js";
6
+ const _ = {
7
7
  key: 1,
8
8
  class: "text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm"
9
9
  }, N = /* @__PURE__ */ c({
@@ -11,23 +11,23 @@ const x = {
11
11
  props: {
12
12
  cookies: {}
13
13
  },
14
- setup(C) {
15
- return (o, l) => (e(), r(f(d), {
14
+ setup(o) {
15
+ return (C, l) => (e(), r(f(p), {
16
16
  defaultOpen: !1,
17
17
  itemCount: o.cookies.length
18
18
  }, {
19
19
  title: t(() => [...l[0] || (l[0] = [
20
- p("Cookies", -1)
20
+ k("Cookies", -1)
21
21
  ])]),
22
22
  default: t(() => [
23
23
  (e(), s(i, { key: 0 }, [
24
- o.cookies.length ? (e(), r(k, {
24
+ o.cookies.length ? (e(), r(x, {
25
25
  key: 0,
26
26
  class: "flex-1",
27
27
  columns: ["", ""]
28
28
  }, {
29
29
  default: t(() => [
30
- (e(!0), s(i, null, u(o.cookies, (n) => (e(), r(_, {
30
+ (e(!0), s(i, null, u(o.cookies, (n) => (e(), r(d, {
31
31
  key: n.name
32
32
  }, {
33
33
  default: t(() => [
@@ -42,7 +42,7 @@ const x = {
42
42
  }, 1024))), 128))
43
43
  ]),
44
44
  _: 1
45
- })) : (e(), s("div", x, " No cookies "))
45
+ })) : (e(), s("div", _, " No cookies "))
46
46
  ], 64))
47
47
  ]),
48
48
  _: 1
@@ -1,4 +1,4 @@
1
- import { defineComponent as k, onMounted as v, onBeforeUnmount as b, createElementBlock as s, openBlock as a, createElementVNode as o, createCommentVNode as n, normalizeClass as y, createVNode as l, createTextVNode as i, toDisplayString as x, unref as m } from "vue";
1
+ import { defineComponent as x, onMounted as k, onBeforeUnmount as v, createElementBlock as s, openBlock as a, createElementVNode as o, createCommentVNode as r, normalizeClass as y, createVNode as l, createTextVNode as i, toDisplayString as b, unref as m } from "vue";
2
2
  import { ScalarHotkey as d } from "@scalar/components";
3
3
  import R from "../../../../assets/computer.ascii.js";
4
4
  import g from "../../../../components/EmptyState.vue.js";
@@ -6,7 +6,7 @@ import q from "../../../../components/ScalarAsciiArt.vue.js";
6
6
  const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize" }, S = {
7
7
  key: 0,
8
8
  class: "scalar-version-number"
9
- }, w = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, E = /* @__PURE__ */ k({
9
+ }, w = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, E = /* @__PURE__ */ x({
10
10
  __name: "ResponseEmpty",
11
11
  props: {
12
12
  layout: {},
@@ -15,25 +15,25 @@ const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
15
15
  events: {}
16
16
  },
17
17
  emits: ["addRequest", "sendRequest", "openCommandPalette"],
18
- setup(u, { emit: c }) {
19
- const r = c, p = (t) => {
20
- t?.createNew && r("addRequest");
18
+ setup(t, { emit: p }) {
19
+ const n = p, u = (f) => {
20
+ f?.createNew && n("addRequest");
21
21
  };
22
- return v(() => u.events.hotKeys.on(p)), b(() => u.events.hotKeys.off(p)), (t, e) => (a(), s("div", C, [
22
+ return k(() => t.events.hotKeys.on(u)), v(() => t.events.hotKeys.off(u)), (f, e) => (a(), s("div", C, [
23
23
  o("div", {
24
24
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
25
25
  "hidden opacity-0": t.totalPerformedRequests < 1 && t.layout !== "modal"
26
26
  }])
27
27
  }, [
28
28
  t.layout !== "modal" ? (a(), s("div", S, [
29
- i(" Scalar App V" + x(t.appVersion) + " Beta ", 1),
29
+ i(" Scalar App V" + b(t.appVersion) + " Beta ", 1),
30
30
  e[3] || (e[3] = o("div", { class: "mt-2" }, [
31
31
  o("a", {
32
32
  href: "https://github.com/scalar/scalar/issues/2669",
33
33
  target: "_blank"
34
34
  }, " Roadmap ")
35
35
  ], -1))
36
- ])) : n("", !0),
36
+ ])) : r("", !0),
37
37
  e[4] || (e[4] = o("a", {
38
38
  class: "gitbook-show scalar-version-number",
39
39
  href: "https://www.scalar.com",
@@ -51,33 +51,33 @@ const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
51
51
  }])
52
52
  }, [
53
53
  l(g)
54
- ], 2)) : n("", !0),
54
+ ], 2)) : r("", !0),
55
55
  o("div", w, [
56
56
  t.layout !== "modal" ? (a(), s("button", {
57
57
  key: 0,
58
58
  class: "flex items-center gap-1.5",
59
59
  type: "button",
60
- onClick: e[0] || (e[0] = (f) => r("openCommandPalette"))
60
+ onClick: e[0] || (e[0] = (c) => n("openCommandPalette"))
61
61
  }, [
62
62
  e[5] || (e[5] = i(" Get Started ", -1)),
63
63
  l(m(d), {
64
64
  hotkey: "p",
65
65
  modifier: ["default", "Shift"]
66
66
  })
67
- ])) : n("", !0),
67
+ ])) : r("", !0),
68
68
  t.layout === "desktop" ? (a(), s("button", {
69
69
  key: 1,
70
70
  class: "flex items-center gap-1.5",
71
71
  type: "button",
72
- onClick: e[1] || (e[1] = (f) => r("addRequest"))
72
+ onClick: e[1] || (e[1] = (c) => n("addRequest"))
73
73
  }, [
74
74
  e[6] || (e[6] = i(" New Request ", -1)),
75
75
  l(m(d), { hotkey: "N" })
76
- ])) : n("", !0),
76
+ ])) : r("", !0),
77
77
  o("button", {
78
78
  class: "flex items-center gap-1.5",
79
79
  type: "button",
80
- onClick: e[2] || (e[2] = (f) => r("sendRequest"))
80
+ onClick: e[2] || (e[2] = (c) => n("sendRequest"))
81
81
  }, [
82
82
  e[7] || (e[7] = i(" Send Request ", -1)),
83
83
  l(m(d), { hotkey: "↵" })
@@ -1,30 +1,30 @@
1
- import { defineComponent as c, ref as u, createBlock as d, openBlock as s, Transition as m, withCtx as l, createElementBlock as f, createCommentVNode as v, unref as a, createVNode as r, createTextVNode as p } from "vue";
1
+ import { defineComponent as c, ref as u, createBlock as d, openBlock as s, Transition as m, withCtx as r, createElementBlock as f, createCommentVNode as v, unref as a, createVNode as i, createTextVNode as p } from "vue";
2
2
  import { useLoadingState as x, ScalarLoading as g, ScalarButton as k } from "@scalar/components";
3
3
  const y = {
4
4
  key: 0,
5
5
  class: "bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6"
6
- }, S = /* @__PURE__ */ c({
6
+ }, T = /* @__PURE__ */ c({
7
7
  __name: "ResponseLoadingOverlay",
8
8
  props: {
9
9
  events: {}
10
10
  },
11
- setup(i) {
11
+ setup(n) {
12
12
  const e = x(), o = u();
13
- return i.events.requestStatus.on(async (n) => {
14
- n === "start" ? o.value = setTimeout(() => e.start(), 1e3) : (clearTimeout(o.value), o.value = void 0, await e.clear());
15
- }), (n, t) => (s(), d(m, null, {
16
- default: l(() => [
13
+ return n.events.requestStatus.on(async (l) => {
14
+ l === "start" ? o.value = setTimeout(() => e.start(), 1e3) : (clearTimeout(o.value), o.value = void 0, await e.clear());
15
+ }), (l, t) => (s(), d(m, null, {
16
+ default: r(() => [
17
17
  a(e).isActive ? (s(), f("div", y, [
18
- r(a(g), {
18
+ i(a(g), {
19
19
  class: "text-c-3",
20
20
  loader: a(e),
21
21
  size: "3xl"
22
22
  }, null, 8, ["loader"]),
23
- r(a(k), {
23
+ i(a(k), {
24
24
  variant: "ghost",
25
25
  onClick: t[0] || (t[0] = (C) => n.events.cancelRequest.emit())
26
26
  }, {
27
- default: l(() => [...t[1] || (t[1] = [
27
+ default: r(() => [...t[1] || (t[1] = [
28
28
  p(" Cancel ", -1)
29
29
  ])]),
30
30
  _: 1
@@ -36,5 +36,5 @@ const y = {
36
36
  }
37
37
  });
38
38
  export {
39
- S as default
39
+ T as default
40
40
  };
@@ -1,54 +1,54 @@
1
- import { defineComponent as C, ref as d, computed as g, createElementBlock as r, openBlock as t, toDisplayString as o, unref as p, Fragment as c, createElementVNode as a, createCommentVNode as v, createTextVNode as i, createBlock as h, withCtx as S, normalizeStyle as f } from "vue";
2
- import { httpStatusCodes as I } from "@scalar/oas-utils/helpers";
1
+ import { defineComponent as C, ref as d, computed as g, createElementBlock as a, openBlock as s, toDisplayString as n, unref as c, Fragment as p, createElementVNode as l, createCommentVNode as v, createTextVNode as m, createBlock as h, withCtx as x, normalizeStyle as f } from "vue";
2
+ import { httpStatusCodes as S } from "@scalar/oas-utils/helpers";
3
3
  import y from "pretty-ms";
4
- import b from "../../../../components/HelpfulLink.vue.js";
4
+ import I from "../../../../components/HelpfulLink.vue.js";
5
5
  import { getContentLength as k } from "../helpers/get-content-length.js";
6
- const w = { class: "text-c-1 flex gap-1.5" }, _ = { key: 0 }, B = { key: 0 }, N = { key: 1 }, M = /* @__PURE__ */ C({
6
+ const b = { class: "text-c-1 flex gap-1.5" }, w = { key: 0 }, B = { key: 0 }, N = { key: 1 }, R = /* @__PURE__ */ C({
7
7
  __name: "ResponseMetaInformation",
8
8
  props: {
9
9
  response: {},
10
10
  events: {}
11
11
  },
12
- setup(m) {
13
- const l = d(), u = d(0);
14
- m.events.requestStatus.on((e) => {
15
- e === "start" ? l.value = setInterval(() => u.value += 1e3, 1e3) : (clearInterval(l.value), l.value = void 0, u.value = 0);
12
+ setup(e) {
13
+ const u = d(), i = d(0);
14
+ e.events.requestStatus.on((r) => {
15
+ r === "start" ? u.value = setInterval(() => i.value += 1e3, 1e3) : (clearInterval(u.value), u.value = void 0, i.value = 0);
16
16
  });
17
- const s = g(() => {
18
- const e = m.response.status;
19
- if (e)
20
- return I[e] ?? void 0;
17
+ const t = g(() => {
18
+ const r = e.response.status;
19
+ if (r)
20
+ return S[r] ?? void 0;
21
21
  });
22
- return (e, n) => (t(), r("div", w, [
23
- l.value && u.value ? (t(), r("span", _, o(p(y)(u.value)), 1)) : (t(), r(c, { key: 1 }, [
24
- a("span", null, [
25
- n[0] || (n[0] = a("span", { class: "sr-only" }, "Response Information, Duration:", -1)),
26
- i(" " + o(p(y)(e.response.duration)), 1)
22
+ return (r, o) => (s(), a("div", b, [
23
+ u.value && i.value ? (s(), a("span", w, n(c(y)(i.value)), 1)) : (s(), a(p, { key: 1 }, [
24
+ l("span", null, [
25
+ o[0] || (o[0] = l("span", { class: "sr-only" }, "Response Information, Duration:", -1)),
26
+ m(" " + n(c(y)(e.response.duration)), 1)
27
27
  ]),
28
- p(k)(e.response) ? (t(), r("span", B, [
29
- n[1] || (n[1] = a("span", { class: "sr-only" }, ", Size:", -1)),
30
- i(" " + o(p(k)(e.response)), 1)
28
+ c(k)(e.response) ? (s(), a("span", B, [
29
+ o[1] || (o[1] = l("span", { class: "sr-only" }, ", Size:", -1)),
30
+ m(" " + n(c(k)(e.response)), 1)
31
31
  ])) : v("", !0),
32
- s.value ? (t(), r(c, { key: 1 }, [
33
- n[2] || (n[2] = a("span", { class: "sr-only" }, ", Status:", -1)),
34
- s.value.url ? (t(), h(b, {
32
+ t.value ? (s(), a(p, { key: 1 }, [
33
+ o[2] || (o[2] = l("span", { class: "sr-only" }, ", Status:", -1)),
34
+ t.value.url ? (s(), h(I, {
35
35
  key: 0,
36
36
  class: "flex items-center gap-1.5",
37
- href: s.value.url
37
+ href: t.value.url
38
38
  }, {
39
- default: S(() => [
40
- i(o(e.response.status) + " " + o(s.value.name) + " ", 1),
41
- a("span", {
39
+ default: x(() => [
40
+ m(n(e.response.status) + " " + n(t.value.name) + " ", 1),
41
+ l("span", {
42
42
  class: "block h-1.5 w-1.5 rounded-full",
43
- style: f({ backgroundColor: s.value.color })
43
+ style: f({ backgroundColor: t.value.color })
44
44
  }, null, 4)
45
45
  ]),
46
46
  _: 1
47
- }, 8, ["href"])) : (t(), r("span", N, [
48
- i(o(e.response.status) + " " + o(s.value.name) + " ", 1),
49
- a("span", {
47
+ }, 8, ["href"])) : (s(), a("span", N, [
48
+ m(n(e.response.status) + " " + n(t.value.name) + " ", 1),
49
+ l("span", {
50
50
  class: "block h-1.5 w-1.5 rounded-full",
51
- style: f({ backgroundColor: s.value.color })
51
+ style: f({ backgroundColor: t.value.color })
52
52
  }, null, 4)
53
53
  ]))
54
54
  ], 64)) : v("", !0)
@@ -57,5 +57,5 @@ const w = { class: "text-c-1 flex gap-1.5" }, _ = { key: 0 }, B = { key: 0 }, N
57
57
  }
58
58
  });
59
59
  export {
60
- M as default
60
+ R as default
61
61
  };
@@ -1,20 +1,17 @@
1
1
  import type { CodeMirrorLanguage } from '@scalar/use-codemirror';
2
- export type MediaPreview = 'object' | 'image' | 'video' | 'audio';
3
- export type MediaConfig = {
2
+ type MediaPreview = 'object' | 'image' | 'video' | 'audio';
3
+ type MediaConfig = {
4
4
  preview?: MediaPreview;
5
5
  alpha?: boolean;
6
6
  raw?: boolean;
7
7
  language?: CodeMirrorLanguage;
8
8
  extension: string;
9
9
  };
10
- /** Media Type (MIME Type) Definitions */
11
- export declare const mediaTypes: {
12
- [type: string]: MediaConfig | undefined;
13
- };
14
10
  /** Media Types (MIME Types) that can be displayed as raw text */
15
11
  export declare const textMediaTypes: string[];
16
12
  /** Get the config for a media type */
17
13
  export declare function getMediaTypeConfig(type: string): MediaConfig | undefined;
18
14
  /** Check if a media type that can be displayed as raw text */
19
15
  export declare function isTextMediaType(type: string): boolean;
16
+ export {};
20
17
  //# sourceMappingURL=media-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"media-types.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/helpers/media-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CA8GjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA;AAExB,sCAAsC;AACtC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAgBxE;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD"}
1
+ {"version":3,"file":"media-types.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/helpers/media-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,KAAK,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAE1D,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAmHD,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA;AAExB,sCAAsC;AACtC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAgBxE;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD"}
@@ -122,6 +122,5 @@ function a(e) {
122
122
  }
123
123
  export {
124
124
  a as getMediaTypeConfig,
125
- i as mediaTypes,
126
125
  t as textMediaTypes
127
126
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as W, useId as D, computed as S, ref as U, useTemplateRef as V, onMounted as F, onBeforeUnmount as H, createElementBlock as z, openBlock as h, unref as n, createElementVNode as s, normalizeClass as P, createVNode as r, createCommentVNode as E, normalizeStyle as O, createBlock as K, withCtx as R, createTextVNode as b, toDisplayString as m } from "vue";
1
+ import { defineComponent as W, useId as D, computed as S, ref as U, useTemplateRef as V, onMounted as F, onBeforeUnmount as H, createElementBlock as z, openBlock as x, unref as l, createElementVNode as o, normalizeClass as P, createVNode as a, createCommentVNode as E, normalizeStyle as O, createBlock as K, withCtx as R, createTextVNode as b, toDisplayString as m } from "vue";
2
2
  import { ScalarButton as $, ScalarWrappingText as Q, ScalarIcon as j } from "@scalar/components";
3
3
  import { REQUEST_METHODS as G } from "@scalar/helpers/http/http-info";
4
4
  import { replaceVariables as J } from "@scalar/helpers/regex/replace-variables";
@@ -7,18 +7,18 @@ import { ScalarIconCopy as Y, ScalarIconWarningCircle as Z } from "@scalar/icons
7
7
  import { useClipboard as _ } from "@scalar/use-hooks/useClipboard";
8
8
  import { getEnvironmentVariables as ee } from "../../operation-block/helpers/get-environment-variables.js";
9
9
  import { getServerUrl as te } from "../../operation-block/helpers/get-server-url.js";
10
- import { useLoadingAnimation as oe } from "../hooks/use-loading-animation.js";
11
- import se from "./AddressBarHistory.vue.js";
12
- import ne from "../../../../components/HttpMethod/HttpMethod.vue.js";
13
- import le from "../../../components/server/ServerDropdown.vue.js";
14
- import re from "../../../components/code-input/CodeInput.vue.js";
15
- const ae = ["id"], ie = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, de = { class: "z-context-plus flex gap-1" }, ue = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, me = {
10
+ import { useLoadingAnimation as ne } from "../hooks/use-loading-animation.js";
11
+ import oe from "./AddressBarHistory.vue.js";
12
+ import le from "../../../../components/HttpMethod/HttpMethod.vue.js";
13
+ import se from "../../../components/server/ServerDropdown.vue.js";
14
+ import ae from "../../../components/code-input/CodeInput.vue.js";
15
+ const re = ["id"], ie = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, de = { class: "z-context-plus flex gap-1" }, ue = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, me = {
16
16
  key: 0,
17
17
  class: "z-context absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6"
18
- }, fe = { class: "text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1" }, ve = { class: "min-w-0 flex-1" }, ce = {
18
+ }, ce = { class: "text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1" }, fe = { class: "min-w-0 flex-1" }, ve = {
19
19
  "aria-hidden": "true",
20
20
  class: "inline-flex items-center gap-1"
21
- }, pe = { class: "sr-only" }, Re = /* @__PURE__ */ W({
21
+ }, he = { class: "sr-only" }, Re = /* @__PURE__ */ W({
22
22
  __name: "AddressBar",
23
23
  props: {
24
24
  path: {},
@@ -31,83 +31,83 @@ const ae = ["id"], ie = { class: "pointer-events-none absolute top-0 left-0 bloc
31
31
  environment: {}
32
32
  },
33
33
  emits: ["execute", "update:servers"],
34
- setup(o, { expose: q, emit: T }) {
35
- const f = T, v = D(), { percentage: g, startLoading: x, stopLoading: c } = oe(), I = S(() => ({
36
- backgroundColor: `color-mix(in srgb, transparent 90%, ${G[o.method].colorVar})`,
34
+ setup(e, { expose: q, emit: T }) {
35
+ const c = T, f = D(), { percentage: g, startLoading: y, stopLoading: v } = ne(), I = S(() => ({
36
+ backgroundColor: `color-mix(in srgb, transparent 90%, ${G[e.method].colorVar})`,
37
37
  transform: `translate3d(-${g.value}%,0,0)`
38
- })), i = U(null), a = U(null), y = S(() => a.value || i.value), B = (e, t, l) => {
39
- const p = d.value?.cursorPosition();
40
- o.eventBus.emit(
38
+ })), i = U(null), r = U(null), B = S(() => r.value || i.value), p = (n, t, s) => {
39
+ const h = d.value?.cursorPosition();
40
+ e.eventBus.emit(
41
41
  "operation:update:pathMethod",
42
42
  {
43
- meta: { method: o.method, path: o.path },
44
- payload: { method: e, path: t },
43
+ meta: { method: e.method, path: e.path },
44
+ payload: { method: n, path: t },
45
45
  callback: (u) => {
46
- (u === "success" || u === "no-change") && (a.value = null, i.value = null), u === "success" ? o.eventBus.emit("ui:focus:address-bar", { position: p }) : u === "conflict" && (e !== o.method && (a.value = e), t !== o.path && (i.value = t));
46
+ (u === "success" || u === "no-change") && (r.value = null, i.value = null), u === "success" ? e.eventBus.emit("ui:focus:address-bar", { position: h }) : u === "conflict" && (n !== e.method && (r.value = n), t !== e.path && (i.value = t));
47
47
  }
48
48
  },
49
- l
49
+ s
50
50
  );
51
- }, L = (e) => B(e, i.value ?? o.path), A = (e) => {
52
- const t = e.startsWith("/") ? e : `/${e}`;
53
- B(a.value ?? o.method, t, {
54
- debounceKey: `operation:update:pathMethod-${o.path}-${o.method}`
51
+ }, L = (n) => p(n, i.value ?? e.path), A = (n) => {
52
+ const t = n.startsWith("/") ? n : `/${n}`;
53
+ p(r.value ?? e.method, t, {
54
+ debounceKey: `operation:update:pathMethod-${e.path}-${e.method}`
55
55
  });
56
- }, C = V("sendButtonRef"), d = V("addressBarRef"), k = () => C.value?.$el?.focus(), w = (e) => {
57
- if (d.value?.isFocused && o.layout !== "desktop")
56
+ }, C = V("sendButtonRef"), d = V("addressBarRef"), k = () => C.value?.$el?.focus(), w = (n) => {
57
+ if (d.value?.isFocused && e.layout !== "desktop")
58
58
  return;
59
- const t = e && "position" in e ? e.position : "end";
60
- d.value?.focus(t), e && "event" in e && e.event.preventDefault();
59
+ const t = n && "position" in n ? n.position : "end";
60
+ d.value?.focus(t), n && "event" in n && n.event.preventDefault();
61
61
  };
62
62
  F(() => {
63
- o.eventBus.on("ui:focus:address-bar", w), o.eventBus.on("ui:focus:send-button", k), o.eventBus.on("hooks:on:request:sent", x), o.eventBus.on("hooks:on:request:complete", c);
63
+ e.eventBus.on("ui:focus:address-bar", w), e.eventBus.on("ui:focus:send-button", k), e.eventBus.on("hooks:on:request:sent", y), e.eventBus.on("hooks:on:request:complete", v);
64
64
  }), H(() => {
65
- o.eventBus.off("ui:focus:address-bar", w), o.eventBus.off("ui:focus:send-button", k), o.eventBus.off("hooks:on:request:sent", x), o.eventBus.off("hooks:on:request:complete", c), c();
65
+ e.eventBus.off("ui:focus:address-bar", w), e.eventBus.off("ui:focus:send-button", k), e.eventBus.off("hooks:on:request:sent", y), e.eventBus.off("hooks:on:request:complete", v), v();
66
66
  });
67
67
  const { copyToClipboard: M } = _(), N = async () => {
68
- const e = ee(o.environment), t = te(o.server, e), l = J(o.path, e), p = X(t, l);
69
- await M(p);
68
+ const n = ee(e.environment), t = te(e.server, n), s = J(e.path, n), h = X(t, s);
69
+ await M(h);
70
70
  };
71
71
  return q({
72
- methodConflict: a,
72
+ methodConflict: r,
73
73
  pathConflict: i
74
- }), (e, t) => (h(), z("div", {
75
- id: n(v),
74
+ }), (n, t) => (x(), z("div", {
75
+ id: l(f),
76
76
  class: "scalar-address-bar order-last flex h-(--scalar-address-bar-height) w-full [--scalar-address-bar-height:32px] lg:order-none lg:w-auto"
77
77
  }, [
78
- s("div", {
78
+ o("div", {
79
79
  class: P(["address-bar-bg-states text-xxs group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg p-0.75 lg:order-none lg:max-w-[580px] lg:min-w-[580px] xl:max-w-[720px] xl:min-w-[720px]", {
80
- "outline-c-danger outline": y.value
80
+ "outline-c-danger outline": B.value
81
81
  }])
82
82
  }, [
83
- s("div", ie, [
84
- s("div", {
83
+ o("div", ie, [
84
+ o("div", {
85
85
  class: "absolute top-0 left-0 z-[1002] h-full w-full",
86
86
  style: O(I.value)
87
87
  }, null, 4)
88
88
  ]),
89
- s("div", de, [
90
- r(n(ne), {
89
+ o("div", de, [
90
+ a(l(le), {
91
91
  isEditable: e.layout !== "modal",
92
92
  isSquare: "",
93
- method: a.value ?? e.method,
93
+ method: r.value ?? e.method,
94
94
  teleport: "",
95
95
  onChange: L
96
96
  }, null, 8, ["isEditable", "method"])
97
97
  ]),
98
- s("div", ue, [
99
- e.servers.length ? (h(), K(n(le), {
98
+ o("div", ue, [
99
+ e.servers.length ? (x(), K(l(se), {
100
100
  key: 0,
101
101
  layout: e.layout,
102
102
  server: e.server,
103
103
  servers: e.servers,
104
- target: n(v),
105
- "onUpdate:selectedServer": t[0] || (t[0] = (l) => e.eventBus.emit("server:update:selected", l)),
106
- "onUpdate:servers": t[1] || (t[1] = (l) => f("update:servers")),
107
- "onUpdate:variable": t[2] || (t[2] = (l) => e.eventBus.emit("server:update:variables", l))
104
+ target: l(f),
105
+ "onUpdate:selectedServer": t[0] || (t[0] = (s) => e.eventBus.emit("server:update:selected", s)),
106
+ "onUpdate:servers": t[1] || (t[1] = (s) => c("update:servers")),
107
+ "onUpdate:variable": t[2] || (t[2] = (s) => e.eventBus.emit("server:update:variables", s))
108
108
  }, null, 8, ["layout", "server", "servers", "target"])) : E("", !0),
109
- t[6] || (t[6] = s("div", { class: "fade-left" }, null, -1)),
110
- r(n(re), {
109
+ t[6] || (t[6] = o("div", { class: "fade-left" }, null, -1)),
110
+ a(l(ae), {
111
111
  ref_key: "addressBarRef",
112
112
  ref: d,
113
113
  alwaysEmitChange: "",
@@ -124,69 +124,69 @@ const ae = ["id"], ie = { class: "pointer-events-none absolute top-0 left-0 bloc
124
124
  modelValue: e.path,
125
125
  placeholder: e.server ? "" : "Enter a URL or cURL command",
126
126
  server: "",
127
- onCurl: t[3] || (t[3] = (l) => e.eventBus.emit("ui:open:command-palette", {
127
+ onCurl: t[3] || (t[3] = (s) => e.eventBus.emit("ui:open:command-palette", {
128
128
  action: "import-curl-command",
129
129
  payload: {
130
- curl: l
130
+ curl: s
131
131
  }
132
132
  })),
133
- onSubmit: t[4] || (t[4] = (l) => f("execute")),
133
+ onSubmit: t[4] || (t[4] = (s) => c("execute")),
134
134
  "onUpdate:modelValue": A
135
135
  }, null, 8, ["disabled", "environment", "layout", "modelValue", "placeholder"]),
136
- t[7] || (t[7] = s("div", { class: "fade-right" }, null, -1))
136
+ t[7] || (t[7] = o("div", { class: "fade-right" }, null, -1))
137
137
  ]),
138
- r(n($), {
138
+ a(l($), {
139
139
  class: "hover:bg-b-3 mx-1",
140
140
  size: "xs",
141
141
  variant: "ghost",
142
142
  onClick: N
143
143
  }, {
144
144
  default: R(() => [
145
- r(n(Y)),
146
- t[8] || (t[8] = s("span", { class: "sr-only" }, "Copy URL", -1))
145
+ a(l(Y)),
146
+ t[8] || (t[8] = o("span", { class: "sr-only" }, "Copy URL", -1))
147
147
  ]),
148
148
  _: 1
149
149
  }),
150
- r(se, {
150
+ a(oe, {
151
151
  history: e.history,
152
- target: n(v)
152
+ target: l(f)
153
153
  }, null, 8, ["history", "target"]),
154
- y.value ? (h(), z("div", me, [
155
- s("div", fe, [
156
- r(n(Z), { size: "sm" }),
157
- s("div", ve, [
154
+ B.value ? (x(), z("div", me, [
155
+ o("div", ce, [
156
+ a(l(Z), { size: "sm" }),
157
+ o("div", fe, [
158
158
  t[9] || (t[9] = b(" A ", -1)),
159
- s("em", null, m(a.value?.toUpperCase() ?? e.method.toUpperCase()), 1),
159
+ o("em", null, m(r.value?.toUpperCase() ?? e.method.toUpperCase()), 1),
160
160
  t[10] || (t[10] = b(" request to ", -1)),
161
- r(n(Q), {
161
+ a(l(Q), {
162
162
  text: i.value ?? e.path
163
163
  }, null, 8, ["text"]),
164
164
  t[11] || (t[11] = b(" already exists in this document ", -1))
165
165
  ])
166
166
  ])
167
167
  ])) : E("", !0),
168
- r(n($), {
168
+ a(l($), {
169
169
  ref_key: "sendButtonRef",
170
170
  ref: C,
171
171
  class: "z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold",
172
- disabled: n(g) < 100,
173
- onClick: t[5] || (t[5] = (l) => f("execute"))
172
+ disabled: l(g) < 100,
173
+ onClick: t[5] || (t[5] = (s) => c("execute"))
174
174
  }, {
175
175
  default: R(() => [
176
- s("span", ce, [
177
- r(n(j), {
176
+ o("span", ve, [
177
+ a(l(j), {
178
178
  class: "relative shrink-0 fill-current",
179
179
  icon: "Play",
180
180
  size: "xs"
181
181
  }),
182
- t[12] || (t[12] = s("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
182
+ t[12] || (t[12] = o("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
183
183
  ]),
184
- s("span", pe, " Send " + m(e.method) + " request to " + m(e.server?.url ?? "") + m(e.path), 1)
184
+ o("span", he, " Send " + m(e.method) + " request to " + m(e.server?.url ?? "") + m(e.path), 1)
185
185
  ]),
186
186
  _: 1
187
187
  }, 8, ["disabled"])
188
188
  ], 2)
189
- ], 8, ae));
189
+ ], 8, re));
190
190
  }
191
191
  });
192
192
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as h, createBlock as n, openBlock as a, unref as t, withCtx as o, createVNode as r, createSlots as g, createCommentVNode as _, createElementVNode as s, normalizeStyle as v, createElementBlock as x, Fragment as y, renderList as k, toDisplayString as l, normalizeClass as C } from "vue";
1
+ import { defineComponent as h, createBlock as n, openBlock as a, unref as t, withCtx as o, createVNode as r, createSlots as g, createCommentVNode as x, createElementVNode as s, normalizeStyle as v, createElementBlock as y, Fragment as _, renderList as k, toDisplayString as l, normalizeClass as C } from "vue";
2
2
  import { Menu as S, MenuButton as b, MenuItems as B, MenuItem as H } from "@headlessui/vue";
3
3
  import { ScalarFloating as M, ScalarIcon as z, ScalarFloatingBackdrop as I } from "@scalar/components";
4
4
  import { httpStatusCodes as w } from "@scalar/oas-utils/helpers";
@@ -12,10 +12,10 @@ const E = { class: "min-w-0" }, q = { class: "text-c-1 min-w-0 truncate" }, O =
12
12
  history: {}
13
13
  },
14
14
  emits: ["selectHistoryItem"],
15
- setup(A, { emit: m }) {
15
+ setup(i, { emit: m }) {
16
16
  const u = m;
17
- return (i, c) => (a(), n(t(S), { as: "div" }, {
18
- default: o(({ open: p }) => [
17
+ return (A, c) => (a(), n(t(S), { as: "div" }, {
18
+ default: o(({ open: f }) => [
19
19
  r(t(M), {
20
20
  offset: 0,
21
21
  resize: "",
@@ -35,20 +35,20 @@ const E = { class: "min-w-0" }, q = { class: "text-c-1 min-w-0 truncate" }, O =
35
35
  c[0] || (c[0] = s("span", { class: "sr-only" }, "Request History", -1))
36
36
  ]),
37
37
  _: 1
38
- })) : _("", !0)
38
+ })) : x("", !0)
39
39
  ]),
40
40
  _: 2
41
41
  }, [
42
- p ? {
42
+ f ? {
43
43
  name: "floating",
44
- fn: o(({ width: f }) => [
44
+ fn: o(({ width: p }) => [
45
45
  r(t(B), {
46
46
  class: "custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center border-t p-0.75",
47
47
  static: "",
48
- style: v({ width: f })
48
+ style: v({ width: p })
49
49
  }, {
50
50
  default: o(() => [
51
- (a(!0), x(y, null, k(i.history, (e, d) => (a(), n(t(H), {
51
+ (a(!0), y(_, null, k(i.history, (e, d) => (a(), n(t(H), {
52
52
  key: e.id,
53
53
  as: "button",
54
54
  class: "font-code ui-active:*:bg-b-2 text-c-2 contents text-sm font-medium *:flex *:h-8 *:cursor-pointer *:items-center *:rounded-none *:px-1.5 *:first:rounded-l *:last:rounded-r",