@scalar/api-reference 1.31.7 → 1.31.9
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 +18613 -18470
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +10 -30
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +240 -222
- package/dist/components/Content/Content.vue.d.ts +2 -0
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +84 -74
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +93 -83
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +84 -86
- package/dist/components/Content/Models/Models.vue.js +1 -1
- package/dist/components/Content/Models/Models.vue2.js +4 -4
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +53 -53
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +117 -112
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +161 -191
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
- 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 +22 -25
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +46 -47
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +45 -47
- package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +40 -41
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagSection.vue.js +2 -2
- package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
- package/dist/components/MobileHeader.vue.d.ts +1 -8
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +1 -1
- package/dist/components/MobileHeader.vue2.js +19 -19
- package/dist/components/Section/Section.vue.js +2 -2
- package/dist/components/Section/Section.vue2.js +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
- package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
- package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
- package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
- package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
- 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 +200 -179
- package/dist/features/Operation/Operation.vue.d.ts +0 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +31 -34
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +2 -2
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +31 -38
- package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
- package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useResponses.js +12 -13
- package/dist/features/Operation/index.d.ts +0 -1
- package/dist/features/Operation/index.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
- 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 +85 -72
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -4
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +114 -98
- 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 +61 -64
- package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
- package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
- package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
- package/dist/features/sidebar/hooks/useSidebar.js +18 -0
- package/dist/features/sidebar/index.d.ts +2 -1
- package/dist/features/sidebar/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
- package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
- package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
- package/dist/features/traverse-schema/index.d.ts +3 -3
- package/dist/features/traverse-schema/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/types.d.ts +8 -5
- package/dist/features/traverse-schema/types.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts +2 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +72 -88
- package/dist/hooks/useMultipleDocuments.d.ts +6 -6
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +1 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +14 -9
- package/dist/hooks/useOperation.d.ts +7 -7
- package/dist/hooks/useOperation.d.ts.map +1 -1
- package/dist/hooks/useOperation.js +13 -12
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -25
- package/dist/legacy/fixtures/index.d.ts +1 -1
- package/dist/libs/openapi.d.ts +3 -4
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +8 -9
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
- package/package.json +17 -17
- package/dist/components/Content/Webhooks/index.d.ts +0 -2
- package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
- package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
- package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
- package/dist/features/Operation/Webhooks.vue.js +0 -7
- package/dist/features/Operation/Webhooks.vue2.js +0 -121
- package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
- package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
- package/dist/features/Operation/components/Webhook.vue.js +0 -7
- package/dist/features/Operation/components/Webhook.vue2.js +0 -29
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
- package/dist/hooks/useSidebar.d.ts +0 -53
- package/dist/hooks/useSidebar.d.ts.map +0 -1
- package/dist/hooks/useSidebar.js +0 -248
- package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,KAAK,WAAW,GAAG;IACjB,2DAA2D;IAC3D,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACvB,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,8BAA8B;IAC9B,MAAM,EAAE,OAAO,CAAC,UAAU,GAAG,MAAM,CAAA;CACpC,CAAC;AAcF,iBAAS,cAAc;WA0CT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,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 n, computed as r, createBlock as s, openBlock as l, resolveDynamicComponent as m, normalizeStyle as
|
|
2
|
-
import { getHttpMethodInfo as
|
|
3
|
-
import { normalizeHttpMethod as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as n, computed as r, createBlock as s, openBlock as l, resolveDynamicComponent as m, normalizeStyle as d, withCtx as c, renderSlot as h, createTextVNode as i, toDisplayString as u } from "vue";
|
|
2
|
+
import { getHttpMethodInfo as f } from "@scalar/helpers/http/http-info";
|
|
3
|
+
import { normalizeHttpMethod as y } from "@scalar/helpers/http/normalize-http-method";
|
|
4
|
+
const C = /* @__PURE__ */ n({
|
|
5
5
|
__name: "HttpMethod",
|
|
6
6
|
props: {
|
|
7
7
|
as: {},
|
|
@@ -10,18 +10,19 @@ const z = /* @__PURE__ */ n({
|
|
|
10
10
|
method: {}
|
|
11
11
|
},
|
|
12
12
|
setup(p) {
|
|
13
|
-
const
|
|
14
|
-
return (o,
|
|
13
|
+
const e = p, t = r(() => f(e.method)), a = r(() => y(e.method));
|
|
14
|
+
return (o, v) => (l(), s(m(o.as ?? "span"), {
|
|
15
15
|
class: "uppercase",
|
|
16
|
-
style:
|
|
16
|
+
style: d({ [o.property || "color"]: t.value.colorVar })
|
|
17
17
|
}, {
|
|
18
|
-
default:
|
|
19
|
-
h(
|
|
18
|
+
default: c(() => [
|
|
19
|
+
h(o.$slots, "default"),
|
|
20
|
+
i(" " + u(o.short ? t.value.short : a.value), 1)
|
|
20
21
|
]),
|
|
21
|
-
_:
|
|
22
|
+
_: 3
|
|
22
23
|
}, 8, ["style"]));
|
|
23
24
|
}
|
|
24
25
|
});
|
|
25
26
|
export {
|
|
26
|
-
|
|
27
|
+
C as default
|
|
27
28
|
};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
open?: boolean;
|
|
3
|
-
};
|
|
4
1
|
declare function __VLS_template(): {
|
|
5
2
|
attrs: Partial<{}>;
|
|
6
3
|
slots: {
|
|
@@ -10,11 +7,7 @@ declare function __VLS_template(): {
|
|
|
10
7
|
rootEl: HTMLDivElement;
|
|
11
8
|
};
|
|
12
9
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
14
|
-
"update:open": (open: boolean) => any;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
-
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
17
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
18
11
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
12
|
export default _default;
|
|
20
13
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/MobileHeader.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MobileHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/MobileHeader.vue"],"names":[],"mappings":"AAkFA,iBAAS,cAAc;WAsET,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./MobileHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-08ed3a24"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconButton as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { defineComponent as i, computed as l, createElementBlock as d, openBlock as m, createVNode as u, createElementVNode as n, unref as t, toDisplayString as p, renderSlot as _ } from "vue";
|
|
2
|
+
import { ScalarIconButton as b } from "@scalar/components";
|
|
3
|
+
import { useNavState as f } from "../hooks/useNavState.js";
|
|
4
|
+
import { useSidebar as v } from "../features/sidebar/hooks/useSidebar.js";
|
|
5
|
+
const S = { class: "references-mobile-header t-doc__header" }, h = { class: "references-mobile-breadcrumbs" }, C = { class: "references-mobile-header-actions" }, I = /* @__PURE__ */ i({
|
|
5
6
|
__name: "MobileHeader",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
label: e.open ? "Close Menu" : "Open Menu",
|
|
7
|
+
setup(M) {
|
|
8
|
+
const { isSidebarOpen: e, items: s } = v(), { getReferenceId: a } = f(), c = l(() => {
|
|
9
|
+
var o;
|
|
10
|
+
return (o = s.value) == null ? void 0 : o.titles.get(a());
|
|
11
|
+
});
|
|
12
|
+
return (o, r) => (m(), d("div", S, [
|
|
13
|
+
u(t(b), {
|
|
14
|
+
icon: t(e) ? "Close" : "Menu",
|
|
15
|
+
label: t(e) ? "Close Menu" : "Open Menu",
|
|
16
16
|
size: "md",
|
|
17
|
-
onClick:
|
|
17
|
+
onClick: r[0] || (r[0] = (g) => e.value = !t(e))
|
|
18
18
|
}, null, 8, ["icon", "label"]),
|
|
19
|
-
n("span",
|
|
20
|
-
n("div",
|
|
21
|
-
|
|
19
|
+
n("span", h, p(c.value), 1),
|
|
20
|
+
n("div", C, [
|
|
21
|
+
_(o.$slots, "actions", {}, void 0, !0)
|
|
22
22
|
])
|
|
23
23
|
]));
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
I as default
|
|
28
28
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Section.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-393971a5"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, createBlock as c, openBlock as m, withCtx as p, renderSlot as f } from "vue";
|
|
2
2
|
import u from "../IntersectionObserver.vue.js";
|
|
3
3
|
import { useNavState as S } from "../../hooks/useNavState.js";
|
|
4
|
-
import { useSidebar as _ } from "../../hooks/useSidebar.js";
|
|
4
|
+
import { useSidebar as _ } from "../../features/sidebar/hooks/useSidebar.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "Section",
|
|
7
7
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ShowMoreButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c46d29d9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as i, createElementBlock as s, openBlock as a, createTextVNode as m, createVNode as l, unref as u } from "vue";
|
|
2
2
|
import { ScalarIcon as d } from "@scalar/components";
|
|
3
3
|
import { useConfig as f } from "../hooks/useConfig.js";
|
|
4
|
-
import { useSidebar as p } from "../hooks/useSidebar.js";
|
|
4
|
+
import { useSidebar as p } from "../features/sidebar/hooks/useSidebar.js";
|
|
5
5
|
const b = /* @__PURE__ */ i({
|
|
6
6
|
__name: "ShowMoreButton",
|
|
7
7
|
props: {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { Spec } from '@scalar/types/legacy';
|
|
2
|
-
import { type SorterOption } from '../../hooks/useSidebar.js';
|
|
3
1
|
type __VLS_Props = {
|
|
4
|
-
|
|
5
|
-
}
|
|
2
|
+
title: string;
|
|
3
|
+
};
|
|
6
4
|
declare function __VLS_template(): {
|
|
7
5
|
attrs: Partial<{}>;
|
|
8
6
|
slots: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AA+QA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AAmHF,iBAAS,cAAc;WAoKT,OAAO,IAA6B;;iCAVb,GAAG;+BACJ,GAAG;;;;;;EActC;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Sidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-66291b32"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,175 +1,129 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { sleep as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useNavState as
|
|
6
|
-
import { useSidebar as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as N, ref as T, watch as L, onMounted as F, onUnmounted as G, createElementBlock as a, openBlock as n, renderSlot as C, createElementVNode as A, createVNode as V, withCtx as p, Fragment as u, renderList as m, unref as o, createBlock as c, toDisplayString as M, createCommentVNode as $ } from "vue";
|
|
2
|
+
import { sleep as w } from "@scalar/helpers/testing/sleep";
|
|
3
|
+
import h from "./SidebarElement.vue.js";
|
|
4
|
+
import y from "./SidebarGroup.vue.js";
|
|
5
|
+
import { useNavState as D } from "../../hooks/useNavState.js";
|
|
6
|
+
import { useSidebar as H } from "../../features/sidebar/hooks/useSidebar.js";
|
|
7
|
+
const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-title" }, q = -160, X = /* @__PURE__ */ N({
|
|
8
8
|
__name: "Sidebar",
|
|
9
9
|
props: {
|
|
10
|
-
|
|
11
|
-
tagsSorter: { type: [String, Function] },
|
|
12
|
-
operationsSorter: { type: [String, Function] }
|
|
10
|
+
title: {}
|
|
13
11
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
tagsSorter: g.tagsSorter,
|
|
19
|
-
operationsSorter: g.operationsSorter
|
|
20
|
-
}
|
|
21
|
-
), b = w(null), o = w(!0);
|
|
22
|
-
N(p, (r) => {
|
|
23
|
-
!I.value || o.value || typeof window > "u" || E(r);
|
|
12
|
+
setup(x) {
|
|
13
|
+
const { hash: d, isIntersectionEnabled: I } = D(), { items: O, toggleCollapsedSidebarItem: _, collapsedSidebarItems: g } = H(), f = T(null), l = T(!0);
|
|
14
|
+
L(d, (e) => {
|
|
15
|
+
!I.value || l.value || typeof window > "u" || E(e);
|
|
24
16
|
});
|
|
25
|
-
const E = (
|
|
26
|
-
var
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
17
|
+
const E = (e) => {
|
|
18
|
+
var t, s, S, k;
|
|
19
|
+
const r = document.getElementById(`sidebar-${e}`);
|
|
20
|
+
if (!r || !f.value)
|
|
29
21
|
return;
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
}, B = (
|
|
33
|
-
if (!
|
|
22
|
+
let i = q;
|
|
23
|
+
r.getAttribute("data-sidebar-type") === "heading" ? i += r.offsetTop + ((t = r.getElementsByClassName("sidebar-heading")) == null ? void 0 : t[0]).offsetHeight : i += r.offsetTop + (((s = r.parentElement) == null ? void 0 : s.offsetTop) ?? 0) + (((k = (S = r.parentElement) == null ? void 0 : S.parentElement) == null ? void 0 : k.offsetTop) ?? 0), f.value.scrollTo({ top: i, behavior: "smooth" });
|
|
24
|
+
}, B = (e) => {
|
|
25
|
+
if (!f.value)
|
|
34
26
|
return;
|
|
35
|
-
const
|
|
36
|
-
document.getElementById(`sidebar-${
|
|
27
|
+
const r = new MutationObserver((i, t) => {
|
|
28
|
+
document.getElementById(`sidebar-${e}`) && (E(e), l.value = !1, t.disconnect());
|
|
37
29
|
});
|
|
38
|
-
return
|
|
30
|
+
return r.observe(f.value, {
|
|
39
31
|
childList: !0,
|
|
40
32
|
subtree: !0
|
|
41
|
-
}),
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
}), r;
|
|
34
|
+
}, v = (e) => d.value === e ? !0 : d.value.includes("/description/") ? d.value.split("/description/")[0] === e : !1;
|
|
35
|
+
F(() => {
|
|
36
|
+
const e = B(d.value);
|
|
37
|
+
d.value || setTimeout(() => l.value = !1, 300), G(() => {
|
|
38
|
+
e == null || e.disconnect();
|
|
47
39
|
});
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
key:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
_: 2
|
|
113
|
-
}, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"]))), 128))
|
|
114
|
-
], 64)) : (s(), n(d, { key: 1 }, [
|
|
115
|
-
e.show ? (s(), f(S, {
|
|
40
|
+
});
|
|
41
|
+
const b = (e) => {
|
|
42
|
+
var r;
|
|
43
|
+
return "children" in e && (((r = e.children) == null ? void 0 : r.length) ?? 0) > 0;
|
|
44
|
+
};
|
|
45
|
+
return (e, r) => (n(), a("div", R, [
|
|
46
|
+
C(e.$slots, "sidebar-start", {}, void 0, !0),
|
|
47
|
+
A("nav", {
|
|
48
|
+
ref_key: "scrollerEl",
|
|
49
|
+
ref: f,
|
|
50
|
+
"aria-label": `Table of contents for ${e.title}`,
|
|
51
|
+
class: "sidebar-pages custom-scroll custom-scroll-self-contain-overflow"
|
|
52
|
+
}, [
|
|
53
|
+
V(y, { level: 0 }, {
|
|
54
|
+
default: p(() => [
|
|
55
|
+
(n(!0), a(u, null, m(o(O).entries, (i) => (n(), a(u, {
|
|
56
|
+
key: i.id
|
|
57
|
+
}, [
|
|
58
|
+
"isGroup" in i && i.isGroup ? (n(), a(u, { key: 0 }, [
|
|
59
|
+
A("li", j, M(i.title), 1),
|
|
60
|
+
(n(!0), a(u, null, m(i.children, (t) => (n(), c(h, {
|
|
61
|
+
key: t.id,
|
|
62
|
+
id: `sidebar-${t.id}`,
|
|
63
|
+
"data-sidebar-type": "heading",
|
|
64
|
+
hasChildren: b(t),
|
|
65
|
+
isActive: v(t.id),
|
|
66
|
+
item: t,
|
|
67
|
+
open: o(g)[t.id] ?? !1,
|
|
68
|
+
onToggleOpen: async () => {
|
|
69
|
+
l.value = !0, o(_)(t.id), await o(w)(100), l.value = !1;
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
default: p(() => [
|
|
73
|
+
b(t) ? (n(), c(y, {
|
|
74
|
+
key: 0,
|
|
75
|
+
level: 1
|
|
76
|
+
}, {
|
|
77
|
+
default: p(() => [
|
|
78
|
+
(n(!0), a(u, null, m(t.children, (s) => (n(), c(h, {
|
|
79
|
+
key: s.id,
|
|
80
|
+
id: `sidebar-${s.id}`,
|
|
81
|
+
isActive: v(s.id),
|
|
82
|
+
item: s
|
|
83
|
+
}, null, 8, ["id", "isActive", "item"]))), 128))
|
|
84
|
+
]),
|
|
85
|
+
_: 2
|
|
86
|
+
}, 1024)) : $("", !0)
|
|
87
|
+
]),
|
|
88
|
+
_: 2
|
|
89
|
+
}, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"]))), 128))
|
|
90
|
+
], 64)) : (n(), c(h, {
|
|
91
|
+
key: 1,
|
|
92
|
+
id: `sidebar-${i.id}`,
|
|
93
|
+
"data-sidebar-type": "heading",
|
|
94
|
+
hasChildren: b(i),
|
|
95
|
+
isActive: v(i.id),
|
|
96
|
+
item: i,
|
|
97
|
+
open: o(g)[i.id] ?? !1,
|
|
98
|
+
onToggleOpen: async () => {
|
|
99
|
+
l.value = !0, o(_)(i.id), await o(w)(100), l.value = !1;
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
default: p(() => [
|
|
103
|
+
b(i) ? (n(), c(y, {
|
|
116
104
|
key: 0,
|
|
117
|
-
|
|
118
|
-
"data-sidebar-type": "heading",
|
|
119
|
-
hasChildren: e.children && e.children.length > 0,
|
|
120
|
-
isActive: y(e.id),
|
|
121
|
-
item: {
|
|
122
|
-
id: e.id,
|
|
123
|
-
title: e.displayTitle ?? e.title,
|
|
124
|
-
select: e.select,
|
|
125
|
-
httpVerb: e.httpVerb,
|
|
126
|
-
deprecated: e.deprecated ?? !1
|
|
127
|
-
},
|
|
128
|
-
open: u(k)[e.id] ?? !1,
|
|
129
|
-
onToggleOpen: async () => {
|
|
130
|
-
o.value = !0, u(_)(e.id), await u(C)(100), o.value = !1;
|
|
131
|
-
}
|
|
105
|
+
level: 1
|
|
132
106
|
}, {
|
|
133
|
-
default:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
(s(!0), n(d, null, m(e.children, (l) => (s(), n(d, {
|
|
142
|
-
key: l.id
|
|
143
|
-
}, [
|
|
144
|
-
e.show ? (s(), f(S, {
|
|
145
|
-
key: 0,
|
|
146
|
-
id: `sidebar-${l.id}`,
|
|
147
|
-
isActive: y(l.id),
|
|
148
|
-
item: {
|
|
149
|
-
id: l.id,
|
|
150
|
-
title: l.displayTitle ?? l.title,
|
|
151
|
-
select: l.select,
|
|
152
|
-
httpVerb: l.httpVerb,
|
|
153
|
-
deprecated: l.deprecated ?? !1
|
|
154
|
-
}
|
|
155
|
-
}, null, 8, ["id", "isActive", "item"])) : h("", !0)
|
|
156
|
-
], 64))), 128))
|
|
157
|
-
]),
|
|
158
|
-
_: 2
|
|
159
|
-
}, 1024)) : h("", !0)
|
|
160
|
-
];
|
|
161
|
-
}),
|
|
107
|
+
default: p(() => [
|
|
108
|
+
(n(!0), a(u, null, m(i.children, (t) => (n(), c(h, {
|
|
109
|
+
key: t.id,
|
|
110
|
+
id: `sidebar-${t.id}`,
|
|
111
|
+
isActive: v(t.id),
|
|
112
|
+
item: t
|
|
113
|
+
}, null, 8, ["id", "isActive", "item"]))), 128))
|
|
114
|
+
]),
|
|
162
115
|
_: 2
|
|
163
|
-
},
|
|
164
|
-
],
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
])
|
|
172
|
-
|
|
116
|
+
}, 1024)) : $("", !0)
|
|
117
|
+
]),
|
|
118
|
+
_: 2
|
|
119
|
+
}, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"]))
|
|
120
|
+
], 64))), 128))
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
})
|
|
124
|
+
], 8, U),
|
|
125
|
+
C(e.$slots, "sidebar-end", {}, void 0, !0)
|
|
126
|
+
]));
|
|
173
127
|
}
|
|
174
128
|
});
|
|
175
129
|
export {
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
+
import type { TraversedEntry } from '../../features/traverse-schema';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
id: string;
|
|
3
|
-
item:
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
select?: () => void;
|
|
7
|
-
link?: string;
|
|
8
|
-
icon?: {
|
|
9
|
-
src: string;
|
|
10
|
-
};
|
|
11
|
-
httpVerb?: string;
|
|
12
|
-
deprecated?: boolean;
|
|
13
|
-
};
|
|
4
|
+
item: TraversedEntry;
|
|
14
5
|
isActive?: boolean;
|
|
15
6
|
hasChildren?: boolean;
|
|
16
7
|
open?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue"],"names":[],"mappings":"AA2VA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAQhE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AAuEF,iBAAS,cAAc;WA4KT,OAAO,IAA6B;;yBATpB,GAAG;+BACG,GAAG;;;;EAatC;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;4FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SidebarElement.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b6cecb8a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|