@scalar/api-client 2.14.1 → 2.17.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 (293) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/dist/hooks/useResponseBody.js +6 -6
  3. package/dist/libs/errors.d.ts +1 -0
  4. package/dist/libs/errors.d.ts.map +1 -1
  5. package/dist/libs/errors.js +1 -0
  6. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  7. package/dist/libs/send-request/create-request-operation.js +41 -35
  8. package/dist/style.css +1 -1
  9. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +28 -38
  10. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +81 -65
  12. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -23
  13. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  14. package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
  15. package/dist/v2/blocks/operation-block/components/Header.vue2.js +29 -38
  16. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts +10 -0
  17. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -0
  18. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +22 -0
  19. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +31 -0
  20. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -0
  21. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +31 -0
  22. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +3 -9
  23. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  24. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +56 -0
  25. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +10 -3
  26. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
  27. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +46 -0
  28. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +45 -0
  29. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -0
  30. package/dist/v2/blocks/operation-block/helpers/build-request.js +66 -0
  31. package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +9 -0
  32. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts +16 -0
  33. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts.map +1 -0
  34. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +4 -0
  35. package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +17 -0
  36. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +9 -3
  37. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  38. package/dist/v2/blocks/operation-block/helpers/get-example.js +21 -0
  39. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +53 -0
  40. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -0
  41. package/dist/v2/blocks/operation-block/helpers/send-request.js +120 -0
  42. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts +1 -1
  43. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  45. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  46. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +89 -110
  47. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +2 -2
  48. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts.map +1 -1
  49. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +8 -13
  50. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts.map +1 -1
  51. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +22 -28
  52. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +19 -8
  53. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  54. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +30 -24
  55. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +12 -0
  56. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts.map +1 -0
  57. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +20 -0
  58. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts +10 -0
  59. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts.map +1 -0
  60. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +4 -0
  61. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +14 -12
  62. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
  63. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +191 -169
  64. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  65. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +10 -10
  66. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +2 -1
  67. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  68. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +15 -19
  69. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +2 -2
  70. package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -1
  71. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  72. package/dist/v2/blocks/operation-code-sample/types.d.ts +16 -0
  73. package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -1
  74. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +15 -10
  75. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  76. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  77. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +202 -160
  78. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +2 -0
  79. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  80. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  81. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +60 -51
  82. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +8 -0
  83. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -0
  84. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +127 -0
  85. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +4 -0
  86. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -2
  87. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  88. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +24 -23
  89. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -4
  90. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  91. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  92. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +3 -2
  93. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  94. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +146 -147
  95. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts +1 -0
  96. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
  97. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -1
  98. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +28 -27
  99. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
  100. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  101. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +21 -15
  102. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -2
  103. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
  104. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +13 -3
  105. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +4 -4
  106. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  107. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +3 -3
  108. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +41 -45
  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 +27 -27
  111. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -1
  112. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts +18 -0
  113. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts.map +1 -0
  114. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +12 -0
  115. package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -2
  116. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +4 -15
  117. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  118. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  119. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +117 -71
  120. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts +19 -0
  121. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts.map +1 -0
  122. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +24 -0
  123. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -2
  124. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  125. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +59 -56
  126. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  127. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  128. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -1
  129. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  130. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -24
  131. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -1
  132. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  133. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +44 -43
  134. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +4 -0
  135. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +7 -0
  137. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +4 -4
  138. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  139. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -2
  140. package/dist/v2/components/code-input/CodeInput.vue.d.ts +16 -6
  141. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  142. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  143. package/dist/v2/components/code-input/CodeInput.vue2.js +81 -65
  144. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +2 -2
  145. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
  146. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +44 -44
  147. package/dist/v2/components/resize/index.d.ts +0 -1
  148. package/dist/v2/components/resize/index.d.ts.map +1 -1
  149. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +9 -5
  150. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  151. package/dist/v2/components/sidebar/Sidebar.vue.js +51 -46
  152. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +1 -1
  153. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  154. package/dist/v2/features/app/App.vue.d.ts +3 -0
  155. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  156. package/dist/v2/features/app/App.vue.js +130 -143
  157. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +3 -3
  158. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  159. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  160. package/dist/v2/features/app/components/AppSidebar.vue2.js +216 -106
  161. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +1 -1
  162. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  163. package/dist/v2/features/app/components/ItemDecorator.vue.d.ts +22 -0
  164. package/dist/v2/features/app/components/ItemDecorator.vue.d.ts.map +1 -0
  165. package/dist/v2/features/app/components/ItemDecorator.vue.js +138 -0
  166. package/dist/v2/features/app/components/ItemDecorator.vue2.js +4 -0
  167. package/dist/v2/features/app/components/WebTopNav.vue.d.ts +1 -1
  168. package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
  169. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
  170. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  171. package/dist/v2/features/app/helpers/create-api-client-app.js +8 -8
  172. package/dist/v2/features/app/helpers/routes.d.ts +32 -6
  173. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  174. package/dist/v2/features/app/helpers/routes.js +25 -16
  175. package/dist/v2/{hooks/use-sidebar-state.d.ts → features/app/hooks/use-app-sidebar.d.ts} +10 -11
  176. package/dist/v2/features/app/hooks/use-app-sidebar.d.ts.map +1 -0
  177. package/dist/v2/{hooks/use-sidebar-state.js → features/app/hooks/use-app-sidebar.js} +19 -19
  178. package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +1 -0
  179. package/dist/v2/{hooks → features/app/hooks}/use-sync-path.d.ts +2 -2
  180. package/dist/v2/features/app/hooks/use-sync-path.d.ts.map +1 -0
  181. package/dist/v2/features/app/hooks/use-sync-path.js +52 -0
  182. package/dist/v2/{hooks → features/app/hooks}/use-tabs.d.ts +2 -2
  183. package/dist/v2/features/app/hooks/use-tabs.d.ts.map +1 -0
  184. package/dist/v2/{hooks → features/app/hooks}/use-tabs.js +1 -1
  185. package/dist/v2/{hooks/use-workspace-client-events.d.ts → features/app/hooks/use-workspace-client-app-events.d.ts} +5 -5
  186. package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +1 -0
  187. package/dist/v2/features/app/hooks/use-workspace-client-app-events.js +156 -0
  188. package/dist/v2/features/app/hooks/use-workspace-selector.d.ts.map +1 -0
  189. package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.js +1 -1
  190. package/dist/v2/features/collection/DocumentCollection.vue.js +92 -2
  191. package/dist/v2/features/collection/DocumentCollection.vue2.js +2 -91
  192. package/dist/v2/features/collection/WorkspaceCollection.vue.js +42 -2
  193. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +2 -41
  194. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  195. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  196. package/dist/v2/features/collection/components/Authentication.vue2.js +14 -12
  197. package/dist/v2/features/collection/components/Cookies.vue.js +30 -1
  198. package/dist/v2/features/collection/components/Cookies.vue2.js +1 -29
  199. package/dist/v2/features/collection/components/Environment.vue.js +32 -1
  200. package/dist/v2/features/collection/components/Environment.vue2.js +1 -31
  201. package/dist/v2/features/collection/components/Overview.vue2.js +5 -4
  202. package/dist/v2/features/collection/components/Servers.vue.js +142 -2
  203. package/dist/v2/features/collection/components/Servers.vue2.js +2 -141
  204. package/dist/v2/features/collection/components/Settings.vue.js +58 -2
  205. package/dist/v2/features/collection/components/Settings.vue2.js +2 -57
  206. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +8 -0
  207. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
  208. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +76 -68
  209. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +8 -0
  210. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
  211. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +83 -75
  212. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +4 -0
  213. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
  214. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +32 -34
  215. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +16 -0
  216. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  217. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +24 -21
  218. package/dist/v2/features/modal/Modal.vue.d.ts +23 -1
  219. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  220. package/dist/v2/features/modal/Modal.vue.js +1 -1
  221. package/dist/v2/features/modal/Modal.vue2.js +118 -31
  222. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +18 -32
  223. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  224. package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -26
  225. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +55 -0
  226. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -0
  227. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +29 -0
  228. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +42 -0
  229. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -0
  230. package/dist/v2/features/modal/hooks/use-modal-sidebar.js +93 -0
  231. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +18 -0
  232. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -0
  233. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +30 -0
  234. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  235. package/dist/v2/features/operation/Operation.vue.js +59 -28
  236. package/dist/v2/features/operation/helpers/get-operation-header.d.ts +17 -0
  237. package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +1 -0
  238. package/dist/v2/features/operation/helpers/get-operation-header.js +12 -0
  239. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +1 -1
  240. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -1
  241. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +7 -0
  242. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -0
  243. package/dist/v2/features/operation/helpers/get-selected-security.js +19 -0
  244. package/dist/v2/features/operation/index.d.ts +0 -1
  245. package/dist/v2/features/operation/index.d.ts.map +1 -1
  246. package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +1 -1
  247. package/dist/v2/features/search/components/SearchModal.vue.js +3 -3
  248. package/dist/v2/features/search/components/SearchModal.vue2.js +45 -44
  249. package/dist/v2/features/settings/DocumentSettings.vue.js +2 -2
  250. package/dist/v2/features/settings/DocumentSettings.vue2.js +1 -1
  251. package/dist/v2/helpers/generate-location-id.d.ts +19 -0
  252. package/dist/v2/helpers/generate-location-id.d.ts.map +1 -0
  253. package/dist/v2/helpers/generate-location-id.js +10 -0
  254. package/dist/v2/helpers/get-active-environment.d.ts +5 -0
  255. package/dist/v2/helpers/get-active-environment.d.ts.map +1 -0
  256. package/dist/v2/helpers/get-active-environment.js +22 -0
  257. package/dist/v2/helpers/get-tab-details.d.ts +2 -2
  258. package/dist/v2/helpers/get-tab-details.d.ts.map +1 -1
  259. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  260. package/dist/v2/helpers/plugins.d.ts +59 -0
  261. package/dist/v2/helpers/plugins.d.ts.map +1 -0
  262. package/dist/v2/helpers/plugins.js +11 -0
  263. package/dist/v2/helpers/storage.d.ts.map +1 -1
  264. package/dist/v2/helpers/storage.js +5 -5
  265. package/dist/v2/hooks/use-scroll-lock.d.ts +28 -0
  266. package/dist/v2/hooks/use-scroll-lock.d.ts.map +1 -0
  267. package/dist/v2/hooks/use-scroll-lock.js +21 -0
  268. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +2 -0
  269. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
  270. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -1
  271. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -1
  272. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
  273. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  274. package/package.json +19 -19
  275. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +0 -7
  276. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +0 -1
  277. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +0 -28
  278. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts +0 -6
  279. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts.map +0 -1
  280. package/dist/v2/blocks/request-block/helpers/get-parameter-example.js +0 -12
  281. package/dist/v2/hooks/use-document-watcher.d.ts.map +0 -1
  282. package/dist/v2/hooks/use-sidebar-state.d.ts.map +0 -1
  283. package/dist/v2/hooks/use-sync-path.d.ts.map +0 -1
  284. package/dist/v2/hooks/use-sync-path.js +0 -51
  285. package/dist/v2/hooks/use-tabs.d.ts.map +0 -1
  286. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +0 -1
  287. package/dist/v2/hooks/use-workspace-client-events.js +0 -112
  288. package/dist/v2/hooks/use-workspace-selector.d.ts.map +0 -1
  289. package/dist/v2/plugins.d.ts +0 -44
  290. package/dist/v2/plugins.d.ts.map +0 -1
  291. /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.d.ts +0 -0
  292. /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.js +0 -0
  293. /package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.d.ts +0 -0
@@ -1,22 +1,22 @@
1
- import { defineComponent as D, computed as m, createBlock as v, openBlock as i, unref as n, withCtx as u, createVNode as d, createElementVNode as f, toDisplayString as c, createElementBlock as w, Fragment as q, createTextVNode as g } from "vue";
2
- import { ScalarListbox as O, ScalarButton as x, ScalarIcon as k } from "@scalar/components";
1
+ import { defineComponent as q, computed as s, watch as D, createBlock as v, openBlock as d, unref as l, withCtx as u, createVNode as p, createElementVNode as f, toDisplayString as c, createElementBlock as w, Fragment as O, createTextVNode as g } from "vue";
2
+ import { ScalarListbox as S, ScalarButton as x, ScalarIcon as k } from "@scalar/components";
3
3
  import { unpackProxyObject as B } from "@scalar/workspace-store/helpers/unpack-proxy";
4
4
  import F from "./RequestTable.vue.js";
5
5
  import { getFileName as N } from "../helpers/files.js";
6
- import { getExampleFromBody as S } from "../helpers/get-request-body-example.js";
7
- import A from "../../../components/layout/CollapsibleSection.vue.js";
8
- import E from "../../../components/data-table/DataTable.vue.js";
9
- import L from "../../../components/data-table/DataTableHeader.vue.js";
10
- import M from "../../../components/data-table/DataTableRow.vue.js";
11
- import z from "../../../components/code-input/CodeInput.vue.js";
6
+ import { getExampleFromBody as A } from "../helpers/get-request-body-example.js";
7
+ import E from "../../../components/layout/CollapsibleSection.vue.js";
8
+ import L from "../../../components/data-table/DataTable.vue.js";
9
+ import M from "../../../components/data-table/DataTableHeader.vue.js";
10
+ import z from "../../../components/data-table/DataTableRow.vue.js";
11
+ import K from "../../../components/code-input/CodeInput.vue.js";
12
12
  import { useFileDialog as $ } from "../../../../hooks/useFileDialog.js";
13
- const K = {
13
+ const I = {
14
14
  key: 0,
15
15
  class: "text-c-3 flex min-h-10 w-full items-center justify-center border-t p-2 text-sm"
16
- }, I = {
16
+ }, J = {
17
17
  key: 1,
18
18
  class: "flex items-center justify-center overflow-hidden border-t p-1.5"
19
- }, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, oe = /* @__PURE__ */ D({
19
+ }, P = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, ne = /* @__PURE__ */ q({
20
20
  __name: "RequestBody",
21
21
  props: {
22
22
  requestBody: {},
@@ -25,7 +25,7 @@ const K = {
25
25
  environment: {}
26
26
  },
27
27
  emits: ["update:contentType", "update:value", "add:formRow", "update:formRow", "delete:fromRow"],
28
- setup(s, { emit: U }) {
28
+ setup(i, { emit: U }) {
29
29
  const a = U, V = {
30
30
  "application/json": "json",
31
31
  "application/xml": "xml",
@@ -40,64 +40,73 @@ const K = {
40
40
  "application/edn": "EDN",
41
41
  other: "Other",
42
42
  none: "None"
43
- }, o = m(() => s.requestBody?.["x-scalar-selected-content-type"]?.[s.exampleKey] ?? Object.keys(s.requestBody?.content ?? {})[0] ?? "other"), y = Object.entries(j).map(([l, e]) => ({
44
- id: l,
43
+ }, o = s(
44
+ () => i.requestBody?.["x-scalar-selected-content-type"]?.[i.exampleKey] ?? Object.keys(i.requestBody?.content ?? {})[0] ?? "other"
45
+ );
46
+ D(
47
+ () => i.requestBody?.["x-scalar-selected-content-type"]?.[i.exampleKey],
48
+ (n) => {
49
+ n || a("update:contentType", { value: o.value });
50
+ },
51
+ { immediate: !0 }
52
+ );
53
+ const y = Object.entries(j).map(([n, e]) => ({
54
+ id: n,
45
55
  label: e
46
- })), b = m({
56
+ })), b = s({
47
57
  get: () => y.find(
48
58
  (e) => e.id === o.value
49
59
  ) ?? y.at(-1),
50
- set: (l) => {
51
- a("update:contentType", { value: l.id });
60
+ set: (n) => {
61
+ a("update:contentType", { value: n.id });
52
62
  }
53
63
  });
54
- function R(l) {
64
+ function R(n) {
55
65
  const { open: e } = $({
56
66
  onChange: (t) => {
57
67
  const r = t?.[0];
58
- r && l(r);
68
+ r && n(r);
59
69
  },
60
70
  multiple: !1,
61
71
  accept: "*/*"
62
72
  });
63
73
  e();
64
74
  }
65
- const p = m(
66
- () => s.requestBody && S(s.requestBody, o.value, s.exampleKey)
67
- ), C = m(() => {
68
- if (!p.value)
75
+ const m = s(
76
+ () => i.requestBody && A(i.requestBody, o.value, i.exampleKey)
77
+ ), C = s(() => {
78
+ if (!m.value)
69
79
  return "";
70
- const l = p.value.value;
71
- return typeof l == "string" ? l : JSON.stringify(l, null, 2);
72
- }), T = m(() => p.value ? Array.isArray(p.value.value) ? p.value.value : [] : []);
73
- return (l, e) => (i(), v(n(A), null, {
80
+ const n = m.value.value;
81
+ return typeof n == "string" ? n : JSON.stringify(n, null, 2);
82
+ }), T = s(() => m.value ? Array.isArray(m.value.value) ? m.value.value : [] : []);
83
+ return (n, e) => (d(), v(l(E), null, {
74
84
  title: u(() => [
75
- g(c(l.title), 1)
85
+ g(c(n.title), 1)
76
86
  ]),
77
87
  default: u(() => [
78
- d(n(E), {
79
- class: "border-b",
88
+ p(l(L), {
80
89
  columns: [""],
81
90
  presentational: ""
82
91
  }, {
83
92
  default: u(() => [
84
- d(n(L), { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between border-r-0 !p-0" }, {
93
+ p(l(M), { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between border-r-0 !p-0" }, {
85
94
  default: u(() => [
86
- d(n(O), {
95
+ p(l(S), {
87
96
  modelValue: b.value,
88
97
  "onUpdate:modelValue": e[0] || (e[0] = (t) => b.value = t),
89
- options: n(y),
98
+ options: l(y),
90
99
  teleport: ""
91
100
  }, {
92
101
  default: u(() => [
93
- d(n(x), {
102
+ p(l(x), {
94
103
  class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-3 font-normal",
95
104
  fullWidth: "",
96
105
  variant: "ghost"
97
106
  }, {
98
107
  default: u(() => [
99
108
  f("span", null, c(o.value), 1),
100
- d(n(k), {
109
+ p(l(k), {
101
110
  icon: "ChevronDown",
102
111
  size: "md"
103
112
  })
@@ -110,14 +119,14 @@ const K = {
110
119
  ]),
111
120
  _: 1
112
121
  }),
113
- d(n(M), null, {
122
+ p(l(z), null, {
114
123
  default: u(() => [
115
- o.value === "none" ? (i(), w("div", K, [...e[12] || (e[12] = [
124
+ o.value === "none" ? (d(), w("div", I, [...e[12] || (e[12] = [
116
125
  f("span", null, "No Body", -1)
117
- ])])) : o.value === "application/octet-stream" ? (i(), w("div", I, [
118
- n(N)(n(B)(p.value?.value)) !== void 0 ? (i(), w(q, { key: 0 }, [
119
- f("span", J, c(n(N)(n(B)(p.value?.value))), 1),
120
- d(n(x), {
126
+ ])])) : o.value === "application/octet-stream" ? (d(), w("div", J, [
127
+ l(N)(l(B)(m.value?.value)) !== void 0 ? (d(), w(O, { key: 0 }, [
128
+ f("span", P, c(l(N)(l(B)(m.value?.value))), 1),
129
+ p(l(x), {
121
130
  class: "bg-b-2 hover:bg-b-3 text-c-2 ml-1 border-0 shadow-none",
122
131
  size: "sm",
123
132
  variant: "outlined",
@@ -131,7 +140,7 @@ const K = {
131
140
  ])]),
132
141
  _: 1
133
142
  })
134
- ], 64)) : (i(), v(n(x), {
143
+ ], 64)) : (d(), v(l(x), {
135
144
  key: 1,
136
145
  class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 shadow-none",
137
146
  size: "sm",
@@ -145,7 +154,7 @@ const K = {
145
154
  }, {
146
155
  default: u(() => [
147
156
  e[14] || (e[14] = f("span", null, "Upload File", -1)),
148
- d(n(k), {
157
+ p(l(k), {
149
158
  class: "ml-1",
150
159
  icon: "Upload",
151
160
  size: "xs",
@@ -154,10 +163,10 @@ const K = {
154
163
  ]),
155
164
  _: 1
156
165
  }))
157
- ])) : o.value === "multipart/form-data" ? (i(), v(F, {
166
+ ])) : o.value === "multipart/form-data" ? (d(), v(F, {
158
167
  key: 2,
159
168
  data: T.value,
160
- environment: l.environment,
169
+ environment: n.environment,
161
170
  showUploadButton: "",
162
171
  onAddRow: e[3] || (e[3] = (t) => a("add:formRow", {
163
172
  data: t,
@@ -171,7 +180,7 @@ const K = {
171
180
  contentType: o.value,
172
181
  index: t,
173
182
  data: {
174
- value: null
183
+ value: void 0
175
184
  }
176
185
  })),
177
186
  onUpdateRow: e[6] || (e[6] = (t, r) => a("update:formRow", {
@@ -191,10 +200,10 @@ const K = {
191
200
  contentType: o.value
192
201
  });
193
202
  }))
194
- }, null, 8, ["data", "environment"])) : o.value === "application/x-www-form-urlencoded" ? (i(), v(F, {
203
+ }, null, 8, ["data", "environment"])) : o.value === "application/x-www-form-urlencoded" ? (d(), v(F, {
195
204
  key: 3,
196
205
  data: T.value,
197
- environment: l.environment,
206
+ environment: n.environment,
198
207
  onAddRow: e[8] || (e[8] = (t) => a("add:formRow", {
199
208
  data: t,
200
209
  contentType: o.value
@@ -208,11 +217,11 @@ const K = {
208
217
  data: r,
209
218
  contentType: o.value
210
219
  }))
211
- }, null, 8, ["data", "environment"])) : (i(), v(n(z), {
220
+ }, null, 8, ["data", "environment"])) : (d(), v(l(K), {
212
221
  key: 4,
213
222
  class: "border-t px-3",
214
223
  content: "",
215
- environment: l.environment,
224
+ environment: n.environment,
216
225
  language: V[o.value] ?? "plaintext",
217
226
  lineNumbers: "",
218
227
  lint: "",
@@ -234,5 +243,5 @@ const K = {
234
243
  }
235
244
  });
236
245
  export {
237
- oe as default
246
+ ne as default
238
247
  };
@@ -0,0 +1,8 @@
1
+ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
+ import type { OperationCodeSampleProps } from '../../../../v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js';
3
+ type __VLS_Props = OperationCodeSampleProps & {
4
+ eventBus: WorkspaceEventBus;
5
+ };
6
+ declare const _default: 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>;
7
+ export default _default;
8
+ //# sourceMappingURL=RequestCodeSnippet.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequestCodeSnippet.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestCodeSnippet.vue"],"names":[],"mappings":"AAyJA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAQvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sEAAsE,CAAA;AAQpH,KAAK,WAAW,GAAG,wBAAwB,GAAG;IAAE,QAAQ,EAAE,iBAAiB,CAAA;CAAE,CAAC;;AAsQ9E,wBAMG"}
@@ -0,0 +1,127 @@
1
+ import { defineComponent as h, computed as s, ref as S, watch as x, createBlock as g, openBlock as y, unref as t, withCtx as l, createVNode as n, createElementVNode as m, createTextVNode as u, toDisplayString as b, normalizeClass as w } from "vue";
2
+ import { ScalarErrorBoundary as B, ScalarCodeBlock as k, ScalarCombobox as V, ScalarButton as T } from "@scalar/components";
3
+ import { ScalarIconCaretDown as E } from "@scalar/icons";
4
+ import { generateCodeSnippet as N } from "../../operation-code-sample/helpers/generate-code-snippet.js";
5
+ import { getClients as D } from "../../operation-code-sample/helpers/get-clients.js";
6
+ import { getCustomCodeSamples as O } from "../../operation-code-sample/helpers/get-custom-code-samples.js";
7
+ import { getSecrets as z } from "../../operation-code-sample/helpers/get-secrets.js";
8
+ import { findClient as f } from "../../operation-code-sample/helpers/find-client.js";
9
+ import I from "../../../components/layout/CollapsibleSection.vue.js";
10
+ import R from "../../../components/data-table/DataTable.vue.js";
11
+ import W from "../../../components/data-table/DataTableRow.vue.js";
12
+ const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__PURE__ */ h({
13
+ __name: "RequestCodeSnippet",
14
+ props: {
15
+ clientOptions: {},
16
+ selectedClient: {},
17
+ selectedServer: {},
18
+ selectedContentType: {},
19
+ selectedExample: {},
20
+ securitySchemes: {},
21
+ method: {},
22
+ path: {},
23
+ operation: {},
24
+ fallback: { type: Boolean },
25
+ generateLabel: { type: Function },
26
+ isWebhook: { type: Boolean },
27
+ eventBus: {}
28
+ },
29
+ setup(e) {
30
+ const d = s(() => O(e.operation)), c = s(
31
+ () => D(d.value, e.clientOptions)
32
+ ), i = S(
33
+ f(c.value, e.selectedClient)
34
+ );
35
+ x(
36
+ () => e.selectedClient,
37
+ (a) => {
38
+ const o = f(c.value, a);
39
+ o && (i.value = o);
40
+ }
41
+ );
42
+ const p = s(() => z(e.securitySchemes ?? [])), C = (a) => {
43
+ i.value = a, a && !a.id.startsWith("custom") && e.eventBus.emit("workspace:update:selected-client", a.id);
44
+ }, v = s(
45
+ () => N({
46
+ clientId: i.value?.id,
47
+ customCodeSamples: d.value,
48
+ operation: e.operation,
49
+ method: e.method,
50
+ path: e.path,
51
+ contentType: e.selectedContentType,
52
+ server: e.selectedServer,
53
+ securitySchemes: e.securitySchemes,
54
+ example: e.selectedExample
55
+ })
56
+ );
57
+ return (a, o) => (y(), g(t(I), {
58
+ class: "group/preview w-full border-t",
59
+ defaultOpen: !1
60
+ }, {
61
+ title: l(() => [...o[1] || (o[1] = [
62
+ u("Code Snippet", -1)
63
+ ])]),
64
+ actions: l(() => [
65
+ m("div", $, [
66
+ n(t(V), {
67
+ modelValue: i.value,
68
+ options: c.value,
69
+ placement: "bottom-end",
70
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => C(r))
71
+ }, {
72
+ default: l(({ open: r }) => [
73
+ n(t(T), {
74
+ 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",
75
+ "data-testid": "client-picker",
76
+ variant: "ghost"
77
+ }, {
78
+ default: l(() => [
79
+ u(b(i.value?.title) + " ", 1),
80
+ n(t(E), {
81
+ class: w(["mt-0.25 size-3 transition-transform duration-100", r && "rotate-180"]),
82
+ weight: "bold"
83
+ }, null, 8, ["class"])
84
+ ]),
85
+ _: 2
86
+ }, 1024)
87
+ ]),
88
+ _: 1
89
+ }, 8, ["modelValue", "options"])
90
+ ])
91
+ ]),
92
+ default: l(() => [
93
+ n(t(B), null, {
94
+ default: l(() => [
95
+ n(t(R), {
96
+ columns: [""],
97
+ presentational: ""
98
+ }, {
99
+ default: l(() => [
100
+ n(t(W), null, {
101
+ default: l(() => [
102
+ m("div", q, [
103
+ n(t(k), {
104
+ class: "text-base -outline-offset-2",
105
+ content: v.value,
106
+ hideCredentials: p.value,
107
+ lang: i.value?.lang ?? "plaintext",
108
+ lineNumbers: ""
109
+ }, null, 8, ["content", "hideCredentials", "lang"])
110
+ ])
111
+ ]),
112
+ _: 1
113
+ })
114
+ ]),
115
+ _: 1
116
+ })
117
+ ]),
118
+ _: 1
119
+ })
120
+ ]),
121
+ _: 1
122
+ }));
123
+ }
124
+ });
125
+ export {
126
+ Q as default
127
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./RequestCodeSnippet.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -23,7 +23,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
23
23
  payload: Partial<{
24
24
  key: string;
25
25
  value: string;
26
- isEnabled: boolean;
26
+ isDisabled: boolean;
27
27
  }>;
28
28
  }) => any;
29
29
  deleteAll: () => any;
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
40
40
  payload: Partial<{
41
41
  key: string;
42
42
  value: string;
43
- isEnabled: boolean;
43
+ isDisabled: boolean;
44
44
  }>;
45
45
  }) => any) | undefined;
46
46
  onDeleteAll?: (() => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestParams.vue"],"names":[],"mappings":"AAsGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAUnG,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;eAmBgC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,OAAO,CAAA;SAAE,CAAC;;;;;eAGxC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,OAAO,CAAA;SAAE,CAAC;;;;AAqL1E,wBAOG"}
1
+ {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestParams.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAUnG,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;eAmBgC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC;;;;;eAGzC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC;;;;AAsL3E,wBAOG"}
@@ -1,10 +1,10 @@
1
- import { defineComponent as c, computed as s, createBlock as i, openBlock as m, unref as n, withCtx as l, createVNode as d, createElementVNode as p, createCommentVNode as g, withModifiers as h, createTextVNode as u, toDisplayString as f } from "vue";
1
+ import { defineComponent as b, computed as s, createBlock as i, openBlock as d, unref as r, withCtx as a, createVNode as m, createElementVNode as p, createCommentVNode as g, withModifiers as h, createTextVNode as u, toDisplayString as f } from "vue";
2
2
  import { ScalarTooltip as y, ScalarButton as P } from "@scalar/components";
3
- import { getParameterExample as A } from "../helpers/get-parameter-example.js";
3
+ import { getExample as A } from "../../operation-block/helpers/get-example.js";
4
4
  import { getParameterSchema as C } from "../helpers/get-parameter-schema.js";
5
5
  import x from "./RequestTable.vue.js";
6
6
  import q from "../../../components/layout/CollapsibleSection.vue.js";
7
- const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100" }, k = { class: "sr-only" }, E = /* @__PURE__ */ c({
7
+ const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100" }, k = { class: "sr-only" }, E = /* @__PURE__ */ b({
8
8
  __name: "RequestParams",
9
9
  props: {
10
10
  parameters: {},
@@ -17,42 +17,43 @@ const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
17
17
  environment: {}
18
18
  },
19
19
  emits: ["add", "update", "delete", "deleteAll"],
20
- setup(o, { emit: v }) {
21
- const r = v, w = s(
22
- () => o.parameters.map((e) => {
23
- const t = A(e, o.exampleKey);
20
+ setup(l, { emit: v }) {
21
+ const n = v, c = s(
22
+ () => l.parameters.map((e) => {
23
+ const t = A(e, l.exampleKey, void 0);
24
24
  return {
25
25
  name: e.name,
26
26
  value: t?.value ?? "",
27
- globalRoute: o.globalRoute,
27
+ description: e.description,
28
+ globalRoute: l.globalRoute,
28
29
  schema: C(e),
29
30
  isRequired: e.required,
30
31
  isDisabled: t?.["x-disabled"] ?? !1
31
32
  };
32
33
  })
33
- ), R = s(() => o.parameters.length > 1);
34
- return (e, t) => (m(), i(n(q), {
34
+ ), w = s(() => l.parameters.length > 1);
35
+ return (e, t) => (d(), i(r(q), {
35
36
  class: "group/params",
36
37
  itemCount: e.parameters.length
37
38
  }, {
38
- title: l(() => [
39
+ title: a(() => [
39
40
  u(f(e.title), 1)
40
41
  ]),
41
- actions: l(() => [
42
+ actions: a(() => [
42
43
  p("div", K, [
43
- R.value ? (m(), i(n(y), {
44
+ w.value ? (d(), i(r(y), {
44
45
  key: 0,
45
46
  content: "Clear optional parameters",
46
47
  placement: "left"
47
48
  }, {
48
- default: l(() => [
49
- d(n(P), {
49
+ default: a(() => [
50
+ m(r(P), {
50
51
  class: "pr-0.75 pl-1 transition-none",
51
52
  size: "sm",
52
53
  variant: "ghost",
53
- onClick: t[0] || (t[0] = h((a) => r("deleteAll"), ["stop"]))
54
+ onClick: t[0] || (t[0] = h((o) => n("deleteAll"), ["stop"]))
54
55
  }, {
55
- default: l(() => [
56
+ default: a(() => [
56
57
  t[4] || (t[4] = u(" Clear ", -1)),
57
58
  p("span", k, "All " + f(e.title), 1)
58
59
  ]),
@@ -63,20 +64,20 @@ const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
63
64
  })) : g("", !0)
64
65
  ])
65
66
  ]),
66
- default: l(() => [
67
- d(x, {
67
+ default: a(() => [
68
+ m(x, {
68
69
  class: "flex-1",
69
70
  columns: ["32px", "", ""],
70
- data: w.value,
71
+ data: c.value,
71
72
  environment: e.environment,
72
73
  exampleKey: e.exampleKey,
73
74
  globalRoute: e.globalRoute,
74
75
  invalidParams: e.invalidParams,
75
76
  label: e.label,
76
77
  showAddRowPlaceholder: e.showAddRowPlaceholder,
77
- onAddRow: t[1] || (t[1] = (a) => r("add", a)),
78
- onDeleteRow: t[2] || (t[2] = (a) => r("delete", { index: a })),
79
- onUpdateRow: t[3] || (t[3] = (a, b) => r("update", { index: a, payload: b }))
78
+ onAddRow: t[1] || (t[1] = (o) => n("add", o)),
79
+ onDeleteRow: t[2] || (t[2] = (o) => n("delete", { index: o })),
80
+ onUpdateRow: t[3] || (t[3] = (o, R) => n("update", { index: o, payload: R }))
80
81
  }, null, 8, ["data", "environment", "exampleKey", "globalRoute", "invalidParams", "label", "showAddRowPlaceholder"])
81
82
  ]),
82
83
  _: 1
@@ -15,12 +15,11 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
15
15
  updateRow: (index: number, payload: Partial<{
16
16
  key: string;
17
17
  value: string;
18
- isEnabled: boolean;
18
+ isDisabled: boolean;
19
19
  }>) => any;
20
20
  addRow: (payload: Partial<{
21
21
  key: string;
22
22
  value: string;
23
- isEnabled: boolean;
24
23
  }>) => any;
25
24
  deleteRow: (index: number) => any;
26
25
  uploadFile: (index?: number | undefined) => any;
@@ -29,12 +28,11 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
29
28
  onUpdateRow?: ((index: number, payload: Partial<{
30
29
  key: string;
31
30
  value: string;
32
- isEnabled: boolean;
31
+ isDisabled: boolean;
33
32
  }>) => any) | undefined;
34
33
  onAddRow?: ((payload: Partial<{
35
34
  key: string;
36
35
  value: string;
37
- isEnabled: boolean;
38
36
  }>) => any) | undefined;
39
37
  onDeleteRow?: ((index: number) => any) | undefined;
40
38
  onUploadFile?: ((index?: number | undefined) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTable.vue"],"names":[],"mappings":"AAwKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAwB,EACtB,KAAK,QAAQ,EACd,MAAM,0DAA0D,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;aAsB0B,MAAM;eAAS,MAAM;mBAAa,OAAO;;;aALzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;;aAKzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;aALzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;AAgOrE,wBAOG"}
1
+ {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTable.vue"],"names":[],"mappings":"AAqKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAwB,EACtB,KAAK,QAAQ,EACd,MAAM,0DAA0D,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;aAmB0B,MAAM;eAAS,MAAM;oBAAc,OAAO;;;aAJ9B,MAAM;eAAS,MAAM;;;;;;;aAIjC,MAAM;eAAS,MAAM;oBAAc,OAAO;;;aAJ9B,MAAM;eAAS,MAAM;;;;;;AA+N7D,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTable.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c9608d1a"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1434cda7"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -12,6 +12,7 @@ type __VLS_Props = {
12
12
  export type TableRow = {
13
13
  name: string;
14
14
  value: string | File | null;
15
+ description?: string;
15
16
  globalRoute?: string;
16
17
  isDisabled?: boolean;
17
18
  schema?: SchemaObject;
@@ -21,7 +22,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
21
22
  updateRow: (payload: Partial<{
22
23
  key: string;
23
24
  value: string;
24
- isEnabled: boolean;
25
+ isDisabled: boolean;
25
26
  }>) => any;
26
27
  deleteRow: () => any;
27
28
  uploadFile: () => any;
@@ -30,7 +31,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
30
31
  onUpdateRow?: ((payload: Partial<{
31
32
  key: string;
32
33
  value: string;
33
- isEnabled: boolean;
34
+ isDisabled: boolean;
34
35
  }>) => any) | undefined;
35
36
  onDeleteRow?: (() => any) | undefined;
36
37
  onUploadFile?: (() => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AA2NA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAchG,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAqBF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;;;aAf2B,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;;aAAzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;AAuerE,wBAOG"}
1
+ {"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AA8NA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAehG,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAqBF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;;;aAhB2B,MAAM;eAAS,MAAM;oBAAc,OAAO;;;;;;;aAA1C,MAAM;eAAS,MAAM;oBAAc,OAAO;;;;;;AA2etE,wBAOG"}