@scalar/api-client 2.18.1 → 2.18.3

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 (277) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/components/AddressBar/AddressBar.vue2.js +52 -52
  3. package/dist/components/AddressBar/AddressBarHistory.vue2.js +15 -15
  4. package/dist/components/AddressBar/httpStatusCodeColors.d.ts +0 -33
  5. package/dist/components/AddressBar/httpStatusCodeColors.d.ts.map +1 -1
  6. package/dist/components/AddressBar/httpStatusCodeColors.js +0 -1
  7. package/dist/components/CodeInput/CodeInput.vue2.js +112 -112
  8. package/dist/components/CommandPalette/CommandActionForm.vue.js +18 -18
  9. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +25 -25
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +2 -2
  11. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -4
  13. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -1
  14. package/dist/components/CommandPalette/WatchModeToggle.vue.js +14 -14
  15. package/dist/components/DataTable/DataTable.vue.js +17 -17
  16. package/dist/components/DataTable/DataTableCell.vue.js +9 -9
  17. package/dist/components/DataTable/DataTableCheckbox.vue.js +17 -17
  18. package/dist/components/DataTable/DataTableInput.vue2.js +48 -48
  19. package/dist/components/DataTable/DataTableInputSelect.vue.js +35 -35
  20. package/dist/components/DataTable/DataTableText.vue.js +10 -10
  21. package/dist/components/Form/Form.vue.js +32 -32
  22. package/dist/components/Form/LabelInput.vue2.js +15 -15
  23. package/dist/components/HelpfulLink.vue.js +7 -7
  24. package/dist/components/HttpMethod/HttpMethod.vue2.js +22 -22
  25. package/dist/components/IconSelector.vue.js +16 -16
  26. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +50 -50
  27. package/dist/components/ImportCollection/ImportNowButton.vue.js +23 -23
  28. package/dist/components/ImportCollection/PrefetchError.vue.js +8 -8
  29. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +0 -7
  30. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  31. package/dist/components/ScalarAsciiArt.vue2.js +16 -16
  32. package/dist/components/SectionFilter.vue2.js +21 -21
  33. package/dist/components/SectionFilterButton.vue.js +7 -7
  34. package/dist/components/Server/ServerDropdown.vue.js +32 -32
  35. package/dist/components/Server/ServerDropdownItem.vue2.js +39 -39
  36. package/dist/components/Server/ServerSelector.vue.js +27 -27
  37. package/dist/components/Server/ServerVariablesForm.vue.js +26 -26
  38. package/dist/components/Server/ServerVariablesSelect.vue.js +21 -21
  39. package/dist/components/Server/ServerVariablesTextbox.vue.js +10 -10
  40. package/dist/components/Server/types.d.ts +2 -1
  41. package/dist/components/Server/types.d.ts.map +1 -1
  42. package/dist/components/SideNav/SideNavLink.vue.js +18 -18
  43. package/dist/components/SideNav/SideNavRouterLink.vue.js +13 -13
  44. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +11 -11
  45. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +16 -16
  46. package/dist/components/Sidebar/Sidebar.vue2.js +28 -28
  47. package/dist/components/Sidebar/SidebarButton.vue.js +12 -12
  48. package/dist/components/Sidebar/SidebarListElement.vue2.js +34 -34
  49. package/dist/components/Sidebar/SidebarListElementActions.vue.js +33 -33
  50. package/dist/components/TopNav/TopNavItem.vue2.js +41 -41
  51. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +43 -43
  52. package/dist/data/httpHeaders.d.ts +2 -1
  53. package/dist/data/httpHeaders.d.ts.map +1 -1
  54. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  55. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  56. package/dist/libs/create-client.d.ts.map +1 -1
  57. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  58. package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -1
  59. package/dist/plugins/hooks/usePluginManager.js +4 -4
  60. package/dist/plugins/index.d.ts +1 -1
  61. package/dist/plugins/index.d.ts.map +1 -1
  62. package/dist/plugins/index.js +5 -5
  63. package/dist/plugins/plugin-manager.d.ts +0 -2
  64. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  65. package/dist/routes.d.ts +0 -10
  66. package/dist/routes.d.ts.map +1 -1
  67. package/dist/routes.js +0 -1
  68. package/dist/store/security-schemes.d.ts.map +1 -1
  69. package/dist/store/store.d.ts.map +1 -1
  70. package/dist/style.css +1 -1
  71. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +44 -44
  72. package/dist/v2/blocks/operation-block/components/Header.vue2.js +20 -20
  73. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  74. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +14 -14
  75. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +12 -12
  76. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +65 -65
  77. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -1
  78. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  79. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +6 -6
  80. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +4 -3
  81. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -1
  82. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +9 -7
  83. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  84. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +40 -32
  85. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -3
  86. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  87. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -1
  88. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  89. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  90. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +144 -149
  91. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +25 -45
  92. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  93. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  94. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +90 -139
  95. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +22 -0
  96. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -0
  97. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +77 -0
  98. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +4 -0
  99. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +4 -4
  100. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  101. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +34 -34
  102. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
  103. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  104. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
  105. package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -32
  106. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
  107. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  108. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +64 -64
  109. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +29 -29
  110. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +2 -2
  111. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  112. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +12 -13
  113. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +8 -0
  114. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -0
  115. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +9 -0
  116. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -1
  117. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
  118. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +9 -8
  119. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +67 -67
  120. package/dist/v2/blocks/response-block/components/Headers.vue.js +35 -35
  121. package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +24 -24
  122. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +10 -10
  123. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +24 -24
  124. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +10 -10
  125. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +11 -11
  126. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +14 -14
  127. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +11 -11
  128. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +33 -33
  129. package/dist/v2/blocks/response-block/helpers/media-types.d.ts +3 -6
  130. package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
  131. package/dist/v2/blocks/response-block/helpers/media-types.js +0 -1
  132. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +72 -72
  133. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +9 -9
  134. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts +0 -33
  135. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts.map +1 -1
  136. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -1
  137. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +69 -69
  138. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +10 -10
  139. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +121 -121
  140. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +13 -13
  141. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +33 -33
  142. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +29 -29
  143. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +26 -26
  144. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +75 -75
  145. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +0 -21
  146. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  147. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -3
  148. package/dist/v2/components/code-input/CodeInput.vue2.js +93 -93
  149. package/dist/v2/components/data-table/DataTable.vue.js +17 -17
  150. package/dist/v2/components/data-table/DataTableCell.vue.js +9 -9
  151. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +17 -17
  152. package/dist/v2/components/data-table/DataTableInput.vue2.js +48 -48
  153. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +35 -35
  154. package/dist/v2/components/data-table/DataTableText.vue.js +10 -10
  155. package/dist/v2/components/forms/ConfirmationForm.vue.js +13 -13
  156. package/dist/v2/components/layout/CollapsibleSection.vue.js +42 -42
  157. package/dist/v2/components/modals/DeleteModal.vue.js +13 -13
  158. package/dist/v2/components/resize/Resize.vue2.js +11 -11
  159. package/dist/v2/components/server/ServerDropdown.vue.js +30 -30
  160. package/dist/v2/components/server/ServerDropdownItem.vue2.js +27 -27
  161. package/dist/v2/components/sidebar/Sidebar.vue.js +32 -32
  162. package/dist/v2/components/sidebar/SidebarMenu.vue.js +20 -20
  163. package/dist/v2/features/app/App.vue.js +25 -25
  164. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  165. package/dist/v2/features/app/app-events.js +55 -61
  166. package/dist/v2/features/app/components/AppSidebar.vue2.js +97 -97
  167. package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +20 -20
  168. package/dist/v2/features/app/components/DesktopTab.vue2.js +59 -59
  169. package/dist/v2/features/app/components/DesktopTabs.vue.js +22 -22
  170. package/dist/v2/features/app/components/SidebarItemMenu.vue.js +6 -6
  171. package/dist/v2/features/app/components/WebTopNav.vue.js +9 -9
  172. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -5
  173. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  174. package/dist/v2/features/app/helpers/create-api-client-app.js +1 -2
  175. package/dist/v2/features/collection/DocumentCollection.vue.js +31 -31
  176. package/dist/v2/features/collection/WorkspaceCollection.vue.js +17 -17
  177. package/dist/v2/features/collection/components/Authentication.vue2.js +18 -18
  178. package/dist/v2/features/collection/components/Cookies.vue.js +10 -10
  179. package/dist/v2/features/collection/components/Environment.vue.js +10 -10
  180. package/dist/v2/features/collection/components/Form.vue.js +21 -21
  181. package/dist/v2/features/collection/components/Overview.vue2.js +25 -25
  182. package/dist/v2/features/collection/components/Servers.vue.js +37 -37
  183. package/dist/v2/features/collection/components/Settings.vue.js +22 -22
  184. package/dist/v2/features/collection/components/Tabs.vue.js +18 -18
  185. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +20 -20
  186. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +17 -17
  187. package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +68 -68
  188. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +11 -11
  189. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +2 -1
  190. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -1
  191. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +2 -1
  192. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -1
  193. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +3 -3
  194. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  195. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -1
  196. package/dist/v2/features/command-palette/types.d.ts +11 -10
  197. package/dist/v2/features/command-palette/types.d.ts.map +1 -1
  198. package/dist/v2/features/environments/EnvironmentsList.vue.js +36 -36
  199. package/dist/v2/features/environments/components/Environment.vue.js +16 -16
  200. package/dist/v2/features/environments/components/EnvironmentColors.vue.js +37 -37
  201. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +19 -19
  202. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +14 -14
  203. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +24 -24
  204. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +58 -58
  205. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +23 -23
  206. package/dist/v2/features/modal/Modal.vue2.js +56 -56
  207. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -1
  208. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  209. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -1
  210. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +17 -21
  211. package/dist/v2/features/operation/Operation.vue.js +34 -34
  212. package/dist/v2/features/search/components/SearchButton.vue.js +40 -40
  213. package/dist/v2/features/search/components/SearchModal.vue2.js +43 -43
  214. package/dist/v2/features/search/components/SearchResult.vue.js +34 -34
  215. package/dist/v2/features/search/types.d.ts +5 -4
  216. package/dist/v2/features/search/types.d.ts.map +1 -1
  217. package/dist/v2/features/settings/CollectionSettings.vue.js +51 -51
  218. package/dist/v2/features/settings/DocumentSettings.vue.js +25 -25
  219. package/dist/v2/features/settings/components/Appearance.vue.js +27 -27
  220. package/dist/v2/helpers/handle-hotkeys.d.ts +1 -12
  221. package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
  222. package/dist/v2/helpers/handle-hotkeys.js +0 -2
  223. package/dist/v2/helpers/plugins.d.ts +2 -2
  224. package/dist/v2/helpers/plugins.d.ts.map +1 -1
  225. package/dist/views/Collection/CollectionNavigation.vue.js +13 -13
  226. package/dist/views/Collection/components/EnvironmentForm.vue2.js +114 -114
  227. package/dist/views/Collection/components/MarkdownInput.vue2.js +31 -31
  228. package/dist/views/Cookies/CookieModal.vue2.js +26 -26
  229. package/dist/views/Environment/EnvironmentColorModal.vue.js +10 -10
  230. package/dist/views/Environment/EnvironmentColors.vue.js +56 -56
  231. package/dist/views/Environment/EnvironmentModal.vue.js +26 -26
  232. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +24 -24
  233. package/dist/views/Request/Request.vue2.js +55 -55
  234. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +17 -17
  235. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +102 -102
  236. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -27
  237. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  238. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +91 -91
  239. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  240. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +36 -36
  241. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +101 -101
  242. package/dist/views/Request/RequestSection/RequestBody.vue2.js +154 -154
  243. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +35 -35
  244. package/dist/views/Request/RequestSection/RequestParams.vue.js +81 -81
  245. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +47 -47
  246. package/dist/views/Request/RequestSection/RequestSection.vue2.js +90 -90
  247. package/dist/views/Request/RequestSection/RequestTable.vue2.js +111 -111
  248. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +29 -29
  249. package/dist/views/Request/RequestSection/index.d.ts +1 -1
  250. package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
  251. package/dist/views/Request/RequestSection/index.js +4 -4
  252. package/dist/views/Request/RequestSidebarItem.vue2.js +149 -149
  253. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +79 -79
  254. package/dist/views/Request/RequestSubpageHeader.vue2.js +30 -30
  255. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +29 -29
  256. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +37 -37
  257. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +10 -10
  258. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +24 -24
  259. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +10 -10
  260. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +16 -16
  261. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +21 -21
  262. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +30 -30
  263. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -37
  264. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +61 -61
  265. package/package.json +23 -23
  266. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +0 -6
  267. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +0 -1
  268. package/dist/components/ImportCollection/OperationBadge.vue.d.ts +0 -8
  269. package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +0 -1
  270. package/dist/components/ScreenReader.vue.d.ts +0 -20
  271. package/dist/components/ScreenReader.vue.d.ts.map +0 -1
  272. package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts +0 -9
  273. package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts.map +0 -1
  274. package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts +0 -3
  275. package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts.map +0 -1
  276. package/dist/views/Request/RequestSection/types/post-response.d.ts +0 -7
  277. package/dist/views/Request/RequestSection/types/post-response.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as R, computed as s, ref as a, onMounted as C, onBeforeUnmount as U, watch as k, createElementBlock as E, openBlock as b, createElementVNode as O, createVNode as n, withCtx as S, unref as m } from "vue";
1
+ import { defineComponent as R, computed as r, ref as a, onMounted as C, onBeforeUnmount as U, watch as k, createElementBlock as E, openBlock as b, createElementVNode as O, createVNode as n, withCtx as B, unref as c } from "vue";
2
2
  import { AVAILABLE_CLIENTS as V } from "@scalar/types/snippetz";
3
3
  import { useToasts as K } from "@scalar/use-toasts";
4
4
  import w from "../../../components/ViewLayout/ViewLayout.vue.js";
@@ -47,54 +47,54 @@ const z = { class: "bg-b-1 flex h-full flex-col" }, F = { class: "lg:min-h-heade
47
47
  proxyUrl: {}
48
48
  },
49
49
  emits: ["update:servers"],
50
- setup(t, { emit: B }) {
51
- const g = B, q = s(() => $(t.httpClients)), c = s(
52
- () => j(t.documentSecurity, t.operation.security)
53
- ), d = s(
50
+ setup(e, { emit: g }) {
51
+ const x = g, q = r(() => $(e.httpClients)), m = r(
52
+ () => j(e.documentSecurity, e.operation.security)
53
+ ), d = r(
54
54
  () => D(
55
- t.documentSelectedSecurity,
56
- t.operation["x-scalar-selected-security"],
57
- c.value,
58
- t.setOperationSecurity
55
+ e.documentSelectedSecurity,
56
+ e.operation["x-scalar-selected-security"],
57
+ m.value,
58
+ e.setOperationSecurity
59
59
  )
60
- ), v = s(
61
- () => T(t.securitySchemes, d.value.selectedSchemes)
62
- ), { toast: y } = K(), h = a(null), u = a(null), l = a(null), p = () => h.value?.abort(M.REQUEST_ABORTED), r = async () => {
63
- const [e, o] = L({
64
- environment: t.environment,
65
- exampleKey: t.exampleKey,
66
- globalCookies: t.globalCookies,
67
- method: t.method,
68
- operation: t.operation,
69
- path: t.path,
60
+ ), v = r(
61
+ () => T(e.securitySchemes, d.value.selectedSchemes)
62
+ ), { toast: y } = K(), h = a(null), u = a(null), l = a(null), f = () => h.value?.abort(M.REQUEST_ABORTED), o = async () => {
63
+ const [s, t] = L({
64
+ environment: e.environment,
65
+ exampleKey: e.exampleKey,
66
+ globalCookies: e.globalCookies,
67
+ method: e.method,
68
+ operation: e.operation,
69
+ path: e.path,
70
70
  selectedSecuritySchemes: v.value,
71
- server: t.server,
72
- proxyUrl: t.proxyUrl
71
+ server: e.server,
72
+ proxyUrl: e.proxyUrl
73
73
  });
74
- if (e) {
75
- y(e.message, "error");
74
+ if (s) {
75
+ y(s.message, "error");
76
76
  return;
77
77
  }
78
- h.value = o.controller, t.eventBus.emit("hooks:on:request:sent");
79
- const [i, f] = await N({
80
- isUsingProxy: o.isUsingProxy,
81
- operation: t.operation,
82
- plugins: t.plugins,
83
- request: o.request
78
+ h.value = t.controller, e.eventBus.emit("hooks:on:request:sent");
79
+ const [i, S] = await N({
80
+ isUsingProxy: t.isUsingProxy,
81
+ operation: e.operation,
82
+ plugins: e.plugins,
83
+ request: t.request
84
84
  });
85
- if (t.eventBus.emit("hooks:on:request:complete"), i) {
85
+ if (e.eventBus.emit("hooks:on:request:complete"), i) {
86
86
  y(i.message, "error");
87
87
  return;
88
88
  }
89
- u.value = f.response, l.value = f.request;
89
+ u.value = S.response, l.value = S.request;
90
90
  };
91
91
  return C(() => {
92
- t.eventBus.on("operation:send:request:hotkey", r), t.eventBus.on("operation:cancel:request", p);
92
+ e.eventBus.on("operation:send:request:hotkey", o), e.eventBus.on("operation:cancel:request", f);
93
93
  }), U(() => {
94
- t.eventBus.off("operation:send:request:hotkey", r), t.eventBus.off("operation:cancel:request", p);
95
- }), k([() => t.path, () => t.method, () => t.exampleKey], () => {
94
+ e.eventBus.off("operation:send:request:hotkey", o), e.eventBus.off("operation:cancel:request", f);
95
+ }), k([() => e.path, () => e.method, () => e.exampleKey], () => {
96
96
  u.value = null, l.value = null;
97
- }), (e, o) => (b(), E("div", z, [
97
+ }), (s, t) => (b(), E("div", z, [
98
98
  O("div", F, [
99
99
  n(I, {
100
100
  documentUrl: e.documentUrl,
@@ -109,15 +109,15 @@ const z = { class: "bg-b-1 flex h-full flex-col" }, F = { class: "lg:min-h-heade
109
109
  server: e.server,
110
110
  servers: e.servers,
111
111
  source: e.source,
112
- onExecute: r,
113
- "onUpdate:servers": o[0] || (o[0] = (i) => g("update:servers"))
112
+ onExecute: o,
113
+ "onUpdate:servers": t[0] || (t[0] = (i) => x("update:servers"))
114
114
  }, null, 8, ["documentUrl", "environment", "eventBus", "hideClientButton", "history", "integration", "layout", "method", "path", "server", "servers", "source"])
115
115
  ]),
116
116
  n(w, { class: "border-t" }, {
117
- default: S(() => [
117
+ default: B(() => [
118
118
  n(P, { class: "flex-1" }, {
119
- default: S(() => [
120
- n(m(H), {
119
+ default: B(() => [
120
+ n(c(H), {
121
121
  authMeta: e.authMeta,
122
122
  clientOptions: q.value,
123
123
  environment: e.environment,
@@ -129,23 +129,23 @@ const z = { class: "bg-b-1 flex h-full flex-col" }, F = { class: "lg:min-h-heade
129
129
  path: e.path,
130
130
  plugins: e.plugins,
131
131
  proxyUrl: e.proxyUrl,
132
- securityRequirements: c.value,
132
+ securityRequirements: m.value,
133
133
  securitySchemes: e.securitySchemes,
134
134
  selectedClient: e.selectedClient,
135
135
  selectedSecurity: d.value,
136
136
  selectedSecuritySchemes: v.value,
137
137
  server: e.server
138
138
  }, null, 8, ["authMeta", "clientOptions", "environment", "eventBus", "exampleKey", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securityRequirements", "securitySchemes", "selectedClient", "selectedSecurity", "selectedSecuritySchemes", "server"]),
139
- n(m(Q), {
139
+ n(c(Q), {
140
140
  appVersion: e.appVersion,
141
141
  eventBus: e.eventBus,
142
- events: m(A)(),
142
+ events: c(A)(),
143
143
  layout: e.layout,
144
144
  plugins: e.plugins,
145
145
  request: l.value,
146
146
  response: u.value,
147
147
  totalPerformedRequests: e.totalPerformedRequests,
148
- onSendRequest: r
148
+ onSendRequest: o
149
149
  }, null, 8, ["appVersion", "eventBus", "events", "layout", "plugins", "request", "response", "totalPerformedRequests"])
150
150
  ]),
151
151
  _: 1
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, createElementBlock as l, openBlock as n, createElementVNode as o, createVNode as i, unref as r, createBlock as v, createCommentVNode as u } from "vue";
1
+ import { defineComponent as c, createElementBlock as i, openBlock as o, createElementVNode as n, createVNode as s, unref as l, createBlock as v, createCommentVNode as u } from "vue";
2
2
  import { ScalarIcon as a } from "@scalar/components";
3
3
  import f from "../../scalar-address-bar-block/components/AddressBar.vue.js";
4
4
  import g from "../../../../components/OpenApiClientButton.vue.js";
5
- const y = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, b = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, w = /* @__PURE__ */ d({
5
+ const y = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, x = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, w = /* @__PURE__ */ c({
6
6
  __name: "Header",
7
7
  props: {
8
8
  path: {},
@@ -19,13 +19,13 @@ const y = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
19
19
  environment: {}
20
20
  },
21
21
  emits: ["execute", "update:servers"],
22
- setup(B, { emit: p }) {
23
- const m = p;
24
- return (e, t) => (n(), l("div", y, [
25
- t[6] || (t[6] = o("div", { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, [
26
- o("div", { class: "size-8" })
22
+ setup(e, { emit: d }) {
23
+ const m = d;
24
+ return (b, t) => (o(), i("div", y, [
25
+ t[6] || (t[6] = n("div", { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, [
26
+ n("div", { class: "size-8" })
27
27
  ], -1)),
28
- i(r(f), {
28
+ s(l(f), {
29
29
  environment: e.environment,
30
30
  eventBus: e.eventBus,
31
31
  history: e.history,
@@ -34,11 +34,11 @@ const y = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
34
34
  path: e.path,
35
35
  server: e.server,
36
36
  servers: e.servers,
37
- onExecute: t[0] || (t[0] = (s) => m("execute")),
38
- "onUpdate:servers": t[1] || (t[1] = (s) => m("update:servers"))
37
+ onExecute: t[0] || (t[0] = (r) => m("execute")),
38
+ "onUpdate:servers": t[1] || (t[1] = (r) => m("update:servers"))
39
39
  }, null, 8, ["environment", "eventBus", "history", "layout", "method", "path", "server", "servers"]),
40
- o("div", b, [
41
- e.layout === "modal" && e.documentUrl && !e.hideClientButton ? (n(), v(r(g), {
40
+ n("div", x, [
41
+ e.layout === "modal" && e.documentUrl && !e.hideClientButton ? (o(), v(l(g), {
42
42
  key: 0,
43
43
  buttonSource: "modal",
44
44
  class: "!w-fit lg:-mr-1",
@@ -46,31 +46,31 @@ const y = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
46
46
  source: e.source ?? "api-reference",
47
47
  url: e.documentUrl
48
48
  }, null, 8, ["integration", "source", "url"])) : u("", !0),
49
- e.layout === "modal" && e.source !== "gitbook" ? (n(), l("button", {
49
+ e.layout === "modal" && e.source !== "gitbook" ? (o(), i("button", {
50
50
  key: 1,
51
51
  class: "app-exit-button zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2",
52
52
  type: "button",
53
- onClick: t[2] || (t[2] = (s) => e.eventBus.emit("ui:close:client-modal"))
53
+ onClick: t[2] || (t[2] = (r) => e.eventBus.emit("ui:close:client-modal"))
54
54
  }, [
55
- i(r(a), {
55
+ s(l(a), {
56
56
  icon: "Close",
57
57
  size: "lg",
58
58
  thickness: "2"
59
59
  }),
60
- t[4] || (t[4] = o("span", { class: "sr-only" }, "Close Client", -1))
60
+ t[4] || (t[4] = n("span", { class: "sr-only" }, "Close Client", -1))
61
61
  ])) : u("", !0),
62
- e.layout === "modal" && e.source === "gitbook" ? (n(), l("button", {
62
+ e.layout === "modal" && e.source === "gitbook" ? (o(), i("button", {
63
63
  key: 2,
64
64
  class: "text-c-1 hover:bg-b-2 active:text-c-1 -mr-1.5 rounded p-2",
65
65
  type: "button",
66
- onClick: t[3] || (t[3] = (s) => e.eventBus.emit("ui:close:client-modal"))
66
+ onClick: t[3] || (t[3] = (r) => e.eventBus.emit("ui:close:client-modal"))
67
67
  }, [
68
- i(r(a), {
68
+ s(l(a), {
69
69
  icon: "Close",
70
70
  size: "md",
71
71
  thickness: "1.75"
72
72
  }),
73
- t[5] || (t[5] = o("span", { class: "sr-only" }, "Close Client", -1))
73
+ t[5] || (t[5] = n("span", { class: "sr-only" }, "Close Client", -1))
74
74
  ])) : u("", !0)
75
75
  ])
76
76
  ]));
@@ -1 +1 @@
1
- {"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-body.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAIjG;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,iBAAiB,GAAG,SAAS;AAC1C,8DAA8D;AAC9D,MAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AAChC,qCAAqC;AACrC,mBAAsB,KACrB,QAAQ,GAAG,IAwDb,CAAA"}
1
+ {"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-body.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAIjG;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,iBAAiB,GAAG,SAAS;AAC1C,8DAA8D;AAC9D,MAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AAChC,qCAAqC;AACrC,mBAAsB,KACrB,QAAQ,GAAG,IAyDb,CAAA"}
@@ -1,26 +1,26 @@
1
- import { replaceEnvVariables as i } from "@scalar/helpers/regex/replace-variables";
1
+ import { replaceEnvVariables as l } from "@scalar/helpers/regex/replace-variables";
2
2
  import { unpackProxyObject as m } from "@scalar/workspace-store/helpers/unpack-proxy";
3
3
  import { getExampleFromBody as u } from "../../request-block/helpers/get-request-body-example.js";
4
- const b = (r, e = {}, p = "default") => {
5
- if (!r)
4
+ const w = (e, a = {}, p = "default") => {
5
+ if (!e)
6
6
  return null;
7
- const a = r?.["x-scalar-selected-content-type"]?.[p] ?? Object.keys(r?.content ?? {})[0] ?? "application/json", t = u(r, a, p);
7
+ const r = e?.["x-scalar-selected-content-type"]?.[p] ?? Object.keys(e?.content ?? {})[0] ?? "application/json", t = u(e, r, p);
8
8
  if (!t)
9
9
  return null;
10
- if ((a === "multipart/form-data" || a === "application/x-www-form-urlencoded") && Array.isArray(t.value)) {
11
- const n = a === "multipart/form-data" ? new FormData() : new URLSearchParams();
12
- return t.value.forEach(({ name: l, value: o }) => {
13
- if (!l)
10
+ if ((r === "multipart/form-data" || r === "application/x-www-form-urlencoded") && Array.isArray(t.value)) {
11
+ const s = t.value.filter((o) => !o.isDisabled), n = r === "multipart/form-data" ? new FormData() : new URLSearchParams();
12
+ return s.forEach(({ name: o, value: i }) => {
13
+ if (!o)
14
14
  return;
15
- const c = i(l, e);
16
- if (o instanceof File && n instanceof FormData) {
17
- const f = m(o);
15
+ const c = l(o, a);
16
+ if (i instanceof File && n instanceof FormData) {
17
+ const f = m(i);
18
18
  n.append(c, f, f.name);
19
- } else typeof o == "string" && n.append(c, i(o, e));
19
+ } else typeof i == "string" && n.append(c, l(i, a));
20
20
  }), n;
21
21
  }
22
- return typeof t.value == "object" ? i(JSON.stringify(t.value), e) : typeof t.value == "string" ? i(t.value, e) : t.value;
22
+ return typeof t.value == "object" ? l(JSON.stringify(t.value), a) : typeof t.value == "string" ? l(t.value, a) : t.value;
23
23
  };
24
24
  export {
25
- b as buildRequestBody
25
+ w as buildRequestBody
26
26
  };
@@ -1,7 +1,7 @@
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";
1
+ import { defineComponent as l, computed as r, createBlock as s, openBlock as p, resolveDynamicComponent as m, normalizeStyle as c, withCtx as d, renderSlot as h, createTextVNode as i, toDisplayString as u } from "vue";
2
2
  import { getHttpMethodInfo as f } from "@scalar/helpers/http/http-info";
3
3
  import { normalizeHttpMethod as y } from "@scalar/helpers/http/normalize-http-method";
4
- const z = /* @__PURE__ */ a({
4
+ const x = /* @__PURE__ */ l({
5
5
  __name: "HttpMethod",
6
6
  props: {
7
7
  as: {},
@@ -9,22 +9,22 @@ const z = /* @__PURE__ */ a({
9
9
  short: { type: Boolean },
10
10
  method: {}
11
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"), {
12
+ setup(t) {
13
+ const e = t, o = r(
14
+ () => f(String(e.method || ""))
15
+ ), n = r(() => y(e.method));
16
+ return (a, v) => (p(), s(m(t.as ?? "span"), {
17
17
  class: "uppercase",
18
- style: d({ [o.property || "color"]: e.value.colorVar })
18
+ style: c({ [t.property || "color"]: o.value.colorVar })
19
19
  }, {
20
- default: c(() => [
21
- h(o.$slots, "default"),
22
- i(" " + u(o.short ? e.value.short : n.value), 1)
20
+ default: d(() => [
21
+ h(a.$slots, "default"),
22
+ i(" " + u(t.short ? o.value.short : n.value), 1)
23
23
  ]),
24
24
  _: 3
25
25
  }, 8, ["style"]));
26
26
  }
27
27
  });
28
28
  export {
29
- z as default
29
+ x as default
30
30
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as $, computed as a, ref as b, watch as D, useId as I, createBlock as c, createCommentVNode as d, openBlock as s, unref as o, withCtx as n, createVNode as r, createSlots as N, createElementVNode as C, createElementBlock as S, renderSlot as v, createTextVNode as W, toDisplayString as R } from "vue";
2
- import { ScalarCard as x, ScalarCardHeader as z, ScalarCombobox as U, ScalarButton as A, ScalarCardSection as T, ScalarCodeBlock as F, ScalarVirtualText as M, ScalarCardFooter as K } from "@scalar/components";
1
+ import { defineComponent as $, computed as o, ref as b, watch as D, useId as I, createBlock as u, createCommentVNode as d, openBlock as s, unref as a, withCtx as n, createVNode as r, createSlots as N, createElementVNode as x, createElementBlock as g, renderSlot as p, createTextVNode as W, toDisplayString as R } from "vue";
2
+ import { ScalarCard as S, ScalarCardHeader as z, ScalarCombobox as U, ScalarButton as A, ScalarCardSection as T, ScalarCodeBlock as F, ScalarVirtualText as M, ScalarCardFooter as K } from "@scalar/components";
3
3
  import { freezeElement as Z } from "@scalar/helpers/dom/freeze-element";
4
4
  import { ScalarIconCaretDown as G } from "@scalar/icons";
5
5
  import { getResolvedRef as J } from "@scalar/workspace-store/helpers/get-resolved-ref";
@@ -11,10 +11,10 @@ import { getCustomCodeSamples as X } from "../helpers/get-custom-code-samples.js
11
11
  import { getSecrets as Y } from "../helpers/get-secrets.js";
12
12
  import { generateCodeSnippet as _ } from "../helpers/generate-code-snippet.js";
13
13
  import ee from "./ExamplePicker.vue.js";
14
- const te = ["innerHTML"], le = ["id"], oe = {
14
+ const te = ["innerHTML"], le = ["id"], ae = {
15
15
  key: 0,
16
16
  class: "request-card-footer-addon"
17
- }, ae = { class: "request-header" }, ne = {}, be = /* @__PURE__ */ $({
17
+ }, oe = { class: "request-header" }, ne = {}, be = /* @__PURE__ */ $({
18
18
  ...ne,
19
19
  __name: "OperationCodeSample",
20
20
  props: {
@@ -32,104 +32,104 @@ const te = ["innerHTML"], le = ["id"], oe = {
32
32
  generateLabel: { type: Function },
33
33
  isWebhook: { type: Boolean }
34
34
  },
35
- setup(t) {
36
- const i = a(() => {
37
- const e = J(t.operation.requestBody)?.content ?? {}, l = t.selectedContentType || Object.keys(e)[0];
38
- return l ? e[l]?.examples ?? {} : {};
35
+ setup(e) {
36
+ const i = o(() => {
37
+ const t = J(e.operation.requestBody)?.content ?? {}, l = e.selectedContentType || Object.keys(t)[0];
38
+ return l ? t[l]?.examples ?? {} : {};
39
39
  }), m = b(
40
- t.selectedExample ?? Object.keys(i.value)[0] ?? ""
41
- ), g = a(() => X(t.operation)), f = a(
42
- () => Q(g.value, t.clientOptions)
43
- ), u = b(
44
- q(f.value, t.selectedClient)
40
+ e.selectedExample ?? Object.keys(i.value)[0] ?? ""
41
+ ), C = o(() => X(e.operation)), f = o(
42
+ () => Q(C.value, e.clientOptions)
43
+ ), c = b(
44
+ q(f.value, e.selectedClient)
45
45
  );
46
46
  D(
47
- () => t.selectedClient,
48
- (e) => {
49
- const l = q(f.value, e);
50
- l && (u.value = l);
47
+ () => e.selectedClient,
48
+ (t) => {
49
+ const l = q(f.value, t);
50
+ l && (c.value = l);
51
51
  }
52
52
  );
53
- const y = a(() => {
54
- if (!t.isWebhook) return null;
53
+ const y = o(() => {
54
+ if (!e.isWebhook) return null;
55
55
  try {
56
56
  return P({
57
- operation: t.operation,
58
- method: t.method,
59
- path: t.path,
57
+ operation: e.operation,
58
+ method: e.method,
59
+ path: e.path,
60
60
  example: m.value
61
61
  });
62
- } catch (e) {
63
- return console.error("[webhookHar]", e), null;
62
+ } catch (t) {
63
+ return console.error("[webhookHar]", t), null;
64
64
  }
65
- }), h = a(() => t.isWebhook ? y.value?.postData?.text ?? "" : _({
66
- clientId: u.value?.id,
67
- customCodeSamples: g.value,
68
- operation: t.operation,
69
- method: t.method,
70
- path: t.path,
71
- contentType: t.selectedContentType,
72
- server: t.selectedServer,
73
- securitySchemes: t.securitySchemes,
65
+ }), h = o(() => e.isWebhook ? y.value?.postData?.text ?? "" : _({
66
+ clientId: c.value?.id,
67
+ customCodeSamples: C.value,
68
+ operation: e.operation,
69
+ method: e.method,
70
+ path: e.path,
71
+ contentType: e.selectedContentType,
72
+ server: e.selectedServer,
73
+ securitySchemes: e.securitySchemes,
74
74
  example: m.value
75
- })), B = a(() => t.isWebhook ? w.value : u.value?.lang), w = a(() => {
75
+ })), B = o(() => e.isWebhook ? w.value : c.value?.lang), w = o(() => {
76
76
  if (!y.value?.postData) return "json";
77
- const e = y.value.postData.mimeType;
78
- return e?.includes("json") ? "json" : e?.includes("xml") ? "xml" : e?.includes("yaml") || e?.includes("yml") ? "yaml" : e?.includes("text/plain") ? "text" : "json";
79
- }), O = a(() => Y(t.securitySchemes)), k = b(null), j = (e) => {
77
+ const t = y.value.postData.mimeType;
78
+ return t?.includes("json") ? "json" : t?.includes("xml") ? "xml" : t?.includes("yaml") || t?.includes("yml") ? "yaml" : t?.includes("text/plain") ? "text" : "json";
79
+ }), O = o(() => Y(e.securitySchemes)), k = b(null), j = (t) => {
80
80
  if (k.value) {
81
81
  const l = Z(k.value.$el);
82
82
  setTimeout(() => {
83
83
  l();
84
84
  }, 300);
85
85
  }
86
- u.value = e, e && !e.id.startsWith("custom") && t.eventBus.emit("workspace:update:selected-client", e.id);
87
- }, E = 2e4, H = a(
86
+ c.value = t, t && !t.id.startsWith("custom") && e.eventBus.emit("workspace:update:selected-client", t.id);
87
+ }, E = 2e4, H = o(
88
88
  () => (h.value.length ?? 0) > E
89
89
  ), L = I();
90
- return (e, l) => h.value ? (s(), c(o(x), {
90
+ return (t, l) => h.value ? (s(), u(a(S), {
91
91
  key: 0,
92
92
  ref_key: "elem",
93
93
  ref: k,
94
94
  class: "request-card dark-mode"
95
95
  }, {
96
96
  default: n(() => [
97
- r(o(z), { class: "pr-2.5" }, N({
97
+ r(a(z), { class: "pr-2.5" }, N({
98
98
  default: n(() => [
99
- l[2] || (l[2] = C("span", { class: "sr-only" }, "Request Example for", -1)),
99
+ l[2] || (l[2] = x("span", { class: "sr-only" }, "Request Example for", -1)),
100
100
  r(V, {
101
101
  as: "span",
102
102
  class: "request-method",
103
103
  method: e.method
104
104
  }, null, 8, ["method"]),
105
- e.generateLabel ? (s(), S("span", {
105
+ e.generateLabel ? (s(), g("span", {
106
106
  key: 0,
107
107
  innerHTML: e.generateLabel()
108
108
  }, null, 8, te)) : d("", !0),
109
- v(e.$slots, "header", {}, void 0, !0)
109
+ p(t.$slots, "header", {}, void 0, !0)
110
110
  ]),
111
111
  _: 2
112
112
  }, [
113
113
  !e.isWebhook && f.value.length ? {
114
114
  name: "actions",
115
115
  fn: n(() => [
116
- r(o(U), {
116
+ r(a(U), {
117
117
  class: "max-h-80",
118
- modelValue: u.value,
118
+ modelValue: c.value,
119
119
  options: f.value,
120
120
  placement: "bottom-end",
121
121
  teleport: "",
122
- "onUpdate:modelValue": l[0] || (l[0] = (p) => j(p))
122
+ "onUpdate:modelValue": l[0] || (l[0] = (v) => j(v))
123
123
  }, {
124
124
  default: n(() => [
125
- r(o(A), {
125
+ r(a(A), {
126
126
  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",
127
127
  "data-testid": "client-picker",
128
128
  variant: "ghost"
129
129
  }, {
130
130
  default: n(() => [
131
- W(R(u.value?.title) + " ", 1),
132
- r(o(G), {
131
+ W(R(c.value?.title) + " ", 1),
132
+ r(a(G), {
133
133
  class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
134
134
  weight: "bold"
135
135
  })
@@ -143,19 +143,19 @@ const te = ["innerHTML"], le = ["id"], oe = {
143
143
  key: "0"
144
144
  } : void 0
145
145
  ]), 1024),
146
- r(o(T), { class: "request-editor-section custom-scroll p-0" }, {
146
+ r(a(T), { class: "request-editor-section custom-scroll p-0" }, {
147
147
  default: n(() => [
148
- C("div", {
149
- id: `${o(L)}-example`,
148
+ x("div", {
149
+ id: `${a(L)}-example`,
150
150
  class: "code-snippet"
151
151
  }, [
152
- H.value ? (s(), c(o(M), {
152
+ H.value ? (s(), u(a(M), {
153
153
  key: 1,
154
154
  containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
155
155
  contentClass: "language-plaintext whitespace-pre font-code text-base",
156
156
  lineHeight: 20,
157
157
  text: h.value
158
- }, null, 8, ["text"])) : (s(), c(o(F), {
158
+ }, null, 8, ["text"])) : (s(), u(a(F), {
159
159
  key: 0,
160
160
  class: "bg-b-2 !min-h-full -outline-offset-2",
161
161
  content: h.value,
@@ -167,41 +167,41 @@ const te = ["innerHTML"], le = ["id"], oe = {
167
167
  ]),
168
168
  _: 1
169
169
  }),
170
- Object.keys(i.value).length > 1 || e.$slots.footer ? (s(), c(o(K), {
170
+ Object.keys(i.value).length > 1 || t.$slots.footer ? (s(), u(a(K), {
171
171
  key: 0,
172
172
  class: "request-card-footer bg-b-3"
173
173
  }, {
174
174
  default: n(() => [
175
- Object.keys(i.value).length > 1 ? (s(), S("div", oe, [
176
- Object.keys(i.value).length ? (s(), c(ee, {
175
+ Object.keys(i.value).length > 1 ? (s(), g("div", ae, [
176
+ Object.keys(i.value).length ? (s(), u(ee, {
177
177
  key: 0,
178
178
  modelValue: m.value,
179
- "onUpdate:modelValue": l[1] || (l[1] = (p) => m.value = p),
179
+ "onUpdate:modelValue": l[1] || (l[1] = (v) => m.value = v),
180
180
  examples: i.value
181
181
  }, null, 8, ["modelValue", "examples"])) : d("", !0)
182
182
  ])) : d("", !0),
183
- v(e.$slots, "footer", {}, void 0, !0)
183
+ p(t.$slots, "footer", {}, void 0, !0)
184
184
  ]),
185
185
  _: 3
186
186
  })) : d("", !0)
187
187
  ]),
188
188
  _: 3
189
- }, 512)) : e.fallback ? (s(), c(o(x), {
189
+ }, 512)) : e.fallback ? (s(), u(a(S), {
190
190
  key: 1,
191
191
  class: "request-card dark-mode"
192
192
  }, {
193
193
  default: n(() => [
194
- r(o(T), { class: "request-card-simple" }, {
194
+ r(a(T), { class: "request-card-simple" }, {
195
195
  default: n(() => [
196
- C("div", ae, [
196
+ x("div", oe, [
197
197
  r(V, {
198
198
  as: "span",
199
199
  class: "request-method",
200
200
  method: e.method
201
201
  }, null, 8, ["method"]),
202
- v(e.$slots, "header", {}, void 0, !0)
202
+ p(t.$slots, "header", {}, void 0, !0)
203
203
  ]),
204
- v(e.$slots, "footer", {}, void 0, !0)
204
+ p(t.$slots, "footer", {}, void 0, !0)
205
205
  ]),
206
206
  _: 3
207
207
  })
@@ -3,7 +3,7 @@ import type { AvailableClient } from '@scalar/snippetz';
3
3
  import type { XCodeSample } from '@scalar/workspace-store/schemas/extensions/operation';
4
4
  import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
5
5
  import { type CustomCodeSampleId } from './generate-client-options.js';
6
- export type GenerateCodeSnippetProps = {
6
+ type GenerateCodeSnippetProps = {
7
7
  /** The selected client/language for code generation (e.g., 'node/fetch') or a custom code sample ID. */
8
8
  clientId: AvailableClient | CustomCodeSampleId | undefined;
9
9
  /** The Content-Type header value for the request body (e.g., 'application/json'). */
@@ -25,4 +25,5 @@ export type GenerateCodeSnippetProps = {
25
25
  };
26
26
  /** Generate the code snippet for the selected example OR operation */
27
27
  export declare const generateCodeSnippet: ({ clientId, customCodeSamples, operation, method, path, example, contentType, server, securitySchemes, }: GenerateCodeSnippetProps) => string;
28
+ export {};
28
29
  //# sourceMappingURL=generate-code-snippet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-code-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/generate-code-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,kBAAkB,CAAA;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAA;AACvF,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,2BAA2B,CAAA;AAErF,MAAM,MAAM,wBAAwB,GAAG;IACrC,wGAAwG;IACxG,QAAQ,EAAE,eAAe,GAAG,kBAAkB,GAAG,SAAS,CAAA;IAC1D,qFAAqF;IACrF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,mFAAmF;IACnF,iBAAiB,EAAE,WAAW,EAAE,CAAA;IAChC,0EAA0E;IAC1E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,gEAAgE;IAChE,MAAM,EAAE,UAAU,CAAA;IAClB,wEAAwE;IACxE,SAAS,EAAE,eAAe,CAAA;IAC1B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAA;IACZ,iFAAiF;IACjF,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,mEAAmE;IACnE,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,GAAI,0GAUjC,wBAAwB,KAAG,MAqC7B,CAAA"}
1
+ {"version":3,"file":"generate-code-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/generate-code-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,kBAAkB,CAAA;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAA;AACvF,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,2BAA2B,CAAA;AAErF,KAAK,wBAAwB,GAAG;IAC9B,wGAAwG;IACxG,QAAQ,EAAE,eAAe,GAAG,kBAAkB,GAAG,SAAS,CAAA;IAC1D,qFAAqF;IACrF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,mFAAmF;IACnF,iBAAiB,EAAE,WAAW,EAAE,CAAA;IAChC,0EAA0E;IAC1E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,gEAAgE;IAChE,MAAM,EAAE,UAAU,CAAA;IAClB,wEAAwE;IACxE,SAAS,EAAE,eAAe,CAAA;IAC1B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAA;IACZ,iFAAiF;IACjF,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,mEAAmE;IACnE,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,GAAI,0GAUjC,wBAAwB,KAAG,MAqC7B,CAAA"}