@scalar/api-client 2.1.34 → 2.1.36
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 +30 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +105 -119
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +14 -14
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +15 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +39 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue2.js +4 -0
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +1 -1
- package/dist/components/ContextBar.vue2.js +6 -6
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +53 -40
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +39 -33
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -20
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +2 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +159 -100
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +5 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +2 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +35 -31
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +7 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +46 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue2.js +4 -0
- package/dist/components/ImportCollection/PrefetchError.vue.d.ts +8 -0
- package/dist/components/ImportCollection/PrefetchError.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +2 -2
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +7 -7
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +2 -2
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +29 -12
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +34 -42
- package/dist/components/OpenApiClientButton.vue.d.ts +13 -0
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -0
- package/dist/components/OpenApiClientButton.vue.js +7 -0
- package/dist/components/OpenApiClientButton.vue2.js +36 -0
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +2 -2
- package/dist/components/SideNav/SideNav.vue2.js +8 -8
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +14 -14
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -2
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/layouts/App/MainLayout.vue.js +4 -4
- package/dist/layouts/App/create-api-client-app.d.ts +58 -41
- 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 +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +116 -82
- 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 +42 -38
- package/dist/layouts/Web/create-api-client-web.d.ts +58 -41
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +58 -41
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/store/collections.d.ts +34 -24
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts +6 -4
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/store.d.ts +116 -82
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue2.js +30 -31
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +21 -21
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +79 -71
- 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 +24 -24
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +8 -8
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -124
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +126 -0
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +29 -29
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +76 -76
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +47 -47
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +67 -42
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -99
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +104 -2
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +24 -24
- package/dist/views/Request/types/sidebar-item.d.ts +1 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -5
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
source?: string | null;
|
|
3
3
|
variant?: "button" | "link";
|
|
4
|
+
watchMode?: boolean;
|
|
4
5
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
6
|
importFinished: () => any;
|
|
6
7
|
}, string, import("vue").PublicProps, Readonly<{
|
|
7
8
|
source?: string | null;
|
|
8
9
|
variant?: "button" | "link";
|
|
10
|
+
watchMode?: boolean;
|
|
9
11
|
}> & Readonly<{
|
|
10
12
|
onImportFinished?: (() => any) | undefined;
|
|
11
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -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":";aA+GW,MAAM,GAAG,IAAI;cACZ,QAAQ,GAAG,MAAM;gBACf,OAAO;;;;aAFV,MAAM,GAAG,IAAI;cACZ,QAAQ,GAAG,MAAM;gBACf,OAAO;;;;AAkLrB,wBASG"}
|
|
@@ -1,72 +1,76 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isUrl as
|
|
1
|
+
import { defineComponent as C, openBlock as s, createElementBlock as v, Fragment as b, createBlock as u, unref as m, withCtx as p, createTextVNode as c, createCommentVNode as g } from "vue";
|
|
2
|
+
import { isUrl as x } from "./utils/isUrl.js";
|
|
3
3
|
import { ScalarButton as l } from "@scalar/components";
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { useRouter as
|
|
4
|
+
import { useToasts as B } from "@scalar/use-toasts";
|
|
5
|
+
import { useRouter as F } from "vue-router";
|
|
6
6
|
import { useWorkspace as I } from "../../store/store.js";
|
|
7
|
-
const
|
|
7
|
+
const z = /* @__PURE__ */ C({
|
|
8
8
|
__name: "ImportNowButton",
|
|
9
9
|
props: {
|
|
10
10
|
source: {},
|
|
11
|
-
variant: {}
|
|
11
|
+
variant: {},
|
|
12
|
+
watchMode: { type: Boolean }
|
|
12
13
|
},
|
|
13
14
|
emits: ["importFinished"],
|
|
14
15
|
setup(f, { emit: d }) {
|
|
15
|
-
const o = f, k = d,
|
|
16
|
-
async function
|
|
16
|
+
const o = f, k = d, w = F(), { importSpecFromUrl: y, importSpecFile: h, activeWorkspace: r } = I(), { toast: n } = B();
|
|
17
|
+
async function i() {
|
|
17
18
|
try {
|
|
18
19
|
if (o.source) {
|
|
19
|
-
if (
|
|
20
|
-
const [
|
|
20
|
+
if (x(o.source)) {
|
|
21
|
+
const [e, t] = await y(
|
|
21
22
|
o.source,
|
|
22
|
-
r.value.uid
|
|
23
|
+
r.value.uid,
|
|
24
|
+
{
|
|
25
|
+
watchMode: o.watchMode
|
|
26
|
+
}
|
|
23
27
|
);
|
|
24
|
-
|
|
28
|
+
e || a(t);
|
|
25
29
|
} else {
|
|
26
|
-
const
|
|
30
|
+
const e = await h(
|
|
27
31
|
o.source,
|
|
28
32
|
r.value.uid
|
|
29
33
|
);
|
|
30
|
-
|
|
34
|
+
a(e);
|
|
31
35
|
}
|
|
32
|
-
|
|
36
|
+
n("Import successful", "info"), k("importFinished");
|
|
33
37
|
}
|
|
34
|
-
} catch (
|
|
35
|
-
console.error("[importCollection]",
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
+
} catch (e) {
|
|
39
|
+
console.error("[importCollection]", e);
|
|
40
|
+
const t = (e == null ? void 0 : e.message) || "Unknown error";
|
|
41
|
+
n(`Import failed: ${t}`, "error");
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
44
|
+
function a(e) {
|
|
45
|
+
e && w.push({
|
|
42
46
|
name: "request",
|
|
43
47
|
params: {
|
|
44
48
|
workspace: r.value.uid,
|
|
45
|
-
request:
|
|
49
|
+
request: e == null ? void 0 : e.requests[0]
|
|
46
50
|
}
|
|
47
51
|
});
|
|
48
52
|
}
|
|
49
|
-
return (
|
|
50
|
-
|
|
53
|
+
return (e, t) => e.source ? (s(), v(b, { key: 0 }, [
|
|
54
|
+
e.variant === "button" ? (s(), u(m(l), {
|
|
51
55
|
key: 0,
|
|
52
|
-
class: "
|
|
56
|
+
class: "py-2.5 px-6 rounded-lg font-bold h-fit mt-3 w-full",
|
|
53
57
|
size: "md",
|
|
54
58
|
type: "button",
|
|
55
|
-
onClick:
|
|
59
|
+
onClick: i
|
|
56
60
|
}, {
|
|
57
|
-
default: p(() =>
|
|
61
|
+
default: p(() => t[0] || (t[0] = [
|
|
58
62
|
c(" Import Collection ")
|
|
59
63
|
])),
|
|
60
64
|
_: 1
|
|
61
|
-
})) : (s(), m(
|
|
65
|
+
})) : (s(), u(m(l), {
|
|
62
66
|
key: 1,
|
|
63
67
|
class: "text-[21px] py-2.5 px-6 rounded-lg font-bold h-fit",
|
|
64
68
|
size: "md",
|
|
65
69
|
type: "button",
|
|
66
70
|
variant: "ghost",
|
|
67
|
-
onClick:
|
|
71
|
+
onClick: i
|
|
68
72
|
}, {
|
|
69
|
-
default: p(() =>
|
|
73
|
+
default: p(() => t[1] || (t[1] = [
|
|
70
74
|
c(" Try it in the browser ")
|
|
71
75
|
])),
|
|
72
76
|
_: 1
|
|
@@ -75,5 +79,5 @@ const R = /* @__PURE__ */ b({
|
|
|
75
79
|
}
|
|
76
80
|
});
|
|
77
81
|
export {
|
|
78
|
-
|
|
82
|
+
z as default
|
|
79
83
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
integration: string | null;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
4
|
+
integration: string | null;
|
|
5
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=IntegrationLogo.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntegrationLogo.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/IntegrationLogo.vue"],"names":[],"mappings":";iBAkEe,MAAM,GAAG,IAAI;;iBAAb,MAAM,GAAG,IAAI;;AAqG5B,wBAMG"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineComponent as i, computed as l, openBlock as p, createElementBlock as d, createElementVNode as u, createVNode as f, unref as m } from "vue";
|
|
2
|
+
import { ScalarIcon as g } from "@scalar/components";
|
|
3
|
+
const _ = { class: "flex justify-center items-center mb-2 p-1" }, x = { class: "rounded-xl" }, j = /* @__PURE__ */ i({
|
|
4
|
+
__name: "IntegrationLogo",
|
|
5
|
+
props: {
|
|
6
|
+
integration: {}
|
|
7
|
+
},
|
|
8
|
+
setup(n) {
|
|
9
|
+
const s = n, a = [
|
|
10
|
+
"adonisjs",
|
|
11
|
+
"dotnet",
|
|
12
|
+
"elysiajs",
|
|
13
|
+
"express",
|
|
14
|
+
"fastapi",
|
|
15
|
+
"fastify",
|
|
16
|
+
"go",
|
|
17
|
+
"hono",
|
|
18
|
+
"laravel",
|
|
19
|
+
"litestar",
|
|
20
|
+
"nestjs",
|
|
21
|
+
"nextjs",
|
|
22
|
+
"nitro",
|
|
23
|
+
"nuxt",
|
|
24
|
+
"platformatic",
|
|
25
|
+
"react",
|
|
26
|
+
"rust"
|
|
27
|
+
], r = l(() => {
|
|
28
|
+
var o;
|
|
29
|
+
const t = "Openapi", e = (o = s.integration) == null ? void 0 : o.toLocaleLowerCase();
|
|
30
|
+
if (!e) return t;
|
|
31
|
+
const c = e.charAt(0).toUpperCase() + e.slice(1);
|
|
32
|
+
return a.includes(e) ? c : t;
|
|
33
|
+
});
|
|
34
|
+
return (t, e) => (p(), d("div", _, [
|
|
35
|
+
u("div", x, [
|
|
36
|
+
f(m(g), {
|
|
37
|
+
class: "size-10 rounded-lg",
|
|
38
|
+
logo: r.value
|
|
39
|
+
}, null, 8, ["logo"])
|
|
40
|
+
])
|
|
41
|
+
]));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
j as default
|
|
46
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PrefetchResult } from '../../components/ImportCollection/hooks/useUrlPrefetcher.js';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
prefetchResult: PrefetchResult;
|
|
4
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
5
|
+
prefetchResult: PrefetchResult;
|
|
6
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=PrefetchError.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrefetchError.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/PrefetchError.vue"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAA;;oBAOxE,cAAc;;oBAAd,cAAc;;AA2GhC,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
-
input: (
|
|
2
|
+
input: (url: string, integration: string | null) => any;
|
|
3
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onInput?: ((
|
|
4
|
+
onInput?: ((url: string, integration: string | null) => any) | undefined;
|
|
5
5
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=UrlQueryParameterChecker.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UrlQueryParameterChecker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/UrlQueryParameterChecker.vue"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"UrlQueryParameterChecker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/UrlQueryParameterChecker.vue"],"names":[],"mappings":";;;;;AAiFA,wBAQG"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as a, onMounted as o } from "vue";
|
|
2
|
-
const
|
|
2
|
+
const c = /* @__PURE__ */ a({
|
|
3
3
|
__name: "UrlQueryParameterChecker",
|
|
4
4
|
emits: ["input"],
|
|
5
|
-
setup(
|
|
6
|
-
const
|
|
5
|
+
setup(i, { emit: r }) {
|
|
6
|
+
const n = r;
|
|
7
7
|
return o(() => {
|
|
8
|
-
const e = new URLSearchParams(window.location.search).get("url");
|
|
9
|
-
|
|
10
|
-
}), (
|
|
8
|
+
const e = new URLSearchParams(window.location.search), t = e.get("url");
|
|
9
|
+
t && n("input", t, e.get("integration"));
|
|
10
|
+
}), (e, t) => null;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
c as default
|
|
15
15
|
};
|
|
@@ -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":";AAkeA,wBAKG"}
|
|
@@ -3,7 +3,7 @@ import { useModal as V, ScalarDropdown as j, ScalarDropdownItem as v, ScalarIcon
|
|
|
3
3
|
import { useToasts as I } from "@scalar/use-toasts";
|
|
4
4
|
import { useRouter as A } from "vue-router";
|
|
5
5
|
import { useWorkspace as F } from "../../store/store.js";
|
|
6
|
-
const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font-medium m-0 text-sm flex gap-1
|
|
6
|
+
const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font-medium m-0 text-sm flex gap-1 items-center" }, R = { class: "line-clamp-1 text-left w-[calc(100%-10px)] text-xs" }, U = { class: "text-ellipsis overflow-hidden" }, q = { class: "flex items-center justify-center h-4 w-4" }, Y = /* @__PURE__ */ y({
|
|
7
7
|
__name: "WorkspaceSelector",
|
|
8
8
|
setup(G) {
|
|
9
9
|
const { activeWorkspace: i, workspaces: b, workspaceMutators: g } = F(), { push: m } = A(), c = V(), { toast: f } = I(), a = D(""), C = (l) => {
|
|
@@ -64,7 +64,7 @@ const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font
|
|
|
64
64
|
]),
|
|
65
65
|
default: r(() => [
|
|
66
66
|
s(e(_), {
|
|
67
|
-
class: "font-normal h-full justify-start line-clamp-1 py-1
|
|
67
|
+
class: "font-normal h-full justify-start line-clamp-1 py-1 px-1.5 text-c-1 hover:bg-b-2 w-fit text-c-3",
|
|
68
68
|
fullWidth: "",
|
|
69
69
|
variant: "ghost"
|
|
70
70
|
}, {
|
|
@@ -1,28 +1,45 @@
|
|
|
1
|
+
export type PrefetchResult = {
|
|
2
|
+
state: 'idle' | 'loading';
|
|
3
|
+
content: string | null;
|
|
4
|
+
url: string | null;
|
|
5
|
+
error: string | null;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Core logic for fetching and processing a URL
|
|
9
|
+
*/
|
|
10
|
+
export declare function createUrlPrefetcher(): {
|
|
11
|
+
prefetchUrl: (value: string | null, proxy?: string) => Promise<{
|
|
12
|
+
state: string;
|
|
13
|
+
content: string;
|
|
14
|
+
url: string;
|
|
15
|
+
error: null;
|
|
16
|
+
} | {
|
|
17
|
+
state: string;
|
|
18
|
+
content: null;
|
|
19
|
+
url: null;
|
|
20
|
+
error: any;
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
1
23
|
/**
|
|
2
|
-
*
|
|
24
|
+
* Vue composable for URL prefetching
|
|
3
25
|
*/
|
|
4
26
|
export declare function useUrlPrefetcher(): {
|
|
5
27
|
prefetchResult: {
|
|
6
28
|
state: "idle" | "loading";
|
|
7
29
|
content: string | null;
|
|
30
|
+
url: string | null;
|
|
8
31
|
error: string | null;
|
|
9
32
|
};
|
|
10
|
-
prefetchUrl: (value: string | null, proxy?: string) => Promise<
|
|
11
|
-
state: "idle" | "loading";
|
|
12
|
-
content: string | null;
|
|
13
|
-
error: string | null;
|
|
14
|
-
} & {
|
|
33
|
+
prefetchUrl: (value: string | null, proxy?: string) => Promise<{
|
|
15
34
|
state: string;
|
|
16
35
|
content: string;
|
|
36
|
+
url: string;
|
|
17
37
|
error: null;
|
|
18
|
-
}
|
|
19
|
-
state: "idle" | "loading";
|
|
20
|
-
content: string | null;
|
|
21
|
-
error: string | null;
|
|
22
|
-
} & {
|
|
38
|
+
} | {
|
|
23
39
|
state: string;
|
|
24
40
|
content: null;
|
|
41
|
+
url: null;
|
|
25
42
|
error: any;
|
|
26
|
-
}
|
|
43
|
+
}>;
|
|
27
44
|
};
|
|
28
45
|
//# sourceMappingURL=useUrlPrefetcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,mBAAmB;yBACC,MAAM,GAAG,IAAI,UAAU,MAAM;;;;;;;;;;;EAgChE;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eA/CvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;aACjB,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;yBAuDX,MAAM,GAAG,IAAI,UACZ,MAAM;;;;;;;;;;;EAoBjB"}
|
|
@@ -1,55 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
function
|
|
5
|
-
|
|
1
|
+
import { fetchWithProxyFallback as s } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { reactive as o } from "vue";
|
|
3
|
+
function u() {
|
|
4
|
+
async function r(e, c) {
|
|
5
|
+
var n;
|
|
6
|
+
if (!e || typeof e != "string")
|
|
7
|
+
return { state: "idle", content: null, url: null, error: null };
|
|
8
|
+
try {
|
|
9
|
+
const t = await s(e, c);
|
|
10
|
+
return t.ok ? { state: "idle", content: await t.text(), url: e, error: null } : {
|
|
11
|
+
state: "idle",
|
|
12
|
+
content: null,
|
|
13
|
+
url: null,
|
|
14
|
+
error: `Couldn't fetch ${e}, got error ${[t.status, t.statusText].join(" ").trim()}.`
|
|
15
|
+
};
|
|
16
|
+
} catch (t) {
|
|
17
|
+
return console.error("[prefetchDocument]", t), { state: "idle", content: null, url: null, error: (n = t == null ? void 0 : t.message) != null && n.includes("Can’t fetch") ? `Couldn't reach ${e} — is it publicly accessible?` : t == null ? void 0 : t.message };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return { prefetchUrl: r };
|
|
21
|
+
}
|
|
22
|
+
function f() {
|
|
23
|
+
const r = o({
|
|
6
24
|
state: "idle",
|
|
7
25
|
content: null,
|
|
26
|
+
url: null,
|
|
8
27
|
error: null
|
|
9
|
-
});
|
|
10
|
-
async function
|
|
11
|
-
|
|
12
|
-
return Object.assign(e, {
|
|
13
|
-
state: "idle",
|
|
14
|
-
content: null,
|
|
15
|
-
error: null
|
|
16
|
-
});
|
|
17
|
-
Object.assign(e, {
|
|
28
|
+
}), { prefetchUrl: e } = u();
|
|
29
|
+
async function c(n, t) {
|
|
30
|
+
Object.assign(r, {
|
|
18
31
|
state: "loading",
|
|
19
32
|
content: null,
|
|
33
|
+
url: null,
|
|
20
34
|
error: null
|
|
21
35
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
cache: "no-store"
|
|
25
|
-
});
|
|
26
|
-
if (!t.ok)
|
|
27
|
-
return Object.assign(e, {
|
|
28
|
-
state: "idle",
|
|
29
|
-
content: null,
|
|
30
|
-
error: `Couldn’t fetch ${r}, got error ${[t.status, t.statusText].join(" ").trim()}.`
|
|
31
|
-
});
|
|
32
|
-
const n = await t.text();
|
|
33
|
-
return Object.assign(e, {
|
|
34
|
-
state: "idle",
|
|
35
|
-
content: n,
|
|
36
|
-
error: null
|
|
37
|
-
});
|
|
38
|
-
} catch (t) {
|
|
39
|
-
console.error("[prefetchDocument]", t);
|
|
40
|
-
const n = (t == null ? void 0 : t.message) === "Failed to fetch" ? `Couldn’t reach ${r} — is it publicly accessible?` : t == null ? void 0 : t.message;
|
|
41
|
-
return Object.assign(e, {
|
|
42
|
-
state: "idle",
|
|
43
|
-
content: null,
|
|
44
|
-
error: n
|
|
45
|
-
});
|
|
46
|
-
}
|
|
36
|
+
const l = await e(n, t);
|
|
37
|
+
return Object.assign(r, l), l;
|
|
47
38
|
}
|
|
48
39
|
return {
|
|
49
|
-
prefetchResult:
|
|
50
|
-
prefetchUrl:
|
|
40
|
+
prefetchResult: r,
|
|
41
|
+
prefetchUrl: c
|
|
51
42
|
};
|
|
52
43
|
}
|
|
53
44
|
export {
|
|
54
|
-
|
|
45
|
+
u as createUrlPrefetcher,
|
|
46
|
+
f as useUrlPrefetcher
|
|
55
47
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
buttonSource: "sidebar" | "modal";
|
|
3
|
+
isDevelopment?: boolean;
|
|
4
|
+
integration?: string | null | undefined;
|
|
5
|
+
url?: string | undefined;
|
|
6
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
7
|
+
buttonSource: "sidebar" | "modal";
|
|
8
|
+
isDevelopment?: boolean;
|
|
9
|
+
integration?: string | null | undefined;
|
|
10
|
+
url?: string | undefined;
|
|
11
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=OpenApiClientButton.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenApiClientButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/OpenApiClientButton.vue"],"names":[],"mappings":";kBAoFgB,SAAS,GAAG,OAAO;oBACjB,OAAO;kBACT,MAAM,GAAG,IAAI,GAAG,SAAS;UACjC,MAAM,GAAG,SAAS;;kBAHV,SAAS,GAAG,OAAO;oBACjB,OAAO;kBACT,MAAM,GAAG,IAAI,GAAG,SAAS;UACjC,MAAM,GAAG,SAAS;;AAiF1B,wBAMG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent as a, computed as o, openBlock as i, createElementBlock as s, createVNode as c, unref as m, createTextVNode as l, createCommentVNode as u } from "vue";
|
|
2
|
+
import { ScalarIcon as p } from "@scalar/components";
|
|
3
|
+
import { makeUrlAbsolute as f } from "@scalar/oas-utils/helpers";
|
|
4
|
+
const h = ["href"], P = /* @__PURE__ */ a({
|
|
5
|
+
__name: "OpenApiClientButton",
|
|
6
|
+
props: {
|
|
7
|
+
buttonSource: {},
|
|
8
|
+
isDevelopment: { type: Boolean },
|
|
9
|
+
integration: {},
|
|
10
|
+
url: {}
|
|
11
|
+
},
|
|
12
|
+
setup(n) {
|
|
13
|
+
const r = o(() => {
|
|
14
|
+
const e = new URL(
|
|
15
|
+
n.isDevelopment ? "http://localhost:5065" : "https://client.scalar.com"
|
|
16
|
+
), t = f(n.url);
|
|
17
|
+
return t != null && t.length && e.searchParams.set("url", t), n.integration !== null && e.searchParams.set("integration", n.integration ?? "vue"), e.searchParams.set("utm_source", "api-reference"), e.searchParams.set("utm_medium", "button"), e.searchParams.set("utm_campaign", n.buttonSource), e.toString();
|
|
18
|
+
});
|
|
19
|
+
return (e, t) => r.value ? (i(), s("a", {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "open-api-client-button",
|
|
22
|
+
href: r.value,
|
|
23
|
+
target: "_blank"
|
|
24
|
+
}, [
|
|
25
|
+
c(m(p), {
|
|
26
|
+
icon: "ExternalLink",
|
|
27
|
+
size: "xs",
|
|
28
|
+
thickness: "2.5"
|
|
29
|
+
}),
|
|
30
|
+
t[0] || (t[0] = l(" Open API Client "))
|
|
31
|
+
], 8, h)) : u("", !0);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
P as default
|
|
36
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";AA8KA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SideNav.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-356a8069"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as d, openBlock as n, createElementBlock as
|
|
1
|
+
import { defineComponent as d, openBlock as n, createElementBlock as i, createElementVNode as e, Fragment as u, renderList as x, unref as o, createVNode as r, withCtx as m, createTextVNode as f, toDisplayString as v } from "vue";
|
|
2
2
|
import { ROUTES as y } from "../../constants.js";
|
|
3
3
|
import { useRouter as N } from "vue-router";
|
|
4
4
|
import h from "./SideHelp.vue.js";
|
|
5
5
|
import _ from "./SideNavLink.vue.js";
|
|
6
6
|
const S = {
|
|
7
7
|
"aria-label": "App Navigation",
|
|
8
|
-
class: "text-c-2 sm:w-13 flex sm:flex-col justify-center items-center px-2 py-2 scalar-sidenav relative drag-region bg-b-1
|
|
8
|
+
class: "text-c-2 sm:w-13 flex sm:flex-col justify-center items-center px-2 py-2 scalar-sidenav relative drag-region bg-b-1",
|
|
9
9
|
role: "navigation"
|
|
10
10
|
}, b = { class: "flex sm:flex-col gap-1.5" }, k = { class: "mt-auto flex sm:flex-col gap-1.5 py-0.5" }, E = { class: "flex items-center no-drag-region" }, R = { class: "flex items-center no-drag-region" }, A = /* @__PURE__ */ d({
|
|
11
11
|
__name: "SideNav",
|
|
12
12
|
setup(V) {
|
|
13
13
|
const { currentRoute: a } = N();
|
|
14
|
-
return (w, l) => (n(),
|
|
14
|
+
return (w, l) => (n(), i("nav", S, [
|
|
15
15
|
e("ul", b, [
|
|
16
|
-
(n(!0),
|
|
16
|
+
(n(!0), i(u, null, x(o(y).filter(
|
|
17
17
|
(t) => t.name !== "settings"
|
|
18
18
|
), ({ icon: t, name: s, prettyName: g }, p) => {
|
|
19
19
|
var c;
|
|
20
|
-
return n(),
|
|
20
|
+
return n(), i("li", {
|
|
21
21
|
key: p,
|
|
22
22
|
class: "no-drag-region"
|
|
23
23
|
}, [
|
|
24
|
-
|
|
24
|
+
r(_, {
|
|
25
25
|
active: (c = o(a).name) == null ? void 0 : c.startsWith(s),
|
|
26
26
|
icon: t,
|
|
27
27
|
name: s,
|
|
@@ -37,7 +37,7 @@ const S = {
|
|
|
37
37
|
]),
|
|
38
38
|
e("ul", k, [
|
|
39
39
|
e("li", E, [
|
|
40
|
-
|
|
40
|
+
r(_, {
|
|
41
41
|
active: o(a).name === "settings",
|
|
42
42
|
icon: "Settings",
|
|
43
43
|
name: "settings",
|
|
@@ -50,7 +50,7 @@ const S = {
|
|
|
50
50
|
}, 8, ["active"])
|
|
51
51
|
]),
|
|
52
52
|
e("li", R, [
|
|
53
|
-
|
|
53
|
+
r(h)
|
|
54
54
|
])
|
|
55
55
|
])
|
|
56
56
|
]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";gBA+Qc;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;;gBAApC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;;
|
|
1
|
+
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";gBA+Qc;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;;gBAApC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;;AA4dlD,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNav.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fc362fa8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|