@scalar/api-client 3.19.3 → 3.21.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 (433) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  3. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  4. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  5. package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -1
  6. package/dist/components/HttpMethod/HttpMethod.vue.script.js +15 -7
  7. package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -1
  8. package/dist/components/SectionFilter.vue.d.ts +2 -0
  9. package/dist/components/SectionFilter.vue.d.ts.map +1 -1
  10. package/dist/components/SectionFilter.vue.js +1 -1
  11. package/dist/components/SectionFilter.vue.js.map +1 -1
  12. package/dist/components/SectionFilter.vue.script.js +11 -8
  13. package/dist/components/SectionFilter.vue.script.js.map +1 -1
  14. package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
  15. package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -1
  16. package/dist/components/Server/ServerVariablesSelect.vue.script.js +5 -3
  17. package/dist/components/Server/ServerVariablesSelect.vue.script.js.map +1 -1
  18. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
  19. package/dist/components/Server/ServerVariablesTextbox.vue.js.map +1 -1
  20. package/dist/components/Server/ServerVariablesTextbox.vue.script.js +6 -3
  21. package/dist/components/Server/ServerVariablesTextbox.vue.script.js.map +1 -1
  22. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
  23. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js.map +1 -1
  24. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js +4 -2
  25. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js.map +1 -1
  26. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  27. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -1
  28. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js +3 -1
  29. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js.map +1 -1
  30. package/dist/style.css +164 -141
  31. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -2
  32. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  33. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  34. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +16 -3
  35. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
  36. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -2
  37. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  38. package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
  39. package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
  40. package/dist/v2/blocks/operation-block/components/Header.vue.script.js +10 -6
  41. package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
  42. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts.map +1 -1
  43. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
  44. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
  45. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js +6 -3
  46. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +1 -1
  47. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -2
  48. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts.map +1 -1
  49. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js.map +1 -1
  50. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -2
  51. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
  52. package/dist/v2/blocks/operation-block/helpers/send-request.js +4 -3
  53. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  54. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +3 -2
  55. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  56. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  57. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  58. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +59 -26
  59. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  60. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  61. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  62. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  63. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +28 -8
  64. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
  65. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.d.ts.map +1 -1
  66. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js.map +1 -1
  67. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js +9 -3
  68. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js.map +1 -1
  69. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.d.ts.map +1 -1
  70. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js.map +1 -1
  71. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js +6 -4
  72. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js.map +1 -1
  73. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  74. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
  75. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +13 -4
  76. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
  77. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -0
  78. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  79. package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
  80. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js +14 -7
  81. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +1 -1
  82. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
  83. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  84. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  85. package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
  86. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js +40 -7
  87. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +1 -1
  88. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +16 -16
  89. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  90. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  91. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +24 -20
  92. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
  93. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
  94. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
  95. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +6 -4
  96. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -1
  97. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts.map +1 -1
  98. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +14 -6
  99. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -1
  100. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -1
  101. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +5 -4
  102. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
  103. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  104. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  105. package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
  106. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +34 -13
  107. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
  108. package/dist/v2/blocks/response-block/components/Headers.vue.d.ts +3 -3
  109. package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -1
  111. package/dist/v2/blocks/response-block/components/Headers.vue.script.js +5 -3
  112. package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +1 -1
  113. package/dist/v2/blocks/response-block/components/ResponseBody.vue.d.ts.map +1 -1
  114. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +1 -1
  115. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
  116. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +3 -1
  117. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +1 -1
  118. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -1
  119. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
  120. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +11 -3
  121. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -1
  122. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
  123. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
  124. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
  125. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +8 -6
  126. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
  127. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts +1 -0
  128. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
  129. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js.map +1 -1
  130. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js +109 -56
  131. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +1 -1
  132. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -1
  133. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js.map +1 -1
  134. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js +5 -3
  135. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js.map +1 -1
  136. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
  137. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
  138. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +6 -3
  139. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -1
  140. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.d.ts.map +1 -1
  141. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
  142. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +7 -5
  143. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -1
  144. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
  145. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  146. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  147. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
  148. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +20 -15
  149. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
  150. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  151. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +1 -1
  152. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
  153. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +4 -2
  154. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -1
  155. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -1
  156. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -1
  157. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js +11 -6
  158. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +1 -1
  159. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.d.ts +4 -0
  160. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.d.ts.map +1 -0
  161. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js +100 -0
  162. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js.map +1 -0
  163. package/dist/v2/blocks/response-block/helpers/response-stream.d.ts +13 -0
  164. package/dist/v2/blocks/response-block/helpers/response-stream.d.ts.map +1 -0
  165. package/dist/v2/blocks/response-block/helpers/response-stream.js +97 -0
  166. package/dist/v2/blocks/response-block/helpers/response-stream.js.map +1 -0
  167. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -3
  168. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  169. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  170. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  171. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +41 -29
  172. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  173. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +6 -7
  174. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
  175. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
  176. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
  177. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +7 -4
  178. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
  179. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
  180. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -1
  181. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js +21 -16
  182. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +1 -1
  183. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  184. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
  185. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +7 -5
  186. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  187. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -1
  188. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js.map +1 -1
  189. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js +7 -5
  190. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +1 -1
  191. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  192. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  193. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +105 -40
  194. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  195. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
  196. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
  197. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +10 -8
  198. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -1
  199. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  200. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
  201. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +20 -14
  202. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
  203. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -1
  204. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
  205. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +6 -4
  206. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -1
  207. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  208. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
  209. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +3 -1
  210. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
  211. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  212. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
  213. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +40 -40
  214. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
  215. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts +108 -7
  216. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
  217. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +12 -0
  218. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js.map +1 -1
  219. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  220. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.d.ts.map +1 -1
  221. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js +8 -5
  222. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js.map +1 -1
  223. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +2 -0
  224. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -1
  225. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +2 -0
  226. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map +1 -1
  227. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.d.ts +3 -0
  228. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.d.ts.map +1 -0
  229. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.js +8 -0
  230. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.js.map +1 -0
  231. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.d.ts +3 -0
  232. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.d.ts.map +1 -0
  233. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js +11 -0
  234. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js.map +1 -0
  235. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts +19 -0
  236. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts.map +1 -0
  237. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js +117 -0
  238. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js.map +1 -0
  239. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -1
  240. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  241. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +15 -11
  242. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
  243. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.d.ts +1 -1
  244. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.d.ts.map +1 -1
  245. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js +8 -1
  246. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js.map +1 -1
  247. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -1
  248. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +6 -0
  249. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js.map +1 -1
  250. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -1
  251. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  252. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +8 -6
  253. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js.map +1 -1
  254. package/dist/v2/components/code-input/CodeInput.vue.d.ts +4 -4
  255. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  256. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  257. package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
  258. package/dist/v2/components/code-input/CodeInput.vue.script.js +10 -10
  259. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
  260. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts +4 -4
  261. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts.map +1 -1
  262. package/dist/v2/components/code-input/CodeInputLite.vue.js +1 -1
  263. package/dist/v2/components/code-input/CodeInputLite.vue.js.map +1 -1
  264. package/dist/v2/components/code-input/CodeInputLite.vue.script.js +8 -5
  265. package/dist/v2/components/code-input/CodeInputLite.vue.script.js.map +1 -1
  266. package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts +4 -0
  267. package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts.map +1 -1
  268. package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -1
  269. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js +7 -3
  270. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +1 -1
  271. package/dist/v2/components/code-input/code-variable-widget.d.ts +3 -0
  272. package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -1
  273. package/dist/v2/components/code-input/code-variable-widget.js +6 -3
  274. package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
  275. package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
  276. package/dist/v2/components/data-table/DataTable.vue.js.map +1 -1
  277. package/dist/v2/components/data-table/DataTable.vue.script.js +2 -1
  278. package/dist/v2/components/data-table/DataTable.vue.script.js.map +1 -1
  279. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts +0 -1
  280. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -1
  281. package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -1
  282. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js +4 -2
  283. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +1 -1
  284. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  285. package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
  286. package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
  287. package/dist/v2/components/data-table/DataTableInput.vue.script.js +5 -3
  288. package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
  289. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
  290. package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
  291. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js +12 -9
  292. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +1 -1
  293. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -1
  294. package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -1
  295. package/dist/v2/components/forms/ConfirmationForm.vue.script.js +5 -3
  296. package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +1 -1
  297. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -1
  298. package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
  299. package/dist/v2/components/layout/CollapsibleSection.vue.script.js +3 -1
  300. package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
  301. package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -1
  302. package/dist/v2/components/modals/DeleteModal.vue.js.map +1 -1
  303. package/dist/v2/components/modals/DeleteModal.vue.script.js +3 -1
  304. package/dist/v2/components/modals/DeleteModal.vue.script.js.map +1 -1
  305. package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
  306. package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
  307. package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
  308. package/dist/v2/components/modals/ModalClientContainer.vue.script.js +5 -2
  309. package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +1 -1
  310. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  311. package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
  312. package/dist/v2/components/server/ServerDropdown.vue.script.js +9 -5
  313. package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
  314. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  315. package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
  316. package/dist/v2/components/sidebar/Sidebar.vue.script.js +4 -2
  317. package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
  318. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  319. package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -1
  320. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js +4 -2
  321. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +1 -1
  322. package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts.map +1 -1
  323. package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
  324. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js +4 -2
  325. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +1 -1
  326. package/dist/v2/constants.js +1 -1
  327. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -1
  328. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js.map +1 -1
  329. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js +4 -2
  330. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +1 -1
  331. package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +2 -2
  332. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
  333. package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -1
  334. package/dist/v2/features/environments/EnvironmentsList.vue.script.js +4 -2
  335. package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +1 -1
  336. package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
  337. package/dist/v2/features/environments/components/Environment.vue.js.map +1 -1
  338. package/dist/v2/features/environments/components/Environment.vue.script.js +12 -10
  339. package/dist/v2/features/environments/components/Environment.vue.script.js.map +1 -1
  340. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
  341. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
  342. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +5 -3
  343. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -1
  344. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
  345. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -1
  346. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js +9 -6
  347. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +1 -1
  348. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  349. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
  350. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +6 -4
  351. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
  352. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
  353. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +1 -1
  354. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -1
  355. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js +22 -10
  356. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +1 -1
  357. package/dist/v2/features/localization/index.d.ts +18 -0
  358. package/dist/v2/features/localization/index.d.ts.map +1 -0
  359. package/dist/v2/features/localization/index.js +35 -0
  360. package/dist/v2/features/localization/index.js.map +1 -0
  361. package/dist/v2/features/localization/locales/ar.d.ts +389 -0
  362. package/dist/v2/features/localization/locales/ar.d.ts.map +1 -0
  363. package/dist/v2/features/localization/locales/ar.js +351 -0
  364. package/dist/v2/features/localization/locales/ar.js.map +1 -0
  365. package/dist/v2/features/localization/locales/de.d.ts +389 -0
  366. package/dist/v2/features/localization/locales/de.d.ts.map +1 -0
  367. package/dist/v2/features/localization/locales/de.js +351 -0
  368. package/dist/v2/features/localization/locales/de.js.map +1 -0
  369. package/dist/v2/features/localization/locales/es.d.ts +389 -0
  370. package/dist/v2/features/localization/locales/es.d.ts.map +1 -0
  371. package/dist/v2/features/localization/locales/es.js +351 -0
  372. package/dist/v2/features/localization/locales/es.js.map +1 -0
  373. package/dist/v2/features/localization/locales/fr.d.ts +389 -0
  374. package/dist/v2/features/localization/locales/fr.d.ts.map +1 -0
  375. package/dist/v2/features/localization/locales/fr.js +351 -0
  376. package/dist/v2/features/localization/locales/fr.js.map +1 -0
  377. package/dist/v2/features/localization/locales/pt.d.ts +389 -0
  378. package/dist/v2/features/localization/locales/pt.d.ts.map +1 -0
  379. package/dist/v2/features/localization/locales/pt.js +351 -0
  380. package/dist/v2/features/localization/locales/pt.js.map +1 -0
  381. package/dist/v2/features/localization/locales/ru.d.ts +389 -0
  382. package/dist/v2/features/localization/locales/ru.d.ts.map +1 -0
  383. package/dist/v2/features/localization/locales/ru.js +351 -0
  384. package/dist/v2/features/localization/locales/ru.js.map +1 -0
  385. package/dist/v2/features/localization/locales/zh-cn.d.ts +389 -0
  386. package/dist/v2/features/localization/locales/zh-cn.d.ts.map +1 -0
  387. package/dist/v2/features/localization/locales/zh-cn.js +351 -0
  388. package/dist/v2/features/localization/locales/zh-cn.js.map +1 -0
  389. package/dist/v2/features/localization/translations.d.ts +389 -0
  390. package/dist/v2/features/localization/translations.d.ts.map +1 -0
  391. package/dist/v2/features/localization/translations.js +351 -0
  392. package/dist/v2/features/localization/translations.js.map +1 -0
  393. package/dist/v2/features/modal/Modal.vue.d.ts +1 -2
  394. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  395. package/dist/v2/features/modal/Modal.vue.js.map +1 -1
  396. package/dist/v2/features/modal/Modal.vue.script.js +15 -4
  397. package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
  398. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +2 -3
  399. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -1
  400. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +8 -7
  401. package/dist/v2/features/modal/helpers/resolve-route-parameters.js.map +1 -1
  402. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +2 -3
  403. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -1
  404. package/dist/v2/features/modal/hooks/use-modal-sidebar.js.map +1 -1
  405. package/dist/v2/features/modal/use-lazy-api-client.d.ts +11 -0
  406. package/dist/v2/features/modal/use-lazy-api-client.d.ts.map +1 -0
  407. package/dist/v2/features/modal/use-lazy-api-client.js +48 -0
  408. package/dist/v2/features/modal/use-lazy-api-client.js.map +1 -0
  409. package/dist/v2/features/operation/Operation.vue.d.ts +1 -2
  410. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  411. package/dist/v2/features/operation/Operation.vue.js.map +1 -1
  412. package/dist/v2/features/operation/Operation.vue.script.js +22 -6
  413. package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
  414. package/dist/v2/features/search/components/DocumentSearchModal.vue.d.ts.map +1 -1
  415. package/dist/v2/features/search/components/DocumentSearchModal.vue.js +1 -1
  416. package/dist/v2/features/search/components/DocumentSearchModal.vue.js.map +1 -1
  417. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js +12 -8
  418. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js.map +1 -1
  419. package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
  420. package/dist/v2/features/search/components/SearchResult.vue.js.map +1 -1
  421. package/dist/v2/features/search/components/SearchResult.vue.script.js +14 -10
  422. package/dist/v2/features/search/components/SearchResult.vue.script.js.map +1 -1
  423. package/dist/v2/helpers/generate-location-id.d.ts +1 -2
  424. package/dist/v2/helpers/generate-location-id.d.ts.map +1 -1
  425. package/dist/v2/helpers/generate-location-id.js.map +1 -1
  426. package/dist/v2/types/options.d.ts +1 -1
  427. package/dist/v2/types/options.d.ts.map +1 -1
  428. package/dist/v2/workspace-events.d.ts +2 -2
  429. package/dist/v2/workspace-events.d.ts.map +1 -1
  430. package/dist/v2/workspace-events.js +8 -1
  431. package/dist/v2/workspace-events.js.map +1 -1
  432. package/dist/vue-styles.css +128 -129
  433. package/package.json +22 -11
@@ -1 +1 @@
1
- {"version":3,"file":"SearchResult.vue.js","names":[],"sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport type { FuseResult } from 'fuse.js'\n\nimport type { FuseData } from '@/v2/features/search/types'\n\ndefineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n}>()\n\n/**\n * Icon used for each search result type. Operations use the terminal glyph to\n * match the sidebar's operation indicator, tags and headings use their closest\n * semantic equivalents.\n */\nconst ENTRY_ICONS: { [x in FuseData['type']]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n}\n\nconst ENTRY_LABELS: { [x in FuseData['type']]: string } = {\n heading: 'Heading',\n operation: 'Operation',\n tag: 'Tag',\n}\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span>\n <span class=\"sr-only\">{{ ENTRY_LABELS[result.item.type] }}:&nbsp;</span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type === 'operation' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\">\n HTTP Method: {{ result.item.method ?? 'get' }}\n </span>\n <span class=\"sr-only\">Path:&nbsp;</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">Description:&nbsp;</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SearchResult.vue.js","names":[],"sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\nimport type { FuseData } from '@/v2/features/search/types'\n\ndefineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n}>()\n\nconst { translate } = useLocalization()\n\n/**\n * Icon used for each search result type. Operations use the terminal glyph to\n * match the sidebar's operation indicator, tags and headings use their closest\n * semantic equivalents.\n */\nconst ENTRY_ICONS: { [x in FuseData['type']]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n}\n\nconst ENTRY_LABELS = computed(() => ({\n heading: translate('apiClient.searchResult.heading'),\n operation: translate('apiClient.searchResult.operation'),\n tag: translate('apiClient.searchResult.tag'),\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span>\n <span class=\"sr-only\">{{ ENTRY_LABELS[result.item.type] }}:&nbsp;</span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type === 'operation' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\"\n >{{ translate('apiClient.searchResult.httpMethod') }}\n {{ result.item.method ?? 'get' }}\n </span>\n <span class=\"sr-only\">{{\n translate('apiClient.searchResult.path')\n }}</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">{{\n translate('apiClient.searchResult.description')\n }}</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":""}
@@ -1,4 +1,5 @@
1
- import { createBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
1
+ import { useLocalization } from "../../localization/index.js";
2
+ import { computed, createBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
2
3
  import { ScalarIconTag, ScalarIconTerminalWindow, ScalarIconTextAlignLeft } from "@scalar/icons";
3
4
  import { HttpMethod } from "@scalar/sidebar";
4
5
  import { ScalarSearchResultItem } from "@scalar/components/search-results";
@@ -6,6 +7,8 @@ import { ScalarSearchResultItem } from "@scalar/components/search-results";
6
7
  var _hoisted_1 = { class: "sr-only" };
7
8
  var _hoisted_2 = { class: "inline-flex items-center gap-1" };
8
9
  var _hoisted_3 = { class: "sr-only" };
10
+ var _hoisted_4 = { class: "sr-only" };
11
+ var _hoisted_5 = { class: "sr-only" };
9
12
  var SearchResult_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
10
13
  __name: "SearchResult",
11
14
  props: {
@@ -14,6 +17,7 @@ var SearchResult_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
14
17
  result: {}
15
18
  },
16
19
  setup(__props) {
20
+ const { translate } = useLocalization();
17
21
  /**
18
22
  * Icon used for each search result type. Operations use the terminal glyph to
19
23
  * match the sidebar's operation indicator, tags and headings use their closest
@@ -24,11 +28,11 @@ var SearchResult_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
24
28
  operation: ScalarIconTerminalWindow,
25
29
  tag: ScalarIconTag
26
30
  };
27
- const ENTRY_LABELS = {
28
- heading: "Heading",
29
- operation: "Operation",
30
- tag: "Tag"
31
- };
31
+ const ENTRY_LABELS = computed(() => ({
32
+ heading: translate("apiClient.searchResult.heading"),
33
+ operation: translate("apiClient.searchResult.operation"),
34
+ tag: translate("apiClient.searchResult.tag")
35
+ }));
32
36
  return (_ctx, _cache) => {
33
37
  return openBlock(), createBlock(unref(ScalarSearchResultItem), {
34
38
  id: __props.id,
@@ -36,7 +40,7 @@ var SearchResult_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
36
40
  selected: __props.isSelected
37
41
  }, createSlots({
38
42
  default: withCtx(() => [createElementVNode("span", null, [
39
- createElementVNode("span", _hoisted_1, toDisplayString(ENTRY_LABELS[__props.result.item.type]) + ":\xA0", 1),
43
+ createElementVNode("span", _hoisted_1, toDisplayString(ENTRY_LABELS.value[__props.result.item.type]) + ":\xA0", 1),
40
44
  createTextVNode(" " + toDisplayString(__props.result.item.title) + " ", 1),
41
45
  _cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, ",", -1))
42
46
  ])]),
@@ -48,14 +52,14 @@ var SearchResult_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
48
52
  "aria-hidden": "true",
49
53
  method: __props.result.item.method ?? "get"
50
54
  }, null, 8, ["method"]),
51
- createElementVNode("span", _hoisted_3, " HTTP Method: " + toDisplayString(__props.result.item.method ?? "get"), 1),
52
- _cache[1] || (_cache[1] = createElementVNode("span", { class: "sr-only" }, "Path:\xA0", -1)),
55
+ createElementVNode("span", _hoisted_3, toDisplayString(unref(translate)("apiClient.searchResult.httpMethod")) + " " + toDisplayString(__props.result.item.method ?? "get"), 1),
56
+ createElementVNode("span", _hoisted_4, toDisplayString(unref(translate)("apiClient.searchResult.path")), 1),
53
57
  createTextVNode(" " + toDisplayString(__props.result.item.path), 1)
54
58
  ])]),
55
59
  key: "0"
56
60
  } : __props.result.item.description ? {
57
61
  name: "description",
58
- fn: withCtx(() => [_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "Description:\xA0", -1)), createTextVNode(" " + toDisplayString(__props.result.item.description), 1)]),
62
+ fn: withCtx(() => [createElementVNode("span", _hoisted_5, toDisplayString(unref(translate)("apiClient.searchResult.description")), 1), createTextVNode(" " + toDisplayString(__props.result.item.description), 1)]),
59
63
  key: "1"
60
64
  } : void 0]), 1032, [
61
65
  "id",
@@ -1 +1 @@
1
- {"version":3,"file":"SearchResult.vue.script.js","names":[],"sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport type { FuseResult } from 'fuse.js'\n\nimport type { FuseData } from '@/v2/features/search/types'\n\ndefineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n}>()\n\n/**\n * Icon used for each search result type. Operations use the terminal glyph to\n * match the sidebar's operation indicator, tags and headings use their closest\n * semantic equivalents.\n */\nconst ENTRY_ICONS: { [x in FuseData['type']]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n}\n\nconst ENTRY_LABELS: { [x in FuseData['type']]: string } = {\n heading: 'Heading',\n operation: 'Operation',\n tag: 'Tag',\n}\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span>\n <span class=\"sr-only\">{{ ENTRY_LABELS[result.item.type] }}:&nbsp;</span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type === 'operation' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\">\n HTTP Method: {{ result.item.method ?? 'get' }}\n </span>\n <span class=\"sr-only\">Path:&nbsp;</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">Description:&nbsp;</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAwBA,MAAM,cAAgE;GACpE,SAAS;GACT,WAAW;GACX,KAAK;EACP;EAEA,MAAM,eAAoD;GACxD,SAAS;GACT,WAAW;GACX,KAAK;EACP;;uBAIE,YAiCyB,MAAA,sBAAA,GAAA;IAhCtB,IAAI,QAAA;IACJ,MAAM,YAAY,QAAA,OAAO,KAAK;IAC9B,UAAU,QAAA;;2BAKJ,CAJP,mBAIO,QAAA,MAAA;KAHL,mBAAwE,QAAxE,YAAwE,gBAA/C,aAAa,QAAA,OAAO,KAAK,KAAI,IAAI,SAAO,CAAA;qBAAO,MACxE,gBAAG,QAAA,OAAO,KAAK,KAAK,IAAG,KACvB,CAAA;+BAAA,mBAA8B,QAAA,EAAxB,OAAM,UAAS,GAAC,KAAC,EAAA;;;OAGR,QAAA,OAAO,KAAK,SAAI,gBAA6B,QAAA,OAAO,KAAK,UAAU,QAAA,OAAO,KAAK,SAAiB,QAAA,OAAO,KAAK,SAAS,QAAA,OAAO,KAAK,QAAA;UAK/I;sBAUM,CATP,mBASO,QATP,YASO;KARL,YAE0C,MAAA,UAAA,GAAA;MADxC,eAAY;MACX,QAAQ,QAAA,OAAO,KAAK,UAAM;;KAC7B,mBAEO,QAFP,YAAsB,mBACP,gBAAG,QAAA,OAAO,KAAK,UAAM,KAAA,GAAA,CAAA;+BAEpC,mBAAwC,QAAA,EAAlC,OAAM,UAAS,GAAC,aAAW,EAAA;qBAAO,MACxC,gBAAG,QAAA,OAAO,KAAK,IAAI,GAAA,CAAA;;;OAIV,QAAA,OAAO,KAAK,cAAA;UACtB;sBAC8C,CAAA,OAAA,OAAA,OAAA,KAA/C,mBAA+C,QAAA,EAAzC,OAAM,UAAS,GAAC,oBAAkB,EAAA,IAAA,gBAAO,MAC/C,gBAAG,QAAA,OAAO,KAAK,WAAW,GAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"SearchResult.vue.script.js","names":[],"sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\nimport type { FuseData } from '@/v2/features/search/types'\n\ndefineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n}>()\n\nconst { translate } = useLocalization()\n\n/**\n * Icon used for each search result type. Operations use the terminal glyph to\n * match the sidebar's operation indicator, tags and headings use their closest\n * semantic equivalents.\n */\nconst ENTRY_ICONS: { [x in FuseData['type']]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n}\n\nconst ENTRY_LABELS = computed(() => ({\n heading: translate('apiClient.searchResult.heading'),\n operation: translate('apiClient.searchResult.operation'),\n tag: translate('apiClient.searchResult.tag'),\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span>\n <span class=\"sr-only\">{{ ENTRY_LABELS[result.item.type] }}:&nbsp;</span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type === 'operation' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\"\n >{{ translate('apiClient.searchResult.httpMethod') }}\n {{ result.item.method ?? 'get' }}\n </span>\n <span class=\"sr-only\">{{\n translate('apiClient.searchResult.path')\n }}</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">{{\n translate('apiClient.searchResult.description')\n }}</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAqBA,MAAM,EAAE,cAAc,gBAAgB;;;;;;EAOtC,MAAM,cAAgE;GACpE,SAAS;GACT,WAAW;GACX,KAAK;EACP;EAEA,MAAM,eAAe,gBAAgB;GACnC,SAAS,UAAU,gCAAgC;GACnD,WAAW,UAAU,kCAAkC;GACvD,KAAK,UAAU,4BAA4B;EAC7C,EAAE;;uBAIA,YAsCyB,MAAA,sBAAA,GAAA;IArCtB,IAAI,QAAA;IACJ,MAAM,YAAY,QAAA,OAAO,KAAK;IAC9B,UAAU,QAAA;;2BAKJ,CAJP,mBAIO,QAAA,MAAA;KAHL,mBAAwE,QAAxE,YAAwE,gBAA/C,aAAA,MAAa,QAAA,OAAO,KAAK,KAAI,IAAI,SAAO,CAAA;qBAAO,MACxE,gBAAG,QAAA,OAAO,KAAK,KAAK,IAAG,KACvB,CAAA;+BAAA,mBAA8B,QAAA,EAAxB,OAAM,UAAS,GAAC,KAAC,EAAA;;;OAGR,QAAA,OAAO,KAAK,SAAI,gBAA6B,QAAA,OAAO,KAAK,UAAU,QAAA,OAAO,KAAK,SAAiB,QAAA,OAAO,KAAK,SAAS,QAAA,OAAO,KAAK,QAAA;UAK/I;sBAaM,CAZP,mBAYO,QAZP,YAYO;KAXL,YAE0C,MAAA,UAAA,GAAA;MADxC,eAAY;MACX,QAAQ,QAAA,OAAO,KAAK,UAAM;;KAC7B,mBAGO,QAHP,YAGO,gBAFD,MAAA,SAAA,CAAS,CAAA,mCAAA,CAAA,IAAwC,MACrD,gBAAG,QAAA,OAAO,KAAK,UAAM,KAAA,GAAA,CAAA;KAEvB,mBAES,QAFT,YAES,gBADP,MAAA,SAAA,CAAS,CAAA,6BAAA,CAAA,GAAA,CAAA;qBACF,MACT,gBAAG,QAAA,OAAO,KAAK,IAAI,GAAA,CAAA;;;OAIV,QAAA,OAAO,KAAK,cAAA;UACtB;sBAGQ,CAFT,mBAES,QAFT,YAES,gBADP,MAAA,SAAA,CAAS,CAAA,oCAAA,CAAA,GAAA,CAAA,GAAA,gBACF,MACT,gBAAG,QAAA,OAAO,KAAK,WAAW,GAAA,CAAA,CAAA,CAAA"}
@@ -1,4 +1,3 @@
1
- import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
1
  /**
3
2
  * Generates a unique string ID for an API location, based on the document, path, method, and example.
4
3
  * Filters out undefined values and serializes the composite array into a stable string.
@@ -13,7 +12,7 @@ import type { HttpMethod } from '@scalar/helpers/http/http-methods';
13
12
  export declare const generateLocationId: ({ document, path, method, example, isWebhook, }: {
14
13
  document: string;
15
14
  path?: string;
16
- method?: HttpMethod;
15
+ method?: string;
17
16
  example?: string;
18
17
  /** Namespace webhook entries without changing existing operation IDs. */
19
18
  isWebhook?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"generate-location-id.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/generate-location-id.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAI,iDAMhC;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,yEAAyE;IACzE,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,WAEA,CAAA"}
1
+ {"version":3,"file":"generate-location-id.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/generate-location-id.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAI,iDAMhC;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,yEAAyE;IACzE,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,WAEA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"generate-location-id.js","names":[],"sources":["../../../src/v2/helpers/generate-location-id.ts"],"sourcesContent":["import { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\n\n/**\n * Generates a unique string ID for an API location, based on the document, path, method, and example.\n * Filters out undefined values and serializes the composite array into a stable string.\n *\n * @param params - An object containing document, path, method, and optional example name.\n * @returns A stringified array representing the unique location identifier.\n *\n * Example:\n * generateLocationId({ document: 'mydoc', path: '/users', method: 'get', example: 'default' })\n * // => '[\"mydoc\",\"/users\",\"get\",\"default\"]'\n */\nexport const generateLocationId = ({\n document,\n path,\n method,\n example,\n isWebhook = false,\n}: {\n document: string\n path?: string\n method?: HttpMethod\n example?: string\n /** Namespace webhook entries without changing existing operation IDs. */\n isWebhook?: boolean\n}) => {\n return JSON.stringify([document, isWebhook ? 'webhook' : undefined, path, method, example].filter(isDefined))\n}\n"],"mappings":";;;;;;;;;;;;;AAcA,IAAa,sBAAsB,EACjC,UACA,MACA,QACA,SACA,YAAY,YAQR;CACJ,OAAO,KAAK,UAAU;EAAC;EAAU,YAAY,YAAY,KAAA;EAAW;EAAM;EAAQ;CAAO,CAAC,CAAC,OAAO,SAAS,CAAC;AAC9G"}
1
+ {"version":3,"file":"generate-location-id.js","names":[],"sources":["../../../src/v2/helpers/generate-location-id.ts"],"sourcesContent":["import { isDefined } from '@scalar/helpers/array/is-defined'\n\n/**\n * Generates a unique string ID for an API location, based on the document, path, method, and example.\n * Filters out undefined values and serializes the composite array into a stable string.\n *\n * @param params - An object containing document, path, method, and optional example name.\n * @returns A stringified array representing the unique location identifier.\n *\n * Example:\n * generateLocationId({ document: 'mydoc', path: '/users', method: 'get', example: 'default' })\n * // => '[\"mydoc\",\"/users\",\"get\",\"default\"]'\n */\nexport const generateLocationId = ({\n document,\n path,\n method,\n example,\n isWebhook = false,\n}: {\n document: string\n path?: string\n method?: string\n example?: string\n /** Namespace webhook entries without changing existing operation IDs. */\n isWebhook?: boolean\n}) => {\n return JSON.stringify([document, isWebhook ? 'webhook' : undefined, path, method, example].filter(isDefined))\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,IAAa,sBAAsB,EACjC,UACA,MACA,QACA,SACA,YAAY,YAQR;CACJ,OAAO,KAAK,UAAU;EAAC;EAAU,YAAY,YAAY,KAAA;EAAW;EAAM;EAAQ;CAAO,CAAC,CAAC,OAAO,SAAS,CAAC;AAC9G"}
@@ -5,7 +5,7 @@ import type { CaptureOAuth2Callback } from '../../v2/blocks/scalar-auth-selector
5
5
  /**
6
6
  * Configuration options for the API Client (app and modal).
7
7
  */
8
- export type ApiClientOptions = Partial<Pick<ApiReferenceConfigurationRaw, 'authentication' | 'baseServerURL' | 'hideClientButton' | 'hiddenClients' | 'oauth2RedirectUri' | 'proxyUrl' | 'servers'>> & {
8
+ export type ApiClientOptions = Partial<Pick<ApiReferenceConfigurationRaw, 'authentication' | 'baseServerURL' | 'hideClientButton' | 'hiddenClients' | 'oauth2RedirectUri' | 'localization' | 'proxyUrl' | 'servers'>> & {
9
9
  /**
10
10
  * Custom fetch implementation used for all outgoing API requests.
11
11
  * When provided, replaces the global fetch in the request execution engine (sendRequest).
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/v2/types/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AACnF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAA;AAEjG;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CACpC,IAAI,CACF,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,UAAU,GACV,SAAS,CACZ,CACF,GAAG;IACF;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;CAC9C,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,gBAAgB,CAAC,CAAA"}
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/v2/types/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AACnF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAA;AAEjG;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CACpC,IAAI,CACF,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,cAAc,GACd,UAAU,GACV,SAAS,CACZ,CACF,GAAG;IACF;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;CAC9C,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,gBAAgB,CAAC,CAAA"}
@@ -16,10 +16,10 @@ type Hooks = {
16
16
  * @param store The WorkspaceStore instance
17
17
  * @param hooks Object containing optional before/after hooks for each event
18
18
  */
19
- export declare function initializeWorkspaceEventHandlers({ eventBus, store, hooks, }: {
19
+ export declare function initializeWorkspaceEventHandlers({ eventBus: bus, store, hooks, }: {
20
20
  eventBus: WorkspaceEventBus;
21
21
  store: Ref<WorkspaceStore | null>;
22
22
  hooks: Hooks;
23
- }): void;
23
+ }): () => void;
24
24
  export {};
25
25
  //# sourceMappingURL=workspace-events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-events.d.ts","sourceRoot":"","sources":["../../src/v2/workspace-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAkB,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAE3G,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,KAAK,CAAA;AAExC,KAAK,IAAI,CAAC,CAAC,SAAS,MAAM,kBAAkB,IAAI,OAAO,CAAC;IACtD,eAAe,EAAE,CACf,OAAO,EAAE,kBAAkB,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OAAO,CAAC,IAAI,CAAC,CAAA;CACzE,CAAC,CAAA;AAEF,KAAK,KAAK,GAAG;KACV,GAAG,IAAI,MAAM,kBAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC;CAC9C,CAAA;AA6BD;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EAAE,GAAG,EACb,KAAK,EACL,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,KAAK,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACjC,KAAK,EAAE,KAAK,CAAA;CACb,GAAG,MAAM,IAAI,CA+Ub"}
@@ -28,7 +28,13 @@ var withHook = (event, fn, hooks) => {
28
28
  * @param store The WorkspaceStore instance
29
29
  * @param hooks Object containing optional before/after hooks for each event
30
30
  */
31
- function initializeWorkspaceEventHandlers({ eventBus, store, hooks }) {
31
+ function initializeWorkspaceEventHandlers({ eventBus: bus, store, hooks }) {
32
+ const subscriptions = [];
33
+ const eventBus = { on: (event, listener) => {
34
+ const unsubscribe = bus.on(event, listener);
35
+ subscriptions.push(unsubscribe);
36
+ return unsubscribe;
37
+ } };
32
38
  const mutators = computed(() => generateClientMutators(store.value));
33
39
  /**
34
40
  * Returns the appropriate mutators depending on the collectionType.
@@ -108,6 +114,7 @@ function initializeWorkspaceEventHandlers({ eventBus, store, hooks }) {
108
114
  eventBus.on("tabs:navigate:next", (payload) => withHook("tabs:navigate:next", mutators.value.workspace().tabs.navigateNextTab, hooks)(payload));
109
115
  eventBus.on("tabs:update:tabs", (payload) => withHook("tabs:update:tabs", mutators.value.workspace().tabs.updateTabs, hooks)(payload));
110
116
  eventBus.on("hooks:on:request:complete", (payload) => withHook("hooks:on:request:complete", mutators.value.active().operation.addResponseToHistory, hooks)(payload));
117
+ return () => subscriptions.splice(0).forEach((unsubscribe) => unsubscribe());
111
118
  }
112
119
  //#endregion
113
120
  export { initializeWorkspaceEventHandlers };
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-events.js","names":[],"sources":["../../src/v2/workspace-events.ts"],"sourcesContent":["import type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { ApiReferenceEvents, CollectionType, WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { generateClientMutators } from '@scalar/workspace-store/mutators'\nimport { type Ref, computed } from 'vue'\n\ntype Hook<T extends keyof ApiReferenceEvents> = Partial<{\n onBeforeExecute: (\n payload: ApiReferenceEvents[T],\n ) => void | Promise<void> | ApiReferenceEvents[T] | Promise<ApiReferenceEvents[T]>\n onAfterExecute: (payload: ApiReferenceEvents[T]) => void | Promise<void>\n}>\n\ntype Hooks = {\n [key in keyof ApiReferenceEvents]?: Hook<key>\n}\n\n/**\n * Wraps a given function with optional before/after execution hooks for a specific event.\n * - Calls onBeforeExecute hook before executing the main function.\n * - Calls onAfterExecute hook after executing the main function.\n *\n * @template T The event key from ApiReferenceEvents\n * @param event The event name\n * @param fn The main function to execute\n * @param hooks The hooks object containing before/after hooks for events\n * @returns An async function that runs hooks around the main function\n */\nconst withHook = <T extends keyof ApiReferenceEvents>(\n event: T,\n fn: (args: ApiReferenceEvents[T]) => unknown | Promise<unknown>,\n hooks: Hooks,\n) => {\n return async (args: ApiReferenceEvents[T]) => {\n // Call the before execution hook for this event, if any\n const result = (await hooks[event]?.onBeforeExecute?.(args)) ?? args\n // Execute the main function\n await fn(result)\n // Call the after execution hook for this event, if any\n await hooks[event]?.onAfterExecute?.(result)\n return result\n }\n}\n\n/**\n * Initializes all Workspace Event Handlers by subscribing eventBus listeners\n * to each relevant mutator operation. Hooks are used for before/after execution.\n *\n * @param eventBus The WorkspaceEventBus to subscribe to\n * @param store The WorkspaceStore instance\n * @param hooks Object containing optional before/after hooks for each event\n */\nexport function initializeWorkspaceEventHandlers({\n eventBus,\n store,\n hooks,\n}: {\n eventBus: WorkspaceEventBus\n store: Ref<WorkspaceStore | null>\n hooks: Hooks\n}) {\n // Generate all client mutators for the current workspace store\n const mutators = computed(() => generateClientMutators(store.value))\n\n /**\n * Returns the appropriate mutators depending on the collectionType.\n * If collectionType is 'document', gets the active document mutator,\n * otherwise, gets the workspace mutator.\n */\n const getMutators = ({ collectionType }: CollectionType) => {\n if (collectionType === 'document') {\n return mutators.value.active()\n }\n return mutators.value.workspace()\n }\n\n //------------------------------------------------------------------------------------\n // Workspace Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('workspace:update:active-proxy', (payload) =>\n withHook('workspace:update:active-proxy', mutators.value.workspace().workspace.updateActiveProxy, hooks)(payload),\n )\n eventBus.on('workspace:update:color-mode', (payload) =>\n withHook('workspace:update:color-mode', mutators.value.workspace().workspace.updateColorMode, hooks)(payload),\n )\n eventBus.on('workspace:update:theme', (payload) =>\n withHook('workspace:update:theme', mutators.value.workspace().workspace.updateTheme, hooks)(payload),\n )\n eventBus.on('workspace:update:selected-client', (payload) =>\n withHook(\n 'workspace:update:selected-client',\n mutators.value.workspace().workspace.updateSelectedClient,\n hooks,\n )(payload),\n )\n eventBus.on('workspace:update:selected-example', (payload) =>\n withHook(\n 'workspace:update:selected-example',\n mutators.value.workspace().workspace.updateSelectedExample,\n hooks,\n )(payload),\n )\n eventBus.on('workspace:update:active-environment', (payload) =>\n withHook(\n 'workspace:update:active-environment',\n mutators.value.workspace().workspace.updateActiveEnvironment,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Document Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('document:update:extension', (payload) =>\n withHook('document:update:extension', mutators.value.active().document.updateDocumentExtension, hooks)(payload),\n )\n eventBus.on('document:update:icon', (payload) =>\n withHook('document:update:icon', mutators.value.active().document.updateDocumentIcon, hooks)(payload),\n )\n eventBus.on('document:update:info', (payload) =>\n withHook('document:update:info', mutators.value.active().document.updateDocumentInfo, hooks)(payload),\n )\n eventBus.on('document:update:watch-mode', (payload) =>\n withHook('document:update:watch-mode', mutators.value.active().document.updateWatchMode, hooks)(payload),\n )\n eventBus.on('document:create:empty-document', (payload) =>\n withHook('document:create:empty-document', mutators.value.active().document.createEmptyDocument, hooks)(payload),\n )\n eventBus.on('document:delete:document', (payload) =>\n withHook('document:delete:document', mutators.value.active().document.deleteDocument, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Environment Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('environment:upsert:environment', (payload) =>\n withHook('environment:upsert:environment', getMutators(payload).environment.upsertEnvironment, hooks)(payload),\n )\n eventBus.on('environment:delete:environment', (payload) =>\n withHook('environment:delete:environment', getMutators(payload).environment.deleteEnvironment, hooks)(payload),\n )\n eventBus.on('environment:upsert:environment-variable', (payload) =>\n withHook(\n 'environment:upsert:environment-variable',\n getMutators(payload).environment.upsertEnvironmentVariable,\n hooks,\n )(payload),\n )\n eventBus.on('environment:delete:environment-variable', (payload) =>\n withHook(\n 'environment:delete:environment-variable',\n getMutators(payload).environment.deleteEnvironmentVariable,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Cookie Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('cookie:upsert:cookie', async (payload) => {\n await withHook('cookie:upsert:cookie', getMutators(payload).cookie.upsertCookie, hooks)(payload)\n })\n eventBus.on('cookie:delete:cookie', async (payload) => {\n await withHook('cookie:delete:cookie', getMutators(payload).cookie.deleteCookie, hooks)(payload)\n })\n\n //------------------------------------------------------------------------------------\n // Auth Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('auth:delete:security-scheme', (payload) =>\n withHook('auth:delete:security-scheme', mutators.value.active().auth.deleteSecurityScheme, hooks)(payload),\n )\n eventBus.on('auth:update:active-index', (payload) =>\n withHook('auth:update:active-index', mutators.value.active().auth.updateSelectedAuthTab, hooks)(payload),\n )\n eventBus.on('auth:update:security-scheme', (payload) =>\n withHook('auth:update:security-scheme', mutators.value.active().auth.updateSecurityScheme, hooks)(payload),\n )\n eventBus.on('auth:update:selected-scopes', (payload) =>\n withHook('auth:update:selected-scopes', mutators.value.active().auth.updateSelectedScopes, hooks)(payload),\n )\n eventBus.on('auth:upsert:scopes', (payload) =>\n withHook('auth:upsert:scopes', mutators.value.active().auth.upsertScope, hooks)(payload),\n )\n eventBus.on('auth:delete:scopes', (payload) =>\n withHook('auth:delete:scopes', mutators.value.active().auth.deleteScope, hooks)(payload),\n )\n eventBus.on('auth:update:selected-security-schemes', (payload) =>\n withHook(\n 'auth:update:selected-security-schemes',\n mutators.value.active().auth.updateSelectedSecuritySchemes,\n hooks,\n )(payload),\n )\n eventBus.on('auth:clear:selected-security-schemes', (payload) =>\n withHook(\n 'auth:clear:selected-security-schemes',\n mutators.value.active().auth.clearSelectedSecuritySchemes,\n hooks,\n )(payload),\n )\n eventBus.on('auth:update:security-scheme-secrets', (payload) =>\n withHook(\n 'auth:update:security-scheme-secrets',\n mutators.value.active().auth.updateSecuritySchemeSecrets,\n hooks,\n )(payload),\n )\n eventBus.on('auth:clear:security-scheme-secrets', (payload) =>\n withHook(\n 'auth:clear:security-scheme-secrets',\n mutators.value.active().auth.clearSecuritySchemeSecrets,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Server Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('server:initialize:servers', (payload) =>\n withHook('server:initialize:servers', mutators.value.active().server.initializeServers, hooks)(payload),\n )\n eventBus.on('server:add:server', (payload) =>\n withHook('server:add:server', mutators.value.active().server.addServer, hooks)(payload),\n )\n eventBus.on('server:update:server', (payload) =>\n withHook('server:update:server', mutators.value.active().server.updateServer, hooks)(payload),\n )\n eventBus.on('server:delete:server', (payload) =>\n withHook('server:delete:server', mutators.value.active().server.deleteServer, hooks)(payload),\n )\n eventBus.on('server:clear:servers', (payload) =>\n withHook('server:clear:servers', mutators.value.active().server.clearServers, hooks)(payload),\n )\n eventBus.on('server:update:variables', (payload) =>\n withHook('server:update:variables', mutators.value.active().server.updateServerVariables, hooks)(payload),\n )\n eventBus.on('server:update:selected', (payload) =>\n withHook('server:update:selected', mutators.value.active().server.updateSelectedServer, hooks)(payload),\n )\n eventBus.on('asyncapi-server:update:selected', (payload) =>\n withHook(\n 'asyncapi-server:update:selected',\n mutators.value.active().server.updateSelectedAsyncApiServer,\n hooks,\n )(payload),\n )\n eventBus.on('asyncapi-server:update:variables', (payload) =>\n withHook(\n 'asyncapi-server:update:variables',\n mutators.value.active().server.updateAsyncApiServerVariables,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Operation Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('operation:create:operation', (payload) =>\n withHook('operation:create:operation', mutators.value.active().operation.createOperation, hooks)(payload),\n )\n eventBus.on('operation:update:pathMethod', (payload) =>\n withHook(\n 'operation:update:pathMethod',\n mutators.value.active().operation.updateOperationPathMethod,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:meta', (payload) =>\n withHook('operation:update:meta', mutators.value.active().operation.updateOperationMeta, hooks)(payload),\n )\n eventBus.on('operation:delete:operation', (payload) =>\n withHook('operation:delete:operation', mutators.value.active().operation.deleteOperation, hooks)(payload),\n )\n eventBus.on('operation:create:draft-example', (payload) =>\n withHook(\n 'operation:create:draft-example',\n mutators.value.active().operation.createOperationDraftExample,\n hooks,\n )(payload),\n )\n eventBus.on('operation:delete:example', (payload) =>\n withHook('operation:delete:example', mutators.value.active().operation.deleteOperationExample, hooks)(payload),\n )\n eventBus.on('operation:rename:example', (payload) =>\n withHook('operation:rename:example', mutators.value.active().operation.renameOperationExample, hooks)(payload),\n )\n eventBus.on('operation:upsert:parameter', (payload) =>\n withHook('operation:upsert:parameter', mutators.value.active().operation.upsertOperationParameter, hooks)(payload),\n )\n eventBus.on('operation:update:extra-parameters', (payload) =>\n withHook(\n 'operation:update:extra-parameters',\n mutators.value.active().operation.updateOperationExtraParameters,\n hooks,\n )(payload),\n )\n eventBus.on('operation:delete:parameter', (payload) =>\n withHook('operation:delete:parameter', mutators.value.active().operation.deleteOperationParameter, hooks)(payload),\n )\n eventBus.on('operation:delete-all:parameters', (payload) =>\n withHook(\n 'operation:delete-all:parameters',\n mutators.value.active().operation.deleteAllOperationParameters,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:extension', (payload) =>\n withHook('operation:update:extension', mutators.value.active().operation.updateOperationExtension, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Operation Request Body Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('operation:update:requestBody:contentType', (payload) =>\n withHook(\n 'operation:update:requestBody:contentType',\n mutators.value.active().operation.updateOperationRequestBodyContentType,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:requestBody:value', (payload) =>\n withHook(\n 'operation:update:requestBody:value',\n mutators.value.active().operation.updateOperationRequestBodyExample,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:requestBody:formValue', (payload) =>\n withHook(\n 'operation:update:requestBody:formValue',\n mutators.value.active().operation.updateOperationRequestBodyFormValue,\n hooks,\n )(payload),\n )\n eventBus.on('operation:reload:history', (payload) =>\n withHook('operation:reload:history', mutators.value.active().operation.reloadOperationHistory, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Tag Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tag:create:tag', (payload) =>\n withHook('tag:create:tag', mutators.value.active().tag.createTag, hooks)(payload),\n )\n eventBus.on('tag:edit:tag', (payload) =>\n withHook('tag:edit:tag', mutators.value.active().tag.editTag, hooks)(payload),\n )\n eventBus.on('tag:delete:tag', (payload) =>\n withHook('tag:delete:tag', mutators.value.active().tag.deleteTag, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Tabs Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tabs:add:tab', (payload) =>\n withHook('tabs:add:tab', mutators.value.workspace().tabs.addTab, hooks)(payload),\n )\n eventBus.on('tabs:close:tab', (payload) =>\n withHook('tabs:close:tab', mutators.value.workspace().tabs.closeTab, hooks)(payload),\n )\n eventBus.on('tabs:close:other-tabs', (payload) =>\n withHook('tabs:close:other-tabs', mutators.value.workspace().tabs.closeOtherTabs, hooks)(payload),\n )\n eventBus.on('tabs:focus:tab', (payload) =>\n withHook('tabs:focus:tab', mutators.value.workspace().tabs.focusTab, hooks)(payload),\n )\n eventBus.on('tabs:focus:tab-last', (payload) =>\n withHook('tabs:focus:tab-last', mutators.value.workspace().tabs.focusLastTab, hooks)(payload),\n )\n eventBus.on('tabs:navigate:previous', (payload) =>\n withHook('tabs:navigate:previous', mutators.value.workspace().tabs.navigatePreviousTab, hooks)(payload),\n )\n eventBus.on('tabs:navigate:next', (payload) =>\n withHook('tabs:navigate:next', mutators.value.workspace().tabs.navigateNextTab, hooks)(payload),\n )\n eventBus.on('tabs:update:tabs', (payload) =>\n withHook('tabs:update:tabs', mutators.value.workspace().tabs.updateTabs, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Hooks Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('hooks:on:request:complete', (payload) =>\n withHook('hooks:on:request:complete', mutators.value.active().operation.addResponseToHistory, hooks)(payload),\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AA2BA,IAAM,YACJ,OACA,IACA,UACG;CACH,OAAO,OAAO,SAAgC;EAE5C,MAAM,SAAU,MAAM,MAAM,MAAM,EAAE,kBAAkB,IAAI,KAAM;EAEhE,MAAM,GAAG,MAAM;EAEf,MAAM,MAAM,MAAM,EAAE,iBAAiB,MAAM;EAC3C,OAAO;CACT;AACF;;;;;;;;;AAUA,SAAgB,iCAAiC,EAC/C,UACA,OACA,SAKC;CAED,MAAM,WAAW,eAAe,uBAAuB,MAAM,KAAK,CAAC;;;;;;CAOnE,MAAM,eAAe,EAAE,qBAAqC;EAC1D,IAAI,mBAAmB,YACrB,OAAO,SAAS,MAAM,OAAO;EAE/B,OAAO,SAAS,MAAM,UAAU;CAClC;CAKA,SAAS,GAAG,kCAAkC,YAC5C,SAAS,iCAAiC,SAAS,MAAM,UAAU,CAAC,CAAC,UAAU,mBAAmB,KAAK,CAAC,CAA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AAG,qBAAqB,YAC/B,SAAS,oBAAoB,SAAS,MAAM,UAAU,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,OAAO,CACzF;CAKA,SAAS,GAAG,8BAA8B,YACxC,SAAS,6BAA6B,SAAS,MAAM,OAAO,CAAC,CAAC,UAAU,sBAAsB,KAAK,CAAC,CAAC,OAAO,CAC9G;AACF"}
1
+ {"version":3,"file":"workspace-events.js","names":[],"sources":["../../src/v2/workspace-events.ts"],"sourcesContent":["import type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { ApiReferenceEvents, CollectionType, WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { generateClientMutators } from '@scalar/workspace-store/mutators'\nimport { type Ref, computed } from 'vue'\n\ntype Hook<T extends keyof ApiReferenceEvents> = Partial<{\n onBeforeExecute: (\n payload: ApiReferenceEvents[T],\n ) => void | Promise<void> | ApiReferenceEvents[T] | Promise<ApiReferenceEvents[T]>\n onAfterExecute: (payload: ApiReferenceEvents[T]) => void | Promise<void>\n}>\n\ntype Hooks = {\n [key in keyof ApiReferenceEvents]?: Hook<key>\n}\n\n/**\n * Wraps a given function with optional before/after execution hooks for a specific event.\n * - Calls onBeforeExecute hook before executing the main function.\n * - Calls onAfterExecute hook after executing the main function.\n *\n * @template T The event key from ApiReferenceEvents\n * @param event The event name\n * @param fn The main function to execute\n * @param hooks The hooks object containing before/after hooks for events\n * @returns An async function that runs hooks around the main function\n */\nconst withHook = <T extends keyof ApiReferenceEvents>(\n event: T,\n fn: (args: ApiReferenceEvents[T]) => unknown | Promise<unknown>,\n hooks: Hooks,\n) => {\n return async (args: ApiReferenceEvents[T]) => {\n // Call the before execution hook for this event, if any\n const result = (await hooks[event]?.onBeforeExecute?.(args)) ?? args\n // Execute the main function\n await fn(result)\n // Call the after execution hook for this event, if any\n await hooks[event]?.onAfterExecute?.(result)\n return result\n }\n}\n\n/**\n * Initializes all Workspace Event Handlers by subscribing eventBus listeners\n * to each relevant mutator operation. Hooks are used for before/after execution.\n *\n * @param eventBus The WorkspaceEventBus to subscribe to\n * @param store The WorkspaceStore instance\n * @param hooks Object containing optional before/after hooks for each event\n */\nexport function initializeWorkspaceEventHandlers({\n eventBus: bus,\n store,\n hooks,\n}: {\n eventBus: WorkspaceEventBus\n store: Ref<WorkspaceStore | null>\n hooks: Hooks\n}): () => void {\n const subscriptions: (() => void)[] = []\n const eventBus: Pick<WorkspaceEventBus, 'on'> = {\n on: (event, listener) => {\n const unsubscribe = bus.on(event, listener)\n subscriptions.push(unsubscribe)\n return unsubscribe\n },\n }\n // Generate all client mutators for the current workspace store\n const mutators = computed(() => generateClientMutators(store.value))\n\n /**\n * Returns the appropriate mutators depending on the collectionType.\n * If collectionType is 'document', gets the active document mutator,\n * otherwise, gets the workspace mutator.\n */\n const getMutators = ({ collectionType }: CollectionType) => {\n if (collectionType === 'document') {\n return mutators.value.active()\n }\n return mutators.value.workspace()\n }\n\n //------------------------------------------------------------------------------------\n // Workspace Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('workspace:update:active-proxy', (payload) =>\n withHook('workspace:update:active-proxy', mutators.value.workspace().workspace.updateActiveProxy, hooks)(payload),\n )\n eventBus.on('workspace:update:color-mode', (payload) =>\n withHook('workspace:update:color-mode', mutators.value.workspace().workspace.updateColorMode, hooks)(payload),\n )\n eventBus.on('workspace:update:theme', (payload) =>\n withHook('workspace:update:theme', mutators.value.workspace().workspace.updateTheme, hooks)(payload),\n )\n eventBus.on('workspace:update:selected-client', (payload) =>\n withHook(\n 'workspace:update:selected-client',\n mutators.value.workspace().workspace.updateSelectedClient,\n hooks,\n )(payload),\n )\n eventBus.on('workspace:update:selected-example', (payload) =>\n withHook(\n 'workspace:update:selected-example',\n mutators.value.workspace().workspace.updateSelectedExample,\n hooks,\n )(payload),\n )\n eventBus.on('workspace:update:active-environment', (payload) =>\n withHook(\n 'workspace:update:active-environment',\n mutators.value.workspace().workspace.updateActiveEnvironment,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Document Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('document:update:extension', (payload) =>\n withHook('document:update:extension', mutators.value.active().document.updateDocumentExtension, hooks)(payload),\n )\n eventBus.on('document:update:icon', (payload) =>\n withHook('document:update:icon', mutators.value.active().document.updateDocumentIcon, hooks)(payload),\n )\n eventBus.on('document:update:info', (payload) =>\n withHook('document:update:info', mutators.value.active().document.updateDocumentInfo, hooks)(payload),\n )\n eventBus.on('document:update:watch-mode', (payload) =>\n withHook('document:update:watch-mode', mutators.value.active().document.updateWatchMode, hooks)(payload),\n )\n eventBus.on('document:create:empty-document', (payload) =>\n withHook('document:create:empty-document', mutators.value.active().document.createEmptyDocument, hooks)(payload),\n )\n eventBus.on('document:delete:document', (payload) =>\n withHook('document:delete:document', mutators.value.active().document.deleteDocument, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Environment Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('environment:upsert:environment', (payload) =>\n withHook('environment:upsert:environment', getMutators(payload).environment.upsertEnvironment, hooks)(payload),\n )\n eventBus.on('environment:delete:environment', (payload) =>\n withHook('environment:delete:environment', getMutators(payload).environment.deleteEnvironment, hooks)(payload),\n )\n eventBus.on('environment:upsert:environment-variable', (payload) =>\n withHook(\n 'environment:upsert:environment-variable',\n getMutators(payload).environment.upsertEnvironmentVariable,\n hooks,\n )(payload),\n )\n eventBus.on('environment:delete:environment-variable', (payload) =>\n withHook(\n 'environment:delete:environment-variable',\n getMutators(payload).environment.deleteEnvironmentVariable,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Cookie Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('cookie:upsert:cookie', async (payload) => {\n await withHook('cookie:upsert:cookie', getMutators(payload).cookie.upsertCookie, hooks)(payload)\n })\n eventBus.on('cookie:delete:cookie', async (payload) => {\n await withHook('cookie:delete:cookie', getMutators(payload).cookie.deleteCookie, hooks)(payload)\n })\n\n //------------------------------------------------------------------------------------\n // Auth Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('auth:delete:security-scheme', (payload) =>\n withHook('auth:delete:security-scheme', mutators.value.active().auth.deleteSecurityScheme, hooks)(payload),\n )\n eventBus.on('auth:update:active-index', (payload) =>\n withHook('auth:update:active-index', mutators.value.active().auth.updateSelectedAuthTab, hooks)(payload),\n )\n eventBus.on('auth:update:security-scheme', (payload) =>\n withHook('auth:update:security-scheme', mutators.value.active().auth.updateSecurityScheme, hooks)(payload),\n )\n eventBus.on('auth:update:selected-scopes', (payload) =>\n withHook('auth:update:selected-scopes', mutators.value.active().auth.updateSelectedScopes, hooks)(payload),\n )\n eventBus.on('auth:upsert:scopes', (payload) =>\n withHook('auth:upsert:scopes', mutators.value.active().auth.upsertScope, hooks)(payload),\n )\n eventBus.on('auth:delete:scopes', (payload) =>\n withHook('auth:delete:scopes', mutators.value.active().auth.deleteScope, hooks)(payload),\n )\n eventBus.on('auth:update:selected-security-schemes', (payload) =>\n withHook(\n 'auth:update:selected-security-schemes',\n mutators.value.active().auth.updateSelectedSecuritySchemes,\n hooks,\n )(payload),\n )\n eventBus.on('auth:clear:selected-security-schemes', (payload) =>\n withHook(\n 'auth:clear:selected-security-schemes',\n mutators.value.active().auth.clearSelectedSecuritySchemes,\n hooks,\n )(payload),\n )\n eventBus.on('auth:update:security-scheme-secrets', (payload) =>\n withHook(\n 'auth:update:security-scheme-secrets',\n mutators.value.active().auth.updateSecuritySchemeSecrets,\n hooks,\n )(payload),\n )\n eventBus.on('auth:clear:security-scheme-secrets', (payload) =>\n withHook(\n 'auth:clear:security-scheme-secrets',\n mutators.value.active().auth.clearSecuritySchemeSecrets,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Server Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('server:initialize:servers', (payload) =>\n withHook('server:initialize:servers', mutators.value.active().server.initializeServers, hooks)(payload),\n )\n eventBus.on('server:add:server', (payload) =>\n withHook('server:add:server', mutators.value.active().server.addServer, hooks)(payload),\n )\n eventBus.on('server:update:server', (payload) =>\n withHook('server:update:server', mutators.value.active().server.updateServer, hooks)(payload),\n )\n eventBus.on('server:delete:server', (payload) =>\n withHook('server:delete:server', mutators.value.active().server.deleteServer, hooks)(payload),\n )\n eventBus.on('server:clear:servers', (payload) =>\n withHook('server:clear:servers', mutators.value.active().server.clearServers, hooks)(payload),\n )\n eventBus.on('server:update:variables', (payload) =>\n withHook('server:update:variables', mutators.value.active().server.updateServerVariables, hooks)(payload),\n )\n eventBus.on('server:update:selected', (payload) =>\n withHook('server:update:selected', mutators.value.active().server.updateSelectedServer, hooks)(payload),\n )\n eventBus.on('asyncapi-server:update:selected', (payload) =>\n withHook(\n 'asyncapi-server:update:selected',\n mutators.value.active().server.updateSelectedAsyncApiServer,\n hooks,\n )(payload),\n )\n eventBus.on('asyncapi-server:update:variables', (payload) =>\n withHook(\n 'asyncapi-server:update:variables',\n mutators.value.active().server.updateAsyncApiServerVariables,\n hooks,\n )(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Operation Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('operation:create:operation', (payload) =>\n withHook('operation:create:operation', mutators.value.active().operation.createOperation, hooks)(payload),\n )\n eventBus.on('operation:update:pathMethod', (payload) =>\n withHook(\n 'operation:update:pathMethod',\n mutators.value.active().operation.updateOperationPathMethod,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:meta', (payload) =>\n withHook('operation:update:meta', mutators.value.active().operation.updateOperationMeta, hooks)(payload),\n )\n eventBus.on('operation:delete:operation', (payload) =>\n withHook('operation:delete:operation', mutators.value.active().operation.deleteOperation, hooks)(payload),\n )\n eventBus.on('operation:create:draft-example', (payload) =>\n withHook(\n 'operation:create:draft-example',\n mutators.value.active().operation.createOperationDraftExample,\n hooks,\n )(payload),\n )\n eventBus.on('operation:delete:example', (payload) =>\n withHook('operation:delete:example', mutators.value.active().operation.deleteOperationExample, hooks)(payload),\n )\n eventBus.on('operation:rename:example', (payload) =>\n withHook('operation:rename:example', mutators.value.active().operation.renameOperationExample, hooks)(payload),\n )\n eventBus.on('operation:upsert:parameter', (payload) =>\n withHook('operation:upsert:parameter', mutators.value.active().operation.upsertOperationParameter, hooks)(payload),\n )\n eventBus.on('operation:update:extra-parameters', (payload) =>\n withHook(\n 'operation:update:extra-parameters',\n mutators.value.active().operation.updateOperationExtraParameters,\n hooks,\n )(payload),\n )\n eventBus.on('operation:delete:parameter', (payload) =>\n withHook('operation:delete:parameter', mutators.value.active().operation.deleteOperationParameter, hooks)(payload),\n )\n eventBus.on('operation:delete-all:parameters', (payload) =>\n withHook(\n 'operation:delete-all:parameters',\n mutators.value.active().operation.deleteAllOperationParameters,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:extension', (payload) =>\n withHook('operation:update:extension', mutators.value.active().operation.updateOperationExtension, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Operation Request Body Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('operation:update:requestBody:contentType', (payload) =>\n withHook(\n 'operation:update:requestBody:contentType',\n mutators.value.active().operation.updateOperationRequestBodyContentType,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:requestBody:value', (payload) =>\n withHook(\n 'operation:update:requestBody:value',\n mutators.value.active().operation.updateOperationRequestBodyExample,\n hooks,\n )(payload),\n )\n eventBus.on('operation:update:requestBody:formValue', (payload) =>\n withHook(\n 'operation:update:requestBody:formValue',\n mutators.value.active().operation.updateOperationRequestBodyFormValue,\n hooks,\n )(payload),\n )\n eventBus.on('operation:reload:history', (payload) =>\n withHook('operation:reload:history', mutators.value.active().operation.reloadOperationHistory, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Tag Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tag:create:tag', (payload) =>\n withHook('tag:create:tag', mutators.value.active().tag.createTag, hooks)(payload),\n )\n eventBus.on('tag:edit:tag', (payload) =>\n withHook('tag:edit:tag', mutators.value.active().tag.editTag, hooks)(payload),\n )\n eventBus.on('tag:delete:tag', (payload) =>\n withHook('tag:delete:tag', mutators.value.active().tag.deleteTag, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Tabs Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('tabs:add:tab', (payload) =>\n withHook('tabs:add:tab', mutators.value.workspace().tabs.addTab, hooks)(payload),\n )\n eventBus.on('tabs:close:tab', (payload) =>\n withHook('tabs:close:tab', mutators.value.workspace().tabs.closeTab, hooks)(payload),\n )\n eventBus.on('tabs:close:other-tabs', (payload) =>\n withHook('tabs:close:other-tabs', mutators.value.workspace().tabs.closeOtherTabs, hooks)(payload),\n )\n eventBus.on('tabs:focus:tab', (payload) =>\n withHook('tabs:focus:tab', mutators.value.workspace().tabs.focusTab, hooks)(payload),\n )\n eventBus.on('tabs:focus:tab-last', (payload) =>\n withHook('tabs:focus:tab-last', mutators.value.workspace().tabs.focusLastTab, hooks)(payload),\n )\n eventBus.on('tabs:navigate:previous', (payload) =>\n withHook('tabs:navigate:previous', mutators.value.workspace().tabs.navigatePreviousTab, hooks)(payload),\n )\n eventBus.on('tabs:navigate:next', (payload) =>\n withHook('tabs:navigate:next', mutators.value.workspace().tabs.navigateNextTab, hooks)(payload),\n )\n eventBus.on('tabs:update:tabs', (payload) =>\n withHook('tabs:update:tabs', mutators.value.workspace().tabs.updateTabs, hooks)(payload),\n )\n\n //------------------------------------------------------------------------------------\n // Hooks Related Event Handlers\n //------------------------------------------------------------------------------------\n eventBus.on('hooks:on:request:complete', (payload) =>\n withHook('hooks:on:request:complete', mutators.value.active().operation.addResponseToHistory, hooks)(payload),\n )\n return () => subscriptions.splice(0).forEach((unsubscribe) => unsubscribe())\n}\n"],"mappings":";;;;;;;;;;;;;;AA2BA,IAAM,YACJ,OACA,IACA,UACG;CACH,OAAO,OAAO,SAAgC;EAE5C,MAAM,SAAU,MAAM,MAAM,MAAM,EAAE,kBAAkB,IAAI,KAAM;EAEhE,MAAM,GAAG,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