@scalar/api-client 2.5.31 → 2.5.33
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.
- package/CHANGELOG.md +33 -0
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +120 -128
- package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +57 -63
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +143 -150
- package/dist/components/CodeInput/codeVariableWidget.js +70 -75
- package/dist/components/CommandPalette/CommandActionInput.vue.js +17 -19
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -27
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +53 -55
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +129 -133
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +84 -98
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +64 -74
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -11
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +164 -183
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +4 -4
- package/dist/components/DataTable/DataTableInput.vue2.js +31 -31
- package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -2
- package/dist/components/EmptyState.vue.js +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +75 -84
- package/dist/components/Form/LabelInput.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue2.js +11 -11
- package/dist/components/ImportCollection/DropEventListener.vue.js +42 -44
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -23
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +141 -149
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +22 -23
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +12 -13
- package/dist/components/ImportCollection/PasteEventListener.vue.js +11 -12
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +69 -76
- package/dist/components/ImportCollection/utils/get-openapi-version.js +8 -8
- package/dist/components/ImportCollection/utils/import-collection.js +14 -14
- package/dist/components/OpenApiClientButton.vue.js +1 -1
- package/dist/components/OpenApiClientButton.vue2.js +10 -10
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +19 -22
- package/dist/components/Search/useSearch.js +51 -61
- package/dist/components/SectionFilter.vue.js +1 -1
- package/dist/components/SectionFilter.vue2.js +26 -29
- package/dist/components/Server/ServerDropdown.vue.js +70 -96
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +57 -67
- package/dist/components/Server/ServerSelector.vue.js +44 -55
- package/dist/components/Server/ServerVariablesForm.vue.js +36 -42
- package/dist/components/Server/ServerVariablesSelect.vue.js +6 -6
- package/dist/components/SideNav/DownloadAppButton.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue.js +68 -74
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue.js +107 -122
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/hooks/useFileDialog.js +12 -12
- package/dist/hooks/useResponseBody.js +14 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/layouts/App/ApiClientApp.vue.js +50 -56
- package/dist/layouts/App/ApiClientApp.vue3.js +1 -1
- package/dist/layouts/App/create-api-client-app.js +19 -20
- package/dist/layouts/App/index.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +18 -21
- package/dist/layouts/Web/ApiClientWeb.vue.js +45 -51
- package/dist/layouts/Web/ApiClientWeb.vue3.js +1 -1
- package/dist/layouts/Web/create-api-client-web.js +19 -20
- package/dist/layouts/Web/index.js +1 -1
- package/dist/libs/create-client.js +102 -109
- package/dist/libs/env-helpers.js +3 -3
- package/dist/libs/event-bus.js +15 -15
- package/dist/libs/extractAttachmentFilename.js +5 -6
- package/dist/libs/find-request.js +9 -10
- package/dist/libs/get-request-uid-by-path-method.js +12 -12
- package/dist/libs/getOpenApiDocumentDetails.js +7 -7
- package/dist/libs/importers/curl.js +3 -3
- package/dist/libs/normalize-headers.js +9 -10
- package/dist/libs/postman.js +15 -17
- package/dist/libs/send-request/build-request-security.js +9 -10
- package/dist/libs/send-request/create-fetch-body.js +11 -12
- package/dist/libs/send-request/create-fetch-query-params.js +13 -13
- package/dist/libs/send-request/create-request-operation.js +83 -84
- package/dist/libs/send-request/decode-buffer.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.js +12 -12
- package/dist/libs/string-template.js +21 -21
- package/dist/libs/validate-parameters.js +5 -8
- package/dist/plugins/plugin-manager.js +11 -17
- package/dist/store/active-entities.js +90 -117
- package/dist/store/collections.js +41 -42
- package/dist/store/import-spec.js +25 -26
- package/dist/store/request-example.js +20 -24
- package/dist/store/requests.js +63 -81
- package/dist/store/router-params.js +7 -7
- package/dist/store/security-schemes.js +35 -36
- package/dist/store/store.js +2 -2
- package/dist/store/tags.js +20 -21
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue2.js +21 -22
- package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue2.js +43 -47
- package/dist/views/Collection/CollectionEnvironment.vue.js +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue2.js +196 -207
- package/dist/views/Collection/CollectionInfoForm.vue.js +1 -1
- package/dist/views/Collection/CollectionInfoForm.vue2.js +34 -41
- package/dist/views/Collection/CollectionNavigation.vue.js +116 -125
- package/dist/views/Collection/CollectionOverview.vue2.js +22 -25
- package/dist/views/Collection/CollectionServerForm.vue.js +39 -45
- package/dist/views/Collection/CollectionServers.vue2.js +88 -98
- package/dist/views/Collection/CollectionSettings.vue.js +1 -1
- package/dist/views/Collection/CollectionSettings.vue2.js +101 -108
- package/dist/views/Collection/components/EnvironmentForm.vue.js +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +141 -145
- package/dist/views/Collection/components/MarkdownInput.vue.js +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue2.js +1 -2
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +15 -15
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +15 -16
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +61 -64
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +9 -10
- package/dist/views/Cookies/CookieModal.vue.js +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +90 -93
- package/dist/views/Environment/Environment.vue2.js +267 -295
- package/dist/views/Environment/EnvironmentModal.vue.js +63 -70
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -42
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +60 -67
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +78 -89
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +37 -44
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +44 -45
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -127
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +120 -139
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +97 -97
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +287 -310
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +86 -94
- package/dist/views/Request/RequestSection/RequestParams.vue.js +37 -38
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +36 -38
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +28 -31
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +49 -52
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +16 -16
- package/dist/views/Request/RequestSection/helpers/getting-started.js +7 -11
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +7 -8
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +199 -211
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +332 -349
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +210 -240
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +38 -41
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +58 -64
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -2
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +20 -23
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +29 -30
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +38 -41
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +28 -29
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +128 -140
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +116 -124
- package/dist/views/Request/consts/mediaTypes.js +2 -3
- package/dist/views/Request/handle-drag.js +24 -28
- package/dist/views/Request/hooks/useOpenApiWatcher.js +26 -33
- package/dist/views/Request/libs/auth.js +37 -43
- package/dist/views/Request/libs/oauth2.js +30 -32
- package/dist/views/Request/libs/watch-mode.js +100 -103
- package/dist/views/Settings/SettingsGeneral.vue.js +206 -236
- package/package.json +22 -22
- package/dist/components/AddressBar/AddressBar.vue3.js +0 -4
- package/dist/components/AddressBar/AddressBarHistory.vue3.js +0 -4
- package/dist/components/CodeInput/CodeInput.vue3.js +0 -4
- package/dist/components/CodeInput/CodeInput.vue4.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue3.js +0 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue3.js +0 -4
- package/dist/components/DataTable/DataTableInput.vue3.js +0 -4
- package/dist/components/EmptyState.vue3.js +0 -4
- package/dist/components/Form/LabelInput.vue3.js +0 -4
- package/dist/components/HttpMethod/HttpMethod.vue3.js +0 -4
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
- package/dist/components/OpenApiClientButton.vue3.js +0 -4
- package/dist/components/ScalarAsciiArt.vue3.js +0 -4
- package/dist/components/SectionFilter.vue3.js +0 -4
- package/dist/components/Server/ServerDropdownItem.vue3.js +0 -4
- package/dist/components/SideNav/DownloadAppButton.vue3.js +0 -4
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue3.js +0 -4
- package/dist/components/Sidebar/Sidebar.vue3.js +0 -4
- package/dist/components/Sidebar/SidebarListElement.vue3.js +0 -4
- package/dist/components/Sidebar/SidebarListElement.vue4.js +0 -4
- package/dist/components/TopNav/TopNavItem.vue3.js +0 -4
- package/dist/layouts/App/ApiClientApp.vue2.js +0 -4
- package/dist/layouts/Modal/ApiClientModal.vue3.js +0 -4
- package/dist/layouts/Web/ApiClientWeb.vue2.js +0 -4
- package/dist/style.css.js +0 -4
- package/dist/views/Collection/CollectionAuthentication.vue3.js +0 -4
- package/dist/views/Collection/CollectionEnvironment.vue3.js +0 -4
- package/dist/views/Collection/CollectionInfoForm.vue3.js +0 -4
- package/dist/views/Collection/CollectionSettings.vue3.js +0 -4
- package/dist/views/Collection/components/EnvironmentForm.vue3.js +0 -4
- package/dist/views/Collection/components/MarkdownInput.vue3.js +0 -4
- package/dist/views/Cookies/CookieModal.vue3.js +0 -4
- package/dist/views/Request/Request.vue3.js +0 -4
- package/dist/views/Request/RequestRoot.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestBody.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestCodeExample.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestTable.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue3.js +0 -4
- package/dist/views/Request/RequestSidebar.vue3.js +0 -4
- package/dist/views/Request/RequestSidebarItem.vue3.js +0 -4
- package/dist/views/Request/RequestSidebarItem.vue4.js +0 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue3.js +0 -4
- package/dist/views/Request/RequestSubpageHeader.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBody.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseSection.vue3.js +0 -4
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { extractFilename as
|
|
2
|
-
import { computed as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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:
|
|
13
|
+
type: r.value.toString()
|
|
16
14
|
})
|
|
17
15
|
) : "");
|
|
18
|
-
return { mimeType:
|
|
16
|
+
return { mimeType: r, attachmentFilename: l, dataUrl: s };
|
|
19
17
|
}
|
|
20
18
|
export {
|
|
21
|
-
|
|
19
|
+
R as useResponseBody
|
|
22
20
|
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import { addScalarClassesToHeadless as
|
|
3
|
-
import { getThemeStyles as
|
|
4
|
-
import { useBreakpoints as
|
|
5
|
-
import { useColorMode as
|
|
6
|
-
import { ScalarToasts as
|
|
7
|
-
import { RouterView as
|
|
8
|
-
import
|
|
9
|
-
import { useSidebar as
|
|
10
|
-
import
|
|
11
|
-
import { useActiveEntities as
|
|
12
|
-
import { APP_HOTKEYS as
|
|
13
|
-
import { handleHotKeyDown as
|
|
14
|
-
import { useWorkspace as
|
|
15
|
-
const
|
|
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
|
-
},
|
|
18
|
+
}, F = ["innerHTML"], se = /* @__PURE__ */ T({
|
|
19
19
|
__name: "ApiClientApp",
|
|
20
20
|
emits: ["newTab"],
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
21
|
+
setup(I) {
|
|
22
|
+
const p = { ...U, ...g }, i = y(null), u = (e) => {
|
|
23
23
|
i.value = e;
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
const { activeWorkspace: a } =
|
|
27
|
-
|
|
28
|
-
const l = (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
|
-
|
|
31
|
+
K(() => {
|
|
32
32
|
window.addEventListener("keydown", l), o.hotKeys.on(c);
|
|
33
|
-
}),
|
|
33
|
+
}), C(() => {
|
|
34
34
|
window.removeEventListener("keydown", l), o.hotKeys.off(c);
|
|
35
35
|
});
|
|
36
|
-
const { mediaQueries:
|
|
37
|
-
|
|
36
|
+
const { mediaQueries: f } = D(), { setSidebarOpen: _ } = V();
|
|
37
|
+
S(f.xl, _, {
|
|
38
38
|
immediate: !0
|
|
39
39
|
});
|
|
40
|
-
const
|
|
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,
|
|
47
|
-
default: m(() =>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
69
|
+
se as default
|
|
76
70
|
};
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import { analytics as
|
|
2
|
-
import { createWebHistoryRouter as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { saveActiveWorkspace as
|
|
6
|
-
import { createApiClient as
|
|
7
|
-
const
|
|
8
|
-
const r =
|
|
9
|
-
el:
|
|
10
|
-
appComponent:
|
|
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:
|
|
12
|
+
mountOnInitialize: a,
|
|
13
13
|
router: e,
|
|
14
14
|
layout: "desktop"
|
|
15
|
-
}), { importSpecFile:
|
|
16
|
-
return e.afterEach((p,
|
|
17
|
-
|
|
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:
|
|
23
|
-
})
|
|
24
|
-
}), t.url ? await
|
|
21
|
+
from: i.path
|
|
22
|
+
}), f(p);
|
|
23
|
+
}), t.url ? await l(t.url, "default", {
|
|
25
24
|
proxyUrl: t.proxyUrl
|
|
26
|
-
}) : t.content && await
|
|
25
|
+
}) : t.content && await m(t.content, "default"), r;
|
|
27
26
|
};
|
|
28
27
|
export {
|
|
29
|
-
|
|
28
|
+
C as createApiClientApp
|
|
30
29
|
};
|
|
@@ -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
|
|
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:
|
|
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: `#${
|
|
14
|
-
}),
|
|
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",
|
|
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
|
|
25
|
-
return k(() =>
|
|
26
|
-
document.documentElement.style.removeProperty("overflow"),
|
|
27
|
-
}), (e,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
id:
|
|
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:
|
|
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(
|
|
36
|
+
d(t(B), null, {
|
|
40
37
|
default: K(() => [
|
|
41
|
-
d(
|
|
38
|
+
d(t(S), { key: "$route.fullPath" })
|
|
42
39
|
]),
|
|
43
40
|
_: 1
|
|
44
41
|
})
|
|
45
42
|
], 8, g),
|
|
46
|
-
|
|
43
|
+
n("div", {
|
|
47
44
|
class: "scalar-app-exit",
|
|
48
|
-
onClick:
|
|
45
|
+
onClick: i[0] || (i[0] = (I) => t(o).hide())
|
|
49
46
|
})
|
|
50
47
|
])
|
|
51
48
|
], 512)), [
|
|
52
|
-
[F,
|
|
49
|
+
[F, t(o).open]
|
|
53
50
|
]);
|
|
54
51
|
}
|
|
55
52
|
});
|
|
@@ -1,63 +1,57 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { addScalarClassesToHeadless as
|
|
3
|
-
import { getThemeStyles as
|
|
4
|
-
import { useBreakpoints as
|
|
5
|
-
import { useColorMode as
|
|
6
|
-
import { ScalarToasts as
|
|
7
|
-
import { RouterView as
|
|
8
|
-
import { useSidebar as
|
|
9
|
-
import
|
|
10
|
-
import { useActiveEntities as
|
|
11
|
-
import
|
|
12
|
-
import { useWorkspace as
|
|
13
|
-
import { handleHotKeyDown as
|
|
14
|
-
const
|
|
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(
|
|
17
|
-
|
|
18
|
-
const { activeWorkspace: a } =
|
|
19
|
-
|
|
20
|
-
const s = (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
|
-
|
|
23
|
+
y(() => {
|
|
24
24
|
window.addEventListener("keydown", s), t.hotKeys.on(l);
|
|
25
|
-
}),
|
|
25
|
+
}), h(() => {
|
|
26
26
|
window.removeEventListener("keydown", s), t.hotKeys.off(l);
|
|
27
27
|
});
|
|
28
|
-
const { mediaQueries:
|
|
29
|
-
|
|
28
|
+
const { mediaQueries: d } = M(), { setSidebarOpen: u } = L();
|
|
29
|
+
v(d.xl, u, {
|
|
30
30
|
immediate: !0
|
|
31
31
|
});
|
|
32
|
-
const
|
|
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,
|
|
35
|
+
return (e, g) => (r(), n(o(B), null, {
|
|
39
36
|
default: m(() => [
|
|
40
|
-
i(o(
|
|
41
|
-
default: m(() =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
63
|
+
Z as default
|
|
70
64
|
};
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import { analytics as
|
|
2
|
-
import { createWebHistoryRouter as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { saveActiveWorkspace as
|
|
6
|
-
import { createApiClient as
|
|
7
|
-
const
|
|
8
|
-
const t =
|
|
9
|
-
el:
|
|
10
|
-
appComponent:
|
|
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:
|
|
12
|
+
mountOnInitialize: a,
|
|
13
13
|
router: t,
|
|
14
14
|
layout: "web"
|
|
15
|
-
}), { importSpecFile:
|
|
16
|
-
return t.afterEach((o,
|
|
17
|
-
|
|
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:
|
|
23
|
-
})
|
|
24
|
-
}), e.url ? await
|
|
21
|
+
from: c.path
|
|
22
|
+
}), f(o);
|
|
23
|
+
}), e.url ? await l(e.url, "default", {
|
|
25
24
|
proxyUrl: e.proxyUrl
|
|
26
|
-
}) : e.content && await
|
|
25
|
+
}) : e.content && await m(e.content, "default"), r;
|
|
27
26
|
};
|
|
28
27
|
export {
|
|
29
|
-
|
|
28
|
+
x as createApiClientWeb
|
|
30
29
|
};
|