@scalar/api-reference 1.24.19 → 1.24.21
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 +39 -0
- package/dist/browser/standalone.js +11841 -11462
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/components/ApiClientModal.vue.js +18 -12
- package/dist/components/ApiClientModal.vue3.js +5 -0
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +105 -116
- package/dist/components/Content/Content.vue.d.ts +0 -3
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +70 -93
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
- package/dist/components/Content/Operation/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/TestRequestButton.vue.js +1 -1
- package/dist/components/Content/Operation/TestRequestButton.vue2.js +8 -6
- package/dist/components/Content/Schema/Schema.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
- package/dist/components/api-client-bus.d.ts +15 -3
- package/dist/components/api-client-bus.d.ts.map +1 -1
- package/dist/{components/Content/BaseUrl/ServerVariables.vue.d.ts → features/BaseUrl/BaseUrl.vue.d.ts} +18 -4
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -0
- package/dist/features/BaseUrl/BaseUrl.vue.js +87 -0
- package/dist/features/BaseUrl/BaseUrl.vue2.js +4 -0
- package/dist/features/BaseUrl/ServerForm.vue.d.ts +41 -0
- package/dist/features/BaseUrl/ServerForm.vue.d.ts.map +1 -0
- package/dist/features/BaseUrl/ServerForm.vue.js +7 -0
- package/dist/features/BaseUrl/ServerForm.vue2.js +66 -0
- package/dist/{components/Content/BaseUrl/ServerItem.vue.d.ts → features/BaseUrl/ServerUrl.vue.d.ts} +6 -6
- package/dist/features/BaseUrl/ServerUrl.vue.d.ts.map +1 -0
- package/dist/features/BaseUrl/ServerUrl.vue.js +8 -0
- package/dist/features/BaseUrl/ServerUrl.vue2.js +29 -0
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts +30 -0
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -0
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +7 -0
- package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +56 -0
- package/dist/features/BaseUrl/ServerVariablesForm.vue.d.ts +23 -0
- package/dist/features/BaseUrl/ServerVariablesForm.vue.d.ts.map +1 -0
- package/dist/features/BaseUrl/ServerVariablesForm.vue.js +7 -0
- package/dist/features/BaseUrl/ServerVariablesForm.vue2.js +53 -0
- package/dist/{components/Content/BaseUrl/ServerVariableSelect.vue.d.ts → features/BaseUrl/ServerVariablesSelect.vue.d.ts} +1 -1
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.d.ts.map +1 -0
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +7 -0
- package/dist/{components/Content/BaseUrl/ServerVariableSelect.vue2.js → features/BaseUrl/ServerVariablesSelect.vue2.js} +1 -1
- package/dist/{components/Content/BaseUrl/ServerVariableTextbox.vue.d.ts → features/BaseUrl/ServerVariablesTextbox.vue.d.ts} +1 -1
- package/dist/features/BaseUrl/ServerVariablesTextbox.vue.d.ts.map +1 -0
- package/dist/features/BaseUrl/ServerVariablesTextbox.vue.js +7 -0
- package/dist/{components/Content/BaseUrl/ServerVariableTextbox.vue2.js → features/BaseUrl/ServerVariablesTextbox.vue2.js} +6 -6
- package/dist/features/BaseUrl/index.d.ts +3 -0
- package/dist/features/BaseUrl/index.d.ts.map +1 -0
- package/dist/features/BaseUrl/types.d.ts +10 -0
- package/dist/features/BaseUrl/types.d.ts.map +1 -0
- package/dist/features/BaseUrl/utils/getServers.d.ts +15 -0
- package/dist/features/BaseUrl/utils/getServers.d.ts.map +1 -0
- package/dist/features/BaseUrl/utils/getServers.js +29 -0
- package/dist/features/BaseUrl/utils/index.d.ts +2 -0
- package/dist/features/BaseUrl/utils/index.d.ts.map +1 -0
- package/dist/helpers/createEmptySpecification.d.ts +1 -1
- package/dist/helpers/createEmptySpecification.d.ts.map +1 -1
- package/dist/helpers/createEmptySpecification.js +5 -4
- package/dist/helpers/getModels.d.ts +1 -1
- package/dist/hooks/useReactiveSpec.d.ts +8 -8
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -10
- package/dist/components/ApiClientModal.vue2.js +0 -4
- package/dist/components/Content/BaseUrl/BaseUrl.vue.d.ts +0 -3
- package/dist/components/Content/BaseUrl/BaseUrl.vue.d.ts.map +0 -1
- package/dist/components/Content/BaseUrl/BaseUrl.vue.js +0 -7
- package/dist/components/Content/BaseUrl/BaseUrl.vue2.js +0 -90
- package/dist/components/Content/BaseUrl/ServerItem.vue.d.ts.map +0 -1
- package/dist/components/Content/BaseUrl/ServerItem.vue.js +0 -8
- package/dist/components/Content/BaseUrl/ServerItem.vue2.js +0 -35
- package/dist/components/Content/BaseUrl/ServerVariableSelect.vue.d.ts.map +0 -1
- package/dist/components/Content/BaseUrl/ServerVariableSelect.vue.js +0 -7
- package/dist/components/Content/BaseUrl/ServerVariableTextbox.vue.d.ts.map +0 -1
- package/dist/components/Content/BaseUrl/ServerVariableTextbox.vue.js +0 -7
- package/dist/components/Content/BaseUrl/ServerVariables.vue.d.ts.map +0 -1
- package/dist/components/Content/BaseUrl/ServerVariables.vue.js +0 -7
- package/dist/components/Content/BaseUrl/ServerVariables.vue2.js +0 -47
- package/dist/components/Content/BaseUrl/index.d.ts +0 -2
- package/dist/components/Content/BaseUrl/index.d.ts.map +0 -1
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
-
export default _default;
|
|
3
|
-
//# sourceMappingURL=BaseUrl.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseUrl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/BaseUrl.vue"],"names":[],"mappings":";AAiXA,wBAKG"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { defineComponent as b, ref as S, watch as k, unref as r, openBlock as l, createElementBlock as v, createElementVNode as o, Fragment as g, renderList as I, toDisplayString as V, createCommentVNode as d, createVNode as p, createBlock as y, pushScopeId as B, popScopeId as w } from "vue";
|
|
2
|
-
import { useServerStore as C, findVariables as E } from "@scalar/api-client";
|
|
3
|
-
import { ScalarIcon as N, ScalarMarkdown as x } from "@scalar/components";
|
|
4
|
-
import D from "./ServerItem.vue.js";
|
|
5
|
-
import L from "./ServerVariables.vue.js";
|
|
6
|
-
const U = (c) => (B("data-v-e4183eb6"), c = c(), w(), c), j = { key: 0 }, F = /* @__PURE__ */ U(() => /* @__PURE__ */ o("span", { class: "scalar-card-serverlist-title" }, "Base URL", -1)), M = { class: "scalar-card-serverlist" }, O = { class: "scalar-card-serverlist-container" }, R = { class: "server-item" }, q = { class: "server-selector" }, z = ["value"], A = ["value"], G = {
|
|
7
|
-
key: 0,
|
|
8
|
-
muted: ""
|
|
9
|
-
}, H = { class: "description" }, W = /* @__PURE__ */ b({
|
|
10
|
-
__name: "BaseUrl",
|
|
11
|
-
setup(c) {
|
|
12
|
-
const { server: e, setServer: f } = C(), s = S(0);
|
|
13
|
-
return k(
|
|
14
|
-
[s, () => e.servers],
|
|
15
|
-
() => {
|
|
16
|
-
var n, _, m;
|
|
17
|
-
if (!e.servers.length) return;
|
|
18
|
-
const a = ((n = e.servers[s.value]) == null ? void 0 : n.variables) ?? {}, i = a ? Object.keys(a).map((t) => {
|
|
19
|
-
var h;
|
|
20
|
-
return {
|
|
21
|
-
name: t,
|
|
22
|
-
value: ((h = a[t].default) == null ? void 0 : h.toString()) ?? "",
|
|
23
|
-
enum: a[t].enum ?? []
|
|
24
|
-
};
|
|
25
|
-
}) : [];
|
|
26
|
-
E(
|
|
27
|
-
(_ = e.servers[s.value]) == null ? void 0 : _.url
|
|
28
|
-
).filter((t) => !a[t]).forEach((t) => {
|
|
29
|
-
i.push({
|
|
30
|
-
name: t,
|
|
31
|
-
value: "",
|
|
32
|
-
enum: []
|
|
33
|
-
});
|
|
34
|
-
}), f({
|
|
35
|
-
selectedServer: s.value,
|
|
36
|
-
description: (m = e.servers[s.value]) == null ? void 0 : m.description,
|
|
37
|
-
variables: i
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
immediate: !0,
|
|
42
|
-
deep: !0
|
|
43
|
-
}
|
|
44
|
-
), (a, i) => r(e).servers.length > 0 ? (l(), v("div", j, [
|
|
45
|
-
F,
|
|
46
|
-
o("div", M, [
|
|
47
|
-
o("div", O, [
|
|
48
|
-
o("div", R, [
|
|
49
|
-
o("div", q, [
|
|
50
|
-
r(e).servers.length > 1 ? (l(), v("select", {
|
|
51
|
-
key: 0,
|
|
52
|
-
value: s.value,
|
|
53
|
-
onInput: i[0] || (i[0] = (u) => s.value = parseInt(
|
|
54
|
-
u.target.value,
|
|
55
|
-
10
|
|
56
|
-
))
|
|
57
|
-
}, [
|
|
58
|
-
(l(!0), v(g, null, I(r(e).servers, (u, n) => (l(), v("option", {
|
|
59
|
-
key: n,
|
|
60
|
-
value: n
|
|
61
|
-
}, V(u.url), 9, A))), 128))
|
|
62
|
-
], 40, z)) : d("", !0),
|
|
63
|
-
p(D, {
|
|
64
|
-
value: r(e).servers[s.value],
|
|
65
|
-
variables: r(e).variables
|
|
66
|
-
}, null, 8, ["value", "variables"]),
|
|
67
|
-
r(e).servers.length > 1 ? (l(), y(r(N), {
|
|
68
|
-
key: 1,
|
|
69
|
-
icon: "ChevronDown"
|
|
70
|
-
})) : d("", !0)
|
|
71
|
-
])
|
|
72
|
-
]),
|
|
73
|
-
p(L, {
|
|
74
|
-
value: r(e).variables
|
|
75
|
-
}, null, 8, ["value"])
|
|
76
|
-
])
|
|
77
|
-
]),
|
|
78
|
-
r(e).description ? (l(), v("div", G, [
|
|
79
|
-
o("div", H, [
|
|
80
|
-
p(r(x), {
|
|
81
|
-
value: r(e).description
|
|
82
|
-
}, null, 8, ["value"])
|
|
83
|
-
])
|
|
84
|
-
])) : d("", !0)
|
|
85
|
-
])) : d("", !0);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
export {
|
|
89
|
-
W as default
|
|
90
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/ServerItem.vue"],"names":[],"mappings":"AA+EA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,QAAQ,EAEd,MAAM,oBAAoB,CAAA;;;;;;;;AA+F3B,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { defineComponent as v, computed as u, openBlock as d, createElementBlock as f, unref as b, createCommentVNode as C } from "vue";
|
|
2
|
-
import { replaceVariables as k } from "@scalar/api-client";
|
|
3
|
-
import { useClipboard as T } from "../../../hooks/useClipboard.js";
|
|
4
|
-
const _ = ["title", "innerHTML"], y = /* @__PURE__ */ v({
|
|
5
|
-
__name: "ServerItem",
|
|
6
|
-
props: {
|
|
7
|
-
value: {},
|
|
8
|
-
variables: {}
|
|
9
|
-
},
|
|
10
|
-
setup(p) {
|
|
11
|
-
const n = p, { copyToClipboard: i } = T(), o = u(() => {
|
|
12
|
-
var l;
|
|
13
|
-
const r = (((l = n.value) == null ? void 0 : l.url) ?? "").replace(/(<([^>]+)>)/gi, "");
|
|
14
|
-
return k(r, (a) => {
|
|
15
|
-
var s;
|
|
16
|
-
const e = (s = n.variables) == null ? void 0 : s.find(
|
|
17
|
-
(m) => m.name === a
|
|
18
|
-
);
|
|
19
|
-
return `<span class="base-url-variable">${((e == null ? void 0 : e.value) ?? "") !== "" ? e == null ? void 0 : e.value : `{${a}}`}</span>`;
|
|
20
|
-
});
|
|
21
|
-
}), c = u(
|
|
22
|
-
() => o.value.replace(/(<([^>]+)>)/gi, "")
|
|
23
|
-
);
|
|
24
|
-
return (t, r) => t.value ? (d(), f("a", {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "base-url",
|
|
27
|
-
title: t.value.description,
|
|
28
|
-
onClick: r[0] || (r[0] = (l) => b(i)(c.value)),
|
|
29
|
-
innerHTML: o.value
|
|
30
|
-
}, null, 8, _)) : C("", !0);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
export {
|
|
34
|
-
y as default
|
|
35
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariableSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/ServerVariableSelect.vue"],"names":[],"mappings":";;;;;;;;;;;AA6LA,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariableTextbox.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/ServerVariableTextbox.vue"],"names":[],"mappings":";;;;;;;;;AAyGA,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariables.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/ServerVariables.vue"],"names":[],"mappings":"AA4EA,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,oBAAoB,CAAA;;;;;;AAgIlE,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, openBlock as r, createElementBlock as o, Fragment as v, renderList as d, createElementVNode as s, toDisplayString as f, createBlock as m, createCommentVNode as _ } from "vue";
|
|
2
|
-
import { useServerStore as h } from "@scalar/api-client";
|
|
3
|
-
import S from "./ServerVariableSelect.vue.js";
|
|
4
|
-
import g from "./ServerVariableTextbox.vue.js";
|
|
5
|
-
const k = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "variable-container"
|
|
8
|
-
}, V = ["for"], E = /* @__PURE__ */ p({
|
|
9
|
-
__name: "ServerVariables",
|
|
10
|
-
props: {
|
|
11
|
-
value: {}
|
|
12
|
-
},
|
|
13
|
-
setup(C) {
|
|
14
|
-
const { server: u, setServer: c } = h(), t = (a, l) => {
|
|
15
|
-
const e = [...u.variables], n = e.findIndex((i) => i.name === a);
|
|
16
|
-
e[n].value = l, c({
|
|
17
|
-
variables: e
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
return (a, l) => a.value ? (r(), o("div", k, [
|
|
21
|
-
(r(!0), o(v, null, d(a.value, (e) => (r(), o("div", {
|
|
22
|
-
key: e.name,
|
|
23
|
-
class: "variable-container-item"
|
|
24
|
-
}, [
|
|
25
|
-
s("label", {
|
|
26
|
-
class: "variable-description",
|
|
27
|
-
for: `variable-${e.name}`
|
|
28
|
-
}, [
|
|
29
|
-
s("code", null, f(e.name), 1)
|
|
30
|
-
], 8, V),
|
|
31
|
-
e.enum && e.enum.length ? (r(), m(S, {
|
|
32
|
-
key: 0,
|
|
33
|
-
enum: e.enum.map((n) => `${n}`),
|
|
34
|
-
value: e.value,
|
|
35
|
-
onChange: (n) => t(e.name, n)
|
|
36
|
-
}, null, 8, ["enum", "value", "onChange"])) : (r(), m(g, {
|
|
37
|
-
key: 1,
|
|
38
|
-
value: e.value,
|
|
39
|
-
onChange: (n) => t(e.name, n)
|
|
40
|
-
}, null, 8, ["value", "onChange"]))
|
|
41
|
-
]))), 128))
|
|
42
|
-
])) : _("", !0);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
export {
|
|
46
|
-
E as default
|
|
47
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/BaseUrl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA"}
|