@scalar/api-client 2.18.0 → 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 (294) hide show
  1. package/CHANGELOG.md +85 -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/hooks/useClientConfig.js +1 -1
  55. package/dist/hooks/useLayout.js +1 -1
  56. package/dist/hooks/useSidebar.js +1 -1
  57. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  58. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  59. package/dist/libs/create-client.d.ts.map +1 -1
  60. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  61. package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -1
  62. package/dist/plugins/hooks/usePluginManager.js +5 -5
  63. package/dist/plugins/index.d.ts +1 -1
  64. package/dist/plugins/index.d.ts.map +1 -1
  65. package/dist/plugins/index.js +5 -5
  66. package/dist/plugins/plugin-manager.d.ts +0 -2
  67. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  68. package/dist/routes.d.ts +0 -10
  69. package/dist/routes.d.ts.map +1 -1
  70. package/dist/routes.js +0 -1
  71. package/dist/store/active-entities.js +1 -1
  72. package/dist/store/security-schemes.d.ts.map +1 -1
  73. package/dist/store/store.d.ts.map +1 -1
  74. package/dist/style.css +1 -1
  75. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  76. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +44 -44
  77. package/dist/v2/blocks/operation-block/components/Header.vue2.js +20 -20
  78. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  79. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +14 -14
  80. package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -2
  81. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +12 -12
  82. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +65 -65
  83. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -1
  84. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  85. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +6 -6
  86. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +4 -3
  87. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -1
  88. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +9 -7
  89. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  90. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +40 -32
  91. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -3
  92. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  93. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -1
  94. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  95. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  96. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +144 -149
  97. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +25 -45
  98. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  99. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  100. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +90 -139
  101. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +22 -0
  102. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -0
  103. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +77 -0
  104. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +4 -0
  105. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +4 -4
  106. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  107. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +34 -34
  108. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
  109. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
  111. package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -32
  112. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
  113. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  114. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +64 -64
  115. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +29 -29
  116. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +2 -2
  117. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  118. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +12 -13
  119. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +8 -0
  120. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -0
  121. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +9 -0
  122. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -1
  123. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
  124. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +9 -8
  125. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +67 -67
  126. package/dist/v2/blocks/response-block/components/Headers.vue.js +35 -35
  127. package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +24 -24
  128. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +10 -10
  129. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +24 -24
  130. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +10 -10
  131. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +11 -11
  132. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +14 -14
  133. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +11 -11
  134. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +33 -33
  135. package/dist/v2/blocks/response-block/helpers/media-types.d.ts +3 -6
  136. package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
  137. package/dist/v2/blocks/response-block/helpers/media-types.js +0 -1
  138. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +72 -72
  139. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +9 -9
  140. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts +0 -33
  141. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts.map +1 -1
  142. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -1
  143. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  144. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +83 -82
  145. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +10 -10
  146. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +121 -121
  147. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +13 -13
  148. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +33 -33
  149. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  150. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -26
  151. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +26 -26
  152. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
  153. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  154. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +130 -122
  155. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +0 -21
  156. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  157. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -3
  158. package/dist/v2/components/code-input/CodeInput.vue2.js +93 -93
  159. package/dist/v2/components/data-table/DataTable.vue.js +17 -17
  160. package/dist/v2/components/data-table/DataTableCell.vue.js +9 -9
  161. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +17 -17
  162. package/dist/v2/components/data-table/DataTableInput.vue2.js +48 -48
  163. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +35 -35
  164. package/dist/v2/components/data-table/DataTableText.vue.js +10 -10
  165. package/dist/v2/components/forms/ConfirmationForm.vue.js +13 -13
  166. package/dist/v2/components/layout/CollapsibleSection.vue.js +42 -42
  167. package/dist/v2/components/modals/DeleteModal.vue.js +13 -13
  168. package/dist/v2/components/resize/Resize.vue2.js +11 -11
  169. package/dist/v2/components/server/ServerDropdown.vue.js +30 -30
  170. package/dist/v2/components/server/ServerDropdownItem.vue2.js +27 -27
  171. package/dist/v2/components/sidebar/Sidebar.vue.js +32 -32
  172. package/dist/v2/components/sidebar/SidebarMenu.vue.js +20 -20
  173. package/dist/v2/features/app/App.vue.js +25 -25
  174. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  175. package/dist/v2/features/app/app-events.js +55 -61
  176. package/dist/v2/features/app/components/AppSidebar.vue2.js +97 -97
  177. package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +20 -20
  178. package/dist/v2/features/app/components/DesktopTab.vue2.js +59 -59
  179. package/dist/v2/features/app/components/DesktopTabs.vue.js +22 -22
  180. package/dist/v2/features/app/components/SidebarItemMenu.vue.js +6 -6
  181. package/dist/v2/features/app/components/WebTopNav.vue.js +9 -9
  182. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -5
  183. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  184. package/dist/v2/features/app/helpers/create-api-client-app.js +1 -2
  185. package/dist/v2/features/app/helpers/routes.d.ts +5 -1
  186. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  187. package/dist/v2/features/collection/DocumentCollection.vue.js +31 -31
  188. package/dist/v2/features/collection/WorkspaceCollection.vue.js +17 -17
  189. package/dist/v2/features/collection/components/Authentication.vue2.js +18 -18
  190. package/dist/v2/features/collection/components/Cookies.vue.js +10 -10
  191. package/dist/v2/features/collection/components/Environment.vue.js +10 -10
  192. package/dist/v2/features/collection/components/Form.vue.js +21 -21
  193. package/dist/v2/features/collection/components/Overview.vue2.js +25 -25
  194. package/dist/v2/features/collection/components/Servers.vue.js +37 -37
  195. package/dist/v2/features/collection/components/Settings.vue.js +22 -22
  196. package/dist/v2/features/collection/components/Tabs.vue.js +18 -18
  197. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +20 -20
  198. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +17 -17
  199. package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +68 -68
  200. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +11 -11
  201. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +2 -1
  202. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -1
  203. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +2 -1
  204. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -1
  205. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +3 -3
  206. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  207. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -1
  208. package/dist/v2/features/command-palette/types.d.ts +11 -10
  209. package/dist/v2/features/command-palette/types.d.ts.map +1 -1
  210. package/dist/v2/features/environments/EnvironmentsList.vue.js +36 -36
  211. package/dist/v2/features/environments/components/Environment.vue.js +16 -16
  212. package/dist/v2/features/environments/components/EnvironmentColors.vue.js +37 -37
  213. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +19 -19
  214. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +14 -14
  215. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +24 -24
  216. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +58 -58
  217. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +23 -23
  218. package/dist/v2/features/modal/Modal.vue.d.ts +1 -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 +57 -56
  222. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +5 -4
  223. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  224. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -1
  225. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +17 -21
  226. package/dist/v2/features/operation/Operation.vue.d.ts +5 -1
  227. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  228. package/dist/v2/features/operation/Operation.vue.js +41 -39
  229. package/dist/v2/features/search/components/SearchButton.vue.js +40 -40
  230. package/dist/v2/features/search/components/SearchModal.vue2.js +43 -43
  231. package/dist/v2/features/search/components/SearchResult.vue.js +34 -34
  232. package/dist/v2/features/search/types.d.ts +5 -4
  233. package/dist/v2/features/search/types.d.ts.map +1 -1
  234. package/dist/v2/features/settings/CollectionSettings.vue.js +51 -51
  235. package/dist/v2/features/settings/DocumentSettings.vue.js +25 -25
  236. package/dist/v2/features/settings/components/Appearance.vue.js +27 -27
  237. package/dist/v2/helpers/handle-hotkeys.d.ts +1 -12
  238. package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
  239. package/dist/v2/helpers/handle-hotkeys.js +0 -2
  240. package/dist/v2/helpers/plugins.d.ts +2 -2
  241. package/dist/v2/helpers/plugins.d.ts.map +1 -1
  242. package/dist/views/Collection/CollectionNavigation.vue.js +13 -13
  243. package/dist/views/Collection/components/EnvironmentForm.vue2.js +114 -114
  244. package/dist/views/Collection/components/MarkdownInput.vue2.js +31 -31
  245. package/dist/views/Cookies/CookieModal.vue2.js +26 -26
  246. package/dist/views/Environment/EnvironmentColorModal.vue.js +10 -10
  247. package/dist/views/Environment/EnvironmentColors.vue.js +56 -56
  248. package/dist/views/Environment/EnvironmentModal.vue.js +26 -26
  249. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +24 -24
  250. package/dist/views/Request/Request.vue2.js +55 -55
  251. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +17 -17
  252. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +102 -102
  253. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -27
  254. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  255. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +91 -91
  256. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  257. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +36 -36
  258. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +101 -101
  259. package/dist/views/Request/RequestSection/RequestBody.vue2.js +154 -154
  260. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +35 -35
  261. package/dist/views/Request/RequestSection/RequestParams.vue.js +81 -81
  262. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +47 -47
  263. package/dist/views/Request/RequestSection/RequestSection.vue2.js +90 -90
  264. package/dist/views/Request/RequestSection/RequestTable.vue2.js +111 -111
  265. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +29 -29
  266. package/dist/views/Request/RequestSection/index.d.ts +1 -1
  267. package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
  268. package/dist/views/Request/RequestSection/index.js +4 -4
  269. package/dist/views/Request/RequestSidebarItem.vue2.js +149 -149
  270. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +79 -79
  271. package/dist/views/Request/RequestSubpageHeader.vue2.js +30 -30
  272. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +29 -29
  273. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +37 -37
  274. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +10 -10
  275. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +24 -24
  276. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +10 -10
  277. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +16 -16
  278. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +21 -21
  279. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +30 -30
  280. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -37
  281. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +61 -61
  282. package/package.json +24 -24
  283. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +0 -6
  284. package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +0 -1
  285. package/dist/components/ImportCollection/OperationBadge.vue.d.ts +0 -8
  286. package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +0 -1
  287. package/dist/components/ScreenReader.vue.d.ts +0 -20
  288. package/dist/components/ScreenReader.vue.d.ts.map +0 -1
  289. package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts +0 -9
  290. package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts.map +0 -1
  291. package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts +0 -3
  292. package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts.map +0 -1
  293. package/dist/views/Request/RequestSection/types/post-response.d.ts +0 -7
  294. package/dist/views/Request/RequestSection/types/post-response.d.ts.map +0 -1
@@ -1,9 +1,9 @@
1
- import { defineComponent as B, computed as f, createBlock as p, openBlock as u, unref as t, withCtx as n, createVNode as d, createElementBlock as D, createTextVNode as s, toDisplayString as m, Fragment as F, renderList as k } from "vue";
1
+ import { defineComponent as B, computed as f, createBlock as b, openBlock as r, unref as o, withCtx as n, createVNode as i, createElementBlock as D, createTextVNode as m, toDisplayString as s, Fragment as k, renderList as F } from "vue";
2
2
  import U from "./RequestTableRow.vue.js";
3
- import C from "../../../components/data-table/DataTable.vue.js";
4
- import P from "../../../components/data-table/DataTableRow.vue.js";
3
+ import x from "../../../components/data-table/DataTable.vue.js";
4
+ import C from "../../../components/data-table/DataTableRow.vue.js";
5
5
  import c from "../../../components/data-table/DataTableHeader.vue.js";
6
- const V = /* @__PURE__ */ B({
6
+ const A = /* @__PURE__ */ B({
7
7
  __name: "RequestTable",
8
8
  props: {
9
9
  data: {},
@@ -16,54 +16,52 @@ const V = /* @__PURE__ */ B({
16
16
  environment: {}
17
17
  },
18
18
  emits: ["addRow", "updateRow", "deleteRow", "uploadFile", "removeFile"],
19
- setup(a, { emit: b }) {
20
- const l = b, w = (e) => {
21
- l("uploadFile", e);
22
- }, h = f(() => a.showUploadButton ? ["36px", "", "", "auto"] : ["36px", "", ""]), R = f(() => {
23
- if (!a.showAddRowPlaceholder)
24
- return a.data;
25
- const e = a.data.at(-1);
26
- return !e || e.name !== "" || e.value !== "" ? [...a.data, { name: "", value: "", isDisabled: !0 }] : a.data;
19
+ setup(e, { emit: w }) {
20
+ const l = w, h = f(() => e.showUploadButton ? ["36px", "", "", "auto"] : ["36px", "", ""]), R = f(() => {
21
+ if (!e.showAddRowPlaceholder)
22
+ return e.data;
23
+ const a = e.data.at(-1);
24
+ return !a || a.name !== "" || a.value !== "" ? [...e.data, { name: "", value: "", isDisabled: !0 }] : e.data;
27
25
  }), v = ({
28
- index: e,
29
- payload: r
26
+ index: a,
27
+ payload: u
30
28
  }) => {
31
- if (e >= a.data.length) {
32
- l("addRow", r);
29
+ if (a >= e.data.length) {
30
+ l("addRow", u);
33
31
  return;
34
32
  }
35
- l("updateRow", e, r);
33
+ l("updateRow", a, u);
36
34
  };
37
- return (e, r) => (u(), p(t(C), {
35
+ return (a, u) => (r(), b(o(x), {
38
36
  class: "group/table flex-1",
39
37
  columns: h.value
40
38
  }, {
41
39
  default: n(() => [
42
- d(t(P), { class: "sr-only !block" }, {
40
+ i(o(C), { class: "sr-only !block" }, {
43
41
  default: n(() => [
44
- d(t(c), null, {
42
+ i(o(c), null, {
45
43
  default: n(() => [
46
- s(m(e.label) + " Enabled", 1)
44
+ m(s(e.label) + " Enabled", 1)
47
45
  ]),
48
46
  _: 1
49
47
  }),
50
- d(t(c), null, {
48
+ i(o(c), null, {
51
49
  default: n(() => [
52
- s(m(e.label) + " Key", 1)
50
+ m(s(e.label) + " Key", 1)
53
51
  ]),
54
52
  _: 1
55
53
  }),
56
- d(t(c), null, {
54
+ i(o(c), null, {
57
55
  default: n(() => [
58
- s(m(e.label) + " Value", 1)
56
+ m(s(e.label) + " Value", 1)
59
57
  ]),
60
58
  _: 1
61
59
  })
62
60
  ]),
63
61
  _: 1
64
62
  }),
65
- (u(!0), D(F, null, k(R.value, (y, o) => (u(), p(U, {
66
- key: o,
63
+ (r(!0), D(k, null, F(R.value, (y, t) => (r(), b(U, {
64
+ key: t,
67
65
  data: y,
68
66
  environment: e.environment,
69
67
  hasCheckboxDisabled: e.hasCheckboxDisabled,
@@ -71,10 +69,10 @@ const V = /* @__PURE__ */ B({
71
69
  isReadOnly: e.isReadOnly,
72
70
  label: e.label,
73
71
  showUploadButton: e.showUploadButton,
74
- onDeleteRow: (i) => l("deleteRow", o),
75
- onRemoveFile: (i) => l("removeFile", o),
76
- onUpdateRow: (i) => v({ index: o, payload: i }),
77
- onUploadFile: () => w(o)
72
+ onDeleteRow: (d) => l("deleteRow", t),
73
+ onRemoveFile: (d) => l("removeFile", t),
74
+ onUpdateRow: (d) => v({ index: t, payload: d }),
75
+ onUploadFile: (d) => l("uploadFile", t)
78
76
  }, null, 8, ["data", "environment", "hasCheckboxDisabled", "invalidParams", "isReadOnly", "label", "showUploadButton", "onDeleteRow", "onRemoveFile", "onUpdateRow", "onUploadFile"]))), 128))
79
77
  ]),
80
78
  _: 1
@@ -82,5 +80,5 @@ const V = /* @__PURE__ */ B({
82
80
  }
83
81
  });
84
82
  export {
85
- V as default
83
+ A as default
86
84
  };
@@ -20,7 +20,7 @@ export type TableRow = {
20
20
  };
21
21
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
22
22
  updateRow: (payload: Partial<{
23
- key: string;
23
+ name: string;
24
24
  value: string;
25
25
  isDisabled: boolean;
26
26
  }>) => any;
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
29
29
  removeFile: () => any;
30
30
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
31
31
  onUpdateRow?: ((payload: Partial<{
32
- key: string;
32
+ name: string;
33
33
  value: string;
34
34
  isDisabled: boolean;
35
35
  }>) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAiOA,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;;;;;;AAiftE,wBAOG"}
1
+ {"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAkOA,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;;;cAhB4B,MAAM;eAAS,MAAM;oBAAc,OAAO;;;;;;;cAA1C,MAAM;eAAS,MAAM;oBAAc,OAAO;;;;;;AAifvE,wBAOG"}
@@ -1,19 +1,19 @@
1
- import { defineComponent as T, computed as r, createBlock as m, openBlock as s, unref as l, normalizeClass as z, withCtx as n, createVNode as i, createCommentVNode as c, createElementVNode as u, createElementBlock as v, Fragment as D, toDisplayString as $ } from "vue";
1
+ import { defineComponent as p, computed as u, createBlock as s, openBlock as m, unref as t, normalizeClass as z, withCtx as i, createVNode as o, createCommentVNode as f, createElementVNode as r, createElementBlock as x, Fragment as D, toDisplayString as $ } from "vue";
2
2
  import { ScalarTooltip as q, ScalarIcon as h, ScalarButton as y } from "@scalar/components";
3
3
  import { ScalarIconTrash as I } from "@scalar/icons";
4
- import { unpackProxyObject as p } from "@scalar/workspace-store/helpers/unpack-proxy";
4
+ import { unpackProxyObject as c } from "@scalar/workspace-store/helpers/unpack-proxy";
5
5
  import { RouterLink as U } from "vue-router";
6
6
  import { getFileName as k } from "../helpers/files.js";
7
7
  import { validateParameter as j } from "../helpers/validate-parameter.js";
8
8
  import E from "./RequestTableTooltip.vue.js";
9
9
  import N from "../../../components/data-table/DataTableRow.vue.js";
10
10
  import O from "../../../components/data-table/DataTableCheckbox.vue.js";
11
- import f from "../../../components/data-table/DataTableCell.vue.js";
11
+ import b from "../../../components/data-table/DataTableCell.vue.js";
12
12
  import w from "../../../components/code-input/CodeInput.vue.js";
13
13
  const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center justify-center overflow-hidden p-1" }, G = {
14
14
  key: 1,
15
15
  class: "p-0.5"
16
- }, ee = /* @__PURE__ */ T({
16
+ }, ee = /* @__PURE__ */ p({
17
17
  __name: "RequestTableRow",
18
18
  props: {
19
19
  data: {},
@@ -25,45 +25,45 @@ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
25
25
  showUploadButton: { type: Boolean }
26
26
  },
27
27
  emits: ["updateRow", "deleteRow", "uploadFile", "removeFile"],
28
- setup(t, { emit: g }) {
29
- const d = g, R = r(() => t.data.schema?.default), V = r(() => t.data.schema?.enum), B = r(
30
- () => t.data.schema && "minimum" in t.data.schema ? t.data.schema.minimum : void 0
31
- ), C = r(
32
- () => t.data.schema && "maximum" in t.data.schema ? t.data.schema.maximum : void 0
33
- ), x = r(
34
- () => t.data.schema && "type" in t.data.schema ? t.data.schema.type : void 0
35
- ), b = r(
36
- () => j(t.data.schema, t.data.value)
37
- ), F = (e) => e instanceof File, S = r({
28
+ setup(e, { emit: g }) {
29
+ const d = g, R = u(() => e.data.schema?.default), V = u(() => e.data.schema?.enum), B = u(
30
+ () => e.data.schema && "minimum" in e.data.schema ? e.data.schema.minimum : void 0
31
+ ), C = u(
32
+ () => e.data.schema && "maximum" in e.data.schema ? e.data.schema.maximum : void 0
33
+ ), F = u(
34
+ () => e.data.schema && "type" in e.data.schema ? e.data.schema.type : void 0
35
+ ), v = u(
36
+ () => j(e.data.schema, e.data.value)
37
+ ), S = (n) => n instanceof File, T = u({
38
38
  get: () => {
39
- const e = p(t.data.value);
40
- return e instanceof File ? k(p(t.data.value)) ?? "" : e === null ? "" : e;
39
+ const n = c(e.data.value);
40
+ return n instanceof File ? k(c(e.data.value)) ?? "" : n === null ? "" : n;
41
41
  },
42
- set: (e) => {
43
- typeof e == "string" && d("updateRow", { value: e });
42
+ set: (n) => {
43
+ typeof n == "string" && d("updateRow", { value: n });
44
44
  }
45
45
  });
46
- return (e, a) => (s(), m(l(N), {
46
+ return (n, a) => (m(), s(t(N), {
47
47
  id: e.data.name,
48
48
  class: z({
49
- alert: b.value.ok === !1,
50
- error: b.value.ok === !1 && e.invalidParams?.has(e.data.name)
49
+ alert: v.value.ok === !1,
50
+ error: v.value.ok === !1 && e.invalidParams?.has(e.data.name)
51
51
  })
52
52
  }, {
53
- default: n(() => [
54
- e.data.globalRoute !== void 0 ? (s(), m(l(U), {
53
+ default: i(() => [
54
+ e.data.globalRoute !== void 0 ? (m(), s(t(U), {
55
55
  key: 0,
56
56
  class: "text-c-2 flex items-center justify-center border-t !border-r",
57
57
  to: e.data.globalRoute ?? {}
58
58
  }, {
59
- default: n(() => [
60
- a[7] || (a[7] = u("span", { class: "sr-only" }, "Global", -1)),
61
- i(l(q), {
59
+ default: i(() => [
60
+ a[7] || (a[7] = r("span", { class: "sr-only" }, "Global", -1)),
61
+ o(t(q), {
62
62
  content: "Global cookies are shared across the whole workspace.",
63
63
  placement: "top"
64
64
  }, {
65
- default: n(() => [
66
- i(l(h), {
65
+ default: i(() => [
66
+ o(t(h), {
67
67
  class: "text-c-1",
68
68
  icon: "Globe",
69
69
  size: "xs",
@@ -74,16 +74,16 @@ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
74
74
  })
75
75
  ]),
76
76
  _: 1
77
- }, 8, ["to"])) : (s(), m(l(O), {
77
+ }, 8, ["to"])) : (m(), s(t(O), {
78
78
  key: 1,
79
79
  class: "!border-r",
80
80
  disabled: e.hasCheckboxDisabled ?? !1,
81
81
  modelValue: !e.data.isDisabled,
82
- "onUpdate:modelValue": a[0] || (a[0] = (o) => d("updateRow", { isDisabled: !o }))
82
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => d("updateRow", { isDisabled: !l }))
83
83
  }, null, 8, ["disabled", "modelValue"])),
84
- i(l(f), null, {
85
- default: n(() => [
86
- i(l(w), {
84
+ o(t(b), null, {
85
+ default: i(() => [
86
+ o(t(w), {
87
87
  "aria-label": `${e.label} Key`,
88
88
  disableCloseBrackets: "",
89
89
  disabled: e.isReadOnly,
@@ -94,15 +94,15 @@ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
94
94
  modelValue: e.data.name,
95
95
  placeholder: "Key",
96
96
  required: !!e.data.isRequired,
97
- onSelectVariable: a[1] || (a[1] = (o) => d("updateRow", { key: o })),
98
- "onUpdate:modelValue": a[2] || (a[2] = (o) => d("updateRow", { key: o }))
97
+ onSelectVariable: a[1] || (a[1] = (l) => d("updateRow", { name: l })),
98
+ "onUpdate:modelValue": a[2] || (a[2] = (l) => d("updateRow", { name: l }))
99
99
  }, null, 8, ["aria-label", "disabled", "environment", "modelValue", "required"])
100
100
  ]),
101
101
  _: 1
102
102
  }),
103
- i(l(f), null, {
104
- default: n(() => [
105
- i(l(w), {
103
+ o(t(b), null, {
104
+ default: i(() => [
105
+ o(t(w), {
106
106
  "aria-label": `${e.label} Value`,
107
107
  class: "pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10",
108
108
  default: R.value,
@@ -112,64 +112,64 @@ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
112
112
  disableTabIndent: "",
113
113
  enum: V.value ?? [],
114
114
  environment: e.environment,
115
- examples: e.data.schema?.examples?.map((o) => String(o)) ?? [],
115
+ examples: e.data.schema?.examples?.map((l) => String(l)) ?? [],
116
116
  lineWrapping: "",
117
117
  max: C.value,
118
118
  min: B.value,
119
- modelValue: S.value,
119
+ modelValue: T.value,
120
120
  placeholder: "Value",
121
- type: x.value,
122
- "onUpdate:modelValue": a[4] || (a[4] = (o) => d("updateRow", { value: o }))
121
+ type: F.value,
122
+ "onUpdate:modelValue": a[4] || (a[4] = (l) => d("updateRow", { value: l }))
123
123
  }, {
124
- icon: n(() => [
125
- (e.data.name || e.data.value) && !e.data.isRequired ? (s(), m(l(y), {
124
+ icon: i(() => [
125
+ (e.data.name || e.data.value) && !e.data.isRequired ? (m(), s(t(y), {
126
126
  key: 0,
127
127
  class: "text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex",
128
128
  size: "sm",
129
129
  variant: "ghost",
130
- onClick: a[3] || (a[3] = (o) => d("deleteRow"))
130
+ onClick: a[3] || (a[3] = (l) => d("deleteRow"))
131
131
  }, {
132
- default: n(() => [
133
- i(l(I), { class: "size-3.5" })
132
+ default: i(() => [
133
+ o(t(I), { class: "size-3.5" })
134
134
  ]),
135
135
  _: 1
136
- })) : c("", !0),
137
- e.data.schema ? (s(), m(E, {
136
+ })) : f("", !0),
137
+ e.data.schema ? (m(), s(E, {
138
138
  key: 1,
139
139
  description: e.data.description,
140
140
  schema: e.data.schema,
141
141
  value: e.data.value
142
- }, null, 8, ["description", "schema", "value"])) : c("", !0)
142
+ }, null, 8, ["description", "schema", "value"])) : f("", !0)
143
143
  ]),
144
144
  _: 1
145
145
  }, 8, ["aria-label", "default", "disabled", "enum", "environment", "examples", "max", "min", "modelValue", "type"])
146
146
  ]),
147
147
  _: 1
148
148
  }),
149
- e.showUploadButton ? (s(), m(l(f), {
149
+ e.showUploadButton ? (m(), s(t(b), {
150
150
  key: 2,
151
151
  class: "group/upload flex items-center justify-center whitespace-nowrap"
152
152
  }, {
153
- default: n(() => [
154
- F(l(p)(e.data.value)) ? (s(), v(D, { key: 0 }, [
155
- u("div", P, [
156
- u("span", null, $(l(k)(l(p)(e.data.value))), 1)
153
+ default: i(() => [
154
+ S(t(c)(e.data.value)) ? (m(), x(D, { key: 0 }, [
155
+ r("div", P, [
156
+ r("span", null, $(t(k)(t(c)(e.data.value))), 1)
157
157
  ]),
158
- u("button", {
158
+ r("button", {
159
159
  class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
160
160
  type: "button",
161
- onClick: a[5] || (a[5] = (o) => d("removeFile"))
161
+ onClick: a[5] || (a[5] = (l) => d("removeFile"))
162
162
  }, " Delete ")
163
- ], 64)) : (s(), v("div", G, [
164
- i(l(y), {
163
+ ], 64)) : (m(), x("div", G, [
164
+ o(t(y), {
165
165
  class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
166
166
  size: "sm",
167
167
  variant: "outlined",
168
- onClick: a[6] || (a[6] = (o) => d("uploadFile"))
168
+ onClick: a[6] || (a[6] = (l) => d("uploadFile"))
169
169
  }, {
170
- default: n(() => [
171
- a[8] || (a[8] = u("span", null, "Select File", -1)),
172
- i(l(h), {
170
+ default: i(() => [
171
+ a[8] || (a[8] = r("span", null, "Select File", -1)),
172
+ o(t(h), {
173
173
  class: "ml-1",
174
174
  icon: "Upload",
175
175
  size: "xs",
@@ -181,7 +181,7 @@ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
181
181
  ]))
182
182
  ]),
183
183
  _: 1
184
- })) : c("", !0)
184
+ })) : f("", !0)
185
185
  ]),
186
186
  _: 1
187
187
  }, 8, ["id", "class"]));
@@ -1,63 +1,63 @@
1
- import { defineComponent as h, computed as c, createBlock as i, openBlock as a, unref as m, withCtx as u, createElementVNode as d, createElementBlock as t, createCommentVNode as s, toDisplayString as o } from "vue";
2
- import { ScalarPopover as p, ScalarMarkdown as f } from "@scalar/components";
3
- import { ScalarIconWarning as v, ScalarIconInfo as k } from "@scalar/icons";
4
- import { validateParameter as y } from "../helpers/validate-parameter.js";
5
- const g = ["aria-label", "role"], b = { class: "w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none" }, I = {
1
+ import { defineComponent as d, computed as l, createBlock as m, openBlock as t, unref as s, withCtx as r, createElementVNode as u, createElementBlock as a, createCommentVNode as n, toDisplayString as c } from "vue";
2
+ import { ScalarPopover as h, ScalarMarkdown as f } from "@scalar/components";
3
+ import { ScalarIconWarning as v, ScalarIconInfo as x } from "@scalar/icons";
4
+ import { validateParameter as k } from "../helpers/validate-parameter.js";
5
+ const y = ["aria-label", "role"], g = { class: "w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none" }, b = {
6
6
  key: 0,
7
7
  class: "text-error-1"
8
- }, w = {
8
+ }, I = {
9
9
  key: 1,
10
10
  class: "schema text-c-2 flex items-center"
11
- }, S = { key: 0 }, _ = { key: 1 }, x = { key: 2 }, B = { key: 3 }, C = { key: 4 }, T = /* @__PURE__ */ h({
11
+ }, w = { key: 0 }, S = { key: 1 }, B = { key: 2 }, C = { key: 3 }, M = { key: 4 }, q = /* @__PURE__ */ d({
12
12
  __name: "RequestTableTooltip",
13
13
  props: {
14
14
  schema: {},
15
15
  value: {},
16
16
  description: {}
17
17
  },
18
- setup(l) {
19
- const r = c(() => y(l.schema, l.value)), n = c(() => r.value.ok === !1);
20
- return (e, M) => (a(), i(m(p), {
18
+ setup(e) {
19
+ const o = l(() => k(e.schema, e.value)), i = l(() => o.value.ok === !1);
20
+ return (P, z) => (t(), m(s(h), {
21
21
  offset: 4,
22
22
  placement: "left",
23
23
  teleport: ""
24
24
  }, {
25
- popover: u(() => [
26
- d("div", b, [
27
- r.value.ok === !1 ? (a(), t("div", I, o(r.value.message), 1)) : e.schema && ("type" in e.schema || "format" in e.schema || "minimum" in e.schema || "maximum" in e.schema || "default" in e.schema) ? (a(), t("div", w, [
28
- "type" in e.schema ? (a(), t("span", S, o(e.schema.type), 1)) : s("", !0),
29
- "format" in e.schema ? (a(), t("span", _, o(e.schema.format), 1)) : s("", !0),
30
- "minimum" in e.schema ? (a(), t("span", x, "min: " + o(e.schema.minimum), 1)) : s("", !0),
31
- "maximum" in e.schema ? (a(), t("span", B, "max: " + o(e.schema.maximum), 1)) : s("", !0),
32
- "default" in e.schema ? (a(), t("span", C, "default: " + o(e.schema.default), 1)) : s("", !0)
33
- ])) : s("", !0),
34
- e.description && !n.value ? (a(), i(m(f), {
25
+ popover: r(() => [
26
+ u("div", g, [
27
+ o.value.ok === !1 ? (t(), a("div", b, c(o.value.message), 1)) : e.schema && ("type" in e.schema || "format" in e.schema || "minimum" in e.schema || "maximum" in e.schema || "default" in e.schema) ? (t(), a("div", I, [
28
+ "type" in e.schema ? (t(), a("span", w, c(e.schema.type), 1)) : n("", !0),
29
+ "format" in e.schema ? (t(), a("span", S, c(e.schema.format), 1)) : n("", !0),
30
+ "minimum" in e.schema ? (t(), a("span", B, "min: " + c(e.schema.minimum), 1)) : n("", !0),
31
+ "maximum" in e.schema ? (t(), a("span", C, "max: " + c(e.schema.maximum), 1)) : n("", !0),
32
+ "default" in e.schema ? (t(), a("span", M, "default: " + c(e.schema.default), 1)) : n("", !0)
33
+ ])) : n("", !0),
34
+ e.description && !i.value ? (t(), m(s(f), {
35
35
  key: 2,
36
36
  class: "max-w-[16rem]",
37
37
  value: e.description
38
- }, null, 8, ["value"])) : s("", !0)
38
+ }, null, 8, ["value"])) : n("", !0)
39
39
  ])
40
40
  ]),
41
- default: u(() => [
42
- d("button", {
43
- "aria-label": n.value ? "Input is invalid" : "More Information",
41
+ default: r(() => [
42
+ u("button", {
43
+ "aria-label": i.value ? "Input is invalid" : "More Information",
44
44
  class: "text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1",
45
- role: n.value ? "alert" : "none",
45
+ role: i.value ? "alert" : "none",
46
46
  type: "button"
47
47
  }, [
48
- n.value ? (a(), i(m(v), {
48
+ i.value ? (t(), m(s(v), {
49
49
  key: 0,
50
50
  class: "text-orange size-3.5 brightness-90 hover:brightness-75"
51
- })) : (a(), i(m(k), {
51
+ })) : (t(), m(s(x), {
52
52
  key: 1,
53
53
  class: "text-c-2 hover:text-c-1 size-3.5"
54
54
  }))
55
- ], 8, g)
55
+ ], 8, y)
56
56
  ]),
57
57
  _: 1
58
58
  }));
59
59
  }
60
60
  });
61
61
  export {
62
- T as default
62
+ q as default
63
63
  };
@@ -4,7 +4,7 @@ type ParameterType = 'path' | 'cookie' | 'header' | 'query';
4
4
  /** Create parameter event handlers for a given type */
5
5
  export declare const createParameterHandlers: (type: ParameterType, eventBus: WorkspaceEventBus, meta: OperationExampleMeta) => {
6
6
  add: (payload: {
7
- key?: string;
7
+ name?: string;
8
8
  value?: string;
9
9
  }) => void;
10
10
  delete: (payload: {
@@ -14,7 +14,7 @@ export declare const createParameterHandlers: (type: ParameterType, eventBus: Wo
14
14
  update: (payload: {
15
15
  index: number;
16
16
  payload: Partial<{
17
- key: string;
17
+ name: string;
18
18
  value: string;
19
19
  isDisabled: boolean;
20
20
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"create-parameter-handlers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/create-parameter-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAE5E,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3D,uDAAuD;AACvD,eAAO,MAAM,uBAAuB,GAClC,MAAM,aAAa,EACnB,UAAU,iBAAiB,EAC3B,MAAM,oBAAoB;mBAEX;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;sBAU7B;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;;sBAWjB;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KAAE;CAa1G,CAAA"}
1
+ {"version":3,"file":"create-parameter-handlers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/create-parameter-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAE5E,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3D,uDAAuD;AACvD,eAAO,MAAM,uBAAuB,GAClC,MAAM,aAAa,EACnB,UAAU,iBAAiB,EAC3B,MAAM,oBAAoB;mBAEX;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;sBAU9B;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;;sBAWjB;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KAAE;CAY3G,CAAA"}
@@ -1,29 +1,28 @@
1
- const i = (a, d, r) => ({
2
- add: (e) => d.emit("operation:add:parameter", {
1
+ const t = (a, r, d) => ({
2
+ add: (e) => r.emit("operation:add:parameter", {
3
3
  type: a,
4
4
  payload: {
5
- key: e.key ?? "",
5
+ name: e.name ?? "",
6
6
  value: e.value ?? "",
7
7
  isDisabled: !1
8
8
  },
9
- meta: r
9
+ meta: d
10
10
  }),
11
- delete: (e) => d.emit("operation:delete:parameter", {
11
+ delete: (e) => r.emit("operation:delete:parameter", {
12
12
  type: a,
13
13
  index: e.index,
14
- meta: r
14
+ meta: d
15
15
  }),
16
- deleteAll: () => d.emit("operation:delete-all:parameters", {
16
+ deleteAll: () => r.emit("operation:delete-all:parameters", {
17
17
  type: a,
18
- meta: r
18
+ meta: d
19
19
  }),
20
- update: (e) => d.emit(
20
+ update: (e) => r.emit(
21
21
  "operation:update:parameter",
22
22
  {
23
23
  type: a,
24
- index: e.index,
25
- payload: e.payload,
26
- meta: r
24
+ ...e,
25
+ meta: d
27
26
  },
28
27
  {
29
28
  debounceKey: `update:parameter-${a}-${e.index}-${Object.keys(e.payload).join("-")}`
@@ -31,5 +30,5 @@ const i = (a, d, r) => ({
31
30
  )
32
31
  });
33
32
  export {
34
- i as createParameterHandlers
33
+ t as createParameterHandlers
35
34
  };
@@ -0,0 +1,8 @@
1
+ import type { ExampleObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ /** Build the table rows for the form data */
3
+ export declare const getFormBodyRows: (example: ExampleObject | undefined | null, contentType: string) => {
4
+ name: string;
5
+ value: any;
6
+ isDisabled: boolean;
7
+ }[];
8
+ //# sourceMappingURL=get-form-body-rows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-form-body-rows.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-form-body-rows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAEjG,6CAA6C;AAC7C,eAAO,MAAM,eAAe,GAAI,SAAS,aAAa,GAAG,SAAS,GAAG,IAAI,EAAE,aAAa,MAAM;;;;GA4B7F,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { objectEntries as i } from "@scalar/helpers/object/object-entries";
2
+ const e = (r, t) => !r?.value || t !== "multipart/form-data" && t !== "application/x-www-form-urlencoded" ? [] : Array.isArray(r.value) ? r.value : typeof r.value == "object" && r.value ? i(r.value).map(([o, a]) => ({
3
+ name: String(o),
4
+ value: a,
5
+ isDisabled: !1
6
+ })) : [];
7
+ export {
8
+ e as getFormBodyRows
9
+ };
@@ -1,4 +1,6 @@
1
1
  import type { ExampleObject, RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
- /** Grab the resolved reference to the example from the request body, or build an example from the schema */
2
+ /**
3
+ * Basically getExample + we generate an example from the schema if no example is found
4
+ */
3
5
  export declare const getExampleFromBody: (requestBody: RequestBodyObject, contentType: string, exampleKey: string) => ExampleObject | null;
4
6
  //# sourceMappingURL=get-request-body-example.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-request-body-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-request-body-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAIpH,4GAA4G;AAC5G,eAAO,MAAM,kBAAkB,GAC7B,aAAa,iBAAiB,EAC9B,aAAa,MAAM,EACnB,YAAY,MAAM,KACjB,aAAa,GAAG,IAqBlB,CAAA"}
1
+ {"version":3,"file":"get-request-body-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-request-body-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAKpH;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,aAAa,iBAAiB,EAC9B,aAAa,MAAM,EACnB,YAAY,MAAM,KACjB,aAAa,GAAG,IAqBlB,CAAA"}
@@ -1,13 +1,14 @@
1
- import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
- import { getExampleFromSchema as s } from "../../operation-code-sample/helpers/get-example-from-schema.js";
3
- const u = (m, l, c) => {
4
- const e = m.content?.[l], t = n(e?.examples?.[c]);
5
- if (t)
6
- return t;
7
- const o = n(e?.schema);
1
+ import { getResolvedRef as a } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
+ import { getExample as c } from "../../operation-block/helpers/get-example.js";
3
+ import { getExampleFromSchema as p } from "../../operation-code-sample/helpers/get-example-from-schema.js";
4
+ const u = (e, t, n) => {
5
+ const l = e.content?.[t], m = c(e, n, t);
6
+ if (m)
7
+ return m;
8
+ const o = a(l?.schema);
8
9
  if (!o)
9
10
  return null;
10
- const r = s(o);
11
+ const r = p(o, { mode: "write" });
11
12
  return r ? { value: r } : null;
12
13
  };
13
14
  export {