@scalar/api-reference 1.25.80 → 1.25.82
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/browser/standalone.js +13239 -14204
- 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 +19 -21
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +94 -90
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +22 -20
- package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Description.vue.js +2 -2
- package/dist/components/Content/Introduction/Description.vue2.js +30 -33
- 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 +106 -102
- package/dist/components/Section/CompactSection.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue2.js +14 -14
- package/dist/components/Section/Section.vue.d.ts.map +1 -1
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/Section/Section.vue2.js +16 -19
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue2.js +42 -46
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +4 -4
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +12 -12
- package/dist/features/ApiClientModal/useApiClient.d.ts +28 -28
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +1 -1
- package/dist/helpers/convertRequestToHarRequest.d.ts +1 -1
- package/dist/helpers/convertRequestToHarRequest.d.ts.map +1 -1
- package/dist/helpers/getExampleCode.d.ts +3 -4
- package/dist/helpers/getExampleCode.d.ts.map +1 -1
- package/dist/helpers/getExampleCode.js +12 -31
- package/dist/hooks/useNavState.d.ts +22 -0
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +57 -34
- package/dist/index.js +1 -1
- package/dist/stores/useHttpClientStore.d.ts +3 -4
- package/dist/stores/useHttpClientStore.d.ts.map +1 -1
- package/dist/stores/useHttpClientStore.js +45 -58
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Anchor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Anchor/Anchor.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Anchor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Anchor/Anchor.vue"],"names":[],"mappings":"AA8EA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;CACX,CAAC;AAcF,iBAAS,cAAc;WAiET,OAAO,IAA6B;;yBATrB,GAAG;yBACH,GAAG;;;;EAa/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,8SAOnB,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 "./Anchor.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3cb2dd80"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
import { defineComponent as i, openBlock as
|
|
2
|
-
import { useClipboard as
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as i, openBlock as p, createElementBlock as a, renderSlot as r, createElementVNode as e, withModifiers as u, unref as m, createVNode as f, withCtx as C, createTextVNode as n } from "vue";
|
|
2
|
+
import { useClipboard as b } from "@scalar/use-hooks/useClipboard";
|
|
3
|
+
import k from "../ScreenReader.vue.js";
|
|
4
|
+
import { useNavState as v } from "../../hooks/useNavState.js";
|
|
5
|
+
const y = { class: "label" }, N = { class: "anchor" }, B = /* @__PURE__ */ i({
|
|
5
6
|
__name: "Anchor",
|
|
6
7
|
props: {
|
|
7
8
|
id: {}
|
|
8
9
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const { copyToClipboard: s } =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
n(t.$slots, "default", {}, void 0, !0),
|
|
16
|
-
e("span", c, [
|
|
17
|
-
o[4] || (o[4] = e("span", null, "", -1)),
|
|
10
|
+
setup(c) {
|
|
11
|
+
const { copyToClipboard: s } = b(), { getHashedUrl: l } = v(), d = (o) => l(o);
|
|
12
|
+
return (o, t) => (p(), a("span", y, [
|
|
13
|
+
r(o.$slots, "default", {}, void 0, !0),
|
|
14
|
+
e("span", N, [
|
|
15
|
+
t[4] || (t[4] = e("span", null, "", -1)),
|
|
18
16
|
e("button", {
|
|
19
17
|
class: "anchor-copy",
|
|
20
18
|
type: "button",
|
|
21
|
-
onClick:
|
|
19
|
+
onClick: t[0] || (t[0] = u((S) => m(s)(d(o.id)), ["stop"]))
|
|
22
20
|
}, [
|
|
23
|
-
|
|
24
|
-
f(
|
|
25
|
-
default:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
t[3] || (t[3] = e("span", { "aria-hidden": "true" }, "#", -1)),
|
|
22
|
+
f(k, null, {
|
|
23
|
+
default: C(() => [
|
|
24
|
+
t[1] || (t[1] = n('Copy link to "')),
|
|
25
|
+
r(o.$slots, "default", {}, void 0, !0),
|
|
26
|
+
t[2] || (t[2] = n('"'))
|
|
29
27
|
]),
|
|
30
28
|
_: 3
|
|
31
29
|
})
|
|
@@ -35,5 +33,5 @@ const w = { class: "label" }, c = { class: "anchor" }, S = /* @__PURE__ */ i({
|
|
|
35
33
|
}
|
|
36
34
|
});
|
|
37
35
|
export {
|
|
38
|
-
|
|
36
|
+
B as default
|
|
39
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AAmoBA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,gBAAgB,CAAA;AA4BvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAOjB,KAAK,WAAW,GAAG,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AAuRxD,iBAAS,cAAc;WAoPT,OAAO,IAA6B;;wBAtfZ,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;;;;;EA2f/D;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YApiBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFA2iB9D,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"}
|
|
@@ -2,7 +2,7 @@ import o from "./ApiReferenceLayout.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-42a4b8e7"]]);
|
|
6
6
|
export {
|
|
7
7
|
m as default
|
|
8
8
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useHttpClientStore as
|
|
3
|
-
import { provideUseId as
|
|
4
|
-
import { createWorkspaceStore as
|
|
5
|
-
import { addScalarClassesToHeadless as
|
|
6
|
-
import { defaultStateFactory as
|
|
7
|
-
import { hasObtrusiveScrollbars as
|
|
8
|
-
import { useToasts as
|
|
9
|
-
import { useMediaQuery as
|
|
10
|
-
import
|
|
11
|
-
import { downloadSpecBus as
|
|
12
|
-
import { HIDE_DOWNLOAD_BUTTON_SYMBOL as
|
|
13
|
-
import { useDeprecationWarnings as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { useSidebar as
|
|
18
|
-
import { useNavState as
|
|
19
|
-
import { sleep as
|
|
20
|
-
const
|
|
1
|
+
import { defineComponent as ie, ref as w, computed as h, onBeforeMount as P, onMounted as se, onUnmounted as le, watch as C, onServerPrefetch as de, useSSRContext as ue, getCurrentInstance as ce, provide as p, openBlock as b, createElementBlock as T, Fragment as N, createElementVNode as d, normalizeClass as fe, unref as s, normalizeStyle as pe, renderSlot as u, normalizeProps as c, guardReactiveProps as f, createVNode as g, withCtx as m, createCommentVNode as E, withDirectives as ge, vShow as me, createSlots as Se } from "vue";
|
|
2
|
+
import { useHttpClientStore as ve } from "../stores/useHttpClientStore.js";
|
|
3
|
+
import { provideUseId as he } from "@headlessui/vue";
|
|
4
|
+
import { createWorkspaceStore as be, WORKSPACE_SYMBOL as Te, createActiveEntitiesStore as ye, ACTIVE_ENTITIES_SYMBOL as we } from "@scalar/api-client/store";
|
|
5
|
+
import { addScalarClassesToHeadless as Ce, ScalarErrorBoundary as Ee } from "@scalar/components";
|
|
6
|
+
import { defaultStateFactory as U } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { hasObtrusiveScrollbars as Re, getThemeStyles as Oe } from "@scalar/themes";
|
|
8
|
+
import { useToasts as $e, ScalarToasts as Ie } from "@scalar/use-toasts";
|
|
9
|
+
import { useMediaQuery as Be, useResizeObserver as Le, useDebounceFn as De } from "@vueuse/core";
|
|
10
|
+
import Ae from "./GettingStarted.vue.js";
|
|
11
|
+
import { downloadSpecBus as F, downloadSpecFile as Me } from "../helpers/specDownloads.js";
|
|
12
|
+
import { HIDE_DOWNLOAD_BUTTON_SYMBOL as ke, HIDE_TEST_REQUEST_BUTTON_SYMBOL as Pe, OPENAPI_DOCUMENT_URL_SYMBOL as Ne, INTEGRATION_SYMBOL as Ue } from "../helpers/provideSymbols.js";
|
|
13
|
+
import { useDeprecationWarnings as Fe } from "../hooks/useDeprecationWarnings.js";
|
|
14
|
+
import He from "./Sidebar/Sidebar.vue.js";
|
|
15
|
+
import _e from "./Content/Content.vue.js";
|
|
16
|
+
import Ye from "../features/ApiClientModal/ApiClientModal.vue.js";
|
|
17
|
+
import { useSidebar as ze } from "../hooks/useSidebar.js";
|
|
18
|
+
import { useNavState as We } from "../hooks/useNavState.js";
|
|
19
|
+
import { sleep as Ge } from "../helpers/sleep.js";
|
|
20
|
+
const Ve = ["innerHTML"], Ke = { class: "references-header" }, Qe = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "references-navigation t-doc__sidebar"
|
|
23
|
-
},
|
|
23
|
+
}, je = { class: "references-navigation-list" }, qe = { class: "references-editor" }, Je = { class: "references-editor-textarea" }, Xe = ["aria-label"], Ze = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "references-footer"
|
|
26
|
-
},
|
|
26
|
+
}, ht = /* @__PURE__ */ ie({
|
|
27
27
|
inheritAttrs: !1,
|
|
28
28
|
__name: "ApiReferenceLayout",
|
|
29
29
|
props: {
|
|
@@ -33,14 +33,14 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
33
33
|
},
|
|
34
34
|
emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
|
|
35
35
|
setup(H) {
|
|
36
|
-
const o = H, { initializeToasts: _, toast: Y } =
|
|
36
|
+
const o = H, { initializeToasts: _, toast: Y } = $e();
|
|
37
37
|
_((e) => Y(e));
|
|
38
|
-
const z =
|
|
39
|
-
|
|
38
|
+
const z = Be("(min-width: 1150px)"), W = w("100dvh"), S = w(null);
|
|
39
|
+
Le(S, (e) => {
|
|
40
40
|
W.value = e[0].contentRect.height + "px";
|
|
41
41
|
});
|
|
42
|
-
const
|
|
43
|
-
breadcrumb:
|
|
42
|
+
const G = h(Re), {
|
|
43
|
+
breadcrumb: V,
|
|
44
44
|
collapsedSidebarItems: v,
|
|
45
45
|
isSidebarOpen: K,
|
|
46
46
|
setCollapsedSidebarItem: R,
|
|
@@ -48,51 +48,55 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
48
48
|
defaultOpenAllTags: j,
|
|
49
49
|
setParsedSpec: q,
|
|
50
50
|
scrollToOperation: J
|
|
51
|
-
} =
|
|
52
|
-
|
|
51
|
+
} = ze(), {
|
|
52
|
+
getReferenceHash: O,
|
|
53
|
+
getPathRoutingId: $,
|
|
53
54
|
getSectionId: X,
|
|
54
55
|
getTagId: Z,
|
|
55
|
-
hash:
|
|
56
|
-
isIntersectionEnabled:
|
|
56
|
+
hash: x,
|
|
57
|
+
isIntersectionEnabled: I,
|
|
57
58
|
pathRouting: B,
|
|
58
|
-
updateHash: L
|
|
59
|
-
|
|
59
|
+
updateHash: L,
|
|
60
|
+
replaceUrlState: ee
|
|
61
|
+
} = We();
|
|
60
62
|
B.value = o.configuration.pathRouting, P(() => L());
|
|
61
63
|
const D = async (e) => {
|
|
62
64
|
var t;
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
P(() =>
|
|
65
|
+
I.value = !1, L(), e ? J(e) : (t = S.value) == null || t.scrollTo(0, 0), await Ge(100), I.value = !0;
|
|
66
|
+
}, A = w(0);
|
|
67
|
+
P(() => Ce()), se(() => {
|
|
66
68
|
var r, a, n;
|
|
67
|
-
history.scrollRestoration = "manual",
|
|
68
|
-
|
|
69
|
+
history.scrollRestoration = "manual", F.on(({ specTitle: i }) => {
|
|
70
|
+
Me(o.rawSpec, i);
|
|
69
71
|
});
|
|
70
72
|
const e = (a = (r = S.value) == null ? void 0 : r.parentElement) == null ? void 0 : a.getBoundingClientRect(), t = (n = S.value) == null ? void 0 : n.getBoundingClientRect();
|
|
71
73
|
if (e && t) {
|
|
72
74
|
const i = t.top - e.top;
|
|
73
|
-
|
|
75
|
+
A.value = i < 2 ? 0 : i;
|
|
74
76
|
}
|
|
75
|
-
window.onhashchange = () =>
|
|
77
|
+
window.onhashchange = () => {
|
|
78
|
+
console.log("CHANGED TO: ", O()), D(O());
|
|
79
|
+
}, window.onpopstate = () => B.value && D($(window.location.pathname));
|
|
76
80
|
});
|
|
77
|
-
const
|
|
81
|
+
const te = h(
|
|
78
82
|
() => z.value || !o.configuration.isEditable
|
|
79
|
-
),
|
|
83
|
+
), M = De((e) => {
|
|
80
84
|
if ((e.target.scrollTop ?? 0) < 50) {
|
|
81
85
|
const r = o.configuration.pathRouting ? o.configuration.pathRouting.basePath : window.location.pathname;
|
|
82
|
-
|
|
86
|
+
ee("", r + window.location.search);
|
|
83
87
|
}
|
|
84
88
|
}), l = h(() => ({
|
|
85
|
-
breadcrumb:
|
|
89
|
+
breadcrumb: V.value,
|
|
86
90
|
spec: o.parsedSpec
|
|
87
91
|
}));
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}), C(() => o.parsedSpec, q, { deep: !0 }),
|
|
92
|
+
le(() => {
|
|
93
|
+
F.reset();
|
|
94
|
+
}), C(() => o.parsedSpec, q, { deep: !0 }), de(() => {
|
|
91
95
|
var t, r;
|
|
92
|
-
const e =
|
|
93
|
-
if (e && (e.payload || (e.payload = { data:
|
|
94
|
-
const a =
|
|
95
|
-
|
|
96
|
+
const e = ue();
|
|
97
|
+
if (e && (e.payload || (e.payload = { data: U() }), (t = e.payload).data || (t.data = U()), o.configuration.pathRouting)) {
|
|
98
|
+
const a = $(e.url);
|
|
99
|
+
x.value = a, e.payload.data.hash = a;
|
|
96
100
|
for (const n in v)
|
|
97
101
|
Object.hasOwn(v, n) && delete v[n];
|
|
98
102
|
if (a)
|
|
@@ -103,14 +107,14 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
103
107
|
}
|
|
104
108
|
e.payload.data["useSidebarContent-collapsedSidebarItems"] = v;
|
|
105
109
|
}
|
|
106
|
-
}),
|
|
110
|
+
}), he(() => {
|
|
107
111
|
var a;
|
|
108
|
-
const e =
|
|
112
|
+
const e = ce(), t = "scalar-instance-id";
|
|
109
113
|
if (!e) return t;
|
|
110
114
|
let r = e.uid;
|
|
111
115
|
return typeof window > "u" ? (e.attrs || (e.attrs = {}), e.attrs[t] = r) : (a = e.vnode.el) != null && a.getAttribute && (r = e.vnode.el.getAttribute(t)), `${t}-${r}`;
|
|
112
116
|
});
|
|
113
|
-
const y =
|
|
117
|
+
const y = be({
|
|
114
118
|
isReadOnly: !0,
|
|
115
119
|
proxyUrl: o.configuration.proxy,
|
|
116
120
|
themeId: o.configuration.theme,
|
|
@@ -124,22 +128,22 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
124
128
|
setCollectionSecurity: !0,
|
|
125
129
|
...o.configuration
|
|
126
130
|
})
|
|
127
|
-
), p(
|
|
128
|
-
const
|
|
129
|
-
p(we,
|
|
130
|
-
|
|
131
|
+
), p(Te, y);
|
|
132
|
+
const oe = ye(y);
|
|
133
|
+
p(we, oe), p(
|
|
134
|
+
ke,
|
|
131
135
|
() => o.configuration.hideDownloadButton
|
|
132
136
|
), p(
|
|
133
|
-
|
|
137
|
+
Pe,
|
|
134
138
|
() => o.configuration.hideTestRequestButton
|
|
135
|
-
), p(
|
|
139
|
+
), p(Ne, () => {
|
|
136
140
|
var e;
|
|
137
141
|
return (e = o.configuration.spec) == null ? void 0 : e.url;
|
|
138
142
|
}), p(
|
|
139
|
-
|
|
143
|
+
Ue,
|
|
140
144
|
() => o.configuration._integration !== null ? o.configuration._integration : "vue"
|
|
141
145
|
);
|
|
142
|
-
function
|
|
146
|
+
function k(e, t) {
|
|
143
147
|
C(
|
|
144
148
|
() => o.configuration[e],
|
|
145
149
|
(r) => {
|
|
@@ -148,24 +152,24 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
148
152
|
{ immediate: !0 }
|
|
149
153
|
);
|
|
150
154
|
}
|
|
151
|
-
const { setExcludedClients:
|
|
152
|
-
|
|
153
|
-
const
|
|
155
|
+
const { setExcludedClients: re, setDefaultHttpClient: ae } = ve();
|
|
156
|
+
k("defaultHttpClient", ae), k("hiddenClients", re), Q.value = o.configuration.hideModels ?? !1, j.value = o.configuration.defaultOpenAllTags ?? !1, Fe(o.configuration);
|
|
157
|
+
const ne = h(
|
|
154
158
|
() => `<style>
|
|
155
|
-
${
|
|
159
|
+
${Oe(o.configuration.theme, {
|
|
156
160
|
fonts: o.configuration.withDefaultFonts
|
|
157
161
|
})}</style>`
|
|
158
162
|
);
|
|
159
163
|
return (e, t) => {
|
|
160
164
|
var r, a;
|
|
161
|
-
return b(),
|
|
162
|
-
d("div", { innerHTML:
|
|
165
|
+
return b(), T(N, null, [
|
|
166
|
+
d("div", { innerHTML: ne.value }, null, 8, Ve),
|
|
163
167
|
d("div", {
|
|
164
168
|
ref_key: "documentEl",
|
|
165
169
|
ref: S,
|
|
166
|
-
class:
|
|
170
|
+
class: fe(["scalar-app scalar-api-reference references-layout", [
|
|
167
171
|
{
|
|
168
|
-
"scalar-scrollbars-obtrusive":
|
|
172
|
+
"scalar-scrollbars-obtrusive": G.value,
|
|
169
173
|
"references-editable": e.configuration.isEditable,
|
|
170
174
|
"references-sidebar": e.configuration.showSidebar,
|
|
171
175
|
"references-sidebar-mobile-open": s(K),
|
|
@@ -173,20 +177,20 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
173
177
|
},
|
|
174
178
|
e.$attrs.class
|
|
175
179
|
]]),
|
|
176
|
-
style:
|
|
177
|
-
"--scalar-y-offset": `var(--scalar-custom-header-height, ${
|
|
180
|
+
style: pe({
|
|
181
|
+
"--scalar-y-offset": `var(--scalar-custom-header-height, ${A.value}px)`
|
|
178
182
|
}),
|
|
179
183
|
onScrollPassive: t[4] || (t[4] = //@ts-ignore
|
|
180
|
-
(...n) => s(
|
|
184
|
+
(...n) => s(M) && s(M)(...n))
|
|
181
185
|
}, [
|
|
182
|
-
d("div",
|
|
186
|
+
d("div", Ke, [
|
|
183
187
|
u(e.$slots, "header", c(f(l.value)), void 0, !0)
|
|
184
188
|
]),
|
|
185
|
-
e.configuration.showSidebar ? (b(),
|
|
186
|
-
d("div",
|
|
187
|
-
g(s(
|
|
189
|
+
e.configuration.showSidebar ? (b(), T("aside", Qe, [
|
|
190
|
+
d("div", je, [
|
|
191
|
+
g(s(Ee), null, {
|
|
188
192
|
default: m(() => [
|
|
189
|
-
g(s(
|
|
193
|
+
g(s(He), {
|
|
190
194
|
operationsSorter: e.configuration.operationsSorter,
|
|
191
195
|
parsedSpec: e.parsedSpec,
|
|
192
196
|
tagsSorter: e.configuration.tagsSorter
|
|
@@ -204,24 +208,24 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
204
208
|
})
|
|
205
209
|
])
|
|
206
210
|
])) : E("", !0),
|
|
207
|
-
|
|
208
|
-
d("div",
|
|
211
|
+
ge(d("div", qe, [
|
|
212
|
+
d("div", Je, [
|
|
209
213
|
u(e.$slots, "editor", c(f(l.value)), void 0, !0)
|
|
210
214
|
])
|
|
211
215
|
], 512), [
|
|
212
|
-
[
|
|
216
|
+
[me, e.configuration.isEditable]
|
|
213
217
|
]),
|
|
214
|
-
|
|
218
|
+
te.value ? (b(), T(N, { key: 1 }, [
|
|
215
219
|
d("section", {
|
|
216
220
|
"aria-label": `Open API Documentation for ${(r = e.parsedSpec.info) == null ? void 0 : r.title}`,
|
|
217
221
|
class: "references-rendered"
|
|
218
222
|
}, [
|
|
219
|
-
g(s(
|
|
223
|
+
g(s(_e), {
|
|
220
224
|
baseServerURL: e.configuration.baseServerURL,
|
|
221
225
|
layout: e.configuration.layout,
|
|
222
226
|
parsedSpec: e.parsedSpec,
|
|
223
227
|
servers: e.configuration.servers
|
|
224
|
-
},
|
|
228
|
+
}, Se({
|
|
225
229
|
start: m(() => [
|
|
226
230
|
u(e.$slots, "content-start", c(f(l.value)), void 0, !0)
|
|
227
231
|
]),
|
|
@@ -235,7 +239,7 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
235
239
|
fn: m(() => {
|
|
236
240
|
var n;
|
|
237
241
|
return [
|
|
238
|
-
g(
|
|
242
|
+
g(Ae, {
|
|
239
243
|
theme: ((n = e.configuration) == null ? void 0 : n.theme) || "default",
|
|
240
244
|
onChangeTheme: t[0] || (t[0] = (i) => e.$emit("changeTheme", i)),
|
|
241
245
|
onLinkSwaggerFile: t[1] || (t[1] = (i) => e.$emit("linkSwaggerFile")),
|
|
@@ -247,18 +251,18 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
247
251
|
key: "0"
|
|
248
252
|
} : void 0
|
|
249
253
|
]), 1032, ["baseServerURL", "layout", "parsedSpec", "servers"])
|
|
250
|
-
], 8,
|
|
251
|
-
e.$slots.footer ? (b(),
|
|
254
|
+
], 8, Xe),
|
|
255
|
+
e.$slots.footer ? (b(), T("div", Ze, [
|
|
252
256
|
u(e.$slots, "footer", c(f(l.value)), void 0, !0)
|
|
253
257
|
])) : E("", !0)
|
|
254
258
|
], 64)) : E("", !0),
|
|
255
|
-
g(s(
|
|
259
|
+
g(s(Ye), { configuration: e.configuration }, null, 8, ["configuration"])
|
|
256
260
|
], 38),
|
|
257
|
-
g(s(
|
|
261
|
+
g(s(Ie))
|
|
258
262
|
], 64);
|
|
259
263
|
};
|
|
260
264
|
}
|
|
261
265
|
});
|
|
262
266
|
export {
|
|
263
|
-
|
|
267
|
+
ht as default
|
|
264
268
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientSelector.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ClientSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientSelector.vue"],"names":[],"mappings":";AAiiBA,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ClientSelector.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-2f3ff819"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as S, ref as w, openBlock as l, createElementBlock as r, Fragment as u, renderList as d, unref as t, normalizeClass as c, createElementVNode as s, createVNode as
|
|
2
|
-
import { ScalarIcon as
|
|
1
|
+
import { defineComponent as S, ref as w, openBlock as l, createElementBlock as r, Fragment as u, renderList as d, unref as t, normalizeClass as c, createElementVNode as s, createVNode as f, toDisplayString as m, createCommentVNode as N } from "vue";
|
|
2
|
+
import { ScalarIcon as k } from "@scalar/components";
|
|
3
3
|
import { useHttpClientStore as x } from "../../../stores/useHttpClientStore.js";
|
|
4
4
|
const I = ["onClick"], $ = ["value"], z = ["label"], B = ["aria-label", "value"], M = {
|
|
5
5
|
"aria-hidden": "true",
|
|
@@ -15,16 +15,16 @@ const I = ["onClick"], $ = ["value"], z = ["label"], B = ["aria-label", "value"]
|
|
|
15
15
|
}, J = {
|
|
16
16
|
key: 0,
|
|
17
17
|
"aria-hidden": "true"
|
|
18
|
-
},
|
|
18
|
+
}, E = /* @__PURE__ */ S({
|
|
19
19
|
__name: "ClientSelector",
|
|
20
20
|
setup(L) {
|
|
21
21
|
const {
|
|
22
22
|
httpClient: a,
|
|
23
23
|
setHttpClient: g,
|
|
24
24
|
availableTargets: y,
|
|
25
|
-
getClientTitle:
|
|
26
|
-
getTargetTitle:
|
|
27
|
-
} = x(),
|
|
25
|
+
getClientTitle: p,
|
|
26
|
+
getTargetTitle: v
|
|
27
|
+
} = x(), h = w(), K = [
|
|
28
28
|
{
|
|
29
29
|
targetKey: "shell",
|
|
30
30
|
clientKey: "curl"
|
|
@@ -46,16 +46,18 @@ const I = ["onClick"], $ = ["value"], z = ["label"], B = ["aria-label", "value"]
|
|
|
46
46
|
clientKey: "python3"
|
|
47
47
|
}
|
|
48
48
|
].filter(
|
|
49
|
-
(i) => y.value.find((n) => n.key === i.targetKey && n.clients.find(
|
|
50
|
-
|
|
49
|
+
(i) => y.value.find((n) => n.key === i.targetKey && n.clients.find(
|
|
50
|
+
(e) => e.client === i.clientKey
|
|
51
|
+
))
|
|
52
|
+
), _ = (i) => `programming-language-${i === "js" ? "javascript" : i}`, C = (i) => i.targetKey === a.targetKey && i.clientKey === a.clientKey, b = (i) => K.some(
|
|
51
53
|
(n) => n.targetKey === i.targetKey && n.clientKey === i.clientKey
|
|
52
54
|
);
|
|
53
55
|
return (i, n) => (l(), r("div", {
|
|
54
56
|
ref_key: "containerRef",
|
|
55
|
-
ref:
|
|
57
|
+
ref: h,
|
|
56
58
|
class: "client-libraries-content"
|
|
57
59
|
}, [
|
|
58
|
-
(l(!0), r(u, null, d(t(
|
|
60
|
+
(l(!0), r(u, null, d(t(K), (e) => (l(), r("button", {
|
|
59
61
|
key: e.clientKey,
|
|
60
62
|
"aria-hidden": "true",
|
|
61
63
|
class: c(["client-libraries rendered-code-sdks", {
|
|
@@ -68,12 +70,12 @@ const I = ["onClick"], $ = ["value"], z = ["label"], B = ["aria-label", "value"]
|
|
|
68
70
|
s("div", {
|
|
69
71
|
class: c(`client-libraries-icon__${e.targetKey}`)
|
|
70
72
|
}, [
|
|
71
|
-
|
|
73
|
+
f(t(k), {
|
|
72
74
|
class: "client-libraries-icon",
|
|
73
75
|
icon: _(e.targetKey)
|
|
74
76
|
}, null, 8, ["icon"])
|
|
75
77
|
], 2),
|
|
76
|
-
s("span", null,
|
|
78
|
+
s("span", null, m(t(v)(e)), 1)
|
|
77
79
|
], 10, I))), 128)),
|
|
78
80
|
s("label", {
|
|
79
81
|
class: c(["client-libraries client-libraries__select", {
|
|
@@ -91,18 +93,18 @@ const I = ["onClick"], $ = ["value"], z = ["label"], B = ["aria-label", "value"]
|
|
|
91
93
|
label: e.title
|
|
92
94
|
}, [
|
|
93
95
|
(l(!0), r(u, null, d(e.clients, (o) => (l(), r("option", {
|
|
94
|
-
key: o.
|
|
95
|
-
"aria-label": `${e.title} ${t(
|
|
96
|
+
key: o.client,
|
|
97
|
+
"aria-label": `${e.title} ${t(p)({
|
|
96
98
|
targetKey: e.key,
|
|
97
|
-
clientKey: o.
|
|
99
|
+
clientKey: o.client
|
|
98
100
|
})}`,
|
|
99
101
|
value: JSON.stringify({
|
|
100
102
|
targetKey: e.key,
|
|
101
|
-
clientKey: o.
|
|
103
|
+
clientKey: o.client
|
|
102
104
|
})
|
|
103
|
-
},
|
|
105
|
+
}, m(t(p)({
|
|
104
106
|
targetKey: e.key,
|
|
105
|
-
clientKey: o.
|
|
107
|
+
clientKey: o.client
|
|
106
108
|
})), 9, B))), 128))
|
|
107
109
|
], 8, z))), 128))
|
|
108
110
|
], 40, $),
|
|
@@ -111,7 +113,7 @@ const I = ["onClick"], $ = ["value"], z = ["label"], B = ["aria-label", "value"]
|
|
|
111
113
|
key: 0,
|
|
112
114
|
class: c(`client-libraries-icon__${t(a).targetKey}`)
|
|
113
115
|
}, [
|
|
114
|
-
|
|
116
|
+
f(t(k), {
|
|
115
117
|
class: "client-libraries-icon",
|
|
116
118
|
icon: _(t(a).targetKey)
|
|
117
119
|
}, null, 8, ["icon"])
|
|
@@ -130,5 +132,5 @@ const I = ["onClick"], $ = ["value"], z = ["label"], B = ["aria-label", "value"]
|
|
|
130
132
|
}
|
|
131
133
|
});
|
|
132
134
|
export {
|
|
133
|
-
|
|
135
|
+
E as default
|
|
134
136
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Description.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Description.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Description.vue"],"names":[],"mappings":"AAoIA,KAAK,WAAW,GAAG;IACjB,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;AAuKF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Description.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a9d504b8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|