@scalar/api-client 3.19.2 → 3.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  3. package/dist/components/SectionFilter.vue.d.ts +2 -0
  4. package/dist/components/SectionFilter.vue.d.ts.map +1 -1
  5. package/dist/components/SectionFilter.vue.js +1 -1
  6. package/dist/components/SectionFilter.vue.js.map +1 -1
  7. package/dist/components/SectionFilter.vue.script.js +11 -8
  8. package/dist/components/SectionFilter.vue.script.js.map +1 -1
  9. package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
  10. package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -1
  11. package/dist/components/Server/ServerVariablesSelect.vue.script.js +5 -3
  12. package/dist/components/Server/ServerVariablesSelect.vue.script.js.map +1 -1
  13. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
  14. package/dist/components/Server/ServerVariablesTextbox.vue.js.map +1 -1
  15. package/dist/components/Server/ServerVariablesTextbox.vue.script.js +6 -3
  16. package/dist/components/Server/ServerVariablesTextbox.vue.script.js.map +1 -1
  17. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
  18. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js.map +1 -1
  19. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js +4 -2
  20. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js.map +1 -1
  21. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  22. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -1
  23. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js +3 -1
  24. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js.map +1 -1
  25. package/dist/style.css +159 -135
  26. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +10 -1
  27. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  28. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  29. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +46 -5
  30. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
  31. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -0
  32. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  33. package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
  34. package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
  35. package/dist/v2/blocks/operation-block/components/Header.vue.script.js +15 -8
  36. package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
  37. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts.map +1 -1
  38. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
  39. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
  40. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js +4 -2
  41. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +1 -1
  42. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
  43. package/dist/v2/blocks/operation-block/helpers/send-request.js +4 -3
  44. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  45. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +2 -0
  46. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  47. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  48. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  49. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +51 -26
  50. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  51. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  52. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  53. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  54. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +28 -8
  55. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
  56. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.d.ts.map +1 -1
  57. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js.map +1 -1
  58. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js +9 -3
  59. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js.map +1 -1
  60. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.d.ts.map +1 -1
  61. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js.map +1 -1
  62. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js +6 -4
  63. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js.map +1 -1
  64. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  65. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
  66. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +3 -1
  67. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
  68. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  69. package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
  70. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js +7 -5
  71. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +1 -1
  72. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -2
  73. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  74. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  75. package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
  76. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js +40 -7
  77. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +1 -1
  78. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +12 -12
  79. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  80. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  81. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +24 -20
  82. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
  83. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
  84. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
  85. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +6 -4
  86. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -1
  87. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts.map +1 -1
  88. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +1 -1
  89. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -1
  90. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -1
  91. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +5 -4
  92. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
  93. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +2 -0
  94. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  95. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  96. package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
  97. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +37 -13
  98. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
  99. package/dist/v2/blocks/response-block/components/Headers.vue.d.ts +3 -3
  100. package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
  101. package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -1
  102. package/dist/v2/blocks/response-block/components/Headers.vue.script.js +5 -3
  103. package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +1 -1
  104. package/dist/v2/blocks/response-block/components/ResponseBody.vue.d.ts.map +1 -1
  105. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +1 -1
  106. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
  107. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +3 -1
  108. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +1 -1
  109. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
  111. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +11 -3
  112. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -1
  113. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
  114. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
  115. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
  116. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +8 -6
  117. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
  118. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts +1 -0
  119. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
  120. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js.map +1 -1
  121. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js +109 -56
  122. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +1 -1
  123. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -1
  124. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js.map +1 -1
  125. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js +5 -3
  126. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js.map +1 -1
  127. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
  128. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
  129. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +6 -3
  130. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -1
  131. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.d.ts.map +1 -1
  132. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
  133. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +7 -5
  134. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -1
  135. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +4 -2
  136. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  137. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  138. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
  139. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +22 -14
  140. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
  141. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  142. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +1 -1
  143. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
  144. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +4 -2
  145. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -1
  146. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -1
  147. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -1
  148. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js +11 -6
  149. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +1 -1
  150. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.d.ts +4 -0
  151. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.d.ts.map +1 -0
  152. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js +100 -0
  153. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js.map +1 -0
  154. package/dist/v2/blocks/response-block/helpers/response-stream.d.ts +13 -0
  155. package/dist/v2/blocks/response-block/helpers/response-stream.d.ts.map +1 -0
  156. package/dist/v2/blocks/response-block/helpers/response-stream.js +97 -0
  157. package/dist/v2/blocks/response-block/helpers/response-stream.js.map +1 -0
  158. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +3 -1
  159. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  160. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  161. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  162. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +42 -29
  163. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  164. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +6 -6
  165. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
  166. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
  167. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
  168. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +7 -4
  169. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
  170. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
  171. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -1
  172. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js +21 -16
  173. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +1 -1
  174. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  175. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
  176. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +7 -5
  177. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  178. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -1
  179. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js.map +1 -1
  180. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js +7 -5
  181. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +1 -1
  182. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  183. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  184. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +105 -40
  185. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  186. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
  187. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
  188. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +10 -8
  189. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -1
  190. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  191. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
  192. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +14 -9
  193. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
  194. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -1
  195. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
  196. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +6 -4
  197. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -1
  198. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  199. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
  200. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +3 -1
  201. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
  202. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  203. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
  204. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +40 -40
  205. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
  206. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts +108 -7
  207. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
  208. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +12 -0
  209. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js.map +1 -1
  210. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  211. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.d.ts.map +1 -1
  212. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js +8 -5
  213. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js.map +1 -1
  214. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +2 -0
  215. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -1
  216. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +2 -0
  217. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map +1 -1
  218. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.d.ts +3 -0
  219. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.d.ts.map +1 -0
  220. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.js +8 -0
  221. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.js.map +1 -0
  222. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.d.ts +3 -0
  223. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.d.ts.map +1 -0
  224. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js +11 -0
  225. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js.map +1 -0
  226. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts +19 -0
  227. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts.map +1 -0
  228. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js +117 -0
  229. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js.map +1 -0
  230. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -1
  231. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  232. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +15 -11
  233. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
  234. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.d.ts +1 -1
  235. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.d.ts.map +1 -1
  236. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js +8 -1
  237. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js.map +1 -1
  238. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -1
  239. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +6 -0
  240. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js.map +1 -1
  241. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -1
  242. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  243. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +8 -6
  244. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js.map +1 -1
  245. package/dist/v2/components/code-input/CodeInput.vue.d.ts +4 -4
  246. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  247. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  248. package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
  249. package/dist/v2/components/code-input/CodeInput.vue.script.js +10 -10
  250. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
  251. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts +4 -4
  252. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts.map +1 -1
  253. package/dist/v2/components/code-input/CodeInputLite.vue.js +1 -1
  254. package/dist/v2/components/code-input/CodeInputLite.vue.js.map +1 -1
  255. package/dist/v2/components/code-input/CodeInputLite.vue.script.js +8 -5
  256. package/dist/v2/components/code-input/CodeInputLite.vue.script.js.map +1 -1
  257. package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts +4 -0
  258. package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts.map +1 -1
  259. package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -1
  260. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js +7 -3
  261. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +1 -1
  262. package/dist/v2/components/code-input/code-variable-widget.d.ts +3 -0
  263. package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -1
  264. package/dist/v2/components/code-input/code-variable-widget.js +6 -3
  265. package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
  266. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts +0 -1
  267. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -1
  268. package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -1
  269. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js +4 -2
  270. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +1 -1
  271. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  272. package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
  273. package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
  274. package/dist/v2/components/data-table/DataTableInput.vue.script.js +5 -3
  275. package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
  276. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
  277. package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
  278. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js +12 -9
  279. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +1 -1
  280. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -1
  281. package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -1
  282. package/dist/v2/components/forms/ConfirmationForm.vue.script.js +5 -3
  283. package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +1 -1
  284. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -1
  285. package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
  286. package/dist/v2/components/layout/CollapsibleSection.vue.script.js +3 -1
  287. package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
  288. package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -1
  289. package/dist/v2/components/modals/DeleteModal.vue.js.map +1 -1
  290. package/dist/v2/components/modals/DeleteModal.vue.script.js +3 -1
  291. package/dist/v2/components/modals/DeleteModal.vue.script.js.map +1 -1
  292. package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
  293. package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
  294. package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
  295. package/dist/v2/components/modals/ModalClientContainer.vue.script.js +5 -2
  296. package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +1 -1
  297. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  298. package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
  299. package/dist/v2/components/server/ServerDropdown.vue.script.js +9 -5
  300. package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
  301. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  302. package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
  303. package/dist/v2/components/sidebar/Sidebar.vue.script.js +4 -2
  304. package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
  305. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  306. package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -1
  307. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js +4 -2
  308. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +1 -1
  309. package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts.map +1 -1
  310. package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
  311. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js +4 -2
  312. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +1 -1
  313. package/dist/v2/constants.js +1 -1
  314. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -1
  315. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js.map +1 -1
  316. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js +4 -2
  317. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +1 -1
  318. package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +2 -2
  319. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
  320. package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -1
  321. package/dist/v2/features/environments/EnvironmentsList.vue.script.js +4 -2
  322. package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +1 -1
  323. package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
  324. package/dist/v2/features/environments/components/Environment.vue.js.map +1 -1
  325. package/dist/v2/features/environments/components/Environment.vue.script.js +12 -10
  326. package/dist/v2/features/environments/components/Environment.vue.script.js.map +1 -1
  327. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
  328. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
  329. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +5 -3
  330. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -1
  331. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
  332. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -1
  333. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js +9 -6
  334. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +1 -1
  335. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  336. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
  337. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +6 -4
  338. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
  339. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
  340. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +1 -1
  341. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -1
  342. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js +22 -10
  343. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +1 -1
  344. package/dist/v2/features/localization/index.d.ts +18 -0
  345. package/dist/v2/features/localization/index.d.ts.map +1 -0
  346. package/dist/v2/features/localization/index.js +35 -0
  347. package/dist/v2/features/localization/index.js.map +1 -0
  348. package/dist/v2/features/localization/locales/ar.d.ts +385 -0
  349. package/dist/v2/features/localization/locales/ar.d.ts.map +1 -0
  350. package/dist/v2/features/localization/locales/ar.js +345 -0
  351. package/dist/v2/features/localization/locales/ar.js.map +1 -0
  352. package/dist/v2/features/localization/locales/de.d.ts +385 -0
  353. package/dist/v2/features/localization/locales/de.d.ts.map +1 -0
  354. package/dist/v2/features/localization/locales/de.js +345 -0
  355. package/dist/v2/features/localization/locales/de.js.map +1 -0
  356. package/dist/v2/features/localization/locales/es.d.ts +385 -0
  357. package/dist/v2/features/localization/locales/es.d.ts.map +1 -0
  358. package/dist/v2/features/localization/locales/es.js +345 -0
  359. package/dist/v2/features/localization/locales/es.js.map +1 -0
  360. package/dist/v2/features/localization/locales/fr.d.ts +385 -0
  361. package/dist/v2/features/localization/locales/fr.d.ts.map +1 -0
  362. package/dist/v2/features/localization/locales/fr.js +345 -0
  363. package/dist/v2/features/localization/locales/fr.js.map +1 -0
  364. package/dist/v2/features/localization/locales/pt.d.ts +385 -0
  365. package/dist/v2/features/localization/locales/pt.d.ts.map +1 -0
  366. package/dist/v2/features/localization/locales/pt.js +345 -0
  367. package/dist/v2/features/localization/locales/pt.js.map +1 -0
  368. package/dist/v2/features/localization/locales/ru.d.ts +385 -0
  369. package/dist/v2/features/localization/locales/ru.d.ts.map +1 -0
  370. package/dist/v2/features/localization/locales/ru.js +345 -0
  371. package/dist/v2/features/localization/locales/ru.js.map +1 -0
  372. package/dist/v2/features/localization/locales/zh-cn.d.ts +385 -0
  373. package/dist/v2/features/localization/locales/zh-cn.d.ts.map +1 -0
  374. package/dist/v2/features/localization/locales/zh-cn.js +345 -0
  375. package/dist/v2/features/localization/locales/zh-cn.js.map +1 -0
  376. package/dist/v2/features/localization/translations.d.ts +385 -0
  377. package/dist/v2/features/localization/translations.d.ts.map +1 -0
  378. package/dist/v2/features/localization/translations.js +345 -0
  379. package/dist/v2/features/localization/translations.js.map +1 -0
  380. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  381. package/dist/v2/features/modal/Modal.vue.js.map +1 -1
  382. package/dist/v2/features/modal/Modal.vue.script.js +17 -4
  383. package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
  384. package/dist/v2/features/modal/use-lazy-api-client.d.ts +11 -0
  385. package/dist/v2/features/modal/use-lazy-api-client.d.ts.map +1 -0
  386. package/dist/v2/features/modal/use-lazy-api-client.js +48 -0
  387. package/dist/v2/features/modal/use-lazy-api-client.js.map +1 -0
  388. package/dist/v2/features/operation/Operation.vue.d.ts +2 -0
  389. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  390. package/dist/v2/features/operation/Operation.vue.js.map +1 -1
  391. package/dist/v2/features/operation/Operation.vue.script.js +50 -12
  392. package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
  393. package/dist/v2/features/search/components/DocumentSearchModal.vue.d.ts.map +1 -1
  394. package/dist/v2/features/search/components/DocumentSearchModal.vue.js +1 -1
  395. package/dist/v2/features/search/components/DocumentSearchModal.vue.js.map +1 -1
  396. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js +12 -8
  397. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js.map +1 -1
  398. package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
  399. package/dist/v2/features/search/components/SearchResult.vue.js.map +1 -1
  400. package/dist/v2/features/search/components/SearchResult.vue.script.js +14 -10
  401. package/dist/v2/features/search/components/SearchResult.vue.script.js.map +1 -1
  402. package/dist/v2/types/options.d.ts +1 -1
  403. package/dist/v2/types/options.d.ts.map +1 -1
  404. package/dist/v2/workspace-events.d.ts +2 -2
  405. package/dist/v2/workspace-events.d.ts.map +1 -1
  406. package/dist/v2/workspace-events.js +8 -1
  407. package/dist/v2/workspace-events.js.map +1 -1
  408. package/dist/vue-styles.css +124 -125
  409. package/package.json +22 -11
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../../features/localization/index.js";
1
2
  import ViewLayoutSection_default from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
2
3
  import { textMediaTypes } from "./helpers/media-types.js";
3
4
  import SectionFilter_default from "../../../components/SectionFilter.vue.js";
@@ -10,16 +11,18 @@ import ResponseEmpty_default from "./components/ResponseEmpty.vue.js";
10
11
  import ResponseLoadingOverlay_default from "./components/ResponseLoadingOverlay.vue.js";
11
12
  import ResponseMetaInformation_default from "./components/ResponseMetaInformation.vue.js";
12
13
  import { parseSetCookie } from "./helpers/parse-set-cookie.js";
13
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderList, resolveDynamicComponent, unref, useId, vShow, withCtx, withDirectives } from "vue";
14
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderList, resolveDynamicComponent, toDisplayString, unref, useId, vShow, withCtx, withDirectives } from "vue";
14
15
  import { isDefined } from "@scalar/helpers/array/is-defined";
15
16
  import { ScalarErrorBoundary } from "@scalar/components/error-boundary";
16
17
  //#region src/v2/blocks/response-block/ResponseBlock.vue?vue&type=script&setup=true&lang.ts
17
18
  var _hoisted_1 = { class: "flex h-8 flex-1 items-center" };
18
- var _hoisted_2 = ["id", "role"];
19
+ var _hoisted_2 = { class: "response-heading pointer-events-none absolute" };
20
+ var _hoisted_3 = ["id", "role"];
19
21
  var VIRTUALIZATION_THRESHOLD = 2e5;
20
22
  var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
21
23
  __name: "ResponseBlock",
22
24
  props: {
25
+ executionDisabled: { type: Boolean },
23
26
  response: {},
24
27
  requestPayload: {},
25
28
  layout: {},
@@ -29,6 +32,7 @@ var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
29
32
  eventBus: {}
30
33
  },
31
34
  setup(__props, { expose: __expose }) {
35
+ const { translate } = useLocalization();
32
36
  const responseHeaders = computed(() => {
33
37
  const headers = __props.response?.headers;
34
38
  return headers ? Object.keys(headers).map((key) => ({
@@ -36,6 +40,7 @@ var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
36
40
  value: headers[key] ?? ""
37
41
  })) : [];
38
42
  });
43
+ const responseContentType = computed(() => __props.response?.headers["content-type"] ?? __props.response?.headers["Content-Type"]);
39
44
  const responseCookies = computed(() => __props.response?.cookieHeaderKeys.map((setCookieValue) => parseSetCookie(setCookieValue)).filter(isDefined) ?? []);
40
45
  const responseSections = [
41
46
  "Cookies",
@@ -79,12 +84,21 @@ var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
79
84
  activeFilter,
80
85
  filters
81
86
  });
87
+ const filterLabels = computed(() => ({
88
+ All: translate("apiClient.sectionFilter.all"),
89
+ Auth: translate("apiClient.sectionFilter.auth"),
90
+ Variables: translate("apiClient.sectionFilter.variables"),
91
+ Cookies: translate("apiClient.sectionFilter.cookies"),
92
+ Headers: translate("apiClient.sectionFilter.headers"),
93
+ Query: translate("apiClient.sectionFilter.query"),
94
+ Body: translate("apiClient.sectionFilter.body")
95
+ }));
82
96
  return (_ctx, _cache) => {
83
- return openBlock(), createBlock(ViewLayoutSection_default, { "aria-label": "Response" }, {
97
+ return openBlock(), createBlock(ViewLayoutSection_default, { "aria-label": unref(translate)("apiClient.responseBlock.response") }, {
84
98
  title: withCtx(() => [createElementVNode("div", _hoisted_1, [createElementVNode("div", {
85
99
  "aria-live": "polite",
86
100
  class: normalizeClass(["flex items-center", { "animate-response-heading": __props.response }])
87
- }, [_cache[4] || (_cache[4] = createElementVNode("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)), __props.response ? (openBlock(), createBlock(ResponseMetaInformation_default, {
101
+ }, [createElementVNode("span", _hoisted_2, toDisplayString(unref(translate)("apiClient.responseBlock.response")), 1), __props.response ? (openBlock(), createBlock(ResponseMetaInformation_default, {
88
102
  key: 0,
89
103
  class: "animate-response-children",
90
104
  eventBus: __props.eventBus,
@@ -93,11 +107,13 @@ var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
93
107
  modelValue: activeFilter.value,
94
108
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeFilter.value = $event),
95
109
  filterIds: filterIds.value,
96
- filters: filters.value
110
+ filters: filters.value,
111
+ labels: filterLabels.value
97
112
  }, null, 8, [
98
113
  "modelValue",
99
114
  "filterIds",
100
- "filters"
115
+ "filters",
116
+ "labels"
101
117
  ])])]),
102
118
  default: withCtx(() => [createElementVNode("div", {
103
119
  id: filterIds.value.All,
@@ -106,6 +122,7 @@ var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
106
122
  }, [!__props.response ? (openBlock(), createBlock(ResponseEmpty_default, {
107
123
  key: 0,
108
124
  appVersion: __props.appVersion,
125
+ executionDisabled: __props.executionDisabled,
109
126
  layout: __props.layout,
110
127
  totalPerformedRequests: __props.totalPerformedRequests,
111
128
  onAddRequest: _cache[1] || (_cache[1] = ($event) => __props.eventBus.emit("ui:open:command-palette", {
@@ -116,6 +133,7 @@ var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
116
133
  onSendRequest: _cache[3] || (_cache[3] = ($event) => __props.eventBus.emit("operation:send:request:hotkey"))
117
134
  }, null, 8, [
118
135
  "appVersion",
136
+ "executionDisabled",
119
137
  "layout",
120
138
  "totalPerformedRequests"
121
139
  ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
@@ -137,7 +155,7 @@ var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
137
155
  headers: requestHeaders.value,
138
156
  role: activeFilter.value === "All" ? "none" : "tabpanel"
139
157
  }, {
140
- title: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode("Request Headers", -1)])]),
158
+ title: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.responseBlock.requestHeaders")), 1)]),
141
159
  _: 1
142
160
  }, 8, [
143
161
  "id",
@@ -151,7 +169,7 @@ var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
151
169
  headers: responseHeaders.value,
152
170
  role: activeFilter.value === "All" ? "none" : "tabpanel"
153
171
  }, {
154
- title: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode("Response Headers", -1)])]),
172
+ title: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.responseBlock.responseHeaders")), 1)]),
155
173
  _: 1
156
174
  }, 8, [
157
175
  "id",
@@ -171,8 +189,13 @@ var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
171
189
  key: 0,
172
190
  id: filterIds.value.Body,
173
191
  class: "response-section-content-body",
192
+ contentType: responseContentType.value,
174
193
  reader: __props.response.reader
175
- }, null, 8, ["id", "reader"])) : shouldVirtualize.value && typeof __props.response?.data === "string" ? (openBlock(), createBlock(ResponseBodyVirtual_default, {
194
+ }, null, 8, [
195
+ "id",
196
+ "contentType",
197
+ "reader"
198
+ ])) : shouldVirtualize.value && typeof __props.response?.data === "string" ? (openBlock(), createBlock(ResponseBodyVirtual_default, {
176
199
  key: 1,
177
200
  id: filterIds.value.Body,
178
201
  content: __props.response.data,
@@ -195,17 +218,18 @@ var ResponseBlock_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
195
218
  layout: "client",
196
219
  plugins: __props.plugins,
197
220
  role: activeFilter.value === "All" ? "none" : "tabpanel",
198
- title: "Body"
221
+ title: unref(translate)("apiClient.responseBlock.body")
199
222
  }, null, 8, [
200
223
  "id",
201
224
  "data",
202
225
  "headers",
203
226
  "plugins",
204
- "role"
227
+ "role",
228
+ "title"
205
229
  ]))], 64)) : createCommentVNode("", true)
206
- ], 64)), createVNode(ResponseLoadingOverlay_default, { eventBus: __props.eventBus }, null, 8, ["eventBus"])], 10, _hoisted_2)]),
230
+ ], 64)), createVNode(ResponseLoadingOverlay_default, { eventBus: __props.eventBus }, null, 8, ["eventBus"])], 10, _hoisted_3)]),
207
231
  _: 1
208
- });
232
+ }, 8, ["aria-label"]);
209
233
  };
210
234
  }
211
235
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBlock.vue.script.js","names":[],"sources":["../../../../src/v2/blocks/response-block/ResponseBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { RequestPayload } from '@scalar/workspace-store/request-example'\nimport { computed, ref, useId } from 'vue'\n\nimport SectionFilter from '@/components/SectionFilter.vue'\nimport ViewLayoutSection from '@/components/ViewLayout/ViewLayoutSection.vue'\nimport type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request'\nimport HeadersComponent from '@/v2/blocks/response-block/components/Headers.vue'\nimport ResponseBody from '@/v2/blocks/response-block/components/ResponseBody.vue'\nimport ResponseBodyStreaming from '@/v2/blocks/response-block/components/ResponseBodyStreaming.vue'\nimport ResponseBodyVirtual from '@/v2/blocks/response-block/components/ResponseBodyVirtual.vue'\nimport ResponseCookies from '@/v2/blocks/response-block/components/ResponseCookies.vue'\nimport ResponseEmpty from '@/v2/blocks/response-block/components/ResponseEmpty.vue'\nimport ResponseLoadingOverlay from '@/v2/blocks/response-block/components/ResponseLoadingOverlay.vue'\nimport ResponseMetaInformation from '@/v2/blocks/response-block/components/ResponseMetaInformation.vue'\nimport { textMediaTypes } from '@/v2/blocks/response-block/helpers/media-types'\nimport { parseSetCookie } from '@/v2/blocks/response-block/helpers/parse-set-cookie'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nconst { layout, totalPerformedRequests, response, requestPayload } =\n defineProps<{\n /** Preprocessed response */\n response: ResponseInstance | null\n /** Original request as a [url, RequestInit] tuple */\n requestPayload: RequestPayload | null\n /** Client layout */\n layout: ClientLayout\n /** Total number of performed requests */\n totalPerformedRequests: number\n /** Application version */\n appVersion: string\n /** Registered app plugins */\n plugins: ClientPlugin[]\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n }>()\n\n// Headers\nconst responseHeaders = computed(() => {\n const headers = response?.headers\n\n return headers\n ? Object.keys(headers).map((key) => ({\n name: key,\n value: headers[key] ?? '',\n }))\n : []\n})\n\n// Cookies\nconst responseCookies = computed(\n () =>\n response?.cookieHeaderKeys\n .map((setCookieValue) => parseSetCookie(setCookieValue))\n .filter(isDefined) ?? [],\n)\n\nconst responseSections = ['Cookies', 'Headers', 'Body'] as const\ntype Filter = 'All' | (typeof responseSections)[number]\nconst activeFilter = ref<Filter>('All')\n\nconst filters = computed<Filter[]>(() => ['All', ...responseSections])\n\nconst filterIds = computed<Record<Filter, string>>(() => ({\n All: useId(),\n Cookies: useId(),\n Headers: useId(),\n Body: useId(),\n}))\n\n/** Threshold for virtualizing response bodies in bytes */\nconst VIRTUALIZATION_THRESHOLD = 200_000\nconst shouldVirtualize = computed(() => {\n if (!response || !('size' in response)) {\n return false\n }\n\n // Get content type from headers\n const contentType =\n response.headers?.['content-type'] || response.headers?.['Content-Type']\n\n // If no content type or response size is small, don't virtualize\n if (!contentType || (response.size ?? 0) <= VIRTUALIZATION_THRESHOLD) {\n return false\n }\n\n // Do not virtualize html\n if (contentType.includes('text/html')) {\n return false\n }\n\n // Check if content type matches any text-based type\n const isTextBased = textMediaTypes.some((type) => contentType.includes(type))\n\n return isTextBased && (response.size ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n\nconst requestHeaders = computed(() => {\n const headers = requestPayload?.[1]?.headers\n if (!headers) {\n return []\n }\n\n // Normalise via the Headers constructor, and then spread\n return [...new Headers(headers)].map(([name, value]) => ({\n name,\n value,\n required: false,\n }))\n})\n\nconst isSectionVisible = (\n section: (typeof responseSections)[number] | 'All',\n) => {\n if (activeFilter.value === 'All' || activeFilter.value === section) {\n return true\n }\n return false\n}\n\ndefineExpose({\n responseHeaders,\n responseCookies,\n requestHeaders,\n shouldVirtualize,\n activeFilter,\n filters,\n})\n</script>\n<template>\n <ViewLayoutSection aria-label=\"Response\">\n <template #title>\n <div class=\"flex h-8 flex-1 items-center\">\n <div\n aria-live=\"polite\"\n class=\"flex items-center\"\n :class=\"{ 'animate-response-heading': response }\">\n <span class=\"response-heading pointer-events-none absolute\">\n Response\n </span>\n <ResponseMetaInformation\n v-if=\"response\"\n class=\"animate-response-children\"\n :eventBus=\"eventBus\"\n :response=\"response\" />\n </div>\n <SectionFilter\n v-model=\"activeFilter\"\n :filterIds=\"filterIds\"\n :filters=\"filters\" />\n </div>\n </template>\n <div\n :id=\"filterIds.All\"\n class=\"custom-scroll response-section-content relative grid h-full justify-stretch\"\n :class=\"{\n 'content-start': response,\n }\"\n :role=\"activeFilter === 'All' && response ? 'tabpanel' : 'none'\">\n <template v-if=\"!response\">\n <ResponseEmpty\n :appVersion=\"appVersion\"\n :layout=\"layout\"\n :totalPerformedRequests=\"totalPerformedRequests\"\n @addRequest=\"\n eventBus.emit('ui:open:command-palette', {\n action: 'create-request',\n payload: undefined,\n })\n \"\n @openCommandPalette=\"eventBus.emit('ui:open:command-palette')\"\n @sendRequest=\"eventBus.emit('operation:send:request:hotkey')\" />\n </template>\n <template v-else>\n <!-- Cookies section -->\n <ResponseCookies\n v-if=\"isSectionVisible('Cookies')\"\n :id=\"filterIds.Cookies\"\n class=\"response-section-content-cookies\"\n :cookies=\"responseCookies\"\n :role=\"activeFilter === 'All' ? 'none' : 'tabpanel'\" />\n <!-- Request headers section -->\n <HeadersComponent\n v-if=\"isSectionVisible('Headers')\"\n :id=\"filterIds.Headers\"\n class=\"response-section-content-headers\"\n :headers=\"requestHeaders\"\n :role=\"activeFilter === 'All' ? 'none' : 'tabpanel'\">\n <template #title>Request Headers</template>\n </HeadersComponent>\n <!-- Response headers section -->\n <HeadersComponent\n v-if=\"isSectionVisible('Headers')\"\n :id=\"filterIds.Headers\"\n class=\"response-section-content-headers\"\n :headers=\"responseHeaders\"\n :role=\"activeFilter === 'All' ? 'none' : 'tabpanel'\">\n <template #title>Response Headers</template>\n </HeadersComponent>\n\n <!-- Inject response section plugin components -->\n <ScalarErrorBoundary\n v-for=\"(plugin, index) in plugins\"\n :key=\"index\">\n <component\n :is=\"plugin.components.response.component\"\n v-if=\"plugin?.components?.response\"\n v-show=\"activeFilter === 'All'\"\n v-bind=\"plugin.components.response.additionalProps\" />\n </ScalarErrorBoundary>\n\n <template v-if=\"activeFilter === 'All' || activeFilter === 'Body'\">\n <!-- Streaming response body -->\n <ResponseBodyStreaming\n v-if=\"'reader' in response\"\n :id=\"filterIds.Body\"\n class=\"response-section-content-body\"\n :reader=\"response.reader\" />\n\n <!-- Virtualized Text for massive responses -->\n <ResponseBodyVirtual\n v-else-if=\"shouldVirtualize && typeof response?.data === 'string'\"\n :id=\"filterIds.Body\"\n :content=\"response!.data\"\n :data=\"response?.data\"\n :headers=\"responseHeaders\"\n :role=\"activeFilter === 'All' ? 'none' : 'tabpanel'\" />\n\n <!-- Regular response body -->\n <ResponseBody\n v-else\n :id=\"filterIds.Body\"\n :active=\"true\"\n class=\"response-section-content-body\"\n :data=\"response?.data\"\n :headers=\"responseHeaders\"\n layout=\"client\"\n :plugins=\"plugins\"\n :role=\"activeFilter === 'All' ? 'none' : 'tabpanel'\"\n title=\"Body\" />\n </template>\n </template>\n <ResponseLoadingOverlay :eventBus=\"eventBus\" />\n </div>\n </ViewLayoutSection>\n</template>\n<style scoped>\n.animate-response-heading .response-heading {\n animation: push-response 0.2s ease-in-out forwards;\n opacity: 1;\n}\n@keyframes push-response {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(-4px);\n }\n}\n.animate-response-heading .animate-response-children {\n animation: response-spans 0.2s ease-in-out forwards 0.05s;\n opacity: 0;\n}\n\n@keyframes response-spans {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;AA2EA,IAAM,2BAA2B;;;;;;;;;;;;;EAjCjC,MAAM,kBAAkB,eAAe;GACrC,MAAM,UAAU,QAAA,UAAU;GAE1B,OAAO,UACH,OAAO,KAAK,OAAO,CAAC,CAAC,KAAK,SAAS;IACjC,MAAM;IACN,OAAO,QAAQ,QAAQ;GACzB,EAAE,IACF,CAAC;EACP,CAAC;EAGD,MAAM,kBAAkB,eAEpB,QAAA,UAAU,iBACP,KAAK,mBAAmB,eAAe,cAAc,CAAC,CAAA,CACtD,OAAO,SAAS,KAAK,CAAC,CAC7B;EAEA,MAAM,mBAAmB;GAAC;GAAW;GAAW;EAAM;EAEtD,MAAM,eAAe,IAAY,KAAK;EAEtC,MAAM,UAAU,eAAyB,CAAC,OAAO,GAAG,gBAAgB,CAAC;EAErE,MAAM,YA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AA,CAAA;;;;;;;uBAInC,mBAQsB,UAAA,MAAA,WAPM,QAAA,UAAlB,QAAQ,UAAK;0BADvB,YAQsB,MAAA,mBAAA,GAAA,EANnB,KAAK,MAAK,GAAA;8BAK6C,CAFhD,QAAQ,YAAY,WAAA,gBAAA,UAAA,GAF5B,YAIwD,wBAHjD,OAAO,WAAW,SAAS,SAAS,GAD3C,WAIwD;;;UAA9C,OAAO,WAAW,SAAS,eAAe,GAAA,MAAA,EAAA,IAAA,CAAA,CAAA,OAD1C,aAAA,UAAY,KAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,IAAA,CAAA,CAAA;;;;KAIR,aAAA,UAAY,SAAc,aAAA,UAAY,UAAA,UAAA,GAAtD,mBA6BW,UAAA,EAAA,KAAA,EAAA,GAAA,CAAA,YA1BW,QAAA,YAAA,UAAA,GADpB,YAI8B,+BAAA;;MAF3B,IAAI,UAAA,MAAU;MACf,OAAM;MACL,QAAQ,QAAA,SAAS;sCAIP,iBAAA,SAAgB,OAAW,QAAA,UAAU,SAAI,YAAA,UAAA,GADtD,YAMyD,6BAAA;;MAJtD,IAAI,UAAA,MAAU;MACd,SAAS,QAAA,SAAU;MACnB,MAAM,QAAA,UAAU;MAChB,SAAS,gBAAA;MACT,MAAM,aAAA,UAAY,QAAA,SAAA;;;;;;;yBAGrB,YAUiB,sBAAA;;MARd,IAAI,UAAA,MAAU;MACd,QAAQ;MACT,OAAM;MACL,MAAM,QAAA,UAAU;MAChB,SAAS,gBAAA;MACV,QAAO;MACN,SAAS,QAAA;MACT,MAAM,aAAA,UAAY,QAAA,SAAA;MACnB,OAAM;;;;;;;;aAGZ,YAA+C,gCAAA,EAAtB,UAAU,QAAA,SAAQ,GAAA,MAAA,GAAA,CAAA,UAAA,CAAA,CAAA,GAAA,IAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"ResponseBlock.vue.script.js","names":[],"sources":["../../../../src/v2/blocks/response-block/ResponseBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { RequestPayload } from '@scalar/workspace-store/request-example'\nimport { computed, ref, useId } from 'vue'\n\nimport SectionFilter from '@/components/SectionFilter.vue'\nimport ViewLayoutSection from '@/components/ViewLayout/ViewLayoutSection.vue'\nimport type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request'\nimport HeadersComponent from '@/v2/blocks/response-block/components/Headers.vue'\nimport ResponseBody from '@/v2/blocks/response-block/components/ResponseBody.vue'\nimport ResponseBodyStreaming from '@/v2/blocks/response-block/components/ResponseBodyStreaming.vue'\nimport ResponseBodyVirtual from '@/v2/blocks/response-block/components/ResponseBodyVirtual.vue'\nimport ResponseCookies from '@/v2/blocks/response-block/components/ResponseCookies.vue'\nimport ResponseEmpty from '@/v2/blocks/response-block/components/ResponseEmpty.vue'\nimport ResponseLoadingOverlay from '@/v2/blocks/response-block/components/ResponseLoadingOverlay.vue'\nimport ResponseMetaInformation from '@/v2/blocks/response-block/components/ResponseMetaInformation.vue'\nimport { textMediaTypes } from '@/v2/blocks/response-block/helpers/media-types'\nimport { parseSetCookie } from '@/v2/blocks/response-block/helpers/parse-set-cookie'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nconst { layout, totalPerformedRequests, response, requestPayload } =\n defineProps<{\n /** Wait for the selected external request example before sending. */\n executionDisabled?: boolean\n /** Preprocessed response */\n response: ResponseInstance | null\n /** Original request as a [url, RequestInit] tuple */\n requestPayload: RequestPayload | null\n /** Client layout */\n layout: ClientLayout\n /** Total number of performed requests */\n totalPerformedRequests: number\n /** Application version */\n appVersion: string\n /** Registered app plugins */\n plugins: ClientPlugin[]\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n }>()\n\nconst { translate } = useLocalization()\n\n// Headers\nconst responseHeaders = computed(() => {\n const headers = response?.headers\n\n return headers\n ? Object.keys(headers).map((key) => ({\n name: key,\n value: headers[key] ?? '',\n }))\n : []\n})\n\nconst responseContentType = computed(\n () => response?.headers['content-type'] ?? response?.headers['Content-Type'],\n)\n\n// Cookies\nconst responseCookies = computed(\n () =>\n response?.cookieHeaderKeys\n .map((setCookieValue) => parseSetCookie(setCookieValue))\n .filter(isDefined) ?? [],\n)\n\nconst responseSections = ['Cookies', 'Headers', 'Body'] as const\ntype Filter = 'All' | (typeof responseSections)[number]\nconst activeFilter = ref<Filter>('All')\n\nconst filters = computed<Filter[]>(() => ['All', ...responseSections])\n\nconst filterIds = computed<Record<Filter, string>>(() => ({\n All: useId(),\n Cookies: useId(),\n Headers: useId(),\n Body: useId(),\n}))\n\n/** Threshold for virtualizing response bodies in bytes */\nconst VIRTUALIZATION_THRESHOLD = 200_000\nconst shouldVirtualize = computed(() => {\n if (!response || !('size' in response)) {\n return false\n }\n\n // Get content type from headers\n const contentType =\n response.headers?.['content-type'] || response.headers?.['Content-Type']\n\n // If no content type or response size is small, don't virtualize\n if (!contentType || (response.size ?? 0) <= VIRTUALIZATION_THRESHOLD) {\n return false\n }\n\n // Do not virtualize html\n if (contentType.includes('text/html')) {\n return false\n }\n\n // Check if content type matches any text-based type\n const isTextBased = textMediaTypes.some((type) => contentType.includes(type))\n\n return isTextBased && (response.size ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n\nconst requestHeaders = computed(() => {\n const headers = requestPayload?.[1]?.headers\n if (!headers) {\n return []\n }\n\n // Normalise via the Headers constructor, and then spread\n return [...new Headers(headers)].map(([name, value]) => ({\n name,\n value,\n required: false,\n }))\n})\n\nconst isSectionVisible = (\n section: (typeof responseSections)[number] | 'All',\n) => {\n if (activeFilter.value === 'All' || activeFilter.value === section) {\n return true\n }\n return false\n}\n\ndefineExpose({\n responseHeaders,\n responseCookies,\n requestHeaders,\n shouldVirtualize,\n activeFilter,\n filters,\n})\n\nconst filterLabels = computed(() => ({\n All: translate('apiClient.sectionFilter.all'),\n Auth: translate('apiClient.sectionFilter.auth'),\n Variables: translate('apiClient.sectionFilter.variables'),\n Cookies: translate('apiClient.sectionFilter.cookies'),\n Headers: translate('apiClient.sectionFilter.headers'),\n Query: translate('apiClient.sectionFilter.query'),\n Body: translate('apiClient.sectionFilter.body'),\n}))\n</script>\n<template>\n <ViewLayoutSection\n :aria-label=\"translate('apiClient.responseBlock.response')\">\n <template #title>\n <div class=\"flex h-8 flex-1 items-center\">\n <div\n aria-live=\"polite\"\n class=\"flex items-center\"\n :class=\"{ 'animate-response-heading': response }\">\n <span class=\"response-heading pointer-events-none absolute\">{{\n translate('apiClient.responseBlock.response')\n }}</span>\n <ResponseMetaInformation\n v-if=\"response\"\n class=\"animate-response-children\"\n :eventBus=\"eventBus\"\n :response=\"response\" />\n </div>\n <SectionFilter\n v-model=\"activeFilter\"\n :filterIds=\"filterIds\"\n :filters=\"filters\"\n :labels=\"filterLabels\" />\n </div>\n </template>\n <div\n :id=\"filterIds.All\"\n class=\"custom-scroll response-section-content relative grid h-full justify-stretch\"\n :class=\"{\n 'content-start': response,\n }\"\n :role=\"activeFilter === 'All' && response ? 'tabpanel' : 'none'\">\n <template v-if=\"!response\">\n <ResponseEmpty\n :appVersion=\"appVersion\"\n :executionDisabled\n :layout=\"layout\"\n :totalPerformedRequests=\"totalPerformedRequests\"\n @addRequest=\"\n eventBus.emit('ui:open:command-palette', {\n action: 'create-request',\n payload: undefined,\n })\n \"\n @openCommandPalette=\"eventBus.emit('ui:open:command-palette')\"\n @sendRequest=\"eventBus.emit('operation:send:request:hotkey')\" />\n </template>\n <template v-else>\n <!-- Cookies section -->\n <ResponseCookies\n v-if=\"isSectionVisible('Cookies')\"\n :id=\"filterIds.Cookies\"\n class=\"response-section-content-cookies\"\n :cookies=\"responseCookies\"\n :role=\"activeFilter === 'All' ? 'none' : 'tabpanel'\" />\n <!-- Request headers section -->\n <HeadersComponent\n v-if=\"isSectionVisible('Headers')\"\n :id=\"filterIds.Headers\"\n class=\"response-section-content-headers\"\n :headers=\"requestHeaders\"\n :role=\"activeFilter === 'All' ? 'none' : 'tabpanel'\">\n <template #title>\n {{ translate('apiClient.responseBlock.requestHeaders') }}\n </template>\n </HeadersComponent>\n <!-- Response headers section -->\n <HeadersComponent\n v-if=\"isSectionVisible('Headers')\"\n :id=\"filterIds.Headers\"\n class=\"response-section-content-headers\"\n :headers=\"responseHeaders\"\n :role=\"activeFilter === 'All' ? 'none' : 'tabpanel'\">\n <template #title>\n {{ translate('apiClient.responseBlock.responseHeaders') }}\n </template>\n </HeadersComponent>\n\n <!-- Inject response section plugin components -->\n <ScalarErrorBoundary\n v-for=\"(plugin, index) in plugins\"\n :key=\"index\">\n <component\n :is=\"plugin.components.response.component\"\n v-if=\"plugin?.components?.response\"\n v-show=\"activeFilter === 'All'\"\n v-bind=\"plugin.components.response.additionalProps\" />\n </ScalarErrorBoundary>\n\n <template v-if=\"activeFilter === 'All' || activeFilter === 'Body'\">\n <!-- Streaming response body -->\n <ResponseBodyStreaming\n v-if=\"'reader' in response\"\n :id=\"filterIds.Body\"\n class=\"response-section-content-body\"\n :contentType=\"responseContentType\"\n :reader=\"response.reader\" />\n\n <!-- Virtualized Text for massive responses -->\n <ResponseBodyVirtual\n v-else-if=\"shouldVirtualize && typeof response?.data === 'string'\"\n :id=\"filterIds.Body\"\n :content=\"response!.data\"\n :data=\"response?.data\"\n :headers=\"responseHeaders\"\n :role=\"activeFilter === 'All' ? 'none' : 'tabpanel'\" />\n\n <!-- Regular response body -->\n <ResponseBody\n v-else\n :id=\"filterIds.Body\"\n :active=\"true\"\n class=\"response-section-content-body\"\n :data=\"response?.data\"\n :headers=\"responseHeaders\"\n layout=\"client\"\n :plugins=\"plugins\"\n :role=\"activeFilter === 'All' ? 'none' : 'tabpanel'\"\n :title=\"translate('apiClient.responseBlock.body')\" />\n </template>\n </template>\n <ResponseLoadingOverlay :eventBus=\"eventBus\" />\n </div>\n </ViewLayoutSection>\n</template>\n<style scoped>\n.animate-response-heading .response-heading {\n animation: push-response 0.2s ease-in-out forwards;\n opacity: 1;\n}\n@keyframes push-response {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(-4px);\n }\n}\n.animate-response-heading .animate-response-children {\n animation: response-spans 0.2s ease-in-out forwards 0.05s;\n opacity: 0;\n}\n\n@keyframes response-spans {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoFA,IAAM,2BAA2B;;;;;;;;;;;;;;EAxCjC,MAAM,EAAE,cAAc,gBAAgB;EAGtC,MAAM,kBAAkB,eAAe;GACrC,MAAM,UAAU,QAAA,UAAU;GAE1B,OAAO,UACH,OAAO,KAAK,OAAO,CAAC,CAAC,KAAK,SAAS;IACjC,MAAM;IACN,OAAO,QAAQ,QAAQ;GACzB,EAAE,IACF,CAAC;EACP,CAAC;EAED,MAAM,sBAAsB,eACpB,QAAA,UAAU,QAAQ,mBAAmB,QAAA,UAAU,QAAQ,eAC/D;EAGA,MAAM,kBAAkB,eAEpB,QAAA,UAAU,iBACP,KAAK,mBAAmB,eAAe,cAAc,CAAC,CAAA,CACtD,OAAO,SAAS,KAAK,CAAC,CAC7B;EAEA,MAAM,mBAAmB;GAAC;GAAW;GAAW;EAAM;EAEtD,MAAM,eAAe,IAAY,KAAK;EAEtC,MAAM,UAAU,eAAyB,CAAC,OAAO,GAAG,gBAAgB,CAAC;EAErE,MAAM,YAAY,gBAAwC;GACxD,KAAK,MAAM;GACX,SAAS,MAAM;GACf,SAAS,MAAM;GACf,MAAM,MAAM;EACd,EAAE;;EAIF,MAAM,mBAAmB,eAAe;GACtC,IAAI,CAAC,QAAA,YAAY,EAAE,UAAU,QAAA,WAC3B,OAAO;GAIT,MAAM,cACJ,QAAA,SAAS,UAAU,mBAAmB,QAAA,SAAS,UAAU;GAG3D,IAAI,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,CAAA"}
@@ -1,10 +1,10 @@
1
+ type __VLS_Props = {
2
+ headers: Header[];
3
+ };
1
4
  type Header = {
2
5
  name: string;
3
6
  value: string;
4
7
  };
5
- type __VLS_Props = {
6
- headers: Header[];
7
- };
8
8
  declare var __VLS_9: {};
9
9
  type __VLS_Slots = {} & {
10
10
  title?: (props: typeof __VLS_9) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"Headers.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/Headers.vue"],"names":[],"mappings":"AAkFA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;AAkNF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK7C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Headers.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/Headers.vue"],"names":[],"mappings":"AA0FA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;AAKF,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAqN7C,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK7C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Headers.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/Headers.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { httpHeaders, type HttpHeader } from '@scalar/helpers/http/http-headers'\nimport {\n DataTable,\n DataTableHeader,\n DataTableRow,\n DataTableText,\n} from '@v2/components/data-table'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport { CollapsibleSection } from '@/v2/components/layout'\n\ntype Header = { name: string; value: string }\n\ndefineProps<{\n headers: Header[]\n}>()\n\nconst findHeaderInfo = (name: string): HttpHeader | undefined =>\n httpHeaders[name.toLowerCase() as keyof typeof httpHeaders]\n</script>\n<template>\n <CollapsibleSection\n class=\"overflow-auto\"\n :defaultOpen=\"false\"\n :itemCount=\"headers.length\">\n <template #title><slot name=\"title\" /></template>\n <div\n v-if=\"headers.length\"\n class=\"max-h-[calc(100%-32px)] overflow-y-auto\">\n <DataTable\n :columns=\"['minmax(auto, min-content)', 'minmax(50%, 1fr)']\"\n scroll>\n <DataTableRow class=\"sr-only !block\">\n <DataTableHeader>Header Key</DataTableHeader>\n <DataTableHeader>Header Value</DataTableHeader>\n </DataTableRow>\n <DataTableRow\n v-for=\"item in headers\"\n :key=\"item.name\"\n class=\"group/row text-c-1\">\n <DataTableText\n class=\"bg-b-1 sticky left-0 z-1 max-w-full group-first/row:border-t-0\">\n <template v-if=\"typeof findHeaderInfo(item.name)?.url === 'string'\">\n <HelpfulLink\n class=\"decoration-c-3\"\n :href=\"findHeaderInfo(item.name)!.url\">\n {{ item.name }}\n </HelpfulLink>\n </template>\n <template v-else>\n {{ item.name }}\n </template>\n </DataTableText>\n <DataTableText\n class=\"z-0 group-first/row:border-t-0\"\n :text=\"item.value\" />\n </DataTableRow>\n </DataTable>\n </div>\n <!-- Empty state -->\n <div\n v-else\n class=\"text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm\">\n No headers\n </div>\n </CollapsibleSection>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Headers.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/Headers.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { httpHeaders, type HttpHeader } from '@scalar/helpers/http/http-headers'\nimport {\n DataTable,\n DataTableHeader,\n DataTableRow,\n DataTableText,\n} from '@v2/components/data-table'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport { CollapsibleSection } from '@/v2/components/layout'\nimport { useLocalization } from '@/v2/features/localization'\n\ndefineProps<{\n headers: Header[]\n}>()\n\nconst { translate } = useLocalization()\n\ntype Header = { name: string; value: string }\n\nconst findHeaderInfo = (name: string): HttpHeader | undefined =>\n httpHeaders[name.toLowerCase() as keyof typeof httpHeaders]\n</script>\n<template>\n <CollapsibleSection\n class=\"overflow-auto\"\n :defaultOpen=\"false\"\n :itemCount=\"headers.length\">\n <template #title><slot name=\"title\" /></template>\n <div\n v-if=\"headers.length\"\n class=\"max-h-[calc(100%-32px)] overflow-y-auto\">\n <DataTable\n :columns=\"['minmax(auto, min-content)', 'minmax(50%, 1fr)']\"\n scroll>\n <DataTableRow class=\"sr-only !block\">\n <DataTableHeader>\n {{ translate('apiClient.headers.headerKey') }}\n </DataTableHeader>\n <DataTableHeader>\n {{ translate('apiClient.headers.headerValue') }}\n </DataTableHeader>\n </DataTableRow>\n <DataTableRow\n v-for=\"item in headers\"\n :key=\"item.name\"\n class=\"group/row text-c-1\">\n <DataTableText\n class=\"bg-b-1 sticky left-0 z-1 max-w-full group-first/row:border-t-0\">\n <template v-if=\"typeof findHeaderInfo(item.name)?.url === 'string'\">\n <HelpfulLink\n class=\"decoration-c-3\"\n :href=\"findHeaderInfo(item.name)!.url\">\n {{ item.name }}\n </HelpfulLink>\n </template>\n <template v-else>\n {{ item.name }}\n </template>\n </DataTableText>\n <DataTableText\n class=\"z-0 group-first/row:border-t-0\"\n :text=\"item.value\" />\n </DataTableRow>\n </DataTable>\n </div>\n <!-- Empty state -->\n <div\n v-else\n class=\"text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm\">\n {{ translate('apiClient.headers.noHeaders') }}\n </div>\n </CollapsibleSection>\n</template>\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../../../features/localization/index.js";
1
2
  import DataTable_default from "../../../components/data-table/DataTable.vue.js";
2
3
  import DataTableHeader_default from "../../../components/data-table/DataTableHeader.vue.js";
3
4
  import DataTableRow_default from "../../../components/data-table/DataTableRow.vue.js";
@@ -19,6 +20,7 @@ var Headers_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
19
20
  __name: "Headers",
20
21
  props: { headers: {} },
21
22
  setup(__props) {
23
+ const { translate } = useLocalization();
22
24
  const findHeaderInfo = (name) => httpHeaders[name.toLowerCase()];
23
25
  return (_ctx, _cache) => {
24
26
  return openBlock(), createBlock(unref(CollapsibleSection_default), {
@@ -33,10 +35,10 @@ var Headers_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
33
35
  }, {
34
36
  default: withCtx(() => [createVNode(unref(DataTableRow_default), { class: "sr-only !block" }, {
35
37
  default: withCtx(() => [createVNode(unref(DataTableHeader_default), null, {
36
- default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Header Key", -1)])]),
38
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.headers.headerKey")), 1)]),
37
39
  _: 1
38
40
  }), createVNode(unref(DataTableHeader_default), null, {
39
- default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Header Value", -1)])]),
41
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.headers.headerValue")), 1)]),
40
42
  _: 1
41
43
  })]),
42
44
  _: 1
@@ -63,7 +65,7 @@ var Headers_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
63
65
  }, 1024);
64
66
  }), 128))]),
65
67
  _: 1
66
- })])) : (openBlock(), createElementBlock("div", _hoisted_2, " No headers "))]),
68
+ })])) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(unref(translate)("apiClient.headers.noHeaders")), 1))]),
67
69
  _: 3
68
70
  }, 8, ["itemCount"]);
69
71
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Headers.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/Headers.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { httpHeaders, type HttpHeader } from '@scalar/helpers/http/http-headers'\nimport {\n DataTable,\n DataTableHeader,\n DataTableRow,\n DataTableText,\n} from '@v2/components/data-table'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport { CollapsibleSection } from '@/v2/components/layout'\n\ntype Header = { name: string; value: string }\n\ndefineProps<{\n headers: Header[]\n}>()\n\nconst findHeaderInfo = (name: string): HttpHeader | undefined =>\n httpHeaders[name.toLowerCase() as keyof typeof httpHeaders]\n</script>\n<template>\n <CollapsibleSection\n class=\"overflow-auto\"\n :defaultOpen=\"false\"\n :itemCount=\"headers.length\">\n <template #title><slot name=\"title\" /></template>\n <div\n v-if=\"headers.length\"\n class=\"max-h-[calc(100%-32px)] overflow-y-auto\">\n <DataTable\n :columns=\"['minmax(auto, min-content)', 'minmax(50%, 1fr)']\"\n scroll>\n <DataTableRow class=\"sr-only !block\">\n <DataTableHeader>Header Key</DataTableHeader>\n <DataTableHeader>Header Value</DataTableHeader>\n </DataTableRow>\n <DataTableRow\n v-for=\"item in headers\"\n :key=\"item.name\"\n class=\"group/row text-c-1\">\n <DataTableText\n class=\"bg-b-1 sticky left-0 z-1 max-w-full group-first/row:border-t-0\">\n <template v-if=\"typeof findHeaderInfo(item.name)?.url === 'string'\">\n <HelpfulLink\n class=\"decoration-c-3\"\n :href=\"findHeaderInfo(item.name)!.url\">\n {{ item.name }}\n </HelpfulLink>\n </template>\n <template v-else>\n {{ item.name }}\n </template>\n </DataTableText>\n <DataTableText\n class=\"z-0 group-first/row:border-t-0\"\n :text=\"item.value\" />\n </DataTableRow>\n </DataTable>\n </div>\n <!-- Empty state -->\n <div\n v-else\n class=\"text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm\">\n No headers\n </div>\n </CollapsibleSection>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,kBAAkB,SACtB,YAAY,KAAK,YAAY;;uBAG7B,YA4CqB,MAAA,0BAAA,GAAA;IA3CnB,OAAM;IACL,aAAa;IACb,WAAW,QAAA,QAAQ;;IACT,OAAK,cAAsB,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;2BAiChC,CA/BE,QAAA,QAAQ,UAAA,UAAA,GADhB,mBAgCM,OAhCN,YAgCM,CA7BJ,YA4BY,MAAA,iBAAA,GAAA;KA3BT,SAAS,CAAA,6BAAA,kBAAA;KACV,QAAA;;4BAIe,CAHf,YAGe,MAAA,oBAAA,GAAA,EAHD,OAAM,iBAAgB,GAAA;6BACW,CAA7C,YAA6C,MAAA,uBAAA,GAAA,MAAA;8BAAlB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAV,cAAU,EAAA,CAAA,EAAA,CAAA;;UAC3B,YAA+C,MAAA,uBAAA,GAAA,MAAA;8BAAlB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAZ,gBAAY,EAAA,CAAA,EAAA,CAAA;;;;2BAE/B,mBAoBe,UAAA,MAAA,WAnBE,QAAA,UAAR,SAAI;0BADb,YAoBe,MAAA,oBAAA,GAAA;OAlBZ,KAAK,KAAK;OACX,OAAM;;8BAaU,CAZhB,YAYgB,MAAA,qBAAA,GAAA,EAXd,OAAM,iEAAgE,GAAA;+BAO3D,CAAA,OANY,eAAe,KAAK,IAAI,CAAA,EAAG,QAAG,YAAA,UAAA,GACnD,YAIc,qBAAA;;SAHZ,OAAM;SACL,MAAM,eAAe,KAAK,IAAI,CAAA,CAAG;;gCACnB,CAAA,gBAAA,gBAAZ,KAAK,IAAI,GAAA,CAAA,CAAA,CAAA;;4CAGhB,mBAEW,UAAA,EAAA,KAAA,EAAA,GAAA,CAAA,gBAAA,gBADN,KAAK,IAAI,GAAA,CAAA,CAAA,GAAA,EAAA,EAAA,CAAA;;iBAGhB,YAEuB,MAAA,qBAAA,GAAA;QADrB,OAAM;QACL,MAAM,KAAK;;;;;;0BAKpB,mBAIM,OAJN,YAE8F,cAE9F,EAAA,CAAA"}
1
+ {"version":3,"file":"Headers.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/Headers.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { httpHeaders, type HttpHeader } from '@scalar/helpers/http/http-headers'\nimport {\n DataTable,\n DataTableHeader,\n DataTableRow,\n DataTableText,\n} from '@v2/components/data-table'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport { CollapsibleSection } from '@/v2/components/layout'\nimport { useLocalization } from '@/v2/features/localization'\n\ndefineProps<{\n headers: Header[]\n}>()\n\nconst { translate } = useLocalization()\n\ntype Header = { name: string; value: string }\n\nconst findHeaderInfo = (name: string): HttpHeader | undefined =>\n httpHeaders[name.toLowerCase() as keyof typeof httpHeaders]\n</script>\n<template>\n <CollapsibleSection\n class=\"overflow-auto\"\n :defaultOpen=\"false\"\n :itemCount=\"headers.length\">\n <template #title><slot name=\"title\" /></template>\n <div\n v-if=\"headers.length\"\n class=\"max-h-[calc(100%-32px)] overflow-y-auto\">\n <DataTable\n :columns=\"['minmax(auto, min-content)', 'minmax(50%, 1fr)']\"\n scroll>\n <DataTableRow class=\"sr-only !block\">\n <DataTableHeader>\n {{ translate('apiClient.headers.headerKey') }}\n </DataTableHeader>\n <DataTableHeader>\n {{ translate('apiClient.headers.headerValue') }}\n </DataTableHeader>\n </DataTableRow>\n <DataTableRow\n v-for=\"item in headers\"\n :key=\"item.name\"\n class=\"group/row text-c-1\">\n <DataTableText\n class=\"bg-b-1 sticky left-0 z-1 max-w-full group-first/row:border-t-0\">\n <template v-if=\"typeof findHeaderInfo(item.name)?.url === 'string'\">\n <HelpfulLink\n class=\"decoration-c-3\"\n :href=\"findHeaderInfo(item.name)!.url\">\n {{ item.name }}\n </HelpfulLink>\n </template>\n <template v-else>\n {{ item.name }}\n </template>\n </DataTableText>\n <DataTableText\n class=\"z-0 group-first/row:border-t-0\"\n :text=\"item.value\" />\n </DataTableRow>\n </DataTable>\n </div>\n <!-- Empty state -->\n <div\n v-else\n class=\"text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm\">\n {{ translate('apiClient.headers.noHeaders') }}\n </div>\n </CollapsibleSection>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,EAAE,cAAc,gBAAgB;EAItC,MAAM,kBAAkB,SACtB,YAAY,KAAK,YAAY;;uBAG7B,YAgDqB,MAAA,0BAAA,GAAA;IA/CnB,OAAM;IACL,aAAa;IACb,WAAW,QAAA,QAAQ;;IACT,OAAK,cAAsB,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;2BAqChC,CAnCE,QAAA,QAAQ,UAAA,UAAA,GADhB,mBAoCM,OApCN,YAoCM,CAjCJ,YAgCY,MAAA,iBAAA,GAAA;KA/BT,SAAS,CAAA,6BAAA,kBAAA;KACV,QAAA;;4BAQe,CAPf,YAOe,MAAA,oBAAA,GAAA,EAPD,OAAM,iBAAgB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;IAC9B,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC1C,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB,CAAC;AA8OF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ResponseBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseBody.vue"],"names":[],"mappings":"AA6IA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAgB7D,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC1C,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB,CAAC;AAkPF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
2
2
  import ResponseBody_vue_vue_type_script_setup_true_lang_default from "./ResponseBody.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/v2/blocks/response-block/components/ResponseBody.vue
5
- var ResponseBody_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ResponseBody_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-bb31ac6f"]]);
5
+ var ResponseBody_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ResponseBody_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-f09bb250"]]);
6
6
  //#endregion
7
7
  export { ResponseBody_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBody.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseBody.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { CodeMirrorLanguage } from '@scalar/use-codemirror'\nimport { computed, ref } from 'vue'\n\nimport { getMediaTypeConfig } from '@/v2/blocks/response-block/helpers/media-types'\nimport { processResponseBody } from '@/v2/blocks/response-block/helpers/process-response-body'\nimport { resolveResponseBodyHandler } from '@/v2/blocks/response-block/helpers/resolve-response-body-handler'\nimport { CollapsibleSection } from '@/v2/components/layout'\n\nimport ResponseBodyDownload from './ResponseBodyDownload.vue'\nimport ResponseBodyInfo from './ResponseBodyInfo.vue'\nimport ResponseBodyPreview from './ResponseBodyPreview.vue'\nimport ResponseBodyRaw from './ResponseBodyRaw.vue'\nimport ResponseBodyToggle from './ResponseBodyToggle.vue'\n\nconst {\n data,\n headers,\n plugins = [],\n} = defineProps<{\n title: string\n layout: 'client' | 'reference'\n data: unknown\n headers: { name: string; value: string }[]\n plugins?: ClientPlugin[]\n}>()\n\n/** Preview / Raw toggle */\nconst toggle = ref(true)\n\nconst responseBody = computed(() =>\n processResponseBody({\n data,\n headers,\n }),\n)\n\nconst mimeEssence = computed(() => responseBody.value.mimeType.essence)\n\nconst mediaConfig = computed(() => getMediaTypeConfig(mimeEssence.value))\n\nconst pluginHandler = computed(() =>\n resolveResponseBodyHandler(mimeEssence.value, plugins),\n)\n\nconst hasRaw = computed(\n () =>\n !!pluginHandler.value?.rawComponent ||\n !!pluginHandler.value?.decode ||\n !!mediaConfig.value?.raw,\n)\n\nconst hasPreview = computed(\n () => !!pluginHandler.value?.previewComponent || !!mediaConfig.value?.preview,\n)\n\nconst showToggle = computed(() => hasRaw.value && hasPreview.value)\n\nconst showPreview = computed(() => toggle.value || !showToggle.value)\nconst showRaw = computed(() => !toggle.value || !showToggle.value)\n\nconst rawLanguage = computed(\n () => pluginHandler.value?.language ?? mediaConfig.value?.language,\n)\n</script>\n<template>\n <CollapsibleSection\n class=\"max-h-content overflow-y-hidden\"\n :isStatic=\"layout === 'reference'\">\n <template #title>{{ title }}</template>\n <template\n v-if=\"data && responseBody.dataUrl\"\n #actions>\n <ResponseBodyDownload\n :filename=\"responseBody.attachmentFilename\"\n :href=\"responseBody.dataUrl\"\n :type=\"responseBody.mimeType?.essence\" />\n </template>\n <div\n v-if=\"data\"\n class=\"bg-b-1 flex max-h-[calc(100%-32px)] flex-col overflow-hidden\">\n <div\n class=\"box-content flex min-h-8 items-center justify-between border-y px-3\">\n <span class=\"text-xxs font-code leading-5\">\n {{ mimeEssence }}\n </span>\n <ResponseBodyToggle\n v-if=\"showToggle\"\n v-model=\"toggle\" />\n </div>\n\n <!-- Plugin custom preview component -->\n <component\n :is=\"pluginHandler.previewComponent\"\n v-if=\"pluginHandler?.previewComponent && hasPreview && showPreview\"\n :key=\"`plugin-preview-${responseBody.dataUrl}`\"\n :content=\"data\"\n :contentType=\"mimeEssence\"\n :dataUrl=\"responseBody.dataUrl\" />\n <!-- Default preview renderer (JSON, image, video, HTML object, …) -->\n <ResponseBodyPreview\n v-else-if=\"mediaConfig?.preview && showPreview\"\n :key=\"`preview-${responseBody.dataUrl}`\"\n :alpha=\"mediaConfig.alpha\"\n :content=\"data\"\n :mode=\"mediaConfig.preview\"\n :src=\"responseBody.dataUrl\"\n :type=\"mimeEssence\" />\n\n <!-- Plugin custom raw component -->\n <component\n :is=\"pluginHandler.rawComponent\"\n v-if=\"pluginHandler?.rawComponent && hasRaw && showRaw\"\n :key=\"`plugin-raw-${responseBody.dataUrl}`\"\n :content=\"data\"\n :contentType=\"mimeEssence\" />\n <!-- Default raw: exact decoded body (no JSON pretty-print) -->\n <ResponseBodyRaw\n v-else-if=\"hasRaw && showRaw && !pluginHandler?.rawComponent\"\n :key=\"`raw-${responseBody.dataUrl}`\"\n :content=\"data\"\n :language=\"rawLanguage as CodeMirrorLanguage\" />\n\n <ResponseBodyInfo v-if=\"!hasRaw && !hasPreview\">\n Binary file\n </ResponseBodyInfo>\n </div>\n </CollapsibleSection>\n</template>\n<style scoped>\n.scalar-code-block :deep(.hljs *) {\n font-size: var(--scalar-small);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ResponseBody.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseBody.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { CodeMirrorLanguage } from '@scalar/use-codemirror'\nimport { computed, ref } from 'vue'\n\nimport { getMediaTypeConfig } from '@/v2/blocks/response-block/helpers/media-types'\nimport { processResponseBody } from '@/v2/blocks/response-block/helpers/process-response-body'\nimport { resolveResponseBodyHandler } from '@/v2/blocks/response-block/helpers/resolve-response-body-handler'\nimport { CollapsibleSection } from '@/v2/components/layout'\nimport { useLocalization } from '@/v2/features/localization'\n\nimport ResponseBodyDownload from './ResponseBodyDownload.vue'\nimport ResponseBodyInfo from './ResponseBodyInfo.vue'\nimport ResponseBodyPreview from './ResponseBodyPreview.vue'\nimport ResponseBodyRaw from './ResponseBodyRaw.vue'\nimport ResponseBodyToggle from './ResponseBodyToggle.vue'\n\nconst {\n data,\n headers,\n plugins = [],\n} = defineProps<{\n title: string\n layout: 'client' | 'reference'\n data: unknown\n headers: { name: string; value: string }[]\n plugins?: ClientPlugin[]\n}>()\n\nconst { translate } = useLocalization()\n\n/** Preview / Raw toggle */\nconst toggle = ref(true)\n\nconst responseBody = computed(() =>\n processResponseBody({\n data,\n headers,\n }),\n)\n\nconst mimeEssence = computed(() => responseBody.value.mimeType.essence)\n\nconst mediaConfig = computed(() => getMediaTypeConfig(mimeEssence.value))\n\nconst pluginHandler = computed(() =>\n resolveResponseBodyHandler(mimeEssence.value, plugins),\n)\n\nconst hasRaw = computed(\n () =>\n !!pluginHandler.value?.rawComponent ||\n !!pluginHandler.value?.decode ||\n !!mediaConfig.value?.raw,\n)\n\nconst hasPreview = computed(\n () => !!pluginHandler.value?.previewComponent || !!mediaConfig.value?.preview,\n)\n\nconst showToggle = computed(() => hasRaw.value && hasPreview.value)\n\nconst showPreview = computed(() => toggle.value || !showToggle.value)\nconst showRaw = computed(() => !toggle.value || !showToggle.value)\n\nconst rawLanguage = computed(\n () => pluginHandler.value?.language ?? mediaConfig.value?.language,\n)\n</script>\n<template>\n <CollapsibleSection\n class=\"max-h-content overflow-y-hidden\"\n :isStatic=\"layout === 'reference'\">\n <template #title>{{ title }}</template>\n <template\n v-if=\"data && responseBody.dataUrl\"\n #actions>\n <ResponseBodyDownload\n :filename=\"responseBody.attachmentFilename\"\n :href=\"responseBody.dataUrl\"\n :type=\"responseBody.mimeType?.essence\" />\n </template>\n <div\n v-if=\"data\"\n class=\"bg-b-1 flex max-h-[calc(100%-32px)] flex-col overflow-hidden\">\n <div\n class=\"box-content flex min-h-8 items-center justify-between border-y px-3\">\n <span class=\"text-xxs font-code leading-5\">\n {{ mimeEssence }}\n </span>\n <ResponseBodyToggle\n v-if=\"showToggle\"\n v-model=\"toggle\" />\n </div>\n\n <!-- Plugin custom preview component -->\n <component\n :is=\"pluginHandler.previewComponent\"\n v-if=\"pluginHandler?.previewComponent && hasPreview && showPreview\"\n :key=\"`plugin-preview-${responseBody.dataUrl}`\"\n :content=\"data\"\n :contentType=\"mimeEssence\"\n :dataUrl=\"responseBody.dataUrl\" />\n <!-- Default preview renderer (JSON, image, video, HTML object, …) -->\n <ResponseBodyPreview\n v-else-if=\"mediaConfig?.preview && showPreview\"\n :key=\"`preview-${responseBody.dataUrl}`\"\n :alpha=\"mediaConfig.alpha\"\n :content=\"data\"\n :mode=\"mediaConfig.preview\"\n :src=\"responseBody.dataUrl\"\n :type=\"mimeEssence\" />\n\n <!-- Plugin custom raw component -->\n <component\n :is=\"pluginHandler.rawComponent\"\n v-if=\"pluginHandler?.rawComponent && hasRaw && showRaw\"\n :key=\"`plugin-raw-${responseBody.dataUrl}`\"\n :content=\"data\"\n :contentType=\"mimeEssence\" />\n <!-- Default raw: exact decoded body (no JSON pretty-print) -->\n <ResponseBodyRaw\n v-else-if=\"hasRaw && showRaw && !pluginHandler?.rawComponent\"\n :key=\"`raw-${responseBody.dataUrl}`\"\n :content=\"data\"\n :language=\"rawLanguage as CodeMirrorLanguage\" />\n\n <ResponseBodyInfo v-if=\"!hasRaw && !hasPreview\">\n {{ translate('apiClient.responseBody.binaryFile') }}\n </ResponseBodyInfo>\n </div>\n </CollapsibleSection>\n</template>\n<style scoped>\n.scalar-code-block :deep(.hljs *) {\n font-size: var(--scalar-small);\n}\n</style>\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../../../features/localization/index.js";
1
2
  import { resolveResponseBodyHandler } from "../helpers/resolve-response-body-handler.js";
2
3
  import { getMediaTypeConfig } from "../helpers/media-types.js";
3
4
  import CollapsibleSection_default from "../../../components/layout/CollapsibleSection.vue.js";
@@ -25,6 +26,7 @@ var ResponseBody_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
25
26
  plugins: { default: () => [] }
26
27
  },
27
28
  setup(__props) {
29
+ const { translate } = useLocalization();
28
30
  /** Preview / Raw toggle */
29
31
  const toggle = ref(true);
30
32
  const responseBody = computed(() => processResponseBody({
@@ -85,7 +87,7 @@ var ResponseBody_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
85
87
  language: rawLanguage.value
86
88
  }, null, 8, ["content", "language"])) : createCommentVNode("", true),
87
89
  !hasRaw.value && !hasPreview.value ? (openBlock(), createBlock(ResponseBodyInfo_default, { key: 4 }, {
88
- default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Binary file ", -1)])]),
90
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.responseBody.binaryFile")), 1)]),
89
91
  _: 1
90
92
  })) : createCommentVNode("", true)
91
93
  ])) : createCommentVNode("", true)]),
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBody.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseBody.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { CodeMirrorLanguage } from '@scalar/use-codemirror'\nimport { computed, ref } from 'vue'\n\nimport { getMediaTypeConfig } from '@/v2/blocks/response-block/helpers/media-types'\nimport { processResponseBody } from '@/v2/blocks/response-block/helpers/process-response-body'\nimport { resolveResponseBodyHandler } from '@/v2/blocks/response-block/helpers/resolve-response-body-handler'\nimport { CollapsibleSection } from '@/v2/components/layout'\n\nimport ResponseBodyDownload from './ResponseBodyDownload.vue'\nimport ResponseBodyInfo from './ResponseBodyInfo.vue'\nimport ResponseBodyPreview from './ResponseBodyPreview.vue'\nimport ResponseBodyRaw from './ResponseBodyRaw.vue'\nimport ResponseBodyToggle from './ResponseBodyToggle.vue'\n\nconst {\n data,\n headers,\n plugins = [],\n} = defineProps<{\n title: string\n layout: 'client' | 'reference'\n data: unknown\n headers: { name: string; value: string }[]\n plugins?: ClientPlugin[]\n}>()\n\n/** Preview / Raw toggle */\nconst toggle = ref(true)\n\nconst responseBody = computed(() =>\n processResponseBody({\n data,\n headers,\n }),\n)\n\nconst mimeEssence = computed(() => responseBody.value.mimeType.essence)\n\nconst mediaConfig = computed(() => getMediaTypeConfig(mimeEssence.value))\n\nconst pluginHandler = computed(() =>\n resolveResponseBodyHandler(mimeEssence.value, plugins),\n)\n\nconst hasRaw = computed(\n () =>\n !!pluginHandler.value?.rawComponent ||\n !!pluginHandler.value?.decode ||\n !!mediaConfig.value?.raw,\n)\n\nconst hasPreview = computed(\n () => !!pluginHandler.value?.previewComponent || !!mediaConfig.value?.preview,\n)\n\nconst showToggle = computed(() => hasRaw.value && hasPreview.value)\n\nconst showPreview = computed(() => toggle.value || !showToggle.value)\nconst showRaw = computed(() => !toggle.value || !showToggle.value)\n\nconst rawLanguage = computed(\n () => pluginHandler.value?.language ?? mediaConfig.value?.language,\n)\n</script>\n<template>\n <CollapsibleSection\n class=\"max-h-content overflow-y-hidden\"\n :isStatic=\"layout === 'reference'\">\n <template #title>{{ title }}</template>\n <template\n v-if=\"data && responseBody.dataUrl\"\n #actions>\n <ResponseBodyDownload\n :filename=\"responseBody.attachmentFilename\"\n :href=\"responseBody.dataUrl\"\n :type=\"responseBody.mimeType?.essence\" />\n </template>\n <div\n v-if=\"data\"\n class=\"bg-b-1 flex max-h-[calc(100%-32px)] flex-col overflow-hidden\">\n <div\n class=\"box-content flex min-h-8 items-center justify-between border-y px-3\">\n <span class=\"text-xxs font-code leading-5\">\n {{ mimeEssence }}\n </span>\n <ResponseBodyToggle\n v-if=\"showToggle\"\n v-model=\"toggle\" />\n </div>\n\n <!-- Plugin custom preview component -->\n <component\n :is=\"pluginHandler.previewComponent\"\n v-if=\"pluginHandler?.previewComponent && hasPreview && showPreview\"\n :key=\"`plugin-preview-${responseBody.dataUrl}`\"\n :content=\"data\"\n :contentType=\"mimeEssence\"\n :dataUrl=\"responseBody.dataUrl\" />\n <!-- Default preview renderer (JSON, image, video, HTML object, …) -->\n <ResponseBodyPreview\n v-else-if=\"mediaConfig?.preview && showPreview\"\n :key=\"`preview-${responseBody.dataUrl}`\"\n :alpha=\"mediaConfig.alpha\"\n :content=\"data\"\n :mode=\"mediaConfig.preview\"\n :src=\"responseBody.dataUrl\"\n :type=\"mimeEssence\" />\n\n <!-- Plugin custom raw component -->\n <component\n :is=\"pluginHandler.rawComponent\"\n v-if=\"pluginHandler?.rawComponent && hasRaw && showRaw\"\n :key=\"`plugin-raw-${responseBody.dataUrl}`\"\n :content=\"data\"\n :contentType=\"mimeEssence\" />\n <!-- Default raw: exact decoded body (no JSON pretty-print) -->\n <ResponseBodyRaw\n v-else-if=\"hasRaw && showRaw && !pluginHandler?.rawComponent\"\n :key=\"`raw-${responseBody.dataUrl}`\"\n :content=\"data\"\n :language=\"rawLanguage as CodeMirrorLanguage\" />\n\n <ResponseBodyInfo v-if=\"!hasRaw && !hasPreview\">\n Binary file\n </ResponseBodyInfo>\n </div>\n </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,YAAA,SAAA,UAAA,GAFzD,YAMoC,wBAL7B,cAAA,MAAc,gBAAgB,GAAA;MAElC,KAAG,kBAAoB,aAAA,MAAa;MACpC,SAAS,QAAA;MACT,aAAa,YAAA;MACb,SAAS,aAAA,MAAa;;;;;WAGZ,YAAA,OAAa,WAAW,YAAA,SAAA,UAAA,GADrC,YAOwB,6BAAA;MALrB,KAAG,WAAa,aAAA,MAAa;MAC7B,OAAO,YAAA,MAAY;MACnB,SAAS,QAAA;MACT,MAAM,YAAA,MAAY;MAClB,KAAK,aAAA,MAAa;MAClB,MAAM,YAAA;;;;;;;;KAKD,cAAA,OAAe,gBAAgB,OAAA,SAAU,QAAA,SAAA,UAAA,GAFjD,YAK+B,wBAJxB,cAAA,MAAc,YAAY,GAAA;MAE9B,KAAG,cAAgB,aAAA,MAAa;MAChC,SAAS,QAAA;MACT,aAAa,YAAA;gDAGH,OAAA,SAAU,QAAA,SAAO,CAAK,cAAA,OAAe,gBAAA,UAAA,GADlD,YAIkD,yBAAA;MAF/C,KAAG,OAAS,aAAA,MAAa;MACzB,SAAS,QAAA;MACT,UAAU,YAAA;;MAEY,OAAA,SAAM,CAAK,WAAA,SAAA,UAAA,GAApC,YAEmB,0BAAA,EAAA,KAAA,EAAA,GAAA;6BAAnB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFgD,iBAEhD,EAAA,CAAA,EAAA,CAAA;;;;;OAtDM,QAAA,QAAQ,aAAA,MAAa,UAAA;UAC1B;sBAI0C,CAH3C,YAG2C,8BAAA;KAFxC,UAAU,aAAA,MAAa;KACvB,MAAM,aAAA,MAAa;KACnB,MAAM,aAAA,MAAa,UAAU"}
1
+ {"version":3,"file":"ResponseBody.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseBody.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { CodeMirrorLanguage } from '@scalar/use-codemirror'\nimport { computed, ref } from 'vue'\n\nimport { getMediaTypeConfig } from '@/v2/blocks/response-block/helpers/media-types'\nimport { processResponseBody } from '@/v2/blocks/response-block/helpers/process-response-body'\nimport { resolveResponseBodyHandler } from '@/v2/blocks/response-block/helpers/resolve-response-body-handler'\nimport { CollapsibleSection } from '@/v2/components/layout'\nimport { useLocalization } from '@/v2/features/localization'\n\nimport ResponseBodyDownload from './ResponseBodyDownload.vue'\nimport ResponseBodyInfo from './ResponseBodyInfo.vue'\nimport ResponseBodyPreview from './ResponseBodyPreview.vue'\nimport ResponseBodyRaw from './ResponseBodyRaw.vue'\nimport ResponseBodyToggle from './ResponseBodyToggle.vue'\n\nconst {\n data,\n headers,\n plugins = [],\n} = defineProps<{\n title: string\n layout: 'client' | 'reference'\n data: unknown\n headers: { name: string; value: string }[]\n plugins?: ClientPlugin[]\n}>()\n\nconst { translate } = useLocalization()\n\n/** Preview / Raw toggle */\nconst toggle = ref(true)\n\nconst responseBody = computed(() =>\n processResponseBody({\n data,\n headers,\n }),\n)\n\nconst mimeEssence = computed(() => responseBody.value.mimeType.essence)\n\nconst mediaConfig = computed(() => getMediaTypeConfig(mimeEssence.value))\n\nconst pluginHandler = computed(() =>\n resolveResponseBodyHandler(mimeEssence.value, plugins),\n)\n\nconst hasRaw = computed(\n () =>\n !!pluginHandler.value?.rawComponent ||\n !!pluginHandler.value?.decode ||\n !!mediaConfig.value?.raw,\n)\n\nconst hasPreview = computed(\n () => !!pluginHandler.value?.previewComponent || !!mediaConfig.value?.preview,\n)\n\nconst showToggle = computed(() => hasRaw.value && hasPreview.value)\n\nconst showPreview = computed(() => toggle.value || !showToggle.value)\nconst showRaw = computed(() => !toggle.value || !showToggle.value)\n\nconst rawLanguage = computed(\n () => pluginHandler.value?.language ?? mediaConfig.value?.language,\n)\n</script>\n<template>\n <CollapsibleSection\n class=\"max-h-content overflow-y-hidden\"\n :isStatic=\"layout === 'reference'\">\n <template #title>{{ title }}</template>\n <template\n v-if=\"data && responseBody.dataUrl\"\n #actions>\n <ResponseBodyDownload\n :filename=\"responseBody.attachmentFilename\"\n :href=\"responseBody.dataUrl\"\n :type=\"responseBody.mimeType?.essence\" />\n </template>\n <div\n v-if=\"data\"\n class=\"bg-b-1 flex max-h-[calc(100%-32px)] flex-col overflow-hidden\">\n <div\n class=\"box-content flex min-h-8 items-center justify-between border-y px-3\">\n <span class=\"text-xxs font-code leading-5\">\n {{ mimeEssence }}\n </span>\n <ResponseBodyToggle\n v-if=\"showToggle\"\n v-model=\"toggle\" />\n </div>\n\n <!-- Plugin custom preview component -->\n <component\n :is=\"pluginHandler.previewComponent\"\n v-if=\"pluginHandler?.previewComponent && hasPreview && showPreview\"\n :key=\"`plugin-preview-${responseBody.dataUrl}`\"\n :content=\"data\"\n :contentType=\"mimeEssence\"\n :dataUrl=\"responseBody.dataUrl\" />\n <!-- Default preview renderer (JSON, image, video, HTML object, …) -->\n <ResponseBodyPreview\n v-else-if=\"mediaConfig?.preview && showPreview\"\n :key=\"`preview-${responseBody.dataUrl}`\"\n :alpha=\"mediaConfig.alpha\"\n :content=\"data\"\n :mode=\"mediaConfig.preview\"\n :src=\"responseBody.dataUrl\"\n :type=\"mimeEssence\" />\n\n <!-- Plugin custom raw component -->\n <component\n :is=\"pluginHandler.rawComponent\"\n v-if=\"pluginHandler?.rawComponent && hasRaw && showRaw\"\n :key=\"`plugin-raw-${responseBody.dataUrl}`\"\n :content=\"data\"\n :contentType=\"mimeEssence\" />\n <!-- Default raw: exact decoded body (no JSON pretty-print) -->\n <ResponseBodyRaw\n v-else-if=\"hasRaw && showRaw && !pluginHandler?.rawComponent\"\n :key=\"`raw-${responseBody.dataUrl}`\"\n :content=\"data\"\n :language=\"rawLanguage as CodeMirrorLanguage\" />\n\n <ResponseBodyInfo v-if=\"!hasRaw && !hasPreview\">\n {{ translate('apiClient.responseBody.binaryFile') }}\n </ResponseBodyInfo>\n </div>\n </CollapsibleSection>\n</template>\n<style scoped>\n.scalar-code-block :deep(.hljs *) {\n font-size: var(--sc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MoC,wBAL7B,cAAA,MAAc,gBAAgB,GAAA;MAElC,KAAG,kBAAoB,aAAA,MAAa;MACpC,SAAS,QAAA;MACT,aAAa,YAAA;MACb,SAAS,aAAA,MAAa;;;;;WAGZ,YAAA,OAAa,WAAW,YAAA,SAAA,UAAA,GADrC,YAOwB,6BAAA;MALrB,KAAG,WAAa,aAAA,MAAa;MAC7B,OAAO,YAAA,MAAY;MACnB,SAAS,QAAA;MACT,MAAM,YAAA,MAAY;MAClB,KAAK,aAAA,MAAa;MAClB,MAAM,YAAA;;;;;;;;KAKD,cAAA,OAAe,gBAAgB,OAAA,SAAU,QAAA,SAAA,UAAA,GAFjD,YAK+B,wBAJxB,cAAA,MAAc,YAAY,GAAA;MAE9B,KAAG,cAAgB,aAAA,MAAa;MAChC,SAAS,QAAA;MACT,aAAa,YAAA;gDAGH,OAAA,SAAU,QAAA,SAAO,CAAK,cAAA,OAAe,gBAAA,UAAA,GADlD,YAIkD,yBAAA;MAF/C,KAAG,OAAS,aAAA,MAAa;MACzB,SAAS,QAAA;MACT,UAAU,YAAA;;MAEY,OAAA,SAAM,CAAK,WAAA,SAAA,UAAA,GAApC,YAEmB,0BAAA,EAAA,KAAA,EAAA,GAAA;6BADmC,CAAA,gBAAA,gBAAjD,MAAA,SAAA,CAAS,CAAA,mCAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;;;OArDR,QAAA,QAAQ,aAAA,MAAa,UAAA;UAC1B;sBAI0C,CAH3C,YAG2C,8BAAA;KAFxC,UAAU,aAAA,MAAa;KACvB,MAAM,aAAA,MAAa;KACnB,MAAM,aAAA,MAAa,UAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBodyDownload.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyDownload.vue"],"names":[],"mappings":"AAyCA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AAmEF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ResponseBodyDownload.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyDownload.vue"],"names":[],"mappings":"AAgDA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AA2EF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBodyDownload.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyDownload.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { computed } from 'vue'\n\nimport { getMediaTypeConfig } from '@/v2/blocks/response-block/helpers/media-types'\n\nconst props = defineProps<{\n href: string\n type?: string\n filename?: string\n}>()\n\nconst filenameExtension = computed(() => {\n const extension =\n getMediaTypeConfig(props.type ?? '')?.extension ?? '.unknown'\n return props.filename ? props.filename : `response${extension}`\n})\n</script>\n<template>\n <a\n class=\"text-c-3 text-xxs hover:bg-b-3 flex items-center gap-1 rounded px-1.5 py-0.5 no-underline\"\n :download=\"`${filenameExtension}`\"\n :href=\"href\"\n @click.stop>\n <ScalarIcon\n icon=\"Download\"\n size=\"xs\" />\n <span>\n <span>Download</span>\n <span class=\"sr-only\">Response Body</span>\n </span>\n </a>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ResponseBodyDownload.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyDownload.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { computed } from 'vue'\n\nimport { getMediaTypeConfig } from '@/v2/blocks/response-block/helpers/media-types'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst props = defineProps<{\n href: string\n type?: string\n filename?: string\n}>()\n\nconst { translate } = useLocalization()\n\nconst filenameExtension = computed(() => {\n const extension =\n getMediaTypeConfig(props.type ?? '')?.extension ?? '.unknown'\n return props.filename ? props.filename : `response${extension}`\n})\n</script>\n<template>\n <a\n :aria-label=\"translate('apiClient.responseBodyDownload.download')\"\n class=\"text-c-3 text-xxs hover:bg-b-3 flex items-center gap-1 rounded px-1.5 py-0.5 no-underline\"\n :download=\"`${filenameExtension}`\"\n :href=\"href\"\n @click.stop>\n <ScalarIcon\n icon=\"Download\"\n size=\"xs\" />\n <span>\n <span>{{ translate('apiClient.responseBodyDownload.label') }}</span>\n <span class=\"sr-only\">{{\n translate('apiClient.responseBodyDownload.body')\n }}</span>\n </span>\n </a>\n</template>\n"],"mappings":""}
@@ -1,8 +1,14 @@
1
+ import { useLocalization } from "../../../features/localization/index.js";
1
2
  import { getMediaTypeConfig } from "../helpers/media-types.js";
2
- import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, unref, withModifiers } from "vue";
3
+ import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withModifiers } from "vue";
3
4
  import { ScalarIcon } from "@scalar/components/icon";
4
5
  //#region src/v2/blocks/response-block/components/ResponseBodyDownload.vue?vue&type=script&setup=true&lang.ts
5
- var _hoisted_1 = ["download", "href"];
6
+ var _hoisted_1 = [
7
+ "aria-label",
8
+ "download",
9
+ "href"
10
+ ];
11
+ var _hoisted_2 = { class: "sr-only" };
6
12
  var ResponseBodyDownload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
7
13
  __name: "ResponseBodyDownload",
8
14
  props: {
@@ -12,12 +18,14 @@ var ResponseBodyDownload_vue_vue_type_script_setup_true_lang_default = /*@__PURE
12
18
  },
13
19
  setup(__props) {
14
20
  const props = __props;
21
+ const { translate } = useLocalization();
15
22
  const filenameExtension = computed(() => {
16
23
  const extension = getMediaTypeConfig(props.type ?? "")?.extension ?? ".unknown";
17
24
  return props.filename ? props.filename : `response${extension}`;
18
25
  });
19
26
  return (_ctx, _cache) => {
20
27
  return openBlock(), createElementBlock("a", {
28
+ "aria-label": unref(translate)("apiClient.responseBodyDownload.download"),
21
29
  class: "text-c-3 text-xxs hover:bg-b-3 flex items-center gap-1 rounded px-1.5 py-0.5 no-underline",
22
30
  download: `${filenameExtension.value}`,
23
31
  href: __props.href,
@@ -25,7 +33,7 @@ var ResponseBodyDownload_vue_vue_type_script_setup_true_lang_default = /*@__PURE
25
33
  }, [createVNode(unref(ScalarIcon), {
26
34
  icon: "Download",
27
35
  size: "xs"
28
- }), _cache[1] || (_cache[1] = createElementVNode("span", null, [createElementVNode("span", null, "Download"), createElementVNode("span", { class: "sr-only" }, "Response Body")], -1))], 8, _hoisted_1);
36
+ }), createElementVNode("span", null, [createElementVNode("span", null, toDisplayString(unref(translate)("apiClient.responseBodyDownload.label")), 1), createElementVNode("span", _hoisted_2, toDisplayString(unref(translate)("apiClient.responseBodyDownload.body")), 1)])], 8, _hoisted_1);
29
37
  };
30
38
  }
31
39
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBodyDownload.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyDownload.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { computed } from 'vue'\n\nimport { getMediaTypeConfig } from '@/v2/blocks/response-block/helpers/media-types'\n\nconst props = defineProps<{\n href: string\n type?: string\n filename?: string\n}>()\n\nconst filenameExtension = computed(() => {\n const extension =\n getMediaTypeConfig(props.type ?? '')?.extension ?? '.unknown'\n return props.filename ? props.filename : `response${extension}`\n})\n</script>\n<template>\n <a\n class=\"text-c-3 text-xxs hover:bg-b-3 flex items-center gap-1 rounded px-1.5 py-0.5 no-underline\"\n :download=\"`${filenameExtension}`\"\n :href=\"href\"\n @click.stop>\n <ScalarIcon\n icon=\"Download\"\n size=\"xs\" />\n <span>\n <span>Download</span>\n <span class=\"sr-only\">Response Body</span>\n </span>\n </a>\n</template>\n"],"mappings":";;;;;;;;;;;;;EAMA,MAAM,QAAQ;EAMd,MAAM,oBAAoB,eAAe;GACvC,MAAM,YACJ,mBAAmB,MAAM,QAAQ,EAAE,CAAC,EAAE,aAAa;GACrD,OAAO,MAAM,WAAW,MAAM,WAAW,WAAW;EACtD,CAAC;;uBAGC,mBAYI,KAAA;IAXF,OAAM;IACL,UAAQ,GAAK,kBAAA;IACb,MAAM,QAAA;IACN,SAAK,OAAA,OAAA,OAAA,KAAA,oBAAN,CAAA,GAAW,CAAA,MAAA,CAAA;OACX,YAEc,MAAA,UAAA,GAAA;IADZ,MAAK;IACL,MAAK;iCACP,mBAGO,QAAA,MAAA,CAFL,mBAAqB,QAAA,MAAf,UAAQ,GACd,mBAA0C,QAAA,EAApC,OAAM,UAAS,GAAC,eAAa,CAAA,GAAA,EAAA,EAAA,GAAA,GAAA,UAAA"}
1
+ {"version":3,"file":"ResponseBodyDownload.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyDownload.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { computed } from 'vue'\n\nimport { getMediaTypeConfig } from '@/v2/blocks/response-block/helpers/media-types'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst props = defineProps<{\n href: string\n type?: string\n filename?: string\n}>()\n\nconst { translate } = useLocalization()\n\nconst filenameExtension = computed(() => {\n const extension =\n getMediaTypeConfig(props.type ?? '')?.extension ?? '.unknown'\n return props.filename ? props.filename : `response${extension}`\n})\n</script>\n<template>\n <a\n :aria-label=\"translate('apiClient.responseBodyDownload.download')\"\n class=\"text-c-3 text-xxs hover:bg-b-3 flex items-center gap-1 rounded px-1.5 py-0.5 no-underline\"\n :download=\"`${filenameExtension}`\"\n :href=\"href\"\n @click.stop>\n <ScalarIcon\n icon=\"Download\"\n size=\"xs\" />\n <span>\n <span>{{ translate('apiClient.responseBodyDownload.label') }}</span>\n <span class=\"sr-only\">{{\n translate('apiClient.responseBodyDownload.body')\n }}</span>\n </span>\n </a>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAOA,MAAM,QAAQ;EAMd,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,oBAAoB,eAAe;GACvC,MAAM,YACJ,mBAAmB,MAAM,QAAQ,EAAE,CAAC,EAAE,aAAa;GACrD,OAAO,MAAM,WAAW,MAAM,WAAW,WAAW;EACtD,CAAC;;uBAGC,mBAeI,KAAA;IAdD,cAAY,MAAA,SAAA,CAAS,CAAA,yCAAA;IACtB,OAAM;IACL,UAAQ,GAAK,kBAAA;IACb,MAAM,QAAA;IACN,SAAK,OAAA,OAAA,OAAA,KAAA,oBAAN,CAAA,GAAW,CAAA,MAAA,CAAA;OACX,YAEc,MAAA,UAAA,GAAA;IADZ,MAAK;IACL,MAAK;OACP,mBAKO,QAAA,MAAA,CAJL,mBAAoE,QAAA,MAAA,gBAA3D,MAAA,SAAA,CAAS,CAAA,sCAAA,CAAA,GAAA,CAAA,GAClB,mBAES,QAFT,YAES,gBADP,MAAA,SAAA,CAAS,CAAA,qCAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,GAAA,UAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBodyPreview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyPreview.vue"],"names":[],"mappings":"AAgMA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAMlF,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC3B,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AAuQF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ResponseBodyPreview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyPreview.vue"],"names":[],"mappings":"AAqMA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAOlF,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC3B,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AA2QF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
2
2
  import ResponseBodyPreview_vue_vue_type_script_setup_true_lang_default from "./ResponseBodyPreview.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/v2/blocks/response-block/components/ResponseBodyPreview.vue
5
- var ResponseBodyPreview_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ResponseBodyPreview_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-a10b4008"]]);
5
+ var ResponseBodyPreview_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ResponseBodyPreview_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-a9193a63"]]);
6
6
  //#endregion
7
7
  export { ResponseBodyPreview_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBodyPreview.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyPreview.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\n\nimport { type MediaPreview } from '@/v2/blocks/response-block/helpers/media-types'\nimport { prettifyNdjson } from '@/v2/blocks/response-block/helpers/prettify-ndjson'\n\nimport ResponseBodyInfo from './ResponseBodyInfo.vue'\nimport ResponseBodyRaw from './ResponseBodyRaw.vue'\n\nconst {\n src,\n type,\n mode,\n alpha = false,\n content,\n} = defineProps<{\n src: string\n type: string\n mode: MediaPreview\n alpha?: boolean | undefined\n /** Decoded body; used when `mode` is `json` for pretty-printed preview (no JSON.parse round-trip). */\n content?: unknown\n}>()\n\nconst jsonPreviewContent = computed((): string => {\n const value = content\n if (typeof value === 'string') {\n return value\n }\n if (value == null) {\n return ''\n }\n return String(value)\n})\n\n/** NDJSON pretty-printed one record per block for the `ndjson` preview. */\nconst ndjsonPreviewContent = computed((): string =>\n prettifyNdjson(jsonPreviewContent.value),\n)\n\n/**\n * Validates the `src` against an allow-list of safe protocols before it is\n * passed to a rendering element. This blocks XSS vectors such as\n * `javascript:` and `vbscript:` URIs and also prevents accidentally embedding\n * a `data:text/html` payload that could execute script in the app origin.\n *\n * Allowed:\n * - `blob:` (the standard case — generated client-side by `URL.createObjectURL`)\n * - `http:` / `https:`\n * - `data:` URIs whose MIME type is a known safe media kind\n * (`image/*`, `video/*`, `audio/*`, `application/pdf`, `application/octet-stream`)\n *\n * Anything else (including malformed or relative URLs) collapses to an empty\n * string so the template falls back to the \"Preview unavailable\" message.\n */\nconst safeSrc = computed((): string => {\n if (!src) {\n return ''\n }\n\n if (/^data:/i.test(src)) {\n // The MIME type must be one of the known safe kinds AND be terminated by\n // `;` (parameters / `;base64`) or `,` (start of the payload). Anchoring\n // at the terminator prevents prefix-matching tricks like\n // `data:image/png-but-actually-html,…`.\n return /^data:(?:(?:image|video|audio)\\/[a-z0-9.+-]+|application\\/pdf|application\\/octet-stream)[;,]/i.test(\n src,\n )\n ? src\n : ''\n }\n\n try {\n const parsed = new URL(src)\n if (\n parsed.protocol === 'blob:' ||\n parsed.protocol === 'http:' ||\n parsed.protocol === 'https:'\n ) {\n return src\n }\n } catch {\n // Malformed or relative URL — refuse to render.\n }\n\n return ''\n})\n\nconst error = ref(false)\n\n/**\n * Whether the embedded document is a PDF.\n *\n * PDFs are rendered by the browser's own PDF engine (e.g. PDFium), which runs\n * in an isolated context that cannot reach this app's origin — its DOM,\n * cookies or storage. A PDF's embedded JavaScript therefore cannot be used to\n * attack us, and a strict `sandbox=\"\"` does not confine that engine; it only\n * prevents Chromium from loading the PDF viewer at all (it boots as a scripted\n * extension page), leaving the user with a blank frame. So PDFs are rendered\n * without the `sandbox` attribute, matching the original `<object>` behaviour.\n *\n * Everything else that reaches the iframe (notably `text/html`, the genuine\n * XSS vector) keeps the strict empty sandbox.\n */\nconst isPdf = computed(\n (): boolean => type.trim().toLowerCase() === 'application/pdf',\n)\n\nwatch(\n () => src,\n () => (error.value = false),\n)\n</script>\n<template>\n <ResponseBodyRaw\n v-if=\"mode === 'json'\"\n :content=\"jsonPreviewContent\"\n language=\"json\"\n prettyPrintJson />\n <ResponseBodyRaw\n v-else-if=\"mode === 'ndjson'\"\n :content=\"ndjsonPreviewContent\"\n language=\"json\" />\n <div\n v-else-if=\"!error && safeSrc\"\n class=\"flex justify-center overflow-auto rounded-b\"\n :class=\"{ 'bg-preview p-2': alpha }\">\n <img\n v-if=\"mode === 'image'\"\n class=\"h-full max-w-full\"\n :class=\"{ rounded: alpha }\"\n :src=\"safeSrc\"\n referrerpolicy=\"no-referrer\"\n @error=\"error = true\" />\n <video\n v-else-if=\"mode === 'video'\"\n autoplay\n controls\n referrerpolicy=\"no-referrer\"\n width=\"100%\"\n @error=\"error = true\">\n <source\n :src=\"safeSrc\"\n :type=\"type\" />\n </video>\n <audio\n v-else-if=\"mode === 'audio'\"\n class=\"my-12\"\n controls\n referrerpolicy=\"no-referrer\"\n @error=\"error = true\">\n <source\n :src=\"safeSrc\"\n :type=\"type\" />\n </audio>\n <!--\n `<object>` would execute scripts inside the embedded document in the\n app's origin, so we render arbitrary previews inside an `<iframe>`\n instead. Non-PDF documents (notably `text/html`) get an empty `sandbox`\n attribute, which disables scripts, forms, popups and same-origin access.\n PDFs are exempted (see `isPdf` above): the empty sandbox does not confine\n the browser's PDF engine, it only stops the viewer from loading at all.\n\n Note: an `error` event on `<iframe>` is not reliably fired for failed\n navigations — browsers usually fire `load` even when the response is\n blank or an error page, and a cross-origin sandboxed frame cannot be\n introspected from JavaScript. There is therefore no useful runtime\n fallback for an unreachable URL; the URL allow-list above is what\n keeps unsafe content out in the first place.\n -->\n <iframe\n v-else\n class=\"aspect-[4/3] w-full border-0\"\n :src=\"safeSrc\"\n :sandbox=\"isPdf ? undefined : ''\"\n referrerpolicy=\"no-referrer\" />\n </div>\n <ResponseBodyInfo v-else>Preview unavailable</ResponseBodyInfo>\n</template>\n<style scoped>\n.light-mode .bg-preview {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23000' fill-opacity='10%25'%3E%3Crect width='8' height='8' /%3E%3Crect x='8' y='8' width='8' height='8' /%3E%3C/svg%3E\");\n}\n.dark-mode .bg-preview {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FFF' fill-opacity='10%25'%3E%3Crect width='8' height='8' /%3E%3Crect x='8' y='8' width='8' height='8' /%3E%3C/svg%3E\");\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ResponseBodyPreview.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseBodyPreview.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\n\nimport { type MediaPreview } from '@/v2/blocks/response-block/helpers/media-types'\nimport { prettifyNdjson } from '@/v2/blocks/response-block/helpers/prettify-ndjson'\nimport { useLocalization } from '@/v2/features/localization'\n\nimport ResponseBodyInfo from './ResponseBodyInfo.vue'\nimport ResponseBodyRaw from './ResponseBodyRaw.vue'\n\nconst {\n src,\n type,\n mode,\n alpha = false,\n content,\n} = defineProps<{\n src: string\n type: string\n mode: MediaPreview\n alpha?: boolean | undefined\n /** Decoded body; used when `mode` is `json` for pretty-printed preview (no JSON.parse round-trip). */\n content?: unknown\n}>()\n\nconst { translate } = useLocalization()\n\nconst jsonPreviewContent = computed((): string => {\n const value = content\n if (typeof value === 'string') {\n return value\n }\n if (value == null) {\n return ''\n }\n return String(value)\n})\n\n/** NDJSON pretty-printed one record per block for the `ndjson` preview. */\nconst ndjsonPreviewContent = computed((): string =>\n prettifyNdjson(jsonPreviewContent.value),\n)\n\n/**\n * Validates the `src` against an allow-list of safe protocols before it is\n * passed to a rendering element. This blocks XSS vectors such as\n * `javascript:` and `vbscript:` URIs and also prevents accidentally embedding\n * a `data:text/html` payload that could execute script in the app origin.\n *\n * Allowed:\n * - `blob:` (the standard case — generated client-side by `URL.createObjectURL`)\n * - `http:` / `https:`\n * - `data:` URIs whose MIME type is a known safe media kind\n * (`image/*`, `video/*`, `audio/*`, `application/pdf`, `application/octet-stream`)\n *\n * Anything else (including malformed or relative URLs) collapses to an empty\n * string so the template falls back to the \"Preview unavailable\" message.\n */\nconst safeSrc = computed((): string => {\n if (!src) {\n return ''\n }\n\n if (/^data:/i.test(src)) {\n // The MIME type must be one of the known safe kinds AND be terminated by\n // `;` (parameters / `;base64`) or `,` (start of the payload). Anchoring\n // at the terminator prevents prefix-matching tricks like\n // `data:image/png-but-actually-html,…`.\n return /^data:(?:(?:image|video|audio)\\/[a-z0-9.+-]+|application\\/pdf|application\\/octet-stream)[;,]/i.test(\n src,\n )\n ? src\n : ''\n }\n\n try {\n const parsed = new URL(src)\n if (\n parsed.protocol === 'blob:' ||\n parsed.protocol === 'http:' ||\n parsed.protocol === 'https:'\n ) {\n return src\n }\n } catch {\n // Malformed or relative URL — refuse to render.\n }\n\n return ''\n})\n\nconst error = ref(false)\n\n/**\n * Whether the embedded document is a PDF.\n *\n * PDFs are rendered by the browser's own PDF engine (e.g. PDFium), which runs\n * in an isolated context that cannot reach this app's origin — its DOM,\n * cookies or storage. A PDF's embedded JavaScript therefore cannot be used to\n * attack us, and a strict `sandbox=\"\"` does not confine that engine; it only\n * prevents Chromium from loading the PDF viewer at all (it boots as a scripted\n * extension page), leaving the user with a blank frame. So PDFs are rendered\n * without the `sandbox` attribute, matching the original `<object>` behaviour.\n *\n * Everything else that reaches the iframe (notably `text/html`, the genuine\n * XSS vector) keeps the strict empty sandbox.\n */\nconst isPdf = computed(\n (): boolean => type.trim().toLowerCase() === 'application/pdf',\n)\n\nwatch(\n () => src,\n () => (error.value = false),\n)\n</script>\n<template>\n <ResponseBodyRaw\n v-if=\"mode === 'json'\"\n :content=\"jsonPreviewContent\"\n language=\"json\"\n prettyPrintJson />\n <ResponseBodyRaw\n v-else-if=\"mode === 'ndjson'\"\n :content=\"ndjsonPreviewContent\"\n language=\"json\" />\n <div\n v-else-if=\"!error && safeSrc\"\n class=\"flex justify-center overflow-auto rounded-b\"\n :class=\"{ 'bg-preview p-2': alpha }\">\n <img\n v-if=\"mode === 'image'\"\n class=\"h-full max-w-full\"\n :class=\"{ rounded: alpha }\"\n referrerpolicy=\"no-referrer\"\n :src=\"safeSrc\"\n @error=\"error = true\" />\n <video\n v-else-if=\"mode === 'video'\"\n autoplay\n controls\n referrerpolicy=\"no-referrer\"\n width=\"100%\"\n @error=\"error = true\">\n <source\n :src=\"safeSrc\"\n :type=\"type\" />\n </video>\n <audio\n v-else-if=\"mode === 'audio'\"\n class=\"my-12\"\n controls\n referrerpolicy=\"no-referrer\"\n @error=\"error = true\">\n <source\n :src=\"safeSrc\"\n :type=\"type\" />\n </audio>\n <!--\n `<object>` would execute scripts inside the embedded document in the\n app's origin, so we render arbitrary previews inside an `<iframe>`\n instead. Non-PDF documents (notably `text/html`) get an empty `sandbox`\n attribute, which disables scripts, forms, popups and same-origin access.\n PDFs are exempted (see `isPdf` above): the empty sandbox does not confine\n the browser's PDF engine, it only stops the viewer from loading at all.\n\n Note: an `error` event on `<iframe>` is not reliably fired for failed\n navigations — browsers usually fire `load` even when the response is\n blank or an error page, and a cross-origin sandboxed frame cannot be\n introspected from JavaScript. There is therefore no useful runtime\n fallback for an unreachable URL; the URL allow-list above is what\n keeps unsafe content out in the first place.\n -->\n <iframe\n v-else\n class=\"aspect-[4/3] w-full border-0\"\n referrerpolicy=\"no-referrer\"\n :sandbox=\"isPdf ? undefined : ''\"\n :src=\"safeSrc\" />\n </div>\n <ResponseBodyInfo v-else>\n {{ translate('apiClient.responseBodyPreview.previewUnavailable') }}\n </ResponseBodyInfo>\n</template>\n<style scoped>\n.light-mode .bg-preview {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23000' fill-opacity='10%25'%3E%3Crect width='8' height='8' /%3E%3Crect x='8' y='8' width='8' height='8' /%3E%3C/svg%3E\");\n}\n.dark-mode .bg-preview {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FFF' fill-opacity='10%25'%3E%3Crect width='8' height='8' /%3E%3Crect x='8' y='8' width='8' height='8' /%3E%3C/svg%3E\");\n}\n</style>\n"],"mappings":""}