@scalar/api-client 2.1.52 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +35 -42
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +25 -24
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +32 -39
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +10 -15
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +48 -47
- package/dist/components/CodeInput/codeVariableWidget.d.ts +3 -2
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +15 -14
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +18 -23
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +27 -26
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +19 -20
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +19 -24
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +23 -22
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +47 -46
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -28
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +127 -96
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +20 -19
- package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue2.js +20 -19
- package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/useLayout.d.ts +2 -0
- package/dist/hooks/useLayout.d.ts.map +1 -1
- package/dist/hooks/useLayout.js +4 -3
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +38 -37
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/layouts/App/MainLayout.vue.js +3 -3
- package/dist/layouts/App/create-api-client-app.d.ts +669 -1232
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1382 -2508
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +34 -33
- package/dist/layouts/Web/create-api-client-web.d.ts +669 -1232
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +673 -1236
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +91 -102
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request.d.ts +2 -3
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +127 -123
- package/dist/store/active-entities.d.ts +333 -0
- package/dist/store/active-entities.d.ts.map +1 -0
- package/dist/store/active-entities.js +97 -0
- package/dist/store/collections.d.ts +4 -274
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/import-spec.d.ts +0 -54
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/index.js +4 -3
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +15 -15
- package/dist/store/security-schemes.d.ts +527 -317
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +33 -41
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store-context.d.ts +0 -3
- package/dist/store/store-context.d.ts.map +1 -1
- package/dist/store/store.d.ts +640 -5297
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +111 -189
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +14 -24
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -13
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieRaw.vue.js +14 -13
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +92 -92
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +94 -100
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +29 -28
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +19 -18
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +72 -73
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +111 -109
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +15 -16
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +23 -22
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
- package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.js +16 -8
- package/dist/views/Request/handle-drag.d.ts +2 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +23 -25
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
- package/dist/views/Request/libs/auth.d.ts +1 -29
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +2 -9
- package/dist/views/Request/libs/index.js +6 -8
- package/dist/views/Request/libs/live-sync.d.ts +6 -5
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +164 -185
- package/dist/views/Request/libs/oauth2.d.ts +6 -10
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +54 -69
- package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +14 -13
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +18 -17
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
- package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
- package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
- package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
- package/package.json +8 -8
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useUrlPrefetcher as
|
|
8
|
-
import { getOpenApiDocumentVersion as
|
|
9
|
-
import { isDocument as
|
|
1
|
+
import { defineComponent as F, ref as B, computed as l, watch as x, onMounted as q, onUnmounted as H, openBlock as c, createBlock as R, unref as r, withCtx as W, createElementBlock as a, createCommentVNode as p, createElementVNode as e, normalizeClass as K, Fragment as y, createVNode as d, toDisplayString as G, createTextVNode as I } from "vue";
|
|
2
|
+
import J from "../CommandPalette/WatchModeToggle.vue.js";
|
|
3
|
+
import Q from "./ImportNowButton.vue.js";
|
|
4
|
+
import X from "./IntegrationLogo.vue.js";
|
|
5
|
+
import Y from "./PrefetchError.vue.js";
|
|
6
|
+
import Z from "./WorkspaceSelector.vue.js";
|
|
7
|
+
import { useUrlPrefetcher as ee } from "./hooks/useUrlPrefetcher.js";
|
|
8
|
+
import { getOpenApiDocumentVersion as L } from "./utils/getOpenApiDocumentVersion.js";
|
|
9
|
+
import { isDocument as M } from "./utils/isDocument.js";
|
|
10
10
|
import { isUrl as A } from "./utils/isUrl.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
11
|
+
import { useActiveEntities as te } from "../../store/active-entities.js";
|
|
12
|
+
import { useModal as oe, ScalarModal as se, ScalarIcon as ne } from "@scalar/components";
|
|
13
|
+
import { isLocalUrl as ie } from "@scalar/oas-utils/helpers";
|
|
14
|
+
import { normalize as re } from "@scalar/openapi-parser";
|
|
15
|
+
import { getThemeStyles as le } from "@scalar/themes";
|
|
16
|
+
import { useWorkspace as ce } from "../../store/store.js";
|
|
17
|
+
const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden relative md:px-0" }, me = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "flex justify-center items-center mb-2 p-1"
|
|
20
|
+
}, ue = { class: "rounded-xl size-10" }, pe = { class: "text-center text-md font-bold mb-2 line-clamp-1" }, fe = { class: "inline-flex flex-col gap-2 items-center z-10 w-full" }, ve = { class: "flex justify-center" }, he = { class: "inline-flex py-1 px-4 items-center text-xs font-medium text-c-3" }, xe = {
|
|
16
21
|
key: 0,
|
|
17
22
|
class: "text-sm overflow-hidden mt-5 pt-4 border-t-1/2"
|
|
18
|
-
},
|
|
23
|
+
}, ye = { class: "flex items-center justify-center" }, _e = { class: "flex flex-col justify-center items-center pb-8" }, be = { class: "text-center flex items-center flex-col" }, ge = { class: "mb-2 w-10 h-10 border rounded-[10px] flex items-center justify-center" }, we = {
|
|
19
24
|
href: "https://scalar.com/download",
|
|
20
25
|
target: "_blank"
|
|
21
|
-
},
|
|
26
|
+
}, $e = /* @__PURE__ */ F({
|
|
22
27
|
__name: "ImportCollectionModal",
|
|
23
28
|
props: {
|
|
24
29
|
source: {},
|
|
@@ -26,129 +31,155 @@ const oe = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden
|
|
|
26
31
|
eventType: {}
|
|
27
32
|
},
|
|
28
33
|
emits: ["importFinished"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
const
|
|
34
|
+
setup(T, { emit: U }) {
|
|
35
|
+
const o = T, P = U, { activeWorkspace: m } = te(), { workspaceMutators: C, events: D } = ce(), { prefetchResult: n, prefetchUrl: _, resetPrefetchResult: V } = ee(), i = oe(), f = B(!0);
|
|
36
|
+
D.hotKeys.on(() => i.hide());
|
|
37
|
+
const S = l(() => {
|
|
33
38
|
try {
|
|
34
|
-
return
|
|
35
|
-
|
|
39
|
+
return re(
|
|
40
|
+
n.content || o.source || ""
|
|
36
41
|
);
|
|
37
42
|
} catch {
|
|
38
43
|
return;
|
|
39
44
|
}
|
|
40
|
-
}),
|
|
41
|
-
var
|
|
42
|
-
return (
|
|
45
|
+
}), j = l(() => {
|
|
46
|
+
var s, t;
|
|
47
|
+
return (t = (s = S.value) == null ? void 0 : s.info) == null ? void 0 : t.title;
|
|
43
48
|
}), b = l(
|
|
44
|
-
() =>
|
|
49
|
+
() => L(n.content || o.source || "")
|
|
45
50
|
);
|
|
46
|
-
|
|
47
|
-
() =>
|
|
48
|
-
async (
|
|
49
|
-
if (
|
|
50
|
-
if (
|
|
51
|
-
const { error:
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
x(
|
|
52
|
+
() => o.source,
|
|
53
|
+
async (s) => {
|
|
54
|
+
if (V(), A(s)) {
|
|
55
|
+
if (o.eventType && ["paste", "drop"].includes(o.eventType)) {
|
|
56
|
+
const { error: u } = await _(
|
|
57
|
+
s,
|
|
58
|
+
m.value.proxyUrl
|
|
54
59
|
);
|
|
55
|
-
|
|
60
|
+
u ? i.hide() : i.show();
|
|
56
61
|
return;
|
|
57
62
|
}
|
|
58
|
-
|
|
63
|
+
_(s, m.value.proxyUrl), i.show();
|
|
59
64
|
return;
|
|
60
65
|
}
|
|
61
|
-
|
|
66
|
+
s && M(s) && L(s) ? i.show() : i.hide();
|
|
62
67
|
}
|
|
63
68
|
);
|
|
64
|
-
const
|
|
65
|
-
document.body.classList.remove("has-no-import-url"), (
|
|
66
|
-
},
|
|
69
|
+
const z = l(() => !!o.source && A(o.source)), N = l(() => !!o.source && M(o.source)), v = l(() => n.url && ie(n.url)), h = (s) => {
|
|
70
|
+
document.body.classList.remove("has-no-import-url"), (z.value || N.value) && i.open ? document.body.classList.add("has-import-url") : document.body.classList.remove("has-import-url");
|
|
71
|
+
}, O = () => {
|
|
67
72
|
document.body.classList.remove("has-import-url"), document.body.classList.add("has-no-import-url");
|
|
68
73
|
};
|
|
69
|
-
|
|
70
|
-
() =>
|
|
71
|
-
(
|
|
72
|
-
|
|
74
|
+
x(
|
|
75
|
+
() => i.open,
|
|
76
|
+
(s) => {
|
|
77
|
+
s ? h() : O();
|
|
73
78
|
}
|
|
74
|
-
),
|
|
75
|
-
() =>
|
|
79
|
+
), x(
|
|
80
|
+
() => o.source,
|
|
76
81
|
() => {
|
|
77
|
-
|
|
82
|
+
h();
|
|
78
83
|
}
|
|
79
|
-
),
|
|
80
|
-
|
|
81
|
-
}),
|
|
84
|
+
), q(() => {
|
|
85
|
+
h();
|
|
86
|
+
}), H(() => {
|
|
82
87
|
document.body.classList.remove("has-import-url"), document.body.classList.remove("has-no-import-url");
|
|
83
|
-
})
|
|
88
|
+
});
|
|
89
|
+
const g = l(
|
|
90
|
+
() => m.value && v.value && o.integration && `<style>${le(o.integration)}</style>`
|
|
91
|
+
);
|
|
92
|
+
function $() {
|
|
93
|
+
v.value && o.integration && C.edit(
|
|
94
|
+
m.value.uid,
|
|
95
|
+
"themeId",
|
|
96
|
+
o.integration
|
|
97
|
+
), P("importFinished");
|
|
98
|
+
}
|
|
99
|
+
return (s, t) => (c(), R(r(se), {
|
|
84
100
|
size: "full",
|
|
85
|
-
state: i
|
|
101
|
+
state: r(i)
|
|
86
102
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
var
|
|
103
|
+
default: W(() => {
|
|
104
|
+
var u, w, k;
|
|
89
105
|
return [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
106
|
+
g.value ? (c(), a("div", {
|
|
107
|
+
key: 0,
|
|
108
|
+
innerHTML: g.value
|
|
109
|
+
}, null, 8, ae)) : p("", !0),
|
|
110
|
+
e("div", de, [
|
|
111
|
+
t[6] || (t[6] = e("div", { class: "section-flare" }, [
|
|
112
|
+
e("div", { class: "section-flare-item" }),
|
|
113
|
+
e("div", { class: "section-flare-item" }),
|
|
114
|
+
e("div", { class: "section-flare-item" }),
|
|
115
|
+
e("div", { class: "section-flare-item" }),
|
|
116
|
+
e("div", { class: "section-flare-item" }),
|
|
117
|
+
e("div", { class: "section-flare-item" }),
|
|
118
|
+
e("div", { class: "section-flare-item" }),
|
|
119
|
+
e("div", { class: "section-flare-item" })
|
|
120
|
+
], -1)),
|
|
121
|
+
e("div", {
|
|
122
|
+
class: K(["flex items-center flex-col m-auto px-8 py-8 rounded-xl border-1/2 max-w-[380px] w-full transition-opacity", { "opacity-0": r(n).state === "loading" }])
|
|
93
123
|
}, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
url: ((
|
|
124
|
+
r(n).error && r(n).state === "idle" && !b.value ? (c(), a(y, { key: 0 }, [
|
|
125
|
+
t[1] || (t[1] = e("div", { class: "text-center text-md font-bold mb-2 line-clamp-1" }, " No OpenAPI document found ", -1)),
|
|
126
|
+
d(Y, {
|
|
127
|
+
url: ((u = r(n)) == null ? void 0 : u.input) || o.source
|
|
98
128
|
}, null, 8, ["url"])
|
|
99
|
-
], 64)) : (c(),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
e
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
129
|
+
], 64)) : (c(), a(y, { key: 1 }, [
|
|
130
|
+
v.value ? (c(), a("div", me, [
|
|
131
|
+
e("div", ue, [
|
|
132
|
+
d(X, { integration: s.integration }, null, 8, ["integration"])
|
|
133
|
+
])
|
|
134
|
+
])) : p("", !0),
|
|
135
|
+
e("div", pe, G(j.value || "Untitled Collection"), 1),
|
|
136
|
+
t[4] || (t[4] = e("div", { class: "text-c-1 text-sm font-medium text-center text-balance" }, " Import the OpenAPI document to instantly send API requests. No signup required. ", -1)),
|
|
137
|
+
b.value ? (c(), a(y, { key: 1 }, [
|
|
138
|
+
e("div", fe, [
|
|
139
|
+
d(Q, {
|
|
140
|
+
source: ((w = r(n)) == null ? void 0 : w.url) ?? s.source,
|
|
110
141
|
variant: "button",
|
|
111
|
-
watchMode:
|
|
112
|
-
onImportFinished:
|
|
142
|
+
watchMode: f.value,
|
|
143
|
+
onImportFinished: $
|
|
113
144
|
}, null, 8, ["source", "watchMode"])
|
|
114
145
|
]),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
146
|
+
e("div", ve, [
|
|
147
|
+
e("div", he, [
|
|
148
|
+
t[2] || (t[2] = I(" Import to: ")),
|
|
149
|
+
d(Z)
|
|
119
150
|
])
|
|
120
151
|
]),
|
|
121
|
-
(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
modelValue:
|
|
125
|
-
"onUpdate:modelValue":
|
|
152
|
+
(k = r(n)) != null && k.url ? (c(), a("div", xe, [
|
|
153
|
+
e("div", ye, [
|
|
154
|
+
d(J, {
|
|
155
|
+
modelValue: f.value,
|
|
156
|
+
"onUpdate:modelValue": t[0] || (t[0] = (E) => f.value = E),
|
|
126
157
|
disableToolTip: !0
|
|
127
158
|
}, null, 8, ["modelValue"])
|
|
128
159
|
]),
|
|
129
|
-
|
|
130
|
-
])) :
|
|
131
|
-
], 64)) :
|
|
160
|
+
t[3] || (t[3] = e("div", { class: "pt-0 text-center text-balance font-medium text-xs text-c-3" }, " Automatically update your API client when the OpenAPI document content changes. ", -1))
|
|
161
|
+
])) : p("", !0)
|
|
162
|
+
], 64)) : p("", !0)
|
|
132
163
|
], 64))
|
|
133
164
|
], 2),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
165
|
+
e("div", _e, [
|
|
166
|
+
e("div", be, [
|
|
167
|
+
e("div", ge, [
|
|
168
|
+
e("a", we, [
|
|
169
|
+
d(r(ne), {
|
|
139
170
|
icon: "Logo",
|
|
140
171
|
size: "xl"
|
|
141
172
|
})
|
|
142
173
|
])
|
|
143
174
|
]),
|
|
144
|
-
|
|
145
|
-
|
|
175
|
+
t[5] || (t[5] = e("span", { class: "text-c-2 leading-snug text-sm font-medium" }, [
|
|
176
|
+
e("a", {
|
|
146
177
|
class: "hover:text-c-1 underline-offset-2 mb-1 inline-block",
|
|
147
178
|
href: "https://scalar.com/download",
|
|
148
179
|
target: "_blank"
|
|
149
180
|
}, " Download Desktop App "),
|
|
150
|
-
|
|
151
|
-
|
|
181
|
+
e("br"),
|
|
182
|
+
I(" free · open-source · offline first ")
|
|
152
183
|
], -1))
|
|
153
184
|
])
|
|
154
185
|
])
|
|
@@ -160,5 +191,5 @@ const oe = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden
|
|
|
160
191
|
}
|
|
161
192
|
});
|
|
162
193
|
export {
|
|
163
|
-
|
|
194
|
+
$e as default
|
|
164
195
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportNowButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportNowButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImportNowButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportNowButton.vue"],"names":[],"mappings":"AAkHA,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;AA+KF,wBAOG"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, openBlock as s, createElementBlock as C, Fragment as x, createBlock as a, unref as p, withCtx as m, createTextVNode as c, createCommentVNode as b } from "vue";
|
|
2
2
|
import { isUrl as g } from "./utils/isUrl.js";
|
|
3
|
+
import { useActiveEntities as B } from "../../store/active-entities.js";
|
|
3
4
|
import { ScalarButton as l } from "@scalar/components";
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
const
|
|
5
|
+
import { useToasts as F } from "@scalar/use-toasts";
|
|
6
|
+
import { useRouter as I } from "vue-router";
|
|
7
|
+
import { useWorkspace as q } from "../../store/store.js";
|
|
8
|
+
const R = /* @__PURE__ */ v({
|
|
8
9
|
__name: "ImportNowButton",
|
|
9
10
|
props: {
|
|
10
11
|
source: {},
|
|
@@ -13,12 +14,12 @@ const z = /* @__PURE__ */ C({
|
|
|
13
14
|
},
|
|
14
15
|
emits: ["importFinished"],
|
|
15
16
|
setup(f, { emit: d }) {
|
|
16
|
-
const o = f, y = d, k =
|
|
17
|
-
async function
|
|
17
|
+
const o = f, y = d, k = I(), { activeWorkspace: r } = B(), { importSpecFromUrl: w, importSpecFile: h } = q(), { toast: i } = F();
|
|
18
|
+
async function n() {
|
|
18
19
|
try {
|
|
19
20
|
if (o.source) {
|
|
20
21
|
if (g(o.source)) {
|
|
21
|
-
const [
|
|
22
|
+
const [t, e] = await w(
|
|
22
23
|
o.source,
|
|
23
24
|
r.value.uid,
|
|
24
25
|
{
|
|
@@ -26,52 +27,52 @@ const z = /* @__PURE__ */ C({
|
|
|
26
27
|
watchMode: o.watchMode
|
|
27
28
|
}
|
|
28
29
|
);
|
|
29
|
-
|
|
30
|
+
t || u(e);
|
|
30
31
|
} else {
|
|
31
|
-
const
|
|
32
|
+
const t = await h(
|
|
32
33
|
o.source,
|
|
33
34
|
r.value.uid
|
|
34
35
|
);
|
|
35
|
-
|
|
36
|
+
u(t);
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
+
i("Import successful", "info"), y("importFinished");
|
|
38
39
|
}
|
|
39
|
-
} catch (
|
|
40
|
-
console.error("[importCollection]",
|
|
41
|
-
const
|
|
42
|
-
|
|
40
|
+
} catch (t) {
|
|
41
|
+
console.error("[importCollection]", t);
|
|
42
|
+
const e = (t == null ? void 0 : t.message) || "Unknown error";
|
|
43
|
+
i(`Import failed: ${e}`, "error");
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
46
|
+
function u(t) {
|
|
47
|
+
t && k.push({
|
|
47
48
|
name: "request",
|
|
48
49
|
params: {
|
|
49
50
|
workspace: r.value.uid,
|
|
50
|
-
request:
|
|
51
|
+
request: t == null ? void 0 : t.requests[0]
|
|
51
52
|
}
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
|
-
return (
|
|
55
|
-
|
|
55
|
+
return (t, e) => t.source ? (s(), C(x, { key: 0 }, [
|
|
56
|
+
t.variant === "button" ? (s(), a(p(l), {
|
|
56
57
|
key: 0,
|
|
57
58
|
class: "py-2.5 px-6 rounded-lg font-bold h-fit mt-3 w-full",
|
|
58
59
|
size: "md",
|
|
59
60
|
type: "button",
|
|
60
|
-
onClick:
|
|
61
|
+
onClick: n
|
|
61
62
|
}, {
|
|
62
|
-
default: m(() =>
|
|
63
|
+
default: m(() => e[0] || (e[0] = [
|
|
63
64
|
c(" Import Collection ")
|
|
64
65
|
])),
|
|
65
66
|
_: 1
|
|
66
|
-
})) : (s(),
|
|
67
|
+
})) : (s(), a(p(l), {
|
|
67
68
|
key: 1,
|
|
68
69
|
class: "text-[21px] py-2.5 px-6 rounded-lg font-bold h-fit",
|
|
69
70
|
size: "md",
|
|
70
71
|
type: "button",
|
|
71
72
|
variant: "ghost",
|
|
72
|
-
onClick:
|
|
73
|
+
onClick: n
|
|
73
74
|
}, {
|
|
74
|
-
default: m(() =>
|
|
75
|
+
default: m(() => e[1] || (e[1] = [
|
|
75
76
|
c(" Try it in the browser ")
|
|
76
77
|
])),
|
|
77
78
|
_: 1
|
|
@@ -80,5 +81,5 @@ const z = /* @__PURE__ */ C({
|
|
|
80
81
|
}
|
|
81
82
|
});
|
|
82
83
|
export {
|
|
83
|
-
|
|
84
|
+
R as default
|
|
84
85
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
integration: string | null;
|
|
3
3
|
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {},
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=IntegrationLogo.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegrationLogo.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/IntegrationLogo.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IntegrationLogo.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/IntegrationLogo.vue"],"names":[],"mappings":"AA6DA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B,CAAC;;AAuGF,wBAOG"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as i, computed as l, openBlock as p,
|
|
1
|
+
import { defineComponent as i, computed as l, openBlock as p, createBlock as u, unref as f } from "vue";
|
|
2
2
|
import { ScalarIcon as g } from "@scalar/components";
|
|
3
|
-
const
|
|
3
|
+
const I = /* @__PURE__ */ i({
|
|
4
4
|
__name: "IntegrationLogo",
|
|
5
5
|
props: {
|
|
6
6
|
integration: {}
|
|
7
7
|
},
|
|
8
8
|
setup(n) {
|
|
9
|
-
const
|
|
9
|
+
const a = n, r = [
|
|
10
10
|
"adonisjs",
|
|
11
11
|
"dotnet",
|
|
12
12
|
"elysiajs",
|
|
@@ -24,23 +24,19 @@ const _ = { class: "flex justify-center items-center mb-2 p-1" }, x = { class: "
|
|
|
24
24
|
"platformatic",
|
|
25
25
|
"react",
|
|
26
26
|
"rust"
|
|
27
|
-
],
|
|
28
|
-
var
|
|
29
|
-
const
|
|
30
|
-
if (!
|
|
31
|
-
const c =
|
|
32
|
-
return
|
|
27
|
+
], s = l(() => {
|
|
28
|
+
var e;
|
|
29
|
+
const o = "Openapi", t = (e = a.integration) == null ? void 0 : e.toLocaleLowerCase();
|
|
30
|
+
if (!t) return o;
|
|
31
|
+
const c = t.charAt(0).toUpperCase() + t.slice(1);
|
|
32
|
+
return r.includes(t) ? c : o;
|
|
33
33
|
});
|
|
34
|
-
return (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
logo: r.value
|
|
39
|
-
}, null, 8, ["logo"])
|
|
40
|
-
])
|
|
41
|
-
]));
|
|
34
|
+
return (o, t) => (p(), u(f(g), {
|
|
35
|
+
class: "w-full h-full rounded-lg",
|
|
36
|
+
logo: s.value
|
|
37
|
+
}, null, 8, ["logo"]));
|
|
42
38
|
}
|
|
43
39
|
});
|
|
44
40
|
export {
|
|
45
|
-
|
|
41
|
+
I as default
|
|
46
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";AA+bA,wBAKG"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { defineComponent as y, ref as W, openBlock as d, createElementBlock as x, Fragment as w, createElementVNode as t, createVNode as s, unref as e, withCtx as o, renderList as D, createBlock as N, withModifiers as k, normalizeClass as M, toDisplayString as h, withDirectives as z, vModelText as B, createTextVNode as V } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { useActiveEntities as j } from "../../store/active-entities.js";
|
|
3
|
+
import { useModal as E, ScalarDropdown as T, ScalarDropdownItem as v, ScalarIcon as m, ScalarDropdownDivider as $, ScalarButton as _, ScalarModal as A } from "@scalar/components";
|
|
3
4
|
import { useToasts as I } from "@scalar/use-toasts";
|
|
4
|
-
import { useRouter as
|
|
5
|
-
import { useWorkspace as
|
|
6
|
-
const
|
|
5
|
+
import { useRouter as F } from "vue-router";
|
|
6
|
+
import { useWorkspace as L } from "../../store/store.js";
|
|
7
|
+
const P = { class: "flex items-center text-sm w-[inherit]" }, R = { class: "font-medium m-0 text-sm flex gap-1 items-center" }, U = { class: "line-clamp-1 text-left w-[calc(100%-10px)] text-xs" }, q = { class: "text-ellipsis overflow-hidden" }, G = { class: "flex items-center justify-center h-4 w-4" }, ee = /* @__PURE__ */ y({
|
|
7
8
|
__name: "WorkspaceSelector",
|
|
8
|
-
setup(
|
|
9
|
-
const { activeWorkspace: i, workspaces: b, workspaceMutators: g } =
|
|
9
|
+
setup(H) {
|
|
10
|
+
const { activeWorkspace: i } = j(), { workspaces: b, workspaceMutators: g } = L(), { push: u } = F(), c = E(), { toast: f } = I(), r = W(""), C = (n) => {
|
|
10
11
|
n !== i.value.uid && u({
|
|
11
12
|
name: "workspace",
|
|
12
13
|
params: {
|
|
@@ -29,13 +30,13 @@ const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font
|
|
|
29
30
|
}), r.value = "", c.hide();
|
|
30
31
|
};
|
|
31
32
|
return (n, a) => (d(), x(w, null, [
|
|
32
|
-
t("div",
|
|
33
|
+
t("div", P, [
|
|
33
34
|
s(e(T), null, {
|
|
34
35
|
items: o(() => [
|
|
35
36
|
(d(!0), x(w, null, D(e(b), (l, p) => (d(), N(e(v), {
|
|
36
37
|
key: p,
|
|
37
38
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
38
|
-
onClick: k((
|
|
39
|
+
onClick: k((J) => C(p), ["stop"])
|
|
39
40
|
}, {
|
|
40
41
|
default: o(() => [
|
|
41
42
|
t("div", {
|
|
@@ -50,7 +51,7 @@ const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font
|
|
|
50
51
|
thickness: "3.5"
|
|
51
52
|
})
|
|
52
53
|
], 2),
|
|
53
|
-
t("span",
|
|
54
|
+
t("span", q, h(l.name), 1)
|
|
54
55
|
]),
|
|
55
56
|
_: 2
|
|
56
57
|
}, 1032, ["onClick"]))), 128)),
|
|
@@ -60,7 +61,7 @@ const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font
|
|
|
60
61
|
onClick: a[0] || (a[0] = (l) => e(c).show())
|
|
61
62
|
}, {
|
|
62
63
|
default: o(() => [
|
|
63
|
-
t("div",
|
|
64
|
+
t("div", G, [
|
|
64
65
|
s(e(m), {
|
|
65
66
|
class: "h-2.5",
|
|
66
67
|
icon: "Add",
|
|
@@ -79,8 +80,8 @@ const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font
|
|
|
79
80
|
variant: "ghost"
|
|
80
81
|
}, {
|
|
81
82
|
default: o(() => [
|
|
82
|
-
t("div",
|
|
83
|
-
t("h2",
|
|
83
|
+
t("div", R, [
|
|
84
|
+
t("h2", U, h(e(i).name), 1),
|
|
84
85
|
s(e(m), {
|
|
85
86
|
class: "size-3",
|
|
86
87
|
icon: "ChevronDown",
|
|
@@ -94,7 +95,7 @@ const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font
|
|
|
94
95
|
_: 1
|
|
95
96
|
})
|
|
96
97
|
]),
|
|
97
|
-
s(e(
|
|
98
|
+
s(e(A), {
|
|
98
99
|
bodyClass: "!m-0 !p-1",
|
|
99
100
|
size: "xxs",
|
|
100
101
|
state: e(c),
|
|
@@ -131,5 +132,5 @@ const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font
|
|
|
131
132
|
}
|
|
132
133
|
});
|
|
133
134
|
export {
|
|
134
|
-
|
|
135
|
+
ee as default
|
|
135
136
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAGA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAMd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;;;iCA6EsB,UAAU;eAlFrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;MA6E0C;sBA1CjC,IAAI;;;uCAKe,IAAI,GAAG,MAAM;;EAmExD"}
|