@scalar/api-reference 1.25.104 → 1.25.106
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 +34 -0
- package/dist/browser/standalone.js +7083 -7073
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +119 -131
- package/dist/components/Content/Lazy/Loading.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue2.js +2 -2
- package/dist/components/Content/Tag/Endpoints.vue2.js +3 -3
- package/dist/components/Content/Tag/TagList.vue.js +3 -3
- package/dist/components/Section/CompactSection.vue2.js +4 -4
- package/dist/components/Section/Section.vue2.js +3 -3
- package/dist/components/Sidebar/Sidebar.vue2.js +3 -3
- package/dist/components/Sidebar/SidebarElement.vue2.js +6 -6
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
- package/dist/features/DownloadLink/DownloadLink.vue2.js +14 -21
- package/dist/features/Operation/Webhooks.vue.js +3 -3
- package/dist/features/Operation/Webhooks.vue2.js +9 -9
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +34 -49
- package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +34 -31
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +37 -33
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +34 -34
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +12 -12
- package/dist/features/Search/useSearchIndex.js +11 -11
- package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
- package/dist/features/TestRequestButton/TestRequestButton.vue2.js +21 -21
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +59 -60
- package/dist/hooks/useConfig.d.ts +6 -0
- package/dist/hooks/useConfig.d.ts.map +1 -0
- package/dist/hooks/useConfig.js +6 -0
- package/dist/hooks/useNavState.d.ts +8 -3
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +71 -59
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +149 -149
- package/dist/index.js +58 -63
- package/dist/style.css +1 -1
- package/package.json +11 -11
- package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts +0 -7
- package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts.map +0 -1
- package/dist/helpers/provideSymbols.d.ts +0 -7
- package/dist/helpers/provideSymbols.d.ts.map +0 -1
- package/dist/helpers/provideSymbols.js +0 -7
|
@@ -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":"AAknBA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,gBAAgB,CAAA;AAoBvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAOjB,KAAK,WAAW,GAAG,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AA8QxD,iBAAS,cAAc;WAoPT,OAAO,IAA6B;;wBA7eZ,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;;;;;;EAkf/D;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YA3hBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFAkiB9D,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-284ab295"]]);
|
|
6
6
|
export {
|
|
7
7
|
m as default
|
|
8
8
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as ie, ref as w, computed as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
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 v, onBeforeMount as P, onMounted as se, onUnmounted as le, watch as C, onServerPrefetch as de, useSSRContext as ue, getCurrentInstance as ce, provide as T, openBlock as h, createElementBlock as b, Fragment as M, createElementVNode as d, normalizeClass as fe, unref as s, normalizeStyle as pe, renderSlot as u, normalizeProps as c, guardReactiveProps as f, createVNode as p, withCtx as g, createCommentVNode as R, withDirectives as ge, vShow as me, createSlots as Se } from "vue";
|
|
2
|
+
import { CONFIGURATION_SYMBOL as ve } from "../hooks/useConfig.js";
|
|
3
|
+
import { useHttpClientStore as he } from "../stores/useHttpClientStore.js";
|
|
4
|
+
import { provideUseId as be } from "@headlessui/vue";
|
|
5
|
+
import { createWorkspaceStore as ye, WORKSPACE_SYMBOL as we, createActiveEntitiesStore as Ce, ACTIVE_ENTITIES_SYMBOL as Te } from "@scalar/api-client/store";
|
|
6
|
+
import { addScalarClassesToHeadless as Re, ScalarErrorBoundary as $e } from "@scalar/components";
|
|
7
|
+
import { defaultStateFactory as U } from "@scalar/oas-utils/helpers";
|
|
8
|
+
import { hasObtrusiveScrollbars as Ee, getThemeStyles as Ie } from "@scalar/themes";
|
|
9
|
+
import { useToasts as Oe, ScalarToasts as ke } from "@scalar/use-toasts";
|
|
10
|
+
import { useMediaQuery as Le, useResizeObserver as Fe, useDebounceFn as Ae } from "@vueuse/core";
|
|
11
|
+
import Be from "./GettingStarted.vue.js";
|
|
12
|
+
import { downloadSpecBus as D, downloadSpecFile as Pe } from "../helpers/specDownloads.js";
|
|
13
|
+
import { useDeprecationWarnings as Me } from "../hooks/useDeprecationWarnings.js";
|
|
14
|
+
import Ue from "./Sidebar/Sidebar.vue.js";
|
|
15
|
+
import De from "./Content/Content.vue.js";
|
|
16
|
+
import He from "../features/ApiClientModal/ApiClientModal.vue.js";
|
|
17
|
+
import { useSidebar as Ne } from "../hooks/useSidebar.js";
|
|
18
|
+
import { useNavState as ze } from "../hooks/useNavState.js";
|
|
19
|
+
import { sleep as Ye } from "../helpers/sleep.js";
|
|
20
|
+
const Ve = ["innerHTML"], We = { class: "references-header" }, Ge = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "references-navigation t-doc__sidebar"
|
|
23
|
-
},
|
|
23
|
+
}, Ke = { class: "references-navigation-list" }, je = { class: "references-editor" }, Qe = { class: "references-editor-textarea" }, qe = ["aria-label"], Je = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "references-footer"
|
|
26
|
-
},
|
|
26
|
+
}, mt = /* @__PURE__ */ ie({
|
|
27
27
|
inheritAttrs: !1,
|
|
28
28
|
__name: "ApiReferenceLayout",
|
|
29
29
|
props: {
|
|
@@ -32,89 +32,89 @@ const Ge = ["innerHTML"], Ke = { class: "references-header" }, Qe = {
|
|
|
32
32
|
rawSpec: {}
|
|
33
33
|
},
|
|
34
34
|
emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
|
|
35
|
-
setup(
|
|
36
|
-
const o =
|
|
37
|
-
|
|
38
|
-
const Y =
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
setup(H) {
|
|
36
|
+
const o = H, { initializeToasts: N, toast: z } = Oe();
|
|
37
|
+
N((e) => z(e));
|
|
38
|
+
const Y = Le("(min-width: 1150px)"), V = w("100dvh"), m = w(null);
|
|
39
|
+
Fe(m, (e) => {
|
|
40
|
+
V.value = e[0].contentRect.height + "px";
|
|
41
41
|
});
|
|
42
|
-
const W =
|
|
43
|
-
breadcrumb:
|
|
44
|
-
collapsedSidebarItems:
|
|
45
|
-
isSidebarOpen:
|
|
46
|
-
setCollapsedSidebarItem:
|
|
47
|
-
hideModels:
|
|
42
|
+
const W = v(Ee), {
|
|
43
|
+
breadcrumb: G,
|
|
44
|
+
collapsedSidebarItems: S,
|
|
45
|
+
isSidebarOpen: K,
|
|
46
|
+
setCollapsedSidebarItem: $,
|
|
47
|
+
hideModels: j,
|
|
48
48
|
defaultOpenAllTags: Q,
|
|
49
|
-
setParsedSpec:
|
|
50
|
-
scrollToOperation:
|
|
51
|
-
} =
|
|
52
|
-
getReferenceHash:
|
|
53
|
-
getPathRoutingId:
|
|
54
|
-
getSectionId:
|
|
55
|
-
getTagId:
|
|
49
|
+
setParsedSpec: q,
|
|
50
|
+
scrollToOperation: J
|
|
51
|
+
} = Ne(), {
|
|
52
|
+
getReferenceHash: X,
|
|
53
|
+
getPathRoutingId: E,
|
|
54
|
+
getSectionId: Z,
|
|
55
|
+
getTagId: _,
|
|
56
56
|
hash: x,
|
|
57
|
-
isIntersectionEnabled:
|
|
58
|
-
pathRouting:
|
|
59
|
-
updateHash:
|
|
57
|
+
isIntersectionEnabled: I,
|
|
58
|
+
pathRouting: O,
|
|
59
|
+
updateHash: k,
|
|
60
60
|
replaceUrlState: ee
|
|
61
|
-
} =
|
|
62
|
-
|
|
61
|
+
} = ze();
|
|
62
|
+
O.value = o.configuration.pathRouting, P(() => k());
|
|
63
63
|
const L = async (e) => {
|
|
64
64
|
var t;
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
var r,
|
|
69
|
-
history.scrollRestoration = "manual",
|
|
70
|
-
|
|
65
|
+
I.value = !1, k(), e ? J(e) : (t = m.value) == null || t.scrollTo(0, 0), await Ye(100), I.value = !0;
|
|
66
|
+
}, F = w(0);
|
|
67
|
+
P(() => Re()), se(() => {
|
|
68
|
+
var r, a, n;
|
|
69
|
+
history.scrollRestoration = "manual", D.on(({ specTitle: i }) => {
|
|
70
|
+
Pe(o.rawSpec, i);
|
|
71
71
|
});
|
|
72
|
-
const e = (
|
|
72
|
+
const e = (a = (r = m.value) == null ? void 0 : r.parentElement) == null ? void 0 : a.getBoundingClientRect(), t = (n = m.value) == null ? void 0 : n.getBoundingClientRect();
|
|
73
73
|
if (e && t) {
|
|
74
74
|
const i = t.top - e.top;
|
|
75
|
-
|
|
75
|
+
F.value = i < 2 ? 0 : i;
|
|
76
76
|
}
|
|
77
77
|
window.onhashchange = () => {
|
|
78
|
-
L(
|
|
79
|
-
}, window.onpopstate = () =>
|
|
78
|
+
L(X());
|
|
79
|
+
}, window.onpopstate = () => O.value && L(E(window.location.pathname));
|
|
80
80
|
});
|
|
81
|
-
const te =
|
|
81
|
+
const te = v(
|
|
82
82
|
() => Y.value || !o.configuration.isEditable
|
|
83
|
-
),
|
|
83
|
+
), A = Ae((e) => {
|
|
84
84
|
if ((e.target.scrollTop ?? 0) < 50) {
|
|
85
85
|
const r = o.configuration.pathRouting ? o.configuration.pathRouting.basePath : window.location.pathname;
|
|
86
86
|
ee("", r + window.location.search);
|
|
87
87
|
}
|
|
88
|
-
}), l =
|
|
89
|
-
breadcrumb:
|
|
88
|
+
}), l = v(() => ({
|
|
89
|
+
breadcrumb: G.value,
|
|
90
90
|
spec: o.parsedSpec
|
|
91
91
|
}));
|
|
92
92
|
le(() => {
|
|
93
|
-
|
|
94
|
-
}), C(() => o.parsedSpec,
|
|
93
|
+
D.reset();
|
|
94
|
+
}), C(() => o.parsedSpec, q, { deep: !0 }), de(() => {
|
|
95
95
|
var t, r;
|
|
96
96
|
const e = ue();
|
|
97
|
-
if (e && (e.payload || (e.payload = { data:
|
|
98
|
-
const
|
|
99
|
-
x.value =
|
|
100
|
-
for (const
|
|
101
|
-
Object.hasOwn(
|
|
102
|
-
if (
|
|
103
|
-
|
|
97
|
+
if (e && (e.payload || (e.payload = { data: U() }), (t = e.payload).data || (t.data = U()), o.configuration.pathRouting)) {
|
|
98
|
+
const a = E(e.url);
|
|
99
|
+
x.value = a, e.payload.data.hash = a;
|
|
100
|
+
for (const n in S)
|
|
101
|
+
Object.hasOwn(S, n) && delete S[n];
|
|
102
|
+
if (a)
|
|
103
|
+
$(Z(a), !0);
|
|
104
104
|
else {
|
|
105
|
-
const
|
|
106
|
-
|
|
105
|
+
const n = (r = o.parsedSpec.tags) == null ? void 0 : r[0];
|
|
106
|
+
n && $(_(n), !0);
|
|
107
107
|
}
|
|
108
|
-
e.payload.data["useSidebarContent-collapsedSidebarItems"] =
|
|
108
|
+
e.payload.data["useSidebarContent-collapsedSidebarItems"] = S;
|
|
109
109
|
}
|
|
110
|
-
}),
|
|
111
|
-
var
|
|
110
|
+
}), be(() => {
|
|
111
|
+
var a;
|
|
112
112
|
const e = ce(), t = "scalar-instance-id";
|
|
113
113
|
if (!e) return t;
|
|
114
114
|
let r = e.uid;
|
|
115
|
-
return typeof window > "u" ? (e.attrs || (e.attrs = {}), e.attrs[t] = r) : (
|
|
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}`;
|
|
116
116
|
});
|
|
117
|
-
const
|
|
117
|
+
const y = ye({
|
|
118
118
|
isReadOnly: !0,
|
|
119
119
|
proxyUrl: o.configuration.proxyUrl || o.configuration.proxy,
|
|
120
120
|
themeId: o.configuration.theme,
|
|
@@ -126,7 +126,7 @@ const Ge = ["innerHTML"], Ke = { class: "references-header" }, Qe = {
|
|
|
126
126
|
() => o.rawSpec,
|
|
127
127
|
(e) => {
|
|
128
128
|
var t;
|
|
129
|
-
return e &&
|
|
129
|
+
return e && y.importSpecFile(e, "default", {
|
|
130
130
|
shouldLoad: !1,
|
|
131
131
|
documentUrl: (t = o.configuration.spec) == null ? void 0 : t.url,
|
|
132
132
|
setCollectionSecurity: !0,
|
|
@@ -134,22 +134,10 @@ const Ge = ["innerHTML"], Ke = { class: "references-header" }, Qe = {
|
|
|
134
134
|
});
|
|
135
135
|
},
|
|
136
136
|
{ immediate: !0 }
|
|
137
|
-
),
|
|
138
|
-
const oe =
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
() => o.configuration.hideDownloadButton
|
|
142
|
-
), p(
|
|
143
|
-
Ae,
|
|
144
|
-
() => o.configuration.hideTestRequestButton
|
|
145
|
-
), p(Pe, () => {
|
|
146
|
-
var e;
|
|
147
|
-
return (e = o.configuration.spec) == null ? void 0 : e.url;
|
|
148
|
-
}), p(
|
|
149
|
-
Fe,
|
|
150
|
-
() => o.configuration._integration !== null ? o.configuration._integration : "vue"
|
|
151
|
-
);
|
|
152
|
-
function U(e, t) {
|
|
137
|
+
), T(we, y);
|
|
138
|
+
const oe = Ce(y);
|
|
139
|
+
T(Te, oe), T(ve, o.configuration);
|
|
140
|
+
function B(e, t) {
|
|
153
141
|
C(
|
|
154
142
|
() => o.configuration[e],
|
|
155
143
|
(r) => {
|
|
@@ -158,53 +146,53 @@ const Ge = ["innerHTML"], Ke = { class: "references-header" }, Qe = {
|
|
|
158
146
|
{ immediate: !0 }
|
|
159
147
|
);
|
|
160
148
|
}
|
|
161
|
-
const { setExcludedClients: re, setDefaultHttpClient:
|
|
162
|
-
|
|
163
|
-
const
|
|
149
|
+
const { setExcludedClients: re, setDefaultHttpClient: ae } = he();
|
|
150
|
+
B("defaultHttpClient", ae), B("hiddenClients", re), j.value = o.configuration.hideModels ?? !1, Q.value = o.configuration.defaultOpenAllTags ?? !1, Me(o.configuration);
|
|
151
|
+
const ne = v(
|
|
164
152
|
() => `<style>
|
|
165
|
-
${
|
|
153
|
+
${Ie(o.configuration.theme, {
|
|
166
154
|
fonts: o.configuration.withDefaultFonts
|
|
167
155
|
})}</style>`
|
|
168
156
|
);
|
|
169
157
|
return (e, t) => {
|
|
170
|
-
var r,
|
|
171
|
-
return
|
|
172
|
-
d("div", { innerHTML:
|
|
158
|
+
var r, a;
|
|
159
|
+
return h(), b(M, null, [
|
|
160
|
+
d("div", { innerHTML: ne.value }, null, 8, Ve),
|
|
173
161
|
d("div", {
|
|
174
162
|
ref_key: "documentEl",
|
|
175
|
-
ref:
|
|
163
|
+
ref: m,
|
|
176
164
|
class: fe(["scalar-app scalar-api-reference references-layout", [
|
|
177
165
|
{
|
|
178
166
|
"scalar-scrollbars-obtrusive": W.value,
|
|
179
167
|
"references-editable": e.configuration.isEditable,
|
|
180
168
|
"references-sidebar": e.configuration.showSidebar,
|
|
181
|
-
"references-sidebar-mobile-open": s(
|
|
169
|
+
"references-sidebar-mobile-open": s(K),
|
|
182
170
|
"references-classic": e.configuration.layout === "classic"
|
|
183
171
|
},
|
|
184
172
|
e.$attrs.class
|
|
185
173
|
]]),
|
|
186
174
|
style: pe({
|
|
187
|
-
"--scalar-y-offset": `var(--scalar-custom-header-height, ${
|
|
175
|
+
"--scalar-y-offset": `var(--scalar-custom-header-height, ${F.value}px)`
|
|
188
176
|
}),
|
|
189
177
|
onScrollPassive: t[4] || (t[4] = //@ts-ignore
|
|
190
|
-
(...
|
|
178
|
+
(...n) => s(A) && s(A)(...n))
|
|
191
179
|
}, [
|
|
192
|
-
d("div",
|
|
180
|
+
d("div", We, [
|
|
193
181
|
u(e.$slots, "header", c(f(l.value)), void 0, !0)
|
|
194
182
|
]),
|
|
195
|
-
e.configuration.showSidebar ? (
|
|
196
|
-
d("div",
|
|
197
|
-
|
|
198
|
-
default:
|
|
199
|
-
|
|
183
|
+
e.configuration.showSidebar ? (h(), b("aside", Ge, [
|
|
184
|
+
d("div", Ke, [
|
|
185
|
+
p(s($e), null, {
|
|
186
|
+
default: g(() => [
|
|
187
|
+
p(s(Ue), {
|
|
200
188
|
operationsSorter: e.configuration.operationsSorter,
|
|
201
189
|
parsedSpec: e.parsedSpec,
|
|
202
190
|
tagsSorter: e.configuration.tagsSorter
|
|
203
191
|
}, {
|
|
204
|
-
"sidebar-start":
|
|
192
|
+
"sidebar-start": g(() => [
|
|
205
193
|
u(e.$slots, "sidebar-start", c(f(l.value)), void 0, !0)
|
|
206
194
|
]),
|
|
207
|
-
"sidebar-end":
|
|
195
|
+
"sidebar-end": g(() => [
|
|
208
196
|
u(e.$slots, "sidebar-end", c(f(l.value)), void 0, !0)
|
|
209
197
|
]),
|
|
210
198
|
_: 3
|
|
@@ -213,40 +201,40 @@ const Ge = ["innerHTML"], Ke = { class: "references-header" }, Qe = {
|
|
|
213
201
|
_: 3
|
|
214
202
|
})
|
|
215
203
|
])
|
|
216
|
-
])) :
|
|
217
|
-
ge(d("div",
|
|
218
|
-
d("div",
|
|
204
|
+
])) : R("", !0),
|
|
205
|
+
ge(d("div", je, [
|
|
206
|
+
d("div", Qe, [
|
|
219
207
|
u(e.$slots, "editor", c(f(l.value)), void 0, !0)
|
|
220
208
|
])
|
|
221
209
|
], 512), [
|
|
222
210
|
[me, e.configuration.isEditable]
|
|
223
211
|
]),
|
|
224
|
-
te.value ? (
|
|
212
|
+
te.value ? (h(), b(M, { key: 1 }, [
|
|
225
213
|
d("section", {
|
|
226
214
|
"aria-label": `Open API Documentation for ${(r = e.parsedSpec.info) == null ? void 0 : r.title}`,
|
|
227
215
|
class: "references-rendered"
|
|
228
216
|
}, [
|
|
229
|
-
|
|
217
|
+
p(s(De), {
|
|
230
218
|
baseServerURL: e.configuration.baseServerURL,
|
|
231
219
|
layout: e.configuration.layout,
|
|
232
220
|
parsedSpec: e.parsedSpec,
|
|
233
221
|
servers: e.configuration.servers
|
|
234
222
|
}, Se({
|
|
235
|
-
start:
|
|
223
|
+
start: g(() => [
|
|
236
224
|
u(e.$slots, "content-start", c(f(l.value)), void 0, !0)
|
|
237
225
|
]),
|
|
238
|
-
end:
|
|
226
|
+
end: g(() => [
|
|
239
227
|
u(e.$slots, "content-end", c(f(l.value)), void 0, !0)
|
|
240
228
|
]),
|
|
241
229
|
_: 2
|
|
242
230
|
}, [
|
|
243
|
-
(
|
|
231
|
+
(a = e.configuration) != null && a.isEditable ? {
|
|
244
232
|
name: "empty-state",
|
|
245
|
-
fn:
|
|
246
|
-
var
|
|
233
|
+
fn: g(() => {
|
|
234
|
+
var n;
|
|
247
235
|
return [
|
|
248
|
-
|
|
249
|
-
theme: ((
|
|
236
|
+
p(Be, {
|
|
237
|
+
theme: ((n = e.configuration) == null ? void 0 : n.theme) || "default",
|
|
250
238
|
onChangeTheme: t[0] || (t[0] = (i) => e.$emit("changeTheme", i)),
|
|
251
239
|
onLinkSwaggerFile: t[1] || (t[1] = (i) => e.$emit("linkSwaggerFile")),
|
|
252
240
|
onLoadSwaggerFile: t[2] || (t[2] = (i) => e.$emit("loadSwaggerFile")),
|
|
@@ -257,18 +245,18 @@ const Ge = ["innerHTML"], Ke = { class: "references-header" }, Qe = {
|
|
|
257
245
|
key: "0"
|
|
258
246
|
} : void 0
|
|
259
247
|
]), 1032, ["baseServerURL", "layout", "parsedSpec", "servers"])
|
|
260
|
-
], 8,
|
|
261
|
-
e.$slots.footer ? (
|
|
248
|
+
], 8, qe),
|
|
249
|
+
e.$slots.footer ? (h(), b("div", Je, [
|
|
262
250
|
u(e.$slots, "footer", c(f(l.value)), void 0, !0)
|
|
263
|
-
])) :
|
|
264
|
-
], 64)) :
|
|
265
|
-
|
|
251
|
+
])) : R("", !0)
|
|
252
|
+
], 64)) : R("", !0),
|
|
253
|
+
p(s(He), { configuration: e.configuration }, null, 8, ["configuration"])
|
|
266
254
|
], 38),
|
|
267
|
-
|
|
255
|
+
p(s(ke))
|
|
268
256
|
], 64);
|
|
269
257
|
};
|
|
270
258
|
}
|
|
271
259
|
});
|
|
272
260
|
export {
|
|
273
|
-
|
|
261
|
+
mt as default
|
|
274
262
|
};
|
|
@@ -9,9 +9,9 @@ import Z from "../../Section/SectionContent.vue.js";
|
|
|
9
9
|
import ee from "../../Section/SectionHeader.vue.js";
|
|
10
10
|
import te from "../../Anchor/Anchor.vue.js";
|
|
11
11
|
import oe from "../Schema/Schema.vue.js";
|
|
12
|
+
import { useNavState as re } from "../../../hooks/useNavState.js";
|
|
12
13
|
import { getModels as g } from "../../../helpers/getModels.js";
|
|
13
14
|
import { scrollToId as C } from "../../../helpers/scrollToId.js";
|
|
14
|
-
import { useNavState as re } from "../../../hooks/useNavState.js";
|
|
15
15
|
const ye = /* @__PURE__ */ K({
|
|
16
16
|
__name: "Loading",
|
|
17
17
|
props: {
|
|
@@ -111,7 +111,7 @@ const ye = /* @__PURE__ */ K({
|
|
|
111
111
|
T(t(ee), { level: 2 }, {
|
|
112
112
|
default: p(() => [
|
|
113
113
|
T(t(te), {
|
|
114
|
-
id: t(z)(e)
|
|
114
|
+
id: t(z)({ name: e })
|
|
115
115
|
}, {
|
|
116
116
|
default: p(() => {
|
|
117
117
|
var c;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Models.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7c1cd4b4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -43,13 +43,13 @@ const p = 10, J = /* @__PURE__ */ v({
|
|
|
43
43
|
class: M(["models-list", { "models-list-truncated": !m.value }])
|
|
44
44
|
}, [
|
|
45
45
|
(a(!0), b(N, null, g(_.value, (o) => (a(), i(e(f), {
|
|
46
|
-
id: e(s)(o),
|
|
46
|
+
id: e(s)({ name: o }),
|
|
47
47
|
key: o,
|
|
48
48
|
isLazy: ""
|
|
49
49
|
}, {
|
|
50
50
|
default: t(() => [
|
|
51
51
|
l(e(E), {
|
|
52
|
-
id: e(s)(o),
|
|
52
|
+
id: e(s)({ name: o }),
|
|
53
53
|
class: "models-list-item",
|
|
54
54
|
label: o
|
|
55
55
|
}, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ModelsAccordion.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4396a256"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -33,13 +33,13 @@ const O = {
|
|
|
33
33
|
]),
|
|
34
34
|
default: o(() => [
|
|
35
35
|
(t(!0), s(v, null, k(q.value, ({ name: l, schema: r }) => (t(), c(e(M), {
|
|
36
|
-
id: e(a)(l),
|
|
36
|
+
id: e(a)({ name: l }),
|
|
37
37
|
key: l,
|
|
38
38
|
label: l
|
|
39
39
|
}, {
|
|
40
40
|
title: o(() => [
|
|
41
41
|
d(e(V), {
|
|
42
|
-
id: e(a)(l),
|
|
42
|
+
id: e(a)({ name: l }),
|
|
43
43
|
class: "reference-models-anchor"
|
|
44
44
|
}, {
|
|
45
45
|
default: o(() => [
|
|
@@ -11,8 +11,8 @@ import A from "../../Card/Card.vue.js";
|
|
|
11
11
|
import D from "../../Card/CardHeader.vue.js";
|
|
12
12
|
import F from "../../Card/CardContent.vue.js";
|
|
13
13
|
import L from "../../HttpMethod/HttpMethod.vue.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { useNavState as R } from "../../../hooks/useNavState.js";
|
|
15
|
+
import { useSidebar as U } from "../../../hooks/useSidebar.js";
|
|
16
16
|
const j = ["aria-label"], q = ["href", "onClick"], ne = /* @__PURE__ */ y({
|
|
17
17
|
__name: "Endpoints",
|
|
18
18
|
props: {
|
|
@@ -21,7 +21,7 @@ const j = ["aria-label"], q = ["href", "onClick"], ne = /* @__PURE__ */ y({
|
|
|
21
21
|
isCollapsed: { type: Boolean }
|
|
22
22
|
},
|
|
23
23
|
setup(_) {
|
|
24
|
-
const s = _, { getOperationId: i, getTagId: S } =
|
|
24
|
+
const s = _, { getOperationId: i, getTagId: S } = R(), { scrollToOperation: k } = U(), d = N(() => s.tag["x-displayName"] ?? s.tag.name), v = async (t) => {
|
|
25
25
|
const r = i(t, s.tag);
|
|
26
26
|
k(r);
|
|
27
27
|
};
|
|
@@ -5,8 +5,8 @@ import $ from "./TagAccordion.vue.js";
|
|
|
5
5
|
import b from "./Tag.vue.js";
|
|
6
6
|
import f from "../Lazy/Lazy.vue2.js";
|
|
7
7
|
import x from "../../../features/Operation/Operation.vue.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { useNavState as C } from "../../../hooks/useNavState.js";
|
|
9
|
+
import { useSidebar as N } from "../../../hooks/useSidebar.js";
|
|
10
10
|
const J = /* @__PURE__ */ g({
|
|
11
11
|
__name: "TagList",
|
|
12
12
|
props: {
|
|
@@ -15,7 +15,7 @@ const J = /* @__PURE__ */ g({
|
|
|
15
15
|
layout: {}
|
|
16
16
|
},
|
|
17
17
|
setup(y) {
|
|
18
|
-
const c = y, { getOperationId: m, getTagId: o, hash: _ } =
|
|
18
|
+
const c = y, { getOperationId: m, getTagId: o, hash: _ } = C(), { collapsedSidebarItems: h } = N(), { requests: L, requestExamples: S, securitySchemes: k } = I(), q = v(
|
|
19
19
|
() => c.layout === "classic" ? $ : b
|
|
20
20
|
), z = c.layout !== "classic" && !_.value.startsWith("model");
|
|
21
21
|
return (u, V) => (r(!0), l(n, null, p(u.tags, (t) => (r(), i(e(f), {
|
|
@@ -2,8 +2,8 @@ import { defineComponent as d, ref as m, watch as p, nextTick as u, openBlock as
|
|
|
2
2
|
import { ScalarIcon as g } from "@scalar/components";
|
|
3
3
|
import S from "../Anchor/Anchor.vue.js";
|
|
4
4
|
import _ from "./Section.vue.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useNavState as w } from "../../hooks/useNavState.js";
|
|
6
|
+
import { scrollToId as N } from "../../helpers/scrollToId.js";
|
|
7
7
|
const B = ["aria-expanded"], V = ["id"], A = /* @__PURE__ */ d({
|
|
8
8
|
__name: "CompactSection",
|
|
9
9
|
props: {
|
|
@@ -11,11 +11,11 @@ const B = ["aria-expanded"], V = ["id"], A = /* @__PURE__ */ d({
|
|
|
11
11
|
label: {}
|
|
12
12
|
},
|
|
13
13
|
setup(s) {
|
|
14
|
-
const t = s, { hash: c } =
|
|
14
|
+
const t = s, { hash: c } = w(), e = m(!1);
|
|
15
15
|
return p(
|
|
16
16
|
c,
|
|
17
17
|
async (o) => {
|
|
18
|
-
o === t.id && !e.value && (e.value = !0, await u(),
|
|
18
|
+
o === t.id && !e.value && (e.value = !0, await u(), N(t.id));
|
|
19
19
|
},
|
|
20
20
|
{ immediate: !0 }
|
|
21
21
|
), (o, l) => (a(), f("div", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, openBlock as c, createBlock as m, withCtx as p, renderSlot as f } from "vue";
|
|
2
2
|
import u from "../IntersectionObserver.vue.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useNavState as S } from "../../hooks/useNavState.js";
|
|
4
|
+
import { useSidebar as _ } from "../../hooks/useSidebar.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "Section",
|
|
7
7
|
props: {
|
|
@@ -9,7 +9,7 @@ const v = /* @__PURE__ */ d({
|
|
|
9
9
|
label: {}
|
|
10
10
|
},
|
|
11
11
|
setup(i) {
|
|
12
|
-
const e = i, { getSectionId: r, isIntersectionEnabled: n, replaceUrlState: s } =
|
|
12
|
+
const e = i, { getSectionId: r, isIntersectionEnabled: n, replaceUrlState: s } = S(), { setCollapsedSidebarItem: a } = _();
|
|
13
13
|
function l() {
|
|
14
14
|
var t, o;
|
|
15
15
|
!e.label || !n.value || (s(e.id ?? ""), ((t = e.id) != null && t.startsWith("model") || (o = e.id) != null && o.startsWith("webhook")) && a(r(e.id), !0));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as B, ref as E, watch as F, onMounted as N, openBlock as r, createElementBlock as i, renderSlot as C, createElementVNode as V, createVNode as I, withCtx as b, Fragment as d, renderList as v, unref as a, toDisplayString as L, createBlock as u, createCommentVNode as h } from "vue";
|
|
2
2
|
import y from "./SidebarElement.vue.js";
|
|
3
3
|
import g from "./SidebarGroup.vue.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useNavState as G } from "../../hooks/useNavState.js";
|
|
5
|
+
import { useSidebar as D } from "../../hooks/useSidebar.js";
|
|
5
6
|
import { sleep as w } from "../../helpers/sleep.js";
|
|
6
|
-
import { useNavState as D } from "../../hooks/useNavState.js";
|
|
7
7
|
const H = { class: "sidebar" }, M = ["aria-label"], R = { class: "sidebar-group-title" }, j = -160, Q = /* @__PURE__ */ B({
|
|
8
8
|
__name: "Sidebar",
|
|
9
9
|
props: {
|
|
@@ -12,7 +12,7 @@ const H = { class: "sidebar" }, M = ["aria-label"], R = { class: "sidebar-group-
|
|
|
12
12
|
operationsSorter: { type: [String, Function] }
|
|
13
13
|
},
|
|
14
14
|
setup(A) {
|
|
15
|
-
const S = A, { hash: c, isIntersectionEnabled: $ } =
|
|
15
|
+
const S = A, { hash: c, isIntersectionEnabled: $ } = G(), { items: O, toggleCollapsedSidebarItem: T, collapsedSidebarItems: _ } = D(
|
|
16
16
|
{
|
|
17
17
|
parsedSpec: S.parsedSpec,
|
|
18
18
|
tagsSorter: S.tagsSorter,
|
|
@@ -2,9 +2,9 @@ import { defineComponent as $, openBlock as o, createElementBlock as l, createEl
|
|
|
2
2
|
import { ScalarIconButton as A, ScalarIcon as I } from "@scalar/components";
|
|
3
3
|
import O from "./SidebarHttpBadge.vue.js";
|
|
4
4
|
import { sleep as b } from "../../helpers/sleep.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { useNavState as T } from "../../hooks/useNavState.js";
|
|
6
|
+
import { joinWithSlash as D } from "../../helpers/joinWithSlash.js";
|
|
7
|
+
import { scrollToId as H } from "../../helpers/scrollToId.js";
|
|
8
8
|
const R = ["id"], U = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "sidebar-heading-chevron"
|
|
@@ -25,19 +25,19 @@ const R = ["id"], U = {
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["toggleOpen"],
|
|
27
27
|
setup(k, { emit: C }) {
|
|
28
|
-
const t = k, d = C, { getFullHash: m, isIntersectionEnabled: s, pathRouting: p, replaceUrlState: y } =
|
|
28
|
+
const t = k, d = C, { getFullHash: m, isIntersectionEnabled: s, pathRouting: p, replaceUrlState: y } = T(), h = async () => {
|
|
29
29
|
var e, i;
|
|
30
30
|
t.hasChildren && d("toggleOpen"), (i = (e = t.item) == null ? void 0 : e.select) == null || i.call(e), t.open && (s.value = !1, await b(100), s.value = !0);
|
|
31
31
|
}, w = () => {
|
|
32
32
|
if (p.value)
|
|
33
|
-
return
|
|
33
|
+
return D(p.value.basePath, t.item.id);
|
|
34
34
|
if (typeof window < "u") {
|
|
35
35
|
const e = new URL(window.location.href);
|
|
36
36
|
return e.hash = m(t.item.id), `${e.pathname}${e.search}${e.hash}`;
|
|
37
37
|
} else return `#${m(t.item.id)}`;
|
|
38
38
|
}, S = async (e) => {
|
|
39
39
|
var i, n;
|
|
40
|
-
p.value && (e.preventDefault(), t.hasChildren && d("toggleOpen"), (n = (i = t.item) == null ? void 0 : i.select) == null || n.call(i), d("toggleOpen"), s.value = !1, y(t.item.id),
|
|
40
|
+
p.value && (e.preventDefault(), t.hasChildren && d("toggleOpen"), (n = (i = t.item) == null ? void 0 : i.select) == null || n.call(i), d("toggleOpen"), s.value = !1, y(t.item.id), H(t.item.id), await b(100), s.value = !0);
|
|
41
41
|
};
|
|
42
42
|
return (e, i) => {
|
|
43
43
|
var n, c;
|