@scalar/api-reference 1.26.0 → 1.26.2
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 +27 -0
- package/dist/browser/standalone.js +19601 -19544
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts +8 -21
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +20 -52
- package/dist/components/ApiReference.vue2.js +4 -0
- package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
- package/dist/components/DocumentSelector/DocumentSelector.vue.d.ts +12 -0
- package/dist/components/DocumentSelector/DocumentSelector.vue.d.ts.map +1 -0
- package/dist/components/DocumentSelector/DocumentSelector.vue.js +67 -0
- package/dist/components/DocumentSelector/DocumentSelector.vue2.js +4 -0
- package/dist/components/DocumentSelector/index.d.ts +2 -0
- package/dist/components/DocumentSelector/index.d.ts.map +1 -0
- package/dist/components/Layouts/ClassicLayout.vue.d.ts +4 -4
- package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ClassicLayout.vue.js +28 -22
- package/dist/components/Layouts/Layouts.vue.d.ts +4 -7
- package/dist/components/Layouts/Layouts.vue.d.ts.map +1 -1
- package/dist/components/Layouts/Layouts.vue.js +23 -14
- package/dist/components/Layouts/ModernLayout.vue.d.ts +4 -4
- 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 -30
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/SingleApiReference.vue.d.ts +28 -0
- package/dist/components/SingleApiReference.vue.d.ts.map +1 -0
- package/dist/components/SingleApiReference.vue.js +60 -0
- package/dist/components/SingleApiReference.vue3.js +5 -0
- package/dist/esm.d.ts +3 -5
- package/dist/esm.d.ts.map +1 -1
- package/dist/esm.js +12 -13
- package/dist/features/ApiClientModal/useApiClient.d.ts +2 -2
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.d.ts +87 -0
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -0
- package/dist/hooks/useMultipleDocuments.js +49 -0
- package/dist/hooks/useReactiveSpec.d.ts +1 -1
- package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
- package/dist/index.js +80 -81
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +6 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -12
- package/dist/components/ApiReference.vue3.js +0 -5
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
refs: {};
|
|
9
|
-
rootEl: any;
|
|
1
|
+
import type { ApiReferenceConfiguration, ApiReferenceConfigurationWithSources } from '@scalar/types/api-reference';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the API reference.
|
|
5
|
+
* Can be a single configuration or an array of configurations for multiple documents.
|
|
6
|
+
*/
|
|
7
|
+
configuration?: Partial<ApiReferenceConfiguration> | Partial<ApiReferenceConfiguration>[] | Partial<ApiReferenceConfigurationWithSources>;
|
|
10
8
|
};
|
|
11
|
-
|
|
12
|
-
declare const __VLS_component: import("vue").DefineComponent<ReferenceProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
-
updateContent: (value: string) => any;
|
|
14
|
-
}, string, import("vue").PublicProps, Readonly<ReferenceProps> & Readonly<{
|
|
15
|
-
onUpdateContent?: ((value: string) => any) | undefined;
|
|
16
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
10
|
export default _default;
|
|
19
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
-
new (): {
|
|
21
|
-
$slots: S;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
11
|
//# sourceMappingURL=ApiReference.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EACV,yBAAyB,EACzB,oCAAoC,EACrC,MAAM,6BAA6B,CAAA;AASpC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EACV,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,yBAAyB,CAAC,EAAE,GACpC,OAAO,CAAC,oCAAoC,CAAC,CAAA;CAClD,CAAC;;AAgFF,wBAOG"}
|
|
@@ -1,61 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
import A from "./Layouts/Layouts.vue.js";
|
|
8
|
-
const H = /* @__PURE__ */ S({
|
|
1
|
+
import { defineComponent as a, toRef as l, openBlock as m, createBlock as f, unref as o, withCtx as s, createVNode as p, isRef as d } from "vue";
|
|
2
|
+
import _ from "./SingleApiReference.vue.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { useMultipleDocuments as g } from "../hooks/useMultipleDocuments.js";
|
|
5
|
+
import x from "./DocumentSelector/DocumentSelector.vue.js";
|
|
6
|
+
const B = /* @__PURE__ */ a({
|
|
9
7
|
__name: "ApiReference",
|
|
10
8
|
props: {
|
|
11
9
|
configuration: {}
|
|
12
10
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const f = m, e = p(
|
|
17
|
-
() => U.parse(f.configuration)
|
|
18
|
-
), { toggleColorMode: d, isDarkMode: n } = V({
|
|
19
|
-
initialColorMode: e.value.darkMode ? "dark" : void 0,
|
|
20
|
-
overrideColorMode: e.value.forceDarkModeState
|
|
11
|
+
setup(t) {
|
|
12
|
+
const i = t, { selectedConfiguration: r, availableDocuments: u, selectedDocumentIndex: e } = g({
|
|
13
|
+
configuration: l(i, "configuration")
|
|
21
14
|
});
|
|
22
|
-
|
|
23
|
-
() =>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return l(), D(y, null, [
|
|
33
|
-
(s = e.value) != null && s.customCss ? (l(), w(R("style"), { key: 0 }, {
|
|
34
|
-
default: a(() => [
|
|
35
|
-
$(x(e.value.customCss), 1)
|
|
36
|
-
]),
|
|
37
|
-
_: 1
|
|
38
|
-
})) : B("", !0),
|
|
39
|
-
N(t(A), {
|
|
40
|
-
configuration: e.value,
|
|
41
|
-
isDark: t(n),
|
|
42
|
-
parsedSpec: t(v),
|
|
43
|
-
rawSpec: t(C),
|
|
44
|
-
onToggleDarkMode: r[0] || (r[0] = () => t(d)()),
|
|
45
|
-
onUpdateContent: r[1] || (r[1] = (k) => o.$emit("updateContent", k))
|
|
46
|
-
}, {
|
|
47
|
-
footer: a(() => [
|
|
48
|
-
u(o.$slots, "footer")
|
|
49
|
-
]),
|
|
50
|
-
"content-end": a(() => [
|
|
51
|
-
u(o.$slots, "footer")
|
|
52
|
-
]),
|
|
53
|
-
_: 3
|
|
54
|
-
}, 8, ["configuration", "isDark", "parsedSpec", "rawSpec"])
|
|
55
|
-
], 64);
|
|
56
|
-
};
|
|
15
|
+
return (V, n) => (m(), f(_, { configuration: o(r) }, {
|
|
16
|
+
"document-selector": s(() => [
|
|
17
|
+
p(o(x), {
|
|
18
|
+
modelValue: o(e),
|
|
19
|
+
"onUpdate:modelValue": n[0] || (n[0] = (c) => d(e) ? e.value = c : null),
|
|
20
|
+
options: o(u)
|
|
21
|
+
}, null, 8, ["modelValue", "options"])
|
|
22
|
+
]),
|
|
23
|
+
_: 1
|
|
24
|
+
}, 8, ["configuration"]));
|
|
57
25
|
}
|
|
58
26
|
});
|
|
59
27
|
export {
|
|
60
|
-
|
|
28
|
+
B as default
|
|
61
29
|
};
|
|
@@ -4,16 +4,16 @@ type __VLS_Props = Omit<ReferenceLayoutProps, 'isDark'>;
|
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
attrs: Partial<{}>;
|
|
6
6
|
slots: Readonly<{
|
|
7
|
-
header: (props: ReferenceSlotProps) => any;
|
|
8
7
|
footer: (props: ReferenceSlotProps) => any;
|
|
8
|
+
header: (props: ReferenceSlotProps) => any;
|
|
9
9
|
editor: (props: ReferenceSlotProps) => any;
|
|
10
10
|
"content-start": (props: ReferenceSlotProps) => any;
|
|
11
11
|
"content-end": (props: ReferenceSlotProps) => any;
|
|
12
12
|
"sidebar-start": (props: ReferenceSlotProps) => any;
|
|
13
13
|
"sidebar-end": (props: ReferenceSlotProps) => any;
|
|
14
14
|
}> & {
|
|
15
|
-
header: (props: ReferenceSlotProps) => any;
|
|
16
15
|
footer: (props: ReferenceSlotProps) => any;
|
|
16
|
+
header: (props: ReferenceSlotProps) => any;
|
|
17
17
|
editor: (props: ReferenceSlotProps) => any;
|
|
18
18
|
"content-start": (props: ReferenceSlotProps) => any;
|
|
19
19
|
"content-end": (props: ReferenceSlotProps) => any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SpecConfiguration } from '@scalar/types/api-reference';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
options?: SpecConfiguration[];
|
|
4
|
+
modelValue?: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
"update:modelValue": (value: number) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=DocumentSelector.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DocumentSelector/DocumentSelector.vue"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAKpE,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;;;;;;AAoIF,wBAOG"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent as b, computed as n, openBlock as f, createElementBlock as v, createVNode as i, unref as a, withCtx as h, createElementVNode as c, toDisplayString as x, createCommentVNode as V } from "vue";
|
|
2
|
+
import { ScalarListbox as g, ScalarIcon as d } from "@scalar/components";
|
|
3
|
+
const w = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "document-selector -mb-1 p-3 pb-0"
|
|
6
|
+
}, S = {
|
|
7
|
+
class: "group/dropdown-label hover:bg-b-2 text-c-2 py-1.75 pl-1.75 flex w-full cursor-pointer items-center rounded border pr-1.5",
|
|
8
|
+
tabindex: "0"
|
|
9
|
+
}, k = { class: "text-c-1 overflow-hidden text-ellipsis text-sm font-medium" }, N = /* @__PURE__ */ b({
|
|
10
|
+
__name: "DocumentSelector",
|
|
11
|
+
props: {
|
|
12
|
+
options: {},
|
|
13
|
+
modelValue: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:modelValue"],
|
|
16
|
+
setup(l, { emit: m }) {
|
|
17
|
+
const u = m, p = n(() => {
|
|
18
|
+
var e;
|
|
19
|
+
return l.options && ((e = l.options) == null ? void 0 : e.length) > 1;
|
|
20
|
+
}), r = n(
|
|
21
|
+
() => {
|
|
22
|
+
var e;
|
|
23
|
+
return ((e = l.options) == null ? void 0 : e.map((o, t) => ({
|
|
24
|
+
id: String(t),
|
|
25
|
+
// Get the display text for the selected option
|
|
26
|
+
label: o.title || o.slug || `API #${t + 1}`
|
|
27
|
+
}))) || [];
|
|
28
|
+
}
|
|
29
|
+
), s = n({
|
|
30
|
+
get: () => r.value.find(({ id: e }) => e === String(l.modelValue)),
|
|
31
|
+
set: (e) => u("update:modelValue", Number(e.id))
|
|
32
|
+
});
|
|
33
|
+
return (e, o) => p.value ? (f(), v("div", w, [
|
|
34
|
+
i(a(g), {
|
|
35
|
+
modelValue: s.value,
|
|
36
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => s.value = t),
|
|
37
|
+
options: r.value,
|
|
38
|
+
resize: ""
|
|
39
|
+
}, {
|
|
40
|
+
default: h(() => {
|
|
41
|
+
var t;
|
|
42
|
+
return [
|
|
43
|
+
c("div", S, [
|
|
44
|
+
i(a(d), {
|
|
45
|
+
class: "mr-1.25 min-w-4",
|
|
46
|
+
icon: "Versions",
|
|
47
|
+
size: "sm",
|
|
48
|
+
thickness: "2"
|
|
49
|
+
}),
|
|
50
|
+
c("span", k, x(((t = s.value) == null ? void 0 : t.label) || "Select API"), 1),
|
|
51
|
+
i(a(d), {
|
|
52
|
+
class: "group-hover/dropdown-label:text-c-1 ml-auto",
|
|
53
|
+
icon: "ChevronDown",
|
|
54
|
+
size: "sm",
|
|
55
|
+
thickness: "2"
|
|
56
|
+
})
|
|
57
|
+
])
|
|
58
|
+
];
|
|
59
|
+
}),
|
|
60
|
+
_: 1
|
|
61
|
+
}, 8, ["modelValue", "options"])
|
|
62
|
+
])) : V("", !0);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
N as default
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DocumentSelector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DocumentSelectorSlot, ReferenceLayoutProps, ReferenceLayoutSlots } from '../../types';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
|
-
slots: Readonly<ReferenceLayoutSlots> & ReferenceLayoutSlots;
|
|
4
|
+
slots: Readonly<ReferenceLayoutSlots & DocumentSelectorSlot> & ReferenceLayoutSlots & DocumentSelectorSlot;
|
|
5
5
|
refs: {};
|
|
6
6
|
rootEl: any;
|
|
7
7
|
};
|
|
8
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
9
|
+
declare const __VLS_component: import("vue").DefineComponent<ReferenceLayoutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
10
|
updateContent: (v: string) => any;
|
|
11
11
|
toggleDarkMode: () => any;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<ReferenceLayoutProps> & Readonly<{
|
|
13
13
|
onUpdateContent?: ((v: string) => any) | undefined;
|
|
14
14
|
onToggleDarkMode?: (() => any) | undefined;
|
|
15
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ClassicLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ClassicLayout.vue"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAwBhB,iBAAS,cAAc;WAwHT,OAAO,IAA6B;;;;EAKjD;AAcD,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"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarColorModeToggleIcon as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as g, useSlots as S, computed as k, openBlock as r, createBlock as c, createSlots as y, withCtx as a, createVNode as C, unref as d, createCommentVNode as i, createElementBlock as h, renderSlot as p, renderList as v, normalizeProps as w, guardReactiveProps as $ } from "vue";
|
|
2
|
+
import { ScalarColorModeToggleIcon as B } from "@scalar/components";
|
|
3
|
+
import D from "../ApiReferenceLayout.vue.js";
|
|
4
4
|
import H from "../ClassicHeader.vue.js";
|
|
5
5
|
import M from "../../features/Search/SearchButton.vue.js";
|
|
6
|
-
const
|
|
6
|
+
const K = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "w-64"
|
|
9
|
+
}, T = /* @__PURE__ */ g({
|
|
7
10
|
__name: "ClassicLayout",
|
|
8
11
|
props: {
|
|
9
12
|
configuration: {},
|
|
@@ -12,31 +15,34 @@ const P = /* @__PURE__ */ f({
|
|
|
12
15
|
isDark: { type: Boolean }
|
|
13
16
|
},
|
|
14
17
|
emits: ["toggleDarkMode", "updateContent"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
return (e, o) => (
|
|
18
|
-
configuration:
|
|
18
|
+
setup(u) {
|
|
19
|
+
const n = u, m = S(), l = k(() => ({ ...n.configuration, showSidebar: !1 }));
|
|
20
|
+
return (e, o) => (r(), c(D, {
|
|
21
|
+
configuration: l.value,
|
|
19
22
|
parsedSpec: e.parsedSpec,
|
|
20
23
|
rawSpec: e.rawSpec,
|
|
21
24
|
onUpdateContent: o[1] || (o[1] = (t) => e.$emit("updateContent", t))
|
|
22
|
-
},
|
|
23
|
-
"content-start":
|
|
25
|
+
}, y({
|
|
26
|
+
"content-start": a(({ spec: t }) => [
|
|
24
27
|
C(H, null, {
|
|
25
|
-
"dark-mode-toggle":
|
|
26
|
-
|
|
28
|
+
"dark-mode-toggle": a(() => [
|
|
29
|
+
n.configuration.hideDarkModeToggle ? i("", !0) : (r(), c(d(B), {
|
|
27
30
|
key: 0,
|
|
28
31
|
class: "text-c-2 hover:text-c-1",
|
|
29
32
|
mode: e.isDark ? "dark" : "light",
|
|
30
33
|
style: { transform: "scale(1.4)" },
|
|
31
34
|
variant: "icon",
|
|
32
|
-
onClick: o[0] || (o[0] = (
|
|
35
|
+
onClick: o[0] || (o[0] = (s) => e.$emit("toggleDarkMode"))
|
|
33
36
|
}, null, 8, ["mode"]))
|
|
34
37
|
]),
|
|
35
|
-
default:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
default: a(() => [
|
|
39
|
+
e.$slots["document-selector"] ? (r(), h("div", K, [
|
|
40
|
+
p(e.$slots, "document-selector")
|
|
41
|
+
])) : i("", !0),
|
|
42
|
+
n.configuration.hideSearch ? i("", !0) : (r(), c(d(M), {
|
|
43
|
+
key: 1,
|
|
38
44
|
class: "t-doc__sidebar",
|
|
39
|
-
searchHotKey:
|
|
45
|
+
searchHotKey: l.value.searchHotKey,
|
|
40
46
|
spec: t
|
|
41
47
|
}, null, 8, ["searchHotKey", "spec"]))
|
|
42
48
|
]),
|
|
@@ -45,15 +51,15 @@ const P = /* @__PURE__ */ f({
|
|
|
45
51
|
]),
|
|
46
52
|
_: 2
|
|
47
53
|
}, [
|
|
48
|
-
|
|
49
|
-
name:
|
|
50
|
-
fn:
|
|
51
|
-
|
|
54
|
+
v(m, (t, s) => ({
|
|
55
|
+
name: s,
|
|
56
|
+
fn: a((f) => [
|
|
57
|
+
p(e.$slots, s, w($(f || {})))
|
|
52
58
|
])
|
|
53
59
|
}))
|
|
54
60
|
]), 1032, ["configuration", "parsedSpec", "rawSpec"]));
|
|
55
61
|
}
|
|
56
62
|
});
|
|
57
63
|
export {
|
|
58
|
-
|
|
64
|
+
T as default
|
|
59
65
|
};
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
* This component allows dynamic selection of various layout configurations
|
|
3
|
-
*/
|
|
4
|
-
import type { InternalReferenceProps, ReferenceLayoutSlots } from '../../types';
|
|
1
|
+
import type { DocumentSelectorSlot, ReferenceLayoutProps, ReferenceLayoutSlots } from '../../types';
|
|
5
2
|
declare function __VLS_template(): {
|
|
6
3
|
attrs: Partial<{}>;
|
|
7
|
-
slots: Readonly<ReferenceLayoutSlots> & ReferenceLayoutSlots;
|
|
4
|
+
slots: Readonly<ReferenceLayoutSlots & DocumentSelectorSlot> & ReferenceLayoutSlots & DocumentSelectorSlot;
|
|
8
5
|
refs: {};
|
|
9
6
|
rootEl: any;
|
|
10
7
|
};
|
|
11
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
9
|
+
declare const __VLS_component: import("vue").DefineComponent<ReferenceLayoutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
10
|
updateContent: (v: string) => any;
|
|
14
11
|
toggleDarkMode: () => any;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<ReferenceLayoutProps> & Readonly<{
|
|
16
13
|
onUpdateContent?: ((v: string) => any) | undefined;
|
|
17
14
|
onToggleDarkMode?: (() => any) | undefined;
|
|
18
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layouts.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/Layouts.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Layouts.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/Layouts.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,aAAa,CAAA;AAkCpB,iBAAS,cAAc;WA6ET,OAAO,IAA6B;;;;EAKjD;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAOnB,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
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, useSlots as f, computed as g, openBlock as y, createBlock as k, resolveDynamicComponent as C, mergeProps as S, createSlots as $, withCtx as n, renderSlot as s, renderList as D, normalizeProps as v, guardReactiveProps as L } from "vue";
|
|
2
2
|
import M from "./ClassicLayout.vue.js";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import a from "./ModernLayout.vue.js";
|
|
4
|
+
const b = /* @__PURE__ */ c({
|
|
5
5
|
__name: "Layouts",
|
|
6
6
|
props: {
|
|
7
7
|
configuration: {},
|
|
@@ -10,24 +10,33 @@ const P = /* @__PURE__ */ l({
|
|
|
10
10
|
isDark: { type: Boolean }
|
|
11
11
|
},
|
|
12
12
|
emits: ["toggleDarkMode", "updateContent"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
|
|
13
|
+
setup(l) {
|
|
14
|
+
const p = l, m = f(), i = g(
|
|
15
|
+
() => Object.keys(m).filter(
|
|
16
|
+
(e) => e !== "document-selector"
|
|
17
|
+
)
|
|
18
|
+
), u = {
|
|
19
|
+
modern: a,
|
|
16
20
|
classic: M
|
|
17
21
|
};
|
|
18
|
-
return (
|
|
19
|
-
onToggleDarkMode:
|
|
20
|
-
onUpdateContent:
|
|
21
|
-
}),
|
|
22
|
-
|
|
22
|
+
return (e, o) => (y(), k(C(u[e.configuration.layout ?? "modern"] ?? a), S(p, {
|
|
23
|
+
onToggleDarkMode: o[0] || (o[0] = (t) => e.$emit("toggleDarkMode")),
|
|
24
|
+
onUpdateContent: o[1] || (o[1] = (t) => e.$emit("updateContent", t))
|
|
25
|
+
}), $({
|
|
26
|
+
"document-selector": n(() => [
|
|
27
|
+
s(e.$slots, "document-selector")
|
|
28
|
+
]),
|
|
29
|
+
_: 2
|
|
30
|
+
}, [
|
|
31
|
+
D(i.value, (t, r) => ({
|
|
23
32
|
name: r,
|
|
24
|
-
fn:
|
|
25
|
-
|
|
33
|
+
fn: n((d) => [
|
|
34
|
+
s(e.$slots, r, v(L(d || {})))
|
|
26
35
|
])
|
|
27
36
|
}))
|
|
28
37
|
]), 1040));
|
|
29
38
|
}
|
|
30
39
|
});
|
|
31
40
|
export {
|
|
32
|
-
|
|
41
|
+
b as default
|
|
33
42
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DocumentSelectorSlot, ReferenceLayoutProps, ReferenceLayoutSlots } from '../../types';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
|
-
slots: Readonly<ReferenceLayoutSlots> & ReferenceLayoutSlots;
|
|
4
|
+
slots: Readonly<ReferenceLayoutSlots & DocumentSelectorSlot> & ReferenceLayoutSlots & DocumentSelectorSlot;
|
|
5
5
|
refs: {};
|
|
6
6
|
rootEl: any;
|
|
7
7
|
};
|
|
8
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
9
|
+
declare const __VLS_component: import("vue").DefineComponent<ReferenceLayoutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
10
|
updateContent: (v: string) => any;
|
|
11
11
|
toggleDarkMode: () => any;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<ReferenceLayoutProps> & Readonly<{
|
|
13
13
|
onUpdateContent?: ((v: string) => any) | undefined;
|
|
14
14
|
onToggleDarkMode?: (() => any) | undefined;
|
|
15
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ModernLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ModernLayout.vue"],"names":[],"mappings":"AAiIA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAoChB,iBAAS,cAAc;WA2JT,OAAO,IAA6B;;;;EAKjD;AAiBD,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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3f813604"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
f as default
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, useSlots as C, watch as c, openBlock as t, createBlock as u, normalizeClass as B, createSlots as w, withCtx as n, unref as l, isRef as D, createCommentVNode as d, createElementBlock as p, renderSlot as f, createVNode as m, renderList as M, normalizeProps as $, guardReactiveProps as V } from "vue";
|
|
2
2
|
import { OpenApiClientButton as H } from "@scalar/api-client/components";
|
|
3
3
|
import { ScalarSidebarFooter as K, ScalarColorModeToggleButton as L } from "@scalar/components";
|
|
4
4
|
import { useBreakpoints as N } from "@scalar/use-hooks/useBreakpoints";
|
|
@@ -7,10 +7,10 @@ import U from "../MobileHeader.vue.js";
|
|
|
7
7
|
import z from "../../features/Search/SearchButton.vue.js";
|
|
8
8
|
import { useSidebar as A } from "../../hooks/useSidebar.js";
|
|
9
9
|
import { useNavState as O } from "../../hooks/useNavState.js";
|
|
10
|
-
const P = {
|
|
11
|
-
key:
|
|
10
|
+
const P = { key: 0 }, T = {
|
|
11
|
+
key: 1,
|
|
12
12
|
class: "scalar-api-references-standalone-search"
|
|
13
|
-
},
|
|
13
|
+
}, E = { key: 1 }, Y = /* @__PURE__ */ v({
|
|
14
14
|
__name: "ModernLayout",
|
|
15
15
|
props: {
|
|
16
16
|
configuration: {},
|
|
@@ -19,58 +19,61 @@ const P = {
|
|
|
19
19
|
isDark: { type: Boolean }
|
|
20
20
|
},
|
|
21
21
|
emits: ["toggleDarkMode", "updateContent"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
|
|
22
|
+
setup(g) {
|
|
23
|
+
const a = g, S = C(), { mediaQueries: k } = N(), { isSidebarOpen: i } = A(), h = !1;
|
|
24
|
+
c(k.lg, (e, o) => {
|
|
25
25
|
o && !e && (i.value = !1);
|
|
26
26
|
});
|
|
27
|
-
const { hash:
|
|
28
|
-
return
|
|
27
|
+
const { hash: y } = O();
|
|
28
|
+
return c(y, (e, o) => {
|
|
29
29
|
e && e !== o && (i.value = !1);
|
|
30
30
|
}), (e, o) => (t(), u(R, {
|
|
31
|
-
class:
|
|
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
|
+
}, w({
|
|
39
|
+
header: n(() => [
|
|
40
|
+
a.configuration.showSidebar ? (t(), u(U, {
|
|
41
41
|
key: 0,
|
|
42
42
|
open: l(i),
|
|
43
|
-
"onUpdate:open": o[0] || (o[0] = (r) =>
|
|
44
|
-
}, null, 8, ["open"])) :
|
|
43
|
+
"onUpdate:open": o[0] || (o[0] = (r) => D(i) ? i.value = r : null)
|
|
44
|
+
}, null, 8, ["open"])) : d("", !0)
|
|
45
45
|
]),
|
|
46
|
-
"sidebar-start":
|
|
46
|
+
"sidebar-start": n(({ spec: r }) => {
|
|
47
47
|
var s;
|
|
48
48
|
return [
|
|
49
|
-
|
|
50
|
-
f(
|
|
51
|
-
|
|
49
|
+
e.$slots["document-selector"] ? (t(), p("div", P, [
|
|
50
|
+
f(e.$slots, "document-selector", {}, void 0, !0)
|
|
51
|
+
])) : d("", !0),
|
|
52
|
+
a.configuration.hideSearch ? d("", !0) : (t(), p("div", T, [
|
|
53
|
+
m(l(z), {
|
|
54
|
+
searchHotKey: (s = a.configuration) == null ? void 0 : s.searchHotKey,
|
|
52
55
|
spec: r
|
|
53
56
|
}, null, 8, ["searchHotKey", "spec"])
|
|
54
57
|
]))
|
|
55
58
|
];
|
|
56
59
|
}),
|
|
57
|
-
"sidebar-end":
|
|
58
|
-
|
|
59
|
-
toggle:
|
|
60
|
-
|
|
60
|
+
"sidebar-end": n(() => [
|
|
61
|
+
m(l(K), { class: "darklight-reference" }, {
|
|
62
|
+
toggle: n(() => [
|
|
63
|
+
a.configuration.hideDarkModeToggle ? (t(), p("span", E)) : (t(), u(l(L), {
|
|
61
64
|
key: 0,
|
|
62
65
|
modelValue: e.isDark,
|
|
63
66
|
"onUpdate:modelValue": o[1] || (o[1] = (r) => e.$emit("toggleDarkMode"))
|
|
64
67
|
}, null, 8, ["modelValue"]))
|
|
65
68
|
]),
|
|
66
|
-
default:
|
|
69
|
+
default: n(() => {
|
|
67
70
|
var r;
|
|
68
71
|
return [
|
|
69
|
-
|
|
72
|
+
a.configuration.hideClientButton ? d("", !0) : (t(), u(l(H), {
|
|
70
73
|
key: 0,
|
|
71
74
|
buttonSource: "sidebar",
|
|
72
75
|
integration: e.configuration._integration,
|
|
73
|
-
isDevelopment:
|
|
76
|
+
isDevelopment: h,
|
|
74
77
|
url: (r = e.configuration.spec) == null ? void 0 : r.url
|
|
75
78
|
}, null, 8, ["integration", "url"]))
|
|
76
79
|
];
|
|
@@ -80,15 +83,15 @@ const P = {
|
|
|
80
83
|
]),
|
|
81
84
|
_: 2
|
|
82
85
|
}, [
|
|
83
|
-
|
|
86
|
+
M(S, (r, s) => ({
|
|
84
87
|
name: s,
|
|
85
|
-
fn:
|
|
86
|
-
|
|
88
|
+
fn: n((b) => [
|
|
89
|
+
f(e.$slots, s, $(V(b || {})), void 0, !0)
|
|
87
90
|
])
|
|
88
91
|
}))
|
|
89
92
|
]), 1032, ["class", "configuration", "parsedSpec", "rawSpec"]));
|
|
90
93
|
}
|
|
91
94
|
});
|
|
92
95
|
export {
|
|
93
|
-
|
|
96
|
+
Y as default
|
|
94
97
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SidebarElement.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1fa2fb33"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|