@scalar/api-reference 1.25.48 → 1.25.49
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 +22 -0
- package/dist/browser/standalone.js +13698 -13755
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +136 -137
- package/dist/components/Content/Operation/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/TestRequestButton.vue.js +2 -2
- package/dist/components/Content/Operation/TestRequestButton.vue2.js +18 -17
- package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts.map +1 -1
- package/dist/components/DarkModeToggle/DarkModeToggle.vue.js +1 -1
- package/dist/components/DarkModeToggle/DarkModeToggle.vue2.js +12 -11
- 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 +146 -142
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue2.js +37 -35
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
- package/dist/{components → features/ApiClientModal}/ApiClientModal.vue.d.ts +3 -3
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -0
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +49 -0
- package/dist/features/ApiClientModal/index.d.ts +3 -0
- package/dist/features/ApiClientModal/index.d.ts.map +1 -0
- package/dist/features/ApiClientModal/useApiClient.d.ts +7734 -0
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -0
- package/dist/features/ApiClientModal/useApiClient.js +23 -0
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +2 -2
- package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +10 -7
- 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 -20
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +148 -155
- package/dist/index.js +43 -45
- package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -1
- package/dist/legacy/components/SecurityScheme.vue.js +2 -2
- package/dist/legacy/components/SecurityScheme.vue2.js +111 -115
- package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +1 -1
- package/dist/legacy/components/SecuritySchemeSelector.vue.js +1 -1
- package/dist/legacy/components/SecuritySchemeSelector.vue2.js +46 -36
- package/dist/legacy/helpers/index.d.ts +1 -1
- package/dist/legacy/stores/index.d.ts +1 -2
- package/dist/legacy/stores/index.d.ts.map +1 -1
- package/dist/legacy/stores/useOpenApiStore.js +4 -18
- package/dist/style.css +1 -1
- package/package.json +11 -11
- package/dist/components/ApiClientModal.vue.d.ts.map +0 -1
- package/dist/components/ApiClientModal.vue.js +0 -64
- package/dist/components/api-client-bus.d.ts +0 -22
- package/dist/components/api-client-bus.d.ts.map +0 -1
- package/dist/components/api-client-bus.js +0 -6
- package/dist/helpers/openClientFor.d.ts +0 -7
- package/dist/helpers/openClientFor.d.ts.map +0 -1
- package/dist/helpers/openClientFor.js +0 -19
- package/dist/legacy/helpers/createPlaceholderRequest.js +0 -14
- package/dist/legacy/stores/useApiClientStore.d.ts +0 -18
- package/dist/legacy/stores/useApiClientStore.d.ts.map +0 -1
- package/dist/legacy/stores/useApiClientStore.js +0 -32
- package/dist/legacy/stores/useRequestStore.js +0 -33
- /package/dist/{components → features/ApiClientModal}/ApiClientModal.vue2.js +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as B, ref as E, watch as F, onMounted as N, openBlock as r, createElementBlock as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as B, ref as E, watch as F, onMounted as N, openBlock as r, createElementBlock as i, renderSlot as C, createElementVNode as V, createVNode as I, withCtx as b, Fragment as d, renderList as v, unref as a, toDisplayString as L, createBlock as u, createCommentVNode as h } from "vue";
|
|
2
|
+
import y from "./SidebarElement.vue.js";
|
|
3
|
+
import g from "./SidebarGroup.vue.js";
|
|
4
4
|
import { useSidebar as G } from "../../hooks/useSidebar.js";
|
|
5
|
-
import { sleep as
|
|
6
|
-
import { useNavState as
|
|
7
|
-
const
|
|
5
|
+
import { sleep as w } from "../../helpers/sleep.js";
|
|
6
|
+
import { useNavState as D } from "../../hooks/useNavState.js";
|
|
7
|
+
const H = { class: "sidebar" }, M = ["aria-label"], R = { class: "sidebar-group-title" }, j = -160, Q = /* @__PURE__ */ B({
|
|
8
8
|
__name: "Sidebar",
|
|
9
9
|
props: {
|
|
10
10
|
parsedSpec: {},
|
|
@@ -12,148 +12,152 @@ const D = { class: "sidebar" }, H = { class: "sidebar-group-title" }, M = -160,
|
|
|
12
12
|
operationsSorter: { type: [String, Function] }
|
|
13
13
|
},
|
|
14
14
|
setup(A) {
|
|
15
|
-
const
|
|
15
|
+
const S = A, { hash: c, isIntersectionEnabled: $ } = D(), { items: O, toggleCollapsedSidebarItem: T, collapsedSidebarItems: _ } = G(
|
|
16
16
|
{
|
|
17
|
-
parsedSpec:
|
|
18
|
-
tagsSorter:
|
|
19
|
-
operationsSorter:
|
|
17
|
+
parsedSpec: S.parsedSpec,
|
|
18
|
+
tagsSorter: S.tagsSorter,
|
|
19
|
+
operationsSorter: S.operationsSorter
|
|
20
20
|
}
|
|
21
|
-
),
|
|
22
|
-
F(
|
|
23
|
-
!$.value ||
|
|
21
|
+
), m = E(null), p = E(!0);
|
|
22
|
+
F(c, (o) => {
|
|
23
|
+
!$.value || p.value || typeof window > "u" || k(o);
|
|
24
24
|
});
|
|
25
|
-
const k = (
|
|
26
|
-
var t, l, s
|
|
27
|
-
const n = document.getElementById(`sidebar-${
|
|
28
|
-
if (!n || !
|
|
29
|
-
let
|
|
30
|
-
n.getAttribute("data-sidebar-type") === "heading" ?
|
|
25
|
+
const k = (o) => {
|
|
26
|
+
var e, t, l, s;
|
|
27
|
+
const n = document.getElementById(`sidebar-${o}`);
|
|
28
|
+
if (!n || !m.value) return;
|
|
29
|
+
let f = j;
|
|
30
|
+
n.getAttribute("data-sidebar-type") === "heading" ? f += n.offsetTop + ((e = n.getElementsByClassName("sidebar-heading")) == null ? void 0 : e[0]).offsetHeight : f += n.offsetTop + (((t = n.parentElement) == null ? void 0 : t.offsetTop) ?? 0) + (((s = (l = n.parentElement) == null ? void 0 : l.parentElement) == null ? void 0 : s.offsetTop) ?? 0), m.value.scrollTo({ top: f, behavior: "smooth" });
|
|
31
31
|
};
|
|
32
32
|
return N(() => {
|
|
33
|
-
setTimeout(() => k(
|
|
34
|
-
}), (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
key:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
id: s.id
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
e.
|
|
128
|
-
key:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
id: l.id
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
33
|
+
setTimeout(() => k(c.value), 500), p.value = !1;
|
|
34
|
+
}), (o, n) => {
|
|
35
|
+
var f;
|
|
36
|
+
return r(), i("div", H, [
|
|
37
|
+
C(o.$slots, "sidebar-start", {}, void 0, !0),
|
|
38
|
+
V("nav", {
|
|
39
|
+
ref_key: "scrollerEl",
|
|
40
|
+
ref: m,
|
|
41
|
+
"aria-label": `Contents of ${(f = o.parsedSpec.info) == null ? void 0 : f.title}`,
|
|
42
|
+
class: "sidebar-pages custom-scroll custom-scroll-self-contain-overflow"
|
|
43
|
+
}, [
|
|
44
|
+
I(g, { level: 0 }, {
|
|
45
|
+
default: b(() => [
|
|
46
|
+
(r(!0), i(d, null, v(a(O).entries, (e) => (r(), i(d, {
|
|
47
|
+
key: e.id
|
|
48
|
+
}, [
|
|
49
|
+
e.isGroup ? (r(), i(d, { key: 0 }, [
|
|
50
|
+
V("li", R, L(e.displayTitle ?? e.title), 1),
|
|
51
|
+
(r(!0), i(d, null, v(e.children, (t) => (r(), u(y, {
|
|
52
|
+
key: t.id,
|
|
53
|
+
id: `sidebar-${t.id}`,
|
|
54
|
+
"data-sidebar-type": "heading",
|
|
55
|
+
hasChildren: t.children && t.children.length > 0,
|
|
56
|
+
isActive: a(c) === t.id,
|
|
57
|
+
item: {
|
|
58
|
+
id: t.id,
|
|
59
|
+
title: t.displayTitle ?? t.title,
|
|
60
|
+
select: t.select,
|
|
61
|
+
httpVerb: t.httpVerb,
|
|
62
|
+
deprecated: t.deprecated ?? !1
|
|
63
|
+
},
|
|
64
|
+
open: a(_)[t.id] ?? !1,
|
|
65
|
+
onToggleOpen: async () => {
|
|
66
|
+
p.value = !0, a(T)(t.id), await a(w)(100), p.value = !1;
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
default: b(() => {
|
|
70
|
+
var l;
|
|
71
|
+
return [
|
|
72
|
+
t.children && ((l = t.children) == null ? void 0 : l.length) > 0 ? (r(), u(g, {
|
|
73
|
+
key: 0,
|
|
74
|
+
level: 1
|
|
75
|
+
}, {
|
|
76
|
+
default: b(() => [
|
|
77
|
+
(r(!0), i(d, null, v(t.children, (s) => (r(), i(d, {
|
|
78
|
+
key: s.id
|
|
79
|
+
}, [
|
|
80
|
+
e.show ? (r(), u(y, {
|
|
81
|
+
key: 0,
|
|
82
|
+
id: `sidebar-${s.id}`,
|
|
83
|
+
isActive: a(c) === s.id,
|
|
84
|
+
item: {
|
|
85
|
+
id: s.id,
|
|
86
|
+
title: s.displayTitle ?? s.title,
|
|
87
|
+
select: s.select,
|
|
88
|
+
httpVerb: s.httpVerb,
|
|
89
|
+
deprecated: s.deprecated ?? !1
|
|
90
|
+
}
|
|
91
|
+
}, null, 8, ["id", "isActive", "item"])) : h("", !0)
|
|
92
|
+
], 64))), 128))
|
|
93
|
+
]),
|
|
94
|
+
_: 2
|
|
95
|
+
}, 1024)) : h("", !0)
|
|
96
|
+
];
|
|
97
|
+
}),
|
|
98
|
+
_: 2
|
|
99
|
+
}, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"]))), 128))
|
|
100
|
+
], 64)) : (r(), i(d, { key: 1 }, [
|
|
101
|
+
e.show ? (r(), u(y, {
|
|
102
|
+
key: 0,
|
|
103
|
+
id: `sidebar-${e.id}`,
|
|
104
|
+
"data-sidebar-type": "heading",
|
|
105
|
+
hasChildren: e.children && e.children.length > 0,
|
|
106
|
+
isActive: a(c) === e.id,
|
|
107
|
+
item: {
|
|
108
|
+
id: e.id,
|
|
109
|
+
title: e.displayTitle ?? e.title,
|
|
110
|
+
select: e.select,
|
|
111
|
+
httpVerb: e.httpVerb,
|
|
112
|
+
deprecated: e.deprecated ?? !1
|
|
113
|
+
},
|
|
114
|
+
open: a(_)[e.id] ?? !1,
|
|
115
|
+
onToggleOpen: async () => {
|
|
116
|
+
p.value = !0, a(T)(e.id), await a(w)(100), p.value = !1;
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
119
|
+
default: b(() => {
|
|
120
|
+
var t;
|
|
121
|
+
return [
|
|
122
|
+
e.children && ((t = e.children) == null ? void 0 : t.length) > 0 ? (r(), u(g, {
|
|
123
|
+
key: 0,
|
|
124
|
+
level: 1
|
|
125
|
+
}, {
|
|
126
|
+
default: b(() => [
|
|
127
|
+
(r(!0), i(d, null, v(e.children, (l) => (r(), i(d, {
|
|
128
|
+
key: l.id
|
|
129
|
+
}, [
|
|
130
|
+
e.show ? (r(), u(y, {
|
|
131
|
+
key: 0,
|
|
132
|
+
id: `sidebar-${l.id}`,
|
|
133
|
+
isActive: a(c) === l.id,
|
|
134
|
+
item: {
|
|
135
|
+
id: l.id,
|
|
136
|
+
title: l.displayTitle ?? l.title,
|
|
137
|
+
select: l.select,
|
|
138
|
+
httpVerb: l.httpVerb,
|
|
139
|
+
deprecated: l.deprecated ?? !1
|
|
140
|
+
}
|
|
141
|
+
}, null, 8, ["id", "isActive", "item"])) : h("", !0)
|
|
142
|
+
], 64))), 128))
|
|
143
|
+
]),
|
|
144
|
+
_: 2
|
|
145
|
+
}, 1024)) : h("", !0)
|
|
146
|
+
];
|
|
147
|
+
}),
|
|
148
|
+
_: 2
|
|
149
|
+
}, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"])) : h("", !0)
|
|
150
|
+
], 64))
|
|
151
|
+
], 64))), 128))
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
})
|
|
155
|
+
], 8, M),
|
|
156
|
+
C(o.$slots, "sidebar-end", {}, void 0, !0)
|
|
157
|
+
]);
|
|
158
|
+
};
|
|
155
159
|
}
|
|
156
160
|
});
|
|
157
161
|
export {
|
|
158
|
-
|
|
162
|
+
Q as default
|
|
159
163
|
};
|
|
@@ -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":"AA0ZA,iBAAS,cAAc;qBA8KO,GAAG;2BACG,GAAG;EAuBtC;AACD,QAAA,MAAM,eAAe;QA5Rf,MAAM;UACJ;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;eACU,OAAO;kBACJ,OAAO;WACd,OAAO;;;;QAdV,MAAM;UACJ;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;eACU,OAAO;kBACJ,OAAO;WACd,OAAO;;;kFAuRd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5728e727"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconButton as
|
|
1
|
+
import { defineComponent as $, openBlock as a, createElementBlock as d, createElementVNode as p, normalizeClass as B, createVNode as c, unref as u, withModifiers as V, createTextVNode as f, createCommentVNode as s, createBlock as E, toDisplayString as N, renderSlot as v } from "vue";
|
|
2
|
+
import { ScalarIconButton as A, ScalarIcon as I } from "@scalar/components";
|
|
3
3
|
import O from "./SidebarHttpBadge.vue.js";
|
|
4
|
-
import { sleep as
|
|
5
|
-
import { joinWithSlash as
|
|
4
|
+
import { sleep as g } from "../../helpers/sleep.js";
|
|
5
|
+
import { joinWithSlash as b } from "../../helpers/joinWithSlash.js";
|
|
6
6
|
import { scrollToId as R } from "../../helpers/scrollToId.js";
|
|
7
|
-
import { useNavState as
|
|
8
|
-
const
|
|
7
|
+
import { useNavState as T } from "../../hooks/useNavState.js";
|
|
8
|
+
const D = ["id"], L = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "sidebar-heading-chevron"
|
|
11
|
-
},
|
|
11
|
+
}, P = ["href"], U = { class: "sidebar-heading-link-title" }, z = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "sidebar-heading-link-method"
|
|
14
|
-
},
|
|
14
|
+
}, H = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "action-menu"
|
|
17
|
-
}, K = /* @__PURE__ */
|
|
17
|
+
}, K = /* @__PURE__ */ $({
|
|
18
18
|
__name: "SidebarElement",
|
|
19
19
|
props: {
|
|
20
20
|
id: {},
|
|
@@ -24,23 +24,23 @@ const L = ["id"], T = {
|
|
|
24
24
|
open: { type: Boolean }
|
|
25
25
|
},
|
|
26
26
|
emits: ["toggleOpen"],
|
|
27
|
-
setup(
|
|
28
|
-
const t =
|
|
27
|
+
setup(k, { emit: C }) {
|
|
28
|
+
const t = k, m = C, { hash: w, isIntersectionEnabled: l, pathRouting: r } = T(), h = async () => {
|
|
29
29
|
var e, i;
|
|
30
|
-
t.hasChildren &&
|
|
30
|
+
t.hasChildren && m("toggleOpen"), (i = (e = t.item) == null ? void 0 : e.select) == null || i.call(e), t.open && (l.value = !1, await g(100), l.value = !0);
|
|
31
31
|
}, y = () => {
|
|
32
|
-
if (
|
|
33
|
-
return
|
|
32
|
+
if (r.value)
|
|
33
|
+
return b(r.value.basePath, t.item.id);
|
|
34
34
|
if (typeof window < "u") {
|
|
35
35
|
const e = new URL(window.location.href);
|
|
36
36
|
return e.hash = t.item.id, `${e.pathname}${e.search}${e.hash}`;
|
|
37
37
|
} else return `#${t.item.id}`;
|
|
38
38
|
}, S = async (e) => {
|
|
39
39
|
var i, o;
|
|
40
|
-
if (
|
|
41
|
-
e.preventDefault(), t.hasChildren &&
|
|
40
|
+
if (r.value) {
|
|
41
|
+
e.preventDefault(), t.hasChildren && m("toggleOpen"), (o = (i = t.item) == null ? void 0 : i.select) == null || o.call(i), m("toggleOpen"), l.value = !1, w.value = t.item.id;
|
|
42
42
|
const n = new URL(window.location.href);
|
|
43
|
-
n.pathname =
|
|
43
|
+
n.pathname = b(r.value.basePath, t.item.id), window.history.pushState({}, "", n), R(t.item.id), await g(100), l.value = !0;
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
return (e, i) => {
|
|
@@ -49,49 +49,51 @@ const L = ["id"], T = {
|
|
|
49
49
|
id: e.id,
|
|
50
50
|
class: "sidebar-group-item"
|
|
51
51
|
}, [
|
|
52
|
-
|
|
53
|
-
class:
|
|
52
|
+
p("div", {
|
|
53
|
+
class: B(["sidebar-heading", {
|
|
54
54
|
"sidebar-group-item__folder": e.hasChildren,
|
|
55
55
|
active_page: e.isActive,
|
|
56
56
|
deprecated: e.item.deprecated ?? !1
|
|
57
57
|
}]),
|
|
58
|
-
onClick:
|
|
58
|
+
onClick: h
|
|
59
59
|
}, [
|
|
60
|
-
e.hasChildren ? (a(), d("p",
|
|
61
|
-
|
|
60
|
+
e.hasChildren ? (a(), d("p", L, [
|
|
61
|
+
c(u(A), {
|
|
62
|
+
"aria-expanded": e.open,
|
|
62
63
|
class: "toggle-nested-icon",
|
|
63
64
|
icon: e.open ? "ChevronDown" : "ChevronRight",
|
|
64
|
-
label: "
|
|
65
|
+
label: `${e.open ? "Collapse" : "Expand"} ${e.item.title}`,
|
|
65
66
|
size: "xs",
|
|
66
|
-
onClick: V(
|
|
67
|
-
}, null, 8, ["icon"]),
|
|
67
|
+
onClick: V(h, ["stop"])
|
|
68
|
+
}, null, 8, ["aria-expanded", "icon", "label"]),
|
|
68
69
|
i[0] || (i[0] = f(" "))
|
|
69
70
|
])) : s("", !0),
|
|
70
|
-
|
|
71
|
+
p("a", {
|
|
71
72
|
class: "sidebar-heading-link",
|
|
72
73
|
href: y(),
|
|
73
74
|
onClick: S
|
|
74
75
|
}, [
|
|
75
|
-
(n = (o = e.item) == null ? void 0 : o.icon) != null && n.src ? (a(),
|
|
76
|
+
(n = (o = e.item) == null ? void 0 : o.icon) != null && n.src ? (a(), E(u(I), {
|
|
76
77
|
key: 0,
|
|
77
78
|
class: "sidebar-icon",
|
|
78
79
|
icon: e.item.icon.src
|
|
79
80
|
}, null, 8, ["icon"])) : s("", !0),
|
|
80
|
-
|
|
81
|
-
e.item.httpVerb && !e.hasChildren ? (a(), d("p",
|
|
81
|
+
p("p", U, N(e.item.title), 1),
|
|
82
|
+
e.item.httpVerb && !e.hasChildren ? (a(), d("p", z, [
|
|
82
83
|
i[1] || (i[1] = f(" ")),
|
|
83
|
-
p(
|
|
84
|
+
i[2] || (i[2] = p("span", { class: "sr-only" }, "HTTP Method: ", -1)),
|
|
85
|
+
c(O, {
|
|
84
86
|
active: e.isActive,
|
|
85
87
|
method: e.item.httpVerb
|
|
86
88
|
}, null, 8, ["active", "method"])
|
|
87
89
|
])) : s("", !0)
|
|
88
|
-
], 8,
|
|
90
|
+
], 8, P)
|
|
89
91
|
], 2),
|
|
90
|
-
e.open ?
|
|
91
|
-
e.$slots["action-menu"] ? (a(), d("div",
|
|
92
|
-
|
|
92
|
+
e.open ? v(e.$slots, "default", { key: 0 }, void 0, !0) : s("", !0),
|
|
93
|
+
e.$slots["action-menu"] ? (a(), d("div", H, [
|
|
94
|
+
v(e.$slots, "action-menu", {}, void 0, !0)
|
|
93
95
|
])) : s("", !0)
|
|
94
|
-
], 8,
|
|
96
|
+
], 8, D);
|
|
95
97
|
};
|
|
96
98
|
}
|
|
97
99
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiDocument.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/OpenApiDocument/OpenApiDocument.vue"],"names":[],"mappings":"AA8HA,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,wBAAwB,CAAA;AAE5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAUpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAS3D,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAwC,CAAA;AAC1D,QAAA,MAAM,OAAO,2DAA8B,CAAA;AAC3C,QAAA,MAAM,MAAM;;;;;;IAAyB,CAAA;AAIrC,QAAA,MAAoB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OpenApiDocument.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/OpenApiDocument/OpenApiDocument.vue"],"names":[],"mappings":"AA8HA,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,wBAAwB,CAAA;AAE5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAUpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAS3D,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAwC,CAAA;AAC1D,QAAA,MAAM,OAAO,2DAA8B,CAAA;AAC3C,QAAA,MAAM,MAAM;;;;;;IAAyB,CAAA;AAIrC,QAAA,MAAoB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCA8FR,QAAS,YAAY;;;2CAnBF,QAGzC,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAgBiB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA3FzC,CAAA;AAkFF,iBAAS,cAAc;mBAtDN;QACb,8BAA8B;QAC9B,aAAa,CAAC,EAAE,4BAA4B,CAAA;QAC5C,8CAA8C;QAC9C,MAAM,EAAE,OAAO,MAAM,CAAC,KAAK,CAAA;QAC3B,4CAA4C;QAC5C,OAAO,EAAE,OAAO,OAAO,CAAC,KAAK,CAAA;QAC7B,wCAAwC;QACxC,YAAY,EAAE,OAAO,YAAY,CAAC,KAAK,CAAA;QACvC;;;WAGG;QACH,UAAU,EAAE,OAAO,UAAU,CAAA;KAC9B,GAAG,GAAG;;mBAdQ;QACb,8BAA8B;QAC9B,aAAa,CAAC,EAAE,4BAA4B,CAAA;QAC5C,8CAA8C;QAC9C,MAAM,EAAE,OAAO,MAAM,CAAC,KAAK,CAAA;QAC3B,4CAA4C;QAC5C,OAAO,EAAE,OAAO,OAAO,CAAC,KAAK,CAAA;QAC7B,wCAAwC;QACxC,YAAY,EAAE,OAAO,YAAY,CAAC,KAAK,CAAA;QACvC;;;WAGG;QACH,UAAU,EAAE,OAAO,UAAU,CAAA;KAC9B,GAAG,GAAG;EAiGR;AACD,QAAA,MAAM,eAAe;oBAzJH,4BAA4B;;oBAA5B,4BAA4B;iGA+J5C,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { Spec, SpecConfiguration } from '@scalar/types/legacy';
|
|
1
|
+
import type { ReferenceConfiguration, Spec, SpecConfiguration } from '@scalar/types/legacy';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
proxyUrl?: string;
|
|
4
|
-
|
|
4
|
+
authentication?: ReferenceConfiguration["authentication"];
|
|
5
5
|
spec?: SpecConfiguration;
|
|
6
6
|
servers?: Spec["servers"];
|
|
7
7
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
8
8
|
proxyUrl?: string;
|
|
9
|
-
|
|
9
|
+
authentication?: ReferenceConfiguration["authentication"];
|
|
10
10
|
spec?: SpecConfiguration;
|
|
11
11
|
servers?: Spec["servers"];
|
|
12
12
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EACV,sBAAsB,EACtB,IAAI,EACJ,iBAAiB,EAClB,MAAM,sBAAsB,CAAA;;eAQhB,MAAM;qBACA,sBAAsB,CAAC,gBAAgB,CAAC;WAClD,iBAAiB;cACd,IAAI,CAAC,SAAS,CAAC;;eAHd,MAAM;qBACA,sBAAsB,CAAC,gBAAgB,CAAC;WAClD,iBAAiB;cACd,IAAI,CAAC,SAAS,CAAC;;AAmF3B,wBAMG"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as v, ref as f, onMounted as m, watch as i, onBeforeUnmount as d, openBlock as _, createElementBlock as S } from "vue";
|
|
2
|
+
import { useApiClient as x } from "./useApiClient.js";
|
|
3
|
+
import { useServerStore as U } from "../../legacy/stores/useServerStore.js";
|
|
4
|
+
import { getUrlFromServerState as h } from "../../legacy/helpers/getUrlFromServerState.js";
|
|
5
|
+
const A = /* @__PURE__ */ v({
|
|
6
|
+
__name: "ApiClientModal",
|
|
7
|
+
props: {
|
|
8
|
+
proxyUrl: {},
|
|
9
|
+
authentication: {},
|
|
10
|
+
spec: {},
|
|
11
|
+
servers: {}
|
|
12
|
+
},
|
|
13
|
+
setup(a) {
|
|
14
|
+
const t = a, o = f(null), { server: s, setServer: c } = U(), { client: n, init: p } = x();
|
|
15
|
+
return m(async () => {
|
|
16
|
+
if (!o.value) return;
|
|
17
|
+
(await p({
|
|
18
|
+
el: o.value,
|
|
19
|
+
spec: t.spec ?? {},
|
|
20
|
+
authentication: t.authentication,
|
|
21
|
+
proxyUrl: t.proxyUrl,
|
|
22
|
+
servers: t.servers
|
|
23
|
+
})).onUpdateServer((r) => {
|
|
24
|
+
if (!s.servers) return;
|
|
25
|
+
const l = s.servers.findIndex((u) => u.url === r);
|
|
26
|
+
l >= 0 && c({ selectedServer: l });
|
|
27
|
+
});
|
|
28
|
+
}), i(s, (e) => {
|
|
29
|
+
const r = h(e);
|
|
30
|
+
r && n.value && n.value.updateServer(r);
|
|
31
|
+
}), i(
|
|
32
|
+
() => t.spec,
|
|
33
|
+
(e) => {
|
|
34
|
+
var r;
|
|
35
|
+
return e && ((r = n.value) == null ? void 0 : r.updateSpec(e));
|
|
36
|
+
},
|
|
37
|
+
{ deep: !0 }
|
|
38
|
+
), d(() => {
|
|
39
|
+
var e;
|
|
40
|
+
return (e = n.value) == null ? void 0 : e.app.unmount();
|
|
41
|
+
}), (e, r) => (_(), S("div", {
|
|
42
|
+
ref_key: "el",
|
|
43
|
+
ref: o
|
|
44
|
+
}, null, 512));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
A as default
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,cAAc,gBAAgB,CAAA"}
|