@scalar/api-client 2.38.2 → 2.38.4

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 (263) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{AddressBar-B4xnl66I.js → AddressBar-BOZGKSoz.js} +4 -4
  3. package/dist/{AddressBar-B4xnl66I.js.map → AddressBar-BOZGKSoz.js.map} +1 -1
  4. package/dist/{App-CvClwSlM.js → App-Ckirvnv1.js} +2 -2
  5. package/dist/{App-CvClwSlM.js.map → App-Ckirvnv1.js.map} +1 -1
  6. package/dist/{App-BVH4lIe8.js → App-DHBmpWJI.js} +4 -4
  7. package/dist/{App-BVH4lIe8.js.map → App-DHBmpWJI.js.map} +1 -1
  8. package/dist/{CodeInput-C-igR77V.js → CodeInput-BTN8cC5h.js} +2 -2
  9. package/dist/{CodeInput-C-igR77V.js.map → CodeInput-BTN8cC5h.js.map} +1 -1
  10. package/dist/{Collection-4MT9WmDD.js → Collection-BsAG7ms5.js} +2 -2
  11. package/dist/{Collection-4MT9WmDD.js.map → Collection-BsAG7ms5.js.map} +1 -1
  12. package/dist/{CollectionAuthentication-MHWQpw74.js → CollectionAuthentication-BMGhRnpo.js} +5 -5
  13. package/dist/{CollectionAuthentication-MHWQpw74.js.map → CollectionAuthentication-BMGhRnpo.js.map} +1 -1
  14. package/dist/{CollectionEnvironment-Dw35vIqo.js → CollectionEnvironment-BY9Gcnln.js} +4 -4
  15. package/dist/{CollectionEnvironment-Dw35vIqo.js.map → CollectionEnvironment-BY9Gcnln.js.map} +1 -1
  16. package/dist/{CollectionOverview-TUdDIu5f.js → CollectionOverview-C3GvN8GY.js} +3 -3
  17. package/dist/{CollectionOverview-TUdDIu5f.js.map → CollectionOverview-C3GvN8GY.js.map} +1 -1
  18. package/dist/{CollectionServers-BrjTCfDe.js → CollectionServers-DuOLysNB.js} +5 -5
  19. package/dist/{CollectionServers-BrjTCfDe.js.map → CollectionServers-DuOLysNB.js.map} +1 -1
  20. package/dist/{CollectionSettings-HVSlp2Gv.js → CollectionSettings-FtXNetOh.js} +2 -2
  21. package/dist/{CollectionSettings-HVSlp2Gv.js.map → CollectionSettings-FtXNetOh.js.map} +1 -1
  22. package/dist/{CommandPalette-CL8k4CoN.js → CommandPalette-BxoEK8TY.js} +2 -2
  23. package/dist/{CommandPalette-CL8k4CoN.js.map → CommandPalette-BxoEK8TY.js.map} +1 -1
  24. package/dist/{Cookies-DbOKTi1f.js → Cookies-BYTv1YIA.js} +8 -8
  25. package/dist/{Cookies-DbOKTi1f.js.map → Cookies-BYTv1YIA.js.map} +1 -1
  26. package/dist/{DataTableInput-yaU5g-kP.js → DataTableInput-RydMDjn2.js} +2 -2
  27. package/dist/{DataTableInput-yaU5g-kP.js.map → DataTableInput-RydMDjn2.js.map} +1 -1
  28. package/dist/{Environment-DJatRQIg.js → Environment-BIxG7DaO.js} +5 -5
  29. package/dist/{Environment-DJatRQIg.js.map → Environment-BIxG7DaO.js.map} +1 -1
  30. package/dist/{EnvironmentModal-DBEJ4Kzj.js → EnvironmentModal-C0lYytkh.js} +2 -2
  31. package/dist/{EnvironmentModal-DBEJ4Kzj.js.map → EnvironmentModal-C0lYytkh.js.map} +1 -1
  32. package/dist/{Form-CSKzyHGO.js → Form-KFcdRQp1.js} +3 -3
  33. package/dist/{Form-CSKzyHGO.js.map → Form-KFcdRQp1.js.map} +1 -1
  34. package/dist/{ImportCollection-DfX1UQ5u.js → ImportCollection-CGjySEzP.js} +2 -2
  35. package/dist/{ImportCollection-DfX1UQ5u.js.map → ImportCollection-CGjySEzP.js.map} +1 -1
  36. package/dist/{MainLayout-BEFMl1ud.js → MainLayout-BnLwst16.js} +3 -3
  37. package/dist/{MainLayout-BEFMl1ud.js.map → MainLayout-BnLwst16.js.map} +1 -1
  38. package/dist/{Modal-sQ9vH6MN.js → Modal-CTZ8UNds.js} +2 -2
  39. package/dist/{Modal-sQ9vH6MN.js.map → Modal-CTZ8UNds.js.map} +1 -1
  40. package/dist/{Request-gscRsGQ8.js → Request-d0RY0ZhC.js} +10 -10
  41. package/dist/{Request-gscRsGQ8.js.map → Request-d0RY0ZhC.js.map} +1 -1
  42. package/dist/{RequestAuth-BzBfIysT.js → RequestAuth-1cRH3DDn.js} +3 -3
  43. package/dist/{RequestAuth-BzBfIysT.js.map → RequestAuth-1cRH3DDn.js.map} +1 -1
  44. package/dist/{RequestRoot-3Bj8JZD-.js → RequestRoot-pW0yXesG.js} +7 -7
  45. package/dist/{RequestRoot-3Bj8JZD-.js.map → RequestRoot-pW0yXesG.js.map} +1 -1
  46. package/dist/{RequestSection-HhdJj9hW.js → RequestSection-D2BLvDTr.js} +4 -4
  47. package/dist/{RequestSection-HhdJj9hW.js.map → RequestSection-D2BLvDTr.js.map} +1 -1
  48. package/dist/{ResponseSection-DMJ0tw8E.js → ResponseSection-B_YF7l_E.js} +3 -3
  49. package/dist/{ResponseSection-DMJ0tw8E.js.map → ResponseSection-B_YF7l_E.js.map} +1 -1
  50. package/dist/{Server-DnA_BzPS.js → Server-CEKGIEfE.js} +2 -2
  51. package/dist/{Server-DnA_BzPS.js.map → Server-CEKGIEfE.js.map} +1 -1
  52. package/dist/{Settings-CYZzdJPO.js → Settings-BaPvhJ8Y.js} +2 -2
  53. package/dist/{Settings-CYZzdJPO.js.map → Settings-BaPvhJ8Y.js.map} +1 -1
  54. package/dist/{Sidebar-C6AdX6-N.js → Sidebar-CRxdl38Y.js} +2 -2
  55. package/dist/{Sidebar-C6AdX6-N.js.map → Sidebar-CRxdl38Y.js.map} +1 -1
  56. package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
  57. package/dist/components/AddressBar/index.js +3 -3
  58. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  59. package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
  60. package/dist/components/CodeInput/index.js +1 -1
  61. package/dist/components/CommandPalette/index.js +1 -1
  62. package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -2
  63. package/dist/components/DataTable/index.js +2 -2
  64. package/dist/components/Form/LabelInput.vue.d.ts +1 -1
  65. package/dist/components/ImportCollection/index.js +1 -1
  66. package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
  67. package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
  68. package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
  69. package/dist/components/Server/index.js +1 -1
  70. package/dist/components/Sidebar/index.js +1 -1
  71. package/dist/components/index.d.ts +2 -2
  72. package/dist/components/index.js +4 -4
  73. package/dist/{components-CSxJTn6F.js → components-B0BwUDFw.js} +2 -2
  74. package/dist/{components-CSxJTn6F.js.map → components-B0BwUDFw.js.map} +1 -1
  75. package/dist/get-resolved-url-SybDPV0U.js +85 -0
  76. package/dist/get-resolved-url-SybDPV0U.js.map +1 -0
  77. package/dist/{get-server-url-o3On8CEr.js → get-server-url-UVN-dx79.js} +1 -1
  78. package/dist/{get-server-url-o3On8CEr.js.map → get-server-url-UVN-dx79.js.map} +1 -1
  79. package/dist/hooks/useSidebar.d.ts +1 -1
  80. package/dist/index.d.ts +2 -2
  81. package/dist/index.js +5 -5
  82. package/dist/layouts/App/create-api-client-app.d.ts +9 -9
  83. package/dist/layouts/App/index.js +3 -3
  84. package/dist/layouts/Modal/create-api-client-modal.d.ts +1 -1
  85. package/dist/layouts/Modal/index.d.ts +1 -1
  86. package/dist/layouts/Modal/index.js +1 -1
  87. package/dist/layouts/Web/create-api-client-web.d.ts +9 -9
  88. package/dist/layouts/Web/index.js +4 -4
  89. package/dist/libs/create-client.d.ts +3 -3
  90. package/dist/libs/environment-parser.d.ts +1 -1
  91. package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
  92. package/dist/libs/hot-keys.d.ts +1 -1
  93. package/dist/libs/index.d.ts +1 -1
  94. package/dist/libs/index.js +1 -1
  95. package/dist/libs/local-storage.d.ts +1 -1
  96. package/dist/libs/send-request/create-request-operation.d.ts +3 -3
  97. package/dist/{operation-block-BnMIKAOh.js → operation-block-B1B3lJPx.js} +67 -17
  98. package/dist/operation-block-B1B3lJPx.js.map +1 -0
  99. package/dist/{operation-code-sample-ZUTueV3v.js → operation-code-sample-DOzAPxLQ.js} +22 -10
  100. package/dist/operation-code-sample-DOzAPxLQ.js.map +1 -0
  101. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  102. package/dist/{request-block-DwsGy64Q.js → request-block-C1kLLMEd.js} +4 -4
  103. package/dist/{request-block-DwsGy64Q.js.map → request-block-C1kLLMEd.js.map} +1 -1
  104. package/dist/{scalar-address-bar-block--Vs6IBU1.js → scalar-address-bar-block-BbysOhkE.js} +2 -2
  105. package/dist/{scalar-address-bar-block--Vs6IBU1.js.map → scalar-address-bar-block-BbysOhkE.js.map} +1 -1
  106. package/dist/{scalar-auth-selector-block-DI3DLag9.js → scalar-auth-selector-block-Bs79QOMA.js} +12 -9
  107. package/dist/scalar-auth-selector-block-Bs79QOMA.js.map +1 -0
  108. package/dist/store/collections.d.ts +1 -1
  109. package/dist/store/environment.d.ts +1 -1
  110. package/dist/store/events.d.ts +8 -8
  111. package/dist/store/import-spec.d.ts +2 -2
  112. package/dist/store/index.js +1 -1
  113. package/dist/store/request-example.d.ts +1 -1
  114. package/dist/store/requests.d.ts +1 -1
  115. package/dist/store/security-schemes.d.ts +1 -1
  116. package/dist/store/servers.d.ts +1 -1
  117. package/dist/store/store.d.ts +7 -7
  118. package/dist/store/tags.d.ts +1 -1
  119. package/dist/store/workspace.d.ts +1 -1
  120. package/dist/{store-DpSUVhjp.js → store-DnlAQK5d.js} +15 -15
  121. package/dist/{store-DpSUVhjp.js.map → store-DnlAQK5d.js.map} +1 -1
  122. package/dist/style.css +1 -1
  123. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -3
  124. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  125. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
  126. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts +6 -0
  127. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts.map +1 -0
  128. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  129. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +1 -0
  130. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  131. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +2 -2
  132. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +2 -2
  133. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
  134. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +2 -1
  135. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -1
  136. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
  137. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
  138. package/dist/v2/blocks/operation-block/index.js +11 -11
  139. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +2 -2
  140. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +1 -1
  141. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +1 -1
  142. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +1 -1
  143. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +2 -2
  144. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
  145. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
  146. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  147. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
  148. package/dist/v2/blocks/operation-code-sample/index.js +1 -1
  149. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -4
  150. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +1 -1
  151. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
  152. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
  153. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
  154. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
  155. package/dist/v2/blocks/request-block/index.js +5 -5
  156. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
  157. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
  158. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
  159. package/dist/v2/blocks/response-block/index.js +2 -2
  160. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +1 -1
  161. package/dist/v2/blocks/scalar-address-bar-block/index.js +1 -1
  162. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
  163. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  164. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
  165. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
  166. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
  167. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  168. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
  169. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
  170. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  171. package/dist/v2/blocks/scalar-auth-selector-block/index.js +3 -3
  172. package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
  173. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
  174. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
  175. package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
  176. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
  177. package/dist/v2/constants.d.ts +3 -0
  178. package/dist/v2/constants.d.ts.map +1 -0
  179. package/dist/v2/features/app/App.vue.d.ts +3 -3
  180. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
  181. package/dist/v2/features/app/components/index.js +4 -4
  182. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +3 -3
  183. package/dist/v2/features/app/helpers/get-route-param.d.ts +1 -1
  184. package/dist/v2/features/app/helpers/routes.d.ts +3 -3
  185. package/dist/v2/features/app/index.d.ts +5 -5
  186. package/dist/v2/features/app/index.js +14 -14
  187. package/dist/v2/features/app/index.js.map +1 -1
  188. package/dist/v2/features/collection/DocumentCollection.vue.d.ts +1 -1
  189. package/dist/v2/features/collection/OperationCollection.vue.d.ts +1 -1
  190. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -1
  191. package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -4
  192. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  193. package/dist/v2/features/collection/components/Cookies.vue.d.ts +4 -4
  194. package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +4 -4
  195. package/dist/v2/features/collection/components/Environment.vue.d.ts +4 -4
  196. package/dist/v2/features/collection/components/Overview.vue.d.ts +4 -4
  197. package/dist/v2/features/collection/components/Servers.vue.d.ts +4 -4
  198. package/dist/v2/features/collection/components/Settings.vue.d.ts +4 -4
  199. package/dist/v2/features/collection/components/Tabs.vue.d.ts +1 -1
  200. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +45 -10
  201. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  202. package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +1 -1
  203. package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +1 -1
  204. package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +1 -1
  205. package/dist/v2/features/editor/hooks/use-editor.d.ts +1 -1
  206. package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +1 -1
  207. package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
  208. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
  209. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
  210. package/dist/v2/features/modal/index.js +10 -10
  211. package/dist/v2/features/modal/modal-events.d.ts +1 -1
  212. package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
  213. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  214. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +6 -1
  215. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
  216. package/dist/v2/features/operation/index.js +10 -10
  217. package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
  218. package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
  219. package/dist/v2/helpers/get-active-proxy-url.d.ts +1 -1
  220. package/dist/v2/helpers/get-tab-details.d.ts +1 -1
  221. package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
  222. package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
  223. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
  224. package/dist/views/Collection/components/MarkdownInput.vue.d.ts +1 -1
  225. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
  226. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
  227. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
  228. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
  229. package/dist/views/Environment/handle-drag.d.ts +1 -1
  230. package/dist/views/Request/Request.vue.d.ts +1 -1
  231. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
  232. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
  233. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
  234. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
  235. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +2 -2
  236. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
  237. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +1 -1
  238. package/dist/views/Request/RequestSection/RequestAuth/index.js +3 -3
  239. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
  240. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
  241. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
  242. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
  243. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
  244. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
  245. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
  246. package/dist/views/Request/RequestSection/index.js +4 -4
  247. package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
  248. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -3
  249. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -1
  250. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
  251. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
  252. package/dist/views/Request/ResponseSection/index.js +3 -3
  253. package/dist/views/Request/components/index.js +1 -1
  254. package/dist/views/Request/handle-drag.d.ts +2 -2
  255. package/dist/views/Request/libs/auth.d.ts +1 -1
  256. package/dist/views/Request/libs/oauth2.d.ts +1 -1
  257. package/dist/views/Request/libs/watch-mode.d.ts +2 -2
  258. package/package.json +12 -12
  259. package/dist/get-resolved-url-BUCwrBzc.js +0 -30
  260. package/dist/get-resolved-url-BUCwrBzc.js.map +0 -1
  261. package/dist/operation-block-BnMIKAOh.js.map +0 -1
  262. package/dist/operation-code-sample-ZUTueV3v.js.map +0 -1
  263. package/dist/scalar-auth-selector-block-DI3DLag9.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.38.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#8529](https://github.com/scalar/scalar/pull/8529): rewrite declaration aliases in built type files
8
+
9
+ ## 2.38.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#8465](https://github.com/scalar/scalar/pull/8465): fix multipart encoding.contentType request handling and curl snippets
14
+ - [#8501](https://github.com/scalar/scalar/pull/8501): fix allowReserved query parameter support so reserved characters like colons stay unescaped and parameter typings include allowReserved
15
+ - [#8517](https://github.com/scalar/scalar/pull/8517): Fix OAuth2 authorization code auth behavior in v2 by including `client_id` in token exchange for public clients, preventing duplicate scheme entries when selected scopes change, and applying configured default scopes to initial auth selection.
16
+
3
17
  ## 2.38.2
4
18
 
5
19
  ### Patch Changes
@@ -1,10 +1,10 @@
1
- import { r as useWorkspace } from "./store-DpSUVhjp.js";
1
+ import { r as useWorkspace } from "./store-DnlAQK5d.js";
2
2
  import { a as useLayout } from "./useSidebar-DLTwHDI-.js";
3
3
  import { n as formatMs } from "./formatters-DOGXZq9R.js";
4
4
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BmmBcIzD.js";
5
5
  import { t as HttpMethod_default } from "./HttpMethod-rnWEgC3T.js";
6
- import { t as CodeInput_default } from "./CodeInput-C-igR77V.js";
7
- import { n as ServerDropdown_default } from "./Server-DnA_BzPS.js";
6
+ import { t as CodeInput_default } from "./CodeInput-BTN8cC5h.js";
7
+ import { n as ServerDropdown_default } from "./Server-CEKGIEfE.js";
8
8
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderList, toDisplayString, unref, useId, watch, withCtx } from "vue";
9
9
  import { ScalarButton, ScalarFloating, ScalarFloatingBackdrop, ScalarIcon } from "@scalar/components";
10
10
  import { httpStatusCodes } from "@scalar/oas-utils/helpers";
@@ -299,4 +299,4 @@ var AddressBar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @_
299
299
  //#endregion
300
300
  export { AddressBar_default as t };
301
301
 
302
- //# sourceMappingURL=AddressBar-B4xnl66I.js.map
302
+ //# sourceMappingURL=AddressBar-BOZGKSoz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBar-B4xnl66I.js","names":["$emit"],"sources":["../src/components/AddressBar/httpStatusCodeColors.ts","../src/components/AddressBar/AddressBarHistory.vue","../src/components/AddressBar/AddressBarHistory.vue","../src/components/AddressBar/AddressBar.vue","../src/components/AddressBar/AddressBar.vue"],"sourcesContent":["const STATUS_CODES_COLORS = {\n 100: {\n color: 'text-yellow',\n },\n 200: {\n color: 'text-green',\n },\n 202: {\n color: 'text-green',\n },\n 300: {\n color: 'text-blue',\n },\n 304: {\n color: 'text-blue',\n },\n 400: {\n color: 'text-red',\n },\n 401: {\n color: 'text-orange',\n },\n 422: {\n color: 'text-yellow',\n },\n 423: {\n color: 'text-purple',\n },\n 505: {\n color: 'text-orange',\n },\n} as const\n\ntype StatusCode = keyof typeof STATUS_CODES_COLORS\n\nexport const getStatusCodeColor = (statusCode: number) => {\n const code = statusCode as StatusCode\n return (\n STATUS_CODES_COLORS[code] || {\n /** default color */\n color: 'text-grey',\n }\n )\n}\n","<script setup lang=\"ts\">\nimport { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n ScalarIcon,\n} from '@scalar/components'\nimport type { Operation, RequestEvent } from '@scalar/oas-utils/entities/spec'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\nimport { computed } from 'vue'\n\nimport { formatMs } from '@/libs/formatters'\nimport { useWorkspace } from '@/store'\n\nimport HttpMethod from '../HttpMethod/HttpMethod.vue'\nimport { getStatusCodeColor } from './httpStatusCodeColors'\n\nconst { operation, target } = defineProps<{\n operation: Operation\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst { requestHistory } = useWorkspace()\n\n/** Use a local copy to prevent mutation of the reactive object */\nconst history = computed(() =>\n requestHistory\n .filter((entry) => entry.request.requestUid === operation.uid)\n .slice()\n .reverse(),\n)\n\nfunction handleHistoryClick(requestHistoryItem: RequestEvent) {\n console.warn(\n \"Restoring from the request history doesn't work yet. Request History Item:\",\n requestHistoryItem,\n )\n // TODO: Restore the request data with the history item\n // TODO: Restore the response data with the history item\n}\n</script>\n<template>\n <Menu\n v-slot=\"{ open }\"\n as=\"div\">\n <ScalarFloating\n :offset=\"0\"\n resize\n :target=\"target\">\n <!-- History -->\n <MenuButton\n v-if=\"history?.length\"\n class=\"address-bar-history-button z-context-plus text-c-3 focus:text-c-1 relative mr-1 rounded-lg p-1.5\">\n <ScalarIcon\n icon=\"History\"\n size=\"sm\"\n thickness=\"2.25\" />\n <span class=\"sr-only\">Request History</span>\n </MenuButton>\n <!-- History shadow and placement-->\n <template\n v-if=\"open\"\n #floating=\"{ width }\">\n <!-- History Item -->\n <MenuItems\n class=\"custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center border-t p-0.75\"\n static\n :style=\"{ width }\">\n <MenuItem\n v-for=\"(entry, index) in history\"\n :key=\"entry.timestamp\"\n as=\"button\"\n 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\"\n :value=\"index\"\n @click=\"handleHistoryClick(entry)\">\n <HttpMethod\n v-if=\"entry.response.method\"\n class=\"text-[11px]\"\n :method=\"entry.response.method\" />\n <div class=\"min-w-0\">\n <div class=\"text-c-1 min-w-0 truncate\">\n {{ entry.response.path }}\n </div>\n </div>\n <div>{{ formatMs(entry.response.duration) }}</div>\n <div :class=\"[getStatusCodeColor(entry.response.status).color]\">\n {{ entry.response.status }}\n </div>\n <div>\n {{ httpStatusCodes[entry.response.status]?.name }}\n </div>\n </MenuItem>\n </MenuItems>\n <ScalarFloatingBackdrop\n class=\"-top-(--scalar-address-bar-height) rounded-lg\" />\n </template>\n </ScalarFloating>\n </Menu>\n</template>\n<style scoped>\n.address-bar-history-button:hover {\n background: var(--scalar-background-3);\n}\n.address-bar-history-button:focus-within {\n background: var(--scalar-background-2);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n ScalarIcon,\n} from '@scalar/components'\nimport type { Operation, RequestEvent } from '@scalar/oas-utils/entities/spec'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\nimport { computed } from 'vue'\n\nimport { formatMs } from '@/libs/formatters'\nimport { useWorkspace } from '@/store'\n\nimport HttpMethod from '../HttpMethod/HttpMethod.vue'\nimport { getStatusCodeColor } from './httpStatusCodeColors'\n\nconst { operation, target } = defineProps<{\n operation: Operation\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst { requestHistory } = useWorkspace()\n\n/** Use a local copy to prevent mutation of the reactive object */\nconst history = computed(() =>\n requestHistory\n .filter((entry) => entry.request.requestUid === operation.uid)\n .slice()\n .reverse(),\n)\n\nfunction handleHistoryClick(requestHistoryItem: RequestEvent) {\n console.warn(\n \"Restoring from the request history doesn't work yet. Request History Item:\",\n requestHistoryItem,\n )\n // TODO: Restore the request data with the history item\n // TODO: Restore the response data with the history item\n}\n</script>\n<template>\n <Menu\n v-slot=\"{ open }\"\n as=\"div\">\n <ScalarFloating\n :offset=\"0\"\n resize\n :target=\"target\">\n <!-- History -->\n <MenuButton\n v-if=\"history?.length\"\n class=\"address-bar-history-button z-context-plus text-c-3 focus:text-c-1 relative mr-1 rounded-lg p-1.5\">\n <ScalarIcon\n icon=\"History\"\n size=\"sm\"\n thickness=\"2.25\" />\n <span class=\"sr-only\">Request History</span>\n </MenuButton>\n <!-- History shadow and placement-->\n <template\n v-if=\"open\"\n #floating=\"{ width }\">\n <!-- History Item -->\n <MenuItems\n class=\"custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center border-t p-0.75\"\n static\n :style=\"{ width }\">\n <MenuItem\n v-for=\"(entry, index) in history\"\n :key=\"entry.timestamp\"\n as=\"button\"\n 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\"\n :value=\"index\"\n @click=\"handleHistoryClick(entry)\">\n <HttpMethod\n v-if=\"entry.response.method\"\n class=\"text-[11px]\"\n :method=\"entry.response.method\" />\n <div class=\"min-w-0\">\n <div class=\"text-c-1 min-w-0 truncate\">\n {{ entry.response.path }}\n </div>\n </div>\n <div>{{ formatMs(entry.response.duration) }}</div>\n <div :class=\"[getStatusCodeColor(entry.response.status).color]\">\n {{ entry.response.status }}\n </div>\n <div>\n {{ httpStatusCodes[entry.response.status]?.name }}\n </div>\n </MenuItem>\n </MenuItems>\n <ScalarFloatingBackdrop\n class=\"-top-(--scalar-address-bar-height) rounded-lg\" />\n </template>\n </ScalarFloating>\n </Menu>\n</template>\n<style scoped>\n.address-bar-history-button:hover {\n background: var(--scalar-background-3);\n}\n.address-bar-history-button:focus-within {\n background: var(--scalar-background-2);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\nimport { REQUEST_METHODS } from '@scalar/helpers/http/http-info'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { Environment } from '@scalar/oas-utils/entities/environment'\nimport type {\n Collection,\n Operation,\n RequestMethod,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport type { Workspace } from '@scalar/oas-utils/entities/workspace'\nimport { ref, useId, watch } from 'vue'\n\nimport CodeInput from '@/components/CodeInput/CodeInput.vue'\nimport { ServerDropdown } from '@/components/Server'\nimport { useLayout } from '@/hooks'\nimport { useWorkspace } from '@/store'\nimport type { EnvVariable } from '@/store/active-entities'\n\nimport HttpMethod from '../HttpMethod/HttpMethod.vue'\nimport AddressBarHistory from './AddressBarHistory.vue'\n\nconst { collection, operation, server, environment, envVariables, workspace } =\n defineProps<{\n collection: Collection\n operation: Operation\n server: Server | undefined\n environment: Environment\n envVariables: EnvVariable[]\n workspace: Workspace\n }>()\n\ndefineEmits<{\n (e: 'importCurl', value: string): void\n}>()\n\nconst id = useId()\n\nconst { requestMutators, events } = useWorkspace()\n\nconst { layout } = useLayout()\n\nconst addressBarRef = ref<typeof CodeInput | null>(null)\nconst sendButtonRef = ref<typeof ScalarButton | null>(null)\n\n/** update the instance path parameters on change */\nconst onUrlChange = (newPath: string) => {\n if (operation.path === newPath) {\n return\n }\n requestMutators.edit(operation.uid, 'path', newPath)\n}\n\n/** watch for changes in the URL */\nwatch(\n () => operation.path,\n (newURL) => {\n if (!newURL) {\n return\n }\n onUrlChange(newURL)\n },\n)\n\n/** The amount remaining to load from 100 -> 0 */\nconst percentage = ref(100)\n/** Keeps track of how much was left when the request finished */\nconst remaining = ref(0)\n/** Whether or not there is a request loading */\nconst isRequesting = ref(false)\n/** The loading interval */\nconst interval = ref<ReturnType<typeof setInterval>>()\n\nfunction load() {\n if (isRequesting.value) {\n // Reduce asymptotically up to 85% loaded\n percentage.value -= (percentage.value - 15) / 60\n } else {\n // Always finish loading linearly over 400ms\n percentage.value -= remaining.value / 20\n }\n if (percentage.value <= 0) {\n clearInterval(interval.value)\n interval.value = undefined\n percentage.value = 100\n isRequesting.value = false\n }\n}\n\nfunction startLoading() {\n if (interval.value) {\n return\n }\n isRequesting.value = true\n interval.value = setInterval(load, 20)\n}\n\nfunction stopLoading() {\n remaining.value = percentage.value\n isRequesting.value = false\n}\n\nfunction abortLoading() {\n clearInterval(interval.value)\n interval.value = undefined\n percentage.value = 100\n isRequesting.value = false\n}\n\nevents.requestStatus.on((status) => {\n if (status === 'start') {\n return startLoading()\n }\n if (status === 'stop') {\n return stopLoading()\n }\n if (status === 'abort') {\n return abortLoading()\n }\n\n status satisfies undefined\n})\n\n/** Focus the address bar (or the send button if in modal layout) */\nevents.focusAddressBar.on(() => {\n if (layout === 'modal') {\n sendButtonRef.value?.$el?.focus()\n } else {\n addressBarRef.value?.focus()\n }\n})\n\nfunction updateRequestMethod(method: RequestMethod) {\n requestMutators.edit(operation.uid, 'method', method)\n}\n\nfunction getBackgroundColor() {\n const { method } = operation\n return REQUEST_METHODS[method].colorVar\n}\n\nfunction handleExecuteRequest() {\n if (isRequesting.value) {\n return\n }\n isRequesting.value = true\n events.executeRequest.emit({ requestUid: operation.uid })\n}\n\n/** Handle hotkeys */\nevents.hotKeys.on((event) => {\n if (event?.focusAddressBar) {\n addressBarRef.value?.focus()\n }\n if (event?.executeRequest) {\n handleExecuteRequest()\n }\n})\n\n/**\n * TODO: Should we handle query params here somehow?\n */\nfunction updateRequestPath(url: string) {\n requestMutators.edit(operation.uid, 'path', url)\n}\n</script>\n<template>\n <div\n :id=\"id\"\n 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\">\n <!-- Address Bar -->\n <div\n class=\"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]\">\n <div\n class=\"pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border\">\n <div\n class=\"absolute top-0 left-0 z-[1002] h-full w-full\"\n :style=\"{\n backgroundColor: `color-mix(in srgb, transparent 90%, ${getBackgroundColor()})`,\n transform: `translate3d(-${percentage}%,0,0)`,\n }\" />\n </div>\n <div class=\"z-context-plus flex gap-1\">\n <HttpMethod\n :isEditable=\"layout !== 'modal'\"\n isSquare\n :method=\"operation.method\"\n teleport\n @change=\"updateRequestMethod\" />\n </div>\n\n <div\n class=\"scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"collection.servers.length\"\n :collection=\"collection\"\n layout=\"client\"\n :operation=\"operation\"\n :server=\"server\"\n :target=\"id\" />\n\n <div class=\"fade-left\" />\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n aria-label=\"Path\"\n class=\"min-w-fit outline-none\"\n disableCloseBrackets\n :disabled=\"layout === 'modal'\"\n disableEnter\n disableTabIndent\n :emitOnBlur=\"false\"\n :envVariables=\"envVariables\"\n :environment=\"environment\"\n importCurl\n :modelValue=\"operation.path\"\n :placeholder=\"\n server?.uid && collection.servers.includes(server.uid)\n ? ''\n : 'Enter a URL or cURL command'\n \"\n server\n :workspace=\"workspace\"\n @curl=\"$emit('importCurl', $event)\"\n @submit=\"handleExecuteRequest\"\n @update:modelValue=\"updateRequestPath\" />\n <div class=\"fade-right\" />\n </div>\n\n <AddressBarHistory\n :operation=\"operation\"\n :target=\"id\" />\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold\"\n :disabled=\"isRequesting\"\n @click=\"handleExecuteRequest\">\n <span\n aria-hidden=\"true\"\n class=\"inline-flex items-center gap-1\">\n <ScalarIconPlay\n class=\"relative shrink-0\"\n size=\"xs\"\n weight=\"fill\" />\n <span class=\"text-xxs hidden lg:flex\">Send</span>\n </span>\n <span class=\"sr-only\">\n Send {{ operation.method }} request to {{ server?.url ?? ''\n }}{{ operation.path }}\n </span>\n </ScalarButton>\n </div>\n </div>\n</template>\n<style scoped>\n:deep(.cm-editor) {\n height: 100%;\n outline: none;\n width: 100%;\n}\n:deep(.cm-line) {\n padding: 0;\n}\n:deep(.cm-content) {\n padding: 0;\n display: flex;\n align-items: center;\n font-size: var(--scalar-small);\n}\n.scroll-timeline-x {\n scroll-timeline: --scroll-timeline x;\n /* Firefox supports */\n scroll-timeline: --scroll-timeline horizontal;\n -ms-overflow-style: none; /* IE and Edge */\n}\n.scroll-timeline-x-hidden {\n overflow-x: auto;\n}\n.scroll-timeline-x-hidden :deep(.cm-scroller) {\n scrollbar-width: none;\n -ms-overflow-style: none;\n padding-right: 20px;\n overflow: auto;\n}\n.scroll-timeline-x-hidden::-webkit-scrollbar {\n width: 0;\n height: 0;\n display: none;\n}\n.scroll-timeline-x-hidden :deep(.cm-scroller::-webkit-scrollbar) {\n width: 0;\n height: 0;\n display: none;\n}\n.scroll-timeline-x-address {\n line-height: 27px;\n scrollbar-width: none; /* Firefox */\n}\n/* make clickable are to left of send button */\n.scroll-timeline-x-address:after {\n content: '';\n position: absolute;\n height: 100%;\n width: 24px;\n right: 0;\n cursor: text;\n}\n.scroll-timeline-x-address:empty:before {\n content: 'Enter URL or cURL request';\n color: var(--scalar-color-3);\n pointer-events: none;\n}\n.fade-left,\n.fade-right {\n content: '';\n position: sticky;\n height: 100%;\n animation-name: fadein;\n animation-duration: 1ms;\n animation-direction: reverse;\n animation-timeline: --scroll-timeline;\n pointer-events: none;\n z-index: 1;\n}\n.fade-left {\n background: linear-gradient(\n -90deg,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 20%) 30%,\n var(--scalar-address-bar-bg) 100%\n );\n left: -1px;\n min-width: 6px;\n animation-direction: normal;\n}\n.fade-right {\n background: linear-gradient(\n 90deg,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 20%) 30%,\n var(--scalar-address-bar-bg) 100%\n );\n right: -1px;\n min-width: 24px;\n}\n@keyframes fadein {\n 0% {\n opacity: 0;\n }\n 1% {\n opacity: 1;\n }\n}\n.address-bar-bg-states {\n --scalar-address-bar-bg: color-mix(\n in srgb,\n var(--scalar-background-1),\n var(--scalar-background-2)\n );\n background: var(--scalar-address-bar-bg);\n}\n.address-bar-bg-states:has(.cm-focused) {\n --scalar-address-bar-bg: var(--scalar-background-1);\n border-color: var(--scalar-border-color);\n outline: 1px solid var(--scalar-color-accent);\n}\n.address-bar-bg-states:has(.cm-focused) .fade-left,\n.address-bar-bg-states:has(.cm-focused) .fade-right {\n --scalar-address-bar-bg: var(--scalar-background-1);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\nimport { REQUEST_METHODS } from '@scalar/helpers/http/http-info'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { Environment } from '@scalar/oas-utils/entities/environment'\nimport type {\n Collection,\n Operation,\n RequestMethod,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport type { Workspace } from '@scalar/oas-utils/entities/workspace'\nimport { ref, useId, watch } from 'vue'\n\nimport CodeInput from '@/components/CodeInput/CodeInput.vue'\nimport { ServerDropdown } from '@/components/Server'\nimport { useLayout } from '@/hooks'\nimport { useWorkspace } from '@/store'\nimport type { EnvVariable } from '@/store/active-entities'\n\nimport HttpMethod from '../HttpMethod/HttpMethod.vue'\nimport AddressBarHistory from './AddressBarHistory.vue'\n\nconst { collection, operation, server, environment, envVariables, workspace } =\n defineProps<{\n collection: Collection\n operation: Operation\n server: Server | undefined\n environment: Environment\n envVariables: EnvVariable[]\n workspace: Workspace\n }>()\n\ndefineEmits<{\n (e: 'importCurl', value: string): void\n}>()\n\nconst id = useId()\n\nconst { requestMutators, events } = useWorkspace()\n\nconst { layout } = useLayout()\n\nconst addressBarRef = ref<typeof CodeInput | null>(null)\nconst sendButtonRef = ref<typeof ScalarButton | null>(null)\n\n/** update the instance path parameters on change */\nconst onUrlChange = (newPath: string) => {\n if (operation.path === newPath) {\n return\n }\n requestMutators.edit(operation.uid, 'path', newPath)\n}\n\n/** watch for changes in the URL */\nwatch(\n () => operation.path,\n (newURL) => {\n if (!newURL) {\n return\n }\n onUrlChange(newURL)\n },\n)\n\n/** The amount remaining to load from 100 -> 0 */\nconst percentage = ref(100)\n/** Keeps track of how much was left when the request finished */\nconst remaining = ref(0)\n/** Whether or not there is a request loading */\nconst isRequesting = ref(false)\n/** The loading interval */\nconst interval = ref<ReturnType<typeof setInterval>>()\n\nfunction load() {\n if (isRequesting.value) {\n // Reduce asymptotically up to 85% loaded\n percentage.value -= (percentage.value - 15) / 60\n } else {\n // Always finish loading linearly over 400ms\n percentage.value -= remaining.value / 20\n }\n if (percentage.value <= 0) {\n clearInterval(interval.value)\n interval.value = undefined\n percentage.value = 100\n isRequesting.value = false\n }\n}\n\nfunction startLoading() {\n if (interval.value) {\n return\n }\n isRequesting.value = true\n interval.value = setInterval(load, 20)\n}\n\nfunction stopLoading() {\n remaining.value = percentage.value\n isRequesting.value = false\n}\n\nfunction abortLoading() {\n clearInterval(interval.value)\n interval.value = undefined\n percentage.value = 100\n isRequesting.value = false\n}\n\nevents.requestStatus.on((status) => {\n if (status === 'start') {\n return startLoading()\n }\n if (status === 'stop') {\n return stopLoading()\n }\n if (status === 'abort') {\n return abortLoading()\n }\n\n status satisfies undefined\n})\n\n/** Focus the address bar (or the send button if in modal layout) */\nevents.focusAddressBar.on(() => {\n if (layout === 'modal') {\n sendButtonRef.value?.$el?.focus()\n } else {\n addressBarRef.value?.focus()\n }\n})\n\nfunction updateRequestMethod(method: RequestMethod) {\n requestMutators.edit(operation.uid, 'method', method)\n}\n\nfunction getBackgroundColor() {\n const { method } = operation\n return REQUEST_METHODS[method].colorVar\n}\n\nfunction handleExecuteRequest() {\n if (isRequesting.value) {\n return\n }\n isRequesting.value = true\n events.executeRequest.emit({ requestUid: operation.uid })\n}\n\n/** Handle hotkeys */\nevents.hotKeys.on((event) => {\n if (event?.focusAddressBar) {\n addressBarRef.value?.focus()\n }\n if (event?.executeRequest) {\n handleExecuteRequest()\n }\n})\n\n/**\n * TODO: Should we handle query params here somehow?\n */\nfunction updateRequestPath(url: string) {\n requestMutators.edit(operation.uid, 'path', url)\n}\n</script>\n<template>\n <div\n :id=\"id\"\n 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\">\n <!-- Address Bar -->\n <div\n class=\"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]\">\n <div\n class=\"pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border\">\n <div\n class=\"absolute top-0 left-0 z-[1002] h-full w-full\"\n :style=\"{\n backgroundColor: `color-mix(in srgb, transparent 90%, ${getBackgroundColor()})`,\n transform: `translate3d(-${percentage}%,0,0)`,\n }\" />\n </div>\n <div class=\"z-context-plus flex gap-1\">\n <HttpMethod\n :isEditable=\"layout !== 'modal'\"\n isSquare\n :method=\"operation.method\"\n teleport\n @change=\"updateRequestMethod\" />\n </div>\n\n <div\n class=\"scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"collection.servers.length\"\n :collection=\"collection\"\n layout=\"client\"\n :operation=\"operation\"\n :server=\"server\"\n :target=\"id\" />\n\n <div class=\"fade-left\" />\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n aria-label=\"Path\"\n class=\"min-w-fit outline-none\"\n disableCloseBrackets\n :disabled=\"layout === 'modal'\"\n disableEnter\n disableTabIndent\n :emitOnBlur=\"false\"\n :envVariables=\"envVariables\"\n :environment=\"environment\"\n importCurl\n :modelValue=\"operation.path\"\n :placeholder=\"\n server?.uid && collection.servers.includes(server.uid)\n ? ''\n : 'Enter a URL or cURL command'\n \"\n server\n :workspace=\"workspace\"\n @curl=\"$emit('importCurl', $event)\"\n @submit=\"handleExecuteRequest\"\n @update:modelValue=\"updateRequestPath\" />\n <div class=\"fade-right\" />\n </div>\n\n <AddressBarHistory\n :operation=\"operation\"\n :target=\"id\" />\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold\"\n :disabled=\"isRequesting\"\n @click=\"handleExecuteRequest\">\n <span\n aria-hidden=\"true\"\n class=\"inline-flex items-center gap-1\">\n <ScalarIconPlay\n class=\"relative shrink-0\"\n size=\"xs\"\n weight=\"fill\" />\n <span class=\"text-xxs hidden lg:flex\">Send</span>\n </span>\n <span class=\"sr-only\">\n Send {{ operation.method }} request to {{ server?.url ?? ''\n }}{{ operation.path }}\n </span>\n </ScalarButton>\n </div>\n </div>\n</template>\n<style scoped>\n:deep(.cm-editor) {\n height: 100%;\n outline: none;\n width: 100%;\n}\n:deep(.cm-line) {\n padding: 0;\n}\n:deep(.cm-content) {\n padding: 0;\n display: flex;\n align-items: center;\n font-size: var(--scalar-small);\n}\n.scroll-timeline-x {\n scroll-timeline: --scroll-timeline x;\n /* Firefox supports */\n scroll-timeline: --scroll-timeline horizontal;\n -ms-overflow-style: none; /* IE and Edge */\n}\n.scroll-timeline-x-hidden {\n overflow-x: auto;\n}\n.scroll-timeline-x-hidden :deep(.cm-scroller) {\n scrollbar-width: none;\n -ms-overflow-style: none;\n padding-right: 20px;\n overflow: auto;\n}\n.scroll-timeline-x-hidden::-webkit-scrollbar {\n width: 0;\n height: 0;\n display: none;\n}\n.scroll-timeline-x-hidden :deep(.cm-scroller::-webkit-scrollbar) {\n width: 0;\n height: 0;\n display: none;\n}\n.scroll-timeline-x-address {\n line-height: 27px;\n scrollbar-width: none; /* Firefox */\n}\n/* make clickable are to left of send button */\n.scroll-timeline-x-address:after {\n content: '';\n position: absolute;\n height: 100%;\n width: 24px;\n right: 0;\n cursor: text;\n}\n.scroll-timeline-x-address:empty:before {\n content: 'Enter URL or cURL request';\n color: var(--scalar-color-3);\n pointer-events: none;\n}\n.fade-left,\n.fade-right {\n content: '';\n position: sticky;\n height: 100%;\n animation-name: fadein;\n animation-duration: 1ms;\n animation-direction: reverse;\n animation-timeline: --scroll-timeline;\n pointer-events: none;\n z-index: 1;\n}\n.fade-left {\n background: linear-gradient(\n -90deg,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 20%) 30%,\n var(--scalar-address-bar-bg) 100%\n );\n left: -1px;\n min-width: 6px;\n animation-direction: normal;\n}\n.fade-right {\n background: linear-gradient(\n 90deg,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 20%) 30%,\n var(--scalar-address-bar-bg) 100%\n );\n right: -1px;\n min-width: 24px;\n}\n@keyframes fadein {\n 0% {\n opacity: 0;\n }\n 1% {\n opacity: 1;\n }\n}\n.address-bar-bg-states {\n --scalar-address-bar-bg: color-mix(\n in srgb,\n var(--scalar-background-1),\n var(--scalar-background-2)\n );\n background: var(--scalar-address-bar-bg);\n}\n.address-bar-bg-states:has(.cm-focused) {\n --scalar-address-bar-bg: var(--scalar-background-1);\n border-color: var(--scalar-border-color);\n outline: 1px solid var(--scalar-color-accent);\n}\n.address-bar-bg-states:has(.cm-focused) .fade-left,\n.address-bar-bg-states:has(.cm-focused) .fade-right {\n --scalar-address-bar-bg: var(--scalar-background-1);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAM,sBAAsB;CAC1B,KAAK,EACH,OAAO,eACR;CACD,KAAK,EACH,OAAO,cACR;CACD,KAAK,EACH,OAAO,cACR;CACD,KAAK,EACH,OAAO,aACR;CACD,KAAK,EACH,OAAO,aACR;CACD,KAAK,EACH,OAAO,YACR;CACD,KAAK,EACH,OAAO,eACR;CACD,KAAK,EACH,OAAO,eACR;CACD,KAAK,EACH,OAAO,eACR;CACD,KAAK,EACH,OAAO,eACR;CACF;AAID,I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UAAU,KAAI,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"AddressBar-BOZGKSoz.js","names":["$emit"],"sources":["../src/components/AddressBar/httpStatusCodeColors.ts","../src/components/AddressBar/AddressBarHistory.vue","../src/components/AddressBar/AddressBarHistory.vue","../src/components/AddressBar/AddressBar.vue","../src/components/AddressBar/AddressBar.vue"],"sourcesContent":["const STATUS_CODES_COLORS = {\n 100: {\n color: 'text-yellow',\n },\n 200: {\n color: 'text-green',\n },\n 202: {\n color: 'text-green',\n },\n 300: {\n color: 'text-blue',\n },\n 304: {\n color: 'text-blue',\n },\n 400: {\n color: 'text-red',\n },\n 401: {\n color: 'text-orange',\n },\n 422: {\n color: 'text-yellow',\n },\n 423: {\n color: 'text-purple',\n },\n 505: {\n color: 'text-orange',\n },\n} as const\n\ntype StatusCode = keyof typeof STATUS_CODES_COLORS\n\nexport const getStatusCodeColor = (statusCode: number) => {\n const code = statusCode as StatusCode\n return (\n STATUS_CODES_COLORS[code] || {\n /** default color */\n color: 'text-grey',\n }\n )\n}\n","<script setup lang=\"ts\">\nimport { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n ScalarIcon,\n} from '@scalar/components'\nimport type { Operation, RequestEvent } from '@scalar/oas-utils/entities/spec'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\nimport { computed } from 'vue'\n\nimport { formatMs } from '@/libs/formatters'\nimport { useWorkspace } from '@/store'\n\nimport HttpMethod from '../HttpMethod/HttpMethod.vue'\nimport { getStatusCodeColor } from './httpStatusCodeColors'\n\nconst { operation, target } = defineProps<{\n operation: Operation\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst { requestHistory } = useWorkspace()\n\n/** Use a local copy to prevent mutation of the reactive object */\nconst history = computed(() =>\n requestHistory\n .filter((entry) => entry.request.requestUid === operation.uid)\n .slice()\n .reverse(),\n)\n\nfunction handleHistoryClick(requestHistoryItem: RequestEvent) {\n console.warn(\n \"Restoring from the request history doesn't work yet. Request History Item:\",\n requestHistoryItem,\n )\n // TODO: Restore the request data with the history item\n // TODO: Restore the response data with the history item\n}\n</script>\n<template>\n <Menu\n v-slot=\"{ open }\"\n as=\"div\">\n <ScalarFloating\n :offset=\"0\"\n resize\n :target=\"target\">\n <!-- History -->\n <MenuButton\n v-if=\"history?.length\"\n class=\"address-bar-history-button z-context-plus text-c-3 focus:text-c-1 relative mr-1 rounded-lg p-1.5\">\n <ScalarIcon\n icon=\"History\"\n size=\"sm\"\n thickness=\"2.25\" />\n <span class=\"sr-only\">Request History</span>\n </MenuButton>\n <!-- History shadow and placement-->\n <template\n v-if=\"open\"\n #floating=\"{ width }\">\n <!-- History Item -->\n <MenuItems\n class=\"custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center border-t p-0.75\"\n static\n :style=\"{ width }\">\n <MenuItem\n v-for=\"(entry, index) in history\"\n :key=\"entry.timestamp\"\n as=\"button\"\n 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\"\n :value=\"index\"\n @click=\"handleHistoryClick(entry)\">\n <HttpMethod\n v-if=\"entry.response.method\"\n class=\"text-[11px]\"\n :method=\"entry.response.method\" />\n <div class=\"min-w-0\">\n <div class=\"text-c-1 min-w-0 truncate\">\n {{ entry.response.path }}\n </div>\n </div>\n <div>{{ formatMs(entry.response.duration) }}</div>\n <div :class=\"[getStatusCodeColor(entry.response.status).color]\">\n {{ entry.response.status }}\n </div>\n <div>\n {{ httpStatusCodes[entry.response.status]?.name }}\n </div>\n </MenuItem>\n </MenuItems>\n <ScalarFloatingBackdrop\n class=\"-top-(--scalar-address-bar-height) rounded-lg\" />\n </template>\n </ScalarFloating>\n </Menu>\n</template>\n<style scoped>\n.address-bar-history-button:hover {\n background: var(--scalar-background-3);\n}\n.address-bar-history-button:focus-within {\n background: var(--scalar-background-2);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n ScalarIcon,\n} from '@scalar/components'\nimport type { Operation, RequestEvent } from '@scalar/oas-utils/entities/spec'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\nimport { computed } from 'vue'\n\nimport { formatMs } from '@/libs/formatters'\nimport { useWorkspace } from '@/store'\n\nimport HttpMethod from '../HttpMethod/HttpMethod.vue'\nimport { getStatusCodeColor } from './httpStatusCodeColors'\n\nconst { operation, target } = defineProps<{\n operation: Operation\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst { requestHistory } = useWorkspace()\n\n/** Use a local copy to prevent mutation of the reactive object */\nconst history = computed(() =>\n requestHistory\n .filter((entry) => entry.request.requestUid === operation.uid)\n .slice()\n .reverse(),\n)\n\nfunction handleHistoryClick(requestHistoryItem: RequestEvent) {\n console.warn(\n \"Restoring from the request history doesn't work yet. Request History Item:\",\n requestHistoryItem,\n )\n // TODO: Restore the request data with the history item\n // TODO: Restore the response data with the history item\n}\n</script>\n<template>\n <Menu\n v-slot=\"{ open }\"\n as=\"div\">\n <ScalarFloating\n :offset=\"0\"\n resize\n :target=\"target\">\n <!-- History -->\n <MenuButton\n v-if=\"history?.length\"\n class=\"address-bar-history-button z-context-plus text-c-3 focus:text-c-1 relative mr-1 rounded-lg p-1.5\">\n <ScalarIcon\n icon=\"History\"\n size=\"sm\"\n thickness=\"2.25\" />\n <span class=\"sr-only\">Request History</span>\n </MenuButton>\n <!-- History shadow and placement-->\n <template\n v-if=\"open\"\n #floating=\"{ width }\">\n <!-- History Item -->\n <MenuItems\n class=\"custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center border-t p-0.75\"\n static\n :style=\"{ width }\">\n <MenuItem\n v-for=\"(entry, index) in history\"\n :key=\"entry.timestamp\"\n as=\"button\"\n 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\"\n :value=\"index\"\n @click=\"handleHistoryClick(entry)\">\n <HttpMethod\n v-if=\"entry.response.method\"\n class=\"text-[11px]\"\n :method=\"entry.response.method\" />\n <div class=\"min-w-0\">\n <div class=\"text-c-1 min-w-0 truncate\">\n {{ entry.response.path }}\n </div>\n </div>\n <div>{{ formatMs(entry.response.duration) }}</div>\n <div :class=\"[getStatusCodeColor(entry.response.status).color]\">\n {{ entry.response.status }}\n </div>\n <div>\n {{ httpStatusCodes[entry.response.status]?.name }}\n </div>\n </MenuItem>\n </MenuItems>\n <ScalarFloatingBackdrop\n class=\"-top-(--scalar-address-bar-height) rounded-lg\" />\n </template>\n </ScalarFloating>\n </Menu>\n</template>\n<style scoped>\n.address-bar-history-button:hover {\n background: var(--scalar-background-3);\n}\n.address-bar-history-button:focus-within {\n background: var(--scalar-background-2);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\nimport { REQUEST_METHODS } from '@scalar/helpers/http/http-info'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { Environment } from '@scalar/oas-utils/entities/environment'\nimport type {\n Collection,\n Operation,\n RequestMethod,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport type { Workspace } from '@scalar/oas-utils/entities/workspace'\nimport { ref, useId, watch } from 'vue'\n\nimport CodeInput from '@/components/CodeInput/CodeInput.vue'\nimport { ServerDropdown } from '@/components/Server'\nimport { useLayout } from '@/hooks'\nimport { useWorkspace } from '@/store'\nimport type { EnvVariable } from '@/store/active-entities'\n\nimport HttpMethod from '../HttpMethod/HttpMethod.vue'\nimport AddressBarHistory from './AddressBarHistory.vue'\n\nconst { collection, operation, server, environment, envVariables, workspace } =\n defineProps<{\n collection: Collection\n operation: Operation\n server: Server | undefined\n environment: Environment\n envVariables: EnvVariable[]\n workspace: Workspace\n }>()\n\ndefineEmits<{\n (e: 'importCurl', value: string): void\n}>()\n\nconst id = useId()\n\nconst { requestMutators, events } = useWorkspace()\n\nconst { layout } = useLayout()\n\nconst addressBarRef = ref<typeof CodeInput | null>(null)\nconst sendButtonRef = ref<typeof ScalarButton | null>(null)\n\n/** update the instance path parameters on change */\nconst onUrlChange = (newPath: string) => {\n if (operation.path === newPath) {\n return\n }\n requestMutators.edit(operation.uid, 'path', newPath)\n}\n\n/** watch for changes in the URL */\nwatch(\n () => operation.path,\n (newURL) => {\n if (!newURL) {\n return\n }\n onUrlChange(newURL)\n },\n)\n\n/** The amount remaining to load from 100 -> 0 */\nconst percentage = ref(100)\n/** Keeps track of how much was left when the request finished */\nconst remaining = ref(0)\n/** Whether or not there is a request loading */\nconst isRequesting = ref(false)\n/** The loading interval */\nconst interval = ref<ReturnType<typeof setInterval>>()\n\nfunction load() {\n if (isRequesting.value) {\n // Reduce asymptotically up to 85% loaded\n percentage.value -= (percentage.value - 15) / 60\n } else {\n // Always finish loading linearly over 400ms\n percentage.value -= remaining.value / 20\n }\n if (percentage.value <= 0) {\n clearInterval(interval.value)\n interval.value = undefined\n percentage.value = 100\n isRequesting.value = false\n }\n}\n\nfunction startLoading() {\n if (interval.value) {\n return\n }\n isRequesting.value = true\n interval.value = setInterval(load, 20)\n}\n\nfunction stopLoading() {\n remaining.value = percentage.value\n isRequesting.value = false\n}\n\nfunction abortLoading() {\n clearInterval(interval.value)\n interval.value = undefined\n percentage.value = 100\n isRequesting.value = false\n}\n\nevents.requestStatus.on((status) => {\n if (status === 'start') {\n return startLoading()\n }\n if (status === 'stop') {\n return stopLoading()\n }\n if (status === 'abort') {\n return abortLoading()\n }\n\n status satisfies undefined\n})\n\n/** Focus the address bar (or the send button if in modal layout) */\nevents.focusAddressBar.on(() => {\n if (layout === 'modal') {\n sendButtonRef.value?.$el?.focus()\n } else {\n addressBarRef.value?.focus()\n }\n})\n\nfunction updateRequestMethod(method: RequestMethod) {\n requestMutators.edit(operation.uid, 'method', method)\n}\n\nfunction getBackgroundColor() {\n const { method } = operation\n return REQUEST_METHODS[method].colorVar\n}\n\nfunction handleExecuteRequest() {\n if (isRequesting.value) {\n return\n }\n isRequesting.value = true\n events.executeRequest.emit({ requestUid: operation.uid })\n}\n\n/** Handle hotkeys */\nevents.hotKeys.on((event) => {\n if (event?.focusAddressBar) {\n addressBarRef.value?.focus()\n }\n if (event?.executeRequest) {\n handleExecuteRequest()\n }\n})\n\n/**\n * TODO: Should we handle query params here somehow?\n */\nfunction updateRequestPath(url: string) {\n requestMutators.edit(operation.uid, 'path', url)\n}\n</script>\n<template>\n <div\n :id=\"id\"\n 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\">\n <!-- Address Bar -->\n <div\n class=\"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]\">\n <div\n class=\"pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border\">\n <div\n class=\"absolute top-0 left-0 z-[1002] h-full w-full\"\n :style=\"{\n backgroundColor: `color-mix(in srgb, transparent 90%, ${getBackgroundColor()})`,\n transform: `translate3d(-${percentage}%,0,0)`,\n }\" />\n </div>\n <div class=\"z-context-plus flex gap-1\">\n <HttpMethod\n :isEditable=\"layout !== 'modal'\"\n isSquare\n :method=\"operation.method\"\n teleport\n @change=\"updateRequestMethod\" />\n </div>\n\n <div\n class=\"scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"collection.servers.length\"\n :collection=\"collection\"\n layout=\"client\"\n :operation=\"operation\"\n :server=\"server\"\n :target=\"id\" />\n\n <div class=\"fade-left\" />\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n aria-label=\"Path\"\n class=\"min-w-fit outline-none\"\n disableCloseBrackets\n :disabled=\"layout === 'modal'\"\n disableEnter\n disableTabIndent\n :emitOnBlur=\"false\"\n :envVariables=\"envVariables\"\n :environment=\"environment\"\n importCurl\n :modelValue=\"operation.path\"\n :placeholder=\"\n server?.uid && collection.servers.includes(server.uid)\n ? ''\n : 'Enter a URL or cURL command'\n \"\n server\n :workspace=\"workspace\"\n @curl=\"$emit('importCurl', $event)\"\n @submit=\"handleExecuteRequest\"\n @update:modelValue=\"updateRequestPath\" />\n <div class=\"fade-right\" />\n </div>\n\n <AddressBarHistory\n :operation=\"operation\"\n :target=\"id\" />\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold\"\n :disabled=\"isRequesting\"\n @click=\"handleExecuteRequest\">\n <span\n aria-hidden=\"true\"\n class=\"inline-flex items-center gap-1\">\n <ScalarIconPlay\n class=\"relative shrink-0\"\n size=\"xs\"\n weight=\"fill\" />\n <span class=\"text-xxs hidden lg:flex\">Send</span>\n </span>\n <span class=\"sr-only\">\n Send {{ operation.method }} request to {{ server?.url ?? ''\n }}{{ operation.path }}\n </span>\n </ScalarButton>\n </div>\n </div>\n</template>\n<style scoped>\n:deep(.cm-editor) {\n height: 100%;\n outline: none;\n width: 100%;\n}\n:deep(.cm-line) {\n padding: 0;\n}\n:deep(.cm-content) {\n padding: 0;\n display: flex;\n align-items: center;\n font-size: var(--scalar-small);\n}\n.scroll-timeline-x {\n scroll-timeline: --scroll-timeline x;\n /* Firefox supports */\n scroll-timeline: --scroll-timeline horizontal;\n -ms-overflow-style: none; /* IE and Edge */\n}\n.scroll-timeline-x-hidden {\n overflow-x: auto;\n}\n.scroll-timeline-x-hidden :deep(.cm-scroller) {\n scrollbar-width: none;\n -ms-overflow-style: none;\n padding-right: 20px;\n overflow: auto;\n}\n.scroll-timeline-x-hidden::-webkit-scrollbar {\n width: 0;\n height: 0;\n display: none;\n}\n.scroll-timeline-x-hidden :deep(.cm-scroller::-webkit-scrollbar) {\n width: 0;\n height: 0;\n display: none;\n}\n.scroll-timeline-x-address {\n line-height: 27px;\n scrollbar-width: none; /* Firefox */\n}\n/* make clickable are to left of send button */\n.scroll-timeline-x-address:after {\n content: '';\n position: absolute;\n height: 100%;\n width: 24px;\n right: 0;\n cursor: text;\n}\n.scroll-timeline-x-address:empty:before {\n content: 'Enter URL or cURL request';\n color: var(--scalar-color-3);\n pointer-events: none;\n}\n.fade-left,\n.fade-right {\n content: '';\n position: sticky;\n height: 100%;\n animation-name: fadein;\n animation-duration: 1ms;\n animation-direction: reverse;\n animation-timeline: --scroll-timeline;\n pointer-events: none;\n z-index: 1;\n}\n.fade-left {\n background: linear-gradient(\n -90deg,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 20%) 30%,\n var(--scalar-address-bar-bg) 100%\n );\n left: -1px;\n min-width: 6px;\n animation-direction: normal;\n}\n.fade-right {\n background: linear-gradient(\n 90deg,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 20%) 30%,\n var(--scalar-address-bar-bg) 100%\n );\n right: -1px;\n min-width: 24px;\n}\n@keyframes fadein {\n 0% {\n opacity: 0;\n }\n 1% {\n opacity: 1;\n }\n}\n.address-bar-bg-states {\n --scalar-address-bar-bg: color-mix(\n in srgb,\n var(--scalar-background-1),\n var(--scalar-background-2)\n );\n background: var(--scalar-address-bar-bg);\n}\n.address-bar-bg-states:has(.cm-focused) {\n --scalar-address-bar-bg: var(--scalar-background-1);\n border-color: var(--scalar-border-color);\n outline: 1px solid var(--scalar-color-accent);\n}\n.address-bar-bg-states:has(.cm-focused) .fade-left,\n.address-bar-bg-states:has(.cm-focused) .fade-right {\n --scalar-address-bar-bg: var(--scalar-background-1);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\nimport { REQUEST_METHODS } from '@scalar/helpers/http/http-info'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { Environment } from '@scalar/oas-utils/entities/environment'\nimport type {\n Collection,\n Operation,\n RequestMethod,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport type { Workspace } from '@scalar/oas-utils/entities/workspace'\nimport { ref, useId, watch } from 'vue'\n\nimport CodeInput from '@/components/CodeInput/CodeInput.vue'\nimport { ServerDropdown } from '@/components/Server'\nimport { useLayout } from '@/hooks'\nimport { useWorkspace } from '@/store'\nimport type { EnvVariable } from '@/store/active-entities'\n\nimport HttpMethod from '../HttpMethod/HttpMethod.vue'\nimport AddressBarHistory from './AddressBarHistory.vue'\n\nconst { collection, operation, server, environment, envVariables, workspace } =\n defineProps<{\n collection: Collection\n operation: Operation\n server: Server | undefined\n environment: Environment\n envVariables: EnvVariable[]\n workspace: Workspace\n }>()\n\ndefineEmits<{\n (e: 'importCurl', value: string): void\n}>()\n\nconst id = useId()\n\nconst { requestMutators, events } = useWorkspace()\n\nconst { layout } = useLayout()\n\nconst addressBarRef = ref<typeof CodeInput | null>(null)\nconst sendButtonRef = ref<typeof ScalarButton | null>(null)\n\n/** update the instance path parameters on change */\nconst onUrlChange = (newPath: string) => {\n if (operation.path === newPath) {\n return\n }\n requestMutators.edit(operation.uid, 'path', newPath)\n}\n\n/** watch for changes in the URL */\nwatch(\n () => operation.path,\n (newURL) => {\n if (!newURL) {\n return\n }\n onUrlChange(newURL)\n },\n)\n\n/** The amount remaining to load from 100 -> 0 */\nconst percentage = ref(100)\n/** Keeps track of how much was left when the request finished */\nconst remaining = ref(0)\n/** Whether or not there is a request loading */\nconst isRequesting = ref(false)\n/** The loading interval */\nconst interval = ref<ReturnType<typeof setInterval>>()\n\nfunction load() {\n if (isRequesting.value) {\n // Reduce asymptotically up to 85% loaded\n percentage.value -= (percentage.value - 15) / 60\n } else {\n // Always finish loading linearly over 400ms\n percentage.value -= remaining.value / 20\n }\n if (percentage.value <= 0) {\n clearInterval(interval.value)\n interval.value = undefined\n percentage.value = 100\n isRequesting.value = false\n }\n}\n\nfunction startLoading() {\n if (interval.value) {\n return\n }\n isRequesting.value = true\n interval.value = setInterval(load, 20)\n}\n\nfunction stopLoading() {\n remaining.value = percentage.value\n isRequesting.value = false\n}\n\nfunction abortLoading() {\n clearInterval(interval.value)\n interval.value = undefined\n percentage.value = 100\n isRequesting.value = false\n}\n\nevents.requestStatus.on((status) => {\n if (status === 'start') {\n return startLoading()\n }\n if (status === 'stop') {\n return stopLoading()\n }\n if (status === 'abort') {\n return abortLoading()\n }\n\n status satisfies undefined\n})\n\n/** Focus the address bar (or the send button if in modal layout) */\nevents.focusAddressBar.on(() => {\n if (layout === 'modal') {\n sendButtonRef.value?.$el?.focus()\n } else {\n addressBarRef.value?.focus()\n }\n})\n\nfunction updateRequestMethod(method: RequestMethod) {\n requestMutators.edit(operation.uid, 'method', method)\n}\n\nfunction getBackgroundColor() {\n const { method } = operation\n return REQUEST_METHODS[method].colorVar\n}\n\nfunction handleExecuteRequest() {\n if (isRequesting.value) {\n return\n }\n isRequesting.value = true\n events.executeRequest.emit({ requestUid: operation.uid })\n}\n\n/** Handle hotkeys */\nevents.hotKeys.on((event) => {\n if (event?.focusAddressBar) {\n addressBarRef.value?.focus()\n }\n if (event?.executeRequest) {\n handleExecuteRequest()\n }\n})\n\n/**\n * TODO: Should we handle query params here somehow?\n */\nfunction updateRequestPath(url: string) {\n requestMutators.edit(operation.uid, 'path', url)\n}\n</script>\n<template>\n <div\n :id=\"id\"\n 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\">\n <!-- Address Bar -->\n <div\n class=\"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]\">\n <div\n class=\"pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border\">\n <div\n class=\"absolute top-0 left-0 z-[1002] h-full w-full\"\n :style=\"{\n backgroundColor: `color-mix(in srgb, transparent 90%, ${getBackgroundColor()})`,\n transform: `translate3d(-${percentage}%,0,0)`,\n }\" />\n </div>\n <div class=\"z-context-plus flex gap-1\">\n <HttpMethod\n :isEditable=\"layout !== 'modal'\"\n isSquare\n :method=\"operation.method\"\n teleport\n @change=\"updateRequestMethod\" />\n </div>\n\n <div\n class=\"scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"collection.servers.length\"\n :collection=\"collection\"\n layout=\"client\"\n :operation=\"operation\"\n :server=\"server\"\n :target=\"id\" />\n\n <div class=\"fade-left\" />\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n aria-label=\"Path\"\n class=\"min-w-fit outline-none\"\n disableCloseBrackets\n :disabled=\"layout === 'modal'\"\n disableEnter\n disableTabIndent\n :emitOnBlur=\"false\"\n :envVariables=\"envVariables\"\n :environment=\"environment\"\n importCurl\n :modelValue=\"operation.path\"\n :placeholder=\"\n server?.uid && collection.servers.includes(server.uid)\n ? ''\n : 'Enter a URL or cURL command'\n \"\n server\n :workspace=\"workspace\"\n @curl=\"$emit('importCurl', $event)\"\n @submit=\"handleExecuteRequest\"\n @update:modelValue=\"updateRequestPath\" />\n <div class=\"fade-right\" />\n </div>\n\n <AddressBarHistory\n :operation=\"operation\"\n :target=\"id\" />\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold\"\n :disabled=\"isRequesting\"\n @click=\"handleExecuteRequest\">\n <span\n aria-hidden=\"true\"\n class=\"inline-flex items-center gap-1\">\n <ScalarIconPlay\n class=\"relative shrink-0\"\n size=\"xs\"\n weight=\"fill\" />\n <span class=\"text-xxs hidden lg:flex\">Send</span>\n </span>\n <span class=\"sr-only\">\n Send {{ operation.method }} request to {{ server?.url ?? ''\n }}{{ operation.path }}\n </span>\n </ScalarButton>\n </div>\n </div>\n</template>\n<style scoped>\n:deep(.cm-editor) {\n height: 100%;\n outline: none;\n width: 100%;\n}\n:deep(.cm-line) {\n padding: 0;\n}\n:deep(.cm-content) {\n padding: 0;\n display: flex;\n align-items: center;\n font-size: var(--scalar-small);\n}\n.scroll-timeline-x {\n scroll-timeline: --scroll-timeline x;\n /* Firefox supports */\n scroll-timeline: --scroll-timeline horizontal;\n -ms-overflow-style: none; /* IE and Edge */\n}\n.scroll-timeline-x-hidden {\n overflow-x: auto;\n}\n.scroll-timeline-x-hidden :deep(.cm-scroller) {\n scrollbar-width: none;\n -ms-overflow-style: none;\n padding-right: 20px;\n overflow: auto;\n}\n.scroll-timeline-x-hidden::-webkit-scrollbar {\n width: 0;\n height: 0;\n display: none;\n}\n.scroll-timeline-x-hidden :deep(.cm-scroller::-webkit-scrollbar) {\n width: 0;\n height: 0;\n display: none;\n}\n.scroll-timeline-x-address {\n line-height: 27px;\n scrollbar-width: none; /* Firefox */\n}\n/* make clickable are to left of send button */\n.scroll-timeline-x-address:after {\n content: '';\n position: absolute;\n height: 100%;\n width: 24px;\n right: 0;\n cursor: text;\n}\n.scroll-timeline-x-address:empty:before {\n content: 'Enter URL or cURL request';\n color: var(--scalar-color-3);\n pointer-events: none;\n}\n.fade-left,\n.fade-right {\n content: '';\n position: sticky;\n height: 100%;\n animation-name: fadein;\n animation-duration: 1ms;\n animation-direction: reverse;\n animation-timeline: --scroll-timeline;\n pointer-events: none;\n z-index: 1;\n}\n.fade-left {\n background: linear-gradient(\n -90deg,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 20%) 30%,\n var(--scalar-address-bar-bg) 100%\n );\n left: -1px;\n min-width: 6px;\n animation-direction: normal;\n}\n.fade-right {\n background: linear-gradient(\n 90deg,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 100%) 0%,\n color-mix(in srgb, var(--scalar-address-bar-bg), transparent 20%) 30%,\n var(--scalar-address-bar-bg) 100%\n );\n right: -1px;\n min-width: 24px;\n}\n@keyframes fadein {\n 0% {\n opacity: 0;\n }\n 1% {\n opacity: 1;\n }\n}\n.address-bar-bg-states {\n --scalar-address-bar-bg: color-mix(\n in srgb,\n var(--scalar-background-1),\n var(--scalar-background-2)\n );\n background: var(--scalar-address-bar-bg);\n}\n.address-bar-bg-states:has(.cm-focused) {\n --scalar-address-bar-bg: var(--scalar-background-1);\n border-color: var(--scalar-border-color);\n outline: 1px solid var(--scalar-color-accent);\n}\n.address-bar-bg-states:has(.cm-focused) .fade-left,\n.address-bar-bg-states:has(.cm-focused) .fade-right {\n --scalar-address-bar-bg: var(--scalar-background-1);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAM,sBAAsB;CAC1B,KAAK,EACH,OAAO,eACR;CACD,KAAK,EACH,OAAO,cACR;CACD,KAAK,EACH,OAAO,cACR;CACD,KAAK,EACH,OAAO,aACR;CACD,KAAK,EACH,OAAO,aACR;CACD,KAAK,EACH,OAAO,YACR;CACD,KAAK,EACH,OAAO,eACR;CACD,KAAK,EACH,OAAO,eACR;CACD,KAAK,EACH,OAAO,eACR;CACD,KAAK,EACH,OAAO,eACR;CACF;AAID,IAAa,sBAAsB,eAAuB;AAExD,QACE,oBAFW,eAEkB,EAE3B,OAAO,aACR;;;;;;;;;;;;;;;EElBL,MAAM,EAAE,mBAAmB,cAAa;;EAGxC,MAAM,UAAU,eACd,eACG,QAAQ,UAAU,MAAM,QAAQ,eAAe,QAAA,UAAU,IAAG,CAC5D,OAAM,CACN,SAAS,CACd;EAEA,SAAS,mBAAmB,oBAAkC;AAC5D,WAAQ,KACN,8EACA,mBACF;;;uBAMA,YAuDO,MAAA,KAAA,EAAA,EArDL,IAAG,OAAK,EAAA;sBAoDS,E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;MACX,OAAM;MACN,sBAAA;MACC,UAAU,MAAA,OAAM,KAAA;MACjB,cAAA;MACA,kBAAA;MACC,YAAY;MACZ,cAAc,QAAA;MACd,aAAa,QAAA;MACd,YAAA;MACC,YAAY,QAAA,UAAU;MACtB,aAA0B,QAAA,QAAQ,OAAO,QAAA,WAAW,QAAQ,SAAS,QAAA,OAAO,IAAG,GAAA,KAAA;MAKhF,QAAA;MACC,WAAW,QAAA;MACX,QAAI,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,cAAe,OAAM;MAChC,UAAQ;MACR,uBAAmB;;;;;;;;;+BACtB,mBAA0B,OAAA,EAArB,OAAM,cAAY,EAAA,MAAA,GAAA;;IAGzB,YAEiB,2BAAA;KADd,WAAW,QAAA;KACX,QAAQ,MAAA,GAAE;;IACb,YAkBe,MAAA,aAAA,EAAA;cAjBT;KAAJ,KAAI;KACJ,OAAM;KACL,UAAU,aAAA;KACV,SAAO;;4BASD,CARP,mBAQO,QARP,YAQO,CALL,YAGkB,MAAA,eAAA,EAAA;MAFhB,OAAM;MACN,MAAK;MACL,QAAO;mCACT,mBAAiD,QAAA,EAA3C,OAAM,2BAAyB,EAAC,QAAI,GAAA,EAAA,CAAA,EAE5C,mBAGO,QAHP,YAAsB,WACf,gBAAG,QAAA,UAAU,OAAM,GAAG,iBAAY,gBAAG,QAAA,QAAQ,OAAG,GAAA,GAAA,gBAChD,QAAA,UAAU,KAAI,EAAA,EAAA,CAAA,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BmmBcIzD.js";
2
2
  import { n as CommandActionForm_default, t as CommandActionInput_default } from "./CommandActionInput-TkcAx6E8.js";
3
- import { t as mergeSecurity } from "./scalar-auth-selector-block-DI3DLag9.js";
3
+ import { t as mergeSecurity } from "./scalar-auth-selector-block-Bs79QOMA.js";
4
4
  import { t as ScalarAsciiArt_default } from "./ScalarAsciiArt-BjuSnj8e.js";
5
5
  import { n as Sidebar_default, t as SidebarToggle_default } from "./sidebar-ceSbYmnt.js";
6
6
  import { t as getActiveEnvironment } from "./get-active-environment-CkxyQ1dM.js";
@@ -2507,4 +2507,4 @@ var App_default = /* @__PURE__ */ defineComponent({
2507
2507
  //#endregion
2508
2508
  export { workspaceStorage as i, CreateWorkspaceModal_default as n, createAppState as r, App_default as t };
2509
2509
 
2510
- //# sourceMappingURL=App-CvClwSlM.js.map
2510
+ //# sourceMappingURL=App-Ckirvnv1.js.map