@scalar/api-reference 1.28.23 → 1.28.25
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 +51 -0
- package/dist/browser/standalone.js +5904 -5810
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +100 -57
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +43 -42
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
- package/dist/components/SpecificationExtension/SpecificationExtension.vue.d.ts.map +1 -1
- package/dist/components/SpecificationExtension/SpecificationExtension.vue.js +26 -21
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +35 -31
- package/dist/features/ApiClientModal/useApiClient.d.ts +122 -22
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/standalone/lib/html-api.d.ts +1 -20
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.js +11 -11
- package/dist/standalone/lib/register-globals.d.ts +1 -1
- package/dist/standalone/lib/register-globals.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +10 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";AAmbA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ClientLibraries.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-db261135"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,82 +1,125 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TabGroup as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as B, ref as N, useId as h, watch as V, computed as F, unref as e, openBlock as n, createElementBlock as l, createVNode as i, withCtx as m, createElementVNode as H, Fragment as y, createCommentVNode as _, renderList as S, createBlock as A, createTextVNode as E, toDisplayString as p } from "vue";
|
|
2
|
+
import { TabGroup as j, TabList as D, TabPanels as G, TabPanel as M } from "@headlessui/vue";
|
|
3
|
+
import { useWorkspace as O } from "@scalar/api-client/store";
|
|
4
|
+
import { ScalarMarkdown as W, ScalarCodeBlock as q } from "@scalar/components";
|
|
5
|
+
import z from "./ClientSelector.vue.js";
|
|
6
|
+
import { useFeaturedHttpClients as J } from "./useFeaturedHttpClients.js";
|
|
7
|
+
import { useHttpClientStore as Q } from "../../../stores/useHttpClientStore.js";
|
|
8
|
+
const R = { key: 0 }, U = ["id"], Y = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "selected-client card-footer -outline-offset-2",
|
|
11
|
+
role: "tabpanel",
|
|
12
|
+
tabindex: "0"
|
|
13
|
+
}, Z = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "selected-client card-footer -outline-offset-2",
|
|
16
|
+
role: "tabpanel",
|
|
17
|
+
tabindex: "1"
|
|
18
|
+
}, $ = ["id"], ie = /* @__PURE__ */ B({
|
|
7
19
|
__name: "ClientLibraries",
|
|
8
|
-
setup(
|
|
20
|
+
setup(X) {
|
|
9
21
|
const {
|
|
10
|
-
availableTargets:
|
|
11
|
-
httpTargetTitle:
|
|
12
|
-
httpClientTitle:
|
|
13
|
-
getClientTitle:
|
|
14
|
-
getTargetTitle:
|
|
15
|
-
httpClient:
|
|
16
|
-
setHttpClient:
|
|
17
|
-
} =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
(
|
|
21
|
-
|
|
22
|
-
(
|
|
22
|
+
availableTargets: C,
|
|
23
|
+
httpTargetTitle: k,
|
|
24
|
+
httpClientTitle: x,
|
|
25
|
+
getClientTitle: T,
|
|
26
|
+
getTargetTitle: L,
|
|
27
|
+
httpClient: r,
|
|
28
|
+
setHttpClient: w
|
|
29
|
+
} = Q(), { featuredClients: d, isFeatured: I } = J(), K = O(), b = N(0), v = h(), g = h();
|
|
30
|
+
V(
|
|
31
|
+
r,
|
|
32
|
+
(a) => {
|
|
33
|
+
a && (b.value = d.findIndex(
|
|
34
|
+
(t) => t.targetKey === a.targetKey && t.clientKey === a.clientKey
|
|
23
35
|
));
|
|
24
36
|
},
|
|
25
37
|
{ immediate: !0 }
|
|
26
38
|
);
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
|
|
39
|
+
function P(a) {
|
|
40
|
+
const t = d[a];
|
|
41
|
+
t && w(t);
|
|
30
42
|
}
|
|
31
|
-
|
|
32
|
-
|
|
43
|
+
const o = F(() => {
|
|
44
|
+
var c;
|
|
45
|
+
const a = Object.values(K.collections)[0], t = (c = a == null ? void 0 : a.info) == null ? void 0 : c["x-scalar-sdk-installation"];
|
|
46
|
+
if (!Array.isArray(t) || !(t != null && t.length))
|
|
47
|
+
return;
|
|
48
|
+
const s = t.find(
|
|
49
|
+
(u) => {
|
|
50
|
+
var f;
|
|
51
|
+
return u.lang.toLowerCase() === ((f = r == null ? void 0 : r.targetKey) == null ? void 0 : f.toLowerCase());
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
if (s)
|
|
55
|
+
return s;
|
|
56
|
+
});
|
|
57
|
+
return (a, t) => e(C).length ? (n(), l("div", R, [
|
|
58
|
+
i(e(j), {
|
|
33
59
|
manual: "",
|
|
34
|
-
selectedIndex:
|
|
35
|
-
onChange:
|
|
60
|
+
selectedIndex: b.value,
|
|
61
|
+
onChange: P
|
|
36
62
|
}, {
|
|
37
|
-
default:
|
|
38
|
-
|
|
39
|
-
id: e(
|
|
63
|
+
default: m(() => [
|
|
64
|
+
H("div", {
|
|
65
|
+
id: e(v),
|
|
40
66
|
class: "client-libraries-heading"
|
|
41
|
-
}, " Client Libraries ", 8,
|
|
42
|
-
|
|
43
|
-
"aria-labelledby": e(
|
|
67
|
+
}, " Client Libraries ", 8, U),
|
|
68
|
+
i(e(D), {
|
|
69
|
+
"aria-labelledby": e(v),
|
|
44
70
|
class: "client-libraries-list"
|
|
45
71
|
}, {
|
|
46
|
-
default:
|
|
47
|
-
|
|
48
|
-
featured: e(
|
|
49
|
-
morePanel: e(
|
|
72
|
+
default: m(() => [
|
|
73
|
+
i(z, {
|
|
74
|
+
featured: e(d),
|
|
75
|
+
morePanel: e(g)
|
|
50
76
|
}, null, 8, ["featured", "morePanel"])
|
|
51
77
|
]),
|
|
52
78
|
_: 1
|
|
53
79
|
}, 8, ["aria-labelledby"]),
|
|
54
|
-
|
|
55
|
-
default:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
80
|
+
i(e(G), null, {
|
|
81
|
+
default: m(() => {
|
|
82
|
+
var s, c;
|
|
83
|
+
return [
|
|
84
|
+
(s = o.value) != null && s.source || (c = o.value) != null && c.description ? (n(), l(y, { key: 0 }, [
|
|
85
|
+
o.value.description ? (n(), l("div", Y, [
|
|
86
|
+
i(e(W), {
|
|
87
|
+
value: o.value.description
|
|
88
|
+
}, null, 8, ["value"])
|
|
89
|
+
])) : _("", !0),
|
|
90
|
+
o.value.source ? (n(), l("div", Z, [
|
|
91
|
+
i(e(q), {
|
|
92
|
+
lang: "shell",
|
|
93
|
+
content: o.value.source,
|
|
94
|
+
copy: !1,
|
|
95
|
+
class: "min-h-6 p-1"
|
|
96
|
+
}, null, 8, ["content"])
|
|
97
|
+
])) : _("", !0)
|
|
98
|
+
], 64)) : e(r) && e(I)(e(r)) ? (n(!0), l(y, { key: 1 }, S(e(d), (u, f) => (n(), A(e(M), {
|
|
99
|
+
key: f,
|
|
100
|
+
class: "selected-client card-footer -outline-offset-2"
|
|
101
|
+
}, {
|
|
102
|
+
default: m(() => [
|
|
103
|
+
E(p(e(T)(u)) + " " + p(e(L)(u)), 1)
|
|
104
|
+
]),
|
|
105
|
+
_: 2
|
|
106
|
+
}, 1024))), 128)) : (n(), l("div", {
|
|
107
|
+
key: 2,
|
|
108
|
+
id: e(g),
|
|
109
|
+
class: "selected-client card-footer -outline-offset-2",
|
|
110
|
+
role: "tabpanel",
|
|
111
|
+
tabindex: "0"
|
|
112
|
+
}, p(e(x)) + " " + p(e(k)), 9, $))
|
|
113
|
+
];
|
|
114
|
+
}),
|
|
72
115
|
_: 1
|
|
73
116
|
})
|
|
74
117
|
]),
|
|
75
118
|
_: 1
|
|
76
119
|
}, 8, ["selectedIndex"])
|
|
77
|
-
])) :
|
|
120
|
+
])) : _("", !0);
|
|
78
121
|
}
|
|
79
122
|
});
|
|
80
123
|
export {
|
|
81
|
-
|
|
124
|
+
ie as default
|
|
82
125
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Introduction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Introduction.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Introduction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Introduction.vue"],"names":[],"mappings":"AAsHA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAwBhD,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CACX,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,CACrE,CAAA;IACD,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;AA0CF,iBAAS,cAAc;WAyKT,OAAO,IAA6B;;uBATtB,GAAG;uBACH,GAAG;;;;EAa9B;AAyBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Introduction.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fdd1ed54"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useNavState as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { DEFAULT_INTRODUCTION_SLUG as
|
|
10
|
-
import
|
|
1
|
+
import { defineComponent as D, computed as s, onMounted as I, openBlock as l, createBlock as a, unref as o, withCtx as t, createVNode as i, createElementVNode as S, createTextVNode as u, toDisplayString as d, createCommentVNode as f, renderSlot as _ } from "vue";
|
|
2
|
+
import L from "github-slugger";
|
|
3
|
+
import { useConfig as V } from "../../../hooks/useConfig.js";
|
|
4
|
+
import { useNavState as w } from "../../../hooks/useNavState.js";
|
|
5
|
+
import H from "../../../features/DownloadLink/DownloadLink.vue.js";
|
|
6
|
+
import B from "./Description.vue.js";
|
|
7
|
+
import O from "../../Section/SectionContainer.vue.js";
|
|
8
|
+
import U from "../../Section/Section.vue.js";
|
|
9
|
+
import { DEFAULT_INTRODUCTION_SLUG as b } from "../../../hooks/useSidebar.js";
|
|
10
|
+
import A from "../../Section/SectionContent.vue.js";
|
|
11
11
|
import C from "../../Badge/Badge.vue.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import E from "../../Section/SectionHeader.vue.js";
|
|
13
|
+
import F from "../../Section/SectionHeaderTag.vue.js";
|
|
14
|
+
import G from "../../Section/SectionColumns.vue.js";
|
|
15
15
|
import T from "../../Section/SectionColumn.vue.js";
|
|
16
|
-
import
|
|
17
|
-
const M = { class: "flex gap-1" }, R = { class: "sticky-cards" }, ne = /* @__PURE__ */
|
|
16
|
+
import h from "../../SpecificationExtension/SpecificationExtension.vue.js";
|
|
17
|
+
const M = { class: "flex gap-1" }, R = { class: "sticky-cards" }, ne = /* @__PURE__ */ D({
|
|
18
18
|
__name: "Introduction",
|
|
19
19
|
props: {
|
|
20
20
|
info: {},
|
|
21
21
|
parsedSpec: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
23
|
+
setup(k) {
|
|
24
|
+
const n = k, { getHeadingId: y } = w(), m = s(
|
|
25
25
|
() => {
|
|
26
|
-
var e,
|
|
27
|
-
return ((e =
|
|
26
|
+
var e, r;
|
|
27
|
+
return ((e = n.parsedSpec) == null ? void 0 : e.openapi) ?? ((r = n.parsedSpec) == null ? void 0 : r.swagger) ?? "";
|
|
28
28
|
}
|
|
29
|
-
),
|
|
29
|
+
), N = new L(), $ = s(() => {
|
|
30
30
|
var e;
|
|
31
|
-
return
|
|
31
|
+
return N.slug(((e = n.info) == null ? void 0 : e.title) ?? "");
|
|
32
32
|
}), p = s(() => {
|
|
33
|
-
var e,
|
|
34
|
-
return typeof ((e =
|
|
35
|
-
}), c =
|
|
36
|
-
return
|
|
37
|
-
var e,
|
|
38
|
-
return (
|
|
39
|
-
}), (e,
|
|
33
|
+
var e, r;
|
|
34
|
+
return typeof ((e = n.info) == null ? void 0 : e.version) == "string" ? n.info.version.toString().match(/^\d/) ? `v${n.info.version}` : n.info.version : typeof ((r = n.info) == null ? void 0 : r.version) == "number" ? `v${n.info.version}` : void 0;
|
|
35
|
+
}), c = V();
|
|
36
|
+
return I(() => {
|
|
37
|
+
var e, r;
|
|
38
|
+
return (r = (e = c.value).onLoaded) == null ? void 0 : r.call(e);
|
|
39
|
+
}), (e, r) => (l(), a(o(O), null, {
|
|
40
40
|
default: t(() => [
|
|
41
|
-
|
|
41
|
+
i(o(U), {
|
|
42
42
|
class: "introduction-section gap-12",
|
|
43
|
-
id: o(
|
|
44
|
-
slug: o(
|
|
43
|
+
id: o(y)({
|
|
44
|
+
slug: o(b),
|
|
45
45
|
depth: 1,
|
|
46
46
|
value: "Introduction"
|
|
47
47
|
})
|
|
@@ -49,44 +49,44 @@ const M = { class: "flex gap-1" }, R = { class: "sticky-cards" }, ne = /* @__PUR
|
|
|
49
49
|
default: t(() => {
|
|
50
50
|
var v, g;
|
|
51
51
|
return [
|
|
52
|
-
|
|
52
|
+
i(o(A), {
|
|
53
53
|
loading: o(c).isLoading ?? (!((v = e.info) != null && v.description) && !((g = e.info) != null && g.title))
|
|
54
54
|
}, {
|
|
55
55
|
default: t(() => [
|
|
56
56
|
S("div", M, [
|
|
57
57
|
p.value ? (l(), a(o(C), { key: 0 }, {
|
|
58
58
|
default: t(() => [
|
|
59
|
-
d(
|
|
59
|
+
u(d(p.value), 1)
|
|
60
60
|
]),
|
|
61
61
|
_: 1
|
|
62
62
|
})) : f("", !0),
|
|
63
63
|
m.value ? (l(), a(o(C), { key: 1 }, {
|
|
64
64
|
default: t(() => [
|
|
65
|
-
|
|
65
|
+
u("OAS " + d(m.value), 1)
|
|
66
66
|
]),
|
|
67
67
|
_: 1
|
|
68
68
|
})) : f("", !0)
|
|
69
69
|
]),
|
|
70
|
-
|
|
70
|
+
i(o(E), {
|
|
71
71
|
loading: !e.info.title,
|
|
72
72
|
tight: ""
|
|
73
73
|
}, {
|
|
74
74
|
default: t(() => [
|
|
75
|
-
|
|
75
|
+
i(o(F), { level: 1 }, {
|
|
76
76
|
default: t(() => [
|
|
77
|
-
d(
|
|
77
|
+
u(d(e.info.title), 1)
|
|
78
78
|
]),
|
|
79
79
|
_: 1
|
|
80
80
|
})
|
|
81
81
|
]),
|
|
82
82
|
_: 1
|
|
83
83
|
}, 8, ["loading"]),
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
i(H, { specTitle: $.value }, null, 8, ["specTitle"]),
|
|
85
|
+
i(o(G), null, {
|
|
86
86
|
default: t(() => [
|
|
87
|
-
|
|
87
|
+
i(o(T), null, {
|
|
88
88
|
default: t(() => [
|
|
89
|
-
|
|
89
|
+
i(B, {
|
|
90
90
|
value: e.info.description
|
|
91
91
|
}, null, 8, ["value"])
|
|
92
92
|
]),
|
|
@@ -103,7 +103,8 @@ const M = { class: "flex gap-1" }, R = { class: "sticky-cards" }, ne = /* @__PUR
|
|
|
103
103
|
]),
|
|
104
104
|
_: 3
|
|
105
105
|
}),
|
|
106
|
-
|
|
106
|
+
i(o(h), { value: e.parsedSpec }, null, 8, ["value"]),
|
|
107
|
+
i(o(h), { value: e.info }, null, 8, ["value"])
|
|
107
108
|
]),
|
|
108
109
|
_: 3
|
|
109
110
|
}, 8, ["loading"]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaDiscriminator.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-67468e64"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpecificationExtension.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SpecificationExtension/SpecificationExtension.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpecificationExtension.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SpecificationExtension/SpecificationExtension.vue"],"names":[],"mappings":"AAsEA,KAAK,WAAW,GAAG;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;CAC3C,CAAC;;AA2GF,wBAMG"}
|
|
@@ -1,33 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarErrorBoundary as
|
|
3
|
-
import { usePluginManager as
|
|
4
|
-
const B = {
|
|
1
|
+
import { defineComponent as d, computed as s, openBlock as n, createElementBlock as u, Fragment as v, renderList as g, createBlock as c, unref as E, withCtx as _, resolveDynamicComponent as x, mergeProps as C, createCommentVNode as h } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as k } from "@scalar/components";
|
|
3
|
+
import { usePluginManager as y } from "../../plugins/hooks/usePluginManager.js";
|
|
4
|
+
const B = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "text-base"
|
|
7
|
+
}, j = /* @__PURE__ */ d({
|
|
5
8
|
__name: "SpecificationExtension",
|
|
6
9
|
props: {
|
|
7
10
|
value: {}
|
|
8
11
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const { getSpecificationExtensions:
|
|
11
|
-
function
|
|
12
|
+
setup(m) {
|
|
13
|
+
const { getSpecificationExtensions: i } = y();
|
|
14
|
+
function l(e) {
|
|
12
15
|
return Object.keys(e ?? {}).filter(
|
|
13
16
|
(t) => t.startsWith("x-")
|
|
14
17
|
);
|
|
15
18
|
}
|
|
16
|
-
function
|
|
17
|
-
return e.flatMap((t) =>
|
|
19
|
+
function p(e) {
|
|
20
|
+
return e.flatMap((t) => i(t)).filter((t) => t.component);
|
|
18
21
|
}
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
const f = s(() => l(m.value)), r = s(
|
|
23
|
+
() => p(f.value)
|
|
24
|
+
);
|
|
25
|
+
return (e, t) => typeof e.value == "object" && r.value.length ? (n(), u("div", B, [
|
|
26
|
+
(n(!0), u(v, null, g(r.value, (o) => (n(), c(E(k), null, {
|
|
27
|
+
default: _(() => {
|
|
28
|
+
var a;
|
|
29
|
+
return [
|
|
30
|
+
(n(), c(x(o.component), C({ ref_for: !0 }, { [o.name]: (a = e.value) == null ? void 0 : a[o.name] }), null, 16))
|
|
31
|
+
];
|
|
32
|
+
}),
|
|
33
|
+
_: 2
|
|
34
|
+
}, 1024))), 256))
|
|
35
|
+
])) : h("", !0);
|
|
31
36
|
}
|
|
32
37
|
});
|
|
33
38
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAYzE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;CAC/C,CAAC;;AAqIF,wBAOG"}
|
|
@@ -1,47 +1,51 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { defineComponent as h, ref as v, onMounted as d, watch as E, onBeforeUnmount as C, openBlock as g, createElementBlock as x } from "vue";
|
|
2
|
+
import { useActiveEntities as S, useWorkspace as _ } from "@scalar/api-client/store";
|
|
3
|
+
import { mutateServerDiff as k, mutateSecuritySchemeDiff as b } from "@scalar/api-client/views/Request/libs";
|
|
4
|
+
import { watchDebounced as A } from "@vueuse/core";
|
|
5
|
+
import B from "microdiff";
|
|
6
|
+
import { useApiClient as D } from "./useApiClient.js";
|
|
5
7
|
import { useNavState as y } from "../../hooks/useNavState.js";
|
|
6
|
-
import { useExampleStore as
|
|
7
|
-
const
|
|
8
|
+
import { useExampleStore as I } from "../../legacy/stores/useExampleStore.js";
|
|
9
|
+
const F = /* @__PURE__ */ h({
|
|
8
10
|
__name: "ApiClientModal",
|
|
9
11
|
props: {
|
|
10
12
|
configuration: {}
|
|
11
13
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
+
setup(i) {
|
|
15
|
+
const n = v(null), { client: o, init: p } = D(), { selectedExampleKey: f, operationId: u } = I(), c = S(), a = _(), { isIntersectionEnabled: l } = y();
|
|
14
16
|
return d(() => {
|
|
15
|
-
|
|
16
|
-
el:
|
|
17
|
-
configuration:
|
|
18
|
-
store:
|
|
17
|
+
n.value && p({
|
|
18
|
+
el: n.value,
|
|
19
|
+
configuration: i.configuration,
|
|
20
|
+
store: a
|
|
19
21
|
});
|
|
20
|
-
}),
|
|
21
|
-
() =>
|
|
22
|
-
(e,
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
a.
|
|
31
|
-
},
|
|
22
|
+
}), A(
|
|
23
|
+
() => i.configuration,
|
|
24
|
+
(e, r) => {
|
|
25
|
+
var m;
|
|
26
|
+
if (!r)
|
|
27
|
+
return;
|
|
28
|
+
const s = B(r, e);
|
|
29
|
+
s.some(
|
|
30
|
+
(t) => t.path[0] === "url" || t.path[0] === "content" || t.path[1] === "url" || t.path[1] === "content"
|
|
31
|
+
) ? (m = o.value) == null || m.updateConfig(e) : s.forEach((t) => {
|
|
32
|
+
t.path[0] === "servers" ? k(t, c, a) : t.path[0] === "authentication" && b(t, c, a);
|
|
33
|
+
}), l.value = !1, setTimeout(() => {
|
|
34
|
+
l.value = !0;
|
|
35
|
+
}, 1e3);
|
|
32
36
|
},
|
|
33
37
|
{ deep: !0, debounce: 300 }
|
|
34
|
-
),
|
|
35
|
-
|
|
36
|
-
}),
|
|
38
|
+
), E(f, (e) => {
|
|
39
|
+
o.value && e && u.value && o.value.updateExample(e, u.value);
|
|
40
|
+
}), C(() => {
|
|
37
41
|
var e;
|
|
38
|
-
return (e =
|
|
39
|
-
}), (e,
|
|
42
|
+
return (e = o.value) == null ? void 0 : e.app.unmount();
|
|
43
|
+
}), (e, r) => (g(), x("div", {
|
|
40
44
|
ref_key: "el",
|
|
41
|
-
ref:
|
|
45
|
+
ref: n
|
|
42
46
|
}, null, 512));
|
|
43
47
|
}
|
|
44
48
|
});
|
|
45
49
|
export {
|
|
46
|
-
|
|
50
|
+
F as default
|
|
47
51
|
};
|