@scalar/api-client 2.39.4 → 2.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
  4. package/dist/components/AddressBar/AddressBarHistory.vue.js.map +1 -1
  5. package/dist/components/AddressBar/AddressBarHistory.vue.script.js +2 -2
  6. package/dist/components/AddressBar/AddressBarHistory.vue.script.js.map +1 -1
  7. package/dist/hooks/useClientConfig.d.ts +12 -0
  8. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  9. package/dist/hooks/useClientConfig.js +14 -1
  10. package/dist/hooks/useClientConfig.js.map +1 -1
  11. package/dist/libs/index.d.ts +0 -1
  12. package/dist/libs/index.d.ts.map +1 -1
  13. package/dist/libs/index.js +1 -2
  14. package/dist/style.css +207 -248
  15. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +14 -10
  16. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  17. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  18. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +57 -35
  19. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
  20. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -5
  21. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
  22. package/dist/v2/blocks/operation-block/helpers/send-request.js +18 -33
  23. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  24. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.d.ts.map +1 -1
  25. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +1 -1
  26. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js.map +1 -1
  27. package/dist/v2/blocks/operation-block/index.d.ts +0 -3
  28. package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
  29. package/dist/v2/blocks/operation-block/index.js +1 -4
  30. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +1 -1
  31. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  32. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  33. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js.map +1 -1
  34. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js +3 -1
  35. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js.map +1 -1
  36. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +4 -2
  37. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  38. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +3 -2
  39. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js.map +1 -1
  40. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +1 -1
  41. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
  42. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -1
  43. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js.map +1 -1
  44. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +7 -2
  45. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  46. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +4 -3
  47. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js.map +1 -1
  48. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  49. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +2 -3
  50. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js.map +1 -1
  51. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +3 -1
  52. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  53. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +5 -8
  54. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js.map +1 -1
  55. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
  56. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -1
  57. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js.map +1 -1
  58. package/dist/v2/blocks/operation-code-sample/index.d.ts +0 -1
  59. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  60. package/dist/v2/blocks/operation-code-sample/index.js +2 -3
  61. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +7 -9
  62. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  63. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  64. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  65. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +49 -42
  66. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  67. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  68. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  69. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  70. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +2 -3
  71. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
  72. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  73. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
  74. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +1 -0
  75. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
  76. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  77. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  78. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +1 -1
  79. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
  80. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +1 -1
  81. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts +1 -1
  82. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts.map +1 -1
  83. package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +2 -1
  84. package/dist/v2/blocks/request-block/helpers/is-param-disabled.js.map +1 -1
  85. package/dist/v2/blocks/response-block/helpers/get-content-length.d.ts.map +1 -1
  86. package/dist/v2/blocks/response-block/helpers/get-content-length.js +2 -2
  87. package/dist/v2/blocks/response-block/helpers/get-content-length.js.map +1 -1
  88. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  89. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  90. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  91. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +76 -25
  92. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  93. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
  94. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
  95. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
  96. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +2 -2
  97. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
  98. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +1 -1
  99. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  100. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
  101. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +1 -1
  102. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  103. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  104. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  105. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  106. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +8 -4
  107. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  108. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +1 -1
  109. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
  111. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
  112. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
  113. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  114. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
  115. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
  116. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +1 -1
  117. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  118. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +1 -1
  119. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +1 -1
  120. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  121. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +6 -2
  122. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
  123. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +0 -3
  124. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
  125. package/dist/v2/blocks/scalar-auth-selector-block/index.js +1 -3
  126. package/dist/v2/components/code-input/CodeInput.vue.d.ts +8 -6
  127. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  128. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  129. package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
  130. package/dist/v2/components/code-input/CodeInput.vue.script.js +11 -9
  131. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
  132. package/dist/v2/constants.js +1 -1
  133. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  134. package/dist/v2/features/app/App.vue.js.map +1 -1
  135. package/dist/v2/features/app/App.vue.script.js +1 -5
  136. package/dist/v2/features/app/App.vue.script.js.map +1 -1
  137. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  138. package/dist/v2/features/app/app-events.js +1 -1
  139. package/dist/v2/features/app/app-events.js.map +1 -1
  140. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  141. package/dist/v2/features/app/app-state.js +2 -2
  142. package/dist/v2/features/app/app-state.js.map +1 -1
  143. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  144. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  145. package/dist/v2/features/app/components/AppSidebar.vue.js.map +1 -1
  146. package/dist/v2/features/app/components/AppSidebar.vue.script.js +1 -1
  147. package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +1 -1
  148. package/dist/v2/features/app/helpers/routes.d.ts +0 -3
  149. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  150. package/dist/v2/features/app/helpers/routes.js +1 -1
  151. package/dist/v2/features/app/helpers/routes.js.map +1 -1
  152. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  153. package/dist/v2/features/collection/DocumentCollection.vue.js.map +1 -1
  154. package/dist/v2/features/collection/DocumentCollection.vue.script.js +30 -52
  155. package/dist/v2/features/collection/DocumentCollection.vue.script.js.map +1 -1
  156. package/dist/v2/features/collection/OperationCollection.vue.script.js +0 -1
  157. package/dist/v2/features/collection/OperationCollection.vue.script.js.map +1 -1
  158. package/dist/v2/features/collection/WorkspaceCollection.vue.script.js +0 -1
  159. package/dist/v2/features/collection/WorkspaceCollection.vue.script.js.map +1 -1
  160. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  161. package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
  162. package/dist/v2/features/collection/components/Authentication.vue.js.map +1 -1
  163. package/dist/v2/features/collection/components/Authentication.vue.script.js +6 -8
  164. package/dist/v2/features/collection/components/Authentication.vue.script.js.map +1 -1
  165. package/dist/v2/features/collection/components/Cookies.vue.script.js +0 -1
  166. package/dist/v2/features/collection/components/Cookies.vue.script.js.map +1 -1
  167. package/dist/v2/features/collection/components/Editor/Editor.vue.script.js +0 -1
  168. package/dist/v2/features/collection/components/Editor/Editor.vue.script.js.map +1 -1
  169. package/dist/v2/features/collection/components/Environment.vue.script.js +0 -1
  170. package/dist/v2/features/collection/components/Environment.vue.script.js.map +1 -1
  171. package/dist/v2/features/collection/components/Overview.vue.script.js +0 -1
  172. package/dist/v2/features/collection/components/Overview.vue.script.js.map +1 -1
  173. package/dist/v2/features/collection/components/Servers.vue.script.js +0 -1
  174. package/dist/v2/features/collection/components/Servers.vue.script.js.map +1 -1
  175. package/dist/v2/features/collection/components/Settings.vue.js.map +1 -1
  176. package/dist/v2/features/collection/components/Settings.vue.script.js +2 -3
  177. package/dist/v2/features/collection/components/Settings.vue.script.js.map +1 -1
  178. package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +1 -1
  179. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  180. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
  181. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +1 -1
  182. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
  183. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  184. package/dist/v2/features/modal/Modal.vue.js.map +1 -1
  185. package/dist/v2/features/modal/Modal.vue.script.js +4 -9
  186. package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
  187. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  188. package/dist/v2/features/modal/helpers/create-api-client-modal.js +1 -17
  189. package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
  190. package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +1 -1
  191. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  192. package/dist/v2/features/operation/Operation.vue.js.map +1 -1
  193. package/dist/v2/features/operation/Operation.vue.script.js +51 -84
  194. package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
  195. package/dist/v2/features/operation/index.d.ts +0 -4
  196. package/dist/v2/features/operation/index.d.ts.map +1 -1
  197. package/dist/v2/features/operation/index.js +1 -5
  198. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  199. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js.map +1 -1
  200. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js +11 -1
  201. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js.map +1 -1
  202. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  203. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  204. package/dist/views/Request/RequestSection/RequestTable.vue.js.map +1 -1
  205. package/dist/views/Request/RequestSection/RequestTable.vue.script.js +1 -1
  206. package/dist/views/Request/RequestSection/RequestTable.vue.script.js.map +1 -1
  207. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.script.js +1 -1
  208. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  209. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js.map +1 -1
  210. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js +2 -2
  211. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js.map +1 -1
  212. package/dist/views/Request/libs/oauth2.js +1 -1
  213. package/dist/views/Request/libs/oauth2.js.map +1 -1
  214. package/package.json +24 -30
  215. package/dist/libs/formatters.d.ts +0 -12
  216. package/dist/libs/formatters.d.ts.map +0 -1
  217. package/dist/libs/formatters.js +0 -36
  218. package/dist/libs/formatters.js.map +0 -1
  219. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts +0 -6
  220. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts.map +0 -1
  221. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.js +0 -58
  222. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.js.map +0 -1
  223. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts +0 -12
  224. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +0 -1
  225. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +0 -65
  226. package/dist/v2/blocks/operation-block/helpers/build-request-body.js.map +0 -1
  227. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +0 -31
  228. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +0 -1
  229. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +0 -55
  230. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js.map +0 -1
  231. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +0 -27
  232. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +0 -1
  233. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +0 -159
  234. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js.map +0 -1
  235. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +0 -25
  236. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +0 -1
  237. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +0 -53
  238. package/dist/v2/blocks/operation-block/helpers/build-request-security.js.map +0 -1
  239. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +0 -46
  240. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +0 -1
  241. package/dist/v2/blocks/operation-block/helpers/build-request.js +0 -102
  242. package/dist/v2/blocks/operation-block/helpers/build-request.js.map +0 -1
  243. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.d.ts +0 -4
  244. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.d.ts.map +0 -1
  245. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +0 -41
  246. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js.map +0 -1
  247. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts +0 -14
  248. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts.map +0 -1
  249. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +0 -20
  250. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js.map +0 -1
  251. package/dist/v2/blocks/operation-block/helpers/get-delimiter.d.ts +0 -8
  252. package/dist/v2/blocks/operation-block/helpers/get-delimiter.d.ts.map +0 -1
  253. package/dist/v2/blocks/operation-block/helpers/get-environment-variables.d.ts +0 -9
  254. package/dist/v2/blocks/operation-block/helpers/get-environment-variables.d.ts.map +0 -1
  255. package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js +0 -17
  256. package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js.map +0 -1
  257. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +0 -10
  258. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +0 -1
  259. package/dist/v2/blocks/operation-block/helpers/get-example.js +0 -41
  260. package/dist/v2/blocks/operation-block/helpers/get-example.js.map +0 -1
  261. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +0 -26
  262. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +0 -1
  263. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +0 -32
  264. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js.map +0 -1
  265. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +0 -10
  266. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +0 -1
  267. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +0 -15
  268. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js.map +0 -1
  269. package/dist/v2/blocks/operation-block/helpers/get-server-url.d.ts +0 -3
  270. package/dist/v2/blocks/operation-block/helpers/get-server-url.d.ts.map +0 -1
  271. package/dist/v2/blocks/operation-block/helpers/get-server-url.js +0 -18
  272. package/dist/v2/blocks/operation-block/helpers/get-server-url.js.map +0 -1
  273. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts +0 -96
  274. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts.map +0 -1
  275. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +0 -160
  276. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js.map +0 -1
  277. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +0 -40
  278. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +0 -1
  279. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +0 -437
  280. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js.map +0 -1
  281. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +0 -6
  282. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +0 -1
  283. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +0 -25
  284. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js.map +0 -1
  285. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +0 -141
  286. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js.map +0 -1
  287. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +0 -4
  288. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +0 -1
  289. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +0 -10
  290. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js.map +0 -1
  291. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +0 -9
  292. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +0 -1
  293. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +0 -27
  294. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js.map +0 -1
  295. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +0 -25
  296. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +0 -1
  297. package/dist/v2/components/callout/Callout.vue.js +0 -9
  298. package/dist/v2/components/callout/Callout.vue.js.map +0 -1
  299. package/dist/v2/components/callout/Callout.vue.script.js +0 -35
  300. package/dist/v2/components/callout/Callout.vue.script.js.map +0 -1
  301. package/dist/v2/features/modal/helpers/restore-workspace-state.d.ts +0 -18
  302. package/dist/v2/features/modal/helpers/restore-workspace-state.d.ts.map +0 -1
  303. package/dist/v2/features/modal/helpers/restore-workspace-state.js +0 -51
  304. package/dist/v2/features/modal/helpers/restore-workspace-state.js.map +0 -1
  305. package/dist/v2/features/operation/helpers/combine-params.d.ts +0 -4
  306. package/dist/v2/features/operation/helpers/combine-params.d.ts.map +0 -1
  307. package/dist/v2/features/operation/helpers/combine-params.js +0 -20
  308. package/dist/v2/features/operation/helpers/combine-params.js.map +0 -1
  309. package/dist/v2/features/operation/helpers/get-operation-header.d.ts +0 -17
  310. package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +0 -1
  311. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +0 -12
  312. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +0 -1
  313. package/dist/v2/features/operation/helpers/get-security-requirements.js +0 -17
  314. package/dist/v2/features/operation/helpers/get-security-requirements.js.map +0 -1
  315. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +0 -15
  316. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +0 -1
  317. package/dist/v2/features/operation/helpers/get-selected-security.js +0 -41
  318. package/dist/v2/features/operation/helpers/get-selected-security.js.map +0 -1
  319. package/dist/v2/features/operation/helpers/get-selected-server.d.ts +0 -13
  320. package/dist/v2/features/operation/helpers/get-selected-server.d.ts.map +0 -1
  321. package/dist/v2/features/operation/helpers/get-selected-server.js +0 -21
  322. package/dist/v2/features/operation/helpers/get-selected-server.js.map +0 -1
  323. package/dist/v2/helpers/get-active-environment.d.ts +0 -5
  324. package/dist/v2/helpers/get-active-environment.d.ts.map +0 -1
  325. package/dist/v2/helpers/get-active-environment.js +0 -19
  326. package/dist/v2/helpers/get-active-environment.js.map +0 -1
  327. package/dist/v2/helpers/get-active-proxy-url.d.ts +0 -18
  328. package/dist/v2/helpers/get-active-proxy-url.d.ts.map +0 -1
  329. package/dist/v2/helpers/get-active-proxy-url.js +0 -26
  330. package/dist/v2/helpers/get-active-proxy-url.js.map +0 -1
  331. package/dist/v2/helpers/get-servers.d.ts +0 -23
  332. package/dist/v2/helpers/get-servers.d.ts.map +0 -1
  333. package/dist/v2/helpers/get-servers.js +0 -106
  334. package/dist/v2/helpers/get-servers.js.map +0 -1
  335. package/dist/v2/helpers/index.d.ts +0 -3
  336. package/dist/v2/helpers/index.d.ts.map +0 -1
  337. package/dist/v2/helpers/index.js +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"get-content-length.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/helpers/get-content-length.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAGvE,0CAA0C;AAC1C,eAAO,MAAM,gBAAgB,GAAI,UAAU,gBAAgB,uBAW1D,CAAA"}
1
+ {"version":3,"file":"get-content-length.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/helpers/get-content-length.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAEvE,0CAA0C;AAC1C,eAAO,MAAM,gBAAgB,GAAI,UAAU,gBAAgB,uBAW1D,CAAA"}
@@ -1,10 +1,10 @@
1
- import prettyBytes from "pretty-bytes";
1
+ import { formatBytes } from "@scalar/helpers/formatters/format-bytes";
2
2
  //#region src/v2/blocks/response-block/helpers/get-content-length.ts
3
3
  /** Extract content length from headers */
4
4
  var getContentLength = (response) => {
5
5
  const contentLength = Number.parseInt(response.headers?.["Content-Length"] || response.headers?.["content-length"] || "0", 10);
6
6
  if (isNaN(contentLength) || contentLength <= 0) return;
7
- return prettyBytes(contentLength);
7
+ return formatBytes(contentLength);
8
8
  };
9
9
  //#endregion
10
10
  export { getContentLength };
@@ -1 +1 @@
1
- {"version":3,"file":"get-content-length.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/helpers/get-content-length.ts"],"sourcesContent":["import type { ResponseInstance } from '@scalar/oas-utils/entities/spec'\nimport prettyBytes from 'pretty-bytes'\n\n/** Extract content length from headers */\nexport const getContentLength = (response: ResponseInstance) => {\n const contentLength = Number.parseInt(\n response.headers?.['Content-Length'] || response.headers?.['content-length'] || '0',\n 10,\n )\n\n if (isNaN(contentLength) || contentLength <= 0) {\n return undefined\n }\n\n return prettyBytes(contentLength)\n}\n"],"mappings":";;;AAIA,IAAa,oBAAoB,aAA+B;CAC9D,MAAM,gBAAgB,OAAO,SAC3B,SAAS,UAAU,qBAAqB,SAAS,UAAU,qBAAqB,KAChF,GACD;AAED,KAAI,MAAM,cAAc,IAAI,iBAAiB,EAC3C;AAGF,QAAO,YAAY,cAAc"}
1
+ {"version":3,"file":"get-content-length.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/helpers/get-content-length.ts"],"sourcesContent":["import { formatBytes } from '@scalar/helpers/formatters/format-bytes'\nimport type { ResponseInstance } from '@scalar/oas-utils/entities/spec'\n\n/** Extract content length from headers */\nexport const getContentLength = (response: ResponseInstance) => {\n const contentLength = Number.parseInt(\n response.headers?.['Content-Length'] || response.headers?.['content-length'] || '0',\n 10,\n )\n\n if (isNaN(contentLength) || contentLength <= 0) {\n return undefined\n }\n\n return formatBytes(contentLength)\n}\n"],"mappings":";;;AAIA,IAAa,oBAAoB,aAA+B;CAC9D,MAAM,gBAAgB,OAAO,SAC3B,SAAS,UAAU,qBAAqB,SAAS,UAAU,qBAAqB,KAChF,GACD;AAED,KAAI,MAAM,cAAc,IAAI,iBAAiB,EAC3C;AAGF,QAAO,YAAY,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"AA0dA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,KAAK,EAEV,UAAU,EACV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAWhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAM3C,OAA0B,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGzE;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,MAAM,MAAM,eAAe,GAAG;IAC5B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB;IAClB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,sCAAsC;IACtC,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AACD,QAAA,MAAM,YAAY;;;;;;eAmB6B,MAAM;;;;;eAAN,MAAM;;kFAynBjD,CAAC"}
1
+ {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"AA+kBA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAKrF,OAAO,KAAK,EAEV,UAAU,EACV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAKvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAWhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C,OAA0B,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGzE;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,MAAM,MAAM,eAAe,GAAG;IAC5B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB;IAClB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,sCAAsC;IACtC,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AACD,QAAA,MAAM,YAAY;;;;;;eAmB6B,MAAM;;;;;eAAN,MAAM;;kFAmvBjD,CAAC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
2
2
  import AddressBar_vue_vue_type_script_setup_true_lang_default from "./AddressBar.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue
5
- var AddressBar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AddressBar_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-f5565642"]]);
5
+ var AddressBar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AddressBar_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e06ea441"]]);
6
6
  //#endregion
7
7
  export { AddressBar_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBar.vue.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * AddressBar component\n * This component is used to display the address bar for the operation block\n * It is used to display the path, method, server, and history for the operation\n */\nexport default {\n name: 'AddressBar',\n}\nexport type AddressBarProps = {\n /** Current request path */\n path: string\n /** Current request method */\n method: HttpMethodType\n /** Currently selected server */\n server: ServerObject | null\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** List of request history */\n history: History[]\n /** Client layout */\n layout: ClientLayout\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Environment */\n environment: XScalarEnvironment\n /** Meta information for the server */\n serverMeta: ServerMeta\n}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarIcon,\n ScalarWrappingText,\n} from '@scalar/components'\nimport { REQUEST_METHODS } from '@scalar/helpers/http/http-info'\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconCopy, ScalarIconWarningCircle } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n} from 'vue'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { type ClientLayout } from '@/hooks'\nimport { getResolvedUrl } from '@/v2/blocks/operation-block/helpers/get-resolved-url'\nimport { useLoadingAnimation } from '@/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation'\nimport { CodeInput } from '@/v2/components/code-input'\nimport { ServerDropdown } from '@/v2/components/server'\n\nimport AddressBarHistory, { type History } from './AddressBarHistory.vue'\n\nconst {\n path,\n method,\n layout,\n eventBus,\n history,\n server,\n servers,\n environment,\n serverMeta,\n} = defineProps<AddressBarProps>()\n\nconst emit = defineEmits<{\n /** Execute the current operation example */\n (e: 'execute'): void\n /** Select a request history item by index */\n (e: 'select:history:item', payload: { index: number }): void\n}>()\n\nconst id = useId()\nconst { percentage, startLoading, stopLoading, isLoading } =\n useLoadingAnimation()\n\n/** Calculate the style for the address bar */\nconst style = computed(() => ({\n backgroundColor: `color-mix(in srgb, transparent 90%, ${REQUEST_METHODS[method].colorVar})`,\n transform: `translate3d(-${percentage.value}%,0,0)`,\n}))\n\nconst pathConflict = ref<string | null>(null)\nconst methodConflict = ref<HttpMethodType | null>(null)\n\n/** Whether there is a path or method conflict */\nconst hasConflict = computed(() => methodConflict.value || pathConflict.value)\n\n/** Emit the path/method update event with conflict handling */\nconst emitPathMethodUpdate = (\n targetMethod: HttpMethodType,\n targetPath: string,\n /** We only want to debounce when the path changes */\n emitOptions?: { debounceKey?: string },\n): void => {\n const position = addressBarRef.value?.cursorPosition()\n eventBus.emit(\n 'operation:update:pathMethod',\n {\n meta: { method, path },\n payload: { method: targetMethod, path: targetPath },\n callback: (status) => {\n // Clear conflicts if the operation was successful or no change was made\n if (status === 'success' || status === 'no-change') {\n methodConflict.value = null\n pathConflict.value = null\n }\n if (status === 'success') {\n eventBus.emit('ui:focus:address-bar', { position })\n }\n // Otherwise set the conflict if needed\n else if (status === 'conflict') {\n if (targetMethod !== method) {\n methodConflict.value = targetMethod\n }\n if (targetPath !== path) {\n pathConflict.value = targetPath\n }\n }\n },\n },\n emitOptions,\n )\n}\n\n/** Update the operation's HTTP method, handling conflicts */\nconst handleMethodChange = (newMethod: HttpMethodType): void =>\n emitPathMethodUpdate(newMethod, pathConflict.value ?? path)\n\n/** Update the operation's path, handling conflicts */\nconst handlePathChange = (newPath: string): void => {\n const normalizedPath = newPath.startsWith('/') ? newPath : `/${newPath}`\n emitPathMethodUpdate(methodConflict.value ?? method, normalizedPath, {\n debounceKey: `operation:update:pathMethod-${path}-${method}`,\n })\n}\n\n/** Handle focus events */\nconst sendButtonRef = useTemplateRef('sendButtonRef')\nconst addressBarRef = useTemplateRef('addressBarRef')\nconst handleFocusSendButton = () => sendButtonRef.value?.$el?.focus()\n\nconst handleFocusAddressBar = (\n payload: ApiReferenceEvents['ui:focus:address-bar'],\n) => {\n // If it already has focus we just propagate native behavior which should focus the browser address bar\n if (addressBarRef.value?.isFocused && layout !== 'desktop') {\n return\n }\n\n const position = payload && 'position' in payload ? payload.position : 'end'\n addressBarRef.value?.focus(position)\n\n if (payload && 'event' in payload) {\n payload.event.preventDefault()\n }\n}\n\nonMounted(() => {\n eventBus.on('ui:focus:address-bar', handleFocusAddressBar)\n eventBus.on('ui:focus:send-button', handleFocusSendButton)\n eventBus.on('hooks:on:request:sent', startLoading)\n eventBus.on('hooks:on:request:complete', stopLoading)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('ui:focus:address-bar', handleFocusAddressBar)\n eventBus.off('ui:focus:send-button', handleFocusSendButton)\n eventBus.off('hooks:on:request:sent', startLoading)\n eventBus.off('hooks:on:request:complete', stopLoading)\n\n // Stop the animation when the component is unmounted\n // This is to prevent the animation from continuing after the component is unmounted\n stopLoading()\n})\n\nconst { copyToClipboard } = useClipboard()\n\nconst copyUrl = async () => {\n await copyToClipboard(\n getResolvedUrl({ environment, server, path, pathVariables: {} }),\n )\n}\n\nconst isServerDropdownOpen = ref(false)\nconst isHistoryDropdownOpen = ref(false)\n\n/** Whether either dropdown is open */\nconst isDropdownOpen = computed(\n () => isServerDropdownOpen.value || isHistoryDropdownOpen.value,\n)\n\nconst navigateToServersPage = () => {\n if (serverMeta.type === 'operation') {\n return eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'servers',\n operationPath: serverMeta.path,\n method: serverMeta.method,\n })\n }\n return eventBus.emit('ui:navigate', {\n page: 'document',\n path: 'servers',\n })\n}\n\ndefineExpose({\n methodConflict,\n pathConflict,\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-0 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 :class=\"{\n 'outline-c-danger outline': hasConflict,\n 'rounded-b-none': isDropdownOpen,\n }\">\n <div\n class=\"pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border\"\n :class=\"{\n 'rounded-b-none': isDropdownOpen,\n }\">\n <div\n class=\"absolute top-0 left-0 h-full w-full\"\n :style />\n </div>\n <div class=\"flex gap-1\">\n <HttpMethod\n :isEditable=\"layout !== 'modal'\"\n isSquare\n :method=\"methodConflict ?? method\"\n teleport\n @change=\"handleMethodChange\" />\n </div>\n\n <div\n class=\"scroll-timeline-x scroll-timeline-x-hidden relative flex w-full bg-blend-normal\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"servers.length\"\n :layout=\"layout\"\n :meta=\"serverMeta\"\n :server=\"server\"\n :servers=\"servers\"\n :target=\"id\"\n @update:open=\"(value) => (isServerDropdownOpen = value)\"\n @update:selectedServer=\"\n (payload) => eventBus.emit('server:update:selected', payload)\n \"\n @update:servers=\"navigateToServersPage\"\n @update:variable=\"\n (payload) => eventBus.emit('server:update:variables', payload)\n \" />\n\n <div class=\"fade-left\" />\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n alwaysEmitChange\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 :environment=\"environment\"\n importCurl\n :layout=\"layout\"\n :modelValue=\"path\"\n :placeholder=\"server ? '' : 'Enter a URL'\"\n server\n @submit=\"emit('execute')\"\n @update:modelValue=\"handlePathChange\" />\n <div class=\"fade-right\" />\n </div>\n\n <!-- Copy url button -->\n <ScalarButton\n class=\"hover:bg-b-3 mx-1\"\n size=\"xs\"\n variant=\"ghost\"\n @click=\"copyUrl\">\n <ScalarIconCopy />\n <span class=\"sr-only\">Copy URL</span>\n </ScalarButton>\n\n <AddressBarHistory\n :history=\"history\"\n :target=\"id\"\n @select:history:item=\"(payload) => emit('select:history:item', payload)\"\n @update:open=\"(value) => (isHistoryDropdownOpen = value)\" />\n <!-- Error message -->\n <div\n v-if=\"hasConflict\"\n class=\"absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6\">\n <div\n class=\"text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1\">\n <ScalarIconWarningCircle size=\"sm\" />\n <div class=\"min-w-0 flex-1\">\n A\n <em>{{ methodConflict?.toUpperCase() ?? method.toUpperCase() }}</em>\n request to\n <ScalarWrappingText :text=\"pathConflict ?? path\" />\n already exists in this document\n </div>\n </div>\n </div>\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold\"\n :disabled=\"isLoading\"\n @click=\"emit('execute')\">\n <span\n aria-hidden=\"true\"\n class=\"inline-flex items-center gap-1\">\n <ScalarIcon\n class=\"relative shrink-0 fill-current\"\n icon=\"Play\"\n size=\"xs\" />\n <span class=\"text-xxs hidden lg:flex\">Send</span>\n </span>\n <span class=\"sr-only\">\n Send {{ method }} request to {{ server?.url ?? '' }}{{ 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-width: 1px;\n outline-style: solid;\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":""}
1
+ {"version":3,"file":"AddressBar.vue.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * AddressBar component\n * This component is used to display the address bar for the operation block\n * It is used to display the path, method, server, and history for the operation\n */\nexport default {\n name: 'AddressBar',\n}\nexport type AddressBarProps = {\n /** Current request path */\n path: string\n /** Current request method */\n method: HttpMethodType\n /** Currently selected server */\n server: ServerObject | null\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** List of request history */\n history: History[]\n /** Client layout */\n layout: ClientLayout\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Environment */\n environment: XScalarEnvironment\n /** Meta information for the server */\n serverMeta: ServerMeta\n}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarIcon,\n ScalarWrappingText,\n} from '@scalar/components'\nimport { getSelector } from '@scalar/helpers/dom/get-selector'\nimport { REQUEST_METHODS } from '@scalar/helpers/http/http-info'\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport { extractServerFromPath } from '@scalar/helpers/url/extract-server-from-path'\nimport { ScalarIconCopy, ScalarIconWarningCircle } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport {\n getEnvironmentVariables,\n getResolvedUrl,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n} from 'vue'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { type ClientLayout } from '@/hooks'\nimport { useLoadingAnimation } from '@/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation'\nimport { CodeInput } from '@/v2/components/code-input'\nimport { ServerDropdown } from '@/v2/components/server'\n\nimport AddressBarHistory, { type History } from './AddressBarHistory.vue'\n\nconst {\n path,\n method,\n layout,\n eventBus,\n history,\n server,\n servers,\n environment,\n serverMeta,\n} = defineProps<AddressBarProps>()\n\nconst emit = defineEmits<{\n /** Execute the current operation example */\n (e: 'execute'): void\n /** Select a request history item by index */\n (e: 'select:history:item', payload: { index: number }): void\n}>()\n\nconst id = useId()\nconst { percentage, startLoading, stopLoading, isLoading } =\n useLoadingAnimation()\n\n/** Calculate the style for the address bar */\nconst style = computed(() => ({\n backgroundColor: `color-mix(in srgb, transparent 90%, ${REQUEST_METHODS[method].colorVar})`,\n transform: `translate3d(-${percentage.value}%,0,0)`,\n}))\n\nconst pathConflict = ref<string | null>(null)\nconst methodConflict = ref<HttpMethodType | null>(null)\n\n/** Whether there is a path or method conflict */\nconst hasConflict = computed(() => methodConflict.value || pathConflict.value)\n\n/** Check if the path contains a server URL, extract it, and select or add the server */\nconst checkForServer = (targetPath: string) => {\n const extracted = extractServerFromPath(targetPath)\n if (!extracted) {\n return targetPath\n }\n\n const [url, newPath] = extracted\n\n // Server is already selected — nothing to change\n if (url === server?.url) {\n return newPath\n }\n\n const matchingServer = servers.find((s) => s.url === url)\n\n // Select the server if it already exists in the list\n if (matchingServer) {\n eventBus.emit('server:update:selected', {\n url,\n meta: serverMeta,\n })\n }\n // Otherwise add it as a new operation-level server\n else {\n eventBus.emit('server:add:server', {\n url,\n select: true,\n meta: {\n type: 'operation',\n path,\n method,\n },\n })\n }\n\n return newPath\n}\n\n/** Emit the path/method update event with conflict handling */\nconst emitPathMethodUpdate = (\n targetMethod: HttpMethodType,\n targetPath: string,\n blurTargetSelector: string | null = null,\n): void => {\n const newPath = checkForServer(targetPath)\n const normalizedPath = newPath.startsWith('/') ? newPath : `/${newPath}`\n\n eventBus.emit('operation:update:pathMethod', {\n meta: { method, path },\n blurTargetSelector,\n payload: { method: targetMethod, path: normalizedPath },\n callback: (status, blurTargetSelector) => {\n // Clear conflicts if the operation was successful or no change was made\n if (status === 'success' || status === 'no-change') {\n methodConflict.value = null\n pathConflict.value = null\n }\n // Otherwise set the conflict if needed\n else if (status === 'conflict') {\n if (targetMethod !== method) {\n methodConflict.value = targetMethod\n }\n if (normalizedPath !== path) {\n pathConflict.value = normalizedPath\n }\n }\n\n // Edge case: pasting a full URL extracts the server but leaves the path unchanged.\n // The CodeMirror DOM still shows the full URL, so we force it back to just the path.\n if (\n status === 'no-change' &&\n addressBarRef.value?.codeMirrorRef?.textContent &&\n addressBarRef.value.codeMirrorRef.textContent !== newPath\n ) {\n addressBarRef.value.setCodeMirrorContent(newPath)\n }\n\n // Re-trigger the click or focus event if we have a blur target selector\n if (blurTargetSelector) {\n const element = document.querySelector(blurTargetSelector)\n\n // Re-trigger clicks on buttons\n if (element instanceof HTMLButtonElement) {\n element.click()\n }\n\n // Re-trigger focus on inputs and codeInputs\n else if (\n element instanceof HTMLInputElement ||\n element instanceof HTMLTextAreaElement ||\n (element instanceof HTMLElement &&\n element.getAttribute('contenteditable') === 'true')\n ) {\n element.focus()\n }\n }\n },\n })\n}\n\n/** Update the operation's HTTP method, handling conflicts */\nconst handleMethodChange = (newMethod: HttpMethodType): void =>\n emitPathMethodUpdate(newMethod, pathConflict.value ?? path)\n\n/**\n * Update the operation's path, handling conflicts also we extract the blur target selector to re-trigger click events\n *\n * We have special handling for the tab key to prevent it from triggering a click on the focused button\n */\nconst handlePathBlur = (newPath: string, event: FocusEvent): void => {\n const relatedTarget = event.relatedTarget as Element | null\n const blurTargetSelector = tabbedOut.value ? null : getSelector(relatedTarget)\n\n tabbedOut.value = false\n\n emitPathMethodUpdate(\n methodConflict.value ?? method,\n newPath,\n blurTargetSelector,\n )\n}\n\n/** Lets unset the server when backspace is pressed and the path is empty */\nconst handlePathBackspace = (event: KeyboardEvent): void => {\n if ((event.target as HTMLElement)?.innerText === '\\n') {\n eventBus.emit('server:update:selected', {\n url: '',\n meta: serverMeta,\n })\n }\n}\n\n/** Handle path submit (Enter key) — saves the path and triggers execution via blurTargetSelector */\nconst handlePathSubmit = (\n newPath: string,\n event: KeyboardEvent | FocusEvent,\n): void => {\n // Prevent the global hotkey listener\n event.stopPropagation()\n\n emitPathMethodUpdate(\n methodConflict.value ?? method,\n newPath,\n '[data-addressbar-action=\"send\"]',\n )\n}\n\n/** Handle focus events */\nconst sendButtonRef = useTemplateRef('sendButtonRef')\nconst addressBarRef = useTemplateRef('addressBarRef')\nconst tabbedOut = ref(false)\nconst handleFocusSendButton = () => sendButtonRef.value?.$el?.focus()\n\nconst handleFocusAddressBar = (\n payload: ApiReferenceEvents['ui:focus:address-bar'],\n) => {\n // If it already has focus we just propagate native behavior which should focus the browser address bar\n if (addressBarRef.value?.isFocused && layout !== 'desktop') {\n return\n }\n\n addressBarRef.value?.focus('end')\n\n if (payload && 'event' in payload) {\n payload.event.preventDefault()\n }\n}\n\nonMounted(() => {\n eventBus.on('ui:focus:address-bar', handleFocusAddressBar)\n eventBus.on('ui:focus:send-button', handleFocusSendButton)\n eventBus.on('copy-url:address-bar', copyUrl)\n eventBus.on('hooks:on:request:sent', startLoading)\n eventBus.on('hooks:on:request:complete', stopLoading)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('ui:focus:address-bar', handleFocusAddressBar)\n eventBus.off('ui:focus:send-button', handleFocusSendButton)\n eventBus.off('copy-url:address-bar', copyUrl)\n eventBus.off('hooks:on:request:sent', startLoading)\n eventBus.off('hooks:on:request:complete', stopLoading)\n\n // Stop the animation when the component is unmounted\n // This is to prevent the animation from continuing after the component is unmounted\n stopLoading()\n})\n\nconst { copyToClipboard } = useClipboard()\n\n/** Copy the resolved URL with the environment variables to the clipboard */\nconst copyUrl = async () => {\n const resolvedUrl = getResolvedUrl({ server, path })\n const environmentVariables = getEnvironmentVariables(environment)\n const resolvedUrlWithEnvVars = replaceEnvVariables(\n resolvedUrl,\n environmentVariables,\n )\n await copyToClipboard(resolvedUrlWithEnvVars)\n}\n\nconst isServerDropdownOpen = ref(false)\nconst isHistoryDropdownOpen = ref(false)\n\n/** Whether either dropdown is open */\nconst isDropdownOpen = computed(\n () => isServerDropdownOpen.value || isHistoryDropdownOpen.value,\n)\n\nconst navigateToServersPage = () => {\n if (serverMeta.type === 'operation') {\n return eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'servers',\n operationPath: serverMeta.path,\n method: serverMeta.method,\n })\n }\n return eventBus.emit('ui:navigate', {\n page: 'document',\n path: 'servers',\n })\n}\n\ndefineExpose({\n methodConflict,\n pathConflict,\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-0 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 :class=\"{\n 'outline-c-danger outline': hasConflict,\n 'rounded-b-none': isDropdownOpen,\n }\">\n <div\n class=\"pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border\"\n :class=\"{\n 'rounded-b-none': isDropdownOpen,\n }\">\n <div\n class=\"absolute top-0 left-0 h-full w-full\"\n :style />\n </div>\n <div class=\"flex gap-1\">\n <HttpMethod\n :isEditable=\"layout !== 'modal'\"\n isSquare\n :method=\"methodConflict ?? method\"\n teleport\n @change=\"handleMethodChange\" />\n </div>\n\n <div\n class=\"scroll-timeline-x scroll-timeline-x-hidden relative flex w-full bg-blend-normal\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"servers.length\"\n :layout=\"layout\"\n :meta=\"serverMeta\"\n :server=\"server\"\n :servers=\"servers\"\n :target=\"id\"\n @update:open=\"(value) => (isServerDropdownOpen = value)\"\n @update:selectedServer=\"\n (payload) => eventBus.emit('server:update:selected', payload)\n \"\n @update:servers=\"navigateToServersPage\"\n @update:variable=\"\n (payload) => eventBus.emit('server:update:variables', payload)\n \" />\n\n <div class=\"fade-left\" />\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n alwaysEmitChange\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 :environment=\"environment\"\n importCurl\n :layout=\"layout\"\n :modelValue=\"path\"\n :placeholder=\"server ? '' : 'Enter a URL'\"\n server\n @blur=\"handlePathBlur\"\n @keydown.delete=\"handlePathBackspace\"\n @keydown.tab=\"tabbedOut = true\"\n @submit=\"handlePathSubmit\" />\n <div class=\"fade-right\" />\n </div>\n\n <!-- Copy url button -->\n <ScalarButton\n class=\"hover:bg-b-3 mx-1\"\n size=\"xs\"\n variant=\"ghost\"\n @click=\"copyUrl\">\n <ScalarIconCopy />\n <span class=\"sr-only\">Copy URL</span>\n </ScalarButton>\n\n <AddressBarHistory\n :history=\"history\"\n :target=\"id\"\n @select:history:item=\"(payload) => emit('select:history:item', payload)\"\n @update:open=\"(value) => (isHistoryDropdownOpen = value)\" />\n <!-- Error message -->\n <div\n v-if=\"hasConflict\"\n class=\"z-context absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6\">\n <div\n class=\"text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1\">\n <ScalarIconWarningCircle size=\"sm\" />\n <div class=\"min-w-0 flex-1\">\n A\n <em>{{ methodConflict?.toUpperCase() ?? method.toUpperCase() }}</em>\n request to\n <ScalarWrappingText :text=\"pathConflict ?? path\" />\n already exists in this document\n </div>\n </div>\n </div>\n\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold\"\n data-addressbar-action=\"send\"\n :disabled=\"isLoading\"\n @click=\"emit('execute')\">\n <span\n aria-hidden=\"true\"\n class=\"inline-flex items-center gap-1\">\n <ScalarIcon\n class=\"relative shrink-0 fill-current\"\n icon=\"Play\"\n size=\"xs\" />\n <span class=\"text-xxs hidden lg:flex\">Send</span>\n </span>\n <span class=\"sr-only\">\n Send {{ method }} request to {{ server?.url ?? '' }}{{ 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-width: 1px;\n outline-style: solid;\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":""}
@@ -1,21 +1,24 @@
1
1
  import HttpMethod_default from "../../../../components/HttpMethod/HttpMethod.vue.js";
2
- import { getResolvedUrl } from "../../operation-block/helpers/get-resolved-url.js";
3
2
  import CodeInput_default from "../../../components/code-input/CodeInput.vue.js";
4
3
  import { useLoadingAnimation } from "../hooks/use-loading-animation.js";
5
4
  import ServerDropdown_default from "../../../components/server/ServerDropdown.vue.js";
6
5
  import AddressBarHistory_default from "./AddressBarHistory.vue.js";
7
- import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, toDisplayString, unref, useId, useTemplateRef, withCtx } from "vue";
6
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, toDisplayString, unref, useId, useTemplateRef, withCtx, withKeys } from "vue";
8
7
  import { ScalarButton, ScalarIcon, ScalarWrappingText } from "@scalar/components";
9
8
  import { useClipboard } from "@scalar/use-hooks/useClipboard";
10
9
  import { REQUEST_METHODS } from "@scalar/helpers/http/http-info";
11
10
  import { ScalarIconCopy, ScalarIconWarningCircle } from "@scalar/icons";
11
+ import { getEnvironmentVariables, getResolvedUrl } from "@scalar/workspace-store/request-example";
12
+ import { replaceEnvVariables } from "@scalar/helpers/regex/replace-variables";
13
+ import { getSelector } from "@scalar/helpers/dom/get-selector";
14
+ import { extractServerFromPath } from "@scalar/helpers/url/extract-server-from-path";
12
15
  //#region src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue?vue&type=script&setup=true&lang.ts
13
16
  var _hoisted_1 = ["id"];
14
17
  var _hoisted_2 = { class: "flex gap-1" };
15
18
  var _hoisted_3 = { class: "scroll-timeline-x scroll-timeline-x-hidden relative flex w-full bg-blend-normal" };
16
19
  var _hoisted_4 = {
17
20
  key: 0,
18
- class: "absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6"
21
+ class: "z-context absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6"
19
22
  };
20
23
  var _hoisted_5 = { class: "text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1" };
21
24
  var _hoisted_6 = { class: "min-w-0 flex-1" };
@@ -51,69 +54,115 @@ var AddressBar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
51
54
  const methodConflict = ref(null);
52
55
  /** Whether there is a path or method conflict */
53
56
  const hasConflict = computed(() => methodConflict.value || pathConflict.value);
57
+ /** Check if the path contains a server URL, extract it, and select or add the server */
58
+ const checkForServer = (targetPath) => {
59
+ const extracted = extractServerFromPath(targetPath);
60
+ if (!extracted) return targetPath;
61
+ const [url, newPath] = extracted;
62
+ if (url === __props.server?.url) return newPath;
63
+ if (__props.servers.find((s) => s.url === url)) __props.eventBus.emit("server:update:selected", {
64
+ url,
65
+ meta: __props.serverMeta
66
+ });
67
+ else __props.eventBus.emit("server:add:server", {
68
+ url,
69
+ select: true,
70
+ meta: {
71
+ type: "operation",
72
+ path: __props.path,
73
+ method: __props.method
74
+ }
75
+ });
76
+ return newPath;
77
+ };
54
78
  /** Emit the path/method update event with conflict handling */
55
- const emitPathMethodUpdate = (targetMethod, targetPath, emitOptions) => {
56
- const position = addressBarRef.value?.cursorPosition();
79
+ const emitPathMethodUpdate = (targetMethod, targetPath, blurTargetSelector = null) => {
80
+ const newPath = checkForServer(targetPath);
81
+ const normalizedPath = newPath.startsWith("/") ? newPath : `/${newPath}`;
57
82
  __props.eventBus.emit("operation:update:pathMethod", {
58
83
  meta: {
59
84
  method: __props.method,
60
85
  path: __props.path
61
86
  },
87
+ blurTargetSelector,
62
88
  payload: {
63
89
  method: targetMethod,
64
- path: targetPath
90
+ path: normalizedPath
65
91
  },
66
- callback: (status) => {
92
+ callback: (status, blurTargetSelector) => {
67
93
  if (status === "success" || status === "no-change") {
68
94
  methodConflict.value = null;
69
95
  pathConflict.value = null;
70
- }
71
- if (status === "success") __props.eventBus.emit("ui:focus:address-bar", { position });
72
- else if (status === "conflict") {
96
+ } else if (status === "conflict") {
73
97
  if (targetMethod !== __props.method) methodConflict.value = targetMethod;
74
- if (targetPath !== __props.path) pathConflict.value = targetPath;
98
+ if (normalizedPath !== __props.path) pathConflict.value = normalizedPath;
99
+ }
100
+ if (status === "no-change" && addressBarRef.value?.codeMirrorRef?.textContent && addressBarRef.value.codeMirrorRef.textContent !== newPath) addressBarRef.value.setCodeMirrorContent(newPath);
101
+ if (blurTargetSelector) {
102
+ const element = document.querySelector(blurTargetSelector);
103
+ if (element instanceof HTMLButtonElement) element.click();
104
+ else if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLElement && element.getAttribute("contenteditable") === "true") element.focus();
75
105
  }
76
106
  }
77
- }, emitOptions);
107
+ });
78
108
  };
79
109
  /** Update the operation's HTTP method, handling conflicts */
80
110
  const handleMethodChange = (newMethod) => emitPathMethodUpdate(newMethod, pathConflict.value ?? __props.path);
81
- /** Update the operation's path, handling conflicts */
82
- const handlePathChange = (newPath) => {
83
- const normalizedPath = newPath.startsWith("/") ? newPath : `/${newPath}`;
84
- emitPathMethodUpdate(methodConflict.value ?? __props.method, normalizedPath, { debounceKey: `operation:update:pathMethod-${__props.path}-${__props.method}` });
111
+ /**
112
+ * Update the operation's path, handling conflicts also we extract the blur target selector to re-trigger click events
113
+ *
114
+ * We have special handling for the tab key to prevent it from triggering a click on the focused button
115
+ */
116
+ const handlePathBlur = (newPath, event) => {
117
+ const relatedTarget = event.relatedTarget;
118
+ const blurTargetSelector = tabbedOut.value ? null : getSelector(relatedTarget);
119
+ tabbedOut.value = false;
120
+ emitPathMethodUpdate(methodConflict.value ?? __props.method, newPath, blurTargetSelector);
121
+ };
122
+ /** Lets unset the server when backspace is pressed and the path is empty */
123
+ const handlePathBackspace = (event) => {
124
+ if (event.target?.innerText === "\n") __props.eventBus.emit("server:update:selected", {
125
+ url: "",
126
+ meta: __props.serverMeta
127
+ });
128
+ };
129
+ /** Handle path submit (Enter key) — saves the path and triggers execution via blurTargetSelector */
130
+ const handlePathSubmit = (newPath, event) => {
131
+ event.stopPropagation();
132
+ emitPathMethodUpdate(methodConflict.value ?? __props.method, newPath, "[data-addressbar-action=\"send\"]");
85
133
  };
86
134
  /** Handle focus events */
87
135
  const sendButtonRef = useTemplateRef("sendButtonRef");
88
136
  const addressBarRef = useTemplateRef("addressBarRef");
137
+ const tabbedOut = ref(false);
89
138
  const handleFocusSendButton = () => sendButtonRef.value?.$el?.focus();
90
139
  const handleFocusAddressBar = (payload) => {
91
140
  if (addressBarRef.value?.isFocused && __props.layout !== "desktop") return;
92
- const position = payload && "position" in payload ? payload.position : "end";
93
- addressBarRef.value?.focus(position);
141
+ addressBarRef.value?.focus("end");
94
142
  if (payload && "event" in payload) payload.event.preventDefault();
95
143
  };
96
144
  onMounted(() => {
97
145
  __props.eventBus.on("ui:focus:address-bar", handleFocusAddressBar);
98
146
  __props.eventBus.on("ui:focus:send-button", handleFocusSendButton);
147
+ __props.eventBus.on("copy-url:address-bar", copyUrl);
99
148
  __props.eventBus.on("hooks:on:request:sent", startLoading);
100
149
  __props.eventBus.on("hooks:on:request:complete", stopLoading);
101
150
  });
102
151
  onBeforeUnmount(() => {
103
152
  __props.eventBus.off("ui:focus:address-bar", handleFocusAddressBar);
104
153
  __props.eventBus.off("ui:focus:send-button", handleFocusSendButton);
154
+ __props.eventBus.off("copy-url:address-bar", copyUrl);
105
155
  __props.eventBus.off("hooks:on:request:sent", startLoading);
106
156
  __props.eventBus.off("hooks:on:request:complete", stopLoading);
107
157
  stopLoading();
108
158
  });
109
159
  const { copyToClipboard } = useClipboard();
160
+ /** Copy the resolved URL with the environment variables to the clipboard */
110
161
  const copyUrl = async () => {
111
- await copyToClipboard(getResolvedUrl({
112
- environment: __props.environment,
162
+ await copyToClipboard(replaceEnvVariables(getResolvedUrl({
113
163
  server: __props.server,
114
- path: __props.path,
115
- pathVariables: {}
116
- }));
164
+ path: __props.path
165
+ }), getEnvironmentVariables(__props.environment)));
117
166
  };
118
167
  const isServerDropdownOpen = ref(false);
119
168
  const isHistoryDropdownOpen = ref(false);
@@ -191,8 +240,9 @@ var AddressBar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
191
240
  modelValue: __props.path,
192
241
  placeholder: __props.server ? "" : "Enter a URL",
193
242
  server: "",
194
- onSubmit: _cache[3] || (_cache[3] = ($event) => emit("execute")),
195
- "onUpdate:modelValue": handlePathChange
243
+ onBlur: handlePathBlur,
244
+ onKeydown: [withKeys(handlePathBackspace, ["delete"]), _cache[3] || (_cache[3] = withKeys(($event) => tabbedOut.value = true, ["tab"]))],
245
+ onSubmit: handlePathSubmit
196
246
  }, null, 8, [
197
247
  "disabled",
198
248
  "environment",
@@ -228,6 +278,7 @@ var AddressBar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
228
278
  ref_key: "sendButtonRef",
229
279
  ref: sendButtonRef,
230
280
  class: "relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold",
281
+ "data-addressbar-action": "send",
231
282
  disabled: unref(isLoading),
232
283
  onClick: _cache[6] || (_cache[6] = ($event) => emit("execute"))
233
284
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBar.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * AddressBar component\n * This component is used to display the address bar for the operation block\n * It is used to display the path, method, server, and history for the operation\n */\nexport default {\n name: 'AddressBar',\n}\nexport type AddressBarProps = {\n /** Current request path */\n path: string\n /** Current request method */\n method: HttpMethodType\n /** Currently selected server */\n server: ServerObject | null\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** List of request history */\n history: History[]\n /** Client layout */\n layout: ClientLayout\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Environment */\n environment: XScalarEnvironment\n /** Meta information for the server */\n serverMeta: ServerMeta\n}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarIcon,\n ScalarWrappingText,\n} from '@scalar/components'\nimport { REQUEST_METHODS } from '@scalar/helpers/http/http-info'\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconCopy, ScalarIconWarningCircle } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n} from 'vue'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { type ClientLayout } from '@/hooks'\nimport { getResolvedUrl } from '@/v2/blocks/operation-block/helpers/get-resolved-url'\nimport { useLoadingAnimation } from '@/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation'\nimport { CodeInput } from '@/v2/components/code-input'\nimport { ServerDropdown } from '@/v2/components/server'\n\nimport AddressBarHistory, { type History } from './AddressBarHistory.vue'\n\nconst {\n path,\n method,\n layout,\n eventBus,\n history,\n server,\n servers,\n environment,\n serverMeta,\n} = defineProps<AddressBarProps>()\n\nconst emit = defineEmits<{\n /** Execute the current operation example */\n (e: 'execute'): void\n /** Select a request history item by index */\n (e: 'select:history:item', payload: { index: number }): void\n}>()\n\nconst id = useId()\nconst { percentage, startLoading, stopLoading, isLoading } =\n useLoadingAnimation()\n\n/** Calculate the style for the address bar */\nconst style = computed(() => ({\n backgroundColor: `color-mix(in srgb, transparent 90%, ${REQUEST_METHODS[method].colorVar})`,\n transform: `translate3d(-${percentage.value}%,0,0)`,\n}))\n\nconst pathConflict = ref<string | null>(null)\nconst methodConflict = ref<HttpMethodType | null>(null)\n\n/** Whether there is a path or method conflict */\nconst hasConflict = computed(() => methodConflict.value || pathConflict.value)\n\n/** Emit the path/method update event with conflict handling */\nconst emitPathMethodUpdate = (\n targetMethod: HttpMethodType,\n targetPath: string,\n /** We only want to debounce when the path changes */\n emitOptions?: { debounceKey?: string },\n): void => {\n const position = addressBarRef.value?.cursorPosition()\n eventBus.emit(\n 'operation:update:pathMethod',\n {\n meta: { method, path },\n payload: { method: targetMethod, path: targetPath },\n callback: (status) => {\n // Clear conflicts if the operation was successful or no change was made\n if (status === 'success' || status === 'no-change') {\n methodConflict.value = null\n pathConflict.value = null\n }\n if (status === 'success') {\n eventBus.emit('ui:focus:address-bar', { position })\n }\n // Otherwise set the conflict if needed\n else if (status === 'conflict') {\n if (targetMethod !== method) {\n methodConflict.value = targetMethod\n }\n if (targetPath !== path) {\n pathConflict.value = targetPath\n }\n }\n },\n },\n emitOptions,\n )\n}\n\n/** Update the operation's HTTP method, handling conflicts */\nconst handleMethodChange = (newMethod: HttpMethodType): void =>\n emitPathMethodUpdate(newMethod, pathConflict.value ?? path)\n\n/** Update the operation's path, handling conflicts */\nconst handlePathChange = (newPath: string): void => {\n const normalizedPath = newPath.startsWith('/') ? newPath : `/${newPath}`\n emitPathMethodUpdate(methodConflict.value ?? method, normalizedPath, {\n debounceKey: `operation:update:pathMethod-${path}-${method}`,\n })\n}\n\n/** Handle focus events */\nconst sendButtonRef = useTemplateRef('sendButtonRef')\nconst addressBarRef = useTemplateRef('addressBarRef')\nconst handleFocusSendButton = () => sendButtonRef.value?.$el?.focus()\n\nconst handleFocusAddressBar = (\n payload: ApiReferenceEvents['ui:focus:address-bar'],\n) => {\n // If it already has focus we just propagate native behavior which should focus the browser address bar\n if (addressBarRef.value?.isFocused && layout !== 'desktop') {\n return\n }\n\n const position = payload && 'position' in payload ? payload.position : 'end'\n addressBarRef.value?.focus(position)\n\n if (payload && 'event' in payload) {\n payload.event.preventDefault()\n }\n}\n\nonMounted(() => {\n eventBus.on('ui:focus:address-bar', handleFocusAddressBar)\n eventBus.on('ui:focus:send-button', handleFocusSendButton)\n eventBus.on('hooks:on:request:sent', startLoading)\n eventBus.on('hooks:on:request:complete', stopLoading)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('ui:focus:address-bar', handleFocusAddressBar)\n eventBus.off('ui:focus:send-button', handleFocusSendButton)\n eventBus.off('hooks:on:request:sent', startLoading)\n eventBus.off('hooks:on:request:complete', stopLoading)\n\n // Stop the animation when the component is unmounted\n // This is to prevent the animation from continuing after the component is unmounted\n stopLoading()\n})\n\nconst { copyToClipboard } = useClipboard()\n\nconst copyUrl = async () => {\n await copyToClipboard(\n getResolvedUrl({ environment, server, path, pathVariables: {} }),\n )\n}\n\nconst isServerDropdownOpen = ref(false)\nconst isHistoryDropdownOpen = ref(false)\n\n/** Whether either dropdown is open */\nconst isDropdownOpen = computed(\n () => isServerDropdownOpen.value || isHistoryDropdownOpen.value,\n)\n\nconst navigateToServersPage = () => {\n if (serverMeta.type === 'operation') {\n return eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'servers',\n operationPath: serverMeta.path,\n method: serverMeta.method,\n })\n }\n return eventBus.emit('ui:navigate', {\n page: 'document',\n path: 'servers',\n })\n}\n\ndefineExpose({\n methodConflict,\n pathConflict,\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-0 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 :class=\"{\n 'outline-c-danger outline': hasConflict,\n 'rounded-b-none': isDropdownOpen,\n }\">\n <div\n class=\"pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border\"\n :class=\"{\n 'rounded-b-none': isDropdownOpen,\n }\">\n <div\n class=\"absolute top-0 left-0 h-full w-full\"\n :style />\n </div>\n <div class=\"flex gap-1\">\n <HttpMethod\n :isEditable=\"layout !== 'modal'\"\n isSquare\n :method=\"methodConflict ?? method\"\n teleport\n @change=\"handleMethodChange\" />\n </div>\n\n <div\n class=\"scroll-timeline-x scroll-timeline-x-hidden relative flex w-full bg-blend-normal\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"servers.length\"\n :layout=\"layout\"\n :meta=\"serverMeta\"\n :server=\"server\"\n :servers=\"servers\"\n :target=\"id\"\n @update:open=\"(value) => (isServerDropdownOpen = value)\"\n @update:selectedServer=\"\n (payload) => eventBus.emit('server:update:selected', payload)\n \"\n @update:servers=\"navigateToServersPage\"\n @update:variable=\"\n (payload) => eventBus.emit('server:update:variables', payload)\n \" />\n\n <div class=\"fade-left\" />\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n alwaysEmitChange\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 :environment=\"environment\"\n importCurl\n :layout=\"layout\"\n :modelValue=\"path\"\n :placeholder=\"server ? '' : 'Enter a URL'\"\n server\n @submit=\"emit('execute')\"\n @update:modelValue=\"handlePathChange\" />\n <div class=\"fade-right\" />\n </div>\n\n <!-- Copy url button -->\n <ScalarButton\n class=\"hover:bg-b-3 mx-1\"\n size=\"xs\"\n variant=\"ghost\"\n @click=\"copyUrl\">\n <ScalarIconCopy />\n <span class=\"sr-only\">Copy URL</span>\n </ScalarButton>\n\n <AddressBarHistory\n :history=\"history\"\n :target=\"id\"\n @select:history:item=\"(payload) => emit('select:history:item', payload)\"\n @update:open=\"(value) => (isHistoryDropdownOpen = value)\" />\n <!-- Error message -->\n <div\n v-if=\"hasConflict\"\n class=\"absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6\">\n <div\n class=\"text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1\">\n <ScalarIconWarningCircle size=\"sm\" />\n <div class=\"min-w-0 flex-1\">\n A\n <em>{{ methodConflict?.toUpperCase() ?? method.toUpperCase() }}</em>\n request to\n <ScalarWrappingText :text=\"pathConflict ?? path\" />\n already exists in this document\n </div>\n </div>\n </div>\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold\"\n :disabled=\"isLoading\"\n @click=\"emit('execute')\">\n <span\n aria-hidden=\"true\"\n class=\"inline-flex items-center gap-1\">\n <ScalarIcon\n class=\"relative shrink-0 fill-current\"\n icon=\"Play\"\n size=\"xs\" />\n <span class=\"text-xxs hidden lg:flex\">Send</span>\n </span>\n <span class=\"sr-only\">\n Send {{ method }} request to {{ server?.url ?? '' }}{{ 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-width: 1px;\n outline-style: solid;\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;CAOE,MAAM;;;;;;;;;;;;;;EAsER,MAAM,OAAO;EAOb,MAAM,KAAK,OAAM;EACjB,MAAM,EAAE,YAAY,cAAc,aAAa,cAC7C,qBAAoB;;EAGtB,MAAM,QAAQ,gBAAgB;GAC5B,iBAAiB,uCAAuC,gBAAgB,QAAA,QAAQ,SAAS;GACzF,WAAW,gBAAgB,WAAW,MAAM;GAC7C,EAAC;EAEF,MAAM,eAAe,IAAmB,KAAI;EAC5C,MAAM,iBAAiB,IAA2B,KAAI;;EAGtD,MAAM,cAAc,eAAe,eAAe,SAAS,aAAa,MAAK;;EAG7E,MAAM,wBACJ,cACA,YAEA,gBACS;GACT,MAAM,WAAW,cAAc,OAAO,gBAAe;AACrD,WAAA,SAAS,KACP,+BACA;IACE,MAAM;KAAE,QAAK,QAAA;KAAG,MAAG,QAAA;KAAG;IACtB,SAAS;KAAE,QAAQ;KAAc,MAAM;KAAY;IACnD,WAAW,WAAW;AAEpB,SAAI,WAAW,aAAa,WAAW,aAAa;AAClD,qBAAe,QAAQ;AACvB,mBAAa,QAAQ;;AAEvB,SAAI,WAAW,UACb,SAAA,SAAS,KAAK,wBAAwB,EAAE,UAAU,CAAA;cAG3C,WAAW,YAAY;AAC9B,UAAI,iBAAiB,QAAA,OACnB,gBAAe,QAAQ;AAEzB,UAAI,eAA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A,MAAA,GAAA,CAAA,OAAA,CAAA;iDAAQ,qCAErD,GAAA;;IAGJ,YAiBe,MAAA,aAAA,EAAA;cAhBT;KAAJ,KAAI;KACJ,OAAM;KACL,UAAU,MAAA,UAAS;KACnB,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,UAAA;;4BASL,CARP,mBAQO,QARP,YAQO,CALL,YAGc,MAAA,WAAA,EAAA;MAFZ,OAAM;MACN,MAAK;MACL,MAAK;qCACP,mBAAiD,QAAA,EAA3C,OAAM,2BAAyB,EAAC,QAAI,GAAA,EAAA,CAAA,EAE5C,mBAEO,QAFP,YAAsB,WACf,gBAAG,QAAA,OAAM,GAAG,iBAAY,gBAAG,QAAA,QAAQ,OAAG,GAAA,GAAA,gBAAY,QAAA,KAAI,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"AddressBar.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * AddressBar component\n * This component is used to display the address bar for the operation block\n * It is used to display the path, method, server, and history for the operation\n */\nexport default {\n name: 'AddressBar',\n}\nexport type AddressBarProps = {\n /** Current request path */\n path: string\n /** Current request method */\n method: HttpMethodType\n /** Currently selected server */\n server: ServerObject | null\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** List of request history */\n history: History[]\n /** Client layout */\n layout: ClientLayout\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Environment */\n environment: XScalarEnvironment\n /** Meta information for the server */\n serverMeta: ServerMeta\n}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarIcon,\n ScalarWrappingText,\n} from '@scalar/components'\nimport { getSelector } from '@scalar/helpers/dom/get-selector'\nimport { REQUEST_METHODS } from '@scalar/helpers/http/http-info'\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport { extractServerFromPath } from '@scalar/helpers/url/extract-server-from-path'\nimport { ScalarIconCopy, ScalarIconWarningCircle } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport {\n getEnvironmentVariables,\n getResolvedUrl,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n} from 'vue'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { type ClientLayout } from '@/hooks'\nimport { useLoadingAnimation } from '@/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation'\nimport { CodeInput } from '@/v2/components/code-input'\nimport { ServerDropdown } from '@/v2/components/server'\n\nimport AddressBarHistory, { type History } from './AddressBarHistory.vue'\n\nconst {\n path,\n method,\n layout,\n eventBus,\n history,\n server,\n servers,\n environment,\n serverMeta,\n} = defineProps<AddressBarProps>()\n\nconst emit = defineEmits<{\n /** Execute the current operation example */\n (e: 'execute'): void\n /** Select a request history item by index */\n (e: 'select:history:item', payload: { index: number }): void\n}>()\n\nconst id = useId()\nconst { percentage, startLoading, stopLoading, isLoading } =\n useLoadingAnimation()\n\n/** Calculate the style for the address bar */\nconst style = computed(() => ({\n backgroundColor: `color-mix(in srgb, transparent 90%, ${REQUEST_METHODS[method].colorVar})`,\n transform: `translate3d(-${percentage.value}%,0,0)`,\n}))\n\nconst pathConflict = ref<string | null>(null)\nconst methodConflict = ref<HttpMethodType | null>(null)\n\n/** Whether there is a path or method conflict */\nconst hasConflict = computed(() => methodConflict.value || pathConflict.value)\n\n/** Check if the path contains a server URL, extract it, and select or add the server */\nconst checkForServer = (targetPath: string) => {\n const extracted = extractServerFromPath(targetPath)\n if (!extracted) {\n return targetPath\n }\n\n const [url, newPath] = extracted\n\n // Server is already selected — nothing to change\n if (url === server?.url) {\n return newPath\n }\n\n const matchingServer = servers.find((s) => s.url === url)\n\n // Select the server if it already exists in the list\n if (matchingServer) {\n eventBus.emit('server:update:selected', {\n url,\n meta: serverMeta,\n })\n }\n // Otherwise add it as a new operation-level server\n else {\n eventBus.emit('server:add:server', {\n url,\n select: true,\n meta: {\n type: 'operation',\n path,\n method,\n },\n })\n }\n\n return newPath\n}\n\n/** Emit the path/method update event with conflict handling */\nconst emitPathMethodUpdate = (\n targetMethod: HttpMethodType,\n targetPath: string,\n blurTargetSelector: string | null = null,\n): void => {\n const newPath = checkForServer(targetPath)\n const normalizedPath = newPath.startsWith('/') ? newPath : `/${newPath}`\n\n eventBus.emit('operation:update:pathMethod', {\n meta: { method, path },\n blurTargetSelector,\n payload: { method: targetMethod, path: normalizedPath },\n callback: (status, blurTargetSelector) => {\n // Clear conflicts if the operation was successful or no change was made\n if (status === 'success' || status === 'no-change') {\n methodConflict.value = null\n pathConflict.value = null\n }\n // Otherwise set the conflict if needed\n else if (status === 'conflict') {\n if (targetMethod !== method) {\n methodConflict.value = targetMethod\n }\n if (normalizedPath !== path) {\n pathConflict.value = normalizedPath\n }\n }\n\n // Edge case: pasting a full URL extracts the server but leaves the path unchanged.\n // The CodeMirror DOM still shows the full URL, so we force it back to just the path.\n if (\n status === 'no-change' &&\n addressBarRef.value?.codeMirrorRef?.textContent &&\n addressBarRef.value.codeMirrorRef.textContent !== newPath\n ) {\n addressBarRef.value.setCodeMirrorContent(newPath)\n }\n\n // Re-trigger the click or focus event if we have a blur target selector\n if (blurTargetSelector) {\n const element = document.querySelector(blurTargetSelector)\n\n // Re-trigger clicks on buttons\n if (element instanceof HTMLButtonElement) {\n element.click()\n }\n\n // Re-trigger focus on inputs and codeInputs\n else if (\n element instanceof HTMLInputElement ||\n element instanceof HTMLTextAreaElement ||\n (element instanceof HTMLElement &&\n element.getAttribute('contenteditable') === 'true')\n ) {\n element.focus()\n }\n }\n },\n })\n}\n\n/** Update the operation's HTTP method, handling conflicts */\nconst handleMethodChange = (newMethod: HttpMethodType): void =>\n emitPathMethodUpdate(newMethod, pathConflict.value ?? path)\n\n/**\n * Update the operation's path, handling conflicts also we extract the blur target selector to re-trigger click events\n *\n * We have special handling for the tab key to prevent it from triggering a click on the focused button\n */\nconst handlePathBlur = (newPath: string, event: FocusEvent): void => {\n const relatedTarget = event.relatedTarget as Element | null\n const blurTargetSelector = tabbedOut.value ? null : getSelector(relatedTarget)\n\n tabbedOut.value = false\n\n emitPathMethodUpdate(\n methodConflict.value ?? method,\n newPath,\n blurTargetSelector,\n )\n}\n\n/** Lets unset the server when backspace is pressed and the path is empty */\nconst handlePathBackspace = (event: KeyboardEvent): void => {\n if ((event.target as HTMLElement)?.innerText === '\\n') {\n eventBus.emit('server:update:selected', {\n url: '',\n meta: serverMeta,\n })\n }\n}\n\n/** Handle path submit (Enter key) — saves the path and triggers execution via blurTargetSelector */\nconst handlePathSubmit = (\n newPath: string,\n event: KeyboardEvent | FocusEvent,\n): void => {\n // Prevent the global hotkey listener\n event.stopPropagation()\n\n emitPathMethodUpdate(\n methodConflict.value ?? method,\n newPath,\n '[data-addressbar-action=\"send\"]',\n )\n}\n\n/** Handle focus events */\nconst sendButtonRef = useTemplateRef('sendButtonRef')\nconst addressBarRef = useTemplateRef('addressBarRef')\nconst tabbedOut = ref(false)\nconst handleFocusSendButton = () => sendButtonRef.value?.$el?.focus()\n\nconst handleFocusAddressBar = (\n payload: ApiReferenceEvents['ui:focus:address-bar'],\n) => {\n // If it already has focus we just propagate native behavior which should focus the browser address bar\n if (addressBarRef.value?.isFocused && layout !== 'desktop') {\n return\n }\n\n addressBarRef.value?.focus('end')\n\n if (payload && 'event' in payload) {\n payload.event.preventDefault()\n }\n}\n\nonMounted(() => {\n eventBus.on('ui:focus:address-bar', handleFocusAddressBar)\n eventBus.on('ui:focus:send-button', handleFocusSendButton)\n eventBus.on('copy-url:address-bar', copyUrl)\n eventBus.on('hooks:on:request:sent', startLoading)\n eventBus.on('hooks:on:request:complete', stopLoading)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('ui:focus:address-bar', handleFocusAddressBar)\n eventBus.off('ui:focus:send-button', handleFocusSendButton)\n eventBus.off('copy-url:address-bar', copyUrl)\n eventBus.off('hooks:on:request:sent', startLoading)\n eventBus.off('hooks:on:request:complete', stopLoading)\n\n // Stop the animation when the component is unmounted\n // This is to prevent the animation from continuing after the component is unmounted\n stopLoading()\n})\n\nconst { copyToClipboard } = useClipboard()\n\n/** Copy the resolved URL with the environment variables to the clipboard */\nconst copyUrl = async () => {\n const resolvedUrl = getResolvedUrl({ server, path })\n const environmentVariables = getEnvironmentVariables(environment)\n const resolvedUrlWithEnvVars = replaceEnvVariables(\n resolvedUrl,\n environmentVariables,\n )\n await copyToClipboard(resolvedUrlWithEnvVars)\n}\n\nconst isServerDropdownOpen = ref(false)\nconst isHistoryDropdownOpen = ref(false)\n\n/** Whether either dropdown is open */\nconst isDropdownOpen = computed(\n () => isServerDropdownOpen.value || isHistoryDropdownOpen.value,\n)\n\nconst navigateToServersPage = () => {\n if (serverMeta.type === 'operation') {\n return eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'servers',\n operationPath: serverMeta.path,\n method: serverMeta.method,\n })\n }\n return eventBus.emit('ui:navigate', {\n page: 'document',\n path: 'servers',\n })\n}\n\ndefineExpose({\n methodConflict,\n pathConflict,\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-0 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 :class=\"{\n 'outline-c-danger outline': hasConflict,\n 'rounded-b-none': isDropdownOpen,\n }\">\n <div\n class=\"pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border\"\n :class=\"{\n 'rounded-b-none': isDropdownOpen,\n }\">\n <div\n class=\"absolute top-0 left-0 h-full w-full\"\n :style />\n </div>\n <div class=\"flex gap-1\">\n <HttpMethod\n :isEditable=\"layout !== 'modal'\"\n isSquare\n :method=\"methodConflict ?? method\"\n teleport\n @change=\"handleMethodChange\" />\n </div>\n\n <div\n class=\"scroll-timeline-x scroll-timeline-x-hidden relative flex w-full bg-blend-normal\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"servers.length\"\n :layout=\"layout\"\n :meta=\"serverMeta\"\n :server=\"server\"\n :servers=\"servers\"\n :target=\"id\"\n @update:open=\"(value) => (isServerDropdownOpen = value)\"\n @update:selectedServer=\"\n (payload) => eventBus.emit('server:update:selected', payload)\n \"\n @update:servers=\"navigateToServersPage\"\n @update:variable=\"\n (payload) => eventBus.emit('server:update:variables', payload)\n \" />\n\n <div class=\"fade-left\" />\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n alwaysEmitChange\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 :environment=\"environment\"\n importCurl\n :layout=\"layout\"\n :modelValue=\"path\"\n :placeholder=\"server ? '' : 'Enter a URL'\"\n server\n @blur=\"handlePathBlur\"\n @keydown.delete=\"handlePathBackspace\"\n @keydown.tab=\"tabbedOut = true\"\n @submit=\"handlePathSubmit\" />\n <div class=\"fade-right\" />\n </div>\n\n <!-- Copy url button -->\n <ScalarButton\n class=\"hover:bg-b-3 mx-1\"\n size=\"xs\"\n variant=\"ghost\"\n @click=\"copyUrl\">\n <ScalarIconCopy />\n <span class=\"sr-only\">Copy URL</span>\n </ScalarButton>\n\n <AddressBarHistory\n :history=\"history\"\n :target=\"id\"\n @select:history:item=\"(payload) => emit('select:history:item', payload)\"\n @update:open=\"(value) => (isHistoryDropdownOpen = value)\" />\n <!-- Error message -->\n <div\n v-if=\"hasConflict\"\n class=\"z-context absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6\">\n <div\n class=\"text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1\">\n <ScalarIconWarningCircle size=\"sm\" />\n <div class=\"min-w-0 flex-1\">\n A\n <em>{{ methodConflict?.toUpperCase() ?? method.toUpperCase() }}</em>\n request to\n <ScalarWrappingText :text=\"pathConflict ?? path\" />\n already exists in this document\n </div>\n </div>\n </div>\n\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold\"\n data-addressbar-action=\"send\"\n :disabled=\"isLoading\"\n @click=\"emit('execute')\">\n <span\n aria-hidden=\"true\"\n class=\"inline-flex items-center gap-1\">\n <ScalarIcon\n class=\"relative shrink-0 fill-current\"\n icon=\"Play\"\n size=\"xs\" />\n <span class=\"text-xxs hidden lg:flex\">Send</span>\n </span>\n <span class=\"sr-only\">\n Send {{ method }} request to {{ server?.url ?? '' }}{{ 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-width: 1px;\n outline-style: solid;\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOE,MAAM;;;;;;;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1 +1 @@
1
- {"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue"],"names":[],"mappings":"AAoHA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AASrF,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,OAAO,EAAE,OAAO,EAAE,CAAA;CACnB,CAAC;AAyRF,QAAA,MAAM,YAAY;;;eAnR6B,MAAM;;;;;eAAN,MAAM;;kFAsRnD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue"],"names":[],"mappings":"AAqHA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAQrF,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,OAAO,EAAE,OAAO,EAAE,CAAA;CACnB,CAAC;AAyRF,QAAA,MAAM,YAAY;;;eAnR6B,MAAM;;;;;eAAN,MAAM;;kFAsRnD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
2
2
  import AddressBarHistory_vue_vue_type_script_setup_true_lang_default from "./AddressBarHistory.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue
5
- var AddressBarHistory_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AddressBarHistory_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-c15c6573"]]);
5
+ var AddressBarHistory_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AddressBarHistory_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-5b995586"]]);
6
6
  //#endregion
7
7
  export { AddressBarHistory_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBarHistory.vue.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue"],"sourcesContent":["<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 { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { formatMs } from '@/libs/formatters'\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\n\nimport { getStatusCodeColor } from './httpStatusCodeColors'\n\nexport type History = {\n method: HttpMethodType\n path: string\n duration: number\n status: number\n}\n\nconst { target } = defineProps<{\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** List of all request history items */\n history: History[]\n}>()\n\nconst emits = defineEmits<{\n /** Select a request history item by index */\n (e: 'select:history:item', payload: { index: number }): void\n /** Update the open state of the history popover */\n (e: 'update:open', value: boolean): void\n}>()\n</script>\n<template>\n <Menu\n v-slot=\"{ open }\"\n as=\"div\">\n <!-- Emit the slot value back out the parent -->\n <ValueEmitter\n :value=\"open\"\n @change=\"(value) => emits('update:open', value)\"\n @unmount=\"emits('update:open', false)\" />\n\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 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 p-0.75\"\n static\n :style=\"{ width }\">\n <MenuItem\n v-for=\"(entry, index) in history\"\n :key=\"index\"\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=\"emits('select:history:item', { index })\">\n <HttpMethod\n class=\"text-[11px]\"\n :method=\"entry.method\" />\n <div class=\"min-w-0\">\n <div class=\"text-c-1 min-w-0 truncate\">\n {{ entry.path }}\n </div>\n </div>\n <div>{{ formatMs(entry.duration) }}</div>\n <div :class=\"[getStatusCodeColor(entry.status).color]\">\n {{ entry.status }}\n </div>\n <div>\n {{ httpStatusCodes[entry.status]?.name }}\n </div>\n </MenuItem>\n </MenuItems>\n <ScalarFloatingBackdrop class=\"inset-x-px rounded-none rounded-b-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"],"mappings":""}
1
+ {"version":3,"file":"AddressBarHistory.vue.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n ScalarIcon,\n} from '@scalar/components'\nimport { formatMilliseconds } from '@scalar/helpers/formatters/format-milliseconds'\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\n\nimport { getStatusCodeColor } from './httpStatusCodeColors'\n\nexport type History = {\n method: HttpMethodType\n path: string\n duration: number\n status: number\n}\n\nconst { target } = defineProps<{\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** List of all request history items */\n history: History[]\n}>()\n\nconst emits = defineEmits<{\n /** Select a request history item by index */\n (e: 'select:history:item', payload: { index: number }): void\n /** Update the open state of the history popover */\n (e: 'update:open', value: boolean): void\n}>()\n</script>\n<template>\n <Menu\n v-slot=\"{ open }\"\n as=\"div\">\n <!-- Emit the slot value back out the parent -->\n <ValueEmitter\n :value=\"open\"\n @change=\"(value) => emits('update:open', value)\"\n @unmount=\"emits('update:open', false)\" />\n\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 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 p-0.75\"\n static\n :style=\"{ width }\">\n <MenuItem\n v-for=\"(entry, index) in history\"\n :key=\"index\"\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=\"emits('select:history:item', { index })\">\n <HttpMethod\n class=\"text-[11px]\"\n :method=\"entry.method\" />\n <div class=\"min-w-0\">\n <div class=\"text-c-1 min-w-0 truncate\">\n {{ entry.path }}\n </div>\n </div>\n <div>{{ formatMilliseconds(entry.duration) }}</div>\n <div :class=\"[getStatusCodeColor(entry.status).color]\">\n {{ entry.status }}\n </div>\n <div>\n {{ httpStatusCodes[entry.status]?.name }}\n </div>\n </MenuItem>\n </MenuItems>\n <ScalarFloatingBackdrop class=\"inset-x-px rounded-none rounded-b-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"],"mappings":""}
@@ -1,4 +1,3 @@
1
- import { formatMs } from "../../../../libs/formatters.js";
2
1
  import HttpMethod_default from "../../../../components/HttpMethod/HttpMethod.vue.js";
3
2
  import ValueEmitter_default from "../../../components/layout/ValueEmitter.vue.js";
4
3
  import { getStatusCodeColor } from "./httpStatusCodeColors.js";
@@ -6,6 +5,7 @@ import { Fragment, createBlock, createCommentVNode, createElementBlock, createEl
6
5
  import { ScalarFloating, ScalarFloatingBackdrop, ScalarIcon } from "@scalar/components";
7
6
  import { httpStatusCodes } from "@scalar/oas-utils/helpers";
8
7
  import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/vue";
8
+ import { formatMilliseconds } from "@scalar/helpers/formatters/format-milliseconds";
9
9
  //#region src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue?vue&type=script&setup=true&lang.ts
10
10
  var _hoisted_1 = { class: "min-w-0" };
11
11
  var _hoisted_2 = { class: "text-c-1 min-w-0 truncate" };
@@ -62,7 +62,7 @@ var AddressBarHistory_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
62
62
  method: entry.method
63
63
  }, null, 8, ["method"]),
64
64
  createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, toDisplayString(entry.path), 1)]),
65
- createElementVNode("div", null, toDisplayString(unref(formatMs)(entry.duration)), 1),
65
+ createElementVNode("div", null, toDisplayString(unref(formatMilliseconds)(entry.duration)), 1),
66
66
  createElementVNode("div", { class: normalizeClass([unref(getStatusCodeColor)(entry.status).color]) }, toDisplayString(entry.status), 3),
67
67
  createElementVNode("div", null, toDisplayString(unref(httpStatusCodes)[entry.status]?.name), 1)
68
68
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBarHistory.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue"],"sourcesContent":["<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 { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { formatMs } from '@/libs/formatters'\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\n\nimport { getStatusCodeColor } from './httpStatusCodeColors'\n\nexport type History = {\n method: HttpMethodType\n path: string\n duration: number\n status: number\n}\n\nconst { target } = defineProps<{\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** List of all request history items */\n history: History[]\n}>()\n\nconst emits = defineEmits<{\n /** Select a request history item by index */\n (e: 'select:history:item', payload: { index: number }): void\n /** Update the open state of the history popover */\n (e: 'update:open', value: boolean): void\n}>()\n</script>\n<template>\n <Menu\n v-slot=\"{ open }\"\n as=\"div\">\n <!-- Emit the slot value back out the parent -->\n <ValueEmitter\n :value=\"open\"\n @change=\"(value) => emits('update:open', value)\"\n @unmount=\"emits('update:open', false)\" />\n\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 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 p-0.75\"\n static\n :style=\"{ width }\">\n <MenuItem\n v-for=\"(entry, index) in history\"\n :key=\"index\"\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=\"emits('select:history:item', { index })\">\n <HttpMethod\n class=\"text-[11px]\"\n :method=\"entry.method\" />\n <div class=\"min-w-0\">\n <div class=\"text-c-1 min-w-0 truncate\">\n {{ entry.path }}\n </div>\n </div>\n <div>{{ formatMs(entry.duration) }}</div>\n <div :class=\"[getStatusCodeColor(entry.status).color]\">\n {{ entry.status }}\n </div>\n <div>\n {{ httpStatusCodes[entry.status]?.name }}\n </div>\n </MenuItem>\n </MenuItems>\n <ScalarFloatingBackdrop class=\"inset-x-px rounded-none rounded-b-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"],"mappings":";;;;;;;;;;;;;;;;;;;EA8BA,MAAM,QAAQ;;uBAQZ,YA2DO,MAAA,KAAA,EAAA,EAzDL,IAAG,OAAK,EAAA;sBAKmC,EANjC,WAAI,CAGd,YAG2C,sBAAA;KAFxC,OAAO;KACP,UAAM,OAAA,OAAA,OAAA,MAAG,UAAU,MAAK,eAAgB,MAAK;KAC7C,WAAO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M,wCAAsC,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"AddressBarHistory.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n ScalarIcon,\n} from '@scalar/components'\nimport { formatMilliseconds } from '@scalar/helpers/formatters/format-milliseconds'\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\n\nimport { getStatusCodeColor } from './httpStatusCodeColors'\n\nexport type History = {\n method: HttpMethodType\n path: string\n duration: number\n status: number\n}\n\nconst { target } = defineProps<{\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** List of all request history items */\n history: History[]\n}>()\n\nconst emits = defineEmits<{\n /** Select a request history item by index */\n (e: 'select:history:item', payload: { index: number }): void\n /** Update the open state of the history popover */\n (e: 'update:open', value: boolean): void\n}>()\n</script>\n<template>\n <Menu\n v-slot=\"{ open }\"\n as=\"div\">\n <!-- Emit the slot value back out the parent -->\n <ValueEmitter\n :value=\"open\"\n @change=\"(value) => emits('update:open', value)\"\n @unmount=\"emits('update:open', false)\" />\n\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 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 p-0.75\"\n static\n :style=\"{ width }\">\n <MenuItem\n v-for=\"(entry, index) in history\"\n :key=\"index\"\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=\"emits('select:history:item', { index })\">\n <HttpMethod\n class=\"text-[11px]\"\n :method=\"entry.method\" />\n <div class=\"min-w-0\">\n <div class=\"text-c-1 min-w-0 truncate\">\n {{ entry.path }}\n </div>\n </div>\n <div>{{ formatMilliseconds(entry.duration) }}</div>\n <div :class=\"[getStatusCodeColor(entry.status).color]\">\n {{ entry.status }}\n </div>\n <div>\n {{ httpStatusCodes[entry.status]?.name }}\n </div>\n </MenuItem>\n </MenuItems>\n <ScalarFloatingBackdrop class=\"inset-x-px rounded-none rounded-b-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"],"mappings":";;;;;;;;;;;;;;;;;;;EA8BA,MAAM,QAAQ;;uBAQZ,YA2DO,MAAA,KAAA,EAAA,EAzDL,IAAG,OAAK,EAAA;sBAKmC,EANjC,WAAI,CAGd,YAG2C,sBAAA;KAFxC,OAAO;KACP,UAAM,OAAA,OAAA,OAAA,MAAG,UAAU,MAAK,eAAgB,MAAK;KAC7C,WAAO,OAAA,OAAA,OAAA,MAAA,WAAE,MAAK,eAAA,MAAA;4BAEjB,YAiDiB,MAAA,eAAA,EAAA;KAhDd,QAAQ;KACT,QAAA;KACC,QAAQ,QAAA;;4BAUI,CAPL,QAAA,QAAQ,UAAA,WAAA,EADhB,YAQa,MAAA,WAAA,EAAA;;MANX,OAAM;;6BAIe,CAHrB,YAGqB,MAAA,WAAA,EAAA;OAFnB,MAAK;OACL,MAAK;OACL,WAAU;oCACZ,mBAA4C,QAAA,EAAtC,OAAM,WAAS,EAAC,mBAAe,GAAA,EAAA,CAAA;;;;QAI/B,OAAA;WACL;kBA6BW,EA7BC,YAAK,CAElB,YA2BY,MAAA,UAAA,EAAA;MA1BV,OAAM;MACN,QAAA;MACC,OAAK,eAAA,EAAI,OAAK,CAAA;;6BAEoB,EAAA,UAAA,KAAA,EADnC,mBAsBW,UAAA,MAAA,WArBgB,QAAA,UAAjB,OAAO,UAAK;2BADtB,YAsBW,MAAA,SAAA,EAAA;QApBR,KAAK;QACN,IAAG;QACH,OAAM;QACL,OAAO;QACP,UAAK,WAAE,MAAK,uBAAA,EAA0B,OAAK,CAAA;;+BAGjB;SAF3B,YAE2B,MAAA,mBAAA,EAAA;UADzB,OAAM;UACL,QAAQ,MAAM;;SACjB,mBAIM,OAJN,YAIM,CAHJ,mBAEM,OAFN,YAEM,gBADD,MAAM,KAAI,EAAA,EAAA,CAAA,CAAA;SAGjB,mBAAmD,OAAA,MAAA,gBAA3C,MAAA,mBAAkB,CAAC,MAAM,SAAQ,CAAA,EAAA,EAAA;SACzC,mBAEM,OAAA,EAFA,OAAK,eAAA,CAAG,MAAA,mBAAkB,CAAC,MAAM,OAAM,CAAE,MAAK,CAAA,EAAA,EAAA,gBAC/C,MAAM,OAAM,EAAA,EAAA;SAEjB,mBAEM,OAAA,MAAA,gBADD,MAAA,gBAAe,CAAC,MAAM,SAAS,KAAI,EAAA,EAAA;;;;;;uBAI5C,YAAuE,MAAA,uBAAA,EAAA,EAA/C,OAAM,wCAAsC,CAAA,CAAA,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import { type Icon } from '@scalar/components';
2
2
  import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth';
3
3
  import type { AuthMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
4
+ import { type MergedSecuritySchemes } from '@scalar/workspace-store/request-example';
4
5
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
5
6
  import type { OpenApiDocument, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
6
- import type { MergedSecuritySchemes } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/merge-security.js';
7
7
  import { type SecuritySchemeOption } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js';
8
8
  type __VLS_Props = {
9
9
  environment: XScalarEnvironment;
@@ -1 +1 @@
1
- {"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AA2TA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAA;AAC1G,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,gEAAgE;IAChE,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,kEAAkE;IAClE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,qBAAqB,CAAA;IACtC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC9C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AA+eF,QAAA,MAAM,YAAY;;cA9cqB,IAAI;cAAQ,MAAM;;;;oPAidvD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AA6TA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,yCAAyC,CAAA;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAIrE,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,gEAAgE;IAChE,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,kEAAkE;IAClE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,qBAAqB,CAAA;IACtC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC9C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AA+eF,QAAA,MAAM,YAAY;;cA9cqB,IAAI;cAAQ,MAAM;;;;oPAidvD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}