@scalar/api-client 3.23.2 → 3.23.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (532) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/assets/{computer.ascii.virtual.js → computer.ascii_raw.js} +1 -1
  3. package/dist/assets/computer.ascii_raw.js.map +1 -0
  4. package/dist/components/HelpfulLink.vue.js +1 -1
  5. package/dist/components/HelpfulLink.vue.js.map +1 -1
  6. package/dist/components/{HelpfulLink.vue.script.js → HelpfulLink.vue_vue_type_script_setup_true_lang.js} +1 -1
  7. package/dist/components/HelpfulLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
  8. package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
  9. package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -1
  10. package/dist/components/HttpMethod/{HttpMethod.vue.script.js → HttpMethod.vue_vue_type_script_setup_true_lang.js} +1 -1
  11. package/dist/components/HttpMethod/HttpMethod.vue_vue_type_script_setup_true_lang.js.map +1 -0
  12. package/dist/components/HttpMethod/index.js +1 -2
  13. package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js +2 -2
  14. package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js.map +1 -1
  15. package/dist/components/ScalarAsciiArt/{ScalarAsciiArt.vue.script.js → ScalarAsciiArt.vue_vue_type_script_setup_true_lang.js} +1 -1
  16. package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue_vue_type_script_setup_true_lang.js.map +1 -0
  17. package/dist/components/ScalarAsciiArt/index.js +1 -2
  18. package/dist/components/SectionFilter.vue.js +2 -2
  19. package/dist/components/SectionFilter.vue.js.map +1 -1
  20. package/dist/components/{SectionFilter.vue.script.js → SectionFilter.vue_vue_type_script_setup_true_lang.js} +1 -1
  21. package/dist/components/SectionFilter.vue_vue_type_script_setup_true_lang.js.map +1 -0
  22. package/dist/components/SectionFilterButton.vue.js +1 -1
  23. package/dist/components/SectionFilterButton.vue.js.map +1 -1
  24. package/dist/components/{SectionFilterButton.vue.script.js → SectionFilterButton.vue_vue_type_script_setup_true_lang.js} +1 -1
  25. package/dist/components/SectionFilterButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  26. package/dist/components/Server/ServerVariablesForm.vue.d.ts +13 -2
  27. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
  28. package/dist/components/Server/ServerVariablesForm.vue.js +1 -1
  29. package/dist/components/Server/ServerVariablesForm.vue.js.map +1 -1
  30. package/dist/components/Server/{ServerVariablesForm.vue.script.js → ServerVariablesForm.vue_vue_type_script_setup_true_lang.js} +19 -7
  31. package/dist/components/Server/ServerVariablesForm.vue_vue_type_script_setup_true_lang.js.map +1 -0
  32. package/dist/components/Server/ServerVariablesSelect.vue.d.ts +2 -0
  33. package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
  34. package/dist/components/Server/ServerVariablesSelect.vue.js +1 -1
  35. package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -1
  36. package/dist/components/Server/{ServerVariablesSelect.vue.script.js → ServerVariablesSelect.vue_vue_type_script_setup_true_lang.js} +5 -3
  37. package/dist/components/Server/ServerVariablesSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  38. package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -1
  39. package/dist/components/Server/ServerVariablesTextbox.vue.js.map +1 -1
  40. package/dist/components/Server/{ServerVariablesTextbox.vue.script.js → ServerVariablesTextbox.vue_vue_type_script_setup_true_lang.js} +1 -1
  41. package/dist/components/Server/ServerVariablesTextbox.vue_vue_type_script_setup_true_lang.js.map +1 -0
  42. package/dist/components/Server/index.js +1 -2
  43. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +1 -1
  44. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js.map +1 -1
  45. package/dist/components/Sidebar/Actions/{DeleteSidebarListElement.vue.script.js → DeleteSidebarListElement.vue_vue_type_script_setup_true_lang.js} +1 -1
  46. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue_vue_type_script_setup_true_lang.js.map +1 -0
  47. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
  48. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -1
  49. package/dist/components/Sidebar/Actions/{SidebarListElementForm.vue.script.js → SidebarListElementForm.vue_vue_type_script_setup_true_lang.js} +1 -1
  50. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue_vue_type_script_setup_true_lang.js.map +1 -0
  51. package/dist/components/Sidebar/index.js +1 -2
  52. package/dist/components/ViewLayout/ViewLayout.vue.js +1 -1
  53. package/dist/components/ViewLayout/ViewLayout.vue.js.map +1 -1
  54. package/dist/components/ViewLayout/{ViewLayout.vue.script.js → ViewLayout.vue_vue_type_script_setup_true_lang.js} +1 -1
  55. package/dist/components/ViewLayout/ViewLayout.vue_vue_type_script_setup_true_lang.js.map +1 -0
  56. package/dist/components/ViewLayout/ViewLayoutContent.vue.js.map +1 -1
  57. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
  58. package/dist/components/ViewLayout/ViewLayoutSection.vue.js.map +1 -1
  59. package/dist/components/ViewLayout/{ViewLayoutSection.vue.script.js → ViewLayoutSection.vue_vue_type_script_setup_true_lang.js} +1 -1
  60. package/dist/components/ViewLayout/ViewLayoutSection.vue_vue_type_script_setup_true_lang.js.map +1 -0
  61. package/dist/style.css +137 -107
  62. package/dist/types/index.d.ts +2 -2
  63. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +2 -2
  64. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +1 -1
  65. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  66. package/dist/v2/blocks/operation-block/{OperationBlock.vue.script.js → OperationBlock.vue_vue_type_script_setup_true_lang.js} +3 -2
  67. package/dist/v2/blocks/operation-block/{OperationBlock.vue.script.js.map → OperationBlock.vue_vue_type_script_setup_true_lang.js.map} +1 -1
  68. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
  69. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
  70. package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
  71. package/dist/v2/blocks/operation-block/components/{Header.vue.script.js → Header.vue_vue_type_script_setup_true_lang.js} +1 -1
  72. package/dist/v2/blocks/operation-block/components/Header.vue_vue_type_script_setup_true_lang.js.map +1 -0
  73. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +2 -2
  74. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
  75. package/dist/v2/blocks/operation-block/components/{OpenApiClientButton.vue.script.js → OpenApiClientButton.vue_vue_type_script_setup_true_lang.js} +1 -1
  76. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  77. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
  78. package/dist/v2/blocks/operation-block/helpers/response-cache.d.ts +1 -1
  79. package/dist/v2/blocks/operation-block/helpers/send-request.js +2 -1
  80. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  81. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +2 -2
  82. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  83. package/dist/v2/blocks/request-block/RequestBlock.vue.js +3 -3
  84. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  85. package/dist/v2/blocks/request-block/{RequestBlock.vue.script.js → RequestBlock.vue_vue_type_script_setup_true_lang.js} +4 -3
  86. package/dist/v2/blocks/request-block/RequestBlock.vue_vue_type_script_setup_true_lang.js.map +1 -0
  87. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  88. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  89. package/dist/v2/blocks/request-block/components/{RequestBody.vue.script.js → RequestBody.vue_vue_type_script_setup_true_lang.js} +9 -2
  90. package/dist/v2/blocks/request-block/components/RequestBody.vue_vue_type_script_setup_true_lang.js.map +1 -0
  91. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +1 -1
  92. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js.map +1 -1
  93. package/dist/v2/blocks/request-block/components/{RequestBodyForm.vue.script.js → RequestBodyForm.vue_vue_type_script_setup_true_lang.js} +1 -1
  94. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue_vue_type_script_setup_true_lang.js.map +1 -0
  95. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js +1 -1
  96. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js.map +1 -1
  97. package/dist/v2/blocks/request-block/components/{RequestBodyStructured.vue.script.js → RequestBodyStructured.vue_vue_type_script_setup_true_lang.js} +1 -1
  98. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue_vue_type_script_setup_true_lang.js.map +1 -0
  99. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js +1 -1
  100. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js.map +1 -1
  101. package/dist/v2/blocks/request-block/components/{RequestBodyViewToggle.vue.script.js → RequestBodyViewToggle.vue_vue_type_script_setup_true_lang.js} +1 -1
  102. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue_vue_type_script_setup_true_lang.js.map +1 -0
  103. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +1 -1
  104. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
  105. package/dist/v2/blocks/request-block/components/{RequestCodeSnippet.vue.script.js → RequestCodeSnippet.vue_vue_type_script_setup_true_lang.js} +1 -1
  106. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue_vue_type_script_setup_true_lang.js.map +1 -0
  107. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +1 -1
  108. package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
  109. package/dist/v2/blocks/request-block/components/{RequestParams.vue.script.js → RequestParams.vue_vue_type_script_setup_true_lang.js} +1 -1
  110. package/dist/v2/blocks/request-block/components/RequestParams.vue_vue_type_script_setup_true_lang.js.map +1 -0
  111. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
  112. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +2 -2
  113. package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
  114. package/dist/v2/blocks/request-block/components/{RequestTable.vue.script.js → RequestTable.vue_vue_type_script_setup_true_lang.js} +1 -1
  115. package/dist/v2/blocks/request-block/components/RequestTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  116. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +1 -1
  117. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  118. package/dist/v2/blocks/request-block/components/{RequestTableRow.vue.script.js → RequestTableRow.vue_vue_type_script_setup_true_lang.js} +1 -1
  119. package/dist/v2/blocks/request-block/components/RequestTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -0
  120. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -1
  121. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
  122. package/dist/v2/blocks/request-block/components/{RequestTableTooltip.vue.script.js → RequestTableTooltip.vue_vue_type_script_setup_true_lang.js} +1 -1
  123. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -0
  124. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
  125. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +2 -1
  126. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js.map +1 -1
  127. package/dist/v2/blocks/request-block/helpers/fold-structured-body-rows.d.ts +1 -1
  128. package/dist/v2/blocks/request-block/helpers/fold-structured-body-rows.js +2 -1
  129. package/dist/v2/blocks/request-block/helpers/fold-structured-body-rows.js.map +1 -1
  130. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
  131. package/dist/v2/blocks/request-block/helpers/get-structured-body-rows.d.ts +1 -1
  132. package/dist/v2/blocks/request-block/helpers/structured-body-codec.js.map +1 -1
  133. package/dist/v2/blocks/request-block/index.js +1 -2
  134. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +2 -2
  135. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +2 -2
  136. package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
  137. package/dist/v2/blocks/response-block/{ResponseBlock.vue.script.js → ResponseBlock.vue_vue_type_script_setup_true_lang.js} +1 -1
  138. package/dist/v2/blocks/response-block/ResponseBlock.vue_vue_type_script_setup_true_lang.js.map +1 -0
  139. package/dist/v2/blocks/response-block/components/Headers.vue.js +1 -1
  140. package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -1
  141. package/dist/v2/blocks/response-block/components/{Headers.vue.script.js → Headers.vue_vue_type_script_setup_true_lang.js} +1 -1
  142. package/dist/v2/blocks/response-block/components/Headers.vue_vue_type_script_setup_true_lang.js.map +1 -0
  143. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +2 -2
  144. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
  145. package/dist/v2/blocks/response-block/components/{ResponseBody.vue.script.js → ResponseBody.vue_vue_type_script_setup_true_lang.js} +1 -1
  146. package/dist/v2/blocks/response-block/components/ResponseBody.vue_vue_type_script_setup_true_lang.js.map +1 -0
  147. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +1 -1
  148. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
  149. package/dist/v2/blocks/response-block/components/{ResponseBodyDownload.vue.script.js → ResponseBodyDownload.vue_vue_type_script_setup_true_lang.js} +1 -1
  150. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue_vue_type_script_setup_true_lang.js.map +1 -0
  151. package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js.map +1 -1
  152. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
  153. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +2 -2
  154. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
  155. package/dist/v2/blocks/response-block/components/{ResponseBodyPreview.vue.script.js → ResponseBodyPreview.vue_vue_type_script_setup_true_lang.js} +1 -1
  156. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue_vue_type_script_setup_true_lang.js.map +1 -0
  157. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +2 -2
  158. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js.map +1 -1
  159. package/dist/v2/blocks/response-block/components/{ResponseBodyRaw.vue.script.js → ResponseBodyRaw.vue_vue_type_script_setup_true_lang.js} +1 -1
  160. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue_vue_type_script_setup_true_lang.js.map +1 -0
  161. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +1 -1
  162. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js.map +1 -1
  163. package/dist/v2/blocks/response-block/components/{ResponseBodyStreaming.vue.script.js → ResponseBodyStreaming.vue_vue_type_script_setup_true_lang.js} +2 -2
  164. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue_vue_type_script_setup_true_lang.js.map +1 -0
  165. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +1 -1
  166. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js.map +1 -1
  167. package/dist/v2/blocks/response-block/components/{ResponseBodyToggle.vue.script.js → ResponseBodyToggle.vue_vue_type_script_setup_true_lang.js} +1 -1
  168. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue_vue_type_script_setup_true_lang.js.map +1 -0
  169. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js +2 -2
  170. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
  171. package/dist/v2/blocks/response-block/components/{ResponseBodyVirtual.vue.script.js → ResponseBodyVirtual.vue_vue_type_script_setup_true_lang.js} +1 -1
  172. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue_vue_type_script_setup_true_lang.js.map +1 -0
  173. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -1
  174. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
  175. package/dist/v2/blocks/response-block/components/{ResponseCookies.vue.script.js → ResponseCookies.vue_vue_type_script_setup_true_lang.js} +1 -1
  176. package/dist/v2/blocks/response-block/components/ResponseCookies.vue_vue_type_script_setup_true_lang.js.map +1 -0
  177. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
  178. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -2
  179. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
  180. package/dist/v2/blocks/response-block/components/{ResponseEmpty.vue.script.js → ResponseEmpty.vue_vue_type_script_setup_true_lang.js} +2 -2
  181. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue_vue_type_script_setup_true_lang.js.map +1 -0
  182. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -2
  183. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
  184. package/dist/v2/blocks/response-block/components/{ResponseLoadingOverlay.vue.script.js → ResponseLoadingOverlay.vue_vue_type_script_setup_true_lang.js} +1 -1
  185. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue_vue_type_script_setup_true_lang.js.map +1 -0
  186. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts +1 -1
  187. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +1 -1
  188. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -1
  189. package/dist/v2/blocks/response-block/components/{ResponseMetaInformation.vue.script.js → ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js} +1 -1
  190. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js.map +1 -0
  191. package/dist/v2/blocks/response-block/helpers/get-content-length.d.ts +1 -1
  192. package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -1
  193. package/dist/v2/blocks/response-block/helpers/process-response-body.js.map +1 -1
  194. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js +1 -1
  195. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js.map +1 -1
  196. package/dist/v2/blocks/response-block/helpers/response-stream.js +1 -1
  197. package/dist/v2/blocks/response-block/helpers/response-stream.js.map +1 -1
  198. package/dist/v2/blocks/response-block/index.js +1 -2
  199. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +1 -1
  200. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  201. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  202. package/dist/v2/blocks/scalar-address-bar-block/components/{AddressBar.vue.script.js → AddressBar.vue_vue_type_script_setup_true_lang.js} +1 -1
  203. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  204. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +2 -2
  205. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
  206. package/dist/v2/blocks/scalar-address-bar-block/components/{AddressBarHistory.vue.script.js → AddressBarHistory.vue_vue_type_script_setup_true_lang.js} +1 -1
  207. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue_vue_type_script_setup_true_lang.js.map +1 -0
  208. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +1 -1
  209. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -1
  210. package/dist/v2/blocks/scalar-address-bar-block/components/{EnvironmentSelector.vue.script.js → EnvironmentSelector.vue_vue_type_script_setup_true_lang.js} +1 -1
  211. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue_vue_type_script_setup_true_lang.js.map +1 -0
  212. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js.map +1 -1
  213. package/dist/v2/blocks/scalar-address-bar-block/index.js +1 -2
  214. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
  215. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  216. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
  217. package/dist/v2/blocks/scalar-auth-selector-block/components/{AuthSelector.vue.script.js → AuthSelector.vue_vue_type_script_setup_true_lang.js} +1 -1
  218. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue_vue_type_script_setup_true_lang.js.map +1 -0
  219. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +1 -1
  220. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js.map +1 -1
  221. package/dist/v2/blocks/scalar-auth-selector-block/components/{DeleteRequestAuthModal.vue.script.js → DeleteRequestAuthModal.vue_vue_type_script_setup_true_lang.js} +1 -1
  222. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
  223. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  224. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +1 -1
  225. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  226. package/dist/v2/blocks/scalar-auth-selector-block/components/{OAuth2.vue.script.js → OAuth2.vue_vue_type_script_setup_true_lang.js} +1 -1
  227. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue_vue_type_script_setup_true_lang.js.map +1 -0
  228. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.d.ts +1 -1
  229. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.js +1 -1
  230. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.js.map +1 -1
  231. package/dist/v2/blocks/scalar-auth-selector-block/components/{OAuth2Metadata.vue.script.js → OAuth2Metadata.vue_vue_type_script_setup_true_lang.js} +1 -1
  232. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue_vue_type_script_setup_true_lang.js.map +1 -0
  233. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +1 -1
  234. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
  235. package/dist/v2/blocks/scalar-auth-selector-block/components/{OAuthScopesAddModal.vue.script.js → OAuthScopesAddModal.vue_vue_type_script_setup_true_lang.js} +1 -1
  236. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
  237. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +2 -2
  238. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
  239. package/dist/v2/blocks/scalar-auth-selector-block/components/{OAuthScopesInput.vue.script.js → OAuthScopesInput.vue_vue_type_script_setup_true_lang.js} +1 -1
  240. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  241. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +1 -1
  242. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +1 -1
  243. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
  244. package/dist/v2/blocks/scalar-auth-selector-block/components/{OpenIDConnect.vue.script.js → OpenIDConnect.vue_vue_type_script_setup_true_lang.js} +1 -1
  245. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  246. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
  247. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -1
  248. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
  249. package/dist/v2/blocks/scalar-auth-selector-block/components/{RequestAuthDataTable.vue.script.js → RequestAuthDataTable.vue_vue_type_script_setup_true_lang.js} +1 -1
  250. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  251. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
  252. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +1 -1
  253. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js.map +1 -1
  254. package/dist/v2/blocks/scalar-auth-selector-block/components/{RequestAuthDataTableInput.vue.script.js → RequestAuthDataTableInput.vue_vue_type_script_setup_true_lang.js} +1 -1
  255. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  256. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +1 -1
  257. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
  258. package/dist/v2/blocks/scalar-auth-selector-block/components/{RequestAuthTab.vue.script.js → RequestAuthTab.vue_vue_type_script_setup_true_lang.js} +1 -1
  259. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue_vue_type_script_setup_true_lang.js.map +1 -0
  260. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.d.ts +1 -1
  261. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js.map +1 -1
  262. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
  263. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts +1 -1
  264. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +1 -1
  265. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +7 -5
  266. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
  267. package/dist/v2/blocks/scalar-auth-selector-block/helpers/run-oauth2-authorize.d.ts +2 -2
  268. package/dist/v2/blocks/scalar-auth-selector-block/helpers/run-oauth2-authorize.js +3 -2
  269. package/dist/v2/blocks/scalar-auth-selector-block/helpers/run-oauth2-authorize.js.map +1 -1
  270. package/dist/v2/blocks/scalar-auth-selector-block/index.js +1 -2
  271. package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
  272. package/dist/v2/components/code-input/CodeInput.vue.js +3 -3
  273. package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
  274. package/dist/v2/components/code-input/{CodeInput.vue.script.js → CodeInput.vue_vue_type_script_setup_true_lang.js} +1 -1
  275. package/dist/v2/components/code-input/CodeInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  276. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts +1 -1
  277. package/dist/v2/components/code-input/CodeInputLite.vue.js +3 -3
  278. package/dist/v2/components/code-input/CodeInputLite.vue.js.map +1 -1
  279. package/dist/v2/components/code-input/{CodeInputLite.vue.script.js → CodeInputLite.vue_vue_type_script_setup_true_lang.js} +4 -2
  280. package/dist/v2/components/code-input/CodeInputLite.vue_vue_type_script_setup_true_lang.js.map +1 -0
  281. package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts +1 -1
  282. package/dist/v2/components/code-input/PillTooltipHost.vue.js +1 -1
  283. package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -1
  284. package/dist/v2/components/code-input/{PillTooltipHost.vue.script.js → PillTooltipHost.vue_vue_type_script_setup_true_lang.js} +1 -1
  285. package/dist/v2/components/code-input/PillTooltipHost.vue_vue_type_script_setup_true_lang.js.map +1 -0
  286. package/dist/v2/components/code-input/code-variable-widget.d.ts +2 -2
  287. package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -1
  288. package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
  289. package/dist/v2/components/context-menu/ContextMenu.vue.js +2 -2
  290. package/dist/v2/components/context-menu/ContextMenu.vue.js.map +1 -1
  291. package/dist/v2/components/context-menu/{ContextMenu.vue.script.js → ContextMenu.vue_vue_type_script_setup_true_lang.js} +1 -1
  292. package/dist/v2/components/context-menu/ContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  293. package/dist/v2/components/context-menu/index.js +1 -2
  294. package/dist/v2/components/data-table/DataTable.vue.js +1 -1
  295. package/dist/v2/components/data-table/DataTable.vue.js.map +1 -1
  296. package/dist/v2/components/data-table/{DataTable.vue.script.js → DataTable.vue_vue_type_script_setup_true_lang.js} +1 -1
  297. package/dist/v2/components/data-table/DataTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  298. package/dist/v2/components/data-table/DataTableCell.vue.js +1 -1
  299. package/dist/v2/components/data-table/DataTableCell.vue.js.map +1 -1
  300. package/dist/v2/components/data-table/{DataTableCell.vue.script.js → DataTableCell.vue_vue_type_script_setup_true_lang.js} +1 -1
  301. package/dist/v2/components/data-table/DataTableCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  302. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +1 -1
  303. package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -1
  304. package/dist/v2/components/data-table/{DataTableCheckbox.vue.script.js → DataTableCheckbox.vue_vue_type_script_setup_true_lang.js} +1 -1
  305. package/dist/v2/components/data-table/DataTableCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -0
  306. package/dist/v2/components/data-table/DataTableHeader.vue.js +1 -1
  307. package/dist/v2/components/data-table/DataTableHeader.vue.js.map +1 -1
  308. package/dist/v2/components/data-table/{DataTableHeader.vue.script.js → DataTableHeader.vue_vue_type_script_setup_true_lang.js} +1 -1
  309. package/dist/v2/components/data-table/DataTableHeader.vue_vue_type_script_setup_true_lang.js.map +1 -0
  310. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
  311. package/dist/v2/components/data-table/DataTableInput.vue.js +2 -2
  312. package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
  313. package/dist/v2/components/data-table/{DataTableInput.vue.script.js → DataTableInput.vue_vue_type_script_setup_true_lang.js} +1 -1
  314. package/dist/v2/components/data-table/DataTableInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  315. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
  316. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +1 -1
  317. package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
  318. package/dist/v2/components/data-table/{DataTableInputSelect.vue.script.js → DataTableInputSelect.vue_vue_type_script_setup_true_lang.js} +1 -1
  319. package/dist/v2/components/data-table/DataTableInputSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  320. package/dist/v2/components/data-table/DataTableRow.vue.js.map +1 -1
  321. package/dist/v2/components/data-table/DataTableText.vue.js +1 -1
  322. package/dist/v2/components/data-table/DataTableText.vue.js.map +1 -1
  323. package/dist/v2/components/data-table/{DataTableText.vue.script.js → DataTableText.vue_vue_type_script_setup_true_lang.js} +1 -1
  324. package/dist/v2/components/data-table/DataTableText.vue_vue_type_script_setup_true_lang.js.map +1 -0
  325. package/dist/v2/components/forms/ConfirmationForm.vue.js +1 -1
  326. package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -1
  327. package/dist/v2/components/forms/{ConfirmationForm.vue.script.js → ConfirmationForm.vue_vue_type_script_setup_true_lang.js} +1 -1
  328. package/dist/v2/components/forms/ConfirmationForm.vue_vue_type_script_setup_true_lang.js.map +1 -0
  329. package/dist/v2/components/forms/index.js +1 -2
  330. package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
  331. package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
  332. package/dist/v2/components/layout/{CollapsibleSection.vue.script.js → CollapsibleSection.vue_vue_type_script_setup_true_lang.js} +1 -1
  333. package/dist/v2/components/layout/CollapsibleSection.vue_vue_type_script_setup_true_lang.js.map +1 -0
  334. package/dist/v2/components/layout/ValueEmitter.vue.js +1 -1
  335. package/dist/v2/components/layout/ValueEmitter.vue.js.map +1 -1
  336. package/dist/v2/components/layout/{ValueEmitter.vue.script.js → ValueEmitter.vue_vue_type_script_setup_true_lang.js} +1 -1
  337. package/dist/v2/components/layout/ValueEmitter.vue_vue_type_script_setup_true_lang.js.map +1 -0
  338. package/dist/v2/components/modals/DeleteModal.vue.js +1 -1
  339. package/dist/v2/components/modals/DeleteModal.vue.js.map +1 -1
  340. package/dist/v2/components/modals/{DeleteModal.vue.script.js → DeleteModal.vue_vue_type_script_setup_true_lang.js} +1 -1
  341. package/dist/v2/components/modals/DeleteModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
  342. package/dist/v2/components/modals/ModalClientContainer.vue.js +2 -2
  343. package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
  344. package/dist/v2/components/modals/{ModalClientContainer.vue.script.js → ModalClientContainer.vue_vue_type_script_setup_true_lang.js} +1 -1
  345. package/dist/v2/components/modals/ModalClientContainer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  346. package/dist/v2/components/modals/index.js +1 -2
  347. package/dist/v2/components/resize/Resize.vue.js +3 -3
  348. package/dist/v2/components/resize/Resize.vue.js.map +1 -1
  349. package/dist/v2/components/resize/{Resize.vue.script.js → Resize.vue_vue_type_script_setup_true_lang.js} +1 -1
  350. package/dist/v2/components/resize/Resize.vue_vue_type_script_setup_true_lang.js.map +1 -0
  351. package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
  352. package/dist/v2/components/server/ServerDropdown.vue.js +1 -1
  353. package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
  354. package/dist/v2/components/server/{ServerDropdown.vue.script.js → ServerDropdown.vue_vue_type_script_setup_true_lang.js} +1 -1
  355. package/dist/v2/components/server/ServerDropdown.vue_vue_type_script_setup_true_lang.js.map +1 -0
  356. package/dist/v2/components/server/ServerDropdownItem.vue.js +2 -2
  357. package/dist/v2/components/server/ServerDropdownItem.vue.js.map +1 -1
  358. package/dist/v2/components/server/{ServerDropdownItem.vue.script.js → ServerDropdownItem.vue_vue_type_script_setup_true_lang.js} +1 -1
  359. package/dist/v2/components/server/ServerDropdownItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  360. package/dist/v2/components/server/index.js +1 -2
  361. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
  362. package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
  363. package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
  364. package/dist/v2/components/sidebar/{Sidebar.vue.script.js → Sidebar.vue_vue_type_script_setup_true_lang.js} +1 -1
  365. package/dist/v2/components/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  366. package/dist/v2/components/sidebar/SidebarMenu.vue.js +1 -1
  367. package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -1
  368. package/dist/v2/components/sidebar/{SidebarMenu.vue.script.js → SidebarMenu.vue_vue_type_script_setup_true_lang.js} +1 -1
  369. package/dist/v2/components/sidebar/SidebarMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  370. package/dist/v2/components/sidebar/SidebarToggle.vue.js +2 -2
  371. package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
  372. package/dist/v2/components/sidebar/{SidebarToggle.vue.script.js → SidebarToggle.vue_vue_type_script_setup_true_lang.js} +1 -1
  373. package/dist/v2/components/sidebar/SidebarToggle.vue_vue_type_script_setup_true_lang.js.map +1 -0
  374. package/dist/v2/constants.js +1 -1
  375. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +1 -1
  376. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js.map +1 -1
  377. package/dist/v2/features/command-palette/components/{CommandActionForm.vue.script.js → CommandActionForm.vue_vue_type_script_setup_true_lang.js} +1 -1
  378. package/dist/v2/features/command-palette/components/CommandActionForm.vue_vue_type_script_setup_true_lang.js.map +1 -0
  379. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +1 -1
  380. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js.map +1 -1
  381. package/dist/v2/features/command-palette/components/{CommandActionInput.vue.script.js → CommandActionInput.vue_vue_type_script_setup_true_lang.js} +1 -1
  382. package/dist/v2/features/command-palette/components/CommandActionInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  383. package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
  384. package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -1
  385. package/dist/v2/features/environments/{EnvironmentsList.vue.script.js → EnvironmentsList.vue_vue_type_script_setup_true_lang.js} +1 -1
  386. package/dist/v2/features/environments/EnvironmentsList.vue_vue_type_script_setup_true_lang.js.map +1 -0
  387. package/dist/v2/features/environments/components/Environment.vue.js +1 -1
  388. package/dist/v2/features/environments/components/Environment.vue.js.map +1 -1
  389. package/dist/v2/features/environments/components/{Environment.vue.script.js → Environment.vue_vue_type_script_setup_true_lang.js} +1 -1
  390. package/dist/v2/features/environments/components/Environment.vue_vue_type_script_setup_true_lang.js.map +1 -0
  391. package/dist/v2/features/environments/components/EnvironmentColors.vue.js +1 -1
  392. package/dist/v2/features/environments/components/EnvironmentColors.vue.js.map +1 -1
  393. package/dist/v2/features/environments/components/{EnvironmentColors.vue.script.js → EnvironmentColors.vue_vue_type_script_setup_true_lang.js} +1 -1
  394. package/dist/v2/features/environments/components/EnvironmentColors.vue_vue_type_script_setup_true_lang.js.map +1 -0
  395. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +1 -1
  396. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
  397. package/dist/v2/features/environments/components/{EnvironmentCreateModal.vue.script.js → EnvironmentCreateModal.vue_vue_type_script_setup_true_lang.js} +1 -1
  398. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
  399. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +1 -1
  400. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -1
  401. package/dist/v2/features/environments/components/{EnvironmentDeleteModal.vue.script.js → EnvironmentDeleteModal.vue_vue_type_script_setup_true_lang.js} +1 -1
  402. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
  403. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +1 -1
  404. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
  405. package/dist/v2/features/environments/components/{EnvironmentVariablesDropdown.vue.script.js → EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js} +1 -1
  406. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js.map +1 -0
  407. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +2 -2
  408. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -1
  409. package/dist/v2/features/environments/components/{EnvironmentVariablesTable.vue.script.js → EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js} +1 -1
  410. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  411. package/dist/v2/features/environments/index.js +1 -2
  412. package/dist/v2/features/modal/Modal.vue.d.ts +2 -2
  413. package/dist/v2/features/modal/Modal.vue.js +1 -1
  414. package/dist/v2/features/modal/Modal.vue.js.map +1 -1
  415. package/dist/v2/features/modal/{Modal.vue.script.js → Modal.vue_vue_type_script_setup_true_lang.js} +1 -1
  416. package/dist/v2/features/modal/Modal.vue_vue_type_script_setup_true_lang.js.map +1 -0
  417. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
  418. package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
  419. package/dist/v2/features/modal/helpers/map-hidden-clients-config.js.map +1 -1
  420. package/dist/v2/features/modal/helpers/types.d.ts +1 -1
  421. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
  422. package/dist/v2/features/modal/index.d.ts +1 -1
  423. package/dist/v2/features/modal/modal-events.d.ts +1 -1
  424. package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
  425. package/dist/v2/features/operation/Operation.vue.js +1 -1
  426. package/dist/v2/features/operation/Operation.vue.js.map +1 -1
  427. package/dist/v2/features/operation/{Operation.vue.script.js → Operation.vue_vue_type_script_setup_true_lang.js} +1 -1
  428. package/dist/v2/features/operation/Operation.vue_vue_type_script_setup_true_lang.js.map +1 -0
  429. package/dist/v2/features/operation/index.js +1 -2
  430. package/dist/v2/features/search/components/DocumentSearchModal.vue.js +2 -2
  431. package/dist/v2/features/search/components/DocumentSearchModal.vue.js.map +1 -1
  432. package/dist/v2/features/search/components/{DocumentSearchModal.vue.script.js → DocumentSearchModal.vue_vue_type_script_setup_true_lang.js} +1 -1
  433. package/dist/v2/features/search/components/DocumentSearchModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
  434. package/dist/v2/features/search/components/SearchResult.vue.d.ts +1 -1
  435. package/dist/v2/features/search/components/SearchResult.vue.js +1 -1
  436. package/dist/v2/features/search/components/SearchResult.vue.js.map +1 -1
  437. package/dist/v2/features/search/components/{SearchResult.vue.script.js → SearchResult.vue_vue_type_script_setup_true_lang.js} +1 -1
  438. package/dist/v2/features/search/components/SearchResult.vue_vue_type_script_setup_true_lang.js.map +1 -0
  439. package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
  440. package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
  441. package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
  442. package/dist/v2/hooks/index.js +1 -2
  443. package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
  444. package/dist/v2/types/options.d.ts +2 -2
  445. package/dist/vue-styles.css +6 -6
  446. package/package.json +31 -31
  447. package/dist/assets/computer.ascii.virtual.js.map +0 -1
  448. package/dist/components/HelpfulLink.vue.script.js.map +0 -1
  449. package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +0 -1
  450. package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.script.js.map +0 -1
  451. package/dist/components/SectionFilter.vue.script.js.map +0 -1
  452. package/dist/components/SectionFilterButton.vue.script.js.map +0 -1
  453. package/dist/components/Server/ServerVariablesForm.vue.script.js.map +0 -1
  454. package/dist/components/Server/ServerVariablesSelect.vue.script.js.map +0 -1
  455. package/dist/components/Server/ServerVariablesTextbox.vue.script.js.map +0 -1
  456. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js.map +0 -1
  457. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js.map +0 -1
  458. package/dist/components/ViewLayout/ViewLayout.vue.script.js.map +0 -1
  459. package/dist/components/ViewLayout/ViewLayoutSection.vue.script.js.map +0 -1
  460. package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +0 -1
  461. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +0 -1
  462. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +0 -1
  463. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +0 -1
  464. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js.map +0 -1
  465. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js.map +0 -1
  466. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js.map +0 -1
  467. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +0 -1
  468. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +0 -1
  469. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +0 -1
  470. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +0 -1
  471. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +0 -1
  472. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +0 -1
  473. package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +0 -1
  474. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +0 -1
  475. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +0 -1
  476. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +0 -1
  477. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js.map +0 -1
  478. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +0 -1
  479. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js.map +0 -1
  480. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +0 -1
  481. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +0 -1
  482. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +0 -1
  483. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +0 -1
  484. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +0 -1
  485. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +0 -1
  486. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +0 -1
  487. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +0 -1
  488. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +0 -1
  489. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +0 -1
  490. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +0 -1
  491. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.script.js.map +0 -1
  492. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +0 -1
  493. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +0 -1
  494. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +0 -1
  495. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +0 -1
  496. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js.map +0 -1
  497. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +0 -1
  498. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +0 -1
  499. package/dist/v2/components/code-input/CodeInputLite.vue.script.js.map +0 -1
  500. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +0 -1
  501. package/dist/v2/components/context-menu/ContextMenu.vue.script.js.map +0 -1
  502. package/dist/v2/components/data-table/DataTable.vue.script.js.map +0 -1
  503. package/dist/v2/components/data-table/DataTableCell.vue.script.js.map +0 -1
  504. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +0 -1
  505. package/dist/v2/components/data-table/DataTableHeader.vue.script.js.map +0 -1
  506. package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +0 -1
  507. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +0 -1
  508. package/dist/v2/components/data-table/DataTableText.vue.script.js.map +0 -1
  509. package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +0 -1
  510. package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +0 -1
  511. package/dist/v2/components/layout/ValueEmitter.vue.script.js.map +0 -1
  512. package/dist/v2/components/modals/DeleteModal.vue.script.js.map +0 -1
  513. package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +0 -1
  514. package/dist/v2/components/resize/Resize.vue.script.js.map +0 -1
  515. package/dist/v2/components/server/ServerDropdown.vue.script.js.map +0 -1
  516. package/dist/v2/components/server/ServerDropdownItem.vue.script.js.map +0 -1
  517. package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +0 -1
  518. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +0 -1
  519. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +0 -1
  520. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +0 -1
  521. package/dist/v2/features/command-palette/components/CommandActionInput.vue.script.js.map +0 -1
  522. package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +0 -1
  523. package/dist/v2/features/environments/components/Environment.vue.script.js.map +0 -1
  524. package/dist/v2/features/environments/components/EnvironmentColors.vue.script.js.map +0 -1
  525. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +0 -1
  526. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +0 -1
  527. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +0 -1
  528. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +0 -1
  529. package/dist/v2/features/modal/Modal.vue.script.js.map +0 -1
  530. package/dist/v2/features/operation/Operation.vue.script.js.map +0 -1
  531. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js.map +0 -1
  532. package/dist/v2/features/search/components/SearchResult.vue.script.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponseLoadingOverlay.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_Transition","_withCtx","_unref","_createElementBlock","_createVNode","_createTextVNode","_toDisplayString","_createCommentVNode"],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarLoading, useLoadingState } from '@scalar/components/loading'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { onBeforeUnmount, onMounted, ref } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { eventBus } = defineProps<{\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst { translate } = useLocalization()\n\nconst loader = useLoadingState()\nconst timeout = ref<ReturnType<typeof setTimeout>>()\n\nconst startLoading = () => {\n // Replace any pending delayed start so overlapping `hooks:on:request:sent` events\n // (rapid send, navigation, double submit) cannot leave an orphaned timer that\n // calls `loader.start()` after the matching request already completed.\n clearTimeout(timeout.value)\n timeout.value = setTimeout(() => loader.start(), 1000)\n}\n\nconst stopLoading = () => {\n clearTimeout(timeout.value)\n timeout.value = undefined\n void loader.clear()\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startLoading)\n eventBus.on('hooks:on:request:complete', stopLoading)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startLoading)\n eventBus.off('hooks:on:request:complete', stopLoading)\n stopLoading()\n})\n</script>\n<template>\n <Transition>\n <div\n v-if=\"loader.isActive\"\n class=\"bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6\">\n <ScalarLoading\n class=\"text-c-3\"\n :loader\n size=\"3xl\" />\n <ScalarButton\n variant=\"ghost\"\n @click=\"eventBus.emit('operation:cancel:request')\">\n {{ translate('apiClient.responseLoadingOverlay.cancel') }}\n </ScalarButton>\n </div>\n </Transition>\n</template>\n<style scoped>\n.v-enter-active {\n transition: opacity 0.5s ease;\n}\n\n.v-enter-from {\n opacity: 0;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;EAaA,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,SAAS,gBAAgB;EAC/B,MAAM,UAAU,IAAmC;EAEnD,MAAM,qBAAqB;GAIzB,aAAa,QAAQ,KAAK;GAC1B,QAAQ,QAAQ,iBAAiB,OAAO,MAAM,GAAG,GAAI;EACvD;EAEA,MAAM,oBAAoB;GACxB,aAAa,QAAQ,KAAK;GAC1B,QAAQ,QAAQ,KAAA;GAChB,OAAY,MAAM;EACpB;EAEA,gBAAgB;GACd,QAAA,SAAS,GAAG,yBAAyB,YAAY;GACjD,QAAA,SAAS,GAAG,6BAA6B,WAAW;EACtD,CAAC;EAED,sBAAsB;GACpB,QAAA,SAAS,IAAI,yBAAyB,YAAY;GAClD,QAAA,SAAS,IAAI,6BAA6B,WAAW;GACrD,YAAY;EACd,CAAC;;GAGC,OAAAA,UAAA,GAAAC,YAcaC,YAAA,MAAA;IAbX,SAAAC,cAYM,CAXEC,MAAA,MAAA,CAAM,CAAC,YADfJ,UAAA,GAAAK,mBAYM,OAZN,YAYM,CATJC,YAGeF,MAAA,aAAA,GAAA;KAFb,OAAM;KACL,QAAAA,MAAA,MAAA;KACD,MAAK;I,yBACPE,YAIeF,MAAA,YAAA,GAAA;KAHb,SAAQ;KACP,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,QAAA,SAAS,KAAI,0BAAA;;KACrB,SAAAD,cAA0D,CAAvDI,gBAAAC,gBAAAJ,MAAA,SAAA,CAAS,CAAA,yCAAA,CAAA,GAAA,CAAA,C"}
@@ -1,5 +1,5 @@
1
1
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
- import type { ResponseInstance } from '../../../../v2/blocks/operation-block/helpers/send-request.js';
2
+ import type { ResponseInstance } from '../../operation-block/helpers/send-request.js';
3
3
  type __VLS_Props = {
4
4
  /** Response */
5
5
  response: ResponseInstance;
@@ -1,4 +1,4 @@
1
- import ResponseMetaInformation_vue_vue_type_script_setup_true_lang_default from "./ResponseMetaInformation.vue.script.js";
1
+ import ResponseMetaInformation_vue_vue_type_script_setup_true_lang_default from "./ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/v2/blocks/response-block/components/ResponseMetaInformation.vue
3
3
  var ResponseMetaInformation_default = ResponseMetaInformation_vue_vue_type_script_setup_true_lang_default;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseMetaInformation.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseMetaInformation.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n httpStatusCodes,\n type HttpStatusCode,\n} from '@scalar/helpers/http/http-status-codes'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport prettyMilliseconds from 'pretty-ms'\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request'\nimport { getContentLength } from '@/v2/blocks/response-block/helpers/get-content-length'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { response, eventBus } = defineProps<{\n /** Response */\n response: ResponseInstance\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst { translate } = useLocalization()\n\nconst interval = ref<ReturnType<typeof setInterval>>()\nconst stopwatch = ref(0)\n\nconst stopStopwatch = () => {\n clearInterval(interval.value)\n interval.value = undefined\n stopwatch.value = 0\n}\n\nconst startStopwatch = () => {\n interval.value = setInterval(() => (stopwatch.value += 1000), 1000)\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startStopwatch)\n eventBus.on('hooks:on:request:complete', stopStopwatch)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startStopwatch)\n eventBus.off('hooks:on:request:complete', stopStopwatch)\n stopStopwatch()\n})\n\n/** Status text for the response */\nconst statusCodeInformation = computed((): HttpStatusCode | undefined => {\n const responseStatusCode = response?.status\n\n if (!responseStatusCode) {\n return undefined\n }\n\n return httpStatusCodes[responseStatusCode] ?? undefined\n})\n</script>\n<template>\n <div class=\"text-c-1 flex gap-1.5\">\n <span v-if=\"interval && stopwatch\">{{\n prettyMilliseconds(stopwatch)\n }}</span>\n <template v-else>\n <span>\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.duration')\n }}</span>\n {{ prettyMilliseconds(response.duration) }}\n </span>\n <span v-if=\"getContentLength(response)\">\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.size')\n }}</span>\n {{ getContentLength(response) }}\n </span>\n <template v-if=\"statusCodeInformation\">\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.status')\n }}</span>\n <HelpfulLink\n v-if=\"statusCodeInformation.url\"\n class=\"flex items-center gap-1.5\"\n :href=\"statusCodeInformation.url\">\n {{ response.status }} {{ statusCodeInformation.name }}\n <span\n class=\"block h-1.5 w-1.5 rounded-full\"\n :style=\"{ backgroundColor: statusCodeInformation.color }\" />\n </HelpfulLink>\n <span v-else>\n {{ response.status }} {{ statusCodeInformation.name }}\n <span\n class=\"block h-1.5 w-1.5 rounded-full\"\n :style=\"{ backgroundColor: statusCodeInformation.color }\" />\n </span>\n </template>\n </template>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ResponseMetaInformation.vue.js","names":["_sfc_main"],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseMetaInformation.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n httpStatusCodes,\n type HttpStatusCode,\n} from '@scalar/helpers/http/http-status-codes'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport prettyMilliseconds from 'pretty-ms'\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request'\nimport { getContentLength } from '@/v2/blocks/response-block/helpers/get-content-length'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { response, eventBus } = defineProps<{\n /** Response */\n response: ResponseInstance\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst { translate } = useLocalization()\n\nconst interval = ref<ReturnType<typeof setInterval>>()\nconst stopwatch = ref(0)\n\nconst stopStopwatch = () => {\n clearInterval(interval.value)\n interval.value = undefined\n stopwatch.value = 0\n}\n\nconst startStopwatch = () => {\n interval.value = setInterval(() => (stopwatch.value += 1000), 1000)\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startStopwatch)\n eventBus.on('hooks:on:request:complete', stopStopwatch)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startStopwatch)\n eventBus.off('hooks:on:request:complete', stopStopwatch)\n stopStopwatch()\n})\n\n/** Status text for the response */\nconst statusCodeInformation = computed((): HttpStatusCode | undefined => {\n const responseStatusCode = response?.status\n\n if (!responseStatusCode) {\n return undefined\n }\n\n return httpStatusCodes[responseStatusCode] ?? undefined\n})\n</script>\n<template>\n <div class=\"text-c-1 flex gap-1.5\">\n <span v-if=\"interval && stopwatch\">{{\n prettyMilliseconds(stopwatch)\n }}</span>\n <template v-else>\n <span>\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.duration')\n }}</span>\n {{ prettyMilliseconds(response.duration) }}\n </span>\n <span v-if=\"getContentLength(response)\">\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.size')\n }}</span>\n {{ getContentLength(response) }}\n </span>\n <template v-if=\"statusCodeInformation\">\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.status')\n }}</span>\n <HelpfulLink\n v-if=\"statusCodeInformation.url\"\n class=\"flex items-center gap-1.5\"\n :href=\"statusCodeInformation.url\">\n {{ response.status }} {{ statusCodeInformation.name }}\n <span\n class=\"block h-1.5 w-1.5 rounded-full\"\n :style=\"{ backgroundColor: statusCodeInformation.color }\" />\n </HelpfulLink>\n <span v-else>\n {{ response.status }} {{ statusCodeInformation.name }}\n <span\n class=\"block h-1.5 w-1.5 rounded-full\"\n :style=\"{ backgroundColor: statusCodeInformation.color }\" />\n </span>\n </template>\n </template>\n </div>\n</template>\n"],"mappings":""}
@@ -70,4 +70,4 @@ var ResponseMetaInformation_vue_vue_type_script_setup_true_lang_default = /*@__P
70
70
  //#endregion
71
71
  export { ResponseMetaInformation_vue_vue_type_script_setup_true_lang_default as default };
72
72
 
73
- //# sourceMappingURL=ResponseMetaInformation.vue.script.js.map
73
+ //# sourceMappingURL=ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_toDisplayString","_unref","_Fragment","_createElementVNode","_createTextVNode","_createCommentVNode","_createBlock","HelpfulLink","_withCtx","_normalizeStyle"],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseMetaInformation.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n httpStatusCodes,\n type HttpStatusCode,\n} from '@scalar/helpers/http/http-status-codes'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport prettyMilliseconds from 'pretty-ms'\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request'\nimport { getContentLength } from '@/v2/blocks/response-block/helpers/get-content-length'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { response, eventBus } = defineProps<{\n /** Response */\n response: ResponseInstance\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst { translate } = useLocalization()\n\nconst interval = ref<ReturnType<typeof setInterval>>()\nconst stopwatch = ref(0)\n\nconst stopStopwatch = () => {\n clearInterval(interval.value)\n interval.value = undefined\n stopwatch.value = 0\n}\n\nconst startStopwatch = () => {\n interval.value = setInterval(() => (stopwatch.value += 1000), 1000)\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startStopwatch)\n eventBus.on('hooks:on:request:complete', stopStopwatch)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startStopwatch)\n eventBus.off('hooks:on:request:complete', stopStopwatch)\n stopStopwatch()\n})\n\n/** Status text for the response */\nconst statusCodeInformation = computed((): HttpStatusCode | undefined => {\n const responseStatusCode = response?.status\n\n if (!responseStatusCode) {\n return undefined\n }\n\n return httpStatusCodes[responseStatusCode] ?? undefined\n})\n</script>\n<template>\n <div class=\"text-c-1 flex gap-1.5\">\n <span v-if=\"interval && stopwatch\">{{\n prettyMilliseconds(stopwatch)\n }}</span>\n <template v-else>\n <span>\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.duration')\n }}</span>\n {{ prettyMilliseconds(response.duration) }}\n </span>\n <span v-if=\"getContentLength(response)\">\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.size')\n }}</span>\n {{ getContentLength(response) }}\n </span>\n <template v-if=\"statusCodeInformation\">\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.status')\n }}</span>\n <HelpfulLink\n v-if=\"statusCodeInformation.url\"\n class=\"flex items-center gap-1.5\"\n :href=\"statusCodeInformation.url\">\n {{ response.status }} {{ statusCodeInformation.name }}\n <span\n class=\"block h-1.5 w-1.5 rounded-full\"\n :style=\"{ backgroundColor: statusCodeInformation.color }\" />\n </HelpfulLink>\n <span v-else>\n {{ response.status }} {{ statusCodeInformation.name }}\n <span\n class=\"block h-1.5 w-1.5 rounded-full\"\n :style=\"{ backgroundColor: statusCodeInformation.color }\" />\n </span>\n </template>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAqBA,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,WAAW,IAAoC;EACrD,MAAM,YAAY,IAAI,CAAC;EAEvB,MAAM,sBAAsB;GAC1B,cAAc,SAAS,KAAK;GAC5B,SAAS,QAAQ,KAAA;GACjB,UAAU,QAAQ;EACpB;EAEA,MAAM,uBAAuB;GAC3B,SAAS,QAAQ,kBAAmB,UAAU,SAAS,KAAO,GAAI;EACpE;EAEA,gBAAgB;GACd,QAAA,SAAS,GAAG,yBAAyB,cAAc;GACnD,QAAA,SAAS,GAAG,6BAA6B,aAAa;EACxD,CAAC;EAED,sBAAsB;GACpB,QAAA,SAAS,IAAI,yBAAyB,cAAc;GACpD,QAAA,SAAS,IAAI,6BAA6B,aAAa;GACvD,cAAc;EAChB,CAAC;;EAGD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MAD5D,OAAM;MACL,OAAKM,eAAA,EAAA,iBAAqB,sBAAA,MAAsB,MAAK,CAAA;;;I,oBAE1DX,UAAA,GAAAC,mBAKO,QAAA,YAAA,CAJFK,gBAAAJ,gBAAA,QAAA,SAAS,MAAM,IAAG,MAACA,gBAAG,sBAAA,MAAsB,IAAI,IAAG,KACtD,CAAA,GAAAG,mBAE8D,QAAA;KAD5D,OAAM;KACL,OAAKM,eAAA,EAAA,iBAAqB,sBAAA,MAAsB,MAAK,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { ResponseInstance } from '../../../../v2/blocks/operation-block/helpers/send-request.js';
1
+ import type { ResponseInstance } from '../../operation-block/helpers/send-request.js';
2
2
  /** Extract content length from headers */
3
3
  export declare const getContentLength: (response: ResponseInstance) => string | undefined;
4
4
  //# sourceMappingURL=get-content-length.d.ts.map
@@ -7,7 +7,8 @@ var isBlob = (b) => b instanceof Blob;
7
7
  * Extracts MIME type, attachment filename, and generates a data URL.
8
8
  */
9
9
  function processResponseBody({ data, headers }) {
10
- const mimeType = resolveResponseMimeType(headers.find((header) => header.name.toLowerCase() === "content-type")?.value);
10
+ const contentType = headers.find((header) => header.name.toLowerCase() === "content-type");
11
+ const mimeType = resolveResponseMimeType(contentType?.value);
11
12
  return {
12
13
  mimeType,
13
14
  attachmentFilename: extractFilename(headers.find((header) => header.name.toLowerCase() === "content-disposition")?.value ?? ""),
@@ -1 +1 @@
1
- {"version":3,"file":"process-response-body.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/helpers/process-response-body.ts"],"sourcesContent":["import { resolveResponseMimeType } from '@/v2/blocks/response-block/helpers/resolve-response-content-type'\n\nimport { extractFilename } from './../helpers/extract-filename'\n\nconst isBlob = (b: any): b is Blob => b instanceof Blob\n\n/**\n * Processes the response body of an HTTP request.\n * Extracts MIME type, attachment filename, and generates a data URL.\n */\nexport function processResponseBody({ data, headers }: { data: unknown; headers: { name: string; value: string }[] }) {\n const contentType = headers.find((header) => header.name.toLowerCase() === 'content-type')\n const mimeType = resolveResponseMimeType(contentType?.value)\n const attachmentFilename = extractFilename(\n headers.find((header) => header.name.toLowerCase() === 'content-disposition')?.value ?? '',\n )\n\n const dataUrl = (() => {\n if (isBlob(data)) {\n return URL.createObjectURL(data)\n }\n if (typeof data === 'string') {\n return URL.createObjectURL(new Blob([data], { type: mimeType ? mimeType.toString() : undefined }))\n }\n if (data instanceof Object && Object.keys(data).length) {\n return URL.createObjectURL(\n new Blob([JSON.stringify(data)], {\n type: mimeType ? mimeType.toString() : undefined,\n }),\n )\n }\n return ''\n })()\n\n return { mimeType, attachmentFilename, dataUrl }\n}\n"],"mappings":";;;AAIA,IAAM,UAAU,MAAsB,aAAa;;;;;AAMnD,SAAgB,oBAAoB,EAAE,MAAM,WAA0E;CAEpH,MAAM,WAAW,wBADG,QAAQ,MAAM,WAAW,OAAO,KAAK,YAAY,MAAM,cAClC,CAAA,EAAa,KAAK;CAsB3D,OAAO;EAAE;EAAU,oBArBQ,gBACzB,QAAQ,MAAM,WAAW,OAAO,KAAK,YAAY,MAAM,qBAAqB,CAAC,EAAE,SAAS,EAoBvE;EAAoB,gBAjBhB;GACrB,IAAI,OAAO,IAAI,GACb,OAAO,IAAI,gBAAgB,IAAI;GAEjC,IAAI,OAAO,SAAS,UAClB,OAAO,IAAI,gBAAgB,IAAI,KAAK,CAAC,IAAI,GAAG,EAAE,MAAM,WAAW,SAAS,SAAS,IAAI,KAAA,EAAU,CAAC,CAAC;GAEnG,IAAI,gBAAgB,UAAU,OAAO,KAAK,IAAI,CAAC,CAAC,QAC9C,OAAO,IAAI,gBACT,IAAI,KAAK,CAAC,KAAK,UAAU,IAAI,CAAC,GAAG,EAC/B,MAAM,WAAW,SAAS,SAAS,IAAI,KAAA,EACzC,CAAC,CACH;GAEF,OAAO;EACT,EAAA,CAEuC;CAAQ;AACjD"}
1
+ {"version":3,"file":"process-response-body.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/helpers/process-response-body.ts"],"sourcesContent":["import { resolveResponseMimeType } from '@/v2/blocks/response-block/helpers/resolve-response-content-type'\n\nimport { extractFilename } from './../helpers/extract-filename'\n\nconst isBlob = (b: any): b is Blob => b instanceof Blob\n\n/**\n * Processes the response body of an HTTP request.\n * Extracts MIME type, attachment filename, and generates a data URL.\n */\nexport function processResponseBody({ data, headers }: { data: unknown; headers: { name: string; value: string }[] }) {\n const contentType = headers.find((header) => header.name.toLowerCase() === 'content-type')\n const mimeType = resolveResponseMimeType(contentType?.value)\n const attachmentFilename = extractFilename(\n headers.find((header) => header.name.toLowerCase() === 'content-disposition')?.value ?? '',\n )\n\n const dataUrl = (() => {\n if (isBlob(data)) {\n return URL.createObjectURL(data)\n }\n if (typeof data === 'string') {\n return URL.createObjectURL(new Blob([data], { type: mimeType ? mimeType.toString() : undefined }))\n }\n if (data instanceof Object && Object.keys(data).length) {\n return URL.createObjectURL(\n new Blob([JSON.stringify(data)], {\n type: mimeType ? mimeType.toString() : undefined,\n }),\n )\n }\n return ''\n })()\n\n return { mimeType, attachmentFilename, dataUrl }\n}\n"],"mappings":";;;AAIA,IAAM,UAAU,MAAsB,aAAa;;;;;AAMnD,SAAgB,oBAAoB,EAAE,MAAM,WAA0E;CACpH,MAAM,cAAc,QAAQ,MAAM,WAAW,OAAO,KAAK,YAAY,MAAM,cAAc;CACzF,MAAM,WAAW,wBAAwB,aAAa,KAAK;CAsB3D,OAAO;EAAE;EAAU,oBArBQ,gBACzB,QAAQ,MAAM,WAAW,OAAO,KAAK,YAAY,MAAM,qBAAqB,CAAC,EAAE,SAAS,EAoBvE;EAAoB,gBAjBhB;GACrB,IAAI,OAAO,IAAI,GACb,OAAO,IAAI,gBAAgB,IAAI;GAEjC,IAAI,OAAO,SAAS,UAClB,OAAO,IAAI,gBAAgB,IAAI,KAAK,CAAC,IAAI,GAAG,EAAE,MAAM,WAAW,SAAS,SAAS,IAAI,KAAA,EAAU,CAAC,CAAC;GAEnG,IAAI,gBAAgB,UAAU,OAAO,KAAK,IAAI,CAAC,CAAC,QAC9C,OAAO,IAAI,gBACT,IAAI,KAAK,CAAC,KAAK,UAAU,IAAI,CAAC,GAAG,EAC/B,MAAM,WAAW,SAAS,SAAS,IAAI,KAAA,EACzC,CAAC,CACH;GAEF,OAAO;EACT,EAAA,CAEuC;CAAQ;AACjD"}
@@ -1,6 +1,6 @@
1
1
  import { parseMimeType } from "@scalar/helpers/http/mime-type";
2
2
  //#region src/v2/blocks/response-block/helpers/response-stream-multipart.ts
3
- var MAX_PART_SIZE = 8 * 1024 * 1024;
3
+ var MAX_PART_SIZE = 8388608;
4
4
  var MAX_NESTING = 8;
5
5
  /** Preserve every byte until MIME boundaries identify a complete part. */
6
6
  var decodeBytes = (bytes) => Uint8Array.from(bytes, (char) => char.charCodeAt(0));
@@ -1 +1 @@
1
- {"version":3,"file":"response-stream-multipart.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/helpers/response-stream-multipart.ts"],"sourcesContent":["import { parseMimeType } from '@scalar/helpers/http/mime-type'\n\nimport type { ResponseStreamParser } from './response-stream'\n\nconst MAX_PART_SIZE = 8 * 1024 * 1024\nconst MAX_NESTING = 8\n\n/** Preserve every byte until MIME boundaries identify a complete part. */\nconst decodeBytes = (bytes: string): Uint8Array => Uint8Array.from(bytes, (char) => char.charCodeAt(0))\n\n/** Parse MIME delimiter lines, never treating boundary-like body bytes as separators. */\nexport const createMultipartParser = (\n contentType: string,\n emit: (text: string) => void,\n nesting = 0,\n prefix = '',\n): ResponseStreamParser => {\n const boundary = parseMimeType(contentType).parameters.get('boundary')\n if (!boundary || !/^[0-9A-Za-z'()+_,\\-./:=? ]{1,70}$/.test(boundary) || boundary.endsWith(' ')) {\n throw new Error('Multipart response requires a valid boundary parameter.')\n }\n if (nesting >= MAX_NESTING) {\n throw new Error('Multipart nesting exceeds the display limit.')\n }\n const marker = new TextEncoder().encode(`--${boundary}`)\n let buffer = new Uint8Array(1024)\n let length = 0\n let offset = 0\n let lineOffset = 0\n let started = false\n let closed = false\n let partNumber = 0\n\n const emitPart = (part: string): void => {\n if (part.length > MAX_PART_SIZE) {\n throw new Error('Multipart part exceeds the 8 MiB display limit.')\n }\n // Empty header sections have only the CRLF separating headers from the body.\n const separator = part.startsWith('\\r\\n') ? 0 : part.indexOf('\\r\\n\\r\\n')\n if (separator < 0) {\n throw new Error('Multipart part is missing its header separator.')\n }\n const headers = part.slice(0, separator)\n const body = part.slice(separator + (separator === 0 ? 2 : 4))\n const unfolded = headers.replace(/\\r\\n[ \\t]+/g, ' ')\n const partType = unfolded.match(/^content-type:\\s*(.+)$/im)?.[1]?.trim() ?? 'text/plain'\n const parsedType = parseMimeType(partType)\n partNumber++\n const label = `${prefix}${partNumber}`\n emit(`Part ${label}\\n${headers ? `${headers}\\n\\n` : '\\n'}`)\n if (parsedType.type === 'multipart') {\n const child = createMultipartParser(partType, emit, nesting + 1, `${label}.`)\n child.push(decodeBytes(body))\n child.finish()\n } else if (parsedType.type === 'text' || /(?:json|xml)$/.test(parsedType.subtype)) {\n const text = new TextDecoder(parsedType.parameters.get('charset') ?? 'utf-8').decode(decodeBytes(body))\n let formatted = text\n try {\n formatted = JSON.stringify(JSON.parse(text), null, 2)\n } catch {\n // Text and XML parts remain readable without JSON interpretation.\n }\n emit(`${formatted}\\n`)\n } else {\n // Base64 preserves binary part bytes without injecting control characters into the UI.\n emit(`[Binary part: ${body.length} bytes, base64]\\n${btoa(body)}\\n`)\n }\n }\n\n // Convert only completed parts, in bounded slices that do not exceed argument limits.\n // Byte strings, decoded text, and base64 can coexist with the buffer: peak memory is\n // several times the 8 MiB part limit, not one copy. The viewer separately caps retained output.\n const toByteString = (bytes: Uint8Array): string => {\n const slices: string[] = []\n for (let index = 0; index < bytes.length; index += 8192) {\n slices.push(String.fromCharCode(...bytes.subarray(index, index + 8192)))\n }\n return slices.join('')\n }\n\n const drain = (final: boolean): void => {\n while (!closed && offset + marker.length <= length) {\n const index = offset\n const matches =\n (index === 0 || (buffer[index - 2] === 13 && buffer[index - 1] === 10)) &&\n marker.every((byte, position) => buffer[index + position] === byte)\n if (!matches) {\n offset++\n continue\n }\n const afterMarker = index + marker.length\n // Remember incomplete delimiter lines too, including long transport padding.\n lineOffset = Math.max(lineOffset, afterMarker)\n while (lineOffset + 1 < length && !(buffer[lineOffset] === 13 && buffer[lineOffset + 1] === 10)) {\n lineOffset++\n }\n const lineEnd = lineOffset + 1 < length ? lineOffset : -1\n if (lineEnd < 0 && !final) {\n break\n }\n const suffix = toByteString(buffer.subarray(afterMarker, lineEnd < 0 ? length : lineEnd))\n const closing = /^--[ \\t]*$/.test(suffix)\n if (!closing && !/^[ \\t]*$/.test(suffix)) {\n offset = afterMarker\n lineOffset = 0\n continue\n }\n if (started) {\n emitPart(toByteString(buffer.subarray(0, Math.max(0, index - 2))))\n }\n started = true\n const consumed = lineEnd < 0 ? length : lineEnd + 2\n buffer.copyWithin(0, consumed, length)\n length -= consumed\n closed = closing\n offset = 0\n lineOffset = 0\n }\n // Keep room for the CRLF and an incomplete delimiter without counting framing as part bytes.\n if (length > MAX_PART_SIZE + marker.length + 6) {\n throw new Error('Multipart part exceeds the 8 MiB display limit.')\n }\n if (final && !closed) {\n throw new Error('Multipart response ended before its closing boundary.')\n }\n }\n\n return {\n push: (chunk) => {\n // Bound each append even when the transport delivers a very large chunk.\n for (let index = 0; index < chunk.length && !closed; index += 65536) {\n const slice = chunk.subarray(index, index + 65536)\n if (length + slice.length > buffer.length) {\n const grown = new Uint8Array(Math.max(buffer.length * 2, length + slice.length))\n grown.set(buffer.subarray(0, length))\n buffer = grown\n }\n buffer.set(slice, length)\n length += slice.length\n drain(false)\n }\n },\n finish: () => drain(true),\n }\n}\n"],"mappings":";;AAIA,IAAM,gBAAgB,IAAI,OAAO;AACjC,IAAM,cAAc;;AAGpB,IAAM,eAAe,UAA8B,WAAW,KAAK,QAAQ,SAAS,KAAK,WAAW,CAAC,CAAC;;AAGtG,IAAa,yBACX,aACA,MACA,UAAU,GACV,SAAS,OACgB;CACzB,MAAM,WAAW,cAAc,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,CAAC,CAAC;GAEnE,UAAU;GACV,MAAM,WAAW,UAAU,IAAI,SAAS,UAAU;GAClD,OAAO,WAAW,GAAG,UAAU,MAAM;GACrC,UAAU;GACV,SAAS;GACT,SAAS;GACT,aAAa;EACf;EAEA,IAAI,SAAS,gBAAgB,OAAO,SAAS,GAC3C,MAAM,IAAI,MAAM,iDAAiD;EAEnE,IAAI,SAAS,CAAC,QACZ,MAAM,IAAI,MAAM,uDAAuD;CAE3E;CAEA,OAAO;EACL,OAAO,UAAU;GAEf,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,UAAU,CAAC,QAAQ,SAAS,OAAO;IACnE,MAAM,QAAQ,MAAM,SAAS,OAAO,QAAQ,KAAK;IACjD,IAAI,SAAS,MAAM,SAAS,OAAO,QAAQ;KACzC,MAAM,QAAQ,IAAI,WAAW,KAAK,IAAI,OAAO,SAAS,GAAG,SAAS,MAAM,MAAM,CAAC;KAC/E,MAAM,IAAI,OAAO,SAAS,GAAG,MAAM,CAAC;KACpC,SAAS;IACX;IACA,OAAO,IAAI,OAAO,MAAM;IACxB,UAAU,MAAM;IAChB,MAAM,KAAK;GACb;EACF;EACA,cAAc,MAAM,IAAI;CAC1B;AACF"}
1
+ {"version":3,"file":"response-stream-multipart.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/helpers/response-stream-multipart.ts"],"sourcesContent":["import { parseMimeType } from '@scalar/helpers/http/mime-type'\n\nimport type { ResponseStreamParser } from './response-stream'\n\nconst MAX_PART_SIZE = 8 * 1024 * 1024\nconst MAX_NESTING = 8\n\n/** Preserve every byte until MIME boundaries identify a complete part. */\nconst decodeBytes = (bytes: string): Uint8Array => Uint8Array.from(bytes, (char) => char.charCodeAt(0))\n\n/** Parse MIME delimiter lines, never treating boundary-like body bytes as separators. */\nexport const createMultipartParser = (\n contentType: string,\n emit: (text: string) => void,\n nesting = 0,\n prefix = '',\n): ResponseStreamParser => {\n const boundary = parseMimeType(contentType).parameters.get('boundary')\n if (!boundary || !/^[0-9A-Za-z'()+_,\\-./:=? ]{1,70}$/.test(boundary) || boundary.endsWith(' ')) {\n throw new Error('Multipart response requires a valid boundary parameter.')\n }\n if (nesting >= MAX_NESTING) {\n throw new Error('Multipart nesting exceeds the display limit.')\n }\n const marker = new TextEncoder().encode(`--${boundary}`)\n let buffer = new Uint8Array(1024)\n let length = 0\n let offset = 0\n let lineOffset = 0\n let started = false\n let closed = false\n let partNumber = 0\n\n const emitPart = (part: string): void => {\n if (part.length > MAX_PART_SIZE) {\n throw new Error('Multipart part exceeds the 8 MiB display limit.')\n }\n // Empty header sections have only the CRLF separating headers from the body.\n const separator = part.startsWith('\\r\\n') ? 0 : part.indexOf('\\r\\n\\r\\n')\n if (separator < 0) {\n throw new Error('Multipart part is missing its header separator.')\n }\n const headers = part.slice(0, separator)\n const body = part.slice(separator + (separator === 0 ? 2 : 4))\n const unfolded = headers.replace(/\\r\\n[ \\t]+/g, ' ')\n const partType = unfolded.match(/^content-type:\\s*(.+)$/im)?.[1]?.trim() ?? 'text/plain'\n const parsedType = parseMimeType(partType)\n partNumber++\n const label = `${prefix}${partNumber}`\n emit(`Part ${label}\\n${headers ? `${headers}\\n\\n` : '\\n'}`)\n if (parsedType.type === 'multipart') {\n const child = createMultipartParser(partType, emit, nesting + 1, `${label}.`)\n child.push(decodeBytes(body))\n child.finish()\n } else if (parsedType.type === 'text' || /(?:json|xml)$/.test(parsedType.subtype)) {\n const text = new TextDecoder(parsedType.parameters.get('charset') ?? 'utf-8').decode(decodeBytes(body))\n let formatted = text\n try {\n formatted = JSON.stringify(JSON.parse(text), null, 2)\n } catch {\n // Text and XML parts remain readable without JSON interpretation.\n }\n emit(`${formatted}\\n`)\n } else {\n // Base64 preserves binary part bytes without injecting control characters into the UI.\n emit(`[Binary part: ${body.length} bytes, base64]\\n${btoa(body)}\\n`)\n }\n }\n\n // Convert only completed parts, in bounded slices that do not exceed argument limits.\n // Byte strings, decoded text, and base64 can coexist with the buffer: peak memory is\n // several times the 8 MiB part limit, not one copy. The viewer separately caps retained output.\n const toByteString = (bytes: Uint8Array): string => {\n const slices: string[] = []\n for (let index = 0; index < bytes.length; index += 8192) {\n slices.push(String.fromCharCode(...bytes.subarray(index, index + 8192)))\n }\n return slices.join('')\n }\n\n const drain = (final: boolean): void => {\n while (!closed && offset + marker.length <= length) {\n const index = offset\n const matches =\n (index === 0 || (buffer[index - 2] === 13 && buffer[index - 1] === 10)) &&\n marker.every((byte, position) => buffer[index + position] === byte)\n if (!matches) {\n offset++\n continue\n }\n const afterMarker = index + marker.length\n // Remember incomplete delimiter lines too, including long transport padding.\n lineOffset = Math.max(lineOffset, afterMarker)\n while (lineOffset + 1 < length && !(buffer[lineOffset] === 13 && buffer[lineOffset + 1] === 10)) {\n lineOffset++\n }\n const lineEnd = lineOffset + 1 < length ? lineOffset : -1\n if (lineEnd < 0 && !final) {\n break\n }\n const suffix = toByteString(buffer.subarray(afterMarker, lineEnd < 0 ? length : lineEnd))\n const closing = /^--[ \\t]*$/.test(suffix)\n if (!closing && !/^[ \\t]*$/.test(suffix)) {\n offset = afterMarker\n lineOffset = 0\n continue\n }\n if (started) {\n emitPart(toByteString(buffer.subarray(0, Math.max(0, index - 2))))\n }\n started = true\n const consumed = lineEnd < 0 ? length : lineEnd + 2\n buffer.copyWithin(0, consumed, length)\n length -= consumed\n closed = closing\n offset = 0\n lineOffset = 0\n }\n // Keep room for the CRLF and an incomplete delimiter without counting framing as part bytes.\n if (length > MAX_PART_SIZE + marker.length + 6) {\n throw new Error('Multipart part exceeds the 8 MiB display limit.')\n }\n if (final && !closed) {\n throw new Error('Multipart response ended before its closing boundary.')\n }\n }\n\n return {\n push: (chunk) => {\n // Bound each append even when the transport delivers a very large chunk.\n for (let index = 0; index < chunk.length && !closed; index += 65536) {\n const slice = chunk.subarray(index, index + 65536)\n if (length + slice.length > buffer.length) {\n const grown = new Uint8Array(Math.max(buffer.length * 2, length + slice.length))\n grown.set(buffer.subarray(0, length))\n buffer = grown\n }\n buffer.set(slice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Aa,OAAO,SAAS,aAAa,UAAU,IAAI,SAAS,OAAO,CAAC;GACxF,MAAM,UAAU,aAAa,KAAK,MAAM;GACxC,IAAI,CAAC,WAAW,CAAC,WAAW,KAAK,MAAM,GAAG;IACxC,SAAS;IACT,aAAa;IACb;GACF;GACA,IAAI,SACF,SAAS,aAAa,OAAO,SAAS,GAAG,KAAK,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;GAEnE,UAAU;GACV,MAAM,WAAW,UAAU,IAAI,SAAS,UAAU;GAClD,OAAO,WAAW,GAAG,UAAU,MAAM;GACrC,UAAU;GACV,SAAS;GACT,SAAS;GACT,aAAa;EACf;EAEA,IAAI,SAAS,gBAAgB,OAAO,SAAS,GAC3C,MAAM,IAAI,MAAM,iDAAiD;EAEnE,IAAI,SAAS,CAAC,QACZ,MAAM,IAAI,MAAM,uDAAuD;CAE3E;CAEA,OAAO;EACL,OAAO,UAAU;GAEf,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,UAAU,CAAC,QAAQ,SAAS,OAAO;IACnE,MAAM,QAAQ,MAAM,SAAS,OAAO,QAAQ,KAAK;IACjD,IAAI,SAAS,MAAM,SAAS,OAAO,QAAQ;KACzC,MAAM,QAAQ,IAAI,WAAW,KAAK,IAAI,OAAO,SAAS,GAAG,SAAS,MAAM,MAAM,CAAC;KAC/E,MAAM,IAAI,OAAO,SAAS,GAAG,MAAM,CAAC;KACpC,SAAS;IACX;IACA,OAAO,IAAI,OAAO,MAAM;IACxB,UAAU,MAAM;IAChB,MAAM,KAAK;GACb;EACF;EACA,cAAc,MAAM,IAAI;CAC1B;AACF"}
@@ -17,7 +17,7 @@ var getResponseStreamFormat = (contentType) => {
17
17
  return type === "multipart" ? "multipart" : void 0;
18
18
  };
19
19
  /** Bound unfinished records, including servers that never send a delimiter. */
20
- var MAX_STREAM_RECORD_SIZE = 8 * 1024 * 1024;
20
+ var MAX_STREAM_RECORD_SIZE = 8388608;
21
21
  /** Decode complete records while retaining partial UTF-8 characters across network chunks. */
22
22
  var createResponseStreamParser = (contentType, emit) => {
23
23
  const format = getResponseStreamFormat(contentType);
@@ -1 +1 @@
1
- {"version":3,"file":"response-stream.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/helpers/response-stream.ts"],"sourcesContent":["import { isStreamingContentType } from '@scalar/helpers/http/is-streaming-content-type'\nimport { parseMimeType } from '@scalar/helpers/http/mime-type'\nimport { getUtf8ByteLength } from '@scalar/helpers/string/get-utf8-byte-length'\n\nimport { createMultipartParser } from './response-stream-multipart'\n\n/** Formats with record framing that can be displayed before the response finishes. */\ntype ResponseStreamFormat = 'text' | 'json-lines' | 'json-seq' | 'multipart'\n\n/** Only opt recognized streaming media types into the reader path. */\nexport const getResponseStreamFormat = (contentType: string): ResponseStreamFormat | undefined => {\n // Aggregate multipart/form-data and multipart/related bodies keep the buffered viewer.\n if (!isStreamingContentType(contentType)) {\n return undefined\n }\n const { essence, type, subtype } = parseMimeType(contentType)\n if (essence === 'text/event-stream') {\n return 'text'\n }\n if (['application/jsonl', 'application/x-ndjson', 'application/json-lines'].includes(essence)) {\n return 'json-lines'\n }\n if (subtype === 'json-seq' || subtype.endsWith('+json-seq')) {\n return 'json-seq'\n }\n return type === 'multipart' ? 'multipart' : undefined\n}\n\n/** A push parser keeps transport cancellation and UI updates outside the framing logic. */\nexport type ResponseStreamParser = {\n push: (chunk: Uint8Array) => void\n finish: () => void\n}\n\n/** Bound unfinished records, including servers that never send a delimiter. */\nconst MAX_STREAM_RECORD_SIZE = 8 * 1024 * 1024\n\n/** Decode complete records while retaining partial UTF-8 characters across network chunks. */\nexport const createResponseStreamParser = (contentType: string, emit: (text: string) => void): ResponseStreamParser => {\n const format = getResponseStreamFormat(contentType)\n if (format === 'multipart') {\n return createMultipartParser(contentType, emit)\n }\n const decoder = new TextDecoder('utf-8', { fatal: format !== 'text' && format !== undefined })\n let buffer = ''\n let recordBytes = 0\n let started = false\n let depth = 0\n let quoted = false\n let escaped = false\n\n const flush = (): void => {\n const record = buffer\n buffer = ''\n recordBytes = 0\n depth = 0\n quoted = false\n escaped = false\n if (!record.trim()) {\n return\n }\n let formatted: string\n try {\n const value: unknown = JSON.parse(record)\n // RFC 7464 requires trailing whitespace for non-self-delimiting primitive values.\n if (format === 'json-seq' && typeof value !== 'object' && typeof value !== 'string' && !/\\s$/.test(record)) {\n throw new Error('Truncated primitive')\n }\n if (format === 'json-seq' && value === null && !/\\s$/.test(record)) {\n throw new Error('Truncated null')\n }\n formatted = `${JSON.stringify(value, null, 2)}\\n`\n } catch {\n formatted = `[Invalid JSON record]\\n${record.trim()}\\n`\n }\n emit(formatted)\n }\n\n const consume = (text: string): void => {\n if (format !== 'json-lines' && format !== 'json-seq') {\n emit(text)\n return\n }\n for (const char of text) {\n if (format === 'json-seq' && char === '\\x1e') {\n flush()\n started = true\n continue\n }\n if (format === 'json-seq' && !started) {\n if (char.trim()) {\n throw new Error('JSON sequence record is missing its record separator.')\n }\n continue\n }\n buffer += char\n recordBytes += getUtf8ByteLength(char)\n if (recordBytes > MAX_STREAM_RECORD_SIZE) {\n throw new Error('Stream record exceeds the 8 MiB display limit.')\n }\n if (format === 'json-lines') {\n if (char === '\\n') {\n flush()\n }\n continue\n }\n if (quoted) {\n if (escaped) {\n escaped = false\n } else if (char === '\\\\') {\n escaped = true\n } else if (char === '\"') {\n quoted = false\n }\n } else if (char === '\"') {\n quoted = true\n } else if (char === '{' || char === '[') {\n depth++\n } else if (char === '}' || char === ']') {\n depth--\n }\n if (char === '\\n' && !quoted && depth === 0 && buffer.trim()) {\n flush()\n started = false\n }\n }\n }\n\n return {\n push: (chunk) => consume(decoder.decode(chunk, { stream: true })),\n finish: () => {\n consume(decoder.decode())\n flush()\n },\n }\n}\n"],"mappings":";;;;;;AAUA,IAAa,2BAA2B,gBAA0D;CAEhG,IAAI,CAAC,uBAAuB,WAAW,GACrC;CAEF,MAAM,EAAE,SAAS,MAAM,YAAY,cAAc,WAAW;CAC5D,IAAI,YAAY,qBACd,OA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AU;IACV;GACF;GACA,IAAI,WAAW,cAAc,CAAC,SAAS;IACrC,IAAI,KAAK,KAAK,GACZ,MAAM,IAAI,MAAM,uDAAuD;IAEzE;GACF;GACA,UAAU;GACV,eAAe,kBAAkB,IAAI;GACrC,IAAI,cAAc,wBAChB,MAAM,IAAI,MAAM,gDAAgD;GAElE,IAAI,WAAW,cAAc;IAC3B,IAAI,SAAS,MACX,MAAM;IAER;GACF;GACA,IAAI;QACE,SACF,UAAU;SACL,IAAI,SAAS,MAClB,UAAU;SACL,IAAI,SAAS,MAClB,SAAS;GAAA,OAEN,IAAI,SAAS,MAClB,SAAS;QACJ,IAAI,SAAS,OAAO,SAAS,KAClC;QACK,IAAI,SAAS,OAAO,SAAS,KAClC;GAEF,IAAI,SAAS,QAAQ,CAAC,UAAU,UAAU,KAAK,OAAO,KAAK,GAAG;IAC5D,MAAM;IACN,UAAU;GACZ;EACF;CACF;CAEA,OAAO;EACL,OAAO,UAAU,QAAQ,QAAQ,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,CAAC;EAChE,cAAc;GACZ,QAAQ,QAAQ,OAAO,CAAC;GACxB,MAAM;EACR;CACF;AACF"}
1
+ {"version":3,"file":"response-stream.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/helpers/response-stream.ts"],"sourcesContent":["import { isStreamingContentType } from '@scalar/helpers/http/is-streaming-content-type'\nimport { parseMimeType } from '@scalar/helpers/http/mime-type'\nimport { getUtf8ByteLength } from '@scalar/helpers/string/get-utf8-byte-length'\n\nimport { createMultipartParser } from './response-stream-multipart'\n\n/** Formats with record framing that can be displayed before the response finishes. */\ntype ResponseStreamFormat = 'text' | 'json-lines' | 'json-seq' | 'multipart'\n\n/** Only opt recognized streaming media types into the reader path. */\nexport const getResponseStreamFormat = (contentType: string): ResponseStreamFormat | undefined => {\n // Aggregate multipart/form-data and multipart/related bodies keep the buffered viewer.\n if (!isStreamingContentType(contentType)) {\n return undefined\n }\n const { essence, type, subtype } = parseMimeType(contentType)\n if (essence === 'text/event-stream') {\n return 'text'\n }\n if (['application/jsonl', 'application/x-ndjson', 'application/json-lines'].includes(essence)) {\n return 'json-lines'\n }\n if (subtype === 'json-seq' || subtype.endsWith('+json-seq')) {\n return 'json-seq'\n }\n return type === 'multipart' ? 'multipart' : undefined\n}\n\n/** A push parser keeps transport cancellation and UI updates outside the framing logic. */\nexport type ResponseStreamParser = {\n push: (chunk: Uint8Array) => void\n finish: () => void\n}\n\n/** Bound unfinished records, including servers that never send a delimiter. */\nconst MAX_STREAM_RECORD_SIZE = 8 * 1024 * 1024\n\n/** Decode complete records while retaining partial UTF-8 characters across network chunks. */\nexport const createResponseStreamParser = (contentType: string, emit: (text: string) => void): ResponseStreamParser => {\n const format = getResponseStreamFormat(contentType)\n if (format === 'multipart') {\n return createMultipartParser(contentType, emit)\n }\n const decoder = new TextDecoder('utf-8', { fatal: format !== 'text' && format !== undefined })\n let buffer = ''\n let recordBytes = 0\n let started = false\n let depth = 0\n let quoted = false\n let escaped = false\n\n const flush = (): void => {\n const record = buffer\n buffer = ''\n recordBytes = 0\n depth = 0\n quoted = false\n escaped = false\n if (!record.trim()) {\n return\n }\n let formatted: string\n try {\n const value: unknown = JSON.parse(record)\n // RFC 7464 requires trailing whitespace for non-self-delimiting primitive values.\n if (format === 'json-seq' && typeof value !== 'object' && typeof value !== 'string' && !/\\s$/.test(record)) {\n throw new Error('Truncated primitive')\n }\n if (format === 'json-seq' && value === null && !/\\s$/.test(record)) {\n throw new Error('Truncated null')\n }\n formatted = `${JSON.stringify(value, null, 2)}\\n`\n } catch {\n formatted = `[Invalid JSON record]\\n${record.trim()}\\n`\n }\n emit(formatted)\n }\n\n const consume = (text: string): void => {\n if (format !== 'json-lines' && format !== 'json-seq') {\n emit(text)\n return\n }\n for (const char of text) {\n if (format === 'json-seq' && char === '\\x1e') {\n flush()\n started = true\n continue\n }\n if (format === 'json-seq' && !started) {\n if (char.trim()) {\n throw new Error('JSON sequence record is missing its record separator.')\n }\n continue\n }\n buffer += char\n recordBytes += getUtf8ByteLength(char)\n if (recordBytes > MAX_STREAM_RECORD_SIZE) {\n throw new Error('Stream record exceeds the 8 MiB display limit.')\n }\n if (format === 'json-lines') {\n if (char === '\\n') {\n flush()\n }\n continue\n }\n if (quoted) {\n if (escaped) {\n escaped = false\n } else if (char === '\\\\') {\n escaped = true\n } else if (char === '\"') {\n quoted = false\n }\n } else if (char === '\"') {\n quoted = true\n } else if (char === '{' || char === '[') {\n depth++\n } else if (char === '}' || char === ']') {\n depth--\n }\n if (char === '\\n' && !quoted && depth === 0 && buffer.trim()) {\n flush()\n started = false\n }\n }\n }\n\n return {\n push: (chunk) => consume(decoder.decode(chunk, { stream: true })),\n finish: () => {\n consume(decoder.decode())\n flush()\n },\n }\n}\n"],"mappings":";;;;;;AAUA,IAAa,2BAA2B,gBAA0D;CAEhG,IAAI,CAAC,uBAAuB,WAAW,GACrC;CAEF,MAAM,EAAE,SAAS,MAAM,YAAY,cAAc,WAAW;CAC5D,IAAI,YAAY,qBACd,OAAO;CAET,IAAI;EAAC;EAAqB;EAAwB;CAAwB,CAAC,CAAC,SAAS,OAAO,GAC1F,OAAO;CAET,IAAI,YAAY,cAAc,QAAQ,SAAS,WAAW,GACxD,OAAO;CAET,OAAO,SAAS,cAAc,cAAc,KAAA;AAC9C;;AASA,IAAM,yBAAyB;;AAG/B,IAAa,8BAA8B,aAAqB,SAAuD;CACrH,MAAM,SAAS,wBAAwB,WAAW;CAClD,IAAI,WAAW,aACb,OAAO,sBAAsB,aAAa,IAAI;CAEhD,MAAM,UAAU,IAAI,YAAY,SAAS,EAAE,OAAO,WAAW,UAAU,WAAW,KAAA,EAAU,CAAC;CAC7F,IAAI,SAAS;CACb,IAAI,cAAc;CAClB,IAAI,UAAU;CACd,IAAI,QAAQ;CACZ,IAAI,SAAS;CACb,IAAI,UAAU;CAEd,MAAM,cAAoB;EACxB,MAAM,SAAS;EACf,SAAS;EACT,cAAc;EACd,QAAQ;EACR,SAAS;EACT,UAA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AAQ,QAAQ,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,CAAC;EAChE,cAAc;GACZ,QAAQ,QAAQ,OAAO,CAAC;GACxB,MAAM;EACR;CACF;AACF"}
@@ -1,2 +1 @@
1
- import ResponseBlock_default from "./ResponseBlock.vue.js";
2
- export { ResponseBlock_default as ResponseBlock };
1
+ export { default as ResponseBlock } from "./ResponseBlock.vue.js";
@@ -1,7 +1,7 @@
1
1
  import type { ServerMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
2
2
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
3
3
  import type { ServerObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
4
- import type { ClientLayout } from '../../../../v2/types/layout';
4
+ import type { ClientLayout } from '../../../types/layout.js';
5
5
  import { type History } from './AddressBarHistory.vue.js';
6
6
  /**
7
7
  * AddressBar component
@@ -1,6 +1,6 @@
1
1
  import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.js";
2
- import AddressBar_vue_vue_type_script_setup_true_lang_default from "./AddressBar.vue.script.js";
3
- /* empty css */
2
+ import AddressBar_vue_vue_type_script_setup_true_lang_default from "./AddressBar.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
4
  //#region src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue
5
5
  var AddressBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(AddressBar_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6edfa5a3"]]);
6
6
  //#endregion
@@ -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 /** An external example must finish loading before sending. */\n executionDisabled?: boolean\n /** Current request path */\n path: string\n /** Current request method */\n method: string\n /** Whether the request target belongs to an OpenAPI webhook. */\n isWebhook?: boolean\n /** Openapi document slug */\n documentSlug: string\n /** Currently selected example key for the current operation */\n exampleKey: string\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 { ScalarButton } from '@scalar/components/button'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { getSelector } from '@scalar/helpers/dom/get-selector'\nimport { getHttpMethodInfo } from '@scalar/helpers/http/http-info'\nimport { extractServerFromPath } from '@scalar/helpers/url/extract-server-from-path'\nimport { ScalarIconCopy, ScalarIconWarningCircle } from '@scalar/icons'\nimport { EditorView } from '@scalar/use-codemirror'\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.2/strict/openapi-document'\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n watch,\n} from 'vue'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { getOperationExampleKey } from '@/v2/blocks/operation-block/helpers/response-cache'\nimport { isPlaceholderPath } from '@/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path'\nimport { refocusBlurTarget } from '@/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target'\nimport { useLoadingAnimation } from '@/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation'\nimport { usePathMasking } from '@/v2/blocks/scalar-address-bar-block/hooks/use-path-masking'\nimport { CodeInput } from '@/v2/components/code-input'\nimport { ServerDropdown } from '@/v2/components/server'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport AddressBarHistory, { type History } from './AddressBarHistory.vue'\n\nconst {\n path,\n method,\n layout,\n eventBus,\n exampleKey,\n documentSlug,\n server,\n servers,\n environment,\n serverMeta,\n isWebhook = false,\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 /** Update the full destination URL used to deliver a webhook. */\n (e: 'update:webhook-url', url: string): void\n}>()\n\nconst { translate } = useLocalization()\n\n// ───────────────────────────────────────────────────────────────────\n// Template refs & reactive state\n// ───────────────────────────────────────────────────────────────────\n\nconst id = useId()\nconst sendButtonRef = useTemplateRef('sendButtonRef')\nconst mobileSendButtonRef = useTemplateRef('mobileSendButtonRef')\nconst addressBarRef = useTemplateRef('addressBarRef')\n\nconst { percentage, startLoading, stopLoading, isLoading } =\n useLoadingAnimation()\n\nconst pathConflict = ref<string | null>(null)\nconst methodConflict = ref<string | null>(null)\nconst tabbedOut = ref(false)\nconst isServerDropdownOpen = ref(false)\nconst isHistoryDropdownOpen = ref(false)\n\n// ───────────────────────────────────────────────────────────────────\n// Derived state\n// ───────────────────────────────────────────────────────────────────\n\n/** Keeps the cursor visible past the fade-right overlay while typing */\nconst addressBarScrollMargins = EditorView.scrollMargins.of(() => ({\n right: 24,\n}))\n\n/** Animated background transform for the loading indicator */\nconst style = computed(() => ({\n backgroundColor: `color-mix(in srgb, transparent 90%, ${getHttpMethodInfo(method).colorVar})`,\n transform: `translate3d(-${percentage.value}%,0,0)`,\n}))\n\n/** Whether there is a path or method conflict */\nconst hasConflict = computed(() => methodConflict.value || pathConflict.value)\n\n/**\n * Placeholder for the path field.\n *\n * Webhooks have no server to prefix the path, so the field doubles as the full\n * destination URL. Hint that a complete URL (including the host) is expected,\n * rather than a bare path.\n */\nconst pathPlaceholder = computed(() => {\n if (server) {\n return ''\n }\n return isWebhook\n ? translate('apiClient.addressBar.webhookUrlPlaceholder')\n : translate('apiClient.addressBar.urlPlaceholder')\n})\n\n/** Whether either dropdown (server or history) is open */\nconst isDropdownOpen = computed(\n () => isServerDropdownOpen.value || isHistoryDropdownOpen.value,\n)\n\n/** Uniquely identifies the currently selected operation + example */\nconst uniqueKey = computed(() =>\n getOperationExampleKey(method, path, exampleKey, documentSlug),\n)\n\n/** Clear conflict state when switching to a different operation */\nwatch(uniqueKey, () => {\n pathConflict.value = null\n methodConflict.value = null\n})\n\n// ───────────────────────────────────────────────────────────────────\n// Focus helpers\n// ───────────────────────────────────────────────────────────────────\n\nconst handleFocusSendButton = (): void => {\n const desktop = sendButtonRef.value?.$el\n const mobile = mobileSendButtonRef.value?.$el\n\n // Focus whichever send button is currently visible\n if (desktop && desktop.offsetParent !== null) {\n desktop.focus()\n } else {\n mobile?.focus()\n }\n}\n\nconst handleFocusAddressBar = (\n payload: ApiReferenceEvents['ui:focus:address-bar'],\n): void => {\n // On non-desktop layouts, if already focused we let the browser handle the\n // native behavior (e.g. selecting the browser's own address bar).\n if (addressBarRef.value?.isFocused && layout !== 'desktop') {\n return\n }\n\n addressBarRef.value?.focus('end')\n\n if (payload && 'clear' in payload && payload.clear) {\n addressBarRef.value?.setCodeMirrorContent('')\n }\n\n if (payload && 'event' in payload) {\n payload.event.preventDefault()\n }\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Path masking\n//\n// Drafts on `/` and auto-generated `/_scalar_temp...` paths are internal\n// placeholders — the address bar focuses and clears on mount and on\n// navigation so the user sees a blank prompt instead of the internal\n// path. The deferred mask only clears when CodeMirror still contains that\n// placeholder path, so a user edit that lands before the frame is preserved.\n// ───────────────────────────────────────────────────────────────────\n\nusePathMasking({\n isReady: () => addressBarRef.value?.codeMirror,\n operationKey: () => uniqueKey.value,\n shouldMask: () => isPlaceholderPath(path, documentSlug),\n // Defer to the next frame so focus() runs after click-handler side\n // effects that move focus (e.g. a dropdown refocusing its trigger),\n // which would otherwise blur our input and emit a spurious path\n // update against the now-empty value.\n onMask: () =>\n requestAnimationFrame(() => {\n const editorContent =\n addressBarRef.value?.codeMirror?.state.doc.toString()\n\n if (editorContent && editorContent !== path) {\n return\n }\n\n handleFocusAddressBar({ clear: true })\n }),\n})\n\n// ───────────────────────────────────────────────────────────────────\n// Server extraction\n// ───────────────────────────────────────────────────────────────────\n\n/** If the path contains a server URL, extract it and select or add that server */\nconst extractAndSelectServer = (targetPath: string): string => {\n const extracted = extractServerFromPath(targetPath)\n if (!extracted) {\n return targetPath\n }\n\n const [url, remainingPath] = extracted\n\n // Server is already selected — nothing to do\n if (url === server?.url) {\n return remainingPath\n }\n\n const matchingServer = servers.find((s) => s.url === url)\n if (matchingServer) {\n eventBus.emit('server:update:selected', { url, meta: serverMeta })\n } else {\n eventBus.emit('server:add:server', {\n url,\n select: true,\n meta: { type: 'operation', path, method },\n })\n }\n\n return remainingPath\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Path / method updates\n// ───────────────────────────────────────────────────────────────────\n\nconst normalizePath = (value: string): string =>\n value.startsWith('/') ? value : `/${value}`\n\n/** Emit a path/method update and reconcile conflicts + cursor state on the result */\nconst emitPathMethodUpdate = (\n targetMethod: string,\n targetPath: string,\n blurTargetSelector: string | null = null,\n): void => {\n if (isWebhook) {\n // A webhook has no OpenAPI server, so the field holds the full destination\n // URL. Keep exactly what the user entered — do not split it into an invisible\n // server plus a leftover path, and do not force a leading slash. That split\n // is what made a typed URL collapse to a stray \"/\" on blur.\n const webhookUrl = targetPath.trim()\n addressBarRef.value?.setCodeMirrorContent(webhookUrl)\n emit('update:webhook-url', webhookUrl)\n methodConflict.value = null\n pathConflict.value = null\n nextTick(() => refocusBlurTarget(blurTargetSelector))\n return\n }\n\n const extractedPath = extractAndSelectServer(targetPath)\n const normalizedPath = normalizePath(extractedPath)\n\n // Keep CodeMirror in sync so a conflict does not leave a stale value on screen\n addressBarRef.value?.setCodeMirrorContent(normalizedPath)\n\n eventBus.emit('operation:update:pathMethod', {\n meta: { method, path },\n blurTargetSelector,\n payload: { method: targetMethod, path: normalizedPath },\n callback: (status, returnedSelector) => {\n if (status === 'success' || status === 'no-change') {\n methodConflict.value = null\n pathConflict.value = null\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 return\n }\n\n // Edge case: pasting a full URL extracts the server but leaves the path\n // unchanged. CodeMirror still shows the full URL, so force it back to\n // just the path.\n const mirrorContent = addressBarRef.value?.codeMirrorRef?.textContent\n if (\n status === 'no-change' &&\n mirrorContent &&\n mirrorContent !== extractedPath\n ) {\n addressBarRef.value?.setCodeMirrorContent(extractedPath)\n }\n\n nextTick(() => refocusBlurTarget(returnedSelector))\n },\n })\n}\n\n/** Change the operation's method, preferring the conflicting path if present */\nconst handleMethodChange = (newMethod: string): void =>\n emitPathMethodUpdate(newMethod, pathConflict.value ?? path)\n\n/**\n * Save the path on blur and replay the click that caused the blur (so e.g. a\n * click on the Send button still fires after the async update resolves).\n *\n * Tab-outs do not replay — tabbing to a button should not trigger its click\n * (`tabbedOut` is set on `@keydown.tab`).\n *\n * Programmatic focus moves also do not replay. On first navigation into a\n * draft operation, `usePathMasking` focuses and clears the address bar while\n * `ScalarSidebarNestedItems` focuses the drilled-in Back button in\n * `nextTick`. That steals focus from CodeMirror, fires blur with a\n * `relatedTarget` (the Back button), and without a guard we would treat it\n * like a user click: capture the selector, then `refocusBlurTarget` would\n * synthesize `.click()` on Back and navigate away.\n *\n * `FocusEvent.sourceCapabilities` is null when no input device caused the\n * focus change (e.g. `element.focus()`). A real pointer click sets it on the\n * blur that precedes the click, so we still replay Send and other buttons.\n */\nconst handlePathBlur = (newPath: string, event: FocusEvent): void => {\n const relatedTarget =\n event.relatedTarget instanceof Element ? event.relatedTarget : null\n const blurTargetSelector =\n tabbedOut.value ||\n ('sourceCapabilities' in event && event.sourceCapabilities === null)\n ? null\n : getSelector(relatedTarget)\n tabbedOut.value = false\n\n emitPathMethodUpdate(\n methodConflict.value ?? method,\n newPath,\n blurTargetSelector,\n )\n}\n\n/** Save the path on Enter and trigger the Send button after the update resolves */\nconst handlePathSubmit = (\n newPath: string,\n event: KeyboardEvent | FocusEvent,\n): void => {\n // Prevent the global hotkey listener from also handling this Enter press\n event.stopPropagation()\n\n emitPathMethodUpdate(\n methodConflict.value ?? method,\n newPath,\n '[data-addressbar-action=\"send\"]',\n )\n}\n\n/** Unset the server when backspace is pressed on an empty path */\nconst handlePathBackspace = (event: KeyboardEvent): void => {\n if (event.target instanceof HTMLElement && event.target.innerText === '\\n') {\n // A webhook has no server to unset; its full URL lives in the field itself.\n if (isWebhook) {\n return\n }\n eventBus.emit('server:update:selected', { url: '', meta: serverMeta })\n }\n}\n\nconst handleServerSelect = (\n payload: ApiReferenceEvents['server:update:selected'],\n): void => {\n eventBus.emit('server:update:selected', payload)\n}\n\nconst handleServerVariable = (\n payload: ApiReferenceEvents['server:update:variables'],\n): void => {\n eventBus.emit('server:update:variables', payload)\n}\n\n/** Address bar copy is handled in OperationBlock (same URL as Send). */\nconst requestCopyUrl = (): void => {\n eventBus.emit('copy-url:address-bar')\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Navigation\n// ───────────────────────────────────────────────────────────────────\n\nconst navigateToServersPage = (): void => {\n if (serverMeta.type === 'operation') {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'servers',\n operationPath: serverMeta.path,\n method: serverMeta.method,\n })\n return\n }\n\n eventBus.emit('ui:navigate', { page: 'document', path: 'servers' })\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Lifecycle\n// ───────────────────────────────────────────────────────────────────\n\nconst unsubscribes: Array<() => void> = []\n\nonMounted(() => {\n unsubscribes.push(\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})\n\nonBeforeUnmount(() => {\n for (const unsubscribe of unsubscribes) {\n unsubscribe()\n }\n\n // Prevents the loading animation from continuing after unmount\n stopLoading()\n})\n\ndefineExpose({\n methodConflict,\n pathConflict,\n})\n</script>\n<template>\n <!--\n Address bar.\n\n The wide-container layout is a single row:\n `[Method | URL | Copy | History | Send]`. When the surrounding\n `@container` drops below `@3xl` only the send button moves to a\n second row, where it spans the full width. The method and copy\n controls stay inside the bar at every width so they keep belonging\n to the URL they act on rather than floating beside it.\n -->\n <div\n class=\"order-last flex h-auto w-full max-w-3xl grow-3 flex-wrap items-stretch [--scalar-address-bar-height:32px] @3xl:order-0 @3xl:flex-nowrap\">\n <!-- Address Bar -->\n <div\n :id=\"id\"\n class=\"address-bar-bg-states text-xxs group relative flex h-(--scalar-address-bar-height) w-full flex-1 flex-row items-stretch rounded-lg p-0.75\"\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\n <!-- Only Send leaves the bar below `@3xl`; see the trailing row. -->\n <div class=\"flex\">\n <HttpMethod\n :isEditable=\"layout !== 'modal' && !isWebhook\"\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 dir=\"ltr\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"servers.length\"\n :layout=\"isWebhook ? 'modal' : layout\"\n :meta=\"serverMeta\"\n :server=\"server\"\n :servers=\"servers\"\n :target=\"id\"\n @update:open=\"(value) => (isServerDropdownOpen = value)\"\n @update:selectedServer=\"handleServerSelect\"\n @update:servers=\"navigateToServersPage\"\n @update:variable=\"handleServerVariable\" />\n\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n alwaysEmitChange\n :aria-label=\"translate('apiClient.addressBar.path')\"\n class=\"ml-1 min-w-fit pl-px outline-none\"\n disableCloseBrackets\n :disabled=\"layout === 'modal' && !isWebhook\"\n disableEnter\n disableTabIndent\n :emitOnBlur=\"false\"\n :environment=\"environment\"\n :extensions=\"[addressBarScrollMargins]\"\n importCurl\n :layout=\"layout\"\n :modelValue=\"path\"\n :placeholder=\"pathPlaceholder\"\n server\n @blur=\"handlePathBlur\"\n @keydown.delete=\"handlePathBackspace\"\n @keydown.tab=\"tabbedOut = true\"\n @submit=\"handlePathSubmit\" />\n </div>\n\n <!-- Copy url button -->\n <ScalarButton\n class=\"hover:bg-b-3 mx-1 flex\"\n size=\"xs\"\n variant=\"ghost\"\n @click=\"requestCopyUrl\">\n <ScalarIconCopy />\n <span class=\"sr-only\">{{\n translate('apiClient.addressBar.copyUrl')\n }}</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 {{\n translate('apiClient.addressBar.duplicateRequest', {\n method: (methodConflict ?? method).toUpperCase(),\n path: pathConflict ?? path,\n })\n }}\n </div>\n </div>\n </div>\n\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"relative hidden h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold @3xl:flex\"\n data-addressbar-action=\"send\"\n :disabled=\"isLoading || executionDisabled\"\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 flex\">{{\n translate('apiClient.addressBar.send')\n }}</span>\n </span>\n <span class=\"sr-only\"\n >{{\n translate('apiClient.addressBar.sendRequest', {\n method,\n url: `${server?.url ?? ''}${path}`,\n })\n }}\n </span>\n </ScalarButton>\n </div>\n\n <!--\n Below `@3xl` the send button moves out of the bar onto its own row\n and spans the full width, so the primary action stays easy to hit\n once the container is too narrow to hold it beside the URL.\n -->\n <ScalarButton\n ref=\"mobileSendButtonRef\"\n class=\"relative mt-2 h-(--scalar-address-bar-height) w-full shrink-0 justify-center overflow-hidden py-1 font-bold @3xl:hidden\"\n data-addressbar-action=\"send\"\n :disabled=\"isLoading || executionDisabled\"\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\">{{\n translate('apiClient.addressBar.send')\n }}</span>\n </span>\n <span class=\"sr-only\"\n >{{\n translate('apiClient.addressBar.sendRequest', {\n method,\n url: `${server?.url ?? ''}${path}`,\n })\n }}\n </span>\n </ScalarButton>\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 -ms-overflow-style: none;\n /* Fade the URL at the viewport edges. Mask lives on the scrollport (this\n element) rather than on `.cm-scroller`, whose width follows the URL's\n full content and pushes the right edge off-screen when overflowing. */\n mask-image: linear-gradient(\n to right,\n transparent 0,\n black 6px,\n black calc(100% - 24px),\n transparent 100%\n );\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\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":["_sfc_main"],"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 /** An external example must finish loading before sending. */\n executionDisabled?: boolean\n /** Current request path */\n path: string\n /** Current request method */\n method: string\n /** Whether the request target belongs to an OpenAPI webhook. */\n isWebhook?: boolean\n /** Openapi document slug */\n documentSlug: string\n /** Currently selected example key for the current operation */\n exampleKey: string\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 { ScalarButton } from '@scalar/components/button'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { getSelector } from '@scalar/helpers/dom/get-selector'\nimport { getHttpMethodInfo } from '@scalar/helpers/http/http-info'\nimport { extractServerFromPath } from '@scalar/helpers/url/extract-server-from-path'\nimport { ScalarIconCopy, ScalarIconWarningCircle } from '@scalar/icons'\nimport { EditorView } from '@scalar/use-codemirror'\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.2/strict/openapi-document'\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n watch,\n} from 'vue'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { getOperationExampleKey } from '@/v2/blocks/operation-block/helpers/response-cache'\nimport { isPlaceholderPath } from '@/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path'\nimport { refocusBlurTarget } from '@/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target'\nimport { useLoadingAnimation } from '@/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation'\nimport { usePathMasking } from '@/v2/blocks/scalar-address-bar-block/hooks/use-path-masking'\nimport { CodeInput } from '@/v2/components/code-input'\nimport { ServerDropdown } from '@/v2/components/server'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport AddressBarHistory, { type History } from './AddressBarHistory.vue'\n\nconst {\n path,\n method,\n layout,\n eventBus,\n exampleKey,\n documentSlug,\n server,\n servers,\n environment,\n serverMeta,\n isWebhook = false,\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 /** Update the full destination URL used to deliver a webhook. */\n (e: 'update:webhook-url', url: string): void\n}>()\n\nconst { translate } = useLocalization()\n\n// ───────────────────────────────────────────────────────────────────\n// Template refs & reactive state\n// ───────────────────────────────────────────────────────────────────\n\nconst id = useId()\nconst sendButtonRef = useTemplateRef('sendButtonRef')\nconst mobileSendButtonRef = useTemplateRef('mobileSendButtonRef')\nconst addressBarRef = useTemplateRef('addressBarRef')\n\nconst { percentage, startLoading, stopLoading, isLoading } =\n useLoadingAnimation()\n\nconst pathConflict = ref<string | null>(null)\nconst methodConflict = ref<string | null>(null)\nconst tabbedOut = ref(false)\nconst isServerDropdownOpen = ref(false)\nconst isHistoryDropdownOpen = ref(false)\n\n// ───────────────────────────────────────────────────────────────────\n// Derived state\n// ───────────────────────────────────────────────────────────────────\n\n/** Keeps the cursor visible past the fade-right overlay while typing */\nconst addressBarScrollMargins = EditorView.scrollMargins.of(() => ({\n right: 24,\n}))\n\n/** Animated background transform for the loading indicator */\nconst style = computed(() => ({\n backgroundColor: `color-mix(in srgb, transparent 90%, ${getHttpMethodInfo(method).colorVar})`,\n transform: `translate3d(-${percentage.value}%,0,0)`,\n}))\n\n/** Whether there is a path or method conflict */\nconst hasConflict = computed(() => methodConflict.value || pathConflict.value)\n\n/**\n * Placeholder for the path field.\n *\n * Webhooks have no server to prefix the path, so the field doubles as the full\n * destination URL. Hint that a complete URL (including the host) is expected,\n * rather than a bare path.\n */\nconst pathPlaceholder = computed(() => {\n if (server) {\n return ''\n }\n return isWebhook\n ? translate('apiClient.addressBar.webhookUrlPlaceholder')\n : translate('apiClient.addressBar.urlPlaceholder')\n})\n\n/** Whether either dropdown (server or history) is open */\nconst isDropdownOpen = computed(\n () => isServerDropdownOpen.value || isHistoryDropdownOpen.value,\n)\n\n/** Uniquely identifies the currently selected operation + example */\nconst uniqueKey = computed(() =>\n getOperationExampleKey(method, path, exampleKey, documentSlug),\n)\n\n/** Clear conflict state when switching to a different operation */\nwatch(uniqueKey, () => {\n pathConflict.value = null\n methodConflict.value = null\n})\n\n// ───────────────────────────────────────────────────────────────────\n// Focus helpers\n// ───────────────────────────────────────────────────────────────────\n\nconst handleFocusSendButton = (): void => {\n const desktop = sendButtonRef.value?.$el\n const mobile = mobileSendButtonRef.value?.$el\n\n // Focus whichever send button is currently visible\n if (desktop && desktop.offsetParent !== null) {\n desktop.focus()\n } else {\n mobile?.focus()\n }\n}\n\nconst handleFocusAddressBar = (\n payload: ApiReferenceEvents['ui:focus:address-bar'],\n): void => {\n // On non-desktop layouts, if already focused we let the browser handle the\n // native behavior (e.g. selecting the browser's own address bar).\n if (addressBarRef.value?.isFocused && layout !== 'desktop') {\n return\n }\n\n addressBarRef.value?.focus('end')\n\n if (payload && 'clear' in payload && payload.clear) {\n addressBarRef.value?.setCodeMirrorContent('')\n }\n\n if (payload && 'event' in payload) {\n payload.event.preventDefault()\n }\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Path masking\n//\n// Drafts on `/` and auto-generated `/_scalar_temp...` paths are internal\n// placeholders — the address bar focuses and clears on mount and on\n// navigation so the user sees a blank prompt instead of the internal\n// path. The deferred mask only clears when CodeMirror still contains that\n// placeholder path, so a user edit that lands before the frame is preserved.\n// ───────────────────────────────────────────────────────────────────\n\nusePathMasking({\n isReady: () => addressBarRef.value?.codeMirror,\n operationKey: () => uniqueKey.value,\n shouldMask: () => isPlaceholderPath(path, documentSlug),\n // Defer to the next frame so focus() runs after click-handler side\n // effects that move focus (e.g. a dropdown refocusing its trigger),\n // which would otherwise blur our input and emit a spurious path\n // update against the now-empty value.\n onMask: () =>\n requestAnimationFrame(() => {\n const editorContent =\n addressBarRef.value?.codeMirror?.state.doc.toString()\n\n if (editorContent && editorContent !== path) {\n return\n }\n\n handleFocusAddressBar({ clear: true })\n }),\n})\n\n// ───────────────────────────────────────────────────────────────────\n// Server extraction\n// ───────────────────────────────────────────────────────────────────\n\n/** If the path contains a server URL, extract it and select or add that server */\nconst extractAndSelectServer = (targetPath: string): string => {\n const extracted = extractServerFromPath(targetPath)\n if (!extracted) {\n return targetPath\n }\n\n const [url, remainingPath] = extracted\n\n // Server is already selected — nothing to do\n if (url === server?.url) {\n return remainingPath\n }\n\n const matchingServer = servers.find((s) => s.url === url)\n if (matchingServer) {\n eventBus.emit('server:update:selected', { url, meta: serverMeta })\n } else {\n eventBus.emit('server:add:server', {\n url,\n select: true,\n meta: { type: 'operation', path, method },\n })\n }\n\n return remainingPath\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Path / method updates\n// ───────────────────────────────────────────────────────────────────\n\nconst normalizePath = (value: string): string =>\n value.startsWith('/') ? value : `/${value}`\n\n/** Emit a path/method update and reconcile conflicts + cursor state on the result */\nconst emitPathMethodUpdate = (\n targetMethod: string,\n targetPath: string,\n blurTargetSelector: string | null = null,\n): void => {\n if (isWebhook) {\n // A webhook has no OpenAPI server, so the field holds the full destination\n // URL. Keep exactly what the user entered — do not split it into an invisible\n // server plus a leftover path, and do not force a leading slash. That split\n // is what made a typed URL collapse to a stray \"/\" on blur.\n const webhookUrl = targetPath.trim()\n addressBarRef.value?.setCodeMirrorContent(webhookUrl)\n emit('update:webhook-url', webhookUrl)\n methodConflict.value = null\n pathConflict.value = null\n nextTick(() => refocusBlurTarget(blurTargetSelector))\n return\n }\n\n const extractedPath = extractAndSelectServer(targetPath)\n const normalizedPath = normalizePath(extractedPath)\n\n // Keep CodeMirror in sync so a conflict does not leave a stale value on screen\n addressBarRef.value?.setCodeMirrorContent(normalizedPath)\n\n eventBus.emit('operation:update:pathMethod', {\n meta: { method, path },\n blurTargetSelector,\n payload: { method: targetMethod, path: normalizedPath },\n callback: (status, returnedSelector) => {\n if (status === 'success' || status === 'no-change') {\n methodConflict.value = null\n pathConflict.value = null\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 return\n }\n\n // Edge case: pasting a full URL extracts the server but leaves the path\n // unchanged. CodeMirror still shows the full URL, so force it back to\n // just the path.\n const mirrorContent = addressBarRef.value?.codeMirrorRef?.textContent\n if (\n status === 'no-change' &&\n mirrorContent &&\n mirrorContent !== extractedPath\n ) {\n addressBarRef.value?.setCodeMirrorContent(extractedPath)\n }\n\n nextTick(() => refocusBlurTarget(returnedSelector))\n },\n })\n}\n\n/** Change the operation's method, preferring the conflicting path if present */\nconst handleMethodChange = (newMethod: string): void =>\n emitPathMethodUpdate(newMethod, pathConflict.value ?? path)\n\n/**\n * Save the path on blur and replay the click that caused the blur (so e.g. a\n * click on the Send button still fires after the async update resolves).\n *\n * Tab-outs do not replay — tabbing to a button should not trigger its click\n * (`tabbedOut` is set on `@keydown.tab`).\n *\n * Programmatic focus moves also do not replay. On first navigation into a\n * draft operation, `usePathMasking` focuses and clears the address bar while\n * `ScalarSidebarNestedItems` focuses the drilled-in Back button in\n * `nextTick`. That steals focus from CodeMirror, fires blur with a\n * `relatedTarget` (the Back button), and without a guard we would treat it\n * like a user click: capture the selector, then `refocusBlurTarget` would\n * synthesize `.click()` on Back and navigate away.\n *\n * `FocusEvent.sourceCapabilities` is null when no input device caused the\n * focus change (e.g. `element.focus()`). A real pointer click sets it on the\n * blur that precedes the click, so we still replay Send and other buttons.\n */\nconst handlePathBlur = (newPath: string, event: FocusEvent): void => {\n const relatedTarget =\n event.relatedTarget instanceof Element ? event.relatedTarget : null\n const blurTargetSelector =\n tabbedOut.value ||\n ('sourceCapabilities' in event && event.sourceCapabilities === null)\n ? null\n : getSelector(relatedTarget)\n tabbedOut.value = false\n\n emitPathMethodUpdate(\n methodConflict.value ?? method,\n newPath,\n blurTargetSelector,\n )\n}\n\n/** Save the path on Enter and trigger the Send button after the update resolves */\nconst handlePathSubmit = (\n newPath: string,\n event: KeyboardEvent | FocusEvent,\n): void => {\n // Prevent the global hotkey listener from also handling this Enter press\n event.stopPropagation()\n\n emitPathMethodUpdate(\n methodConflict.value ?? method,\n newPath,\n '[data-addressbar-action=\"send\"]',\n )\n}\n\n/** Unset the server when backspace is pressed on an empty path */\nconst handlePathBackspace = (event: KeyboardEvent): void => {\n if (event.target instanceof HTMLElement && event.target.innerText === '\\n') {\n // A webhook has no server to unset; its full URL lives in the field itself.\n if (isWebhook) {\n return\n }\n eventBus.emit('server:update:selected', { url: '', meta: serverMeta })\n }\n}\n\nconst handleServerSelect = (\n payload: ApiReferenceEvents['server:update:selected'],\n): void => {\n eventBus.emit('server:update:selected', payload)\n}\n\nconst handleServerVariable = (\n payload: ApiReferenceEvents['server:update:variables'],\n): void => {\n eventBus.emit('server:update:variables', payload)\n}\n\n/** Address bar copy is handled in OperationBlock (same URL as Send). */\nconst requestCopyUrl = (): void => {\n eventBus.emit('copy-url:address-bar')\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Navigation\n// ───────────────────────────────────────────────────────────────────\n\nconst navigateToServersPage = (): void => {\n if (serverMeta.type === 'operation') {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'servers',\n operationPath: serverMeta.path,\n method: serverMeta.method,\n })\n return\n }\n\n eventBus.emit('ui:navigate', { page: 'document', path: 'servers' })\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Lifecycle\n// ───────────────────────────────────────────────────────────────────\n\nconst unsubscribes: Array<() => void> = []\n\nonMounted(() => {\n unsubscribes.push(\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})\n\nonBeforeUnmount(() => {\n for (const unsubscribe of unsubscribes) {\n unsubscribe()\n }\n\n // Prevents the loading animation from continuing after unmount\n stopLoading()\n})\n\ndefineExpose({\n methodConflict,\n pathConflict,\n})\n</script>\n<template>\n <!--\n Address bar.\n\n The wide-container layout is a single row:\n `[Method | URL | Copy | History | Send]`. When the surrounding\n `@container` drops below `@3xl` only the send button moves to a\n second row, where it spans the full width. The method and copy\n controls stay inside the bar at every width so they keep belonging\n to the URL they act on rather than floating beside it.\n -->\n <div\n class=\"order-last flex h-auto w-full max-w-3xl grow-3 flex-wrap items-stretch [--scalar-address-bar-height:32px] @3xl:order-0 @3xl:flex-nowrap\">\n <!-- Address Bar -->\n <div\n :id=\"id\"\n class=\"address-bar-bg-states text-xxs group relative flex h-(--scalar-address-bar-height) w-full flex-1 flex-row items-stretch rounded-lg p-0.75\"\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\n <!-- Only Send leaves the bar below `@3xl`; see the trailing row. -->\n <div class=\"flex\">\n <HttpMethod\n :isEditable=\"layout !== 'modal' && !isWebhook\"\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 dir=\"ltr\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"servers.length\"\n :layout=\"isWebhook ? 'modal' : layout\"\n :meta=\"serverMeta\"\n :server=\"server\"\n :servers=\"servers\"\n :target=\"id\"\n @update:open=\"(value) => (isServerDropdownOpen = value)\"\n @update:selectedServer=\"handleServerSelect\"\n @update:servers=\"navigateToServersPage\"\n @update:variable=\"handleServerVariable\" />\n\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n alwaysEmitChange\n :aria-label=\"translate('apiClient.addressBar.path')\"\n class=\"ml-1 min-w-fit pl-px outline-none\"\n disableCloseBrackets\n :disabled=\"layout === 'modal' && !isWebhook\"\n disableEnter\n disableTabIndent\n :emitOnBlur=\"false\"\n :environment=\"environment\"\n :extensions=\"[addressBarScrollMargins]\"\n importCurl\n :layout=\"layout\"\n :modelValue=\"path\"\n :placeholder=\"pathPlaceholder\"\n server\n @blur=\"handlePathBlur\"\n @keydown.delete=\"handlePathBackspace\"\n @keydown.tab=\"tabbedOut = true\"\n @submit=\"handlePathSubmit\" />\n </div>\n\n <!-- Copy url button -->\n <ScalarButton\n class=\"hover:bg-b-3 mx-1 flex\"\n size=\"xs\"\n variant=\"ghost\"\n @click=\"requestCopyUrl\">\n <ScalarIconCopy />\n <span class=\"sr-only\">{{\n translate('apiClient.addressBar.copyUrl')\n }}</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 {{\n translate('apiClient.addressBar.duplicateRequest', {\n method: (methodConflict ?? method).toUpperCase(),\n path: pathConflict ?? path,\n })\n }}\n </div>\n </div>\n </div>\n\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"relative hidden h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold @3xl:flex\"\n data-addressbar-action=\"send\"\n :disabled=\"isLoading || executionDisabled\"\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 flex\">{{\n translate('apiClient.addressBar.send')\n }}</span>\n </span>\n <span class=\"sr-only\"\n >{{\n translate('apiClient.addressBar.sendRequest', {\n method,\n url: `${server?.url ?? ''}${path}`,\n })\n }}\n </span>\n </ScalarButton>\n </div>\n\n <!--\n Below `@3xl` the send button moves out of the bar onto its own row\n and spans the full width, so the primary action stays easy to hit\n once the container is too narrow to hold it beside the URL.\n -->\n <ScalarButton\n ref=\"mobileSendButtonRef\"\n class=\"relative mt-2 h-(--scalar-address-bar-height) w-full shrink-0 justify-center overflow-hidden py-1 font-bold @3xl:hidden\"\n data-addressbar-action=\"send\"\n :disabled=\"isLoading || executionDisabled\"\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\">{{\n translate('apiClient.addressBar.send')\n }}</span>\n </span>\n <span class=\"sr-only\"\n >{{\n translate('apiClient.addressBar.sendRequest', {\n method,\n url: `${server?.url ?? ''}${path}`,\n })\n }}\n </span>\n </ScalarButton>\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 -ms-overflow-style: none;\n /* Fade the URL at the viewport edges. Mask lives on the scrollport (this\n element) rather than on `.cm-scroller`, whose width follows the URL's\n full content and pushes the right edge off-screen when overflowing. */\n mask-image: linear-gradient(\n to right,\n transparent 0,\n black 6px,\n black calc(100% - 24px),\n transparent 100%\n );\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\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":""}
@@ -399,4 +399,4 @@ var AddressBar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
399
399
  //#endregion
400
400
  export { AddressBar_vue_vue_type_script_setup_true_lang_default as default };
401
401
 
402
- //# sourceMappingURL=AddressBar.vue.script.js.map
402
+ //# sourceMappingURL=AddressBar.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddressBar.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createElementVNode","_unref","_normalizeClass","_normalizeStyle","_createVNode","HttpMethod","_createBlock","ServerDropdown","_createCommentVNode","CodeInput","_withKeys","_withCtx","_toDisplayString","AddressBarHistory"],"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 /** An external example must finish loading before sending. */\n executionDisabled?: boolean\n /** Current request path */\n path: string\n /** Current request method */\n method: string\n /** Whether the request target belongs to an OpenAPI webhook. */\n isWebhook?: boolean\n /** Openapi document slug */\n documentSlug: string\n /** Currently selected example key for the current operation */\n exampleKey: string\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 { ScalarButton } from '@scalar/components/button'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { getSelector } from '@scalar/helpers/dom/get-selector'\nimport { getHttpMethodInfo } from '@scalar/helpers/http/http-info'\nimport { extractServerFromPath } from '@scalar/helpers/url/extract-server-from-path'\nimport { ScalarIconCopy, ScalarIconWarningCircle } from '@scalar/icons'\nimport { EditorView } from '@scalar/use-codemirror'\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.2/strict/openapi-document'\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n watch,\n} from 'vue'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { getOperationExampleKey } from '@/v2/blocks/operation-block/helpers/response-cache'\nimport { isPlaceholderPath } from '@/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path'\nimport { refocusBlurTarget } from '@/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target'\nimport { useLoadingAnimation } from '@/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation'\nimport { usePathMasking } from '@/v2/blocks/scalar-address-bar-block/hooks/use-path-masking'\nimport { CodeInput } from '@/v2/components/code-input'\nimport { ServerDropdown } from '@/v2/components/server'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport AddressBarHistory, { type History } from './AddressBarHistory.vue'\n\nconst {\n path,\n method,\n layout,\n eventBus,\n exampleKey,\n documentSlug,\n server,\n servers,\n environment,\n serverMeta,\n isWebhook = false,\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 /** Update the full destination URL used to deliver a webhook. */\n (e: 'update:webhook-url', url: string): void\n}>()\n\nconst { translate } = useLocalization()\n\n// ───────────────────────────────────────────────────────────────────\n// Template refs & reactive state\n// ───────────────────────────────────────────────────────────────────\n\nconst id = useId()\nconst sendButtonRef = useTemplateRef('sendButtonRef')\nconst mobileSendButtonRef = useTemplateRef('mobileSendButtonRef')\nconst addressBarRef = useTemplateRef('addressBarRef')\n\nconst { percentage, startLoading, stopLoading, isLoading } =\n useLoadingAnimation()\n\nconst pathConflict = ref<string | null>(null)\nconst methodConflict = ref<string | null>(null)\nconst tabbedOut = ref(false)\nconst isServerDropdownOpen = ref(false)\nconst isHistoryDropdownOpen = ref(false)\n\n// ───────────────────────────────────────────────────────────────────\n// Derived state\n// ───────────────────────────────────────────────────────────────────\n\n/** Keeps the cursor visible past the fade-right overlay while typing */\nconst addressBarScrollMargins = EditorView.scrollMargins.of(() => ({\n right: 24,\n}))\n\n/** Animated background transform for the loading indicator */\nconst style = computed(() => ({\n backgroundColor: `color-mix(in srgb, transparent 90%, ${getHttpMethodInfo(method).colorVar})`,\n transform: `translate3d(-${percentage.value}%,0,0)`,\n}))\n\n/** Whether there is a path or method conflict */\nconst hasConflict = computed(() => methodConflict.value || pathConflict.value)\n\n/**\n * Placeholder for the path field.\n *\n * Webhooks have no server to prefix the path, so the field doubles as the full\n * destination URL. Hint that a complete URL (including the host) is expected,\n * rather than a bare path.\n */\nconst pathPlaceholder = computed(() => {\n if (server) {\n return ''\n }\n return isWebhook\n ? translate('apiClient.addressBar.webhookUrlPlaceholder')\n : translate('apiClient.addressBar.urlPlaceholder')\n})\n\n/** Whether either dropdown (server or history) is open */\nconst isDropdownOpen = computed(\n () => isServerDropdownOpen.value || isHistoryDropdownOpen.value,\n)\n\n/** Uniquely identifies the currently selected operation + example */\nconst uniqueKey = computed(() =>\n getOperationExampleKey(method, path, exampleKey, documentSlug),\n)\n\n/** Clear conflict state when switching to a different operation */\nwatch(uniqueKey, () => {\n pathConflict.value = null\n methodConflict.value = null\n})\n\n// ───────────────────────────────────────────────────────────────────\n// Focus helpers\n// ───────────────────────────────────────────────────────────────────\n\nconst handleFocusSendButton = (): void => {\n const desktop = sendButtonRef.value?.$el\n const mobile = mobileSendButtonRef.value?.$el\n\n // Focus whichever send button is currently visible\n if (desktop && desktop.offsetParent !== null) {\n desktop.focus()\n } else {\n mobile?.focus()\n }\n}\n\nconst handleFocusAddressBar = (\n payload: ApiReferenceEvents['ui:focus:address-bar'],\n): void => {\n // On non-desktop layouts, if already focused we let the browser handle the\n // native behavior (e.g. selecting the browser's own address bar).\n if (addressBarRef.value?.isFocused && layout !== 'desktop') {\n return\n }\n\n addressBarRef.value?.focus('end')\n\n if (payload && 'clear' in payload && payload.clear) {\n addressBarRef.value?.setCodeMirrorContent('')\n }\n\n if (payload && 'event' in payload) {\n payload.event.preventDefault()\n }\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Path masking\n//\n// Drafts on `/` and auto-generated `/_scalar_temp...` paths are internal\n// placeholders — the address bar focuses and clears on mount and on\n// navigation so the user sees a blank prompt instead of the internal\n// path. The deferred mask only clears when CodeMirror still contains that\n// placeholder path, so a user edit that lands before the frame is preserved.\n// ───────────────────────────────────────────────────────────────────\n\nusePathMasking({\n isReady: () => addressBarRef.value?.codeMirror,\n operationKey: () => uniqueKey.value,\n shouldMask: () => isPlaceholderPath(path, documentSlug),\n // Defer to the next frame so focus() runs after click-handler side\n // effects that move focus (e.g. a dropdown refocusing its trigger),\n // which would otherwise blur our input and emit a spurious path\n // update against the now-empty value.\n onMask: () =>\n requestAnimationFrame(() => {\n const editorContent =\n addressBarRef.value?.codeMirror?.state.doc.toString()\n\n if (editorContent && editorContent !== path) {\n return\n }\n\n handleFocusAddressBar({ clear: true })\n }),\n})\n\n// ───────────────────────────────────────────────────────────────────\n// Server extraction\n// ───────────────────────────────────────────────────────────────────\n\n/** If the path contains a server URL, extract it and select or add that server */\nconst extractAndSelectServer = (targetPath: string): string => {\n const extracted = extractServerFromPath(targetPath)\n if (!extracted) {\n return targetPath\n }\n\n const [url, remainingPath] = extracted\n\n // Server is already selected — nothing to do\n if (url === server?.url) {\n return remainingPath\n }\n\n const matchingServer = servers.find((s) => s.url === url)\n if (matchingServer) {\n eventBus.emit('server:update:selected', { url, meta: serverMeta })\n } else {\n eventBus.emit('server:add:server', {\n url,\n select: true,\n meta: { type: 'operation', path, method },\n })\n }\n\n return remainingPath\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Path / method updates\n// ───────────────────────────────────────────────────────────────────\n\nconst normalizePath = (value: string): string =>\n value.startsWith('/') ? value : `/${value}`\n\n/** Emit a path/method update and reconcile conflicts + cursor state on the result */\nconst emitPathMethodUpdate = (\n targetMethod: string,\n targetPath: string,\n blurTargetSelector: string | null = null,\n): void => {\n if (isWebhook) {\n // A webhook has no OpenAPI server, so the field holds the full destination\n // URL. Keep exactly what the user entered — do not split it into an invisible\n // server plus a leftover path, and do not force a leading slash. That split\n // is what made a typed URL collapse to a stray \"/\" on blur.\n const webhookUrl = targetPath.trim()\n addressBarRef.value?.setCodeMirrorContent(webhookUrl)\n emit('update:webhook-url', webhookUrl)\n methodConflict.value = null\n pathConflict.value = null\n nextTick(() => refocusBlurTarget(blurTargetSelector))\n return\n }\n\n const extractedPath = extractAndSelectServer(targetPath)\n const normalizedPath = normalizePath(extractedPath)\n\n // Keep CodeMirror in sync so a conflict does not leave a stale value on screen\n addressBarRef.value?.setCodeMirrorContent(normalizedPath)\n\n eventBus.emit('operation:update:pathMethod', {\n meta: { method, path },\n blurTargetSelector,\n payload: { method: targetMethod, path: normalizedPath },\n callback: (status, returnedSelector) => {\n if (status === 'success' || status === 'no-change') {\n methodConflict.value = null\n pathConflict.value = null\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 return\n }\n\n // Edge case: pasting a full URL extracts the server but leaves the path\n // unchanged. CodeMirror still shows the full URL, so force it back to\n // just the path.\n const mirrorContent = addressBarRef.value?.codeMirrorRef?.textContent\n if (\n status === 'no-change' &&\n mirrorContent &&\n mirrorContent !== extractedPath\n ) {\n addressBarRef.value?.setCodeMirrorContent(extractedPath)\n }\n\n nextTick(() => refocusBlurTarget(returnedSelector))\n },\n })\n}\n\n/** Change the operation's method, preferring the conflicting path if present */\nconst handleMethodChange = (newMethod: string): void =>\n emitPathMethodUpdate(newMethod, pathConflict.value ?? path)\n\n/**\n * Save the path on blur and replay the click that caused the blur (so e.g. a\n * click on the Send button still fires after the async update resolves).\n *\n * Tab-outs do not replay — tabbing to a button should not trigger its click\n * (`tabbedOut` is set on `@keydown.tab`).\n *\n * Programmatic focus moves also do not replay. On first navigation into a\n * draft operation, `usePathMasking` focuses and clears the address bar while\n * `ScalarSidebarNestedItems` focuses the drilled-in Back button in\n * `nextTick`. That steals focus from CodeMirror, fires blur with a\n * `relatedTarget` (the Back button), and without a guard we would treat it\n * like a user click: capture the selector, then `refocusBlurTarget` would\n * synthesize `.click()` on Back and navigate away.\n *\n * `FocusEvent.sourceCapabilities` is null when no input device caused the\n * focus change (e.g. `element.focus()`). A real pointer click sets it on the\n * blur that precedes the click, so we still replay Send and other buttons.\n */\nconst handlePathBlur = (newPath: string, event: FocusEvent): void => {\n const relatedTarget =\n event.relatedTarget instanceof Element ? event.relatedTarget : null\n const blurTargetSelector =\n tabbedOut.value ||\n ('sourceCapabilities' in event && event.sourceCapabilities === null)\n ? null\n : getSelector(relatedTarget)\n tabbedOut.value = false\n\n emitPathMethodUpdate(\n methodConflict.value ?? method,\n newPath,\n blurTargetSelector,\n )\n}\n\n/** Save the path on Enter and trigger the Send button after the update resolves */\nconst handlePathSubmit = (\n newPath: string,\n event: KeyboardEvent | FocusEvent,\n): void => {\n // Prevent the global hotkey listener from also handling this Enter press\n event.stopPropagation()\n\n emitPathMethodUpdate(\n methodConflict.value ?? method,\n newPath,\n '[data-addressbar-action=\"send\"]',\n )\n}\n\n/** Unset the server when backspace is pressed on an empty path */\nconst handlePathBackspace = (event: KeyboardEvent): void => {\n if (event.target instanceof HTMLElement && event.target.innerText === '\\n') {\n // A webhook has no server to unset; its full URL lives in the field itself.\n if (isWebhook) {\n return\n }\n eventBus.emit('server:update:selected', { url: '', meta: serverMeta })\n }\n}\n\nconst handleServerSelect = (\n payload: ApiReferenceEvents['server:update:selected'],\n): void => {\n eventBus.emit('server:update:selected', payload)\n}\n\nconst handleServerVariable = (\n payload: ApiReferenceEvents['server:update:variables'],\n): void => {\n eventBus.emit('server:update:variables', payload)\n}\n\n/** Address bar copy is handled in OperationBlock (same URL as Send). */\nconst requestCopyUrl = (): void => {\n eventBus.emit('copy-url:address-bar')\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Navigation\n// ───────────────────────────────────────────────────────────────────\n\nconst navigateToServersPage = (): void => {\n if (serverMeta.type === 'operation') {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'servers',\n operationPath: serverMeta.path,\n method: serverMeta.method,\n })\n return\n }\n\n eventBus.emit('ui:navigate', { page: 'document', path: 'servers' })\n}\n\n// ───────────────────────────────────────────────────────────────────\n// Lifecycle\n// ───────────────────────────────────────────────────────────────────\n\nconst unsubscribes: Array<() => void> = []\n\nonMounted(() => {\n unsubscribes.push(\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})\n\nonBeforeUnmount(() => {\n for (const unsubscribe of unsubscribes) {\n unsubscribe()\n }\n\n // Prevents the loading animation from continuing after unmount\n stopLoading()\n})\n\ndefineExpose({\n methodConflict,\n pathConflict,\n})\n</script>\n<template>\n <!--\n Address bar.\n\n The wide-container layout is a single row:\n `[Method | URL | Copy | History | Send]`. When the surrounding\n `@container` drops below `@3xl` only the send button moves to a\n second row, where it spans the full width. The method and copy\n controls stay inside the bar at every width so they keep belonging\n to the URL they act on rather than floating beside it.\n -->\n <div\n class=\"order-last flex h-auto w-full max-w-3xl grow-3 flex-wrap items-stretch [--scalar-address-bar-height:32px] @3xl:order-0 @3xl:flex-nowrap\">\n <!-- Address Bar -->\n <div\n :id=\"id\"\n class=\"address-bar-bg-states text-xxs group relative flex h-(--scalar-address-bar-height) w-full flex-1 flex-row items-stretch rounded-lg p-0.75\"\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\n <!-- Only Send leaves the bar below `@3xl`; see the trailing row. -->\n <div class=\"flex\">\n <HttpMethod\n :isEditable=\"layout !== 'modal' && !isWebhook\"\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 dir=\"ltr\">\n <!-- Servers -->\n <ServerDropdown\n v-if=\"servers.length\"\n :layout=\"isWebhook ? 'modal' : layout\"\n :meta=\"serverMeta\"\n :server=\"server\"\n :servers=\"servers\"\n :target=\"id\"\n @update:open=\"(value) => (isServerDropdownOpen = value)\"\n @update:selectedServer=\"handleServerSelect\"\n @update:servers=\"navigateToServersPage\"\n @update:variable=\"handleServerVariable\" />\n\n <!-- Path + URL + env vars -->\n <CodeInput\n ref=\"addressBarRef\"\n alwaysEmitChange\n :aria-label=\"translate('apiClient.addressBar.path')\"\n class=\"ml-1 min-w-fit pl-px outline-none\"\n disableCloseBrackets\n :disabled=\"layout === 'modal' && !isWebhook\"\n disableEnter\n disableTabIndent\n :emitOnBlur=\"false\"\n :environment=\"environment\"\n :extensions=\"[addressBarScrollMargins]\"\n importCurl\n :layout=\"layout\"\n :modelValue=\"path\"\n :placeholder=\"pathPlaceholder\"\n server\n @blur=\"handlePathBlur\"\n @keydown.delete=\"handlePathBackspace\"\n @keydown.tab=\"tabbedOut = true\"\n @submit=\"handlePathSubmit\" />\n </div>\n\n <!-- Copy url button -->\n <ScalarButton\n class=\"hover:bg-b-3 mx-1 flex\"\n size=\"xs\"\n variant=\"ghost\"\n @click=\"requestCopyUrl\">\n <ScalarIconCopy />\n <span class=\"sr-only\">{{\n translate('apiClient.addressBar.copyUrl')\n }}</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 {{\n translate('apiClient.addressBar.duplicateRequest', {\n method: (methodConflict ?? method).toUpperCase(),\n path: pathConflict ?? path,\n })\n }}\n </div>\n </div>\n </div>\n\n <ScalarButton\n ref=\"sendButtonRef\"\n class=\"relative hidden h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold @3xl:flex\"\n data-addressbar-action=\"send\"\n :disabled=\"isLoading || executionDisabled\"\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 flex\">{{\n translate('apiClient.addressBar.send')\n }}</span>\n </span>\n <span class=\"sr-only\"\n >{{\n translate('apiClient.addressBar.sendRequest', {\n method,\n url: `${server?.url ?? ''}${path}`,\n })\n }}\n </span>\n </ScalarButton>\n </div>\n\n <!--\n Below `@3xl` the send button moves out of the bar onto its own row\n and spans the full width, so the primary action stays easy to hit\n once the container is too narrow to hold it beside the URL.\n -->\n <ScalarButton\n ref=\"mobileSendButtonRef\"\n class=\"relative mt-2 h-(--scalar-address-bar-height) w-full shrink-0 justify-center overflow-hidden py-1 font-bold @3xl:hidden\"\n data-addressbar-action=\"send\"\n :disabled=\"isLoading || executionDisabled\"\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\">{{\n translate('apiClient.addressBar.send')\n }}</span>\n </span>\n <span class=\"sr-only\"\n >{{\n translate('apiClient.addressBar.sendRequest', {\n method,\n url: `${server?.url ?? ''}${path}`,\n })\n }}\n </span>\n </ScalarButton>\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 -ms-overflow-style: none;\n /* Fade the URL at the viewport edges. Mask lives on the scrollport (this\n element) rather than on `.cm-scroller`, whose width follows the URL's\n full content and pushes the right edge off-screen when overflowing. */\n mask-image: linear-gradient(\n to right,\n transparent 0,\n black 6px,\n black calc(100% - 24px),\n transparent 100%\n );\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\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;;;;;;;;;;;;;;;;;;;;;;;;;EAoFR,MAAM,OAAO;EASb,MAAM,EAAE,cAAc,gBAAgB;EAMtC,MAAM,KAAK,MAAM;EACjB,MAAM,gBAAgB,eAAe,eAAe;EACpD,MAAM,sBAAsB,eAAe,qBAAqB;EAChE,MAAM,gBAAgB,eAAe,eAAe;EAEpD,MAAM,EAAE,YAAY,cAAc,aAAa,cAC7C,oBAAoB;EAEtB,MAAM,eAAe,IAAmB,IAAI;EAC5C,MAAM,iBAAiB,IAAmB,IAAI;EAC9C,MAAM,YAAY,IAAI,KAAK;EAC3B,MAAM,uBAAuB,IAAI,KAAK;EACtC,MAAM,wBAAwB,IAAI,KAAK;;EAOvC,MAAM,0BAA0B,WAAW,cAAc,UAAU,EACjE,OAAO,GACT,EAAE;;EAGF,MAAM,QAAQ,gBAAgB;GAC5B,iBAAiB,uCAAuC,kBAAkB,QAAA,MAAM,CAAC,CAAC,SAAS;GAC3F,WAAW,gBAAgB,WAAW,MAAM;EAC9C,EAAE;;EAGF,MAAM,cAAc,eAAe,eAAe,SAAS,aAAa,KAAK;;;;;;;;E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PD,mBAES,QAFT,aAESY,gBADPX,MAAA,SAAA,CAAS,CAAA,2BAAA,CAAA,GAAA,CAAA,C,IAGbD,mBAOO,QAPP,aAOOY,gBALHX,MAAA,SAAA,CAAS,CAAA,oCAAA;MAAqD,QAAA,QAAA;MAA8B,KAAA,GAAA,QAAA,QAAQ,OAAG,KAAS,QAAA;;;;G,oBAcxHG,YAyBeH,MAAA,YAAA,GAAA;IAxBT,SAAA;IAAJ,KAAI;IACJ,OAAM;IACN,0BAAuB;IACtB,UAAUA,MAAA,SAAA,KAAa,QAAA;IACvB,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,SAAA;;IACZ,SAAAU,cAUO,CAVPX,mBAUO,QAVP,aAUO,CAPLI,YAGcH,MAAA,UAAA,GAAA;KAFZ,OAAM;KACN,MAAK;KACL,MAAK;I,IACPD,mBAES,QAFT,aAESY,gBADPX,MAAA,SAAA,CAAS,CAAA,2BAAA,CAAA,GAAA,CAAA,C,IAGbD,mBAOO,QAPP,aAOOY,gBALHX,MAAA,SAAA,CAAS,CAAA,oCAAA;KAAmD,QAAA,QAAA;KAA4B,KAAA,GAAA,QAAA,QAAQ,OAAG,KAAS,QAAA"}
@@ -1,6 +1,6 @@
1
1
  import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.js";
2
- import AddressBarHistory_vue_vue_type_script_setup_true_lang_default from "./AddressBarHistory.vue.script.js";
3
- /* empty css */
2
+ import AddressBarHistory_vue_vue_type_script_setup_true_lang_default from "./AddressBarHistory.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
4
  //#region src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue
5
5
  var AddressBarHistory_default = /*#__PURE__*/ _plugin_vue_export_helper_default(AddressBarHistory_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-04d27531"]]);
6
6
  //#endregion
@@ -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 { ScalarFloating } from '@scalar/components/floating'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { formatMilliseconds } from '@scalar/helpers/formatters/format-milliseconds'\nimport { httpStatusCodes } from '@scalar/helpers/http/http-status-codes'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\nimport { useLocalization } from '@/v2/features/localization'\n\nimport { getStatusCodeColor } from './httpStatusCodeColors'\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\nconst { translate } = useLocalization()\n\nexport type History = {\n method: string\n path: string\n duration: number\n status: number\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\">{{\n translate('apiClient.addressBarHistory.requestHistory')\n }}</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 bg-b-1 dark:bg-b-1.5 grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center rounded-b-lg border border-t-0 p-0.75 shadow-md\"\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 </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":["_sfc_main"],"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 { ScalarFloating } from '@scalar/components/floating'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { formatMilliseconds } from '@scalar/helpers/formatters/format-milliseconds'\nimport { httpStatusCodes } from '@scalar/helpers/http/http-status-codes'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\nimport { useLocalization } from '@/v2/features/localization'\n\nimport { getStatusCodeColor } from './httpStatusCodeColors'\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\nconst { translate } = useLocalization()\n\nexport type History = {\n method: string\n path: string\n duration: number\n status: number\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\">{{\n translate('apiClient.addressBarHistory.requestHistory')\n }}</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 bg-b-1 dark:bg-b-1.5 grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center rounded-b-lg border border-t-0 p-0.75 shadow-md\"\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 </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":""}
@@ -85,4 +85,4 @@ var AddressBarHistory_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
85
85
  //#endregion
86
86
  export { AddressBarHistory_vue_vue_type_script_setup_true_lang_default as default };
87
87
 
88
- //# sourceMappingURL=AddressBarHistory.vue.script.js.map
88
+ //# sourceMappingURL=AddressBarHistory.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddressBarHistory.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","_withCtx","_createVNode","ValueEmitter","_createSlots","_createElementVNode","_toDisplayString","_createCommentVNode","_normalizeStyle","_createElementBlock","_Fragment","_renderList","HttpMethod","_normalizeClass"],"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 { ScalarFloating } from '@scalar/components/floating'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { formatMilliseconds } from '@scalar/helpers/formatters/format-milliseconds'\nimport { httpStatusCodes } from '@scalar/helpers/http/http-status-codes'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\nimport { useLocalization } from '@/v2/features/localization'\n\nimport { getStatusCodeColor } from './httpStatusCodeColors'\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\nconst { translate } = useLocalization()\n\nexport type History = {\n method: string\n path: string\n duration: number\n status: number\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\">{{\n translate('apiClient.addressBarHistory.requestHistory')\n }}</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 bg-b-1 dark:bg-b-1.5 grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center rounded-b-lg border border-t-0 p-0.75 shadow-md\"\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 </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>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M,CAHJA,mBAEM,OAFN,YAEMC,gBADD,MAAM,IAAI,GAAA,CAAA,C;SAGjBD,mBAAmD,OAAA,MAAAC,gBAA3CN,MAAA,kBAAA,CAAkB,CAAC,MAAM,QAAQ,CAAA,GAAA,CAAA;SACzCK,mBAEM,OAAA,EAFA,OAAKQ,eAAA,CAAGb,MAAA,kBAAA,CAAkB,CAAC,MAAM,MAAM,CAAA,CAAE,KAAK,CAAA,EAC/C,GAAAM,gBAAA,MAAM,MAAM,GAAA,CAAA;SAEjBD,mBAEM,OAAA,MAAAC,gBADDN,MAAA,eAAA,CAAe,CAAC,MAAM,OAAM,EAAG,IAAI,GAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import EnvironmentSelector_vue_vue_type_script_setup_true_lang_default from "./EnvironmentSelector.vue.script.js";
1
+ import EnvironmentSelector_vue_vue_type_script_setup_true_lang_default from "./EnvironmentSelector.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue
3
3
  var EnvironmentSelector_default = EnvironmentSelector_vue_vue_type_script_setup_true_lang_default;
4
4
  //#endregion