@scalar/api-client 3.14.0 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/assets/computer.ascii.virtual.js.map +1 -1
  3. package/dist/components/HelpfulLink.vue.script.js +1 -1
  4. package/dist/components/HelpfulLink.vue.script.js.map +1 -1
  5. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  6. package/dist/components/HttpMethod/HttpMethod.vue.script.js +1 -1
  7. package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -1
  8. package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js +1 -1
  9. package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.script.js +1 -1
  10. package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.script.js.map +1 -1
  11. package/dist/components/SectionFilter.vue.d.ts +1 -1
  12. package/dist/components/SectionFilter.vue.d.ts.map +1 -1
  13. package/dist/components/SectionFilter.vue.js +1 -1
  14. package/dist/components/SectionFilter.vue.script.js +2 -2
  15. package/dist/components/SectionFilter.vue.script.js.map +1 -1
  16. package/dist/components/SectionFilterButton.vue.script.js +1 -1
  17. package/dist/components/SectionFilterButton.vue.script.js.map +1 -1
  18. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
  19. package/dist/components/Server/ServerVariablesForm.vue.script.js +1 -1
  20. package/dist/components/Server/ServerVariablesForm.vue.script.js.map +1 -1
  21. package/dist/components/Server/ServerVariablesSelect.vue.script.js +1 -1
  22. package/dist/components/Server/ServerVariablesSelect.vue.script.js.map +1 -1
  23. package/dist/components/Server/ServerVariablesTextbox.vue.script.js +1 -1
  24. package/dist/components/Server/ServerVariablesTextbox.vue.script.js.map +1 -1
  25. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
  26. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js +1 -1
  27. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js.map +1 -1
  28. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  29. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js +1 -1
  30. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js.map +1 -1
  31. package/dist/components/ViewLayout/ViewLayout.vue.script.js +1 -1
  32. package/dist/components/ViewLayout/ViewLayout.vue.script.js.map +1 -1
  33. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
  34. package/dist/components/ViewLayout/ViewLayoutContent.vue.js.map +1 -1
  35. package/dist/components/ViewLayout/ViewLayoutSection.vue.script.js +1 -1
  36. package/dist/components/ViewLayout/ViewLayoutSection.vue.script.js.map +1 -1
  37. package/dist/hooks/use-file-dialog.js +2 -1
  38. package/dist/hooks/use-file-dialog.js.map +1 -1
  39. package/dist/plugins/posthog/index.js.map +1 -1
  40. package/dist/plugins/posthog/sanitize-event-payload.js +1 -1
  41. package/dist/plugins/posthog/sanitize-event-payload.js.map +1 -1
  42. package/dist/style.css +298 -275
  43. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
  45. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +38 -6
  46. package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
  47. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  48. package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
  49. package/dist/v2/blocks/operation-block/components/Header.vue.script.js +1 -1
  50. package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
  51. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
  52. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js +1 -1
  53. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +1 -1
  54. package/dist/v2/blocks/operation-block/helpers/decode-buffer.js.map +1 -1
  55. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js.map +1 -1
  56. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js.map +1 -1
  57. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js.map +1 -1
  58. package/dist/v2/blocks/operation-block/helpers/persist-response-cookies.js.map +1 -1
  59. package/dist/v2/blocks/operation-block/helpers/persist-script-environment.d.ts +53 -0
  60. package/dist/v2/blocks/operation-block/helpers/persist-script-environment.d.ts.map +1 -0
  61. package/dist/v2/blocks/operation-block/helpers/persist-script-environment.js +91 -0
  62. package/dist/v2/blocks/operation-block/helpers/persist-script-environment.js.map +1 -0
  63. package/dist/v2/blocks/operation-block/helpers/response-cache.js.map +1 -1
  64. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  65. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js.map +1 -1
  66. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  67. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  68. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  69. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +58 -29
  70. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  71. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  72. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  73. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +1 -1
  74. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
  75. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -1
  76. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js +1 -1
  77. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js.map +1 -1
  78. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.d.ts.map +1 -1
  79. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js +1 -1
  80. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js.map +1 -1
  81. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js +1 -1
  82. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js.map +1 -1
  83. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  84. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +1 -1
  85. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
  86. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -0
  87. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  88. package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
  89. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js +5 -3
  90. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +1 -1
  91. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
  92. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  93. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  94. package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
  95. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js +6 -3
  96. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +1 -1
  97. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +8 -0
  98. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  99. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  100. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +29 -16
  101. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
  102. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +1 -1
  103. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -1
  104. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js.map +1 -1
  105. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +1 -1
  106. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -1
  107. package/dist/v2/blocks/request-block/helpers/files.js.map +1 -1
  108. package/dist/v2/blocks/request-block/helpers/fold-structured-body-rows.js.map +1 -1
  109. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +10 -5
  110. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
  111. package/dist/v2/blocks/request-block/helpers/get-parameter-content.js.map +1 -1
  112. package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js.map +1 -1
  113. package/dist/v2/blocks/request-block/helpers/get-structured-body-rows.js.map +1 -1
  114. package/dist/v2/blocks/request-block/helpers/group-by.js.map +1 -1
  115. package/dist/v2/blocks/request-block/helpers/group-global-cookies.d.ts +54 -0
  116. package/dist/v2/blocks/request-block/helpers/group-global-cookies.d.ts.map +1 -0
  117. package/dist/v2/blocks/request-block/helpers/group-global-cookies.js +56 -0
  118. package/dist/v2/blocks/request-block/helpers/group-global-cookies.js.map +1 -0
  119. package/dist/v2/blocks/request-block/helpers/structured-body-codec.js +1 -1
  120. package/dist/v2/blocks/request-block/helpers/structured-body-codec.js.map +1 -1
  121. package/dist/v2/blocks/request-block/helpers/validate-parameter.js.map +1 -1
  122. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  123. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  124. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +1 -1
  125. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
  126. package/dist/v2/blocks/response-block/components/Headers.vue.script.js +1 -1
  127. package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +1 -1
  128. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +1 -1
  129. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +1 -1
  130. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +1 -1
  131. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +1 -1
  132. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -1
  133. package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js +1 -1
  134. package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js.map +1 -1
  135. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
  136. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
  137. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
  138. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +10 -3
  139. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
  140. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +1 -1
  141. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js +1 -1
  142. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js.map +1 -1
  143. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
  144. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js +1 -1
  145. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +1 -1
  146. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js +1 -1
  147. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js.map +1 -1
  148. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +1 -1
  149. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -1
  150. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +1 -1
  151. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -1
  152. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  153. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +1 -1
  154. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
  155. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  156. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +1 -1
  157. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +1 -1
  158. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -1
  159. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js +1 -1
  160. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +1 -1
  161. package/dist/v2/blocks/response-block/helpers/extract-filename.js.map +1 -1
  162. package/dist/v2/blocks/response-block/helpers/get-content-length.js.map +1 -1
  163. package/dist/v2/blocks/response-block/helpers/media-types.d.ts +1 -1
  164. package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
  165. package/dist/v2/blocks/response-block/helpers/media-types.js +12 -0
  166. package/dist/v2/blocks/response-block/helpers/media-types.js.map +1 -1
  167. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js.map +1 -1
  168. package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.js.map +1 -1
  169. package/dist/v2/blocks/response-block/helpers/prettify-ndjson.d.ts +12 -0
  170. package/dist/v2/blocks/response-block/helpers/prettify-ndjson.d.ts.map +1 -0
  171. package/dist/v2/blocks/response-block/helpers/prettify-ndjson.js +19 -0
  172. package/dist/v2/blocks/response-block/helpers/prettify-ndjson.js.map +1 -0
  173. package/dist/v2/blocks/response-block/helpers/process-response-body.js.map +1 -1
  174. package/dist/v2/blocks/response-block/helpers/resolve-response-body-handler.js.map +1 -1
  175. package/dist/v2/blocks/response-block/helpers/resolve-response-content-type.js +7 -1
  176. package/dist/v2/blocks/response-block/helpers/resolve-response-content-type.js.map +1 -1
  177. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  178. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  179. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +1 -1
  180. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  181. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
  182. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
  183. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +1 -1
  184. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
  185. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
  186. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js +1 -1
  187. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +1 -1
  188. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +3 -1
  189. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js.map +1 -1
  190. package/dist/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path.js.map +1 -1
  191. package/dist/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target.js.map +1 -1
  192. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js.map +1 -1
  193. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-path-masking.js.map +1 -1
  194. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  195. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +1 -1
  196. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  197. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -1
  198. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js +1 -1
  199. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +1 -1
  200. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  201. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +1 -1
  202. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  203. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
  204. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +1 -1
  205. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -1
  206. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  207. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +1 -1
  208. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
  209. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -1
  210. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +1 -1
  211. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -1
  212. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  213. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +1 -1
  214. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
  215. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  216. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js +3 -3
  217. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js.map +1 -1
  218. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  219. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
  220. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +24 -17
  221. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
  222. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js.map +1 -1
  223. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +5 -0
  224. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map +1 -1
  225. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-callback.js +1 -1
  226. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-callback.js.map +1 -1
  227. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-flows.d.ts +20 -0
  228. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-flows.d.ts.map +1 -0
  229. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-flows.js +27 -0
  230. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-flows.js.map +1 -0
  231. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +2 -2
  232. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
  233. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js.map +1 -1
  234. package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.js.map +1 -1
  235. package/dist/v2/blocks/scalar-auth-selector-block/helpers/run-oauth2-authorize.js.map +1 -1
  236. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  237. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +15 -6
  238. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js.map +1 -1
  239. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  240. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  241. package/dist/v2/components/code-input/CodeInput.vue.script.js +6 -1
  242. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
  243. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts.map +1 -1
  244. package/dist/v2/components/code-input/CodeInputLite.vue.js +1 -1
  245. package/dist/v2/components/code-input/CodeInputLite.vue.script.js +5 -1
  246. package/dist/v2/components/code-input/CodeInputLite.vue.script.js.map +1 -1
  247. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js +1 -1
  248. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +1 -1
  249. package/dist/v2/components/code-input/code-variable-widget.js +1 -0
  250. package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
  251. package/dist/v2/components/code-input/helpers/build-pill-context.js.map +1 -1
  252. package/dist/v2/components/code-input/helpers/lookup-variable-value.js.map +1 -1
  253. package/dist/v2/components/code-input/helpers/pill-signature.js.map +1 -1
  254. package/dist/v2/components/code-input/helpers/serialize-value.js.map +1 -1
  255. package/dist/v2/components/context-menu/ContextMenu.vue.script.js +1 -1
  256. package/dist/v2/components/context-menu/ContextMenu.vue.script.js.map +1 -1
  257. package/dist/v2/components/data-table/DataTable.vue.script.js +1 -1
  258. package/dist/v2/components/data-table/DataTable.vue.script.js.map +1 -1
  259. package/dist/v2/components/data-table/DataTableCell.vue.script.js +1 -1
  260. package/dist/v2/components/data-table/DataTableCell.vue.script.js.map +1 -1
  261. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js +1 -1
  262. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +1 -1
  263. package/dist/v2/components/data-table/DataTableHeader.vue.script.js +1 -1
  264. package/dist/v2/components/data-table/DataTableHeader.vue.script.js.map +1 -1
  265. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  266. package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
  267. package/dist/v2/components/data-table/DataTableInput.vue.script.js +1 -1
  268. package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
  269. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
  270. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js +3 -2
  271. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +1 -1
  272. package/dist/v2/components/data-table/DataTableRow.vue.js +1 -1
  273. package/dist/v2/components/data-table/DataTableRow.vue.js.map +1 -1
  274. package/dist/v2/components/data-table/DataTableText.vue.script.js +1 -1
  275. package/dist/v2/components/data-table/DataTableText.vue.script.js.map +1 -1
  276. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -1
  277. package/dist/v2/components/forms/ConfirmationForm.vue.script.js +1 -1
  278. package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +1 -1
  279. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -1
  280. package/dist/v2/components/layout/CollapsibleSection.vue.script.js +1 -1
  281. package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
  282. package/dist/v2/components/layout/ValueEmitter.vue.d.ts +1 -1
  283. package/dist/v2/components/layout/ValueEmitter.vue.d.ts.map +1 -1
  284. package/dist/v2/components/layout/ValueEmitter.vue.script.js +1 -1
  285. package/dist/v2/components/layout/ValueEmitter.vue.script.js.map +1 -1
  286. package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -1
  287. package/dist/v2/components/modals/DeleteModal.vue.script.js +1 -1
  288. package/dist/v2/components/modals/DeleteModal.vue.script.js.map +1 -1
  289. package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
  290. package/dist/v2/components/modals/ModalClientContainer.vue.script.js +1 -1
  291. package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +1 -1
  292. package/dist/v2/components/resize/Resize.vue.js +1 -1
  293. package/dist/v2/components/resize/Resize.vue.script.js +1 -1
  294. package/dist/v2/components/resize/Resize.vue.script.js.map +1 -1
  295. package/dist/v2/components/resize/use-split-resize.js +4 -2
  296. package/dist/v2/components/resize/use-split-resize.js.map +1 -1
  297. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  298. package/dist/v2/components/server/ServerDropdown.vue.script.js +1 -1
  299. package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
  300. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
  301. package/dist/v2/components/server/ServerDropdownItem.vue.js +1 -1
  302. package/dist/v2/components/server/ServerDropdownItem.vue.script.js +1 -1
  303. package/dist/v2/components/server/ServerDropdownItem.vue.script.js.map +1 -1
  304. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  305. package/dist/v2/components/sidebar/Sidebar.vue.script.js +3 -3
  306. package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
  307. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  308. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js +1 -1
  309. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +1 -1
  310. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js +1 -1
  311. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +1 -1
  312. package/dist/v2/constants.js +1 -1
  313. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js +1 -1
  314. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +1 -1
  315. package/dist/v2/features/command-palette/components/CommandActionInput.vue.script.js +1 -1
  316. package/dist/v2/features/command-palette/components/CommandActionInput.vue.script.js.map +1 -1
  317. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
  318. package/dist/v2/features/environments/EnvironmentsList.vue.script.js +1 -1
  319. package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +1 -1
  320. package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
  321. package/dist/v2/features/environments/components/Environment.vue.script.js +1 -1
  322. package/dist/v2/features/environments/components/Environment.vue.script.js.map +1 -1
  323. package/dist/v2/features/environments/components/EnvironmentColors.vue.script.js +3 -2
  324. package/dist/v2/features/environments/components/EnvironmentColors.vue.script.js.map +1 -1
  325. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
  326. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +1 -1
  327. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -1
  328. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
  329. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js +1 -1
  330. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +1 -1
  331. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  332. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +1 -1
  333. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
  334. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
  335. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +1 -1
  336. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js +1 -1
  337. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +1 -1
  338. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  339. package/dist/v2/features/modal/Modal.vue.script.js +1 -1
  340. package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
  341. package/dist/v2/features/modal/helpers/create-api-client-modal.js +11 -0
  342. package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
  343. package/dist/v2/features/modal/helpers/map-hidden-clients-config.js.map +1 -1
  344. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +1 -1
  345. package/dist/v2/features/modal/helpers/resolve-route-parameters.js.map +1 -1
  346. package/dist/v2/features/modal/hooks/use-modal-sidebar.js.map +1 -1
  347. package/dist/v2/features/modal/modal-events.js.map +1 -1
  348. package/dist/v2/features/operation/Operation.vue.script.js +1 -1
  349. package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
  350. package/dist/v2/features/search/components/DocumentSearchModal.vue.d.ts.map +1 -1
  351. package/dist/v2/features/search/components/DocumentSearchModal.vue.js +1 -1
  352. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js +1 -1
  353. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js.map +1 -1
  354. package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
  355. package/dist/v2/features/search/components/SearchResult.vue.script.js +1 -1
  356. package/dist/v2/features/search/components/SearchResult.vue.script.js.map +1 -1
  357. package/dist/v2/features/search/helpers/create-fuse-instance.js.map +1 -1
  358. package/dist/v2/features/search/helpers/create-search-index.js.map +1 -1
  359. package/dist/v2/features/search/hooks/use-document-search.js.map +1 -1
  360. package/dist/v2/features/search/hooks/use-search-index.js.map +1 -1
  361. package/dist/v2/helpers/generate-location-id.js.map +1 -1
  362. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  363. package/dist/v2/helpers/handle-hotkeys.js.map +1 -1
  364. package/dist/v2/helpers/test-utils.js.map +1 -1
  365. package/dist/v2/hooks/use-global-hot-keys.js.map +1 -1
  366. package/dist/v2/hooks/use-scroll-lock.js.map +1 -1
  367. package/dist/v2/workspace-events.js.map +1 -1
  368. package/dist/vue-styles.css +229 -236
  369. package/package.json +20 -20
@@ -9,7 +9,7 @@ var _hoisted_2 = { class: "text-c-1 whitespace-nowrap" };
9
9
  var _hoisted_3 = { class: "text-c-1 overflow-hidden text-ellipsis" };
10
10
  var _hoisted_4 = { class: "overflow-hidden text-ellipsis" };
11
11
  var _hoisted_5 = { class: "flex h-4 w-4 items-center justify-center" };
12
- var DataTableInputSelect_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
12
+ var DataTableInputSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
13
13
  __name: "DataTableInputSelect",
14
14
  props: {
15
15
  modelValue: { type: [
@@ -82,7 +82,8 @@ var DataTableInputSelect_vue_vue_type_script_setup_true_lang_default = /* @__PUR
82
82
  });
83
83
  /** Update the model value when the selected options change */
84
84
  const updateSelectedOptions = (selectedOptions) => {
85
- emit("update:modelValue", selectedOptions.map((option) => option.value).join(","));
85
+ const selectedValues = selectedOptions.map((option) => option.value);
86
+ emit("update:modelValue", selectedValues.join(","));
86
87
  };
87
88
  return (_ctx, _cache) => {
88
89
  return openBlock(), createElementBlock("div", _hoisted_1, [__props.type === "array" ? (openBlock(), createBlock(unref(ScalarComboboxMultiselect), {
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableInputSelect.vue.script.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarComboboxMultiselect } from '@scalar/components/combobox'\nimport {\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n} from '@scalar/components/dropdown'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { computed, nextTick, ref, watch } from 'vue'\n\nimport type { CodeInputModelValue } from '@/v2/components/code-input/CodeInput.vue'\n\nconst props = withDefaults(\n defineProps<{\n modelValue: CodeInputModelValue\n value?: string[]\n default?: CodeInputModelValue | undefined\n canAddCustomValue?: boolean\n type?: string | undefined\n }>(),\n { canAddCustomValue: true },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: string): void\n}>()\n\nconst options = computed(() => props.value ?? [])\nconst addingCustomValue = ref(false)\nconst customValue = ref('')\nconst inputRef = ref<HTMLInputElement | null>(null)\n\nwatch(customValue, (newValue) => {\n emit('update:modelValue', newValue)\n})\n\nconst updateSelected = (value: string) => {\n emit('update:modelValue', value)\n addingCustomValue.value = false\n}\n\nconst addCustomValue = () => {\n if (customValue.value.trim()) {\n updateSelected(customValue.value)\n }\n}\n\nconst handleBlur = () => {\n if (!customValue.value.trim()) {\n emit('update:modelValue', '')\n }\n addingCustomValue.value = false\n}\n\nconst isSelected = (value: string) => {\n return props.modelValue.toString() === value\n}\n\nwatch(addingCustomValue, (newValue) => {\n if (newValue) {\n nextTick(() => {\n inputRef.value?.focus()\n })\n }\n})\n\nconst initialValue = computed(() => {\n return props.modelValue !== undefined ? props.modelValue : props.default\n})\n\n/** Options for the array type */\nconst arrayOptions = computed(() =>\n options.value.map((option) => {\n const id = option.toString()\n return { id: id, label: id, value: id }\n }),\n)\n\n/** Filter the options by what is selected */\nconst selectedArrayOptions = computed(() => {\n const selectedValues = new Set(props.modelValue.toString().split(','))\n return arrayOptions.value.filter((option) => selectedValues.has(option.id))\n})\n\n/** Update the model value when the selected options change */\nconst updateSelectedOptions = (selectedOptions: any) => {\n const selectedValues = selectedOptions.map((option: any) => option.value)\n emit('update:modelValue', selectedValues.join(','))\n}\n</script>\n\n<template>\n <div\n class=\"group-[.alert]:outline-orange group-[.error]:outline-red w-full pr-10 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline\">\n <template v-if=\"type === 'array'\">\n <ScalarComboboxMultiselect\n :modelValue=\"selectedArrayOptions\"\n :options=\"arrayOptions\"\n @update:modelValue=\"updateSelectedOptions\">\n <ScalarButton\n class=\"custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none\"\n fullWidth\n variant=\"ghost\">\n <span class=\"text-c-1 whitespace-nowrap\">{{\n selectedArrayOptions.length > 0\n ? selectedArrayOptions.map((option) => option.label).join(', ')\n : 'Select a value'\n }}</span>\n <ScalarIcon\n class=\"min-w-4\"\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n </ScalarComboboxMultiselect>\n </template>\n <template v-else-if=\"addingCustomValue\">\n <input\n ref=\"inputRef\"\n v-model=\"customValue\"\n class=\"text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none\"\n placeholder=\"Value\"\n type=\"text\"\n @blur=\"handleBlur\"\n @keyup.enter=\"addCustomValue\" />\n </template>\n <template v-else>\n <ScalarDropdown\n resize\n :value=\"initialValue\">\n <ScalarButton\n class=\"size-full justify-start gap-1.5 overflow-auto px-2 py-1.5 font-normal whitespace-nowrap outline-none\"\n variant=\"ghost\">\n <span class=\"text-c-1 overflow-hidden text-ellipsis\">{{\n initialValue ?? 'Select a value'\n }}</span>\n <ScalarIcon\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n <template #items>\n <ScalarDropdownItem\n v-for=\"option in options\"\n :key=\"option\"\n class=\"group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n :value=\"option\"\n @click=\"updateSelected(option)\">\n <div\n class=\"flex h-4 w-4 items-center justify-center rounded-full p-[3px]\"\n :class=\"\n isSelected(option)\n ? 'bg-c-accent text-b-1'\n : 'shadow-border text-transparent'\n \">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <span class=\"overflow-hidden text-ellipsis\">{{ option }}</span>\n </ScalarDropdownItem>\n <template v-if=\"canAddCustomValue\">\n <ScalarDropdownDivider v-if=\"options.length\" />\n <ScalarDropdownItem\n class=\"flex items-center gap-1.5\"\n @click=\"addingCustomValue = true\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>Add value</span>\n </ScalarDropdownItem>\n </template>\n </template>\n </ScalarDropdown>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAIb,MAAM,UAAU,eAAe,MAAM,SAAS,EAAE,CAAA;EAChD,MAAM,oBAAoB,IAAI,MAAK;EACnC,MAAM,cAAc,IAAI,GAAE;EAC1B,MAAM,WAAW,IAA6B,KAAI;AAEl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BAIM,OAJN,YAIM,CAHJ,YAEc,MAAA,WAAA,EAAA;MADZ,MAAK;MACL,MAAK;qCAET,mBAAsB,QAAA,MAAhB,aAAS,GAAA,EAAA,CAAA;;;2BAhCN,CATf,YASe,MAAA,aAAA,EAAA;KARb,OAAM;KACN,SAAQ;;4BAGC,CAFT,mBAES,QAFT,YAES,gBADP,aAAA,SAAY,iBAAA,EAAA,EAAA,EAEd,YAEc,MAAA,WAAA,EAAA;MADZ,MAAK;MACL,MAAK"}
1
+ {"version":3,"file":"DataTableInputSelect.vue.script.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarComboboxMultiselect } from '@scalar/components/combobox'\nimport {\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n} from '@scalar/components/dropdown'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { computed, nextTick, ref, watch } from 'vue'\n\nimport type { CodeInputModelValue } from '@/v2/components/code-input/CodeInput.vue'\n\nconst props = withDefaults(\n defineProps<{\n modelValue: CodeInputModelValue\n value?: string[]\n default?: CodeInputModelValue | undefined\n canAddCustomValue?: boolean\n type?: string | undefined\n }>(),\n { canAddCustomValue: true },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: string): void\n}>()\n\nconst options = computed(() => props.value ?? [])\nconst addingCustomValue = ref(false)\nconst customValue = ref('')\nconst inputRef = ref<HTMLInputElement | null>(null)\n\nwatch(customValue, (newValue) => {\n emit('update:modelValue', newValue)\n})\n\nconst updateSelected = (value: string) => {\n emit('update:modelValue', value)\n addingCustomValue.value = false\n}\n\nconst addCustomValue = () => {\n if (customValue.value.trim()) {\n updateSelected(customValue.value)\n }\n}\n\nconst handleBlur = () => {\n if (!customValue.value.trim()) {\n emit('update:modelValue', '')\n }\n addingCustomValue.value = false\n}\n\nconst isSelected = (value: string) => {\n return props.modelValue.toString() === value\n}\n\nwatch(addingCustomValue, (newValue) => {\n if (newValue) {\n nextTick(() => {\n inputRef.value?.focus()\n })\n }\n})\n\nconst initialValue = computed(() => {\n return props.modelValue !== undefined ? props.modelValue : props.default\n})\n\n/** Options for the array type */\nconst arrayOptions = computed(() =>\n options.value.map((option) => {\n const id = option.toString()\n return { id: id, label: id, value: id }\n }),\n)\n\n/** Filter the options by what is selected */\nconst selectedArrayOptions = computed(() => {\n const selectedValues = new Set(props.modelValue.toString().split(','))\n return arrayOptions.value.filter((option) => selectedValues.has(option.id))\n})\n\n/** Update the model value when the selected options change */\nconst updateSelectedOptions = (selectedOptions: any) => {\n const selectedValues = selectedOptions.map((option: any) => option.value)\n emit('update:modelValue', selectedValues.join(','))\n}\n</script>\n\n<template>\n <div\n class=\"group-[.alert]:outline-orange group-[.error]:outline-red w-full pr-10 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline\">\n <template v-if=\"type === 'array'\">\n <ScalarComboboxMultiselect\n :modelValue=\"selectedArrayOptions\"\n :options=\"arrayOptions\"\n @update:modelValue=\"updateSelectedOptions\">\n <ScalarButton\n class=\"custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none\"\n fullWidth\n variant=\"ghost\">\n <span class=\"text-c-1 whitespace-nowrap\">{{\n selectedArrayOptions.length > 0\n ? selectedArrayOptions.map((option) => option.label).join(', ')\n : 'Select a value'\n }}</span>\n <ScalarIcon\n class=\"min-w-4\"\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n </ScalarComboboxMultiselect>\n </template>\n <template v-else-if=\"addingCustomValue\">\n <input\n ref=\"inputRef\"\n v-model=\"customValue\"\n class=\"text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none\"\n placeholder=\"Value\"\n type=\"text\"\n @blur=\"handleBlur\"\n @keyup.enter=\"addCustomValue\" />\n </template>\n <template v-else>\n <ScalarDropdown\n resize\n :value=\"initialValue\">\n <ScalarButton\n class=\"size-full justify-start gap-1.5 overflow-auto px-2 py-1.5 font-normal whitespace-nowrap outline-none\"\n variant=\"ghost\">\n <span class=\"text-c-1 overflow-hidden text-ellipsis\">{{\n initialValue ?? 'Select a value'\n }}</span>\n <ScalarIcon\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n <template #items>\n <ScalarDropdownItem\n v-for=\"option in options\"\n :key=\"option\"\n class=\"group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n :value=\"option\"\n @click=\"updateSelected(option)\">\n <div\n class=\"flex h-4 w-4 items-center justify-center rounded-full p-[3px]\"\n :class=\"\n isSelected(option)\n ? 'bg-c-accent text-b-1'\n : 'shadow-border text-transparent'\n \">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <span class=\"overflow-hidden text-ellipsis\">{{ option }}</span>\n </ScalarDropdownItem>\n <template v-if=\"canAddCustomValue\">\n <ScalarDropdownDivider v-if=\"options.length\" />\n <ScalarDropdownItem\n class=\"flex items-center gap-1.5\"\n @click=\"addingCustomValue = true\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>Add value</span>\n </ScalarDropdownItem>\n </template>\n </template>\n </ScalarDropdown>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAIb,MAAM,UAAU,eAAe,MAAM,SAAS,CAAC,CAAC;EAChD,MAAM,oBAAoB,IAAI,KAAK;EACnC,MAAM,cAAc,IAAI,EAAE;EAC1B,MAAM,WAAW,IAA6B,IAAI;EAElD,MAAM,cAAc,aAAa;GAC/B,KAAK,qBAAqB,QAAQ;EACpC,CAAC;EAED,MAAM,kBAAkB,UAAkB;GACxC,KAAK,qBAAqB,KAAK;GAC/B,kBAAkB,QAAQ;EAC5B;EAEA,MAAM,uBAAuB;GA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B,QAAA,MAAhB,aAAS,EAAA,EAAA,CAAA;;;2BAhCN,CATf,YASe,MAAA,YAAA,GAAA;KARb,OAAM;KACN,SAAQ;;4BAGC,CAFT,mBAES,QAFT,YAES,gBADP,aAAA,SAAY,gBAAA,GAAA,CAAA,GAEd,YAEc,MAAA,UAAA,GAAA;MADZ,MAAK;MACL,MAAK"}
@@ -6,7 +6,7 @@ var _hoisted_1 = { class: "group contents" };
6
6
  function _sfc_render(_ctx, _cache) {
7
7
  return openBlock(), createElementBlock("tr", _hoisted_1, [renderSlot(_ctx.$slots, "default")]);
8
8
  }
9
- var DataTableRow_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
9
+ var DataTableRow_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
10
10
  //#endregion
11
11
  export { DataTableRow_default as default };
12
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableRow.vue.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableRow.vue"],"sourcesContent":["<template>\n <tr class=\"group contents\">\n <slot />\n </tr>\n</template>\n"],"mappings":";;;;mBACM,OAAM,kBAAgB;;qBAA1B,mBAEK,MAFL,YAEK,CADH,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"DataTableRow.vue.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableRow.vue"],"sourcesContent":["<template>\n <tr class=\"group contents\">\n <slot />\n </tr>\n</template>\n"],"mappings":";;;;mBACM,OAAM,iBAAgB;;qBAA1B,mBAEK,MAFL,YAEK,CADH,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -2,7 +2,7 @@ import DataTableCell_default from "./DataTableCell.vue.js";
2
2
  import { createBlock, createElementVNode, createTextVNode, defineComponent, openBlock, renderSlot, toDisplayString, withCtx } from "vue";
3
3
  //#region src/v2/components/data-table/DataTableText.vue?vue&type=script&setup=true&lang.ts
4
4
  var _hoisted_1 = { class: "flex-1 px-2 py-1.5 whitespace-nowrap" };
5
- var DataTableText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
5
+ var DataTableText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
6
6
  __name: "DataTableText",
7
7
  props: { text: {} },
8
8
  setup(__props) {
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableText.vue.script.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport DataTableCell from './DataTableCell.vue'\n\ndefineProps<{\n text?: string | number\n}>()\n</script>\n<template>\n <DataTableCell class=\"relative flex\">\n <span class=\"flex-1 px-2 py-1.5 whitespace-nowrap\">\n <slot>{{ text }}</slot>\n </span>\n </DataTableCell>\n</template>\n"],"mappings":";;;;;;;;;uBAQE,YAIgB,uBAAA,EAJD,OAAM,iBAAe,EAAA;2BAG3B,CAFP,mBAEO,QAFP,YAEO,CADL,WAAuB,KAAA,QAAA,WAAA,EAAA,QAAA,CAAA,gBAAA,gBAAd,QAAA,KAAI,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"DataTableText.vue.script.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport DataTableCell from './DataTableCell.vue'\n\ndefineProps<{\n text?: string | number\n}>()\n</script>\n<template>\n <DataTableCell class=\"relative flex\">\n <span class=\"flex-1 px-2 py-1.5 whitespace-nowrap\">\n <slot>{{ text }}</slot>\n </span>\n </DataTableCell>\n</template>\n"],"mappings":";;;;;;;;;uBAQE,YAIgB,uBAAA,EAJD,OAAM,gBAAe,GAAA;2BAG3B,CAFP,mBAEO,QAFP,YAEO,CADL,WAAuB,KAAA,QAAA,WAAA,CAAA,SAAA,CAAA,gBAAA,gBAAd,QAAA,IAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/forms/ConfirmationForm.vue"],"names":[],"mappings":"AA8CA,KAAK,WAAW,GAAG;IACjB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0CAA0C;IAC1C,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;CAC7B,CAAC;AAmGF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ConfirmationForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/forms/ConfirmationForm.vue"],"names":[],"mappings":"AA8CA,KAAK,WAAW,GAAG;IACjB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0CAA0C;IAC1C,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;CAC7B,CAAC;AAoGF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import { createElementBlock, createElementVNode, createTextVNode, createVNode, d
2
2
  import { ScalarButton } from "@scalar/components/button";
3
3
  //#region src/v2/components/forms/ConfirmationForm.vue?vue&type=script&setup=true&lang.ts
4
4
  var _hoisted_1 = { class: "flex justify-between gap-10" };
5
- var ConfirmationForm_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
5
+ var ConfirmationForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
6
6
  __name: "ConfirmationForm",
7
7
  props: {
8
8
  label: { default: "Save" },
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationForm.vue.script.js","names":[],"sources":["../../../../src/v2/components/forms/ConfirmationForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\n\nconst { label = 'Save', variant = 'solid' } = defineProps<{\n /** The label of the submit button */\n label?: string\n /** Sets the style of the submit button */\n variant?: 'danger' | 'solid'\n}>()\n\nconst emit = defineEmits<{\n (e: 'cancel'): void\n (e: 'submit'): void\n}>()\n</script>\n<template>\n <form\n class=\"flex flex-col gap-4 text-base\"\n @submit.prevent=\"emit('submit')\">\n <slot />\n\n <div class=\"flex justify-between gap-10\">\n <!-- Cancel -->\n <ScalarButton\n size=\"sm\"\n type=\"button\"\n variant=\"outlined\"\n @click=\"emit('cancel')\">\n Cancel\n </ScalarButton>\n\n <!-- Submit -->\n <ScalarButton\n size=\"sm\"\n type=\"submit\"\n :variant=\"variant\">\n {{ label }}\n </ScalarButton>\n </div>\n </form>\n</template>\n"],"mappings":";;;;;;;;;;;;EAUA,MAAM,OAAO;;uBAMX,mBAuBO,QAAA;IAtBL,OAAM;IACL,UAAM,OAAA,OAAA,OAAA,KAAA,eAAA,WAAU,KAAI,SAAA,EAAA,CAAA,UAAA,CAAA;OACrB,WAAQ,KAAA,QAAA,UAAA,EAER,mBAiBM,OAjBN,YAiBM,CAfJ,YAMe,MAAA,aAAA,EAAA;IALb,MAAK;IACL,MAAK;IACL,SAAQ;IACP,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,SAAA;;2BAEd,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAF0B,YAE1B,GAAA,CAAA,EAAA,CAAA;;OAGA,YAKe,MAAA,aAAA,EAAA;IAJb,MAAK;IACL,MAAK;IACJ,SAAS,QAAA;;2BACC,CAAA,gBAAA,gBAAR,QAAA,MAAK,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"ConfirmationForm.vue.script.js","names":[],"sources":["../../../../src/v2/components/forms/ConfirmationForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\n\nconst { label = 'Save', variant = 'solid' } = defineProps<{\n /** The label of the submit button */\n label?: string\n /** Sets the style of the submit button */\n variant?: 'danger' | 'solid'\n}>()\n\nconst emit = defineEmits<{\n (e: 'cancel'): void\n (e: 'submit'): void\n}>()\n</script>\n<template>\n <form\n class=\"flex flex-col gap-4 text-base\"\n @submit.prevent=\"emit('submit')\">\n <slot />\n\n <div class=\"flex justify-between gap-10\">\n <!-- Cancel -->\n <ScalarButton\n size=\"sm\"\n type=\"button\"\n variant=\"outlined\"\n @click=\"emit('cancel')\">\n Cancel\n </ScalarButton>\n\n <!-- Submit -->\n <ScalarButton\n size=\"sm\"\n type=\"submit\"\n :variant=\"variant\">\n {{ label }}\n </ScalarButton>\n </div>\n </form>\n</template>\n"],"mappings":";;;;;;;;;;;;EAUA,MAAM,OAAO;;uBAMX,mBAuBO,QAAA;IAtBL,OAAM;IACL,UAAM,OAAA,OAAA,OAAA,KAAA,eAAA,WAAU,KAAI,QAAA,GAAA,CAAA,SAAA,CAAA;OACrB,WAAQ,KAAA,QAAA,SAAA,GAER,mBAiBM,OAjBN,YAiBM,CAfJ,YAMe,MAAA,YAAA,GAAA;IALb,MAAK;IACL,MAAK;IACL,SAAQ;IACP,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,QAAA;;2BAEd,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAF0B,YAE1B,EAAA,CAAA,EAAA,CAAA;;OAGA,YAKe,MAAA,YAAA,GAAA;IAJb,MAAK;IACL,MAAK;IACJ,SAAS,QAAA;;2BACC,CAAA,gBAAA,gBAAR,QAAA,KAAK,GAAA,CAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/layout/CollapsibleSection.vue"],"names":[],"mappings":"AA8HA;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEhB,iDAAiD;kBACnC,OAAO;IACrB,uDAAuD;gBAC3C,MAAM;IAClB,8DAA8D;eACnD,OAAO;;;;IALlB,iDAAiD;kBACnC,OAAO;IACrB,uDAAuD;gBAC3C,MAAM;IAClB,8DAA8D;eACnD,OAAO;;;;YAyPR,CAAC,KAAK;;KAAiB,KAAK,GAAG;;cAC7B,CAAC,KAAK;;KAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK;;KAAiB,KAAK,GAAG;EAUzC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CollapsibleSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/layout/CollapsibleSection.vue"],"names":[],"mappings":"AA8HA;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IAEhB,iDAAiD;kBACnC,OAAO;IACrB,uDAAuD;gBAC3C,MAAM;IAClB,8DAA8D;eACnD,OAAO;;;;IALlB,iDAAiD;kBACnC,OAAO;IACrB,uDAAuD;gBAC3C,MAAM;IAClB,8DAA8D;eACnD,OAAO;;;;YA0PR,CAAC,KAAK;;KAAiB,KAAK,GAAG;;cAC7B,CAAC,KAAK;;KAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK;;KAAiB,KAAK,GAAG;EAUzC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -19,7 +19,7 @@ var _hoisted_7 = {
19
19
  key: 0,
20
20
  class: "ui-not-open:hidden flex items-center gap-2 pr-0.75"
21
21
  };
22
- var CollapsibleSection_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
22
+ var CollapsibleSection_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
23
23
  name: "CollapsibleSection",
24
24
  props: {
25
25
  defaultOpen: {
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleSection.vue.script.js","names":["$slots","$attrs"],"sources":["../../../../src/v2/components/layout/CollapsibleSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Simple collapsible section component that can be used to wrap content that should be collapsed and expanded\n *\n * Would like to replace with details/summary elements, but they are not supported in all browsers yet?\n */\nexport default {\n name: 'CollapsibleSection',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { useId } from 'vue'\n\nimport ValueEmitter from './ValueEmitter.vue'\n\nconst {\n defaultOpen = true,\n itemCount = 0,\n isStatic,\n} = defineProps<{\n /** Whether the disclosure is open by default. */\n defaultOpen?: boolean\n /** Number of items to show in badge when collapsed. */\n itemCount?: number\n /** Whether the disclosure is static and cannot be toggled. */\n isStatic?: boolean\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst headingId = useId()\n</script>\n\n<template>\n <Disclosure\n v-slot=\"{ open }\"\n as=\"div\"\n class=\"group/collapse text-c-2 focus-within:text-c-1 last:ui-open:border-b-0\"\n :class=\"{\n 'last-of-type:first-of-type:border-b-0': isStatic,\n 'border-b': !isStatic,\n }\"\n :defaultOpen=\"defaultOpen\"\n :static=\"isStatic\">\n <!-- We use this hack to emit the slot value back to the parent -->\n <ValueEmitter\n :value=\"open as boolean\"\n @change=\"(value) => emit('update:modelValue', value)\" />\n\n <section\n :aria-labelledby=\"headingId\"\n class=\"contents\">\n <div\n class=\"bg-b-2 flex items-center\"\n :class=\"isStatic && 'rounded-t-xl border-x border-t'\">\n <!-- Main disclosure button that toggles the panel -->\n <DisclosureButton\n class=\"hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-base font-medium outline-none md:px-1.5 xl:pr-0.5 xl:pl-2\"\n :class=\"isStatic && '!pl-3'\"\n :disabled=\"isStatic\">\n <ScalarIcon\n v-if=\"!isStatic\"\n class=\"text-c-3 group-hover:text-c-1 rounded-px ui-open:rotate-90 ui-not-open:rotate-0 outline-offset-2 group-focus-visible:outline\"\n icon=\"ChevronRight\"\n size=\"md\" />\n\n <!-- Heading with title -->\n <h2\n class=\"text-c-1 m-0 flex flex-1 items-center gap-1.5 leading-[20px]\">\n <span\n :id=\"headingId\"\n class=\"contents\">\n <slot\n name=\"title\"\n :open=\"open\" />\n <span\n v-if=\"!open\"\n class=\"sr-only\">\n (Collapsed)\n </span>\n </span>\n\n <!-- Badge showing item count when collapsed. -->\n <span\n v-if=\"!open && itemCount\"\n class=\"bg-b-2 text-c-2 inline-flex h-5 w-5 items-center justify-center rounded-full border text-xs font-semibold\">\n {{ itemCount }}\n <span class=\"sr-only\">Item{{ itemCount === 1 ? '' : 's' }}</span>\n </span>\n </h2>\n </DisclosureButton>\n\n <!-- Optional actions slot that hides when the panel is closed. -->\n <div\n v-if=\"$slots.actions\"\n class=\"ui-not-open:hidden flex items-center gap-2 pr-0.75\">\n <slot\n name=\"actions\"\n :open=\"open\" />\n </div>\n </div>\n\n <!-- The collapsible content panel. -->\n <DisclosurePanel\n v-bind=\"$attrs\"\n class=\"diclosure-panel h-full max-h-fit rounded-b\">\n <slot :open=\"open\" />\n </DisclosurePanel>\n </section>\n </Disclosure>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;CAOE,MAAM;;;;;;;;;;;EAwBR,MAAM,OAAO;EAIb,MAAM,YAAY,OAAM;;uBAItB,YA2Ea,MAAA,WAAA,EAAA;IAzEX,IAAG;IACH,OAAK,eAAA,CAAC,yEAAuE;8CACpB,QAAA;kBAA6B,QAAA;;IAIrF,aAAa,QAAA;IACb,QAAQ,QAAA;;sBAIiD,EAZhD,WAAI,CAUd,YAE0D,sBAAA;KADvD,OAAO;KACP,UAAM,OAAA,OAAA,OAAA,MAAG,UAAU,KAAI,qBAAsB,MAAK;4BAErD,mBA2DU,WAAA;KA1DP,mBAAiB,MAAA,UAAS;KAC3B,OAAM;QACN,mBAgDM,OAAA,EA/CJ,OAAK,eAAA,CAAC,4BACE,QAAA,YAAQ,iCAAA,CAAA,EAAA,EAAA,CAEhB,YAkCmB,MAAA,iBAAA,EAAA;KAjCjB,OAAK,eAAA,CAAC,wKACE,QAAA,YAAQ,QAAA,CAAA;KACf,UAAU,QAAA;;4BAKG,CAAA,CAHL,QAAA,YAAA,WAAA,EADT,YAIc,MAAA,WAAA,EAAA;;MAFZ,OAAM;MACN,MAAK;MACL,MAAK;yCAGP,mBAsBK,MAtBL,YAsBK,CApBH,mBAWO,QAAA;MAVJ,IAAI,MAAA,UAAS;MACd,OAAM;SACN,WAEiB,KAAA,QAAA,SAAA,EAAR,MAAI,CAAA,EAAA,CAEJ,QAAA,WAAA,EADT,mBAIO,QAJP,YAEkB,gBAElB,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,GAAA,WAAA,EAAA,CAKO,QAAQ,QAAA,aAAA,WAAA,EADjB,mBAKO,QALP,YAKO,CAAA,gBAAA,gBAFF,QAAA,UAAS,GAAG,KACf,EAAA,EAAA,mBAAiE,QAAjE,YAAsB,SAAI,gBAAG,QAAA,cAAS,IAAA,KAAA,IAAA,EAAA,EAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA;;qCAOpCA,KAAAA,OAAO,WAAA,WAAA,EADf,mBAMM,OANN,YAMM,CAHJ,WAEiB,KAAA,QAAA,WAAA,EAAR,MAAI,CAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,EAKjB,YAIkB,MAAA,gBAAA,EAJlB,WACUC,KAGQ,QAHF,EACd,OAAM,8CAA4C,CAAA,EAAA;4BAC7B,CAArB,WAAqB,KAAA,QAAA,WAAA,EAAR,MAAI,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"CollapsibleSection.vue.script.js","names":["$slots","$attrs"],"sources":["../../../../src/v2/components/layout/CollapsibleSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Simple collapsible section component that can be used to wrap content that should be collapsed and expanded\n *\n * Would like to replace with details/summary elements, but they are not supported in all browsers yet?\n */\nexport default {\n name: 'CollapsibleSection',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { useId } from 'vue'\n\nimport ValueEmitter from './ValueEmitter.vue'\n\nconst {\n defaultOpen = true,\n itemCount = 0,\n isStatic,\n} = defineProps<{\n /** Whether the disclosure is open by default. */\n defaultOpen?: boolean\n /** Number of items to show in badge when collapsed. */\n itemCount?: number\n /** Whether the disclosure is static and cannot be toggled. */\n isStatic?: boolean\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst headingId = useId()\n</script>\n\n<template>\n <Disclosure\n v-slot=\"{ open }\"\n as=\"div\"\n class=\"group/collapse text-c-2 focus-within:text-c-1 last:ui-open:border-b-0\"\n :class=\"{\n 'last-of-type:first-of-type:border-b-0': isStatic,\n 'border-b': !isStatic,\n }\"\n :defaultOpen=\"defaultOpen\"\n :static=\"isStatic\">\n <!-- We use this hack to emit the slot value back to the parent -->\n <ValueEmitter\n :value=\"open as boolean\"\n @change=\"(value) => emit('update:modelValue', value)\" />\n\n <section\n :aria-labelledby=\"headingId\"\n class=\"contents\">\n <div\n class=\"bg-b-2 flex items-center\"\n :class=\"isStatic && 'rounded-t-xl border-x border-t'\">\n <!-- Main disclosure button that toggles the panel -->\n <DisclosureButton\n class=\"hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-base font-medium outline-none md:px-1.5 xl:pr-0.5 xl:pl-2\"\n :class=\"isStatic && '!pl-3'\"\n :disabled=\"isStatic\">\n <ScalarIcon\n v-if=\"!isStatic\"\n class=\"text-c-3 group-hover:text-c-1 rounded-px ui-open:rotate-90 ui-not-open:rotate-0 outline-offset-2 group-focus-visible:outline\"\n icon=\"ChevronRight\"\n size=\"md\" />\n\n <!-- Heading with title -->\n <h2\n class=\"text-c-1 m-0 flex flex-1 items-center gap-1.5 leading-[20px]\">\n <span\n :id=\"headingId\"\n class=\"contents\">\n <slot\n name=\"title\"\n :open=\"open\" />\n <span\n v-if=\"!open\"\n class=\"sr-only\">\n (Collapsed)\n </span>\n </span>\n\n <!-- Badge showing item count when collapsed. -->\n <span\n v-if=\"!open && itemCount\"\n class=\"bg-b-2 text-c-2 inline-flex h-5 w-5 items-center justify-center rounded-full border text-xs font-semibold\">\n {{ itemCount }}\n <span class=\"sr-only\">Item{{ itemCount === 1 ? '' : 's' }}</span>\n </span>\n </h2>\n </DisclosureButton>\n\n <!-- Optional actions slot that hides when the panel is closed. -->\n <div\n v-if=\"$slots.actions\"\n class=\"ui-not-open:hidden flex items-center gap-2 pr-0.75\">\n <slot\n name=\"actions\"\n :open=\"open\" />\n </div>\n </div>\n\n <!-- The collapsible content panel. -->\n <DisclosurePanel\n v-bind=\"$attrs\"\n class=\"diclosure-panel h-full max-h-fit rounded-b\">\n <slot :open=\"open\" />\n </DisclosurePanel>\n </section>\n </Disclosure>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;CAOE,MAAM;;;;;;;;;;;EAwBR,MAAM,OAAO;EAIb,MAAM,YAAY,MAAM;;uBAItB,YA2Ea,MAAA,UAAA,GAAA;IAzEX,IAAG;IACH,OAAK,eAAA,CAAC,yEAAuE;8CACpB,QAAA;kBAA6B,QAAA;;IAIrF,aAAa,QAAA;IACb,QAAQ,QAAA;;sBAIiD,EAZhD,WAAI,CAUd,YAE0D,sBAAA;KADvD,OAAO;KACP,UAAM,OAAA,OAAA,OAAA,MAAG,UAAU,KAAI,qBAAsB,KAAK;4BAErD,mBA2DU,WAAA;KA1DP,mBAAiB,MAAA,SAAA;KAClB,OAAM;QACN,mBAgDM,OAAA,EA/CJ,OAAK,eAAA,CAAC,4BACE,QAAA,YAAQ,gCAAA,CAAA,EAAA,GAAA,CAEhB,YAkCmB,MAAA,gBAAA,GAAA;KAjCjB,OAAK,eAAA,CAAC,wKACE,QAAA,YAAQ,OAAA,CAAA;KACf,UAAU,QAAA;;4BAKG,CAAA,CAHL,QAAA,YAAA,UAAA,GADT,YAIc,MAAA,UAAA,GAAA;;MAFZ,OAAM;MACN,MAAK;MACL,MAAK;yCAGP,mBAsBK,MAtBL,YAsBK,CApBH,mBAWO,QAAA;MAVJ,IAAI,MAAA,SAAA;MACL,OAAM;SACN,WAEiB,KAAA,QAAA,SAAA,EAAR,KAAI,CAAA,GAAA,CAEJ,QAAA,UAAA,GADT,mBAIO,QAJP,YAEkB,eAElB,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,GAAA,UAAA,GAAA,CAKO,QAAQ,QAAA,aAAA,UAAA,GADjB,mBAKO,QALP,YAKO,CAAA,gBAAA,gBAFF,QAAA,SAAS,IAAG,KACf,CAAA,GAAA,mBAAiE,QAAjE,YAAsB,SAAI,gBAAG,QAAA,cAAS,IAAA,KAAA,GAAA,GAAA,CAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA,CAAA,CAAA;;qCAOpCA,KAAAA,OAAO,WAAA,UAAA,GADf,mBAMM,OANN,YAMM,CAHJ,WAEiB,KAAA,QAAA,WAAA,EAAR,KAAI,CAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,CAAA,GAKjB,YAIkB,MAAA,eAAA,GAJlB,WACUC,KAGQ,QAHF,EACd,OAAM,6CAA4C,CAAA,GAAA;4BAC7B,CAArB,WAAqB,KAAA,QAAA,WAAA,EAAR,KAAI,CAAA,CAAA,CAAA"}
@@ -22,7 +22,7 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
22
22
  (e: "unmount"): void;
23
23
  };
24
24
  }>) => import("vue").VNode & {
25
- __ctx?: Awaited<typeof __VLS_setup>;
25
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
26
26
  };
27
27
  type __VLS_PrettifyLocal<T> = (T extends any ? {
28
28
  [K in keyof T]: T[K];
@@ -1 +1 @@
1
- {"version":3,"file":"ValueEmitter.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/layout/ValueEmitter.vue"],"names":[],"mappings":"AAuCA;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY,GAAK,CAAC,EACvB,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAA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AAK,EAAE,WAAW,GAAG,mBAAmB,CAAC;eAjC5B,CAAC;;;;KAiC8D,CAAC,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC5J,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;WACH,EAAE;;YAhCJ,QAAQ,SAAS,CAAC,GAAG,IAAI;YACzB,SAAS,GAAG,IAAI;;EAkClB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAA;CAAI,CAAC;AACzF,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, onBeforeUnmount, watch } from "vue";
2
- var ValueEmitter_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
2
+ var ValueEmitter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
3
3
  name: "ValueEmitter",
4
4
  props: { value: {} },
5
5
  emits: ["change", "unmount"],
@@ -1 +1 @@
1
- {"version":3,"file":"ValueEmitter.vue.script.js","names":[],"sources":["../../../../src/v2/components/layout/ValueEmitter.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * This component takes in any value and emits it back\n *\n * This is useful when we need to catch the open state of a disclosure from its v-slot\n */\nexport default {\n name: 'ValueEmitter',\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { onBeforeUnmount, watch } from 'vue'\n\nconst { value } = defineProps<{ value: T }>()\nconst emit = defineEmits<{\n (e: 'change', value: T): void\n (e: 'unmount'): void\n}>()\n\nwatch(\n () => value,\n (newValue) => emit('change', newValue),\n { immediate: true },\n)\n\nonBeforeUnmount(() => emit('unmount'))\n</script>\n\n<!-- eslint-disable-next-line vue/valid-template-root -->\n<template>\n <!-- We use this hack to emit the slot value back to the parent -->\n</template>\n"],"mappings":";;CAOE,MAAM;;;;EAQR,MAAM,OAAO;AAKb,cACQ,QAAA,QACL,aAAa,KAAK,UAAU,SAAS,EACtC,EAAE,WAAW,MAAM,CACrB;AAEA,wBAAsB,KAAK,UAAU,CAAA"}
1
+ {"version":3,"file":"ValueEmitter.vue.script.js","names":[],"sources":["../../../../src/v2/components/layout/ValueEmitter.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * This component takes in any value and emits it back\n *\n * This is useful when we need to catch the open state of a disclosure from its v-slot\n */\nexport default {\n name: 'ValueEmitter',\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { onBeforeUnmount, watch } from 'vue'\n\nconst { value } = defineProps<{ value: T }>()\nconst emit = defineEmits<{\n (e: 'change', value: T): void\n (e: 'unmount'): void\n}>()\n\nwatch(\n () => value,\n (newValue) => emit('change', newValue),\n { immediate: true },\n)\n\nonBeforeUnmount(() => emit('unmount'))\n</script>\n\n<!-- eslint-disable-next-line vue/valid-template-root -->\n<template>\n <!-- We use this hack to emit the slot value back to the parent -->\n</template>\n"],"mappings":";;CAOE,MAAM;;;;EAQR,MAAM,OAAO;EAKb,YACQ,QAAA,QACL,aAAa,KAAK,UAAU,QAAQ,GACrC,EAAE,WAAW,KAAK,CACpB;EAEA,sBAAsB,KAAK,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteModal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/modals/DeleteModal.vue"],"names":[],"mappings":"AA0CA,KAAK,WAAW,GAAG;IACjB,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,qCAAqC;IACrC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC,CAAC;AAqFF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"DeleteModal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/modals/DeleteModal.vue"],"names":[],"mappings":"AA0CA,KAAK,WAAW,GAAG;IACjB,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,qCAAqC;IACrC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC,CAAC;AAuFF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -6,7 +6,7 @@ var _hoisted_1 = {
6
6
  key: 0,
7
7
  class: "text-c-2 text-sm leading-normal text-pretty"
8
8
  };
9
- var DeleteModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
9
+ var DeleteModal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
10
10
  __name: "DeleteModal",
11
11
  props: {
12
12
  name: {},
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteModal.vue.script.js","names":[],"sources":["../../../../src/v2/components/modals/DeleteModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { truncate } from '@scalar/helpers/string/truncate'\nimport { computed } from 'vue'\n\nimport { ConfirmationForm } from '@/v2/components/forms'\n\nconst { name, warningMessage } = defineProps<{\n /** The name of the item to delete */\n name: string\n /** The warning message to display */\n warningMessage?: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'close'): void\n (e: 'delete'): void\n}>()\n\n/** Condenses the name to 18 characters and adds an ellipsis if it's longer */\nconst truncatedName = computed(() => truncate(name))\n</script>\n<template>\n <ConfirmationForm\n :label=\"`Delete ${truncatedName}`\"\n variant=\"danger\"\n @cancel=\"emit('close')\"\n @submit=\"emit('delete')\">\n <p\n v-if=\"warningMessage\"\n class=\"text-c-2 text-sm leading-normal text-pretty\">\n {{ warningMessage }}\n </p>\n </ConfirmationForm>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAaA,MAAM,OAAO;;EAMb,MAAM,gBAAgB,eAAe,SAAS,QAAA,KAAK,CAAA;;uBAGjD,YAUmB,MAAA,yBAAA,EAAA;IAThB,OAAK,UAAY,cAAA;IAClB,SAAQ;IACP,UAAM,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,QAAA;IACZ,UAAM,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,SAAA;;2BAKT,CAHI,QAAA,kBAAA,WAAA,EADR,mBAII,KAJJ,YAII,gBADC,QAAA,eAAc,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"DeleteModal.vue.script.js","names":[],"sources":["../../../../src/v2/components/modals/DeleteModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { truncate } from '@scalar/helpers/string/truncate'\nimport { computed } from 'vue'\n\nimport { ConfirmationForm } from '@/v2/components/forms'\n\nconst { name, warningMessage } = defineProps<{\n /** The name of the item to delete */\n name: string\n /** The warning message to display */\n warningMessage?: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'close'): void\n (e: 'delete'): void\n}>()\n\n/** Condenses the name to 18 characters and adds an ellipsis if it's longer */\nconst truncatedName = computed(() => truncate(name))\n</script>\n<template>\n <ConfirmationForm\n :label=\"`Delete ${truncatedName}`\"\n variant=\"danger\"\n @cancel=\"emit('close')\"\n @submit=\"emit('delete')\">\n <p\n v-if=\"warningMessage\"\n class=\"text-c-2 text-sm leading-normal text-pretty\">\n {{ warningMessage }}\n </p>\n </ConfirmationForm>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAaA,MAAM,OAAO;;EAMb,MAAM,gBAAgB,eAAe,SAAS,QAAA,IAAI,CAAC;;uBAGjD,YAUmB,MAAA,wBAAA,GAAA;IAThB,OAAK,UAAY,cAAA;IAClB,SAAQ;IACP,UAAM,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,OAAA;IACZ,UAAM,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,QAAA;;2BAKT,CAHI,QAAA,kBAAA,UAAA,GADR,mBAII,KAJJ,YAII,gBADC,QAAA,cAAc,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import ModalClientContainer_vue_vue_type_script_setup_true_lang_default from "./ModalClientContainer.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/v2/components/modals/ModalClientContainer.vue
5
- var ModalClientContainer_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ModalClientContainer_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-77897d1c"]]);
5
+ var ModalClientContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ModalClientContainer_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-77897d1c"]]);
6
6
  //#endregion
7
7
  export { ModalClientContainer_default as default };
8
8
 
@@ -4,7 +4,7 @@ import { addScalarClassesToHeadless } from "@scalar/components/helpers";
4
4
  import { useFocusTrap } from "@vueuse/integrations/useFocusTrap";
5
5
  //#region src/v2/components/modals/ModalClientContainer.vue?vue&type=script&setup=true&lang.ts
6
6
  var _hoisted_1 = { class: "scalar scalar-app z-overlay relative" };
7
- var ModalClientContainer_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
7
+ var ModalClientContainer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
8
8
  __name: "ModalClientContainer",
9
9
  props: { modalState: {} },
10
10
  emits: ["open", "close"],
@@ -1 +1 @@
1
- {"version":3,"file":"ModalClientContainer.vue.script.js","names":["$attrs"],"sources":["../../../../src/v2/components/modals/ModalClientContainer.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { addScalarClassesToHeadless } from '@scalar/components/helpers'\nimport type { ModalState } from '@scalar/components/modal'\nimport { ScalarTeleportRoot } from '@scalar/components/teleport'\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap'\nimport { nextTick, onBeforeMount, onBeforeUnmount, ref, watch } from 'vue'\n\nconst props = defineProps<{ modalState: ModalState }>()\nconst emit = defineEmits<{\n (e: 'open'): void\n (e: 'close'): void\n}>()\n\nconst client = ref<HTMLElement | null>(null)\n\nconst { activate: activateFocusTrap, deactivate: deactivateFocusTrap } =\n useFocusTrap(client, {\n allowOutsideClick: true,\n fallbackFocus: () => client.value as HTMLElement,\n })\n\n// ensure scalar classes exist on headless-ui root\nonBeforeMount(() => addScalarClassesToHeadless())\n\n// manage the focus trap and emit lifecycle events\nwatch(\n () => props.modalState.open,\n async (open) => {\n if (open) {\n await nextTick()\n activateFocusTrap()\n emit('open')\n } else {\n deactivateFocusTrap()\n emit('close')\n }\n },\n { immediate: false },\n)\n\n// best-effort cleanup on unmount\nonBeforeUnmount(() => {\n deactivateFocusTrap()\n})\n</script>\n\n<template>\n <div class=\"scalar scalar-app z-overlay relative\">\n <div\n class=\"scalar-container\"\n :class=\"{ 'scalar-client--open': modalState.open }\">\n <div\n ref=\"client\"\n aria-label=\"API Client\"\n aria-modal=\"true\"\n v-bind=\"$attrs\"\n class=\"scalar-app-layout scalar-client\"\n role=\"dialog\"\n tabindex=\"-1\">\n <ScalarTeleportRoot>\n <slot />\n </ScalarTeleportRoot>\n </div>\n\n <!-- overlay / exit area -->\n <div\n class=\"scalar-app-exit\"\n @click=\"modalState.hide()\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n@reference \"@/style.css\";\n\n.scalar .scalar-app-layout {\n background: var(--scalar-background-1);\n height: calc(100% - 120px);\n max-width: 1390px;\n width: 100%;\n margin: auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n/**\n * Allow the modal to fill more space on\n * very short (or very zoomed in) screens\n */\n@variant zoomed {\n .scalar .scalar-app-layout {\n height: 100%;\n max-height: 90svh;\n }\n}\n\n.scalar .scalar-app-exit {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background: #00000038;\n cursor: pointer;\n z-index: -1;\n}\n\n.dark-mode .scalar .scalar-app-exit {\n background: rgba(0, 0, 0, 0.45);\n}\n\n.scalar .scalar-app-exit:before {\n font-family: sans-serif;\n position: absolute;\n top: 0;\n right: 12px;\n font-size: 30px;\n font-weight: 100;\n line-height: 50px;\n text-align: center;\n color: white;\n opacity: 0.6;\n}\n\n.scalar .scalar-app-exit:hover:before {\n opacity: 1;\n}\n\n/* container */\n.scalar-container {\n overflow: hidden;\n visibility: hidden;\n position: fixed;\n bottom: 0;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n pointer-events: none;\n will-change: opacity;\n transition:\n opacity 0.35s ease,\n visibility 0s linear 0.35s;\n}\n\n.scalar-container.scalar-client--open {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n transition: opacity 0.35s ease;\n}\n\n.scalar .url-form-input {\n min-height: auto !important;\n}\n\n.scalar .scalar-container {\n line-height: normal;\n}\n</style>\n"],"mappings":";;;;;;;;;;;EAOA,MAAM,QAAQ;EACd,MAAM,OAAO;EAKb,MAAM,SAAS,IAAwB,KAAI;EAE3C,MAAM,EAAE,UAAU,mBAAmB,YAAY,wBAC/C,aAAa,QAAQ;GACnB,mBAAmB;GACnB,qBAAqB,OAAO;GAC7B,CAAA;AAGH,sBAAoB,4BAA4B,CAAA;AAGhD,cACQ,MAAM,WAAW,MACvB,OAAO,SAAS;AACd,OAAI,MAAM;AACR,UAAM,UAAS;AACf,uBAAkB;AAClB,SAAK,OAAM;UACN;AACL,yBAAoB;AACpB,SAAK,QAAO;;KAGhB,EAAE,WAAW,OAAO,CACtB;AAGA,wBAAsB;AACpB,wBAAoB;IACrB;;uBAIC,mBAsBM,OAtBN,YAsBM,CArBJ,mBAoBM,OAAA,EAnBJ,OAAK,eAAA,CAAC,oBAAkB,EAAA,uBACS,QAAA,WAAW,MAAI,CAAA,CAAA,EAAA,EAAA,CAChD,mBAWM,OAXN,WAWM;aAVA;IAAJ,KAAI;IACJ,cAAW;IACX,cAAW;MACHA,KAAAA,QAAM;IACd,OAAM;IACN,MAAK;IACL,UAAS;QACT,YAEqB,MAAA,mBAAA,EAAA,MAAA;2BADX,CAAR,WAAQ,KAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA;;aAKZ,mBAE+B,OAAA;IAD7B,OAAM;IACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,QAAA,WAAW,MAAI"}
1
+ {"version":3,"file":"ModalClientContainer.vue.script.js","names":["$attrs"],"sources":["../../../../src/v2/components/modals/ModalClientContainer.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { addScalarClassesToHeadless } from '@scalar/components/helpers'\nimport type { ModalState } from '@scalar/components/modal'\nimport { ScalarTeleportRoot } from '@scalar/components/teleport'\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap'\nimport { nextTick, onBeforeMount, onBeforeUnmount, ref, watch } from 'vue'\n\nconst props = defineProps<{ modalState: ModalState }>()\nconst emit = defineEmits<{\n (e: 'open'): void\n (e: 'close'): void\n}>()\n\nconst client = ref<HTMLElement | null>(null)\n\nconst { activate: activateFocusTrap, deactivate: deactivateFocusTrap } =\n useFocusTrap(client, {\n allowOutsideClick: true,\n fallbackFocus: () => client.value as HTMLElement,\n })\n\n// ensure scalar classes exist on headless-ui root\nonBeforeMount(() => addScalarClassesToHeadless())\n\n// manage the focus trap and emit lifecycle events\nwatch(\n () => props.modalState.open,\n async (open) => {\n if (open) {\n await nextTick()\n activateFocusTrap()\n emit('open')\n } else {\n deactivateFocusTrap()\n emit('close')\n }\n },\n { immediate: false },\n)\n\n// best-effort cleanup on unmount\nonBeforeUnmount(() => {\n deactivateFocusTrap()\n})\n</script>\n\n<template>\n <div class=\"scalar scalar-app z-overlay relative\">\n <div\n class=\"scalar-container\"\n :class=\"{ 'scalar-client--open': modalState.open }\">\n <div\n ref=\"client\"\n aria-label=\"API Client\"\n aria-modal=\"true\"\n v-bind=\"$attrs\"\n class=\"scalar-app-layout scalar-client\"\n role=\"dialog\"\n tabindex=\"-1\">\n <ScalarTeleportRoot>\n <slot />\n </ScalarTeleportRoot>\n </div>\n\n <!-- overlay / exit area -->\n <div\n class=\"scalar-app-exit\"\n @click=\"modalState.hide()\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n@reference \"@/style.css\";\n\n.scalar .scalar-app-layout {\n background: var(--scalar-background-1);\n height: calc(100% - 120px);\n max-width: 1390px;\n width: 100%;\n margin: auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n/**\n * Allow the modal to fill more space on\n * very short (or very zoomed in) screens\n */\n@variant zoomed {\n .scalar .scalar-app-layout {\n height: 100%;\n max-height: 90svh;\n }\n}\n\n.scalar .scalar-app-exit {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background: #00000038;\n cursor: pointer;\n z-index: -1;\n}\n\n.dark-mode .scalar .scalar-app-exit {\n background: rgba(0, 0, 0, 0.45);\n}\n\n.scalar .scalar-app-exit:before {\n font-family: sans-serif;\n position: absolute;\n top: 0;\n right: 12px;\n font-size: 30px;\n font-weight: 100;\n line-height: 50px;\n text-align: center;\n color: white;\n opacity: 0.6;\n}\n\n.scalar .scalar-app-exit:hover:before {\n opacity: 1;\n}\n\n/* container */\n.scalar-container {\n overflow: hidden;\n visibility: hidden;\n position: fixed;\n bottom: 0;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n pointer-events: none;\n will-change: opacity;\n transition:\n opacity 0.35s ease,\n visibility 0s linear 0.35s;\n}\n\n.scalar-container.scalar-client--open {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n transition: opacity 0.35s ease;\n}\n\n.scalar .url-form-input {\n min-height: auto !important;\n}\n\n.scalar .scalar-container {\n line-height: normal;\n}\n</style>\n"],"mappings":";;;;;;;;;;;EAOA,MAAM,QAAQ;EACd,MAAM,OAAO;EAKb,MAAM,SAAS,IAAwB,IAAI;EAE3C,MAAM,EAAE,UAAU,mBAAmB,YAAY,wBAC/C,aAAa,QAAQ;GACnB,mBAAmB;GACnB,qBAAqB,OAAO;EAC9B,CAAC;EAGH,oBAAoB,2BAA2B,CAAC;EAGhD,YACQ,MAAM,WAAW,MACvB,OAAO,SAAS;GACd,IAAI,MAAM;IACR,MAAM,SAAS;IACf,kBAAkB;IAClB,KAAK,MAAM;GACb,OAAO;IACL,oBAAoB;IACpB,KAAK,OAAO;GACd;EACF,GACA,EAAE,WAAW,MAAM,CACrB;EAGA,sBAAsB;GACpB,oBAAoB;EACtB,CAAC;;uBAIC,mBAsBM,OAtBN,YAsBM,CArBJ,mBAoBM,OAAA,EAnBJ,OAAK,eAAA,CAAC,oBAAkB,EAAA,uBACS,QAAA,WAAW,KAAI,CAAA,CAAA,EAAA,GAAA,CAChD,mBAWM,OAXN,WAWM;aAVA;IAAJ,KAAI;IACJ,cAAW;IACX,cAAW;MACHA,KAAAA,QAAM;IACd,OAAM;IACN,MAAK;IACL,UAAS;QACT,YAEqB,MAAA,kBAAA,GAAA,MAAA;2BADX,CAAR,WAAQ,KAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,IAAA,CAAA,CAAA;;aAKZ,mBAE+B,OAAA;IAD7B,OAAM;IACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,QAAA,WAAW,KAAI"}
@@ -3,7 +3,7 @@ import Resize_vue_vue_type_script_setup_true_lang_default from "./Resize.vue.scr
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  //#region src/v2/components/resize/Resize.vue
6
- var Resize_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Resize_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e2c54c18"]]);
6
+ var Resize_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Resize_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e2c54c18"]]);
7
7
  //#endregion
8
8
  export { Resize_default as default };
9
9
 
@@ -1,7 +1,7 @@
1
1
  import { createElementBlock, createElementVNode, defineComponent, normalizeStyle, openBlock, ref, renderSlot } from "vue";
2
2
  //#region src/v2/components/resize/Resize.vue?vue&type=script&setup=true&lang.ts
3
3
  var draggingClassName = "scalar-dragging";
4
- var Resize_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
4
+ var Resize_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
5
5
  __name: "Resize",
6
6
  props: { width: {} },
7
7
  emits: ["update:width"],
@@ -1 +1 @@
1
- {"version":3,"file":"Resize.vue.script.js","names":[],"sources":["../../../../src/v2/components/resize/Resize.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ref } from 'vue'\n\nconst { width } = defineProps<{\n /** Provided resizable child width */\n width: number\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:width', value: number): void\n}>()\n\ndefineSlots<{\n default?(): unknown\n}>()\n\nconst isDragging = ref(false)\n\nconst draggingClassName = 'scalar-dragging'\n\nconst startDrag = (event: MouseEvent) => {\n event.preventDefault()\n\n const startX = event.clientX\n\n /** Current sidebar width when dragging starts */\n const startWidth = width\n\n const doDrag = (dragEvent: MouseEvent) => {\n isDragging.value = true\n document.body.classList.add(draggingClassName)\n let newWidth = startWidth + dragEvent.clientX - startX\n if (newWidth > 420) {\n /** Elastic effect */\n newWidth = 420 + (newWidth - 420) * 0.2\n }\n if (newWidth < 240) {\n newWidth = 240\n }\n emit('update:width', newWidth)\n }\n\n const stopDrag = () => {\n isDragging.value = false\n document.body.classList.remove(draggingClassName)\n document.documentElement.removeEventListener('mousemove', doDrag, false)\n document.documentElement.removeEventListener('mouseup', stopDrag, false)\n /** Reset to max width if exceeded */\n if (width > 420) {\n emit('update:width', 360)\n } else if (width < 240) {\n emit('update:width', 240)\n }\n }\n\n document.documentElement.addEventListener('mousemove', doDrag, false)\n document.documentElement.addEventListener('mouseup', stopDrag, false)\n}\n</script>\n<template>\n <div\n class=\"relative\"\n :style=\"{\n width: `${width}px`,\n }\">\n <slot name=\"default\" />\n <div\n class=\"resizer\"\n @mousedown=\"startDrag\" />\n </div>\n</template>\n<style scoped>\n.resizer {\n width: 5px;\n cursor: col-resize;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n border-right: 2px solid transparent;\n transition: border-right-color 0.3s;\n z-index: 100;\n}\n</style>\n<style>\n.scalar-dragging {\n cursor: col-resize;\n}\n\n.resizer:hover,\n.scalar-dragging .resizer {\n border-right-color: var(--scalar-background-3);\n}\n\n.scalar-dragging::after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n</style>\n"],"mappings":";;AAkBA,IAAM,oBAAoB;;;;;;EAV1B,MAAM,OAAO;EAQb,MAAM,aAAa,IAAI,MAAK;EAI5B,MAAM,aAAa,UAAsB;AACvC,SAAM,gBAAe;GAErB,MAAM,SAAS,MAAM;;GAGrB,MAAM,aAAa,QAAA;GAEnB,MAAM,UAAU,cAA0B;AACxC,eAAW,QAAQ;AACnB,aAAS,KAAK,UAAU,IAAI,kBAAiB;IAC7C,IAAI,WAAW,aAAa,UAAU,UAAU;AAChD,QAAI,WAAW;;AAEb,eAAW,OAAO,WAAW,OAAO;AAEtC,QAAI,WAAW,IACb,YAAW;AAEb,SAAK,gBAAgB,SAAQ;;GAG/B,MAAM,iBAAiB;AACrB,eAAW,QAAQ;AACnB,aAAS,KAAK,UAAU,OAAO,kBAAiB;AAChD,aAAS,gBAAgB,oBAAoB,aAAa,QAAQ,MAAK;AACvE,aAAS,gBAAgB,oBAAoB,WAAW,UAAU,MAAK;;AAEvE,QAAI,QAAA,QAAQ,IACV,MAAK,gBAAgB,IAAG;aACf,QAAA,QAAQ,IACjB,MAAK,gBAAgB,IAAG;;AAI5B,YAAS,gBAAgB,iBAAiB,aAAa,QAAQ,MAAK;AACpE,YAAS,gBAAgB,iBAAiB,WAAW,UAAU,MAAK;;;uBAIpE,mBASM,OAAA;IARJ,OAAM;IACL,OAAK,eAAA,EAAA,OAAA,GAAoB,QAAA,MAAK,KAAA,CAAA;OAG/B,WAAuB,KAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,KAAA,EACvB,mBAE2B,OAAA;IADzB,OAAM;IACL,aAAW"}
1
+ {"version":3,"file":"Resize.vue.script.js","names":[],"sources":["../../../../src/v2/components/resize/Resize.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ref } from 'vue'\n\nconst { width } = defineProps<{\n /** Provided resizable child width */\n width: number\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:width', value: number): void\n}>()\n\ndefineSlots<{\n default?(): unknown\n}>()\n\nconst isDragging = ref(false)\n\nconst draggingClassName = 'scalar-dragging'\n\nconst startDrag = (event: MouseEvent) => {\n event.preventDefault()\n\n const startX = event.clientX\n\n /** Current sidebar width when dragging starts */\n const startWidth = width\n\n const doDrag = (dragEvent: MouseEvent) => {\n isDragging.value = true\n document.body.classList.add(draggingClassName)\n let newWidth = startWidth + dragEvent.clientX - startX\n if (newWidth > 420) {\n /** Elastic effect */\n newWidth = 420 + (newWidth - 420) * 0.2\n }\n if (newWidth < 240) {\n newWidth = 240\n }\n emit('update:width', newWidth)\n }\n\n const stopDrag = () => {\n isDragging.value = false\n document.body.classList.remove(draggingClassName)\n document.documentElement.removeEventListener('mousemove', doDrag, false)\n document.documentElement.removeEventListener('mouseup', stopDrag, false)\n /** Reset to max width if exceeded */\n if (width > 420) {\n emit('update:width', 360)\n } else if (width < 240) {\n emit('update:width', 240)\n }\n }\n\n document.documentElement.addEventListener('mousemove', doDrag, false)\n document.documentElement.addEventListener('mouseup', stopDrag, false)\n}\n</script>\n<template>\n <div\n class=\"relative\"\n :style=\"{\n width: `${width}px`,\n }\">\n <slot name=\"default\" />\n <div\n class=\"resizer\"\n @mousedown=\"startDrag\" />\n </div>\n</template>\n<style scoped>\n.resizer {\n width: 5px;\n cursor: col-resize;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n border-right: 2px solid transparent;\n transition: border-right-color 0.3s;\n z-index: 100;\n}\n</style>\n<style>\n.scalar-dragging {\n cursor: col-resize;\n}\n\n.resizer:hover,\n.scalar-dragging .resizer {\n border-right-color: var(--scalar-background-3);\n}\n\n.scalar-dragging::after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n</style>\n"],"mappings":";;AAkBA,IAAM,oBAAoB;;;;;;EAV1B,MAAM,OAAO;EAQb,MAAM,aAAa,IAAI,KAAK;EAI5B,MAAM,aAAa,UAAsB;GACvC,MAAM,eAAe;GAErB,MAAM,SAAS,MAAM;;GAGrB,MAAM,aAAa,QAAA;GAEnB,MAAM,UAAU,cAA0B;IACxC,WAAW,QAAQ;IACnB,SAAS,KAAK,UAAU,IAAI,iBAAiB;IAC7C,IAAI,WAAW,aAAa,UAAU,UAAU;IAChD,IAAI,WAAW;;IAEb,WAAW,OAAO,WAAW,OAAO;IAEtC,IAAI,WAAW,KACb,WAAW;IAEb,KAAK,gBAAgB,QAAQ;GAC/B;GAEA,MAAM,iBAAiB;IACrB,WAAW,QAAQ;IACnB,SAAS,KAAK,UAAU,OAAO,iBAAiB;IAChD,SAAS,gBAAgB,oBAAoB,aAAa,QAAQ,KAAK;IACvE,SAAS,gBAAgB,oBAAoB,WAAW,UAAU,KAAK;;IAEvE,IAAI,QAAA,QAAQ,KACV,KAAK,gBAAgB,GAAG;SACnB,IAAI,QAAA,QAAQ,KACjB,KAAK,gBAAgB,GAAG;GAE5B;GAEA,SAAS,gBAAgB,iBAAiB,aAAa,QAAQ,KAAK;GACpE,SAAS,gBAAgB,iBAAiB,WAAW,UAAU,KAAK;EACtE;;uBAGE,mBASM,OAAA;IARJ,OAAM;IACL,OAAK,eAAA,EAAA,OAAA,GAAoB,QAAA,MAAK,IAAA,CAAA;OAG/B,WAAuB,KAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,IAAA,GACvB,mBAE2B,OAAA;IADzB,OAAM;IACL,aAAW"}
@@ -39,7 +39,8 @@ function useSplitResize(options) {
39
39
  if (!el) return;
40
40
  startResize(event, (moveEvent) => {
41
41
  const rect = el.getBoundingClientRect();
42
- leftPaneSize.value = clamp((moveEvent.clientX - rect.left) / rect.width * 100, horizontalMin, horizontalMax);
42
+ const ratio = (moveEvent.clientX - rect.left) / rect.width * 100;
43
+ leftPaneSize.value = clamp(ratio, horizontalMin, horizontalMax);
43
44
  }, "col-resize");
44
45
  };
45
46
  const onVerticalResizeStart = (event) => {
@@ -47,7 +48,8 @@ function useSplitResize(options) {
47
48
  if (!el) return;
48
49
  startResize(event, (moveEvent) => {
49
50
  const rect = el.getBoundingClientRect();
50
- topPaneSize.value = clamp((moveEvent.clientY - rect.top) / rect.height * 100, verticalMin, verticalMax);
51
+ const ratio = (moveEvent.clientY - rect.top) / rect.height * 100;
52
+ topPaneSize.value = clamp(ratio, verticalMin, verticalMax);
51
53
  }, "row-resize");
52
54
  };
53
55
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"use-split-resize.js","names":[],"sources":["../../../../src/v2/components/resize/use-split-resize.ts"],"sourcesContent":["import type { Ref } from 'vue'\n\nconst clamp = (value: number, min: number, max: number): number => Math.min(max, Math.max(min, value))\n\ntype UseSplitResizeOptions = {\n /** Ref to the container used for horizontal resize (width + clientX). */\n horizontalContainerRef: Ref<HTMLElement | undefined>\n /** Ref to the container used for vertical resize (height + clientY). */\n verticalContainerRef: Ref<HTMLElement | undefined>\n /** Ref for the left (or first) pane width in percent (0–100). */\n leftPaneSize: Ref<number>\n /** Ref for the top pane height in percent (0–100). */\n topPaneSize: Ref<number>\n horizontalMin?: number\n horizontalMax?: number\n verticalMin?: number\n verticalMax?: number\n}\n\n/**\n * Shared pointer-based resize logic for split layouts with percentage sizes.\n * Use when you have both a horizontal split (e.g. left/right) and a vertical split (e.g. top/bottom).\n * Only one resize is active at a time; starting another stops the previous.\n */\nexport function useSplitResize(options: UseSplitResizeOptions): {\n onHorizontalResizeStart: (event: PointerEvent) => void\n onVerticalResizeStart: (event: PointerEvent) => void\n stopActiveResize: () => void\n} {\n const {\n horizontalContainerRef,\n verticalContainerRef,\n leftPaneSize,\n topPaneSize,\n horizontalMin = 20,\n horizontalMax = 80,\n verticalMin = 25,\n verticalMax = 75,\n } = options\n\n let activeResizeCleanup: (() => void) | undefined\n\n const stopActiveResize = (): void => {\n activeResizeCleanup?.()\n activeResizeCleanup = undefined\n }\n\n const startResize = (event: PointerEvent, onMove: (event: PointerEvent) => void, cursor: string): void => {\n event.preventDefault()\n stopActiveResize()\n\n const previousUserSelect = document.body.style.userSelect\n const previousCursor = document.body.style.cursor\n document.body.style.userSelect = 'none'\n document.body.style.cursor = cursor\n\n const handleMove = (moveEvent: PointerEvent): void => {\n onMove(moveEvent)\n }\n\n const handleUp = (): void => {\n stopActiveResize()\n }\n\n window.addEventListener('pointermove', handleMove)\n window.addEventListener('pointerup', handleUp, { once: true })\n\n activeResizeCleanup = () => {\n window.removeEventListener('pointermove', handleMove)\n window.removeEventListener('pointerup', handleUp)\n document.body.style.userSelect = previousUserSelect\n document.body.style.cursor = previousCursor\n }\n }\n\n const onHorizontalResizeStart = (event: PointerEvent): void => {\n const el = horizontalContainerRef.value\n if (!el) {\n return\n }\n startResize(\n event,\n (moveEvent) => {\n const rect = el.getBoundingClientRect()\n const ratio = ((moveEvent.clientX - rect.left) / rect.width) * 100\n leftPaneSize.value = clamp(ratio, horizontalMin, horizontalMax)\n },\n 'col-resize',\n )\n }\n\n const onVerticalResizeStart = (event: PointerEvent): void => {\n const el = verticalContainerRef.value\n if (!el) {\n return\n }\n startResize(\n event,\n (moveEvent) => {\n const rect = el.getBoundingClientRect()\n const ratio = ((moveEvent.clientY - rect.top) / rect.height) * 100\n topPaneSize.value = clamp(ratio, verticalMin, verticalMax)\n },\n 'row-resize',\n )\n }\n\n return {\n onHorizontalResizeStart,\n onVerticalResizeStart,\n stopActiveResize,\n }\n}\n"],"mappings":";AAEA,IAAM,SAAS,OAAe,KAAa,QAAwB,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,MAAM,CAAC;;;;;;AAsBtG,SAAgB,eAAe,SAI7B;CACA,MAAM,EACJ,wBACA,sBACA,cACA,aACA,gBAAgB,IAChB,gBAAgB,IAChB,cAAc,IACd,cAAc,OACZ;CAEJ,IAAI;CAEJ,MAAM,yBAA+B;AACnC,yBAAuB;AACvB,wBAAsB,KAAA;;CAGxB,MAAM,eAAe,OAAqB,QAAuC,WAAyB;AACxG,QAAM,gBAAgB;AACtB,oBAAkB;EAElB,MAAM,qBAAqB,SAAS,KAAK,MAAM;EAC/C,MAAM,iBAAiB,SAAS,KAAK,MAAM;AAC3C,WAAS,KAAK,MAAM,aAAa;AACjC,WAAS,KAAK,MAAM,SAAS;EAE7B,MAAM,cAAc,cAAkC;AACpD,UAAO,UAAU;;EAGnB,MAAM,iBAAuB;AAC3B,qBAAkB;;AAGpB,SAAO,iBAAiB,eAAe,WAAW;AAClD,SAAO,iBAAiB,aAAa,UAAU,EAAE,MAAM,MAAM,CAAC;AAE9D,8BAA4B;AAC1B,UAAO,oBAAoB,eAAe,WAAW;AACrD,UAAO,oBAAoB,aAAa,SAAS;AACjD,YAAS,KAAK,MAAM,aAAa;AACjC,YAAS,KAAK,MAAM,SAAS;;;CAIjC,MAAM,2BAA2B,UAA8B;EAC7D,MAAM,KAAK,uBAAuB;AAClC,MAAI,CAAC,GACH;AAEF,cACE,QACC,cAAc;GACb,MAAM,OAAO,GAAG,uBAAuB;AAEvC,gBAAa,QAAQ,OADL,UAAU,UAAU,KAAK,QAAQ,KAAK,QAAS,KAC7B,eAAe,cAAc;KAEjE,aACD;;CAGH,MAAM,yBAAyB,UAA8B;EAC3D,MAAM,KAAK,qBAAqB;AAChC,MAAI,CAAC,GACH;AAEF,cACE,QACC,cAAc;GACb,MAAM,OAAO,GAAG,uBAAuB;AAEvC,eAAY,QAAQ,OADJ,UAAU,UAAU,KAAK,OAAO,KAAK,SAAU,KAC9B,aAAa,YAAY;KAE5D,aACD;;AAGH,QAAO;EACL;EACA;EACA;EACD"}
1
+ {"version":3,"file":"use-split-resize.js","names":[],"sources":["../../../../src/v2/components/resize/use-split-resize.ts"],"sourcesContent":["import type { Ref } from 'vue'\n\nconst clamp = (value: number, min: number, max: number): number => Math.min(max, Math.max(min, value))\n\ntype UseSplitResizeOptions = {\n /** Ref to the container used for horizontal resize (width + clientX). */\n horizontalContainerRef: Ref<HTMLElement | undefined>\n /** Ref to the container used for vertical resize (height + clientY). */\n verticalContainerRef: Ref<HTMLElement | undefined>\n /** Ref for the left (or first) pane width in percent (0–100). */\n leftPaneSize: Ref<number>\n /** Ref for the top pane height in percent (0–100). */\n topPaneSize: Ref<number>\n horizontalMin?: number\n horizontalMax?: number\n verticalMin?: number\n verticalMax?: number\n}\n\n/**\n * Shared pointer-based resize logic for split layouts with percentage sizes.\n * Use when you have both a horizontal split (e.g. left/right) and a vertical split (e.g. top/bottom).\n * Only one resize is active at a time; starting another stops the previous.\n */\nexport function useSplitResize(options: UseSplitResizeOptions): {\n onHorizontalResizeStart: (event: PointerEvent) => void\n onVerticalResizeStart: (event: PointerEvent) => void\n stopActiveResize: () => void\n} {\n const {\n horizontalContainerRef,\n verticalContainerRef,\n leftPaneSize,\n topPaneSize,\n horizontalMin = 20,\n horizontalMax = 80,\n verticalMin = 25,\n verticalMax = 75,\n } = options\n\n let activeResizeCleanup: (() => void) | undefined\n\n const stopActiveResize = (): void => {\n activeResizeCleanup?.()\n activeResizeCleanup = undefined\n }\n\n const startResize = (event: PointerEvent, onMove: (event: PointerEvent) => void, cursor: string): void => {\n event.preventDefault()\n stopActiveResize()\n\n const previousUserSelect = document.body.style.userSelect\n const previousCursor = document.body.style.cursor\n document.body.style.userSelect = 'none'\n document.body.style.cursor = cursor\n\n const handleMove = (moveEvent: PointerEvent): void => {\n onMove(moveEvent)\n }\n\n const handleUp = (): void => {\n stopActiveResize()\n }\n\n window.addEventListener('pointermove', handleMove)\n window.addEventListener('pointerup', handleUp, { once: true })\n\n activeResizeCleanup = () => {\n window.removeEventListener('pointermove', handleMove)\n window.removeEventListener('pointerup', handleUp)\n document.body.style.userSelect = previousUserSelect\n document.body.style.cursor = previousCursor\n }\n }\n\n const onHorizontalResizeStart = (event: PointerEvent): void => {\n const el = horizontalContainerRef.value\n if (!el) {\n return\n }\n startResize(\n event,\n (moveEvent) => {\n const rect = el.getBoundingClientRect()\n const ratio = ((moveEvent.clientX - rect.left) / rect.width) * 100\n leftPaneSize.value = clamp(ratio, horizontalMin, horizontalMax)\n },\n 'col-resize',\n )\n }\n\n const onVerticalResizeStart = (event: PointerEvent): void => {\n const el = verticalContainerRef.value\n if (!el) {\n return\n }\n startResize(\n event,\n (moveEvent) => {\n const rect = el.getBoundingClientRect()\n const ratio = ((moveEvent.clientY - rect.top) / rect.height) * 100\n topPaneSize.value = clamp(ratio, verticalMin, verticalMax)\n },\n 'row-resize',\n )\n }\n\n return {\n onHorizontalResizeStart,\n onVerticalResizeStart,\n stopActiveResize,\n }\n}\n"],"mappings":";AAEA,IAAM,SAAS,OAAe,KAAa,QAAwB,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;;;;;;AAsBrG,SAAgB,eAAe,SAI7B;CACA,MAAM,EACJ,wBACA,sBACA,cACA,aACA,gBAAgB,IAChB,gBAAgB,IAChB,cAAc,IACd,cAAc,OACZ;CAEJ,IAAI;CAEJ,MAAM,yBAA+B;EACnC,sBAAsB;EACtB,sBAAsB,KAAA;CACxB;CAEA,MAAM,eAAe,OAAqB,QAAuC,WAAyB;EACxG,MAAM,eAAe;EACrB,iBAAiB;EAEjB,MAAM,qBAAqB,SAAS,KAAK,MAAM;EAC/C,MAAM,iBAAiB,SAAS,KAAK,MAAM;EAC3C,SAAS,KAAK,MAAM,aAAa;EACjC,SAAS,KAAK,MAAM,SAAS;EAE7B,MAAM,cAAc,cAAkC;GACpD,OAAO,SAAS;EAClB;EAEA,MAAM,iBAAuB;GAC3B,iBAAiB;EACnB;EAEA,OAAO,iBAAiB,eAAe,UAAU;EACjD,OAAO,iBAAiB,aAAa,UAAU,EAAE,MAAM,KAAK,CAAC;EAE7D,4BAA4B;GAC1B,OAAO,oBAAoB,eAAe,UAAU;GACpD,OAAO,oBAAoB,aAAa,QAAQ;GAChD,SAAS,KAAK,MAAM,aAAa;GACjC,SAAS,KAAK,MAAM,SAAS;EAC/B;CACF;CAEA,MAAM,2BAA2B,UAA8B;EAC7D,MAAM,KAAK,uBAAuB;EAClC,IAAI,CAAC,IACH;EAEF,YACE,QACC,cAAc;GACb,MAAM,OAAO,GAAG,sBAAsB;GACtC,MAAM,SAAU,UAAU,UAAU,KAAK,QAAQ,KAAK,QAAS;GAC/D,aAAa,QAAQ,MAAM,OAAO,eAAe,aAAa;EAChE,GACA,YACF;CACF;CAEA,MAAM,yBAAyB,UAA8B;EAC3D,MAAM,KAAK,qBAAqB;EAChC,IAAI,CAAC,IACH;EAEF,YACE,QACC,cAAc;GACb,MAAM,OAAO,GAAG,sBAAsB;GACtC,MAAM,SAAU,UAAU,UAAU,KAAK,OAAO,KAAK,SAAU;GAC/D,YAAY,QAAQ,MAAM,OAAO,aAAa,WAAW;EAC3D,GACA,YACF;CACF;CAEA,OAAO;EACL;EACA;EACA;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ServerDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EAEV,UAAU,EACX,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKrD;;;GAGG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAMzC,MAAM,MAAM,mBAAmB,GAAG;IAChC,0CAA0C;IAC1C,IAAI,EAAE,UAAU,CAAA;IAChB,0EAA0E;IAC1E,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;IACd,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;CACrB,CAAA;AACD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;kFAgSd,CAAC"}
1
+ {"version":3,"file":"ServerDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EAEV,UAAU,EACX,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKrD;;;GAGG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAMzC,MAAM,MAAM,mBAAmB,GAAG;IAChC,0CAA0C;IAC1C,IAAI,EAAE,UAAU,CAAA;IAChB,0EAA0E;IAC1E,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;IACd,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;CACrB,CAAA;AACD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;kFAoSd,CAAC"}
@@ -8,7 +8,7 @@ import { ScalarFloatingBackdrop } from "@scalar/components/floating";
8
8
  //#region src/v2/components/server/ServerDropdown.vue?vue&type=script&setup=true&lang.ts
9
9
  var _hoisted_1 = ["onClick"];
10
10
  var _hoisted_2 = { class: "flex items-center justify-center" };
11
- var ServerDropdown_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
11
+ var ServerDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
12
12
  name: "ServerDropdown",
13
13
  props: {
14
14
  meta: {},
@@ -1 +1 @@
1
- {"version":3,"file":"ServerDropdown.vue.script.js","names":[],"sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ServerDropdown component\n * This component is used to display the server dropdown for the operation block\n */\nexport default {\n name: 'ServerDropdown',\n}\n\nexport type ServerDropdownProps = {\n /** The meta information for the server */\n meta: ServerMeta\n /** List of servers that are available for the operation/document level */\n servers: ServerObject[]\n /** Currently selected server */\n server: ServerObject | null\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** Client layout */\n layout: ClientLayout\n}\n</script>\n<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarFloatingBackdrop } from '@scalar/components/floating'\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconPencilSimple, ScalarIconPlus } from '@scalar/icons'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n} from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, server, servers, meta } = defineProps<ServerDropdownProps>()\n\nconst emit = defineEmits<{\n /** Update a server variable for the selected server */\n (\n e: 'update:selectedServer',\n payload: ApiReferenceEvents['server:update:selected'],\n ): void\n (\n e: 'update:variable',\n payload: ApiReferenceEvents['server:update:variables'],\n ): void\n (e: 'update:servers'): void\n /** Update the open state of the server dropdown */\n (e: 'update:open', value: boolean): void\n}>()\n\nconst requestServerOptions = computed(() =>\n servers.map((s) => ({\n id: s.url,\n label: s.url ?? 'Unknown server',\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n</script>\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"hover:bg-b-2 font-code text-c-2 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap @3xl:ml-0.75\"\n variant=\"ghost\">\n <template v-if=\"server\">\n <span class=\"sr-only\">Server:</span>\n {{ serverUrlWithoutTrailingSlash }}\n </template>\n <template v-else>\n <span class=\"sr-only\">Add Server</span>\n <ScalarIconPlus class=\"size-3\" />\n </template>\n </ScalarButton>\n\n <template #popover=\"{ close }\">\n <div\n class=\"custom-scroll flex max-h-[inherit] flex-col gap-1 p-1\"\n @click=\"close\">\n <!-- Request -->\n <ServerDropdownItem\n v-for=\"(serverOption, index) in requestServerOptions\"\n :key=\"serverOption.id\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"request\"\n @update:selectedServer=\"\n emit('update:selectedServer', { url: serverOption.id, meta })\n \"\n @update:variable=\"\n (key, value) => emit('update:variable', { index, key, value, meta })\n \" />\n\n <!-- Add Server -->\n <template v-if=\"layout !== 'modal'\">\n <button\n class=\"text-xxs hover:bg-b-2 flex cursor-pointer items-center gap-1.5 rounded p-1.75\"\n type=\"button\"\n @click=\"emit('update:servers')\">\n <div class=\"flex items-center justify-center\">\n <ScalarIconPencilSimple class=\"size-4\" />\n </div>\n <span>Update Servers</span>\n </button>\n </template>\n </div>\n </template>\n <template #backdrop=\"{ open }\">\n <!-- Emit the slot value back out the parent -->\n <ValueEmitter\n :value=\"open\"\n @change=\"(value) => emit('update:open', value)\"\n @unmount=\"emit('update:open', false)\" />\n\n <ScalarFloatingBackdrop class=\"inset-x-px rounded-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AAA,CAAA,EAAA,GAAA,WAAA,CAAA,CAAA;IAKjB,UAAQ,SAKyB,EALrB,WAAI,CAEzB,YAG0C,sBAAA;KAFvC,OAAO;KACP,UAAM,OAAA,OAAA,OAAA,MAAG,UAAU,KAAI,eAAgB,MAAK;KAC5C,WAAO,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,eAAA,MAAA;4BAEhB,YAAuE,MAAA,uBAAA,EAAA,EAA/C,OAAM,wCAAsC,CAAA,CAAA,CAAA;2BAzCvD,CAXf,YAWe,MAAA,aAAA,EAAA;KAVb,OAAM;KACN,SAAQ;;4BAIG,CAHK,QAAA,UAAA,WAAA,EAAhB,mBAGW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAoC,QAAA,EAA9B,OAAM,WAAS,EAAC,WAAO,GAAA,GAAA,gBAAO,MACpC,gBAAG,8BAAA,MAA6B,EAAA,EAAA,CAAA,EAAA,GAAA,KAAA,WAAA,EAElC,mBAGW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAuC,QAAA,EAAjC,OAAM,WAAS,EAAC,cAAU,GAAA,GAChC,YAAiC,MAAA,eAAA,EAAA,EAAjB,OAAM,UAAQ,CAAA,CAAA,EAAA,GAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"ServerDropdown.vue.script.js","names":[],"sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ServerDropdown component\n * This component is used to display the server dropdown for the operation block\n */\nexport default {\n name: 'ServerDropdown',\n}\n\nexport type ServerDropdownProps = {\n /** The meta information for the server */\n meta: ServerMeta\n /** List of servers that are available for the operation/document level */\n servers: ServerObject[]\n /** Currently selected server */\n server: ServerObject | null\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** Client layout */\n layout: ClientLayout\n}\n</script>\n<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarFloatingBackdrop } from '@scalar/components/floating'\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconPencilSimple, ScalarIconPlus } from '@scalar/icons'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n} from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, server, servers, meta } = defineProps<ServerDropdownProps>()\n\nconst emit = defineEmits<{\n /** Update a server variable for the selected server */\n (\n e: 'update:selectedServer',\n payload: ApiReferenceEvents['server:update:selected'],\n ): void\n (\n e: 'update:variable',\n payload: ApiReferenceEvents['server:update:variables'],\n ): void\n (e: 'update:servers'): void\n /** Update the open state of the server dropdown */\n (e: 'update:open', value: boolean): void\n}>()\n\nconst requestServerOptions = computed(() =>\n servers.map((s) => ({\n id: s.url,\n label: s.url ?? 'Unknown server',\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n</script>\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"hover:bg-b-2 font-code text-c-2 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap @3xl:ml-0.75\"\n variant=\"ghost\">\n <template v-if=\"server\">\n <span class=\"sr-only\">Server:</span>\n {{ serverUrlWithoutTrailingSlash }}\n </template>\n <template v-else>\n <span class=\"sr-only\">Add Server</span>\n <ScalarIconPlus class=\"size-3\" />\n </template>\n </ScalarButton>\n\n <template #popover=\"{ close }\">\n <div\n class=\"custom-scroll flex max-h-[inherit] flex-col gap-1 p-1\"\n @click=\"close\">\n <!-- Request -->\n <ServerDropdownItem\n v-for=\"(serverOption, index) in requestServerOptions\"\n :key=\"serverOption.id\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"request\"\n @update:selectedServer=\"\n emit('update:selectedServer', { url: serverOption.id, meta })\n \"\n @update:variable=\"\n (key, value) => emit('update:variable', { index, key, value, meta })\n \" />\n\n <!-- Add Server -->\n <template v-if=\"layout !== 'modal'\">\n <button\n class=\"text-xxs hover:bg-b-2 flex cursor-pointer items-center gap-1.5 rounded p-1.75\"\n type=\"button\"\n @click=\"emit('update:servers')\">\n <div class=\"flex items-center justify-center\">\n <ScalarIconPencilSimple class=\"size-4\" />\n </div>\n <span>Update Servers</span>\n </button>\n </template>\n </div>\n </template>\n <template #backdrop=\"{ open }\">\n <!-- Emit the slot value back out the parent -->\n <ValueEmitter\n :value=\"open\"\n @change=\"(value) => emit('update:open', value)\"\n @unmount=\"emit('update:open', false)\" />\n\n <ScalarFloatingBackdrop class=\"inset-x-px rounded-none rounded-b-lg\" />\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;CAME,MAAM;;;;;;;;;;;;;;;EAmCR,MAAM,OAAO;EAeb,MAAM,uBAAuB,eAC3B,QAAA,QAAQ,KAAK,OAAO;GAClB,IAAI,EAAE;GACN,OAAO,EAAE,OAAO;EAClB,EAAE,CACJ;EAEA,MAAM,gCAAgC,eAAe;GACnD,IAAI,QAAA,QAAQ,KAAK,SAAS,GAAG,GAC3B,OAAO,QAAA,OAAO,IAAI,MAAM,GAAG,EAAE;GAE/B,OAAO,QAAA,QAAQ,OAAO;EACxB,CAAC;;uBAGC,YA8DgB,MAAA,aAAA,GAAA;IA7Dd,OAAM;IACN,OAAA;IACC,QAAQ;IACT,WAAU;IACV,QAAA;IACC,QAAQ,QAAA;IACR,UAAQ,IAAM,QAAA;;IAcJ,SAAO,SA8BV,EA9Bc,YAAK,CACzB,mBA6BM,OAAA;KA5BJ,OAAM;KACL,SAAO;0BAER,m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,UAAA,GAElC,mBAGW,UAAA,EAAA,KAAA,EAAA,GAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAuC,QAAA,EAAjC,OAAM,UAAS,GAAC,cAAU,EAAA,IAChC,YAAiC,MAAA,cAAA,GAAA,EAAjB,OAAM,SAAQ,CAAA,CAAA,GAAA,EAAA,EAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ServerDropdownItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/server/ServerDropdownItem.vue"],"names":[],"mappings":"AAoFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,YAAY,EAAE;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAC;AAyJF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ServerDropdownItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/server/ServerDropdownItem.vue"],"names":[],"mappings":"AAoFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,YAAY,EAAE;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAC;AA0JF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import ServerDropdownItem_vue_vue_type_script_setup_true_lang_default from "./ServerDropdownItem.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/v2/components/server/ServerDropdownItem.vue
5
- var ServerDropdownItem_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ServerDropdownItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-649f9a0d"]]);
5
+ var ServerDropdownItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ServerDropdownItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-649f9a0d"]]);
6
6
  //#endregion
7
7
  export { ServerDropdownItem_default as default };
8
8
 
@@ -8,7 +8,7 @@ var _hoisted_2 = { class: "overflow-hidden text-ellipsis whitespace-nowrap" };
8
8
  var _hoisted_3 = ["id"];
9
9
  var _hoisted_4 = { key: 0 };
10
10
  var _hoisted_5 = { class: "description text-c-3 px-3 py-1.5" };
11
- var ServerDropdownItem_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
11
+ var ServerDropdownItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
12
12
  __name: "ServerDropdownItem",
13
13
  props: {
14
14
  server: {},
@@ -1 +1 @@
1
- {"version":3,"file":"ServerDropdownItem.vue.script.js","names":[],"sources":["../../../../src/v2/components/server/ServerDropdownItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListboxCheckbox } from '@scalar/components/listbox'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, useId } from 'vue'\n\nimport ServerVariablesForm from '@/components/Server/ServerVariablesForm.vue'\n\nconst { server, serverOption } = defineProps<{\n server: ServerObject | null\n serverOption: {\n id: string\n label: string\n }\n}>()\n\nconst emit = defineEmits<{\n /** Update a server variable for the selected server */\n (e: 'update:variable', key: string, value: string): void\n /** Update selected server */\n (e: 'update:selectedServer'): void\n}>()\n\nconst formId = useId()\n\nconst hasVariables = () => {\n return Object.keys(server?.variables ?? {}).length > 0\n}\n\nconst isSelectedServer = computed(() => serverOption.id === server?.url)\nconst isExpanded = computed(() => isSelectedServer.value && hasVariables())\n</script>\n<template>\n <div\n class=\"group/item flex min-h-fit flex-col rounded border\"\n :class=\"{ 'border-transparent': !isSelectedServer }\">\n <button\n v-bind=\"isExpanded ? { 'aria-controls': formId } : {}\"\n :aria-expanded=\"isExpanded\"\n class=\"flex min-h-8 cursor-pointer items-center gap-1.5 rounded px-1.5\"\n :class=\"isSelectedServer ? 'text-c-1 bg-b-2' : 'hover:bg-b-2'\"\n type=\"button\"\n @click=\"emit('update:selectedServer')\">\n <ScalarListboxCheckbox :selected=\"isSelectedServer\" />\n <span class=\"overflow-hidden text-ellipsis whitespace-nowrap\">\n {{ serverOption.label }}\n </span>\n </button>\n <!-- Server variables -->\n <div\n v-if=\"isExpanded\"\n :id=\"formId\"\n class=\"bg-b-2 divide divide-y rounded-b border-t *:pl-4\"\n @click.stop>\n <ServerVariablesForm\n :variables=\"server?.variables\"\n @update:variable=\"\n (key, value) => emit('update:variable', key, value)\n \" />\n <!-- Description -->\n <div v-if=\"server?.description\">\n <div class=\"description text-c-3 px-3 py-1.5\">\n <ScalarMarkdown :value=\"server.description\" />\n </div>\n </div>\n </div>\n </div>\n</template>\n<style scoped>\n.description :deep(.markdown) {\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color--1);\n padding: 0 0;\n display: block;\n}\n.description :deep(.markdown > *:first-child) {\n margin-top: 0;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAgBA,MAAM,OAAO;EAOb,MAAM,SAAS,OAAM;EAErB,MAAM,qBAAqB;AACzB,UAAO,OAAO,KAAK,QAAA,QAAQ,aAAa,EAAE,CAAC,CAAC,SAAS;;EAGvD,MAAM,mBAAmB,eAAe,QAAA,aAAa,OAAO,QAAA,QAAQ,IAAG;EACvE,MAAM,aAAa,eAAe,iBAAiB,SAAS,cAAc,CAAA;;uBAGxE,mBAiCM,OAAA,EAhCJ,OAAK,eAAA,CAAC,qDAAmD,EAAA,sBAAA,CACxB,iBAAA,OAAgB,CAAA,CAAA,EAAA,EAAA,CACjD,mBAWS,UAXT,WACU,WAUD,QAVW,EAAA,iBAAsB,MAAA,OAAM,EAAA,GAAA,EAAA,EAAA;IAC7C,iBAAe,WAAA;IAChB,OAAK,CAAC,mEACE,iBAAA,QAAgB,oBAAA,eAAA;IACxB,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,wBAAA;QACZ,YAAsD,MAAA,sBAAA,EAAA,EAA9B,UAAU,iBAAA,OAAgB,EAAA,MAAA,GAAA,CAAA,WAAA,CAAA,EAClD,mBAEO,QAFP,YAEO,gBADF,QAAA,aAAa,MAAK,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA,EAKjB,WAAA,SAAA,WAAA,EADR,mBAgBM,OAAA;;IAdH,IAAI,MAAA,OAAM;IACX,OAAM;IACL,SAAK,OAAA,OAAA,OAAA,KAAA,oBAAN,IAAW,CAAA,OAAA,CAAA;OACX,YAIM,6BAAA;IAHH,WAAW,QAAA,QAAQ;IACnB,qBAAe,OAAA,OAAA,OAAA,MAAc,KAAK,UAAU,KAAI,mBAAoB,KAAK,MAAK;+BAItE,QAAA,QAAQ,eAAA,WAAA,EAAnB,mBAIM,OAAA,YAAA,CAHJ,mBAEM,OAFN,YAEM,CADJ,YAA8C,MAAA,eAAA,EAAA,EAA7B,OAAO,QAAA,OAAO,aAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,GAAA,WAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA"}
1
+ {"version":3,"file":"ServerDropdownItem.vue.script.js","names":[],"sources":["../../../../src/v2/components/server/ServerDropdownItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListboxCheckbox } from '@scalar/components/listbox'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, useId } from 'vue'\n\nimport ServerVariablesForm from '@/components/Server/ServerVariablesForm.vue'\n\nconst { server, serverOption } = defineProps<{\n server: ServerObject | null\n serverOption: {\n id: string\n label: string\n }\n}>()\n\nconst emit = defineEmits<{\n /** Update a server variable for the selected server */\n (e: 'update:variable', key: string, value: string): void\n /** Update selected server */\n (e: 'update:selectedServer'): void\n}>()\n\nconst formId = useId()\n\nconst hasVariables = () => {\n return Object.keys(server?.variables ?? {}).length > 0\n}\n\nconst isSelectedServer = computed(() => serverOption.id === server?.url)\nconst isExpanded = computed(() => isSelectedServer.value && hasVariables())\n</script>\n<template>\n <div\n class=\"group/item flex min-h-fit flex-col rounded border\"\n :class=\"{ 'border-transparent': !isSelectedServer }\">\n <button\n v-bind=\"isExpanded ? { 'aria-controls': formId } : {}\"\n :aria-expanded=\"isExpanded\"\n class=\"flex min-h-8 cursor-pointer items-center gap-1.5 rounded px-1.5\"\n :class=\"isSelectedServer ? 'text-c-1 bg-b-2' : 'hover:bg-b-2'\"\n type=\"button\"\n @click=\"emit('update:selectedServer')\">\n <ScalarListboxCheckbox :selected=\"isSelectedServer\" />\n <span class=\"overflow-hidden text-ellipsis whitespace-nowrap\">\n {{ serverOption.label }}\n </span>\n </button>\n <!-- Server variables -->\n <div\n v-if=\"isExpanded\"\n :id=\"formId\"\n class=\"bg-b-2 divide divide-y rounded-b border-t *:pl-4\"\n @click.stop>\n <ServerVariablesForm\n :variables=\"server?.variables\"\n @update:variable=\"\n (key, value) => emit('update:variable', key, value)\n \" />\n <!-- Description -->\n <div v-if=\"server?.description\">\n <div class=\"description text-c-3 px-3 py-1.5\">\n <ScalarMarkdown :value=\"server.description\" />\n </div>\n </div>\n </div>\n </div>\n</template>\n<style scoped>\n.description :deep(.markdown) {\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color--1);\n padding: 0 0;\n display: block;\n}\n.description :deep(.markdown > *:first-child) {\n margin-top: 0;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAgBA,MAAM,OAAO;EAOb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e,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -9,9 +9,9 @@ import { ScalarSidebarSearchInput } from "@scalar/components/sidebar";
9
9
  import { ScalarSidebar } from "@scalar/sidebar";
10
10
  //#region src/v2/components/sidebar/Sidebar.vue?vue&type=script&setup=true&lang.ts
11
11
  var _hoisted_1 = { key: 1 };
12
- var Sidebar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
12
+ var Sidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
13
13
  __name: "Sidebar",
14
- props: /* @__PURE__ */ mergeModels({
14
+ props: /*@__PURE__*/ mergeModels({
15
15
  sidebarState: {},
16
16
  layout: {},
17
17
  activeWorkspace: {},
@@ -25,7 +25,7 @@ var Sidebar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
25
25
  },
26
26
  "sidebarWidthModifiers": {}
27
27
  }),
28
- emits: /* @__PURE__ */ mergeModels([
28
+ emits: /*@__PURE__*/ mergeModels([
29
29
  "selectItem",
30
30
  "select:workspace",
31
31
  "create:workspace",