@scalar/api-client 3.8.1 → 3.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  3. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  4. package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -1
  5. package/dist/components/HttpMethod/HttpMethod.vue.script.js +2 -1
  6. package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -1
  7. package/dist/components/SectionFilter.vue.js +1 -1
  8. package/dist/components/SectionFilter.vue.js.map +1 -1
  9. package/dist/components/SectionFilter.vue.script.js +1 -1
  10. package/dist/components/SectionFilter.vue.script.js.map +1 -1
  11. package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -1
  12. package/dist/components/Server/ServerVariablesSelect.vue.script.js +2 -1
  13. package/dist/components/Server/ServerVariablesSelect.vue.script.js.map +1 -1
  14. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -1
  15. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js +1 -1
  16. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js.map +1 -1
  17. package/dist/components/ViewLayout/ViewLayout.vue.js.map +1 -1
  18. package/dist/components/ViewLayout/ViewLayout.vue.script.js +1 -1
  19. package/dist/components/ViewLayout/ViewLayout.vue.script.js.map +1 -1
  20. package/dist/components/ViewLayout/ViewLayoutSection.vue.js.map +1 -1
  21. package/dist/components/ViewLayout/ViewLayoutSection.vue.script.js +1 -1
  22. package/dist/components/ViewLayout/ViewLayoutSection.vue.script.js.map +1 -1
  23. package/dist/plugins/posthog/sanitize-event-payload.js +2 -2
  24. package/dist/plugins/posthog/sanitize-event-payload.js.map +1 -1
  25. package/dist/style.css +105 -105
  26. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  27. package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
  28. package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
  29. package/dist/v2/blocks/operation-block/components/Header.vue.script.js +6 -1
  30. package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
  31. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts +4 -0
  32. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts.map +1 -1
  33. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
  34. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
  35. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js +7 -1
  36. package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +1 -1
  37. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js.map +1 -1
  38. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.script.js +2 -1
  39. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.script.js.map +1 -1
  40. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  41. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js.map +1 -1
  42. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js +5 -1
  43. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js.map +1 -1
  44. package/dist/v2/blocks/operation-code-sample/helpers/filter-clients-by-query.js.map +1 -1
  45. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  46. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +171 -15
  47. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js.map +1 -1
  48. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  49. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +14 -1
  50. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js.map +1 -1
  51. package/dist/v2/blocks/operation-code-sample/types.d.ts +1 -1
  52. package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -1
  53. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  54. package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
  55. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +1 -1
  56. package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
  57. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  58. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  59. package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
  60. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +3 -1
  61. package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
  62. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  63. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
  64. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +4 -1
  65. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
  66. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  67. package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
  68. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js +2 -1
  69. package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +1 -1
  70. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  71. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
  72. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +3 -1
  73. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
  74. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
  75. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
  76. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +2 -1
  77. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -1
  78. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -1
  79. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +74 -3
  80. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
  81. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  82. package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
  83. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +1 -1
  84. package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
  85. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
  86. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +1 -1
  87. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -1
  88. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
  89. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
  90. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
  91. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +54 -12
  92. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
  93. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +1 -1
  94. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js.map +1 -1
  95. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js +1 -1
  96. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js.map +1 -1
  97. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
  98. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js.map +1 -1
  99. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js +2 -1
  100. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +1 -1
  101. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
  102. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +1 -1
  103. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -1
  104. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  105. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
  106. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +1 -1
  107. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
  108. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  109. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +1 -1
  110. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
  111. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +2 -1
  112. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -1
  113. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  114. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  115. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
  116. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +19 -4
  117. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
  118. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
  119. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
  120. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +2 -1
  121. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
  122. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -1
  123. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js +3 -1
  124. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +1 -1
  125. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +1 -1
  126. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  127. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
  128. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +5 -1
  129. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
  130. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -1
  131. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js.map +1 -1
  132. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js +2 -1
  133. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +1 -1
  134. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  135. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
  136. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +2 -1
  137. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
  138. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts +1 -1
  139. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
  140. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
  141. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +1 -1
  142. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -1
  143. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  144. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
  145. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +5 -1
  146. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
  147. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -1
  148. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
  149. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +2 -1
  150. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -1
  151. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
  152. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +1 -1
  153. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
  154. package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -1
  155. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js +1 -1
  156. package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +1 -1
  157. package/dist/v2/components/data-table/DataTable.vue.js.map +1 -1
  158. package/dist/v2/components/data-table/DataTable.vue.script.js +1 -1
  159. package/dist/v2/components/data-table/DataTable.vue.script.js.map +1 -1
  160. package/dist/v2/components/data-table/DataTableCell.vue.js.map +1 -1
  161. package/dist/v2/components/data-table/DataTableCell.vue.script.js +1 -1
  162. package/dist/v2/components/data-table/DataTableCell.vue.script.js.map +1 -1
  163. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -1
  164. package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -1
  165. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js +2 -1
  166. package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +1 -1
  167. package/dist/v2/components/data-table/DataTableHeader.vue.js.map +1 -1
  168. package/dist/v2/components/data-table/DataTableHeader.vue.script.js +1 -1
  169. package/dist/v2/components/data-table/DataTableHeader.vue.script.js.map +1 -1
  170. package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
  171. package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
  172. package/dist/v2/components/data-table/DataTableInput.vue.script.js +1 -1
  173. package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
  174. package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
  175. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js +4 -1
  176. package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +1 -1
  177. package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -1
  178. package/dist/v2/components/forms/ConfirmationForm.vue.script.js +1 -1
  179. package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +1 -1
  180. package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
  181. package/dist/v2/components/layout/CollapsibleSection.vue.script.js +1 -1
  182. package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
  183. package/dist/v2/components/modals/ModalClientContainer.vue.d.ts +1 -1
  184. package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
  185. package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
  186. package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
  187. package/dist/v2/components/modals/ModalClientContainer.vue.script.js +2 -1
  188. package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +1 -1
  189. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  190. package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
  191. package/dist/v2/components/server/ServerDropdown.vue.script.js +3 -1
  192. package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
  193. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
  194. package/dist/v2/components/server/ServerDropdownItem.vue.js +1 -1
  195. package/dist/v2/components/server/ServerDropdownItem.vue.js.map +1 -1
  196. package/dist/v2/components/server/ServerDropdownItem.vue.script.js +2 -1
  197. package/dist/v2/components/server/ServerDropdownItem.vue.script.js.map +1 -1
  198. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
  199. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  200. package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
  201. package/dist/v2/components/sidebar/Sidebar.vue.script.js +2 -1
  202. package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
  203. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +1 -1
  204. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  205. package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -1
  206. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js +1 -1
  207. package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +1 -1
  208. package/dist/v2/constants.js +1 -1
  209. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +1 -1
  210. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -1
  211. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js.map +1 -1
  212. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js +2 -1
  213. package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +1 -1
  214. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
  215. package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -1
  216. package/dist/v2/features/environments/EnvironmentsList.vue.script.js +2 -1
  217. package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +1 -1
  218. package/dist/v2/features/environments/components/Environment.vue.js.map +1 -1
  219. package/dist/v2/features/environments/components/Environment.vue.script.js +1 -1
  220. package/dist/v2/features/environments/components/Environment.vue.script.js.map +1 -1
  221. package/dist/v2/features/environments/components/EnvironmentColors.vue.js.map +1 -1
  222. package/dist/v2/features/environments/components/EnvironmentColors.vue.script.js +1 -1
  223. package/dist/v2/features/environments/components/EnvironmentColors.vue.script.js.map +1 -1
  224. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts +1 -1
  225. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
  226. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
  227. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +1 -1
  228. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -1
  229. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts +1 -1
  230. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
  231. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -1
  232. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js +2 -1
  233. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +1 -1
  234. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  235. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
  236. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +2 -1
  237. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
  238. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +1 -1
  239. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -1
  240. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js +1 -1
  241. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +1 -1
  242. package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
  243. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  244. package/dist/v2/features/modal/Modal.vue.js.map +1 -1
  245. package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
  246. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +1 -1
  247. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  248. package/dist/v2/features/modal/helpers/create-api-client-modal.js +1 -1
  249. package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
  250. package/dist/v2/features/modal/modal-events.d.ts +1 -1
  251. package/dist/v2/features/modal/modal-events.d.ts.map +1 -1
  252. package/dist/v2/features/modal/modal-events.js.map +1 -1
  253. package/dist/v2/features/search/components/DocumentSearchModal.vue.d.ts +1 -1
  254. package/dist/v2/features/search/components/DocumentSearchModal.vue.d.ts.map +1 -1
  255. package/dist/v2/features/search/components/DocumentSearchModal.vue.js +1 -1
  256. package/dist/v2/features/search/components/DocumentSearchModal.vue.js.map +1 -1
  257. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js +3 -1
  258. package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js.map +1 -1
  259. package/dist/v2/features/search/components/SearchResult.vue.js.map +1 -1
  260. package/dist/v2/features/search/components/SearchResult.vue.script.js +1 -1
  261. package/dist/v2/features/search/components/SearchResult.vue.script.js.map +1 -1
  262. package/dist/vue-styles.css +105 -105
  263. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableCheckbox.vue.script.js","names":["$emit"],"sources":["../../../../src/v2/components/data-table/DataTableCheckbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { cva, ScalarIcon } from '@scalar/components'\n\nimport DataTableCell from './DataTableCell.vue'\n\nwithDefaults(\n defineProps<{\n modelValue: boolean\n disabled?: boolean\n align?: 'left' | 'center'\n }>(),\n {\n align: 'center',\n },\n)\n\ndefineEmits<{\n (e: 'update:modelValue', v: boolean): void\n}>()\n\nconst variants = cva({\n base: 'w-8 h-8 flex items-center justify-center text-b-2 peer-checked:text-c-1 pointer-events-none absolute',\n variants: {\n align: {\n left: 'left-0',\n center: 'centered',\n },\n },\n})\n</script>\n<template>\n <DataTableCell class=\"group/cell relative flex min-w-8\">\n <input\n :checked=\"modelValue\"\n class=\"peer absolute inset-0 size-full cursor-pointer opacity-0 disabled:cursor-default\"\n :disabled=\"Boolean(disabled)\"\n type=\"checkbox\"\n @change=\"(e: any) => $emit('update:modelValue', e.target.checked)\" />\n <div :class=\"variants({ align })\">\n <div\n class=\"absolute m-auto size-3/4 rounded border-[1px] opacity-0\"\n :class=\"\n !disabled &&\n 'group-has-[:focus-visible]/cell:border-c-accent group-hover:opacity-100 group-has-[:focus-visible]/cell:opacity-100'\n \" />\n <ScalarIcon\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"2.5\" />\n </div>\n </DataTableCell>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAoBA,MAAM,WAAW,IAAI;GACnB,MAAM;GACN,UAAU,EACR,OAAO;IACL,MAAM;IACN,QAAQ;IACT,EACF;GACF,CAAA;;uBAGC,YAmBgB,uBAAA,EAnBD,OAAM,oCAAkC,EAAA;2BAMkB,CALvE,mBAKuE,SAAA;KAJpE,SAAS,QAAA;KACV,OAAM;KACL,UAAU,QAAQ,QAAA,SAAQ;KAC3B,MAAK;KACJ,UAAM,OAAA,OAAA,OAAA,MAAG,MAAWA,KAAAA,MAAK,qBAAsB,EAAE,OAAO,QAAO;8BAClE,mBAWM,OAAA,EAXA,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,OAAG,QAAA,OAAK,CAAA,CAAA,EAAA,EAAA,CAC3B,mBAKM,OAAA,EAJJ,OAAK,eAAA,CAAC,2DAAA,CACc,QAAA,YAAA,sHAAA,CAAA,EAAA,EAAA,MAAA,EAAA,EAItB,YAGoB,MAAA,WAAA,EAAA;KAFlB,MAAK;KACL,MAAK;KACL,WAAU"}
1
+ {"version":3,"file":"DataTableCheckbox.vue.script.js","names":["$emit"],"sources":["../../../../src/v2/components/data-table/DataTableCheckbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { cva } from '@scalar/use-hooks/useBindCx'\n\nimport DataTableCell from './DataTableCell.vue'\n\nwithDefaults(\n defineProps<{\n modelValue: boolean\n disabled?: boolean\n align?: 'left' | 'center'\n }>(),\n {\n align: 'center',\n },\n)\n\ndefineEmits<{\n (e: 'update:modelValue', v: boolean): void\n}>()\n\nconst variants = cva({\n base: 'w-8 h-8 flex items-center justify-center text-b-2 peer-checked:text-c-1 pointer-events-none absolute',\n variants: {\n align: {\n left: 'left-0',\n center: 'centered',\n },\n },\n})\n</script>\n<template>\n <DataTableCell class=\"group/cell relative flex min-w-8\">\n <input\n :checked=\"modelValue\"\n class=\"peer absolute inset-0 size-full cursor-pointer opacity-0 disabled:cursor-default\"\n :disabled=\"Boolean(disabled)\"\n type=\"checkbox\"\n @change=\"(e: any) => $emit('update:modelValue', e.target.checked)\" />\n <div :class=\"variants({ align })\">\n <div\n class=\"absolute m-auto size-3/4 rounded border-[1px] opacity-0\"\n :class=\"\n !disabled &&\n 'group-has-[:focus-visible]/cell:border-c-accent group-hover:opacity-100 group-has-[:focus-visible]/cell:opacity-100'\n \" />\n <ScalarIcon\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"2.5\" />\n </div>\n </DataTableCell>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAqBA,MAAM,WAAW,IAAI;GACnB,MAAM;GACN,UAAU,EACR,OAAO;IACL,MAAM;IACN,QAAQ;IACT,EACF;GACF,CAAA;;uBAGC,YAmBgB,uBAAA,EAnBD,OAAM,oCAAkC,EAAA;2BAMkB,CALvE,mBAKuE,SAAA;KAJpE,SAAS,QAAA;KACV,OAAM;KACL,UAAU,QAAQ,QAAA,SAAQ;KAC3B,MAAK;KACJ,UAAM,OAAA,OAAA,OAAA,MAAG,MAAWA,KAAAA,MAAK,qBAAsB,EAAE,OAAO,QAAO;8BAClE,mBAWM,OAAA,EAXA,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,OAAG,QAAA,OAAK,CAAA,CAAA,EAAA,EAAA,CAC3B,mBAKM,OAAA,EAJJ,OAAK,eAAA,CAAC,2DAAA,CACc,QAAA,YAAA,sHAAA,CAAA,EAAA,EAAA,MAAA,EAAA,EAItB,YAGoB,MAAA,WAAA,EAAA;KAFlB,MAAK;KACL,MAAK;KACL,WAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableHeader.vue.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/components'\n\nimport DataTableCell from './DataTableCell.vue'\n\nconst { cx } = useBindCx()\n</script>\n<template>\n <DataTableCell\n is=\"th\"\n v-bind=\"cx('items-center font-medium px-2 min-w-0 -outline-offset-1')\">\n <slot />\n </DataTableCell>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"DataTableHeader.vue.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nimport DataTableCell from './DataTableCell.vue'\n\nconst { cx } = useBindCx()\n</script>\n<template>\n <DataTableCell\n is=\"th\"\n v-bind=\"cx('items-center font-medium px-2 min-w-0 -outline-offset-1')\">\n <slot />\n </DataTableCell>\n</template>\n"],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import DataTableCell_default from "./DataTableCell.vue.js";
2
2
  import { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
3
- import { useBindCx } from "@scalar/components";
3
+ import { useBindCx } from "@scalar/use-hooks/useBindCx";
4
4
  //#region src/v2/components/data-table/DataTableHeader.vue?vue&type=script&setup=true&lang.ts
5
5
  var DataTableHeader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
6
6
  __name: "DataTableHeader",
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableHeader.vue.script.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/components'\n\nimport DataTableCell from './DataTableCell.vue'\n\nconst { cx } = useBindCx()\n</script>\n<template>\n <DataTableCell\n is=\"th\"\n v-bind=\"cx('items-center font-medium px-2 min-w-0 -outline-offset-1')\">\n <slot />\n </DataTableCell>\n</template>\n"],"mappings":";;;;;;;EAKA,MAAM,EAAE,OAAO,WAAU;;uBAGvB,YAIgB,uBAJhB,WAIgB,EAHd,IAAG,MAAI,EACC,MAAA,GAAE,CAAA,0DAAA,CAAA,EAAA;2BACF,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"DataTableHeader.vue.script.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nimport DataTableCell from './DataTableCell.vue'\n\nconst { cx } = useBindCx()\n</script>\n<template>\n <DataTableCell\n is=\"th\"\n v-bind=\"cx('items-center font-medium px-2 min-w-0 -outline-offset-1')\">\n <slot />\n </DataTableCell>\n</template>\n"],"mappings":";;;;;;;EAKA,MAAM,EAAE,OAAO,WAAU;;uBAGvB,YAIgB,uBAJhB,WAIgB,EAHd,IAAG,MAAI,EACC,MAAA,GAAE,CAAA,0DAAA,CAAA,EAAA;2BACF,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import DataTableInput_vue_vue_type_script_setup_true_lang_default from "./DataTableInput.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/v2/components/data-table/DataTableInput.vue
5
- var DataTableInput_default = /* @__PURE__ */ _plugin_vue_export_helper_default(DataTableInput_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-819cea32"]]);
5
+ var DataTableInput_default = /* @__PURE__ */ _plugin_vue_export_helper_default(DataTableInput_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-1ee3c31d"]]);
6
6
  //#endregion
7
7
  export { DataTableInput_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableInput.vue.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components'\nimport { ScalarIconEye, ScalarIconEyeSlash, ScalarIconX } from '@scalar/icons'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { computed, ref, useTemplateRef } from 'vue'\n\nimport type { VueClassProp } from '@/types/vue'\nimport { CodeInput } from '@/v2/components/code-input'\n\nimport DataTableCell from './DataTableCell.vue'\nimport DataTableInputSelect from './DataTableInputSelect.vue'\n\nconst props = withDefaults(\n defineProps<{\n id?: string\n type?: string | undefined\n /** Class for the wrapping cell because attrs is bound to the input */\n containerClass?: VueClassProp | undefined\n required?: boolean\n modelValue: string\n /** Allows adding a custom value to the enum dropdown, defaults to true */\n canAddCustomEnumValue?: boolean\n readOnly?: boolean\n enum?: string[]\n min?: number\n max?: number\n environment: XScalarEnvironment\n description?: string | undefined\n lineWrapping?: boolean\n /** Whether to show context function suggestions like $guid, $timestamp. Defaults to true */\n withFakeData?: boolean\n }>(),\n {\n canAddCustomEnumValue: true,\n required: false,\n readOnly: false,\n lineWrapping: false,\n withFakeData: true,\n },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: string | number): void\n (e: 'inputFocus'): void\n (e: 'inputBlur'): void\n (e: 'selectVariable', value: string): void\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst mask = ref(true)\nconst interactingWithDropdown = ref(false)\nconst codeInput = useTemplateRef('codeInput')\n\nconst handleBlur = () => !interactingWithDropdown.value && emit('inputBlur')\n\nconst inputType = computed(() =>\n props.type === 'password' ? 'text' : (props.type ?? 'text'),\n)\n\n// If not an enum nor read only, focus the code input\nconst handleLabelClick = () => {\n if (!props.enum?.length && !props.readOnly) {\n codeInput.value?.focus()\n }\n}\n</script>\n<template>\n <DataTableCell\n class=\"relative flex\"\n :class=\"containerClass\">\n <div\n v-if=\"$slots.default\"\n class=\"text-c-1 flex items-center pr-0 pl-3\"\n :for=\"id ?? ''\"\n @click=\"handleLabelClick\">\n <slot />:\n </div>\n <div class=\"relative flex min-w-0 flex-1\">\n <template v-if=\"props.enum && props.enum.length\">\n <DataTableInputSelect\n :canAddCustomValue=\"props.canAddCustomEnumValue\"\n :modelValue=\"props.modelValue\"\n :value=\"props.enum\"\n @update:modelValue=\"emit('update:modelValue', $event)\" />\n </template>\n <template v-else>\n <input\n v-if=\"mask && type === 'password'\"\n v-bind=\"id ? { ...$attrs, id: id } : $attrs\"\n autocomplete=\"off\"\n class=\"text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none px-2 py-1.25 -outline-offset-1\"\n :class=\"{ 'scalar-password-input': type === 'password' }\"\n data-1p-ignore\n :readOnly=\"readOnly\"\n spellcheck=\"false\"\n :type=\"inputType\"\n :value=\"modelValue\"\n @input=\"\n emit(\n 'update:modelValue',\n ($event.target as HTMLInputElement).value ?? '',\n )\n \" />\n <CodeInput\n v-else\n v-bind=\"$attrs\"\n :id=\"id\"\n ref=\"codeInput\"\n class=\"text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none -outline-offset-1\"\n :class=\"[\n type === 'password' && description && 'pr-12',\n description && 'pr-8',\n type === 'password' && 'scalar-password-input',\n ]\"\n :description=\"description\"\n disableCloseBrackets\n disableTabIndent\n :environment=\"environment\"\n :lineWrapping=\"Boolean(lineWrapping)\"\n :max=\"max\"\n :min=\"min\"\n :modelValue=\"modelValue ?? ''\"\n :readOnly=\"readOnly\"\n :required=\"Boolean(required)\"\n spellcheck=\"false\"\n :type=\"inputType\"\n :withFakeData=\"withFakeData\"\n @blur=\"handleBlur\"\n @focus=\"emit('inputFocus')\"\n @update:modelValue=\"(value) => emit('update:modelValue', value)\" />\n </template>\n </div>\n <div\n v-if=\"$slots.warning\"\n class=\"centered-y text-orange absolute right-7 text-xs\">\n <slot name=\"warning\" />\n </div>\n <slot name=\"icon\" />\n <!-- Clear -->\n <ScalarIconButton\n v-if=\"modelValue\"\n class=\"-ml-.25 h-6 w-6 self-center p-1.25\"\n :icon=\"ScalarIconX\"\n label=\"Clear Value\"\n @click=\"emit('update:modelValue', '')\" />\n <!-- Toggle Visibility -->\n <ScalarIconButton\n v-if=\"type === 'password'\"\n class=\"-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25\"\n data-testid=\"data-table-password-toggle\"\n :icon=\"mask ? ScalarIconEye : ScalarIconEyeSlash\"\n :label=\"mask ? 'Show Password' : 'Hide Password'\"\n @click=\"mask = !mask\" />\n </DataTableCell>\n</template>\n\n<style scoped>\n:deep(.cm-editor) {\n padding: 0;\n}\n:deep(.cm-content) {\n align-items: center;\n background-color: transparent;\n display: flex;\n font-family: var(--scalar-font);\n font-size: var(--scalar-small);\n padding: 5px 8px;\n width: 100%;\n}\n:deep(.cm-content):has(.cm-pill) {\n padding: 5px 8px;\n}\n:deep(.cm-content .cm-pill:not(:last-of-type)) {\n margin-right: 0.5px;\n}\n:deep(.cm-content .cm-pill:not(:first-of-type)) {\n margin-left: 0.5px;\n}\n:deep(.cm-line) {\n overflow: hidden;\n padding: 0;\n text-overflow: ellipsis;\n word-break: break-word;\n}\n.required::after {\n content: 'Required';\n}\n/* Tailwind placeholder is busted */\ninput::placeholder {\n color: var(--scalar-color-3);\n}\n/* we want our inputs to look like a password input but not be one */\n.scalar-password-input {\n text-security: disc;\n -webkit-text-security: disc;\n -moz-text-security: disc;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"DataTableInput.vue.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconEye, ScalarIconEyeSlash, ScalarIconX } from '@scalar/icons'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { computed, ref, useTemplateRef } from 'vue'\n\nimport type { VueClassProp } from '@/types/vue'\nimport { CodeInput } from '@/v2/components/code-input'\n\nimport DataTableCell from './DataTableCell.vue'\nimport DataTableInputSelect from './DataTableInputSelect.vue'\n\nconst props = withDefaults(\n defineProps<{\n id?: string\n type?: string | undefined\n /** Class for the wrapping cell because attrs is bound to the input */\n containerClass?: VueClassProp | undefined\n required?: boolean\n modelValue: string\n /** Allows adding a custom value to the enum dropdown, defaults to true */\n canAddCustomEnumValue?: boolean\n readOnly?: boolean\n enum?: string[]\n min?: number\n max?: number\n environment: XScalarEnvironment\n description?: string | undefined\n lineWrapping?: boolean\n /** Whether to show context function suggestions like $guid, $timestamp. Defaults to true */\n withFakeData?: boolean\n }>(),\n {\n canAddCustomEnumValue: true,\n required: false,\n readOnly: false,\n lineWrapping: false,\n withFakeData: true,\n },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: string | number): void\n (e: 'inputFocus'): void\n (e: 'inputBlur'): void\n (e: 'selectVariable', value: string): void\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst mask = ref(true)\nconst interactingWithDropdown = ref(false)\nconst codeInput = useTemplateRef('codeInput')\n\nconst handleBlur = () => !interactingWithDropdown.value && emit('inputBlur')\n\nconst inputType = computed(() =>\n props.type === 'password' ? 'text' : (props.type ?? 'text'),\n)\n\n// If not an enum nor read only, focus the code input\nconst handleLabelClick = () => {\n if (!props.enum?.length && !props.readOnly) {\n codeInput.value?.focus()\n }\n}\n</script>\n<template>\n <DataTableCell\n class=\"relative flex\"\n :class=\"containerClass\">\n <div\n v-if=\"$slots.default\"\n class=\"text-c-1 flex items-center pr-0 pl-3\"\n :for=\"id ?? ''\"\n @click=\"handleLabelClick\">\n <slot />:\n </div>\n <div class=\"relative flex min-w-0 flex-1\">\n <template v-if=\"props.enum && props.enum.length\">\n <DataTableInputSelect\n :canAddCustomValue=\"props.canAddCustomEnumValue\"\n :modelValue=\"props.modelValue\"\n :value=\"props.enum\"\n @update:modelValue=\"emit('update:modelValue', $event)\" />\n </template>\n <template v-else>\n <input\n v-if=\"mask && type === 'password'\"\n v-bind=\"id ? { ...$attrs, id: id } : $attrs\"\n autocomplete=\"off\"\n class=\"text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none px-2 py-1.25 -outline-offset-1\"\n :class=\"{ 'scalar-password-input': type === 'password' }\"\n data-1p-ignore\n :readOnly=\"readOnly\"\n spellcheck=\"false\"\n :type=\"inputType\"\n :value=\"modelValue\"\n @input=\"\n emit(\n 'update:modelValue',\n ($event.target as HTMLInputElement).value ?? '',\n )\n \" />\n <CodeInput\n v-else\n v-bind=\"$attrs\"\n :id=\"id\"\n ref=\"codeInput\"\n class=\"text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none -outline-offset-1\"\n :class=\"[\n type === 'password' && description && 'pr-12',\n description && 'pr-8',\n type === 'password' && 'scalar-password-input',\n ]\"\n :description=\"description\"\n disableCloseBrackets\n disableTabIndent\n :environment=\"environment\"\n :lineWrapping=\"Boolean(lineWrapping)\"\n :max=\"max\"\n :min=\"min\"\n :modelValue=\"modelValue ?? ''\"\n :readOnly=\"readOnly\"\n :required=\"Boolean(required)\"\n spellcheck=\"false\"\n :type=\"inputType\"\n :withFakeData=\"withFakeData\"\n @blur=\"handleBlur\"\n @focus=\"emit('inputFocus')\"\n @update:modelValue=\"(value) => emit('update:modelValue', value)\" />\n </template>\n </div>\n <div\n v-if=\"$slots.warning\"\n class=\"centered-y text-orange absolute right-7 text-xs\">\n <slot name=\"warning\" />\n </div>\n <slot name=\"icon\" />\n <!-- Clear -->\n <ScalarIconButton\n v-if=\"modelValue\"\n class=\"-ml-.25 h-6 w-6 self-center p-1.25\"\n :icon=\"ScalarIconX\"\n label=\"Clear Value\"\n @click=\"emit('update:modelValue', '')\" />\n <!-- Toggle Visibility -->\n <ScalarIconButton\n v-if=\"type === 'password'\"\n class=\"-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25\"\n data-testid=\"data-table-password-toggle\"\n :icon=\"mask ? ScalarIconEye : ScalarIconEyeSlash\"\n :label=\"mask ? 'Show Password' : 'Hide Password'\"\n @click=\"mask = !mask\" />\n </DataTableCell>\n</template>\n\n<style scoped>\n:deep(.cm-editor) {\n padding: 0;\n}\n:deep(.cm-content) {\n align-items: center;\n background-color: transparent;\n display: flex;\n font-family: var(--scalar-font);\n font-size: var(--scalar-small);\n padding: 5px 8px;\n width: 100%;\n}\n:deep(.cm-content):has(.cm-pill) {\n padding: 5px 8px;\n}\n:deep(.cm-content .cm-pill:not(:last-of-type)) {\n margin-right: 0.5px;\n}\n:deep(.cm-content .cm-pill:not(:first-of-type)) {\n margin-left: 0.5px;\n}\n:deep(.cm-line) {\n overflow: hidden;\n padding: 0;\n text-overflow: ellipsis;\n word-break: break-word;\n}\n.required::after {\n content: 'Required';\n}\n/* Tailwind placeholder is busted */\ninput::placeholder {\n color: var(--scalar-color-3);\n}\n/* we want our inputs to look like a password input but not be one */\n.scalar-password-input {\n text-security: disc;\n -webkit-text-security: disc;\n -moz-text-security: disc;\n}\n</style>\n"],"mappings":""}
@@ -2,8 +2,8 @@ import DataTableInputSelect_default from "./DataTableInputSelect.vue.js";
2
2
  import CodeInput_default from "../code-input/CodeInput.vue.js";
3
3
  import DataTableCell_default from "./DataTableCell.vue.js";
4
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderSlot, unref, useTemplateRef, withCtx } from "vue";
5
- import { ScalarIconButton } from "@scalar/components";
6
5
  import { ScalarIconEye, ScalarIconEyeSlash, ScalarIconX } from "@scalar/icons";
6
+ import { ScalarIconButton } from "@scalar/components/icon-button";
7
7
  //#region src/v2/components/data-table/DataTableInput.vue?vue&type=script&setup=true&lang.ts
8
8
  var _hoisted_1 = ["for"];
9
9
  var _hoisted_2 = { class: "relative flex min-w-0 flex-1" };
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableInput.vue.script.js","names":["$slots","$attrs"],"sources":["../../../../src/v2/components/data-table/DataTableInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components'\nimport { ScalarIconEye, ScalarIconEyeSlash, ScalarIconX } from '@scalar/icons'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { computed, ref, useTemplateRef } from 'vue'\n\nimport type { VueClassProp } from '@/types/vue'\nimport { CodeInput } from '@/v2/components/code-input'\n\nimport DataTableCell from './DataTableCell.vue'\nimport DataTableInputSelect from './DataTableInputSelect.vue'\n\nconst props = withDefaults(\n defineProps<{\n id?: string\n type?: string | undefined\n /** Class for the wrapping cell because attrs is bound to the input */\n containerClass?: VueClassProp | undefined\n required?: boolean\n modelValue: string\n /** Allows adding a custom value to the enum dropdown, defaults to true */\n canAddCustomEnumValue?: boolean\n readOnly?: boolean\n enum?: string[]\n min?: number\n max?: number\n environment: XScalarEnvironment\n description?: string | undefined\n lineWrapping?: boolean\n /** Whether to show context function suggestions like $guid, $timestamp. Defaults to true */\n withFakeData?: boolean\n }>(),\n {\n canAddCustomEnumValue: true,\n required: false,\n readOnly: false,\n lineWrapping: false,\n withFakeData: true,\n },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: string | number): void\n (e: 'inputFocus'): void\n (e: 'inputBlur'): void\n (e: 'selectVariable', value: string): void\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst mask = ref(true)\nconst interactingWithDropdown = ref(false)\nconst codeInput = useTemplateRef('codeInput')\n\nconst handleBlur = () => !interactingWithDropdown.value && emit('inputBlur')\n\nconst inputType = computed(() =>\n props.type === 'password' ? 'text' : (props.type ?? 'text'),\n)\n\n// If not an enum nor read only, focus the code input\nconst handleLabelClick = () => {\n if (!props.enum?.length && !props.readOnly) {\n codeInput.value?.focus()\n }\n}\n</script>\n<template>\n <DataTableCell\n class=\"relative flex\"\n :class=\"containerClass\">\n <div\n v-if=\"$slots.default\"\n class=\"text-c-1 flex items-center pr-0 pl-3\"\n :for=\"id ?? ''\"\n @click=\"handleLabelClick\">\n <slot />:\n </div>\n <div class=\"relative flex min-w-0 flex-1\">\n <template v-if=\"props.enum && props.enum.length\">\n <DataTableInputSelect\n :canAddCustomValue=\"props.canAddCustomEnumValue\"\n :modelValue=\"props.modelValue\"\n :value=\"props.enum\"\n @update:modelValue=\"emit('update:modelValue', $event)\" />\n </template>\n <template v-else>\n <input\n v-if=\"mask && type === 'password'\"\n v-bind=\"id ? { ...$attrs, id: id } : $attrs\"\n autocomplete=\"off\"\n class=\"text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none px-2 py-1.25 -outline-offset-1\"\n :class=\"{ 'scalar-password-input': type === 'password' }\"\n data-1p-ignore\n :readOnly=\"readOnly\"\n spellcheck=\"false\"\n :type=\"inputType\"\n :value=\"modelValue\"\n @input=\"\n emit(\n 'update:modelValue',\n ($event.target as HTMLInputElement).value ?? '',\n )\n \" />\n <CodeInput\n v-else\n v-bind=\"$attrs\"\n :id=\"id\"\n ref=\"codeInput\"\n class=\"text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none -outline-offset-1\"\n :class=\"[\n type === 'password' && description && 'pr-12',\n description && 'pr-8',\n type === 'password' && 'scalar-password-input',\n ]\"\n :description=\"description\"\n disableCloseBrackets\n disableTabIndent\n :environment=\"environment\"\n :lineWrapping=\"Boolean(lineWrapping)\"\n :max=\"max\"\n :min=\"min\"\n :modelValue=\"modelValue ?? ''\"\n :readOnly=\"readOnly\"\n :required=\"Boolean(required)\"\n spellcheck=\"false\"\n :type=\"inputType\"\n :withFakeData=\"withFakeData\"\n @blur=\"handleBlur\"\n @focus=\"emit('inputFocus')\"\n @update:modelValue=\"(value) => emit('update:modelValue', value)\" />\n </template>\n </div>\n <div\n v-if=\"$slots.warning\"\n class=\"centered-y text-orange absolute right-7 text-xs\">\n <slot name=\"warning\" />\n </div>\n <slot name=\"icon\" />\n <!-- Clear -->\n <ScalarIconButton\n v-if=\"modelValue\"\n class=\"-ml-.25 h-6 w-6 self-center p-1.25\"\n :icon=\"ScalarIconX\"\n label=\"Clear Value\"\n @click=\"emit('update:modelValue', '')\" />\n <!-- Toggle Visibility -->\n <ScalarIconButton\n v-if=\"type === 'password'\"\n class=\"-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25\"\n data-testid=\"data-table-password-toggle\"\n :icon=\"mask ? ScalarIconEye : ScalarIconEyeSlash\"\n :label=\"mask ? 'Show Password' : 'Hide Password'\"\n @click=\"mask = !mask\" />\n </DataTableCell>\n</template>\n\n<style scoped>\n:deep(.cm-editor) {\n padding: 0;\n}\n:deep(.cm-content) {\n align-items: center;\n background-color: transparent;\n display: flex;\n font-family: var(--scalar-font);\n font-size: var(--scalar-small);\n padding: 5px 8px;\n width: 100%;\n}\n:deep(.cm-content):has(.cm-pill) {\n padding: 5px 8px;\n}\n:deep(.cm-content .cm-pill:not(:last-of-type)) {\n margin-right: 0.5px;\n}\n:deep(.cm-content .cm-pill:not(:first-of-type)) {\n margin-left: 0.5px;\n}\n:deep(.cm-line) {\n overflow: hidden;\n padding: 0;\n text-overflow: ellipsis;\n word-break: break-word;\n}\n.required::after {\n content: 'Required';\n}\n/* Tailwind placeholder is busted */\ninput::placeholder {\n color: var(--scalar-color-3);\n}\n/* we want our inputs to look like a password input but not be one */\n.scalar-password-input {\n text-security: disc;\n -webkit-text-security: disc;\n -moz-text-security: disc;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYA,MAAM,QAAQ;EA6Bd,MAAM,OAAO;EASb,MAAM,OAAO,IAAI,KAAI;EACrB,MAAM,0BAA0B,IAAI,MAAK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OAAA,OAAA,OAAA,MAAA,WAAE,KAAA,QAAI,CAAI,KAAA"}
1
+ {"version":3,"file":"DataTableInput.vue.script.js","names":["$slots","$attrs"],"sources":["../../../../src/v2/components/data-table/DataTableInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconEye, ScalarIconEyeSlash, ScalarIconX } from '@scalar/icons'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { computed, ref, useTemplateRef } from 'vue'\n\nimport type { VueClassProp } from '@/types/vue'\nimport { CodeInput } from '@/v2/components/code-input'\n\nimport DataTableCell from './DataTableCell.vue'\nimport DataTableInputSelect from './DataTableInputSelect.vue'\n\nconst props = withDefaults(\n defineProps<{\n id?: string\n type?: string | undefined\n /** Class for the wrapping cell because attrs is bound to the input */\n containerClass?: VueClassProp | undefined\n required?: boolean\n modelValue: string\n /** Allows adding a custom value to the enum dropdown, defaults to true */\n canAddCustomEnumValue?: boolean\n readOnly?: boolean\n enum?: string[]\n min?: number\n max?: number\n environment: XScalarEnvironment\n description?: string | undefined\n lineWrapping?: boolean\n /** Whether to show context function suggestions like $guid, $timestamp. Defaults to true */\n withFakeData?: boolean\n }>(),\n {\n canAddCustomEnumValue: true,\n required: false,\n readOnly: false,\n lineWrapping: false,\n withFakeData: true,\n },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: string | number): void\n (e: 'inputFocus'): void\n (e: 'inputBlur'): void\n (e: 'selectVariable', value: string): void\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst mask = ref(true)\nconst interactingWithDropdown = ref(false)\nconst codeInput = useTemplateRef('codeInput')\n\nconst handleBlur = () => !interactingWithDropdown.value && emit('inputBlur')\n\nconst inputType = computed(() =>\n props.type === 'password' ? 'text' : (props.type ?? 'text'),\n)\n\n// If not an enum nor read only, focus the code input\nconst handleLabelClick = () => {\n if (!props.enum?.length && !props.readOnly) {\n codeInput.value?.focus()\n }\n}\n</script>\n<template>\n <DataTableCell\n class=\"relative flex\"\n :class=\"containerClass\">\n <div\n v-if=\"$slots.default\"\n class=\"text-c-1 flex items-center pr-0 pl-3\"\n :for=\"id ?? ''\"\n @click=\"handleLabelClick\">\n <slot />:\n </div>\n <div class=\"relative flex min-w-0 flex-1\">\n <template v-if=\"props.enum && props.enum.length\">\n <DataTableInputSelect\n :canAddCustomValue=\"props.canAddCustomEnumValue\"\n :modelValue=\"props.modelValue\"\n :value=\"props.enum\"\n @update:modelValue=\"emit('update:modelValue', $event)\" />\n </template>\n <template v-else>\n <input\n v-if=\"mask && type === 'password'\"\n v-bind=\"id ? { ...$attrs, id: id } : $attrs\"\n autocomplete=\"off\"\n class=\"text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none px-2 py-1.25 -outline-offset-1\"\n :class=\"{ 'scalar-password-input': type === 'password' }\"\n data-1p-ignore\n :readOnly=\"readOnly\"\n spellcheck=\"false\"\n :type=\"inputType\"\n :value=\"modelValue\"\n @input=\"\n emit(\n 'update:modelValue',\n ($event.target as HTMLInputElement).value ?? '',\n )\n \" />\n <CodeInput\n v-else\n v-bind=\"$attrs\"\n :id=\"id\"\n ref=\"codeInput\"\n class=\"text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none -outline-offset-1\"\n :class=\"[\n type === 'password' && description && 'pr-12',\n description && 'pr-8',\n type === 'password' && 'scalar-password-input',\n ]\"\n :description=\"description\"\n disableCloseBrackets\n disableTabIndent\n :environment=\"environment\"\n :lineWrapping=\"Boolean(lineWrapping)\"\n :max=\"max\"\n :min=\"min\"\n :modelValue=\"modelValue ?? ''\"\n :readOnly=\"readOnly\"\n :required=\"Boolean(required)\"\n spellcheck=\"false\"\n :type=\"inputType\"\n :withFakeData=\"withFakeData\"\n @blur=\"handleBlur\"\n @focus=\"emit('inputFocus')\"\n @update:modelValue=\"(value) => emit('update:modelValue', value)\" />\n </template>\n </div>\n <div\n v-if=\"$slots.warning\"\n class=\"centered-y text-orange absolute right-7 text-xs\">\n <slot name=\"warning\" />\n </div>\n <slot name=\"icon\" />\n <!-- Clear -->\n <ScalarIconButton\n v-if=\"modelValue\"\n class=\"-ml-.25 h-6 w-6 self-center p-1.25\"\n :icon=\"ScalarIconX\"\n label=\"Clear Value\"\n @click=\"emit('update:modelValue', '')\" />\n <!-- Toggle Visibility -->\n <ScalarIconButton\n v-if=\"type === 'password'\"\n class=\"-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25\"\n data-testid=\"data-table-password-toggle\"\n :icon=\"mask ? ScalarIconEye : ScalarIconEyeSlash\"\n :label=\"mask ? 'Show Password' : 'Hide Password'\"\n @click=\"mask = !mask\" />\n </DataTableCell>\n</template>\n\n<style scoped>\n:deep(.cm-editor) {\n padding: 0;\n}\n:deep(.cm-content) {\n align-items: center;\n background-color: transparent;\n display: flex;\n font-family: var(--scalar-font);\n font-size: var(--scalar-small);\n padding: 5px 8px;\n width: 100%;\n}\n:deep(.cm-content):has(.cm-pill) {\n padding: 5px 8px;\n}\n:deep(.cm-content .cm-pill:not(:last-of-type)) {\n margin-right: 0.5px;\n}\n:deep(.cm-content .cm-pill:not(:first-of-type)) {\n margin-left: 0.5px;\n}\n:deep(.cm-line) {\n overflow: hidden;\n padding: 0;\n text-overflow: ellipsis;\n word-break: break-word;\n}\n.required::after {\n content: 'Required';\n}\n/* Tailwind placeholder is busted */\ninput::placeholder {\n color: var(--scalar-color-3);\n}\n/* we want our inputs to look like a password input but not be one */\n.scalar-password-input {\n text-security: disc;\n -webkit-text-security: disc;\n -moz-text-security: disc;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYA,MAAM,QAAQ;EA6Bd,MAAM,OAAO;EASb,MAAM,OAAO,IAAI,KAAI;EACrB,MAAM,0BAA0B,IAAI,MAAK;EACzC,MAAM,YAAY,eAAe,YAAW;EAE5C,MAAM,mBAAmB,CAAC,wBAAwB,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@@
1
- {"version":3,"file":"DataTableInputSelect.vue.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarComboboxMultiselect,\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n ScalarIcon,\n} from '@scalar/components'\nimport { computed, nextTick, ref, watch } from 'vue'\n\nimport type { CodeInputModelValue } from '@/v2/components/code-input/CodeInput.vue'\n\nconst props = withDefaults(\n defineProps<{\n modelValue: CodeInputModelValue\n value?: string[]\n default?: CodeInputModelValue | undefined\n canAddCustomValue?: boolean\n type?: string | undefined\n }>(),\n { canAddCustomValue: true },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: string): void\n}>()\n\nconst options = computed(() => props.value ?? [])\nconst addingCustomValue = ref(false)\nconst customValue = ref('')\nconst inputRef = ref<HTMLInputElement | null>(null)\n\nwatch(customValue, (newValue) => {\n emit('update:modelValue', newValue)\n})\n\nconst updateSelected = (value: string) => {\n emit('update:modelValue', value)\n addingCustomValue.value = false\n}\n\nconst addCustomValue = () => {\n if (customValue.value.trim()) {\n updateSelected(customValue.value)\n }\n}\n\nconst handleBlur = () => {\n if (!customValue.value.trim()) {\n emit('update:modelValue', '')\n }\n addingCustomValue.value = false\n}\n\nconst isSelected = (value: string) => {\n return props.modelValue.toString() === value\n}\n\nwatch(addingCustomValue, (newValue) => {\n if (newValue) {\n nextTick(() => {\n inputRef.value?.focus()\n })\n }\n})\n\nconst initialValue = computed(() => {\n return props.modelValue !== undefined ? props.modelValue : props.default\n})\n\n/** Options for the array type */\nconst arrayOptions = computed(() =>\n options.value.map((option) => {\n const id = option.toString()\n return { id: id, label: id, value: id }\n }),\n)\n\n/** Filter the options by what is selected */\nconst selectedArrayOptions = computed(() => {\n const selectedValues = new Set(props.modelValue.toString().split(','))\n return arrayOptions.value.filter((option) => selectedValues.has(option.id))\n})\n\n/** Update the model value when the selected options change */\nconst updateSelectedOptions = (selectedOptions: any) => {\n const selectedValues = selectedOptions.map((option: any) => option.value)\n emit('update:modelValue', selectedValues.join(','))\n}\n</script>\n\n<template>\n <div\n class=\"group-[.alert]:outline-orange group-[.error]:outline-red w-full pr-10 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline\">\n <template v-if=\"type === 'array'\">\n <ScalarComboboxMultiselect\n :modelValue=\"selectedArrayOptions\"\n :options=\"arrayOptions\"\n @update:modelValue=\"updateSelectedOptions\">\n <ScalarButton\n class=\"custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none\"\n fullWidth\n variant=\"ghost\">\n <span class=\"text-c-1 whitespace-nowrap\">{{\n selectedArrayOptions.length > 0\n ? selectedArrayOptions.map((option) => option.label).join(', ')\n : 'Select a value'\n }}</span>\n <ScalarIcon\n class=\"min-w-4\"\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n </ScalarComboboxMultiselect>\n </template>\n <template v-else-if=\"addingCustomValue\">\n <input\n ref=\"inputRef\"\n v-model=\"customValue\"\n class=\"text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none\"\n placeholder=\"Value\"\n type=\"text\"\n @blur=\"handleBlur\"\n @keyup.enter=\"addCustomValue\" />\n </template>\n <template v-else>\n <ScalarDropdown\n resize\n :value=\"initialValue\">\n <ScalarButton\n class=\"size-full justify-start gap-1.5 overflow-auto px-2 py-1.5 font-normal whitespace-nowrap outline-none\"\n variant=\"ghost\">\n <span class=\"text-c-1 overflow-hidden text-ellipsis\">{{\n initialValue ?? 'Select a value'\n }}</span>\n <ScalarIcon\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n <template #items>\n <ScalarDropdownItem\n v-for=\"option in options\"\n :key=\"option\"\n class=\"group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n :value=\"option\"\n @click=\"updateSelected(option)\">\n <div\n class=\"flex h-4 w-4 items-center justify-center rounded-full p-[3px]\"\n :class=\"\n isSelected(option)\n ? 'bg-c-accent text-b-1'\n : 'shadow-border text-transparent'\n \">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <span class=\"overflow-hidden text-ellipsis\">{{ option }}</span>\n </ScalarDropdownItem>\n <template v-if=\"canAddCustomValue\">\n <ScalarDropdownDivider v-if=\"options.length\" />\n <ScalarDropdownItem\n class=\"flex items-center gap-1.5\"\n @click=\"addingCustomValue = true\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>Add value</span>\n </ScalarDropdownItem>\n </template>\n </template>\n </ScalarDropdown>\n </template>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"DataTableInputSelect.vue.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarComboboxMultiselect } from '@scalar/components/combobox'\nimport {\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n} from '@scalar/components/dropdown'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { computed, nextTick, ref, watch } from 'vue'\n\nimport type { CodeInputModelValue } from '@/v2/components/code-input/CodeInput.vue'\n\nconst props = withDefaults(\n defineProps<{\n modelValue: CodeInputModelValue\n value?: string[]\n default?: CodeInputModelValue | undefined\n canAddCustomValue?: boolean\n type?: string | undefined\n }>(),\n { canAddCustomValue: true },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: string): void\n}>()\n\nconst options = computed(() => props.value ?? [])\nconst addingCustomValue = ref(false)\nconst customValue = ref('')\nconst inputRef = ref<HTMLInputElement | null>(null)\n\nwatch(customValue, (newValue) => {\n emit('update:modelValue', newValue)\n})\n\nconst updateSelected = (value: string) => {\n emit('update:modelValue', value)\n addingCustomValue.value = false\n}\n\nconst addCustomValue = () => {\n if (customValue.value.trim()) {\n updateSelected(customValue.value)\n }\n}\n\nconst handleBlur = () => {\n if (!customValue.value.trim()) {\n emit('update:modelValue', '')\n }\n addingCustomValue.value = false\n}\n\nconst isSelected = (value: string) => {\n return props.modelValue.toString() === value\n}\n\nwatch(addingCustomValue, (newValue) => {\n if (newValue) {\n nextTick(() => {\n inputRef.value?.focus()\n })\n }\n})\n\nconst initialValue = computed(() => {\n return props.modelValue !== undefined ? props.modelValue : props.default\n})\n\n/** Options for the array type */\nconst arrayOptions = computed(() =>\n options.value.map((option) => {\n const id = option.toString()\n return { id: id, label: id, value: id }\n }),\n)\n\n/** Filter the options by what is selected */\nconst selectedArrayOptions = computed(() => {\n const selectedValues = new Set(props.modelValue.toString().split(','))\n return arrayOptions.value.filter((option) => selectedValues.has(option.id))\n})\n\n/** Update the model value when the selected options change */\nconst updateSelectedOptions = (selectedOptions: any) => {\n const selectedValues = selectedOptions.map((option: any) => option.value)\n emit('update:modelValue', selectedValues.join(','))\n}\n</script>\n\n<template>\n <div\n class=\"group-[.alert]:outline-orange group-[.error]:outline-red w-full pr-10 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline\">\n <template v-if=\"type === 'array'\">\n <ScalarComboboxMultiselect\n :modelValue=\"selectedArrayOptions\"\n :options=\"arrayOptions\"\n @update:modelValue=\"updateSelectedOptions\">\n <ScalarButton\n class=\"custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none\"\n fullWidth\n variant=\"ghost\">\n <span class=\"text-c-1 whitespace-nowrap\">{{\n selectedArrayOptions.length > 0\n ? selectedArrayOptions.map((option) => option.label).join(', ')\n : 'Select a value'\n }}</span>\n <ScalarIcon\n class=\"min-w-4\"\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n </ScalarComboboxMultiselect>\n </template>\n <template v-else-if=\"addingCustomValue\">\n <input\n ref=\"inputRef\"\n v-model=\"customValue\"\n class=\"text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none\"\n placeholder=\"Value\"\n type=\"text\"\n @blur=\"handleBlur\"\n @keyup.enter=\"addCustomValue\" />\n </template>\n <template v-else>\n <ScalarDropdown\n resize\n :value=\"initialValue\">\n <ScalarButton\n class=\"size-full justify-start gap-1.5 overflow-auto px-2 py-1.5 font-normal whitespace-nowrap outline-none\"\n variant=\"ghost\">\n <span class=\"text-c-1 overflow-hidden text-ellipsis\">{{\n initialValue ?? 'Select a value'\n }}</span>\n <ScalarIcon\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n <template #items>\n <ScalarDropdownItem\n v-for=\"option in options\"\n :key=\"option\"\n class=\"group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n :value=\"option\"\n @click=\"updateSelected(option)\">\n <div\n class=\"flex h-4 w-4 items-center justify-center rounded-full p-[3px]\"\n :class=\"\n isSelected(option)\n ? 'bg-c-accent text-b-1'\n : 'shadow-border text-transparent'\n \">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <span class=\"overflow-hidden text-ellipsis\">{{ option }}</span>\n </ScalarDropdownItem>\n <template v-if=\"canAddCustomValue\">\n <ScalarDropdownDivider v-if=\"options.length\" />\n <ScalarDropdownItem\n class=\"flex items-center gap-1.5\"\n @click=\"addingCustomValue = true\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>Add value</span>\n </ScalarDropdownItem>\n </template>\n </template>\n </ScalarDropdown>\n </template>\n </div>\n</template>\n"],"mappings":""}
@@ -1,5 +1,8 @@
1
1
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, normalizeClass, openBlock, ref, renderList, toDisplayString, unref, vModelText, watch, withCtx, withDirectives, withKeys } from "vue";
2
- import { ScalarButton, ScalarComboboxMultiselect, ScalarDropdown, ScalarDropdownDivider, ScalarDropdownItem, ScalarIcon } from "@scalar/components";
2
+ import { ScalarButton } from "@scalar/components/button";
3
+ import { ScalarIcon } from "@scalar/components/icon";
4
+ import { ScalarComboboxMultiselect } from "@scalar/components/combobox";
5
+ import { ScalarDropdown, ScalarDropdownDivider, ScalarDropdownItem } from "@scalar/components/dropdown";
3
6
  //#region src/v2/components/data-table/DataTableInputSelect.vue?vue&type=script&setup=true&lang.ts
4
7
  var _hoisted_1 = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-full pr-10 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline" };
5
8
  var _hoisted_2 = { class: "text-c-1 whitespace-nowrap" };
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableInputSelect.vue.script.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarComboboxMultiselect,\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n ScalarIcon,\n} from '@scalar/components'\nimport { computed, nextTick, ref, watch } from 'vue'\n\nimport type { CodeInputModelValue } from '@/v2/components/code-input/CodeInput.vue'\n\nconst props = withDefaults(\n defineProps<{\n modelValue: CodeInputModelValue\n value?: string[]\n default?: CodeInputModelValue | undefined\n canAddCustomValue?: boolean\n type?: string | undefined\n }>(),\n { canAddCustomValue: true },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: string): void\n}>()\n\nconst options = computed(() => props.value ?? [])\nconst addingCustomValue = ref(false)\nconst customValue = ref('')\nconst inputRef = ref<HTMLInputElement | null>(null)\n\nwatch(customValue, (newValue) => {\n emit('update:modelValue', newValue)\n})\n\nconst updateSelected = (value: string) => {\n emit('update:modelValue', value)\n addingCustomValue.value = false\n}\n\nconst addCustomValue = () => {\n if (customValue.value.trim()) {\n updateSelected(customValue.value)\n }\n}\n\nconst handleBlur = () => {\n if (!customValue.value.trim()) {\n emit('update:modelValue', '')\n }\n addingCustomValue.value = false\n}\n\nconst isSelected = (value: string) => {\n return props.modelValue.toString() === value\n}\n\nwatch(addingCustomValue, (newValue) => {\n if (newValue) {\n nextTick(() => {\n inputRef.value?.focus()\n })\n }\n})\n\nconst initialValue = computed(() => {\n return props.modelValue !== undefined ? props.modelValue : props.default\n})\n\n/** Options for the array type */\nconst arrayOptions = computed(() =>\n options.value.map((option) => {\n const id = option.toString()\n return { id: id, label: id, value: id }\n }),\n)\n\n/** Filter the options by what is selected */\nconst selectedArrayOptions = computed(() => {\n const selectedValues = new Set(props.modelValue.toString().split(','))\n return arrayOptions.value.filter((option) => selectedValues.has(option.id))\n})\n\n/** Update the model value when the selected options change */\nconst updateSelectedOptions = (selectedOptions: any) => {\n const selectedValues = selectedOptions.map((option: any) => option.value)\n emit('update:modelValue', selectedValues.join(','))\n}\n</script>\n\n<template>\n <div\n class=\"group-[.alert]:outline-orange group-[.error]:outline-red w-full pr-10 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline\">\n <template v-if=\"type === 'array'\">\n <ScalarComboboxMultiselect\n :modelValue=\"selectedArrayOptions\"\n :options=\"arrayOptions\"\n @update:modelValue=\"updateSelectedOptions\">\n <ScalarButton\n class=\"custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none\"\n fullWidth\n variant=\"ghost\">\n <span class=\"text-c-1 whitespace-nowrap\">{{\n selectedArrayOptions.length > 0\n ? selectedArrayOptions.map((option) => option.label).join(', ')\n : 'Select a value'\n }}</span>\n <ScalarIcon\n class=\"min-w-4\"\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n </ScalarComboboxMultiselect>\n </template>\n <template v-else-if=\"addingCustomValue\">\n <input\n ref=\"inputRef\"\n v-model=\"customValue\"\n class=\"text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none\"\n placeholder=\"Value\"\n type=\"text\"\n @blur=\"handleBlur\"\n @keyup.enter=\"addCustomValue\" />\n </template>\n <template v-else>\n <ScalarDropdown\n resize\n :value=\"initialValue\">\n <ScalarButton\n class=\"size-full justify-start gap-1.5 overflow-auto px-2 py-1.5 font-normal whitespace-nowrap outline-none\"\n variant=\"ghost\">\n <span class=\"text-c-1 overflow-hidden text-ellipsis\">{{\n initialValue ?? 'Select a value'\n }}</span>\n <ScalarIcon\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n <template #items>\n <ScalarDropdownItem\n v-for=\"option in options\"\n :key=\"option\"\n class=\"group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n :value=\"option\"\n @click=\"updateSelected(option)\">\n <div\n class=\"flex h-4 w-4 items-center justify-center rounded-full p-[3px]\"\n :class=\"\n isSelected(option)\n ? 'bg-c-accent text-b-1'\n : 'shadow-border text-transparent'\n \">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <span class=\"overflow-hidden text-ellipsis\">{{ option }}</span>\n </ScalarDropdownItem>\n <template v-if=\"canAddCustomValue\">\n <ScalarDropdownDivider v-if=\"options.length\" />\n <ScalarDropdownItem\n class=\"flex items-center gap-1.5\"\n @click=\"addingCustomValue = true\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>Add value</span>\n </ScalarDropdownItem>\n </template>\n </template>\n </ScalarDropdown>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAIb,MAAM,UAAU,eAAe,MAAM,SAAS,EAAE,CAAA;EAChD,MAAM,oBAAoB,IAAI,MAAK;EACnC,MAAM,cAAc,IAAI,GAAE;EAC1B,MAAM,WAAW,IAA6B,KAAI;AAElD,QAAM,cAAc,aAAa;AAC/B,QAAK,qBAAqB,SAAQ;IACnC;EAED,MAAM,kBAAkB,UAAkB;AACxC,QAAK,qBAAqB,MAAK;AAC/B,qBAAkB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;;;2BAhCN,CATf,YASe,MAAA,aAAA,EAAA;KARb,OAAM;KACN,SAAQ;;4BAGC,CAFT,mBAES,QAFT,YAES,gBADP,aAAA,SAAY,iBAAA,EAAA,EAAA,EAEd,YAEc,MAAA,WAAA,EAAA;MADZ,MAAK;MACL,MAAK"}
1
+ {"version":3,"file":"DataTableInputSelect.vue.script.js","names":[],"sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarComboboxMultiselect } from '@scalar/components/combobox'\nimport {\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n} from '@scalar/components/dropdown'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { computed, nextTick, ref, watch } from 'vue'\n\nimport type { CodeInputModelValue } from '@/v2/components/code-input/CodeInput.vue'\n\nconst props = withDefaults(\n defineProps<{\n modelValue: CodeInputModelValue\n value?: string[]\n default?: CodeInputModelValue | undefined\n canAddCustomValue?: boolean\n type?: string | undefined\n }>(),\n { canAddCustomValue: true },\n)\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: string): void\n}>()\n\nconst options = computed(() => props.value ?? [])\nconst addingCustomValue = ref(false)\nconst customValue = ref('')\nconst inputRef = ref<HTMLInputElement | null>(null)\n\nwatch(customValue, (newValue) => {\n emit('update:modelValue', newValue)\n})\n\nconst updateSelected = (value: string) => {\n emit('update:modelValue', value)\n addingCustomValue.value = false\n}\n\nconst addCustomValue = () => {\n if (customValue.value.trim()) {\n updateSelected(customValue.value)\n }\n}\n\nconst handleBlur = () => {\n if (!customValue.value.trim()) {\n emit('update:modelValue', '')\n }\n addingCustomValue.value = false\n}\n\nconst isSelected = (value: string) => {\n return props.modelValue.toString() === value\n}\n\nwatch(addingCustomValue, (newValue) => {\n if (newValue) {\n nextTick(() => {\n inputRef.value?.focus()\n })\n }\n})\n\nconst initialValue = computed(() => {\n return props.modelValue !== undefined ? props.modelValue : props.default\n})\n\n/** Options for the array type */\nconst arrayOptions = computed(() =>\n options.value.map((option) => {\n const id = option.toString()\n return { id: id, label: id, value: id }\n }),\n)\n\n/** Filter the options by what is selected */\nconst selectedArrayOptions = computed(() => {\n const selectedValues = new Set(props.modelValue.toString().split(','))\n return arrayOptions.value.filter((option) => selectedValues.has(option.id))\n})\n\n/** Update the model value when the selected options change */\nconst updateSelectedOptions = (selectedOptions: any) => {\n const selectedValues = selectedOptions.map((option: any) => option.value)\n emit('update:modelValue', selectedValues.join(','))\n}\n</script>\n\n<template>\n <div\n class=\"group-[.alert]:outline-orange group-[.error]:outline-red w-full pr-10 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline\">\n <template v-if=\"type === 'array'\">\n <ScalarComboboxMultiselect\n :modelValue=\"selectedArrayOptions\"\n :options=\"arrayOptions\"\n @update:modelValue=\"updateSelectedOptions\">\n <ScalarButton\n class=\"custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none\"\n fullWidth\n variant=\"ghost\">\n <span class=\"text-c-1 whitespace-nowrap\">{{\n selectedArrayOptions.length > 0\n ? selectedArrayOptions.map((option) => option.label).join(', ')\n : 'Select a value'\n }}</span>\n <ScalarIcon\n class=\"min-w-4\"\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n </ScalarComboboxMultiselect>\n </template>\n <template v-else-if=\"addingCustomValue\">\n <input\n ref=\"inputRef\"\n v-model=\"customValue\"\n class=\"text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none\"\n placeholder=\"Value\"\n type=\"text\"\n @blur=\"handleBlur\"\n @keyup.enter=\"addCustomValue\" />\n </template>\n <template v-else>\n <ScalarDropdown\n resize\n :value=\"initialValue\">\n <ScalarButton\n class=\"size-full justify-start gap-1.5 overflow-auto px-2 py-1.5 font-normal whitespace-nowrap outline-none\"\n variant=\"ghost\">\n <span class=\"text-c-1 overflow-hidden text-ellipsis\">{{\n initialValue ?? 'Select a value'\n }}</span>\n <ScalarIcon\n icon=\"ChevronDown\"\n size=\"md\" />\n </ScalarButton>\n <template #items>\n <ScalarDropdownItem\n v-for=\"option in options\"\n :key=\"option\"\n class=\"group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n :value=\"option\"\n @click=\"updateSelected(option)\">\n <div\n class=\"flex h-4 w-4 items-center justify-center rounded-full p-[3px]\"\n :class=\"\n isSelected(option)\n ? 'bg-c-accent text-b-1'\n : 'shadow-border text-transparent'\n \">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <span class=\"overflow-hidden text-ellipsis\">{{ option }}</span>\n </ScalarDropdownItem>\n <template v-if=\"canAddCustomValue\">\n <ScalarDropdownDivider v-if=\"options.length\" />\n <ScalarDropdownItem\n class=\"flex items-center gap-1.5\"\n @click=\"addingCustomValue = true\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>Add value</span>\n </ScalarDropdownItem>\n </template>\n </template>\n </ScalarDropdown>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAIb,MAAM,UAAU,eAAe,MAAM,SAAS,EAAE,CAAA;EAChD,MAAM,oBAAoB,IAAI,MAAK;EACnC,MAAM,cAAc,IAAI,GAAE;EAC1B,MAAM,WAAW,IAA6B,KAAI;AAElD,QAAM,cAAc,aAAa;AAC/B,QAAK,qBAAqB,SAAQ;IACnC;EAED,MAAM,kBAAkB,UAAkB;AACxC,QAAK,qBAAqB,MAAK;AAC/B,qBAAkB,QAAQ;;EAG5B,MAAM,uBAAuB;AAC3B,OAAI,YAAY,MAAM,MAAM,CAC1B,gBAAe,YAAY,MAAK;;EAIpC,MAAM,mBAAmB;AACvB,OAAI,CAAC,YAAY,MAAM,MAAM,CAC3B,MAAK,qBAAq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MAAK;MACL,MAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationForm.vue.js","names":[],"sources":["../../../../src/v2/components/forms/ConfirmationForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\n\nconst { label = 'Save', variant = 'solid' } = defineProps<{\n /** The label of the submit button */\n label?: string\n /** Sets the style of the submit button */\n variant?: 'danger' | 'solid'\n}>()\n\nconst emit = defineEmits<{\n (e: 'cancel'): void\n (e: 'submit'): void\n}>()\n</script>\n<template>\n <form\n class=\"flex flex-col gap-4 text-base\"\n @submit.prevent=\"emit('submit')\">\n <slot />\n\n <div class=\"flex justify-between gap-10\">\n <!-- Cancel -->\n <ScalarButton\n size=\"sm\"\n type=\"button\"\n variant=\"outlined\"\n @click=\"emit('cancel')\">\n Cancel\n </ScalarButton>\n\n <!-- Submit -->\n <ScalarButton\n size=\"sm\"\n type=\"submit\"\n :variant=\"variant\">\n {{ label }}\n </ScalarButton>\n </div>\n </form>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ConfirmationForm.vue.js","names":[],"sources":["../../../../src/v2/components/forms/ConfirmationForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\n\nconst { label = 'Save', variant = 'solid' } = defineProps<{\n /** The label of the submit button */\n label?: string\n /** Sets the style of the submit button */\n variant?: 'danger' | 'solid'\n}>()\n\nconst emit = defineEmits<{\n (e: 'cancel'): void\n (e: 'submit'): void\n}>()\n</script>\n<template>\n <form\n class=\"flex flex-col gap-4 text-base\"\n @submit.prevent=\"emit('submit')\">\n <slot />\n\n <div class=\"flex justify-between gap-10\">\n <!-- Cancel -->\n <ScalarButton\n size=\"sm\"\n type=\"button\"\n variant=\"outlined\"\n @click=\"emit('cancel')\">\n Cancel\n </ScalarButton>\n\n <!-- Submit -->\n <ScalarButton\n size=\"sm\"\n type=\"submit\"\n :variant=\"variant\">\n {{ label }}\n </ScalarButton>\n </div>\n </form>\n</template>\n"],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, renderSlot, toDisplayString, unref, withCtx, withModifiers } from "vue";
2
- import { ScalarButton } from "@scalar/components";
2
+ import { ScalarButton } from "@scalar/components/button";
3
3
  //#region src/v2/components/forms/ConfirmationForm.vue?vue&type=script&setup=true&lang.ts
4
4
  var _hoisted_1 = { class: "flex justify-between gap-10" };
5
5
  var ConfirmationForm_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationForm.vue.script.js","names":[],"sources":["../../../../src/v2/components/forms/ConfirmationForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\n\nconst { label = 'Save', variant = 'solid' } = defineProps<{\n /** The label of the submit button */\n label?: string\n /** Sets the style of the submit button */\n variant?: 'danger' | 'solid'\n}>()\n\nconst emit = defineEmits<{\n (e: 'cancel'): void\n (e: 'submit'): void\n}>()\n</script>\n<template>\n <form\n class=\"flex flex-col gap-4 text-base\"\n @submit.prevent=\"emit('submit')\">\n <slot />\n\n <div class=\"flex justify-between gap-10\">\n <!-- Cancel -->\n <ScalarButton\n size=\"sm\"\n type=\"button\"\n variant=\"outlined\"\n @click=\"emit('cancel')\">\n Cancel\n </ScalarButton>\n\n <!-- Submit -->\n <ScalarButton\n size=\"sm\"\n type=\"submit\"\n :variant=\"variant\">\n {{ label }}\n </ScalarButton>\n </div>\n </form>\n</template>\n"],"mappings":";;;;;;;;;;;;EAUA,MAAM,OAAO;;uBAMX,mBAuBO,QAAA;IAtBL,OAAM;IACL,UAAM,OAAA,OAAA,OAAA,KAAA,eAAA,WAAU,KAAI,SAAA,EAAA,CAAA,UAAA,CAAA;OACrB,WAAQ,KAAA,QAAA,UAAA,EAER,mBAiBM,OAjBN,YAiBM,CAfJ,YAMe,MAAA,aAAA,EAAA;IALb,MAAK;IACL,MAAK;IACL,SAAQ;IACP,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,SAAA;;2BAEd,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAF0B,YAE1B,GAAA,CAAA,EAAA,CAAA;;OAGA,YAKe,MAAA,aAAA,EAAA;IAJb,MAAK;IACL,MAAK;IACJ,SAAS,QAAA;;2BACC,CAAA,gBAAA,gBAAR,QAAA,MAAK,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"ConfirmationForm.vue.script.js","names":[],"sources":["../../../../src/v2/components/forms/ConfirmationForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\n\nconst { label = 'Save', variant = 'solid' } = defineProps<{\n /** The label of the submit button */\n label?: string\n /** Sets the style of the submit button */\n variant?: 'danger' | 'solid'\n}>()\n\nconst emit = defineEmits<{\n (e: 'cancel'): void\n (e: 'submit'): void\n}>()\n</script>\n<template>\n <form\n class=\"flex flex-col gap-4 text-base\"\n @submit.prevent=\"emit('submit')\">\n <slot />\n\n <div class=\"flex justify-between gap-10\">\n <!-- Cancel -->\n <ScalarButton\n size=\"sm\"\n type=\"button\"\n variant=\"outlined\"\n @click=\"emit('cancel')\">\n Cancel\n </ScalarButton>\n\n <!-- Submit -->\n <ScalarButton\n size=\"sm\"\n type=\"submit\"\n :variant=\"variant\">\n {{ label }}\n </ScalarButton>\n </div>\n </form>\n</template>\n"],"mappings":";;;;;;;;;;;;EAUA,MAAM,OAAO;;uBAMX,mBAuBO,QAAA;IAtBL,OAAM;IACL,UAAM,OAAA,OAAA,OAAA,KAAA,eAAA,WAAU,KAAI,SAAA,EAAA,CAAA,UAAA,CAAA;OACrB,WAAQ,KAAA,QAAA,UAAA,EAER,mBAiBM,OAjBN,YAiBM,CAfJ,YAMe,MAAA,aAAA,EAAA;IALb,MAAK;IACL,MAAK;IACL,SAAQ;IACP,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,SAAA;;2BAEd,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAF0B,YAE1B,GAAA,CAAA,EAAA,CAAA;;OAGA,YAKe,MAAA,aAAA,EAAA;IAJb,MAAK;IACL,MAAK;IACJ,SAAS,QAAA;;2BACC,CAAA,gBAAA,gBAAR,QAAA,MAAK,EAAA,EAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleSection.vue.js","names":[],"sources":["../../../../src/v2/components/layout/CollapsibleSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Simple collapsible section component that can be used to wrap content that should be collapsed and expanded\n *\n * Would like to replace with details/summary elements, but they are not supported in all browsers yet?\n */\nexport default {\n name: 'CollapsibleSection',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport { ScalarIcon } from '@scalar/components'\nimport { useId } from 'vue'\n\nimport ValueEmitter from './ValueEmitter.vue'\n\nconst {\n defaultOpen = true,\n itemCount = 0,\n isStatic,\n} = defineProps<{\n /** Whether the disclosure is open by default. */\n defaultOpen?: boolean\n /** Number of items to show in badge when collapsed. */\n itemCount?: number\n /** Whether the disclosure is static and cannot be toggled. */\n isStatic?: boolean\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst headingId = useId()\n</script>\n\n<template>\n <Disclosure\n v-slot=\"{ open }\"\n as=\"div\"\n class=\"group/collapse text-c-2 focus-within:text-c-1 last:ui-open:border-b-0\"\n :class=\"{\n 'last-of-type:first-of-type:border-b-0': isStatic,\n 'border-b': !isStatic,\n }\"\n :defaultOpen=\"defaultOpen\"\n :static=\"isStatic\">\n <!-- We use this hack to emit the slot value back to the parent -->\n <ValueEmitter\n :value=\"open as boolean\"\n @change=\"(value) => emit('update:modelValue', value)\" />\n\n <section\n :aria-labelledby=\"headingId\"\n class=\"contents\">\n <div\n class=\"bg-b-2 flex items-center\"\n :class=\"isStatic && 'rounded-t-xl border-x border-t'\">\n <!-- Main disclosure button that toggles the panel -->\n <DisclosureButton\n class=\"hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-base font-medium outline-none md:px-1.5 xl:pr-0.5 xl:pl-2\"\n :class=\"isStatic && '!pl-3'\"\n :disabled=\"isStatic\">\n <ScalarIcon\n v-if=\"!isStatic\"\n class=\"text-c-3 group-hover:text-c-1 rounded-px ui-open:rotate-90 ui-not-open:rotate-0 outline-offset-2 group-focus-visible:outline\"\n icon=\"ChevronRight\"\n size=\"md\" />\n\n <!-- Heading with title -->\n <h2\n class=\"text-c-1 m-0 flex flex-1 items-center gap-1.5 leading-[20px]\">\n <span\n :id=\"headingId\"\n class=\"contents\">\n <slot\n name=\"title\"\n :open=\"open\" />\n <span\n v-if=\"!open\"\n class=\"sr-only\">\n (Collapsed)\n </span>\n </span>\n\n <!-- Badge showing item count when collapsed. -->\n <span\n v-if=\"!open && itemCount\"\n class=\"bg-b-2 text-c-2 inline-flex h-5 w-5 items-center justify-center rounded-full border text-xs font-semibold\">\n {{ itemCount }}\n <span class=\"sr-only\">Item{{ itemCount === 1 ? '' : 's' }}</span>\n </span>\n </h2>\n </DisclosureButton>\n\n <!-- Optional actions slot that hides when the panel is closed. -->\n <div\n v-if=\"$slots.actions\"\n class=\"ui-not-open:hidden flex items-center gap-2 pr-0.75\">\n <slot\n name=\"actions\"\n :open=\"open\" />\n </div>\n </div>\n\n <!-- The collapsible content panel. -->\n <DisclosurePanel\n v-bind=\"$attrs\"\n class=\"diclosure-panel h-full max-h-fit rounded-b\">\n <slot :open=\"open\" />\n </DisclosurePanel>\n </section>\n </Disclosure>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"CollapsibleSection.vue.js","names":[],"sources":["../../../../src/v2/components/layout/CollapsibleSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Simple collapsible section component that can be used to wrap content that should be collapsed and expanded\n *\n * Would like to replace with details/summary elements, but they are not supported in all browsers yet?\n */\nexport default {\n name: 'CollapsibleSection',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { useId } from 'vue'\n\nimport ValueEmitter from './ValueEmitter.vue'\n\nconst {\n defaultOpen = true,\n itemCount = 0,\n isStatic,\n} = defineProps<{\n /** Whether the disclosure is open by default. */\n defaultOpen?: boolean\n /** Number of items to show in badge when collapsed. */\n itemCount?: number\n /** Whether the disclosure is static and cannot be toggled. */\n isStatic?: boolean\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst headingId = useId()\n</script>\n\n<template>\n <Disclosure\n v-slot=\"{ open }\"\n as=\"div\"\n class=\"group/collapse text-c-2 focus-within:text-c-1 last:ui-open:border-b-0\"\n :class=\"{\n 'last-of-type:first-of-type:border-b-0': isStatic,\n 'border-b': !isStatic,\n }\"\n :defaultOpen=\"defaultOpen\"\n :static=\"isStatic\">\n <!-- We use this hack to emit the slot value back to the parent -->\n <ValueEmitter\n :value=\"open as boolean\"\n @change=\"(value) => emit('update:modelValue', value)\" />\n\n <section\n :aria-labelledby=\"headingId\"\n class=\"contents\">\n <div\n class=\"bg-b-2 flex items-center\"\n :class=\"isStatic && 'rounded-t-xl border-x border-t'\">\n <!-- Main disclosure button that toggles the panel -->\n <DisclosureButton\n class=\"hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-base font-medium outline-none md:px-1.5 xl:pr-0.5 xl:pl-2\"\n :class=\"isStatic && '!pl-3'\"\n :disabled=\"isStatic\">\n <ScalarIcon\n v-if=\"!isStatic\"\n class=\"text-c-3 group-hover:text-c-1 rounded-px ui-open:rotate-90 ui-not-open:rotate-0 outline-offset-2 group-focus-visible:outline\"\n icon=\"ChevronRight\"\n size=\"md\" />\n\n <!-- Heading with title -->\n <h2\n class=\"text-c-1 m-0 flex flex-1 items-center gap-1.5 leading-[20px]\">\n <span\n :id=\"headingId\"\n class=\"contents\">\n <slot\n name=\"title\"\n :open=\"open\" />\n <span\n v-if=\"!open\"\n class=\"sr-only\">\n (Collapsed)\n </span>\n </span>\n\n <!-- Badge showing item count when collapsed. -->\n <span\n v-if=\"!open && itemCount\"\n class=\"bg-b-2 text-c-2 inline-flex h-5 w-5 items-center justify-center rounded-full border text-xs font-semibold\">\n {{ itemCount }}\n <span class=\"sr-only\">Item{{ itemCount === 1 ? '' : 's' }}</span>\n </span>\n </h2>\n </DisclosureButton>\n\n <!-- Optional actions slot that hides when the panel is closed. -->\n <div\n v-if=\"$slots.actions\"\n class=\"ui-not-open:hidden flex items-center gap-2 pr-0.75\">\n <slot\n name=\"actions\"\n :open=\"open\" />\n </div>\n </div>\n\n <!-- The collapsible content panel. -->\n <DisclosurePanel\n v-bind=\"$attrs\"\n class=\"diclosure-panel h-full max-h-fit rounded-b\">\n <slot :open=\"open\" />\n </DisclosurePanel>\n </section>\n </Disclosure>\n</template>\n"],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import ValueEmitter_default from "./ValueEmitter.vue.js";
2
2
  import { createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderSlot, toDisplayString, unref, useId, withCtx } from "vue";
3
- import { ScalarIcon } from "@scalar/components";
3
+ import { ScalarIcon } from "@scalar/components/icon";
4
4
  import { Disclosure, DisclosureButton, DisclosurePanel } from "@headlessui/vue";
5
5
  //#region src/v2/components/layout/CollapsibleSection.vue?vue&type=script&setup=true&lang.ts
6
6
  var _hoisted_1 = ["aria-labelledby"];
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleSection.vue.script.js","names":["$slots","$attrs"],"sources":["../../../../src/v2/components/layout/CollapsibleSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Simple collapsible section component that can be used to wrap content that should be collapsed and expanded\n *\n * Would like to replace with details/summary elements, but they are not supported in all browsers yet?\n */\nexport default {\n name: 'CollapsibleSection',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport { ScalarIcon } from '@scalar/components'\nimport { useId } from 'vue'\n\nimport ValueEmitter from './ValueEmitter.vue'\n\nconst {\n defaultOpen = true,\n itemCount = 0,\n isStatic,\n} = defineProps<{\n /** Whether the disclosure is open by default. */\n defaultOpen?: boolean\n /** Number of items to show in badge when collapsed. */\n itemCount?: number\n /** Whether the disclosure is static and cannot be toggled. */\n isStatic?: boolean\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst headingId = useId()\n</script>\n\n<template>\n <Disclosure\n v-slot=\"{ open }\"\n as=\"div\"\n class=\"group/collapse text-c-2 focus-within:text-c-1 last:ui-open:border-b-0\"\n :class=\"{\n 'last-of-type:first-of-type:border-b-0': isStatic,\n 'border-b': !isStatic,\n }\"\n :defaultOpen=\"defaultOpen\"\n :static=\"isStatic\">\n <!-- We use this hack to emit the slot value back to the parent -->\n <ValueEmitter\n :value=\"open as boolean\"\n @change=\"(value) => emit('update:modelValue', value)\" />\n\n <section\n :aria-labelledby=\"headingId\"\n class=\"contents\">\n <div\n class=\"bg-b-2 flex items-center\"\n :class=\"isStatic && 'rounded-t-xl border-x border-t'\">\n <!-- Main disclosure button that toggles the panel -->\n <DisclosureButton\n class=\"hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-base font-medium outline-none md:px-1.5 xl:pr-0.5 xl:pl-2\"\n :class=\"isStatic && '!pl-3'\"\n :disabled=\"isStatic\">\n <ScalarIcon\n v-if=\"!isStatic\"\n class=\"text-c-3 group-hover:text-c-1 rounded-px ui-open:rotate-90 ui-not-open:rotate-0 outline-offset-2 group-focus-visible:outline\"\n icon=\"ChevronRight\"\n size=\"md\" />\n\n <!-- Heading with title -->\n <h2\n class=\"text-c-1 m-0 flex flex-1 items-center gap-1.5 leading-[20px]\">\n <span\n :id=\"headingId\"\n class=\"contents\">\n <slot\n name=\"title\"\n :open=\"open\" />\n <span\n v-if=\"!open\"\n class=\"sr-only\">\n (Collapsed)\n </span>\n </span>\n\n <!-- Badge showing item count when collapsed. -->\n <span\n v-if=\"!open && itemCount\"\n class=\"bg-b-2 text-c-2 inline-flex h-5 w-5 items-center justify-center rounded-full border text-xs font-semibold\">\n {{ itemCount }}\n <span class=\"sr-only\">Item{{ itemCount === 1 ? '' : 's' }}</span>\n </span>\n </h2>\n </DisclosureButton>\n\n <!-- Optional actions slot that hides when the panel is closed. -->\n <div\n v-if=\"$slots.actions\"\n class=\"ui-not-open:hidden flex items-center gap-2 pr-0.75\">\n <slot\n name=\"actions\"\n :open=\"open\" />\n </div>\n </div>\n\n <!-- The collapsible content panel. -->\n <DisclosurePanel\n v-bind=\"$attrs\"\n class=\"diclosure-panel h-full max-h-fit rounded-b\">\n <slot :open=\"open\" />\n </DisclosurePanel>\n </section>\n </Disclosure>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;CAOE,MAAM;;;;;;;;;;;EAwBR,MAAM,OAAO;EAIb,MAAM,YAAY,OAAM;;uBAItB,YA2Ea,MAAA,WAAA,EAAA;IAzEX,IAAG;IACH,OAAK,eAAA,CAAC,yEAAuE;8CACpB,QAAA;kBAA6B,QAAA;;IAIrF,aAAa,QAAA;IACb,QAAQ,QAAA;;sBAIiD,EAZhD,WAAI,CAUd,YAE0D,sBAAA;KADvD,OAAO;KACP,UAAM,OAAA,OAAA,OAAA,MAAG,UAAU,KAAI,qBAAsB,MAAK;4BAErD,mBA2DU,WAAA;KA1DP,mBAAiB,MAAA,UAAS;KAC3B,OAAM;QACN,mBAgDM,OAAA,EA/CJ,OAAK,eAAA,CAAC,4BACE,QAAA,YAAQ,iCAAA,CAAA,EAAA,EAAA,CAEhB,YAkCmB,MAAA,iBAAA,EAAA;KAjCjB,OAAK,eAAA,CAAC,wKACE,QAAA,YAAQ,QAAA,CAAA;KACf,UAAU,QAAA;;4BAKG,CAAA,CAHL,QAAA,YAAA,WAAA,EADT,YAIc,MAAA,WAAA,EAAA;;MAFZ,OAAM;MACN,MAAK;MACL,MAAK;yCAGP,mBAsBK,MAtBL,YAsBK,CApBH,mBAWO,QAAA;MAVJ,IAAI,MAAA,UAAS;MACd,OAAM;SACN,WAEiB,KAAA,QAAA,SAAA,EAAR,MAAI,CAAA,EAAA,CAEJ,QAAA,WAAA,EADT,mBAIO,QAJP,YAEkB,gBAElB,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,GAAA,WAAA,EAAA,CAKO,QAAQ,QAAA,aAAA,WAAA,EADjB,mBAKO,QALP,YAKO,CAAA,gBAAA,gBAFF,QAAA,UAAS,GAAG,KACf,EAAA,EAAA,mBAAiE,QAAjE,YAAsB,SAAI,gBAAG,QAAA,cAAS,IAAA,KAAA,IAAA,EAAA,EAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA;;qCAOpCA,KAAAA,OAAO,WAAA,WAAA,EADf,mBAMM,OANN,YAMM,CAHJ,WAEiB,KAAA,QAAA,WAAA,EAAR,MAAI,CAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,EAKjB,YAIkB,MAAA,gBAAA,EAJlB,WACUC,KAGQ,QAHF,EACd,OAAM,8CAA4C,CAAA,EAAA;4BAC7B,CAArB,WAAqB,KAAA,QAAA,WAAA,EAAR,MAAI,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"CollapsibleSection.vue.script.js","names":["$slots","$attrs"],"sources":["../../../../src/v2/components/layout/CollapsibleSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Simple collapsible section component that can be used to wrap content that should be collapsed and expanded\n *\n * Would like to replace with details/summary elements, but they are not supported in all browsers yet?\n */\nexport default {\n name: 'CollapsibleSection',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { useId } from 'vue'\n\nimport ValueEmitter from './ValueEmitter.vue'\n\nconst {\n defaultOpen = true,\n itemCount = 0,\n isStatic,\n} = defineProps<{\n /** Whether the disclosure is open by default. */\n defaultOpen?: boolean\n /** Number of items to show in badge when collapsed. */\n itemCount?: number\n /** Whether the disclosure is static and cannot be toggled. */\n isStatic?: boolean\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst headingId = useId()\n</script>\n\n<template>\n <Disclosure\n v-slot=\"{ open }\"\n as=\"div\"\n class=\"group/collapse text-c-2 focus-within:text-c-1 last:ui-open:border-b-0\"\n :class=\"{\n 'last-of-type:first-of-type:border-b-0': isStatic,\n 'border-b': !isStatic,\n }\"\n :defaultOpen=\"defaultOpen\"\n :static=\"isStatic\">\n <!-- We use this hack to emit the slot value back to the parent -->\n <ValueEmitter\n :value=\"open as boolean\"\n @change=\"(value) => emit('update:modelValue', value)\" />\n\n <section\n :aria-labelledby=\"headingId\"\n class=\"contents\">\n <div\n class=\"bg-b-2 flex items-center\"\n :class=\"isStatic && 'rounded-t-xl border-x border-t'\">\n <!-- Main disclosure button that toggles the panel -->\n <DisclosureButton\n class=\"hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-base font-medium outline-none md:px-1.5 xl:pr-0.5 xl:pl-2\"\n :class=\"isStatic && '!pl-3'\"\n :disabled=\"isStatic\">\n <ScalarIcon\n v-if=\"!isStatic\"\n class=\"text-c-3 group-hover:text-c-1 rounded-px ui-open:rotate-90 ui-not-open:rotate-0 outline-offset-2 group-focus-visible:outline\"\n icon=\"ChevronRight\"\n size=\"md\" />\n\n <!-- Heading with title -->\n <h2\n class=\"text-c-1 m-0 flex flex-1 items-center gap-1.5 leading-[20px]\">\n <span\n :id=\"headingId\"\n class=\"contents\">\n <slot\n name=\"title\"\n :open=\"open\" />\n <span\n v-if=\"!open\"\n class=\"sr-only\">\n (Collapsed)\n </span>\n </span>\n\n <!-- Badge showing item count when collapsed. -->\n <span\n v-if=\"!open && itemCount\"\n class=\"bg-b-2 text-c-2 inline-flex h-5 w-5 items-center justify-center rounded-full border text-xs font-semibold\">\n {{ itemCount }}\n <span class=\"sr-only\">Item{{ itemCount === 1 ? '' : 's' }}</span>\n </span>\n </h2>\n </DisclosureButton>\n\n <!-- Optional actions slot that hides when the panel is closed. -->\n <div\n v-if=\"$slots.actions\"\n class=\"ui-not-open:hidden flex items-center gap-2 pr-0.75\">\n <slot\n name=\"actions\"\n :open=\"open\" />\n </div>\n </div>\n\n <!-- The collapsible content panel. -->\n <DisclosurePanel\n v-bind=\"$attrs\"\n class=\"diclosure-panel h-full max-h-fit rounded-b\">\n <slot :open=\"open\" />\n </DisclosurePanel>\n </section>\n </Disclosure>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;CAOE,MAAM;;;;;;;;;;;EAwBR,MAAM,OAAO;EAIb,MAAM,YAAY,OAAM;;uBAItB,YA2Ea,MAAA,WAAA,EAAA;IAzEX,IAAG;IACH,OAAK,eAAA,CAAC,yEAAuE;8CACpB,QAAA;kBAA6B,QAAA;;IAIrF,aAAa,QAAA;IACb,QAAQ,QAAA;;sBAIiD,EAZhD,WAAI,CAUd,YAE0D,sBAAA;KADvD,OAAO;KACP,UAAM,OAAA,OAAA,OAAA,MAAG,UAAU,KAAI,qBAAsB,MAAK;4BAErD,mBA2DU,WAAA;KA1DP,mBAAiB,MAAA,UAAS;KAC3B,OAAM;QACN,mBAgDM,OAAA,EA/CJ,OAAK,eAAA,CAAC,4BACE,QAAA,YAAQ,iCAAA,CAAA,EAAA,EAAA,CAEhB,YAkCmB,MAAA,iBAAA,EAAA;KAjCjB,OAAK,eAAA,CAAC,wKACE,QAAA,YAAQ,QAAA,CAAA;KACf,UAAU,QAAA;;4BAKG,CAAA,CAHL,QAAA,YAAA,WAAA,EADT,YAIc,MAAA,WAAA,EAAA;;MAFZ,OAAM;MACN,MAAK;MACL,MAAK;yCAGP,mBAsBK,MAtBL,YAsBK,CApBH,mBAWO,QAAA;MAVJ,IAAI,MAAA,UAAS;MACd,OAAM;SACN,WAEiB,KAAA,QAAA,SAAA,EAAR,MAAI,CAAA,EAAA,CAEJ,QAAA,WAAA,EADT,mBAIO,QAJP,YAEkB,gBAElB,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,GAAA,WAAA,EAAA,CAKO,QAAQ,QAAA,aAAA,WAAA,EADjB,mBAKO,QALP,YAKO,CAAA,gBAAA,gBAFF,QAAA,UAAS,GAAG,KACf,EAAA,EAAA,mBAAiE,QAAjE,YAAsB,SAAI,gBAAG,QAAA,cAAS,IAAA,KAAA,IAAA,EAAA,EAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA;;qCAOpCA,KAAAA,OAAO,WAAA,WAAA,EADf,mBAMM,OANN,YAMM,CAHJ,WAEiB,KAAA,QAAA,WAAA,EAAR,MAAI,CAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,EAAA,EAKjB,YAIkB,MAAA,gBAAA,EAJlB,WACUC,KAGQ,QAHF,EACd,OAAM,8CAA4C,CAAA,EAAA;4BAC7B,CAArB,WAAqB,KAAA,QAAA,WAAA,EAAR,MAAI,CAAA,CAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import { type ModalState } from '@scalar/components';
1
+ import type { ModalState } from '@scalar/components/modal';
2
2
  type __VLS_Props = {
3
3
  modalState: ModalState;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ModalClientContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/modals/ModalClientContainer.vue"],"names":[],"mappings":"AA0KA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAI3B,KAAK,WAAW,GAAG;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC;AAgI9C,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAO/C,QAAA,MAAM,UAAU;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ModalClientContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/modals/ModalClientContainer.vue"],"names":[],"mappings":"AAyKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAK1D,KAAK,WAAW,GAAG;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC;AAgI9C,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAO/C,QAAA,MAAM,UAAU;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import ModalClientContainer_vue_vue_type_script_setup_true_lang_default from "./ModalClientContainer.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/v2/components/modals/ModalClientContainer.vue
5
- var ModalClientContainer_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ModalClientContainer_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-ae5e8531"]]);
5
+ var ModalClientContainer_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ModalClientContainer_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-77897d1c"]]);
6
6
  //#endregion
7
7
  export { ModalClientContainer_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"ModalClientContainer.vue.js","names":[],"sources":["../../../../src/v2/components/modals/ModalClientContainer.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n addScalarClassesToHeadless,\n ScalarTeleportRoot,\n type ModalState,\n} from '@scalar/components'\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":""}
1
+ {"version":3,"file":"ModalClientContainer.vue.js","names":[],"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":""}
@@ -1,5 +1,6 @@
1
1
  import { createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, onBeforeMount, onBeforeUnmount, openBlock, ref, renderSlot, unref, watch, withCtx } from "vue";
2
- import { ScalarTeleportRoot, addScalarClassesToHeadless } from "@scalar/components";
2
+ import { ScalarTeleportRoot } from "@scalar/components/teleport";
3
+ import { addScalarClassesToHeadless } from "@scalar/components/helpers";
3
4
  import { useFocusTrap } from "@vueuse/integrations/useFocusTrap";
4
5
  //#region src/v2/components/modals/ModalClientContainer.vue?vue&type=script&setup=true&lang.ts
5
6
  var _hoisted_1 = { class: "scalar scalar-app z-overlay relative" };
@@ -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 {\n addScalarClassesToHeadless,\n ScalarTeleportRoot,\n type ModalState,\n} from '@scalar/components'\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":";;;;;;;;;;EASA,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,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 +1 @@
1
- {"version":3,"file":"ServerDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"names":[],"mappings":"AAkJA,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;;;;;;;;;;;;;;;;;;;;;;;;;;kFAgSd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ServerDropdown.vue.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 {\n ScalarButton,\n ScalarFloatingBackdrop,\n ScalarPopover,\n} from '@scalar/components'\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":""}
1
+ {"version":3,"file":"ServerDropdown.vue.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":""}
@@ -1,8 +1,10 @@
1
1
  import ValueEmitter_default from "../layout/ValueEmitter.vue.js";
2
2
  import ServerDropdownItem_default from "./ServerDropdownItem.vue.js";
3
3
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
4
- import { ScalarButton, ScalarFloatingBackdrop, ScalarPopover } from "@scalar/components";
4
+ import { ScalarButton } from "@scalar/components/button";
5
5
  import { ScalarIconPencilSimple, ScalarIconPlus } from "@scalar/icons";
6
+ import { ScalarPopover } from "@scalar/components/popover";
7
+ import { ScalarFloatingBackdrop } from "@scalar/components/floating";
6
8
  //#region src/v2/components/server/ServerDropdown.vue?vue&type=script&setup=true&lang.ts
7
9
  var _hoisted_1 = ["onClick"];
8
10
  var _hoisted_2 = { class: "flex items-center justify-center" };
@@ -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 {\n ScalarButton,\n ScalarFloatingBackdrop,\n ScalarPopover,\n} from '@scalar/components'\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;;;;;;;;;;;;;;;EAqCR,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,KAAiC,aAAa;OAAE,MAAE,QAAA;OAAI,CAAA;MAG9F,sBAA+B,KAAK,UAAU,KAAI,mBAAA;OAAsB;OAAO;OAAK;OAAK,MAAE,QAAA;OAAI,CAAA;;;;;;;eAKlF,QAAA,WAAM,WAAA,WAAA,EACpB,mBAQS,UAAA;;KAPP,OAAM;KACN,MAAK;KACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,iBAAA;QACZ,mBAEM,OAFN,YAEM,CADJ,YAAyC,MAAA,uBAAA,EAAA,EAAjB,OAAM,UAAQ,CAAA,CAAA,CAAA,EAAA,OAAA,OAAA,OAAA,KAExC,mBAA2B,QAAA,MAArB,kBAAc,GAAA,EAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,GAAA,WAAA,CAAA,CAAA;IAKjB,UAAQ,SAKyB,EALrB,WAAI,CAEzB,YAG0C,sBAAA;KAFvC,OAAO;KACP,UAAM,OAAA,OAAA,OAAA,MAAG,UAAU,KAAI,eAAgB,MAAK;KAC5C,WAAO,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,eAAA,MAAA;4BAEhB,YAAuE,MAAA,uBAAA,EAAA,EAA/C,OAAM,wCAAsC,CAAA,CAAA,CAAA;2BAzCvD,CAXf,YAWe,MAAA,aAAA,EAAA;KAVb,OAAM;KACN,SAAQ;;4BAIG,CAHK,QAAA,UAAA,WAAA,EAAhB,mBAGW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAoC,QAAA,EAA9B,OAAM,WAAS,EAAC,WAAO,GAAA,GAAA,gBAAO,MACpC,gBAAG,8BAAA,MAA6B,EAAA,EAAA,CAAA,EAAA,GAAA,KAAA,WAAA,EAElC,mBAGW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAuC,QAAA,EAAjC,OAAM,WAAS,EAAC,cAAU,GAAA,GAChC,YAAiC,MAAA,eAAA,EAAA,EAAjB,OAAM,UAAQ,CAAA,CAAA,EAAA,GAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"ServerDropdown.vue.script.js","names":[],"sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ServerDropdown component\n * This component is used to display the server dropdown for the operation block\n */\nexport default {\n name: 'ServerDropdown',\n}\n\nexport type ServerDropdownProps = {\n /** The meta information for the server */\n meta: ServerMeta\n /** List of servers that are available for the operation/document level */\n servers: ServerObject[]\n /** Currently selected server */\n server: ServerObject | null\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n /** Client layout */\n layout: ClientLayout\n}\n</script>\n<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarFloatingBackdrop } from '@scalar/components/floating'\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconPencilSimple, ScalarIconPlus } from '@scalar/icons'\nimport type {\n ApiReferenceEvents,\n ServerMeta,\n} from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport ValueEmitter from '@/v2/components/layout/ValueEmitter.vue'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, server, servers, meta } = defineProps<ServerDropdownProps>()\n\nconst emit = defineEmits<{\n /** Update a server variable for the selected server */\n (\n e: 'update:selectedServer',\n payload: ApiReferenceEvents['server:update:selected'],\n ): void\n (\n e: 'update:variable',\n payload: ApiReferenceEvents['server:update:variables'],\n ): void\n (e: 'update:servers'): void\n /** Update the open state of the server dropdown */\n (e: 'update:open', value: boolean): void\n}>()\n\nconst requestServerOptions = computed(() =>\n servers.map((s) => ({\n id: s.url,\n label: s.url ?? 'Unknown server',\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n</script>\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"hover:bg-b-2 font-code text-c-2 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap @3xl:ml-0.75\"\n variant=\"ghost\">\n <template v-if=\"server\">\n <span class=\"sr-only\">Server:</span>\n {{ serverUrlWithoutTrailingSlash }}\n </template>\n <template v-else>\n <span class=\"sr-only\">Add Server</span>\n <ScalarIconPlus class=\"size-3\" />\n </template>\n </ScalarButton>\n\n <template #popover=\"{ close }\">\n <div\n class=\"custom-scroll flex max-h-[inherit] flex-col gap-1 p-1\"\n @click=\"close\">\n <!-- Request -->\n <ServerDropdownItem\n v-for=\"(serverOption, index) in requestServerOptions\"\n :key=\"serverOption.id\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"request\"\n @update:selectedServer=\"\n emit('update:selectedServer', { url: serverOption.id, meta })\n \"\n @update:variable=\"\n (key, value) => emit('update:variable', { index, key, value, meta })\n \" />\n\n <!-- Add Server -->\n <template v-if=\"layout !== 'modal'\">\n <button\n class=\"text-xxs hover:bg-b-2 flex cursor-pointer items-center gap-1.5 rounded p-1.75\"\n type=\"button\"\n @click=\"emit('update:servers')\">\n <div class=\"flex items-center justify-center\">\n <ScalarIconPencilSimple class=\"size-4\" />\n </div>\n <span>Update Servers</span>\n </button>\n </template>\n </div>\n </template>\n <template #backdrop=\"{ open }\">\n <!-- Emit the slot value back out the parent -->\n <ValueEmitter\n :value=\"open\"\n @change=\"(value) => emit('update:open', value)\"\n @unmount=\"emit('update:open', false)\" />\n\n <ScalarFloatingBackdrop class=\"inset-x-px rounded-none rounded-b-lg\" />\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;CAME,MAAM;;;;;;;;;;;;;;;EAmCR,MAAM,OAAO;EAeb,MAAM,uBAAuB,eAC3B,QAAA,QAAQ,KAAK,OAAO;GAClB,IAAI,EAAE;GACN,OAAO,EAAE,OAAO;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,SA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A,GAAA,gBAAO,MACpC,gBAAG,8BAAA,MAA6B,EAAA,EAAA,CAAA,EAAA,GAAA,KAAA,WAAA,EAElC,mBAGW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAuC,QAAA,EAAjC,OAAM,WAAS,EAAC,cAAU,GAAA,GAChC,YAAiC,MAAA,eAAA,EAAA,EAAjB,OAAM,UAAQ,CAAA,CAAA,EAAA,GAAA,EAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ServerDropdownItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/server/ServerDropdownItem.vue"],"names":[],"mappings":"AAkFA,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;AAyJF,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-1b7a32a4"]]);
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
 
@@ -1 +1 @@
1
- {"version":3,"file":"ServerDropdownItem.vue.js","names":[],"sources":["../../../../src/v2/components/server/ServerDropdownItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListboxCheckbox, ScalarMarkdown } from '@scalar/components'\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":""}
1
+ {"version":3,"file":"ServerDropdownItem.vue.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":""}
@@ -1,6 +1,7 @@
1
1
  import ServerVariablesForm_default from "../../../components/Server/ServerVariablesForm.vue.js";
2
2
  import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, toDisplayString, unref, useId, withModifiers } from "vue";
3
- import { ScalarListboxCheckbox, ScalarMarkdown } from "@scalar/components";
3
+ import { ScalarListboxCheckbox } from "@scalar/components/listbox";
4
+ import { ScalarMarkdown } from "@scalar/components/markdown";
4
5
  //#region src/v2/components/server/ServerDropdownItem.vue?vue&type=script&setup=true&lang.ts
5
6
  var _hoisted_1 = ["aria-expanded"];
6
7
  var _hoisted_2 = { class: "overflow-hidden text-ellipsis whitespace-nowrap" };