@scalar/api-reference 1.25.81 → 1.25.83
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 +13 -0
- package/dist/browser/standalone.js +50 -48
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +101 -98
- package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts +1 -0
- package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts.map +1 -1
- package/dist/components/DarkModeToggle/DarkModeToggle.vue.js +2 -2
- package/dist/components/DarkModeToggle/DarkModeToggle.vue2.js +14 -12
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.js +2 -2
- package/dist/components/Layouts/ModernLayout.vue2.js +33 -33
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +7 -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":"AAooBA,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;AAwRxD,iBAAS,cAAc;WAoPT,OAAO,IAA6B;;wBAvfZ,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;;;;;;EA4f/D;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YAriBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFA4iB9D,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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1b162cc2"]]);
|
|
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
|
|
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 U, 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
6
|
import { defaultStateFactory as N } from "@scalar/oas-utils/helpers";
|
|
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 ke, HIDE_TEST_REQUEST_BUTTON_SYMBOL as
|
|
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 Ue, INTEGRATION_SYMBOL as Ne } from "../helpers/provideSymbols.js";
|
|
13
13
|
import { useDeprecationWarnings as Fe } from "../hooks/useDeprecationWarnings.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { useSidebar as
|
|
18
|
-
import { useNavState as
|
|
19
|
-
import { sleep as
|
|
20
|
-
const
|
|
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: {
|
|
@@ -32,14 +32,14 @@ const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
|
32
32
|
rawSpec: {}
|
|
33
33
|
},
|
|
34
34
|
emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
|
|
35
|
-
setup(
|
|
36
|
-
const o =
|
|
35
|
+
setup(H) {
|
|
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 G = h(
|
|
42
|
+
const G = h(Re), {
|
|
43
43
|
breadcrumb: V,
|
|
44
44
|
collapsedSidebarItems: v,
|
|
45
45
|
isSidebarOpen: K,
|
|
@@ -48,7 +48,7 @@ const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
|
48
48
|
defaultOpenAllTags: j,
|
|
49
49
|
setParsedSpec: q,
|
|
50
50
|
scrollToOperation: J
|
|
51
|
-
} =
|
|
51
|
+
} = ze(), {
|
|
52
52
|
getReferenceHash: O,
|
|
53
53
|
getPathRoutingId: $,
|
|
54
54
|
getSectionId: X,
|
|
@@ -57,20 +57,19 @@ const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
|
57
57
|
isIntersectionEnabled: I,
|
|
58
58
|
pathRouting: B,
|
|
59
59
|
updateHash: L,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
ee("some/prefix/is-good/"), B.value = o.configuration.pathRouting, k(() => L());
|
|
60
|
+
replaceUrlState: ee
|
|
61
|
+
} = We();
|
|
62
|
+
B.value = o.configuration.pathRouting, P(() => L());
|
|
64
63
|
const D = async (e) => {
|
|
65
64
|
var t;
|
|
66
|
-
I.value = !1, L(), e ? J(e) : (t = S.value) == null || t.scrollTo(0, 0), await
|
|
65
|
+
I.value = !1, L(), e ? J(e) : (t = S.value) == null || t.scrollTo(0, 0), await Ge(100), I.value = !0;
|
|
67
66
|
}, A = w(0);
|
|
68
|
-
|
|
69
|
-
var r,
|
|
70
|
-
history.scrollRestoration = "manual",
|
|
71
|
-
|
|
67
|
+
P(() => Ce()), se(() => {
|
|
68
|
+
var r, n, a;
|
|
69
|
+
history.scrollRestoration = "manual", F.on(({ specTitle: i }) => {
|
|
70
|
+
Me(o.rawSpec, i);
|
|
72
71
|
});
|
|
73
|
-
const e = (
|
|
72
|
+
const e = (n = (r = S.value) == null ? void 0 : r.parentElement) == null ? void 0 : n.getBoundingClientRect(), t = (a = S.value) == null ? void 0 : a.getBoundingClientRect();
|
|
74
73
|
if (e && t) {
|
|
75
74
|
const i = t.top - e.top;
|
|
76
75
|
A.value = i < 2 ? 0 : i;
|
|
@@ -79,43 +78,43 @@ const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
|
79
78
|
console.log("CHANGED TO: ", O()), D(O());
|
|
80
79
|
}, window.onpopstate = () => B.value && D($(window.location.pathname));
|
|
81
80
|
});
|
|
82
|
-
const
|
|
81
|
+
const te = h(
|
|
83
82
|
() => z.value || !o.configuration.isEditable
|
|
84
|
-
), M =
|
|
83
|
+
), M = De((e) => {
|
|
85
84
|
if ((e.target.scrollTop ?? 0) < 50) {
|
|
86
85
|
const r = o.configuration.pathRouting ? o.configuration.pathRouting.basePath : window.location.pathname;
|
|
87
|
-
|
|
86
|
+
ee("", r + window.location.search);
|
|
88
87
|
}
|
|
89
88
|
}), l = h(() => ({
|
|
90
89
|
breadcrumb: V.value,
|
|
91
90
|
spec: o.parsedSpec
|
|
92
91
|
}));
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}), C(() => o.parsedSpec, q, { deep: !0 }),
|
|
92
|
+
le(() => {
|
|
93
|
+
F.reset();
|
|
94
|
+
}), C(() => o.parsedSpec, q, { deep: !0 }), de(() => {
|
|
96
95
|
var t, r;
|
|
97
|
-
const e =
|
|
96
|
+
const e = ue();
|
|
98
97
|
if (e && (e.payload || (e.payload = { data: N() }), (t = e.payload).data || (t.data = N()), o.configuration.pathRouting)) {
|
|
99
|
-
const
|
|
100
|
-
x.value =
|
|
101
|
-
for (const
|
|
102
|
-
Object.hasOwn(v,
|
|
103
|
-
if (
|
|
104
|
-
R(X(
|
|
98
|
+
const n = $(e.url);
|
|
99
|
+
x.value = n, e.payload.data.hash = n;
|
|
100
|
+
for (const a in v)
|
|
101
|
+
Object.hasOwn(v, a) && delete v[a];
|
|
102
|
+
if (n)
|
|
103
|
+
R(X(n), !0);
|
|
105
104
|
else {
|
|
106
|
-
const
|
|
107
|
-
|
|
105
|
+
const a = (r = o.parsedSpec.tags) == null ? void 0 : r[0];
|
|
106
|
+
a && R(Z(a), !0);
|
|
108
107
|
}
|
|
109
108
|
e.payload.data["useSidebarContent-collapsedSidebarItems"] = v;
|
|
110
109
|
}
|
|
111
|
-
}),
|
|
112
|
-
var
|
|
113
|
-
const e =
|
|
110
|
+
}), he(() => {
|
|
111
|
+
var n;
|
|
112
|
+
const e = ce(), t = "scalar-instance-id";
|
|
114
113
|
if (!e) return t;
|
|
115
114
|
let r = e.uid;
|
|
116
|
-
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) : (n = e.vnode.el) != null && n.getAttribute && (r = e.vnode.el.getAttribute(t)), `${t}-${r}`;
|
|
117
116
|
});
|
|
118
|
-
const y =
|
|
117
|
+
const y = be({
|
|
119
118
|
isReadOnly: !0,
|
|
120
119
|
proxyUrl: o.configuration.proxy,
|
|
121
120
|
themeId: o.configuration.theme,
|
|
@@ -124,27 +123,31 @@ const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
|
124
123
|
});
|
|
125
124
|
C(
|
|
126
125
|
() => o.rawSpec,
|
|
127
|
-
(e) =>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
126
|
+
(e) => {
|
|
127
|
+
var t;
|
|
128
|
+
return y.importSpecFile(e, "default", {
|
|
129
|
+
shouldLoad: !1,
|
|
130
|
+
documentUrl: (t = o.configuration.spec) == null ? void 0 : t.url,
|
|
131
|
+
setCollectionSecurity: !0,
|
|
132
|
+
...o.configuration
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
), p(Te, y);
|
|
136
|
+
const oe = ye(y);
|
|
137
|
+
p(we, oe), p(
|
|
135
138
|
ke,
|
|
136
139
|
() => o.configuration.hideDownloadButton
|
|
137
140
|
), p(
|
|
138
|
-
|
|
141
|
+
Pe,
|
|
139
142
|
() => o.configuration.hideTestRequestButton
|
|
140
|
-
), p(
|
|
143
|
+
), p(Ue, () => {
|
|
141
144
|
var e;
|
|
142
145
|
return (e = o.configuration.spec) == null ? void 0 : e.url;
|
|
143
146
|
}), p(
|
|
144
|
-
|
|
147
|
+
Ne,
|
|
145
148
|
() => o.configuration._integration !== null ? o.configuration._integration : "vue"
|
|
146
149
|
);
|
|
147
|
-
function
|
|
150
|
+
function k(e, t) {
|
|
148
151
|
C(
|
|
149
152
|
() => o.configuration[e],
|
|
150
153
|
(r) => {
|
|
@@ -153,22 +156,22 @@ const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
|
153
156
|
{ immediate: !0 }
|
|
154
157
|
);
|
|
155
158
|
}
|
|
156
|
-
const { setExcludedClients:
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
+
const { setExcludedClients: re, setDefaultHttpClient: ne } = ve();
|
|
160
|
+
k("defaultHttpClient", ne), k("hiddenClients", re), Q.value = o.configuration.hideModels ?? !1, j.value = o.configuration.defaultOpenAllTags ?? !1, Fe(o.configuration);
|
|
161
|
+
const ae = h(
|
|
159
162
|
() => `<style>
|
|
160
|
-
${
|
|
163
|
+
${Oe(o.configuration.theme, {
|
|
161
164
|
fonts: o.configuration.withDefaultFonts
|
|
162
165
|
})}</style>`
|
|
163
166
|
);
|
|
164
167
|
return (e, t) => {
|
|
165
|
-
var r,
|
|
166
|
-
return b(), T(
|
|
167
|
-
d("div", { innerHTML:
|
|
168
|
+
var r, n;
|
|
169
|
+
return b(), T(U, null, [
|
|
170
|
+
d("div", { innerHTML: ae.value }, null, 8, Ve),
|
|
168
171
|
d("div", {
|
|
169
172
|
ref_key: "documentEl",
|
|
170
173
|
ref: S,
|
|
171
|
-
class:
|
|
174
|
+
class: fe(["scalar-app scalar-api-reference references-layout", [
|
|
172
175
|
{
|
|
173
176
|
"scalar-scrollbars-obtrusive": G.value,
|
|
174
177
|
"references-editable": e.configuration.isEditable,
|
|
@@ -178,20 +181,20 @@ const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
|
178
181
|
},
|
|
179
182
|
e.$attrs.class
|
|
180
183
|
]]),
|
|
181
|
-
style:
|
|
184
|
+
style: pe({
|
|
182
185
|
"--scalar-y-offset": `var(--scalar-custom-header-height, ${A.value}px)`
|
|
183
186
|
}),
|
|
184
187
|
onScrollPassive: t[4] || (t[4] = //@ts-ignore
|
|
185
|
-
(...
|
|
188
|
+
(...a) => s(M) && s(M)(...a))
|
|
186
189
|
}, [
|
|
187
|
-
d("div",
|
|
190
|
+
d("div", Ke, [
|
|
188
191
|
u(e.$slots, "header", c(f(l.value)), void 0, !0)
|
|
189
192
|
]),
|
|
190
|
-
e.configuration.showSidebar ? (b(), T("aside",
|
|
191
|
-
d("div",
|
|
192
|
-
g(s(
|
|
193
|
+
e.configuration.showSidebar ? (b(), T("aside", Qe, [
|
|
194
|
+
d("div", je, [
|
|
195
|
+
g(s(Ee), null, {
|
|
193
196
|
default: m(() => [
|
|
194
|
-
g(s(
|
|
197
|
+
g(s(He), {
|
|
195
198
|
operationsSorter: e.configuration.operationsSorter,
|
|
196
199
|
parsedSpec: e.parsedSpec,
|
|
197
200
|
tagsSorter: e.configuration.tagsSorter
|
|
@@ -209,24 +212,24 @@ const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
|
209
212
|
})
|
|
210
213
|
])
|
|
211
214
|
])) : E("", !0),
|
|
212
|
-
|
|
213
|
-
d("div",
|
|
215
|
+
ge(d("div", qe, [
|
|
216
|
+
d("div", Je, [
|
|
214
217
|
u(e.$slots, "editor", c(f(l.value)), void 0, !0)
|
|
215
218
|
])
|
|
216
219
|
], 512), [
|
|
217
|
-
[
|
|
220
|
+
[me, e.configuration.isEditable]
|
|
218
221
|
]),
|
|
219
|
-
|
|
222
|
+
te.value ? (b(), T(U, { key: 1 }, [
|
|
220
223
|
d("section", {
|
|
221
224
|
"aria-label": `Open API Documentation for ${(r = e.parsedSpec.info) == null ? void 0 : r.title}`,
|
|
222
225
|
class: "references-rendered"
|
|
223
226
|
}, [
|
|
224
|
-
g(s(
|
|
227
|
+
g(s(_e), {
|
|
225
228
|
baseServerURL: e.configuration.baseServerURL,
|
|
226
229
|
layout: e.configuration.layout,
|
|
227
230
|
parsedSpec: e.parsedSpec,
|
|
228
231
|
servers: e.configuration.servers
|
|
229
|
-
},
|
|
232
|
+
}, Se({
|
|
230
233
|
start: m(() => [
|
|
231
234
|
u(e.$slots, "content-start", c(f(l.value)), void 0, !0)
|
|
232
235
|
]),
|
|
@@ -235,13 +238,13 @@ const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
|
235
238
|
]),
|
|
236
239
|
_: 2
|
|
237
240
|
}, [
|
|
238
|
-
(
|
|
241
|
+
(n = e.configuration) != null && n.isEditable ? {
|
|
239
242
|
name: "empty-state",
|
|
240
243
|
fn: m(() => {
|
|
241
|
-
var
|
|
244
|
+
var a;
|
|
242
245
|
return [
|
|
243
|
-
g(
|
|
244
|
-
theme: ((
|
|
246
|
+
g(Ae, {
|
|
247
|
+
theme: ((a = e.configuration) == null ? void 0 : a.theme) || "default",
|
|
245
248
|
onChangeTheme: t[0] || (t[0] = (i) => e.$emit("changeTheme", i)),
|
|
246
249
|
onLinkSwaggerFile: t[1] || (t[1] = (i) => e.$emit("linkSwaggerFile")),
|
|
247
250
|
onLoadSwaggerFile: t[2] || (t[2] = (i) => e.$emit("loadSwaggerFile")),
|
|
@@ -252,18 +255,18 @@ const Ke = ["innerHTML"], Qe = { class: "references-header" }, je = {
|
|
|
252
255
|
key: "0"
|
|
253
256
|
} : void 0
|
|
254
257
|
]), 1032, ["baseServerURL", "layout", "parsedSpec", "servers"])
|
|
255
|
-
], 8,
|
|
256
|
-
e.$slots.footer ? (b(), T("div",
|
|
258
|
+
], 8, Xe),
|
|
259
|
+
e.$slots.footer ? (b(), T("div", Ze, [
|
|
257
260
|
u(e.$slots, "footer", c(f(l.value)), void 0, !0)
|
|
258
261
|
])) : E("", !0)
|
|
259
262
|
], 64)) : E("", !0),
|
|
260
|
-
g(s(
|
|
263
|
+
g(s(Ye), { configuration: e.configuration }, null, 8, ["configuration"])
|
|
261
264
|
], 38),
|
|
262
|
-
g(s(
|
|
265
|
+
g(s(Ie))
|
|
263
266
|
], 64);
|
|
264
267
|
};
|
|
265
268
|
}
|
|
266
269
|
});
|
|
267
270
|
export {
|
|
268
|
-
|
|
271
|
+
ht as default
|
|
269
272
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
isDarkMode: boolean;
|
|
3
|
+
hideDarkModeToggle?: boolean;
|
|
3
4
|
};
|
|
4
5
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
6
|
toggleDarkMode: () => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DarkModeToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DarkModeToggle/DarkModeToggle.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DarkModeToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DarkModeToggle/DarkModeToggle.vue"],"names":[],"mappings":"AAiKA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAC;;;;;;AA8GF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DarkModeToggle.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4eddf114"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as t, openBlock as o, createElementBlock as d, createElementVNode as r, normalizeClass as s, createStaticVNode as i, createCommentVNode as l } from "vue";
|
|
2
|
+
const n = { class: "darklight-reference-switch" }, g = ["aria-pressed"], m = /* @__PURE__ */ t({
|
|
3
3
|
__name: "DarkModeToggle",
|
|
4
4
|
props: {
|
|
5
|
-
isDarkMode: { type: Boolean }
|
|
5
|
+
isDarkMode: { type: Boolean },
|
|
6
|
+
hideDarkModeToggle: { type: Boolean }
|
|
6
7
|
},
|
|
7
8
|
emits: ["toggleDarkMode"],
|
|
8
|
-
setup(
|
|
9
|
-
return (a, e) => (
|
|
10
|
-
e[2] || (e[2] =
|
|
9
|
+
setup(c) {
|
|
10
|
+
return (a, e) => (o(), d("div", n, [
|
|
11
|
+
e[2] || (e[2] = r("a", {
|
|
11
12
|
class: "darklight-reference-promo",
|
|
12
13
|
href: "https://www.scalar.com",
|
|
13
14
|
target: "_blank"
|
|
14
15
|
}, " Powered by Scalar ", -1)),
|
|
15
|
-
|
|
16
|
+
a.hideDarkModeToggle ? l("", !0) : (o(), d("button", {
|
|
17
|
+
key: 0,
|
|
16
18
|
"aria-label": "Toggle dark mode",
|
|
17
19
|
"aria-pressed": a.isDarkMode,
|
|
18
|
-
class:
|
|
20
|
+
class: s(["darklight", { darklight_dark: a.isDarkMode }]),
|
|
19
21
|
type: "button",
|
|
20
|
-
onClick: e[0] || (e[0] = (
|
|
22
|
+
onClick: e[0] || (e[0] = (k) => a.$emit("toggleDarkMode"))
|
|
21
23
|
}, e[1] || (e[1] = [
|
|
22
|
-
|
|
23
|
-
]), 10,
|
|
24
|
+
i('<div class="darklight-slider" data-v-4eddf114><div class="toggleicon" data-v-4eddf114><i class="toggleicon-sunray" data-v-4eddf114></i><i class="toggleicon-sunray" data-v-4eddf114></i><i class="toggleicon-sunray" data-v-4eddf114></i><i class="toggleicon-sunray" data-v-4eddf114></i><i class="toggleicon-sun" data-v-4eddf114></i></div></div>', 1)
|
|
25
|
+
]), 10, g))
|
|
24
26
|
]));
|
|
25
27
|
}
|
|
26
28
|
});
|
|
27
29
|
export {
|
|
28
|
-
|
|
30
|
+
m as default
|
|
29
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ModernLayout.vue"],"names":[],"mappings":"AAkHA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAuC7E,iBAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ModernLayout.vue"],"names":[],"mappings":"AAkHA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAuC7E,iBAAS,cAAc;WAsIT,OAAO,IAA6B;;;;EAKjD;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import o from "./ModernLayout.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 _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-90dab220"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
_ as default
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { OpenApiClientButton as
|
|
3
|
-
import { useBreakpoints as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as D, useSlots as M, watch as u, openBlock as i, createBlock as d, normalizeClass as b, createSlots as v, withCtx as s, unref as l, isRef as y, createCommentVNode as p, createElementBlock as C, createVNode as c, createElementVNode as B, renderList as w, renderSlot as T, normalizeProps as N, guardReactiveProps as $ } from "vue";
|
|
2
|
+
import { OpenApiClientButton as H } from "@scalar/api-client/components";
|
|
3
|
+
import { useBreakpoints as K } from "@scalar/use-hooks/useBreakpoints";
|
|
4
|
+
import L from "../ApiReferenceLayout.vue.js";
|
|
5
|
+
import R from "../MobileHeader.vue.js";
|
|
6
6
|
import V from "../../features/Search/SearchButton.vue.js";
|
|
7
7
|
import z from "../DarkModeToggle/DarkModeToggle.vue.js";
|
|
8
8
|
import { useSidebar as A } from "../../hooks/useSidebar.js";
|
|
@@ -10,7 +10,7 @@ import { useNavState as E } from "../../hooks/useNavState.js";
|
|
|
10
10
|
const O = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "scalar-api-references-standalone-search"
|
|
13
|
-
}, P = { class: "darklight-reference" }, X = /* @__PURE__ */
|
|
13
|
+
}, P = { class: "darklight-reference" }, X = /* @__PURE__ */ D({
|
|
14
14
|
__name: "ModernLayout",
|
|
15
15
|
props: {
|
|
16
16
|
configuration: {},
|
|
@@ -19,66 +19,66 @@ const O = {
|
|
|
19
19
|
isDark: { type: Boolean }
|
|
20
20
|
},
|
|
21
21
|
emits: ["toggleDarkMode", "updateContent"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
o && !e && (
|
|
22
|
+
setup(f) {
|
|
23
|
+
const a = f, g = M(), { mediaQueries: m } = K(), { isSidebarOpen: n } = A(), k = !1;
|
|
24
|
+
u(m.lg, (e, o) => {
|
|
25
|
+
o && !e && (n.value = !1);
|
|
26
26
|
});
|
|
27
27
|
const { hash: S } = E();
|
|
28
|
-
return
|
|
29
|
-
e && e !== o && (
|
|
30
|
-
}), (e, o) => (i(),
|
|
31
|
-
class:
|
|
28
|
+
return u(S, (e, o) => {
|
|
29
|
+
e && e !== o && (n.value = !1);
|
|
30
|
+
}), (e, o) => (i(), d(L, {
|
|
31
|
+
class: b({
|
|
32
32
|
"scalar-api-references-standalone-mobile": e.configuration.showSidebar
|
|
33
33
|
}),
|
|
34
34
|
configuration: e.configuration,
|
|
35
35
|
parsedSpec: e.parsedSpec,
|
|
36
36
|
rawSpec: e.rawSpec,
|
|
37
37
|
onUpdateContent: o[2] || (o[2] = (r) => e.$emit("updateContent", r))
|
|
38
|
-
},
|
|
39
|
-
header:
|
|
40
|
-
|
|
38
|
+
}, v({
|
|
39
|
+
header: s(() => [
|
|
40
|
+
a.configuration.showSidebar ? (i(), d(R, {
|
|
41
41
|
key: 0,
|
|
42
|
-
open:
|
|
43
|
-
"onUpdate:open": o[0] || (o[0] = (r) =>
|
|
44
|
-
}, null, 8, ["open"])) :
|
|
42
|
+
open: l(n),
|
|
43
|
+
"onUpdate:open": o[0] || (o[0] = (r) => y(n) ? n.value = r : null)
|
|
44
|
+
}, null, 8, ["open"])) : p("", !0)
|
|
45
45
|
]),
|
|
46
|
-
"sidebar-start":
|
|
46
|
+
"sidebar-start": s(({ spec: r }) => {
|
|
47
47
|
var t;
|
|
48
48
|
return [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
searchHotKey: (t =
|
|
49
|
+
a.configuration.hideSearch ? p("", !0) : (i(), C("div", O, [
|
|
50
|
+
c(l(V), {
|
|
51
|
+
searchHotKey: (t = a.configuration) == null ? void 0 : t.searchHotKey,
|
|
52
52
|
spec: r
|
|
53
53
|
}, null, 8, ["searchHotKey", "spec"])
|
|
54
54
|
]))
|
|
55
55
|
];
|
|
56
56
|
}),
|
|
57
|
-
"sidebar-end":
|
|
57
|
+
"sidebar-end": s(() => {
|
|
58
58
|
var r;
|
|
59
59
|
return [
|
|
60
60
|
B("div", P, [
|
|
61
|
-
|
|
61
|
+
a.configuration.hideClientButton ? p("", !0) : (i(), d(l(H), {
|
|
62
62
|
key: 0,
|
|
63
63
|
buttonSource: "sidebar",
|
|
64
64
|
integration: e.configuration._integration,
|
|
65
|
-
isDevelopment:
|
|
65
|
+
isDevelopment: k,
|
|
66
66
|
url: (r = e.configuration.spec) == null ? void 0 : r.url
|
|
67
67
|
}, null, 8, ["integration", "url"])),
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
c(l(z), {
|
|
69
|
+
hideDarkModeToggle: e.configuration.hideDarkModeToggle,
|
|
70
70
|
isDarkMode: e.isDark,
|
|
71
71
|
onToggleDarkMode: o[1] || (o[1] = (t) => e.$emit("toggleDarkMode"))
|
|
72
|
-
}, null, 8, ["isDarkMode"])
|
|
72
|
+
}, null, 8, ["hideDarkModeToggle", "isDarkMode"])
|
|
73
73
|
])
|
|
74
74
|
];
|
|
75
75
|
}),
|
|
76
76
|
_: 2
|
|
77
77
|
}, [
|
|
78
|
-
w(
|
|
78
|
+
w(g, (r, t) => ({
|
|
79
79
|
name: t,
|
|
80
|
-
fn:
|
|
81
|
-
|
|
80
|
+
fn: s((h) => [
|
|
81
|
+
T(e.$slots, t, N($(h || {})), void 0, !0)
|
|
82
82
|
])
|
|
83
83
|
}))
|
|
84
84
|
]), 1032, ["class", "configuration", "parsedSpec", "rawSpec"]));
|