@scalar/api-client 2.6.1 → 2.8.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 (271) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/README.md +1 -1
  3. package/dist/analytics.d.ts +2 -18
  4. package/dist/analytics.d.ts.map +1 -1
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +66 -42
  8. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  9. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  10. package/dist/components/DataTable/DataTableInputSelect.vue.js +21 -22
  11. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  12. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +4 -5
  13. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  14. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  15. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +13 -14
  16. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  17. package/dist/components/Sidebar/SidebarButton.vue.js +0 -1
  18. package/dist/hooks/useAnalytics.d.ts +2 -18
  19. package/dist/hooks/useAnalytics.d.ts.map +1 -1
  20. package/dist/hooks/useClientConfig.d.ts +114 -120
  21. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  22. package/dist/hooks/useResponseBody.js +6 -6
  23. package/dist/layouts/App/create-api-client-app.d.ts +1379 -1307
  24. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  25. package/dist/layouts/Modal/create-api-client-modal.d.ts +2754 -2610
  26. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  27. package/dist/layouts/Web/create-api-client-web.d.ts +1379 -1307
  28. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  29. package/dist/libs/create-client.d.ts +1379 -1307
  30. package/dist/libs/create-client.d.ts.map +1 -1
  31. package/dist/libs/find-request.d.ts +17 -17
  32. package/dist/libs/find-request.d.ts.map +1 -1
  33. package/dist/libs/hot-keys.d.ts +1 -1
  34. package/dist/libs/local-storage.d.ts.map +1 -1
  35. package/dist/libs/send-request/build-request-security.d.ts +1 -1
  36. package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
  37. package/dist/libs/send-request/create-request-operation.d.ts +2 -2
  38. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  39. package/dist/libs/send-request/create-request-operation.js +19 -19
  40. package/dist/libs/send-request/create-request-operation.test.d.ts +82 -82
  41. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  42. package/dist/plugins/plugin-manager.d.ts +3 -3
  43. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  44. package/dist/store/active-entities.d.ts +118 -118
  45. package/dist/store/active-entities.d.ts.map +1 -1
  46. package/dist/store/collections.d.ts +127 -127
  47. package/dist/store/collections.d.ts.map +1 -1
  48. package/dist/store/cookies.d.ts +14 -14
  49. package/dist/store/environment.d.ts +23 -23
  50. package/dist/store/request-example.d.ts +546 -546
  51. package/dist/store/request-example.d.ts.map +1 -1
  52. package/dist/store/requests.d.ts +194 -194
  53. package/dist/store/requests.d.ts.map +1 -1
  54. package/dist/store/security-schemes.d.ts +281 -281
  55. package/dist/store/security-schemes.d.ts.map +1 -1
  56. package/dist/store/servers.d.ts +45 -45
  57. package/dist/store/servers.d.ts.map +1 -1
  58. package/dist/store/store.d.ts +1379 -1307
  59. package/dist/store/store.d.ts.map +1 -1
  60. package/dist/store/store.js +18 -18
  61. package/dist/store/tags.d.ts +35 -35
  62. package/dist/store/tags.d.ts.map +1 -1
  63. package/dist/store/workspace.d.ts +47 -47
  64. package/dist/store/workspace.d.ts.map +1 -1
  65. package/dist/style.css +1 -1
  66. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
  67. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +2 -3
  68. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts +2 -0
  69. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts.map +1 -0
  70. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.d.ts +25 -0
  71. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.d.ts.map +1 -0
  72. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +30 -0
  73. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue2.js +4 -0
  74. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  75. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +3 -3
  76. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +104 -98
  77. package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +16 -14
  78. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +31 -2
  79. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +6 -1
  80. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
  81. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +198 -131
  82. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +2 -0
  83. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +1 -0
  84. package/dist/v2/blocks/operation-code-sample/index.d.ts +4 -1
  85. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  86. package/dist/v2/blocks/operation-code-sample/index.js +10 -4
  87. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  88. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  89. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +31 -32
  90. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -6
  91. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  92. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +2 -0
  93. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +1 -0
  94. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +39 -0
  95. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -0
  96. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +7 -0
  97. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +226 -0
  98. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +66 -0
  99. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -0
  100. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +7 -0
  101. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +200 -0
  102. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +2 -0
  103. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +1 -0
  104. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +51 -0
  105. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -0
  106. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +89 -0
  107. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue2.js +4 -0
  108. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +2 -0
  109. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +1 -0
  110. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +46 -0
  111. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -0
  112. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +7 -0
  113. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +85 -0
  114. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +2 -0
  115. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +1 -0
  116. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +43 -0
  117. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -0
  118. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +193 -0
  119. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue2.js +4 -0
  120. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +2 -0
  121. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +1 -0
  122. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts +8 -0
  123. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts.map +1 -0
  124. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.js +7 -0
  125. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue2.js +62 -0
  126. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +2 -0
  127. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +1 -0
  128. package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts +5 -0
  129. package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts.map +1 -0
  130. package/dist/v2/blocks/scalar-operation-block/helpers/files.js +7 -0
  131. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts +8 -0
  132. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts.map +1 -0
  133. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.js +9 -0
  134. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +2 -0
  135. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts +6 -0
  137. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts.map +1 -0
  138. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.js +12 -0
  139. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +2 -0
  140. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +1 -0
  141. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts +6 -0
  142. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts.map +1 -0
  143. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.js +6 -0
  144. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +2 -0
  145. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +1 -0
  146. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts +3 -0
  147. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts.map +1 -0
  148. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.js +5 -0
  149. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts +5 -0
  150. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts.map +1 -0
  151. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.js +7 -0
  152. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +2 -0
  153. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +1 -0
  154. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts +11 -0
  155. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts.map +1 -0
  156. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.js +32 -0
  157. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +2 -0
  158. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +1 -0
  159. package/dist/v2/blocks/scalar-operation-block/index.d.ts +2 -0
  160. package/dist/v2/blocks/scalar-operation-block/index.d.ts.map +1 -0
  161. package/dist/v2/blocks/scalar-operation-block/index.js +4 -0
  162. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +2 -0
  163. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +1 -0
  164. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +20 -0
  165. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -0
  166. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +98 -0
  167. package/dist/v2/blocks/scalar-response-block/components/Headers.vue2.js +4 -0
  168. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +2 -0
  169. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +1 -0
  170. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +47 -0
  171. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -0
  172. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +7 -0
  173. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +182 -0
  174. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts +12 -0
  175. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -0
  176. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +7 -0
  177. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +88 -0
  178. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +2 -0
  179. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +1 -0
  180. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts +8 -0
  181. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -0
  182. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.js +36 -0
  183. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue2.js +4 -0
  184. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts +13 -0
  185. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts.map +1 -0
  186. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.js +14 -0
  187. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +2 -0
  188. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +1 -0
  189. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts +10 -0
  190. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -0
  191. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.js +7 -0
  192. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue2.js +64 -0
  193. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts +8 -0
  194. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -0
  195. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.js +7 -0
  196. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue2.js +41 -0
  197. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +2 -0
  198. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +1 -0
  199. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts +6 -0
  200. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -0
  201. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +74 -0
  202. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue2.js +4 -0
  203. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts +10 -0
  204. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -0
  205. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.js +25 -0
  206. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue2.js +4 -0
  207. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts +11 -0
  208. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -0
  209. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +52 -0
  210. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue3.js +5 -0
  211. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +2 -0
  212. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +1 -0
  213. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts +9 -0
  214. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -0
  215. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +54 -0
  216. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue2.js +4 -0
  217. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts +23 -0
  218. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts.map +1 -0
  219. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.js +7 -0
  220. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue2.js +88 -0
  221. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts +8 -0
  222. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -0
  223. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.js +7 -0
  224. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue2.js +41 -0
  225. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts +10 -0
  226. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -0
  227. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.js +61 -0
  228. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue2.js +4 -0
  229. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts +5 -0
  230. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts.map +1 -0
  231. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.js +18 -0
  232. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +2 -0
  233. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +1 -0
  234. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts +4 -0
  235. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts.map +1 -0
  236. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.js +12 -0
  237. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +2 -0
  238. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +1 -0
  239. package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts +20 -0
  240. package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts.map +1 -0
  241. package/dist/v2/blocks/scalar-response-block/helpers/media-types.js +127 -0
  242. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +2 -0
  243. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +1 -0
  244. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts +17 -0
  245. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts.map +1 -0
  246. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.js +16 -0
  247. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +2 -0
  248. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +1 -0
  249. package/dist/v2/blocks/scalar-response-block/index.d.ts +2 -0
  250. package/dist/v2/blocks/scalar-response-block/index.d.ts.map +1 -0
  251. package/dist/v2/blocks/scalar-response-block/index.js +4 -0
  252. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +54 -54
  253. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  254. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  255. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +31 -32
  256. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +54 -54
  257. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  258. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  259. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  260. package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -1
  261. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  262. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  263. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +13 -14
  264. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  265. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  266. package/dist/views/Request/components/WorkspaceDropdown.vue.js +5 -6
  267. package/dist/views/Request/libs/auth.d.ts +2 -2
  268. package/dist/views/Request/libs/watch-mode.d.ts +4 -4
  269. package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
  270. package/dist/views/Request/libs/watch-mode.js +241 -186
  271. package/package.json +21 -16
@@ -1 +1 @@
1
- {"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/ExamplePicker.vue"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAGnG,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;CACvC,CAAC;AAwBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;;;;;;AA0GF,wBAOG"}
1
+ {"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/ExamplePicker.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAGnG,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;CACvC,CAAC;AAwBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;;;;;;AAwGF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as u, mergeModels as c, useModel as p, computed as n, createBlock as f, openBlock as x, unref as l, withCtx as r, createVNode as i, createElementVNode as v, toDisplayString as w } from "vue";
2
2
  import { ScalarListbox as V, ScalarButton as b } from "@scalar/components";
3
3
  import { ScalarIconCaretDown as g } from "@scalar/icons";
4
- const h = { class: "min-w-0 flex-1 truncate" }, k = /* @__PURE__ */ u({
4
+ const _ = { class: "min-w-0 flex-1 truncate" }, k = /* @__PURE__ */ u({
5
5
  __name: "ExamplePicker",
6
6
  props: /* @__PURE__ */ c({
7
7
  examples: { default: () => ({}) }
@@ -33,11 +33,10 @@ const h = { class: "min-w-0 flex-1 truncate" }, k = /* @__PURE__ */ u({
33
33
  i(l(b), {
34
34
  class: "text-c-2 hover:text-c-1 flex h-full w-fit min-w-0 gap-1.5 px-1.5 py-0.75 text-base font-normal",
35
35
  "data-testid": "example-picker",
36
- fullWidth: "",
37
36
  variant: "ghost"
38
37
  }, {
39
38
  default: r(() => [
40
- v("div", h, w(a.value?.label ?? "Select an example"), 1),
39
+ v("div", _, w(a.value?.label ?? "Select an example"), 1),
41
40
  i(l(g), {
42
41
  class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
43
42
  weight: "bold"
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=HttpMethod.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpMethod.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/HttpMethod.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
+ import { type Component } from 'vue';
3
+ type __VLS_Props = {
4
+ /** The type of element to render as, defaults to `span` */
5
+ as?: Component | string;
6
+ /** The css style property or variable that will be set to the request method color, defaults to `color` */
7
+ property?: string;
8
+ /** Whether or not to abbreviated the slot content */
9
+ short?: boolean;
10
+ /** The HTTP method to show */
11
+ method: HttpMethod | string;
12
+ };
13
+ declare var __VLS_6: {};
14
+ type __VLS_Slots = {} & {
15
+ default?: (props: typeof __VLS_6) => any;
16
+ };
17
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
25
+ //# sourceMappingURL=HttpMethod.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/HttpMethod.vue"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAE9C,KAAK,WAAW,GAAG;IACjB,2DAA2D;IAC3D,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACvB,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,8BAA8B;IAC9B,MAAM,EAAE,UAAU,GAAG,MAAM,CAAA;CAC5B,CAAC;AAqCF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAqB/C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { defineComponent as a, computed as r, createBlock as s, openBlock as l, resolveDynamicComponent as m, normalizeStyle as d, withCtx as c, renderSlot as h, createTextVNode as i, toDisplayString as u } from "vue";
2
+ import { getHttpMethodInfo as f } from "@scalar/helpers/http/http-info";
3
+ import { normalizeHttpMethod as y } from "@scalar/helpers/http/normalize-http-method";
4
+ const z = /* @__PURE__ */ a({
5
+ __name: "HttpMethod",
6
+ props: {
7
+ as: {},
8
+ property: {},
9
+ short: { type: Boolean },
10
+ method: {}
11
+ },
12
+ setup(p) {
13
+ const t = p, e = r(
14
+ () => f(String(t.method || ""))
15
+ ), n = r(() => y(t.method));
16
+ return (o, v) => (l(), s(m(o.as ?? "span"), {
17
+ class: "uppercase",
18
+ style: d({ [o.property || "color"]: e.value.colorVar })
19
+ }, {
20
+ default: c(() => [
21
+ h(o.$slots, "default"),
22
+ i(" " + u(o.short ? e.value.short : n.value), 1)
23
+ ]),
24
+ _: 3
25
+ }, 8, ["style"]));
26
+ }
27
+ });
28
+ export {
29
+ z as default
30
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./HttpMethod.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"OperationCodeSample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/OperationCodeSample.vue"],"names":[],"mappings":"AA6dA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,kBAAkB,CAAA;AAGvE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AASrE,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,yCAAyC,CAAA;AAKhD,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,eAAe,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;;YAkBO,MAAM,OAAO;YACb,MAAM,OAAO;;AAlBvB,wBAuiBC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"OperationCodeSample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/OperationCodeSample.vue"],"names":[],"mappings":"AA4eA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,kBAAkB,CAAA;AAGvE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AASrE,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,yCAAyC,CAAA;AAKhD,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,eAAe,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;;YAkBO,MAAM,OAAO;YACb,MAAM,OAAO;;AAlBvB,wBA6jBC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./OperationCodeSample.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ a(o, [["__scopeId", "data-v-ab4718a0"]]);
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-549ec320"]]);
5
5
  export {
6
- e as default
6
+ a as default
7
7
  };
@@ -1,21 +1,21 @@
1
- import { defineComponent as L, computed as r, ref as k, watch as D, useId as I, createBlock as h, createCommentVNode as m, openBlock as i, unref as o, withCtx as n, createVNode as s, createSlots as M, createElementVNode as v, createElementBlock as S, renderSlot as y, toDisplayString as N } from "vue";
2
- import { ScalarCard as q, ScalarCardHeader as R, ScalarCombobox as z, ScalarButton as K, ScalarCardSection as E, ScalarCodeBlock as F, ScalarCardFooter as U } from "@scalar/components";
3
- import { freezeElement as A } from "@scalar/helpers/dom/freeze-element";
4
- import { ScalarIconCaretDown as G } from "@scalar/icons";
5
- import { emitCustomEvent as T } from "@scalar/workspace-store/events";
6
- import { getResolvedRef as J } from "@scalar/workspace-store/helpers/get-resolved-ref";
7
- import { operationToHar as P } from "../helpers/operation-to-har/operation-to-har.js";
8
- import { findClient as B } from "../helpers/find-client.js";
1
+ import { defineComponent as D, computed as n, ref as C, watch as N, useId as R, createBlock as i, createCommentVNode as f, openBlock as s, unref as o, withCtx as r, createVNode as u, createSlots as z, createElementVNode as g, createElementBlock as S, renderSlot as y, createTextVNode as K, toDisplayString as M } from "vue";
2
+ import { ScalarCard as T, ScalarCardHeader as U, ScalarCombobox as A, ScalarButton as F, ScalarCardSection as q, ScalarCodeBlock as Z, ScalarVirtualText as G, ScalarCardFooter as J } from "@scalar/components";
3
+ import { freezeElement as P } from "@scalar/helpers/dom/freeze-element";
4
+ import { ScalarIconCaretDown as Q } from "@scalar/icons";
5
+ import { emitCustomEvent as V } from "@scalar/workspace-store/events";
6
+ import { getResolvedRef as X } from "@scalar/workspace-store/helpers/get-resolved-ref";
7
+ import { operationToHar as Y } from "../helpers/operation-to-har/operation-to-har.js";
8
+ import E from "./HttpMethod.vue.js";
9
+ import { findClient as O } from "../helpers/find-client.js";
9
10
  import { generateCustomId as $ } from "../helpers/generate-client-options.js";
10
- import { generateCodeSnippet as Q } from "../helpers/generate-code-snippet.js";
11
- import { getSecrets as X } from "../helpers/get-secrets.js";
12
- import Y from "./ExamplePicker.vue.js";
13
- import j from "../../../../components/HttpMethod/HttpMethod.vue.js";
14
- const Z = ["innerHTML"], _ = { class: "text-base font-normal" }, ee = ["id"], te = {
11
+ import { generateCodeSnippet as _ } from "../helpers/generate-code-snippet.js";
12
+ import { getSecrets as ee } from "../helpers/get-secrets.js";
13
+ import te from "./ExamplePicker.vue.js";
14
+ const le = ["innerHTML"], oe = ["id"], ae = {
15
15
  key: 0,
16
16
  class: "request-card-footer-addon"
17
- }, le = { class: "request-header" }, oe = {}, ye = /* @__PURE__ */ L({
18
- ...oe,
17
+ }, ne = { class: "request-header" }, re = {}, Ce = /* @__PURE__ */ D({
18
+ ...re,
19
19
  __name: "OperationCodeSample",
20
20
  props: {
21
21
  clientOptions: {},
@@ -32,57 +32,57 @@ const Z = ["innerHTML"], _ = { class: "text-base font-normal" }, ee = ["id"], te
32
32
  isWebhook: { type: Boolean }
33
33
  },
34
34
  setup(l) {
35
- const c = r(() => {
36
- const e = J(l.operation.requestBody)?.content ?? {}, t = l.selectedContentType || Object.keys(e)[0];
35
+ const d = n(() => {
36
+ const e = X(l.operation.requestBody)?.content ?? {}, t = l.selectedContentType || Object.keys(e)[0];
37
37
  return t ? e[t]?.examples ?? {} : {};
38
- }), f = k(
39
- l.selectedExample ?? Object.keys(c.value)[0] ?? ""
40
- ), C = r(() => [
38
+ }), p = C(
39
+ l.selectedExample ?? Object.keys(d.value)[0] ?? ""
40
+ ), b = n(() => [
41
41
  "x-custom-examples",
42
42
  "x-codeSamples",
43
43
  "x-code-samples"
44
- ].flatMap((t) => l.operation[t] ?? [])), p = r(() => C.value.length ? [
44
+ ].flatMap((t) => l.operation[t] ?? [])), h = n(() => b.value.length ? [
45
45
  {
46
46
  label: "Code Examples",
47
- options: C.value.map((t) => {
48
- const a = $(t), x = t.label || t.lang || a;
47
+ options: b.value.map((t) => {
48
+ const a = $(t), k = t.label || t.lang || a;
49
49
  return {
50
50
  id: a,
51
51
  lang: t.lang || "plaintext",
52
- title: x,
53
- label: x
52
+ title: k,
53
+ label: k
54
54
  };
55
55
  })
56
56
  },
57
57
  ...l.clientOptions
58
- ] : l.clientOptions), u = k(
59
- B(p.value, l.selectedClient)
58
+ ] : l.clientOptions), c = C(
59
+ O(h.value, l.selectedClient)
60
60
  );
61
- D(
61
+ N(
62
62
  () => l.selectedClient,
63
63
  (e) => {
64
- const t = B(p.value, e);
65
- t && (u.value = t);
64
+ const t = O(h.value, e);
65
+ t && (c.value = t);
66
66
  }
67
67
  );
68
- const b = r(() => {
68
+ const x = n(() => {
69
69
  if (!l.isWebhook) return null;
70
70
  try {
71
- return P({
71
+ return Y({
72
72
  operation: l.operation,
73
73
  method: l.method,
74
74
  path: l.path,
75
- example: f.value
75
+ example: p.value
76
76
  });
77
77
  } catch (e) {
78
78
  return console.error("[webhookHar]", e), null;
79
79
  }
80
- }), g = r(() => {
80
+ }), v = n(() => {
81
81
  try {
82
- const e = u.value?.id;
83
- return e ? e.startsWith("custom") ? C.value.find(
84
- (t) => $(t) === u.value?.id
85
- )?.source ?? "Custom example not found" : l.isWebhook ? b.value?.postData?.text ?? "" : Q({
82
+ const e = c.value?.id;
83
+ return e ? e.startsWith("custom") ? b.value.find(
84
+ (t) => $(t) === c.value?.id
85
+ )?.source ?? "Custom example not found" : l.isWebhook ? x.value?.postData?.text ?? "" : _({
86
86
  clientId: e,
87
87
  operation: l.operation,
88
88
  method: l.method,
@@ -90,68 +90,67 @@ const Z = ["innerHTML"], _ = { class: "text-base font-normal" }, ee = ["id"], te
90
90
  securitySchemes: l.securitySchemes,
91
91
  contentType: l.selectedContentType,
92
92
  path: l.path,
93
- example: f.value
93
+ example: p.value
94
94
  }) : "";
95
95
  } catch (e) {
96
96
  return console.error("[generateSnippet]", e), "";
97
97
  }
98
- }), O = r(() => l.isWebhook ? V.value : u.value?.lang), V = r(() => {
99
- if (!b.value?.postData) return "json";
100
- const e = b.value.postData.mimeType;
98
+ }), B = n(() => l.isWebhook ? j.value : c.value?.lang), j = n(() => {
99
+ if (!x.value?.postData) return "json";
100
+ const e = x.value.postData.mimeType;
101
101
  return e?.includes("json") ? "json" : e?.includes("xml") ? "xml" : e?.includes("yaml") || e?.includes("yml") ? "yaml" : e?.includes("text/plain") ? "text" : "json";
102
- }), w = r(() => X(l.securitySchemes)), d = k(null), W = (e) => {
103
- if (d.value) {
104
- const t = A(d.value.$el);
102
+ }), w = n(() => ee(l.securitySchemes)), m = C(null), H = (e) => {
103
+ if (m.value) {
104
+ const t = P(m.value.$el);
105
105
  setTimeout(() => {
106
106
  t();
107
107
  }, 300);
108
108
  }
109
- u.value = e, e.id.startsWith("custom") || T(d.value?.$el, "scalar-update-selected-client", e.id);
110
- }, H = I();
111
- return (e, t) => g.value ? (i(), h(o(q), {
109
+ c.value = e, e.id.startsWith("custom") || V(m.value?.$el, "scalar-update-selected-client", e.id);
110
+ }, L = 3e4, I = n(() => (v.value.length ?? 0) > L), W = R();
111
+ return (e, t) => v.value ? (s(), i(o(T), {
112
112
  key: 0,
113
113
  ref_key: "elem",
114
- ref: d,
114
+ ref: m,
115
115
  class: "request-card dark-mode"
116
116
  }, {
117
- default: n(() => [
118
- s(o(R), { class: "pr-2.5" }, M({
119
- default: n(() => [
120
- t[3] || (t[3] = v("span", { class: "sr-only" }, "Request Example for", -1)),
121
- s(o(j), {
117
+ default: r(() => [
118
+ u(o(U), { class: "pr-2.5" }, z({
119
+ default: r(() => [
120
+ t[3] || (t[3] = g("span", { class: "sr-only" }, "Request Example for", -1)),
121
+ u(E, {
122
122
  as: "span",
123
123
  class: "request-method",
124
124
  method: e.method
125
125
  }, null, 8, ["method"]),
126
- e.generateLabel ? (i(), S("span", {
126
+ e.generateLabel ? (s(), S("span", {
127
127
  key: 0,
128
128
  innerHTML: e.generateLabel()
129
- }, null, 8, Z)) : m("", !0),
129
+ }, null, 8, le)) : f("", !0),
130
130
  y(e.$slots, "header", {}, void 0, !0)
131
131
  ]),
132
132
  _: 2
133
133
  }, [
134
- !e.isWebhook && p.value.length ? {
134
+ !e.isWebhook && h.value.length ? {
135
135
  name: "actions",
136
- fn: n(() => [
137
- s(o(z), {
136
+ fn: r(() => [
137
+ u(o(A), {
138
138
  class: "max-h-80",
139
- modelValue: u.value,
140
- options: p.value,
139
+ modelValue: c.value,
140
+ options: h.value,
141
141
  placement: "bottom-end",
142
142
  teleport: "",
143
- "onUpdate:modelValue": t[0] || (t[0] = (a) => W(a))
143
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => H(a))
144
144
  }, {
145
- default: n(() => [
146
- s(o(K), {
147
- class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5",
145
+ default: r(() => [
146
+ u(o(F), {
147
+ class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5 py-0 text-base font-normal",
148
148
  "data-testid": "client-picker",
149
- fullWidth: "",
150
149
  variant: "ghost"
151
150
  }, {
152
- default: n(() => [
153
- v("span", _, N(u.value?.title), 1),
154
- s(o(G), {
151
+ default: r(() => [
152
+ K(M(c.value?.title) + " ", 1),
153
+ u(o(Q), {
155
154
  class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
156
155
  weight: "bold"
157
156
  })
@@ -165,58 +164,65 @@ const Z = ["innerHTML"], _ = { class: "text-base font-normal" }, ee = ["id"], te
165
164
  key: "0"
166
165
  } : void 0
167
166
  ]), 1024),
168
- s(o(E), { class: "request-editor-section custom-scroll p-0" }, {
169
- default: n(() => [
170
- v("div", {
171
- id: `${o(H)}-example`,
167
+ u(o(q), { class: "request-editor-section custom-scroll p-0" }, {
168
+ default: r(() => [
169
+ g("div", {
170
+ id: `${o(W)}-example`,
172
171
  class: "code-snippet"
173
172
  }, [
174
- s(o(F), {
173
+ I.value ? (s(), i(o(G), {
174
+ key: 1,
175
+ containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
176
+ contentClass: "language-plaintext whitespace-pre font-code text-base",
177
+ lineHeight: 20,
178
+ text: v.value
179
+ }, null, 8, ["text"])) : (s(), i(o(Z), {
180
+ key: 0,
175
181
  class: "bg-b-2 !min-h-full -outline-offset-2",
176
- content: g.value,
182
+ content: v.value,
177
183
  hideCredentials: w.value,
178
- lang: O.value,
184
+ lang: B.value,
179
185
  lineNumbers: ""
180
- }, null, 8, ["content", "hideCredentials", "lang"])
181
- ], 8, ee)
186
+ }, null, 8, ["content", "hideCredentials", "lang"]))
187
+ ], 8, oe)
182
188
  ]),
183
189
  _: 1
184
190
  }),
185
- Object.keys(c.value).length > 1 || e.$slots.footer ? (i(), h(o(U), {
191
+ Object.keys(d.value).length > 1 || e.$slots.footer ? (s(), i(o(J), {
186
192
  key: 0,
187
193
  class: "request-card-footer bg-b-3"
188
194
  }, {
189
- default: n(() => [
190
- Object.keys(c.value).length > 1 ? (i(), S("div", te, [
191
- Object.keys(c.value).length ? (i(), h(Y, {
195
+ default: r(() => [
196
+ Object.keys(d.value).length > 1 ? (s(), S("div", ae, [
197
+ Object.keys(d.value).length ? (s(), i(te, {
192
198
  key: 0,
193
- modelValue: f.value,
199
+ modelValue: p.value,
194
200
  "onUpdate:modelValue": [
195
- t[1] || (t[1] = (a) => f.value = a),
196
- t[2] || (t[2] = (a) => o(T)(
197
- d.value?.$el,
201
+ t[1] || (t[1] = (a) => p.value = a),
202
+ t[2] || (t[2] = (a) => o(V)(
203
+ m.value?.$el,
198
204
  "scalar-update-selected-example",
199
205
  a
200
206
  ))
201
207
  ],
202
- examples: c.value
203
- }, null, 8, ["modelValue", "examples"])) : m("", !0)
204
- ])) : m("", !0),
208
+ examples: d.value
209
+ }, null, 8, ["modelValue", "examples"])) : f("", !0)
210
+ ])) : f("", !0),
205
211
  y(e.$slots, "footer", {}, void 0, !0)
206
212
  ]),
207
213
  _: 3
208
- })) : m("", !0)
214
+ })) : f("", !0)
209
215
  ]),
210
216
  _: 3
211
- }, 512)) : e.fallback ? (i(), h(o(q), {
217
+ }, 512)) : e.fallback ? (s(), i(o(T), {
212
218
  key: 1,
213
219
  class: "request-card dark-mode"
214
220
  }, {
215
- default: n(() => [
216
- s(o(E), { class: "request-card-simple" }, {
217
- default: n(() => [
218
- v("div", le, [
219
- s(o(j), {
221
+ default: r(() => [
222
+ u(o(q), { class: "request-card-simple" }, {
223
+ default: r(() => [
224
+ g("div", ne, [
225
+ u(E, {
220
226
  as: "span",
221
227
  class: "request-method",
222
228
  method: e.method
@@ -229,9 +235,9 @@ const Z = ["innerHTML"], _ = { class: "text-base font-normal" }, ee = ["id"], te
229
235
  })
230
236
  ]),
231
237
  _: 3
232
- })) : m("", !0);
238
+ })) : f("", !0);
233
239
  }
234
240
  });
235
241
  export {
236
- ye as default
242
+ Ce as default
237
243
  };
@@ -1,20 +1,22 @@
1
- const r = "shell/curl", p = (t, s) => {
2
- const f = t[0]?.options[0];
1
+ import { AVAILABLE_CLIENTS as f } from "@scalar/snippetz";
2
+ const c = "shell/curl", d = (o) => f.includes(o), u = (o, s) => {
3
+ const r = o[0]?.options[0];
3
4
  if (s)
4
- for (const n of t) {
5
- const o = n.options.find((i) => i.id === s);
6
- if (o)
7
- return o;
5
+ for (const i of o) {
6
+ const t = i.options.find((n) => n.id === s);
7
+ if (t)
8
+ return t;
8
9
  }
9
- if (!f?.id.startsWith("custom"))
10
- for (const n of t) {
11
- const o = n.options.find((i) => i.id === r);
12
- if (o)
13
- return o;
10
+ if (!r?.id.startsWith("custom"))
11
+ for (const i of o) {
12
+ const t = i.options.find((n) => n.id === c);
13
+ if (t)
14
+ return t;
14
15
  }
15
- return f;
16
+ return r;
16
17
  };
17
18
  export {
18
- r as DEFAULT_CLIENT,
19
- p as findClient
19
+ c as DEFAULT_CLIENT,
20
+ u as findClient,
21
+ d as isClient
20
22
  };
@@ -1,4 +1,33 @@
1
- const e = (t) => `custom/${t.lang}`;
1
+ import { snippetz as l } from "@scalar/snippetz";
2
+ import { capitalize as o } from "vue";
3
+ const y = (t) => `custom/${t.lang}`, m = (t) => t === !0 ? [] : l().clients().flatMap((e) => {
4
+ const n = e.clients.flatMap((r) => {
5
+ const c = `${e.key}/${r.client}`;
6
+ if (Array.isArray(t) && t.includes(r.client))
7
+ return [];
8
+ if (typeof t == "object" && t !== null) {
9
+ const i = t[e.key];
10
+ if (i === !0)
11
+ return [];
12
+ if (Array.isArray(i) && i.includes(r.client))
13
+ return [];
14
+ }
15
+ return {
16
+ id: c,
17
+ lang: r.client === "curl" ? "curl" : e.key,
18
+ title: `${o(e.title)} ${r.title}`,
19
+ label: r.title,
20
+ targetKey: e.key,
21
+ targetTitle: e.title,
22
+ clientKey: r.client
23
+ };
24
+ });
25
+ return n.length === 0 ? [] : {
26
+ label: e.title,
27
+ options: n
28
+ };
29
+ });
2
30
  export {
3
- e as generateCustomId
31
+ m as generateClientOptions,
32
+ y as generateCustomId
4
33
  };
@@ -25,5 +25,10 @@ export declare const getExampleFromSchema: (schema: SchemaObject, options?: {
25
25
  variables?: Record<string, unknown>;
26
26
  /** Whether to omit empty and optional properties. */
27
27
  omitEmptyAndOptionalProperties?: boolean;
28
- }, level?: number, parentSchema?: SchemaObject, name?: string) => unknown;
28
+ }, args?: Partial<{
29
+ level: number;
30
+ parentSchema: SchemaObject;
31
+ name: string;
32
+ seen: WeakSet<object>;
33
+ }>) => unknown;
29
34
  //# sourceMappingURL=get-example-from-schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AA8XhG;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,YAAY,EACpB,UAAU;IACR,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,qDAAqD;IACrD,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,EACD,QAAO,MAAU,EACjB,eAAe,YAAY,EAC3B,OAAO,MAAM,KACZ,OAkHF,CAAA"}
1
+ {"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AA+ahG;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,YAAY,EACpB,UAAU;IACR,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,qDAAqD;IACrD,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,EACD,OAAO,OAAO,CAAC;IACb,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;CACtB,CAAC,KACD,OAyJF,CAAA"}