@scalar/api-client 3.14.0 → 3.15.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 (349) hide show
  1. package/CHANGELOG.md +23 -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 +296 -273
  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 +4 -2
  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/response-cache.js.map +1 -1
  60. package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
  61. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js.map +1 -1
  62. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  63. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  64. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  65. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +58 -29
  66. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  67. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  68. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  69. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +1 -1
  70. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
  71. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -1
  72. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js +1 -1
  73. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js.map +1 -1
  74. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.d.ts.map +1 -1
  75. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js +1 -1
  76. package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js.map +1 -1
  77. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js +1 -1
  78. package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js.map +1 -1
  79. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  80. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +1 -1
  81. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
  82. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -0
  83. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  84. package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
  85. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js +5 -3
  86. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +1 -1
  87. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
  88. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  89. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  90. package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
  91. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js +6 -3
  92. package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +1 -1
  93. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +8 -0
  94. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  95. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  96. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +29 -16
  97. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
  98. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +1 -1
  99. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -1
  100. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js.map +1 -1
  101. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +1 -1
  102. package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -1
  103. package/dist/v2/blocks/request-block/helpers/files.js.map +1 -1
  104. package/dist/v2/blocks/request-block/helpers/fold-structured-body-rows.js.map +1 -1
  105. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +10 -5
  106. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
  107. package/dist/v2/blocks/request-block/helpers/get-parameter-content.js.map +1 -1
  108. package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js.map +1 -1
  109. package/dist/v2/blocks/request-block/helpers/get-structured-body-rows.js.map +1 -1
  110. package/dist/v2/blocks/request-block/helpers/group-by.js.map +1 -1
  111. package/dist/v2/blocks/request-block/helpers/group-global-cookies.d.ts +54 -0
  112. package/dist/v2/blocks/request-block/helpers/group-global-cookies.d.ts.map +1 -0
  113. package/dist/v2/blocks/request-block/helpers/group-global-cookies.js +56 -0
  114. package/dist/v2/blocks/request-block/helpers/group-global-cookies.js.map +1 -0
  115. package/dist/v2/blocks/request-block/helpers/structured-body-codec.js +1 -1
  116. package/dist/v2/blocks/request-block/helpers/structured-body-codec.js.map +1 -1
  117. package/dist/v2/blocks/request-block/helpers/validate-parameter.js.map +1 -1
  118. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  119. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  120. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +1 -1
  121. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
  122. package/dist/v2/blocks/response-block/components/Headers.vue.script.js +1 -1
  123. package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +1 -1
  124. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +1 -1
  125. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +1 -1
  126. package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +1 -1
  127. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +1 -1
  128. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -1
  129. package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js +1 -1
  130. package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js.map +1 -1
  131. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
  132. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +1 -1
  133. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
  134. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +1 -1
  135. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js +1 -1
  136. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js.map +1 -1
  137. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
  138. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js +1 -1
  139. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +1 -1
  140. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js +1 -1
  141. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js.map +1 -1
  142. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +1 -1
  143. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -1
  144. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +1 -1
  145. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -1
  146. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  147. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +1 -1
  148. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
  149. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  150. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +1 -1
  151. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +1 -1
  152. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -1
  153. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js +1 -1
  154. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +1 -1
  155. package/dist/v2/blocks/response-block/helpers/extract-filename.js.map +1 -1
  156. package/dist/v2/blocks/response-block/helpers/get-content-length.js.map +1 -1
  157. package/dist/v2/blocks/response-block/helpers/media-types.js.map +1 -1
  158. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js.map +1 -1
  159. package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.js.map +1 -1
  160. package/dist/v2/blocks/response-block/helpers/process-response-body.js.map +1 -1
  161. package/dist/v2/blocks/response-block/helpers/resolve-response-body-handler.js.map +1 -1
  162. package/dist/v2/blocks/response-block/helpers/resolve-response-content-type.js +7 -1
  163. package/dist/v2/blocks/response-block/helpers/resolve-response-content-type.js.map +1 -1
  164. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  165. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  166. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +1 -1
  167. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  168. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
  169. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
  170. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +1 -1
  171. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
  172. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
  173. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js +1 -1
  174. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +1 -1
  175. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +3 -1
  176. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js.map +1 -1
  177. package/dist/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path.js.map +1 -1
  178. package/dist/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target.js.map +1 -1
  179. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js.map +1 -1
  180. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-path-masking.js.map +1 -1
  181. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  182. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +1 -1
  183. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  184. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -1
  185. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js +1 -1
  186. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +1 -1
  187. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  188. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +1 -1
  189. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  190. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
  191. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +1 -1
  192. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -1
  193. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  194. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +1 -1
  195. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
  196. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -1
  197. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +1 -1
  198. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -1
  199. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  200. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +1 -1
  201. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
  202. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  203. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js +3 -3
  204. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js.map +1 -1
  205. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  206. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +1 -1
  207. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
  208. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js.map +1 -1
  209. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +5 -0
  210. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map +1 -1
  211. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-callback.js +1 -1
  212. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-callback.js.map +1 -1
  213. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +2 -2
  214. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
  215. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js.map +1 -1
  216. package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.js.map +1 -1
  217. package/dist/v2/blocks/scalar-auth-selector-block/helpers/run-oauth2-authorize.js.map +1 -1
  218. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js.map +1 -1
  219. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  220. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  221. package/dist/v2/components/code-input/CodeInput.vue.script.js +6 -1
  222. package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
  223. package/dist/v2/components/code-input/CodeInputLite.vue.d.ts.map +1 -1
  224. package/dist/v2/components/code-input/CodeInputLite.vue.js +1 -1
  225. package/dist/v2/components/code-input/CodeInputLite.vue.script.js +5 -1
  226. package/dist/v2/components/code-input/CodeInputLite.vue.script.js.map +1 -1
  227. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js +1 -1
  228. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +1 -1
  229. package/dist/v2/components/code-input/code-variable-widget.js +1 -0
  230. package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
  231. package/dist/v2/components/code-input/helpers/build-pill-context.js.map +1 -1
  232. package/dist/v2/components/code-input/helpers/lookup-variable-value.js.map +1 -1
  233. package/dist/v2/components/code-input/helpers/pill-signature.js.map +1 -1
  234. package/dist/v2/components/code-input/helpers/serialize-value.js.map +1 -1
  235. package/dist/v2/components/context-menu/ContextMenu.vue.script.js +1 -1
  236. package/dist/v2/components/context-menu/ContextMenu.vue.script.js.map +1 -1
  237. package/dist/v2/components/data-table/DataTable.vue.script.js +1 -1
  238. package/dist/v2/components/data-table/DataTable.vue.script.js.map +1 -1
  239. package/dist/v2/components/data-table/DataTableCell.vue.script.js +1 -1
  240. package/dist/v2/components/data-table/DataTableCell.vue.script.js.map +1 -1
  241. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js +1 -1
  242. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +1 -1
  243. package/dist/v2/components/data-table/DataTableHeader.vue.script.js +1 -1
  244. package/dist/v2/components/data-table/DataTableHeader.vue.script.js.map +1 -1
  245. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  246. package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
  247. package/dist/v2/components/data-table/DataTableInput.vue.script.js +1 -1
  248. package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
  249. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
  250. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js +3 -2
  251. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +1 -1
  252. package/dist/v2/components/data-table/DataTableRow.vue.js +1 -1
  253. package/dist/v2/components/data-table/DataTableRow.vue.js.map +1 -1
  254. package/dist/v2/components/data-table/DataTableText.vue.script.js +1 -1
  255. package/dist/v2/components/data-table/DataTableText.vue.script.js.map +1 -1
  256. package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -1
  257. package/dist/v2/components/forms/ConfirmationForm.vue.script.js +1 -1
  258. package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +1 -1
  259. package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -1
  260. package/dist/v2/components/layout/CollapsibleSection.vue.script.js +1 -1
  261. package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
  262. package/dist/v2/components/layout/ValueEmitter.vue.d.ts +1 -1
  263. package/dist/v2/components/layout/ValueEmitter.vue.d.ts.map +1 -1
  264. package/dist/v2/components/layout/ValueEmitter.vue.script.js +1 -1
  265. package/dist/v2/components/layout/ValueEmitter.vue.script.js.map +1 -1
  266. package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -1
  267. package/dist/v2/components/modals/DeleteModal.vue.script.js +1 -1
  268. package/dist/v2/components/modals/DeleteModal.vue.script.js.map +1 -1
  269. package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
  270. package/dist/v2/components/modals/ModalClientContainer.vue.script.js +1 -1
  271. package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +1 -1
  272. package/dist/v2/components/resize/Resize.vue.js +1 -1
  273. package/dist/v2/components/resize/Resize.vue.script.js +1 -1
  274. package/dist/v2/components/resize/Resize.vue.script.js.map +1 -1
  275. package/dist/v2/components/resize/use-split-resize.js +4 -2
  276. package/dist/v2/components/resize/use-split-resize.js.map +1 -1
  277. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  278. package/dist/v2/components/server/ServerDropdown.vue.script.js +1 -1
  279. package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
  280. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
  281. package/dist/v2/components/server/ServerDropdownItem.vue.js +1 -1
  282. package/dist/v2/components/server/ServerDropdownItem.vue.script.js +1 -1
  283. package/dist/v2/components/server/ServerDropdownItem.vue.script.js.map +1 -1
  284. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  285. package/dist/v2/components/sidebar/Sidebar.vue.script.js +3 -3
  286. package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
  287. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  288. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js +1 -1
  289. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +1 -1
  290. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js +1 -1
  291. package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +1 -1
  292. package/dist/v2/constants.js +1 -1
  293. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js +1 -1
  294. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +1 -1
  295. package/dist/v2/features/command-palette/components/CommandActionInput.vue.script.js +1 -1
  296. package/dist/v2/features/command-palette/components/CommandActionInput.vue.script.js.map +1 -1
  297. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
  298. package/dist/v2/features/environments/EnvironmentsList.vue.script.js +1 -1
  299. package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +1 -1
  300. package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
  301. package/dist/v2/features/environments/components/Environment.vue.script.js +1 -1
  302. package/dist/v2/features/environments/components/Environment.vue.script.js.map +1 -1
  303. package/dist/v2/features/environments/components/EnvironmentColors.vue.script.js +3 -2
  304. package/dist/v2/features/environments/components/EnvironmentColors.vue.script.js.map +1 -1
  305. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
  306. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +1 -1
  307. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -1
  308. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
  309. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js +1 -1
  310. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +1 -1
  311. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  312. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +1 -1
  313. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
  314. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
  315. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +1 -1
  316. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js +1 -1
  317. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +1 -1
  318. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  319. package/dist/v2/features/modal/Modal.vue.script.js +1 -1
  320. package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
  321. package/dist/v2/features/modal/helpers/create-api-client-modal.js +11 -0
  322. package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
  323. package/dist/v2/features/modal/helpers/map-hidden-clients-config.js.map +1 -1
  324. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +1 -1
  325. package/dist/v2/features/modal/helpers/resolve-route-parameters.js.map +1 -1
  326. package/dist/v2/features/modal/hooks/use-modal-sidebar.js.map +1 -1
  327. package/dist/v2/features/modal/modal-events.js.map +1 -1
  328. package/dist/v2/features/operation/Operation.vue.script.js +1 -1
  329. package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
  330. package/dist/v2/features/search/components/DocumentSearchModal.vue.d.ts.map +1 -1
  331. package/dist/v2/features/search/components/DocumentSearchModal.vue.js +1 -1
  332. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js +1 -1
  333. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js.map +1 -1
  334. package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
  335. package/dist/v2/features/search/components/SearchResult.vue.script.js +1 -1
  336. package/dist/v2/features/search/components/SearchResult.vue.script.js.map +1 -1
  337. package/dist/v2/features/search/helpers/create-fuse-instance.js.map +1 -1
  338. package/dist/v2/features/search/helpers/create-search-index.js.map +1 -1
  339. package/dist/v2/features/search/hooks/use-document-search.js.map +1 -1
  340. package/dist/v2/features/search/hooks/use-search-index.js.map +1 -1
  341. package/dist/v2/helpers/generate-location-id.js.map +1 -1
  342. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  343. package/dist/v2/helpers/handle-hotkeys.js.map +1 -1
  344. package/dist/v2/helpers/test-utils.js.map +1 -1
  345. package/dist/v2/hooks/use-global-hot-keys.js.map +1 -1
  346. package/dist/v2/hooks/use-scroll-lock.js.map +1 -1
  347. package/dist/v2/workspace-events.js.map +1 -1
  348. package/dist/vue-styles.css +227 -234
  349. package/package.json +20 -20
@@ -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 onVerticalResiz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M,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-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;GACjB,EAAE,CACL;EAEA,MAAM,gCAAgC,eAAe;AACnD,OAAI,QAAA,QAAQ,KAAK,SAAS,IAAI,CAC5B,QAAO,QAAA,OAAO,IAAI,MAAM,GAAG,GAAE;AAE/B,UAAO,QAAA,QAAQ,OAAO;IACvB;;uBAGC,YA8DgB,MAAA,cAAA,EAAA;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,mBAWM,UAAA,MAAA,WAV4B,qBAAA,QAAxB,cAAc,UAAK;yBAD7B,YAWM,4BAAA;MATH,KAAK,aAAa;MAClB,QAAQ,QAAA;MACM;MACf,MAAK;MACJ,4BAAqB,WAAe,KAAI,yBAAA;OAAA,KA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jB,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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,UAAU,KAAI,eAAgB,KAAK;KAC5C,WAAO,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,eAAA,KAAA;4BAEhB,YAAuE,MAAA,sBAAA,GAAA,EAA/C,OAAM,uCAAsC,CAAA,CAAA,CAAA;2BAzCvD,CAXf,YAWe,MAAA,YAAA,GAAA;KAVb,OAAM;KACN,SAAQ;;4BAIG,CAHK,QAAA,UAAA,UAAA,GAAhB,mBAGW,UAAA,EAAA,KAAA,EAAA,GAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAoC,QAAA,EAA9B,OAAM,UAAS,GAAC,WAAO,EAAA,IAAA,gBAAO,MACpC,gBAAG,8BAAA,KAA6B,GAAA,CAAA,CAAA,GAAA,EAAA,MAAA,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: 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AAA,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,MAAM,SAAS,MAAM;EAErB,MAAM,qBAAqB;GACzB,OAAO,OAAO,KAAK,QAAA,QAAQ,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS;EACvD;EAEA,MAAM,mBAAmB,eAAe,QAAA,aAAa,OAAO,QAAA,QAAQ,GAAG;EACvE,MAAM,aAAa,eAAe,iBAAiB,SAAS,aAAa,CAAC;;uBAGxE,mBAiCM,OAAA,EAhCJ,OAAK,eAAA,CAAC,qDAAmD,EAAA,sBAAA,CACxB,iBAAA,MAAgB,CAAA,CAAA,EAAA,GAAA,CACjD,mBAWS,UAXT,WACU,WAUD,QAVW,EAAA,iBAAsB,MAAA,MAAA,EAAM,IAAA,CAAA,GAAA;IAC7C,iBAAe,WAAA;IAChB,OAAK,CAAC,mEACE,iBAAA,QAAgB,oBAAA,cAAA;IACxB,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,uBAAA;QACZ,YAAsD,MAAA,qBAAA,GAAA,EAA9B,UAAU,iBAAA,MAAgB,GAAA,MAAA,GAAA,CAAA,UAAA,CAAA,GAClD,mBAEO,QAFP,YAEO,gBADF,QAAA,aAAa,KAAK,GAAA,CAAA,CAAA,GAAA,IAAA,UAAA,GAKjB,WAAA,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AAiD;IACjD,IAAI,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,cAAc,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;CAC/D,CAAC;AAmCF,KAAK,gBAAgB,GAAG;IACxB,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACtB,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAoUxD,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"}
@@ -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",
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.script.js","names":[],"sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport type { WorkspaceGroup } from '@scalar/components/menu'\nimport { ScalarSidebarSearchInput } from '@scalar/components/sidebar'\nimport { ScalarIconFileDashed, ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n ScalarSidebar,\n type DraggingItem,\n type HoveredItem,\n type SidebarState,\n} from '@scalar/sidebar'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { computed, ref } from 'vue'\n\nimport { Resize } from '@/v2/components/resize'\nimport { useSearchIndex } from '@/v2/features/search'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport SidebarMenu from './SidebarMenu.vue'\n\nconst { documents, sidebarState, layout } = defineProps<{\n /** All documents to display sidebar items for */\n sidebarState: SidebarState<TraversedEntry>\n /** Layout for the client */\n layout: ClientLayout\n /** The currently active workspace */\n activeWorkspace: { id: string }\n /** The list of all available workspaces */\n workspaces: WorkspaceGroup[]\n /** The documents belonging to the workspace */\n documents: WorkspaceDocument[]\n /**\n * Prevents sidebar items from being hovered and dropped into. Can be either a function or a boolean\n *\n * @default true\n */\n isDroppable?:\n | boolean\n | ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean)\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when an item is selected */\n (e: 'selectItem', id: string): void\n /** Emitted when a workspace is selected by optional ID */\n (e: 'select:workspace', id?: string): void\n /** Emitted when the user wants to create a new workspace */\n (e: 'create:workspace'): void\n /** Emitted when sidebar items are reordered via drag and drop */\n (e: 'reorder', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n /** Emitted when the user wants to open the settings */\n (e: 'navigate:to:settings'): void\n}>()\n\nconst slots = defineSlots<{\n /** Slot to add the workspace button */\n workspaceButton?(): unknown\n /** Slot to add additional content to the decorator */\n decorator?(props: { item: TraversedEntry }): unknown\n /** Slot to add additional content to the footer */\n footer?(): unknown\n /** Slot to add additional content to the empty folder */\n empty?(props: { item: TraversedEntry }): unknown\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n /** Slot to add additional content to the icon */\n icon?(props: { item: TraversedEntry; open: boolean }): unknown\n}>()\n\n/** Controls the visibility of the search input */\nconst isSearchVisible = ref(false)\n\n/** Controls the width of the sidebar */\nconst sidebarWidth = defineModel<number>('sidebarWidth', {\n required: true,\n default: 288,\n})\n\nconst isDraft = (item: TraversedEntry) => {\n return item.type === 'example' && item.title === 'draft'\n}\n\n/** We handle search results out here so we can show them in the sidebar */\nconst { query, results } = useSearchIndex(() =>\n documents.filter(isOpenApiDocument),\n)\n\n/** We show either the search results or the sidebar items */\nconst items = computed(() => results.value ?? sidebarState.items.value)\n\n/** Select an item and clear the search query */\nconst handleSelectItem = (id: string) => {\n emit('selectItem', id)\n query.value = ''\n isSearchVisible.value = false\n}\n</script>\n<template>\n <Resize\n v-model:width=\"sidebarWidth\"\n class=\"flex flex-col\">\n <template #default>\n <ScalarSidebar\n class=\"flex w-auto flex-1\"\n :indent=\"20\"\n :isDraggable=\"layout !== 'modal'\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"sidebarState.isExpanded\"\n :isSelected=\"sidebarState.isSelected\"\n :items\n layout=\"client\"\n :options=\"{ hideOperationDefaultExamples: layout === 'modal' }\"\n @reorder=\"\n (draggingItem, hoveredItem) =>\n emit('reorder', draggingItem, hoveredItem)\n \"\n @selectItem=\"handleSelectItem\">\n <template #header>\n <!-- drag region (macos) -->\n <div class=\"mac:h-12 mac:app-drag-region h-2\"></div>\n <div\n class=\"bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5\"\n :class=\"{\n 'max-md:pt-12': layout === 'desktop',\n 'max-md:pt-2 max-md:pl-4!': layout === 'modal',\n 'pt-1 max-md:pt-2 max-md:pl-14': layout === 'web',\n }\">\n <div\n v-if=\"layout !== 'web'\"\n class=\"flex items-center justify-between\"\n :class=\"{ 'max-md:pl-10': layout === 'desktop' }\">\n <!-- Desktop gets the workspace menu here -->\n <SidebarMenu\n v-if=\"layout !== 'modal'\"\n :activeWorkspace=\"activeWorkspace\"\n :workspaces=\"workspaces\"\n @create:workspace=\"emit('create:workspace')\"\n @navigate:to:settings=\"emit('navigate:to:settings')\"\n @select:workspace=\"(id) => emit('select:workspace', id)\">\n <template #sidebarMenuActions>\n <slot name=\"sidebarMenuActions\" />\n </template>\n </SidebarMenu>\n\n <!-- Placeholder for the sidebar toggle in modal layout -->\n <div v-else-if=\"layout === 'modal'\"></div>\n\n <!-- Toggle search, always visible on web -->\n <ScalarIconButton\n class=\"hover:bg-b-2 active:text-c-1 size-8 rounded p-2\"\n :icon=\"ScalarIconMagnifyingGlass\"\n label=\"Search\"\n size=\"sm\"\n @click=\"isSearchVisible = !isSearchVisible\" />\n </div>\n\n <ScalarSidebarSearchInput\n v-if=\"isSearchVisible || layout === 'web'\"\n v-model=\"query\"\n :autofocus=\"layout !== 'web'\" />\n </div>\n </template>\n\n <template #spacer>\n <div class=\"flex-1\"></div>\n </template>\n\n <template\n v-if=\"slots.decorator\"\n #decorator=\"decoratorProps\">\n <slot\n v-bind=\"decoratorProps\"\n name=\"decorator\" />\n </template>\n\n <template #icon=\"iconProps\">\n <template v-if=\"slots.icon || isDraft(iconProps.item)\">\n <ScalarIconFileDashed v-if=\"isDraft(iconProps.item)\" />\n <slot\n v-bind=\"iconProps\"\n name=\"icon\" />\n </template>\n </template>\n\n <!-- Empty folder slot -->\n <template\n v-if=\"slots.empty\"\n #empty=\"emptyProps\">\n <slot\n v-bind=\"emptyProps\"\n name=\"empty\" />\n </template>\n\n <template #before>\n <slot name=\"workspaceButton\" />\n </template>\n\n <template #footer>\n <slot name=\"footer\" />\n </template>\n </ScalarSidebar>\n </template>\n </Resize>\n</template>\n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AA,kBAAA,CAAA,CAAA;KAGtB,QAAM,cACO,CAAtB,WAAsB,KAAA,QAAA,SAAA,CAAA,CAAA;;QA9BhB,MAAM,YAAA;WACX;kBAAW,mBAAc,CAC1B,WAEqB,KAAA,QAAA,aAAA,eAAA,mBADX,eAAc,CAAA,CAAA,CAAA,CAAA;;gBAelB,MAAM,QAAA;WACX;kBAAO,eAAU,CAClB,WAEiB,KAAA,QAAA,SAAA,eAAA,mBADP,WAAU,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Sidebar.vue.script.js","names":[],"sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport type { WorkspaceGroup } from '@scalar/components/menu'\nimport { ScalarSidebarSearchInput } from '@scalar/components/sidebar'\nimport { ScalarIconFileDashed, ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n ScalarSidebar,\n type DraggingItem,\n type HoveredItem,\n type SidebarState,\n} from '@scalar/sidebar'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { computed, ref } from 'vue'\n\nimport { Resize } from '@/v2/components/resize'\nimport { useSearchIndex } from '@/v2/features/search'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport SidebarMenu from './SidebarMenu.vue'\n\nconst { documents, sidebarState, layout } = defineProps<{\n /** All documents to display sidebar items for */\n sidebarState: SidebarState<TraversedEntry>\n /** Layout for the client */\n layout: ClientLayout\n /** The currently active workspace */\n activeWorkspace: { id: string }\n /** The list of all available workspaces */\n workspaces: WorkspaceGroup[]\n /** The documents belonging to the workspace */\n documents: WorkspaceDocument[]\n /**\n * Prevents sidebar items from being hovered and dropped into. Can be either a function or a boolean\n *\n * @default true\n */\n isDroppable?:\n | boolean\n | ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean)\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when an item is selected */\n (e: 'selectItem', id: string): void\n /** Emitted when a workspace is selected by optional ID */\n (e: 'select:workspace', id?: string): void\n /** Emitted when the user wants to create a new workspace */\n (e: 'create:workspace'): void\n /** Emitted when sidebar items are reordered via drag and drop */\n (e: 'reorder', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n /** Emitted when the user wants to open the settings */\n (e: 'navigate:to:settings'): void\n}>()\n\nconst slots = defineSlots<{\n /** Slot to add the workspace button */\n workspaceButton?(): unknown\n /** Slot to add additional content to the decorator */\n decorator?(props: { item: TraversedEntry }): unknown\n /** Slot to add additional content to the footer */\n footer?(): unknown\n /** Slot to add additional content to the empty folder */\n empty?(props: { item: TraversedEntry }): unknown\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n /** Slot to add additional content to the icon */\n icon?(props: { item: TraversedEntry; open: boolean }): unknown\n}>()\n\n/** Controls the visibility of the search input */\nconst isSearchVisible = ref(false)\n\n/** Controls the width of the sidebar */\nconst sidebarWidth = defineModel<number>('sidebarWidth', {\n required: true,\n default: 288,\n})\n\nconst isDraft = (item: TraversedEntry) => {\n return item.type === 'example' && item.title === 'draft'\n}\n\n/** We handle search results out here so we can show them in the sidebar */\nconst { query, results } = useSearchIndex(() =>\n documents.filter(isOpenApiDocument),\n)\n\n/** We show either the search results or the sidebar items */\nconst items = computed(() => results.value ?? sidebarState.items.value)\n\n/** Select an item and clear the search query */\nconst handleSelectItem = (id: string) => {\n emit('selectItem', id)\n query.value = ''\n isSearchVisible.value = false\n}\n</script>\n<template>\n <Resize\n v-model:width=\"sidebarWidth\"\n class=\"flex flex-col\">\n <template #default>\n <ScalarSidebar\n class=\"flex w-auto flex-1\"\n :indent=\"20\"\n :isDraggable=\"layout !== 'modal'\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"sidebarState.isExpanded\"\n :isSelected=\"sidebarState.isSelected\"\n :items\n layout=\"client\"\n :options=\"{ hideOperationDefaultExamples: layout === 'modal' }\"\n @reorder=\"\n (draggingItem, hoveredItem) =>\n emit('reorder', draggingItem, hoveredItem)\n \"\n @selectItem=\"handleSelectItem\">\n <template #header>\n <!-- drag region (macos) -->\n <div class=\"mac:h-12 mac:app-drag-region h-2\"></div>\n <div\n class=\"bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5\"\n :class=\"{\n 'max-md:pt-12': layout === 'desktop',\n 'max-md:pt-2 max-md:pl-4!': layout === 'modal',\n 'pt-1 max-md:pt-2 max-md:pl-14': layout === 'web',\n }\">\n <div\n v-if=\"layout !== 'web'\"\n class=\"flex items-center justify-between\"\n :class=\"{ 'max-md:pl-10': layout === 'desktop' }\">\n <!-- Desktop gets the workspace menu here -->\n <SidebarMenu\n v-if=\"layout !== 'modal'\"\n :activeWorkspace=\"activeWorkspace\"\n :workspaces=\"workspaces\"\n @create:workspace=\"emit('create:workspace')\"\n @navigate:to:settings=\"emit('navigate:to:settings')\"\n @select:workspace=\"(id) => emit('select:workspace', id)\">\n <template #sidebarMenuActions>\n <slot name=\"sidebarMenuActions\" />\n </template>\n </SidebarMenu>\n\n <!-- Placeholder for the sidebar toggle in modal layout -->\n <div v-else-if=\"layout === 'modal'\"></div>\n\n <!-- Toggle search, always visible on web -->\n <ScalarIconButton\n class=\"hover:bg-b-2 active:text-c-1 size-8 rounded p-2\"\n :icon=\"ScalarIconMagnifyingGlass\"\n label=\"Search\"\n size=\"sm\"\n @click=\"isSearchVisible = !isSearchVisible\" />\n </div>\n\n <ScalarSidebarSearchInput\n v-if=\"isSearchVisible || layout === 'web'\"\n v-model=\"query\"\n :autofocus=\"layout !== 'web'\" />\n </div>\n </template>\n\n <template #spacer>\n <div class=\"flex-1\"></div>\n </template>\n\n <template\n v-if=\"slots.decorator\"\n #decorator=\"decoratorProps\">\n <slot\n v-bind=\"decoratorProps\"\n name=\"decorator\" />\n </template>\n\n <template #icon=\"iconProps\">\n <template v-if=\"slots.icon || isDraft(iconProps.item)\">\n <ScalarIconFileDashed v-if=\"isDraft(iconProps.item)\" />\n <slot\n v-bind=\"iconProps\"\n name=\"icon\" />\n </template>\n </template>\n\n <!-- Empty folder slot -->\n <template\n v-if=\"slots.empty\"\n #empty=\"emptyProps\">\n <slot\n v-bind=\"emptyProps\"\n name=\"empty\" />\n </template>\n\n <template #before>\n <slot name=\"workspaceButton\" />\n </template>\n\n <template #footer>\n <slot name=\"footer\" />\n </template>\n </ScalarSidebar>\n </template>\n </Resize>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CA,MAAM,OAAO;EAab,MAAM,QAAQ,SAAA;;EAgBd,MAAM,kBAAkB,IAAI,KAAK;;EAGjC,MAAM,eAAe,SAAmB,SAAC,cAGxC;EAED,MAAM,WAAW,SAAyB;GACxC,OAAO,KAAK,SAAS,aAAa,KAAK,UAAU;EACnD;;EAGA,MAAM,EAAE,OAAO,YAAY,qBACzB,QAAA,UAAU,OAAO,iBAAiB,CACpC;;EAGA,MAAM,QAAQ,eAAe,QAAQ,SAAS,QAAA,aAAa,MAAM,KAAK;;EAGtE,MAAM,oBAAoB,OAAe;GACvC,KAAK,cAAc,EAAE;GACrB,MAAM,QAAQ;GACd,gBAAgB,QAAQ;EAC1B;;uBAGE,YAwGS,MAAA,cAAA,GAAA;IAvGC,OAAO,aAAA;yEAAY,QAAA;IAC3B,OAAM;;IACK,SAAO,cAmGA,CAlGhB,YAkGgB,MAAA,aAAA,GAAA;KAjGd,OAAM;KACL,QAAQ;KACR,aAAa,QAAA,WAAM;KACnB,aAAa,QAAA;KACb,YAAY,QAAA,aAAa;KACzB,YAAY,QAAA,aAAa;KACzB,OAAA,MAAA;KACD,QAAO;KACN,SAAO,EAAA,8BAAkC,QAAA,WAAM,QAAA;KAC/C,WAAO,OAAA,OAAA,OAAA,MAAc,cAAc,gBAA4B,KAAI,WAAY,cAAc,WAAW;KAIxG,cAAY;;KACF,QAAM,cAEq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C;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":"SidebarMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"names":[],"mappings":"AA2EA,OAAO,EAQL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAA;AAGhC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B;;;OAGG;IACH,UAAU,EAAE,cAAc,EAAE,CAAA;CAC7B,CAAC;AAcF,KAAK,WAAW,GAAG;IACjB,oEAAoE;IACpE,kBAAkB,CAAC,IAAI,OAAO,CAAA;CAC/B,CAAC;AA4JF,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 { createBlock, createTextVNode, createVNode, defineComponent, openBlock,
2
2
  import { ScalarIconGear } from "@scalar/icons";
3
3
  import { ScalarMenu, ScalarMenuLink, ScalarMenuProducts, ScalarMenuResources, ScalarMenuSection, ScalarMenuSupport, ScalarMenuWorkspacePicker } from "@scalar/components/menu";
4
4
  //#region src/v2/components/sidebar/SidebarMenu.vue?vue&type=script&setup=true&lang.ts
5
- var SidebarMenu_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
5
+ var SidebarMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
6
6
  __name: "SidebarMenu",
7
7
  props: {
8
8
  activeWorkspace: {},
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarMenu.vue.script.js","names":[],"sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarMenu,\n ScalarMenuLink,\n ScalarMenuProducts,\n ScalarMenuResources,\n ScalarMenuSection,\n ScalarMenuSupport,\n ScalarMenuWorkspacePicker,\n type WorkspaceGroup,\n} from '@scalar/components/menu'\nimport { ScalarIconGear } from '@scalar/icons'\n\nconst { activeWorkspace, workspaces } = defineProps<{\n /**\n * The currently active workspace.\n * This represents the workspace that the user is currently working in.\n */\n activeWorkspace: { id: string }\n /**\n * The list of all available workspaces.\n * Used to render options for workspace switching and selection.\n */\n workspaces: WorkspaceGroup[]\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the user wants to create a new workspace */\n (e: 'create:workspace'): void\n /** Emitted when the user selects a workspace */\n (e: 'select:workspace', id?: string): void\n /** Emitted when the user wants to open the settings */\n (e: 'navigate:to:settings'): void\n}>()\n\ndefineSlots<{\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n}>()\n</script>\n<template>\n <!-- Desktop app menu -->\n <ScalarMenu>\n <template #products>\n <ScalarMenuProducts selected=\"client\" />\n </template>\n <template #sections=\"{ close }\">\n <ScalarMenuSection>\n <slot name=\"sidebarMenuActions\">\n <ScalarMenuWorkspacePicker\n :modelValue=\"activeWorkspace.id\"\n :workspaceOptions=\"workspaces\"\n @createWorkspace=\"emit('create:workspace')\"\n @update:modelValue=\"(value) => emit('select:workspace', value)\" />\n <ScalarMenuLink\n is=\"button\"\n :icon=\"ScalarIconGear\"\n @click=\"\n () => {\n close()\n emit('navigate:to:settings')\n }\n \">\n Settings\n </ScalarMenuLink>\n </slot>\n </ScalarMenuSection>\n <ScalarMenuResources />\n <ScalarMenuSupport />\n </template>\n </ScalarMenu>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EA0BA,MAAM,OAAO;;uBAgBX,YA4Ba,MAAA,WAAA,EAAA,MAAA;IA3BA,UAAQ,cACuB,CAAxC,YAAwC,MAAA,mBAAA,EAAA,EAApB,UAAS,UAAQ,CAAA,CAAA,CAAA;IAE5B,UAAQ,SAoBG,EApBC,YAAK;KAC1B,YAmBoB,MAAA,kBAAA,EAAA,MAAA;6BADX,CAjBP,WAiBO,KAAA,QAAA,sBAAA,EAAA,QAAA,CAhBL,YAIoE,MAAA,0BAAA,EAAA;OAHjE,YAAY,QAAA,gBAAgB;OAC5B,kBAAkB,QAAA;OAClB,mBAAe,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,mBAAA;OACrB,uBAAiB,OAAA,OAAA,OAAA,MAAG,UAAU,KAAI,oBAAqB,MAAK;uDAC/D,YAUiB,MAAA,eAAA,EAAA;OATf,IAAG;OACF,MAAM,MAAA,eAAc;OACpB,eAAA;AAA8C,eAAK;AAAmB,aAAI,uBAAA;;;8BAO7E,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFI,cAEJ,GAAA,CAAA,EAAA,CAAA;;;;;KAGJ,YAAuB,MAAA,oBAAA,CAAA;KACvB,YAAqB,MAAA,kBAAA,CAAA"}
1
+ {"version":3,"file":"SidebarMenu.vue.script.js","names":[],"sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarMenu,\n ScalarMenuLink,\n ScalarMenuProducts,\n ScalarMenuResources,\n ScalarMenuSection,\n ScalarMenuSupport,\n ScalarMenuWorkspacePicker,\n type WorkspaceGroup,\n} from '@scalar/components/menu'\nimport { ScalarIconGear } from '@scalar/icons'\n\nconst { activeWorkspace, workspaces } = defineProps<{\n /**\n * The currently active workspace.\n * This represents the workspace that the user is currently working in.\n */\n activeWorkspace: { id: string }\n /**\n * The list of all available workspaces.\n * Used to render options for workspace switching and selection.\n */\n workspaces: WorkspaceGroup[]\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the user wants to create a new workspace */\n (e: 'create:workspace'): void\n /** Emitted when the user selects a workspace */\n (e: 'select:workspace', id?: string): void\n /** Emitted when the user wants to open the settings */\n (e: 'navigate:to:settings'): void\n}>()\n\ndefineSlots<{\n /** Slot for customizing the actions section of the sidebar menu. */\n sidebarMenuActions?(): unknown\n}>()\n</script>\n<template>\n <!-- Desktop app menu -->\n <ScalarMenu>\n <template #products>\n <ScalarMenuProducts selected=\"client\" />\n </template>\n <template #sections=\"{ close }\">\n <ScalarMenuSection>\n <slot name=\"sidebarMenuActions\">\n <ScalarMenuWorkspacePicker\n :modelValue=\"activeWorkspace.id\"\n :workspaceOptions=\"workspaces\"\n @createWorkspace=\"emit('create:workspace')\"\n @update:modelValue=\"(value) => emit('select:workspace', value)\" />\n <ScalarMenuLink\n is=\"button\"\n :icon=\"ScalarIconGear\"\n @click=\"\n () => {\n close()\n emit('navigate:to:settings')\n }\n \">\n Settings\n </ScalarMenuLink>\n </slot>\n </ScalarMenuSection>\n <ScalarMenuResources />\n <ScalarMenuSupport />\n </template>\n </ScalarMenu>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EA0BA,MAAM,OAAO;;uBAgBX,YA4Ba,MAAA,UAAA,GAAA,MAAA;IA3BA,UAAQ,cACuB,CAAxC,YAAwC,MAAA,kBAAA,GAAA,EAApB,UAAS,SAAQ,CAAA,CAAA,CAAA;IAE5B,UAAQ,SAoBG,EApBC,YAAK;KAC1B,YAmBoB,MAAA,iBAAA,GAAA,MAAA;6BADX,CAjBP,WAiBO,KAAA,QAAA,sBAAA,CAAA,SAAA,CAhBL,YAIoE,MAAA,yBAAA,GAAA;OAHjE,YAAY,QAAA,gBAAgB;OAC5B,kBAAkB,QAAA;OAClB,mBAAe,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,kBAAA;OACrB,uBAAiB,OAAA,OAAA,OAAA,MAAG,UAAU,KAAI,oBAAqB,KAAK;uDAC/D,YAUiB,MAAA,cAAA,GAAA;OATf,IAAG;OACF,MAAM,MAAA,cAAA;OACN,eAAA;QAA8C,MAAK;QAAmB,KAAI,sBAAA;;;8BAO7E,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFI,cAEJ,EAAA,CAAA,EAAA,CAAA;;;;;KAGJ,YAAuB,MAAA,mBAAA,CAAA;KACvB,YAAqB,MAAA,iBAAA,CAAA"}
@@ -9,7 +9,7 @@ var _hoisted_3 = {
9
9
  xmlns: "http://www.w3.org/2000/svg"
10
10
  };
11
11
  var _hoisted_4 = { "clip-path": "url(#mask)" };
12
- var SidebarToggle_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
12
+ var SidebarToggle_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
13
13
  __name: "SidebarToggle",
14
14
  props: {
15
15
  "modelValue": {
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarToggle.vue.script.js","names":[],"sources":["../../../../src/v2/components/sidebar/SidebarToggle.vue"],"sourcesContent":["<script setup lang=\"ts\">\nconst isSidebarOpen = defineModel<boolean>({\n required: true,\n})\n</script>\n<template>\n <button\n :aria-pressed=\"isSidebarOpen\"\n class=\"scalar-sidebar-toggle text-c-3 hover:bg-b-2 active:text-c-1 rounded p-2\"\n type=\"button\"\n @click=\"isSidebarOpen = !isSidebarOpen\">\n <span class=\"sr-only\">{{ isSidebarOpen ? 'Hide' : 'Show' }} sidebar</span>\n <svg\n class=\"size-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <clipPath id=\"mask\">\n <path\n clip-rule=\"evenodd\"\n d=\"M9 3.2H4c-1.7 0-3 1.3-3 3v11.5c0 1.7 1.3 3 3 3h5V3.2z\" />\n </clipPath>\n </defs>\n <g clip-path=\"url(#mask)\">\n <path\n class=\"transition-transform duration-300\"\n :class=\"isSidebarOpen ? 'translate-x-0' : '-translate-x-1/2'\"\n d=\"M1 3.2h8v17.5H1z\"\n fill=\"currentColor\" />\n </g>\n <path\n d=\"M20 20.8H4c-1.7 0-3-1.3-3-3V6.2c0-1.7 1.3-3 3-3h16c1.7 0 3 1.3 3 3v11.5c0 1.7-1.3 3-3 3zM9 3.2v17.5\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\" />\n </svg>\n </button>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;EACA,MAAM,gBAAgB,SAAoB,SAAA,aAEzC;;uBAGC,mBAgCS,UAAA;IA/BN,gBAAc,cAAA;IACf,OAAM;IACN,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,cAAA,QAAa,CAAI,cAAA;OACzB,mBAA0E,QAA1E,YAA0E,gBAAjD,cAAA,QAAa,SAAA,OAAA,GAAqB,YAAQ,EAAA,GAAA,WAAA,EACnE,mBAyBM,OAzBN,YAyBM;8BApBJ,mBAMO,QAAA,MAAA,CALL,mBAIW,YAAA,EAJD,IAAG,QAAM,EAAA,CACjB,mBAE8D,QAAA;KAD5D,aAAU;KACV,GAAE;;IAGR,mBAMI,KANJ,YAMI,CALF,mBAIwB,QAAA;KAHtB,OAAK,eAAA,CAAC,qCACE,cAAA,QAAa,kBAAA,mBAAA,CAAA;KACrB,GAAE;KACF,MAAK;;8BAET,mBAKqB,QAAA;KAJnB,GAAE;KACF,QAAO;KACP,kBAAe;KACf,mBAAgB;KAChB,gBAAa"}
1
+ {"version":3,"file":"SidebarToggle.vue.script.js","names":[],"sources":["../../../../src/v2/components/sidebar/SidebarToggle.vue"],"sourcesContent":["<script setup lang=\"ts\">\nconst isSidebarOpen = defineModel<boolean>({\n required: true,\n})\n</script>\n<template>\n <button\n :aria-pressed=\"isSidebarOpen\"\n class=\"scalar-sidebar-toggle text-c-3 hover:bg-b-2 active:text-c-1 rounded p-2\"\n type=\"button\"\n @click=\"isSidebarOpen = !isSidebarOpen\">\n <span class=\"sr-only\">{{ isSidebarOpen ? 'Hide' : 'Show' }} sidebar</span>\n <svg\n class=\"size-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <clipPath id=\"mask\">\n <path\n clip-rule=\"evenodd\"\n d=\"M9 3.2H4c-1.7 0-3 1.3-3 3v11.5c0 1.7 1.3 3 3 3h5V3.2z\" />\n </clipPath>\n </defs>\n <g clip-path=\"url(#mask)\">\n <path\n class=\"transition-transform duration-300\"\n :class=\"isSidebarOpen ? 'translate-x-0' : '-translate-x-1/2'\"\n d=\"M1 3.2h8v17.5H1z\"\n fill=\"currentColor\" />\n </g>\n <path\n d=\"M20 20.8H4c-1.7 0-3-1.3-3-3V6.2c0-1.7 1.3-3 3-3h16c1.7 0 3 1.3 3 3v11.5c0 1.7-1.3 3-3 3zM9 3.2v17.5\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\" />\n </svg>\n </button>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;EACA,MAAM,gBAAgB,SAAoB,SAAA,YAEzC;;uBAGC,mBAgCS,UAAA;IA/BN,gBAAc,cAAA;IACf,OAAM;IACN,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,cAAA,QAAa,CAAI,cAAA;OACzB,mBAA0E,QAA1E,YAA0E,gBAAjD,cAAA,QAAa,SAAA,MAAA,IAAqB,YAAQ,CAAA,IAAA,UAAA,GACnE,mBAyBM,OAzBN,YAyBM;8BApBJ,mBAMO,QAAA,MAAA,CALL,mBAIW,YAAA,EAJD,IAAG,OAAM,GAAA,CACjB,mBAE8D,QAAA;KAD5D,aAAU;KACV,GAAE;;IAGR,mBAMI,KANJ,YAMI,CALF,mBAIwB,QAAA;KAHtB,OAAK,eAAA,CAAC,qCACE,cAAA,QAAa,kBAAA,kBAAA,CAAA;KACrB,GAAE;KACF,MAAK;;8BAET,mBAKqB,QAAA;KAJnB,GAAE;KACF,QAAO;KACP,kBAAe;KACf,mBAAgB;KAChB,gBAAa"}
@@ -1,6 +1,6 @@
1
1
  //#region src/v2/constants.ts
2
2
  /** The version number taken from the package.json. Consumers can override at build time via define (e.g. OVERRIDE_PACKAGE_VERSION: JSON.stringify('1.2.3')). */
3
- var APP_VERSION = typeof OVERRIDE_PACKAGE_VERSION !== "undefined" ? OVERRIDE_PACKAGE_VERSION : "3.14.0";
3
+ var APP_VERSION = typeof OVERRIDE_PACKAGE_VERSION !== "undefined" ? OVERRIDE_PACKAGE_VERSION : "3.15.0";
4
4
  //#endregion
5
5
  export { APP_VERSION };
6
6
 
@@ -4,7 +4,7 @@ import { useBindCx } from "@scalar/use-hooks/useBindCx";
4
4
  //#region src/v2/features/command-palette/components/CommandActionForm.vue?vue&type=script&setup=true&lang.ts
5
5
  var _hoisted_1 = { class: "flex gap-2" };
6
6
  var _hoisted_2 = { class: "flex max-h-8 flex-1" };
7
- var CommandActionForm_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
7
+ var CommandActionForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
8
8
  name: "CommandActionForm",
9
9
  props: {
10
10
  loader: {},
@@ -1 +1 @@
1
- {"version":3,"file":"CommandActionForm.vue.script.js","names":[],"sources":["../../../../../src/v2/features/command-palette/components/CommandActionForm.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Command Action Form Component\n *\n * A reusable form wrapper for command palette actions.\n * Provides a consistent layout with a main content area, optional controls,\n * and a submit button. Prevents form submission when disabled.\n *\n * @example\n * <CommandActionForm\n * :loader\n * :disabled=\"isDisabled\"\n * @submit=\"handleSubmit\"\n * @cancel=\"handleCancel\"\n * @back=\"handleBack\"\n * >\n * <!-- Main content goes in default slot -->\n * <CommandActionInput v-model=\"value\" />\n *\n * <!-- Optional controls in options slot -->\n * <template #options>\n * <ScalarCheckbox v-model=\"option\" />\n * </template>\n *\n * <!-- Custom submit button text -->\n * <template #submit>Create</template>\n * </CommandActionForm>\n */\nexport default {\n name: 'CommandActionForm',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport type { LoadingState } from '@scalar/components/loading'\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nconst { loader, disabled = false } = defineProps<{\n /** Loading state from useLoadingState composable to show spinner on submit button */\n loader?: LoadingState\n /** Whether the form and submit button are disabled */\n disabled?: boolean\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the form is submitted (if not disabled) */\n (event: 'submit'): void\n /** Emitted when the action is cancelled */\n (event: 'cancel'): void\n /** Emitted when user presses back (e.g., Escape key) */\n (event: 'back', e: KeyboardEvent): void\n}>()\n\ndefineSlots<{\n /** Main content area for form inputs */\n default(): void\n /** Optional controls displayed before the submit button (e.g., checkboxes, toggles, dropdowns) */\n options(): void\n /** Custom text or content for the submit button (defaults to \"Continue\") */\n submit(): void\n}>()\n\nconst { cx } = useBindCx()\n\n/** Handle form submission, only emit if not disabled */\nconst handleSubmit = (): void => {\n if (!disabled) {\n emit('submit')\n }\n}\n</script>\n\n<template>\n <form\n class=\"flex w-full flex-col gap-3\"\n @keydown.enter.stop\n @submit.prevent.stop=\"handleSubmit\">\n <!-- Main content area with minimum height and rounded corners -->\n <div v-bind=\"cx('relative flex min-h-20 flex-col rounded')\">\n <slot />\n </div>\n\n <!-- Action bar with optional controls and submit button -->\n <div class=\"flex gap-2\">\n <!-- Optional controls slot (e.g., checkboxes, toggles) -->\n <div class=\"flex max-h-8 flex-1\">\n <slot name=\"options\" />\n </div>\n\n <!-- Submit button with customizable text -->\n <ScalarButton\n class=\"max-h-8 px-3 text-xs\"\n :disabled=\"disabled\"\n :loader\n type=\"submit\">\n <slot name=\"submit\">Continue</slot>\n </ScalarButton>\n </div>\n </form>\n</template>\n"],"mappings":";;;;;;;CA6BE,MAAM;;;;;;;;;;;;;;EAgBR,MAAM,OAAO;EAkBb,MAAM,EAAE,OAAO,WAAU;;EAGzB,MAAM,qBAA2B;AAC/B,OAAI,CAAC,QAAA,SACH,MAAK,SAAQ;;;uBAMf,mBAyBO,QAAA;IAxBL,OAAM;IACL,WAAO,OAAA,OAAA,OAAA,KAAA,SAAA,oBAAR,IAAmB,CAAA,OAAA,CAAA,EAAA,CAAA,QAAA,CAAA;IAClB,UAAM,cAAe,cAAY,CAAA,WAAA,OAAA,CAAA;OAElC,mBAEM,OAAA,eAAA,mBAFO,MAAA,GAAE,CAAA,0CAAA,CAAA,CAAA,EAAA,CACb,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,GAAA,EAIV,mBAcM,OAdN,YAcM,CAZJ,mBAEM,OAFN,YAEM,CADJ,WAAuB,KAAA,QAAA,UAAA,CAAA,CAAA,EAIzB,YAMe,MAAA,aAAA,EAAA;IALb,OAAM;IACL,UAAU,QAAA;IACV,QAAA,QAAA;IACD,MAAK;;2BAC8B,CAAnC,WAAmC,KAAA,QAAA,UAAA,EAAA,QAAA,CAAA,OAAA,OAAA,OAAA,KAAA,gBAAf,YAAQ,GAAA,EAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"CommandActionForm.vue.script.js","names":[],"sources":["../../../../../src/v2/features/command-palette/components/CommandActionForm.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Command Action Form Component\n *\n * A reusable form wrapper for command palette actions.\n * Provides a consistent layout with a main content area, optional controls,\n * and a submit button. Prevents form submission when disabled.\n *\n * @example\n * <CommandActionForm\n * :loader\n * :disabled=\"isDisabled\"\n * @submit=\"handleSubmit\"\n * @cancel=\"handleCancel\"\n * @back=\"handleBack\"\n * >\n * <!-- Main content goes in default slot -->\n * <CommandActionInput v-model=\"value\" />\n *\n * <!-- Optional controls in options slot -->\n * <template #options>\n * <ScalarCheckbox v-model=\"option\" />\n * </template>\n *\n * <!-- Custom submit button text -->\n * <template #submit>Create</template>\n * </CommandActionForm>\n */\nexport default {\n name: 'CommandActionForm',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport type { LoadingState } from '@scalar/components/loading'\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nconst { loader, disabled = false } = defineProps<{\n /** Loading state from useLoadingState composable to show spinner on submit button */\n loader?: LoadingState\n /** Whether the form and submit button are disabled */\n disabled?: boolean\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the form is submitted (if not disabled) */\n (event: 'submit'): void\n /** Emitted when the action is cancelled */\n (event: 'cancel'): void\n /** Emitted when user presses back (e.g., Escape key) */\n (event: 'back', e: KeyboardEvent): void\n}>()\n\ndefineSlots<{\n /** Main content area for form inputs */\n default(): void\n /** Optional controls displayed before the submit button (e.g., checkboxes, toggles, dropdowns) */\n options(): void\n /** Custom text or content for the submit button (defaults to \"Continue\") */\n submit(): void\n}>()\n\nconst { cx } = useBindCx()\n\n/** Handle form submission, only emit if not disabled */\nconst handleSubmit = (): void => {\n if (!disabled) {\n emit('submit')\n }\n}\n</script>\n\n<template>\n <form\n class=\"flex w-full flex-col gap-3\"\n @keydown.enter.stop\n @submit.prevent.stop=\"handleSubmit\">\n <!-- Main content area with minimum height and rounded corners -->\n <div v-bind=\"cx('relative flex min-h-20 flex-col rounded')\">\n <slot />\n </div>\n\n <!-- Action bar with optional controls and submit button -->\n <div class=\"flex gap-2\">\n <!-- Optional controls slot (e.g., checkboxes, toggles) -->\n <div class=\"flex max-h-8 flex-1\">\n <slot name=\"options\" />\n </div>\n\n <!-- Submit button with customizable text -->\n <ScalarButton\n class=\"max-h-8 px-3 text-xs\"\n :disabled=\"disabled\"\n :loader\n type=\"submit\">\n <slot name=\"submit\">Continue</slot>\n </ScalarButton>\n </div>\n </form>\n</template>\n"],"mappings":";;;;;;;CA6BE,MAAM;;;;;;;;;;;;;;EAgBR,MAAM,OAAO;EAkBb,MAAM,EAAE,OAAO,UAAU;;EAGzB,MAAM,qBAA2B;GAC/B,IAAI,CAAC,QAAA,UACH,KAAK,QAAQ;EAEjB;;uBAIE,mBAyBO,QAAA;IAxBL,OAAM;IACL,WAAO,OAAA,OAAA,OAAA,KAAA,SAAA,oBAAR,CAAA,GAAmB,CAAA,MAAA,CAAA,GAAA,CAAA,OAAA,CAAA;IAClB,UAAM,cAAe,cAAY,CAAA,WAAA,MAAA,CAAA;OAElC,mBAEM,OAAA,eAAA,mBAFO,MAAA,EAAA,CAAE,CAAA,yCAAA,CAAA,CAAA,GAAA,CACb,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,EAAA,GAIV,mBAcM,OAdN,YAcM,CAZJ,mBAEM,OAFN,YAEM,CADJ,WAAuB,KAAA,QAAA,SAAA,CAAA,CAAA,GAIzB,YAMe,MAAA,YAAA,GAAA;IALb,OAAM;IACL,UAAU,QAAA;IACV,QAAA,QAAA;IACD,MAAK;;2BAC8B,CAAnC,WAAmC,KAAA,QAAA,UAAA,CAAA,SAAA,CAAA,OAAA,OAAA,OAAA,KAAA,gBAAf,YAAQ,EAAA,EAAA,CAAA,CAAA,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { computed, createElementBlock, defineComponent, mergeProps, nextTick, onMounted, openBlock, ref, vModelText, withDirectives, withKeys } from "vue";
2
2
  //#region src/v2/features/command-palette/components/CommandActionInput.vue?vue&type=script&setup=true&lang.ts
3
3
  var _hoisted_1 = ["placeholder"];
4
- var CommandActionInput_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
4
+ var CommandActionInput_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
5
5
  name: "CommandActionInput",
6
6
  inheritAttrs: false,
7
7
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"CommandActionInput.vue.script.js","names":["$attrs"],"sources":["../../../../../src/v2/features/command-palette/components/CommandActionInput.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Command Action Input Component\n *\n * A textarea input component for command palette actions.\n * Supports v-model binding, auto-focus, and special keyboard handling:\n * - Enter submits the parent form (unless Shift is held)\n * - Backspace emits delete event when input is empty (for navigation back)\n *\n * @example\n * <CommandActionInput\n * v-model=\"inputValue\"\n * placeholder=\"Enter name...\"\n * :autofocus=\"true\"\n * @delete=\"handleBack\"\n * />\n */\nexport default {\n name: 'CommandActionInput',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref } from 'vue'\n\nconst {\n modelValue,\n placeholder,\n autofocus = true,\n} = defineProps<{\n /** Current value of the input */\n modelValue?: string\n /** Placeholder text shown when input is empty */\n placeholder?: string\n /** Whether to automatically focus the input when mounted */\n autofocus?: boolean\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the input value changes (v-model support) */\n (event: 'update:modelValue', value: string): void\n /** Emitted when backspace is pressed on empty input for navigation back */\n (event: 'delete', keyboardEvent: KeyboardEvent): void\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst input = ref<HTMLTextAreaElement | null>(null)\n\n/**\n * Two-way binding computed property for v-model support.\n * Ensures we always have a string value even if modelValue is undefined.\n */\nconst model = computed<string>({\n get: () => modelValue ?? '',\n set: (value) => emit('update:modelValue', value),\n})\n\n/**\n * Auto-focus the input after mounting if autofocus prop is true.\n * Uses nextTick to ensure the DOM is ready before focusing.\n */\nonMounted(() => {\n nextTick(() => {\n if (autofocus) {\n input.value?.focus()\n }\n })\n})\n\n/**\n * Handles Enter key to submit the parent form.\n * Shift+Enter is ignored to allow multi-line input if needed.\n */\nconst handleEnter = (event: KeyboardEvent): void => {\n if (event.shiftKey || !event.target) {\n return\n }\n\n event.preventDefault()\n\n const target = event.target as HTMLTextAreaElement\n const submitEvent = new Event('submit', { cancelable: true })\n target.form?.dispatchEvent(submitEvent)\n}\n\n/**\n * Handles Backspace key when input is empty.\n * Emits delete event to allow parent to navigate back or undo the last action.\n */\nconst handleDelete = (event: KeyboardEvent): void => {\n if (model.value !== '') {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n emit('delete', event)\n}\n</script>\n\n<template>\n <textarea\n id=\"command-action-input\"\n ref=\"input\"\n v-model=\"model\"\n class=\"min-h-8 w-full flex-1 resize-none border border-transparent py-1.5 pl-8.5 text-sm outline-none focus:border-b-1\"\n :placeholder=\"placeholder ?? ''\"\n wrap=\"hard\"\n v-bind=\"$attrs\"\n @keydown.delete=\"handleDelete\"\n @keydown.enter=\"handleEnter\" />\n</template>\n"],"mappings":";;;;CAkBE,MAAM;;;;;;;;;;;;EAoBR,MAAM,OAAO;EASb,MAAM,QAAQ,IAAgC,KAAI;;;;;EAMlD,MAAM,QAAQ,SAAiB;GAC7B,WAAW,QAAA,cAAc;GACzB,MAAM,UAAU,KAAK,qBAAqB,MAAM;GACjD,CAAA;;;;;AAMD,kBAAgB;AACd,kBAAe;AACb,QAAI,QAAA,UACF,OAAM,OAAO,OAAM;KAEtB;IACF;;;;;EAMD,MAAM,eAAe,UAA+B;AAClD,OAAI,MAAM,YAAY,CAAC,MAAM,OAC3B;AAGF,SAAM,gBAAe;GAErB,MAAM,SAAS,MAAM;GACrB,MAAM,cAAc,IAAI,MAAM,UAAU,EAAE,YAAY,MAAM,CAAA;AAC5D,UAAO,MAAM,cAAc,YAAW;;;;;;EAOxC,MAAM,gBAAgB,UAA+B;AACnD,OAAI,MAAM,UAAU,GAClB;AAGF,SAAM,gBAAe;AACrB,SAAM,iBAAgB;AACtB,QAAK,UAAU,MAAK;;;uCAKpB,mBASiC,YATjC,WASiC;IAR/B,IAAG;aACC;IAAJ,KAAI;uEACU,QAAA;IACd,OAAM;IACL,aAAa,QAAA,eAAW;IACzB,MAAK;MACGA,KAAAA,QAAM,EACb,WAAO,CAAA,SAAS,cAAY,CAAA,SAAA,CAAA,EAAA,SACb,aAAW,CAAA,QAAA,CAAA,CAAA,EAAA,CAAA,EAAA,MAAA,IAAA,WAAA,GAAA,CAAA,CAAA,YANlB,MAAA,MAAK,CAAA,CAAA"}
1
+ {"version":3,"file":"CommandActionInput.vue.script.js","names":["$attrs"],"sources":["../../../../../src/v2/features/command-palette/components/CommandActionInput.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Command Action Input Component\n *\n * A textarea input component for command palette actions.\n * Supports v-model binding, auto-focus, and special keyboard handling:\n * - Enter submits the parent form (unless Shift is held)\n * - Backspace emits delete event when input is empty (for navigation back)\n *\n * @example\n * <CommandActionInput\n * v-model=\"inputValue\"\n * placeholder=\"Enter name...\"\n * :autofocus=\"true\"\n * @delete=\"handleBack\"\n * />\n */\nexport default {\n name: 'CommandActionInput',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref } from 'vue'\n\nconst {\n modelValue,\n placeholder,\n autofocus = true,\n} = defineProps<{\n /** Current value of the input */\n modelValue?: string\n /** Placeholder text shown when input is empty */\n placeholder?: string\n /** Whether to automatically focus the input when mounted */\n autofocus?: boolean\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the input value changes (v-model support) */\n (event: 'update:modelValue', value: string): void\n /** Emitted when backspace is pressed on empty input for navigation back */\n (event: 'delete', keyboardEvent: KeyboardEvent): void\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst input = ref<HTMLTextAreaElement | null>(null)\n\n/**\n * Two-way binding computed property for v-model support.\n * Ensures we always have a string value even if modelValue is undefined.\n */\nconst model = computed<string>({\n get: () => modelValue ?? '',\n set: (value) => emit('update:modelValue', value),\n})\n\n/**\n * Auto-focus the input after mounting if autofocus prop is true.\n * Uses nextTick to ensure the DOM is ready before focusing.\n */\nonMounted(() => {\n nextTick(() => {\n if (autofocus) {\n input.value?.focus()\n }\n })\n})\n\n/**\n * Handles Enter key to submit the parent form.\n * Shift+Enter is ignored to allow multi-line input if needed.\n */\nconst handleEnter = (event: KeyboardEvent): void => {\n if (event.shiftKey || !event.target) {\n return\n }\n\n event.preventDefault()\n\n const target = event.target as HTMLTextAreaElement\n const submitEvent = new Event('submit', { cancelable: true })\n target.form?.dispatchEvent(submitEvent)\n}\n\n/**\n * Handles Backspace key when input is empty.\n * Emits delete event to allow parent to navigate back or undo the last action.\n */\nconst handleDelete = (event: KeyboardEvent): void => {\n if (model.value !== '') {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n emit('delete', event)\n}\n</script>\n\n<template>\n <textarea\n id=\"command-action-input\"\n ref=\"input\"\n v-model=\"model\"\n class=\"min-h-8 w-full flex-1 resize-none border border-transparent py-1.5 pl-8.5 text-sm outline-none focus:border-b-1\"\n :placeholder=\"placeholder ?? ''\"\n wrap=\"hard\"\n v-bind=\"$attrs\"\n @keydown.delete=\"handleDelete\"\n @keydown.enter=\"handleEnter\" />\n</template>\n"],"mappings":";;;;CAkBE,MAAM;;;;;;;;;;;;EAoBR,MAAM,OAAO;EASb,MAAM,QAAQ,IAAgC,IAAI;;;;;EAMlD,MAAM,QAAQ,SAAiB;GAC7B,WAAW,QAAA,cAAc;GACzB,MAAM,UAAU,KAAK,qBAAqB,KAAK;EACjD,CAAC;;;;;EAMD,gBAAgB;GACd,eAAe;IACb,IAAI,QAAA,WACF,MAAM,OAAO,MAAM;GAEvB,CAAC;EACH,CAAC;;;;;EAMD,MAAM,eAAe,UAA+B;GAClD,IAAI,MAAM,YAAY,CAAC,MAAM,QAC3B;GAGF,MAAM,eAAe;GAErB,MAAM,SAAS,MAAM;GACrB,MAAM,cAAc,IAAI,MAAM,UAAU,EAAE,YAAY,KAAK,CAAC;GAC5D,OAAO,MAAM,cAAc,WAAW;EACxC;;;;;EAMA,MAAM,gBAAgB,UAA+B;GACnD,IAAI,MAAM,UAAU,IAClB;GAGF,MAAM,eAAe;GACrB,MAAM,gBAAgB;GACtB,KAAK,UAAU,KAAK;EACtB;;uCAIE,mBASiC,YATjC,WASiC;IAR/B,IAAG;aACC;IAAJ,KAAI;uEACU,QAAA;IACd,OAAM;IACL,aAAa,QAAA,eAAW;IACzB,MAAK;MACGA,KAAAA,QAAM,EACb,WAAO,CAAA,SAAS,cAAY,CAAA,QAAA,CAAA,GAAA,SACb,aAAW,CAAA,OAAA,CAAA,CAAA,EAAA,CAAA,GAAA,MAAA,IAAA,UAAA,IAAA,CAAA,CAAA,YANlB,MAAA,KAAK,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/environments/EnvironmentsList.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2EAA2E,CAAA;AAQpH,KAAK,WAAW,GAAG;IACb,kEAAkE;IAClE,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,uBAAuB,CAAC,CAAC,CAAA;IACvE,mDAAmD;IACnD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,GAAG,cAAc,CAAC;AAoLvB,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"EnvironmentsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/environments/EnvironmentsList.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2EAA2E,CAAA;AAQpH,KAAK,WAAW,GAAG;IACb,kEAAkE;IAClE,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,uBAAuB,CAAC,CAAC,CAAA;IACvE,mDAAmD;IACnD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,GAAG,cAAc,CAAC;AAwLvB,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -7,7 +7,7 @@ import { ScalarIconPlus } from "@scalar/icons";
7
7
  import { useModal } from "@scalar/components/modal";
8
8
  //#region src/v2/features/environments/EnvironmentsList.vue?vue&type=script&setup=true&lang.ts
9
9
  var _hoisted_1 = { class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4" };
10
- var EnvironmentsList_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
10
+ var EnvironmentsList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
11
11
  __name: "EnvironmentsList",
12
12
  props: {
13
13
  environments: {},
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentsList.vue.script.js","names":[],"sources":["../../../../src/v2/features/environments/EnvironmentsList.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { useModal } from '@scalar/components/modal'\nimport { ScalarIconPlus } from '@scalar/icons'\nimport type {\n CollectionType,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironments } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { ref } from 'vue'\n\nimport EnvironmentCreateModal from '@/v2/features/environments/components/EnvironmentCreateModal.vue'\nimport EnvironmentDeleteModal from '@/v2/features/environments/components/EnvironmentDeleteModal.vue'\n\nimport EnvironmentComponent from './components/Environment.vue'\n\nconst { environments, eventBus, collectionType, activeEnvironment } =\n defineProps<\n {\n /** List of environments, ensured to be non-nullable for safety */\n environments: NonNullable<XScalarEnvironments['x-scalar-environments']>\n /** Event bus to handle workspace-related events */\n eventBus: WorkspaceEventBus\n /** The currently active environment name */\n activeEnvironment?: string\n } & CollectionType\n >()\n\nconst createEnvironmentModalState = useModal()\nconst deleteEnvironmentModalState = useModal()\n\n/** Track the currently selected environment for editing or deleting */\nconst selectedEnvironmentName = ref<string | null>(null)\n\n/** Opens the delete modal */\nconst openDeleteModal = (name: string) => {\n selectedEnvironmentName.value = name\n deleteEnvironmentModalState.show()\n}\n\n/** Deletes the selected environment */\nconst deleteEnvironment = () => {\n if (!selectedEnvironmentName.value) {\n return\n }\n eventBus.emit('environment:delete:environment', {\n environmentName: selectedEnvironmentName.value,\n collectionType,\n })\n}\n\n/** Opens the upsert modal, leave name empty for add */\nconst openUpsertModal = (name?: string) => {\n selectedEnvironmentName.value = name ?? null\n createEnvironmentModalState.show()\n}\n</script>\n\n<template>\n <EnvironmentComponent\n v-for=\"[environmentName, environment] in Object.entries(environments)\"\n :key=\"environmentName\"\n :collectionType=\"collectionType\"\n :environment\n :environmentName\n :eventBus=\"eventBus\"\n :isActive=\"activeEnvironment === environmentName\"\n @delete=\"() => openDeleteModal(environmentName)\"\n @edit=\"() => openUpsertModal(environmentName)\" />\n\n <!-- Add Environment CTA -->\n <div\n class=\"text-c-3 flex h-full items-center justify-center rounded-lg border p-4\">\n <ScalarButton\n class=\"hover:bg-b-2 hover:text-c-1 flex items-center gap-2\"\n size=\"xs\"\n variant=\"ghost\"\n @click=\"() => openUpsertModal()\">\n <ScalarIconPlus />\n Add Environment\n </ScalarButton>\n </div>\n\n <!-- Upsert Modal -->\n <EnvironmentCreateModal\n :collectionType=\"collectionType\"\n :environments\n :eventBus\n :selectedEnvironmentName\n :state=\"createEnvironmentModalState\" />\n\n <!-- Delete Modal -->\n <EnvironmentDeleteModal\n :name=\"selectedEnvironmentName\"\n :state=\"deleteEnvironmentModalState\"\n @submit=\"deleteEnvironment\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EA4BA,MAAM,8BAA8B,UAAS;EAC7C,MAAM,8BAA8B,UAAS;;EAG7C,MAAM,0BAA0B,IAAmB,KAAI;;EAGvD,MAAM,mBAAmB,SAAiB;AACxC,2BAAwB,QAAQ;AAChC,+BAA4B,MAAK;;;EAInC,MAAM,0BAA0B;AAC9B,OAAI,CAAC,wBAAwB,MAC3B;AAEF,WAAA,SAAS,KAAK,kCAAkC;IAC9C,iBAAiB,wBAAwB;IACzC,gBAAa,QAAA;IACd,CAAA;;;EAIH,MAAM,mBAAmB,SAAkB;AACzC,2BAAwB,QAAQ,QAAQ;AACxC,+BAA4B,MAAK;;;;sBAKjC,mBASmD,UAAA,MAAA,WARR,OAAO,QAAQ,QAAA,aAAY,GAAA,CAA5D,iBAAiB,iBAAW;yBADtC,YASmD,qBAAA;MAPhD,KAAK;MACL,gBAAgB,QAAA;MAChB;MACA;MACA,UAAU,QAAA;MACV,UAAU,QAAA,sBAAsB;MAChC,gBAAc,gBAAgB,gBAAe;MAC7C,cAAY,gBAAgB,gBAAe;;;;;;;;;;;IAG9C,mBAUM,OAVN,YAUM,CARJ,YAOe,MAAA,aAAA,EAAA;KANb,OAAM;KACN,MAAK;KACL,SAAQ;KACP,SAAK,OAAA,OAAA,OAAA,WAAQ,iBAAe;;4BACX,CAAlB,YAAkB,MAAA,eAAA,CAAA,EAAA,OAAA,OAAA,OAAA,KAAA,gBAAA,qBAEpB,GAAA,EAAA,CAAA;;;IAIF,YAKyC,gCAAA;KAJtC,gBAAgB,QAAA;KAChB,cAAA,QAAA;KACA,UAAA,QAAA;KACA,yBAAA,wBAAA;KACA,OAAO,MAAA,4BAA2B;;;;;;;;IAGrC,YAGgC,gCAAA;KAF7B,MAAM,wBAAA;KACN,OAAO,MAAA,4BAA2B;KAClC,UAAQ"}
1
+ {"version":3,"file":"EnvironmentsList.vue.script.js","names":[],"sources":["../../../../src/v2/features/environments/EnvironmentsList.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { useModal } from '@scalar/components/modal'\nimport { ScalarIconPlus } from '@scalar/icons'\nimport type {\n CollectionType,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironments } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { ref } from 'vue'\n\nimport EnvironmentCreateModal from '@/v2/features/environments/components/EnvironmentCreateModal.vue'\nimport EnvironmentDeleteModal from '@/v2/features/environments/components/EnvironmentDeleteModal.vue'\n\nimport EnvironmentComponent from './components/Environment.vue'\n\nconst { environments, eventBus, collectionType, activeEnvironment } =\n defineProps<\n {\n /** List of environments, ensured to be non-nullable for safety */\n environments: NonNullable<XScalarEnvironments['x-scalar-environments']>\n /** Event bus to handle workspace-related events */\n eventBus: WorkspaceEventBus\n /** The currently active environment name */\n activeEnvironment?: string\n } & CollectionType\n >()\n\nconst createEnvironmentModalState = useModal()\nconst deleteEnvironmentModalState = useModal()\n\n/** Track the currently selected environment for editing or deleting */\nconst selectedEnvironmentName = ref<string | null>(null)\n\n/** Opens the delete modal */\nconst openDeleteModal = (name: string) => {\n selectedEnvironmentName.value = name\n deleteEnvironmentModalState.show()\n}\n\n/** Deletes the selected environment */\nconst deleteEnvironment = () => {\n if (!selectedEnvironmentName.value) {\n return\n }\n eventBus.emit('environment:delete:environment', {\n environmentName: selectedEnvironmentName.value,\n collectionType,\n })\n}\n\n/** Opens the upsert modal, leave name empty for add */\nconst openUpsertModal = (name?: string) => {\n selectedEnvironmentName.value = name ?? null\n createEnvironmentModalState.show()\n}\n</script>\n\n<template>\n <EnvironmentComponent\n v-for=\"[environmentName, environment] in Object.entries(environments)\"\n :key=\"environmentName\"\n :collectionType=\"collectionType\"\n :environment\n :environmentName\n :eventBus=\"eventBus\"\n :isActive=\"activeEnvironment === environmentName\"\n @delete=\"() => openDeleteModal(environmentName)\"\n @edit=\"() => openUpsertModal(environmentName)\" />\n\n <!-- Add Environment CTA -->\n <div\n class=\"text-c-3 flex h-full items-center justify-center rounded-lg border p-4\">\n <ScalarButton\n class=\"hover:bg-b-2 hover:text-c-1 flex items-center gap-2\"\n size=\"xs\"\n variant=\"ghost\"\n @click=\"() => openUpsertModal()\">\n <ScalarIconPlus />\n Add Environment\n </ScalarButton>\n </div>\n\n <!-- Upsert Modal -->\n <EnvironmentCreateModal\n :collectionType=\"collectionType\"\n :environments\n :eventBus\n :selectedEnvironmentName\n :state=\"createEnvironmentModalState\" />\n\n <!-- Delete Modal -->\n <EnvironmentDeleteModal\n :name=\"selectedEnvironmentName\"\n :state=\"deleteEnvironmentModalState\"\n @submit=\"deleteEnvironment\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EA4BA,MAAM,8BAA8B,SAAS;EAC7C,MAAM,8BAA8B,SAAS;;EAG7C,MAAM,0BAA0B,IAAmB,IAAI;;EAGvD,MAAM,mBAAmB,SAAiB;GACxC,wBAAwB,QAAQ;GAChC,4BAA4B,KAAK;EACnC;;EAGA,MAAM,0BAA0B;GAC9B,IAAI,CAAC,wBAAwB,OAC3B;GAEF,QAAA,SAAS,KAAK,kCAAkC;IAC9C,iBAAiB,wBAAwB;IACzC,gBAAa,QAAA;GACf,CAAC;EACH;;EAGA,MAAM,mBAAmB,SAAkB;GACzC,wBAAwB,QAAQ,QAAQ;GACxC,4BAA4B,KAAK;EACnC;;;sBAIE,mBASmD,UAAA,MAAA,WARR,OAAO,QAAQ,QAAA,YAAY,IAAA,CAA5D,iBAAiB,iBAAW;yBADtC,YASmD,qBAAA;MAPhD,KAAK;MACL,gBAAgB,QAAA;MAChB;MACA;MACA,UAAU,QAAA;MACV,UAAU,QAAA,sBAAsB;MAChC,gBAAc,gBAAgB,eAAe;MAC7C,cAAY,gBAAgB,eAAe;;;;;;;;;;;IAG9C,mBAUM,OAVN,YAUM,CARJ,YAOe,MAAA,YAAA,GAAA;KANb,OAAM;KACN,MAAK;KACL,SAAQ;KACP,SAAK,OAAA,OAAA,OAAA,WAAQ,gBAAe;;4BACX,CAAlB,YAAkB,MAAA,cAAA,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,gBAAA,qBAEpB,EAAA,EAAA,CAAA;;;IAIF,YAKyC,gCAAA;KAJtC,gBAAgB,QAAA;KAChB,cAAA,QAAA;KACA,UAAA,QAAA;KACA,yBAAA,wBAAA;KACA,OAAO,MAAA,2BAAA;;;;;;;;IAGV,YAGgC,gCAAA;KAF7B,MAAM,wBAAA;KACN,OAAO,MAAA,2BAAA;KACP,UAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/Environment.vue"],"names":[],"mappings":"AAuFA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAInH,KAAK,WAAW,GAAG;IACf,WAAW,EAAE,kBAAkB,CAAA;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,cAAc,CAAC;AA6LrB,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/Environment.vue"],"names":[],"mappings":"AAuFA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAInH,KAAK,WAAW,GAAG;IACf,WAAW,EAAE,kBAAkB,CAAA;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,cAAc,CAAC;AA+LrB,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -12,7 +12,7 @@ var _hoisted_4 = {
12
12
  title: "This is the active environment"
13
13
  };
14
14
  var _hoisted_5 = { class: "hidden flex-row items-center gap-1 group-hover:flex" };
15
- var Environment_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
15
+ var Environment_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
16
16
  __name: "Environment",
17
17
  props: {
18
18
  environment: {},
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.vue.script.js","names":[],"sources":["../../../../../src/v2/features/environments/components/Environment.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconNotePencil, ScalarIconTrash } from '@scalar/icons'\nimport type {\n CollectionType,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\n\nimport EnvironmentVariablesTable from '@/v2/features/environments/components/EnvironmentVariablesTable.vue'\n\nconst {\n environmentName,\n environment,\n eventBus,\n collectionType,\n isActive = false,\n} = defineProps<\n {\n environment: XScalarEnvironment\n environmentName: string\n eventBus: WorkspaceEventBus\n isActive?: boolean\n } & CollectionType\n>()\n\nconst emit = defineEmits<{\n (e: 'edit'): void\n (e: 'delete'): void\n}>()\n</script>\n<template>\n <div\n class=\"group relative rounded-lg border transition-colors\"\n :class=\"isActive ? 'border-c-accent bg-c-accent/5' : ''\">\n <!-- Info -->\n <div\n class=\"flex justify-between rounded-t-lg px-1 py-1 text-sm\"\n :class=\"isActive ? 'bg-c-accent/10' : 'bg-b-2'\">\n <div class=\"flex items-center gap-1.5\">\n <div class=\"flex h-6 w-6 items-center justify-center p-1\">\n <span\n class=\"h-2.5 w-2.5 rounded-full\"\n :style=\"{ backgroundColor: environment.color }\"></span>\n </div>\n <span class=\"px-1 py-0.5 text-sm font-medium\">\n {{ environmentName }}\n </span>\n <!-- Active badge -->\n <span\n v-if=\"isActive\"\n class=\"bg-c-accent text-b-1 flex items-center gap-1 rounded px-1.5 py-0.5 text-xs font-medium\"\n title=\"This is the active environment\">\n <span class=\"size-1.5 rounded-full bg-current\"></span>\n Active\n </span>\n </div>\n\n <!-- Actions -->\n <div class=\"hidden flex-row items-center gap-1 group-hover:flex\">\n <ScalarIconButton\n :icon=\"ScalarIconNotePencil\"\n label=\"Edit Environment\"\n size=\"sm\"\n @click=\"emit('edit')\" />\n\n <ScalarIconButton\n :icon=\"ScalarIconTrash\"\n label=\"Delete Environment\"\n size=\"sm\"\n @click=\"emit('delete')\" />\n </div>\n </div>\n\n <!-- Variables Table -->\n <EnvironmentVariablesTable\n :collectionType\n :environment\n :environmentName\n :eventBus />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BA,MAAM,OAAO;;uBAMX,mBAgDM,OAAA,EA/CJ,OAAK,eAAA,CAAC,sDACE,QAAA,WAAQ,kCAAA,GAAA,CAAA,EAAA,EAAA,CAEhB,mBAoCM,OAAA,EAnCJ,OAAK,eAAA,CAAC,uDACE,QAAA,WAAQ,mBAAA,SAAA,CAAA,EAAA,EAAA,CAChB,mBAiBM,OAjBN,YAiBM;IAhBJ,mBAIM,OAJN,YAIM,CAHJ,mBAEyD,QAAA;KADvD,OAAM;KACL,OAAK,eAAA,EAAA,iBAAqB,QAAA,YAAY,OAAK,CAAA;;IAEhD,mBAEO,QAFP,YAEO,gBADF,QAAA,gBAAe,EAAA,EAAA;IAIZ,QAAA,YAAA,WAAA,EADR,mBAMO,QANP,YAMO,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAFL,mBAAsD,QAAA,EAAhD,OAAM,oCAAkC,EAAA,MAAA,GAAA,EAAA,gBAAQ,YAExD,GAAA,CAAA,EAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;OAIF,mBAYM,OAZN,YAYM,CAXJ,YAI0B,MAAA,iBAAA,EAAA;IAHvB,MAAM,MAAA,qBAAoB;IAC3B,OAAM;IACN,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,OAAA;0BAEd,YAI4B,MAAA,iBAAA,EAAA;IAHzB,MAAM,MAAA,gBAAe;IACtB,OAAM;IACN,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,SAAA;iCAKlB,YAIc,mCAAA;IAHX,gBAAA,QAAA;IACA,aAAA,QAAA;IACA,iBAAA,QAAA;IACA,UAAA,QAAA"}
1
+ {"version":3,"file":"Environment.vue.script.js","names":[],"sources":["../../../../../src/v2/features/environments/components/Environment.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconNotePencil, ScalarIconTrash } from '@scalar/icons'\nimport type {\n CollectionType,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\n\nimport EnvironmentVariablesTable from '@/v2/features/environments/components/EnvironmentVariablesTable.vue'\n\nconst {\n environmentName,\n environment,\n eventBus,\n collectionType,\n isActive = false,\n} = defineProps<\n {\n environment: XScalarEnvironment\n environmentName: string\n eventBus: WorkspaceEventBus\n isActive?: boolean\n } & CollectionType\n>()\n\nconst emit = defineEmits<{\n (e: 'edit'): void\n (e: 'delete'): void\n}>()\n</script>\n<template>\n <div\n class=\"group relative rounded-lg border transition-colors\"\n :class=\"isActive ? 'border-c-accent bg-c-accent/5' : ''\">\n <!-- Info -->\n <div\n class=\"flex justify-between rounded-t-lg px-1 py-1 text-sm\"\n :class=\"isActive ? 'bg-c-accent/10' : 'bg-b-2'\">\n <div class=\"flex items-center gap-1.5\">\n <div class=\"flex h-6 w-6 items-center justify-center p-1\">\n <span\n class=\"h-2.5 w-2.5 rounded-full\"\n :style=\"{ backgroundColor: environment.color }\"></span>\n </div>\n <span class=\"px-1 py-0.5 text-sm font-medium\">\n {{ environmentName }}\n </span>\n <!-- Active badge -->\n <span\n v-if=\"isActive\"\n class=\"bg-c-accent text-b-1 flex items-center gap-1 rounded px-1.5 py-0.5 text-xs font-medium\"\n title=\"This is the active environment\">\n <span class=\"size-1.5 rounded-full bg-current\"></span>\n Active\n </span>\n </div>\n\n <!-- Actions -->\n <div class=\"hidden flex-row items-center gap-1 group-hover:flex\">\n <ScalarIconButton\n :icon=\"ScalarIconNotePencil\"\n label=\"Edit Environment\"\n size=\"sm\"\n @click=\"emit('edit')\" />\n\n <ScalarIconButton\n :icon=\"ScalarIconTrash\"\n label=\"Delete Environment\"\n size=\"sm\"\n @click=\"emit('delete')\" />\n </div>\n </div>\n\n <!-- Variables Table -->\n <EnvironmentVariablesTable\n :collectionType\n :environment\n :environmentName\n :eventBus />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BA,MAAM,OAAO;;uBAMX,mBAgDM,OAAA,EA/CJ,OAAK,eAAA,CAAC,sDACE,QAAA,WAAQ,kCAAA,EAAA,CAAA,EAAA,GAAA,CAEhB,mBAoCM,OAAA,EAnCJ,OAAK,eAAA,CAAC,uDACE,QAAA,WAAQ,mBAAA,QAAA,CAAA,EAAA,GAAA,CAChB,mBAiBM,OAjBN,YAiBM;IAhBJ,mBAIM,OAJN,YAIM,CAHJ,mBAEyD,QAAA;KADvD,OAAM;KACL,OAAK,eAAA,EAAA,iBAAqB,QAAA,YAAY,MAAK,CAAA;;IAEhD,mBAEO,QAFP,YAEO,gBADF,QAAA,eAAe,GAAA,CAAA;IAIZ,QAAA,YAAA,UAAA,GADR,mBAMO,QANP,YAMO,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAFL,mBAAsD,QAAA,EAAhD,OAAM,mCAAkC,GAAA,MAAA,EAAA,GAAA,gBAAQ,YAExD,EAAA,CAAA,EAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;OAIF,mBAYM,OAZN,YAYM,CAXJ,YAI0B,MAAA,gBAAA,GAAA;IAHvB,MAAM,MAAA,oBAAA;IACP,OAAM;IACN,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,MAAA;0BAEd,YAI4B,MAAA,gBAAA,GAAA;IAHzB,MAAM,MAAA,eAAA;IACP,OAAM;IACN,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,QAAA;iCAKlB,YAIc,mCAAA;IAHX,gBAAA,QAAA;IACA,aAAA,QAAA;IACA,iBAAA,QAAA;IACA,UAAA,QAAA"}