@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
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBlock.vue.js","names":[],"sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * OperationBlock\n *\n * Orchestrates the operation view by wiring together the Header, OperationBlock,\n * and ResponseBlock. Forwards user interactions to the workspace event bus and\n * passes through configuration such as auth, servers, plugins, and environment.\n * This component keeps the Operation page lean by centralizing event emission\n * and prop wiring between the blocks.\n *\n * Notable behavior:\n * - Uses operation['x-scalar-method'] and operation['x-scalar-path'] to provide\n * draft overrides for the UI when present.\n */\nexport default {\n name: 'OperationBlock',\n}\n\nexport type OperationBlockProps = {\n /** Keep execution and editing unavailable until the selected payload is ready. */\n externalExamplesPending?: boolean\n externalExamplesFailed?: boolean\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Application version */\n appVersion: string\n /** Openapi document */\n document: OpenApiDocument\n /** Openapi document slug */\n documentSlug: string\n /** Workspace cookies */\n workspaceCookies: XScalarCookie[]\n /** Document cookies */\n documentCookies: XScalarCookie[]\n /** Current request path */\n path: string\n /** Current request method */\n method: string\n /** Whether `path` identifies an OpenAPI webhook. */\n isWebhook?: boolean\n /** HTTP clients */\n httpClients: AvailableClients\n /** The history for the operation */\n history?: HistoryEntry[]\n /** Client layout */\n layout: ClientLayout\n /** Currently selected server */\n server: ServerObject | null\n /** Currently selected client */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** Meta information for the server */\n serverMeta: ServerMeta\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\n /** Operation object */\n operation: OperationObject\n /** Operation before downloaded examples are overlaid, for parameter edit targets. */\n sourceOperation?: OperationObject\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Meta information for the auth update */\n authMeta: AuthMeta\n /** Document defined security schemes */\n securitySchemes: MergedSecuritySchemes\n /** Client plugins */\n plugins: ClientPlugin[]\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** For environment variables in the inputs */\n environment: XScalarEnvironment\n /** The proxy URL for sending requests */\n proxyUrl: string\n /** Currently selected security */\n selectedSecurity: SelectedSecurity\n /** Currently selected security schemes */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Security requirements */\n securityRequirements: OpenApiDocument['security']\n /** Default headers */\n defaultHeaders: Record<string, string>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection?: Record<string, number>\n /** Subset of config options for the modal */\n options?: ModalProps['options']\n}\n</script>\n<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/blocks/code-example'\nimport { ScalarButton } from '@scalar/components/button'\nimport { ERRORS } from '@scalar/helpers/errors/normalize-error'\nimport { isElectron } from '@scalar/helpers/general/is-electron'\nimport { buildSafeBodyRequest } from '@scalar/helpers/http/can-method-have-body'\nimport { isForbiddenHttpMethod } from '@scalar/helpers/http/is-forbidden-http-method'\nimport {\n executeHook,\n executeResponseHook,\n type ClientPlugin,\n} from '@scalar/oas-utils/helpers'\nimport {\n AVAILABLE_CLIENTS,\n type AvailableClients,\n} from '@scalar/types/snippetz'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { HistoryEntry } from '@scalar/workspace-store/entities/history/schema'\nimport type {\n AuthMeta,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport {\n buildRequest,\n createVariablesStoreForRequest,\n getEnvironmentVariables,\n requestFactory,\n resolveExecutableRequestUrl,\n type MergedSecuritySchemes,\n type RequestPayload,\n type SecuritySchemeObjectSecret,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.2/strict/operation'\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n toValue,\n watch,\n} from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\nimport ViewLayoutSection from '@/components/ViewLayout/ViewLayoutSection.vue'\nimport { harToFetchRequest } from '@/v2/blocks/operation-block/helpers/har-to-fetch-request'\nimport { harToFetchResponse } from '@/v2/blocks/operation-block/helpers/har-to-fetch-response'\nimport {\n getCookieRequestUrl,\n getResponseCookieActions,\n} from '@/v2/blocks/operation-block/helpers/persist-response-cookies'\nimport { getEnvironmentPersistenceActions } from '@/v2/blocks/operation-block/helpers/persist-script-environment'\nimport {\n getOperationExampleKey,\n isStreamingResponse,\n responseCache,\n} from '@/v2/blocks/operation-block/helpers/response-cache'\nimport {\n sendRequest,\n type ResponseInstance,\n} from '@/v2/blocks/operation-block/helpers/send-request'\nimport { validatePathParameters } from '@/v2/blocks/operation-block/helpers/validate-path-parameters'\nimport { RequestBlock } from '@/v2/blocks/request-block'\nimport { ResponseBlock } from '@/v2/blocks/response-block'\nimport { type History } from '@/v2/blocks/scalar-address-bar-block'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ModalProps } from '@/v2/features/modal/Modal.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport Header from './components/Header.vue'\n\nconst {\n externalExamplesPending = false,\n externalExamplesFailed = false,\n authMeta,\n environment,\n eventBus,\n exampleKey,\n document,\n documentSlug,\n workspaceCookies = [],\n documentCookies = [],\n hideClientButton,\n httpClients = AVAILABLE_CLIENTS,\n history = [],\n layout,\n method,\n isWebhook = false,\n operation,\n sourceOperation,\n path,\n plugins = [],\n proxyUrl,\n requestBodyCompositionSelection,\n securitySchemes,\n selectedClient,\n server,\n servers,\n environments,\n options,\n activeEnvironment,\n serverMeta,\n selectedSecurity,\n selectedSecuritySchemes,\n securityRequirements,\n defaultHeaders,\n} = defineProps<OperationBlockProps>()\n\ndefineEmits<{ (e: 'retry:externalExamples'): void }>()\n\nconst { translate } = useLocalization()\n\n/** Hoist up client generation so it doesn't get re-generated on every operation */\nconst clientOptions = computed(() => generateClientOptions(httpClients))\n\nconst { toast } = useToasts()\nconst { copyToClipboard } = useClipboard()\n\n// Refs\nconst abortController = ref<AbortController | null>(null)\nconst response = ref<ResponseInstance | null>(null)\nconst requestError = ref<Error | null>(null)\nconst requestPayload = ref<RequestPayload | null>(null)\n\n/**\n * A webhook has no OpenAPI server, so its destination is the full URL the user\n * enters at runtime. The field holds that whole URL (not a server-relative path),\n * and the request is sent to it directly with no separate server base.\n */\nconst webhookUrl = ref('')\n\nwatch(\n [() => path, () => method, () => isWebhook],\n () => {\n webhookUrl.value = ''\n },\n { immediate: true },\n)\n\nconst requestPath = computed(() => (isWebhook ? webhookUrl.value : path))\nconst requestServer = computed<ServerObject | null>(() =>\n isWebhook ? null : server,\n)\n\n/** Cancel the request */\nconst cancelRequest = () => abortController.value?.abort(ERRORS.REQUEST_ABORTED)\n\n/**\n * Persist server-set cookies from a response into the document cookie jar.\n *\n * Scalar keeps its own cookie jar because browsers hide `Set-Cookie` from `fetch`.\n * Mirroring browser behavior, cookies are stored scoped to the request host and\n * path and removed when the server expires them, so a value like a Django CSRF\n * token stays available for later PUT/PATCH requests after a page reload.\n */\nconst persistResponseCookies = (sendResult: {\n response: ResponseInstance\n requestPayload: RequestPayload\n}) => {\n const actions = getResponseCookieActions({\n cookieHeaderKeys: sendResult.response.cookieHeaderKeys ?? [],\n documentCookies,\n requestUrl: getCookieRequestUrl(String(sendResult.requestPayload[0])),\n })\n\n for (const action of actions) {\n if (action.type === 'delete') {\n eventBus.emit('cookie:delete:cookie', {\n collectionType: 'document',\n cookieName: action.cookieName,\n index: action.index,\n })\n continue\n }\n\n eventBus.emit('cookie:upsert:cookie', {\n collectionType: 'document',\n payload: action.cookie,\n ...(action.index === undefined ? {} : { index: action.index }),\n })\n }\n}\n\n/**\n * Copy the executable URL — same pipeline as Send (`requestFactory` +\n * `resolveExecutableRequestUrl`), including security query params.\n */\nconst copyAddressBarUrl = async (): Promise<void> => {\n const { request } = requestFactory({\n defaultHeaders,\n environment,\n exampleName: exampleKey,\n globalCookies: [...workspaceCookies, ...documentCookies],\n method,\n operation,\n path: requestPath.value,\n proxyUrl,\n server: requestServer.value,\n selectedSecuritySchemes,\n isElectron: isElectron(),\n openapiVersion: document.openapi,\n requestBodyCompositionSelection,\n })\n\n await copyToClipboard(\n resolveExecutableRequestUrl(request, getEnvironmentVariables(environment)),\n )\n}\n\n/** Execute the current operation example */\nconst handleExecute = async () => {\n if (externalExamplesPending) return\n requestError.value = null\n eventBus.flushDebouncedEmits?.()\n // Source edits must reach the overlaid operation prop before building the request.\n await nextTick()\n\n if (isWebhook && !requestPath.value.trim()) {\n toast(translate('apiClient.operationBlock.webhookUrlRequired'), 'error')\n return\n }\n\n const pathValidation = validatePathParameters(\n operation.parameters ?? [],\n exampleKey,\n )\n if (pathValidation.ok === false) {\n toast(translate('apiClient.operationBlock.pathParametersRequired'), 'error')\n return\n }\n\n const globalCookies = [...workspaceCookies, ...documentCookies]\n\n const { request: requestBuilder } = requestFactory({\n defaultHeaders,\n environment,\n exampleName: exampleKey,\n globalCookies,\n method,\n operation,\n path: requestPath.value,\n proxyUrl,\n server: requestServer.value,\n selectedSecuritySchemes,\n isElectron: isElectron(),\n openapiVersion: document.openapi,\n requestBodyCompositionSelection,\n })\n\n // Stop any previous streaming response\n if (response.value && 'reader' in response.value) {\n response.value.reader.cancel()\n }\n\n const variablesStore = createVariablesStoreForRequest()\n\n // Seed the script variable store with the active environment so pm.environment.get()\n // and pm.variables.get() resolve to the same values as {{…}} placeholders. Without\n // seeding, the store starts empty and every scripted read returns undefined.\n const seededEnvironment = getEnvironmentVariables(environment)\n variablesStore.setEnvironment?.(\n Object.entries(seededEnvironment).map(([key, value]) => ({ key, value })),\n )\n\n // Snapshot the persistence target at request start, alongside the seed. Persistence runs after\n // the request completes (awaits below), and the environment props are reactive — if the active\n // environment is switched mid-flight, or a concurrent request splices these arrays, reading\n // them at persist time would apply the script's writes to the wrong environment or resolve\n // workspace/document indexes against a shifted list. Copy the arrays (not just the reference)\n // so the seeded values and these targets stay fixed to the same point in time.\n const persistenceTarget = activeEnvironment\n ? {\n environmentName: activeEnvironment,\n mergedVariables: [...environment.variables],\n documentVariables: [\n ...(document['x-scalar-environments']?.[activeEnvironment]\n ?.variables ?? []),\n ],\n environmentExistsOnDocument: Boolean(\n document['x-scalar-environments']?.[activeEnvironment],\n ),\n }\n : null\n\n // Execute the beforeRequest hook (plugins receive RequestFactory, not fetch Request)\n await executeHook(\n {\n requestBuilder,\n document,\n operation,\n variablesStore,\n server: requestServer.value,\n customFetch: toValue(options)?.customFetch,\n },\n 'beforeRequest',\n plugins,\n )\n\n // Persist environment variables set by scripts (pm.environment.set / unset) back to the active\n // environment so they survive to the next request, mirroring the Environment tab. Scope and\n // index are resolved from the seed-time environment so updates mutate in place. Defined here so\n // it can run on every exit path after the pre-request scripts — including a build failure or a\n // failed send — so a pre-request set, like a token stored before a flaky call, is not lost.\n const persistScriptEnvironment = () => {\n if (!persistenceTarget) {\n return\n }\n\n const environmentActions = getEnvironmentPersistenceActions({\n ...persistenceTarget,\n seededVariables: seededEnvironment,\n scriptVariables: variablesStore.getEnvironment(),\n })\n\n for (const action of environmentActions) {\n if (action.type === 'delete') {\n eventBus.emit('environment:delete:environment-variable', {\n environmentName: action.environmentName,\n index: action.index,\n collectionType: action.collectionType,\n })\n } else {\n eventBus.emit('environment:upsert:environment-variable', {\n environmentName: action.environmentName,\n variable: action.variable,\n index: action.index,\n collectionType: action.collectionType,\n })\n }\n }\n }\n\n // Resolve {{…}} placeholders from the script store so pre-request pm.environment.set() and\n // unset() take effect on this request. The store was seeded from the active environment, so\n // it already holds every value spreading seededEnvironment would add — minus the keys a script\n // unset, which must stay dropped (an object spread cannot remove them again).\n const envVariables = variablesStore.getVariables()\n\n // Build the fetch Request after hooks may have mutated the factory\n const built = buildRequest(requestBuilder, {\n envVariables,\n allowMissingRequestServerBase: layout === 'modal',\n })\n if (!built.ok) {\n // Save any pre-request script writes before bailing out on a build failure.\n persistScriptEnvironment()\n toast(built.message ?? built.error, 'error')\n return\n }\n\n // Check the final method because pre-request scripts can change it.\n const requestMethod = built.data.requestPayload[1].method ?? 'GET'\n if (isForbiddenHttpMethod(requestMethod)) {\n persistScriptEnvironment()\n toast(\n translate('apiClient.operationBlock.forbiddenMethod', {\n method: requestMethod.toUpperCase(),\n }),\n 'error',\n )\n return\n }\n\n // Store the abort controller for cancellation\n abortController.value = built.data.controller\n\n // Build the fetch Request once so the requestBuilt hook observes the exact bytes that are\n // sent. Rebuilding it later would generate a different multipart boundary, which breaks\n // plugins that hash the body (for example, request signing).\n const request = buildSafeBodyRequest(...built.data.requestPayload)\n\n // Execute the requestBuilt hook (plugins receive the exact fetch Request that will be sent)\n await executeHook(\n {\n request,\n requestBuilder,\n document,\n operation,\n variablesStore,\n },\n 'requestBuilt',\n plugins,\n )\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:sent', {\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n /** Execute the request */\n const [sendError, sendResult] = await sendRequest({\n isUsingProxy: built.data.isUsingProxy,\n requestPayload: built.data.requestPayload,\n request,\n plugins,\n customFetch: toValue(options)?.customFetch,\n onResponseReceived: async (response, responseDuration) => {\n const result = await executeResponseHook(\n {\n response,\n responseDuration,\n requestBuilder,\n request: buildSafeBodyRequest(...built.data.requestPayload),\n document,\n operation,\n variablesStore,\n },\n plugins,\n )\n return result.response\n },\n })\n\n // Save script environment writes (pre-request and, on success, post-response) back to the\n // active environment. Runs even when the send fails so a pre-request set is not lost.\n persistScriptEnvironment()\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:complete', {\n payload: sendResult\n ? {\n response: sendResult.originalResponse.clone(),\n requestPayload: sendResult.requestPayload,\n duration: sendResult.response.duration,\n timestamp: sendResult.timestamp,\n }\n : undefined,\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n if (sendError) {\n // Cancellation also happens when navigating away; keep the new operation intact.\n if (built.data.controller.signal.aborted) {\n if (abortController.value === built.data.controller) {\n abortController.value = null\n }\n return\n }\n requestError.value = sendError\n // clean up the response and request\n response.value = null\n requestPayload.value = null\n abortController.value = null\n\n toast(sendError.message, 'error')\n return\n }\n\n // Store the response\n response.value = sendResult.response\n requestPayload.value = sendResult.requestPayload\n\n // Persist server-set cookies into the document jar so values like a CSRF token\n // survive a page reload and get replayed on the next request, like a browser would.\n persistResponseCookies(sendResult)\n\n // Cache non-streaming responses so they can be restored when navigating back\n if (!isStreamingResponse(sendResult.response)) {\n responseCache.set(getOperationExampleKey(method, path, exampleKey), {\n response: sendResult.response,\n requestPayload: sendResult.requestPayload,\n })\n }\n}\n\nonMounted(() => {\n eventBus.on('operation:send:request:hotkey', handleExecute)\n eventBus.on('operation:cancel:request', cancelRequest)\n eventBus.on('copy-url:address-bar', copyAddressBarUrl)\n\n // Let plugins warm up per-operation resources (e.g. the scripts sandbox) so the first request\n // does not pay their cold-start cost.\n void executeHook({ document, operation }, 'onRequestMount', plugins)\n})\nonBeforeUnmount(() => {\n eventBus.off('operation:send:request:hotkey', handleExecute)\n eventBus.off('operation:cancel:request', cancelRequest)\n eventBus.off('copy-url:address-bar', copyAddressBarUrl)\n})\n\nconst operationHistory = computed<History[]>(() =>\n history\n .map((entry) => ({\n method: entry.request.method as string,\n path: entry.request.url,\n duration: entry.time,\n status: entry.response.status,\n }))\n .reverse(),\n)\n\nconst handleSelectHistoryItem = ({ index }: { index: number }) => {\n const transformedIndex = (history.length ?? 0) - index - 1\n const historyItem = history[transformedIndex]\n if (!historyItem) {\n return\n }\n\n const navigate = () =>\n eventBus.emit('ui:navigate', {\n page: 'example',\n method,\n path,\n exampleName: 'draft',\n callback: (status) => {\n // Do not replace the response if the navigation was not successful\n if (status !== 'success') {\n return\n }\n // Reconstruct the response\n const fetchResponse = harToFetchResponse({\n harResponse: historyItem.response,\n url: historyItem.request.url,\n method,\n path,\n duration: historyItem.time,\n })\n\n // Reconstruct the request\n const fetchRequest = harToFetchRequest({\n harRequest: historyItem.request,\n })\n\n // Update the response and request\n requestError.value = null\n response.value = fetchResponse\n requestPayload.value = fetchRequest\n },\n })\n\n eventBus.emit('operation:reload:history', {\n meta: {\n path,\n method,\n },\n index: transformedIndex,\n callback: navigate,\n })\n}\n\nconst handleNavigateSettings = () => {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: path,\n method,\n })\n}\n\n/**\n * When the path, method, or example key changes, restore the response panel\n * for the new operation from the best available source:\n *\n * 1. `responseCache` — in-memory, populated on every successful send.\n * Has the live response object (including streams) so it wins.\n * 2. `history` — persisted in the workspace store. Used as a fallback when\n * the in-memory cache is empty (page reload, fresh app session, etc.)\n * so navigating to an operation that has been called before shows the\n * last response instead of an empty panel.\n * 3. Otherwise clear.\n *\n * Only the response is restored from history — the user's request inputs are\n * left alone, so we never silently overwrite an in-progress draft.\n */\nwatch(\n [() => path, () => method, () => exampleKey],\n ([newPath, newMethod, newExampleKey]) => {\n requestError.value = null\n const cached = responseCache.get(\n getOperationExampleKey(newMethod, newPath, newExampleKey),\n )\n\n if (cached) {\n response.value = cached.response\n requestPayload.value = cached.requestPayload\n } else {\n // History is keyed only by document/path/method but each entry carries\n // the example it came from, so we walk from the end and pick the most\n // recent entry that matches the active example. Otherwise a cache miss\n // on example B would restore example A's response. Only runs on a\n // cache miss — the common case (in-session navigation) skips it.\n const latest = (() => {\n for (let i = history.length - 1; i >= 0; i--) {\n const entry = history[i]\n if (entry?.meta.example === newExampleKey) {\n return entry\n }\n }\n return undefined\n })()\n\n if (latest) {\n response.value = harToFetchResponse({\n harResponse: latest.response,\n url: latest.request.url,\n method: newMethod,\n path: newPath,\n duration: latest.time,\n })\n requestPayload.value = null\n } else {\n response.value = null\n requestPayload.value = null\n }\n }\n\n // Cancel any in-flight request\n cancelRequest()\n },\n { immediate: true },\n)\n\nonBeforeUnmount(() => {\n // We cancel the request if the component is unmounted\n cancelRequest()\n})\n</script>\n<template>\n <div class=\"bg-b-1 flex h-full min-w-0 flex-col\">\n <div\n class=\"lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0\">\n <!-- Address Bar -->\n <Header\n :activeEnvironment\n :documentSlug\n :documentUrl\n :environment\n :environments\n :eventBus\n :exampleKey\n :executionDisabled=\"externalExamplesPending\"\n :hideClientButton\n :history=\"operationHistory\"\n :integration\n :isWebhook\n :layout\n :method\n :path=\"requestPath\"\n :server=\"requestServer\"\n :serverMeta\n :servers\n :source\n @execute=\"handleExecute\"\n @navigate:settings=\"handleNavigateSettings\"\n @select:history:item=\"handleSelectHistoryItem\"\n @update:webhookUrl=\"(value: string) => (webhookUrl = value)\" />\n </div>\n\n <ViewLayout class=\"border-t\">\n <ViewLayoutContent class=\"flex-1\">\n <!-- Request Section -->\n <ViewLayoutSection\n v-if=\"externalExamplesPending\"\n aria-label=\"Request\">\n <template #title>Request</template>\n <div\n class=\"text-c-2 p-4\"\n role=\"status\">\n <template v-if=\"externalExamplesFailed\">\n Could not load this example.\n <ScalarButton\n size=\"sm\"\n variant=\"ghost\"\n @click=\"$emit('retry:externalExamples')\">\n Retry\n </ScalarButton>\n </template>\n <template v-else>Loading example…</template>\n </div>\n </ViewLayoutSection>\n <RequestBlock\n v-else\n :authMeta\n :clientOptions\n :defaultHeaders\n :defaultRequestBodyView=\"\n document['x-scalar-default-request-body-view']\n \"\n :documentCookies\n :documentSlug\n :environment\n :eventBus\n :exampleKey\n :layout\n :method\n :openapiVersion=\"document.openapi\"\n :operation\n :options=\"toValue(options)\"\n :path=\"requestPath\"\n :plugins\n :proxyUrl\n :requestBodyCompositionSelection\n :securityRequirements\n :securitySchemes\n :selectedClient\n :selectedSecurity\n :selectedSecuritySchemes\n :server=\"requestServer\"\n :sourceOperation\n :workspaceCookies />\n\n <!-- Response Section -->\n <ResponseBlock\n :appVersion\n :eventBus\n :executionDisabled=\"externalExamplesPending\"\n :layout\n :plugins\n :requestError\n :requestPayload\n :response\n :totalPerformedRequests=\"operationHistory.length\" />\n </ViewLayoutContent>\n </ViewLayout>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"OperationBlock.vue.js","names":["_sfc_main"],"sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * OperationBlock\n *\n * Orchestrates the operation view by wiring together the Header, OperationBlock,\n * and ResponseBlock. Forwards user interactions to the workspace event bus and\n * passes through configuration such as auth, servers, plugins, and environment.\n * This component keeps the Operation page lean by centralizing event emission\n * and prop wiring between the blocks.\n *\n * Notable behavior:\n * - Uses operation['x-scalar-method'] and operation['x-scalar-path'] to provide\n * draft overrides for the UI when present.\n */\nexport default {\n name: 'OperationBlock',\n}\n\nexport type OperationBlockProps = {\n /** Keep execution and editing unavailable until the selected payload is ready. */\n externalExamplesPending?: boolean\n externalExamplesFailed?: boolean\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Application version */\n appVersion: string\n /** Openapi document */\n document: OpenApiDocument\n /** Openapi document slug */\n documentSlug: string\n /** Workspace cookies */\n workspaceCookies: XScalarCookie[]\n /** Document cookies */\n documentCookies: XScalarCookie[]\n /** Current request path */\n path: string\n /** Current request method */\n method: string\n /** Whether `path` identifies an OpenAPI webhook. */\n isWebhook?: boolean\n /** HTTP clients */\n httpClients: AvailableClients\n /** The history for the operation */\n history?: HistoryEntry[]\n /** Client layout */\n layout: ClientLayout\n /** Currently selected server */\n server: ServerObject | null\n /** Currently selected client */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** Meta information for the server */\n serverMeta: ServerMeta\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\n /** Operation object */\n operation: OperationObject\n /** Operation before downloaded examples are overlaid, for parameter edit targets. */\n sourceOperation?: OperationObject\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Meta information for the auth update */\n authMeta: AuthMeta\n /** Document defined security schemes */\n securitySchemes: MergedSecuritySchemes\n /** Client plugins */\n plugins: ClientPlugin[]\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** For environment variables in the inputs */\n environment: XScalarEnvironment\n /** The proxy URL for sending requests */\n proxyUrl: string\n /** Currently selected security */\n selectedSecurity: SelectedSecurity\n /** Currently selected security schemes */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Security requirements */\n securityRequirements: OpenApiDocument['security']\n /** Default headers */\n defaultHeaders: Record<string, string>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection?: Record<string, number>\n /** Subset of config options for the modal */\n options?: ModalProps['options']\n}\n</script>\n<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/blocks/code-example'\nimport { ScalarButton } from '@scalar/components/button'\nimport { ERRORS } from '@scalar/helpers/errors/normalize-error'\nimport { isElectron } from '@scalar/helpers/general/is-electron'\nimport { buildSafeBodyRequest } from '@scalar/helpers/http/can-method-have-body'\nimport { isForbiddenHttpMethod } from '@scalar/helpers/http/is-forbidden-http-method'\nimport {\n executeHook,\n executeResponseHook,\n type ClientPlugin,\n} from '@scalar/oas-utils/helpers'\nimport {\n AVAILABLE_CLIENTS,\n type AvailableClients,\n} from '@scalar/types/snippetz'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { HistoryEntry } from '@scalar/workspace-store/entities/history/schema'\nimport type {\n AuthMeta,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport {\n buildRequest,\n createVariablesStoreForRequest,\n getEnvironmentVariables,\n requestFactory,\n resolveExecutableRequestUrl,\n type MergedSecuritySchemes,\n type RequestPayload,\n type SecuritySchemeObjectSecret,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.2/strict/operation'\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n toValue,\n watch,\n} from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\nimport ViewLayoutSection from '@/components/ViewLayout/ViewLayoutSection.vue'\nimport { harToFetchRequest } from '@/v2/blocks/operation-block/helpers/har-to-fetch-request'\nimport { harToFetchResponse } from '@/v2/blocks/operation-block/helpers/har-to-fetch-response'\nimport {\n getCookieRequestUrl,\n getResponseCookieActions,\n} from '@/v2/blocks/operation-block/helpers/persist-response-cookies'\nimport { getEnvironmentPersistenceActions } from '@/v2/blocks/operation-block/helpers/persist-script-environment'\nimport {\n getOperationExampleKey,\n isStreamingResponse,\n responseCache,\n} from '@/v2/blocks/operation-block/helpers/response-cache'\nimport {\n sendRequest,\n type ResponseInstance,\n} from '@/v2/blocks/operation-block/helpers/send-request'\nimport { validatePathParameters } from '@/v2/blocks/operation-block/helpers/validate-path-parameters'\nimport { RequestBlock } from '@/v2/blocks/request-block'\nimport { ResponseBlock } from '@/v2/blocks/response-block'\nimport { type History } from '@/v2/blocks/scalar-address-bar-block'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ModalProps } from '@/v2/features/modal/Modal.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport Header from './components/Header.vue'\n\nconst {\n externalExamplesPending = false,\n externalExamplesFailed = false,\n authMeta,\n environment,\n eventBus,\n exampleKey,\n document,\n documentSlug,\n workspaceCookies = [],\n documentCookies = [],\n hideClientButton,\n httpClients = AVAILABLE_CLIENTS,\n history = [],\n layout,\n method,\n isWebhook = false,\n operation,\n sourceOperation,\n path,\n plugins = [],\n proxyUrl,\n requestBodyCompositionSelection,\n securitySchemes,\n selectedClient,\n server,\n servers,\n environments,\n options,\n activeEnvironment,\n serverMeta,\n selectedSecurity,\n selectedSecuritySchemes,\n securityRequirements,\n defaultHeaders,\n} = defineProps<OperationBlockProps>()\n\ndefineEmits<{ (e: 'retry:externalExamples'): void }>()\n\nconst { translate } = useLocalization()\n\n/** Hoist up client generation so it doesn't get re-generated on every operation */\nconst clientOptions = computed(() => generateClientOptions(httpClients))\n\nconst { toast } = useToasts()\nconst { copyToClipboard } = useClipboard()\n\n// Refs\nconst abortController = ref<AbortController | null>(null)\nconst response = ref<ResponseInstance | null>(null)\nconst requestError = ref<Error | null>(null)\nconst requestPayload = ref<RequestPayload | null>(null)\n\n/**\n * A webhook has no OpenAPI server, so its destination is the full URL the user\n * enters at runtime. The field holds that whole URL (not a server-relative path),\n * and the request is sent to it directly with no separate server base.\n */\nconst webhookUrl = ref('')\n\nwatch(\n [() => path, () => method, () => isWebhook],\n () => {\n webhookUrl.value = ''\n },\n { immediate: true },\n)\n\nconst requestPath = computed(() => (isWebhook ? webhookUrl.value : path))\nconst requestServer = computed<ServerObject | null>(() =>\n isWebhook ? null : server,\n)\n\n/** Cancel the request */\nconst cancelRequest = () => abortController.value?.abort(ERRORS.REQUEST_ABORTED)\n\n/**\n * Persist server-set cookies from a response into the document cookie jar.\n *\n * Scalar keeps its own cookie jar because browsers hide `Set-Cookie` from `fetch`.\n * Mirroring browser behavior, cookies are stored scoped to the request host and\n * path and removed when the server expires them, so a value like a Django CSRF\n * token stays available for later PUT/PATCH requests after a page reload.\n */\nconst persistResponseCookies = (sendResult: {\n response: ResponseInstance\n requestPayload: RequestPayload\n}) => {\n const actions = getResponseCookieActions({\n cookieHeaderKeys: sendResult.response.cookieHeaderKeys ?? [],\n documentCookies,\n requestUrl: getCookieRequestUrl(String(sendResult.requestPayload[0])),\n })\n\n for (const action of actions) {\n if (action.type === 'delete') {\n eventBus.emit('cookie:delete:cookie', {\n collectionType: 'document',\n cookieName: action.cookieName,\n index: action.index,\n })\n continue\n }\n\n eventBus.emit('cookie:upsert:cookie', {\n collectionType: 'document',\n payload: action.cookie,\n ...(action.index === undefined ? {} : { index: action.index }),\n })\n }\n}\n\n/**\n * Copy the executable URL — same pipeline as Send (`requestFactory` +\n * `resolveExecutableRequestUrl`), including security query params.\n */\nconst copyAddressBarUrl = async (): Promise<void> => {\n const { request } = requestFactory({\n defaultHeaders,\n environment,\n exampleName: exampleKey,\n globalCookies: [...workspaceCookies, ...documentCookies],\n method,\n operation,\n path: requestPath.value,\n proxyUrl,\n server: requestServer.value,\n selectedSecuritySchemes,\n isElectron: isElectron(),\n openapiVersion: document.openapi,\n requestBodyCompositionSelection,\n })\n\n await copyToClipboard(\n resolveExecutableRequestUrl(request, getEnvironmentVariables(environment)),\n )\n}\n\n/** Execute the current operation example */\nconst handleExecute = async () => {\n if (externalExamplesPending) return\n requestError.value = null\n eventBus.flushDebouncedEmits?.()\n // Source edits must reach the overlaid operation prop before building the request.\n await nextTick()\n\n if (isWebhook && !requestPath.value.trim()) {\n toast(translate('apiClient.operationBlock.webhookUrlRequired'), 'error')\n return\n }\n\n const pathValidation = validatePathParameters(\n operation.parameters ?? [],\n exampleKey,\n )\n if (pathValidation.ok === false) {\n toast(translate('apiClient.operationBlock.pathParametersRequired'), 'error')\n return\n }\n\n const globalCookies = [...workspaceCookies, ...documentCookies]\n\n const { request: requestBuilder } = requestFactory({\n defaultHeaders,\n environment,\n exampleName: exampleKey,\n globalCookies,\n method,\n operation,\n path: requestPath.value,\n proxyUrl,\n server: requestServer.value,\n selectedSecuritySchemes,\n isElectron: isElectron(),\n openapiVersion: document.openapi,\n requestBodyCompositionSelection,\n })\n\n // Stop any previous streaming response\n if (response.value && 'reader' in response.value) {\n response.value.reader.cancel()\n }\n\n const variablesStore = createVariablesStoreForRequest()\n\n // Seed the script variable store with the active environment so pm.environment.get()\n // and pm.variables.get() resolve to the same values as {{…}} placeholders. Without\n // seeding, the store starts empty and every scripted read returns undefined.\n const seededEnvironment = getEnvironmentVariables(environment)\n variablesStore.setEnvironment?.(\n Object.entries(seededEnvironment).map(([key, value]) => ({ key, value })),\n )\n\n // Snapshot the persistence target at request start, alongside the seed. Persistence runs after\n // the request completes (awaits below), and the environment props are reactive — if the active\n // environment is switched mid-flight, or a concurrent request splices these arrays, reading\n // them at persist time would apply the script's writes to the wrong environment or resolve\n // workspace/document indexes against a shifted list. Copy the arrays (not just the reference)\n // so the seeded values and these targets stay fixed to the same point in time.\n const persistenceTarget = activeEnvironment\n ? {\n environmentName: activeEnvironment,\n mergedVariables: [...environment.variables],\n documentVariables: [\n ...(document['x-scalar-environments']?.[activeEnvironment]\n ?.variables ?? []),\n ],\n environmentExistsOnDocument: Boolean(\n document['x-scalar-environments']?.[activeEnvironment],\n ),\n }\n : null\n\n // Execute the beforeRequest hook (plugins receive RequestFactory, not fetch Request)\n await executeHook(\n {\n requestBuilder,\n document,\n operation,\n variablesStore,\n server: requestServer.value,\n customFetch: toValue(options)?.customFetch,\n },\n 'beforeRequest',\n plugins,\n )\n\n // Persist environment variables set by scripts (pm.environment.set / unset) back to the active\n // environment so they survive to the next request, mirroring the Environment tab. Scope and\n // index are resolved from the seed-time environment so updates mutate in place. Defined here so\n // it can run on every exit path after the pre-request scripts — including a build failure or a\n // failed send — so a pre-request set, like a token stored before a flaky call, is not lost.\n const persistScriptEnvironment = () => {\n if (!persistenceTarget) {\n return\n }\n\n const environmentActions = getEnvironmentPersistenceActions({\n ...persistenceTarget,\n seededVariables: seededEnvironment,\n scriptVariables: variablesStore.getEnvironment(),\n })\n\n for (const action of environmentActions) {\n if (action.type === 'delete') {\n eventBus.emit('environment:delete:environment-variable', {\n environmentName: action.environmentName,\n index: action.index,\n collectionType: action.collectionType,\n })\n } else {\n eventBus.emit('environment:upsert:environment-variable', {\n environmentName: action.environmentName,\n variable: action.variable,\n index: action.index,\n collectionType: action.collectionType,\n })\n }\n }\n }\n\n // Resolve {{…}} placeholders from the script store so pre-request pm.environment.set() and\n // unset() take effect on this request. The store was seeded from the active environment, so\n // it already holds every value spreading seededEnvironment would add — minus the keys a script\n // unset, which must stay dropped (an object spread cannot remove them again).\n const envVariables = variablesStore.getVariables()\n\n // Build the fetch Request after hooks may have mutated the factory\n const built = buildRequest(requestBuilder, {\n envVariables,\n allowMissingRequestServerBase: layout === 'modal',\n })\n if (!built.ok) {\n // Save any pre-request script writes before bailing out on a build failure.\n persistScriptEnvironment()\n toast(built.message ?? built.error, 'error')\n return\n }\n\n // Check the final method because pre-request scripts can change it.\n const requestMethod = built.data.requestPayload[1].method ?? 'GET'\n if (isForbiddenHttpMethod(requestMethod)) {\n persistScriptEnvironment()\n toast(\n translate('apiClient.operationBlock.forbiddenMethod', {\n method: requestMethod.toUpperCase(),\n }),\n 'error',\n )\n return\n }\n\n // Store the abort controller for cancellation\n abortController.value = built.data.controller\n\n // Build the fetch Request once so the requestBuilt hook observes the exact bytes that are\n // sent. Rebuilding it later would generate a different multipart boundary, which breaks\n // plugins that hash the body (for example, request signing).\n const request = buildSafeBodyRequest(...built.data.requestPayload)\n\n // Execute the requestBuilt hook (plugins receive the exact fetch Request that will be sent)\n await executeHook(\n {\n request,\n requestBuilder,\n document,\n operation,\n variablesStore,\n },\n 'requestBuilt',\n plugins,\n )\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:sent', {\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n /** Execute the request */\n const [sendError, sendResult] = await sendRequest({\n isUsingProxy: built.data.isUsingProxy,\n requestPayload: built.data.requestPayload,\n request,\n plugins,\n customFetch: toValue(options)?.customFetch,\n onResponseReceived: async (response, responseDuration) => {\n const result = await executeResponseHook(\n {\n response,\n responseDuration,\n requestBuilder,\n request: buildSafeBodyRequest(...built.data.requestPayload),\n document,\n operation,\n variablesStore,\n },\n plugins,\n )\n return result.response\n },\n })\n\n // Save script environment writes (pre-request and, on success, post-response) back to the\n // active environment. Runs even when the send fails so a pre-request set is not lost.\n persistScriptEnvironment()\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:complete', {\n payload: sendResult\n ? {\n response: sendResult.originalResponse.clone(),\n requestPayload: sendResult.requestPayload,\n duration: sendResult.response.duration,\n timestamp: sendResult.timestamp,\n }\n : undefined,\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n if (sendError) {\n // Cancellation also happens when navigating away; keep the new operation intact.\n if (built.data.controller.signal.aborted) {\n if (abortController.value === built.data.controller) {\n abortController.value = null\n }\n return\n }\n requestError.value = sendError\n // clean up the response and request\n response.value = null\n requestPayload.value = null\n abortController.value = null\n\n toast(sendError.message, 'error')\n return\n }\n\n // Store the response\n response.value = sendResult.response\n requestPayload.value = sendResult.requestPayload\n\n // Persist server-set cookies into the document jar so values like a CSRF token\n // survive a page reload and get replayed on the next request, like a browser would.\n persistResponseCookies(sendResult)\n\n // Cache non-streaming responses so they can be restored when navigating back\n if (!isStreamingResponse(sendResult.response)) {\n responseCache.set(getOperationExampleKey(method, path, exampleKey), {\n response: sendResult.response,\n requestPayload: sendResult.requestPayload,\n })\n }\n}\n\nonMounted(() => {\n eventBus.on('operation:send:request:hotkey', handleExecute)\n eventBus.on('operation:cancel:request', cancelRequest)\n eventBus.on('copy-url:address-bar', copyAddressBarUrl)\n\n // Let plugins warm up per-operation resources (e.g. the scripts sandbox) so the first request\n // does not pay their cold-start cost.\n void executeHook({ document, operation }, 'onRequestMount', plugins)\n})\nonBeforeUnmount(() => {\n eventBus.off('operation:send:request:hotkey', handleExecute)\n eventBus.off('operation:cancel:request', cancelRequest)\n eventBus.off('copy-url:address-bar', copyAddressBarUrl)\n})\n\nconst operationHistory = computed<History[]>(() =>\n history\n .map((entry) => ({\n method: entry.request.method as string,\n path: entry.request.url,\n duration: entry.time,\n status: entry.response.status,\n }))\n .reverse(),\n)\n\nconst handleSelectHistoryItem = ({ index }: { index: number }) => {\n const transformedIndex = (history.length ?? 0) - index - 1\n const historyItem = history[transformedIndex]\n if (!historyItem) {\n return\n }\n\n const navigate = () =>\n eventBus.emit('ui:navigate', {\n page: 'example',\n method,\n path,\n exampleName: 'draft',\n callback: (status) => {\n // Do not replace the response if the navigation was not successful\n if (status !== 'success') {\n return\n }\n // Reconstruct the response\n const fetchResponse = harToFetchResponse({\n harResponse: historyItem.response,\n url: historyItem.request.url,\n method,\n path,\n duration: historyItem.time,\n })\n\n // Reconstruct the request\n const fetchRequest = harToFetchRequest({\n harRequest: historyItem.request,\n })\n\n // Update the response and request\n requestError.value = null\n response.value = fetchResponse\n requestPayload.value = fetchRequest\n },\n })\n\n eventBus.emit('operation:reload:history', {\n meta: {\n path,\n method,\n },\n index: transformedIndex,\n callback: navigate,\n })\n}\n\nconst handleNavigateSettings = () => {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: path,\n method,\n })\n}\n\n/**\n * When the path, method, or example key changes, restore the response panel\n * for the new operation from the best available source:\n *\n * 1. `responseCache` — in-memory, populated on every successful send.\n * Has the live response object (including streams) so it wins.\n * 2. `history` — persisted in the workspace store. Used as a fallback when\n * the in-memory cache is empty (page reload, fresh app session, etc.)\n * so navigating to an operation that has been called before shows the\n * last response instead of an empty panel.\n * 3. Otherwise clear.\n *\n * Only the response is restored from history — the user's request inputs are\n * left alone, so we never silently overwrite an in-progress draft.\n */\nwatch(\n [() => path, () => method, () => exampleKey],\n ([newPath, newMethod, newExampleKey]) => {\n requestError.value = null\n const cached = responseCache.get(\n getOperationExampleKey(newMethod, newPath, newExampleKey),\n )\n\n if (cached) {\n response.value = cached.response\n requestPayload.value = cached.requestPayload\n } else {\n // History is keyed only by document/path/method but each entry carries\n // the example it came from, so we walk from the end and pick the most\n // recent entry that matches the active example. Otherwise a cache miss\n // on example B would restore example A's response. Only runs on a\n // cache miss — the common case (in-session navigation) skips it.\n const latest = (() => {\n for (let i = history.length - 1; i >= 0; i--) {\n const entry = history[i]\n if (entry?.meta.example === newExampleKey) {\n return entry\n }\n }\n return undefined\n })()\n\n if (latest) {\n response.value = harToFetchResponse({\n harResponse: latest.response,\n url: latest.request.url,\n method: newMethod,\n path: newPath,\n duration: latest.time,\n })\n requestPayload.value = null\n } else {\n response.value = null\n requestPayload.value = null\n }\n }\n\n // Cancel any in-flight request\n cancelRequest()\n },\n { immediate: true },\n)\n\nonBeforeUnmount(() => {\n // We cancel the request if the component is unmounted\n cancelRequest()\n})\n</script>\n<template>\n <div class=\"bg-b-1 flex h-full min-w-0 flex-col\">\n <div\n class=\"lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0\">\n <!-- Address Bar -->\n <Header\n :activeEnvironment\n :documentSlug\n :documentUrl\n :environment\n :environments\n :eventBus\n :exampleKey\n :executionDisabled=\"externalExamplesPending\"\n :hideClientButton\n :history=\"operationHistory\"\n :integration\n :isWebhook\n :layout\n :method\n :path=\"requestPath\"\n :server=\"requestServer\"\n :serverMeta\n :servers\n :source\n @execute=\"handleExecute\"\n @navigate:settings=\"handleNavigateSettings\"\n @select:history:item=\"handleSelectHistoryItem\"\n @update:webhookUrl=\"(value: string) => (webhookUrl = value)\" />\n </div>\n\n <ViewLayout class=\"border-t\">\n <ViewLayoutContent class=\"flex-1\">\n <!-- Request Section -->\n <ViewLayoutSection\n v-if=\"externalExamplesPending\"\n aria-label=\"Request\">\n <template #title>Request</template>\n <div\n class=\"text-c-2 p-4\"\n role=\"status\">\n <template v-if=\"externalExamplesFailed\">\n Could not load this example.\n <ScalarButton\n size=\"sm\"\n variant=\"ghost\"\n @click=\"$emit('retry:externalExamples')\">\n Retry\n </ScalarButton>\n </template>\n <template v-else>Loading example…</template>\n </div>\n </ViewLayoutSection>\n <RequestBlock\n v-else\n :authMeta\n :clientOptions\n :defaultHeaders\n :defaultRequestBodyView=\"\n document['x-scalar-default-request-body-view']\n \"\n :documentCookies\n :documentSlug\n :environment\n :eventBus\n :exampleKey\n :layout\n :method\n :openapiVersion=\"document.openapi\"\n :operation\n :options=\"toValue(options)\"\n :path=\"requestPath\"\n :plugins\n :proxyUrl\n :requestBodyCompositionSelection\n :securityRequirements\n :securitySchemes\n :selectedClient\n :selectedSecurity\n :selectedSecuritySchemes\n :server=\"requestServer\"\n :sourceOperation\n :workspaceCookies />\n\n <!-- Response Section -->\n <ResponseBlock\n :appVersion\n :eventBus\n :executionDisabled=\"externalExamplesPending\"\n :layout\n :plugins\n :requestError\n :requestPayload\n :response\n :totalPerformedRequests=\"operationHistory.length\" />\n </ViewLayoutContent>\n </ViewLayout>\n </div>\n</template>\n"],"mappings":""}
@@ -232,8 +232,9 @@ var OperationBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
232
232
  collectionType: action.collectionType
233
233
  });
234
234
  };
235
+ const envVariables = variablesStore.getVariables();
235
236
  const built = buildRequest(requestBuilder, {
236
- envVariables: variablesStore.getVariables(),
237
+ envVariables,
237
238
  allowMissingRequestServerBase: __props.layout === "modal"
238
239
  });
239
240
  if (!built.ok) {
@@ -573,4 +574,4 @@ var OperationBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
573
574
  //#endregion
574
575
  export { OperationBlock_vue_vue_type_script_setup_true_lang_default as default };
575
576
 
576
- //# sourceMappingURL=OperationBlock.vue.script.js.map
577
+ //# sourceMappingURL=OperationBlock.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBlock.vue.script.js","names":["$emit"],"sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * OperationBlock\n *\n * Orchestrates the operation view by wiring together the Header, OperationBlock,\n * and ResponseBlock. Forwards user interactions to the workspace event bus and\n * passes through configuration such as auth, servers, plugins, and environment.\n * This component keeps the Operation page lean by centralizing event emission\n * and prop wiring between the blocks.\n *\n * Notable behavior:\n * - Uses operation['x-scalar-method'] and operation['x-scalar-path'] to provide\n * draft overrides for the UI when present.\n */\nexport default {\n name: 'OperationBlock',\n}\n\nexport type OperationBlockProps = {\n /** Keep execution and editing unavailable until the selected payload is ready. */\n externalExamplesPending?: boolean\n externalExamplesFailed?: boolean\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Application version */\n appVersion: string\n /** Openapi document */\n document: OpenApiDocument\n /** Openapi document slug */\n documentSlug: string\n /** Workspace cookies */\n workspaceCookies: XScalarCookie[]\n /** Document cookies */\n documentCookies: XScalarCookie[]\n /** Current request path */\n path: string\n /** Current request method */\n method: string\n /** Whether `path` identifies an OpenAPI webhook. */\n isWebhook?: boolean\n /** HTTP clients */\n httpClients: AvailableClients\n /** The history for the operation */\n history?: HistoryEntry[]\n /** Client layout */\n layout: ClientLayout\n /** Currently selected server */\n server: ServerObject | null\n /** Currently selected client */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** Meta information for the server */\n serverMeta: ServerMeta\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\n /** Operation object */\n operation: OperationObject\n /** Operation before downloaded examples are overlaid, for parameter edit targets. */\n sourceOperation?: OperationObject\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Meta information for the auth update */\n authMeta: AuthMeta\n /** Document defined security schemes */\n securitySchemes: MergedSecuritySchemes\n /** Client plugins */\n plugins: ClientPlugin[]\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** For environment variables in the inputs */\n environment: XScalarEnvironment\n /** The proxy URL for sending requests */\n proxyUrl: string\n /** Currently selected security */\n selectedSecurity: SelectedSecurity\n /** Currently selected security schemes */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Security requirements */\n securityRequirements: OpenApiDocument['security']\n /** Default headers */\n defaultHeaders: Record<string, string>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection?: Record<string, number>\n /** Subset of config options for the modal */\n options?: ModalProps['options']\n}\n</script>\n<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/blocks/code-example'\nimport { ScalarButton } from '@scalar/components/button'\nimport { ERRORS } from '@scalar/helpers/errors/normalize-error'\nimport { isElectron } from '@scalar/helpers/general/is-electron'\nimport { buildSafeBodyRequest } from '@scalar/helpers/http/can-method-have-body'\nimport { isForbiddenHttpMethod } from '@scalar/helpers/http/is-forbidden-http-method'\nimport {\n executeHook,\n executeResponseHook,\n type ClientPlugin,\n} from '@scalar/oas-utils/helpers'\nimport {\n AVAILABLE_CLIENTS,\n type AvailableClients,\n} from '@scalar/types/snippetz'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { HistoryEntry } from '@scalar/workspace-store/entities/history/schema'\nimport type {\n AuthMeta,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport {\n buildRequest,\n createVariablesStoreForRequest,\n getEnvironmentVariables,\n requestFactory,\n resolveExecutableRequestUrl,\n type MergedSecuritySchemes,\n type RequestPayload,\n type SecuritySchemeObjectSecret,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.2/strict/operation'\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n toValue,\n watch,\n} from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\nimport ViewLayoutSection from '@/components/ViewLayout/ViewLayoutSection.vue'\nimport { harToFetchRequest } from '@/v2/blocks/operation-block/helpers/har-to-fetch-request'\nimport { harToFetchResponse } from '@/v2/blocks/operation-block/helpers/har-to-fetch-response'\nimport {\n getCookieRequestUrl,\n getResponseCookieActions,\n} from '@/v2/blocks/operation-block/helpers/persist-response-cookies'\nimport { getEnvironmentPersistenceActions } from '@/v2/blocks/operation-block/helpers/persist-script-environment'\nimport {\n getOperationExampleKey,\n isStreamingResponse,\n responseCache,\n} from '@/v2/blocks/operation-block/helpers/response-cache'\nimport {\n sendRequest,\n type ResponseInstance,\n} from '@/v2/blocks/operation-block/helpers/send-request'\nimport { validatePathParameters } from '@/v2/blocks/operation-block/helpers/validate-path-parameters'\nimport { RequestBlock } from '@/v2/blocks/request-block'\nimport { ResponseBlock } from '@/v2/blocks/response-block'\nimport { type History } from '@/v2/blocks/scalar-address-bar-block'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ModalProps } from '@/v2/features/modal/Modal.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport Header from './components/Header.vue'\n\nconst {\n externalExamplesPending = false,\n externalExamplesFailed = false,\n authMeta,\n environment,\n eventBus,\n exampleKey,\n document,\n documentSlug,\n workspaceCookies = [],\n documentCookies = [],\n hideClientButton,\n httpClients = AVAILABLE_CLIENTS,\n history = [],\n layout,\n method,\n isWebhook = false,\n operation,\n sourceOperation,\n path,\n plugins = [],\n proxyUrl,\n requestBodyCompositionSelection,\n securitySchemes,\n selectedClient,\n server,\n servers,\n environments,\n options,\n activeEnvironment,\n serverMeta,\n selectedSecurity,\n selectedSecuritySchemes,\n securityRequirements,\n defaultHeaders,\n} = defineProps<OperationBlockProps>()\n\ndefineEmits<{ (e: 'retry:externalExamples'): void }>()\n\nconst { translate } = useLocalization()\n\n/** Hoist up client generation so it doesn't get re-generated on every operation */\nconst clientOptions = computed(() => generateClientOptions(httpClients))\n\nconst { toast } = useToasts()\nconst { copyToClipboard } = useClipboard()\n\n// Refs\nconst abortController = ref<AbortController | null>(null)\nconst response = ref<ResponseInstance | null>(null)\nconst requestError = ref<Error | null>(null)\nconst requestPayload = ref<RequestPayload | null>(null)\n\n/**\n * A webhook has no OpenAPI server, so its destination is the full URL the user\n * enters at runtime. The field holds that whole URL (not a server-relative path),\n * and the request is sent to it directly with no separate server base.\n */\nconst webhookUrl = ref('')\n\nwatch(\n [() => path, () => method, () => isWebhook],\n () => {\n webhookUrl.value = ''\n },\n { immediate: true },\n)\n\nconst requestPath = computed(() => (isWebhook ? webhookUrl.value : path))\nconst requestServer = computed<ServerObject | null>(() =>\n isWebhook ? null : server,\n)\n\n/** Cancel the request */\nconst cancelRequest = () => abortController.value?.abort(ERRORS.REQUEST_ABORTED)\n\n/**\n * Persist server-set cookies from a response into the document cookie jar.\n *\n * Scalar keeps its own cookie jar because browsers hide `Set-Cookie` from `fetch`.\n * Mirroring browser behavior, cookies are stored scoped to the request host and\n * path and removed when the server expires them, so a value like a Django CSRF\n * token stays available for later PUT/PATCH requests after a page reload.\n */\nconst persistResponseCookies = (sendResult: {\n response: ResponseInstance\n requestPayload: RequestPayload\n}) => {\n const actions = getResponseCookieActions({\n cookieHeaderKeys: sendResult.response.cookieHeaderKeys ?? [],\n documentCookies,\n requestUrl: getCookieRequestUrl(String(sendResult.requestPayload[0])),\n })\n\n for (const action of actions) {\n if (action.type === 'delete') {\n eventBus.emit('cookie:delete:cookie', {\n collectionType: 'document',\n cookieName: action.cookieName,\n index: action.index,\n })\n continue\n }\n\n eventBus.emit('cookie:upsert:cookie', {\n collectionType: 'document',\n payload: action.cookie,\n ...(action.index === undefined ? {} : { index: action.index }),\n })\n }\n}\n\n/**\n * Copy the executable URL — same pipeline as Send (`requestFactory` +\n * `resolveExecutableRequestUrl`), including security query params.\n */\nconst copyAddressBarUrl = async (): Promise<void> => {\n const { request } = requestFactory({\n defaultHeaders,\n environment,\n exampleName: exampleKey,\n globalCookies: [...workspaceCookies, ...documentCookies],\n method,\n operation,\n path: requestPath.value,\n proxyUrl,\n server: requestServer.value,\n selectedSecuritySchemes,\n isElectron: isElectron(),\n openapiVersion: document.openapi,\n requestBodyCompositionSelection,\n })\n\n await copyToClipboard(\n resolveExecutableRequestUrl(request, getEnvironmentVariables(environment)),\n )\n}\n\n/** Execute the current operation example */\nconst handleExecute = async () => {\n if (externalExamplesPending) return\n requestError.value = null\n eventBus.flushDebouncedEmits?.()\n // Source edits must reach the overlaid operation prop before building the request.\n await nextTick()\n\n if (isWebhook && !requestPath.value.trim()) {\n toast(translate('apiClient.operationBlock.webhookUrlRequired'), 'error')\n return\n }\n\n const pathValidation = validatePathParameters(\n operation.parameters ?? [],\n exampleKey,\n )\n if (pathValidation.ok === false) {\n toast(translate('apiClient.operationBlock.pathParametersRequired'), 'error')\n return\n }\n\n const globalCookies = [...workspaceCookies, ...documentCookies]\n\n const { request: requestBuilder } = requestFactory({\n defaultHeaders,\n environment,\n exampleName: exampleKey,\n globalCookies,\n method,\n operation,\n path: requestPath.value,\n proxyUrl,\n server: requestServer.value,\n selectedSecuritySchemes,\n isElectron: isElectron(),\n openapiVersion: document.openapi,\n requestBodyCompositionSelection,\n })\n\n // Stop any previous streaming response\n if (response.value && 'reader' in response.value) {\n response.value.reader.cancel()\n }\n\n const variablesStore = createVariablesStoreForRequest()\n\n // Seed the script variable store with the active environment so pm.environment.get()\n // and pm.variables.get() resolve to the same values as {{…}} placeholders. Without\n // seeding, the store starts empty and every scripted read returns undefined.\n const seededEnvironment = getEnvironmentVariables(environment)\n variablesStore.setEnvironment?.(\n Object.entries(seededEnvironment).map(([key, value]) => ({ key, value })),\n )\n\n // Snapshot the persistence target at request start, alongside the seed. Persistence runs after\n // the request completes (awaits below), and the environment props are reactive — if the active\n // environment is switched mid-flight, or a concurrent request splices these arrays, reading\n // them at persist time would apply the script's writes to the wrong environment or resolve\n // workspace/document indexes against a shifted list. Copy the arrays (not just the reference)\n // so the seeded values and these targets stay fixed to the same point in time.\n const persistenceTarget = activeEnvironment\n ? {\n environmentName: activeEnvironment,\n mergedVariables: [...environment.variables],\n documentVariables: [\n ...(document['x-scalar-environments']?.[activeEnvironment]\n ?.variables ?? []),\n ],\n environmentExistsOnDocument: Boolean(\n document['x-scalar-environments']?.[activeEnvironment],\n ),\n }\n : null\n\n // Execute the beforeRequest hook (plugins receive RequestFactory, not fetch Request)\n await executeHook(\n {\n requestBuilder,\n document,\n operation,\n variablesStore,\n server: requestServer.value,\n customFetch: toValue(options)?.customFetch,\n },\n 'beforeRequest',\n plugins,\n )\n\n // Persist environment variables set by scripts (pm.environment.set / unset) back to the active\n // environment so they survive to the next request, mirroring the Environment tab. Scope and\n // index are resolved from the seed-time environment so updates mutate in place. Defined here so\n // it can run on every exit path after the pre-request scripts — including a build failure or a\n // failed send — so a pre-request set, like a token stored before a flaky call, is not lost.\n const persistScriptEnvironment = () => {\n if (!persistenceTarget) {\n return\n }\n\n const environmentActions = getEnvironmentPersistenceActions({\n ...persistenceTarget,\n seededVariables: seededEnvironment,\n scriptVariables: variablesStore.getEnvironment(),\n })\n\n for (const action of environmentActions) {\n if (action.type === 'delete') {\n eventBus.emit('environment:delete:environment-variable', {\n environmentName: action.environmentName,\n index: action.index,\n collectionType: action.collectionType,\n })\n } else {\n eventBus.emit('environment:upsert:environment-variable', {\n environmentName: action.environmentName,\n variable: action.variable,\n index: action.index,\n collectionType: action.collectionType,\n })\n }\n }\n }\n\n // Resolve {{…}} placeholders from the script store so pre-request pm.environment.set() and\n // unset() take effect on this request. The store was seeded from the active environment, so\n // it already holds every value spreading seededEnvironment would add — minus the keys a script\n // unset, which must stay dropped (an object spread cannot remove them again).\n const envVariables = variablesStore.getVariables()\n\n // Build the fetch Request after hooks may have mutated the factory\n const built = buildRequest(requestBuilder, {\n envVariables,\n allowMissingRequestServerBase: layout === 'modal',\n })\n if (!built.ok) {\n // Save any pre-request script writes before bailing out on a build failure.\n persistScriptEnvironment()\n toast(built.message ?? built.error, 'error')\n return\n }\n\n // Check the final method because pre-request scripts can change it.\n const requestMethod = built.data.requestPayload[1].method ?? 'GET'\n if (isForbiddenHttpMethod(requestMethod)) {\n persistScriptEnvironment()\n toast(\n translate('apiClient.operationBlock.forbiddenMethod', {\n method: requestMethod.toUpperCase(),\n }),\n 'error',\n )\n return\n }\n\n // Store the abort controller for cancellation\n abortController.value = built.data.controller\n\n // Build the fetch Request once so the requestBuilt hook observes the exact bytes that are\n // sent. Rebuilding it later would generate a different multipart boundary, which breaks\n // plugins that hash the body (for example, request signing).\n const request = buildSafeBodyRequest(...built.data.requestPayload)\n\n // Execute the requestBuilt hook (plugins receive the exact fetch Request that will be sent)\n await executeHook(\n {\n request,\n requestBuilder,\n document,\n operation,\n variablesStore,\n },\n 'requestBuilt',\n plugins,\n )\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:sent', {\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n /** Execute the request */\n const [sendError, sendResult] = await sendRequest({\n isUsingProxy: built.data.isUsingProxy,\n requestPayload: built.data.requestPayload,\n request,\n plugins,\n customFetch: toValue(options)?.customFetch,\n onResponseReceived: async (response, responseDuration) => {\n const result = await executeResponseHook(\n {\n response,\n responseDuration,\n requestBuilder,\n request: buildSafeBodyRequest(...built.data.requestPayload),\n document,\n operation,\n variablesStore,\n },\n plugins,\n )\n return result.response\n },\n })\n\n // Save script environment writes (pre-request and, on success, post-response) back to the\n // active environment. Runs even when the send fails so a pre-request set is not lost.\n persistScriptEnvironment()\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:complete', {\n payload: sendResult\n ? {\n response: sendResult.originalResponse.clone(),\n requestPayload: sendResult.requestPayload,\n duration: sendResult.response.duration,\n timestamp: sendResult.timestamp,\n }\n : undefined,\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n if (sendError) {\n // Cancellation also happens when navigating away; keep the new operation intact.\n if (built.data.controller.signal.aborted) {\n if (abortController.value === built.data.controller) {\n abortController.value = null\n }\n return\n }\n requestError.value = sendError\n // clean up the response and request\n response.value = null\n requestPayload.value = null\n abortController.value = null\n\n toast(sendError.message, 'error')\n return\n }\n\n // Store the response\n response.value = sendResult.response\n requestPayload.value = sendResult.requestPayload\n\n // Persist server-set cookies into the document jar so values like a CSRF token\n // survive a page reload and get replayed on the next request, like a browser would.\n persistResponseCookies(sendResult)\n\n // Cache non-streaming responses so they can be restored when navigating back\n if (!isStreamingResponse(sendResult.response)) {\n responseCache.set(getOperationExampleKey(method, path, exampleKey), {\n response: sendResult.response,\n requestPayload: sendResult.requestPayload,\n })\n }\n}\n\nonMounted(() => {\n eventBus.on('operation:send:request:hotkey', handleExecute)\n eventBus.on('operation:cancel:request', cancelRequest)\n eventBus.on('copy-url:address-bar', copyAddressBarUrl)\n\n // Let plugins warm up per-operation resources (e.g. the scripts sandbox) so the first request\n // does not pay their cold-start cost.\n void executeHook({ document, operation }, 'onRequestMount', plugins)\n})\nonBeforeUnmount(() => {\n eventBus.off('operation:send:request:hotkey', handleExecute)\n eventBus.off('operation:cancel:request', cancelRequest)\n eventBus.off('copy-url:address-bar', copyAddressBarUrl)\n})\n\nconst operationHistory = computed<History[]>(() =>\n history\n .map((entry) => ({\n method: entry.request.method as string,\n path: entry.request.url,\n duration: entry.time,\n status: entry.response.status,\n }))\n .reverse(),\n)\n\nconst handleSelectHistoryItem = ({ index }: { index: number }) => {\n const transformedIndex = (history.length ?? 0) - index - 1\n const historyItem = history[transformedIndex]\n if (!historyItem) {\n return\n }\n\n const navigate = () =>\n eventBus.emit('ui:navigate', {\n page: 'example',\n method,\n path,\n exampleName: 'draft',\n callback: (status) => {\n // Do not replace the response if the navigation was not successful\n if (status !== 'success') {\n return\n }\n // Reconstruct the response\n const fetchResponse = harToFetchResponse({\n harResponse: historyItem.response,\n url: historyItem.request.url,\n method,\n path,\n duration: historyItem.time,\n })\n\n // Reconstruct the request\n const fetchRequest = harToFetchRequest({\n harRequest: historyItem.request,\n })\n\n // Update the response and request\n requestError.value = null\n response.value = fetchResponse\n requestPayload.value = fetchRequest\n },\n })\n\n eventBus.emit('operation:reload:history', {\n meta: {\n path,\n method,\n },\n index: transformedIndex,\n callback: navigate,\n })\n}\n\nconst handleNavigateSettings = () => {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: path,\n method,\n })\n}\n\n/**\n * When the path, method, or example key changes, restore the response panel\n * for the new operation from the best available source:\n *\n * 1. `responseCache` — in-memory, populated on every successful send.\n * Has the live response object (including streams) so it wins.\n * 2. `history` — persisted in the workspace store. Used as a fallback when\n * the in-memory cache is empty (page reload, fresh app session, etc.)\n * so navigating to an operation that has been called before shows the\n * last response instead of an empty panel.\n * 3. Otherwise clear.\n *\n * Only the response is restored from history — the user's request inputs are\n * left alone, so we never silently overwrite an in-progress draft.\n */\nwatch(\n [() => path, () => method, () => exampleKey],\n ([newPath, newMethod, newExampleKey]) => {\n requestError.value = null\n const cached = responseCache.get(\n getOperationExampleKey(newMethod, newPath, newExampleKey),\n )\n\n if (cached) {\n response.value = cached.response\n requestPayload.value = cached.requestPayload\n } else {\n // History is keyed only by document/path/method but each entry carries\n // the example it came from, so we walk from the end and pick the most\n // recent entry that matches the active example. Otherwise a cache miss\n // on example B would restore example A's response. Only runs on a\n // cache miss — the common case (in-session navigation) skips it.\n const latest = (() => {\n for (let i = history.length - 1; i >= 0; i--) {\n const entry = history[i]\n if (entry?.meta.example === newExampleKey) {\n return entry\n }\n }\n return undefined\n })()\n\n if (latest) {\n response.value = harToFetchResponse({\n harResponse: latest.response,\n url: latest.request.url,\n method: newMethod,\n path: newPath,\n duration: latest.time,\n })\n requestPayload.value = null\n } else {\n response.value = null\n requestPayload.value = null\n }\n }\n\n // Cancel any in-flight request\n cancelRequest()\n },\n { immediate: true },\n)\n\nonBeforeUnmount(() => {\n // We cancel the request if the component is unmounted\n cancelRequest()\n})\n</script>\n<template>\n <div class=\"bg-b-1 flex h-full min-w-0 flex-col\">\n <div\n class=\"lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0\">\n <!-- Address Bar -->\n <Header\n :activeEnvironment\n :documentSlug\n :documentUrl\n :environment\n :environments\n :eventBus\n :exampleKey\n :executionDisabled=\"externalExamplesPending\"\n :hideClientButton\n :history=\"operationHistory\"\n :integration\n :isWebhook\n :layout\n :method\n :path=\"requestPath\"\n :server=\"requestServer\"\n :serverMeta\n :servers\n :source\n @execute=\"handleExecute\"\n @navigate:settings=\"handleNavigateSettings\"\n @select:history:item=\"handleSelectHistoryItem\"\n @update:webhookUrl=\"(value: string) => (webhookUrl = value)\" />\n </div>\n\n <ViewLayout class=\"border-t\">\n <ViewLayoutContent class=\"flex-1\">\n <!-- Request Section -->\n <ViewLayoutSection\n v-if=\"externalExamplesPending\"\n aria-label=\"Request\">\n <template #title>Request</template>\n <div\n class=\"text-c-2 p-4\"\n role=\"status\">\n <template v-if=\"externalExamplesFailed\">\n Could not load this example.\n <ScalarButton\n size=\"sm\"\n variant=\"ghost\"\n @click=\"$emit('retry:externalExamples')\">\n Retry\n </ScalarButton>\n </template>\n <template v-else>Loading example…</template>\n </div>\n </ViewLayoutSection>\n <RequestBlock\n v-else\n :authMeta\n :clientOptions\n :defaultHeaders\n :defaultRequestBodyView=\"\n document['x-scalar-default-request-body-view']\n \"\n :documentCookies\n :documentSlug\n :environment\n :eventBus\n :exampleKey\n :layout\n :method\n :openapiVersion=\"document.openapi\"\n :operation\n :options=\"toValue(options)\"\n :path=\"requestPath\"\n :plugins\n :proxyUrl\n :requestBodyCompositionSelection\n :securityRequirements\n :securitySchemes\n :selectedClient\n :selectedSecurity\n :selectedSecuritySchemes\n :server=\"requestServer\"\n :sourceOperation\n :workspaceCookies />\n\n <!-- Response Section -->\n <ResponseBlock\n :appVersion\n :eventBus\n :executionDisabled=\"externalExamplesPending\"\n :layout\n :plugins\n :requestError\n :requestPayload\n :response\n :totalPerformedRequests=\"operationHistory.length\" />\n </ViewLayoutContent>\n </ViewLayout>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAeE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0MR,MAAM,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A,SAAQ;MAG7C,iBAAA,QAAA;MACA,cAAA,QAAA;MACA,aAAA,QAAA;MACA,UAAA,QAAA;MACA,YAAA,QAAA;MACA,QAAA,QAAA;MACA,QAAA,QAAA;MACA,gBAAgB,QAAA,SAAS;MACzB,WAAA,QAAA;MACA,SAAS,QAAQ,QAAA,OAAO;MACxB,MAAM,YAAA;MACN,SAAA,QAAA;MACA,UAAA,QAAA;MACA,iCAAA,QAAA;MACA,sBAAA,QAAA;MACA,iBAAA,QAAA;MACA,gBAAA,QAAA;MACA,kBAAA,QAAA;MACA,yBAAA,QAAA;MACA,QAAQ,cAAA;MACR,iBAAA,QAAA;MACA,kBAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAGH,YASsD,MAAA,qBAAA,GAAA;MARnD,YAAA,QAAA;MACA,UAAA,QAAA;MACA,mBAAmB,QAAA;MACnB,QAAA,QAAA;MACA,SAAA,QAAA;MACA,cAAA,aAAA;MACA,gBAAA,eAAA;MACA,UAAA,SAAA;MACA,wBAAwB,iBAAA,MAAiB"}
1
+ {"version":3,"file":"OperationBlock.vue_vue_type_script_setup_true_lang.js","names":["$emit","_openBlock","_createElementBlock","_createElementVNode","_createVNode","Header","ViewLayout","_withCtx","ViewLayoutContent","_createBlock","ViewLayoutSection","_createTextVNode","_Fragment","_unref","RequestBlock","ResponseBlock"],"sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * OperationBlock\n *\n * Orchestrates the operation view by wiring together the Header, OperationBlock,\n * and ResponseBlock. Forwards user interactions to the workspace event bus and\n * passes through configuration such as auth, servers, plugins, and environment.\n * This component keeps the Operation page lean by centralizing event emission\n * and prop wiring between the blocks.\n *\n * Notable behavior:\n * - Uses operation['x-scalar-method'] and operation['x-scalar-path'] to provide\n * draft overrides for the UI when present.\n */\nexport default {\n name: 'OperationBlock',\n}\n\nexport type OperationBlockProps = {\n /** Keep execution and editing unavailable until the selected payload is ready. */\n externalExamplesPending?: boolean\n externalExamplesFailed?: boolean\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Application version */\n appVersion: string\n /** Openapi document */\n document: OpenApiDocument\n /** Openapi document slug */\n documentSlug: string\n /** Workspace cookies */\n workspaceCookies: XScalarCookie[]\n /** Document cookies */\n documentCookies: XScalarCookie[]\n /** Current request path */\n path: string\n /** Current request method */\n method: string\n /** Whether `path` identifies an OpenAPI webhook. */\n isWebhook?: boolean\n /** HTTP clients */\n httpClients: AvailableClients\n /** The history for the operation */\n history?: HistoryEntry[]\n /** Client layout */\n layout: ClientLayout\n /** Currently selected server */\n server: ServerObject | null\n /** Currently selected client */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** Meta information for the server */\n serverMeta: ServerMeta\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\n /** Operation object */\n operation: OperationObject\n /** Operation before downloaded examples are overlaid, for parameter edit targets. */\n sourceOperation?: OperationObject\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Meta information for the auth update */\n authMeta: AuthMeta\n /** Document defined security schemes */\n securitySchemes: MergedSecuritySchemes\n /** Client plugins */\n plugins: ClientPlugin[]\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** For environment variables in the inputs */\n environment: XScalarEnvironment\n /** The proxy URL for sending requests */\n proxyUrl: string\n /** Currently selected security */\n selectedSecurity: SelectedSecurity\n /** Currently selected security schemes */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Security requirements */\n securityRequirements: OpenApiDocument['security']\n /** Default headers */\n defaultHeaders: Record<string, string>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection?: Record<string, number>\n /** Subset of config options for the modal */\n options?: ModalProps['options']\n}\n</script>\n<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/blocks/code-example'\nimport { ScalarButton } from '@scalar/components/button'\nimport { ERRORS } from '@scalar/helpers/errors/normalize-error'\nimport { isElectron } from '@scalar/helpers/general/is-electron'\nimport { buildSafeBodyRequest } from '@scalar/helpers/http/can-method-have-body'\nimport { isForbiddenHttpMethod } from '@scalar/helpers/http/is-forbidden-http-method'\nimport {\n executeHook,\n executeResponseHook,\n type ClientPlugin,\n} from '@scalar/oas-utils/helpers'\nimport {\n AVAILABLE_CLIENTS,\n type AvailableClients,\n} from '@scalar/types/snippetz'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { HistoryEntry } from '@scalar/workspace-store/entities/history/schema'\nimport type {\n AuthMeta,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport {\n buildRequest,\n createVariablesStoreForRequest,\n getEnvironmentVariables,\n requestFactory,\n resolveExecutableRequestUrl,\n type MergedSecuritySchemes,\n type RequestPayload,\n type SecuritySchemeObjectSecret,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.2/strict/operation'\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n toValue,\n watch,\n} from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\nimport ViewLayoutSection from '@/components/ViewLayout/ViewLayoutSection.vue'\nimport { harToFetchRequest } from '@/v2/blocks/operation-block/helpers/har-to-fetch-request'\nimport { harToFetchResponse } from '@/v2/blocks/operation-block/helpers/har-to-fetch-response'\nimport {\n getCookieRequestUrl,\n getResponseCookieActions,\n} from '@/v2/blocks/operation-block/helpers/persist-response-cookies'\nimport { getEnvironmentPersistenceActions } from '@/v2/blocks/operation-block/helpers/persist-script-environment'\nimport {\n getOperationExampleKey,\n isStreamingResponse,\n responseCache,\n} from '@/v2/blocks/operation-block/helpers/response-cache'\nimport {\n sendRequest,\n type ResponseInstance,\n} from '@/v2/blocks/operation-block/helpers/send-request'\nimport { validatePathParameters } from '@/v2/blocks/operation-block/helpers/validate-path-parameters'\nimport { RequestBlock } from '@/v2/blocks/request-block'\nimport { ResponseBlock } from '@/v2/blocks/response-block'\nimport { type History } from '@/v2/blocks/scalar-address-bar-block'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ModalProps } from '@/v2/features/modal/Modal.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport Header from './components/Header.vue'\n\nconst {\n externalExamplesPending = false,\n externalExamplesFailed = false,\n authMeta,\n environment,\n eventBus,\n exampleKey,\n document,\n documentSlug,\n workspaceCookies = [],\n documentCookies = [],\n hideClientButton,\n httpClients = AVAILABLE_CLIENTS,\n history = [],\n layout,\n method,\n isWebhook = false,\n operation,\n sourceOperation,\n path,\n plugins = [],\n proxyUrl,\n requestBodyCompositionSelection,\n securitySchemes,\n selectedClient,\n server,\n servers,\n environments,\n options,\n activeEnvironment,\n serverMeta,\n selectedSecurity,\n selectedSecuritySchemes,\n securityRequirements,\n defaultHeaders,\n} = defineProps<OperationBlockProps>()\n\ndefineEmits<{ (e: 'retry:externalExamples'): void }>()\n\nconst { translate } = useLocalization()\n\n/** Hoist up client generation so it doesn't get re-generated on every operation */\nconst clientOptions = computed(() => generateClientOptions(httpClients))\n\nconst { toast } = useToasts()\nconst { copyToClipboard } = useClipboard()\n\n// Refs\nconst abortController = ref<AbortController | null>(null)\nconst response = ref<ResponseInstance | null>(null)\nconst requestError = ref<Error | null>(null)\nconst requestPayload = ref<RequestPayload | null>(null)\n\n/**\n * A webhook has no OpenAPI server, so its destination is the full URL the user\n * enters at runtime. The field holds that whole URL (not a server-relative path),\n * and the request is sent to it directly with no separate server base.\n */\nconst webhookUrl = ref('')\n\nwatch(\n [() => path, () => method, () => isWebhook],\n () => {\n webhookUrl.value = ''\n },\n { immediate: true },\n)\n\nconst requestPath = computed(() => (isWebhook ? webhookUrl.value : path))\nconst requestServer = computed<ServerObject | null>(() =>\n isWebhook ? null : server,\n)\n\n/** Cancel the request */\nconst cancelRequest = () => abortController.value?.abort(ERRORS.REQUEST_ABORTED)\n\n/**\n * Persist server-set cookies from a response into the document cookie jar.\n *\n * Scalar keeps its own cookie jar because browsers hide `Set-Cookie` from `fetch`.\n * Mirroring browser behavior, cookies are stored scoped to the request host and\n * path and removed when the server expires them, so a value like a Django CSRF\n * token stays available for later PUT/PATCH requests after a page reload.\n */\nconst persistResponseCookies = (sendResult: {\n response: ResponseInstance\n requestPayload: RequestPayload\n}) => {\n const actions = getResponseCookieActions({\n cookieHeaderKeys: sendResult.response.cookieHeaderKeys ?? [],\n documentCookies,\n requestUrl: getCookieRequestUrl(String(sendResult.requestPayload[0])),\n })\n\n for (const action of actions) {\n if (action.type === 'delete') {\n eventBus.emit('cookie:delete:cookie', {\n collectionType: 'document',\n cookieName: action.cookieName,\n index: action.index,\n })\n continue\n }\n\n eventBus.emit('cookie:upsert:cookie', {\n collectionType: 'document',\n payload: action.cookie,\n ...(action.index === undefined ? {} : { index: action.index }),\n })\n }\n}\n\n/**\n * Copy the executable URL — same pipeline as Send (`requestFactory` +\n * `resolveExecutableRequestUrl`), including security query params.\n */\nconst copyAddressBarUrl = async (): Promise<void> => {\n const { request } = requestFactory({\n defaultHeaders,\n environment,\n exampleName: exampleKey,\n globalCookies: [...workspaceCookies, ...documentCookies],\n method,\n operation,\n path: requestPath.value,\n proxyUrl,\n server: requestServer.value,\n selectedSecuritySchemes,\n isElectron: isElectron(),\n openapiVersion: document.openapi,\n requestBodyCompositionSelection,\n })\n\n await copyToClipboard(\n resolveExecutableRequestUrl(request, getEnvironmentVariables(environment)),\n )\n}\n\n/** Execute the current operation example */\nconst handleExecute = async () => {\n if (externalExamplesPending) return\n requestError.value = null\n eventBus.flushDebouncedEmits?.()\n // Source edits must reach the overlaid operation prop before building the request.\n await nextTick()\n\n if (isWebhook && !requestPath.value.trim()) {\n toast(translate('apiClient.operationBlock.webhookUrlRequired'), 'error')\n return\n }\n\n const pathValidation = validatePathParameters(\n operation.parameters ?? [],\n exampleKey,\n )\n if (pathValidation.ok === false) {\n toast(translate('apiClient.operationBlock.pathParametersRequired'), 'error')\n return\n }\n\n const globalCookies = [...workspaceCookies, ...documentCookies]\n\n const { request: requestBuilder } = requestFactory({\n defaultHeaders,\n environment,\n exampleName: exampleKey,\n globalCookies,\n method,\n operation,\n path: requestPath.value,\n proxyUrl,\n server: requestServer.value,\n selectedSecuritySchemes,\n isElectron: isElectron(),\n openapiVersion: document.openapi,\n requestBodyCompositionSelection,\n })\n\n // Stop any previous streaming response\n if (response.value && 'reader' in response.value) {\n response.value.reader.cancel()\n }\n\n const variablesStore = createVariablesStoreForRequest()\n\n // Seed the script variable store with the active environment so pm.environment.get()\n // and pm.variables.get() resolve to the same values as {{…}} placeholders. Without\n // seeding, the store starts empty and every scripted read returns undefined.\n const seededEnvironment = getEnvironmentVariables(environment)\n variablesStore.setEnvironment?.(\n Object.entries(seededEnvironment).map(([key, value]) => ({ key, value })),\n )\n\n // Snapshot the persistence target at request start, alongside the seed. Persistence runs after\n // the request completes (awaits below), and the environment props are reactive — if the active\n // environment is switched mid-flight, or a concurrent request splices these arrays, reading\n // them at persist time would apply the script's writes to the wrong environment or resolve\n // workspace/document indexes against a shifted list. Copy the arrays (not just the reference)\n // so the seeded values and these targets stay fixed to the same point in time.\n const persistenceTarget = activeEnvironment\n ? {\n environmentName: activeEnvironment,\n mergedVariables: [...environment.variables],\n documentVariables: [\n ...(document['x-scalar-environments']?.[activeEnvironment]\n ?.variables ?? []),\n ],\n environmentExistsOnDocument: Boolean(\n document['x-scalar-environments']?.[activeEnvironment],\n ),\n }\n : null\n\n // Execute the beforeRequest hook (plugins receive RequestFactory, not fetch Request)\n await executeHook(\n {\n requestBuilder,\n document,\n operation,\n variablesStore,\n server: requestServer.value,\n customFetch: toValue(options)?.customFetch,\n },\n 'beforeRequest',\n plugins,\n )\n\n // Persist environment variables set by scripts (pm.environment.set / unset) back to the active\n // environment so they survive to the next request, mirroring the Environment tab. Scope and\n // index are resolved from the seed-time environment so updates mutate in place. Defined here so\n // it can run on every exit path after the pre-request scripts — including a build failure or a\n // failed send — so a pre-request set, like a token stored before a flaky call, is not lost.\n const persistScriptEnvironment = () => {\n if (!persistenceTarget) {\n return\n }\n\n const environmentActions = getEnvironmentPersistenceActions({\n ...persistenceTarget,\n seededVariables: seededEnvironment,\n scriptVariables: variablesStore.getEnvironment(),\n })\n\n for (const action of environmentActions) {\n if (action.type === 'delete') {\n eventBus.emit('environment:delete:environment-variable', {\n environmentName: action.environmentName,\n index: action.index,\n collectionType: action.collectionType,\n })\n } else {\n eventBus.emit('environment:upsert:environment-variable', {\n environmentName: action.environmentName,\n variable: action.variable,\n index: action.index,\n collectionType: action.collectionType,\n })\n }\n }\n }\n\n // Resolve {{…}} placeholders from the script store so pre-request pm.environment.set() and\n // unset() take effect on this request. The store was seeded from the active environment, so\n // it already holds every value spreading seededEnvironment would add — minus the keys a script\n // unset, which must stay dropped (an object spread cannot remove them again).\n const envVariables = variablesStore.getVariables()\n\n // Build the fetch Request after hooks may have mutated the factory\n const built = buildRequest(requestBuilder, {\n envVariables,\n allowMissingRequestServerBase: layout === 'modal',\n })\n if (!built.ok) {\n // Save any pre-request script writes before bailing out on a build failure.\n persistScriptEnvironment()\n toast(built.message ?? built.error, 'error')\n return\n }\n\n // Check the final method because pre-request scripts can change it.\n const requestMethod = built.data.requestPayload[1].method ?? 'GET'\n if (isForbiddenHttpMethod(requestMethod)) {\n persistScriptEnvironment()\n toast(\n translate('apiClient.operationBlock.forbiddenMethod', {\n method: requestMethod.toUpperCase(),\n }),\n 'error',\n )\n return\n }\n\n // Store the abort controller for cancellation\n abortController.value = built.data.controller\n\n // Build the fetch Request once so the requestBuilt hook observes the exact bytes that are\n // sent. Rebuilding it later would generate a different multipart boundary, which breaks\n // plugins that hash the body (for example, request signing).\n const request = buildSafeBodyRequest(...built.data.requestPayload)\n\n // Execute the requestBuilt hook (plugins receive the exact fetch Request that will be sent)\n await executeHook(\n {\n request,\n requestBuilder,\n document,\n operation,\n variablesStore,\n },\n 'requestBuilt',\n plugins,\n )\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:sent', {\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n /** Execute the request */\n const [sendError, sendResult] = await sendRequest({\n isUsingProxy: built.data.isUsingProxy,\n requestPayload: built.data.requestPayload,\n request,\n plugins,\n customFetch: toValue(options)?.customFetch,\n onResponseReceived: async (response, responseDuration) => {\n const result = await executeResponseHook(\n {\n response,\n responseDuration,\n requestBuilder,\n request: buildSafeBodyRequest(...built.data.requestPayload),\n document,\n operation,\n variablesStore,\n },\n plugins,\n )\n return result.response\n },\n })\n\n // Save script environment writes (pre-request and, on success, post-response) back to the\n // active environment. Runs even when the send fails so a pre-request set is not lost.\n persistScriptEnvironment()\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:complete', {\n payload: sendResult\n ? {\n response: sendResult.originalResponse.clone(),\n requestPayload: sendResult.requestPayload,\n duration: sendResult.response.duration,\n timestamp: sendResult.timestamp,\n }\n : undefined,\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n if (sendError) {\n // Cancellation also happens when navigating away; keep the new operation intact.\n if (built.data.controller.signal.aborted) {\n if (abortController.value === built.data.controller) {\n abortController.value = null\n }\n return\n }\n requestError.value = sendError\n // clean up the response and request\n response.value = null\n requestPayload.value = null\n abortController.value = null\n\n toast(sendError.message, 'error')\n return\n }\n\n // Store the response\n response.value = sendResult.response\n requestPayload.value = sendResult.requestPayload\n\n // Persist server-set cookies into the document jar so values like a CSRF token\n // survive a page reload and get replayed on the next request, like a browser would.\n persistResponseCookies(sendResult)\n\n // Cache non-streaming responses so they can be restored when navigating back\n if (!isStreamingResponse(sendResult.response)) {\n responseCache.set(getOperationExampleKey(method, path, exampleKey), {\n response: sendResult.response,\n requestPayload: sendResult.requestPayload,\n })\n }\n}\n\nonMounted(() => {\n eventBus.on('operation:send:request:hotkey', handleExecute)\n eventBus.on('operation:cancel:request', cancelRequest)\n eventBus.on('copy-url:address-bar', copyAddressBarUrl)\n\n // Let plugins warm up per-operation resources (e.g. the scripts sandbox) so the first request\n // does not pay their cold-start cost.\n void executeHook({ document, operation }, 'onRequestMount', plugins)\n})\nonBeforeUnmount(() => {\n eventBus.off('operation:send:request:hotkey', handleExecute)\n eventBus.off('operation:cancel:request', cancelRequest)\n eventBus.off('copy-url:address-bar', copyAddressBarUrl)\n})\n\nconst operationHistory = computed<History[]>(() =>\n history\n .map((entry) => ({\n method: entry.request.method as string,\n path: entry.request.url,\n duration: entry.time,\n status: entry.response.status,\n }))\n .reverse(),\n)\n\nconst handleSelectHistoryItem = ({ index }: { index: number }) => {\n const transformedIndex = (history.length ?? 0) - index - 1\n const historyItem = history[transformedIndex]\n if (!historyItem) {\n return\n }\n\n const navigate = () =>\n eventBus.emit('ui:navigate', {\n page: 'example',\n method,\n path,\n exampleName: 'draft',\n callback: (status) => {\n // Do not replace the response if the navigation was not successful\n if (status !== 'success') {\n return\n }\n // Reconstruct the response\n const fetchResponse = harToFetchResponse({\n harResponse: historyItem.response,\n url: historyItem.request.url,\n method,\n path,\n duration: historyItem.time,\n })\n\n // Reconstruct the request\n const fetchRequest = harToFetchRequest({\n harRequest: historyItem.request,\n })\n\n // Update the response and request\n requestError.value = null\n response.value = fetchResponse\n requestPayload.value = fetchRequest\n },\n })\n\n eventBus.emit('operation:reload:history', {\n meta: {\n path,\n method,\n },\n index: transformedIndex,\n callback: navigate,\n })\n}\n\nconst handleNavigateSettings = () => {\n eventBus.emit('ui:navigate', {\n page: 'operation',\n path: 'overview',\n operationPath: path,\n method,\n })\n}\n\n/**\n * When the path, method, or example key changes, restore the response panel\n * for the new operation from the best available source:\n *\n * 1. `responseCache` — in-memory, populated on every successful send.\n * Has the live response object (including streams) so it wins.\n * 2. `history` — persisted in the workspace store. Used as a fallback when\n * the in-memory cache is empty (page reload, fresh app session, etc.)\n * so navigating to an operation that has been called before shows the\n * last response instead of an empty panel.\n * 3. Otherwise clear.\n *\n * Only the response is restored from history — the user's request inputs are\n * left alone, so we never silently overwrite an in-progress draft.\n */\nwatch(\n [() => path, () => method, () => exampleKey],\n ([newPath, newMethod, newExampleKey]) => {\n requestError.value = null\n const cached = responseCache.get(\n getOperationExampleKey(newMethod, newPath, newExampleKey),\n )\n\n if (cached) {\n response.value = cached.response\n requestPayload.value = cached.requestPayload\n } else {\n // History is keyed only by document/path/method but each entry carries\n // the example it came from, so we walk from the end and pick the most\n // recent entry that matches the active example. Otherwise a cache miss\n // on example B would restore example A's response. Only runs on a\n // cache miss — the common case (in-session navigation) skips it.\n const latest = (() => {\n for (let i = history.length - 1; i >= 0; i--) {\n const entry = history[i]\n if (entry?.meta.example === newExampleKey) {\n return entry\n }\n }\n return undefined\n })()\n\n if (latest) {\n response.value = harToFetchResponse({\n harResponse: latest.response,\n url: latest.request.url,\n method: newMethod,\n path: newPath,\n duration: latest.time,\n })\n requestPayload.value = null\n } else {\n response.value = null\n requestPayload.value = null\n }\n }\n\n // Cancel any in-flight request\n cancelRequest()\n },\n { immediate: true },\n)\n\nonBeforeUnmount(() => {\n // We cancel the request if the component is unmounted\n cancelRequest()\n})\n</script>\n<template>\n <div class=\"bg-b-1 flex h-full min-w-0 flex-col\">\n <div\n class=\"lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0\">\n <!-- Address Bar -->\n <Header\n :activeEnvironment\n :documentSlug\n :documentUrl\n :environment\n :environments\n :eventBus\n :exampleKey\n :executionDisabled=\"externalExamplesPending\"\n :hideClientButton\n :history=\"operationHistory\"\n :integration\n :isWebhook\n :layout\n :method\n :path=\"requestPath\"\n :server=\"requestServer\"\n :serverMeta\n :servers\n :source\n @execute=\"handleExecute\"\n @navigate:settings=\"handleNavigateSettings\"\n @select:history:item=\"handleSelectHistoryItem\"\n @update:webhookUrl=\"(value: string) => (webhookUrl = value)\" />\n </div>\n\n <ViewLayout class=\"border-t\">\n <ViewLayoutContent class=\"flex-1\">\n <!-- Request Section -->\n <ViewLayoutSection\n v-if=\"externalExamplesPending\"\n aria-label=\"Request\">\n <template #title>Request</template>\n <div\n class=\"text-c-2 p-4\"\n role=\"status\">\n <template v-if=\"externalExamplesFailed\">\n Could not load this example.\n <ScalarButton\n size=\"sm\"\n variant=\"ghost\"\n @click=\"$emit('retry:externalExamples')\">\n Retry\n </ScalarButton>\n </template>\n <template v-else>Loading example…</template>\n </div>\n </ViewLayoutSection>\n <RequestBlock\n v-else\n :authMeta\n :clientOptions\n :defaultHeaders\n :defaultRequestBodyView=\"\n document['x-scalar-default-request-body-view']\n \"\n :documentCookies\n :documentSlug\n :environment\n :eventBus\n :exampleKey\n :layout\n :method\n :openapiVersion=\"document.openapi\"\n :operation\n :options=\"toValue(options)\"\n :path=\"requestPath\"\n :plugins\n :proxyUrl\n :requestBodyCompositionSelection\n :securityRequirements\n :securitySchemes\n :selectedClient\n :selectedSecurity\n :selectedSecuritySchemes\n :server=\"requestServer\"\n :sourceOperation\n :workspaceCookies />\n\n <!-- Response Section -->\n <ResponseBlock\n :appVersion\n :eventBus\n :executionDisabled=\"externalExamplesPending\"\n :layout\n :plugins\n :requestError\n :requestPayload\n :response\n :totalPerformedRequests=\"operationHistory.length\" />\n </ViewLayoutContent>\n </ViewLayout>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAeE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A,GAAA;;MA3BnB,UAAA,QAAA;MACA,eAAA,cAAA;MACA,gBAAA,QAAA;MACA,wBAAqC,QAAA,SAAQ;MAG7C,iBAAA,QAAA;MACA,cAAA,QAAA;MACA,aAAA,QAAA;MACA,UAAA,QAAA;MACA,YAAA,QAAA;MACA,QAAA,QAAA;MACA,QAAA,QAAA;MACA,gBAAgB,QAAA,SAAS;MACzB,WAAA,QAAA;MACA,SAAS,QAAQ,QAAA,OAAO;MACxB,MAAM,YAAA;MACN,SAAA,QAAA;MACA,UAAA,QAAA;MACA,iCAAA,QAAA;MACA,sBAAA,QAAA;MACA,iBAAA,QAAA;MACA,gBAAA,QAAA;MACA,kBAAA,QAAA;MACA,yBAAA,QAAA;MACA,QAAQ,cAAA;MACR,iBAAA,QAAA;MACA,kBAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;K,KAGHV,YASsDS,MAAAE,qBAAA,GAAA;MARnD,YAAA,QAAA;MACA,UAAA,QAAA;MACA,mBAAmB,QAAA;MACnB,QAAA,QAAA;MACA,SAAA,QAAA;MACA,cAAA,aAAA;MACA,gBAAA,eAAA;MACA,UAAA,SAAA;MACA,wBAAwB,iBAAA,MAAiB"}
@@ -1,8 +1,8 @@
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 History } from '../../../../v2/blocks/scalar-address-bar-block/index.js';
5
- import type { ClientLayout } from '../../../../v2/types/layout';
4
+ import { type History } from '../../scalar-address-bar-block/index.js';
5
+ import type { ClientLayout } from '../../../types/layout.js';
6
6
  /**
7
7
  Operation block header: address bar, environment selector, and modal controls.
8
8
 
@@ -1,6 +1,6 @@
1
1
  import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.js";
2
- import Header_vue_vue_type_script_setup_true_lang_default from "./Header.vue.script.js";
3
- /* empty css */
2
+ import Header_vue_vue_type_script_setup_true_lang_default from "./Header.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
4
  //#region src/v2/blocks/operation-block/components/Header.vue
5
5
  var Header_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Header_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3a29d7a0"]]);
6
6
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"Header.vue.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/components/Header.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n Operation block header: address bar, environment selector, and modal controls.\n\n Renders the top bar for the API client operation view: URL/method (AddressBar),\n optional environment selector, optional \"Open API Client\" button in modal layout,\n and close button for modal. Layout and visibility depend on `layout` and `source` props.\n */\nexport type HeaderProps = {\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 this request comes from an OpenAPI webhook. */\n isWebhook?: boolean\n /** Client layout */\n layout: ClientLayout\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document slug */\n documentSlug: string\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\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 /** Event bus */\n eventBus: WorkspaceEventBus\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** Environment variables */\n environment: XScalarEnvironment\n /** Meta information for the server */\n serverMeta: ServerMeta\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconGearSix } from '@scalar/icons'\nimport type {\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'\n\nimport { AddressBar, type History } from '@/v2/blocks/scalar-address-bar-block'\nimport EnvironmentSelector from '@/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport OpenApiClientButton from './OpenApiClientButton.vue'\n\nconst {\n hideClientButton = false,\n eventBus,\n exampleKey,\n documentSlug,\n} = defineProps<HeaderProps>()\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 /** Add a new environment */\n (e: 'add:environment'): void\n /** Navigate to the settings page for the current entity */\n (e: 'navigate:settings'): 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\nconst handleSelectEnvironment = (environmentName: string) => {\n eventBus.emit('workspace:update:active-environment', environmentName)\n}\n\nconst handleAddEnvironment = () => {\n eventBus.emit('ui:navigate', { page: 'document', path: 'environment' })\n}\n</script>\n\n<template>\n <!--\n `@container` declares an unnamed container so the AddressBar can\n adapt to the right column's actual width (which shrinks when the\n sidebar opens) instead of the viewport. The query is declared here\n on the parent rather than on the AddressBar itself so the bar's\n `w-full` mobile state cannot feed back into its own breakpoint.\n -->\n <div\n class=\"lg:min-h-header t-app__top-container @container flex w-full flex-wrap items-center justify-center p-2\">\n <!-- Left spacer to center bar -->\n <div class=\"flex flex-1\"></div>\n <AddressBar\n :activeEnvironment\n :documentSlug\n :environment\n :environments\n :eventBus\n :exampleKey\n :executionDisabled\n :history\n :isWebhook\n :layout\n :method\n :path\n :server\n :serverMeta\n :servers\n @add:environment=\"emit('add:environment')\"\n @execute=\"emit('execute')\"\n @select:history:item=\"(payload) => emit('select:history:item', payload)\"\n @update:webhookUrl=\"\n (value: string) => emit('update:webhook-url', value)\n \" />\n\n <div class=\"mb-2 flex flex-1 items-center justify-end gap-2 @3xl:mb-0\">\n <!--\n Environment Selector\n Hidden for `modal` layout\n -->\n <EnvironmentSelector\n v-if=\"layout !== 'modal'\"\n :activeEnvironment=\"activeEnvironment\"\n :environments=\"environments\"\n @add:environment=\"handleAddEnvironment\"\n @select:environment=\"handleSelectEnvironment\" />\n <!-- Operation settings -->\n <ScalarIconButton\n v-if=\"layout !== 'modal' && !isWebhook\"\n :icon=\"ScalarIconGearSix\"\n :label=\"translate('apiClient.header.operationSettings')\"\n size=\"sm\"\n weight=\"bold\"\n @click=\"emit('navigate:settings')\" />\n <!--\n Open API Client Button\n\n Only shown in `modal` layout\n -->\n <OpenApiClientButton\n v-if=\"layout === 'modal' && documentUrl && !hideClientButton\"\n buttonSource=\"modal\"\n class=\"!w-fit lg:-mr-1\"\n :integration=\"integration ?? null\"\n :operationMethod=\"method\"\n :operationPath=\"path\"\n :source=\"source ?? 'api-reference'\"\n :url=\"documentUrl\" />\n\n <!--\n Close Button\n\n Only shown in `modal` layout and hidden for GitBook Integration\n -->\n <button\n v-if=\"layout === 'modal' && source !== 'gitbook'\"\n class=\"app-exit-button zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2\"\n data-modal-initial-focus\n type=\"button\"\n @click=\"eventBus.emit('ui:close:client-modal')\">\n <ScalarIcon\n icon=\"Close\"\n size=\"lg\"\n thickness=\"2\" />\n <span class=\"sr-only\">{{\n translate('apiClient.header.closeClient')\n }}</span>\n </button>\n\n <!--\n Close Button for GitBook Integration\n\n Hidden by default and visible for GitBook Integration in `modal` layout\n -->\n <button\n v-if=\"layout === 'modal' && source === 'gitbook'\"\n class=\"text-c-1 hover:bg-b-2 active:text-c-1 -mr-1.5 rounded p-2\"\n data-modal-initial-focus\n type=\"button\"\n @click=\"eventBus.emit('ui:close:client-modal')\">\n <ScalarIcon\n icon=\"Close\"\n size=\"md\"\n thickness=\"1.75\" />\n <span class=\"sr-only\">{{\n translate('apiClient.header.closeClient')\n }}</span>\n </button>\n </div>\n </div>\n</template>\n<style scoped>\n.app-exit-button {\n color: white;\n background: rgba(0, 0, 0, 0.1);\n}\n.app-exit-button:hover {\n background: rgba(255, 255, 255, 0.1);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"Header.vue.js","names":["_sfc_main"],"sources":["../../../../../src/v2/blocks/operation-block/components/Header.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n Operation block header: address bar, environment selector, and modal controls.\n\n Renders the top bar for the API client operation view: URL/method (AddressBar),\n optional environment selector, optional \"Open API Client\" button in modal layout,\n and close button for modal. Layout and visibility depend on `layout` and `source` props.\n */\nexport type HeaderProps = {\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 this request comes from an OpenAPI webhook. */\n isWebhook?: boolean\n /** Client layout */\n layout: ClientLayout\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document slug */\n documentSlug: string\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\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 /** Event bus */\n eventBus: WorkspaceEventBus\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** Environment variables */\n environment: XScalarEnvironment\n /** Meta information for the server */\n serverMeta: ServerMeta\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconGearSix } from '@scalar/icons'\nimport type {\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'\n\nimport { AddressBar, type History } from '@/v2/blocks/scalar-address-bar-block'\nimport EnvironmentSelector from '@/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport OpenApiClientButton from './OpenApiClientButton.vue'\n\nconst {\n hideClientButton = false,\n eventBus,\n exampleKey,\n documentSlug,\n} = defineProps<HeaderProps>()\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 /** Add a new environment */\n (e: 'add:environment'): void\n /** Navigate to the settings page for the current entity */\n (e: 'navigate:settings'): 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\nconst handleSelectEnvironment = (environmentName: string) => {\n eventBus.emit('workspace:update:active-environment', environmentName)\n}\n\nconst handleAddEnvironment = () => {\n eventBus.emit('ui:navigate', { page: 'document', path: 'environment' })\n}\n</script>\n\n<template>\n <!--\n `@container` declares an unnamed container so the AddressBar can\n adapt to the right column's actual width (which shrinks when the\n sidebar opens) instead of the viewport. The query is declared here\n on the parent rather than on the AddressBar itself so the bar's\n `w-full` mobile state cannot feed back into its own breakpoint.\n -->\n <div\n class=\"lg:min-h-header t-app__top-container @container flex w-full flex-wrap items-center justify-center p-2\">\n <!-- Left spacer to center bar -->\n <div class=\"flex flex-1\"></div>\n <AddressBar\n :activeEnvironment\n :documentSlug\n :environment\n :environments\n :eventBus\n :exampleKey\n :executionDisabled\n :history\n :isWebhook\n :layout\n :method\n :path\n :server\n :serverMeta\n :servers\n @add:environment=\"emit('add:environment')\"\n @execute=\"emit('execute')\"\n @select:history:item=\"(payload) => emit('select:history:item', payload)\"\n @update:webhookUrl=\"\n (value: string) => emit('update:webhook-url', value)\n \" />\n\n <div class=\"mb-2 flex flex-1 items-center justify-end gap-2 @3xl:mb-0\">\n <!--\n Environment Selector\n Hidden for `modal` layout\n -->\n <EnvironmentSelector\n v-if=\"layout !== 'modal'\"\n :activeEnvironment=\"activeEnvironment\"\n :environments=\"environments\"\n @add:environment=\"handleAddEnvironment\"\n @select:environment=\"handleSelectEnvironment\" />\n <!-- Operation settings -->\n <ScalarIconButton\n v-if=\"layout !== 'modal' && !isWebhook\"\n :icon=\"ScalarIconGearSix\"\n :label=\"translate('apiClient.header.operationSettings')\"\n size=\"sm\"\n weight=\"bold\"\n @click=\"emit('navigate:settings')\" />\n <!--\n Open API Client Button\n\n Only shown in `modal` layout\n -->\n <OpenApiClientButton\n v-if=\"layout === 'modal' && documentUrl && !hideClientButton\"\n buttonSource=\"modal\"\n class=\"!w-fit lg:-mr-1\"\n :integration=\"integration ?? null\"\n :operationMethod=\"method\"\n :operationPath=\"path\"\n :source=\"source ?? 'api-reference'\"\n :url=\"documentUrl\" />\n\n <!--\n Close Button\n\n Only shown in `modal` layout and hidden for GitBook Integration\n -->\n <button\n v-if=\"layout === 'modal' && source !== 'gitbook'\"\n class=\"app-exit-button zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2\"\n data-modal-initial-focus\n type=\"button\"\n @click=\"eventBus.emit('ui:close:client-modal')\">\n <ScalarIcon\n icon=\"Close\"\n size=\"lg\"\n thickness=\"2\" />\n <span class=\"sr-only\">{{\n translate('apiClient.header.closeClient')\n }}</span>\n </button>\n\n <!--\n Close Button for GitBook Integration\n\n Hidden by default and visible for GitBook Integration in `modal` layout\n -->\n <button\n v-if=\"layout === 'modal' && source === 'gitbook'\"\n class=\"text-c-1 hover:bg-b-2 active:text-c-1 -mr-1.5 rounded p-2\"\n data-modal-initial-focus\n type=\"button\"\n @click=\"eventBus.emit('ui:close:client-modal')\">\n <ScalarIcon\n icon=\"Close\"\n size=\"md\"\n thickness=\"1.75\" />\n <span class=\"sr-only\">{{\n translate('apiClient.header.closeClient')\n }}</span>\n </button>\n </div>\n </div>\n</template>\n<style scoped>\n.app-exit-button {\n color: white;\n background: rgba(0, 0, 0, 0.1);\n}\n.app-exit-button:hover {\n background: rgba(255, 255, 255, 0.1);\n}\n</style>\n"],"mappings":""}
@@ -158,4 +158,4 @@ var Header_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
158
158
  //#endregion
159
159
  export { Header_vue_vue_type_script_setup_true_lang_default as default };
160
160
 
161
- //# sourceMappingURL=Header.vue.script.js.map
161
+ //# sourceMappingURL=Header.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","AddressBar","_createBlock","EnvironmentSelector","_createCommentVNode","OpenApiClientButton","_toDisplayString"],"sources":["../../../../../src/v2/blocks/operation-block/components/Header.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n Operation block header: address bar, environment selector, and modal controls.\n\n Renders the top bar for the API client operation view: URL/method (AddressBar),\n optional environment selector, optional \"Open API Client\" button in modal layout,\n and close button for modal. Layout and visibility depend on `layout` and `source` props.\n */\nexport type HeaderProps = {\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 this request comes from an OpenAPI webhook. */\n isWebhook?: boolean\n /** Client layout */\n layout: ClientLayout\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document slug */\n documentSlug: string\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\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 /** Event bus */\n eventBus: WorkspaceEventBus\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** Environment variables */\n environment: XScalarEnvironment\n /** Meta information for the server */\n serverMeta: ServerMeta\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconGearSix } from '@scalar/icons'\nimport type {\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'\n\nimport { AddressBar, type History } from '@/v2/blocks/scalar-address-bar-block'\nimport EnvironmentSelector from '@/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport OpenApiClientButton from './OpenApiClientButton.vue'\n\nconst {\n hideClientButton = false,\n eventBus,\n exampleKey,\n documentSlug,\n} = defineProps<HeaderProps>()\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 /** Add a new environment */\n (e: 'add:environment'): void\n /** Navigate to the settings page for the current entity */\n (e: 'navigate:settings'): 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\nconst handleSelectEnvironment = (environmentName: string) => {\n eventBus.emit('workspace:update:active-environment', environmentName)\n}\n\nconst handleAddEnvironment = () => {\n eventBus.emit('ui:navigate', { page: 'document', path: 'environment' })\n}\n</script>\n\n<template>\n <!--\n `@container` declares an unnamed container so the AddressBar can\n adapt to the right column's actual width (which shrinks when the\n sidebar opens) instead of the viewport. The query is declared here\n on the parent rather than on the AddressBar itself so the bar's\n `w-full` mobile state cannot feed back into its own breakpoint.\n -->\n <div\n class=\"lg:min-h-header t-app__top-container @container flex w-full flex-wrap items-center justify-center p-2\">\n <!-- Left spacer to center bar -->\n <div class=\"flex flex-1\"></div>\n <AddressBar\n :activeEnvironment\n :documentSlug\n :environment\n :environments\n :eventBus\n :exampleKey\n :executionDisabled\n :history\n :isWebhook\n :layout\n :method\n :path\n :server\n :serverMeta\n :servers\n @add:environment=\"emit('add:environment')\"\n @execute=\"emit('execute')\"\n @select:history:item=\"(payload) => emit('select:history:item', payload)\"\n @update:webhookUrl=\"\n (value: string) => emit('update:webhook-url', value)\n \" />\n\n <div class=\"mb-2 flex flex-1 items-center justify-end gap-2 @3xl:mb-0\">\n <!--\n Environment Selector\n Hidden for `modal` layout\n -->\n <EnvironmentSelector\n v-if=\"layout !== 'modal'\"\n :activeEnvironment=\"activeEnvironment\"\n :environments=\"environments\"\n @add:environment=\"handleAddEnvironment\"\n @select:environment=\"handleSelectEnvironment\" />\n <!-- Operation settings -->\n <ScalarIconButton\n v-if=\"layout !== 'modal' && !isWebhook\"\n :icon=\"ScalarIconGearSix\"\n :label=\"translate('apiClient.header.operationSettings')\"\n size=\"sm\"\n weight=\"bold\"\n @click=\"emit('navigate:settings')\" />\n <!--\n Open API Client Button\n\n Only shown in `modal` layout\n -->\n <OpenApiClientButton\n v-if=\"layout === 'modal' && documentUrl && !hideClientButton\"\n buttonSource=\"modal\"\n class=\"!w-fit lg:-mr-1\"\n :integration=\"integration ?? null\"\n :operationMethod=\"method\"\n :operationPath=\"path\"\n :source=\"source ?? 'api-reference'\"\n :url=\"documentUrl\" />\n\n <!--\n Close Button\n\n Only shown in `modal` layout and hidden for GitBook Integration\n -->\n <button\n v-if=\"layout === 'modal' && source !== 'gitbook'\"\n class=\"app-exit-button zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2\"\n data-modal-initial-focus\n type=\"button\"\n @click=\"eventBus.emit('ui:close:client-modal')\">\n <ScalarIcon\n icon=\"Close\"\n size=\"lg\"\n thickness=\"2\" />\n <span class=\"sr-only\">{{\n translate('apiClient.header.closeClient')\n }}</span>\n </button>\n\n <!--\n Close Button for GitBook Integration\n\n Hidden by default and visible for GitBook Integration in `modal` layout\n -->\n <button\n v-if=\"layout === 'modal' && source === 'gitbook'\"\n class=\"text-c-1 hover:bg-b-2 active:text-c-1 -mr-1.5 rounded p-2\"\n data-modal-initial-focus\n type=\"button\"\n @click=\"eventBus.emit('ui:close:client-modal')\">\n <ScalarIcon\n icon=\"Close\"\n size=\"md\"\n thickness=\"1.75\" />\n <span class=\"sr-only\">{{\n translate('apiClient.header.closeClient')\n }}</span>\n </button>\n </div>\n </div>\n</template>\n<style scoped>\n.app-exit-button {\n color: white;\n background: rgba(0, 0, 0, 0.1);\n}\n.app-exit-button:hover {\n background: rgba(255, 255, 255, 0.1);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EA,MAAM,OAAO;EAab,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,2BAA2B,oBAA4B;GAC3D,QAAA,SAAS,KAAK,uCAAuC,eAAe;EACtE;EAEA,MAAM,6BAA6B;GACjC,QAAA,SAAS,KAAK,eAAe;IAAE,MAAM;IAAY,MAAM;GAAc,CAAC;EACxE;;GAWE,OAAAA,UAAA,GAAAC,mBAqGM,OArGN,YAqGM;IAlGJ,OAAA,OAAA,OAAA,KAAAC,mBAA+B,OAAA,EAA1B,OAAM,cAAa,GAAA,MAAA,EAAA;IACxBC,YAqBMC,MAAAC,kBAAA,GAAA;KApBH,mBAAA,QAAA;KACA,cAAA,QAAA;KACA,aAAA,QAAA;KACA,cAAA,QAAA;KACA,UAAA,QAAA;KACA,YAAA,QAAA;KACA,mBAAA,QAAA;KACA,SAAA,QAAA;KACA,WAAA,QAAA;KACA,QAAA,QAAA;KACA,QAAA,QAAA;KACA,MAAA,QAAA;KACA,QAAA,QAAA;KACA,YAAA,QAAA;KACA,SAAA,QAAA;KACA,qBAAe,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,iBAAA;KACrB,WAAO,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,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AA,OAAA,MAAA,WAAE,QAAA,SAAS,KAAI,uBAAA;K,IACrBE,YAGqBC,MAAA,UAAA,GAAA;MAFnB,MAAK;MACL,MAAK;MACL,WAAU;K,IACZF,mBAES,QAFT,YAESQ,gBADPN,MAAA,SAAA,CAAS,CAAA,8BAAA,CAAA,GAAA,CAAA,C"}
@@ -1,6 +1,6 @@
1
1
  import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.js";
2
- import OpenApiClientButton_vue_vue_type_script_setup_true_lang_default from "./OpenApiClientButton.vue.script.js";
3
- /* empty css */
2
+ import OpenApiClientButton_vue_vue_type_script_setup_true_lang_default from "./OpenApiClientButton.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
4
  //#region src/v2/blocks/operation-block/components/OpenApiClientButton.vue
5
5
  var OpenApiClientButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(OpenApiClientButton_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-746e7aef"]]);
6
6
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiClientButton.vue.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/components/OpenApiClientButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { makeUrlAbsolute } from '@scalar/helpers/url/make-url-absolute'\nimport { ScalarIconArrowUpRight } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst {\n integration,\n isDevelopment,\n url,\n operationPath,\n operationMethod,\n buttonSource,\n source = 'api-reference',\n} = defineProps<{\n buttonSource: 'sidebar' | 'modal'\n source?: 'api-reference' | 'gitbook'\n isDevelopment?: boolean\n integration?: string | null\n url?: string\n /** Operation path to open in the client after import */\n operationPath?: string\n /** HTTP method for the operation to open in the client after import */\n operationMethod?: string\n}>()\n\nconst { translate } = useLocalization()\n\n/** Link to import an OpenAPI document */\nconst href = computed((): string | undefined => {\n /**\n * The URL we want to pass to client.scalar.com for the import.\n * Might be an OpenAPI document URL, but could also just be the URL of the API reference.\n */\n const urlToImportFrom =\n url ?? (typeof window !== 'undefined' ? window.location.href : undefined)\n\n if (!urlToImportFrom) {\n return undefined\n }\n\n const absoluteUrl = makeUrlAbsolute(urlToImportFrom)\n\n if (!absoluteUrl?.length) {\n return undefined\n }\n\n // Base URL\n const link = new URL(\n isDevelopment ? 'http://localhost:5065' : 'https://client.scalar.com',\n )\n\n // URL that we'd like to import\n link.searchParams.set('url', absoluteUrl)\n\n if (operationPath?.length && operationMethod?.length) {\n link.searchParams.set('operation_path', operationPath)\n link.searchParams.set(\n 'operation_method',\n operationMethod === operationMethod.toUpperCase() &&\n isHttpMethod(operationMethod)\n ? operationMethod.toLowerCase()\n : operationMethod,\n )\n }\n\n // Integration identifier\n if (integration !== null) {\n link.searchParams.set('integration', integration ?? 'vue')\n }\n\n // UTM Source\n link.searchParams.set('utm_source', 'api-reference')\n link.searchParams.set('utm_medium', 'button')\n link.searchParams.set('utm_campaign', buttonSource)\n\n // Special for gitbook, set the source and grab the logos (hacky)\n if (source === 'gitbook') {\n link.searchParams.set('utm_source', 'gitbook')\n\n const darkLogo = document.querySelector(\"img.dark\\\\:block[alt='Logo']\")\n const lightLogo = document.querySelector(\"img.dark\\\\:hidden[alt='Logo']\")\n\n if (darkLogo && darkLogo instanceof HTMLImageElement) {\n link.searchParams.set('dark_logo', encodeURIComponent(darkLogo.src))\n }\n if (lightLogo && lightLogo instanceof HTMLImageElement) {\n link.searchParams.set('light_logo', encodeURIComponent(lightLogo.src))\n }\n }\n\n return link.toString()\n})\n</script>\n\n<template>\n <a\n v-if=\"href\"\n class=\"open-api-client-button\"\n :href=\"href\"\n target=\"_blank\">\n <ScalarIconArrowUpRight\n class=\"size-3\"\n weight=\"regular\" />{{\n translate('apiClient.openApiClientButton.openAPIClient')\n }}</a\n >\n</template>\n\n<style scoped>\n.open-api-client-button {\n cursor: pointer;\n width: 100%;\n padding: 9px 12px;\n height: 31px;\n display: block;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n white-space: nowrap;\n font-size: var(--scalar-small);\n line-height: 1.385;\n text-decoration: none;\n border-radius: var(--scalar-radius);\n box-shadow: 0 0 0 0.5px var(--scalar-border-color);\n gap: 6px;\n color: var(--scalar-sidebar-color-1);\n}\n\n.open-api-client-button:hover {\n background: var(\n --scalar-sidebar-item-hover-background,\n var(--scalar-background-2)\n );\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"OpenApiClientButton.vue.js","names":["_sfc_main"],"sources":["../../../../../src/v2/blocks/operation-block/components/OpenApiClientButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { makeUrlAbsolute } from '@scalar/helpers/url/make-url-absolute'\nimport { ScalarIconArrowUpRight } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst {\n integration,\n isDevelopment,\n url,\n operationPath,\n operationMethod,\n buttonSource,\n source = 'api-reference',\n} = defineProps<{\n buttonSource: 'sidebar' | 'modal'\n source?: 'api-reference' | 'gitbook'\n isDevelopment?: boolean\n integration?: string | null\n url?: string\n /** Operation path to open in the client after import */\n operationPath?: string\n /** HTTP method for the operation to open in the client after import */\n operationMethod?: string\n}>()\n\nconst { translate } = useLocalization()\n\n/** Link to import an OpenAPI document */\nconst href = computed((): string | undefined => {\n /**\n * The URL we want to pass to client.scalar.com for the import.\n * Might be an OpenAPI document URL, but could also just be the URL of the API reference.\n */\n const urlToImportFrom =\n url ?? (typeof window !== 'undefined' ? window.location.href : undefined)\n\n if (!urlToImportFrom) {\n return undefined\n }\n\n const absoluteUrl = makeUrlAbsolute(urlToImportFrom)\n\n if (!absoluteUrl?.length) {\n return undefined\n }\n\n // Base URL\n const link = new URL(\n isDevelopment ? 'http://localhost:5065' : 'https://client.scalar.com',\n )\n\n // URL that we'd like to import\n link.searchParams.set('url', absoluteUrl)\n\n if (operationPath?.length && operationMethod?.length) {\n link.searchParams.set('operation_path', operationPath)\n link.searchParams.set(\n 'operation_method',\n operationMethod === operationMethod.toUpperCase() &&\n isHttpMethod(operationMethod)\n ? operationMethod.toLowerCase()\n : operationMethod,\n )\n }\n\n // Integration identifier\n if (integration !== null) {\n link.searchParams.set('integration', integration ?? 'vue')\n }\n\n // UTM Source\n link.searchParams.set('utm_source', 'api-reference')\n link.searchParams.set('utm_medium', 'button')\n link.searchParams.set('utm_campaign', buttonSource)\n\n // Special for gitbook, set the source and grab the logos (hacky)\n if (source === 'gitbook') {\n link.searchParams.set('utm_source', 'gitbook')\n\n const darkLogo = document.querySelector(\"img.dark\\\\:block[alt='Logo']\")\n const lightLogo = document.querySelector(\"img.dark\\\\:hidden[alt='Logo']\")\n\n if (darkLogo && darkLogo instanceof HTMLImageElement) {\n link.searchParams.set('dark_logo', encodeURIComponent(darkLogo.src))\n }\n if (lightLogo && lightLogo instanceof HTMLImageElement) {\n link.searchParams.set('light_logo', encodeURIComponent(lightLogo.src))\n }\n }\n\n return link.toString()\n})\n</script>\n\n<template>\n <a\n v-if=\"href\"\n class=\"open-api-client-button\"\n :href=\"href\"\n target=\"_blank\">\n <ScalarIconArrowUpRight\n class=\"size-3\"\n weight=\"regular\" />{{\n translate('apiClient.openApiClientButton.openAPIClient')\n }}</a\n >\n</template>\n\n<style scoped>\n.open-api-client-button {\n cursor: pointer;\n width: 100%;\n padding: 9px 12px;\n height: 31px;\n display: block;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n white-space: nowrap;\n font-size: var(--scalar-small);\n line-height: 1.385;\n text-decoration: none;\n border-radius: var(--scalar-radius);\n box-shadow: 0 0 0 0.5px var(--scalar-border-color);\n gap: 6px;\n color: var(--scalar-sidebar-color-1);\n}\n\n.open-api-client-button:hover {\n background: var(\n --scalar-sidebar-item-hover-background,\n var(--scalar-background-2)\n );\n}\n</style>\n"],"mappings":""}
@@ -63,4 +63,4 @@ var OpenApiClientButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
63
63
  //#endregion
64
64
  export { OpenApiClientButton_vue_vue_type_script_setup_true_lang_default as default };
65
65
 
66
- //# sourceMappingURL=OpenApiClientButton.vue.script.js.map
66
+ //# sourceMappingURL=OpenApiClientButton.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenApiClientButton.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createVNode","_unref","_createTextVNode","_toDisplayString","_createCommentVNode"],"sources":["../../../../../src/v2/blocks/operation-block/components/OpenApiClientButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { makeUrlAbsolute } from '@scalar/helpers/url/make-url-absolute'\nimport { ScalarIconArrowUpRight } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst {\n integration,\n isDevelopment,\n url,\n operationPath,\n operationMethod,\n buttonSource,\n source = 'api-reference',\n} = defineProps<{\n buttonSource: 'sidebar' | 'modal'\n source?: 'api-reference' | 'gitbook'\n isDevelopment?: boolean\n integration?: string | null\n url?: string\n /** Operation path to open in the client after import */\n operationPath?: string\n /** HTTP method for the operation to open in the client after import */\n operationMethod?: string\n}>()\n\nconst { translate } = useLocalization()\n\n/** Link to import an OpenAPI document */\nconst href = computed((): string | undefined => {\n /**\n * The URL we want to pass to client.scalar.com for the import.\n * Might be an OpenAPI document URL, but could also just be the URL of the API reference.\n */\n const urlToImportFrom =\n url ?? (typeof window !== 'undefined' ? window.location.href : undefined)\n\n if (!urlToImportFrom) {\n return undefined\n }\n\n const absoluteUrl = makeUrlAbsolute(urlToImportFrom)\n\n if (!absoluteUrl?.length) {\n return undefined\n }\n\n // Base URL\n const link = new URL(\n isDevelopment ? 'http://localhost:5065' : 'https://client.scalar.com',\n )\n\n // URL that we'd like to import\n link.searchParams.set('url', absoluteUrl)\n\n if (operationPath?.length && operationMethod?.length) {\n link.searchParams.set('operation_path', operationPath)\n link.searchParams.set(\n 'operation_method',\n operationMethod === operationMethod.toUpperCase() &&\n isHttpMethod(operationMethod)\n ? operationMethod.toLowerCase()\n : operationMethod,\n )\n }\n\n // Integration identifier\n if (integration !== null) {\n link.searchParams.set('integration', integration ?? 'vue')\n }\n\n // UTM Source\n link.searchParams.set('utm_source', 'api-reference')\n link.searchParams.set('utm_medium', 'button')\n link.searchParams.set('utm_campaign', buttonSource)\n\n // Special for gitbook, set the source and grab the logos (hacky)\n if (source === 'gitbook') {\n link.searchParams.set('utm_source', 'gitbook')\n\n const darkLogo = document.querySelector(\"img.dark\\\\:block[alt='Logo']\")\n const lightLogo = document.querySelector(\"img.dark\\\\:hidden[alt='Logo']\")\n\n if (darkLogo && darkLogo instanceof HTMLImageElement) {\n link.searchParams.set('dark_logo', encodeURIComponent(darkLogo.src))\n }\n if (lightLogo && lightLogo instanceof HTMLImageElement) {\n link.searchParams.set('light_logo', encodeURIComponent(lightLogo.src))\n }\n }\n\n return link.toString()\n})\n</script>\n\n<template>\n <a\n v-if=\"href\"\n class=\"open-api-client-button\"\n :href=\"href\"\n target=\"_blank\">\n <ScalarIconArrowUpRight\n class=\"size-3\"\n weight=\"regular\" />{{\n translate('apiClient.openApiClientButton.openAPIClient')\n }}</a\n >\n</template>\n\n<style scoped>\n.open-api-client-button {\n cursor: pointer;\n width: 100%;\n padding: 9px 12px;\n height: 31px;\n display: block;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n white-space: nowrap;\n font-size: var(--scalar-small);\n line-height: 1.385;\n text-decoration: none;\n border-radius: var(--scalar-radius);\n box-shadow: 0 0 0 0.5px var(--scalar-border-color);\n gap: 6px;\n color: var(--scalar-sidebar-color-1);\n}\n\n.open-api-client-button:hover {\n background: var(\n --scalar-sidebar-item-hover-background,\n var(--scalar-background-2)\n );\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EA4BA,MAAM,EAAE,cAAc,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ACN,QAAO;G,IACPC,gBAAAC,gBAAAF,MAAA,SAAA,CAAS,CAAA,6CAAA,CAAA,GAAA,CAAA,C"}
@@ -1,5 +1,5 @@
1
1
  import type { HarResponse } from '@scalar/snippetz';
2
- import type { ResponseInstance } from '../../../../v2/blocks/operation-block/helpers/send-request.js';
2
+ import type { ResponseInstance } from './send-request.js';
3
3
  type HarToFetchResponseProps = {
4
4
  /** The HAR Response object to convert */
5
5
  harResponse: HarResponse;
@@ -1,5 +1,5 @@
1
1
  import type { RequestPayload } from '@scalar/workspace-store/request-example';
2
- import type { ResponseInstance } from '../../../../v2/blocks/operation-block/helpers/send-request.js';
2
+ import type { ResponseInstance } from './send-request.js';
3
3
  /**
4
4
  * In-memory cache of operation example id → { response, request }.
5
5
  * Restores the last response when navigating back to an operation until
@@ -129,7 +129,8 @@ var buildStandardResponse = async ({ response, requestPayload, timestamp, durati
129
129
  const arrayBuffer = await response.clone().arrayBuffer();
130
130
  const responseType = resolveResponseContentType(contentType);
131
131
  const mimeEssence = resolveResponseMimeType(contentType).essence;
132
- const responseData = await decodeBuffer(arrayBuffer, responseType, resolveResponseBodyHandler(mimeEssence, plugins));
132
+ const pluginHandler = resolveResponseBodyHandler(mimeEssence, plugins);
133
+ const responseData = await decodeBuffer(arrayBuffer, responseType, pluginHandler);
133
134
  /**
134
135
  * Create a new Response using the arrayBuffer we already read.
135
136
  * ArrayBuffers can be reused to create new Response objects without additional memory.