@scalar/api-reference 1.25.52 → 1.25.53
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 +32 -0
- package/README.md +3 -2
- package/dist/browser/standalone.js +12953 -12838
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js +1 -1
- package/dist/components/Anchor/Anchor.vue2.js +9 -9
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +26 -31
- package/dist/components/Card/CardTab.vue.d.ts.map +1 -1
- package/dist/components/Card/CardTab.vue.js +2 -2
- package/dist/components/Card/CardTab.vue2.js +3 -3
- package/dist/components/Content/Operation/ParameterItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/ParameterItem.vue.js +4 -4
- package/dist/components/Content/Operation/ParameterItem.vue2.js +72 -54
- package/dist/components/Content/Operation/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/TestRequestButton.vue.js +2 -2
- package/dist/components/Content/Operation/TestRequestButton.vue2.js +22 -15
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +114 -88
- package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
- package/dist/components/Content/Tag/Endpoints.vue2.js +79 -64
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +3 -3
- package/dist/components/Content/Tag/Tag.vue2.js +34 -21
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +1 -1
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +3 -9
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +27 -33
- package/dist/features/ApiClientModal/useApiClient.d.ts +140 -12
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +4 -4
- package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +11 -9
- package/dist/features/ExampleRequest/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExamplePicker.vue.js +3 -3
- package/dist/features/ExampleRequest/ExamplePicker.vue2.js +28 -21
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +139 -119
- package/dist/features/ExampleRequest/TextSelect.vue.d.ts +2 -0
- package/dist/features/ExampleRequest/TextSelect.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/TextSelect.vue.js +22 -19
- package/dist/features/ExampleResponses/ExampleResponse.vue.js +3 -3
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +88 -81
- package/dist/index.js +1 -1
- package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +1 -1
- package/dist/legacy/components/SecuritySchemeSelector.vue.js +3 -3
- package/dist/legacy/components/SecuritySchemeSelector.vue2.js +30 -25
- package/dist/style.css +1 -1
- package/package.json +10 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecuritySchemeSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/legacy/components/SecuritySchemeSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SecuritySchemeSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/legacy/components/SecuritySchemeSelector.vue"],"names":[],"mappings":"AAqMA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;;YAUxE,SAAS,CAAC,yBAAyB,GACnC,SAAS,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,GAC7C,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC;;;;YAF/C,SAAS,CAAC,yBAAyB,GACnC,SAAS,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,GAC7C,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC;;;;AAgPrD,wBASG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./SecuritySchemeSelector.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */ o
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9427c485"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,47 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { useApiClient as
|
|
4
|
-
import { useAuthenticationStore as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as z, onMounted as I, onServerPrefetch as K, computed as l, openBlock as S, createElementBlock as P, toDisplayString as m, createBlock as U, unref as s, withCtx as v, createVNode as b, createElementVNode as $, createTextVNode as D, createCommentVNode as E } from "vue";
|
|
2
|
+
import { ScalarListbox as H, ScalarButton as M, ScalarIcon as T } from "@scalar/components";
|
|
3
|
+
import { useApiClient as F } from "../../features/ApiClientModal/useApiClient.js";
|
|
4
|
+
import { useAuthenticationStore as W } from "../stores/useAuthenticationStore.js";
|
|
5
|
+
const q = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "security-scheme-label text-sm text-c-3"
|
|
8
|
-
},
|
|
8
|
+
}, X = /* @__PURE__ */ z({
|
|
9
9
|
__name: "SecuritySchemeSelector",
|
|
10
10
|
props: {
|
|
11
11
|
value: {}
|
|
12
12
|
},
|
|
13
13
|
emits: ["input"],
|
|
14
14
|
setup(A, { emit: w }) {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
c.preferredSecurityScheme ||
|
|
15
|
+
const u = A, C = w, { authentication: c, setAuthentication: O } = W(), { client: p } = F();
|
|
16
|
+
I(() => {
|
|
17
|
+
c.preferredSecurityScheme || i(Object.keys(u.value ?? {})[0] ?? null);
|
|
18
18
|
});
|
|
19
|
-
const
|
|
19
|
+
const i = (e) => {
|
|
20
20
|
var t;
|
|
21
21
|
if (O({
|
|
22
22
|
preferredSecurityScheme: e
|
|
23
23
|
}), (t = p.value) != null && t.store) {
|
|
24
|
-
const {
|
|
25
|
-
|
|
24
|
+
const {
|
|
25
|
+
activeCollection: r,
|
|
26
|
+
collections: o,
|
|
27
|
+
collectionMutators: x,
|
|
28
|
+
securitySchemes: j
|
|
29
|
+
} = p.value.store, f = (r == null ? void 0 : r.uid) ?? Object.keys(o)[0], y = Object.values(j).find(
|
|
30
|
+
({ nameKey: _ }) => _ === e
|
|
26
31
|
);
|
|
27
|
-
y && f &&
|
|
32
|
+
y && f && x.edit(f, "selectedSecuritySchemeUids", [
|
|
28
33
|
y.uid
|
|
29
34
|
]);
|
|
30
35
|
}
|
|
31
36
|
C("input", e);
|
|
32
37
|
};
|
|
33
|
-
|
|
34
|
-
() =>
|
|
38
|
+
K(
|
|
39
|
+
() => i(Object.keys(u.value ?? {})[0] ?? null)
|
|
35
40
|
);
|
|
36
41
|
const B = (e) => !(e != null && e.type), L = (e) => e.type.toLowerCase() === "apikey", g = (e) => e.type === "http" && e.scheme.toLowerCase() === "basic" || e.type.toLowerCase() === "basic", k = (e) => e.type === "http" && e.scheme.toLowerCase() === "bearer", N = (e) => e.type.toLowerCase() === "oauth2", a = (e, t) => `${V(e)} (${t})`, V = (e) => {
|
|
37
42
|
var t, r;
|
|
38
43
|
return B(e) ? "No Authentication" : L(e) ? "API Key" : g(e) ? "Basic Authentication" : k(e) ? "Bearer Authentication" : N(e) ? (t = e.flows) != null && t.implicit ? "OAuth 2.0 Implicit" : (r = e.flows) != null && r.password ? "OAuth 2.0 Password" : "OAuth 2.0" : `${e.type} (not yet supported)`;
|
|
39
|
-
}, n = l(() => Object.keys(
|
|
44
|
+
}, n = l(() => Object.keys(u.value ?? {})), d = l(
|
|
40
45
|
() => n.value.map((e) => {
|
|
41
46
|
var t;
|
|
42
47
|
return {
|
|
43
48
|
id: e,
|
|
44
|
-
label: a((t =
|
|
49
|
+
label: a((t = u.value) == null ? void 0 : t[e], e)
|
|
45
50
|
};
|
|
46
51
|
})
|
|
47
52
|
), h = l({
|
|
@@ -51,11 +56,11 @@ const W = {
|
|
|
51
56
|
(t) => t.id === c.preferredSecurityScheme
|
|
52
57
|
);
|
|
53
58
|
},
|
|
54
|
-
set: (e) =>
|
|
59
|
+
set: (e) => i((e == null ? void 0 : e.id) ?? "")
|
|
55
60
|
});
|
|
56
61
|
return (e, t) => {
|
|
57
62
|
var r;
|
|
58
|
-
return n.value.length === 1 ? (S(),
|
|
63
|
+
return n.value.length === 1 ? (S(), P("div", q, m(a((r = e.value) == null ? void 0 : r[n.value[0]], n.value[0])), 1)) : n.value.length > 1 ? (S(), U(s(H), {
|
|
59
64
|
key: 1,
|
|
60
65
|
modelValue: h.value,
|
|
61
66
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => h.value = o),
|
|
@@ -64,7 +69,7 @@ const W = {
|
|
|
64
69
|
resize: ""
|
|
65
70
|
}, {
|
|
66
71
|
default: v(() => [
|
|
67
|
-
b(s(
|
|
72
|
+
b(s(M), {
|
|
68
73
|
class: "security-scheme-button",
|
|
69
74
|
fullWidth: "",
|
|
70
75
|
variant: "ghost"
|
|
@@ -72,12 +77,12 @@ const W = {
|
|
|
72
77
|
default: v(() => {
|
|
73
78
|
var o;
|
|
74
79
|
return [
|
|
75
|
-
t[1] || (t[1] =
|
|
76
|
-
|
|
80
|
+
t[1] || (t[1] = $("span", { class: "sr-only" }, "Selected:", -1)),
|
|
81
|
+
D(" " + m(s(c).preferredSecurityScheme ? a(
|
|
77
82
|
(o = e.value) == null ? void 0 : o[s(c).preferredSecurityScheme],
|
|
78
83
|
s(c).preferredSecurityScheme
|
|
79
84
|
) : "No Authentication") + " ", 1),
|
|
80
|
-
b(s(
|
|
85
|
+
b(s(T), {
|
|
81
86
|
icon: "ChevronDown",
|
|
82
87
|
size: "xs"
|
|
83
88
|
})
|
|
@@ -87,10 +92,10 @@ const W = {
|
|
|
87
92
|
})
|
|
88
93
|
]),
|
|
89
94
|
_: 1
|
|
90
|
-
}, 8, ["modelValue", "options"])) :
|
|
95
|
+
}, 8, ["modelValue", "options"])) : E("", !0);
|
|
91
96
|
};
|
|
92
97
|
}
|
|
93
98
|
});
|
|
94
99
|
export {
|
|
95
|
-
|
|
100
|
+
X as default
|
|
96
101
|
};
|