@scalar/api-reference 1.31.3 → 1.31.6
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 +55 -0
- package/dist/browser/standalone.js +15752 -15637
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.js +6 -6
- package/dist/components/ApiReferenceLayout.vue.d.ts +6 -3
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +4 -2
- package/dist/components/ApiReferenceLayout.vue2.js +230 -153
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +1 -1
- 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/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +81 -101
- 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 +114 -105
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +35 -35
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +17 -15
- package/dist/components/Content/Schema/helpers/schema-name.js +13 -21
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsList.vue2.js +10 -9
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +29 -28
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +35 -34
- package/dist/components/DocumentSelector/DocumentSelector.vue.d.ts.map +1 -1
- package/dist/components/DocumentSelector/DocumentSelector.vue.js +21 -28
- package/dist/components/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.js +3 -3
- package/dist/components/GettingStarted.vue2.js +23 -23
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -20
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +12 -13
- package/dist/components/Section/CompactSection.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue2.js +6 -6
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue2.js +5 -5
- package/dist/esm.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +11 -11
- 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 +21 -21
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +1 -1
- package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/features/Search/SearchButton.vue2.js +16 -16
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +1 -1
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +29 -28
- package/dist/features/sidebar/helpers/create-sidebar.d.ts +26 -0
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -0
- package/dist/features/sidebar/hooks/useSidebar.d.ts +23 -0
- package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -0
- package/dist/features/sidebar/index.d.ts +2 -0
- package/dist/features/sidebar/index.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -0
- package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +8 -0
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/operation-id-params.js +8 -0
- package/dist/features/traverse-schema/helpers/traverse-description.d.ts +9 -0
- package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts +16 -0
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +11 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +6 -0
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +9 -0
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -0
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +6 -0
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -0
- package/dist/features/traverse-schema/index.d.ts +4 -0
- package/dist/features/traverse-schema/index.d.ts.map +1 -0
- package/dist/features/traverse-schema/types.d.ts +51 -0
- package/dist/features/traverse-schema/types.d.ts.map +1 -0
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +16 -16
- package/dist/hooks/useNavState.d.ts +9 -4
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +31 -29
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +69 -68
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -44
- package/dist/legacy/fixtures/httpRequestMethods.js +2 -6
- package/dist/libs/openapi.js +32 -32
- package/dist/stores/useHttpClientStore.js +9 -8
- package/dist/style.css +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +40 -0
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -0
- package/dist/v2/ApiReferenceWorkspace.vue.js +65 -0
- package/dist/v2/ApiReferenceWorkspace.vue3.js +5 -0
- package/dist/v2/events/definitions.d.ts +35 -0
- package/dist/v2/events/definitions.d.ts.map +1 -0
- package/dist/v2/events/index.d.ts +3 -0
- package/dist/v2/events/index.d.ts.map +1 -0
- package/dist/v2/events/listeners.d.ts +8 -0
- package/dist/v2/events/listeners.d.ts.map +1 -0
- package/dist/v2/events/listeners.js +15 -0
- package/dist/v2/styles.d.ts +2 -0
- package/dist/v2/styles.d.ts.map +1 -0
- package/package.json +13 -11
- package/dist/components/HttpMethod/constants.d.ts +0 -9
- package/dist/components/HttpMethod/constants.d.ts.map +0 -1
- package/dist/components/HttpMethod/constants.js +0 -36
- package/dist/components/HttpMethod/utils/isRequestMethod.d.ts +0 -4
- package/dist/components/HttpMethod/utils/isRequestMethod.d.ts.map +0 -1
- package/dist/components/HttpMethod/utils/isRequestMethod.js +0 -7
- package/dist/components/Layouts/ClassicLayout.vue.d.ts +0 -23
- package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +0 -1
- package/dist/components/Layouts/ClassicLayout.vue.js +0 -67
- package/dist/components/Layouts/ClassicLayout.vue2.js +0 -4
- package/dist/components/Layouts/Layouts.vue.d.ts +0 -26
- package/dist/components/Layouts/Layouts.vue.d.ts.map +0 -1
- package/dist/components/Layouts/Layouts.vue.js +0 -35
- package/dist/components/Layouts/Layouts.vue2.js +0 -4
- package/dist/components/Layouts/ModernLayout.vue.d.ts +0 -23
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +0 -1
- package/dist/components/Layouts/ModernLayout.vue.js +0 -8
- package/dist/components/Layouts/ModernLayout.vue2.js +0 -102
- package/dist/components/Layouts/index.d.ts +0 -2
- package/dist/components/Layouts/index.d.ts.map +0 -1
- package/dist/components/SingleApiReference.vue.d.ts +0 -29
- package/dist/components/SingleApiReference.vue.d.ts.map +0 -1
- package/dist/components/SingleApiReference.vue.js +0 -57
- package/dist/components/SingleApiReference.vue3.js +0 -5
- package/dist/helpers/freeze-element.d.ts +0 -11
- package/dist/helpers/freeze-element.d.ts.map +0 -1
- package/dist/helpers/freeze-element.js +0 -20
- package/dist/helpers/is-mac-os.d.ts +0 -5
- package/dist/helpers/is-mac-os.d.ts.map +0 -1
- package/dist/helpers/is-mac-os.js +0 -4
- package/dist/helpers/measure.d.ts +0 -21
- package/dist/helpers/measure.d.ts.map +0 -1
- package/dist/helpers/measure.js +0 -7
- package/dist/helpers/scroll-to-id.d.ts +0 -7
- package/dist/helpers/scroll-to-id.d.ts.map +0 -1
- package/dist/helpers/scroll-to-id.js +0 -21
- package/dist/helpers/sleep.d.ts +0 -6
- package/dist/helpers/sleep.d.ts.map +0 -1
- package/dist/helpers/sleep.js +0 -4
- package/dist/legacy/helpers/index.d.ts +0 -2
- package/dist/legacy/helpers/index.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeRequestMethod.d.ts +0 -6
- package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeRequestMethod.js +0 -10
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { defineComponent as B, useSlots as D, watch as m, computed as w, createBlock as u, openBlock as t, normalizeClass as $, createSlots as M, withCtx as n, createVNode as f, unref as i, createCommentVNode as d, createElementBlock as p, renderSlot as c, normalizeProps as g, guardReactiveProps as S, isRef as V, renderList as K } from "vue";
|
|
2
|
-
import { OpenApiClientButton as H } from "@scalar/api-client/components";
|
|
3
|
-
import { ScalarSidebarFooter as L, ScalarColorModeToggleButton as N } from "@scalar/components";
|
|
4
|
-
import { getObjectKeys as O } from "@scalar/oas-utils/helpers";
|
|
5
|
-
import { useBreakpoints as R } from "@scalar/use-hooks/useBreakpoints";
|
|
6
|
-
import U from "../ApiReferenceLayout.vue.js";
|
|
7
|
-
import z from "../MobileHeader.vue.js";
|
|
8
|
-
import { useNavState as A } from "../../hooks/useNavState.js";
|
|
9
|
-
import { useSidebar as T } from "../../hooks/useSidebar.js";
|
|
10
|
-
import j from "../../features/Search/SearchButton.vue.js";
|
|
11
|
-
const E = { key: 0 }, F = {
|
|
12
|
-
key: 1,
|
|
13
|
-
class: "scalar-api-references-standalone-search"
|
|
14
|
-
}, P = { key: 1 }, x = /* @__PURE__ */ B({
|
|
15
|
-
__name: "ModernLayout",
|
|
16
|
-
props: {
|
|
17
|
-
configuration: {},
|
|
18
|
-
dereferencedDocument: {},
|
|
19
|
-
originalDocument: {},
|
|
20
|
-
isDark: { type: Boolean },
|
|
21
|
-
parsedSpec: {},
|
|
22
|
-
rawSpec: {}
|
|
23
|
-
},
|
|
24
|
-
emits: ["toggleDarkMode", "updateContent"],
|
|
25
|
-
setup(k) {
|
|
26
|
-
const s = k, h = D(), { mediaQueries: b } = R(), { isSidebarOpen: a } = T(), v = !1;
|
|
27
|
-
m(b.lg, (e, o) => {
|
|
28
|
-
o && !e && (a.value = !1);
|
|
29
|
-
});
|
|
30
|
-
const { hash: y } = A();
|
|
31
|
-
m(y, (e, o) => {
|
|
32
|
-
e && e !== o && (a.value = !1);
|
|
33
|
-
});
|
|
34
|
-
const C = w(
|
|
35
|
-
() => O(h).filter((e) => e !== "sidebar-start")
|
|
36
|
-
);
|
|
37
|
-
return (e, o) => (t(), u(U, {
|
|
38
|
-
class: $({
|
|
39
|
-
"scalar-api-references-standalone-mobile": e.configuration.showSidebar ?? !0
|
|
40
|
-
}),
|
|
41
|
-
configuration: e.configuration,
|
|
42
|
-
parsedSpec: e.parsedSpec,
|
|
43
|
-
rawSpec: e.rawSpec,
|
|
44
|
-
onUpdateContent: o[2] || (o[2] = (r) => e.$emit("updateContent", r))
|
|
45
|
-
}, M({
|
|
46
|
-
header: n(() => [
|
|
47
|
-
e.configuration.showSidebar ?? !0 ? (t(), u(z, {
|
|
48
|
-
key: 0,
|
|
49
|
-
open: i(a),
|
|
50
|
-
"onUpdate:open": o[0] || (o[0] = (r) => V(a) ? a.value = r : null)
|
|
51
|
-
}, null, 8, ["open"])) : d("", !0)
|
|
52
|
-
]),
|
|
53
|
-
"sidebar-start": n((r) => {
|
|
54
|
-
var l;
|
|
55
|
-
return [
|
|
56
|
-
e.$slots["document-selector"] ? (t(), p("div", E, [
|
|
57
|
-
c(e.$slots, "document-selector", {}, void 0, !0)
|
|
58
|
-
])) : d("", !0),
|
|
59
|
-
s.configuration.hideSearch ? d("", !0) : (t(), p("div", F, [
|
|
60
|
-
f(i(j), {
|
|
61
|
-
searchHotKey: (l = s.configuration) == null ? void 0 : l.searchHotKey,
|
|
62
|
-
spec: r.spec
|
|
63
|
-
}, null, 8, ["searchHotKey", "spec"])
|
|
64
|
-
])),
|
|
65
|
-
c(e.$slots, "sidebar-start", g(S(r)), void 0, !0)
|
|
66
|
-
];
|
|
67
|
-
}),
|
|
68
|
-
"sidebar-end": n(() => [
|
|
69
|
-
f(i(L), { class: "darklight-reference" }, {
|
|
70
|
-
toggle: n(() => [
|
|
71
|
-
s.configuration.hideDarkModeToggle ? (t(), p("span", P)) : (t(), u(i(N), {
|
|
72
|
-
key: 0,
|
|
73
|
-
modelValue: e.isDark,
|
|
74
|
-
"onUpdate:modelValue": o[1] || (o[1] = (r) => e.$emit("toggleDarkMode"))
|
|
75
|
-
}, null, 8, ["modelValue"]))
|
|
76
|
-
]),
|
|
77
|
-
default: n(() => [
|
|
78
|
-
s.configuration.hideClientButton ? d("", !0) : (t(), u(i(H), {
|
|
79
|
-
key: 0,
|
|
80
|
-
buttonSource: "sidebar",
|
|
81
|
-
integration: e.configuration._integration,
|
|
82
|
-
isDevelopment: v,
|
|
83
|
-
url: e.configuration.url
|
|
84
|
-
}, null, 8, ["integration", "url"]))
|
|
85
|
-
]),
|
|
86
|
-
_: 1
|
|
87
|
-
})
|
|
88
|
-
]),
|
|
89
|
-
_: 2
|
|
90
|
-
}, [
|
|
91
|
-
K(C.value, (r) => ({
|
|
92
|
-
name: r,
|
|
93
|
-
fn: n((l) => [
|
|
94
|
-
c(e.$slots, r, g(S(l || {})), void 0, !0)
|
|
95
|
-
])
|
|
96
|
-
}))
|
|
97
|
-
]), 1032, ["class", "configuration", "parsedSpec", "rawSpec"]));
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
export {
|
|
101
|
-
x as default
|
|
102
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
configuration: Partial<ApiReferenceConfiguration>;
|
|
4
|
-
};
|
|
5
|
-
declare function __VLS_template(): {
|
|
6
|
-
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
footer?(_: {}): any;
|
|
9
|
-
footer?(_: {}): any;
|
|
10
|
-
"document-selector"?(_: {}): any;
|
|
11
|
-
"sidebar-start"?(_: {}): any;
|
|
12
|
-
};
|
|
13
|
-
refs: {};
|
|
14
|
-
rootEl: any;
|
|
15
|
-
};
|
|
16
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
|
-
updateContent: (value: string) => any;
|
|
19
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
-
onUpdateContent?: ((value: string) => any) | undefined;
|
|
21
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
-
export default _default;
|
|
24
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
-
new (): {
|
|
26
|
-
$slots: S;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=SingleApiReference.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SingleApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/SingleApiReference.vue"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAU5E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CAClD,CAAC;AAoCF,iBAAS,cAAc;WAuGT,OAAO,IAA6B;;wBAXrB,GAAG;wBACH,GAAG;qCACU,GAAG;iCACP,GAAG;;;;EAaxC;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,57 +0,0 @@
|
|
|
1
|
-
import { defineComponent as c, watch as l, computed as g, createElementBlock as C, openBlock as f, Fragment as k, createBlock as M, createCommentVNode as D, createVNode as p, resolveDynamicComponent as v, withCtx as t, createTextVNode as $, toDisplayString as S, unref as i, renderSlot as r } from "vue";
|
|
2
|
-
import { useColorMode as y } from "@scalar/use-hooks/useColorMode";
|
|
3
|
-
import { useSeoMeta as B } from "@unhead/vue";
|
|
4
|
-
import { useFavicon as N } from "@vueuse/core";
|
|
5
|
-
import V from "./Layouts/Layouts.vue.js";
|
|
6
|
-
const E = /* @__PURE__ */ c({
|
|
7
|
-
__name: "SingleApiReference",
|
|
8
|
-
props: {
|
|
9
|
-
configuration: {}
|
|
10
|
-
},
|
|
11
|
-
emits: ["updateContent"],
|
|
12
|
-
setup(e) {
|
|
13
|
-
const { toggleColorMode: u, isDarkMode: a } = y({
|
|
14
|
-
initialColorMode: e.configuration.darkMode ? "dark" : void 0,
|
|
15
|
-
overrideColorMode: e.configuration.forceDarkModeState
|
|
16
|
-
});
|
|
17
|
-
l(
|
|
18
|
-
() => e.configuration.darkMode,
|
|
19
|
-
(o) => a.value = !!o
|
|
20
|
-
), e.configuration.metaData && B(e.configuration.metaData);
|
|
21
|
-
const d = g(() => e.configuration.favicon);
|
|
22
|
-
return N(d), (o, n) => {
|
|
23
|
-
var s;
|
|
24
|
-
return f(), C(k, null, [
|
|
25
|
-
(s = o.configuration) != null && s.customCss ? (f(), M(v("style"), { key: 0 }, {
|
|
26
|
-
default: t(() => [
|
|
27
|
-
$(S(o.configuration.customCss), 1)
|
|
28
|
-
]),
|
|
29
|
-
_: 1
|
|
30
|
-
})) : D("", !0),
|
|
31
|
-
p(i(V), {
|
|
32
|
-
configuration: o.configuration,
|
|
33
|
-
isDark: i(a),
|
|
34
|
-
onToggleDarkMode: n[0] || (n[0] = () => i(u)()),
|
|
35
|
-
onUpdateContent: n[1] || (n[1] = (m) => o.$emit("updateContent", m))
|
|
36
|
-
}, {
|
|
37
|
-
footer: t(() => [
|
|
38
|
-
r(o.$slots, "footer")
|
|
39
|
-
]),
|
|
40
|
-
"content-end": t(() => [
|
|
41
|
-
r(o.$slots, "footer")
|
|
42
|
-
]),
|
|
43
|
-
"document-selector": t(() => [
|
|
44
|
-
r(o.$slots, "document-selector")
|
|
45
|
-
]),
|
|
46
|
-
"sidebar-start": t(() => [
|
|
47
|
-
r(o.$slots, "sidebar-start")
|
|
48
|
-
]),
|
|
49
|
-
_: 3
|
|
50
|
-
}, 8, ["configuration", "isDark"])
|
|
51
|
-
], 64);
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
export {
|
|
56
|
-
E as default
|
|
57
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scroll Freezing Utility
|
|
3
|
-
* "Freezes" the scroll position of an element, so that it doesn't move when the rest of the content changes
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* const unfreeze = freezeElement(document.querySelector('#your-element'))
|
|
7
|
-
* ... content changes ...
|
|
8
|
-
* unfreeze()
|
|
9
|
-
*/
|
|
10
|
-
export declare const freezeElement: (element: HTMLElement) => () => void;
|
|
11
|
-
//# sourceMappingURL=freeze-element.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"freeze-element.d.ts","sourceRoot":"","sources":["../../src/helpers/freeze-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,YAAa,WAAW,eAiCjD,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const s = (t) => {
|
|
2
|
-
if (!t)
|
|
3
|
-
return () => null;
|
|
4
|
-
const e = t.getBoundingClientRect().top, r = new MutationObserver(() => {
|
|
5
|
-
const n = t.getBoundingClientRect().top;
|
|
6
|
-
if (n !== e) {
|
|
7
|
-
const o = n - e;
|
|
8
|
-
window.scrollBy(0, o);
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
return r.observe(document.body, {
|
|
12
|
-
childList: !0,
|
|
13
|
-
subtree: !0,
|
|
14
|
-
attributes: !0,
|
|
15
|
-
characterData: !0
|
|
16
|
-
}), () => r.disconnect();
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
s as freezeElement
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-mac-os.d.ts","sourceRoot":"","sources":["../../src/helpers/is-mac-os.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,eAAoF,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Measures the execution time of a function and logs it.
|
|
3
|
-
* Works with both async and sync functions.
|
|
4
|
-
* Returns the result of the measured function.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```ts
|
|
8
|
-
* // Async function
|
|
9
|
-
* const result = await measure('api-call', async () => {
|
|
10
|
-
* return await fetchData()
|
|
11
|
-
* })
|
|
12
|
-
*
|
|
13
|
-
* // Sync function
|
|
14
|
-
* const result = measure('computation', () => {
|
|
15
|
-
* return heavyComputation()
|
|
16
|
-
* })
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export declare function measure<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
20
|
-
export declare function measure<T>(name: string, fn: () => T): T;
|
|
21
|
-
//# sourceMappingURL=measure.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../src/helpers/measure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;AAC1E,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA"}
|
package/dist/helpers/measure.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-to-id.d.ts","sourceRoot":"","sources":["../../src/helpers/scroll-to-id.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,OAAc,MAAM,UAAU,OAAO,kBAkC3D,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const l = async (t, r) => {
|
|
2
|
-
const n = (e) => {
|
|
3
|
-
e.scrollIntoView(), r && e.focus();
|
|
4
|
-
}, o = document.getElementById(t);
|
|
5
|
-
if (o) {
|
|
6
|
-
n(o);
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const s = Date.now() + 1e3, c = () => {
|
|
10
|
-
const e = document.getElementById(t);
|
|
11
|
-
if (e) {
|
|
12
|
-
n(e);
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
Date.now() < s && requestAnimationFrame(c);
|
|
16
|
-
};
|
|
17
|
-
requestAnimationFrame(c);
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
l as scrollToId
|
|
21
|
-
};
|
package/dist/helpers/sleep.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../src/helpers/sleep.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,KAAK,OAAQ,MAAM,qBAA0C,CAAA"}
|
package/dist/helpers/sleep.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { RequestMethod } from '@scalar/oas-utils/entities/spec';
|
|
2
|
-
/**
|
|
3
|
-
* Get a normalized request method (e.g. GET, POST, etc.)
|
|
4
|
-
*/
|
|
5
|
-
export declare const normalizeRequestMethod: (method?: string) => RequestMethod;
|
|
6
|
-
//# sourceMappingURL=normalizeRequestMethod.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAMpE;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,aAkBxD,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { isRequestMethod as s } from "../fixtures/httpRequestMethods.js";
|
|
2
|
-
const e = "get", r = (t) => {
|
|
3
|
-
if (typeof t != "string")
|
|
4
|
-
return console.warn(`Request method is not a string. Using ${e} as the default.`), e;
|
|
5
|
-
const o = t.trim().toUpperCase();
|
|
6
|
-
return s(o) ? o : (console.warn(`${t} is not a valid request method. Using ${e} as the default.`), e);
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
r as normalizeRequestMethod
|
|
10
|
-
};
|