@scalar/api-reference 1.25.80 → 1.25.81
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 +24 -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 +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +97 -92
- 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":"AAqoBA,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;AAyRxD,iBAAS,cAAc;WAoPT,OAAO,IAA6B;;wBAxfZ,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;;;;;;EA6f/D;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YAtiBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFA6iB9D,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
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-77b92b77"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a 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 se, ref as w, computed as h, onBeforeMount as k, onMounted as le, onUnmounted as de, watch as C, onServerPrefetch as ue, useSSRContext as ce, getCurrentInstance as fe, provide as p, openBlock as b, createElementBlock as T, Fragment as H, createElementVNode as d, normalizeClass as pe, unref as s, normalizeStyle as ge, renderSlot as u, normalizeProps as c, guardReactiveProps as f, createVNode as g, withCtx as m, createCommentVNode as E, withDirectives as me, vShow as Se, createSlots as ve } from "vue";
|
|
2
|
+
import { useHttpClientStore as he } from "../stores/useHttpClientStore.js";
|
|
3
|
+
import { provideUseId as be } from "@headlessui/vue";
|
|
4
|
+
import { createWorkspaceStore as Te, WORKSPACE_SYMBOL as ye, createActiveEntitiesStore as we, ACTIVE_ENTITIES_SYMBOL as Ce } from "@scalar/api-client/store";
|
|
5
|
+
import { addScalarClassesToHeadless as Ee, ScalarErrorBoundary as Re } from "@scalar/components";
|
|
6
|
+
import { defaultStateFactory as N } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { hasObtrusiveScrollbars as Oe, getThemeStyles as $e } from "@scalar/themes";
|
|
8
|
+
import { useToasts as Ie, ScalarToasts as Be } from "@scalar/use-toasts";
|
|
9
|
+
import { useMediaQuery as Le, useResizeObserver as De, useDebounceFn as Ae } from "@vueuse/core";
|
|
10
|
+
import Me from "./GettingStarted.vue.js";
|
|
11
|
+
import { downloadSpecBus as U, downloadSpecFile as Pe } from "../helpers/specDownloads.js";
|
|
12
|
+
import { HIDE_DOWNLOAD_BUTTON_SYMBOL as ke, HIDE_TEST_REQUEST_BUTTON_SYMBOL as He, 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 _e from "./Sidebar/Sidebar.vue.js";
|
|
15
|
+
import Ye from "./Content/Content.vue.js";
|
|
16
|
+
import ze from "../features/ApiClientModal/ApiClientModal.vue.js";
|
|
17
|
+
import { useSidebar as We } from "../hooks/useSidebar.js";
|
|
18
|
+
import { useNavState as Ge } from "../hooks/useNavState.js";
|
|
19
|
+
import { sleep as Ve } from "../helpers/sleep.js";
|
|
20
|
+
const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "references-navigation t-doc__sidebar"
|
|
23
|
-
},
|
|
23
|
+
}, qe = { class: "references-navigation-list" }, Je = { class: "references-editor" }, Xe = { class: "references-editor-textarea" }, Ze = ["aria-label"], xe = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "references-footer"
|
|
26
|
-
},
|
|
26
|
+
}, bt = /* @__PURE__ */ se({
|
|
27
27
|
inheritAttrs: !1,
|
|
28
28
|
__name: "ApiReferenceLayout",
|
|
29
29
|
props: {
|
|
@@ -32,15 +32,15 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
32
32
|
rawSpec: {}
|
|
33
33
|
},
|
|
34
34
|
emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
|
|
35
|
-
setup(
|
|
36
|
-
const o =
|
|
35
|
+
setup(F) {
|
|
36
|
+
const o = F, { initializeToasts: _, toast: Y } = Ie();
|
|
37
37
|
_((e) => Y(e));
|
|
38
|
-
const z =
|
|
39
|
-
|
|
38
|
+
const z = Le("(min-width: 1150px)"), W = w("100dvh"), S = w(null);
|
|
39
|
+
De(S, (e) => {
|
|
40
40
|
W.value = e[0].contentRect.height + "px";
|
|
41
41
|
});
|
|
42
|
-
const
|
|
43
|
-
breadcrumb:
|
|
42
|
+
const G = h(Oe), {
|
|
43
|
+
breadcrumb: V,
|
|
44
44
|
collapsedSidebarItems: v,
|
|
45
45
|
isSidebarOpen: K,
|
|
46
46
|
setCollapsedSidebarItem: R,
|
|
@@ -48,51 +48,56 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
48
48
|
defaultOpenAllTags: j,
|
|
49
49
|
setParsedSpec: q,
|
|
50
50
|
scrollToOperation: J
|
|
51
|
-
} =
|
|
52
|
-
|
|
51
|
+
} = We(), {
|
|
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
|
-
|
|
60
|
-
|
|
59
|
+
updateHash: L,
|
|
60
|
+
setHashPrefix: ee,
|
|
61
|
+
replaceUrlState: te
|
|
62
|
+
} = Ge();
|
|
63
|
+
ee("some/prefix/is-good/"), B.value = o.configuration.pathRouting, k(() => L());
|
|
61
64
|
const D = async (e) => {
|
|
62
65
|
var t;
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
+
I.value = !1, L(), e ? J(e) : (t = S.value) == null || t.scrollTo(0, 0), await Ve(100), I.value = !0;
|
|
67
|
+
}, A = w(0);
|
|
68
|
+
k(() => Ee()), le(() => {
|
|
66
69
|
var r, a, n;
|
|
67
|
-
history.scrollRestoration = "manual",
|
|
68
|
-
|
|
70
|
+
history.scrollRestoration = "manual", U.on(({ specTitle: i }) => {
|
|
71
|
+
Pe(o.rawSpec, i);
|
|
69
72
|
});
|
|
70
73
|
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
74
|
if (e && t) {
|
|
72
75
|
const i = t.top - e.top;
|
|
73
|
-
|
|
76
|
+
A.value = i < 2 ? 0 : i;
|
|
74
77
|
}
|
|
75
|
-
window.onhashchange = () =>
|
|
78
|
+
window.onhashchange = () => {
|
|
79
|
+
console.log("CHANGED TO: ", O()), D(O());
|
|
80
|
+
}, window.onpopstate = () => B.value && D($(window.location.pathname));
|
|
76
81
|
});
|
|
77
|
-
const
|
|
82
|
+
const oe = h(
|
|
78
83
|
() => z.value || !o.configuration.isEditable
|
|
79
|
-
),
|
|
84
|
+
), M = Ae((e) => {
|
|
80
85
|
if ((e.target.scrollTop ?? 0) < 50) {
|
|
81
86
|
const r = o.configuration.pathRouting ? o.configuration.pathRouting.basePath : window.location.pathname;
|
|
82
|
-
|
|
87
|
+
te("", r + window.location.search);
|
|
83
88
|
}
|
|
84
89
|
}), l = h(() => ({
|
|
85
|
-
breadcrumb:
|
|
90
|
+
breadcrumb: V.value,
|
|
86
91
|
spec: o.parsedSpec
|
|
87
92
|
}));
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}), C(() => o.parsedSpec, q, { deep: !0 }),
|
|
93
|
+
de(() => {
|
|
94
|
+
U.reset();
|
|
95
|
+
}), C(() => o.parsedSpec, q, { deep: !0 }), ue(() => {
|
|
91
96
|
var t, r;
|
|
92
|
-
const e =
|
|
93
|
-
if (e && (e.payload || (e.payload = { data:
|
|
94
|
-
const a =
|
|
95
|
-
|
|
97
|
+
const e = ce();
|
|
98
|
+
if (e && (e.payload || (e.payload = { data: N() }), (t = e.payload).data || (t.data = N()), o.configuration.pathRouting)) {
|
|
99
|
+
const a = $(e.url);
|
|
100
|
+
x.value = a, e.payload.data.hash = a;
|
|
96
101
|
for (const n in v)
|
|
97
102
|
Object.hasOwn(v, n) && delete v[n];
|
|
98
103
|
if (a)
|
|
@@ -103,14 +108,14 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
103
108
|
}
|
|
104
109
|
e.payload.data["useSidebarContent-collapsedSidebarItems"] = v;
|
|
105
110
|
}
|
|
106
|
-
}),
|
|
111
|
+
}), be(() => {
|
|
107
112
|
var a;
|
|
108
|
-
const e =
|
|
113
|
+
const e = fe(), t = "scalar-instance-id";
|
|
109
114
|
if (!e) return t;
|
|
110
115
|
let r = e.uid;
|
|
111
116
|
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
117
|
});
|
|
113
|
-
const y =
|
|
118
|
+
const y = Te({
|
|
114
119
|
isReadOnly: !0,
|
|
115
120
|
proxyUrl: o.configuration.proxy,
|
|
116
121
|
themeId: o.configuration.theme,
|
|
@@ -124,22 +129,22 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
124
129
|
setCollectionSecurity: !0,
|
|
125
130
|
...o.configuration
|
|
126
131
|
})
|
|
127
|
-
), p(
|
|
128
|
-
const
|
|
129
|
-
p(
|
|
130
|
-
|
|
132
|
+
), p(ye, y);
|
|
133
|
+
const re = we(y);
|
|
134
|
+
p(Ce, re), p(
|
|
135
|
+
ke,
|
|
131
136
|
() => o.configuration.hideDownloadButton
|
|
132
137
|
), p(
|
|
133
|
-
|
|
138
|
+
He,
|
|
134
139
|
() => o.configuration.hideTestRequestButton
|
|
135
|
-
), p(
|
|
140
|
+
), p(Ne, () => {
|
|
136
141
|
var e;
|
|
137
142
|
return (e = o.configuration.spec) == null ? void 0 : e.url;
|
|
138
143
|
}), p(
|
|
139
|
-
|
|
144
|
+
Ue,
|
|
140
145
|
() => o.configuration._integration !== null ? o.configuration._integration : "vue"
|
|
141
146
|
);
|
|
142
|
-
function
|
|
147
|
+
function P(e, t) {
|
|
143
148
|
C(
|
|
144
149
|
() => o.configuration[e],
|
|
145
150
|
(r) => {
|
|
@@ -148,24 +153,24 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
148
153
|
{ immediate: !0 }
|
|
149
154
|
);
|
|
150
155
|
}
|
|
151
|
-
const { setExcludedClients:
|
|
152
|
-
|
|
153
|
-
const
|
|
156
|
+
const { setExcludedClients: ae, setDefaultHttpClient: ne } = he();
|
|
157
|
+
P("defaultHttpClient", ne), P("hiddenClients", ae), Q.value = o.configuration.hideModels ?? !1, j.value = o.configuration.defaultOpenAllTags ?? !1, Fe(o.configuration);
|
|
158
|
+
const ie = h(
|
|
154
159
|
() => `<style>
|
|
155
|
-
${
|
|
160
|
+
${$e(o.configuration.theme, {
|
|
156
161
|
fonts: o.configuration.withDefaultFonts
|
|
157
162
|
})}</style>`
|
|
158
163
|
);
|
|
159
164
|
return (e, t) => {
|
|
160
165
|
var r, a;
|
|
161
|
-
return b(),
|
|
162
|
-
d("div", { innerHTML:
|
|
166
|
+
return b(), T(H, null, [
|
|
167
|
+
d("div", { innerHTML: ie.value }, null, 8, Ke),
|
|
163
168
|
d("div", {
|
|
164
169
|
ref_key: "documentEl",
|
|
165
170
|
ref: S,
|
|
166
|
-
class:
|
|
171
|
+
class: pe(["scalar-app scalar-api-reference references-layout", [
|
|
167
172
|
{
|
|
168
|
-
"scalar-scrollbars-obtrusive":
|
|
173
|
+
"scalar-scrollbars-obtrusive": G.value,
|
|
169
174
|
"references-editable": e.configuration.isEditable,
|
|
170
175
|
"references-sidebar": e.configuration.showSidebar,
|
|
171
176
|
"references-sidebar-mobile-open": s(K),
|
|
@@ -173,20 +178,20 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
173
178
|
},
|
|
174
179
|
e.$attrs.class
|
|
175
180
|
]]),
|
|
176
|
-
style:
|
|
177
|
-
"--scalar-y-offset": `var(--scalar-custom-header-height, ${
|
|
181
|
+
style: ge({
|
|
182
|
+
"--scalar-y-offset": `var(--scalar-custom-header-height, ${A.value}px)`
|
|
178
183
|
}),
|
|
179
184
|
onScrollPassive: t[4] || (t[4] = //@ts-ignore
|
|
180
|
-
(...n) => s(
|
|
185
|
+
(...n) => s(M) && s(M)(...n))
|
|
181
186
|
}, [
|
|
182
|
-
d("div",
|
|
187
|
+
d("div", Qe, [
|
|
183
188
|
u(e.$slots, "header", c(f(l.value)), void 0, !0)
|
|
184
189
|
]),
|
|
185
|
-
e.configuration.showSidebar ? (b(),
|
|
186
|
-
d("div",
|
|
187
|
-
g(s(
|
|
190
|
+
e.configuration.showSidebar ? (b(), T("aside", je, [
|
|
191
|
+
d("div", qe, [
|
|
192
|
+
g(s(Re), null, {
|
|
188
193
|
default: m(() => [
|
|
189
|
-
g(s(
|
|
194
|
+
g(s(_e), {
|
|
190
195
|
operationsSorter: e.configuration.operationsSorter,
|
|
191
196
|
parsedSpec: e.parsedSpec,
|
|
192
197
|
tagsSorter: e.configuration.tagsSorter
|
|
@@ -204,24 +209,24 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
204
209
|
})
|
|
205
210
|
])
|
|
206
211
|
])) : E("", !0),
|
|
207
|
-
|
|
208
|
-
d("div",
|
|
212
|
+
me(d("div", Je, [
|
|
213
|
+
d("div", Xe, [
|
|
209
214
|
u(e.$slots, "editor", c(f(l.value)), void 0, !0)
|
|
210
215
|
])
|
|
211
216
|
], 512), [
|
|
212
|
-
[
|
|
217
|
+
[Se, e.configuration.isEditable]
|
|
213
218
|
]),
|
|
214
|
-
|
|
219
|
+
oe.value ? (b(), T(H, { key: 1 }, [
|
|
215
220
|
d("section", {
|
|
216
221
|
"aria-label": `Open API Documentation for ${(r = e.parsedSpec.info) == null ? void 0 : r.title}`,
|
|
217
222
|
class: "references-rendered"
|
|
218
223
|
}, [
|
|
219
|
-
g(s(
|
|
224
|
+
g(s(Ye), {
|
|
220
225
|
baseServerURL: e.configuration.baseServerURL,
|
|
221
226
|
layout: e.configuration.layout,
|
|
222
227
|
parsedSpec: e.parsedSpec,
|
|
223
228
|
servers: e.configuration.servers
|
|
224
|
-
},
|
|
229
|
+
}, ve({
|
|
225
230
|
start: m(() => [
|
|
226
231
|
u(e.$slots, "content-start", c(f(l.value)), void 0, !0)
|
|
227
232
|
]),
|
|
@@ -235,7 +240,7 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
235
240
|
fn: m(() => {
|
|
236
241
|
var n;
|
|
237
242
|
return [
|
|
238
|
-
g(
|
|
243
|
+
g(Me, {
|
|
239
244
|
theme: ((n = e.configuration) == null ? void 0 : n.theme) || "default",
|
|
240
245
|
onChangeTheme: t[0] || (t[0] = (i) => e.$emit("changeTheme", i)),
|
|
241
246
|
onLinkSwaggerFile: t[1] || (t[1] = (i) => e.$emit("linkSwaggerFile")),
|
|
@@ -247,18 +252,18 @@ const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
|
247
252
|
key: "0"
|
|
248
253
|
} : void 0
|
|
249
254
|
]), 1032, ["baseServerURL", "layout", "parsedSpec", "servers"])
|
|
250
|
-
], 8,
|
|
251
|
-
e.$slots.footer ? (b(),
|
|
255
|
+
], 8, Ze),
|
|
256
|
+
e.$slots.footer ? (b(), T("div", xe, [
|
|
252
257
|
u(e.$slots, "footer", c(f(l.value)), void 0, !0)
|
|
253
258
|
])) : E("", !0)
|
|
254
259
|
], 64)) : E("", !0),
|
|
255
|
-
g(s(
|
|
260
|
+
g(s(ze), { configuration: e.configuration }, null, 8, ["configuration"])
|
|
256
261
|
], 38),
|
|
257
|
-
g(s(
|
|
262
|
+
g(s(Be))
|
|
258
263
|
], 64);
|
|
259
264
|
};
|
|
260
265
|
}
|
|
261
266
|
});
|
|
262
267
|
export {
|
|
263
|
-
|
|
268
|
+
bt as default
|
|
264
269
|
};
|
|
@@ -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
|
};
|