@scalar/api-reference 1.28.1 → 1.28.3
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 +41 -0
- package/dist/blocks/hooks/useBlockProps.d.ts +4 -5
- package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -1
- package/dist/blocks/hooks/useBlockProps.js +10 -14
- package/dist/browser/standalone.js +11624 -11582
- 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 +103 -109
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +48 -40
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +6 -7
- 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 +97 -71
- 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 +18 -18
- package/dist/components/Content/Lazy/Loading.vue.d.ts +3 -0
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +58 -56
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +77 -77
- package/dist/components/Content/Tag/OperationsList.vue.d.ts +2 -0
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsList.vue2.js +22 -20
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -0
- 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 +10 -8
- package/dist/components/Content/Tag/Tag.vue.d.ts +2 -0
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +38 -34
- package/dist/components/Content/Tag/TagList.vue.d.ts +3 -0
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +32 -30
- package/dist/components/Content/Tag/TagSection.vue.d.ts +2 -0
- 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 +16 -14
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- 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 +41 -40
- package/dist/features/ApiClientModal/useApiClient.d.ts +6 -6
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts +6 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +36 -32
- package/dist/features/Operation/Operation.vue.d.ts +1 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +13 -12
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +11 -8
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +9 -8
- package/dist/helpers/scrollToId.d.ts +3 -1
- package/dist/helpers/scrollToId.d.ts.map +1 -1
- package/dist/helpers/scrollToId.js +4 -4
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.js +49 -41
- package/dist/hooks/useSidebar.d.ts +2 -2
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +84 -84
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/standalone/lib/html-api.d.ts +8 -9
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -10
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const K = /* @__PURE__ */ C({
|
|
1
|
+
import { defineComponent as S, computed as f, openBlock as l, createElementBlock as p, Fragment as y, renderList as v, createBlock as s, unref as e, withCtx as i, resolveDynamicComponent as B, createVNode as L } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as T } from "@scalar/components";
|
|
3
|
+
import _ from "./TagAccordion.vue.js";
|
|
4
|
+
import $ from "./TagSection.vue.js";
|
|
5
|
+
import h from "../Lazy/Lazy.vue2.js";
|
|
6
|
+
import b from "../../../features/Operation/Operation.vue.js";
|
|
7
|
+
import { useNavState as C } from "../../../hooks/useNavState.js";
|
|
8
|
+
import { useSidebar as O } from "../../../hooks/useSidebar.js";
|
|
9
|
+
const q = /* @__PURE__ */ S({
|
|
11
10
|
__name: "TagList",
|
|
12
11
|
props: {
|
|
12
|
+
collection: {},
|
|
13
13
|
tags: {},
|
|
14
14
|
spec: {},
|
|
15
|
-
layout: {}
|
|
15
|
+
layout: {},
|
|
16
|
+
server: {}
|
|
16
17
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
() => n.layout === "classic" ?
|
|
20
|
-
),
|
|
21
|
-
() => n.tags.findIndex((o) => !
|
|
22
|
-
),
|
|
23
|
-
return (o,
|
|
18
|
+
setup(n) {
|
|
19
|
+
const { getOperationId: c, getTagId: r, hash: z } = C(), { collapsedSidebarItems: u } = O(), I = f(
|
|
20
|
+
() => n.layout === "classic" ? _ : $
|
|
21
|
+
), g = f(
|
|
22
|
+
() => n.tags.findIndex((o) => !u[r(o)]) + 1
|
|
23
|
+
), d = (o) => n.layout !== "classic" && !z.value.startsWith("model") && o > g.value;
|
|
24
|
+
return (o, E) => (l(!0), p(y, null, v(o.tags, (t, m) => (l(), s(e(h), {
|
|
24
25
|
id: e(r)(t),
|
|
25
26
|
key: e(r)(t),
|
|
26
|
-
isLazy:
|
|
27
|
+
isLazy: d(m)
|
|
27
28
|
}, {
|
|
28
29
|
default: i(() => [
|
|
29
|
-
(
|
|
30
|
+
(l(), s(B(I.value), {
|
|
30
31
|
id: e(r)(t),
|
|
31
32
|
spec: o.spec,
|
|
33
|
+
collection: o.collection,
|
|
32
34
|
tag: t
|
|
33
35
|
}, {
|
|
34
36
|
default: i(() => [
|
|
35
|
-
(
|
|
36
|
-
id: e(
|
|
37
|
+
(l(!0), p(y, null, v(t.operations, (a, k) => (l(), s(e(h), {
|
|
38
|
+
id: e(c)(a, t),
|
|
37
39
|
key: `${a.httpVerb}-${a.operationId}`,
|
|
38
|
-
isLazy:
|
|
40
|
+
isLazy: d(m) || e(u)[e(r)(t)] && k > 0
|
|
39
41
|
}, {
|
|
40
42
|
default: i(() => [
|
|
41
|
-
|
|
43
|
+
L(e(T), null, {
|
|
42
44
|
default: i(() => [
|
|
43
|
-
|
|
44
|
-
id: e(
|
|
45
|
-
collection:
|
|
45
|
+
L(e(b), {
|
|
46
|
+
id: e(c)(a, t),
|
|
47
|
+
collection: o.collection,
|
|
46
48
|
layout: o.layout,
|
|
47
|
-
server:
|
|
49
|
+
server: o.server,
|
|
48
50
|
transformedOperation: a
|
|
49
51
|
}, null, 8, ["id", "collection", "layout", "server", "transformedOperation"])
|
|
50
52
|
]),
|
|
@@ -55,12 +57,12 @@ const K = /* @__PURE__ */ C({
|
|
|
55
57
|
}, 1032, ["id", "isLazy"]))), 128))
|
|
56
58
|
]),
|
|
57
59
|
_: 2
|
|
58
|
-
}, 1032, ["id", "spec", "tag"]))
|
|
60
|
+
}, 1032, ["id", "spec", "collection", "tag"]))
|
|
59
61
|
]),
|
|
60
62
|
_: 2
|
|
61
63
|
}, 1032, ["id", "isLazy"]))), 128));
|
|
62
64
|
}
|
|
63
65
|
});
|
|
64
66
|
export {
|
|
65
|
-
|
|
67
|
+
q as default
|
|
66
68
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { Collection } from '@scalar/oas-utils/entities/spec';
|
|
1
2
|
import type { Spec, Tag as TagType } from '@scalar/types/legacy';
|
|
2
3
|
import { nextTick } from 'vue';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
id?: string;
|
|
5
6
|
tag: TagType;
|
|
7
|
+
collection: Collection;
|
|
6
8
|
spec: Spec;
|
|
7
9
|
};
|
|
8
10
|
declare function __VLS_template(): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/TagSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/TagSection.vue"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAY,QAAQ,EAAc,MAAM,KAAK,CAAA;AASpD,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,OAAO,CAAA;IACZ,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE,IAAI,CAAA;CACX,CAAC;AAgCF,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;yBAVpB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4DowgB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;EA7C15gB;AAmBD,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 "./TagSection.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-33787099"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as k, ref as f, useId as y, computed as u, openBlock as n, createBlock as
|
|
1
|
+
import { defineComponent as k, ref as f, useId as y, computed as u, openBlock as n, createBlock as l, unref as o, withCtx as C, createCommentVNode as b, createElementBlock as S, renderSlot as v, nextTick as T } from "vue";
|
|
2
2
|
import I from "../../ShowMoreButton.vue.js";
|
|
3
3
|
import w from "./Tag.vue.js";
|
|
4
4
|
import B from "../../Section/SectionContainer.vue.js";
|
|
@@ -9,40 +9,42 @@ const M = /* @__PURE__ */ k({
|
|
|
9
9
|
props: {
|
|
10
10
|
id: {},
|
|
11
11
|
tag: {},
|
|
12
|
+
collection: {},
|
|
12
13
|
spec: {}
|
|
13
14
|
},
|
|
14
15
|
setup(m) {
|
|
15
|
-
const
|
|
16
|
+
const a = m, p = f(), r = f(), i = y(), { collapsedSidebarItems: s } = R(), { getTagId: c } = N(), d = u(
|
|
16
17
|
() => {
|
|
17
18
|
var e, t;
|
|
18
|
-
return ((e =
|
|
19
|
+
return ((e = a.spec.tags) == null ? void 0 : e.length) && ((t = a.spec.tags) == null ? void 0 : t.length) > 1;
|
|
19
20
|
}
|
|
20
21
|
), g = u(
|
|
21
22
|
() => {
|
|
22
23
|
var e, t;
|
|
23
|
-
return d.value || ((e =
|
|
24
|
+
return d.value || ((e = a.tag) == null ? void 0 : e.name) !== "default" || ((t = a.tag) == null ? void 0 : t.description) !== "";
|
|
24
25
|
}
|
|
25
26
|
);
|
|
26
27
|
async function h() {
|
|
27
28
|
var e, t;
|
|
28
|
-
await T(), (t = (e =
|
|
29
|
+
await T(), (t = (e = r.value) == null ? void 0 : e.querySelector("button")) == null || t.focus();
|
|
29
30
|
}
|
|
30
|
-
return (e, t) => (n(),
|
|
31
|
+
return (e, t) => (n(), l(o(B), {
|
|
31
32
|
ref_key: "sectionContainerRef",
|
|
32
33
|
ref: p,
|
|
33
|
-
"aria-labelledby":
|
|
34
|
+
"aria-labelledby": o(i),
|
|
34
35
|
class: "tag-section-container",
|
|
35
36
|
role: "region"
|
|
36
37
|
}, {
|
|
37
38
|
default: C(() => [
|
|
38
|
-
g.value ? (n(),
|
|
39
|
+
g.value ? (n(), l(w, {
|
|
39
40
|
key: 0,
|
|
40
41
|
id: e.id,
|
|
41
|
-
headerId:
|
|
42
|
-
isCollapsed: !
|
|
43
|
-
tag: e.tag
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
headerId: o(i),
|
|
43
|
+
isCollapsed: !o(s)[o(c)(e.tag)],
|
|
44
|
+
tag: e.tag,
|
|
45
|
+
collection: e.collection
|
|
46
|
+
}, null, 8, ["id", "headerId", "isCollapsed", "tag", "collection"])) : b("", !0),
|
|
47
|
+
!o(s)[o(c)(e.tag)] && d.value ? (n(), l(I, {
|
|
46
48
|
key: 1,
|
|
47
49
|
id: e.id ?? "",
|
|
48
50
|
"aria-label": `Show all ${e.tag["x-displayName"] ?? e.tag.name} endpoints`,
|
|
@@ -50,7 +52,7 @@ const M = /* @__PURE__ */ k({
|
|
|
50
52
|
}, null, 8, ["id", "aria-label"])) : (n(), S("div", {
|
|
51
53
|
key: 2,
|
|
52
54
|
ref_key: "contentsRef",
|
|
53
|
-
ref:
|
|
55
|
+
ref: r,
|
|
54
56
|
class: "contents"
|
|
55
57
|
}, [
|
|
56
58
|
v(e.$slots, "default", {}, void 0, !0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/CompactSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CompactSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/CompactSection.vue"],"names":[],"mappings":"AAiHA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAyBF,iBAAS,cAAc;WAoFT,OAAO,IAA6B;;yBATpB,GAAG;yBACH,GAAG;;;;EAahC;AAaD,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 "./CompactSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0c617885"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShowMoreButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/ShowMoreButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShowMoreButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/ShowMoreButton.vue"],"names":[],"mappings":"AAoEA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;CACX,CAAC;;AA0EF,wBAOG"}
|
|
@@ -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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-916afedd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -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":"AAmWA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB,CAAA;IACD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AAkEF,iBAAS,cAAc;WAoKT,OAAO,IAA6B;;yBATpB,GAAG;+BACG,GAAG;;;;EAatC;AAgBD,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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1f77778e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarSidebarGroupToggle as
|
|
3
|
-
import { combineUrlAndPath as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { defineComponent as A, openBlock as n, createElementBlock as l, createElementVNode as a, normalizeClass as T, unref as m, withModifiers as V, createVNode as b, withCtx as E, createTextVNode as c, toDisplayString as h, createCommentVNode as s, createBlock as N, renderSlot as v } from "vue";
|
|
2
|
+
import { ScalarSidebarGroupToggle as O, ScalarIcon as U } from "@scalar/components";
|
|
3
|
+
import { combineUrlAndPath as H } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useConfig as I } from "../../hooks/useConfig.js";
|
|
5
|
+
import P from "./SidebarHttpBadge.vue.js";
|
|
6
|
+
import { sleep as C } from "../../helpers/sleep.js";
|
|
7
|
+
import { useNavState as D } from "../../hooks/useNavState.js";
|
|
8
|
+
import { scrollToId as L } from "../../helpers/scrollToId.js";
|
|
9
|
+
const M = ["id"], R = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "sidebar-heading-chevron"
|
|
11
|
-
},
|
|
12
|
+
}, z = ["aria-expanded"], F = ["href", "tabindex"], G = { class: "sidebar-heading-link-title" }, j = {
|
|
12
13
|
key: 1,
|
|
13
14
|
class: "sidebar-heading-link-method"
|
|
14
|
-
},
|
|
15
|
+
}, q = {
|
|
15
16
|
key: 1,
|
|
16
17
|
class: "action-menu"
|
|
17
|
-
},
|
|
18
|
+
}, x = /* @__PURE__ */ A({
|
|
18
19
|
__name: "SidebarElement",
|
|
19
20
|
props: {
|
|
20
21
|
id: {},
|
|
@@ -24,81 +25,81 @@ const D = ["id"], L = {
|
|
|
24
25
|
open: { type: Boolean }
|
|
25
26
|
},
|
|
26
27
|
emits: ["toggleOpen"],
|
|
27
|
-
setup(
|
|
28
|
-
const i =
|
|
28
|
+
setup(k, { emit: y }) {
|
|
29
|
+
const i = k, d = y, { getFullHash: u, isIntersectionEnabled: r, pathRouting: p, replaceUrlState: w } = D(), S = I(), f = async () => {
|
|
29
30
|
var e, t;
|
|
30
|
-
i.hasChildren && d("toggleOpen"), (t = (e = i.item) == null ? void 0 : e.select) == null || t.call(e), i.open && (r.value = !1, await
|
|
31
|
-
},
|
|
31
|
+
i.hasChildren && d("toggleOpen"), (t = (e = i.item) == null ? void 0 : e.select) == null || t.call(e), i.open && (r.value = !1, await C(100), r.value = !0);
|
|
32
|
+
}, B = () => {
|
|
32
33
|
if (p.value)
|
|
33
|
-
return
|
|
34
|
+
return H(p.value.basePath, i.item.id);
|
|
34
35
|
if (typeof window < "u") {
|
|
35
36
|
const e = new URL(window.location.href);
|
|
36
|
-
return e.hash =
|
|
37
|
-
} else return `#${
|
|
38
|
-
},
|
|
37
|
+
return e.hash = u(i.item.id), `${e.pathname}${e.search}${e.hash}`;
|
|
38
|
+
} else return `#${u(i.item.id)}`;
|
|
39
|
+
}, $ = async (e) => {
|
|
39
40
|
var t, o;
|
|
40
|
-
p.value && (e.preventDefault(), i.hasChildren && d("toggleOpen"), (o = (t = i.item) == null ? void 0 : t.select) == null || o.call(t), d("toggleOpen"), r.value = !1, w(i.item.id),
|
|
41
|
+
p.value && (e.preventDefault(), i.hasChildren && d("toggleOpen"), (o = (t = i.item) == null ? void 0 : t.select) == null || o.call(t), d("toggleOpen"), r.value = !1, w(i.item.id), L(i.item.id), await C(100), r.value = !0);
|
|
41
42
|
};
|
|
42
43
|
return (e, t) => {
|
|
43
|
-
var o,
|
|
44
|
+
var o, g;
|
|
44
45
|
return n(), l("li", {
|
|
45
46
|
id: e.id,
|
|
46
47
|
class: "sidebar-group-item"
|
|
47
48
|
}, [
|
|
48
49
|
a("div", {
|
|
49
|
-
class:
|
|
50
|
+
class: T(["sidebar-heading", {
|
|
50
51
|
"sidebar-group-item__folder": e.hasChildren,
|
|
51
52
|
active_page: e.isActive,
|
|
52
53
|
deprecated: e.item.deprecated ?? !1
|
|
53
54
|
}]),
|
|
54
|
-
onClick:
|
|
55
|
+
onClick: f
|
|
55
56
|
}, [
|
|
56
|
-
e.hasChildren ? (n(), l("p",
|
|
57
|
+
e.hasChildren && !m(S).defaultOpenAllTags ? (n(), l("p", R, [
|
|
57
58
|
a("button", {
|
|
58
59
|
"aria-expanded": e.open,
|
|
59
60
|
class: "toggle-nested-icon",
|
|
60
61
|
type: "button",
|
|
61
|
-
onClick:
|
|
62
|
+
onClick: V(f, ["stop"])
|
|
62
63
|
}, [
|
|
63
|
-
|
|
64
|
+
b(m(O), { open: e.open }, {
|
|
64
65
|
label: E(() => [
|
|
65
|
-
|
|
66
|
+
c(h(e.open ? "Collapse" : "Expand") + " " + h(e.item.title), 1)
|
|
66
67
|
]),
|
|
67
68
|
_: 1
|
|
68
69
|
}, 8, ["open"])
|
|
69
|
-
], 8,
|
|
70
|
-
t[0] || (t[0] =
|
|
70
|
+
], 8, z),
|
|
71
|
+
t[0] || (t[0] = c(" "))
|
|
71
72
|
])) : s("", !0),
|
|
72
73
|
a("a", {
|
|
73
74
|
class: "sidebar-heading-link",
|
|
74
|
-
href:
|
|
75
|
+
href: B(),
|
|
75
76
|
tabindex: e.hasChildren ? -1 : 0,
|
|
76
|
-
onClick:
|
|
77
|
+
onClick: $
|
|
77
78
|
}, [
|
|
78
|
-
(
|
|
79
|
+
(g = (o = e.item) == null ? void 0 : o.icon) != null && g.src ? (n(), N(m(U), {
|
|
79
80
|
key: 0,
|
|
80
81
|
class: "sidebar-icon",
|
|
81
82
|
icon: e.item.icon.src
|
|
82
83
|
}, null, 8, ["icon"])) : s("", !0),
|
|
83
|
-
a("p",
|
|
84
|
-
e.item.httpVerb && !e.hasChildren ? (n(), l("p",
|
|
85
|
-
t[1] || (t[1] =
|
|
84
|
+
a("p", G, h(e.item.title), 1),
|
|
85
|
+
e.item.httpVerb && !e.hasChildren ? (n(), l("p", j, [
|
|
86
|
+
t[1] || (t[1] = c(" ")),
|
|
86
87
|
t[2] || (t[2] = a("span", { class: "sr-only" }, "HTTP Method: ", -1)),
|
|
87
|
-
|
|
88
|
+
b(P, {
|
|
88
89
|
active: e.isActive,
|
|
89
90
|
method: e.item.httpVerb
|
|
90
91
|
}, null, 8, ["active", "method"])
|
|
91
92
|
])) : s("", !0)
|
|
92
|
-
], 8,
|
|
93
|
+
], 8, F)
|
|
93
94
|
], 2),
|
|
94
95
|
e.open ? v(e.$slots, "default", { key: 0 }, void 0, !0) : s("", !0),
|
|
95
|
-
e.$slots["action-menu"] ? (n(), l("div",
|
|
96
|
+
e.$slots["action-menu"] ? (n(), l("div", q, [
|
|
96
97
|
v(e.$slots, "action-menu", {}, void 0, !0)
|
|
97
98
|
])) : s("", !0)
|
|
98
|
-
], 8,
|
|
99
|
+
], 8, M);
|
|
99
100
|
};
|
|
100
101
|
}
|
|
101
102
|
});
|
|
102
103
|
export {
|
|
103
|
-
|
|
104
|
+
x as default
|
|
104
105
|
};
|
|
@@ -488,7 +488,7 @@ declare const client: import("vue").Ref<{
|
|
|
488
488
|
watchMode?: boolean | undefined;
|
|
489
489
|
integration?: string | null | undefined;
|
|
490
490
|
watchModeStatus?: "IDLE" | "WATCHING" | "ERROR" | undefined;
|
|
491
|
-
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "baseServerURL"> & {
|
|
491
|
+
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "slug" | "baseServerURL"> & {
|
|
492
492
|
setCollectionSecurity?: boolean;
|
|
493
493
|
shouldLoad?: boolean;
|
|
494
494
|
} & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers">) => Promise<{
|
|
@@ -539,7 +539,7 @@ declare const client: import("vue").Ref<{
|
|
|
539
539
|
watchMode?: boolean | undefined;
|
|
540
540
|
integration?: string | null | undefined;
|
|
541
541
|
watchModeStatus?: "IDLE" | "WATCHING" | "ERROR" | undefined;
|
|
542
|
-
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "baseServerURL"> & {
|
|
542
|
+
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "slug" | "baseServerURL"> & {
|
|
543
543
|
setCollectionSecurity?: boolean;
|
|
544
544
|
shouldLoad?: boolean;
|
|
545
545
|
} & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers">, "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "proxyUrl">) => Promise<import("@scalar/api-client/libs").ErrorResponse<Awaited<ReturnType<(_spec: string | Record<string, any>, workspaceUid: string, options?: Pick<{
|
|
@@ -580,7 +580,7 @@ declare const client: import("vue").Ref<{
|
|
|
580
580
|
watchMode?: boolean | undefined;
|
|
581
581
|
integration?: string | null | undefined;
|
|
582
582
|
watchModeStatus?: "IDLE" | "WATCHING" | "ERROR" | undefined;
|
|
583
|
-
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "baseServerURL"> & {
|
|
583
|
+
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "slug" | "baseServerURL"> & {
|
|
584
584
|
setCollectionSecurity?: boolean;
|
|
585
585
|
shouldLoad?: boolean;
|
|
586
586
|
} & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers">) => Promise<{
|
|
@@ -4013,7 +4013,7 @@ declare const client: import("vue").Ref<{
|
|
|
4013
4013
|
watchMode?: boolean | undefined;
|
|
4014
4014
|
integration?: string | null | undefined;
|
|
4015
4015
|
watchModeStatus?: "IDLE" | "WATCHING" | "ERROR" | undefined;
|
|
4016
|
-
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "baseServerURL"> & {
|
|
4016
|
+
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "slug" | "baseServerURL"> & {
|
|
4017
4017
|
setCollectionSecurity?: boolean;
|
|
4018
4018
|
shouldLoad?: boolean;
|
|
4019
4019
|
} & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers">) => Promise<{
|
|
@@ -4064,7 +4064,7 @@ declare const client: import("vue").Ref<{
|
|
|
4064
4064
|
watchMode?: boolean | undefined;
|
|
4065
4065
|
integration?: string | null | undefined;
|
|
4066
4066
|
watchModeStatus?: "IDLE" | "WATCHING" | "ERROR" | undefined;
|
|
4067
|
-
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "baseServerURL"> & {
|
|
4067
|
+
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "slug" | "baseServerURL"> & {
|
|
4068
4068
|
setCollectionSecurity?: boolean;
|
|
4069
4069
|
shouldLoad?: boolean;
|
|
4070
4070
|
} & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers">, "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "proxyUrl">) => Promise<import("@scalar/api-client/libs").ErrorResponse<Awaited<ReturnType<(_spec: string | Record<string, any>, workspaceUid: string, options?: Pick<{
|
|
@@ -4105,7 +4105,7 @@ declare const client: import("vue").Ref<{
|
|
|
4105
4105
|
watchMode?: boolean | undefined;
|
|
4106
4106
|
integration?: string | null | undefined;
|
|
4107
4107
|
watchModeStatus?: "IDLE" | "WATCHING" | "ERROR" | undefined;
|
|
4108
|
-
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "baseServerURL"> & {
|
|
4108
|
+
}, "watchMode" | "documentUrl"> & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers" | "authentication" | "slug" | "baseServerURL"> & {
|
|
4109
4109
|
setCollectionSecurity?: boolean;
|
|
4110
4110
|
shouldLoad?: boolean;
|
|
4111
4111
|
} & Pick<import("@scalar/types/api-reference").ApiReferenceConfiguration, "servers">) => Promise<{
|