@scalar/api-client 2.38.3 → 2.38.4

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 (226) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{AddressBar-CX8xiYoe.js → AddressBar-BOZGKSoz.js} +4 -4
  3. package/dist/{AddressBar-CX8xiYoe.js.map → AddressBar-BOZGKSoz.js.map} +1 -1
  4. package/dist/{App-BpNPKHmM.js → App-DHBmpWJI.js} +4 -4
  5. package/dist/{App-BpNPKHmM.js.map → App-DHBmpWJI.js.map} +1 -1
  6. package/dist/{CodeInput-BN7uw3Bh.js → CodeInput-BTN8cC5h.js} +2 -2
  7. package/dist/{CodeInput-BN7uw3Bh.js.map → CodeInput-BTN8cC5h.js.map} +1 -1
  8. package/dist/{Collection-ChAxs3rz.js → Collection-BsAG7ms5.js} +2 -2
  9. package/dist/{Collection-ChAxs3rz.js.map → Collection-BsAG7ms5.js.map} +1 -1
  10. package/dist/{CollectionAuthentication-BDpvv8cA.js → CollectionAuthentication-BMGhRnpo.js} +5 -5
  11. package/dist/{CollectionAuthentication-BDpvv8cA.js.map → CollectionAuthentication-BMGhRnpo.js.map} +1 -1
  12. package/dist/{CollectionEnvironment-dwisJ-h5.js → CollectionEnvironment-BY9Gcnln.js} +4 -4
  13. package/dist/{CollectionEnvironment-dwisJ-h5.js.map → CollectionEnvironment-BY9Gcnln.js.map} +1 -1
  14. package/dist/{CollectionOverview-CJ9-Vmei.js → CollectionOverview-C3GvN8GY.js} +3 -3
  15. package/dist/{CollectionOverview-CJ9-Vmei.js.map → CollectionOverview-C3GvN8GY.js.map} +1 -1
  16. package/dist/{CollectionServers-BWkIGwz4.js → CollectionServers-DuOLysNB.js} +5 -5
  17. package/dist/{CollectionServers-BWkIGwz4.js.map → CollectionServers-DuOLysNB.js.map} +1 -1
  18. package/dist/{CollectionSettings-CqUUYOym.js → CollectionSettings-FtXNetOh.js} +2 -2
  19. package/dist/{CollectionSettings-CqUUYOym.js.map → CollectionSettings-FtXNetOh.js.map} +1 -1
  20. package/dist/{CommandPalette-BiA0IgO8.js → CommandPalette-BxoEK8TY.js} +2 -2
  21. package/dist/{CommandPalette-BiA0IgO8.js.map → CommandPalette-BxoEK8TY.js.map} +1 -1
  22. package/dist/{Cookies-CNRSxP8J.js → Cookies-BYTv1YIA.js} +8 -8
  23. package/dist/{Cookies-CNRSxP8J.js.map → Cookies-BYTv1YIA.js.map} +1 -1
  24. package/dist/{DataTableInput-SkIUPlrB.js → DataTableInput-RydMDjn2.js} +2 -2
  25. package/dist/{DataTableInput-SkIUPlrB.js.map → DataTableInput-RydMDjn2.js.map} +1 -1
  26. package/dist/{Environment-D_CbZk0A.js → Environment-BIxG7DaO.js} +5 -5
  27. package/dist/{Environment-D_CbZk0A.js.map → Environment-BIxG7DaO.js.map} +1 -1
  28. package/dist/{EnvironmentModal-CcyqnPc2.js → EnvironmentModal-C0lYytkh.js} +2 -2
  29. package/dist/{EnvironmentModal-CcyqnPc2.js.map → EnvironmentModal-C0lYytkh.js.map} +1 -1
  30. package/dist/{Form-bA4bV_oA.js → Form-KFcdRQp1.js} +3 -3
  31. package/dist/{Form-bA4bV_oA.js.map → Form-KFcdRQp1.js.map} +1 -1
  32. package/dist/{ImportCollection-BIYMxB9Q.js → ImportCollection-CGjySEzP.js} +2 -2
  33. package/dist/{ImportCollection-BIYMxB9Q.js.map → ImportCollection-CGjySEzP.js.map} +1 -1
  34. package/dist/{MainLayout-oMIJ5QXF.js → MainLayout-BnLwst16.js} +3 -3
  35. package/dist/{MainLayout-oMIJ5QXF.js.map → MainLayout-BnLwst16.js.map} +1 -1
  36. package/dist/{Modal-DkOa_KK0.js → Modal-CTZ8UNds.js} +2 -2
  37. package/dist/{Modal-DkOa_KK0.js.map → Modal-CTZ8UNds.js.map} +1 -1
  38. package/dist/{Request-BWfYWyBa.js → Request-d0RY0ZhC.js} +10 -10
  39. package/dist/{Request-BWfYWyBa.js.map → Request-d0RY0ZhC.js.map} +1 -1
  40. package/dist/{RequestAuth-BU6ubH-c.js → RequestAuth-1cRH3DDn.js} +3 -3
  41. package/dist/{RequestAuth-BU6ubH-c.js.map → RequestAuth-1cRH3DDn.js.map} +1 -1
  42. package/dist/{RequestRoot-7xhK5_qr.js → RequestRoot-pW0yXesG.js} +7 -7
  43. package/dist/{RequestRoot-7xhK5_qr.js.map → RequestRoot-pW0yXesG.js.map} +1 -1
  44. package/dist/{RequestSection-Bx8UHW-k.js → RequestSection-D2BLvDTr.js} +4 -4
  45. package/dist/{RequestSection-Bx8UHW-k.js.map → RequestSection-D2BLvDTr.js.map} +1 -1
  46. package/dist/{ResponseSection-CLrgLMN_.js → ResponseSection-B_YF7l_E.js} +3 -3
  47. package/dist/{ResponseSection-CLrgLMN_.js.map → ResponseSection-B_YF7l_E.js.map} +1 -1
  48. package/dist/{Server-BS4zjUdO.js → Server-CEKGIEfE.js} +2 -2
  49. package/dist/{Server-BS4zjUdO.js.map → Server-CEKGIEfE.js.map} +1 -1
  50. package/dist/{Settings-BuLKHzRY.js → Settings-BaPvhJ8Y.js} +2 -2
  51. package/dist/{Settings-BuLKHzRY.js.map → Settings-BaPvhJ8Y.js.map} +1 -1
  52. package/dist/{Sidebar-Xl9_nFXX.js → Sidebar-CRxdl38Y.js} +2 -2
  53. package/dist/{Sidebar-Xl9_nFXX.js.map → Sidebar-CRxdl38Y.js.map} +1 -1
  54. package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
  55. package/dist/components/AddressBar/index.js +3 -3
  56. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  57. package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
  58. package/dist/components/CodeInput/index.js +1 -1
  59. package/dist/components/CommandPalette/index.js +1 -1
  60. package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -2
  61. package/dist/components/DataTable/index.js +2 -2
  62. package/dist/components/Form/LabelInput.vue.d.ts +1 -1
  63. package/dist/components/ImportCollection/index.js +1 -1
  64. package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
  65. package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
  66. package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
  67. package/dist/components/Server/index.js +1 -1
  68. package/dist/components/Sidebar/index.js +1 -1
  69. package/dist/components/index.d.ts +2 -2
  70. package/dist/components/index.js +4 -4
  71. package/dist/{components-DfJHvSLM.js → components-B0BwUDFw.js} +2 -2
  72. package/dist/{components-DfJHvSLM.js.map → components-B0BwUDFw.js.map} +1 -1
  73. package/dist/hooks/useSidebar.d.ts +1 -1
  74. package/dist/index.d.ts +2 -2
  75. package/dist/index.js +5 -5
  76. package/dist/layouts/App/create-api-client-app.d.ts +9 -9
  77. package/dist/layouts/App/index.js +3 -3
  78. package/dist/layouts/Modal/create-api-client-modal.d.ts +1 -1
  79. package/dist/layouts/Modal/index.d.ts +1 -1
  80. package/dist/layouts/Modal/index.js +1 -1
  81. package/dist/layouts/Web/create-api-client-web.d.ts +9 -9
  82. package/dist/layouts/Web/index.js +4 -4
  83. package/dist/libs/create-client.d.ts +3 -3
  84. package/dist/libs/environment-parser.d.ts +1 -1
  85. package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
  86. package/dist/libs/hot-keys.d.ts +1 -1
  87. package/dist/libs/index.d.ts +1 -1
  88. package/dist/libs/index.js +1 -1
  89. package/dist/libs/local-storage.d.ts +1 -1
  90. package/dist/libs/send-request/create-request-operation.d.ts +3 -3
  91. package/dist/{operation-block-DE-hoO03.js → operation-block-B1B3lJPx.js} +3 -3
  92. package/dist/{operation-block-DE-hoO03.js.map → operation-block-B1B3lJPx.js.map} +1 -1
  93. package/dist/{operation-code-sample-xgx4qi2H.js → operation-code-sample-DOzAPxLQ.js} +2 -2
  94. package/dist/{operation-code-sample-xgx4qi2H.js.map → operation-code-sample-DOzAPxLQ.js.map} +1 -1
  95. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  96. package/dist/{request-block-N7dPFyrG.js → request-block-C1kLLMEd.js} +2 -2
  97. package/dist/{request-block-N7dPFyrG.js.map → request-block-C1kLLMEd.js.map} +1 -1
  98. package/dist/store/collections.d.ts +1 -1
  99. package/dist/store/environment.d.ts +1 -1
  100. package/dist/store/events.d.ts +8 -8
  101. package/dist/store/import-spec.d.ts +2 -2
  102. package/dist/store/index.js +1 -1
  103. package/dist/store/request-example.d.ts +1 -1
  104. package/dist/store/requests.d.ts +1 -1
  105. package/dist/store/security-schemes.d.ts +1 -1
  106. package/dist/store/servers.d.ts +1 -1
  107. package/dist/store/store.d.ts +7 -7
  108. package/dist/store/tags.d.ts +1 -1
  109. package/dist/store/workspace.d.ts +1 -1
  110. package/dist/{store-DaPoVtIS.js → store-DnlAQK5d.js} +15 -15
  111. package/dist/{store-DaPoVtIS.js.map → store-DnlAQK5d.js.map} +1 -1
  112. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -3
  113. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
  114. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +2 -2
  115. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +2 -2
  116. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
  117. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
  118. package/dist/v2/blocks/operation-block/index.js +8 -8
  119. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +2 -2
  120. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +1 -1
  121. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +1 -1
  122. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +1 -1
  123. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +2 -2
  124. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
  125. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
  126. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
  127. package/dist/v2/blocks/operation-code-sample/index.js +1 -1
  128. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -4
  129. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +1 -1
  130. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
  131. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
  132. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
  133. package/dist/v2/blocks/request-block/index.js +4 -4
  134. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
  135. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
  136. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
  137. package/dist/v2/blocks/response-block/index.js +2 -2
  138. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +1 -1
  139. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
  140. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  141. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
  142. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
  143. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
  144. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
  145. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
  146. package/dist/v2/blocks/scalar-auth-selector-block/index.js +2 -2
  147. package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
  148. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
  149. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
  150. package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
  151. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
  152. package/dist/v2/features/app/App.vue.d.ts +3 -3
  153. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
  154. package/dist/v2/features/app/components/index.js +2 -2
  155. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +3 -3
  156. package/dist/v2/features/app/helpers/get-route-param.d.ts +1 -1
  157. package/dist/v2/features/app/helpers/routes.d.ts +3 -3
  158. package/dist/v2/features/app/index.d.ts +5 -5
  159. package/dist/v2/features/app/index.js +8 -8
  160. package/dist/v2/features/collection/DocumentCollection.vue.d.ts +1 -1
  161. package/dist/v2/features/collection/OperationCollection.vue.d.ts +1 -1
  162. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -1
  163. package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -4
  164. package/dist/v2/features/collection/components/Cookies.vue.d.ts +4 -4
  165. package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +4 -4
  166. package/dist/v2/features/collection/components/Environment.vue.d.ts +4 -4
  167. package/dist/v2/features/collection/components/Overview.vue.d.ts +4 -4
  168. package/dist/v2/features/collection/components/Servers.vue.d.ts +4 -4
  169. package/dist/v2/features/collection/components/Settings.vue.d.ts +4 -4
  170. package/dist/v2/features/collection/components/Tabs.vue.d.ts +1 -1
  171. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +45 -10
  172. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  173. package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +1 -1
  174. package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +1 -1
  175. package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +1 -1
  176. package/dist/v2/features/editor/hooks/use-editor.d.ts +1 -1
  177. package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +1 -1
  178. package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
  179. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
  180. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
  181. package/dist/v2/features/modal/index.js +8 -8
  182. package/dist/v2/features/modal/modal-events.d.ts +1 -1
  183. package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
  184. package/dist/v2/features/operation/index.js +8 -8
  185. package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
  186. package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
  187. package/dist/v2/helpers/get-active-proxy-url.d.ts +1 -1
  188. package/dist/v2/helpers/get-tab-details.d.ts +1 -1
  189. package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
  190. package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
  191. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
  192. package/dist/views/Collection/components/MarkdownInput.vue.d.ts +1 -1
  193. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
  194. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
  195. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
  196. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
  197. package/dist/views/Environment/handle-drag.d.ts +1 -1
  198. package/dist/views/Request/Request.vue.d.ts +1 -1
  199. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
  200. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
  201. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
  202. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
  203. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +2 -2
  204. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
  205. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +1 -1
  206. package/dist/views/Request/RequestSection/RequestAuth/index.js +3 -3
  207. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
  208. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
  209. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
  210. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
  211. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
  212. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
  213. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
  214. package/dist/views/Request/RequestSection/index.js +4 -4
  215. package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
  216. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -3
  217. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -1
  218. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
  219. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
  220. package/dist/views/Request/ResponseSection/index.js +3 -3
  221. package/dist/views/Request/components/index.js +1 -1
  222. package/dist/views/Request/handle-drag.d.ts +2 -2
  223. package/dist/views/Request/libs/auth.d.ts +1 -1
  224. package/dist/views/Request/libs/oauth2.d.ts +1 -1
  225. package/dist/views/Request/libs/watch-mode.d.ts +2 -2
  226. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"file":"Server-BS4zjUdO.js","names":[],"sources":["../src/components/Server/ServerDropdownItem.vue","../src/components/Server/ServerDropdownItem.vue","../src/components/Server/ServerDropdown.vue","../src/components/Server/ServerDropdown.vue","../src/components/Server/ServerSelector.vue","../src/components/Server/ServerSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListboxCheckbox, ScalarMarkdown } from '@scalar/components'\nimport type {\n Collection,\n Request as Operation,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport { emitCustomEvent } from '@scalar/workspace-store/events'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport ServerVariablesForm from '@/components/Server/ServerVariablesForm.vue'\nimport type { ServerVariables } from '@/components/Server/types'\nimport { useWorkspace } from '@/store/store'\n\nconst props = defineProps<{\n collection: Collection\n operation: Operation | undefined\n server: Server | undefined\n serverOption: {\n id: Server['uid']\n label: string\n }\n type: 'collection' | 'request'\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:variable', key: string, value: string): void\n}>()\n\nconst formId = useId()\nconst { collectionMutators, requestMutators, servers } = useWorkspace()\n\n/** Update the currently selected server on the collection or request */\nconst updateSelectedServer = (serverUid: Server['uid'], event?: Event) => {\n if (hasVariables(serverUid)) {\n event?.stopPropagation()\n }\n\n // Handle selected server deselection\n if (isSelectedServer.value) {\n // Clear selected server if selected\n if (props.operation?.servers?.length) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n if (props.type === 'collection') {\n collectionMutators.edit(\n props.collection.uid,\n 'selectedServerUid',\n undefined,\n )\n\n emitCustomEvent(wrapper.value, 'scalar-update-selected-server', {\n value: undefined,\n options: { disableOldStoreUpdate: true },\n })\n } else if (props.type === 'request' && props.operation) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n return\n }\n\n // Set selected server on Collection\n if (props.type === 'collection' && props.collection) {\n // Clear the selected server on the request so that the collection can be updated\n if (props.operation?.servers?.length) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n collectionMutators.edit(\n props.collection.uid,\n 'selectedServerUid',\n serverUid,\n )\n\n emitCustomEvent(wrapper.value, 'scalar-update-selected-server', {\n value: servers[serverUid]?.url,\n options: { disableOldStoreUpdate: true },\n })\n }\n // Set on the operation\n else if (props.type === 'request' && props.operation) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', serverUid)\n }\n}\n\n/** Set server checkbox in the dropdown */\nconst isSelectedServer = computed(() => {\n if (props.type === 'collection') {\n // Check selected collection unless operation level server is selected\n return (\n props.collection.selectedServerUid === props.serverOption.id &&\n !props.operation?.selectedServerUid\n )\n }\n\n if (props.type === 'request' && props.operation) {\n return props.operation.selectedServerUid === props.serverOption.id\n }\n\n return false\n})\n\nconst hasVariables = (serverUid: string) => {\n if (!serverUid) {\n return false\n }\n\n const server = servers[serverUid]\n\n return Object.keys(server?.variables ?? {}).length > 0\n}\n\nconst isExpanded = computed(\n () => isSelectedServer.value && hasVariables(props.server?.uid ?? ''),\n)\n\nconst updateServerVariable = (key: string, value: string) => {\n emit('update:variable', key, value)\n}\n\nconst wrapper = useTemplateRef('wrapper-ref')\n</script>\n<template>\n <div\n ref=\"wrapper-ref\"\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=\"(e) => updateSelectedServer(serverOption.id, e)\">\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 as ServerVariables\"\n @update:variable=\"updateServerVariable\" />\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","<script setup lang=\"ts\">\nimport { ScalarListboxCheckbox, ScalarMarkdown } from '@scalar/components'\nimport type {\n Collection,\n Request as Operation,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport { emitCustomEvent } from '@scalar/workspace-store/events'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport ServerVariablesForm from '@/components/Server/ServerVariablesForm.vue'\nimport type { ServerVariables } from '@/components/Server/types'\nimport { useWorkspace } from '@/store/store'\n\nconst props = defineProps<{\n collection: Collection\n operation: Operation | undefined\n server: Server | undefined\n serverOption: {\n id: Server['uid']\n label: string\n }\n type: 'collection' | 'request'\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:variable', key: string, value: string): void\n}>()\n\nconst formId = useId()\nconst { collectionMutators, requestMutators, servers } = useWorkspace()\n\n/** Update the currently selected server on the collection or request */\nconst updateSelectedServer = (serverUid: Server['uid'], event?: Event) => {\n if (hasVariables(serverUid)) {\n event?.stopPropagation()\n }\n\n // Handle selected server deselection\n if (isSelectedServer.value) {\n // Clear selected server if selected\n if (props.operation?.servers?.length) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n if (props.type === 'collection') {\n collectionMutators.edit(\n props.collection.uid,\n 'selectedServerUid',\n undefined,\n )\n\n emitCustomEvent(wrapper.value, 'scalar-update-selected-server', {\n value: undefined,\n options: { disableOldStoreUpdate: true },\n })\n } else if (props.type === 'request' && props.operation) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n return\n }\n\n // Set selected server on Collection\n if (props.type === 'collection' && props.collection) {\n // Clear the selected server on the request so that the collection can be updated\n if (props.operation?.servers?.length) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n collectionMutators.edit(\n props.collection.uid,\n 'selectedServerUid',\n serverUid,\n )\n\n emitCustomEvent(wrapper.value, 'scalar-update-selected-server', {\n value: servers[serverUid]?.url,\n options: { disableOldStoreUpdate: true },\n })\n }\n // Set on the operation\n else if (props.type === 'request' && props.operation) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', serverUid)\n }\n}\n\n/** Set server checkbox in the dropdown */\nconst isSelectedServer = computed(() => {\n if (props.type === 'collection') {\n // Check selected collection unless operation level server is selected\n return (\n props.collection.selectedServerUid === props.serverOption.id &&\n !props.operation?.selectedServerUid\n )\n }\n\n if (props.type === 'request' && props.operation) {\n return props.operation.selectedServerUid === props.serverOption.id\n }\n\n return false\n})\n\nconst hasVariables = (serverUid: string) => {\n if (!serverUid) {\n return false\n }\n\n const server = servers[serverUid]\n\n return Object.keys(server?.variables ?? {}).length > 0\n}\n\nconst isExpanded = computed(\n () => isSelectedServer.value && hasVariables(props.server?.uid ?? ''),\n)\n\nconst updateServerVariable = (key: string, value: string) => {\n emit('update:variable', key, value)\n}\n\nconst wrapper = useTemplateRef('wrapper-ref')\n</script>\n<template>\n <div\n ref=\"wrapper-ref\"\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=\"(e) => updateSelectedServer(serverOption.id, e)\">\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 as ServerVariables\"\n @update:variable=\"updateServerVariable\" />\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","<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarDropdownDivider,\n ScalarFloatingBackdrop,\n ScalarIcon,\n ScalarPopover,\n} from '@scalar/components'\nimport type {\n Collection,\n Request as Operation,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport { emitCustomEvent } from '@scalar/workspace-store/events'\nimport { computed, useTemplateRef, watch } from 'vue'\n\nimport { useLayout } from '@/hooks/useLayout'\nimport { useWorkspace } from '@/store/store'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, collection, operation, server } = defineProps<{\n collection: Collection\n operation?: Operation\n server: Server | undefined\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst { layout } = useLayout()\nconst { servers, collectionMutators, events, serverMutators } = useWorkspace()\n\nconst requestServerOptions = computed(() =>\n operation?.servers?.map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\nconst collectionServerOptions = computed(() =>\n // Filters out servers already present in the request\n collection?.servers\n ?.filter((serverUid) => !operation?.servers?.includes(serverUid))\n .map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\n/** If we have both request and collection servers we show the labels */\nconst showDropdownLabels = computed(\n () =>\n requestServerOptions.value?.length && collectionServerOptions.value?.length,\n)\n\n// Ensure we always have a selected server\nwatch([() => collection, () => operation], ([newCollection, newOperation]) => {\n if (\n !newCollection ||\n newCollection.selectedServerUid ||\n newOperation?.selectedServerUid\n ) {\n return\n }\n\n const firstServer = collection.servers?.[0]\n\n if (firstServer) {\n collectionMutators.edit(collection.uid, 'selectedServerUid', firstServer)\n }\n})\n\n/** Add server */\nconst handleAddServer = () =>\n events.commandPalette.emit({\n commandName: 'Add Server',\n })\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n\nconst updateServerVariable = (key: string, value: string) => {\n if (!server) {\n return\n }\n\n const variables = server.variables || {}\n variables[key] = { ...variables[key], default: value }\n\n serverMutators.edit(server.uid, 'variables', variables)\n\n // Emit event to keep the new store in sync\n emitCustomEvent(\n wrapper.value?.$el,\n 'scalar-update-selected-server-variables',\n { key, value },\n )\n}\n\nconst wrapper = useTemplateRef('wrapper-ref')\n</script>\n<template>\n <ScalarPopover\n ref=\"wrapper-ref\"\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"z-context-plus hover:bg-b-2 font-code text-c-2 ml-0.75 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap\"\n variant=\"ghost\">\n <template\n v-if=\"operation?.selectedServerUid || collection.selectedServerUid\">\n <span class=\"sr-only\">Server:</span>\n {{ serverUrlWithoutTrailingSlash }}\n </template>\n <template v-else>\n <span class=\"sr-only\">Add Server</span>\n <ScalarIcon\n icon=\"Add\"\n size=\"xs\" />\n </template>\n </ScalarButton>\n <template #popover=\"{ close }\">\n <div\n class=\"custom-scroll flex max-h-[inherit] flex-col gap-1 border-t p-1\"\n @click=\"close\">\n <!-- Request -->\n <ServerDropdownItem\n v-for=\"serverOption in requestServerOptions\"\n :key=\"serverOption.id\"\n :collection=\"collection\"\n :operation=\"operation\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"request\"\n @update:variable=\"updateServerVariable\" />\n <template v-if=\"showDropdownLabels\">\n <ScalarDropdownDivider />\n <div class=\"text-xxs text-c-2 px-2.5 py-1\">Collection</div>\n </template>\n <!-- Collection -->\n <ServerDropdownItem\n v-for=\"serverOption in collectionServerOptions\"\n :key=\"serverOption.id\"\n :collection=\"collection\"\n :operation=\"operation\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"collection\"\n @update:variable=\"updateServerVariable\" />\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=\"handleAddServer\">\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 Server</span>\n </button>\n </template>\n </div>\n </template>\n <template #backdrop>\n <ScalarFloatingBackdrop\n class=\"-top-(--scalar-address-bar-height) rounded-lg\" />\n </template>\n </ScalarPopover>\n</template>\n","<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarDropdownDivider,\n ScalarFloatingBackdrop,\n ScalarIcon,\n ScalarPopover,\n} from '@scalar/components'\nimport type {\n Collection,\n Request as Operation,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport { emitCustomEvent } from '@scalar/workspace-store/events'\nimport { computed, useTemplateRef, watch } from 'vue'\n\nimport { useLayout } from '@/hooks/useLayout'\nimport { useWorkspace } from '@/store/store'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, collection, operation, server } = defineProps<{\n collection: Collection\n operation?: Operation\n server: Server | undefined\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst { layout } = useLayout()\nconst { servers, collectionMutators, events, serverMutators } = useWorkspace()\n\nconst requestServerOptions = computed(() =>\n operation?.servers?.map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\nconst collectionServerOptions = computed(() =>\n // Filters out servers already present in the request\n collection?.servers\n ?.filter((serverUid) => !operation?.servers?.includes(serverUid))\n .map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\n/** If we have both request and collection servers we show the labels */\nconst showDropdownLabels = computed(\n () =>\n requestServerOptions.value?.length && collectionServerOptions.value?.length,\n)\n\n// Ensure we always have a selected server\nwatch([() => collection, () => operation], ([newCollection, newOperation]) => {\n if (\n !newCollection ||\n newCollection.selectedServerUid ||\n newOperation?.selectedServerUid\n ) {\n return\n }\n\n const firstServer = collection.servers?.[0]\n\n if (firstServer) {\n collectionMutators.edit(collection.uid, 'selectedServerUid', firstServer)\n }\n})\n\n/** Add server */\nconst handleAddServer = () =>\n events.commandPalette.emit({\n commandName: 'Add Server',\n })\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n\nconst updateServerVariable = (key: string, value: string) => {\n if (!server) {\n return\n }\n\n const variables = server.variables || {}\n variables[key] = { ...variables[key], default: value }\n\n serverMutators.edit(server.uid, 'variables', variables)\n\n // Emit event to keep the new store in sync\n emitCustomEvent(\n wrapper.value?.$el,\n 'scalar-update-selected-server-variables',\n { key, value },\n )\n}\n\nconst wrapper = useTemplateRef('wrapper-ref')\n</script>\n<template>\n <ScalarPopover\n ref=\"wrapper-ref\"\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"z-context-plus hover:bg-b-2 font-code text-c-2 ml-0.75 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap\"\n variant=\"ghost\">\n <template\n v-if=\"operation?.selectedServerUid || collection.selectedServerUid\">\n <span class=\"sr-only\">Server:</span>\n {{ serverUrlWithoutTrailingSlash }}\n </template>\n <template v-else>\n <span class=\"sr-only\">Add Server</span>\n <ScalarIcon\n icon=\"Add\"\n size=\"xs\" />\n </template>\n </ScalarButton>\n <template #popover=\"{ close }\">\n <div\n class=\"custom-scroll flex max-h-[inherit] flex-col gap-1 border-t p-1\"\n @click=\"close\">\n <!-- Request -->\n <ServerDropdownItem\n v-for=\"serverOption in requestServerOptions\"\n :key=\"serverOption.id\"\n :collection=\"collection\"\n :operation=\"operation\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"request\"\n @update:variable=\"updateServerVariable\" />\n <template v-if=\"showDropdownLabels\">\n <ScalarDropdownDivider />\n <div class=\"text-xxs text-c-2 px-2.5 py-1\">Collection</div>\n </template>\n <!-- Collection -->\n <ServerDropdownItem\n v-for=\"serverOption in collectionServerOptions\"\n :key=\"serverOption.id\"\n :collection=\"collection\"\n :operation=\"operation\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"collection\"\n @update:variable=\"updateServerVariable\" />\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=\"handleAddServer\">\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 Server</span>\n </button>\n </template>\n </div>\n </template>\n <template #backdrop>\n <ScalarFloatingBackdrop\n class=\"-top-(--scalar-address-bar-height) rounded-lg\" />\n </template>\n </ScalarPopover>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarButton, ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { Collection, Server } from '@scalar/oas-utils/entities/spec'\nimport { computed, watch } from 'vue'\n\nimport { useWorkspace } from '@/store/store'\n\ntype ServerOption = {\n id: Server['uid']\n label: string\n}\n\nconst { target, collection, server } = defineProps<{\n /** The collection */\n collection: Collection\n /** The selected server */\n server: Server | undefined\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'updateServer', server: string): void\n}>()\n\nconst { servers, collectionMutators } = useWorkspace()\n\nconst serverOptions = computed<ServerOption[]>(() =>\n collection?.servers.map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\nconst selectedServer = computed<ServerOption | undefined>({\n get: () =>\n server\n ? serverOptions.value.find((option) => option.id === server.uid)\n : undefined,\n set: (option) => {\n if (!option) {\n return\n }\n collectionMutators.edit(\n collection.uid,\n 'selectedServerUid',\n option.id as Server['uid'],\n )\n const serverUrl = servers[option.id]?.url\n if (serverUrl) {\n emit('updateServer', serverUrl)\n }\n },\n})\n\n// Ensure we always have a selected server\nwatch(\n () => collection,\n (newCollection) => {\n if (!newCollection || newCollection.selectedServerUid) {\n return\n }\n\n const firstServer = collection.servers?.[0]\n\n if (firstServer) {\n collectionMutators.edit(collection.uid, 'selectedServerUid', firstServer)\n if (servers[firstServer]?.url) {\n emit('updateServer', servers[firstServer].url)\n }\n }\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 <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n v-model=\"selectedServer\"\n class=\"group\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-xl px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-px size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-xl px-3 py-1.5 text-base/5 whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarButton, ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { Collection, Server } from '@scalar/oas-utils/entities/spec'\nimport { computed, watch } from 'vue'\n\nimport { useWorkspace } from '@/store/store'\n\ntype ServerOption = {\n id: Server['uid']\n label: string\n}\n\nconst { target, collection, server } = defineProps<{\n /** The collection */\n collection: Collection\n /** The selected server */\n server: Server | undefined\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'updateServer', server: string): void\n}>()\n\nconst { servers, collectionMutators } = useWorkspace()\n\nconst serverOptions = computed<ServerOption[]>(() =>\n collection?.servers.map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\nconst selectedServer = computed<ServerOption | undefined>({\n get: () =>\n server\n ? serverOptions.value.find((option) => option.id === server.uid)\n : undefined,\n set: (option) => {\n if (!option) {\n return\n }\n collectionMutators.edit(\n collection.uid,\n 'selectedServerUid',\n option.id as Server['uid'],\n )\n const serverUrl = servers[option.id]?.url\n if (serverUrl) {\n emit('updateServer', serverUrl)\n }\n },\n})\n\n// Ensure we always have a selected server\nwatch(\n () => collection,\n (newCollection) => {\n if (!newCollection || newCollection.selectedServerUid) {\n return\n }\n\n const firstServer = collection.servers?.[0]\n\n if (firstServer) {\n collectionMutators.edit(collection.uid, 'selectedServerUid', firstServer)\n if (servers[firstServer]?.url) {\n emit('updateServer', servers[firstServer].url)\n }\n }\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 <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n v-model=\"selectedServer\"\n class=\"group\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-xl px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-px size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-xl px-3 py-1.5 text-base/5 whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;ECcA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAIb,MAAM,SAAS,OAAM;EACrB,MAAM,EAAE,oBAAoB,iBAAiB,YAAY,cAAa;;EAGtE,MAAM,wBAAwB,WAA0B,UAAkB;AACxE,OAAI,aAAa,UAAU,CACzB,QAAO,iBAAgB;AAIzB,OAAI,iBAAiB,OAAO;AAE1B,QAAI,MAAM,WAAW,SAAS,OAC5B,iBAAgB,KAAK,MAAM,UAAU,KAAK,qBAAqB,KAAI;AAErE,QAAI,MAAM,SAAS,cAAc;AAC/B,wBAAmB,KACjB,MAAM,WAAW,KACjB,qBACA,KAAA,EACF;AAEA,qBAAgB,QAAQ,OAAO,iCAAiC;MAC9D,OAAO,KAAA;MACP,SAAS,EAAE,uBAAuB,MAAM;MACzC,CAAA;eACQ,MAAM,SAAS,aAAa,MAAM,UAC3C,iBAAgB,KAAK,MAAM,UAAU,KAAK,qBAAqB,KAAI;AAErE;;AAIF,OAAI,MAAM,SAAS,gBAAgB,MAAM,YAAY;AAEnD,QAAI,MAAM,WAAW,SAAS,OAC5B,iBAAgB,KAAK,MAAM,UAAU,KAAK,qBAAqB,KAAI;AAErE,uBAAmB,KACjB,MAAM,WAAW,KACjB,qBACA,UACF;AAEA,oBAAgB,QAAQ,OAAO,iCAAiC;KAC9D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E,YAAwE,gBAAvC,8BAAA,MAA6B,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Server-CEKGIEfE.js","names":[],"sources":["../src/components/Server/ServerDropdownItem.vue","../src/components/Server/ServerDropdownItem.vue","../src/components/Server/ServerDropdown.vue","../src/components/Server/ServerDropdown.vue","../src/components/Server/ServerSelector.vue","../src/components/Server/ServerSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListboxCheckbox, ScalarMarkdown } from '@scalar/components'\nimport type {\n Collection,\n Request as Operation,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport { emitCustomEvent } from '@scalar/workspace-store/events'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport ServerVariablesForm from '@/components/Server/ServerVariablesForm.vue'\nimport type { ServerVariables } from '@/components/Server/types'\nimport { useWorkspace } from '@/store/store'\n\nconst props = defineProps<{\n collection: Collection\n operation: Operation | undefined\n server: Server | undefined\n serverOption: {\n id: Server['uid']\n label: string\n }\n type: 'collection' | 'request'\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:variable', key: string, value: string): void\n}>()\n\nconst formId = useId()\nconst { collectionMutators, requestMutators, servers } = useWorkspace()\n\n/** Update the currently selected server on the collection or request */\nconst updateSelectedServer = (serverUid: Server['uid'], event?: Event) => {\n if (hasVariables(serverUid)) {\n event?.stopPropagation()\n }\n\n // Handle selected server deselection\n if (isSelectedServer.value) {\n // Clear selected server if selected\n if (props.operation?.servers?.length) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n if (props.type === 'collection') {\n collectionMutators.edit(\n props.collection.uid,\n 'selectedServerUid',\n undefined,\n )\n\n emitCustomEvent(wrapper.value, 'scalar-update-selected-server', {\n value: undefined,\n options: { disableOldStoreUpdate: true },\n })\n } else if (props.type === 'request' && props.operation) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n return\n }\n\n // Set selected server on Collection\n if (props.type === 'collection' && props.collection) {\n // Clear the selected server on the request so that the collection can be updated\n if (props.operation?.servers?.length) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n collectionMutators.edit(\n props.collection.uid,\n 'selectedServerUid',\n serverUid,\n )\n\n emitCustomEvent(wrapper.value, 'scalar-update-selected-server', {\n value: servers[serverUid]?.url,\n options: { disableOldStoreUpdate: true },\n })\n }\n // Set on the operation\n else if (props.type === 'request' && props.operation) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', serverUid)\n }\n}\n\n/** Set server checkbox in the dropdown */\nconst isSelectedServer = computed(() => {\n if (props.type === 'collection') {\n // Check selected collection unless operation level server is selected\n return (\n props.collection.selectedServerUid === props.serverOption.id &&\n !props.operation?.selectedServerUid\n )\n }\n\n if (props.type === 'request' && props.operation) {\n return props.operation.selectedServerUid === props.serverOption.id\n }\n\n return false\n})\n\nconst hasVariables = (serverUid: string) => {\n if (!serverUid) {\n return false\n }\n\n const server = servers[serverUid]\n\n return Object.keys(server?.variables ?? {}).length > 0\n}\n\nconst isExpanded = computed(\n () => isSelectedServer.value && hasVariables(props.server?.uid ?? ''),\n)\n\nconst updateServerVariable = (key: string, value: string) => {\n emit('update:variable', key, value)\n}\n\nconst wrapper = useTemplateRef('wrapper-ref')\n</script>\n<template>\n <div\n ref=\"wrapper-ref\"\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=\"(e) => updateSelectedServer(serverOption.id, e)\">\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 as ServerVariables\"\n @update:variable=\"updateServerVariable\" />\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","<script setup lang=\"ts\">\nimport { ScalarListboxCheckbox, ScalarMarkdown } from '@scalar/components'\nimport type {\n Collection,\n Request as Operation,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport { emitCustomEvent } from '@scalar/workspace-store/events'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport ServerVariablesForm from '@/components/Server/ServerVariablesForm.vue'\nimport type { ServerVariables } from '@/components/Server/types'\nimport { useWorkspace } from '@/store/store'\n\nconst props = defineProps<{\n collection: Collection\n operation: Operation | undefined\n server: Server | undefined\n serverOption: {\n id: Server['uid']\n label: string\n }\n type: 'collection' | 'request'\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:variable', key: string, value: string): void\n}>()\n\nconst formId = useId()\nconst { collectionMutators, requestMutators, servers } = useWorkspace()\n\n/** Update the currently selected server on the collection or request */\nconst updateSelectedServer = (serverUid: Server['uid'], event?: Event) => {\n if (hasVariables(serverUid)) {\n event?.stopPropagation()\n }\n\n // Handle selected server deselection\n if (isSelectedServer.value) {\n // Clear selected server if selected\n if (props.operation?.servers?.length) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n if (props.type === 'collection') {\n collectionMutators.edit(\n props.collection.uid,\n 'selectedServerUid',\n undefined,\n )\n\n emitCustomEvent(wrapper.value, 'scalar-update-selected-server', {\n value: undefined,\n options: { disableOldStoreUpdate: true },\n })\n } else if (props.type === 'request' && props.operation) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n return\n }\n\n // Set selected server on Collection\n if (props.type === 'collection' && props.collection) {\n // Clear the selected server on the request so that the collection can be updated\n if (props.operation?.servers?.length) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', null)\n }\n collectionMutators.edit(\n props.collection.uid,\n 'selectedServerUid',\n serverUid,\n )\n\n emitCustomEvent(wrapper.value, 'scalar-update-selected-server', {\n value: servers[serverUid]?.url,\n options: { disableOldStoreUpdate: true },\n })\n }\n // Set on the operation\n else if (props.type === 'request' && props.operation) {\n requestMutators.edit(props.operation.uid, 'selectedServerUid', serverUid)\n }\n}\n\n/** Set server checkbox in the dropdown */\nconst isSelectedServer = computed(() => {\n if (props.type === 'collection') {\n // Check selected collection unless operation level server is selected\n return (\n props.collection.selectedServerUid === props.serverOption.id &&\n !props.operation?.selectedServerUid\n )\n }\n\n if (props.type === 'request' && props.operation) {\n return props.operation.selectedServerUid === props.serverOption.id\n }\n\n return false\n})\n\nconst hasVariables = (serverUid: string) => {\n if (!serverUid) {\n return false\n }\n\n const server = servers[serverUid]\n\n return Object.keys(server?.variables ?? {}).length > 0\n}\n\nconst isExpanded = computed(\n () => isSelectedServer.value && hasVariables(props.server?.uid ?? ''),\n)\n\nconst updateServerVariable = (key: string, value: string) => {\n emit('update:variable', key, value)\n}\n\nconst wrapper = useTemplateRef('wrapper-ref')\n</script>\n<template>\n <div\n ref=\"wrapper-ref\"\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=\"(e) => updateSelectedServer(serverOption.id, e)\">\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 as ServerVariables\"\n @update:variable=\"updateServerVariable\" />\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","<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarDropdownDivider,\n ScalarFloatingBackdrop,\n ScalarIcon,\n ScalarPopover,\n} from '@scalar/components'\nimport type {\n Collection,\n Request as Operation,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport { emitCustomEvent } from '@scalar/workspace-store/events'\nimport { computed, useTemplateRef, watch } from 'vue'\n\nimport { useLayout } from '@/hooks/useLayout'\nimport { useWorkspace } from '@/store/store'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, collection, operation, server } = defineProps<{\n collection: Collection\n operation?: Operation\n server: Server | undefined\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst { layout } = useLayout()\nconst { servers, collectionMutators, events, serverMutators } = useWorkspace()\n\nconst requestServerOptions = computed(() =>\n operation?.servers?.map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\nconst collectionServerOptions = computed(() =>\n // Filters out servers already present in the request\n collection?.servers\n ?.filter((serverUid) => !operation?.servers?.includes(serverUid))\n .map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\n/** If we have both request and collection servers we show the labels */\nconst showDropdownLabels = computed(\n () =>\n requestServerOptions.value?.length && collectionServerOptions.value?.length,\n)\n\n// Ensure we always have a selected server\nwatch([() => collection, () => operation], ([newCollection, newOperation]) => {\n if (\n !newCollection ||\n newCollection.selectedServerUid ||\n newOperation?.selectedServerUid\n ) {\n return\n }\n\n const firstServer = collection.servers?.[0]\n\n if (firstServer) {\n collectionMutators.edit(collection.uid, 'selectedServerUid', firstServer)\n }\n})\n\n/** Add server */\nconst handleAddServer = () =>\n events.commandPalette.emit({\n commandName: 'Add Server',\n })\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n\nconst updateServerVariable = (key: string, value: string) => {\n if (!server) {\n return\n }\n\n const variables = server.variables || {}\n variables[key] = { ...variables[key], default: value }\n\n serverMutators.edit(server.uid, 'variables', variables)\n\n // Emit event to keep the new store in sync\n emitCustomEvent(\n wrapper.value?.$el,\n 'scalar-update-selected-server-variables',\n { key, value },\n )\n}\n\nconst wrapper = useTemplateRef('wrapper-ref')\n</script>\n<template>\n <ScalarPopover\n ref=\"wrapper-ref\"\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"z-context-plus hover:bg-b-2 font-code text-c-2 ml-0.75 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap\"\n variant=\"ghost\">\n <template\n v-if=\"operation?.selectedServerUid || collection.selectedServerUid\">\n <span class=\"sr-only\">Server:</span>\n {{ serverUrlWithoutTrailingSlash }}\n </template>\n <template v-else>\n <span class=\"sr-only\">Add Server</span>\n <ScalarIcon\n icon=\"Add\"\n size=\"xs\" />\n </template>\n </ScalarButton>\n <template #popover=\"{ close }\">\n <div\n class=\"custom-scroll flex max-h-[inherit] flex-col gap-1 border-t p-1\"\n @click=\"close\">\n <!-- Request -->\n <ServerDropdownItem\n v-for=\"serverOption in requestServerOptions\"\n :key=\"serverOption.id\"\n :collection=\"collection\"\n :operation=\"operation\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"request\"\n @update:variable=\"updateServerVariable\" />\n <template v-if=\"showDropdownLabels\">\n <ScalarDropdownDivider />\n <div class=\"text-xxs text-c-2 px-2.5 py-1\">Collection</div>\n </template>\n <!-- Collection -->\n <ServerDropdownItem\n v-for=\"serverOption in collectionServerOptions\"\n :key=\"serverOption.id\"\n :collection=\"collection\"\n :operation=\"operation\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"collection\"\n @update:variable=\"updateServerVariable\" />\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=\"handleAddServer\">\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 Server</span>\n </button>\n </template>\n </div>\n </template>\n <template #backdrop>\n <ScalarFloatingBackdrop\n class=\"-top-(--scalar-address-bar-height) rounded-lg\" />\n </template>\n </ScalarPopover>\n</template>\n","<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarDropdownDivider,\n ScalarFloatingBackdrop,\n ScalarIcon,\n ScalarPopover,\n} from '@scalar/components'\nimport type {\n Collection,\n Request as Operation,\n Server,\n} from '@scalar/oas-utils/entities/spec'\nimport { emitCustomEvent } from '@scalar/workspace-store/events'\nimport { computed, useTemplateRef, watch } from 'vue'\n\nimport { useLayout } from '@/hooks/useLayout'\nimport { useWorkspace } from '@/store/store'\n\nimport ServerDropdownItem from './ServerDropdownItem.vue'\n\nconst { target, collection, operation, server } = defineProps<{\n collection: Collection\n operation?: Operation\n server: Server | undefined\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst { layout } = useLayout()\nconst { servers, collectionMutators, events, serverMutators } = useWorkspace()\n\nconst requestServerOptions = computed(() =>\n operation?.servers?.map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\nconst collectionServerOptions = computed(() =>\n // Filters out servers already present in the request\n collection?.servers\n ?.filter((serverUid) => !operation?.servers?.includes(serverUid))\n .map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\n/** If we have both request and collection servers we show the labels */\nconst showDropdownLabels = computed(\n () =>\n requestServerOptions.value?.length && collectionServerOptions.value?.length,\n)\n\n// Ensure we always have a selected server\nwatch([() => collection, () => operation], ([newCollection, newOperation]) => {\n if (\n !newCollection ||\n newCollection.selectedServerUid ||\n newOperation?.selectedServerUid\n ) {\n return\n }\n\n const firstServer = collection.servers?.[0]\n\n if (firstServer) {\n collectionMutators.edit(collection.uid, 'selectedServerUid', firstServer)\n }\n})\n\n/** Add server */\nconst handleAddServer = () =>\n events.commandPalette.emit({\n commandName: 'Add Server',\n })\n\nconst serverUrlWithoutTrailingSlash = computed(() => {\n if (server?.url?.endsWith('/')) {\n return server.url.slice(0, -1)\n }\n return server?.url || ''\n})\n\nconst updateServerVariable = (key: string, value: string) => {\n if (!server) {\n return\n }\n\n const variables = server.variables || {}\n variables[key] = { ...variables[key], default: value }\n\n serverMutators.edit(server.uid, 'variables', variables)\n\n // Emit event to keep the new store in sync\n emitCustomEvent(\n wrapper.value?.$el,\n 'scalar-update-selected-server-variables',\n { key, value },\n )\n}\n\nconst wrapper = useTemplateRef('wrapper-ref')\n</script>\n<template>\n <ScalarPopover\n ref=\"wrapper-ref\"\n class=\"max-h-[inherit] p-0 text-base\"\n focus\n :offset=\"0\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"z-context-plus hover:bg-b-2 font-code text-c-2 ml-0.75 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap\"\n variant=\"ghost\">\n <template\n v-if=\"operation?.selectedServerUid || collection.selectedServerUid\">\n <span class=\"sr-only\">Server:</span>\n {{ serverUrlWithoutTrailingSlash }}\n </template>\n <template v-else>\n <span class=\"sr-only\">Add Server</span>\n <ScalarIcon\n icon=\"Add\"\n size=\"xs\" />\n </template>\n </ScalarButton>\n <template #popover=\"{ close }\">\n <div\n class=\"custom-scroll flex max-h-[inherit] flex-col gap-1 border-t p-1\"\n @click=\"close\">\n <!-- Request -->\n <ServerDropdownItem\n v-for=\"serverOption in requestServerOptions\"\n :key=\"serverOption.id\"\n :collection=\"collection\"\n :operation=\"operation\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"request\"\n @update:variable=\"updateServerVariable\" />\n <template v-if=\"showDropdownLabels\">\n <ScalarDropdownDivider />\n <div class=\"text-xxs text-c-2 px-2.5 py-1\">Collection</div>\n </template>\n <!-- Collection -->\n <ServerDropdownItem\n v-for=\"serverOption in collectionServerOptions\"\n :key=\"serverOption.id\"\n :collection=\"collection\"\n :operation=\"operation\"\n :server=\"server\"\n :serverOption=\"serverOption\"\n type=\"collection\"\n @update:variable=\"updateServerVariable\" />\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=\"handleAddServer\">\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 Server</span>\n </button>\n </template>\n </div>\n </template>\n <template #backdrop>\n <ScalarFloatingBackdrop\n class=\"-top-(--scalar-address-bar-height) rounded-lg\" />\n </template>\n </ScalarPopover>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarButton, ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { Collection, Server } from '@scalar/oas-utils/entities/spec'\nimport { computed, watch } from 'vue'\n\nimport { useWorkspace } from '@/store/store'\n\ntype ServerOption = {\n id: Server['uid']\n label: string\n}\n\nconst { target, collection, server } = defineProps<{\n /** The collection */\n collection: Collection\n /** The selected server */\n server: Server | undefined\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'updateServer', server: string): void\n}>()\n\nconst { servers, collectionMutators } = useWorkspace()\n\nconst serverOptions = computed<ServerOption[]>(() =>\n collection?.servers.map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\nconst selectedServer = computed<ServerOption | undefined>({\n get: () =>\n server\n ? serverOptions.value.find((option) => option.id === server.uid)\n : undefined,\n set: (option) => {\n if (!option) {\n return\n }\n collectionMutators.edit(\n collection.uid,\n 'selectedServerUid',\n option.id as Server['uid'],\n )\n const serverUrl = servers[option.id]?.url\n if (serverUrl) {\n emit('updateServer', serverUrl)\n }\n },\n})\n\n// Ensure we always have a selected server\nwatch(\n () => collection,\n (newCollection) => {\n if (!newCollection || newCollection.selectedServerUid) {\n return\n }\n\n const firstServer = collection.servers?.[0]\n\n if (firstServer) {\n collectionMutators.edit(collection.uid, 'selectedServerUid', firstServer)\n if (servers[firstServer]?.url) {\n emit('updateServer', servers[firstServer].url)\n }\n }\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 <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n v-model=\"selectedServer\"\n class=\"group\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-xl px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-px size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-xl px-3 py-1.5 text-base/5 whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarButton, ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { Collection, Server } from '@scalar/oas-utils/entities/spec'\nimport { computed, watch } from 'vue'\n\nimport { useWorkspace } from '@/store/store'\n\ntype ServerOption = {\n id: Server['uid']\n label: string\n}\n\nconst { target, collection, server } = defineProps<{\n /** The collection */\n collection: Collection\n /** The selected server */\n server: Server | undefined\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'updateServer', server: string): void\n}>()\n\nconst { servers, collectionMutators } = useWorkspace()\n\nconst serverOptions = computed<ServerOption[]>(() =>\n collection?.servers.map((serverUid) => ({\n id: serverUid,\n label: servers[serverUid]?.url ?? 'Unknown server',\n })),\n)\n\nconst selectedServer = computed<ServerOption | undefined>({\n get: () =>\n server\n ? serverOptions.value.find((option) => option.id === server.uid)\n : undefined,\n set: (option) => {\n if (!option) {\n return\n }\n collectionMutators.edit(\n collection.uid,\n 'selectedServerUid',\n option.id as Server['uid'],\n )\n const serverUrl = servers[option.id]?.url\n if (serverUrl) {\n emit('updateServer', serverUrl)\n }\n },\n})\n\n// Ensure we always have a selected server\nwatch(\n () => collection,\n (newCollection) => {\n if (!newCollection || newCollection.selectedServerUid) {\n return\n }\n\n const firstServer = collection.servers?.[0]\n\n if (firstServer) {\n collectionMutators.edit(collection.uid, 'selectedServerUid', firstServer)\n if (servers[firstServer]?.url) {\n emit('updateServer', servers[firstServer].url)\n }\n }\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 <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n v-model=\"selectedServer\"\n class=\"group\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n :teleport=\"`#${target}`\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-xl px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-px size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-xl px-3 py-1.5 text-base/5 whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;ECcA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAIb,MAAM,SAAS,OAAM;EACrB,MAAM,EAAE,oBAAoB,iBAAiB,YAAY,cAAa;;EAGtE,MAAM,wBAAwB,WAA0B,UAAkB;AACxE,OAAI,aAAa,UAAU,CACzB,QAAO,iBAAgB;AAIzB,OAAI,iBAAiB,OAAO;AAE1B,QAAI,MAAM,WAAW,SAAS,OAC5B,iBAAgB,KAAK,MAAM,UAAU,KAAK,qBAAqB,KAAI;AAErE,QAAI,MAAM,SAAS,cAAc;AAC/B,wBAAmB,KACjB,MAAM,WAAW,KACjB,qBACA,KAAA,EACF;AAEA,qBAAgB,QAAQ,OAAO,iCAAiC;MAC9D,OAA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AA,EAAA;KAPb,OAAM;KACN,SAAQ;;4BAC4B;gCAApC,mBAAoC,QAAA,EAA9B,OAAM,WAAS,EAAC,WAAO,GAAA;MAC7B,mBAAwE,QAAxE,YAAwE,gBAAvC,8BAAA,MAA6B,EAAA,EAAA;MAC9D,YAEkB,MAAA,oBAAA,EAAA;OADhB,OAAM;OACN,QAAO;;;;;;;;;;;uBAGb,mBAKM,OALN,YAKM,CAAA,OAAA,OAAA,OAAA,KAFJ,mBAAoC,QAAA,EAA9B,OAAM,WAAS,EAAC,WAAO,GAAA,GAC7B,mBAAwE,QAAxE,YAAwE,gBAAvC,8BAAA,MAA6B,EAAA,EAAA,CAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import { r as useWorkspace, w as useActiveEntities } from "./store-DaPoVtIS.js";
1
+ import { r as useWorkspace, w as useActiveEntities } from "./store-DnlAQK5d.js";
2
2
  import { t as IntegrationLogo_default } from "./IntegrationLogo-B9EDW8db.js";
3
3
  import { t as ViewLayout_default } from "./ViewLayout-BOXN0IYo.js";
4
4
  import { t as ViewLayoutContent_default } from "./ViewLayoutContent-CvMoJYPF.js";
@@ -344,4 +344,4 @@ var Settings_default = /* @__PURE__ */ defineComponent({
344
344
  //#endregion
345
345
  export { Settings_default as default };
346
346
 
347
- //# sourceMappingURL=Settings-BuLKHzRY.js.map
347
+ //# sourceMappingURL=Settings-BaPvhJ8Y.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Settings-BuLKHzRY.js","names":["$slots"],"sources":["../src/views/Settings/components/SettingsAppearance.vue","../src/views/Settings/components/SettingsAppearance.vue","../src/views/Settings/components/SettingsSection.vue","../src/views/Settings/components/SettingsSection.vue","../src/views/Settings/SettingsGeneral.vue","../src/views/Settings/SettingsGeneral.vue","../src/views/Settings/Settings.vue","../src/views/Settings/Settings.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { cva, cx, ScalarButton, ScalarIcon } from '@scalar/components'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\n\nconst { colorMode, setColorMode } = useColorMode()\n\nconst buttonStyles = cva({\n base: 'w-full shadow-none text-c-1 justify-start pl-2 gap-2 border',\n variants: {\n active: {\n true: 'bg-primary text-c-1 hover:bg-inherit',\n false: 'bg-b-1 hover:bg-b-2',\n },\n },\n})\n</script>\n<template>\n <div class=\"flex flex-col gap-2\">\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'system' }))\"\n @click=\"setColorMode('system')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'system',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'system'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n System Preference (default)\n </ScalarButton>\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'light' }))\"\n @click=\"setColorMode('light')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'light',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'light'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Light Mode Always\n </ScalarButton>\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'dark' }))\"\n @click=\"setColorMode('dark')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'dark',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'dark'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Dark Mode Always\n </ScalarButton>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { cva, cx, ScalarButton, ScalarIcon } from '@scalar/components'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\n\nconst { colorMode, setColorMode } = useColorMode()\n\nconst buttonStyles = cva({\n base: 'w-full shadow-none text-c-1 justify-start pl-2 gap-2 border',\n variants: {\n active: {\n true: 'bg-primary text-c-1 hover:bg-inherit',\n false: 'bg-b-1 hover:bg-b-2',\n },\n },\n})\n</script>\n<template>\n <div class=\"flex flex-col gap-2\">\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'system' }))\"\n @click=\"setColorMode('system')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'system',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'system'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n System Preference (default)\n </ScalarButton>\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'light' }))\"\n @click=\"setColorMode('light')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'light',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'light'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Light Mode Always\n </ScalarButton>\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'dark' }))\"\n @click=\"setColorMode('dark')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'dark',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'dark'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Dark Mode Always\n </ScalarButton>\n </div>\n</template>\n","<script setup lang=\"ts\">\ndefineSlots<{\n title?: () => string\n description?: () => string\n default: () => any\n}>()\n</script>\n\n<template>\n <div class=\"flex flex-col gap-2\">\n <template v-if=\"$slots.title\">\n <h3 class=\"font-bold\">\n <slot name=\"title\" />\n </h3>\n </template>\n\n <template v-if=\"$slots.description\">\n <p class=\"text-c-2 mb-4 leading-[21px]\">\n <slot name=\"description\" />\n </p>\n </template>\n\n <slot />\n </div>\n</template>\n","<script setup lang=\"ts\">\ndefineSlots<{\n title?: () => string\n description?: () => string\n default: () => any\n}>()\n</script>\n\n<template>\n <div class=\"flex flex-col gap-2\">\n <template v-if=\"$slots.title\">\n <h3 class=\"font-bold\">\n <slot name=\"title\" />\n </h3>\n </template>\n\n <template v-if=\"$slots.description\">\n <p class=\"text-c-2 mb-4 leading-[21px]\">\n <slot name=\"description\" />\n </p>\n </template>\n\n <slot />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { cva, cx, ScalarButton, ScalarIcon } from '@scalar/components'\nimport {\n themeLabels,\n type IntegrationThemeId,\n type ThemeId,\n} from '@scalar/themes'\n\nimport IntegrationLogo from '@/components/ImportCollection/IntegrationLogo.vue'\nimport { useWorkspace } from '@/store'\nimport { useActiveEntities } from '@/store/active-entities'\n\nimport SettingsGeneralAppearance from './components/SettingsAppearance.vue'\nimport SettingsSection from './components/SettingsSection.vue'\n\nconst { activeWorkspace } = useActiveEntities()\nconst { proxyUrl, workspaceMutators } = useWorkspace()\n\nconst DEFAULT_PROXY_URL = 'https://proxy.scalar.com'\n\nconst themeIds: Exclude<ThemeId, IntegrationThemeId>[] = [\n 'default',\n 'alternate',\n // 'moon',\n 'purple',\n 'solarized',\n // 'bluePlanet',\n 'saturn',\n 'kepler',\n // 'mars',\n // 'deepSpace',\n // 'laserwave',\n]\n\nconst integrationThemeIds: IntegrationThemeId[] = ['elysiajs', 'fastify']\n\nconst getThemeColors = (\n themeId: Exclude<ThemeId, IntegrationThemeId>,\n): { light: string; dark: string; accent: string } => {\n const colors: Record<\n Exclude<ThemeId, IntegrationThemeId>,\n { light: string; dark: string; accent: string }\n > = {\n default: { light: '#fff', dark: '#0f0f0f', accent: '#0099ff' },\n alternate: { light: '#f9f9f9', dark: '#131313', accent: '#e7e7e7' },\n moon: { light: '#ccc9b3', dark: '#313332', accent: '#645b0f' },\n purple: { light: '#f5f6f8', dark: '#22252b', accent: '#5469d4' },\n solarized: { light: '#fdf6e3', dark: '#00212b', accent: '#007acc' },\n bluePlanet: { light: '#f0f2f5', dark: '#000e23', accent: '#e0e2e6' },\n saturn: { light: '#e4e4df', dark: '#2c2c30', accent: '#1763a6' },\n kepler: { light: '#f6f6f6', dark: '#0d0f1e', accent: '#7070ff' },\n mars: { light: '#f2efe8', dark: '#321116', accent: '#c75549' },\n deepSpace: { light: '#f4f4f5', dark: '#09090b', accent: '#8ab4f8' },\n laserwave: { light: '#f4f2f7', dark: '#27212e', accent: '#ed78c2' },\n none: { light: '#ffffff', dark: '#000000', accent: '#3b82f6' },\n }\n return (\n colors[themeId] || { light: '#ffffff', dark: '#000000', accent: '#3b82f6' }\n )\n}\n\nconst changeTheme = (themeId: ThemeId) =>\n workspaceMutators.edit(activeWorkspace.value?.uid, 'themeId', themeId)\n\nconst buttonStyles = cva({\n base: 'w-full shadow-none text-c-1 justify-start pl-2 gap-2 border',\n variants: {\n active: {\n true: 'bg-primary text-c-1 hover:bg-inherit',\n false: 'bg-b-1 hover:bg-b-2',\n },\n },\n})\n\nconst setProxy = (newProxy: string | undefined) =>\n workspaceMutators.edit(activeWorkspace.value?.uid, 'proxyUrl', newProxy)\n</script>\n<template>\n <div class=\"bg-b-1 h-full w-full overflow-auto\">\n <div class=\"mr-auto ml-auto w-full max-w-[720px] px-5 py-5\">\n <div class=\"flex flex-col gap-8\">\n <!-- Heading -->\n <div>\n <h2 class=\"mt-10 text-xl font-bold\">Settings</h2>\n </div>\n\n <!-- Proxy -->\n <SettingsSection>\n <template #title> CORS Proxy </template>\n <template #description>\n Browsers block cross-origin requests for security. We provide a\n public proxy to\n <a\n class=\"hover:text-c-1 underline-offset-2\"\n href=\"https://en.wikipedia.org/wiki/Cross-origin_resource_sharing\"\n target=\"_blank\">\n bypass CORS issues\n </a>\n . Check the\n <a\n class=\"hover:text-c-1 underline-offset-2\"\n href=\"https://github.com/scalar/scalar/tree/main/examples/proxy-server\"\n target=\"_blank\">\n source code on GitHub\n </a>\n .\n </template>\n\n <div class=\"flex flex-col gap-2\">\n <!-- Default proxy -->\n <ScalarButton\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL,\n }),\n )\n \"\n @click=\"setProxy(DEFAULT_PROXY_URL)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Use proxy.scalar.com (default)\n </ScalarButton>\n\n <!-- Custom proxy (only if configured) -->\n <ScalarButton\n v-if=\"proxyUrl && proxyUrl !== DEFAULT_PROXY_URL\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.proxyUrl === proxyUrl,\n }),\n )\n \"\n @click=\"setProxy(proxyUrl)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.proxyUrl === proxyUrl,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.proxyUrl === proxyUrl\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Use custom proxy ({{ proxyUrl }})\n </ScalarButton>\n\n <!-- No proxy -->\n <ScalarButton\n :class=\"cx(buttonStyles({ active: !activeWorkspace?.proxyUrl }))\"\n @click=\"setProxy(undefined)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"\n !activeWorkspace?.proxyUrl &&\n 'bg-c-accent text-b-1 border-transparent'\n \">\n <ScalarIcon\n v-if=\"!activeWorkspace?.proxyUrl\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Skip the proxy\n </ScalarButton>\n </div>\n </SettingsSection>\n\n <!-- Themes -->\n <SettingsSection>\n <template #title> Themes </template>\n <template #description>\n We've got a whole rainbow of themes for you to play with:\n </template>\n\n <div class=\"flex flex-col gap-2\">\n <div class=\"grid grid-cols-2 gap-2\">\n <ScalarButton\n v-for=\"themeId in themeIds\"\n :key=\"themeId\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.themeId === themeId,\n }),\n )\n \"\n @click=\"changeTheme(themeId)\">\n <div class=\"flex items-center gap-2\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.themeId === themeId,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.themeId === themeId\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n {{ themeLabels[themeId] }}\n </div>\n <div class=\"flex items-center gap-1\">\n <span\n class=\"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).light,\n }\" />\n <span\n class=\"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).dark,\n }\" />\n <span\n class=\"border-c-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).accent,\n }\" />\n </div>\n </ScalarButton>\n </div>\n </div>\n </SettingsSection>\n\n <!-- Frameworks -->\n <SettingsSection>\n <template #title> Framework Themes </template>\n <template #description>\n Are you a real fan? Show your support by using your favorite\n framework's theme!\n </template>\n\n <div class=\"grid grid-cols-2 gap-2\">\n <ScalarButton\n v-for=\"themeId in integrationThemeIds\"\n :key=\"themeId\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.themeId === themeId,\n }),\n )\n \"\n @click=\"changeTheme(themeId)\">\n <div class=\"flex items-center gap-2\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.themeId === themeId,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.themeId === themeId\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n {{ themeLabels[themeId] }}\n </div>\n <div class=\"flex items-center gap-1\">\n <div class=\"size-7 rounded-xl\">\n <IntegrationLogo :integration=\"themeId\" />\n </div>\n </div>\n </ScalarButton>\n </div>\n </SettingsSection>\n\n <!-- Appearance -->\n <SettingsSection>\n <template #title> Appearance </template>\n <template #description>\n Choose between light, dark, or system-based appearance for your\n workspace.\n </template>\n\n <SettingsGeneralAppearance />\n </SettingsSection>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { cva, cx, ScalarButton, ScalarIcon } from '@scalar/components'\nimport {\n themeLabels,\n type IntegrationThemeId,\n type ThemeId,\n} from '@scalar/themes'\n\nimport IntegrationLogo from '@/components/ImportCollection/IntegrationLogo.vue'\nimport { useWorkspace } from '@/store'\nimport { useActiveEntities } from '@/store/active-entities'\n\nimport SettingsGeneralAppearance from './components/SettingsAppearance.vue'\nimport SettingsSection from './components/SettingsSection.vue'\n\nconst { activeWorkspace } = useActiveEntities()\nconst { proxyUrl, workspaceMutators } = useWorkspace()\n\nconst DEFAULT_PROXY_URL = 'https://proxy.scalar.com'\n\nconst themeIds: Exclude<ThemeId, IntegrationThemeId>[] = [\n 'default',\n 'alternate',\n // 'moon',\n 'purple',\n 'solarized',\n // 'bluePlanet',\n 'saturn',\n 'kepler',\n // 'mars',\n // 'deepSpace',\n // 'laserwave',\n]\n\nconst integrationThemeIds: IntegrationThemeId[] = ['elysiajs', 'fastify']\n\nconst getThemeColors = (\n themeId: Exclude<ThemeId, IntegrationThemeId>,\n): { light: string; dark: string; accent: string } => {\n const colors: Record<\n Exclude<ThemeId, IntegrationThemeId>,\n { light: string; dark: string; accent: string }\n > = {\n default: { light: '#fff', dark: '#0f0f0f', accent: '#0099ff' },\n alternate: { light: '#f9f9f9', dark: '#131313', accent: '#e7e7e7' },\n moon: { light: '#ccc9b3', dark: '#313332', accent: '#645b0f' },\n purple: { light: '#f5f6f8', dark: '#22252b', accent: '#5469d4' },\n solarized: { light: '#fdf6e3', dark: '#00212b', accent: '#007acc' },\n bluePlanet: { light: '#f0f2f5', dark: '#000e23', accent: '#e0e2e6' },\n saturn: { light: '#e4e4df', dark: '#2c2c30', accent: '#1763a6' },\n kepler: { light: '#f6f6f6', dark: '#0d0f1e', accent: '#7070ff' },\n mars: { light: '#f2efe8', dark: '#321116', accent: '#c75549' },\n deepSpace: { light: '#f4f4f5', dark: '#09090b', accent: '#8ab4f8' },\n laserwave: { light: '#f4f2f7', dark: '#27212e', accent: '#ed78c2' },\n none: { light: '#ffffff', dark: '#000000', accent: '#3b82f6' },\n }\n return (\n colors[themeId] || { light: '#ffffff', dark: '#000000', accent: '#3b82f6' }\n )\n}\n\nconst changeTheme = (themeId: ThemeId) =>\n workspaceMutators.edit(activeWorkspace.value?.uid, 'themeId', themeId)\n\nconst buttonStyles = cva({\n base: 'w-full shadow-none text-c-1 justify-start pl-2 gap-2 border',\n variants: {\n active: {\n true: 'bg-primary text-c-1 hover:bg-inherit',\n false: 'bg-b-1 hover:bg-b-2',\n },\n },\n})\n\nconst setProxy = (newProxy: string | undefined) =>\n workspaceMutators.edit(activeWorkspace.value?.uid, 'proxyUrl', newProxy)\n</script>\n<template>\n <div class=\"bg-b-1 h-full w-full overflow-auto\">\n <div class=\"mr-auto ml-auto w-full max-w-[720px] px-5 py-5\">\n <div class=\"flex flex-col gap-8\">\n <!-- Heading -->\n <div>\n <h2 class=\"mt-10 text-xl font-bold\">Settings</h2>\n </div>\n\n <!-- Proxy -->\n <SettingsSection>\n <template #title> CORS Proxy </template>\n <template #description>\n Browsers block cross-origin requests for security. We provide a\n public proxy to\n <a\n class=\"hover:text-c-1 underline-offset-2\"\n href=\"https://en.wikipedia.org/wiki/Cross-origin_resource_sharing\"\n target=\"_blank\">\n bypass CORS issues\n </a>\n . Check the\n <a\n class=\"hover:text-c-1 underline-offset-2\"\n href=\"https://github.com/scalar/scalar/tree/main/examples/proxy-server\"\n target=\"_blank\">\n source code on GitHub\n </a>\n .\n </template>\n\n <div class=\"flex flex-col gap-2\">\n <!-- Default proxy -->\n <ScalarButton\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL,\n }),\n )\n \"\n @click=\"setProxy(DEFAULT_PROXY_URL)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Use proxy.scalar.com (default)\n </ScalarButton>\n\n <!-- Custom proxy (only if configured) -->\n <ScalarButton\n v-if=\"proxyUrl && proxyUrl !== DEFAULT_PROXY_URL\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.proxyUrl === proxyUrl,\n }),\n )\n \"\n @click=\"setProxy(proxyUrl)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.proxyUrl === proxyUrl,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.proxyUrl === proxyUrl\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Use custom proxy ({{ proxyUrl }})\n </ScalarButton>\n\n <!-- No proxy -->\n <ScalarButton\n :class=\"cx(buttonStyles({ active: !activeWorkspace?.proxyUrl }))\"\n @click=\"setProxy(undefined)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"\n !activeWorkspace?.proxyUrl &&\n 'bg-c-accent text-b-1 border-transparent'\n \">\n <ScalarIcon\n v-if=\"!activeWorkspace?.proxyUrl\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Skip the proxy\n </ScalarButton>\n </div>\n </SettingsSection>\n\n <!-- Themes -->\n <SettingsSection>\n <template #title> Themes </template>\n <template #description>\n We've got a whole rainbow of themes for you to play with:\n </template>\n\n <div class=\"flex flex-col gap-2\">\n <div class=\"grid grid-cols-2 gap-2\">\n <ScalarButton\n v-for=\"themeId in themeIds\"\n :key=\"themeId\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.themeId === themeId,\n }),\n )\n \"\n @click=\"changeTheme(themeId)\">\n <div class=\"flex items-center gap-2\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.themeId === themeId,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.themeId === themeId\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n {{ themeLabels[themeId] }}\n </div>\n <div class=\"flex items-center gap-1\">\n <span\n class=\"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).light,\n }\" />\n <span\n class=\"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).dark,\n }\" />\n <span\n class=\"border-c-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).accent,\n }\" />\n </div>\n </ScalarButton>\n </div>\n </div>\n </SettingsSection>\n\n <!-- Frameworks -->\n <SettingsSection>\n <template #title> Framework Themes </template>\n <template #description>\n Are you a real fan? Show your support by using your favorite\n framework's theme!\n </template>\n\n <div class=\"grid grid-cols-2 gap-2\">\n <ScalarButton\n v-for=\"themeId in integrationThemeIds\"\n :key=\"themeId\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.themeId === themeId,\n }),\n )\n \"\n @click=\"changeTheme(themeId)\">\n <div class=\"flex items-center gap-2\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.themeId === themeId,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.themeId === themeId\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n {{ themeLabels[themeId] }}\n </div>\n <div class=\"flex items-center gap-1\">\n <div class=\"size-7 rounded-xl\">\n <IntegrationLogo :integration=\"themeId\" />\n </div>\n </div>\n </ScalarButton>\n </div>\n </SettingsSection>\n\n <!-- Appearance -->\n <SettingsSection>\n <template #title> Appearance </template>\n <template #description>\n Choose between light, dark, or system-based appearance for your\n workspace.\n </template>\n\n <SettingsGeneralAppearance />\n </SettingsSection>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, type DefineComponent } from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\n\nimport SettingsGeneral from './SettingsGeneral.vue'\n\ntype SettingsGroup = {\n component: DefineComponent<any, any, any>\n title: string\n}\n\nconst settings: Record<string, SettingsGroup> = {\n general: {\n component: SettingsGeneral,\n title: 'general',\n },\n}\n\nconst activeSetting = ref('general')\n</script>\n<template>\n <ViewLayout>\n <ViewLayoutContent class=\"flex-1\">\n <component\n :is=\"settings[activeSetting]!.component\"\n v-if=\"settings[activeSetting]\" />\n </ViewLayoutContent>\n </ViewLayout>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, type DefineComponent } from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\n\nimport SettingsGeneral from './SettingsGeneral.vue'\n\ntype SettingsGroup = {\n component: DefineComponent<any, any, any>\n title: string\n}\n\nconst settings: Record<string, SettingsGroup> = {\n general: {\n component: SettingsGeneral,\n title: 'general',\n },\n}\n\nconst activeSetting = ref('general')\n</script>\n<template>\n <ViewLayout>\n <ViewLayoutContent class=\"flex-1\">\n <component\n :is=\"settings[activeSetting]!.component\"\n v-if=\"settings[activeSetting]\" />\n </ViewLayoutContent>\n </ViewLayout>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;ECIA,MAAM,EAAE,WAAW,iBAAiB,cAAa;EAEjD,MAAM,eAAe,IAAI;GACvB,MAAM;GACN,UAAU,EACR,QAAQ;IACN,MAAM;IACN,OAAO;IACR,EACF;GACF,CAAA;;uBAGC,mBAiDM,OAjDN,cAiDM;IAhDJ,YAee,MAAA,aAAA,EAAA;KAdZ,OAAK,eAAE,MAAA,GAAE,CAAC,MAAA,aAAY,CAAA,EAAA,QAAW,MAAA,UAAS,KAAA,UAAA,CAAA,CAAA,CAAA;KAC1C,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,aAAY,CAAA,SAAA;;4BAWd,CAVN,mBAUM,OAAA,EATJ,OAAK,eAAA,CAAC,4EAA0E,EAAA,2CACjB,MAAA,UAAS,KAAA,UAAA,CAAA,CAAA,EAAA,EAAA,CAIhE,MAAA,UAAS,KAAA,YAAA,WAAA,EADjB,YAIoB,MAAA,WAAA,EAAA;;MAFlB,MAAK;MACL,MAAK;MACL,WAAU;wFACR,iCAER,GAAA,EAAA,CAAA;;;IACA,YAee,MAAA,aAAA,EAAA;KAdZ,OAAK,eAAE,MAAA,GAAE,CAAC,MAAA,aAAY,CAAA,EAAA,QAAW,MAAA,UAAS,KAAA,SAAA,CAAA,CAAA,CAAA;KAC1C,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,aAAY,CAAA,QAAA;;4BAWd,CAVN,mBAU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BaPvhJ8Y.js","names":["$slots"],"sources":["../src/views/Settings/components/SettingsAppearance.vue","../src/views/Settings/components/SettingsAppearance.vue","../src/views/Settings/components/SettingsSection.vue","../src/views/Settings/components/SettingsSection.vue","../src/views/Settings/SettingsGeneral.vue","../src/views/Settings/SettingsGeneral.vue","../src/views/Settings/Settings.vue","../src/views/Settings/Settings.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { cva, cx, ScalarButton, ScalarIcon } from '@scalar/components'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\n\nconst { colorMode, setColorMode } = useColorMode()\n\nconst buttonStyles = cva({\n base: 'w-full shadow-none text-c-1 justify-start pl-2 gap-2 border',\n variants: {\n active: {\n true: 'bg-primary text-c-1 hover:bg-inherit',\n false: 'bg-b-1 hover:bg-b-2',\n },\n },\n})\n</script>\n<template>\n <div class=\"flex flex-col gap-2\">\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'system' }))\"\n @click=\"setColorMode('system')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'system',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'system'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n System Preference (default)\n </ScalarButton>\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'light' }))\"\n @click=\"setColorMode('light')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'light',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'light'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Light Mode Always\n </ScalarButton>\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'dark' }))\"\n @click=\"setColorMode('dark')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'dark',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'dark'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Dark Mode Always\n </ScalarButton>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { cva, cx, ScalarButton, ScalarIcon } from '@scalar/components'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\n\nconst { colorMode, setColorMode } = useColorMode()\n\nconst buttonStyles = cva({\n base: 'w-full shadow-none text-c-1 justify-start pl-2 gap-2 border',\n variants: {\n active: {\n true: 'bg-primary text-c-1 hover:bg-inherit',\n false: 'bg-b-1 hover:bg-b-2',\n },\n },\n})\n</script>\n<template>\n <div class=\"flex flex-col gap-2\">\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'system' }))\"\n @click=\"setColorMode('system')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'system',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'system'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n System Preference (default)\n </ScalarButton>\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'light' }))\"\n @click=\"setColorMode('light')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'light',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'light'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Light Mode Always\n </ScalarButton>\n <ScalarButton\n :class=\"cx(buttonStyles({ active: colorMode === 'dark' }))\"\n @click=\"setColorMode('dark')\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent': colorMode === 'dark',\n }\">\n <ScalarIcon\n v-if=\"colorMode === 'dark'\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Dark Mode Always\n </ScalarButton>\n </div>\n</template>\n","<script setup lang=\"ts\">\ndefineSlots<{\n title?: () => string\n description?: () => string\n default: () => any\n}>()\n</script>\n\n<template>\n <div class=\"flex flex-col gap-2\">\n <template v-if=\"$slots.title\">\n <h3 class=\"font-bold\">\n <slot name=\"title\" />\n </h3>\n </template>\n\n <template v-if=\"$slots.description\">\n <p class=\"text-c-2 mb-4 leading-[21px]\">\n <slot name=\"description\" />\n </p>\n </template>\n\n <slot />\n </div>\n</template>\n","<script setup lang=\"ts\">\ndefineSlots<{\n title?: () => string\n description?: () => string\n default: () => any\n}>()\n</script>\n\n<template>\n <div class=\"flex flex-col gap-2\">\n <template v-if=\"$slots.title\">\n <h3 class=\"font-bold\">\n <slot name=\"title\" />\n </h3>\n </template>\n\n <template v-if=\"$slots.description\">\n <p class=\"text-c-2 mb-4 leading-[21px]\">\n <slot name=\"description\" />\n </p>\n </template>\n\n <slot />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { cva, cx, ScalarButton, ScalarIcon } from '@scalar/components'\nimport {\n themeLabels,\n type IntegrationThemeId,\n type ThemeId,\n} from '@scalar/themes'\n\nimport IntegrationLogo from '@/components/ImportCollection/IntegrationLogo.vue'\nimport { useWorkspace } from '@/store'\nimport { useActiveEntities } from '@/store/active-entities'\n\nimport SettingsGeneralAppearance from './components/SettingsAppearance.vue'\nimport SettingsSection from './components/SettingsSection.vue'\n\nconst { activeWorkspace } = useActiveEntities()\nconst { proxyUrl, workspaceMutators } = useWorkspace()\n\nconst DEFAULT_PROXY_URL = 'https://proxy.scalar.com'\n\nconst themeIds: Exclude<ThemeId, IntegrationThemeId>[] = [\n 'default',\n 'alternate',\n // 'moon',\n 'purple',\n 'solarized',\n // 'bluePlanet',\n 'saturn',\n 'kepler',\n // 'mars',\n // 'deepSpace',\n // 'laserwave',\n]\n\nconst integrationThemeIds: IntegrationThemeId[] = ['elysiajs', 'fastify']\n\nconst getThemeColors = (\n themeId: Exclude<ThemeId, IntegrationThemeId>,\n): { light: string; dark: string; accent: string } => {\n const colors: Record<\n Exclude<ThemeId, IntegrationThemeId>,\n { light: string; dark: string; accent: string }\n > = {\n default: { light: '#fff', dark: '#0f0f0f', accent: '#0099ff' },\n alternate: { light: '#f9f9f9', dark: '#131313', accent: '#e7e7e7' },\n moon: { light: '#ccc9b3', dark: '#313332', accent: '#645b0f' },\n purple: { light: '#f5f6f8', dark: '#22252b', accent: '#5469d4' },\n solarized: { light: '#fdf6e3', dark: '#00212b', accent: '#007acc' },\n bluePlanet: { light: '#f0f2f5', dark: '#000e23', accent: '#e0e2e6' },\n saturn: { light: '#e4e4df', dark: '#2c2c30', accent: '#1763a6' },\n kepler: { light: '#f6f6f6', dark: '#0d0f1e', accent: '#7070ff' },\n mars: { light: '#f2efe8', dark: '#321116', accent: '#c75549' },\n deepSpace: { light: '#f4f4f5', dark: '#09090b', accent: '#8ab4f8' },\n laserwave: { light: '#f4f2f7', dark: '#27212e', accent: '#ed78c2' },\n none: { light: '#ffffff', dark: '#000000', accent: '#3b82f6' },\n }\n return (\n colors[themeId] || { light: '#ffffff', dark: '#000000', accent: '#3b82f6' }\n )\n}\n\nconst changeTheme = (themeId: ThemeId) =>\n workspaceMutators.edit(activeWorkspace.value?.uid, 'themeId', themeId)\n\nconst buttonStyles = cva({\n base: 'w-full shadow-none text-c-1 justify-start pl-2 gap-2 border',\n variants: {\n active: {\n true: 'bg-primary text-c-1 hover:bg-inherit',\n false: 'bg-b-1 hover:bg-b-2',\n },\n },\n})\n\nconst setProxy = (newProxy: string | undefined) =>\n workspaceMutators.edit(activeWorkspace.value?.uid, 'proxyUrl', newProxy)\n</script>\n<template>\n <div class=\"bg-b-1 h-full w-full overflow-auto\">\n <div class=\"mr-auto ml-auto w-full max-w-[720px] px-5 py-5\">\n <div class=\"flex flex-col gap-8\">\n <!-- Heading -->\n <div>\n <h2 class=\"mt-10 text-xl font-bold\">Settings</h2>\n </div>\n\n <!-- Proxy -->\n <SettingsSection>\n <template #title> CORS Proxy </template>\n <template #description>\n Browsers block cross-origin requests for security. We provide a\n public proxy to\n <a\n class=\"hover:text-c-1 underline-offset-2\"\n href=\"https://en.wikipedia.org/wiki/Cross-origin_resource_sharing\"\n target=\"_blank\">\n bypass CORS issues\n </a>\n . Check the\n <a\n class=\"hover:text-c-1 underline-offset-2\"\n href=\"https://github.com/scalar/scalar/tree/main/examples/proxy-server\"\n target=\"_blank\">\n source code on GitHub\n </a>\n .\n </template>\n\n <div class=\"flex flex-col gap-2\">\n <!-- Default proxy -->\n <ScalarButton\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL,\n }),\n )\n \"\n @click=\"setProxy(DEFAULT_PROXY_URL)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Use proxy.scalar.com (default)\n </ScalarButton>\n\n <!-- Custom proxy (only if configured) -->\n <ScalarButton\n v-if=\"proxyUrl && proxyUrl !== DEFAULT_PROXY_URL\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.proxyUrl === proxyUrl,\n }),\n )\n \"\n @click=\"setProxy(proxyUrl)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.proxyUrl === proxyUrl,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.proxyUrl === proxyUrl\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Use custom proxy ({{ proxyUrl }})\n </ScalarButton>\n\n <!-- No proxy -->\n <ScalarButton\n :class=\"cx(buttonStyles({ active: !activeWorkspace?.proxyUrl }))\"\n @click=\"setProxy(undefined)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"\n !activeWorkspace?.proxyUrl &&\n 'bg-c-accent text-b-1 border-transparent'\n \">\n <ScalarIcon\n v-if=\"!activeWorkspace?.proxyUrl\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Skip the proxy\n </ScalarButton>\n </div>\n </SettingsSection>\n\n <!-- Themes -->\n <SettingsSection>\n <template #title> Themes </template>\n <template #description>\n We've got a whole rainbow of themes for you to play with:\n </template>\n\n <div class=\"flex flex-col gap-2\">\n <div class=\"grid grid-cols-2 gap-2\">\n <ScalarButton\n v-for=\"themeId in themeIds\"\n :key=\"themeId\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.themeId === themeId,\n }),\n )\n \"\n @click=\"changeTheme(themeId)\">\n <div class=\"flex items-center gap-2\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.themeId === themeId,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.themeId === themeId\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n {{ themeLabels[themeId] }}\n </div>\n <div class=\"flex items-center gap-1\">\n <span\n class=\"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).light,\n }\" />\n <span\n class=\"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).dark,\n }\" />\n <span\n class=\"border-c-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).accent,\n }\" />\n </div>\n </ScalarButton>\n </div>\n </div>\n </SettingsSection>\n\n <!-- Frameworks -->\n <SettingsSection>\n <template #title> Framework Themes </template>\n <template #description>\n Are you a real fan? Show your support by using your favorite\n framework's theme!\n </template>\n\n <div class=\"grid grid-cols-2 gap-2\">\n <ScalarButton\n v-for=\"themeId in integrationThemeIds\"\n :key=\"themeId\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.themeId === themeId,\n }),\n )\n \"\n @click=\"changeTheme(themeId)\">\n <div class=\"flex items-center gap-2\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.themeId === themeId,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.themeId === themeId\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n {{ themeLabels[themeId] }}\n </div>\n <div class=\"flex items-center gap-1\">\n <div class=\"size-7 rounded-xl\">\n <IntegrationLogo :integration=\"themeId\" />\n </div>\n </div>\n </ScalarButton>\n </div>\n </SettingsSection>\n\n <!-- Appearance -->\n <SettingsSection>\n <template #title> Appearance </template>\n <template #description>\n Choose between light, dark, or system-based appearance for your\n workspace.\n </template>\n\n <SettingsGeneralAppearance />\n </SettingsSection>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { cva, cx, ScalarButton, ScalarIcon } from '@scalar/components'\nimport {\n themeLabels,\n type IntegrationThemeId,\n type ThemeId,\n} from '@scalar/themes'\n\nimport IntegrationLogo from '@/components/ImportCollection/IntegrationLogo.vue'\nimport { useWorkspace } from '@/store'\nimport { useActiveEntities } from '@/store/active-entities'\n\nimport SettingsGeneralAppearance from './components/SettingsAppearance.vue'\nimport SettingsSection from './components/SettingsSection.vue'\n\nconst { activeWorkspace } = useActiveEntities()\nconst { proxyUrl, workspaceMutators } = useWorkspace()\n\nconst DEFAULT_PROXY_URL = 'https://proxy.scalar.com'\n\nconst themeIds: Exclude<ThemeId, IntegrationThemeId>[] = [\n 'default',\n 'alternate',\n // 'moon',\n 'purple',\n 'solarized',\n // 'bluePlanet',\n 'saturn',\n 'kepler',\n // 'mars',\n // 'deepSpace',\n // 'laserwave',\n]\n\nconst integrationThemeIds: IntegrationThemeId[] = ['elysiajs', 'fastify']\n\nconst getThemeColors = (\n themeId: Exclude<ThemeId, IntegrationThemeId>,\n): { light: string; dark: string; accent: string } => {\n const colors: Record<\n Exclude<ThemeId, IntegrationThemeId>,\n { light: string; dark: string; accent: string }\n > = {\n default: { light: '#fff', dark: '#0f0f0f', accent: '#0099ff' },\n alternate: { light: '#f9f9f9', dark: '#131313', accent: '#e7e7e7' },\n moon: { light: '#ccc9b3', dark: '#313332', accent: '#645b0f' },\n purple: { light: '#f5f6f8', dark: '#22252b', accent: '#5469d4' },\n solarized: { light: '#fdf6e3', dark: '#00212b', accent: '#007acc' },\n bluePlanet: { light: '#f0f2f5', dark: '#000e23', accent: '#e0e2e6' },\n saturn: { light: '#e4e4df', dark: '#2c2c30', accent: '#1763a6' },\n kepler: { light: '#f6f6f6', dark: '#0d0f1e', accent: '#7070ff' },\n mars: { light: '#f2efe8', dark: '#321116', accent: '#c75549' },\n deepSpace: { light: '#f4f4f5', dark: '#09090b', accent: '#8ab4f8' },\n laserwave: { light: '#f4f2f7', dark: '#27212e', accent: '#ed78c2' },\n none: { light: '#ffffff', dark: '#000000', accent: '#3b82f6' },\n }\n return (\n colors[themeId] || { light: '#ffffff', dark: '#000000', accent: '#3b82f6' }\n )\n}\n\nconst changeTheme = (themeId: ThemeId) =>\n workspaceMutators.edit(activeWorkspace.value?.uid, 'themeId', themeId)\n\nconst buttonStyles = cva({\n base: 'w-full shadow-none text-c-1 justify-start pl-2 gap-2 border',\n variants: {\n active: {\n true: 'bg-primary text-c-1 hover:bg-inherit',\n false: 'bg-b-1 hover:bg-b-2',\n },\n },\n})\n\nconst setProxy = (newProxy: string | undefined) =>\n workspaceMutators.edit(activeWorkspace.value?.uid, 'proxyUrl', newProxy)\n</script>\n<template>\n <div class=\"bg-b-1 h-full w-full overflow-auto\">\n <div class=\"mr-auto ml-auto w-full max-w-[720px] px-5 py-5\">\n <div class=\"flex flex-col gap-8\">\n <!-- Heading -->\n <div>\n <h2 class=\"mt-10 text-xl font-bold\">Settings</h2>\n </div>\n\n <!-- Proxy -->\n <SettingsSection>\n <template #title> CORS Proxy </template>\n <template #description>\n Browsers block cross-origin requests for security. We provide a\n public proxy to\n <a\n class=\"hover:text-c-1 underline-offset-2\"\n href=\"https://en.wikipedia.org/wiki/Cross-origin_resource_sharing\"\n target=\"_blank\">\n bypass CORS issues\n </a>\n . Check the\n <a\n class=\"hover:text-c-1 underline-offset-2\"\n href=\"https://github.com/scalar/scalar/tree/main/examples/proxy-server\"\n target=\"_blank\">\n source code on GitHub\n </a>\n .\n </template>\n\n <div class=\"flex flex-col gap-2\">\n <!-- Default proxy -->\n <ScalarButton\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL,\n }),\n )\n \"\n @click=\"setProxy(DEFAULT_PROXY_URL)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.proxyUrl === DEFAULT_PROXY_URL\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Use proxy.scalar.com (default)\n </ScalarButton>\n\n <!-- Custom proxy (only if configured) -->\n <ScalarButton\n v-if=\"proxyUrl && proxyUrl !== DEFAULT_PROXY_URL\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.proxyUrl === proxyUrl,\n }),\n )\n \"\n @click=\"setProxy(proxyUrl)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.proxyUrl === proxyUrl,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.proxyUrl === proxyUrl\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Use custom proxy ({{ proxyUrl }})\n </ScalarButton>\n\n <!-- No proxy -->\n <ScalarButton\n :class=\"cx(buttonStyles({ active: !activeWorkspace?.proxyUrl }))\"\n @click=\"setProxy(undefined)\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"\n !activeWorkspace?.proxyUrl &&\n 'bg-c-accent text-b-1 border-transparent'\n \">\n <ScalarIcon\n v-if=\"!activeWorkspace?.proxyUrl\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n Skip the proxy\n </ScalarButton>\n </div>\n </SettingsSection>\n\n <!-- Themes -->\n <SettingsSection>\n <template #title> Themes </template>\n <template #description>\n We've got a whole rainbow of themes for you to play with:\n </template>\n\n <div class=\"flex flex-col gap-2\">\n <div class=\"grid grid-cols-2 gap-2\">\n <ScalarButton\n v-for=\"themeId in themeIds\"\n :key=\"themeId\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.themeId === themeId,\n }),\n )\n \"\n @click=\"changeTheme(themeId)\">\n <div class=\"flex items-center gap-2\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.themeId === themeId,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.themeId === themeId\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n {{ themeLabels[themeId] }}\n </div>\n <div class=\"flex items-center gap-1\">\n <span\n class=\"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).light,\n }\" />\n <span\n class=\"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).dark,\n }\" />\n <span\n class=\"border-c-3 inline-block h-5 w-5 rounded-full\"\n :style=\"{\n backgroundColor: getThemeColors(themeId).accent,\n }\" />\n </div>\n </ScalarButton>\n </div>\n </div>\n </SettingsSection>\n\n <!-- Frameworks -->\n <SettingsSection>\n <template #title> Framework Themes </template>\n <template #description>\n Are you a real fan? Show your support by using your favorite\n framework's theme!\n </template>\n\n <div class=\"grid grid-cols-2 gap-2\">\n <ScalarButton\n v-for=\"themeId in integrationThemeIds\"\n :key=\"themeId\"\n :class=\"\n cx(\n buttonStyles({\n active: activeWorkspace?.themeId === themeId,\n }),\n )\n \"\n @click=\"changeTheme(themeId)\">\n <div class=\"flex items-center gap-2\">\n <div\n class=\"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1\"\n :class=\"{\n 'bg-c-accent text-b-1 border-transparent':\n activeWorkspace?.themeId === themeId,\n }\">\n <ScalarIcon\n v-if=\"activeWorkspace?.themeId === themeId\"\n icon=\"Checkmark\"\n size=\"xs\"\n thickness=\"3.5\" />\n </div>\n {{ themeLabels[themeId] }}\n </div>\n <div class=\"flex items-center gap-1\">\n <div class=\"size-7 rounded-xl\">\n <IntegrationLogo :integration=\"themeId\" />\n </div>\n </div>\n </ScalarButton>\n </div>\n </SettingsSection>\n\n <!-- Appearance -->\n <SettingsSection>\n <template #title> Appearance </template>\n <template #description>\n Choose between light, dark, or system-based appearance for your\n workspace.\n </template>\n\n <SettingsGeneralAppearance />\n </SettingsSection>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, type DefineComponent } from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\n\nimport SettingsGeneral from './SettingsGeneral.vue'\n\ntype SettingsGroup = {\n component: DefineComponent<any, any, any>\n title: string\n}\n\nconst settings: Record<string, SettingsGroup> = {\n general: {\n component: SettingsGeneral,\n title: 'general',\n },\n}\n\nconst activeSetting = ref('general')\n</script>\n<template>\n <ViewLayout>\n <ViewLayoutContent class=\"flex-1\">\n <component\n :is=\"settings[activeSetting]!.component\"\n v-if=\"settings[activeSetting]\" />\n </ViewLayoutContent>\n </ViewLayout>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, type DefineComponent } from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\n\nimport SettingsGeneral from './SettingsGeneral.vue'\n\ntype SettingsGroup = {\n component: DefineComponent<any, any, any>\n title: string\n}\n\nconst settings: Record<string, SettingsGroup> = {\n general: {\n component: SettingsGeneral,\n title: 'general',\n },\n}\n\nconst activeSetting = ref('general')\n</script>\n<template>\n <ViewLayout>\n <ViewLayoutContent class=\"flex-1\">\n <component\n :is=\"settings[activeSetting]!.component\"\n v-if=\"settings[activeSetting]\" />\n </ViewLayoutContent>\n </ViewLayout>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;ECIA,MAAM,EAAE,WAAW,iBAAiB,cAAa;EAEjD,MAAM,eAAe,IAAI;GACvB,MAAM;GACN,UAAU,EACR,QAAQ;IACN,MAAM;IACN,OAAO;IACR,EACF;GACF,CAAA;;uBAGC,mBAiDM,OAjDN,cAiDM;IAhDJ,YAee,MAAA,aAAA,EAAA;KAdZ,OAAK,eAAE,MAAA,GAAE,CAAC,MAAA,aAAY,CAAA,EAAA,QAAW,MAAA,UAAS,KAAA,UAAA,CAAA,CAAA,CAAA;KAC1C,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,aAAY,CAAA,SAAA;;4BAWd,CAVN,mBAUM,OAAA,EATJ,OAAK,eAAA,CAAC,4EAA0E,EAAA,2CACjB,MAAA,UAAS,KAAA,UAAA,CAAA,CAAA,EAAA,EAAA,CAIhE,MAAA,UAAS,KAAA,Y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C9C,SAAS;GACP,WAAW;GACX,OAAO;GACR,EACH;EAEA,MAAM,gBAAgB,IAAI,UAAS;;uBAGjC,YAMa,oBAAA,MAAA;2BADS,CAJpB,YAIoB,2BAAA,EAJD,OAAM,UAAQ,EAAA;4BAGI,CAA3B,SAAS,cAAA,UAAA,WAAA,EAFjB,YAEmC,wBAD5B,SAAS,cAAA,OAAgB,UAAS,EAAA,EAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import { r as useWorkspace } from "./store-DaPoVtIS.js";
1
+ import { r as useWorkspace } from "./store-DnlAQK5d.js";
2
2
  import { a as useLayout, r as useSidebar } from "./useSidebar-DLTwHDI-.js";
3
3
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BmmBcIzD.js";
4
4
  import { Fragment, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, toDisplayString, unref, vShow, withDirectives } from "vue";
@@ -70,4 +70,4 @@ var Sidebar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PU
70
70
  //#endregion
71
71
  export { Sidebar_default as t };
72
72
 
73
- //# sourceMappingURL=Sidebar-Xl9_nFXX.js.map
73
+ //# sourceMappingURL=Sidebar-CRxdl38Y.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar-Xl9_nFXX.js","names":[],"sources":["../src/components/Sidebar/Sidebar.vue","../src/components/Sidebar/Sidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBreakpoints } from '@scalar/use-hooks/useBreakpoints'\nimport { ref } from 'vue'\n\nimport { useLayout } from '@/hooks/useLayout'\nimport { useSidebar } from '@/hooks/useSidebar'\nimport { useWorkspace } from '@/store'\n\ndefineProps<{\n title?: string\n}>()\n\nconst { isSidebarOpen } = useSidebar()\nconst { sidebarWidth, setSidebarWidth } = useWorkspace()\nconst { layout } = useLayout()\nconst isDragging = ref(false)\n\nconst sidebarRef = ref<HTMLElement | null>(null)\nconst { breakpoints } = useBreakpoints()\n\nconst startDrag = (event: MouseEvent) => {\n event.preventDefault()\n\n const startX = event.clientX\n /** Current sidebar width when dragging starts */\n const startWidth = Number.parseInt(\n getComputedStyle(sidebarRef.value!).width || sidebarWidth.value,\n 10,\n )\n\n const doDrag = (dragEvent: MouseEvent) => {\n isDragging.value = true\n document.body.classList.add('dragging')\n let newWidth = startWidth + dragEvent.clientX - startX\n if (newWidth > 420) {\n /** Elastic effect */\n newWidth = 420 + (newWidth - 420) * 0.2\n }\n if (newWidth < 240) {\n newWidth = 240\n }\n setSidebarWidth(`${newWidth}px`)\n }\n\n const stopDrag = () => {\n isDragging.value = false\n document.body.classList.remove('dragging')\n document.documentElement.removeEventListener('mousemove', doDrag, false)\n document.documentElement.removeEventListener('mouseup', stopDrag, false)\n /** Reset to max width if exceeded */\n if (Number.parseInt(sidebarWidth.value, 10) > 420) {\n setSidebarWidth('360px')\n } else if (Number.parseInt(sidebarWidth.value, 10) < 240) {\n setSidebarWidth('240px')\n }\n }\n\n document.documentElement.addEventListener('mousemove', doDrag, false)\n document.documentElement.addEventListener('mouseup', stopDrag, false)\n}\n</script>\n<template>\n <aside\n v-show=\"isSidebarOpen\"\n ref=\"sidebarRef\"\n class=\"sidebar bg-b-1 relative flex min-w-full flex-1 flex-col overflow-hidden leading-5 md:min-w-fit md:flex-none md:border-r md:border-b-0\"\n :class=\"{ dragging: isDragging }\"\n :style=\"{ width: breakpoints.lg ? sidebarWidth : '100%' }\">\n <slot name=\"header\" />\n <div\n v-if=\"layout !== 'modal' && title\"\n class=\"xl:min-h-header flex min-h-12 items-center justify-between px-3 py-1.5 text-sm md:px-[18px] md:py-2.5\">\n <h2 class=\"m-0 text-sm font-medium whitespace-nowrap\">\n {{ title }}\n </h2>\n <slot\n v-if=\"!breakpoints.lg\"\n name=\"button\" />\n </div>\n <div\n class=\"custom-scroll sidebar-height w-[inherit] pb-0 md:pb-[37px]\"\n :class=\"{\n 'sidebar-mask': layout !== 'modal',\n }\">\n <slot name=\"content\" />\n </div>\n <template v-if=\"breakpoints.lg\">\n <div\n class=\"bg-b-1 sticky bottom-0 z-10 w-[inherit] pt-0 has-[.empty-sidebar-item]:border-t md:px-2.5 md:pb-2.5\">\n <slot name=\"button\" />\n </div>\n <div\n class=\"resizer\"\n @mousedown=\"startDrag\" />\n </template>\n </aside>\n</template>\n<style scoped>\n@reference \"@/style.css\";\n\n.sidebar-height {\n min-height: 100%;\n}\n@variant md {\n .sidebar-mask {\n mask-image: linear-gradient(\n 0,\n transparent 0,\n transparent 0,\n var(--scalar-background-2) 30px\n );\n }\n}\n.resizer {\n width: 5px;\n cursor: col-resize;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n border-right: 2px solid transparent;\n transition: border-right-color 0.3s;\n}\n.resizer:hover,\n.dragging .resizer {\n border-right-color: var(--scalar-background-3);\n}\n.dragging {\n cursor: col-resize;\n}\n.dragging::before {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useBreakpoints } from '@scalar/use-hooks/useBreakpoints'\nimport { ref } from 'vue'\n\nimport { useLayout } from '@/hooks/useLayout'\nimport { useSidebar } from '@/hooks/useSidebar'\nimport { useWorkspace } from '@/store'\n\ndefineProps<{\n title?: string\n}>()\n\nconst { isSidebarOpen } = useSidebar()\nconst { sidebarWidth, setSidebarWidth } = useWorkspace()\nconst { layout } = useLayout()\nconst isDragging = ref(false)\n\nconst sidebarRef = ref<HTMLElement | null>(null)\nconst { breakpoints } = useBreakpoints()\n\nconst startDrag = (event: MouseEvent) => {\n event.preventDefault()\n\n const startX = event.clientX\n /** Current sidebar width when dragging starts */\n const startWidth = Number.parseInt(\n getComputedStyle(sidebarRef.value!).width || sidebarWidth.value,\n 10,\n )\n\n const doDrag = (dragEvent: MouseEvent) => {\n isDragging.value = true\n document.body.classList.add('dragging')\n let newWidth = startWidth + dragEvent.clientX - startX\n if (newWidth > 420) {\n /** Elastic effect */\n newWidth = 420 + (newWidth - 420) * 0.2\n }\n if (newWidth < 240) {\n newWidth = 240\n }\n setSidebarWidth(`${newWidth}px`)\n }\n\n const stopDrag = () => {\n isDragging.value = false\n document.body.classList.remove('dragging')\n document.documentElement.removeEventListener('mousemove', doDrag, false)\n document.documentElement.removeEventListener('mouseup', stopDrag, false)\n /** Reset to max width if exceeded */\n if (Number.parseInt(sidebarWidth.value, 10) > 420) {\n setSidebarWidth('360px')\n } else if (Number.parseInt(sidebarWidth.value, 10) < 240) {\n setSidebarWidth('240px')\n }\n }\n\n document.documentElement.addEventListener('mousemove', doDrag, false)\n document.documentElement.addEventListener('mouseup', stopDrag, false)\n}\n</script>\n<template>\n <aside\n v-show=\"isSidebarOpen\"\n ref=\"sidebarRef\"\n class=\"sidebar bg-b-1 relative flex min-w-full flex-1 flex-col overflow-hidden leading-5 md:min-w-fit md:flex-none md:border-r md:border-b-0\"\n :class=\"{ dragging: isDragging }\"\n :style=\"{ width: breakpoints.lg ? sidebarWidth : '100%' }\">\n <slot name=\"header\" />\n <div\n v-if=\"layout !== 'modal' && title\"\n class=\"xl:min-h-header flex min-h-12 items-center justify-between px-3 py-1.5 text-sm md:px-[18px] md:py-2.5\">\n <h2 class=\"m-0 text-sm font-medium whitespace-nowrap\">\n {{ title }}\n </h2>\n <slot\n v-if=\"!breakpoints.lg\"\n name=\"button\" />\n </div>\n <div\n class=\"custom-scroll sidebar-height w-[inherit] pb-0 md:pb-[37px]\"\n :class=\"{\n 'sidebar-mask': layout !== 'modal',\n }\">\n <slot name=\"content\" />\n </div>\n <template v-if=\"breakpoints.lg\">\n <div\n class=\"bg-b-1 sticky bottom-0 z-10 w-[inherit] pt-0 has-[.empty-sidebar-item]:border-t md:px-2.5 md:pb-2.5\">\n <slot name=\"button\" />\n </div>\n <div\n class=\"resizer\"\n @mousedown=\"startDrag\" />\n </template>\n </aside>\n</template>\n<style scoped>\n@reference \"@/style.css\";\n\n.sidebar-height {\n min-height: 100%;\n}\n@variant md {\n .sidebar-mask {\n mask-image: linear-gradient(\n 0,\n transparent 0,\n transparent 0,\n var(--scalar-background-2) 30px\n );\n }\n}\n.resizer {\n width: 5px;\n cursor: col-resize;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n border-right: 2px solid transparent;\n transition: border-right-color 0.3s;\n}\n.resizer:hover,\n.dragging .resizer {\n border-right-color: var(--scalar-background-3);\n}\n.dragging {\n cursor: col-resize;\n}\n.dragging::before {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;ECYA,MAAM,EAAE,kBAAkB,YAAW;EACrC,MAAM,EAAE,cAAc,oBAAoB,cAAa;EACvD,MAAM,EAAE,WAAW,WAAU;EAC7B,MAAM,aAAa,IAAI,MAAK;EAE5B,MAAM,aAAa,IAAwB,KAAI;EAC/C,MAAM,EAAE,gBAAgB,gBAAe;EAEvC,MAAM,aAAa,UAAsB;AACvC,SAAM,gBAAe;GAErB,MAAM,SAAS,MAAM;;GAErB,MAAM,aAAa,OAAO,SACxB,iBAAiB,WAAW,MAAO,CAAC,SAAS,aAAa,OAC1D,GACF;GAEA,MAAM,UAAU,cAA0B;AACxC,eAAW,QAAQ;AACnB,aAAS,KAAK,UAAU,IAAI,WAAU;IACtC,IAAI,WAAW,aAAa,UAAU,UAAU;AAChD,QAAI,WAAW;;AAEb,eAAW,OAAO,WAAW,OAAO;AAEtC,QAAI,WAAW,IACb,YAAW;AAEb,oBAAgB,GAAG,SAAS,IAAG;;GAGjC,MAAM,iBAAiB;AACrB,eAAW,QAAQ;AACnB,aAAS,KAAK,UAAU,OAAO,WAAU;AACzC,aAAS,gBAAgB,oBAAoB,aAAa,QAAQ,MAAK;AACvE,aAAS,gBAAgB,oBAAoB,WAAW,UAAU,MAAK;;AAEvE,QAAI,OAAO,SAAS,aAAa,OAAO,GAAG,GAAG,IAC5C,iBAAgB,QAAO;aACd,OA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idebar.vue","../src/components/Sidebar/Sidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBreakpoints } from '@scalar/use-hooks/useBreakpoints'\nimport { ref } from 'vue'\n\nimport { useLayout } from '@/hooks/useLayout'\nimport { useSidebar } from '@/hooks/useSidebar'\nimport { useWorkspace } from '@/store'\n\ndefineProps<{\n title?: string\n}>()\n\nconst { isSidebarOpen } = useSidebar()\nconst { sidebarWidth, setSidebarWidth } = useWorkspace()\nconst { layout } = useLayout()\nconst isDragging = ref(false)\n\nconst sidebarRef = ref<HTMLElement | null>(null)\nconst { breakpoints } = useBreakpoints()\n\nconst startDrag = (event: MouseEvent) => {\n event.preventDefault()\n\n const startX = event.clientX\n /** Current sidebar width when dragging starts */\n const startWidth = Number.parseInt(\n getComputedStyle(sidebarRef.value!).width || sidebarWidth.value,\n 10,\n )\n\n const doDrag = (dragEvent: MouseEvent) => {\n isDragging.value = true\n document.body.classList.add('dragging')\n let newWidth = startWidth + dragEvent.clientX - startX\n if (newWidth > 420) {\n /** Elastic effect */\n newWidth = 420 + (newWidth - 420) * 0.2\n }\n if (newWidth < 240) {\n newWidth = 240\n }\n setSidebarWidth(`${newWidth}px`)\n }\n\n const stopDrag = () => {\n isDragging.value = false\n document.body.classList.remove('dragging')\n document.documentElement.removeEventListener('mousemove', doDrag, false)\n document.documentElement.removeEventListener('mouseup', stopDrag, false)\n /** Reset to max width if exceeded */\n if (Number.parseInt(sidebarWidth.value, 10) > 420) {\n setSidebarWidth('360px')\n } else if (Number.parseInt(sidebarWidth.value, 10) < 240) {\n setSidebarWidth('240px')\n }\n }\n\n document.documentElement.addEventListener('mousemove', doDrag, false)\n document.documentElement.addEventListener('mouseup', stopDrag, false)\n}\n</script>\n<template>\n <aside\n v-show=\"isSidebarOpen\"\n ref=\"sidebarRef\"\n class=\"sidebar bg-b-1 relative flex min-w-full flex-1 flex-col overflow-hidden leading-5 md:min-w-fit md:flex-none md:border-r md:border-b-0\"\n :class=\"{ dragging: isDragging }\"\n :style=\"{ width: breakpoints.lg ? sidebarWidth : '100%' }\">\n <slot name=\"header\" />\n <div\n v-if=\"layout !== 'modal' && title\"\n class=\"xl:min-h-header flex min-h-12 items-center justify-between px-3 py-1.5 text-sm md:px-[18px] md:py-2.5\">\n <h2 class=\"m-0 text-sm font-medium whitespace-nowrap\">\n {{ title }}\n </h2>\n <slot\n v-if=\"!breakpoints.lg\"\n name=\"button\" />\n </div>\n <div\n class=\"custom-scroll sidebar-height w-[inherit] pb-0 md:pb-[37px]\"\n :class=\"{\n 'sidebar-mask': layout !== 'modal',\n }\">\n <slot name=\"content\" />\n </div>\n <template v-if=\"breakpoints.lg\">\n <div\n class=\"bg-b-1 sticky bottom-0 z-10 w-[inherit] pt-0 has-[.empty-sidebar-item]:border-t md:px-2.5 md:pb-2.5\">\n <slot name=\"button\" />\n </div>\n <div\n class=\"resizer\"\n @mousedown=\"startDrag\" />\n </template>\n </aside>\n</template>\n<style scoped>\n@reference \"@/style.css\";\n\n.sidebar-height {\n min-height: 100%;\n}\n@variant md {\n .sidebar-mask {\n mask-image: linear-gradient(\n 0,\n transparent 0,\n transparent 0,\n var(--scalar-background-2) 30px\n );\n }\n}\n.resizer {\n width: 5px;\n cursor: col-resize;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n border-right: 2px solid transparent;\n transition: border-right-color 0.3s;\n}\n.resizer:hover,\n.dragging .resizer {\n border-right-color: var(--scalar-background-3);\n}\n.dragging {\n cursor: col-resize;\n}\n.dragging::before {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useBreakpoints } from '@scalar/use-hooks/useBreakpoints'\nimport { ref } from 'vue'\n\nimport { useLayout } from '@/hooks/useLayout'\nimport { useSidebar } from '@/hooks/useSidebar'\nimport { useWorkspace } from '@/store'\n\ndefineProps<{\n title?: string\n}>()\n\nconst { isSidebarOpen } = useSidebar()\nconst { sidebarWidth, setSidebarWidth } = useWorkspace()\nconst { layout } = useLayout()\nconst isDragging = ref(false)\n\nconst sidebarRef = ref<HTMLElement | null>(null)\nconst { breakpoints } = useBreakpoints()\n\nconst startDrag = (event: MouseEvent) => {\n event.preventDefault()\n\n const startX = event.clientX\n /** Current sidebar width when dragging starts */\n const startWidth = Number.parseInt(\n getComputedStyle(sidebarRef.value!).width || sidebarWidth.value,\n 10,\n )\n\n const doDrag = (dragEvent: MouseEvent) => {\n isDragging.value = true\n document.body.classList.add('dragging')\n let newWidth = startWidth + dragEvent.clientX - startX\n if (newWidth > 420) {\n /** Elastic effect */\n newWidth = 420 + (newWidth - 420) * 0.2\n }\n if (newWidth < 240) {\n newWidth = 240\n }\n setSidebarWidth(`${newWidth}px`)\n }\n\n const stopDrag = () => {\n isDragging.value = false\n document.body.classList.remove('dragging')\n document.documentElement.removeEventListener('mousemove', doDrag, false)\n document.documentElement.removeEventListener('mouseup', stopDrag, false)\n /** Reset to max width if exceeded */\n if (Number.parseInt(sidebarWidth.value, 10) > 420) {\n setSidebarWidth('360px')\n } else if (Number.parseInt(sidebarWidth.value, 10) < 240) {\n setSidebarWidth('240px')\n }\n }\n\n document.documentElement.addEventListener('mousemove', doDrag, false)\n document.documentElement.addEventListener('mouseup', stopDrag, false)\n}\n</script>\n<template>\n <aside\n v-show=\"isSidebarOpen\"\n ref=\"sidebarRef\"\n class=\"sidebar bg-b-1 relative flex min-w-full flex-1 flex-col overflow-hidden leading-5 md:min-w-fit md:flex-none md:border-r md:border-b-0\"\n :class=\"{ dragging: isDragging }\"\n :style=\"{ width: breakpoints.lg ? sidebarWidth : '100%' }\">\n <slot name=\"header\" />\n <div\n v-if=\"layout !== 'modal' && title\"\n class=\"xl:min-h-header flex min-h-12 items-center justify-between px-3 py-1.5 text-sm md:px-[18px] md:py-2.5\">\n <h2 class=\"m-0 text-sm font-medium whitespace-nowrap\">\n {{ title }}\n </h2>\n <slot\n v-if=\"!breakpoints.lg\"\n name=\"button\" />\n </div>\n <div\n class=\"custom-scroll sidebar-height w-[inherit] pb-0 md:pb-[37px]\"\n :class=\"{\n 'sidebar-mask': layout !== 'modal',\n }\">\n <slot name=\"content\" />\n </div>\n <template v-if=\"breakpoints.lg\">\n <div\n class=\"bg-b-1 sticky bottom-0 z-10 w-[inherit] pt-0 has-[.empty-sidebar-item]:border-t md:px-2.5 md:pb-2.5\">\n <slot name=\"button\" />\n </div>\n <div\n class=\"resizer\"\n @mousedown=\"startDrag\" />\n </template>\n </aside>\n</template>\n<style scoped>\n@reference \"@/style.css\";\n\n.sidebar-height {\n min-height: 100%;\n}\n@variant md {\n .sidebar-mask {\n mask-image: linear-gradient(\n 0,\n transparent 0,\n transparent 0,\n var(--scalar-background-2) 30px\n );\n }\n}\n.resizer {\n width: 5px;\n cursor: col-resize;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n border-right: 2px solid transparent;\n transition: border-right-color 0.3s;\n}\n.resizer:hover,\n.dragging .resizer {\n border-right-color: var(--scalar-background-3);\n}\n.dragging {\n cursor: col-resize;\n}\n.dragging::before {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;ECYA,MAAM,EAAE,kBAAkB,YAAW;EACrC,MAAM,EAAE,cAAc,oBAAoB,cAAa;EACvD,MAAM,EAAE,WAAW,WAAU;EAC7B,MAAM,aAAa,IAAI,MAAK;EAE5B,MAAM,aAAa,IAAwB,KAAI;EAC/C,MAAM,EAAE,gBAAgB,gBAAe;EAEvC,MAAM,aAAa,UAAsB;AACvC,SAAM,gBAAe;GAErB,MAAM,SAAS,MAAM;;GAErB,MAAM,aAAa,OAAO,SACxB,iBAAiB,WAAW,MAAO,CAAC,SAAS,aAAa,OAC1D,GACF;GAEA,MAAM,UAAU,cAA0B;AACxC,eAAW,QAAQ;AACnB,aAAS,KAAK,UAAU,IAAI,WAAU;IACtC,IAAI,WAAW,aAAa,UAAU,UAAU;AAChD,QAAI,WAAW;;AAEb,eAAW,OAAO,WAA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,MAAA,YAAW,CAAC,MAAA,WAAA,EAA5B,mBAQW,UAAA,EAAA,KAAA,GAAA,EAAA,CAPT,mBAGM,OAHN,YAGM,CADJ,WAAsB,KAAA,QAAA,UAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA,EAExB,mBAE2B,OAAA;KADzB,OAAM;KACL,aAAW;;oBA9BR,MAAA,cAAa,CAAA,CAAA,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import type { Environment } from '@scalar/oas-utils/entities/environment';
2
2
  import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
3
3
  import type { Workspace } from '@scalar/oas-utils/entities/workspace';
4
- import type { EnvVariable } from '@/store/active-entities';
4
+ import type { EnvVariable } from '../../store/active-entities';
5
5
  type __VLS_Props = {
6
6
  collection: Collection;
7
7
  operation: Operation;
@@ -1,5 +1,5 @@
1
1
  import "../../HttpMethod-rnWEgC3T.js";
2
- import "../../CodeInput-BN7uw3Bh.js";
3
- import "../../Server-BS4zjUdO.js";
4
- import { t as AddressBar_default } from "../../AddressBar-CX8xiYoe.js";
2
+ import "../../CodeInput-BTN8cC5h.js";
3
+ import "../../Server-CEKGIEfE.js";
4
+ import { t as AddressBar_default } from "../../AddressBar-BOZGKSoz.js";
5
5
  export { AddressBar_default as AddressBar };
@@ -1,7 +1,7 @@
1
1
  import type { Environment } from '@scalar/oas-utils/entities/environment';
2
2
  import { type CodeMirrorLanguage, type Extension } from '@scalar/use-codemirror';
3
3
  import { type Ref } from 'vue';
4
- import type { EnvVariable } from '@/store/active-entities';
4
+ import type { EnvVariable } from '../../store/active-entities';
5
5
  declare const _default: typeof __VLS_export;
6
6
  export default _default;
7
7
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
@@ -1,6 +1,6 @@
1
1
  import type { Environment } from '@scalar/oas-utils/entities/environment';
2
2
  import { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate } from '@scalar/use-codemirror';
3
- import { type EnvVariables } from '@/libs/env-helpers';
3
+ import { type EnvVariables } from '../../libs/env-helpers';
4
4
  /**
5
5
  * Styles the active environment variable pill
6
6
  */
@@ -1,2 +1,2 @@
1
- import { t as CodeInput_default } from "../../CodeInput-BN7uw3Bh.js";
1
+ import { t as CodeInput_default } from "../../CodeInput-BTN8cC5h.js";
2
2
  export { CodeInput_default as CodeInput };
@@ -1,3 +1,3 @@
1
- import { t as TheCommandPalette_default } from "../../CommandPalette-BiA0IgO8.js";
1
+ import { t as TheCommandPalette_default } from "../../CommandPalette-BxoEK8TY.js";
2
2
  import "../../HttpMethod-rnWEgC3T.js";
3
3
  export { TheCommandPalette_default as TheCommandPalette };
@@ -1,6 +1,6 @@
1
1
  import type { Environment } from '@scalar/oas-utils/entities/environment';
2
- import type { EnvVariable } from '@/store/active-entities';
3
- import type { VueClassProp } from '@/types/vue';
2
+ import type { EnvVariable } from '../../store/active-entities';
3
+ import type { VueClassProp } from '../../types/vue';
4
4
  type __VLS_Props = {
5
5
  id?: string;
6
6
  type?: string | undefined;
@@ -1,6 +1,6 @@
1
- import { n as DataTableInputSelect_default } from "../../CodeInput-BN7uw3Bh.js";
1
+ import { n as DataTableInputSelect_default } from "../../CodeInput-BTN8cC5h.js";
2
2
  import { n as DataTableCell_default, r as DataTable_default, t as DataTableRow_default } from "../../DataTableRow-c3XveEUO.js";
3
3
  import { n as DataTableCheckbox_default, t as DataTableText_default } from "../../DataTable-BqbZKW3K.js";
4
4
  import { t as DataTableHeader_default } from "../../DataTableHeader-DJVB0jCZ.js";
5
- import { t as DataTableInput_default } from "../../DataTableInput-SkIUPlrB.js";
5
+ import { t as DataTableInput_default } from "../../DataTableInput-RydMDjn2.js";
6
6
  export { DataTable_default as DataTable, DataTableCell_default as DataTableCell, DataTableCheckbox_default as DataTableCheckbox, DataTableHeader_default as DataTableHeader, DataTableInput_default as DataTableInput, DataTableInputSelect_default as DataTableInputSelect, DataTableRow_default as DataTableRow, DataTableText_default as DataTableText };
@@ -1,4 +1,4 @@
1
- import type { ClientLayout } from '@/hooks/useLayout';
1
+ import type { ClientLayout } from '../../hooks/useLayout';
2
2
  type __VLS_Props = {
3
3
  inputId: string;
4
4
  placeholder: string;
@@ -1,2 +1,2 @@
1
- import { t as ImportCollectionListener_default } from "../../ImportCollection-BIYMxB9Q.js";
1
+ import { t as ImportCollectionListener_default } from "../../ImportCollection-CGjySEzP.js";
2
2
  export { ImportCollectionListener_default as ImportCollectionListener };
@@ -1,6 +1,6 @@
1
1
  import type { Collection } from '@scalar/oas-utils/entities/spec';
2
2
  import type { Workspace } from '@scalar/oas-utils/entities/workspace';
3
- import type { WorkspaceStore } from '@/store';
3
+ import type { WorkspaceStore } from '../../../store/index.js';
4
4
  export declare function importCollection({ store, workspace, source, watchMode, onSuccess, onError, }: {
5
5
  store: WorkspaceStore;
6
6
  workspace: Workspace | undefined;
@@ -1,4 +1,4 @@
1
- import type { WorkspaceStore } from '@/store';
1
+ import type { WorkspaceStore } from '../../../store/index.js';
2
2
  /**
3
3
  * Checks whether the store is empty.
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { ServerVariables, ServerVariableValues } from '@/components/Server/types';
1
+ import type { ServerVariables, ServerVariableValues } from '../../components/Server/types';
2
2
  type __VLS_Props = {
3
3
  variables?: ServerVariables | undefined;
4
4
  values?: ServerVariableValues;
@@ -1,3 +1,3 @@
1
1
  import { t as ServerVariablesForm_default } from "../../ServerVariablesForm-BRZ9XC8o.js";
2
- import { n as ServerDropdown_default, t as ServerSelector_default } from "../../Server-BS4zjUdO.js";
2
+ import { n as ServerDropdown_default, t as ServerSelector_default } from "../../Server-CEKGIEfE.js";
3
3
  export { ServerDropdown_default as ServerDropdown, ServerSelector_default as ServerSelector, ServerVariablesForm_default as ServerVariablesForm };
@@ -1,2 +1,2 @@
1
- import { t as Sidebar_default } from "../../Sidebar-Xl9_nFXX.js";
1
+ import { t as Sidebar_default } from "../../Sidebar-CRxdl38Y.js";
2
2
  export { Sidebar_default as Sidebar };