@scalar/api-client 3.27.0 → 3.27.1

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 (430) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js +1 -2
  3. package/dist/assets/computer.ascii_raw.js +1 -2
  4. package/dist/components/HelpfulLink.vue.js +1 -2
  5. package/dist/components/HelpfulLink.vue.js.map +1 -1
  6. package/dist/components/HelpfulLink.vue_vue_type_script_setup_true_lang.js +1 -2
  7. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -2
  8. package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -1
  9. package/dist/components/HttpMethod/HttpMethod.vue_vue_type_script_setup_true_lang.js +1 -2
  10. package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js +2 -3
  11. package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js.map +1 -1
  12. package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue_vue_type_script_setup_true_lang.js +1 -2
  13. package/dist/components/SectionFilter.vue.js +2 -3
  14. package/dist/components/SectionFilter.vue.js.map +1 -1
  15. package/dist/components/SectionFilter.vue_vue_type_script_setup_true_lang.js +2 -3
  16. package/dist/components/SectionFilterButton.vue.js +1 -2
  17. package/dist/components/SectionFilterButton.vue.js.map +1 -1
  18. package/dist/components/SectionFilterButton.vue_vue_type_script_setup_true_lang.js +1 -2
  19. package/dist/components/Server/ServerVariablesForm.vue.js +1 -2
  20. package/dist/components/Server/ServerVariablesForm.vue.js.map +1 -1
  21. package/dist/components/Server/ServerVariablesForm.vue_vue_type_script_setup_true_lang.js +1 -2
  22. package/dist/components/Server/ServerVariablesForm.vue_vue_type_script_setup_true_lang.js.map +1 -1
  23. package/dist/components/Server/ServerVariablesSelect.vue.js +1 -2
  24. package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -1
  25. package/dist/components/Server/ServerVariablesSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  26. package/dist/components/Server/ServerVariablesSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  27. package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -2
  28. package/dist/components/Server/ServerVariablesTextbox.vue.js.map +1 -1
  29. package/dist/components/Server/ServerVariablesTextbox.vue_vue_type_script_setup_true_lang.js +1 -2
  30. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +1 -2
  31. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js.map +1 -1
  32. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue_vue_type_script_setup_true_lang.js +2 -3
  33. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue_vue_type_script_setup_true_lang.js.map +1 -1
  34. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -2
  35. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -1
  36. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue_vue_type_script_setup_true_lang.js +1 -2
  37. package/dist/components/ViewLayout/ViewLayout.vue.js +1 -2
  38. package/dist/components/ViewLayout/ViewLayout.vue.js.map +1 -1
  39. package/dist/components/ViewLayout/ViewLayout.vue_vue_type_script_setup_true_lang.js +1 -2
  40. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -2
  41. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -2
  42. package/dist/components/ViewLayout/ViewLayoutSection.vue.js.map +1 -1
  43. package/dist/components/ViewLayout/ViewLayoutSection.vue_vue_type_script_setup_true_lang.js +1 -2
  44. package/dist/components/ViewLayout/ViewLayoutSection.vue_vue_type_script_setup_true_lang.js.map +1 -1
  45. package/dist/hooks/use-file-dialog.js +1 -2
  46. package/dist/plugins/posthog/index.js +1 -2
  47. package/dist/plugins/posthog/sanitize-event-payload.js +1 -2
  48. package/dist/style.css +468 -445
  49. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  50. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +1 -2
  51. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  52. package/dist/v2/blocks/operation-block/OperationBlock.vue_vue_type_script_setup_true_lang.js +11 -7
  53. package/dist/v2/blocks/operation-block/OperationBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
  54. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -3
  55. package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
  56. package/dist/v2/blocks/operation-block/components/Header.vue_vue_type_script_setup_true_lang.js +3 -4
  57. package/dist/v2/blocks/operation-block/components/Header.vue_vue_type_script_setup_true_lang.js.map +1 -1
  58. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +2 -3
  59. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
  60. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue_vue_type_script_setup_true_lang.js +1 -2
  61. package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +1 -2
  62. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +1 -2
  63. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js +1 -2
  64. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js +1 -2
  65. package/dist/v2/blocks/operation-block/helpers/persist-response-cookies.js +1 -2
  66. package/dist/v2/blocks/operation-block/helpers/persist-script-environment.js +1 -2
  67. package/dist/v2/blocks/operation-block/helpers/response-cache.js +1 -2
  68. package/dist/v2/blocks/operation-block/helpers/send-request.js +1 -2
  69. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +1 -2
  70. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +2 -0
  71. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  72. package/dist/v2/blocks/request-block/RequestBlock.vue.js +3 -4
  73. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  74. package/dist/v2/blocks/request-block/RequestBlock.vue_vue_type_script_setup_true_lang.js +13 -7
  75. package/dist/v2/blocks/request-block/RequestBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
  76. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +2 -0
  77. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  78. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +3 -4
  79. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  80. package/dist/v2/blocks/request-block/components/RequestBody.vue_vue_type_script_setup_true_lang.js +17 -13
  81. package/dist/v2/blocks/request-block/components/RequestBody.vue_vue_type_script_setup_true_lang.js.map +1 -1
  82. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +1 -2
  83. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js.map +1 -1
  84. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue_vue_type_script_setup_true_lang.js +1 -2
  85. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.d.ts +3 -0
  86. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.d.ts.map +1 -1
  87. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.js +1 -2
  88. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.js.map +1 -1
  89. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue_vue_type_script_setup_true_lang.js +9 -4
  90. package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js +1 -2
  92. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js.map +1 -1
  93. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue_vue_type_script_setup_true_lang.js +2 -3
  94. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js +1 -2
  95. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js.map +1 -1
  96. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue_vue_type_script_setup_true_lang.js +1 -2
  97. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  98. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  99. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +1 -2
  100. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
  101. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue_vue_type_script_setup_true_lang.js +4 -3
  102. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue_vue_type_script_setup_true_lang.js.map +1 -1
  103. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +1 -2
  104. package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
  105. package/dist/v2/blocks/request-block/components/RequestParams.vue_vue_type_script_setup_true_lang.js +2 -3
  106. package/dist/v2/blocks/request-block/components/RequestParams.vue_vue_type_script_setup_true_lang.js.map +1 -1
  107. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +2 -3
  108. package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
  109. package/dist/v2/blocks/request-block/components/RequestTable.vue_vue_type_script_setup_true_lang.js +3 -4
  110. package/dist/v2/blocks/request-block/components/RequestTableFileList.vue.js +1 -2
  111. package/dist/v2/blocks/request-block/components/RequestTableFileList.vue.js.map +1 -1
  112. package/dist/v2/blocks/request-block/components/RequestTableFileList.vue_vue_type_script_setup_true_lang.js +1 -2
  113. package/dist/v2/blocks/request-block/components/RequestTableFileList.vue_vue_type_script_setup_true_lang.js.map +1 -1
  114. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +1 -2
  115. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  116. package/dist/v2/blocks/request-block/components/RequestTableRow.vue_vue_type_script_setup_true_lang.js +5 -6
  117. package/dist/v2/blocks/request-block/components/RequestTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  118. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -2
  119. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
  120. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue_vue_type_script_setup_true_lang.js +2 -3
  121. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +1 -2
  123. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts +2 -0
  124. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts.map +1 -1
  125. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +6 -3
  126. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -1
  127. package/dist/v2/blocks/request-block/helpers/files.js +1 -2
  128. package/dist/v2/blocks/request-block/helpers/fold-structured-body-rows.js +1 -2
  129. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +1 -2
  130. package/dist/v2/blocks/request-block/helpers/get-parameter-content.js +1 -2
  131. package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js +1 -2
  132. package/dist/v2/blocks/request-block/helpers/get-structured-body-rows.js +1 -2
  133. package/dist/v2/blocks/request-block/helpers/group-by.js +1 -2
  134. package/dist/v2/blocks/request-block/helpers/group-form-body-files.js +2 -3
  135. package/dist/v2/blocks/request-block/helpers/group-form-body-files.js.map +1 -1
  136. package/dist/v2/blocks/request-block/helpers/group-global-cookies.js +1 -2
  137. package/dist/v2/blocks/request-block/helpers/multipart-body.js +1 -2
  138. package/dist/v2/blocks/request-block/helpers/structured-body-codec.js +1 -2
  139. package/dist/v2/blocks/request-block/helpers/validate-parameter.js +1 -2
  140. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +2 -3
  141. package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
  142. package/dist/v2/blocks/response-block/ResponseBlock.vue_vue_type_script_setup_true_lang.js +4 -5
  143. package/dist/v2/blocks/response-block/ResponseBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
  144. package/dist/v2/blocks/response-block/components/Headers.vue.js +1 -2
  145. package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -1
  146. package/dist/v2/blocks/response-block/components/Headers.vue_vue_type_script_setup_true_lang.js +3 -4
  147. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +2 -3
  148. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
  149. package/dist/v2/blocks/response-block/components/ResponseBody.vue_vue_type_script_setup_true_lang.js +5 -6
  150. package/dist/v2/blocks/response-block/components/ResponseBody.vue_vue_type_script_setup_true_lang.js.map +1 -1
  151. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +1 -2
  152. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
  153. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue_vue_type_script_setup_true_lang.js +2 -3
  154. package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js +1 -2
  155. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +2 -3
  156. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
  157. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue_vue_type_script_setup_true_lang.js +2 -3
  158. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +2 -3
  159. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js.map +1 -1
  160. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue_vue_type_script_setup_true_lang.js +1 -2
  161. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue_vue_type_script_setup_true_lang.js.map +1 -1
  162. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +1 -2
  163. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js.map +1 -1
  164. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue_vue_type_script_setup_true_lang.js +2 -3
  165. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue_vue_type_script_setup_true_lang.js.map +1 -1
  166. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +1 -2
  167. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js.map +1 -1
  168. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue_vue_type_script_setup_true_lang.js +1 -2
  169. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js +1 -2
  170. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
  171. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue_vue_type_script_setup_true_lang.js +3 -4
  172. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -2
  173. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
  174. package/dist/v2/blocks/response-block/components/ResponseCookies.vue_vue_type_script_setup_true_lang.js +2 -3
  175. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -3
  176. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
  177. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue_vue_type_script_setup_true_lang.js +3 -4
  178. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue_vue_type_script_setup_true_lang.js.map +1 -1
  179. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -3
  180. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
  181. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue_vue_type_script_setup_true_lang.js +1 -2
  182. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue_vue_type_script_setup_true_lang.js.map +1 -1
  183. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +1 -2
  184. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -1
  185. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js +2 -3
  186. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js.map +1 -1
  187. package/dist/v2/blocks/response-block/helpers/extract-filename.js +1 -2
  188. package/dist/v2/blocks/response-block/helpers/get-content-length.js +1 -2
  189. package/dist/v2/blocks/response-block/helpers/media-types.js +1 -2
  190. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +1 -2
  191. package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.js +1 -2
  192. package/dist/v2/blocks/response-block/helpers/prettify-ndjson.js +1 -2
  193. package/dist/v2/blocks/response-block/helpers/process-response-body.js +1 -2
  194. package/dist/v2/blocks/response-block/helpers/resolve-response-body-handler.js +1 -2
  195. package/dist/v2/blocks/response-block/helpers/resolve-response-content-type.js +1 -2
  196. package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js +1 -2
  197. package/dist/v2/blocks/response-block/helpers/response-stream.js +1 -2
  198. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -3
  199. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  200. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue_vue_type_script_setup_true_lang.js +3 -4
  201. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  202. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +2 -3
  203. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
  204. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue_vue_type_script_setup_true_lang.js +2 -3
  205. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue_vue_type_script_setup_true_lang.js.map +1 -1
  206. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +1 -2
  207. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -1
  208. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue_vue_type_script_setup_true_lang.js +1 -2
  209. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue_vue_type_script_setup_true_lang.js.map +1 -1
  210. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +1 -2
  211. package/dist/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path.js +1 -2
  212. package/dist/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target.js +1 -2
  213. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +1 -2
  214. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-path-masking.js +1 -2
  215. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -2
  216. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
  217. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue_vue_type_script_setup_true_lang.js +3 -4
  218. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue_vue_type_script_setup_true_lang.js.map +1 -1
  219. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +1 -2
  220. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js.map +1 -1
  221. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue_vue_type_script_setup_true_lang.js +1 -2
  222. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +1 -2
  223. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  224. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue_vue_type_script_setup_true_lang.js +4 -5
  225. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue_vue_type_script_setup_true_lang.js.map +1 -1
  226. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.js +1 -2
  227. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.js.map +1 -1
  228. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue_vue_type_script_setup_true_lang.js +3 -4
  229. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
  230. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +1 -2
  231. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
  232. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue_vue_type_script_setup_true_lang.js +2 -3
  233. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue_vue_type_script_setup_true_lang.js.map +1 -1
  234. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +1 -2
  235. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
  236. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue_vue_type_script_setup_true_lang.js +2 -3
  237. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  238. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +1 -2
  239. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
  240. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue_vue_type_script_setup_true_lang.js +4 -5
  241. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  242. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -2
  243. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
  244. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue_vue_type_script_setup_true_lang.js +2 -3
  245. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  246. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +1 -2
  247. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js.map +1 -1
  248. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue_vue_type_script_setup_true_lang.js +2 -3
  249. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  250. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +1 -2
  251. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
  252. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue_vue_type_script_setup_true_lang.js +7 -8
  253. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  254. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +1 -2
  255. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js +1 -2
  256. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +1 -2
  257. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-callback.js +1 -2
  258. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js +1 -2
  259. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js +2 -3
  260. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-flows.js +1 -2
  261. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -2
  262. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js +1 -2
  263. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +1 -2
  264. package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.js +1 -2
  265. package/dist/v2/blocks/scalar-auth-selector-block/helpers/run-oauth2-authorize.js +1 -2
  266. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +2 -3
  267. package/dist/v2/components/code-input/CodeInput.vue.js +2 -3
  268. package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
  269. package/dist/v2/components/code-input/CodeInput.vue_vue_type_script_setup_true_lang.js +2 -3
  270. package/dist/v2/components/code-input/CodeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  271. package/dist/v2/components/code-input/CodeInputLite.vue.js +2 -3
  272. package/dist/v2/components/code-input/CodeInputLite.vue.js.map +1 -1
  273. package/dist/v2/components/code-input/CodeInputLite.vue_vue_type_script_setup_true_lang.js +4 -5
  274. package/dist/v2/components/code-input/CodeInputLite.vue_vue_type_script_setup_true_lang.js.map +1 -1
  275. package/dist/v2/components/code-input/PillTooltipHost.vue.js +1 -2
  276. package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -1
  277. package/dist/v2/components/code-input/PillTooltipHost.vue_vue_type_script_setup_true_lang.js +1 -2
  278. package/dist/v2/components/code-input/code-variable-widget.js +1 -2
  279. package/dist/v2/components/code-input/helpers/build-pill-context.js +1 -2
  280. package/dist/v2/components/code-input/helpers/lookup-variable-value.js +1 -2
  281. package/dist/v2/components/code-input/helpers/pill-signature.js +1 -2
  282. package/dist/v2/components/code-input/helpers/serialize-value.js +1 -2
  283. package/dist/v2/components/context-menu/ContextMenu.vue.js +1 -2
  284. package/dist/v2/components/context-menu/ContextMenu.vue.js.map +1 -1
  285. package/dist/v2/components/context-menu/ContextMenu.vue_vue_type_script_setup_true_lang.js +1 -2
  286. package/dist/v2/components/data-table/DataTable.vue.js +1 -2
  287. package/dist/v2/components/data-table/DataTable.vue.js.map +1 -1
  288. package/dist/v2/components/data-table/DataTable.vue_vue_type_script_setup_true_lang.js +1 -2
  289. package/dist/v2/components/data-table/DataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  290. package/dist/v2/components/data-table/DataTableCell.vue.js +1 -2
  291. package/dist/v2/components/data-table/DataTableCell.vue.js.map +1 -1
  292. package/dist/v2/components/data-table/DataTableCell.vue_vue_type_script_setup_true_lang.js +1 -2
  293. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +1 -2
  294. package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -1
  295. package/dist/v2/components/data-table/DataTableCheckbox.vue_vue_type_script_setup_true_lang.js +1 -2
  296. package/dist/v2/components/data-table/DataTableHeader.vue.js +1 -2
  297. package/dist/v2/components/data-table/DataTableHeader.vue.js.map +1 -1
  298. package/dist/v2/components/data-table/DataTableHeader.vue_vue_type_script_setup_true_lang.js +1 -2
  299. package/dist/v2/components/data-table/DataTableInput.vue.js +2 -3
  300. package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
  301. package/dist/v2/components/data-table/DataTableInput.vue_vue_type_script_setup_true_lang.js +3 -4
  302. package/dist/v2/components/data-table/DataTableInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  303. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +1 -2
  304. package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
  305. package/dist/v2/components/data-table/DataTableInputSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  306. package/dist/v2/components/data-table/DataTableInputSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  307. package/dist/v2/components/data-table/DataTableRow.vue.js +1 -2
  308. package/dist/v2/components/data-table/DataTableText.vue.js +1 -2
  309. package/dist/v2/components/data-table/DataTableText.vue.js.map +1 -1
  310. package/dist/v2/components/data-table/DataTableText.vue_vue_type_script_setup_true_lang.js +1 -2
  311. package/dist/v2/components/data-table/index.js +1 -1
  312. package/dist/v2/components/forms/ConfirmationForm.vue.js +1 -2
  313. package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -1
  314. package/dist/v2/components/forms/ConfirmationForm.vue_vue_type_script_setup_true_lang.js +1 -2
  315. package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -2
  316. package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
  317. package/dist/v2/components/layout/CollapsibleSection.vue_vue_type_script_setup_true_lang.js +1 -2
  318. package/dist/v2/components/layout/CollapsibleSection.vue_vue_type_script_setup_true_lang.js.map +1 -1
  319. package/dist/v2/components/layout/ValueEmitter.vue.js +1 -2
  320. package/dist/v2/components/layout/ValueEmitter.vue.js.map +1 -1
  321. package/dist/v2/components/layout/ValueEmitter.vue_vue_type_script_setup_true_lang.js +0 -1
  322. package/dist/v2/components/layout/collapsible-section-heading-level.js +1 -2
  323. package/dist/v2/components/layout/index.js +1 -1
  324. package/dist/v2/components/modals/DeleteModal.vue.js +1 -2
  325. package/dist/v2/components/modals/DeleteModal.vue.js.map +1 -1
  326. package/dist/v2/components/modals/DeleteModal.vue_vue_type_script_setup_true_lang.js +2 -3
  327. package/dist/v2/components/modals/DeleteModal.vue_vue_type_script_setup_true_lang.js.map +1 -1
  328. package/dist/v2/components/modals/ModalClientContainer.vue.js +2 -3
  329. package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
  330. package/dist/v2/components/modals/ModalClientContainer.vue_vue_type_script_setup_true_lang.js +1 -2
  331. package/dist/v2/components/resize/Resize.vue.js +2 -3
  332. package/dist/v2/components/resize/Resize.vue.js.map +1 -1
  333. package/dist/v2/components/resize/Resize.vue_vue_type_script_setup_true_lang.js +1 -2
  334. package/dist/v2/components/resize/use-split-resize.js +1 -2
  335. package/dist/v2/components/server/ServerDropdown.vue.js +1 -2
  336. package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
  337. package/dist/v2/components/server/ServerDropdown.vue_vue_type_script_setup_true_lang.js +2 -3
  338. package/dist/v2/components/server/ServerDropdown.vue_vue_type_script_setup_true_lang.js.map +1 -1
  339. package/dist/v2/components/server/ServerDropdownItem.vue.js +2 -3
  340. package/dist/v2/components/server/ServerDropdownItem.vue.js.map +1 -1
  341. package/dist/v2/components/server/ServerDropdownItem.vue_vue_type_script_setup_true_lang.js +1 -2
  342. package/dist/v2/components/server/ServerDropdownItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  343. package/dist/v2/components/sidebar/Sidebar.vue.js +1 -2
  344. package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
  345. package/dist/v2/components/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +2 -3
  346. package/dist/v2/components/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  347. package/dist/v2/components/sidebar/SidebarMenu.vue.js +1 -2
  348. package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -1
  349. package/dist/v2/components/sidebar/SidebarMenu.vue_vue_type_script_setup_true_lang.js +1 -2
  350. package/dist/v2/components/sidebar/SidebarToggle.vue.js +2 -3
  351. package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
  352. package/dist/v2/components/sidebar/SidebarToggle.vue_vue_type_script_setup_true_lang.js +1 -2
  353. package/dist/v2/components/sidebar/index.js +1 -1
  354. package/dist/v2/constants.js +2 -3
  355. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +1 -2
  356. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js.map +1 -1
  357. package/dist/v2/features/command-palette/components/CommandActionForm.vue_vue_type_script_setup_true_lang.js +1 -2
  358. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +1 -2
  359. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js.map +1 -1
  360. package/dist/v2/features/command-palette/components/CommandActionInput.vue_vue_type_script_setup_true_lang.js +1 -2
  361. package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -2
  362. package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -1
  363. package/dist/v2/features/environments/EnvironmentsList.vue_vue_type_script_setup_true_lang.js +2 -3
  364. package/dist/v2/features/environments/components/Environment.vue.js +1 -2
  365. package/dist/v2/features/environments/components/Environment.vue.js.map +1 -1
  366. package/dist/v2/features/environments/components/Environment.vue_vue_type_script_setup_true_lang.js +2 -3
  367. package/dist/v2/features/environments/components/Environment.vue_vue_type_script_setup_true_lang.js.map +1 -1
  368. package/dist/v2/features/environments/components/EnvironmentColors.vue.d.ts.map +1 -1
  369. package/dist/v2/features/environments/components/EnvironmentColors.vue.js +1 -2
  370. package/dist/v2/features/environments/components/EnvironmentColors.vue.js.map +1 -1
  371. package/dist/v2/features/environments/components/EnvironmentColors.vue_vue_type_script_setup_true_lang.js +9 -10
  372. package/dist/v2/features/environments/components/EnvironmentColors.vue_vue_type_script_setup_true_lang.js.map +1 -1
  373. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +1 -2
  374. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
  375. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue_vue_type_script_setup_true_lang.js +2 -3
  376. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue_vue_type_script_setup_true_lang.js.map +1 -1
  377. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +1 -2
  378. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -1
  379. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue_vue_type_script_setup_true_lang.js +1 -2
  380. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +1 -2
  381. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
  382. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js +1 -2
  383. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js.map +1 -1
  384. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +2 -3
  385. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -1
  386. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js +2 -3
  387. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  388. package/dist/v2/features/localization/index.js +1 -2
  389. package/dist/v2/features/localization/locales/ar.js +1 -2
  390. package/dist/v2/features/localization/locales/de.js +1 -2
  391. package/dist/v2/features/localization/locales/es.js +1 -2
  392. package/dist/v2/features/localization/locales/fr.js +1 -2
  393. package/dist/v2/features/localization/locales/pt.js +1 -2
  394. package/dist/v2/features/localization/locales/ru.js +1 -2
  395. package/dist/v2/features/localization/locales/zh-cn.js +1 -2
  396. package/dist/v2/features/localization/locales/zh-tw.js +1 -2
  397. package/dist/v2/features/localization/translations.js +1 -2
  398. package/dist/v2/features/modal/Modal.vue.js +1 -2
  399. package/dist/v2/features/modal/Modal.vue.js.map +1 -1
  400. package/dist/v2/features/modal/Modal.vue_vue_type_script_setup_true_lang.js +4 -5
  401. package/dist/v2/features/modal/helpers/create-api-client-modal.js +1 -2
  402. package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +1 -2
  403. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +1 -2
  404. package/dist/v2/features/modal/hooks/use-modal-sidebar.js +1 -2
  405. package/dist/v2/features/modal/index.js +2 -2
  406. package/dist/v2/features/modal/modal-events.js +1 -2
  407. package/dist/v2/features/modal/use-lazy-api-client.js +1 -2
  408. package/dist/v2/features/operation/Operation.vue.js +1 -2
  409. package/dist/v2/features/operation/Operation.vue.js.map +1 -1
  410. package/dist/v2/features/operation/Operation.vue_vue_type_script_setup_true_lang.js +2 -3
  411. package/dist/v2/features/search/components/DocumentSearchModal.vue.js +2 -3
  412. package/dist/v2/features/search/components/DocumentSearchModal.vue.js.map +1 -1
  413. package/dist/v2/features/search/components/DocumentSearchModal.vue_vue_type_script_setup_true_lang.js +1 -2
  414. package/dist/v2/features/search/components/SearchResult.vue.js +1 -2
  415. package/dist/v2/features/search/components/SearchResult.vue.js.map +1 -1
  416. package/dist/v2/features/search/components/SearchResult.vue_vue_type_script_setup_true_lang.js +1 -2
  417. package/dist/v2/features/search/components/SearchResult.vue_vue_type_script_setup_true_lang.js.map +1 -1
  418. package/dist/v2/features/search/helpers/create-fuse-instance.js +1 -2
  419. package/dist/v2/features/search/helpers/create-search-index.js +1 -2
  420. package/dist/v2/features/search/hooks/use-document-search.js +1 -2
  421. package/dist/v2/features/search/hooks/use-search-index.js +1 -2
  422. package/dist/v2/features/search/index.js +1 -1
  423. package/dist/v2/helpers/generate-location-id.js +1 -2
  424. package/dist/v2/helpers/handle-hotkeys.js +1 -2
  425. package/dist/v2/helpers/test-utils.js +1 -2
  426. package/dist/v2/hooks/use-global-hot-keys.js +1 -2
  427. package/dist/v2/hooks/use-scroll-lock.js +1 -2
  428. package/dist/v2/workspace-events.js +1 -2
  429. package/dist/vue-styles.css +130 -130
  430. package/package.json +26 -26
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableRow.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","DataTableRow","_normalizeClass","_withCtx","_createVNode","DataTableCheckbox","DataTableCell","CodeInputLite","RequestTableFileList","RequestTableTooltip","_createCommentVNode","DataTableInputSelect","_createElementBlock","_Fragment","_createElementVNode","_toDisplayString"],"sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconGlobe, ScalarIconTrash } from '@scalar/icons'\nimport type { ApiReferenceEvents } from '@scalar/workspace-store/events'\nimport { isFileSchema } from '@scalar/workspace-store/helpers/is-file-schema'\nimport { unpackProxyObject } from '@scalar/workspace-store/helpers/unpack-proxy'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n ParameterObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed, ref, useTemplateRef, watch } from 'vue'\n\nimport { getFileName } from '@/v2/blocks/request-block/helpers/files'\nimport { validateParameter } from '@/v2/blocks/request-block/helpers/validate-parameter'\nimport { CodeInputLite } from '@/v2/components/code-input'\nimport {\n DataTableCell,\n DataTableCheckbox,\n DataTableInputSelect,\n DataTableRow,\n} from '@/v2/components/data-table'\nimport { useLocalization } from '@/v2/features/localization'\n\nimport RequestTableTooltip from './RequestTableTooltip.vue'\nimport RequestTableFileList, {\n type RequestTableFile,\n} from './RequestTableFileList.vue'\n\nconst {\n data,\n environment,\n hasCheckboxDisabled,\n deferKeyUpdates,\n invalidParams,\n showUploadButton,\n allowUnknownFileUploads = true,\n} = defineProps<{\n data: TableRow\n /** Keep key edits local until blur when the row identity depends on its name. */\n deferKeyUpdates?: boolean\n hasCheckboxDisabled?: boolean\n invalidParams?: Set<string>\n label?: string\n environment: XScalarEnvironment\n showUploadButton?: boolean\n /** Unknown fields remain editable as files only in free-form multipart requests. */\n allowUnknownFileUploads?: boolean\n}>()\n\nconst emit = defineEmits<{\n (e: 'upsertRow', payload: TableRowUpsertPayload): void\n (e: 'deleteRow'): void\n (e: 'uploadFile'): void\n (e: 'removeFile', fileIndex?: number): void\n (e: 'updateFile', fileIndex: number, isDisabled: boolean): void\n (e: 'navigate', route: NonNullable<TableRow['globalRoute']>): void\n /** Select a value for a grouped global cookie preset. */\n (e: 'selectPreset', value: string): void\n}>()\n\nconst { translate } = useLocalization()\n\nconst valueInput = useTemplateRef('valueInput')\nconst fileList = useTemplateRef('fileList')\ndefineExpose({\n focusValue: (): void => {\n if (data.files) {\n fileList.value?.focusUpload()\n } else {\n valueInput.value?.focus()\n }\n },\n})\n\nexport type TableRow = {\n /** The parameter or field name/key */\n name: string\n /** The parameter value, can be a string, file, or null */\n value: string | File | null\n /** Selected files grouped for display; source rows remain separate multipart parts. */\n files?: RequestTableFile[]\n /** Optional description for the parameter */\n description?: string\n /** Optional route for global parameters (e.g., cookies shared across workspace) */\n globalRoute?: ApiReferenceEvents['ui:navigate']\n /** Whether the parameter is disabled/inactive */\n isDisabled?: boolean\n /** Whether an optional parameter is disabled because it has no explicit x-disabled value */\n isDisabledByDefault?: boolean\n /** OpenAPI schema object with type, validation rules, examples, etc. */\n schema?: SchemaObject\n /** Explicit media type for this multipart field. */\n contentType?: string\n /** Preserve array values even while their JSON text is temporarily invalid. */\n isArray?: boolean\n /** Text representation used by array enum controls. */\n arrayEncoding?: 'json' | 'comma-separated'\n /** Whether the parameter is required */\n isRequired?: boolean\n /**\n * Whether the parameter is readonly and can not be modifies directly\n * User can still override the parameter which is going to show up with the linethrough style\n */\n isReadonly?: boolean\n /** Whether the parameter is overridden later on */\n isOverridden?: boolean\n /** Track the original parameter so we can update it */\n originalParameter?: ParameterObject\n /** Path to a value inside the original parameter example for expanded object parameters */\n sourceParameterValuePath?: string[]\n /**\n * Selectable values for a grouped global cookie preset. When set, the value cell renders a\n * dropdown to switch between predefined values (for example a `Culture` cookie with `PL`/`EN`)\n * instead of an editable input.\n */\n presetOptions?: string[]\n}\n\nexport type TableRowUpsertPayload = {\n name: string\n value: string | File\n isDisabled: boolean\n shouldRenameExpandedRow?: boolean\n}\n\n/**\n * Track local state for the row\n *\n * Now this is required because of the way we get default values from the schema.\n * If we have a default value in data.value, then we update isDisabled to true. We lose the default value since now\n * we have an example where value: ''. This is why we need to track the local state and update all of the params at the\n * same time.\n */\nconst name = ref<string>(data.name ?? '')\nconst value = ref<string | File>(unpackProxyObject(data.value) ?? '')\nconst isDisabled = ref<boolean>(data.isDisabled ?? false)\n\n// Keep the above state synced with the data prop\nwatch(\n () => data.name,\n (newName) => {\n // Do not overwrite a valid local name with an empty incoming prop — this\n // can happen when the placeholder row (appended by displayData) is briefly\n // mapped onto this component instance before Vue re-keys the list.\n if (!newName && name.value && !deferKeyUpdates) {\n return\n }\n name.value = newName ?? ''\n },\n)\nwatch(\n () => data.value,\n (newValue) => (value.value = unpackProxyObject(newValue) ?? ''),\n)\nwatch(\n () => data.isDisabled,\n (newIsDisabled) => (isDisabled.value = newIsDisabled ?? false),\n)\n\n/** Check if the value is a File instance */\nconst isFile = computed(() => value.value instanceof File)\n\n/** Whether this row’s schema accepts a file part. */\nconst canUploadFile = computed<boolean>(() =>\n data.schema\n ? isFileSchema(data.schema, true, data.contentType)\n : allowUnknownFileUploads,\n)\n\nconst fileUploadLabel = computed<string>(() =>\n translate(\n data.schema && isArraySchema(data.schema)\n ? 'apiClient.requestTableRow.selectFiles'\n : 'apiClient.requestTableRow.selectFile',\n ),\n)\n\nconst hasMixedFileSelection = computed<boolean>(() =>\n Boolean(\n data.files?.some((file) => file.isDisabled) &&\n data.files.some((file) => !file.isDisabled),\n ),\n)\n\n/** Display value handles File instances and shows filename instead */\nconst displayValue = computed(\n () =>\n (isFile.value\n ? getFileName(value.value as File)\n : (value.value as string)) ?? '',\n)\n\nconst defaultValue = computed(() => data.schema?.default as string)\n\n/** See if we can extract enum values from the schema */\nconst enumValue = computed<unknown[]>(() => {\n if (!data.schema) {\n return []\n }\n\n // Grab the enum from the schema\n if (data.schema.enum) {\n return data.schema.enum.map((item) => String(item))\n }\n\n // Grab the enum from the items schema\n if ('items' in data.schema) {\n const resolved = resolve.schema(data.schema.items)\n if (resolved?.enum) {\n return data.arrayEncoding === 'json'\n ? resolved.enum\n : resolved.enum.map((item) => String(item))\n }\n }\n\n return []\n})\n\nconst typeValue = computed(() =>\n data.schema && 'type' in data.schema ? data.schema.type : undefined,\n)\n\nconst validationResult = computed(() =>\n validateParameter(data.schema, value.value),\n)\n\n/** Handle row updates while preserving existing properties */\nconst handleUpdateRow = (\n payload: Partial<{ name: string; value: string; isDisabled: boolean }>,\n options: { shouldRenameExpandedRow?: boolean; commitKey?: boolean } = {},\n): void => {\n // Update our local state\n if (payload.name !== undefined) {\n name.value = payload.name\n }\n if (payload.value !== undefined) {\n value.value = payload.value\n\n // Optional parameters start unchecked, but entering a value expresses intent to send it.\n // Explicit x-disabled values stay unchanged so a deliberate opt-out is preserved.\n if (data.isDisabledByDefault) {\n isDisabled.value = false\n }\n }\n\n // Is disabled should only be updated when explicitly provided in the payload\n if (payload.isDisabled !== undefined) {\n isDisabled.value = payload.isDisabled\n }\n\n if (\n payload.name !== undefined &&\n (deferKeyUpdates || data.sourceParameterValuePath) &&\n !options.shouldRenameExpandedRow &&\n !options.commitKey\n ) {\n return\n }\n\n // Emit all of the local state\n emit('upsertRow', {\n name: name.value,\n value: value.value,\n isDisabled: isDisabled.value,\n ...(options.shouldRenameExpandedRow\n ? { shouldRenameExpandedRow: true }\n : {}),\n })\n}\n\n/**\n * Commit a key edit when the input loses focus. Body and expanded-object rows defer their rename to blur (see\n * handleUpdateRow), so we only emit when the key actually changed. Focusing and blurring the field\n * without typing should not re-emit the row or silently reset its disabled state. The current\n * disabled state is passed through so a renamed row keeps it.\n */\nconst handleKeyBlur = (newName: string): void => {\n if (newName === data.name) {\n return\n }\n // Do not emit an update that would blank the parameter name — this can fire\n // when CodeInputLite blurs before it has rendered its initial value.\n if (!newName && data.name && (!deferKeyUpdates || name.value !== '')) {\n return\n }\n\n handleUpdateRow(\n { name: newName, isDisabled: isDisabled.value },\n {\n shouldRenameExpandedRow: Boolean(data.sourceParameterValuePath),\n commitKey: true,\n },\n )\n}\n\n/** Save a pending body key before the send shortcut reaches the request handler. */\nconst handleKeydown = (event: KeyboardEvent): void => {\n if (\n deferKeyUpdates &&\n event.key === 'Enter' &&\n (event.metaKey || event.ctrlKey)\n ) {\n handleKeyBlur(name.value)\n }\n}\n</script>\n\n<template>\n <DataTableRow\n :id=\"data.name\"\n :class=\"{\n alert: validationResult.ok === false,\n error: validationResult.ok === false && invalidParams?.has(data.name),\n }\">\n <DataTableCheckbox\n :ariaLabel=\"\n translate('apiClient.requestTableRow.include', {\n name: data.name || translate('apiClient.requestTableRow.row'),\n })\n \"\n class=\"!border-r\"\n :class=\"{ 'max-h-none': data.files }\"\n :disabled=\"hasCheckboxDisabled ?? false\"\n :indeterminate=\"hasMixedFileSelection\"\n :modelValue=\"!isDisabled\"\n @update:modelValue=\"(v) => handleUpdateRow({ isDisabled: !v })\" />\n\n <!-- Name -->\n <DataTableCell :class=\"{ 'max-h-none': data.files }\">\n <CodeInputLite\n :aria-label=\"\n translate('apiClient.requestTableRow.keyLabel', { name: label ?? '' })\n \"\n :disabled=\"data.isReadonly\"\n :environment=\"environment\"\n :modelValue=\"name\"\n :placeholder=\"translate('apiClient.requestTableRow.key')\"\n :required=\"Boolean(data.isRequired)\"\n @blur=\"(v) => handleKeyBlur(v)\"\n @keydown.capture=\"handleKeydown\"\n @navigate=\"(route) => emit('navigate', route)\"\n @update:modelValue=\"(v) => handleUpdateRow({ name: v })\" />\n </DataTableCell>\n\n <!-- Value -->\n <DataTableCell\n v-if=\"data.files\"\n class=\"col-span-2 max-h-none\"\n :colspan=\"2\">\n <RequestTableFileList\n ref=\"fileList\"\n :disabled=\"data.isReadonly\"\n :files=\"data.files\"\n :name=\"name\"\n @removeFile=\"(index) => emit('removeFile', index)\"\n @updateFile=\"(index, disabled) => emit('updateFile', index, disabled)\"\n @uploadFile=\"emit('uploadFile')\">\n <RequestTableTooltip\n v-if=\"data.schema\"\n :description=\"data.description\"\n :schema=\"data.schema\"\n :value=\"value\" />\n </RequestTableFileList>\n </DataTableCell>\n <DataTableCell v-else>\n <!-- Preset switcher for grouped global cookies that share a name -->\n <DataTableInputSelect\n v-if=\"data.presetOptions?.length\"\n :canAddCustomValue=\"false\"\n :modelValue=\"displayValue\"\n :value=\"data.presetOptions\"\n @update:modelValue=\"(v) => emit('selectPreset', v)\" />\n <CodeInputLite\n v-else\n ref=\"valueInput\"\n :aria-label=\"\n translate('apiClient.requestTableRow.valueLabel', {\n name: label ?? '',\n })\n \"\n :arrayEncoding=\"data.arrayEncoding\"\n class=\"pr-6 group-hover:pr-10 group-has-[.code-input-lite__editor:focus]:pr-10\"\n :default=\"defaultValue\"\n :disabled=\"data.isReadonly\"\n :enum=\"enumValue\"\n :environment=\"environment\"\n :examples=\"\n data.schema?.examples?.map((example) => String(example)) ?? []\n \"\n :linethrough=\"data.isOverridden\"\n :modelValue=\"displayValue\"\n :placeholder=\"translate('apiClient.requestTableRow.value')\"\n :type=\"typeValue\"\n withFakeData\n @navigate=\"(route) => emit('navigate', route)\"\n @update:modelValue=\"(v) => handleUpdateRow({ value: v })\">\n <template #icon>\n <ScalarButton\n v-if=\"\n Boolean(data.name || value) &&\n !data.isRequired &&\n data.isReadonly !== true\n \"\n :aria-label=\"\n translate('apiClient.requestTableRow.deleteRow', {\n name: data.name || translate('apiClient.requestTableRow.row'),\n })\n \"\n 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-[.code-input-lite__editor:focus]:flex\"\n size=\"sm\"\n variant=\"ghost\"\n @click=\"emit('deleteRow')\">\n <ScalarIconTrash class=\"size-3.5\" />\n </ScalarButton>\n\n <ScalarIconButton\n v-if=\"data.globalRoute !== undefined\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 h-fit\"\n :icon=\"ScalarIconGlobe\"\n :label=\"translate('apiClient.requestTableRow.globalCookieHint')\"\n size=\"xs\"\n tooltip=\"top\"\n variant=\"ghost\"\n @click=\"emit('navigate', data.globalRoute)\" />\n\n <RequestTableTooltip\n v-if=\"data.isReadonly\"\n :description=\"translate('apiClient.requestTableRow.readOnlyHint')\"\n :value=\"null\" />\n <RequestTableTooltip\n v-else-if=\"data.schema\"\n :description=\"data.description\"\n :schema=\"data.schema\"\n :value />\n </template>\n </CodeInputLite>\n </DataTableCell>\n\n <!-- File upload -->\n <DataTableCell\n v-if=\"showUploadButton && !data.files\"\n class=\"group/upload flex items-center justify-center whitespace-nowrap\">\n <template v-if=\"isFile\">\n <div\n class=\"text-c-2 flex w-full max-w-[100%] items-center justify-center overflow-hidden p-1\">\n <span\n class=\"truncate\"\n :title=\"displayValue\"\n >{{ displayValue }}</span\n >\n </div>\n <button\n class=\"bg-b-2 mt-1 block rounded p-0.5 text-center text-xs font-medium md:pointer-events-none md:absolute md:inset-x-1 md:top-1/2 md:mt-0 md:-translate-y-1/2 md:opacity-0 md:group-hover/upload:pointer-events-auto md:group-hover/upload:opacity-100\"\n type=\"button\"\n @click=\"emit('removeFile')\">\n {{ translate('apiClient.requestTableRow.delete') }}\n </button>\n </template>\n <template v-else-if=\"canUploadFile\">\n <div class=\"p-0.5\">\n <ScalarButton\n :aria-label=\"\n translate('apiClient.requestTableRow.uploadFor', {\n action: fileUploadLabel,\n name: name || translate('apiClient.requestTableRow.row'),\n })\n \"\n class=\"bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none\"\n size=\"sm\"\n variant=\"outlined\"\n @click=\"emit('uploadFile')\">\n <span>{{ fileUploadLabel }}</span>\n <ScalarIcon\n class=\"ml-1\"\n icon=\"Upload\"\n size=\"xs\"\n thickness=\"2.5\" />\n </ScalarButton>\n </div>\n </template>\n </DataTableCell>\n </DataTableRow>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDA,MAAM,OAAO;EAWb,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,aAAa,eAAe,YAAY;EAC9C,MAAM,WAAW,eAAe,UAAU;EAC1C,SAAa,EACX,kBAAwB;GACtB,IAAI,QAAA,KAAK,OACP,SAAS,OAAO,YAAY;QAE5B,WAAW,OAAO,MAAM;EAE5B,EACF,CAAC;EA6DD,MAAM,OAAO,IAAY,QAAA,KAAK,QAAQ,EAAE;EACxC,MAAM,QAAQ,IAAmB,kBAAkB,QAAA,KAAK,KAAK,KAAK,EAAE;EACpE,MAAM,aAAa,IAAa,QAAA,KAAK,cAAc,KAAK;EAGxD,YACQ,QAAA,KAAK,OACV,YAAY;GAIX,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,QAAA,iBAC7B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OAAO,aAAA;MACJ,GAAAC,gBAAA,aAAA,KAAY,GAAA,GAAA,UAAA,C,IAGpBD,mBAKS,UAAA;OAJP,OAAM;OACN,MAAK;OACJ,SAAK,OAAA,QAAA,OAAA,OAAA,WAAE,KAAI,YAAA;MACT,GAAAC,gBAAAf,MAAA,SAAA,CAAS,CAAA,kCAAA,CAAA,GAAA,CAAA,C,UAGK,cAAA,SACnBF,UAAA,GAAAc,mBAmBM,OAnBN,YAmBM,CAlBJR,YAiBeJ,MAAA,YAAA,GAAA;OAhBZ,cAA2BA,MAAA,SAAA,CAAS,CAAA,uCAAA;QAAkE,QAAA,gBAAA;QAAuC,MAAA,KAAA,SAAQA,MAAA,SAAA,CAAS,CAAA,+BAAA;;OAM/J,OAAM;OACN,MAAK;OACL,SAAQ;OACP,SAAK,OAAA,QAAA,OAAA,OAAA,WAAE,KAAI,YAAA;;OACZ,SAAAG,cAAkC,CAAlCW,mBAAkC,QAAA,MAAAC,gBAAzB,gBAAA,KAAe,GAAA,CAAA,GACxBX,YAIoBJ,MAAA,UAAA,GAAA;QAHlB,OAAM;QACN,MAAK;QACL,MAAK;QACL,WAAU"}
1
+ {"version":3,"file":"RequestTableRow.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","DataTableRow","_normalizeClass","_withCtx","_createVNode","DataTableCheckbox","DataTableCell","CodeInputLite","RequestTableFileList","RequestTableTooltip","DataTableInputSelect","_createElementBlock","_Fragment","_createElementVNode","_toDisplayString"],"sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconGlobe, ScalarIconTrash } from '@scalar/icons'\nimport type { ApiReferenceEvents } from '@scalar/workspace-store/events'\nimport { isFileSchema } from '@scalar/workspace-store/helpers/is-file-schema'\nimport { unpackProxyObject } from '@scalar/workspace-store/helpers/unpack-proxy'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n ParameterObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\nimport { computed, ref, useTemplateRef, watch } from 'vue'\n\nimport { getFileName } from '@/v2/blocks/request-block/helpers/files'\nimport { validateParameter } from '@/v2/blocks/request-block/helpers/validate-parameter'\nimport { CodeInputLite } from '@/v2/components/code-input'\nimport {\n DataTableCell,\n DataTableCheckbox,\n DataTableInputSelect,\n DataTableRow,\n} from '@/v2/components/data-table'\nimport { useLocalization } from '@/v2/features/localization'\n\nimport RequestTableTooltip from './RequestTableTooltip.vue'\nimport RequestTableFileList, {\n type RequestTableFile,\n} from './RequestTableFileList.vue'\n\nconst {\n data,\n environment,\n hasCheckboxDisabled,\n deferKeyUpdates,\n invalidParams,\n showUploadButton,\n allowUnknownFileUploads = true,\n} = defineProps<{\n data: TableRow\n /** Keep key edits local until blur when the row identity depends on its name. */\n deferKeyUpdates?: boolean\n hasCheckboxDisabled?: boolean\n invalidParams?: Set<string>\n label?: string\n environment: XScalarEnvironment\n showUploadButton?: boolean\n /** Unknown fields remain editable as files only in free-form multipart requests. */\n allowUnknownFileUploads?: boolean\n}>()\n\nconst emit = defineEmits<{\n (e: 'upsertRow', payload: TableRowUpsertPayload): void\n (e: 'deleteRow'): void\n (e: 'uploadFile'): void\n (e: 'removeFile', fileIndex?: number): void\n (e: 'updateFile', fileIndex: number, isDisabled: boolean): void\n (e: 'navigate', route: NonNullable<TableRow['globalRoute']>): void\n /** Select a value for a grouped global cookie preset. */\n (e: 'selectPreset', value: string): void\n}>()\n\nconst { translate } = useLocalization()\n\nconst valueInput = useTemplateRef('valueInput')\nconst fileList = useTemplateRef('fileList')\ndefineExpose({\n focusValue: (): void => {\n if (data.files) {\n fileList.value?.focusUpload()\n } else {\n valueInput.value?.focus()\n }\n },\n})\n\nexport type TableRow = {\n /** The parameter or field name/key */\n name: string\n /** The parameter value, can be a string, file, or null */\n value: string | File | null\n /** Selected files grouped for display; source rows remain separate multipart parts. */\n files?: RequestTableFile[]\n /** Optional description for the parameter */\n description?: string\n /** Optional route for global parameters (e.g., cookies shared across workspace) */\n globalRoute?: ApiReferenceEvents['ui:navigate']\n /** Whether the parameter is disabled/inactive */\n isDisabled?: boolean\n /** Whether an optional parameter is disabled because it has no explicit x-disabled value */\n isDisabledByDefault?: boolean\n /** OpenAPI schema object with type, validation rules, examples, etc. */\n schema?: SchemaObject\n /** Explicit media type for this multipart field. */\n contentType?: string\n /** Preserve array values even while their JSON text is temporarily invalid. */\n isArray?: boolean\n /** Text representation used by array enum controls. */\n arrayEncoding?: 'json' | 'comma-separated'\n /** Whether the parameter is required */\n isRequired?: boolean\n /**\n * Whether the parameter is readonly and can not be modifies directly\n * User can still override the parameter which is going to show up with the linethrough style\n */\n isReadonly?: boolean\n /** Whether the parameter is overridden later on */\n isOverridden?: boolean\n /** Track the original parameter so we can update it */\n originalParameter?: ParameterObject\n /** Path to a value inside the original parameter example for expanded object parameters */\n sourceParameterValuePath?: string[]\n /**\n * Selectable values for a grouped global cookie preset. When set, the value cell renders a\n * dropdown to switch between predefined values (for example a `Culture` cookie with `PL`/`EN`)\n * instead of an editable input.\n */\n presetOptions?: string[]\n}\n\nexport type TableRowUpsertPayload = {\n name: string\n value: string | File\n isDisabled: boolean\n shouldRenameExpandedRow?: boolean\n}\n\n/**\n * Track local state for the row\n *\n * Now this is required because of the way we get default values from the schema.\n * If we have a default value in data.value, then we update isDisabled to true. We lose the default value since now\n * we have an example where value: ''. This is why we need to track the local state and update all of the params at the\n * same time.\n */\nconst name = ref<string>(data.name ?? '')\nconst value = ref<string | File>(unpackProxyObject(data.value) ?? '')\nconst isDisabled = ref<boolean>(data.isDisabled ?? false)\n\n// Keep the above state synced with the data prop\nwatch(\n () => data.name,\n (newName) => {\n // Do not overwrite a valid local name with an empty incoming prop — this\n // can happen when the placeholder row (appended by displayData) is briefly\n // mapped onto this component instance before Vue re-keys the list.\n if (!newName && name.value && !deferKeyUpdates) {\n return\n }\n name.value = newName ?? ''\n },\n)\nwatch(\n () => data.value,\n (newValue) => (value.value = unpackProxyObject(newValue) ?? ''),\n)\nwatch(\n () => data.isDisabled,\n (newIsDisabled) => (isDisabled.value = newIsDisabled ?? false),\n)\n\n/** Check if the value is a File instance */\nconst isFile = computed(() => value.value instanceof File)\n\n/** Whether this row’s schema accepts a file part. */\nconst canUploadFile = computed<boolean>(() =>\n data.schema\n ? isFileSchema(data.schema, true, data.contentType)\n : allowUnknownFileUploads,\n)\n\nconst fileUploadLabel = computed<string>(() =>\n translate(\n data.schema && isArraySchema(data.schema)\n ? 'apiClient.requestTableRow.selectFiles'\n : 'apiClient.requestTableRow.selectFile',\n ),\n)\n\nconst hasMixedFileSelection = computed<boolean>(() =>\n Boolean(\n data.files?.some((file) => file.isDisabled) &&\n data.files.some((file) => !file.isDisabled),\n ),\n)\n\n/** Display value handles File instances and shows filename instead */\nconst displayValue = computed(\n () =>\n (isFile.value\n ? getFileName(value.value as File)\n : (value.value as string)) ?? '',\n)\n\nconst defaultValue = computed(() => data.schema?.default as string)\n\n/** See if we can extract enum values from the schema */\nconst enumValue = computed<unknown[]>(() => {\n if (!data.schema) {\n return []\n }\n\n // Grab the enum from the schema\n if (data.schema.enum) {\n return data.schema.enum.map((item) => String(item))\n }\n\n // Grab the enum from the items schema\n if ('items' in data.schema) {\n const resolved = resolve.schema(data.schema.items)\n if (resolved?.enum) {\n return data.arrayEncoding === 'json'\n ? resolved.enum\n : resolved.enum.map((item) => String(item))\n }\n }\n\n return []\n})\n\nconst typeValue = computed(() =>\n data.schema && 'type' in data.schema ? data.schema.type : undefined,\n)\n\nconst validationResult = computed(() =>\n validateParameter(data.schema, value.value),\n)\n\n/** Handle row updates while preserving existing properties */\nconst handleUpdateRow = (\n payload: Partial<{ name: string; value: string; isDisabled: boolean }>,\n options: { shouldRenameExpandedRow?: boolean; commitKey?: boolean } = {},\n): void => {\n // Update our local state\n if (payload.name !== undefined) {\n name.value = payload.name\n }\n if (payload.value !== undefined) {\n value.value = payload.value\n\n // Optional parameters start unchecked, but entering a value expresses intent to send it.\n // Explicit x-disabled values stay unchanged so a deliberate opt-out is preserved.\n if (data.isDisabledByDefault) {\n isDisabled.value = false\n }\n }\n\n // Is disabled should only be updated when explicitly provided in the payload\n if (payload.isDisabled !== undefined) {\n isDisabled.value = payload.isDisabled\n }\n\n if (\n payload.name !== undefined &&\n (deferKeyUpdates || data.sourceParameterValuePath) &&\n !options.shouldRenameExpandedRow &&\n !options.commitKey\n ) {\n return\n }\n\n // Emit all of the local state\n emit('upsertRow', {\n name: name.value,\n value: value.value,\n isDisabled: isDisabled.value,\n ...(options.shouldRenameExpandedRow\n ? { shouldRenameExpandedRow: true }\n : {}),\n })\n}\n\n/**\n * Commit a key edit when the input loses focus. Body and expanded-object rows defer their rename to blur (see\n * handleUpdateRow), so we only emit when the key actually changed. Focusing and blurring the field\n * without typing should not re-emit the row or silently reset its disabled state. The current\n * disabled state is passed through so a renamed row keeps it.\n */\nconst handleKeyBlur = (newName: string): void => {\n if (newName === data.name) {\n return\n }\n // Do not emit an update that would blank the parameter name — this can fire\n // when CodeInputLite blurs before it has rendered its initial value.\n if (!newName && data.name && (!deferKeyUpdates || name.value !== '')) {\n return\n }\n\n handleUpdateRow(\n { name: newName, isDisabled: isDisabled.value },\n {\n shouldRenameExpandedRow: Boolean(data.sourceParameterValuePath),\n commitKey: true,\n },\n )\n}\n\n/** Save a pending body key before the send shortcut reaches the request handler. */\nconst handleKeydown = (event: KeyboardEvent): void => {\n if (\n deferKeyUpdates &&\n event.key === 'Enter' &&\n (event.metaKey || event.ctrlKey)\n ) {\n handleKeyBlur(name.value)\n }\n}\n</script>\n\n<template>\n <DataTableRow\n :id=\"data.name\"\n :class=\"{\n alert: validationResult.ok === false,\n error: validationResult.ok === false && invalidParams?.has(data.name),\n }\">\n <DataTableCheckbox\n :ariaLabel=\"\n translate('apiClient.requestTableRow.include', {\n name: data.name || translate('apiClient.requestTableRow.row'),\n })\n \"\n class=\"!border-r\"\n :class=\"{ 'max-h-none': data.files }\"\n :disabled=\"hasCheckboxDisabled ?? false\"\n :indeterminate=\"hasMixedFileSelection\"\n :modelValue=\"!isDisabled\"\n @update:modelValue=\"(v) => handleUpdateRow({ isDisabled: !v })\" />\n\n <!-- Name -->\n <DataTableCell :class=\"{ 'max-h-none': data.files }\">\n <CodeInputLite\n :aria-label=\"\n translate('apiClient.requestTableRow.keyLabel', { name: label ?? '' })\n \"\n :disabled=\"data.isReadonly\"\n :environment=\"environment\"\n :modelValue=\"name\"\n :placeholder=\"translate('apiClient.requestTableRow.key')\"\n :required=\"Boolean(data.isRequired)\"\n @blur=\"(v) => handleKeyBlur(v)\"\n @keydown.capture=\"handleKeydown\"\n @navigate=\"(route) => emit('navigate', route)\"\n @update:modelValue=\"(v) => handleUpdateRow({ name: v })\" />\n </DataTableCell>\n\n <!-- Value -->\n <DataTableCell\n v-if=\"data.files\"\n class=\"col-span-2 max-h-none\"\n :colspan=\"2\">\n <RequestTableFileList\n ref=\"fileList\"\n :disabled=\"data.isReadonly\"\n :files=\"data.files\"\n :name=\"name\"\n @removeFile=\"(index) => emit('removeFile', index)\"\n @updateFile=\"(index, disabled) => emit('updateFile', index, disabled)\"\n @uploadFile=\"emit('uploadFile')\">\n <RequestTableTooltip\n v-if=\"data.schema\"\n :description=\"data.description\"\n :schema=\"data.schema\"\n :value=\"value\" />\n </RequestTableFileList>\n </DataTableCell>\n <DataTableCell v-else>\n <!-- Preset switcher for grouped global cookies that share a name -->\n <DataTableInputSelect\n v-if=\"data.presetOptions?.length\"\n :canAddCustomValue=\"false\"\n :modelValue=\"displayValue\"\n :value=\"data.presetOptions\"\n @update:modelValue=\"(v) => emit('selectPreset', v)\" />\n <CodeInputLite\n v-else\n ref=\"valueInput\"\n :aria-label=\"\n translate('apiClient.requestTableRow.valueLabel', {\n name: label ?? '',\n })\n \"\n :arrayEncoding=\"data.arrayEncoding\"\n class=\"pr-6 group-hover:pr-10 group-has-[.code-input-lite__editor:focus]:pr-10\"\n :default=\"defaultValue\"\n :disabled=\"data.isReadonly\"\n :enum=\"enumValue\"\n :environment=\"environment\"\n :examples=\"\n data.schema?.examples?.map((example) => String(example)) ?? []\n \"\n :linethrough=\"data.isOverridden\"\n :modelValue=\"displayValue\"\n :placeholder=\"translate('apiClient.requestTableRow.value')\"\n :type=\"typeValue\"\n withFakeData\n @navigate=\"(route) => emit('navigate', route)\"\n @update:modelValue=\"(v) => handleUpdateRow({ value: v })\">\n <template #icon>\n <ScalarButton\n v-if=\"\n Boolean(data.name || value) &&\n !data.isRequired &&\n data.isReadonly !== true\n \"\n :aria-label=\"\n translate('apiClient.requestTableRow.deleteRow', {\n name: data.name || translate('apiClient.requestTableRow.row'),\n })\n \"\n 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-[.code-input-lite__editor:focus]:flex\"\n size=\"sm\"\n variant=\"ghost\"\n @click=\"emit('deleteRow')\">\n <ScalarIconTrash class=\"size-3.5\" />\n </ScalarButton>\n\n <ScalarIconButton\n v-if=\"data.globalRoute !== undefined\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 h-fit\"\n :icon=\"ScalarIconGlobe\"\n :label=\"translate('apiClient.requestTableRow.globalCookieHint')\"\n size=\"xs\"\n tooltip=\"top\"\n variant=\"ghost\"\n @click=\"emit('navigate', data.globalRoute)\" />\n\n <RequestTableTooltip\n v-if=\"data.isReadonly\"\n :description=\"translate('apiClient.requestTableRow.readOnlyHint')\"\n :value=\"null\" />\n <RequestTableTooltip\n v-else-if=\"data.schema\"\n :description=\"data.description\"\n :schema=\"data.schema\"\n :value />\n </template>\n </CodeInputLite>\n </DataTableCell>\n\n <!-- File upload -->\n <DataTableCell\n v-if=\"showUploadButton && !data.files\"\n class=\"group/upload flex items-center justify-center whitespace-nowrap\">\n <template v-if=\"isFile\">\n <div\n class=\"text-c-2 flex w-full max-w-[100%] items-center justify-center overflow-hidden p-1\">\n <span\n class=\"truncate\"\n :title=\"displayValue\"\n >{{ displayValue }}</span\n >\n </div>\n <button\n class=\"bg-b-2 mt-1 block rounded p-0.5 text-center text-xs font-medium md:pointer-events-none md:absolute md:inset-x-1 md:top-1/2 md:mt-0 md:-translate-y-1/2 md:opacity-0 md:group-hover/upload:pointer-events-auto md:group-hover/upload:opacity-100\"\n type=\"button\"\n @click=\"emit('removeFile')\">\n {{ translate('apiClient.requestTableRow.delete') }}\n </button>\n </template>\n <template v-else-if=\"canUploadFile\">\n <div class=\"p-0.5\">\n <ScalarButton\n :aria-label=\"\n translate('apiClient.requestTableRow.uploadFor', {\n action: fileUploadLabel,\n name: name || translate('apiClient.requestTableRow.row'),\n })\n \"\n class=\"bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none\"\n size=\"sm\"\n variant=\"outlined\"\n @click=\"emit('uploadFile')\">\n <span>{{ fileUploadLabel }}</span>\n <ScalarIcon\n class=\"ml-1\"\n icon=\"Upload\"\n size=\"xs\"\n thickness=\"2.5\" />\n </ScalarButton>\n </div>\n </template>\n </DataTableCell>\n </DataTableRow>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDA,MAAM,OAAO;EAWb,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,aAAa,eAAe,YAAY;EAC9C,MAAM,WAAW,eAAe,UAAU;EAC1C,SAAa,EACX,kBAAwB;GACtB,IAAI,QAAA,KAAK,OACP,SAAS,OAAO,YAAY;QAE5B,WAAW,OAAO,MAAM;EAE5B,EACF,CAAC;EA6DD,MAAM,OAAO,IAAY,QAAA,KAAK,QAAQ,EAAE;EACxC,MAAM,QAAQ,IAA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,qBAAA,GAAA;;MAvCd,OAAM;;MACN,SAAAH,cAeW,CAfK,OAAA,SAAhBL,UAAA,GAAAa,mBAeWC,UAAA,EAAA,KAAA,EAAA,GAAA,CAdTC,mBAOM,OAPN,YAOM,CALJA,mBAIC,QAAA;OAHC,OAAM;OACL,OAAO,aAAA;MACJ,GAAAC,gBAAA,aAAA,KAAY,GAAA,GAAA,UAAA,C,IAGpBD,mBAKS,UAAA;OAJP,OAAM;OACN,MAAK;OACJ,SAAK,OAAA,QAAA,OAAA,OAAA,WAAE,KAAI,YAAA;MACT,GAAAC,gBAAAd,MAAA,SAAA,CAAS,CAAA,kCAAA,CAAA,GAAA,CAAA,C,UAGK,cAAA,SACnBF,UAAA,GAAAa,mBAmBM,OAnBN,YAmBM,CAlBJP,YAiBeJ,MAAA,YAAA,GAAA;OAhBZ,cAA2BA,MAAA,SAAA,CAAS,CAAA,uCAAA;QAAkE,QAAA,gBAAA;QAAuC,MAAA,KAAA,SAAQA,MAAA,SAAA,CAAS,CAAA,+BAAA;;OAM/J,OAAM;OACN,MAAK;OACL,SAAQ;OACP,SAAK,OAAA,QAAA,OAAA,OAAA,WAAE,KAAI,YAAA;;OACZ,SAAAG,cAAkC,CAAlCU,mBAAkC,QAAA,MAAAC,gBAAzB,gBAAA,KAAe,GAAA,CAAA,GACxBV,YAIoBJ,MAAA,UAAA,GAAA;QAHlB,OAAM;QACN,MAAK;QACL,MAAK;QACL,WAAU"}
@@ -1,7 +1,6 @@
1
1
  import RequestTableTooltip_vue_vue_type_script_setup_true_lang_default from "./RequestTableTooltip.vue_vue_type_script_setup_true_lang.js";
2
- //#region src/v2/blocks/request-block/components/RequestTableTooltip.vue
2
+ // src/v2/blocks/request-block/components/RequestTableTooltip.vue
3
3
  var RequestTableTooltip_default = RequestTableTooltip_vue_vue_type_script_setup_true_lang_default;
4
- //#endregion
5
4
  export { RequestTableTooltip_default as default };
6
5
 
7
6
  //# sourceMappingURL=RequestTableTooltip.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.js","names":["_sfc_main"],"sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconInfo, ScalarIconWarning } from '@scalar/icons'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed, toDisplayString } from 'vue'\n\nimport { validateParameter } from '@/v2/blocks/request-block/helpers/validate-parameter'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { schema, value, description } = defineProps<{\n schema?: SchemaObject\n value: string | File | null\n description?: string\n}>()\n\nconst { translate } = useLocalization()\n\nconst invalidParameterMessage = computed(() => validateParameter(schema, value))\nconst isInvalid = computed(() => invalidParameterMessage.value.ok === false)\nconst schemaDetails = computed<string[]>(() => {\n if (!schema) {\n return []\n }\n\n const type = 'type' in schema ? schema.type : undefined\n\n return [\n Array.isArray(type) ? type.join(' | ') : (type ?? ''),\n 'format' in schema ? (schema.format ?? '') : '',\n 'minimum' in schema && schema.minimum !== undefined\n ? `${translate('apiClient.requestTableTooltip.min')} ${schema.minimum}`\n : '',\n 'maximum' in schema && schema.maximum !== undefined\n ? `${translate('apiClient.requestTableTooltip.max')} ${schema.maximum}`\n : '',\n 'default' in schema && schema.default !== undefined\n ? `${translate('apiClient.requestTableTooltip.default')} ${toDisplayString(schema.default)}`\n : '',\n ].filter((detail) => detail.trim().length > 0)\n})\nconst hasDescription = computed<boolean>(() => Boolean(description?.trim()))\nconst hasContent = computed<boolean>(\n () =>\n isInvalid.value || schemaDetails.value.length > 0 || hasDescription.value,\n)\n</script>\n<template>\n <ScalarPopover\n v-if=\"hasContent\"\n :offset=\"4\"\n placement=\"left\"\n teleport>\n <button\n :aria-label=\"\n isInvalid\n ? translate('apiClient.requestTableTooltip.invalid')\n : translate('apiClient.requestTableTooltip.moreInformation')\n \"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1\"\n :role=\"isInvalid ? 'alert' : 'none'\"\n type=\"button\">\n <ScalarIconWarning\n v-if=\"isInvalid\"\n class=\"text-orange size-3.5 brightness-90 hover:brightness-75\" />\n <ScalarIconInfo\n v-else\n class=\"text-c-2 hover:text-c-1 size-3.5\" />\n </button>\n <template #popover>\n <div\n class=\"text-xxs text-c-1 grid w-fit max-w-xs min-w-0 gap-1.5 rounded p-1.5 leading-normal wrap-anywhere\"\n data-testid=\"request-table-tooltip-content\">\n <div\n v-if=\"invalidParameterMessage.ok === false\"\n class=\"text-error-1\">\n {{ invalidParameterMessage.message }}\n </div>\n <div\n v-else-if=\"schemaDetails.length\"\n class=\"schema text-c-2 *:not-first:before:content-['_·_']\">\n <span\n v-for=\"(detail, index) in schemaDetails\"\n :key=\"index\"\n >{{ detail }}</span\n >\n </div>\n <ScalarMarkdown\n v-if=\"hasDescription && !isInvalid\"\n :value=\"description\" />\n </div>\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"RequestTableTooltip.vue.js","names":[],"sources":[],"mappings":""}
@@ -1,10 +1,10 @@
1
- import { useLocalization } from "../../../features/localization/index.js";
2
1
  import { validateParameter } from "../helpers/validate-parameter.js";
2
+ import { useLocalization } from "../../../features/localization/index.js";
3
3
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
4
4
  import { ScalarIconInfo, ScalarIconWarning } from "@scalar/icons";
5
5
  import { ScalarMarkdown } from "@scalar/components/markdown";
6
6
  import { ScalarPopover } from "@scalar/components/popover";
7
- //#region src/v2/blocks/request-block/components/RequestTableTooltip.vue?vue&type=script&setup=true&lang.ts
7
+ // src/v2/blocks/request-block/components/RequestTableTooltip.vue?vue&type=script&setup=true&lang.ts
8
8
  var _hoisted_1 = ["aria-label", "role"];
9
9
  var _hoisted_2 = {
10
10
  class: "text-xxs text-c-1 grid w-fit max-w-xs min-w-0 gap-1.5 rounded p-1.5 leading-normal wrap-anywhere",
@@ -72,7 +72,6 @@ var RequestTableTooltip_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
72
72
  };
73
73
  }
74
74
  });
75
- //#endregion
76
75
  export { RequestTableTooltip_vue_vue_type_script_setup_true_lang_default as default };
77
76
 
78
77
  //# sourceMappingURL=RequestTableTooltip.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","_withCtx","_createElementVNode","_createElementBlock","_toDisplayString","_Fragment","_renderList","_createCommentVNode"],"sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconInfo, ScalarIconWarning } from '@scalar/icons'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed, toDisplayString } from 'vue'\n\nimport { validateParameter } from '@/v2/blocks/request-block/helpers/validate-parameter'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { schema, value, description } = defineProps<{\n schema?: SchemaObject\n value: string | File | null\n description?: string\n}>()\n\nconst { translate } = useLocalization()\n\nconst invalidParameterMessage = computed(() => validateParameter(schema, value))\nconst isInvalid = computed(() => invalidParameterMessage.value.ok === false)\nconst schemaDetails = computed<string[]>(() => {\n if (!schema) {\n return []\n }\n\n const type = 'type' in schema ? schema.type : undefined\n\n return [\n Array.isArray(type) ? type.join(' | ') : (type ?? ''),\n 'format' in schema ? (schema.format ?? '') : '',\n 'minimum' in schema && schema.minimum !== undefined\n ? `${translate('apiClient.requestTableTooltip.min')} ${schema.minimum}`\n : '',\n 'maximum' in schema && schema.maximum !== undefined\n ? `${translate('apiClient.requestTableTooltip.max')} ${schema.maximum}`\n : '',\n 'default' in schema && schema.default !== undefined\n ? `${translate('apiClient.requestTableTooltip.default')} ${toDisplayString(schema.default)}`\n : '',\n ].filter((detail) => detail.trim().length > 0)\n})\nconst hasDescription = computed<boolean>(() => Boolean(description?.trim()))\nconst hasContent = computed<boolean>(\n () =>\n isInvalid.value || schemaDetails.value.length > 0 || hasDescription.value,\n)\n</script>\n<template>\n <ScalarPopover\n v-if=\"hasContent\"\n :offset=\"4\"\n placement=\"left\"\n teleport>\n <button\n :aria-label=\"\n isInvalid\n ? translate('apiClient.requestTableTooltip.invalid')\n : translate('apiClient.requestTableTooltip.moreInformation')\n \"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1\"\n :role=\"isInvalid ? 'alert' : 'none'\"\n type=\"button\">\n <ScalarIconWarning\n v-if=\"isInvalid\"\n class=\"text-orange size-3.5 brightness-90 hover:brightness-75\" />\n <ScalarIconInfo\n v-else\n class=\"text-c-2 hover:text-c-1 size-3.5\" />\n </button>\n <template #popover>\n <div\n class=\"text-xxs text-c-1 grid w-fit max-w-xs min-w-0 gap-1.5 rounded p-1.5 leading-normal wrap-anywhere\"\n data-testid=\"request-table-tooltip-content\">\n <div\n v-if=\"invalidParameterMessage.ok === false\"\n class=\"text-error-1\">\n {{ invalidParameterMessage.message }}\n </div>\n <div\n v-else-if=\"schemaDetails.length\"\n class=\"schema text-c-2 *:not-first:before:content-['_·_']\">\n <span\n v-for=\"(detail, index) in schemaDetails\"\n :key=\"index\"\n >{{ detail }}</span\n >\n </div>\n <ScalarMarkdown\n v-if=\"hasDescription && !isInvalid\"\n :value=\"description\" />\n </div>\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,0BAA0B,eAAe,kBAAkB,QAAA,QAAQ,QAAA,KAAK,CAAC;EAC/E,MAAM,YAAY,eAAe,wBAAwB,MAAM,OAAO,KAAK;EAC3E,MAAM,gBAAgB,e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K,MAAK,GAAAC,gBACP,MAAM,GAAA,CAAA;I,6CAIN,eAAA,SAAc,CAAK,UAAA,SAD3BN,UAAA,GAAAC,YAEyBC,MAAA,cAAA,GAAA;;KAAtB,OAAO,QAAA;;IApCd,SAAAC,cAeS,CAfTC,mBAeS,UAAA;KAdN,cAAqB,UAAA,QAAsBF,MAAA,SAAA,CAAS,CAAA,uCAAA,IAAsDA,MAAA,SAAA,CAAS,CAAA,+CAAA;KAKpH,OAAM;KACL,MAAM,UAAA,QAAS,UAAA;KAChB,MAAK;I,IAEG,UAAA,SADRF,UAAA,GAAAC,YAEmEC,MAAA,iBAAA,GAAA;;KAAjE,OAAM;I,OACRF,UAAA,GAAAC,YAE6CC,MAAA,cAAA,GAAA;;KAA3C,OAAM"}
1
+ {"version":3,"file":"RequestTableTooltip.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","_withCtx","_createElementVNode","_createElementBlock","_toDisplayString","_Fragment","_renderList"],"sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconInfo, ScalarIconWarning } from '@scalar/icons'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { computed, toDisplayString } from 'vue'\n\nimport { validateParameter } from '@/v2/blocks/request-block/helpers/validate-parameter'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { schema, value, description } = defineProps<{\n schema?: SchemaObject\n value: string | File | null\n description?: string\n}>()\n\nconst { translate } = useLocalization()\n\nconst invalidParameterMessage = computed(() => validateParameter(schema, value))\nconst isInvalid = computed(() => invalidParameterMessage.value.ok === false)\nconst schemaDetails = computed<string[]>(() => {\n if (!schema) {\n return []\n }\n\n const type = 'type' in schema ? schema.type : undefined\n\n return [\n Array.isArray(type) ? type.join(' | ') : (type ?? ''),\n 'format' in schema ? (schema.format ?? '') : '',\n 'minimum' in schema && schema.minimum !== undefined\n ? `${translate('apiClient.requestTableTooltip.min')} ${schema.minimum}`\n : '',\n 'maximum' in schema && schema.maximum !== undefined\n ? `${translate('apiClient.requestTableTooltip.max')} ${schema.maximum}`\n : '',\n 'default' in schema && schema.default !== undefined\n ? `${translate('apiClient.requestTableTooltip.default')} ${toDisplayString(schema.default)}`\n : '',\n ].filter((detail) => detail.trim().length > 0)\n})\nconst hasDescription = computed<boolean>(() => Boolean(description?.trim()))\nconst hasContent = computed<boolean>(\n () =>\n isInvalid.value || schemaDetails.value.length > 0 || hasDescription.value,\n)\n</script>\n<template>\n <ScalarPopover\n v-if=\"hasContent\"\n :offset=\"4\"\n placement=\"left\"\n teleport>\n <button\n :aria-label=\"\n isInvalid\n ? translate('apiClient.requestTableTooltip.invalid')\n : translate('apiClient.requestTableTooltip.moreInformation')\n \"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1\"\n :role=\"isInvalid ? 'alert' : 'none'\"\n type=\"button\">\n <ScalarIconWarning\n v-if=\"isInvalid\"\n class=\"text-orange size-3.5 brightness-90 hover:brightness-75\" />\n <ScalarIconInfo\n v-else\n class=\"text-c-2 hover:text-c-1 size-3.5\" />\n </button>\n <template #popover>\n <div\n class=\"text-xxs text-c-1 grid w-fit max-w-xs min-w-0 gap-1.5 rounded p-1.5 leading-normal wrap-anywhere\"\n data-testid=\"request-table-tooltip-content\">\n <div\n v-if=\"invalidParameterMessage.ok === false\"\n class=\"text-error-1\">\n {{ invalidParameterMessage.message }}\n </div>\n <div\n v-else-if=\"schemaDetails.length\"\n class=\"schema text-c-2 *:not-first:before:content-['_·_']\">\n <span\n v-for=\"(detail, index) in schemaDetails\"\n :key=\"index\"\n >{{ detail }}</span\n >\n </div>\n <ScalarMarkdown\n v-if=\"hasDescription && !isInvalid\"\n :value=\"description\" />\n </div>\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;E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MAAc,UAD3BN,UAAA,GAAAK,mBAQM,OARN,YAQM,EALJL,UAAA,IAAA,GAAAK,mBAICE,UAAA,MAAAC,WAH2B,cAAA,QAAlB,QAAQ,UAAK;KADvB,OAAAR,UAAA,GAAAK,mBAIC,QAAA,EAFE,KAAK,MAAK,GAAAC,gBACP,MAAM,GAAA,CAAA;I,6CAIN,eAAA,SAAc,CAAK,UAAA,SAD3BN,UAAA,GAAAC,YAEyBC,MAAA,cAAA,GAAA;;KAAtB,OAAO,QAAA;;IApCd,SAAAC,cAeS,CAfTC,mBAeS,UAAA;KAdN,cAAqB,UAAA,QAAsBF,MAAA,SAAA,CAAS,CAAA,uCAAA,IAAsDA,MAAA,SAAA,CAAS,CAAA,+CAAA;KAKpH,OAAM;KACL,MAAM,UAAA,QAAS,UAAA;KAChB,MAAK;I,IAEG,UAAA,SADRF,UAAA,GAAAC,YAEmEC,MAAA,iBAAA,GAAA;;KAAjE,OAAM;I,OACRF,UAAA,GAAAC,YAE6CC,MAAA,cAAA,GAAA;;KAA3C,OAAM"}
@@ -1,6 +1,6 @@
1
1
  import { deSerializeSchemaValue } from "@scalar/workspace-store/request-example";
2
2
  import { setValueAtPath } from "@scalar/helpers/object/set-value-at-path";
3
- //#region src/v2/blocks/request-block/helpers/create-parameter-handlers.ts
3
+ // src/v2/blocks/request-block/helpers/create-parameter-handlers.ts
4
4
  var isEmptyValue = (value) => value === void 0 || value === null || value === "";
5
5
  /**
6
6
  * Whether a row name carries the display-only deepObject array marker (`filters[id][in][]`). The
@@ -119,7 +119,6 @@ var createParameterHandlers = (type, eventBus, meta, { context, defaultParameter
119
119
  }
120
120
  };
121
121
  };
122
- //#endregion
123
122
  export { createParameterHandlers };
124
123
 
125
124
  //# sourceMappingURL=create-parameter-handlers.js.map
@@ -9,6 +9,8 @@ import type { TableRow } from '../components/RequestTableRow.vue.js';
9
9
  * through as a single row.
10
10
  */
11
11
  export declare const createParameterRows: (parameter: ParameterObject, exampleKey: string, options?: {
12
+ openapiVersion?: string;
13
+ jsonSchemaDialect?: string;
12
14
  hiddenValuePaths?: readonly string[][];
13
15
  renamedValuePaths?: readonly {
14
16
  from: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"create-parameter-rows.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/create-parameter-rows.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AAkWjE;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,WAAW,eAAe,EAC1B,YAAY,MAAM,EAClB,UAAS;IACP,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,CAAA;IACtC,iBAAiB,CAAC,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,EAAE,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAA;CAC3D,KACL,QAAQ,EAmGV,CAAA"}
1
+ {"version":3,"file":"create-parameter-rows.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/create-parameter-rows.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AAkWjE;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,WAAW,eAAe,EAC1B,YAAY,MAAM,EAClB,UAAS;IACP,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,CAAA;IACtC,iBAAiB,CAAC,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,EAAE,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAA;CAC3D,KACL,QAAQ,EAuGV,CAAA"}
@@ -6,7 +6,7 @@ import { isObject } from "@scalar/helpers/object/is-object";
6
6
  import { isArraySchema, isObjectSchema } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
7
7
  import { getParameterExample } from "@scalar/workspace-store/helpers/get-parameter-example";
8
8
  import { getQuerystringParameter, serializeQuerystringParameter } from "@scalar/workspace-store/helpers/querystring-parameter";
9
- //#region src/v2/blocks/request-block/helpers/create-parameter-rows.ts
9
+ // src/v2/blocks/request-block/helpers/create-parameter-rows.ts
10
10
  var isParameterWithSchema = (parameter) => "schema" in parameter && parameter.schema !== void 0;
11
11
  var resolveSchema = (schema) => {
12
12
  return getResolvedRef(schema);
@@ -197,7 +197,11 @@ var createParameterRows = (parameter, exampleKey, options = {}) => {
197
197
  const isDisabledByDefault = !parameter.required && parameter.in !== "path" && example?.["x-disabled"] === void 0;
198
198
  const schema = getParameterSchema(parameter);
199
199
  if (parameter.in === "querystring") {
200
- const querystring = getQuerystringParameter(parameter, exampleKey, { includeDisabled: true });
200
+ const querystring = getQuerystringParameter(parameter, exampleKey, {
201
+ includeDisabled: true,
202
+ openapiVersion: options.openapiVersion,
203
+ jsonSchemaDialect: options.jsonSchemaDialect
204
+ });
201
205
  return [toSingleParameterRow(parameter, void 0, querystring ? serializeQuerystringParameter(querystring) : "", isDisabled, isDisabledByDefault)];
202
206
  }
203
207
  const mode = selected.serialized ? null : getExpansionMode(parameter, schema);
@@ -240,7 +244,6 @@ var createParameterRows = (parameter, exampleKey, options = {}) => {
240
244
  };
241
245
  });
242
246
  };
243
- //#endregion
244
247
  export { createParameterRows };
245
248
 
246
249
  //# sourceMappingURL=create-parameter-rows.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-parameter-rows.js","names":[],"sources":["../../../../../src/v2/blocks/request-block/helpers/create-parameter-rows.ts"],"sourcesContent":["import { getValueAtPath } from '@scalar/helpers/object/get-value-at-path'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport { getParameterExample } from '@scalar/workspace-store/helpers/get-parameter-example'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n getQuerystringParameter,\n serializeQuerystringParameter,\n} from '@scalar/workspace-store/helpers/querystring-parameter'\nimport { deSerializeParameter, isParamDisabled } from '@scalar/workspace-store/request-example'\nimport type {\n ParameterObject,\n ParameterWithSchemaObject,\n ReferenceType,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema, isObjectSchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\nimport type { TableRow } from '../components/RequestTableRow.vue'\nimport { getParameterSchema } from './get-parameter-schema'\n\ntype ParameterWithRequiredSchema = ParameterWithSchemaObject & {\n schema: ReferenceType<SchemaObject>\n}\n\n/** Serialization mode for object-typed query parameters that we expand into multiple rows. */\ntype ExpansionMode = 'form' | 'deepObject'\n\nconst isParameterWithSchema = (parameter: ParameterObject): parameter is ParameterWithRequiredSchema =>\n 'schema' in parameter && parameter.schema !== undefined\n\nconst resolveSchema = (schema: unknown): SchemaObject | undefined => {\n const resolvedSchema = getResolvedRef(schema as SchemaObject | { '$ref': string; '$ref-value': SchemaObject })\n\n return resolvedSchema\n}\n\n/**\n * Resolves the OpenAPI serialization style and explode flag for a parameter, falling back to the\n * spec defaults (style: 'form', explode: true when style is 'form').\n */\nconst getParameterStyleAndExplode = (parameter: ParameterObject): { style: string; explode: boolean } => {\n const style = 'style' in parameter && parameter.style ? parameter.style : 'form'\n const explode = 'explode' in parameter && parameter.explode !== undefined ? parameter.explode : style === 'form'\n\n return { style, explode }\n}\n\n/**\n * Decides whether an object-typed query parameter should be expanded into one row per property,\n * and which expansion mode to use. Returns null when the parameter should stay as a single row\n * (non-query, non-object schema, or a serialization style we do not expand).\n */\nconst getExpansionMode = (parameter: ParameterObject, schema: SchemaObject | undefined): ExpansionMode | null => {\n if (parameter.in !== 'query' || !isParameterWithSchema(parameter) || !schema || !isObjectSchema(schema)) {\n return null\n }\n\n const { style, explode } = getParameterStyleAndExplode(parameter)\n if (!explode) {\n return null\n }\n\n if (style === 'form') {\n return 'form'\n }\n if (style === 'deepObject') {\n return 'deepObject'\n }\n\n return null\n}\n\nconst toTableValue = (value: unknown): string => {\n if (value === undefined || value === null) {\n return ''\n }\n\n if (Array.isArray(value)) {\n return value.join(',')\n }\n\n if (typeof value === 'object') {\n return JSON.stringify(value)\n }\n\n return String(value)\n}\n\nconst toPathKey = (path: readonly string[]): string => path.join('\\u0000')\n\nconst toTableRow = ({\n parameter,\n name,\n value,\n description,\n schema,\n isRequired,\n isDisabled,\n isDisabledByDefault,\n sourceParameterValuePath,\n}: {\n parameter: ParameterObject\n name: string\n value: unknown\n description: string | undefined\n schema: SchemaObject | undefined\n isRequired: boolean | undefined\n isDisabled: boolean\n isDisabledByDefault?: boolean\n sourceParameterValuePath?: string[]\n}): TableRow => ({\n name,\n value: toTableValue(value),\n description,\n schema,\n isRequired,\n isDisabled,\n ...(isDisabledByDefault ? { isDisabledByDefault: true } : {}),\n originalParameter: parameter,\n sourceParameterValuePath,\n})\n\n/**\n * Builds the row name for an expanded property at a given value path. deepObject rows mirror the\n * wire format (`parent[a][b]`); form-style explode uses the bare top-level key.\n */\nconst getExpandedRowName = (parameter: ParameterObject, path: string[], mode: ExpansionMode): string =>\n mode === 'deepObject' ? `${parameter.name}${path.map((segment) => `[${segment}]`).join('')}` : (path[0] ?? '')\n\n/**\n * Appends the display-only trailing `[]` to deepObject array leaves so the name matches the\n * serialized `parent[ids][]=1&parent[ids][]=2` form. The bracket is display-only — the row's\n * `sourceParameterValuePath` stays bracket-free. It also lets write-back recognize the leaf as an\n * array even on renamed and unmapped rows, which carry no schema.\n */\nconst withArrayBracket = (name: string, mode: ExpansionMode, isArray: boolean): string =>\n mode === 'deepObject' && isArray ? `${name}[]` : name\n\n/** Build the single-row representation used when a parameter is not expanded. */\nconst toSingleParameterRow = (\n parameter: ParameterObject,\n schema: SchemaObject | undefined,\n value: unknown,\n isDisabled: boolean,\n isDisabledByDefault: boolean,\n): TableRow =>\n toTableRow({\n parameter,\n name: parameter.name,\n value,\n description: parameter.description,\n schema,\n isRequired: parameter.required,\n isDisabled,\n isDisabledByDefault,\n })\n\n/**\n * Walks an object schema and produces one row per property.\n *\n * - In `form` mode (the OpenAPI default for query parameters) only the top-level properties are\n * flattened, and each row is named after the property itself (`status`).\n * - In `deepObject` mode we recurse into nested objects and emit bracketed names that mirror the\n * serialization on the wire (`filter[user][id]`).\n *\n * `pathPrefix` tracks the path inside the parent parameter value so the handler can later\n * reassemble all sibling rows back into a single object payload.\n */\nconst getExpandedPropertyRows = ({\n parameter,\n schema,\n value,\n pathPrefix,\n namePrefix,\n mode,\n isDisabled,\n isDisabledByDefault,\n hiddenValuePaths,\n renamedValuePaths,\n renameTargetPaths,\n}: {\n parameter: ParameterObject\n schema: Extract<SchemaObject, { type: 'object' }>\n value: unknown\n pathPrefix: string[]\n namePrefix: string\n mode: ExpansionMode\n isDisabled: boolean\n isDisabledByDefault: boolean\n hiddenValuePaths: ReadonlySet<string>\n renamedValuePaths: ReadonlyMap<string, string[]>\n renameTargetPaths: ReadonlySet<string>\n}): TableRow[] => {\n if (!schema.properties) {\n return []\n }\n\n const requiredProperties = new Set(schema.required ?? [])\n\n return Object.entries(schema.properties).flatMap(([propertyName, propertySchema]) => {\n const resolvedPropertySchema = resolveSchema(propertySchema)\n if (!resolvedPropertySchema) {\n return []\n }\n\n const path = [...pathPrefix, propertyName]\n const name = namePrefix ? `${namePrefix}[${propertyName}]` : propertyName\n\n // When this property was renamed, the value lives at the typed key instead of the schema path.\n // Keep the row in its original slot so it does not jump to the end of the table.\n const renamedTo = renamedValuePaths.get(toPathKey(path))\n const effectivePath = renamedTo ?? path\n\n if (hiddenValuePaths.has(toPathKey(effectivePath))) {\n return []\n }\n\n if (renamedTo) {\n // The value move is debounced, so until it lands the value still sits at the old schema path.\n // Fall back to it so the renamed row shows its value immediately instead of flickering empty.\n const renamedValue = getValueAtPath(value, renamedTo)\n const effectiveValue = renamedValue === undefined ? getValueAtPath(value, path) : renamedValue\n\n return [\n toTableRow({\n parameter,\n // The renamed key carries no schema, so the value's array-ness drives the `[]` marker.\n name: withArrayBracket(getExpandedRowName(parameter, renamedTo, mode), mode, Array.isArray(effectiveValue)),\n value: effectiveValue,\n description: parameter.description,\n // The renamed key no longer maps to the schema property, so it carries no schema.\n schema: undefined,\n isRequired: false,\n isDisabled,\n isDisabledByDefault,\n sourceParameterValuePath: renamedTo,\n }),\n ]\n }\n\n // Another property was renamed onto this path (for example \"a\" renamed to an existing \"b\").\n // The renamed row already occupies this slot, so skip the schema-derived row to avoid rendering\n // two rows for the same value path.\n if (renameTargetPaths.has(toPathKey(path))) {\n return []\n }\n\n // Only deepObject style recurses into nested objects. The OpenAPI 3.1 spec says form-style\n // explode flattens only the top-level properties.\n const shouldRecurse =\n mode === 'deepObject' && isObjectSchema(resolvedPropertySchema) && Boolean(resolvedPropertySchema.properties)\n\n if (shouldRecurse) {\n return getExpandedPropertyRows({\n parameter,\n schema: resolvedPropertySchema,\n value,\n pathPrefix: path,\n namePrefix: name,\n mode,\n isDisabled,\n isDisabledByDefault,\n hiddenValuePaths,\n renamedValuePaths,\n renameTargetPaths,\n })\n }\n\n const leafValue = getValueAtPath(value, path)\n\n // deepObject array values serialize with the trailing-bracket convention\n // (filter[ids][]=1&filter[ids][]=2), so mirror that in the displayed name. We base this on the\n // resolved value too, since the schema can be a composition (anyOf) that hides the array type.\n const displayName = withArrayBracket(name, mode, isArraySchema(resolvedPropertySchema) || Array.isArray(leafValue))\n\n return [\n toTableRow({\n parameter,\n name: displayName,\n value: leafValue,\n description: resolvedPropertySchema.description ?? parameter.description,\n schema: resolvedPropertySchema,\n isRequired: requiredProperties.has(propertyName),\n isDisabled,\n isDisabledByDefault,\n sourceParameterValuePath: path,\n }),\n ]\n })\n}\n\n/**\n * Collects the leaf paths of an object value. In `form` mode only the top-level keys are leaves\n * (form-style explode does not flatten nested objects); in `deepObject` mode we recurse into nested\n * objects, mirroring how the rows and serialization are built.\n */\nconst collectValueLeafPaths = (value: unknown, mode: ExpansionMode): string[][] => {\n if (!isObject(value)) {\n return []\n }\n\n const paths: string[][] = []\n\n const walk = (node: Record<string, unknown>, prefix: string[]): void => {\n for (const [key, val] of Object.entries(node)) {\n const path = [...prefix, key]\n\n if (mode === 'deepObject' && isObject(val)) {\n walk(val, path)\n } else {\n paths.push(path)\n }\n }\n }\n\n walk(value, [])\n\n return paths\n}\n\n/**\n * Builds rows for value paths that the schema does not describe. This keeps user-edited keys (for\n * example a property that was renamed in the table) visible instead of snapping back to the\n * schema-derived rows on the next render.\n */\nconst getUnmappedValueRows = ({\n parameter,\n value,\n schemaRows,\n mode,\n isDisabled,\n isDisabledByDefault,\n renamedValuePaths,\n}: {\n parameter: ParameterObject\n value: unknown\n schemaRows: TableRow[]\n mode: ExpansionMode\n isDisabled: boolean\n isDisabledByDefault: boolean\n renamedValuePaths: ReadonlyMap<string, string[]>\n}): TableRow[] => {\n // Skip the renamed-away source paths too: the value move is debounced, so the old key lingers in\n // the value for a moment and would otherwise flash as a duplicate row next to the renamed one.\n const seen = new Set([\n ...schemaRows.map((row) => toPathKey(row.sourceParameterValuePath ?? [])),\n ...renamedValuePaths.keys(),\n ])\n\n // These rows always render: a key that carries a value should stay visible. The hidden-path set\n // only suppresses empty schema suggestions, so it is intentionally not applied here.\n return collectValueLeafPaths(value, mode)\n .filter((path) => !seen.has(toPathKey(path)))\n .map((path) => {\n const leafValue = getValueAtPath(value, path)\n\n return toTableRow({\n parameter,\n // No schema describes these rows, so the value's array-ness drives the `[]` marker.\n name: withArrayBracket(getExpandedRowName(parameter, path, mode), mode, Array.isArray(leafValue)),\n value: leafValue,\n description: parameter.description,\n schema: undefined,\n isRequired: false,\n isDisabled,\n isDisabledByDefault,\n sourceParameterValuePath: path,\n })\n })\n}\n\n/**\n * Turns a single OpenAPI parameter into one or more table rows.\n *\n * For object-typed query parameters with `form`/`explode: true` (the default) or `deepObject`\n * serialization, each property becomes its own row so the user can edit them individually,\n * matching how tools like Postman present the same parameter. Every other parameter passes\n * through as a single row.\n */\nexport const createParameterRows = (\n parameter: ParameterObject,\n exampleKey: string,\n options: {\n hiddenValuePaths?: readonly string[][]\n renamedValuePaths?: readonly { from: string[]; to: string[] }[]\n } = {},\n): TableRow[] => {\n const selected = getParameterExample(parameter, exampleKey)\n const { example } = selected\n const displayValue = selected.value === null && example?.dataValue === null ? 'null' : selected.value\n const isDisabled = isParamDisabled(parameter, example)\n // Preserve type-to-enable behavior until the user explicitly chooses a checkbox state.\n const isDisabledByDefault = !parameter.required && parameter.in !== 'path' && example?.['x-disabled'] === undefined\n const schema = getParameterSchema(parameter)\n if (parameter.in === 'querystring') {\n const querystring = getQuerystringParameter(parameter, exampleKey, { includeDisabled: true })\n return [\n toSingleParameterRow(\n parameter,\n // The editor accepts URI-ready text; decoded schema suggestions are not valid wire values.\n undefined,\n querystring ? serializeQuerystringParameter(querystring) : '',\n isDisabled,\n isDisabledByDefault,\n ),\n ]\n }\n const mode = selected.serialized ? null : getExpansionMode(parameter, schema)\n\n // Non-expandable parameters: render as a single row.\n if (mode === null || !schema || !isObjectSchema(schema)) {\n return [\n toSingleParameterRow(\n parameter,\n selected.serialized ? undefined : schema,\n displayValue,\n isDisabled,\n isDisabledByDefault,\n ),\n ]\n }\n\n // Expand into per-property rows. The deserialized value is used so existing per-property values\n // can be displayed in the table even when the example arrives as a serialized string.\n const value = selected.value === undefined ? undefined : deSerializeParameter(selected.value, parameter)\n\n // Fall back to a single row only when the schema has no properties to expand.\n if (!schema.properties) {\n return [\n toSingleParameterRow(\n parameter,\n selected.serialized ? undefined : schema,\n displayValue,\n isDisabled,\n isDisabledByDefault,\n ),\n ]\n }\n\n const hiddenValuePaths = new Set(options.hiddenValuePaths?.map(toPathKey) ?? [])\n const renamedValuePaths = new Map((options.renamedValuePaths ?? []).map(({ from, to }) => [toPathKey(from), to]))\n // Paths a property was renamed onto, used to suppress the colliding schema-derived row.\n const renameTargetPaths = new Set((options.renamedValuePaths ?? []).map(({ to }) => toPathKey(to)))\n\n const rows = getExpandedPropertyRows({\n parameter,\n schema,\n value,\n pathPrefix: [],\n // deepObject names every row with a `parent[child]` prefix; form-style names use bare property names.\n namePrefix: mode === 'deepObject' ? parameter.name : '',\n mode,\n isDisabled,\n isDisabledByDefault,\n hiddenValuePaths,\n renamedValuePaths,\n renameTargetPaths,\n })\n\n // Surface keys present in the value but not in the schema (for example a renamed property) so the\n // edited key keeps showing up instead of snapping back to the schema-derived rows.\n const unmappedRows = getUnmappedValueRows({\n parameter,\n value,\n schemaRows: rows,\n mode,\n isDisabled,\n isDisabledByDefault,\n renamedValuePaths,\n })\n\n return [...rows, ...unmappedRows].map((row) => {\n const states = example?.['x-scalar-disabled-properties']\n const path = row.sourceParameterValuePath ?? []\n // A saved object-level override also applies if the schema later expands its children.\n const disabled = path\n .map((_, index) => states?.[JSON.stringify(path.slice(0, index + 1))])\n .reverse()\n .find((state) => state !== undefined)\n return {\n ...row,\n isDisabled: disabled ?? states?.['[]'] ?? row.isDisabled,\n ...(disabled === undefined ? {} : { isDisabledByDefault: false }),\n }\n })\n}\n"],"mappings":";;;;;;;;;AA2BA,IAAM,yBAAyB,cAC7B,YAAY,aAAa,UAAU,WAAW,KAAA;AAEhD,IAAM,iBAAiB,WAA8C;CAGnE,OAFuB,eAAe,MAE/B;AACT;;;;;AAMA,IAAM,+BAA+B,cAAoE;CACvG,MAAM,QAAQ,WAAW,aAAa,UAAU,QAAQ,UAAU,QAAQ;CAG1E,OAAO;EAAE;EAAO,SAFA,aAAa,aAAa,UAAU,YAAY,KAAA,IAAY,UAAU,UAAU,UAAU;CAElF;AAC1B;;;;;;AAOA,IAAM,oBAAoB,WAA4B,WAA2D;CAC/G,IAAI,UAAU,OAAO,WAAW,CAAC,sBAAsB,SAAS,KAAK,CAAC,UAAU,CAAC,eAAe,MAAM,GACpG,OAAO;CAGT,MAAM,EAAE,OAAO,YAAY,4BAA4B,SAAS;CAChE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;EACzB,MAAM,OAAO,IAAI,4BAA4B,CAAC;EAE9C,MAAM,WAAW,KACd,KAAK,GAAG,UAAU,SAAS,KAAK,UAAU,KAAK,MAAM,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,CACrE,QAAQ,CAAC,CACT,MAAM,UAAU,UAAU,KAAA,CAAS;EACtC,OAAO;GACL,GAAG;GACH,YAAY,YAAY,SAAS,SAAS,IAAI;GAC9C,GAAI,aAAa,KAAA,IAAY,CAAC,IAAI,EAAE,qBAAqB,MAAM;EACjE;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"create-parameter-rows.js","names":[],"sources":["../../../../../src/v2/blocks/request-block/helpers/create-parameter-rows.ts"],"sourcesContent":["import { getValueAtPath } from '@scalar/helpers/object/get-value-at-path'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport { getParameterExample } from '@scalar/workspace-store/helpers/get-parameter-example'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n getQuerystringParameter,\n serializeQuerystringParameter,\n} from '@scalar/workspace-store/helpers/querystring-parameter'\nimport { deSerializeParameter, isParamDisabled } from '@scalar/workspace-store/request-example'\nimport type {\n ParameterObject,\n ParameterWithSchemaObject,\n ReferenceType,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { isArraySchema, isObjectSchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\nimport type { TableRow } from '../components/RequestTableRow.vue'\nimport { getParameterSchema } from './get-parameter-schema'\n\ntype ParameterWithRequiredSchema = ParameterWithSchemaObject & {\n schema: ReferenceType<SchemaObject>\n}\n\n/** Serialization mode for object-typed query parameters that we expand into multiple rows. */\ntype ExpansionMode = 'form' | 'deepObject'\n\nconst isParameterWithSchema = (parameter: ParameterObject): parameter is ParameterWithRequiredSchema =>\n 'schema' in parameter && parameter.schema !== undefined\n\nconst resolveSchema = (schema: unknown): SchemaObject | undefined => {\n const resolvedSchema = getResolvedRef(schema as SchemaObject | { '$ref': string; '$ref-value': SchemaObject })\n\n return resolvedSchema\n}\n\n/**\n * Resolves the OpenAPI serialization style and explode flag for a parameter, falling back to the\n * spec defaults (style: 'form', explode: true when style is 'form').\n */\nconst getParameterStyleAndExplode = (parameter: ParameterObject): { style: string; explode: boolean } => {\n const style = 'style' in parameter && parameter.style ? parameter.style : 'form'\n const explode = 'explode' in parameter && parameter.explode !== undefined ? parameter.explode : style === 'form'\n\n return { style, explode }\n}\n\n/**\n * Decides whether an object-typed query parameter should be expanded into one row per property,\n * and which expansion mode to use. Returns null when the parameter should stay as a single row\n * (non-query, non-object schema, or a serialization style we do not expand).\n */\nconst getExpansionMode = (parameter: ParameterObject, schema: SchemaObject | undefined): ExpansionMode | null => {\n if (parameter.in !== 'query' || !isParameterWithSchema(parameter) || !schema || !isObjectSchema(schema)) {\n return null\n }\n\n const { style, explode } = getParameterStyleAndExplode(parameter)\n if (!explode) {\n return null\n }\n\n if (style === 'form') {\n return 'form'\n }\n if (style === 'deepObject') {\n return 'deepObject'\n }\n\n return null\n}\n\nconst toTableValue = (value: unknown): string => {\n if (value === undefined || value === null) {\n return ''\n }\n\n if (Array.isArray(value)) {\n return value.join(',')\n }\n\n if (typeof value === 'object') {\n return JSON.stringify(value)\n }\n\n return String(value)\n}\n\nconst toPathKey = (path: readonly string[]): string => path.join('\\u0000')\n\nconst toTableRow = ({\n parameter,\n name,\n value,\n description,\n schema,\n isRequired,\n isDisabled,\n isDisabledByDefault,\n sourceParameterValuePath,\n}: {\n parameter: ParameterObject\n name: string\n value: unknown\n description: string | undefined\n schema: SchemaObject | undefined\n isRequired: boolean | undefined\n isDisabled: boolean\n isDisabledByDefault?: boolean\n sourceParameterValuePath?: string[]\n}): TableRow => ({\n name,\n value: toTableValue(value),\n description,\n schema,\n isRequired,\n isDisabled,\n ...(isDisabledByDefault ? { isDisabledByDefault: true } : {}),\n originalParameter: parameter,\n sourceParameterValuePath,\n})\n\n/**\n * Builds the row name for an expanded property at a given value path. deepObject rows mirror the\n * wire format (`parent[a][b]`); form-style explode uses the bare top-level key.\n */\nconst getExpandedRowName = (parameter: ParameterObject, path: string[], mode: ExpansionMode): string =>\n mode === 'deepObject' ? `${parameter.name}${path.map((segment) => `[${segment}]`).join('')}` : (path[0] ?? '')\n\n/**\n * Appends the display-only trailing `[]` to deepObject array leaves so the name matches the\n * serialized `parent[ids][]=1&parent[ids][]=2` form. The bracket is display-only — the row's\n * `sourceParameterValuePath` stays bracket-free. It also lets write-back recognize the leaf as an\n * array even on renamed and unmapped rows, which carry no schema.\n */\nconst withArrayBracket = (name: string, mode: ExpansionMode, isArray: boolean): string =>\n mode === 'deepObject' && isArray ? `${name}[]` : name\n\n/** Build the single-row representation used when a parameter is not expanded. */\nconst toSingleParameterRow = (\n parameter: ParameterObject,\n schema: SchemaObject | undefined,\n value: unknown,\n isDisabled: boolean,\n isDisabledByDefault: boolean,\n): TableRow =>\n toTableRow({\n parameter,\n name: parameter.name,\n value,\n description: parameter.description,\n schema,\n isRequired: parameter.required,\n isDisabled,\n isDisabledByDefault,\n })\n\n/**\n * Walks an object schema and produces one row per property.\n *\n * - In `form` mode (the OpenAPI default for query parameters) only the top-level properties are\n * flattened, and each row is named after the property itself (`status`).\n * - In `deepObject` mode we recurse into nested objects and emit bracketed names that mirror the\n * serialization on the wire (`filter[user][id]`).\n *\n * `pathPrefix` tracks the path inside the parent parameter value so the handler can later\n * reassemble all sibling rows back into a single object payload.\n */\nconst getExpandedPropertyRows = ({\n parameter,\n schema,\n value,\n pathPrefix,\n namePrefix,\n mode,\n isDisabled,\n isDisabledByDefault,\n hiddenValuePaths,\n renamedValuePaths,\n renameTargetPaths,\n}: {\n parameter: ParameterObject\n schema: Extract<SchemaObject, { type: 'object' }>\n value: unknown\n pathPrefix: string[]\n namePrefix: string\n mode: ExpansionMode\n isDisabled: boolean\n isDisabledByDefault: boolean\n hiddenValuePaths: ReadonlySet<string>\n renamedValuePaths: ReadonlyMap<string, string[]>\n renameTargetPaths: ReadonlySet<string>\n}): TableRow[] => {\n if (!schema.properties) {\n return []\n }\n\n const requiredProperties = new Set(schema.required ?? [])\n\n return Object.entries(schema.properties).flatMap(([propertyName, propertySchema]) => {\n const resolvedPropertySchema = resolveSchema(propertySchema)\n if (!resolvedPropertySchema) {\n return []\n }\n\n const path = [...pathPrefix, propertyName]\n const name = namePrefix ? `${namePrefix}[${propertyName}]` : propertyName\n\n // When this property was renamed, the value lives at the typed key instead of the schema path.\n // Keep the row in its original slot so it does not jump to the end of the table.\n const renamedTo = renamedValuePaths.get(toPathKey(path))\n const effectivePath = renamedTo ?? path\n\n if (hiddenValuePaths.has(toPathKey(effectivePath))) {\n return []\n }\n\n if (renamedTo) {\n // The value move is debounced, so until it lands the value still sits at the old schema path.\n // Fall back to it so the renamed row shows its value immediately instead of flickering empty.\n const renamedValue = getValueAtPath(value, renamedTo)\n const effectiveValue = renamedValue === undefined ? getValueAtPath(value, path) : renamedValue\n\n return [\n toTableRow({\n parameter,\n // The renamed key carries no schema, so the value's array-ness drives the `[]` marker.\n name: withArrayBracket(getExpandedRowName(parameter, renamedTo, mode), mode, Array.isArray(effectiveValue)),\n value: effectiveValue,\n description: parameter.description,\n // The renamed key no longer maps to the schema property, so it carries no schema.\n schema: undefined,\n isRequired: false,\n isDisabled,\n isDisabledByDefault,\n sourceParameterValuePath: renamedTo,\n }),\n ]\n }\n\n // Another property was renamed onto this path (for example \"a\" renamed to an existing \"b\").\n // The renamed row already occupies this slot, so skip the schema-derived row to avoid rendering\n // two rows for the same value path.\n if (renameTargetPaths.has(toPathKey(path))) {\n return []\n }\n\n // Only deepObject style recurses into nested objects. The OpenAPI 3.1 spec says form-style\n // explode flattens only the top-level properties.\n const shouldRecurse =\n mode === 'deepObject' && isObjectSchema(resolvedPropertySchema) && Boolean(resolvedPropertySchema.properties)\n\n if (shouldRecurse) {\n return getExpandedPropertyRows({\n parameter,\n schema: resolvedPropertySchema,\n value,\n pathPrefix: path,\n namePrefix: name,\n mode,\n isDisabled,\n isDisabledByDefault,\n hiddenValuePaths,\n renamedValuePaths,\n renameTargetPaths,\n })\n }\n\n const leafValue = getValueAtPath(value, path)\n\n // deepObject array values serialize with the trailing-bracket convention\n // (filter[ids][]=1&filter[ids][]=2), so mirror that in the displayed name. We base this on the\n // resolved value too, since the schema can be a composition (anyOf) that hides the array type.\n const displayName = withArrayBracket(name, mode, isArraySchema(resolvedPropertySchema) || Array.isArray(leafValue))\n\n return [\n toTableRow({\n parameter,\n name: displayName,\n value: leafValue,\n description: resolvedPropertySchema.description ?? parameter.description,\n schema: resolvedPropertySchema,\n isRequired: requiredProperties.has(propertyName),\n isDisabled,\n isDisabledByDefault,\n sourceParameterValuePath: path,\n }),\n ]\n })\n}\n\n/**\n * Collects the leaf paths of an object value. In `form` mode only the top-level keys are leaves\n * (form-style explode does not flatten nested objects); in `deepObject` mode we recurse into nested\n * objects, mirroring how the rows and serialization are built.\n */\nconst collectValueLeafPaths = (value: unknown, mode: ExpansionMode): string[][] => {\n if (!isObject(value)) {\n return []\n }\n\n const paths: string[][] = []\n\n const walk = (node: Record<string, unknown>, prefix: string[]): void => {\n for (const [key, val] of Object.entries(node)) {\n const path = [...prefix, key]\n\n if (mode === 'deepObject' && isObject(val)) {\n walk(val, path)\n } else {\n paths.push(path)\n }\n }\n }\n\n walk(value, [])\n\n return paths\n}\n\n/**\n * Builds rows for value paths that the schema does not describe. This keeps user-edited keys (for\n * example a property that was renamed in the table) visible instead of snapping back to the\n * schema-derived rows on the next render.\n */\nconst getUnmappedValueRows = ({\n parameter,\n value,\n schemaRows,\n mode,\n isDisabled,\n isDisabledByDefault,\n renamedValuePaths,\n}: {\n parameter: ParameterObject\n value: unknown\n schemaRows: TableRow[]\n mode: ExpansionMode\n isDisabled: boolean\n isDisabledByDefault: boolean\n renamedValuePaths: ReadonlyMap<string, string[]>\n}): TableRow[] => {\n // Skip the renamed-away source paths too: the value move is debounced, so the old key lingers in\n // the value for a moment and would otherwise flash as a duplicate row next to the renamed one.\n const seen = new Set([\n ...schemaRows.map((row) => toPathKey(row.sourceParameterValuePath ?? [])),\n ...renamedValuePaths.keys(),\n ])\n\n // These rows always render: a key that carries a value should stay visible. The hidden-path set\n // only suppresses empty schema suggestions, so it is intentionally not applied here.\n return collectValueLeafPaths(value, mode)\n .filter((path) => !seen.has(toPathKey(path)))\n .map((path) => {\n const leafValue = getValueAtPath(value, path)\n\n return toTableRow({\n parameter,\n // No schema describes these rows, so the value's array-ness drives the `[]` marker.\n name: withArrayBracket(getExpandedRowName(parameter, path, mode), mode, Array.isArray(leafValue)),\n value: leafValue,\n description: parameter.description,\n schema: undefined,\n isRequired: false,\n isDisabled,\n isDisabledByDefault,\n sourceParameterValuePath: path,\n })\n })\n}\n\n/**\n * Turns a single OpenAPI parameter into one or more table rows.\n *\n * For object-typed query parameters with `form`/`explode: true` (the default) or `deepObject`\n * serialization, each property becomes its own row so the user can edit them individually,\n * matching how tools like Postman present the same parameter. Every other parameter passes\n * through as a single row.\n */\nexport const createParameterRows = (\n parameter: ParameterObject,\n exampleKey: string,\n options: {\n openapiVersion?: string\n jsonSchemaDialect?: string\n hiddenValuePaths?: readonly string[][]\n renamedValuePaths?: readonly { from: string[]; to: string[] }[]\n } = {},\n): TableRow[] => {\n const selected = getParameterExample(parameter, exampleKey)\n const { example } = selected\n const displayValue = selected.value === null && example?.dataValue === null ? 'null' : selected.value\n const isDisabled = isParamDisabled(parameter, example)\n // Preserve type-to-enable behavior until the user explicitly chooses a checkbox state.\n const isDisabledByDefault = !parameter.required && parameter.in !== 'path' && example?.['x-disabled'] === undefined\n const schema = getParameterSchema(parameter)\n if (parameter.in === 'querystring') {\n const querystring = getQuerystringParameter(parameter, exampleKey, {\n includeDisabled: true,\n openapiVersion: options.openapiVersion,\n jsonSchemaDialect: options.jsonSchemaDialect,\n })\n return [\n toSingleParameterRow(\n parameter,\n // The editor accepts URI-ready text; decoded schema suggestions are not valid wire values.\n undefined,\n querystring ? serializeQuerystringParameter(querystring) : '',\n isDisabled,\n isDisabledByDefault,\n ),\n ]\n }\n const mode = selected.serialized ? null : getExpansionMode(parameter, schema)\n\n // Non-expandable parameters: render as a single row.\n if (mode === null || !schema || !isObjectSchema(schema)) {\n return [\n toSingleParameterRow(\n parameter,\n selected.serialized ? undefined : schema,\n displayValue,\n isDisabled,\n isDisabledByDefault,\n ),\n ]\n }\n\n // Expand into per-property rows. The deserialized value is used so existing per-property values\n // can be displayed in the table even when the example arrives as a serialized string.\n const value = selected.value === undefined ? undefined : deSerializeParameter(selected.value, parameter)\n\n // Fall back to a single row only when the schema has no properties to expand.\n if (!schema.properties) {\n return [\n toSingleParameterRow(\n parameter,\n selected.serialized ? undefined : schema,\n displayValue,\n isDisabled,\n isDisabledByDefault,\n ),\n ]\n }\n\n const hiddenValuePaths = new Set(options.hiddenValuePaths?.map(toPathKey) ?? [])\n const renamedValuePaths = new Map((options.renamedValuePaths ?? []).map(({ from, to }) => [toPathKey(from), to]))\n // Paths a property was renamed onto, used to suppress the colliding schema-derived row.\n const renameTargetPaths = new Set((options.renamedValuePaths ?? []).map(({ to }) => toPathKey(to)))\n\n const rows = getExpandedPropertyRows({\n parameter,\n schema,\n value,\n pathPrefix: [],\n // deepObject names every row with a `parent[child]` prefix; form-style names use bare property names.\n namePrefix: mode === 'deepObject' ? parameter.name : '',\n mode,\n isDisabled,\n isDisabledByDefault,\n hiddenValuePaths,\n renamedValuePaths,\n renameTargetPaths,\n })\n\n // Surface keys present in the value but not in the schema (for example a renamed property) so the\n // edited key keeps showing up instead of snapping back to the schema-derived rows.\n const unmappedRows = getUnmappedValueRows({\n parameter,\n value,\n schemaRows: rows,\n mode,\n isDisabled,\n isDisabledByDefault,\n renamedValuePaths,\n })\n\n return [...rows, ...unmappedRows].map((row) => {\n const states = example?.['x-scalar-disabled-properties']\n const path = row.sourceParameterValuePath ?? []\n // A saved object-level override also applies if the schema later expands its children.\n const disabled = path\n .map((_, index) => states?.[JSON.stringify(path.slice(0, index + 1))])\n .reverse()\n .find((state) => state !== undefined)\n return {\n ...row,\n isDisabled: disabled ?? states?.['[]'] ?? row.isDisabled,\n ...(disabled === undefined ? {} : { isDisabledByDefault: false }),\n }\n })\n}\n"],"mappings":";;;;;;;;;AA2BA,IAAM,yBAAyB,cAC7B,YAAY,aAAa,UAAU,WAAW,KAAA;AAEhD,IAAM,iBAAiB,WAA8C;CAGnE,OAFuB,eAAe,MAE/B;AACT;;;;;AAMA,IAAM,+BAA+B,cAAoE;CACvG,MAAM,QAAQ,WAAW,aAAa,UAAU,QAAQ,UAAU,QAAQ;CAG1E,OAAO;EAAE;EAAO,SAFA,aAAa,aAAa,UAAU,YAAY,KAAA,IAAY,UAAU,UAAU,UAAU;CAElF;AAC1B;;;;;;AAOA,IAAM,oBAAoB,WAA4B,WAA2D;CAC/G,IAAI,UAAU,OAAO,WAAW,CAAC,sBAAsB,SAAS,KAAK,CAAC,UAAU,CAAC,eAAe,MAAM,GACpG,OAAO;CAGT,MAAM,EAAE,OAAO,YAAY,4BAA4B,SAAS;CAChE,IAAI,CAAC,SACH,OAAO;CAGT,IAAI,UAAU,QACZ,OAAO;CAET,IAAI,UAAU,cACZ,OAAO;CAGT,OAAO;AACT;AAEA,IAAM,gBAAgB,UAA2B;CAC/C,IAAI,UAAU,KAAA,KAAa,UAAU,MACnC,OAAO;CAGT,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,MAAM,KAAK,GAAG;CAGvB,IAAI,OAAO,UAAU,UACnB,OAAO,KAAK,UAAU,KAAK;CAG7B,OAAO,OAAO,KAAK;AACrB;AAEA,IAAM,aAAa,SAAoC,KAAK,KAAK,IAAQ;AAEzE,IAAM,cAAc,EAClB,WACA,MACA,OACA,aACA,QACA,YACA,YACA,qBACA,gCAWe;CACf;CACA,OAAO,aAAa,KAAK;CACzB;CACA;CACA;CACA;CACA,GAAI,sBAAsB,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAC3D,mBAAmB;CACnB;AACF;;;;;AAMA,IAAM,sBAAsB,WAA4B,MAAgB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Aa,KAAA,IAAY,QAClC,cACA,YACA,mBACF,CACF;CAGF,MAAM,mBAAmB,IAAI,IAAI,QAAQ,kBAAkB,IAAI,SAAS,KAAK,CAAC,CAAC;CAC/E,MAAM,oBAAoB,IAAI,KAAK,QAAQ,qBAAqB,CAAC,EAAA,CAAG,KAAK,EAAE,MAAM,SAAS,CAAC,UAAU,IAAI,GAAG,EAAE,CAAC,CAAC;CAEhH,MAAM,oBAAoB,IAAI,KAAK,QAAQ,qBAAqB,CAAC,EAAA,CAAG,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC,CAAC;CAElG,MAAM,OAAO,wBAAwB;EACnC;EACA;EACA;EACA,YAAY,CAAC;EAEb,YAAY,SAAS,eAAe,UAAU,OAAO;EACrD;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAID,MAAM,eAAe,qBAAqB;EACxC;EACA;EACA,YAAY;EACZ;EACA;EACA;EACA;CACF,CAAC;CAED,OAAO,CAAC,GAAG,MAAM,GAAG,YAAY,CAAC,CAAC,KAAK,QAAQ;EAC7C,MAAM,SAAS,UAAU;EACzB,MAAM,OAAO,IAAI,4BAA4B,CAAC;EAE9C,MAAM,WAAW,KACd,KAAK,GAAG,UAAU,SAAS,KAAK,UAAU,KAAK,MAAM,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,CACrE,QAAQ,CAAC,CACT,MAAM,UAAU,UAAU,KAAA,CAAS;EACtC,OAAO;GACL,GAAG;GACH,YAAY,YAAY,SAAS,SAAS,IAAI;GAC9C,GAAI,aAAa,KAAA,IAAY,CAAC,IAAI,EAAE,qBAAqB,MAAM;EACjE;CACF,CAAC;AACH"}
@@ -1,11 +1,10 @@
1
- //#region src/v2/blocks/request-block/helpers/files.ts
1
+ // src/v2/blocks/request-block/helpers/files.ts
2
2
  /**
3
3
  * Extract file name from an input
4
4
  */
5
5
  var getFileName = (input) => {
6
6
  if (input instanceof File) return input.name;
7
7
  };
8
- //#endregion
9
8
  export { getFileName };
10
9
 
11
10
  //# sourceMappingURL=files.js.map
@@ -1,6 +1,6 @@
1
1
  import { buildDottedNestedRowPredicate, coerceLeafValueToSchemaType, coerceUntypedValue, resolveLeafSchema } from "@scalar/workspace-store/request-example";
2
2
  import { setValueAtPath } from "@scalar/helpers/object/set-value-at-path";
3
- //#region src/v2/blocks/request-block/helpers/fold-structured-body-rows.ts
3
+ // src/v2/blocks/request-block/helpers/fold-structured-body-rows.ts
4
4
  /**
5
5
  * Fold form-table rows back into the structured body object.
6
6
  *
@@ -28,7 +28,6 @@ var foldStructuredBodyRows = (rows, schema) => {
28
28
  }
29
29
  return result;
30
30
  };
31
- //#endregion
32
31
  export { foldStructuredBodyRows };
33
32
 
34
33
  //# sourceMappingURL=fold-structured-body-rows.js.map
@@ -4,7 +4,7 @@ import { isObject } from "@scalar/helpers/object/is-object";
4
4
  import { isObjectSchema } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
5
5
  import { resolveFormSchema } from "@scalar/workspace-store/helpers/resolve-form-schema";
6
6
  import { resolveSchemaWithAnnotations } from "@scalar/workspace-store/helpers/resolve-schema-with-annotations";
7
- //#region src/v2/blocks/request-block/helpers/get-form-body-rows.ts
7
+ // src/v2/blocks/request-block/helpers/get-form-body-rows.ts
8
8
  var stringifyValue = (value) => {
9
9
  if (value instanceof File) return value.name;
10
10
  if (typeof value === "object" && value !== null) return JSON.stringify(value);
@@ -149,7 +149,6 @@ var getFormBodyRows = (example, contentType, formBodySchema, compositionSelectio
149
149
  }));
150
150
  return [];
151
151
  };
152
- //#endregion
153
152
  export { collectExampleRows, collectLeafProperties, getFormBodyRows, getFormBodyValue, stringifyValue };
154
153
 
155
154
  //# sourceMappingURL=get-form-body-rows.js.map
@@ -1,4 +1,4 @@
1
- //#region src/v2/blocks/request-block/helpers/get-parameter-content.ts
1
+ // src/v2/blocks/request-block/helpers/get-parameter-content.ts
2
2
  /**
3
3
  * Extract content value from parameter object
4
4
  *
@@ -11,7 +11,6 @@ var getParameterContentValue = (parameter) => {
11
11
  return parameter.content[keys[0]];
12
12
  }
13
13
  };
14
- //#endregion
15
14
  export { getParameterContentValue };
16
15
 
17
16
  //# sourceMappingURL=get-parameter-content.js.map
@@ -1,6 +1,6 @@
1
1
  import { getParameterContentValue } from "./get-parameter-content.js";
2
2
  import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
- //#region src/v2/blocks/request-block/helpers/get-parameter-schema.ts
3
+ // src/v2/blocks/request-block/helpers/get-parameter-schema.ts
4
4
  /**
5
5
  * Extract the schema from the parameter object
6
6
  */
@@ -8,7 +8,6 @@ var getParameterSchema = (parameter) => {
8
8
  if ("schema" in parameter && parameter.schema) return getResolvedRef(parameter.schema);
9
9
  return getResolvedRef(getParameterContentValue(parameter)?.schema);
10
10
  };
11
- //#endregion
12
11
  export { getParameterSchema };
13
12
 
14
13
  //# sourceMappingURL=get-parameter-schema.js.map
@@ -2,7 +2,7 @@ import { collectExampleRows, collectLeafProperties, stringifyValue } from "./get
2
2
  import { isObject } from "@scalar/helpers/object/is-object";
3
3
  import { resolve } from "@scalar/workspace-store/resolve";
4
4
  import { isObjectSchema } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
5
- //#region src/v2/blocks/request-block/helpers/get-structured-body-rows.ts
5
+ // src/v2/blocks/request-block/helpers/get-structured-body-rows.ts
6
6
  /**
7
7
  * Build form-table rows for a structured (JSON/YAML) request body.
8
8
  *
@@ -34,7 +34,6 @@ var getStructuredBodyRows = (parsedValue, schema) => {
34
34
  return row;
35
35
  });
36
36
  };
37
- //#endregion
38
37
  export { getStructuredBodyRows };
39
38
 
40
39
  //# sourceMappingURL=get-structured-body-rows.js.map
@@ -1,4 +1,4 @@
1
- //#region src/v2/blocks/request-block/helpers/group-by.ts
1
+ // src/v2/blocks/request-block/helpers/group-by.ts
2
2
  function groupBy(arr, key, transform) {
3
3
  const groups = {};
4
4
  Object.setPrototypeOf(groups, null);
@@ -11,7 +11,6 @@ function groupBy(arr, key, transform) {
11
11
  }
12
12
  return groups;
13
13
  }
14
- //#endregion
15
14
  export { groupBy };
16
15
 
17
16
  //# sourceMappingURL=group-by.js.map
@@ -1,10 +1,10 @@
1
1
  import { isArraySchema } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
2
2
  import { isFileSchema } from "@scalar/workspace-store/helpers/is-file-schema";
3
3
  import { resolveSchemaWithAnnotations } from "@scalar/workspace-store/helpers/resolve-schema-with-annotations";
4
- //#region src/v2/blocks/request-block/helpers/group-form-body-files.ts
4
+ // src/v2/blocks/request-block/helpers/group-form-body-files.ts
5
5
  /** Empty fields must keep text editing unless every non-null alternative requires a file. */
6
6
  var requiresFile = (input, contentType, ancestors = /* @__PURE__ */ new Set()) => {
7
- if (!input || ancestors.has(input)) return false;
7
+ if (typeof input === "boolean" || !input || ancestors.has(input)) return false;
8
8
  const schema = resolveSchemaWithAnnotations(input);
9
9
  if (!schema || !isFileSchema(schema, false, contentType)) return false;
10
10
  const seen = /* @__PURE__ */ new Set([...ancestors, input]);
@@ -54,7 +54,6 @@ var groupFormBodyFiles = (rows) => {
54
54
  });
55
55
  return fields;
56
56
  };
57
- //#endregion
58
57
  export { groupFormBodyFiles };
59
58
 
60
59
  //# sourceMappingURL=group-form-body-files.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"group-form-body-files.js","names":[],"sources":["../../../../../src/v2/blocks/request-block/helpers/group-form-body-files.ts"],"sourcesContent":["import { isFileSchema } from '@scalar/workspace-store/helpers/is-file-schema'\nimport { resolveSchemaWithAnnotations } from '@scalar/workspace-store/helpers/resolve-schema-with-annotations'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport type { MaybeRefSchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/schema'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\nimport type { TableRow } from '../components/RequestTableRow.vue'\n\n/** A visible field with the source rows used to serialize its multipart parts. */\nexport type FormBodyField = {\n data: TableRow\n sourceIndices: number[]\n}\n\n/** Empty fields must keep text editing unless every non-null alternative requires a file. */\nconst requiresFile = (\n input: MaybeRefSchemaObject | undefined,\n contentType?: string,\n ancestors = new Set<MaybeRefSchemaObject>(),\n): boolean => {\n if (!input || ancestors.has(input)) {\n return false\n }\n const schema: SchemaObject | undefined = resolveSchemaWithAnnotations(input)\n if (!schema || !isFileSchema(schema, false, contentType)) {\n return false\n }\n const seen = new Set([...ancestors, input])\n if ('type' in schema || ('format' in schema && schema.format === 'binary')) {\n return true\n }\n const alternatives = schema.oneOf ?? schema.anyOf\n if (alternatives?.length) {\n return alternatives.every((member) => {\n const resolved = resolveSchemaWithAnnotations(member)\n return (resolved && 'type' in resolved && resolved.type === 'null') || requiresFile(member, contentType, seen)\n })\n }\n if (schema.allOf?.length) {\n return schema.allOf.some((member) => requiresFile(member, contentType, seen))\n }\n return true\n}\n\n/** Group uploaded files for array fields without changing stored values or multipart serialization. */\nexport const groupFormBodyFiles = (rows: TableRow[]): FormBodyField[] => {\n const fields: FormBodyField[] = []\n const fileFields = new Map<string, FormBodyField>()\n\n rows.forEach((row, index) => {\n const isFileArray =\n row.schema &&\n isArraySchema(row.schema) &&\n (row.value instanceof File || requiresFile(row.schema.items, row.contentType))\n // Preserve editable example values, such as variable expressions, until files are selected.\n const canGroup = row.value instanceof File || row.value === '' || row.value === '[]' || row.value === null\n if (!isFileArray || !canGroup) {\n fields.push({ data: row, sourceIndices: [index] })\n return\n }\n\n const field: FormBodyField = fileFields.get(row.name) ?? { data: { ...row, files: [] }, sourceIndices: [] }\n if (!fileFields.has(row.name)) {\n fields.push(field)\n fileFields.set(row.name, field)\n }\n field.sourceIndices.push(index)\n if (row.value instanceof File) {\n field.data.files?.push({ file: row.value, index, isDisabled: row.isDisabled ?? false })\n field.data.isDisabled = field.data.files?.every((file) => file.isDisabled) ?? false\n }\n })\n\n return fields\n}\n"],"mappings":";;;;;AAeA,IAAM,gBACJ,OACA,aACA,4BAAY,IAAI,IAA0B,MAC9B;CACZ,IAA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IAAI,MAAM,KAAK;EAChC;EACA,MAAM,cAAc,KAAK,KAAK;EAC9B,IAAI,IAAI,iBAAiB,MAAM;GAC7B,MAAM,KAAK,OAAO,KAAK;IAAE,MAAM,IAAI;IAAO;IAAO,YAAY,IAAI,cAAc;GAAM,CAAC;GACtF,MAAM,KAAK,aAAa,MAAM,KAAK,OAAO,OAAO,SAAS,KAAK,UAAU,KAAK;EAChF;CACF,CAAC;CAED,OAAO;AACT"}
1
+ {"version":3,"file":"group-form-body-files.js","names":[],"sources":["../../../../../src/v2/blocks/request-block/helpers/group-form-body-files.ts"],"sourcesContent":["import { isFileSchema } from '@scalar/workspace-store/helpers/is-file-schema'\nimport { resolveSchemaWithAnnotations } from '@scalar/workspace-store/helpers/resolve-schema-with-annotations'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport type { MaybeRefSchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/schema'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.2/strict/type-guards'\n\nimport type { TableRow } from '../components/RequestTableRow.vue'\n\n/** A visible field with the source rows used to serialize its multipart parts. */\nexport type FormBodyField = {\n data: TableRow\n sourceIndices: number[]\n}\n\n/** Empty fields must keep text editing unless every non-null alternative requires a file. */\nconst requiresFile = (\n input: MaybeRefSchemaObject | boolean | undefined,\n contentType?: string,\n ancestors = new Set<MaybeRefSchemaObject>(),\n): boolean => {\n if (typeof input === 'boolean' || !input || ancestors.has(input)) {\n return false\n }\n const schema: SchemaObject | undefined = resolveSchemaWithAnnotations(input)\n if (!schema || !isFileSchema(schema, false, contentType)) {\n return false\n }\n const seen = new Set([...ancestors, input])\n if ('type' in schema || ('format' in schema && schema.format === 'binary')) {\n return true\n }\n const alternatives = schema.oneOf ?? schema.anyOf\n if (alternatives?.length) {\n return alternatives.every((member) => {\n const resolved = resolveSchemaWithAnnotations(member)\n return (resolved && 'type' in resolved && resolved.type === 'null') || requiresFile(member, contentType, seen)\n })\n }\n if (schema.allOf?.length) {\n return schema.allOf.some((member) => requiresFile(member, contentType, seen))\n }\n return true\n}\n\n/** Group uploaded files for array fields without changing stored values or multipart serialization. */\nexport const groupFormBodyFiles = (rows: TableRow[]): FormBodyField[] => {\n const fields: FormBodyField[] = []\n const fileFields = new Map<string, FormBodyField>()\n\n rows.forEach((row, index) => {\n const isFileArray =\n row.schema &&\n isArraySchema(row.schema) &&\n (row.value instanceof File || requiresFile(row.schema.items, row.contentType))\n // Preserve editable example values, such as variable expressions, until files are selected.\n const canGroup = row.value instanceof File || row.value === '' || row.value === '[]' || row.value === null\n if (!isFileArray || !canGroup) {\n fields.push({ data: row, sourceIndices: [index] })\n return\n }\n\n const field: FormBodyField = fileFields.get(row.name) ?? { data: { ...row, files: [] }, sourceIndices: [] }\n if (!fileFields.has(row.name)) {\n fields.push(field)\n fileFields.set(row.name, field)\n }\n field.sourceIndices.push(index)\n if (row.value instanceof File) {\n field.data.files?.push({ file: row.value, index, isDisabled: row.isDisabled ?? false })\n field.data.isDisabled = field.data.files?.every((file) => file.isDisabled) ?? false\n }\n })\n\n return fields\n}\n"],"mappings":";;;;;AAeA,IAAM,gBACJ,OACA,aACA,4BAAY,IAAI,IAA0B,MAC9B;CACZ,IAAI,OAAO,UAAU,aAAa,CAAC,SAAS,UAAU,IAAI,KAAK,GAC7D,OAAO;CAET,MAAM,SAAmC,6BAA6B,KAAK;CAC3E,IAAI,CAAC,UAAU,CAAC,aAAa,QAAQ,OAAO,WAAW,GACrD,OAAO;CAET,MAAM,uBAAO,IAAI,IAAI,CAAC,GAAG,WAAW,KAAK,CAAC;CAC1C,IAAI,UAAU,UAAW,YAAY,UAAU,OAAO,WAAW,UAC/D,OAAO;CAET,MAAM,eAAe,OAAO,SAAS,OAAO;CAC5C,IAAI,cAAc,QAChB,OAAO,aAAa,OAAO,WAAW;EACpC,MAAM,WAAW,6BAA6B,MAAM;EACpD,OAAQ,YAAY,UAAU,YAAY,SAAS,SAAS,UAAW,aAAa,QAAQ,aAAa,IAAI;CAC/G,CAAC;CAEH,IAAI,OAAO,OAAO,QAChB,OAAO,OAAO,MAAM,MAAM,WAAW,aAAa,QAAQ,aAAa,IAAI,CAAC;CAE9E,OAAO;AACT;;AAGA,IAAa,sBAAsB,SAAsC;CACvE,MAAM,SAA0B,CAAC;CACjC,MAAM,6BAAa,IAAI,IAA2B;CAElD,KAAK,SAAS,KAAK,UAAU;EAC3B,MAAM,cACJ,IAAI,UACJ,cAAc,IAAI,MAAM,MACvB,IAAI,iBAAiB,QAAQ,aAAa,IAAI,OAAO,OAAO,IAAI,WAAW;EAE9E,MAAM,WAAW,IAAI,iBAAiB,QAAQ,IAAI,UAAU,MAAM,IAAI,UAAU,QAAQ,IAAI,UAAU;EACtG,IAAI,CAAC,eAAe,CAAC,UAAU;GAC7B,OAAO,KAAK;IAAE,MAAM;IAAK,eAAe,CAAC,KAAK;GAAE,CAAC;GACjD;EACF;EAEA,MAAM,QAAuB,WAAW,IAAI,IAAI,IAAI,KAAK;GAAE,MAAM;IAAE,GAAG;IAAK,OAAO,CAAC;GAAE;GAAG,eAAe,CAAC;EAAE;EAC1G,IAAI,CAAC,WAAW,IAAI,IAAI,IAAI,GAAG;GAC7B,OAAO,KAAK,KAAK;GACjB,WAAW,IAAI,IAAI,MAAM,KAAK;EAChC;EACA,MAAM,cAAc,KAAK,KAAK;EAC9B,IAAI,IAAI,iBAAiB,MAAM;GAC7B,MAAM,KAAK,OAAO,KAAK;IAAE,MAAM,IAAI;IAAO;IAAO,YAAY,IAAI,cAAc;GAAM,CAAC;GACtF,MAAM,KAAK,aAAa,MAAM,KAAK,OAAO,OAAO,SAAS,KAAK,UAAU,KAAK;EAChF;CACF,CAAC;CAED,OAAO;AACT"}
@@ -1,4 +1,4 @@
1
- //#region src/v2/blocks/request-block/helpers/group-global-cookies.ts
1
+ // src/v2/blocks/request-block/helpers/group-global-cookies.ts
2
2
  /**
3
3
  * Groups global cookies by name so duplicate names collapse into a single row. Same-named cookies
4
4
  * used to render as independent rows that all shared one disabled state, so toggling one toggled
@@ -50,7 +50,6 @@ var groupGlobalCookies = ({ sources, shouldInclude }) => {
50
50
  }
51
51
  return groups;
52
52
  };
53
- //#endregion
54
53
  export { groupGlobalCookies };
55
54
 
56
55
  //# sourceMappingURL=group-global-cookies.js.map
@@ -6,7 +6,7 @@ import { getExampleValue } from "@scalar/workspace-store/helpers/get-example-val
6
6
  import { isArraySchema } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
7
7
  import { isFileSchema } from "@scalar/workspace-store/helpers/is-file-schema";
8
8
  import { resolveFormSchema } from "@scalar/workspace-store/helpers/resolve-form-schema";
9
- //#region src/v2/blocks/request-block/helpers/multipart-body.ts
9
+ // src/v2/blocks/request-block/helpers/multipart-body.ts
10
10
  /** Raw wire examples stay in the raw editor, while JSON arrays/objects can expose individual parts. */
11
11
  var parseMultipartBody = (example) => {
12
12
  const selected = getExampleValue(example ?? void 0);
@@ -74,7 +74,6 @@ var updateMultipartBodyPart = (body, path, value) => {
74
74
  const result = update(body, path);
75
75
  return Array.isArray(result) || isObject(result) ? result : body;
76
76
  };
77
- //#endregion
78
77
  export { getMultipartBodyParts, parseMultipartBody, updateMultipartBodyPart };
79
78
 
80
79
  //# sourceMappingURL=multipart-body.js.map
@@ -1,7 +1,7 @@
1
1
  import { parseMimeType } from "@scalar/helpers/http/mime-type";
2
2
  import { YAML_MAX_ALIAS_COUNT } from "@scalar/helpers/general/yaml-max-alias-count";
3
3
  import { parse, stringify } from "yaml";
4
- //#region src/v2/blocks/request-block/helpers/structured-body-codec.ts
4
+ // src/v2/blocks/request-block/helpers/structured-body-codec.ts
5
5
  var jsonCodec = {
6
6
  language: "json",
7
7
  parse: (text) => JSON.parse(text),
@@ -28,7 +28,6 @@ var getStructuredBodyCodec = (contentType) => {
28
28
  if (essence === "application/json" || essence.endsWith("+json")) return jsonCodec;
29
29
  if (YAML_ESSENCES.has(essence) || essence.endsWith("+yaml")) return yamlCodec;
30
30
  };
31
- //#endregion
32
31
  export { getStructuredBodyCodec };
33
32
 
34
33
  //# sourceMappingURL=structured-body-codec.js.map