@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
@@ -0,0 +1,345 @@
1
+ //#region src/v2/features/localization/translations.ts
2
+ /** English fallback for API Client UI strings. */
3
+ var en = {
4
+ serverVariablesSelect: { selected: "Selected:" },
5
+ serverVariablesTextbox: { value: "value" },
6
+ sidebarListElementForm: { cancel: "Cancel" },
7
+ requestBlock: {
8
+ authentication: "Authentication",
9
+ variables: "Variables",
10
+ cookies: "Cookies",
11
+ headers: "Headers",
12
+ queryParameters: "Query Parameters",
13
+ requestBody: "Request Body",
14
+ requestName: "Request Name",
15
+ label: "Request: {name}"
16
+ },
17
+ responseBlock: {
18
+ response: "Response",
19
+ requestHeaders: "Request Headers",
20
+ responseHeaders: "Response Headers",
21
+ body: "Body"
22
+ },
23
+ codeInput: {
24
+ required: "Required",
25
+ exitHint: "Press {escape} then {tab} to exit"
26
+ },
27
+ codeInputLite: { required: "Required" },
28
+ dataTableInput: {
29
+ clearValue: "Clear Value",
30
+ showPassword: "Show Password",
31
+ hidePassword: "Hide Password"
32
+ },
33
+ dataTableInputSelect: {
34
+ value: "Value",
35
+ addValue: "Add value"
36
+ },
37
+ confirmationForm: {
38
+ cancel: "Cancel",
39
+ save: "Save"
40
+ },
41
+ collapsibleSection: {
42
+ collapsed: "(Collapsed)",
43
+ item: "Item",
44
+ items: "Items"
45
+ },
46
+ modalClientContainer: { label: "API Client" },
47
+ serverDropdown: {
48
+ server: "Server:",
49
+ addServer: "Add Server",
50
+ updateServers: "Update Servers",
51
+ unknownServer: "Unknown server"
52
+ },
53
+ sidebar: { search: "Search" },
54
+ sidebarMenu: { settings: "Settings" },
55
+ sidebarToggle: {
56
+ hide: "Hide sidebar",
57
+ show: "Show sidebar"
58
+ },
59
+ environmentsList: { addEnvironment: "Add Environment" },
60
+ modal: { noDocumentSelected: "No document selected" },
61
+ operation: { selectAnOperationToViewDetails: "Select an operation to view details" },
62
+ header: {
63
+ operationSettings: "Operation settings",
64
+ closeClient: "Close Client"
65
+ },
66
+ openApiClientButton: { openAPIClient: "Open API Client" },
67
+ requestBody: {
68
+ noBody: "No Body",
69
+ delete: "Delete",
70
+ selectFile: "Select File",
71
+ multipartForm: "Multipart Form",
72
+ formUrlEncoded: "Form URL Encoded",
73
+ binaryFile: "Binary File",
74
+ other: "Other",
75
+ none: "None"
76
+ },
77
+ requestBodyStructured: { body: "Body" },
78
+ requestBodyViewToggle: {
79
+ form: "Form",
80
+ raw: "Raw",
81
+ fixBody: "Fix the body to switch to the form view"
82
+ },
83
+ requestCodeSnippet: { codeSnippet: "Code Snippet" },
84
+ requestTable: {
85
+ enabled: "Enabled",
86
+ key: "Key",
87
+ value: "Value"
88
+ },
89
+ requestTableRow: {
90
+ key: "Key",
91
+ value: "Value",
92
+ delete: "Delete",
93
+ selectFile: "Select File",
94
+ globalCookieHint: "Global cookies are shared across the whole workspace. Click to navigate.",
95
+ readOnlyHint: "This is a readonly property and you can not modify it! If you want to change it you have to override it or disable it using the checkbox",
96
+ include: "Include {name} in request",
97
+ keyLabel: "{name} Key",
98
+ valueLabel: "{name} Value",
99
+ deleteRow: "Delete {name}",
100
+ row: "row"
101
+ },
102
+ requestTableTooltip: {
103
+ min: "min:",
104
+ max: "max:",
105
+ default: "default:",
106
+ invalid: "Input is invalid",
107
+ moreInformation: "More Information"
108
+ },
109
+ headers: {
110
+ headerKey: "Header Key",
111
+ headerValue: "Header Value",
112
+ noHeaders: "No headers"
113
+ },
114
+ responseBody: { binaryFile: "Binary file" },
115
+ responseBodyPreview: { previewUnavailable: "Preview unavailable" },
116
+ responseBodyStreaming: {
117
+ body: "Body",
118
+ listening: "Listening…",
119
+ cancel: "Cancel"
120
+ },
121
+ responseBodyToggle: {
122
+ preview: "Preview",
123
+ raw: "Raw"
124
+ },
125
+ responseBodyVirtual: {
126
+ body: "Body",
127
+ largeBodyHint: "This response body is massive! Syntax highlighting won't work here."
128
+ },
129
+ responseCookies: {
130
+ cookies: "Cookies",
131
+ cookieName: "Cookie Name",
132
+ cookieValue: "Cookie Value",
133
+ noCookies: "No cookies"
134
+ },
135
+ responseEmpty: {
136
+ roadmap: "Roadmap",
137
+ poweredByScalarcom: "Powered By Scalar.com",
138
+ getStarted: "Get Started",
139
+ newRequest: "New Request",
140
+ sendRequest: "Send Request",
141
+ version: "Scalar App V{version} Beta"
142
+ },
143
+ responseLoadingOverlay: { cancel: "Cancel" },
144
+ addressBar: {
145
+ path: "Path",
146
+ copyUrl: "Copy URL",
147
+ send: "Send",
148
+ sendRequest: "Send {method} request to {url}",
149
+ duplicateRequest: "A {method} request to {path} already exists in this document",
150
+ urlPlaceholder: "Enter a URL",
151
+ webhookUrlPlaceholder: "Enter the full webhook URL, e.g. https://example.com/hook"
152
+ },
153
+ addressBarHistory: { requestHistory: "Request History" },
154
+ environmentSelector: {
155
+ noEnvironment: "No Environment",
156
+ notAvailableInThisContext: "Not available in this context",
157
+ environmentHint: "Environments let you manage variables like API keys and base URLs across different contexts.",
158
+ add: "Add Environment",
159
+ select: "Select Environment",
160
+ unavailable: "{name} (Unavailable)",
161
+ current: "Current environment: {name}"
162
+ },
163
+ deleteRequestAuthModal: {
164
+ deleteSecurityScheme: "Delete Security Scheme",
165
+ cancel: "Cancel",
166
+ delete: "Delete",
167
+ confirmation: "This cannot be undone. You're about to delete the {name} security scheme from the collection."
168
+ },
169
+ oauth2: {
170
+ deviceAuthorizationUrl: "Device Authorization URL",
171
+ deviceVerificationPrompt: "Open the verification page and enter this code:",
172
+ waitingForAuthorization: "Waiting for authorization…",
173
+ cancelDeviceAuthorization: "Cancel",
174
+ accessToken: "Access Token",
175
+ refreshUrl: "Refresh URL",
176
+ refresh: "Refresh",
177
+ authUrl: "Auth URL",
178
+ tokenUrl: "Token URL",
179
+ redirectUrl: "Redirect URL",
180
+ username: "Username",
181
+ password: "Password",
182
+ clientID: "Client ID",
183
+ clientSecret: "Client Secret",
184
+ usePKCE: "Use PKCE",
185
+ credentialsLocation: "Credentials Location",
186
+ authorize: "Authorize",
187
+ clear: "Clear",
188
+ failedToauthorize: "Failed to authorize",
189
+ failedToRefreshToken: "Failed to refresh token",
190
+ optionalRedirectUrl: "Optional redirect URL"
191
+ },
192
+ oauthScopesAddModal: {
193
+ name: "Name:",
194
+ description: "Description:",
195
+ readUserData: "Read user data",
196
+ edit: "Edit Scope",
197
+ add: "Add Scope",
198
+ save: "Save",
199
+ required: "Scope name is required.",
200
+ duplicate: "A scope named \"{name}\" already exists."
201
+ },
202
+ oauthScopesInput: {
203
+ noScopesDefined: "No Scopes Defined",
204
+ addScope: "Add Scope",
205
+ deselectAll: "Deselect All",
206
+ selectAll: "Select All",
207
+ selectedScopes: "Scopes Selected {count} / {total}",
208
+ editScope: "Edit {name}",
209
+ deleteScope: "Delete {name}",
210
+ selectScope: "Select {name} scope"
211
+ },
212
+ openIdConnect: {
213
+ discoveryUrl: "Discovery URL",
214
+ fetchConfiguration: "Fetch Configuration",
215
+ failedToFetchConfiguration: "Failed to fetch OpenID Connect configuration"
216
+ },
217
+ requestAuthDataTable: { noauthenticationSelected: "No authentication selected" },
218
+ requestAuthTab: {
219
+ token: "Token",
220
+ bearerToken: "Bearer Token",
221
+ getAToken: "Get a token",
222
+ refresh: "Refresh",
223
+ username: "Username",
224
+ password: "Password",
225
+ name: "Name",
226
+ value: "Value",
227
+ cancel: "Cancel",
228
+ authorize: "Authorize",
229
+ unsupportedCredentials: "Credentials for this AsyncAPI security scheme are not sent by the browser client.",
230
+ authorizeVia: "Authorize via {name}",
231
+ unsupportedType: "The {type} security scheme type is not supported yet.",
232
+ missingType: "The security scheme is missing a type, please double check your {type} document or Authentication Configuration",
233
+ failedToauthorize: "Failed to authorize",
234
+ failedToRefresh: "Failed to refresh",
235
+ configure: "Configure {name}",
236
+ mutualTlsHint: "Mutual TLS authenticates with a client certificate presented during the TLS handshake, so there is nothing to enter here."
237
+ },
238
+ commandActionForm: { continue: "Continue" },
239
+ environment: {
240
+ thisIsTheActiveEnvironment: "This is the active environment",
241
+ active: "Active",
242
+ editEnvironment: "Edit Environment",
243
+ deleteEnvironment: "Delete Environment"
244
+ },
245
+ environmentCreateModal: {
246
+ environmentName: "Environment name",
247
+ thisEnvironmentNameIsAlreadyInUse: "This environment name is already in use.",
248
+ update: "Update Environment",
249
+ add: "Add Environment"
250
+ },
251
+ environmentDeleteModal: {
252
+ cancel: "Cancel",
253
+ deleteEnvironment: "Delete Environment",
254
+ deleteConfirmation: "Are you sure you want to delete this environment? This action cannot be undone.",
255
+ title: "Delete {name}"
256
+ },
257
+ environmentVariablesDropdown: {
258
+ variableSuggestions: "Variable suggestions",
259
+ addVariable: "Add Variable"
260
+ },
261
+ environmentVariablesTable: {
262
+ name: "Name",
263
+ value: "Value",
264
+ actions: "Actions",
265
+ environmentVariableName: "Environment Variable Name",
266
+ environmentVariableValue: "Environment Variable Value"
267
+ },
268
+ documentSearchModal: {
269
+ documentSearch: "Document Search",
270
+ documentSearchResults: "Document Search Results",
271
+ navigate: "↑↓ Navigate",
272
+ select: "⏎ Select",
273
+ keyboardInstructions: "Press up arrow / down arrow to navigate, enter to select, type to filter results"
274
+ },
275
+ searchResult: {
276
+ httpMethod: "HTTP Method:",
277
+ path: "Path:",
278
+ description: "Description:",
279
+ heading: "Heading",
280
+ operation: "Operation",
281
+ tag: "Tag"
282
+ },
283
+ sectionFilter: {
284
+ all: "All",
285
+ auth: "Auth",
286
+ variables: "Variables",
287
+ cookies: "Cookies",
288
+ headers: "Headers",
289
+ query: "Query",
290
+ body: "Body"
291
+ },
292
+ requestParams: {
293
+ clearAll: "Clear All {title}",
294
+ clear: "Clear",
295
+ clearOptionalParameters: "Clear optional parameters"
296
+ },
297
+ responseBodyDownload: {
298
+ download: "Download Response Body",
299
+ label: "Download",
300
+ body: "Response Body"
301
+ },
302
+ responseMetaInformation: {
303
+ duration: "Response Information, Duration:",
304
+ size: ", Size:",
305
+ status: ", Status:"
306
+ },
307
+ authSelector: {
308
+ selectedType: "Selected Auth Type: {type}",
309
+ multipleTypes: "Multiple Auth Types Selected",
310
+ selectType: "Select Auth Type",
311
+ optional: "Optional",
312
+ required: "Required",
313
+ deleteScheme: "Delete {name}",
314
+ requiredGroup: "Required authentication",
315
+ availableGroup: "Available authentication",
316
+ addGroup: "Add new authentication"
317
+ },
318
+ operationBlock: {
319
+ webhookUrlRequired: "Webhook URL required. Enter a destination first.",
320
+ pathParametersRequired: "Path parameters must have values."
321
+ },
322
+ dataTableCheckbox: { toggle: "Toggle" },
323
+ pillTooltipHost: {
324
+ computedAtExecution: "Computed at request execution",
325
+ noValue: "No value"
326
+ },
327
+ authOptions: {
328
+ oauth2DeviceAuthorization: "OAuth2 Device Authorization",
329
+ apiKeyCookie: "API Key in Cookies",
330
+ apiKeyHeader: "API Key in Headers",
331
+ apiKeyQuery: "API Key in Query Params",
332
+ httpBasic: "HTTP Basic",
333
+ httpBearer: "HTTP Bearer",
334
+ oauth2Implicit: "Oauth2 Implicit Flow",
335
+ oauth2Password: "Oauth2 Password Flow",
336
+ oauth2ClientCredentials: "Oauth2 Client Credentials",
337
+ oauth2AuthorizationFlow: "Oauth2 Authorization Code"
338
+ },
339
+ deleteSidebarListElement: { delete: "Delete {name}" },
340
+ deleteModal: { delete: "Delete {name}" }
341
+ };
342
+ //#endregion
343
+ export { en };
344
+
345
+ //# sourceMappingURL=translations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.js","names":[],"sources":["../../../../src/v2/features/localization/translations.ts"],"sourcesContent":["import type { ApiClientTranslations } from '@scalar/types/api-reference'\n\n/** English fallback for API Client UI strings. */\nexport const en = {\n serverVariablesSelect: {\n selected: 'Selected:',\n },\n serverVariablesTextbox: {\n value: 'value',\n },\n sidebarListElementForm: {\n cancel: 'Cancel',\n },\n requestBlock: {\n authentication: 'Authentication',\n variables: 'Variables',\n cookies: 'Cookies',\n headers: 'Headers',\n queryParameters: 'Query Parameters',\n requestBody: 'Request Body',\n requestName: 'Request Name',\n label: 'Request: {name}',\n },\n responseBlock: {\n response: 'Response',\n requestHeaders: 'Request Headers',\n responseHeaders: 'Response Headers',\n body: 'Body',\n },\n codeInput: {\n required: 'Required',\n exitHint: 'Press {escape} then {tab} to exit',\n },\n codeInputLite: {\n required: 'Required',\n },\n dataTableInput: {\n clearValue: 'Clear Value',\n showPassword: 'Show Password',\n hidePassword: 'Hide Password',\n },\n dataTableInputSelect: {\n value: 'Value',\n addValue: 'Add value',\n },\n confirmationForm: {\n cancel: 'Cancel',\n save: 'Save',\n },\n collapsibleSection: {\n collapsed: '(Collapsed)',\n item: 'Item',\n items: 'Items',\n },\n modalClientContainer: {\n label: 'API Client',\n },\n serverDropdown: {\n server: 'Server:',\n addServer: 'Add Server',\n updateServers: 'Update Servers',\n unknownServer: 'Unknown server',\n },\n sidebar: {\n search: 'Search',\n },\n sidebarMenu: {\n settings: 'Settings',\n },\n sidebarToggle: {\n hide: 'Hide sidebar',\n show: 'Show sidebar',\n },\n environmentsList: {\n addEnvironment: 'Add Environment',\n },\n modal: {\n noDocumentSelected: 'No document selected',\n },\n operation: {\n selectAnOperationToViewDetails: 'Select an operation to view details',\n },\n header: {\n operationSettings: 'Operation settings',\n closeClient: 'Close Client',\n },\n openApiClientButton: {\n openAPIClient: 'Open API Client',\n },\n requestBody: {\n noBody: 'No Body',\n delete: 'Delete',\n selectFile: 'Select File',\n multipartForm: 'Multipart Form',\n formUrlEncoded: 'Form URL Encoded',\n binaryFile: 'Binary File',\n other: 'Other',\n none: 'None',\n },\n requestBodyStructured: {\n body: 'Body',\n },\n requestBodyViewToggle: {\n form: 'Form',\n raw: 'Raw',\n fixBody: 'Fix the body to switch to the form view',\n },\n requestCodeSnippet: {\n codeSnippet: 'Code Snippet',\n },\n requestTable: {\n enabled: 'Enabled',\n key: 'Key',\n value: 'Value',\n },\n requestTableRow: {\n key: 'Key',\n value: 'Value',\n delete: 'Delete',\n selectFile: 'Select File',\n globalCookieHint: 'Global cookies are shared across the whole workspace. Click to navigate.',\n readOnlyHint:\n 'This is a readonly property and you can not modify it! If you want to change it you have to override it or disable it using the checkbox',\n include: 'Include {name} in request',\n keyLabel: '{name} Key',\n valueLabel: '{name} Value',\n deleteRow: 'Delete {name}',\n row: 'row',\n },\n requestTableTooltip: {\n min: 'min:',\n max: 'max:',\n default: 'default:',\n invalid: 'Input is invalid',\n moreInformation: 'More Information',\n },\n headers: {\n headerKey: 'Header Key',\n headerValue: 'Header Value',\n noHeaders: 'No headers',\n },\n responseBody: {\n binaryFile: 'Binary file',\n },\n responseBodyPreview: {\n previewUnavailable: 'Preview unavailable',\n },\n responseBodyStreaming: {\n body: 'Body',\n listening: 'Listening\\u2026',\n cancel: 'Cancel',\n },\n responseBodyToggle: {\n preview: 'Preview',\n raw: 'Raw',\n },\n responseBodyVirtual: {\n body: 'Body',\n largeBodyHint: \"This response body is massive! Syntax highlighting won't work here.\",\n },\n responseCookies: {\n cookies: 'Cookies',\n cookieName: 'Cookie Name',\n cookieValue: 'Cookie Value',\n noCookies: 'No cookies',\n },\n responseEmpty: {\n roadmap: 'Roadmap',\n poweredByScalarcom: 'Powered By Scalar.com',\n getStarted: 'Get Started',\n newRequest: 'New Request',\n sendRequest: 'Send Request',\n version: 'Scalar App V{version} Beta',\n },\n responseLoadingOverlay: {\n cancel: 'Cancel',\n },\n addressBar: {\n path: 'Path',\n copyUrl: 'Copy URL',\n send: 'Send',\n sendRequest: 'Send {method} request to {url}',\n duplicateRequest: 'A {method} request to {path} already exists in this document',\n urlPlaceholder: 'Enter a URL',\n webhookUrlPlaceholder: 'Enter the full webhook URL, e.g. https://example.com/hook',\n },\n addressBarHistory: {\n requestHistory: 'Request History',\n },\n environmentSelector: {\n noEnvironment: 'No Environment',\n notAvailableInThisContext: 'Not available in this context',\n environmentHint: 'Environments let you manage variables like API keys and base URLs across different contexts.',\n add: 'Add Environment',\n select: 'Select Environment',\n unavailable: '{name} (Unavailable)',\n current: 'Current environment: {name}',\n },\n deleteRequestAuthModal: {\n deleteSecurityScheme: 'Delete Security Scheme',\n cancel: 'Cancel',\n delete: 'Delete',\n confirmation: \"This cannot be undone. You're about to delete the {name} security scheme from the collection.\",\n },\n oauth2: {\n deviceAuthorizationUrl: 'Device Authorization URL',\n deviceVerificationPrompt: 'Open the verification page and enter this code:',\n waitingForAuthorization: 'Waiting for authorization…',\n cancelDeviceAuthorization: 'Cancel',\n\n accessToken: 'Access Token',\n refreshUrl: 'Refresh URL',\n refresh: 'Refresh',\n authUrl: 'Auth URL',\n tokenUrl: 'Token URL',\n redirectUrl: 'Redirect URL',\n username: 'Username',\n password: 'Password',\n clientID: 'Client ID',\n clientSecret: 'Client Secret',\n usePKCE: 'Use PKCE',\n credentialsLocation: 'Credentials Location',\n authorize: 'Authorize',\n clear: 'Clear',\n failedToauthorize: 'Failed to authorize',\n failedToRefreshToken: 'Failed to refresh token',\n optionalRedirectUrl: 'Optional redirect URL',\n },\n oauthScopesAddModal: {\n name: 'Name:',\n description: 'Description:',\n readUserData: 'Read user data',\n edit: 'Edit Scope',\n add: 'Add Scope',\n save: 'Save',\n required: 'Scope name is required.',\n duplicate: 'A scope named \"{name}\" already exists.',\n },\n oauthScopesInput: {\n noScopesDefined: 'No Scopes Defined',\n addScope: 'Add Scope',\n deselectAll: 'Deselect All',\n selectAll: 'Select All',\n selectedScopes: 'Scopes Selected {count} / {total}',\n editScope: 'Edit {name}',\n deleteScope: 'Delete {name}',\n selectScope: 'Select {name} scope',\n },\n openIdConnect: {\n discoveryUrl: 'Discovery URL',\n fetchConfiguration: 'Fetch Configuration',\n failedToFetchConfiguration: 'Failed to fetch OpenID Connect configuration',\n },\n requestAuthDataTable: {\n noauthenticationSelected: 'No authentication selected',\n },\n requestAuthTab: {\n token: 'Token',\n bearerToken: 'Bearer Token',\n getAToken: 'Get a token',\n refresh: 'Refresh',\n username: 'Username',\n password: 'Password',\n name: 'Name',\n value: 'Value',\n cancel: 'Cancel',\n authorize: 'Authorize',\n unsupportedCredentials: 'Credentials for this AsyncAPI security scheme are not sent by the browser client.',\n authorizeVia: 'Authorize via {name}',\n unsupportedType: 'The {type} security scheme type is not supported yet.',\n missingType:\n 'The security scheme is missing a type, please double check your {type} document or Authentication Configuration',\n failedToauthorize: 'Failed to authorize',\n failedToRefresh: 'Failed to refresh',\n configure: 'Configure {name}',\n mutualTlsHint:\n 'Mutual TLS authenticates with a client certificate presented during the TLS handshake, so there is nothing to enter here.',\n },\n commandActionForm: {\n continue: 'Continue',\n },\n environment: {\n thisIsTheActiveEnvironment: 'This is the active environment',\n active: 'Active',\n editEnvironment: 'Edit Environment',\n deleteEnvironment: 'Delete Environment',\n },\n environmentCreateModal: {\n environmentName: 'Environment name',\n thisEnvironmentNameIsAlreadyInUse: 'This environment name is already in use.',\n update: 'Update Environment',\n add: 'Add Environment',\n },\n environmentDeleteModal: {\n cancel: 'Cancel',\n deleteEnvironment: 'Delete Environment',\n deleteConfirmation: 'Are you sure you want to delete this environment? This action cannot be undone.',\n title: 'Delete {name}',\n },\n environmentVariablesDropdown: {\n variableSuggestions: 'Variable suggestions',\n addVariable: 'Add Variable',\n },\n environmentVariablesTable: {\n name: 'Name',\n value: 'Value',\n actions: 'Actions',\n environmentVariableName: 'Environment Variable Name',\n environmentVariableValue: 'Environment Variable Value',\n },\n documentSearchModal: {\n documentSearch: 'Document Search',\n documentSearchResults: 'Document Search Results',\n navigate: '\\u2191\\u2193 Navigate',\n select: '\\u23ce Select',\n keyboardInstructions: 'Press up arrow / down arrow to navigate, enter to select, type to filter results',\n },\n searchResult: {\n httpMethod: 'HTTP Method:',\n path: 'Path:',\n description: 'Description:',\n heading: 'Heading',\n operation: 'Operation',\n tag: 'Tag',\n },\n sectionFilter: {\n all: 'All',\n auth: 'Auth',\n variables: 'Variables',\n cookies: 'Cookies',\n headers: 'Headers',\n query: 'Query',\n body: 'Body',\n },\n requestParams: {\n clearAll: 'Clear All {title}',\n clear: 'Clear',\n clearOptionalParameters: 'Clear optional parameters',\n },\n responseBodyDownload: {\n download: 'Download Response Body',\n label: 'Download',\n body: 'Response Body',\n },\n responseMetaInformation: {\n duration: 'Response Information, Duration:',\n size: ', Size:',\n status: ', Status:',\n },\n authSelector: {\n selectedType: 'Selected Auth Type: {type}',\n multipleTypes: 'Multiple Auth Types Selected',\n selectType: 'Select Auth Type',\n optional: 'Optional',\n required: 'Required',\n deleteScheme: 'Delete {name}',\n requiredGroup: 'Required authentication',\n availableGroup: 'Available authentication',\n addGroup: 'Add new authentication',\n },\n operationBlock: {\n webhookUrlRequired: 'Webhook URL required. Enter a destination first.',\n pathParametersRequired: 'Path parameters must have values.',\n },\n dataTableCheckbox: {\n toggle: 'Toggle',\n },\n pillTooltipHost: {\n computedAtExecution: 'Computed at request execution',\n noValue: 'No value',\n },\n authOptions: {\n oauth2DeviceAuthorization: 'OAuth2 Device Authorization',\n apiKeyCookie: 'API Key in Cookies',\n apiKeyHeader: 'API Key in Headers',\n apiKeyQuery: 'API Key in Query Params',\n httpBasic: 'HTTP Basic',\n httpBearer: 'HTTP Bearer',\n oauth2Implicit: 'Oauth2 Implicit Flow',\n oauth2Password: 'Oauth2 Password Flow',\n oauth2ClientCredentials: 'Oauth2 Client Credentials',\n oauth2AuthorizationFlow: 'Oauth2 Authorization Code',\n },\n deleteSidebarListElement: {\n delete: 'Delete {name}',\n },\n deleteModal: {\n delete: 'Delete {name}',\n },\n} satisfies ApiClientTranslations\n"],"mappings":";;AAGA,IAAa,KAAK;CAChB,uBAAuB,EACrB,UAAU,YACZ;CACA,wBAAwB,EACtB,OAAO,QACT;CACA,wBAAwB,EACtB,QAAQ,SACV;CACA,cAAc;EACZ,gBAAgB;EAChB,WAAW;EACX,SAAS;EACT,SAAS;EACT,iBAAiB;EACjB,aAAa;EACb,aAAa;EACb,OAAO;CACT;CACA,eAAe;EACb,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,MAAM;CACR;CACA,WAAW;EACT,UAAU;EACV,UAAU;CACZ;CACA,eAAe,EACb,UAAU,WACZ;CACA,gBAAgB;EACd,YAAY;EACZ,cAAc;EACd,cAAc;CAChB;CACA,sBAAsB;EACpB,OAAO;EACP,UAAU;CACZ;CACA,kBAAkB;EAChB,QAAQ;EACR,MAAM;CACR;CACA,oBAAoB;EAClB,WAAW;EACX,MAAM;EACN,OAAO;CACT;CACA,sBAAsB,EACpB,OAAO,aACT;CACA,gBAAgB;EACd,QAAQ;EACR,WAAW;EACX,eAAe;EACf,eAAe;CACjB;CACA,SAAS,EACP,QAAQ,SACV;CACA,aAAa,EACX,UAAU,WACZ;CACA,eAAe;EACb,MAAM;EACN,MAAM;CACR;CACA,kBAAkB,EAChB,gBAAgB,kBAClB;CACA,OAAO,EACL,oBAAoB,uBACtB;CACA,WAAW,EACT,gCAAgC,sCAClC;CACA,QAAQ;EACN,mBAAmB;EACnB,aAAa;CACf;CACA,qBAAqB,EACnB,eAAe,kBACjB;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,YAAY;EACZ,OAAO;EACP,MAAM;CACR;CACA,uBAAuB,EACrB,MAAM,OACR;CACA,uBAAuB;EACrB,MAAM;EACN,KAAK;EAC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ACT,SAAS;EACT,OAAO;EACP,MAAM;CACR;CACA,eAAe;EACb,UAAU;EACV,OAAO;EACP,yBAAyB;CAC3B;CACA,sBAAsB;EACpB,UAAU;EACV,OAAO;EACP,MAAM;CACR;CACA,yBAAyB;EACvB,UAAU;EACV,MAAM;EACN,QAAQ;CACV;CACA,cAAc;EACZ,cAAc;EACd,eAAe;EACf,YAAY;EACZ,UAAU;EACV,UAAU;EACV,cAAc;EACd,eAAe;EACf,gBAAgB;EAChB,UAAU;CACZ;CACA,gBAAgB;EACd,oBAAoB;EACpB,wBAAwB;CAC1B;CACA,mBAAmB,EACjB,QAAQ,SACV;CACA,iBAAiB;EACf,qBAAqB;EACrB,SAAS;CACX;CACA,aAAa;EACX,2BAA2B;EAC3B,cAAc;EACd,cAAc;EACd,aAAa;EACb,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;EAChB,yBAAyB;EACzB,yBAAyB;CAC3B;CACA,0BAA0B,EACxB,QAAQ,gBACV;CACA,aAAa,EACX,QAAQ,gBACV;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AAiNA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AACnG,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,GAAG,EACT,MAAM,KAAK,CAAA;AAIZ,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAA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E,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;CAC5C,CAAA;AAED;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;aAC0C,mBAAmB;;;;;aAAnB,mBAAmB;iGA8R3E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.vue.js","names":[],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<HttpMethod | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-md:top-4\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">No document selected</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Modal.vue.js","names":[],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<HttpMethod | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { provideLocalization } from '@/v2/features/localization'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst { translate, locale, direction } = provideLocalization(\n () => options.value.localization,\n)\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer\n :dir=\"direction\"\n :lang=\"locale\"\n :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-md:top-4\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isActive=\"modalState.open\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">{{\n translate('apiClient.modal.noDocumentSelected')\n }}</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { provideLocalization } from "../localization/index.js";
1
2
  import { useGlobalHotKeys } from "../../hooks/use-global-hot-keys.js";
2
3
  import Sidebar_default from "../../components/sidebar/Sidebar.vue.js";
3
4
  import SidebarToggle_default from "../../components/sidebar/SidebarToggle.vue.js";
@@ -5,7 +6,7 @@ import ModalClientContainer_default from "../../components/modals/ModalClientCon
5
6
  import { initializeModalEvents } from "./modal-events.js";
6
7
  import Operation_default from "../operation/Operation.vue.js";
7
8
  import { useScrollLock } from "../../hooks/use-scroll-lock.js";
8
- import { computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, onBeforeUnmount, openBlock, ref, unref, vShow, watch, withCtx, withDirectives } from "vue";
9
+ import { computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, onBeforeUnmount, openBlock, ref, toDisplayString, unref, vShow, watch, withCtx, withDirectives } from "vue";
9
10
  import { getActiveEnvironment } from "@scalar/workspace-store/request-example";
10
11
  import { ScalarToasts } from "@scalar/use-toasts";
11
12
  //#region src/v2/features/modal/Modal.vue?vue&type=script&setup=true&lang.ts
@@ -17,6 +18,7 @@ var _hoisted_2 = {
17
18
  key: 1,
18
19
  class: "flex h-full w-full items-center justify-center"
19
20
  };
21
+ var _hoisted_3 = { class: "text-c-3" };
20
22
  var Modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
21
23
  __name: "Modal",
22
24
  props: {
@@ -34,6 +36,7 @@ var Modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
34
36
  options: {}
35
37
  },
36
38
  setup(__props, { expose: __expose }) {
39
+ const { translate, locale, direction } = provideLocalization(() => __props.options.value.localization);
37
40
  const activeWorkspace = {
38
41
  label: "default",
39
42
  id: "default"
@@ -81,7 +84,11 @@ var Modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
81
84
  environment
82
85
  });
83
86
  return (_ctx, _cache) => {
84
- return openBlock(), createBlock(ModalClientContainer_default, { modalState: __props.modalState }, {
87
+ return openBlock(), createBlock(ModalClientContainer_default, {
88
+ dir: unref(direction),
89
+ lang: unref(locale),
90
+ modalState: __props.modalState
91
+ }, {
85
92
  default: withCtx(() => [createVNode(unref(ScalarToasts)), __props.document.value && __props.path?.value && __props.method?.value ? (openBlock(), createElementBlock("main", _hoisted_1, [
86
93
  createVNode(unref(SidebarToggle_default), {
87
94
  modelValue: isSidebarOpen.value,
@@ -115,6 +122,7 @@ var Modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
115
122
  environment: environment.value,
116
123
  eventBus: __props.eventBus,
117
124
  exampleName: __props.exampleName?.value,
125
+ isActive: __props.modalState.open,
118
126
  isWebhook: __props.isWebhook.value,
119
127
  layout: "modal",
120
128
  method: __props.method?.value,
@@ -129,6 +137,7 @@ var Modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
129
137
  "environment",
130
138
  "eventBus",
131
139
  "exampleName",
140
+ "isActive",
132
141
  "isWebhook",
133
142
  "method",
134
143
  "options",
@@ -137,9 +146,13 @@ var Modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
137
146
  "requestBodyCompositionSelection",
138
147
  "workspaceStore"
139
148
  ])
140
- ])) : (openBlock(), createElementBlock("div", _hoisted_2, [..._cache[2] || (_cache[2] = [createElementVNode("span", { class: "text-c-3" }, "No document selected", -1)])]))]),
149
+ ])) : (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(unref(translate)("apiClient.modal.noDocumentSelected")), 1)]))]),
141
150
  _: 1
142
- }, 8, ["modalState"]);
151
+ }, 8, [
152
+ "dir",
153
+ "lang",
154
+ "modalState"
155
+ ]);
143
156
  };
144
157
  }
145
158
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.vue.script.js","names":[],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<HttpMethod | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-md:top-4\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">No document selected</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EA,MAAM,kBAAuC;GAC3C,OAAO;GACP,IAAI;EACN;;EAGA,MAAM,gBAAgB,IAA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,cAAY,QAAA,aAAa;;;;;;;kBAVlB,cAAA,KAAa,CAAA,CAAA;KAYvB,YAeoB,mBAAA;MAdA;MAClB,OAAM;MACL,UAAU,QAAA,SAAS;MACnB,cAAc,QAAA,SAAS,MAAK,sBAAA,EAAyB,QAAI;MACzD,aAAA,YAAA;MACA,UAAA,QAAA;MACA,aAAa,QAAA,aAAa;MAC1B,WAAW,QAAA,UAAU;MACtB,QAAO;MACN,QAAQ,QAAA,QAAQ;MAChB,SAAA,QAAA;MACA,MAAM,QAAA,MAAM;MACZ,SAAA,QAAA;MACA,iCAAiC,QAAA,gCAAgC;MACjE,gBAAA,QAAA;;;;;;;;;;;;;;;wBAGL,mBAIM,OAJN,YAIM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CADJ,mBAAkD,QAAA,EAA5C,OAAM,WAAU,GAAC,wBAAoB,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"Modal.vue.script.js","names":[],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<HttpMethod | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { provideLocalization } from '@/v2/features/localization'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst { translate, locale, direction } = provideLocalization(\n () => options.value.localization,\n)\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer\n :dir=\"direction\"\n :lang=\"locale\"\n :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-md:top-4\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isActive=\"modalState.open\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">{{\n translate('apiClient.modal.noDocumentSelected')\n }}</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EA,MAAM,EAAE,WAAW,QAAQ,cAAc,0BACjC,QAAA,QAAQ,MAAM,YACtB;EAEA,MAAM,kBAAuC;GAC3C,OAAO;GACP,IAAI;EACN;;EAGA,MAAM,gBAAgB,IAAI,KAAK;;EAG/B,sBAAsB;GACpB,UAAO,QAAA;GACP;GACA,iCAA8B,QAAA;GAC9B,cAAW,QAAA;GACX,YAAS,QAAA;GACT,OAAO,QAAA;EACT,CAAC;;EAGD,iBAAiB,QAAA,UAAU,eAAe,CAAC,QAAA,WAAW,IAAI;;EAG1D,MAAM,gBAAgB;GACpB,QAAA,SAAS,KAAK,0BAA0B;EAC1C;EAEA,MAAM,WAAW,oBAAoB;GACnC,IAAI,OAAO,WAAW,aACpB,OAAO,OAAO,SAAS;GAEzB,OAAO;EACT,CAAC;EAED,YACQ,QAAA,WAAW,OAChB,SAAS;GAER,SAAS,QAAQ;GAEjB,IAAI,CAAC,MACH,QA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gCAAgC;MACjE,gBAAA,QAAA;;;;;;;;;;;;;;;;wBAGL,mBAMM,OANN,YAMM,CAHJ,mBAES,QAFT,YAES,gBADP,MAAA,SAAA,CAAS,CAAA,oCAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
+ import { type ShallowRef } from 'vue';
3
+ import type { ApiClientModal } from './helpers/create-api-client-modal.js';
4
+ /** Load and mount the client only when requested, retaining the latest open intent during loading. */
5
+ export declare const useLazyApiClient: ({ eventBus, load, status, }: {
6
+ eventBus: WorkspaceEventBus;
7
+ load: () => Promise<() => ApiClientModal | null>;
8
+ /** Optional visitor-facing state for the initial download. */
9
+ status?: ShallowRef<"idle" | "loading" | "error">;
10
+ }) => ShallowRef<ApiClientModal | null>;
11
+ //# sourceMappingURL=use-lazy-api-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-lazy-api-client.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/use-lazy-api-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACjF,OAAO,EAAE,KAAK,UAAU,EAA+C,MAAM,KAAK,CAAA;AAElF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAIvE,sGAAsG;AACtG,eAAO,MAAM,gBAAgB,GAAI,6BAI9B;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,CAAA;IAChD,8DAA8D;IAC9D,MAAM,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,CAAA;CAClD,KAAG,UAAU,CAAC,cAAc,GAAG,IAAI,CAwDnC,CAAA"}
@@ -0,0 +1,48 @@
1
+ import { getCurrentScope, onScopeDispose, shallowRef } from "vue";
2
+ //#region src/v2/features/modal/use-lazy-api-client.ts
3
+ /** Load and mount the client only when requested, retaining the latest open intent during loading. */
4
+ var useLazyApiClient = ({ eventBus, load, status = shallowRef("idle") }) => {
5
+ const scope = getCurrentScope();
6
+ const client = shallowRef(null);
7
+ let disposed = false;
8
+ let loading = false;
9
+ let pending = null;
10
+ const unsubscribeOpen = eventBus.on("ui:open:client-modal", (payload) => {
11
+ pending = { payload };
12
+ status.value = "loading";
13
+ if (loading) return;
14
+ loading = true;
15
+ load().then((createClient) => {
16
+ if (disposed || !pending) return;
17
+ client.value = (scope ? scope.run(createClient) : createClient()) ?? null;
18
+ if (!client.value) return;
19
+ unsubscribeOpen();
20
+ unsubscribeClose();
21
+ eventBus.emit("ui:open:client-modal", pending.payload);
22
+ }).catch((error) => {
23
+ if (!disposed && pending) status.value = "error";
24
+ console.error("[@scalar/api-client] Could not load the API client modal.", error);
25
+ }).finally(() => {
26
+ pending = null;
27
+ loading = false;
28
+ if (status.value === "loading") status.value = "idle";
29
+ });
30
+ });
31
+ const unsubscribeClose = eventBus.on("ui:close:client-modal", () => {
32
+ pending = null;
33
+ status.value = "idle";
34
+ });
35
+ onScopeDispose(() => {
36
+ disposed = true;
37
+ status.value = "idle";
38
+ pending = null;
39
+ unsubscribeOpen();
40
+ unsubscribeClose();
41
+ client.value?.app.unmount();
42
+ }, true);
43
+ return client;
44
+ };
45
+ //#endregion
46
+ export { useLazyApiClient };
47
+
48
+ //# sourceMappingURL=use-lazy-api-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-lazy-api-client.js","names":[],"sources":["../../../../src/v2/features/modal/use-lazy-api-client.ts"],"sourcesContent":["import type { AnyEvent, WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { type ShallowRef, getCurrentScope, onScopeDispose, shallowRef } from 'vue'\n\nimport type { ApiClientModal } from './helpers/create-api-client-modal'\n\ntype OpenPayload = Extract<AnyEvent, { event: 'ui:open:client-modal' }>['payload']\n\n/** Load and mount the client only when requested, retaining the latest open intent during loading. */\nexport const useLazyApiClient = ({\n eventBus,\n load,\n status = shallowRef('idle'),\n}: {\n eventBus: WorkspaceEventBus\n load: () => Promise<() => ApiClientModal | null>\n /** Optional visitor-facing state for the initial download. */\n status?: ShallowRef<'idle' | 'loading' | 'error'>\n}): ShallowRef<ApiClientModal | null> => {\n const scope = getCurrentScope()\n const client = shallowRef<ApiClientModal | null>(null)\n let disposed = false\n let loading = false\n let pending: { payload: OpenPayload } | null = null\n\n const unsubscribeOpen = eventBus.on('ui:open:client-modal', (payload) => {\n pending = { payload }\n status.value = 'loading'\n if (loading) {\n return\n }\n loading = true\n void load()\n .then((createClient) => {\n if (disposed || !pending) {\n return\n }\n client.value = (scope ? scope.run(createClient) : createClient()) ?? null\n if (!client.value) {\n return\n }\n unsubscribeOpen()\n unsubscribeClose()\n // Replay the full event after the modal subscribes, including example and composition selection.\n eventBus.emit('ui:open:client-modal', pending.payload)\n })\n .catch((error: unknown) => {\n if (!disposed && pending) {\n status.value = 'error'\n }\n console.error('[@scalar/api-client] Could not load the API client modal.', error)\n })\n .finally(() => {\n pending = null\n loading = false\n if (status.value === 'loading') {\n status.value = 'idle'\n }\n })\n })\n const unsubscribeClose = eventBus.on('ui:close:client-modal', () => {\n pending = null\n status.value = 'idle'\n })\n\n onScopeDispose(() => {\n disposed = true\n status.value = 'idle'\n pending = null\n unsubscribeOpen()\n unsubscribeClose()\n client.value?.app.unmount()\n }, true)\n return client\n}\n"],"mappings":";;;AAQA,IAAa,oBAAoB,EAC/B,UACA,MACA,SAAS,WAAW,MAAM,QAMa;CACvC,MAAM,QAAQ,gBAAgB;CAC9B,MAAM,SAAS,WAAkC,IAAI;CACrD,IAAI,WAAW;CACf,IAAI,UAAU;CACd,IAAI,UAA2C;CAE/C,MAAM,kBAAkB,SAAS,GAAG,yBAAyB,YAAY;EACvE,UAAU,EAAE,QAAQ;EACpB,OAAO,QAAQ;EACf,IAAI,SACF;EAEF,UAAU;EACV,KAAU,CAAC,CACR,MAAM,iBAAiB;GACtB,IAAI,YAAY,CAAC,SACf;GAEF,OAAO,SAAS,QAAQ,MAAM,IAAI,YAAY,IAAI,aAAa,MAAM;GACrE,IAAI,CAAC,OAAO,OACV;GAEF,gBAAgB;GAChB,iBAAiB;GAEjB,SAAS,KAAK,wBAAwB,QAAQ,OAAO;EACvD,CAAC,CAAC,CACD,OAAO,UAAmB;GACzB,IAAI,CAAC,YAAY,SACf,OAAO,QAAQ;GAEjB,QAAQ,MAAM,6DAA6D,KAAK;EAClF,CAAC,CAAC,CACD,cAAc;GACb,UAAU;GACV,UAAU;GACV,IAAI,OAAO,UAAU,WACnB,OAAO,QAAQ;EAEnB,CAAC;CACL,CAAC;CACD,MAAM,mBAAmB,SAAS,GAAG,+BAA+B;EAClE,UAAU;EACV,OAAO,QAAQ;CACjB,CAAC;CAED,qBAAqB;EACnB,WAAW;EACX,OAAO,QAAQ;EACf,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,OAAO,OAAO,IAAI,QAAQ;CAC5B,GAAG,IAAI;CACP,OAAO;AACT"}
@@ -18,6 +18,8 @@ import type { ApiClientOptions } from '../../../v2/types/options';
18
18
  declare const _default: typeof __VLS_export;
19
19
  export default _default;
20
20
  export type OperationProps = {
21
+ /** Hidden modals keep their operation mounted without downloading examples. */
22
+ isActive?: boolean;
21
23
  /** The slug of the currently selected document in the workspace */
22
24
  documentSlug: string;
23
25
  /** The currently active document — OpenAPI-only, the operation page has no AsyncAPI path */