@scalar/api-client 2.5.32 → 2.5.34

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 (235) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue2.js +120 -128
  4. package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
  5. package/dist/components/AddressBar/AddressBarHistory.vue2.js +57 -63
  6. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  7. package/dist/components/CodeInput/CodeInput.vue2.js +143 -150
  8. package/dist/components/CodeInput/codeVariableWidget.js +70 -75
  9. package/dist/components/CommandPalette/CommandActionInput.vue.js +17 -19
  10. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -27
  11. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +53 -55
  12. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +129 -133
  13. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +1 -1
  14. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +84 -98
  15. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +64 -74
  16. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -11
  17. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  18. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +164 -183
  19. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  20. package/dist/components/DataTable/DataTableInput.vue.js +4 -4
  21. package/dist/components/DataTable/DataTableInput.vue2.js +31 -31
  22. package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -2
  23. package/dist/components/EmptyState.vue.js +1 -1
  24. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +75 -84
  25. package/dist/components/Form/LabelInput.vue.js +1 -1
  26. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  27. package/dist/components/HttpMethod/HttpMethod.vue2.js +11 -11
  28. package/dist/components/ImportCollection/DropEventListener.vue.js +42 -44
  29. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -23
  30. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +141 -149
  31. package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +1 -1
  32. package/dist/components/ImportCollection/ImportNowButton.vue.js +22 -23
  33. package/dist/components/ImportCollection/IntegrationLogo.vue.js +12 -13
  34. package/dist/components/ImportCollection/PasteEventListener.vue.js +11 -12
  35. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +69 -76
  36. package/dist/components/ImportCollection/utils/get-openapi-version.js +8 -8
  37. package/dist/components/ImportCollection/utils/import-collection.js +14 -14
  38. package/dist/components/OpenApiClientButton.vue.js +1 -1
  39. package/dist/components/OpenApiClientButton.vue2.js +10 -10
  40. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  41. package/dist/components/ScalarAsciiArt.vue2.js +19 -22
  42. package/dist/components/Search/useSearch.js +51 -61
  43. package/dist/components/SectionFilter.vue.js +1 -1
  44. package/dist/components/SectionFilter.vue2.js +26 -29
  45. package/dist/components/Server/ServerDropdown.vue.js +70 -96
  46. package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
  47. package/dist/components/Server/ServerDropdownItem.vue2.js +57 -67
  48. package/dist/components/Server/ServerSelector.vue.js +44 -55
  49. package/dist/components/Server/ServerVariablesForm.vue.js +36 -42
  50. package/dist/components/Server/ServerVariablesSelect.vue.js +6 -6
  51. package/dist/components/SideNav/DownloadAppButton.vue.js +1 -1
  52. package/dist/components/SideNav/SideNav.vue.js +68 -74
  53. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
  54. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  55. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  56. package/dist/components/TopNav/TopNav.vue.js +107 -122
  57. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  58. package/dist/hooks/useFileDialog.js +12 -12
  59. package/dist/hooks/useResponseBody.js +14 -16
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.js +2 -2
  62. package/dist/layouts/App/ApiClientApp.vue.js +50 -56
  63. package/dist/layouts/App/ApiClientApp.vue3.js +1 -1
  64. package/dist/layouts/App/create-api-client-app.js +19 -20
  65. package/dist/layouts/App/index.js +1 -1
  66. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  67. package/dist/layouts/Modal/ApiClientModal.vue2.js +18 -21
  68. package/dist/layouts/Web/ApiClientWeb.vue.js +45 -51
  69. package/dist/layouts/Web/ApiClientWeb.vue3.js +1 -1
  70. package/dist/layouts/Web/create-api-client-web.js +19 -20
  71. package/dist/layouts/Web/index.js +1 -1
  72. package/dist/libs/create-client.js +102 -109
  73. package/dist/libs/env-helpers.js +3 -3
  74. package/dist/libs/event-bus.js +15 -15
  75. package/dist/libs/extractAttachmentFilename.js +5 -6
  76. package/dist/libs/find-request.js +9 -10
  77. package/dist/libs/get-request-uid-by-path-method.js +12 -12
  78. package/dist/libs/getOpenApiDocumentDetails.js +7 -7
  79. package/dist/libs/importers/curl.js +3 -3
  80. package/dist/libs/normalize-headers.js +9 -10
  81. package/dist/libs/postman.js +15 -17
  82. package/dist/libs/send-request/build-request-security.js +9 -10
  83. package/dist/libs/send-request/create-fetch-body.js +11 -12
  84. package/dist/libs/send-request/create-fetch-query-params.js +13 -13
  85. package/dist/libs/send-request/create-request-operation.js +83 -84
  86. package/dist/libs/send-request/decode-buffer.d.ts.map +1 -1
  87. package/dist/libs/send-request/set-request-cookies.js +12 -12
  88. package/dist/libs/string-template.js +21 -21
  89. package/dist/libs/validate-parameters.js +5 -8
  90. package/dist/plugins/plugin-manager.js +11 -17
  91. package/dist/store/active-entities.js +90 -117
  92. package/dist/store/collections.js +41 -42
  93. package/dist/store/import-spec.js +25 -26
  94. package/dist/store/request-example.js +20 -24
  95. package/dist/store/requests.js +63 -81
  96. package/dist/store/router-params.js +7 -7
  97. package/dist/store/security-schemes.js +35 -36
  98. package/dist/store/store.js +2 -2
  99. package/dist/store/tags.js +20 -21
  100. package/dist/style.css +1 -1
  101. package/dist/views/Collection/Collection.vue2.js +21 -22
  102. package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
  103. package/dist/views/Collection/CollectionAuthentication.vue2.js +43 -47
  104. package/dist/views/Collection/CollectionEnvironment.vue.js +1 -1
  105. package/dist/views/Collection/CollectionEnvironment.vue2.js +196 -207
  106. package/dist/views/Collection/CollectionInfoForm.vue.js +1 -1
  107. package/dist/views/Collection/CollectionInfoForm.vue2.js +34 -41
  108. package/dist/views/Collection/CollectionNavigation.vue.js +116 -125
  109. package/dist/views/Collection/CollectionOverview.vue2.js +22 -25
  110. package/dist/views/Collection/CollectionServerForm.vue.js +39 -45
  111. package/dist/views/Collection/CollectionServers.vue2.js +88 -98
  112. package/dist/views/Collection/CollectionSettings.vue.js +1 -1
  113. package/dist/views/Collection/CollectionSettings.vue2.js +101 -108
  114. package/dist/views/Collection/components/EnvironmentForm.vue.js +1 -1
  115. package/dist/views/Collection/components/EnvironmentForm.vue2.js +141 -145
  116. package/dist/views/Collection/components/MarkdownInput.vue.js +1 -1
  117. package/dist/views/Collection/components/MarkdownInput.vue2.js +1 -2
  118. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +15 -15
  119. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +15 -16
  120. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +61 -64
  121. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +9 -10
  122. package/dist/views/Cookies/CookieModal.vue.js +1 -1
  123. package/dist/views/Cookies/Cookies.vue2.js +90 -93
  124. package/dist/views/Environment/Environment.vue2.js +267 -295
  125. package/dist/views/Environment/EnvironmentModal.vue.js +63 -70
  126. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -42
  127. package/dist/views/Request/Request.vue.js +1 -1
  128. package/dist/views/Request/Request.vue2.js +60 -67
  129. package/dist/views/Request/RequestRoot.vue.js +1 -1
  130. package/dist/views/Request/RequestRoot.vue2.js +78 -89
  131. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +37 -44
  132. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +44 -45
  133. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -127
  134. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  135. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +120 -139
  136. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
  137. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +97 -97
  138. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  139. package/dist/views/Request/RequestSection/RequestBody.vue2.js +287 -310
  140. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +1 -1
  141. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +86 -94
  142. package/dist/views/Request/RequestSection/RequestParams.vue.js +37 -38
  143. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +36 -38
  144. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  145. package/dist/views/Request/RequestSection/RequestSection.vue2.js +28 -31
  146. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  147. package/dist/views/Request/RequestSection/RequestTable.vue2.js +49 -52
  148. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
  149. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +16 -16
  150. package/dist/views/Request/RequestSection/helpers/getting-started.js +7 -11
  151. package/dist/views/Request/RequestSection/helpers/update-scheme.js +7 -8
  152. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  153. package/dist/views/Request/RequestSidebar.vue2.js +199 -211
  154. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  155. package/dist/views/Request/RequestSidebarItem.vue2.js +332 -349
  156. package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
  157. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +210 -240
  158. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  159. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +38 -41
  160. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
  161. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +58 -64
  162. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -2
  163. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
  164. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
  165. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +20 -23
  166. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +1 -1
  167. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  168. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +29 -30
  169. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +38 -41
  170. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
  171. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +28 -29
  172. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  173. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +128 -140
  174. package/dist/views/Request/components/WorkspaceDropdown.vue.js +116 -124
  175. package/dist/views/Request/consts/mediaTypes.js +2 -3
  176. package/dist/views/Request/handle-drag.js +24 -28
  177. package/dist/views/Request/hooks/useOpenApiWatcher.js +26 -33
  178. package/dist/views/Request/libs/auth.js +37 -43
  179. package/dist/views/Request/libs/oauth2.js +30 -32
  180. package/dist/views/Request/libs/watch-mode.js +100 -103
  181. package/dist/views/Settings/SettingsGeneral.vue.js +206 -236
  182. package/package.json +22 -22
  183. package/dist/components/AddressBar/AddressBar.vue3.js +0 -4
  184. package/dist/components/AddressBar/AddressBarHistory.vue3.js +0 -4
  185. package/dist/components/CodeInput/CodeInput.vue3.js +0 -4
  186. package/dist/components/CodeInput/CodeInput.vue4.js +0 -4
  187. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue3.js +0 -4
  188. package/dist/components/CommandPalette/TheCommandPalette.vue3.js +0 -4
  189. package/dist/components/DataTable/DataTableInput.vue3.js +0 -4
  190. package/dist/components/EmptyState.vue3.js +0 -4
  191. package/dist/components/Form/LabelInput.vue3.js +0 -4
  192. package/dist/components/HttpMethod/HttpMethod.vue3.js +0 -4
  193. package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
  194. package/dist/components/OpenApiClientButton.vue3.js +0 -4
  195. package/dist/components/ScalarAsciiArt.vue3.js +0 -4
  196. package/dist/components/SectionFilter.vue3.js +0 -4
  197. package/dist/components/Server/ServerDropdownItem.vue3.js +0 -4
  198. package/dist/components/SideNav/DownloadAppButton.vue3.js +0 -4
  199. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue3.js +0 -4
  200. package/dist/components/Sidebar/Sidebar.vue3.js +0 -4
  201. package/dist/components/Sidebar/SidebarListElement.vue3.js +0 -4
  202. package/dist/components/Sidebar/SidebarListElement.vue4.js +0 -4
  203. package/dist/components/TopNav/TopNavItem.vue3.js +0 -4
  204. package/dist/layouts/App/ApiClientApp.vue2.js +0 -4
  205. package/dist/layouts/Modal/ApiClientModal.vue3.js +0 -4
  206. package/dist/layouts/Web/ApiClientWeb.vue2.js +0 -4
  207. package/dist/style.css.js +0 -4
  208. package/dist/views/Collection/CollectionAuthentication.vue3.js +0 -4
  209. package/dist/views/Collection/CollectionEnvironment.vue3.js +0 -4
  210. package/dist/views/Collection/CollectionInfoForm.vue3.js +0 -4
  211. package/dist/views/Collection/CollectionSettings.vue3.js +0 -4
  212. package/dist/views/Collection/components/EnvironmentForm.vue3.js +0 -4
  213. package/dist/views/Collection/components/MarkdownInput.vue3.js +0 -4
  214. package/dist/views/Cookies/CookieModal.vue3.js +0 -4
  215. package/dist/views/Request/Request.vue3.js +0 -4
  216. package/dist/views/Request/RequestRoot.vue3.js +0 -4
  217. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue3.js +0 -4
  218. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue3.js +0 -4
  219. package/dist/views/Request/RequestSection/RequestBody.vue3.js +0 -4
  220. package/dist/views/Request/RequestSection/RequestCodeExample.vue3.js +0 -4
  221. package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -4
  222. package/dist/views/Request/RequestSection/RequestTable.vue3.js +0 -4
  223. package/dist/views/Request/RequestSection/RequestTableTooltip.vue3.js +0 -4
  224. package/dist/views/Request/RequestSidebar.vue3.js +0 -4
  225. package/dist/views/Request/RequestSidebarItem.vue3.js +0 -4
  226. package/dist/views/Request/RequestSidebarItem.vue4.js +0 -4
  227. package/dist/views/Request/RequestSidebarItemMenu.vue3.js +0 -4
  228. package/dist/views/Request/RequestSubpageHeader.vue3.js +0 -4
  229. package/dist/views/Request/ResponseSection/ResponseBody.vue3.js +0 -4
  230. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue3.js +0 -4
  231. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue3.js +0 -4
  232. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue2.js +0 -4
  233. package/dist/views/Request/ResponseSection/ResponseEmpty.vue3.js +0 -4
  234. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue3.js +0 -4
  235. package/dist/views/Request/ResponseSection/ResponseSection.vue3.js +0 -4
@@ -1,22 +1,20 @@
1
- import { extractFilename as v } from "../libs/extractAttachmentFilename.js";
2
- import { computed as r, isRef as i } from "vue";
3
- import m from "whatwg-mimetype";
4
- function b(t) {
5
- const l = (a) => a instanceof Blob, e = r(() => i(t.data) ? t.data.value : t.data), c = r(() => i(t.headers) ? t.headers.value : t.headers), o = r(() => {
6
- var n;
7
- const a = ((n = c.value.find((u) => u.name.toLowerCase() === "content-type")) == null ? void 0 : n.value) ?? "";
8
- return new m(a);
9
- }), s = r(() => {
10
- var n;
11
- const a = ((n = c.value.find((u) => u.name.toLowerCase() === "content-disposition")) == null ? void 0 : n.value) ?? "";
12
- return v(a);
13
- }), f = r(() => l(e.value) ? URL.createObjectURL(e.value) : typeof e.value == "string" ? URL.createObjectURL(new Blob([e.value], { type: o.value.toString() })) : e.value instanceof Object && Object.keys(e.value).length ? URL.createObjectURL(
1
+ import { extractFilename as f } from "../libs/extractAttachmentFilename.js";
2
+ import { computed as n, isRef as c } from "vue";
3
+ import v from "whatwg-mimetype";
4
+ function R(t) {
5
+ const i = (a) => a instanceof Blob, e = n(() => c(t.data) ? t.data.value : t.data), u = n(() => c(t.headers) ? t.headers.value : t.headers), r = n(() => {
6
+ const a = u.value.find((o) => o.name.toLowerCase() === "content-type")?.value ?? "";
7
+ return new v(a);
8
+ }), l = n(() => {
9
+ const a = u.value.find((o) => o.name.toLowerCase() === "content-disposition")?.value ?? "";
10
+ return f(a);
11
+ }), s = n(() => i(e.value) ? URL.createObjectURL(e.value) : typeof e.value == "string" ? URL.createObjectURL(new Blob([e.value], { type: r.value.toString() })) : e.value instanceof Object && Object.keys(e.value).length ? URL.createObjectURL(
14
12
  new Blob([JSON.stringify(e.value)], {
15
- type: o.value.toString()
13
+ type: r.value.toString()
16
14
  })
17
15
  ) : "");
18
- return { mimeType: o, attachmentFilename: s, dataUrl: f };
16
+ return { mimeType: r, attachmentFilename: l, dataUrl: s };
19
17
  }
20
18
  export {
21
- b as useResponseBody
19
+ R as useResponseBody
22
20
  };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import './style.css.js';
1
+ import './style.css';
2
2
  export * from './layouts/Modal/index.js';
3
3
  export * from './layouts/App/index.js';
4
4
  export { useWorkspace } from './store/store.js';
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import "./style.css.js";
1
+ /* empty css */
2
2
  import { useWorkspace as p } from "./store/store.js";
3
3
  import { createModalRouter as i, createWebHashRouter as l, createWebHistoryRouter as c } from "./router.js";
4
4
  import { default as m } from "./layouts/App/ApiClientApp.vue.js";
5
- import "./layouts/App/ApiClientApp.vue2.js";
5
+ /* empty css */
6
6
  import { default as d } from "./layouts/Modal/ApiClientModal.vue.js";
7
7
  import { createApiClientModal as s, createApiClientModalSync as u } from "./layouts/Modal/create-api-client-modal.js";
8
8
  import { createApiClientApp as C } from "./layouts/App/create-api-client-app.js";
@@ -1,76 +1,70 @@
1
- import { defineComponent as y, ref as v, onBeforeMount as K, onMounted as C, onBeforeUnmount as S, watch as b, computed as k, createBlock as t, openBlock as n, unref as r, withCtx as m, createElementVNode as p, createVNode as s, createCommentVNode as E, KeepAlive as H, resolveDynamicComponent as N } from "vue";
2
- import { addScalarClassesToHeadless as A, ScalarTeleportRoot as B } from "@scalar/components";
3
- import { getThemeStyles as D } from "@scalar/themes";
4
- import { useBreakpoints as L } from "@scalar/use-hooks/useBreakpoints";
5
- import { useColorMode as M } from "@scalar/use-hooks/useColorMode";
6
- import { ScalarToasts as P } from "@scalar/use-toasts";
7
- import { RouterView as x } from "vue-router";
8
- import V from "../../components/TopNav/TopNav.vue.js";
9
- import { useSidebar as O } from "../../hooks/useSidebar.js";
10
- import $ from "./MainLayout.vue.js";
11
- import { useActiveEntities as g } from "../../store/active-entities.js";
12
- import { APP_HOTKEYS as R } from "./hotkeys.js";
13
- import { handleHotKeyDown as U, DEFAULT_HOTKEYS as W } from "../../libs/hot-keys.js";
14
- import { useWorkspace as Y } from "../../store/store.js";
15
- const F = {
1
+ import { defineComponent as T, ref as y, onBeforeMount as v, onMounted as K, onBeforeUnmount as C, watch as S, computed as b, createBlock as t, openBlock as n, unref as r, withCtx as m, createElementVNode as d, createVNode as s, createCommentVNode as k, KeepAlive as E, resolveDynamicComponent as H } from "vue";
2
+ import { addScalarClassesToHeadless as N, ScalarTeleportRoot as A } from "@scalar/components";
3
+ import { getThemeStyles as B } from "@scalar/themes";
4
+ import { useBreakpoints as D } from "@scalar/use-hooks/useBreakpoints";
5
+ import { useColorMode as L } from "@scalar/use-hooks/useColorMode";
6
+ import { ScalarToasts as M } from "@scalar/use-toasts";
7
+ import { RouterView as P } from "vue-router";
8
+ import x from "../../components/TopNav/TopNav.vue.js";
9
+ import { useSidebar as V } from "../../hooks/useSidebar.js";
10
+ import O from "./MainLayout.vue.js";
11
+ import { useActiveEntities as $ } from "../../store/active-entities.js";
12
+ import { APP_HOTKEYS as g } from "./hotkeys.js";
13
+ import { handleHotKeyDown as R, DEFAULT_HOTKEYS as U } from "../../libs/hot-keys.js";
14
+ import { useWorkspace as W } from "../../store/store.js";
15
+ const Y = {
16
16
  id: "scalar-client-app",
17
17
  class: "contents"
18
- }, I = ["innerHTML"], ie = /* @__PURE__ */ y({
18
+ }, F = ["innerHTML"], se = /* @__PURE__ */ T({
19
19
  __name: "ApiClientApp",
20
20
  emits: ["newTab"],
21
- setup(Q) {
22
- const u = { ...W, ...R }, i = v(null), f = (e) => {
21
+ setup(I) {
22
+ const p = { ...U, ...g }, i = y(null), u = (e) => {
23
23
  i.value = e;
24
24
  };
25
- M();
26
- const { activeWorkspace: a } = g(), { events: o } = Y();
27
- K(() => A());
28
- const l = (e) => U(e, o.hotKeys, { hotKeys: u }), c = (e) => {
25
+ L();
26
+ const { activeWorkspace: a } = $(), { events: o } = W();
27
+ v(() => N());
28
+ const l = (e) => R(e, o.hotKeys, { hotKeys: p }), c = (e) => {
29
29
  e && e.openCommandPalette && (e.openCommandPalette.preventDefault(), o.commandPalette.emit());
30
30
  };
31
- C(() => {
31
+ K(() => {
32
32
  window.addEventListener("keydown", l), o.hotKeys.on(c);
33
- }), S(() => {
33
+ }), C(() => {
34
34
  window.removeEventListener("keydown", l), o.hotKeys.off(c);
35
35
  });
36
- const { mediaQueries: _ } = L(), { setSidebarOpen: w } = O();
37
- b(_.xl, w, {
36
+ const { mediaQueries: f } = D(), { setSidebarOpen: _ } = V();
37
+ S(f.xl, _, {
38
38
  immediate: !0
39
39
  });
40
- const h = k(
41
- () => {
42
- var e;
43
- return a.value && `<style>${D((e = a.value) == null ? void 0 : e.themeId)}</style>`;
44
- }
40
+ const w = b(
41
+ () => a.value && `<style>${B(a.value?.themeId)}</style>`
45
42
  );
46
- return (e, j) => (n(), t(r(B), null, {
47
- default: m(() => {
48
- var d;
49
- return [
50
- p("div", F, [
51
- p("div", { innerHTML: h.value }, null, 8, I),
52
- s(V, { openNewTab: i.value }, null, 8, ["openNewTab"]),
53
- (d = r(a)) != null && d.uid ? (n(), t($, { key: 0 }, {
54
- default: m(() => [
55
- s(r(x), { onNewTab: f }, {
56
- default: m(({ Component: T }) => [
57
- (n(), t(H, null, [
58
- (n(), t(N(T)))
59
- ], 1024))
60
- ]),
61
- _: 1
62
- })
63
- ]),
64
- _: 1
65
- })) : E("", !0),
66
- s(r(P))
67
- ])
68
- ];
69
- }),
43
+ return (e, Q) => (n(), t(r(A), null, {
44
+ default: m(() => [
45
+ d("div", Y, [
46
+ d("div", { innerHTML: w.value }, null, 8, F),
47
+ s(x, { openNewTab: i.value }, null, 8, ["openNewTab"]),
48
+ r(a)?.uid ? (n(), t(O, { key: 0 }, {
49
+ default: m(() => [
50
+ s(r(P), { onNewTab: u }, {
51
+ default: m(({ Component: h }) => [
52
+ (n(), t(E, null, [
53
+ (n(), t(H(h)))
54
+ ], 1024))
55
+ ]),
56
+ _: 1
57
+ })
58
+ ]),
59
+ _: 1
60
+ })) : k("", !0),
61
+ s(r(M))
62
+ ])
63
+ ]),
70
64
  _: 1
71
65
  }));
72
66
  }
73
67
  });
74
68
  export {
75
- ie as default
69
+ se as default
76
70
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./ApiClientApp.vue.js";
2
- import "./ApiClientApp.vue2.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,30 +1,29 @@
1
- import { analytics as c } from "../../analytics.js";
2
- import { createWebHistoryRouter as n } from "../../router.js";
3
- import f from "./ApiClientApp.vue.js";
4
- import "./ApiClientApp.vue2.js";
5
- import { saveActiveWorkspace as y } from "../../routes.js";
6
- import { createApiClient as h } from "../../libs/create-client.js";
7
- const U = async (a, t = {}, m = !0, e = n()) => {
8
- const r = h({
9
- el: a,
10
- appComponent: f,
1
+ import { analytics as s } from "../../analytics.js";
2
+ import { createWebHistoryRouter as c } from "../../router.js";
3
+ import n from "./ApiClientApp.vue.js";
4
+ /* empty css */
5
+ import { saveActiveWorkspace as f } from "../../routes.js";
6
+ import { createApiClient as y } from "../../libs/create-client.js";
7
+ const C = async (o, t = {}, a = !0, e = c()) => {
8
+ const r = y({
9
+ el: o,
10
+ appComponent: n,
11
11
  configuration: t,
12
- mountOnInitialize: m,
12
+ mountOnInitialize: a,
13
13
  router: e,
14
14
  layout: "desktop"
15
- }), { importSpecFile: l, importSpecFromUrl: i } = r.store;
16
- return e.afterEach((p, s) => {
17
- var o;
18
- t.telemetry && ((o = c) == null || o.capture("page-view", {
15
+ }), { importSpecFile: m, importSpecFromUrl: l } = r.store;
16
+ return e.afterEach((p, i) => {
17
+ t.telemetry && s?.capture("page-view", {
19
18
  hostname: window.location.hostname,
20
19
  to: p.path,
21
20
  // capture path excluding query params
22
- from: s.path
23
- })), y(p);
24
- }), t.url ? await i(t.url, "default", {
21
+ from: i.path
22
+ }), f(p);
23
+ }), t.url ? await l(t.url, "default", {
25
24
  proxyUrl: t.proxyUrl
26
- }) : t.content && await l(t.content, "default"), r;
25
+ }) : t.content && await m(t.content, "default"), r;
27
26
  };
28
27
  export {
29
- U as createApiClientApp
28
+ C as createApiClientApp
30
29
  };
@@ -1,5 +1,5 @@
1
1
  import { default as r } from "./ApiClientApp.vue.js";
2
- import "./ApiClientApp.vue2.js";
2
+ /* empty css */
3
3
  import { createApiClientApp as o } from "./create-api-client-app.js";
4
4
  export {
5
5
  r as ApiClientApp,
@@ -1,5 +1,5 @@
1
1
  import o from "./ApiClientModal.vue2.js";
2
- import "./ApiClientModal.vue3.js";
2
+ /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-45e9730e"]]);
5
5
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as f, ref as v, useId as h, watch as w, nextTick as y, onBeforeMount as _, onMounted as k, onBeforeUnmount as C, withDirectives as E, createElementBlock as T, openBlock as x, createElementVNode as r, unref as a, createVNode as d, withCtx as K, vShow as F } from "vue";
1
+ import { defineComponent as f, ref as v, useId as h, watch as w, nextTick as y, onBeforeMount as _, onMounted as k, onBeforeUnmount as C, withDirectives as E, createElementBlock as T, openBlock as x, createElementVNode as n, unref as t, createVNode as d, withCtx as K, vShow as F } from "vue";
2
2
  import { addScalarClassesToHeadless as M, ScalarTeleportRoot as B } from "@scalar/components";
3
3
  import { useFocusTrap as P } from "@vueuse/integrations/useFocusTrap";
4
4
  import { RouterView as S } from "vue-router";
@@ -8,48 +8,45 @@ import { handleHotKeyDown as D } from "../../libs/hot-keys.js";
8
8
  const V = { class: "scalar scalar-app" }, $ = { class: "scalar-container" }, g = ["id"], q = /* @__PURE__ */ f({
9
9
  __name: "ApiClientModal",
10
10
  setup(H) {
11
- const { activeWorkspace: m } = b(), { modalState: o, events: n } = A(), l = v(null), s = h(), { activate: u, deactivate: p } = P(l, {
11
+ const { activeWorkspace: m } = b(), { modalState: o, events: a } = A(), r = v(null), l = h(), { activate: u, deactivate: p } = P(r, {
12
12
  allowOutsideClick: !0,
13
- fallbackFocus: `#${s}`
14
- }), c = (e) => {
15
- var t;
16
- return D(e, n.hotKeys, (t = m.value) == null ? void 0 : t.hotKeyConfig);
17
- };
13
+ fallbackFocus: `#${l}`
14
+ }), s = (e) => D(e, a.hotKeys, m.value?.hotKeyConfig);
18
15
  w(
19
16
  () => o.open,
20
17
  (e) => {
21
- e ? (window.addEventListener("keydown", c), document.documentElement.style.overflow = "hidden", u({ checkCanFocusTrap: () => y() })) : (window.removeEventListener("keydown", c), document.documentElement.style.removeProperty("overflow"), p());
18
+ e ? (window.addEventListener("keydown", s), document.documentElement.style.overflow = "hidden", u({ checkCanFocusTrap: () => y() })) : (window.removeEventListener("keydown", s), document.documentElement.style.removeProperty("overflow"), p());
22
19
  }
23
20
  ), _(() => M());
24
- const i = (e) => (e == null ? void 0 : e.closeModal) && o.open && o.hide();
25
- return k(() => n.hotKeys.on(i)), C(() => {
26
- document.documentElement.style.removeProperty("overflow"), n.hotKeys.off(i);
27
- }), (e, t) => E((x(), T("div", V, [
28
- r("div", $, [
29
- r("div", {
30
- id: a(s),
21
+ const c = (e) => e?.closeModal && o.open && o.hide();
22
+ return k(() => a.hotKeys.on(c)), C(() => {
23
+ document.documentElement.style.removeProperty("overflow"), a.hotKeys.off(c);
24
+ }), (e, i) => E((x(), T("div", V, [
25
+ n("div", $, [
26
+ n("div", {
27
+ id: t(l),
31
28
  ref_key: "client",
32
- ref: l,
29
+ ref: r,
33
30
  "aria-label": "API Client",
34
31
  "aria-modal": "true",
35
32
  class: "scalar-app-layout scalar-client",
36
33
  role: "dialog",
37
34
  tabindex: "-1"
38
35
  }, [
39
- d(a(B), null, {
36
+ d(t(B), null, {
40
37
  default: K(() => [
41
- d(a(S), { key: "$route.fullPath" })
38
+ d(t(S), { key: "$route.fullPath" })
42
39
  ]),
43
40
  _: 1
44
41
  })
45
42
  ], 8, g),
46
- r("div", {
43
+ n("div", {
47
44
  class: "scalar-app-exit",
48
- onClick: t[0] || (t[0] = (I) => a(o).hide())
45
+ onClick: i[0] || (i[0] = (I) => t(o).hide())
49
46
  })
50
47
  ])
51
48
  ], 512)), [
52
- [F, a(o).open]
49
+ [F, t(o).open]
53
50
  ]);
54
51
  }
55
52
  });
@@ -1,63 +1,57 @@
1
- import { defineComponent as _, onBeforeMount as y, onMounted as h, onBeforeUnmount as v, watch as w, computed as C, createBlock as n, openBlock as r, unref as o, withCtx as m, createVNode as i, createElementVNode as k, createCommentVNode as K, KeepAlive as S, resolveDynamicComponent as T } from "vue";
2
- import { addScalarClassesToHeadless as B, ScalarTeleportRoot as H } from "@scalar/components";
3
- import { getThemeStyles as M } from "@scalar/themes";
4
- import { useBreakpoints as x } from "@scalar/use-hooks/useBreakpoints";
5
- import { useColorMode as D } from "@scalar/use-hooks/useColorMode";
6
- import { ScalarToasts as E } from "@scalar/use-toasts";
7
- import { RouterView as L } from "vue-router";
8
- import { useSidebar as V } from "../../hooks/useSidebar.js";
9
- import b from "../App/MainLayout.vue.js";
10
- import { useActiveEntities as A } from "../../store/active-entities.js";
11
- import N from "../../components/ImportCollection/ImportCollectionListener.vue.js";
12
- import { useWorkspace as P } from "../../store/store.js";
13
- import { handleHotKeyDown as W } from "../../libs/hot-keys.js";
14
- const $ = ["innerHTML"], ee = /* @__PURE__ */ _({
1
+ import { defineComponent as f, onBeforeMount as _, onMounted as y, onBeforeUnmount as h, watch as v, computed as w, createBlock as n, openBlock as r, unref as o, withCtx as m, createVNode as i, createElementVNode as C, createCommentVNode as k, KeepAlive as K, resolveDynamicComponent as S } from "vue";
2
+ import { addScalarClassesToHeadless as T, ScalarTeleportRoot as B } from "@scalar/components";
3
+ import { getThemeStyles as H } from "@scalar/themes";
4
+ import { useBreakpoints as M } from "@scalar/use-hooks/useBreakpoints";
5
+ import { useColorMode as x } from "@scalar/use-hooks/useColorMode";
6
+ import { ScalarToasts as D } from "@scalar/use-toasts";
7
+ import { RouterView as E } from "vue-router";
8
+ import { useSidebar as L } from "../../hooks/useSidebar.js";
9
+ import V from "../App/MainLayout.vue.js";
10
+ import { useActiveEntities as b } from "../../store/active-entities.js";
11
+ import A from "../../components/ImportCollection/ImportCollectionListener.vue.js";
12
+ import { useWorkspace as N } from "../../store/store.js";
13
+ import { handleHotKeyDown as P } from "../../libs/hot-keys.js";
14
+ const W = ["innerHTML"], Z = /* @__PURE__ */ f({
15
15
  __name: "ApiClientWeb",
16
- setup(g) {
17
- D();
18
- const { activeWorkspace: a } = A(), { events: t } = P();
19
- y(() => B());
20
- const s = (e) => W(e, t.hotKeys), l = (e) => {
16
+ setup($) {
17
+ x();
18
+ const { activeWorkspace: a } = b(), { events: t } = N();
19
+ _(() => T());
20
+ const s = (e) => P(e, t.hotKeys), l = (e) => {
21
21
  e && e.openCommandPalette && (e.openCommandPalette.preventDefault(), t.commandPalette.emit());
22
22
  };
23
- h(() => {
23
+ y(() => {
24
24
  window.addEventListener("keydown", s), t.hotKeys.on(l);
25
- }), v(() => {
25
+ }), h(() => {
26
26
  window.removeEventListener("keydown", s), t.hotKeys.off(l);
27
27
  });
28
- const { mediaQueries: u } = x(), { setSidebarOpen: c } = V();
29
- w(u.xl, c, {
28
+ const { mediaQueries: d } = M(), { setSidebarOpen: u } = L();
29
+ v(d.xl, u, {
30
30
  immediate: !0
31
31
  });
32
- const p = C(
33
- () => {
34
- var e;
35
- return a.value && `<style>${M((e = a.value) == null ? void 0 : e.themeId)}</style>`;
36
- }
32
+ const c = w(
33
+ () => a.value && `<style>${H(a.value?.themeId)}</style>`
37
34
  );
38
- return (e, R) => (r(), n(o(H), null, {
35
+ return (e, g) => (r(), n(o(B), null, {
39
36
  default: m(() => [
40
- i(o(N), null, {
41
- default: m(() => {
42
- var d;
43
- return [
44
- k("div", { innerHTML: p.value }, null, 8, $),
45
- (d = o(a)) != null && d.uid ? (r(), n(b, { key: 0 }, {
46
- default: m(() => [
47
- i(o(L), null, {
48
- default: m(({ Component: f }) => [
49
- (r(), n(S, null, [
50
- (r(), n(T(f)))
51
- ], 1024))
52
- ]),
53
- _: 1
54
- })
55
- ]),
56
- _: 1
57
- })) : K("", !0),
58
- i(o(E))
59
- ];
60
- }),
37
+ i(o(A), null, {
38
+ default: m(() => [
39
+ C("div", { innerHTML: c.value }, null, 8, W),
40
+ o(a)?.uid ? (r(), n(V, { key: 0 }, {
41
+ default: m(() => [
42
+ i(o(E), null, {
43
+ default: m(({ Component: p }) => [
44
+ (r(), n(K, null, [
45
+ (r(), n(S(p)))
46
+ ], 1024))
47
+ ]),
48
+ _: 1
49
+ })
50
+ ]),
51
+ _: 1
52
+ })) : k("", !0),
53
+ i(o(D))
54
+ ]),
61
55
  _: 1
62
56
  })
63
57
  ]),
@@ -66,5 +60,5 @@ const $ = ["innerHTML"], ee = /* @__PURE__ */ _({
66
60
  }
67
61
  });
68
62
  export {
69
- ee as default
63
+ Z as default
70
64
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./ApiClientWeb.vue.js";
2
- import "./ApiClientWeb.vue2.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,30 +1,29 @@
1
- import { analytics as s } from "../../analytics.js";
2
- import { createWebHistoryRouter as n } from "../../router.js";
3
- import f from "./ApiClientWeb.vue.js";
4
- import "./ApiClientWeb.vue2.js";
5
- import { saveActiveWorkspace as y } from "../../routes.js";
6
- import { createApiClient as w } from "../../libs/create-client.js";
7
- const A = async (a, e = {}, m = !0) => {
8
- const t = n(), r = w({
9
- el: a,
10
- appComponent: f,
1
+ import { analytics as i } from "../../analytics.js";
2
+ import { createWebHistoryRouter as s } from "../../router.js";
3
+ import n from "./ApiClientWeb.vue.js";
4
+ /* empty css */
5
+ import { saveActiveWorkspace as f } from "../../routes.js";
6
+ import { createApiClient as y } from "../../libs/create-client.js";
7
+ const x = async (p, e = {}, a = !0) => {
8
+ const t = s(), r = y({
9
+ el: p,
10
+ appComponent: n,
11
11
  configuration: e,
12
- mountOnInitialize: m,
12
+ mountOnInitialize: a,
13
13
  router: t,
14
14
  layout: "web"
15
- }), { importSpecFile: l, importSpecFromUrl: c } = r.store;
16
- return t.afterEach((o, i) => {
17
- var p;
18
- e.telemetry && ((p = s) == null || p.capture("page-view", {
15
+ }), { importSpecFile: m, importSpecFromUrl: l } = r.store;
16
+ return t.afterEach((o, c) => {
17
+ e.telemetry && i?.capture("page-view", {
19
18
  hostname: window.location.hostname,
20
19
  to: o.path,
21
20
  // capture path excluding query params
22
- from: i.path
23
- })), y(o);
24
- }), e.url ? await c(e.url, "default", {
21
+ from: c.path
22
+ }), f(o);
23
+ }), e.url ? await l(e.url, "default", {
25
24
  proxyUrl: e.proxyUrl
26
- }) : e.content && await l(e.content, "default"), r;
25
+ }) : e.content && await m(e.content, "default"), r;
27
26
  };
28
27
  export {
29
- A as createApiClientWeb
28
+ x as createApiClientWeb
30
29
  };
@@ -1,5 +1,5 @@
1
1
  import { default as i } from "./ApiClientWeb.vue.js";
2
- import "./ApiClientWeb.vue2.js";
2
+ /* empty css */
3
3
  import { createApiClientWeb as p } from "./create-api-client-web.js";
4
4
  export {
5
5
  i as ApiClientWeb,