@scalar/api-reference 1.25.111 → 1.25.113
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 +29 -0
- package/dist/browser/standalone.js +5991 -6107
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +103 -104
- package/dist/components/Content/Content.vue.d.ts +1 -3
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +1 -1
- package/dist/components/Content/Content.vue2.js +53 -55
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +24 -34
- package/dist/features/ApiClientModal/useApiClient.d.ts +60 -80
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts +1 -16
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +36 -29
- package/dist/features/BaseUrl/index.d.ts +0 -1
- package/dist/features/BaseUrl/index.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useRequestExample.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useRequestExample.js +39 -51
- package/dist/index.js +1 -1
- package/dist/legacy/helpers/index.d.ts +0 -1
- package/dist/legacy/helpers/index.d.ts.map +1 -1
- package/dist/legacy/stores/index.d.ts +1 -2
- package/dist/legacy/stores/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +8 -8
- package/dist/features/BaseUrl/ServerForm.vue.d.ts +0 -18
- package/dist/features/BaseUrl/ServerForm.vue.d.ts.map +0 -1
- package/dist/features/BaseUrl/ServerForm.vue.js +0 -7
- package/dist/features/BaseUrl/ServerForm.vue2.js +0 -76
- package/dist/features/BaseUrl/ServerUrl.vue.d.ts +0 -9
- package/dist/features/BaseUrl/ServerUrl.vue.d.ts.map +0 -1
- package/dist/features/BaseUrl/ServerUrl.vue.js +0 -7
- package/dist/features/BaseUrl/ServerUrl.vue2.js +0 -27
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts +0 -28
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +0 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +0 -7
- package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +0 -61
- package/dist/features/BaseUrl/ServerVariablesForm.vue.d.ts +0 -14
- package/dist/features/BaseUrl/ServerVariablesForm.vue.d.ts.map +0 -1
- package/dist/features/BaseUrl/ServerVariablesForm.vue.js +0 -7
- package/dist/features/BaseUrl/ServerVariablesForm.vue2.js +0 -59
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.d.ts +0 -12
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.d.ts.map +0 -1
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +0 -7
- package/dist/features/BaseUrl/ServerVariablesSelect.vue2.js +0 -54
- package/dist/features/BaseUrl/ServerVariablesTextbox.vue.d.ts +0 -11
- package/dist/features/BaseUrl/ServerVariablesTextbox.vue.d.ts.map +0 -1
- package/dist/features/BaseUrl/ServerVariablesTextbox.vue.js +0 -7
- package/dist/features/BaseUrl/ServerVariablesTextbox.vue2.js +0 -29
- package/dist/features/BaseUrl/types.d.ts +0 -9
- package/dist/features/BaseUrl/types.d.ts.map +0 -1
- package/dist/features/BaseUrl/utils/getServers.d.ts +0 -15
- package/dist/features/BaseUrl/utils/getServers.d.ts.map +0 -1
- package/dist/features/BaseUrl/utils/getServers.js +0 -31
- package/dist/legacy/helpers/getUrlFromServerState.d.ts +0 -10
- package/dist/legacy/helpers/getUrlFromServerState.d.ts.map +0 -1
- package/dist/legacy/helpers/getUrlFromServerState.js +0 -18
- package/dist/legacy/stores/useServerStore.d.ts +0 -44
- package/dist/legacy/stores/useServerStore.d.ts.map +0 -1
- package/dist/legacy/stores/useServerStore.js +0 -88
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.25.
|
|
23
|
+
"version": "1.25.113",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=18"
|
|
26
26
|
},
|
|
@@ -55,16 +55,16 @@
|
|
|
55
55
|
"nanoid": "^5.0.7",
|
|
56
56
|
"vue": "^3.5.12",
|
|
57
57
|
"@scalar/code-highlight": "0.0.20",
|
|
58
|
-
"@scalar/
|
|
59
|
-
"@scalar/
|
|
58
|
+
"@scalar/api-client": "2.2.42",
|
|
59
|
+
"@scalar/components": "0.13.18",
|
|
60
|
+
"@scalar/oas-utils": "0.2.101",
|
|
60
61
|
"@scalar/openapi-parser": "0.10.4",
|
|
61
62
|
"@scalar/openapi-types": "0.1.6",
|
|
62
63
|
"@scalar/snippetz": "0.2.10",
|
|
63
|
-
"@scalar/
|
|
64
|
-
"@scalar/
|
|
65
|
-
"@scalar/
|
|
66
|
-
"@scalar/use-toasts": "0.7.8"
|
|
67
|
-
"@scalar/api-client": "2.2.40"
|
|
64
|
+
"@scalar/types": "0.0.29",
|
|
65
|
+
"@scalar/use-hooks": "0.1.17",
|
|
66
|
+
"@scalar/themes": "0.9.63",
|
|
67
|
+
"@scalar/use-toasts": "0.7.8"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Server } from '@scalar/types/legacy';
|
|
2
|
-
import type { ServerVariableValues } from './types';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
selected?: number;
|
|
5
|
-
servers?: Server[];
|
|
6
|
-
variables?: ServerVariableValues;
|
|
7
|
-
};
|
|
8
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
-
"update:selected": (v: number) => any;
|
|
10
|
-
"update:variables": (v: ServerVariableValues) => any;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
-
"onUpdate:selected"?: ((v: number) => any) | undefined;
|
|
13
|
-
"onUpdate:variables"?: ((v: ServerVariableValues) => any) | undefined;
|
|
14
|
-
}>, {
|
|
15
|
-
selected: number;
|
|
16
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
-
export default _default;
|
|
18
|
-
//# sourceMappingURL=ServerForm.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerForm.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerForm.vue"],"names":[],"mappings":"AAwHA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAOlD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAInD,KAAK,WAAW,GAAG;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAC;;;;;;;;cAHW,MAAM;;AAoKrB,wBAQG"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, computed as c, openBlock as p, createElementBlock as b, createElementVNode as s, createVNode as l, withCtx as B, unref as C, createCommentVNode as f } from "vue";
|
|
2
|
-
import { ScalarMarkdown as I } from "@scalar/components";
|
|
3
|
-
import { nanoid as S } from "nanoid";
|
|
4
|
-
import N from "./ServerUrl.vue.js";
|
|
5
|
-
import g from "./ServerUrlSelect.vue.js";
|
|
6
|
-
import w from "./ServerVariablesForm.vue.js";
|
|
7
|
-
const E = { key: 0 }, F = { class: "server-form" }, $ = { class: "server-form-container" }, h = { class: "description" }, z = /* @__PURE__ */ y({
|
|
8
|
-
__name: "ServerForm",
|
|
9
|
-
props: {
|
|
10
|
-
selected: { default: 0 },
|
|
11
|
-
servers: {},
|
|
12
|
-
variables: {}
|
|
13
|
-
},
|
|
14
|
-
emits: ["update:selected", "update:variables"],
|
|
15
|
-
setup(V, { emit: k }) {
|
|
16
|
-
const a = V, i = k, d = `server-selector-${S()}`, n = `server-description-${S()}`, o = c({
|
|
17
|
-
get: () => a.selected,
|
|
18
|
-
set: (e) => i("update:selected", e)
|
|
19
|
-
}), t = c(() => {
|
|
20
|
-
var e;
|
|
21
|
-
return (e = a.servers) == null ? void 0 : e[o.value];
|
|
22
|
-
});
|
|
23
|
-
function U(e, r) {
|
|
24
|
-
i("update:variables", { ...a.variables, [e]: r });
|
|
25
|
-
}
|
|
26
|
-
return (e, r) => {
|
|
27
|
-
var v, u, m;
|
|
28
|
-
return (v = e.servers) != null && v.length ? (p(), b("div", E, [
|
|
29
|
-
r[2] || (r[2] = s("label", { class: "server-form-title" }, "Server", -1)),
|
|
30
|
-
s("div", F, [
|
|
31
|
-
s("div", $, [
|
|
32
|
-
s("div", null, [
|
|
33
|
-
l(g, {
|
|
34
|
-
id: d,
|
|
35
|
-
modelValue: o.value,
|
|
36
|
-
"onUpdate:modelValue": r[0] || (r[0] = (_) => o.value = _),
|
|
37
|
-
describedBy: n,
|
|
38
|
-
label: "Base URL",
|
|
39
|
-
options: e.servers
|
|
40
|
-
}, {
|
|
41
|
-
default: B(() => [
|
|
42
|
-
r[1] || (r[1] = s("span", { class: "sr-only" }, "Selected:", -1)),
|
|
43
|
-
l(N, {
|
|
44
|
-
server: t.value,
|
|
45
|
-
variables: e.variables
|
|
46
|
-
}, null, 8, ["server", "variables"])
|
|
47
|
-
]),
|
|
48
|
-
_: 1
|
|
49
|
-
}, 8, ["modelValue", "options"])
|
|
50
|
-
]),
|
|
51
|
-
l(w, {
|
|
52
|
-
controls: d,
|
|
53
|
-
values: e.variables,
|
|
54
|
-
variables: (u = t.value) == null ? void 0 : u.variables,
|
|
55
|
-
"onUpdate:variable": U
|
|
56
|
-
}, null, 8, ["values", "variables"])
|
|
57
|
-
])
|
|
58
|
-
]),
|
|
59
|
-
(m = t.value) != null && m.description ? (p(), b("div", {
|
|
60
|
-
key: 0,
|
|
61
|
-
id: n,
|
|
62
|
-
muted: ""
|
|
63
|
-
}, [
|
|
64
|
-
s("div", h, [
|
|
65
|
-
l(C(I), {
|
|
66
|
-
value: t.value.description
|
|
67
|
-
}, null, 8, ["value"])
|
|
68
|
-
])
|
|
69
|
-
])) : f("", !0)
|
|
70
|
-
])) : f("", !0);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
export {
|
|
75
|
-
z as default
|
|
76
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Server } from '@scalar/types/legacy';
|
|
2
|
-
import type { ServerVariableValues } from './types';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
server?: Server;
|
|
5
|
-
variables?: ServerVariableValues;
|
|
6
|
-
};
|
|
7
|
-
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, {}, HTMLSpanElement>;
|
|
8
|
-
export default _default;
|
|
9
|
-
//# sourceMappingURL=ServerUrl.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerUrl.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerUrl.vue"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGlD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAInD,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAC;;AA+EF,wBAOG"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { defineComponent as u, computed as p, openBlock as i, createElementBlock as m } from "vue";
|
|
2
|
-
import { replaceVariables as v } from "@scalar/oas-utils/helpers";
|
|
3
|
-
const _ = ["innerHTML"], d = /* @__PURE__ */ u({
|
|
4
|
-
__name: "ServerUrl",
|
|
5
|
-
props: {
|
|
6
|
-
server: {},
|
|
7
|
-
variables: {}
|
|
8
|
-
},
|
|
9
|
-
setup(a) {
|
|
10
|
-
const e = a, o = p(() => {
|
|
11
|
-
var s;
|
|
12
|
-
const r = (((s = e.server) == null ? void 0 : s.url) ?? "").replace(/(<([^>]+)>)/gi, "");
|
|
13
|
-
return v(r, (n) => {
|
|
14
|
-
var l;
|
|
15
|
-
const t = ((l = e.variables) == null ? void 0 : l[n]) ?? "";
|
|
16
|
-
return `<span class="base-url-variable">${t !== "" ? t : `{${n}}`}</span>`;
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
return (c, r) => (i(), m("span", {
|
|
20
|
-
class: "base-url",
|
|
21
|
-
innerHTML: o.value
|
|
22
|
-
}, null, 8, _));
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
export {
|
|
26
|
-
d as default
|
|
27
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Server } from '@scalar/types/legacy';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
options: Server[];
|
|
4
|
-
modelValue: number;
|
|
5
|
-
describedBy?: string;
|
|
6
|
-
};
|
|
7
|
-
declare function __VLS_template(): {
|
|
8
|
-
attrs: Partial<{}>;
|
|
9
|
-
slots: {
|
|
10
|
-
default?(_: {}): any;
|
|
11
|
-
};
|
|
12
|
-
refs: {};
|
|
13
|
-
rootEl: any;
|
|
14
|
-
};
|
|
15
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
17
|
-
"update:modelValue": (v: number) => any;
|
|
18
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
-
"onUpdate:modelValue"?: ((v: number) => any) | undefined;
|
|
20
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
-
export default _default;
|
|
23
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
-
new (): {
|
|
25
|
-
$slots: S;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=ServerUrlSelect.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerUrlSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerUrlSelect.vue"],"names":[],"mappings":"AAmGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAKlD,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC;AA4BF,iBAAS,cAAc;WAqET,OAAO,IAA6B;;yBARpB,GAAG;;;;EAahC;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAQnB,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,61 +0,0 @@
|
|
|
1
|
-
import { defineComponent as f, computed as r, openBlock as n, createBlock as d, unref as l, withCtx as i, createVNode as v, normalizeClass as V, createElementVNode as b, renderSlot as S, createCommentVNode as g } from "vue";
|
|
2
|
-
import { ScalarListbox as h, ScalarButton as _, ScalarIcon as y } from "@scalar/components";
|
|
3
|
-
const B = {
|
|
4
|
-
class: "custom-scroll",
|
|
5
|
-
tabindex: "-1"
|
|
6
|
-
}, k = /* @__PURE__ */ f({
|
|
7
|
-
__name: "ServerUrlSelect",
|
|
8
|
-
props: {
|
|
9
|
-
options: {},
|
|
10
|
-
modelValue: {},
|
|
11
|
-
describedBy: {}
|
|
12
|
-
},
|
|
13
|
-
emits: ["update:modelValue"],
|
|
14
|
-
setup(u, { emit: c }) {
|
|
15
|
-
const a = u, m = c, o = r(
|
|
16
|
-
() => a.options.map((e, t) => ({
|
|
17
|
-
id: t.toString(),
|
|
18
|
-
label: e.url ?? ""
|
|
19
|
-
}))
|
|
20
|
-
), s = r({
|
|
21
|
-
get: () => {
|
|
22
|
-
var e;
|
|
23
|
-
return (e = o.value) == null ? void 0 : e.find((t) => t.id === a.modelValue.toString());
|
|
24
|
-
},
|
|
25
|
-
set: (e) => m("update:modelValue", parseInt((e == null ? void 0 : e.id) ?? "", 10))
|
|
26
|
-
});
|
|
27
|
-
return (e, t) => (n(), d(l(h), {
|
|
28
|
-
modelValue: s.value,
|
|
29
|
-
"onUpdate:modelValue": t[0] || (t[0] = (p) => s.value = p),
|
|
30
|
-
class: "text-sm",
|
|
31
|
-
options: o.value,
|
|
32
|
-
resize: "",
|
|
33
|
-
teleport: ""
|
|
34
|
-
}, {
|
|
35
|
-
default: i(() => [
|
|
36
|
-
v(l(_), {
|
|
37
|
-
"aria-describedby": e.describedBy,
|
|
38
|
-
class: V(["url-select", { "pointer-events-none": o.value.length <= 1 }]),
|
|
39
|
-
fullWidth: "",
|
|
40
|
-
variant: "ghost"
|
|
41
|
-
}, {
|
|
42
|
-
default: i(() => [
|
|
43
|
-
b("span", B, [
|
|
44
|
-
S(e.$slots, "default", {}, void 0, !0)
|
|
45
|
-
]),
|
|
46
|
-
o.value.length > 1 ? (n(), d(l(y), {
|
|
47
|
-
key: 0,
|
|
48
|
-
icon: "ChevronDown",
|
|
49
|
-
size: "sm"
|
|
50
|
-
})) : g("", !0)
|
|
51
|
-
]),
|
|
52
|
-
_: 3
|
|
53
|
-
}, 8, ["aria-describedby", "class"])
|
|
54
|
-
]),
|
|
55
|
-
_: 3
|
|
56
|
-
}, 8, ["modelValue", "options"]));
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
export {
|
|
60
|
-
k as default
|
|
61
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ServerVariableValues, ServerVariables } from './types';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
variables?: ServerVariables;
|
|
4
|
-
values?: ServerVariableValues;
|
|
5
|
-
/** The ID of the input controlled by the variables form */
|
|
6
|
-
controls?: string;
|
|
7
|
-
};
|
|
8
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
-
"update:variable": (name: string, value: string) => any;
|
|
10
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
"onUpdate:variable"?: ((name: string, value: string) => any) | undefined;
|
|
12
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
-
export default _default;
|
|
14
|
-
//# sourceMappingURL=ServerVariablesForm.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesForm.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerVariablesForm.vue"],"names":[],"mappings":"AAwFA,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAIpE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;;;;;;AA6IF,wBAOG"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, openBlock as o, createElementBlock as t, Fragment as V, renderList as C, createElementVNode as p, unref as m, toDisplayString as S, createBlock as f, createCommentVNode as $ } from "vue";
|
|
2
|
-
import { nanoid as B } from "nanoid";
|
|
3
|
-
import _ from "./ServerVariablesSelect.vue.js";
|
|
4
|
-
import j from "./ServerVariablesTextbox.vue.js";
|
|
5
|
-
const E = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "variable-container"
|
|
8
|
-
}, F = ["for"], L = /* @__PURE__ */ y({
|
|
9
|
-
__name: "ServerVariablesForm",
|
|
10
|
-
props: {
|
|
11
|
-
variables: {},
|
|
12
|
-
values: {},
|
|
13
|
-
controls: {}
|
|
14
|
-
},
|
|
15
|
-
emits: ["update:variable"],
|
|
16
|
-
setup(g, { emit: h }) {
|
|
17
|
-
const n = g, k = h, s = B();
|
|
18
|
-
function i(r, a) {
|
|
19
|
-
k("update:variable", r, a);
|
|
20
|
-
}
|
|
21
|
-
const c = (r) => {
|
|
22
|
-
var a, e;
|
|
23
|
-
return (((a = n.values) == null ? void 0 : a[r]) ?? ((e = n.variables) == null ? void 0 : e[r].default) ?? "").toString();
|
|
24
|
-
};
|
|
25
|
-
return (r, a) => r.variables && Object.keys(r.variables ?? {}).length ? (o(), t("div", E, [
|
|
26
|
-
(o(!0), t(V, null, C(Object.keys(r.variables), (e) => {
|
|
27
|
-
var b, u, v, d;
|
|
28
|
-
return o(), t("div", {
|
|
29
|
-
key: e,
|
|
30
|
-
class: "variable-container-item"
|
|
31
|
-
}, [
|
|
32
|
-
p("label", {
|
|
33
|
-
class: "variable-label",
|
|
34
|
-
for: `${m(s)}-variable-${e}`
|
|
35
|
-
}, [
|
|
36
|
-
p("code", null, S(e), 1)
|
|
37
|
-
], 8, F),
|
|
38
|
-
(u = (b = r.variables) == null ? void 0 : b[e].enum) != null && u.length ? (o(), f(_, {
|
|
39
|
-
key: 0,
|
|
40
|
-
controls: r.controls,
|
|
41
|
-
enum: ((d = (v = r.variables[e]) == null ? void 0 : v.enum) == null ? void 0 : d.map((l) => `${l}`)) ?? [],
|
|
42
|
-
label: e,
|
|
43
|
-
value: c(e),
|
|
44
|
-
onChange: (l) => i(e, l)
|
|
45
|
-
}, null, 8, ["controls", "enum", "label", "value", "onChange"])) : (o(), f(j, {
|
|
46
|
-
key: 1,
|
|
47
|
-
id: `${m(s)}-variable-${e}`,
|
|
48
|
-
controls: r.controls,
|
|
49
|
-
value: c(e),
|
|
50
|
-
onChange: (l) => i(e, l)
|
|
51
|
-
}, null, 8, ["id", "controls", "value", "onChange"]))
|
|
52
|
-
]);
|
|
53
|
-
}), 128))
|
|
54
|
-
])) : $("", !0);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
export {
|
|
58
|
-
L as default
|
|
59
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
enum: string[];
|
|
3
|
-
value: string;
|
|
4
|
-
controls?: string;
|
|
5
|
-
};
|
|
6
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
-
change: (v: string) => any;
|
|
8
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
-
onChange?: ((v: string) => any) | undefined;
|
|
10
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
-
export default _default;
|
|
12
|
-
//# sourceMappingURL=ServerVariablesSelect.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerVariablesSelect.vue"],"names":[],"mappings":"AAqFA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;;;;;;AA6GF,wBAQG"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { defineComponent as v, computed as s, openBlock as r, createBlock as f, unref as a, withCtx as c, createVNode as i, createElementVNode as S, normalizeClass as V, createElementBlock as h, createCommentVNode as g, createTextVNode as C, toDisplayString as b } from "vue";
|
|
2
|
-
import { ScalarListbox as k, ScalarButton as B, ScalarIcon as N } from "@scalar/components";
|
|
3
|
-
const _ = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "sr-only"
|
|
6
|
-
}, w = /* @__PURE__ */ v({
|
|
7
|
-
__name: "ServerVariablesSelect",
|
|
8
|
-
props: {
|
|
9
|
-
enum: {},
|
|
10
|
-
value: {},
|
|
11
|
-
controls: {}
|
|
12
|
-
},
|
|
13
|
-
emits: ["change"],
|
|
14
|
-
setup(u, { emit: m }) {
|
|
15
|
-
const t = u, d = m, o = s(
|
|
16
|
-
() => t.enum.map((e) => ({ id: e, label: e }))
|
|
17
|
-
), l = s({
|
|
18
|
-
get: () => o.value.find((e) => e.id === t.value),
|
|
19
|
-
set: (e) => d("change", (e == null ? void 0 : e.id) ?? "")
|
|
20
|
-
});
|
|
21
|
-
return (e, n) => (r(), f(a(k), {
|
|
22
|
-
modelValue: l.value,
|
|
23
|
-
"onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
|
|
24
|
-
options: o.value
|
|
25
|
-
}, {
|
|
26
|
-
default: c(() => [
|
|
27
|
-
i(a(B), {
|
|
28
|
-
"aria-controls": e.controls,
|
|
29
|
-
class: "variable-select px-0",
|
|
30
|
-
fullWidth: "",
|
|
31
|
-
variant: "ghost"
|
|
32
|
-
}, {
|
|
33
|
-
default: c(() => [
|
|
34
|
-
S("span", {
|
|
35
|
-
class: V({ "text-c-1": e.value })
|
|
36
|
-
}, [
|
|
37
|
-
e.value ? (r(), h("span", _, " Selected: ")) : g("", !0),
|
|
38
|
-
C(" " + b(e.value || "Select value"), 1)
|
|
39
|
-
], 2),
|
|
40
|
-
i(a(N), {
|
|
41
|
-
icon: "ChevronDown",
|
|
42
|
-
size: "sm"
|
|
43
|
-
})
|
|
44
|
-
]),
|
|
45
|
-
_: 1
|
|
46
|
-
}, 8, ["aria-controls"])
|
|
47
|
-
]),
|
|
48
|
-
_: 1
|
|
49
|
-
}, 8, ["modelValue", "options"]));
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
export {
|
|
53
|
-
w as default
|
|
54
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
value: string;
|
|
3
|
-
controls?: string;
|
|
4
|
-
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
-
change: (v: string) => any;
|
|
7
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
-
onChange?: ((v: string) => any) | undefined;
|
|
9
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLInputElement>;
|
|
10
|
-
export default _default;
|
|
11
|
-
//# sourceMappingURL=ServerVariablesTextbox.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesTextbox.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerVariablesTextbox.vue"],"names":[],"mappings":"AAoDA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;;;;;;AAsEF,wBAQG"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { defineComponent as c, computed as p, withDirectives as i, openBlock as u, createElementBlock as m, vModelText as d } from "vue";
|
|
2
|
-
const v = ["aria-controls"], x = /* @__PURE__ */ c({
|
|
3
|
-
__name: "ServerVariablesTextbox",
|
|
4
|
-
props: {
|
|
5
|
-
value: {},
|
|
6
|
-
controls: {}
|
|
7
|
-
},
|
|
8
|
-
emits: ["change"],
|
|
9
|
-
setup(l, { emit: a }) {
|
|
10
|
-
const n = l, s = a, t = p({
|
|
11
|
-
get: () => n.value,
|
|
12
|
-
set: (e) => s("change", e)
|
|
13
|
-
});
|
|
14
|
-
return (e, o) => i((u(), m("input", {
|
|
15
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r),
|
|
16
|
-
"aria-controls": e.controls,
|
|
17
|
-
autocomplete: "off",
|
|
18
|
-
class: "variable-textbox",
|
|
19
|
-
placeholder: "value",
|
|
20
|
-
spellcheck: "false",
|
|
21
|
-
type: "text"
|
|
22
|
-
}, null, 8, v)), [
|
|
23
|
-
[d, t.value]
|
|
24
|
-
]);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export {
|
|
28
|
-
x as default
|
|
29
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
export type ServerVariables = {
|
|
3
|
-
[variable: string]: ServerVariable;
|
|
4
|
-
};
|
|
5
|
-
export type ServerVariableValues = {
|
|
6
|
-
[variable: string]: string;
|
|
7
|
-
};
|
|
8
|
-
export type ServerVariable = OpenAPIV3.ServerVariableObject | OpenAPIV3_1.ServerVariableObject;
|
|
9
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnE,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,cAAc,GACtB,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,oBAAoB,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import type { Spec } from '@scalar/types/legacy';
|
|
3
|
-
export type DefaultServerUrlOption = {
|
|
4
|
-
/**
|
|
5
|
-
* Sometimes you can’t add an URL to your OpenAPI document, so you can provide a default one here.
|
|
6
|
-
*/
|
|
7
|
-
defaultServerUrl?: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Provide a specification and get the servers from it.
|
|
11
|
-
* If no servers are found, it will default to a specified URL or the current URL.
|
|
12
|
-
* Relative paths will be prepended with the default server URL or the current URL.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getServers(specification: Spec | undefined, options?: DefaultServerUrlOption): (OpenAPIV3.ServerObject | OpenAPIV3_1.ServerObject)[];
|
|
15
|
-
//# sourceMappingURL=getServers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getServers.d.ts","sourceRoot":"","sources":["../../../../src/features/BaseUrl/utils/getServers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,aAAa,EAAE,IAAI,GAAG,SAAS,EAC/B,OAAO,CAAC,EAAE,sBAAsB,yDA8DjC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { findVariables as v, concatenateUrlAndPath as w } from "@scalar/oas-utils/helpers";
|
|
2
|
-
function S(r, l) {
|
|
3
|
-
var a;
|
|
4
|
-
let e = [];
|
|
5
|
-
return r != null && r.servers && (r == null ? void 0 : r.servers.length) > 0 ? e = r.servers : r != null && r.host ? e = [
|
|
6
|
-
{
|
|
7
|
-
url: `${((a = r.schemes) == null ? void 0 : a[0]) ?? "http"}://${r.host}${(r == null ? void 0 : r.basePath) ?? ""}`
|
|
8
|
-
}
|
|
9
|
-
] : e = [
|
|
10
|
-
{
|
|
11
|
-
url: l != null && l.defaultServerUrl ? l == null ? void 0 : l.defaultServerUrl : typeof window < "u" ? window.location.origin : "/"
|
|
12
|
-
}
|
|
13
|
-
], (l != null && l.defaultServerUrl || typeof window < "u") && (e = e.map((d) => b(d, l))), e.map((d) => {
|
|
14
|
-
const h = d.variables ?? {};
|
|
15
|
-
return v(d.url ?? "").filter((u) => !h[u]).forEach((u) => {
|
|
16
|
-
d.variables === void 0 && (d.variables = {}), d.variables[u] = {
|
|
17
|
-
default: ""
|
|
18
|
-
};
|
|
19
|
-
}), d;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
function b(r, l) {
|
|
23
|
-
var e;
|
|
24
|
-
return (e = r.url) != null && e.match(/^(?!(https?|file):\/\/|{).+/) && (r.url = w(
|
|
25
|
-
l != null && l.defaultServerUrl ? l == null ? void 0 : l.defaultServerUrl : typeof window < "u" ? window.location.origin : "",
|
|
26
|
-
r.url
|
|
27
|
-
)), r;
|
|
28
|
-
}
|
|
29
|
-
export {
|
|
30
|
-
S as getServers
|
|
31
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ServerState } from '#legacy';
|
|
2
|
-
import type { OpenAPIV3, OpenAPIV3_1 } from '@scalar/types';
|
|
3
|
-
/**
|
|
4
|
-
* Get the URL from the server state.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getUrlFromServerState(state: ServerState, server?: OpenAPIV3.ServerObject | OpenAPIV3_1.ServerObject): {
|
|
7
|
-
originalUrl: string | undefined;
|
|
8
|
-
modifiedUrl: string | undefined;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=getUrlFromServerState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getUrlFromServerState.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/getUrlFromServerState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3D;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,WAAW,EAClB,MAAM,CAAC,EAAE,SAAS,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY;;;EAkC3D"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { replaceVariables as h, REGEX as E } from "@scalar/oas-utils/helpers";
|
|
2
|
-
function y(n, U) {
|
|
3
|
-
var l, p;
|
|
4
|
-
const o = U ?? ((l = n == null ? void 0 : n.servers) == null ? void 0 : l[n.selectedServer ?? 0]);
|
|
5
|
-
(p = o == null ? void 0 : o.url) != null && p.endsWith("/") && (o.url = o.url.slice(0, -1));
|
|
6
|
-
const _ = o == null ? void 0 : o.url, r = typeof (o == null ? void 0 : o.url) == "string" ? h(o == null ? void 0 : o.url, n.variables) : o == null ? void 0 : o.url, i = r == null ? void 0 : r.match(E.PATH), b = (i == null ? void 0 : i.reduce((u, m) => {
|
|
7
|
-
var g;
|
|
8
|
-
const f = m.replace(/{|}/g, ""), a = (g = n.variables) == null ? void 0 : g[f];
|
|
9
|
-
return u == null ? void 0 : u.replace(
|
|
10
|
-
m,
|
|
11
|
-
a || `__${f.toUpperCase()}__`
|
|
12
|
-
);
|
|
13
|
-
}, r)) ?? r;
|
|
14
|
-
return { originalUrl: _, modifiedUrl: b };
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
y as getUrlFromServerState
|
|
18
|
-
};
|