@scalar/api-reference 1.31.10 → 1.31.12
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 +16 -0
- package/dist/browser/standalone.js +10404 -9353
- 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 +125 -118
- 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 +38 -38
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +21 -13
- package/dist/components/MobileHeader.vue.d.ts +4 -1
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +3 -3
- package/dist/components/MobileHeader.vue2.js +18 -19
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -15
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AAuuBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AAsCvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAwShB,iBAAS,cAAc;WAkYT,OAAO,IAA6B;;wBAtnBV,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;6BACrC,GAAG;;wBADQ,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;6BACrC,GAAG;;;;;;EA0nB/B;AAiCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YAnsBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFA0sB9D,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"}
|
|
@@ -4,7 +4,7 @@ import o from "./ApiReferenceLayout.vue2.js";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
-
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
7
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-790b49f0"]]);
|
|
8
8
|
export {
|
|
9
9
|
a as default
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as pe, computed as T, provide as b, ref as D, onBeforeMount as ge, onMounted as K, watch as E, toValue as z, onUnmounted as he, useId as Se, createElementBlock as f, openBlock as a, Fragment as G, createElementVNode as p, createVNode as v, normalizeStyle as be, normalizeClass as ye, unref as r, createCommentVNode as l, withDirectives as we, createBlock as y, renderSlot as u, normalizeProps as g, guardReactiveProps as h, withCtx as s, vShow as ke, createSlots as Ce } from "vue";
|
|
2
2
|
import { provideUseId as $e } from "@headlessui/vue";
|
|
3
3
|
import { OpenApiClientButton as Te } from "@scalar/api-client/components";
|
|
4
4
|
import { LAYOUT_SYMBOL as De } from "@scalar/api-client/hooks";
|
|
@@ -16,7 +16,7 @@ import Qe from "./MobileHeader.vue.js";
|
|
|
16
16
|
import { parse as We } from "../helpers/parse.js";
|
|
17
17
|
import { CONFIGURATION_SYMBOL as je } from "../hooks/useConfig.js";
|
|
18
18
|
import { useNavState as qe } from "../hooks/useNavState.js";
|
|
19
|
-
import { downloadEventBus as
|
|
19
|
+
import { downloadEventBus as Q, downloadDocument as Je } from "../libs/download.js";
|
|
20
20
|
import { createEmptySpecification as Xe } from "../libs/openapi.js";
|
|
21
21
|
import { useHttpClientStore as Ze } from "../stores/useHttpClientStore.js";
|
|
22
22
|
import { useDocumentSource as xe } from "../features/DocumentSource/hooks/useDocumentSource.js";
|
|
@@ -25,19 +25,19 @@ import { useSidebar as tt } from "../features/sidebar/hooks/useSidebar.js";
|
|
|
25
25
|
import { PLUGIN_MANAGER_SYMBOL as ot } from "../plugins/hooks/usePluginManager.js";
|
|
26
26
|
import { createPluginManager as rt } from "../plugins/plugin-manager.js";
|
|
27
27
|
import at from "./Sidebar/Sidebar.vue.js";
|
|
28
|
-
import
|
|
28
|
+
import W from "../features/Search/SearchButton.vue.js";
|
|
29
29
|
import nt from "./Content/Content.vue.js";
|
|
30
30
|
import it from "../features/ApiClientModal/ApiClientModal.vue.js";
|
|
31
|
-
const
|
|
31
|
+
const lt = ["innerHTML"], st = { class: "references-header" }, ut = ["aria-label"], dt = { class: "references-navigation-list" }, ct = { key: 0 }, mt = {
|
|
32
32
|
key: 1,
|
|
33
33
|
class: "scalar-api-references-standalone-search"
|
|
34
|
-
}, ft = { key: 1 },
|
|
34
|
+
}, ft = { key: 1 }, vt = { class: "references-editor" }, pt = { class: "references-editor-textarea" }, gt = ["aria-label"], ht = {
|
|
35
35
|
key: 0,
|
|
36
36
|
class: "w-64 empty:hidden"
|
|
37
37
|
}, St = {
|
|
38
38
|
key: 0,
|
|
39
39
|
class: "references-footer"
|
|
40
|
-
}, qt = /* @__PURE__ */
|
|
40
|
+
}, qt = /* @__PURE__ */ pe({
|
|
41
41
|
inheritAttrs: !1,
|
|
42
42
|
__name: "ApiReferenceLayout",
|
|
43
43
|
props: {
|
|
@@ -52,36 +52,36 @@ const st = ["innerHTML"], lt = { class: "references-header" }, ut = ["aria-label
|
|
|
52
52
|
setup(M) {
|
|
53
53
|
const t = T(
|
|
54
54
|
() => _e.parse(M.configuration)
|
|
55
|
-
), { initializeToasts:
|
|
56
|
-
|
|
55
|
+
), { initializeToasts: j, toast: q } = Ne();
|
|
56
|
+
j((e) => q(e));
|
|
57
57
|
const {
|
|
58
|
-
originalDocument:
|
|
59
|
-
originalOpenApiVersion:
|
|
58
|
+
originalDocument: J,
|
|
59
|
+
originalOpenApiVersion: X,
|
|
60
60
|
dereferencedDocument: d,
|
|
61
|
-
workspaceStore:
|
|
62
|
-
activeEntitiesStore:
|
|
61
|
+
workspaceStore: Z,
|
|
62
|
+
activeEntitiesStore: x
|
|
63
63
|
} = xe({
|
|
64
64
|
configuration: t,
|
|
65
65
|
dereferencedDocument: M.dereferencedDocument,
|
|
66
66
|
originalDocument: M.originalDocument
|
|
67
67
|
});
|
|
68
|
-
|
|
69
|
-
const
|
|
68
|
+
b(et, X), b(Ee, Z), b(Me, x);
|
|
69
|
+
const ee = Ue("(min-width: 1150px)"), te = D("100dvh"), w = D(null);
|
|
70
70
|
Ye(w, (e) => {
|
|
71
|
-
|
|
71
|
+
te.value = e[0].contentRect.height + "px";
|
|
72
72
|
});
|
|
73
|
-
const
|
|
73
|
+
const oe = T(Ae), R = qe(t), { isSidebarOpen: B, setCollapsedSidebarItem: L, scrollToOperation: re, items: H } = tt(d, {
|
|
74
74
|
...R,
|
|
75
75
|
config: t
|
|
76
76
|
}), {
|
|
77
77
|
getReferenceId: ae,
|
|
78
78
|
getPathRoutingId: ne,
|
|
79
79
|
getSectionId: ie,
|
|
80
|
-
getTagId:
|
|
81
|
-
hash:
|
|
82
|
-
isIntersectionEnabled:
|
|
83
|
-
updateHash:
|
|
84
|
-
replaceUrlState:
|
|
80
|
+
getTagId: le,
|
|
81
|
+
hash: O,
|
|
82
|
+
isIntersectionEnabled: A,
|
|
83
|
+
updateHash: P,
|
|
84
|
+
replaceUrlState: se
|
|
85
85
|
} = R;
|
|
86
86
|
if (t.value.redirect && typeof window < "u") {
|
|
87
87
|
const e = t.value.redirect(
|
|
@@ -90,40 +90,40 @@ const st = ["innerHTML"], lt = { class: "references-header" }, ut = ["aria-label
|
|
|
90
90
|
e && history.replaceState({}, "", e);
|
|
91
91
|
}
|
|
92
92
|
ge(() => {
|
|
93
|
-
|
|
93
|
+
P(), Oe();
|
|
94
94
|
});
|
|
95
|
-
const
|
|
95
|
+
const _ = async (e) => {
|
|
96
96
|
var o;
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
97
|
+
A.value = !1, P(), e ? re(e) : (o = w.value) == null || o.scrollTo(0, 0), await He(100), A.value = !0;
|
|
98
|
+
}, F = D(0);
|
|
99
|
+
K(() => {
|
|
100
100
|
var n, i, C;
|
|
101
101
|
history.scrollRestoration = "manual";
|
|
102
102
|
const e = (i = (n = w.value) == null ? void 0 : n.parentElement) == null ? void 0 : i.getBoundingClientRect(), o = (C = w.value) == null ? void 0 : C.getBoundingClientRect();
|
|
103
103
|
if (e && o) {
|
|
104
104
|
const $ = o.top - e.top;
|
|
105
|
-
|
|
105
|
+
F.value = $ < 2 ? 0 : $;
|
|
106
106
|
}
|
|
107
107
|
window.onhashchange = () => {
|
|
108
|
-
|
|
109
|
-
}, window.onpopstate = () => t.value.pathRouting &&
|
|
108
|
+
_(ae());
|
|
109
|
+
}, window.onpopstate = () => t.value.pathRouting && _(ne(window.location.pathname)), window.addEventListener("scroll", N, { passive: !0 });
|
|
110
110
|
});
|
|
111
111
|
const ue = T(
|
|
112
|
-
() =>
|
|
113
|
-
),
|
|
114
|
-
window.scrollY < 50 &&
|
|
115
|
-
}),
|
|
112
|
+
() => ee.value || !t.value.isEditable
|
|
113
|
+
), N = Ke(() => {
|
|
114
|
+
window.scrollY < 50 && se("");
|
|
115
|
+
}), V = D(!1);
|
|
116
116
|
E(d, (e) => {
|
|
117
117
|
var o, n;
|
|
118
|
-
if (!(
|
|
119
|
-
if (
|
|
120
|
-
const i = ie(
|
|
118
|
+
if (!(V.value || !((o = e.tags) != null && o.length))) {
|
|
119
|
+
if (O.value) {
|
|
120
|
+
const i = ie(O.value);
|
|
121
121
|
i && L(i, !0);
|
|
122
122
|
} else {
|
|
123
123
|
const i = (n = e.tags) == null ? void 0 : n[0];
|
|
124
|
-
i && L(
|
|
124
|
+
i && L(le(i), !0);
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
V.value = !0;
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
const k = D(Xe());
|
|
@@ -132,31 +132,35 @@ const st = ["innerHTML"], lt = { class: "references-header" }, ut = ["aria-label
|
|
|
132
132
|
async (e) => {
|
|
133
133
|
if (!e)
|
|
134
134
|
return;
|
|
135
|
-
const o = await We(e,
|
|
135
|
+
const o = await We(e, H.value.entries);
|
|
136
136
|
k.value = o;
|
|
137
137
|
},
|
|
138
138
|
{ immediate: !0 }
|
|
139
139
|
);
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
const c = T(() => {
|
|
141
|
+
var e;
|
|
142
|
+
return {
|
|
143
|
+
spec: k.value,
|
|
144
|
+
breadcrumb: ((e = H.value) == null ? void 0 : e.titles.get(O.value)) ?? ""
|
|
145
|
+
};
|
|
146
|
+
});
|
|
147
|
+
K(
|
|
148
|
+
() => Q.on(({ filename: e, format: o }) => {
|
|
145
149
|
Je(
|
|
146
|
-
|
|
150
|
+
z(J) || z(M.rawSpec) || "",
|
|
147
151
|
e,
|
|
148
152
|
o
|
|
149
153
|
);
|
|
150
154
|
})
|
|
151
155
|
), he(() => {
|
|
152
|
-
window.removeEventListener("scroll",
|
|
153
|
-
}), $e(() => Se()),
|
|
156
|
+
window.removeEventListener("scroll", N), Q.reset();
|
|
157
|
+
}), $e(() => Se()), b(De, "modal"), b(je, t), b(
|
|
154
158
|
ot,
|
|
155
159
|
rt({
|
|
156
160
|
plugins: t.value.plugins
|
|
157
161
|
})
|
|
158
162
|
);
|
|
159
|
-
function
|
|
163
|
+
function U(e, o) {
|
|
160
164
|
E(
|
|
161
165
|
() => t.value[e],
|
|
162
166
|
(n) => {
|
|
@@ -166,87 +170,90 @@ const st = ["innerHTML"], lt = { class: "references-header" }, ut = ["aria-label
|
|
|
166
170
|
);
|
|
167
171
|
}
|
|
168
172
|
const { setExcludedClients: de, setDefaultHttpClient: ce } = Ze();
|
|
169
|
-
|
|
173
|
+
U("defaultHttpClient", ce), U("hiddenClients", de);
|
|
170
174
|
const me = T(
|
|
171
175
|
() => `<style>
|
|
172
176
|
${Pe(t.value.theme, {
|
|
173
177
|
fonts: t.value.withDefaultFonts
|
|
174
178
|
})}</style>`
|
|
175
|
-
), { mediaQueries: fe } = Fe(),
|
|
179
|
+
), { mediaQueries: fe } = Fe(), ve = !1;
|
|
176
180
|
return E(fe.lg, (e, o) => {
|
|
177
|
-
o && !e && (
|
|
178
|
-
}), E(
|
|
179
|
-
e && e !== o && (
|
|
181
|
+
o && !e && (B.value = !1);
|
|
182
|
+
}), E(O, (e, o) => {
|
|
183
|
+
e && e !== o && (B.value = !1);
|
|
180
184
|
}), (e, o) => {
|
|
181
|
-
var n, i, C, $,
|
|
182
|
-
return a(),
|
|
183
|
-
|
|
184
|
-
|
|
185
|
+
var n, i, C, $, Y;
|
|
186
|
+
return a(), f(G, null, [
|
|
187
|
+
p("div", { innerHTML: me.value }, null, 8, lt),
|
|
188
|
+
p("div", {
|
|
185
189
|
ref_key: "documentEl",
|
|
186
190
|
ref: w,
|
|
187
|
-
class:
|
|
191
|
+
class: ye(["scalar-app scalar-api-reference references-layout", [
|
|
188
192
|
{
|
|
189
193
|
"scalar-api-references-standalone-mobile": t.value.showSidebar ?? !0,
|
|
190
|
-
"scalar-scrollbars-obtrusive":
|
|
194
|
+
"scalar-scrollbars-obtrusive": oe.value,
|
|
191
195
|
"references-editable": t.value.isEditable,
|
|
192
196
|
"references-sidebar": t.value.showSidebar,
|
|
193
|
-
"references-sidebar-mobile-open": r(
|
|
197
|
+
"references-sidebar-mobile-open": r(B),
|
|
194
198
|
"references-classic": t.value.layout === "classic"
|
|
195
199
|
},
|
|
196
200
|
e.$attrs.class
|
|
197
201
|
]]),
|
|
198
|
-
style:
|
|
199
|
-
"--scalar-y-offset": `var(--scalar-custom-header-height, ${
|
|
202
|
+
style: be({
|
|
203
|
+
"--scalar-y-offset": `var(--scalar-custom-header-height, ${F.value}px)`
|
|
200
204
|
})
|
|
201
205
|
}, [
|
|
202
|
-
|
|
203
|
-
t.value.layout === "modern" && (t.value.showSidebar ?? !0) ? (a(),
|
|
204
|
-
|
|
206
|
+
p("div", st, [
|
|
207
|
+
t.value.layout === "modern" && (t.value.showSidebar ?? !0) ? (a(), y(Qe, {
|
|
208
|
+
key: 0,
|
|
209
|
+
breadcrumb: c.value.breadcrumb
|
|
210
|
+
}, null, 8, ["breadcrumb"])) : l("", !0),
|
|
211
|
+
u(e.$slots, "header", g(h(c.value)), void 0, !0)
|
|
205
212
|
]),
|
|
206
|
-
t.value.showSidebar ? (a(),
|
|
213
|
+
t.value.showSidebar ? (a(), f("aside", {
|
|
207
214
|
key: 0,
|
|
208
215
|
"aria-label": `Sidebar for ${(i = (n = r(d)) == null ? void 0 : n.info) == null ? void 0 : i.title}`,
|
|
209
216
|
class: "references-navigation t-doc__sidebar"
|
|
210
217
|
}, [
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
default:
|
|
214
|
-
var S,
|
|
218
|
+
p("div", dt, [
|
|
219
|
+
v(r(Be), null, {
|
|
220
|
+
default: s(() => {
|
|
221
|
+
var S, m;
|
|
215
222
|
return [
|
|
216
|
-
|
|
217
|
-
title: ((
|
|
223
|
+
v(r(at), {
|
|
224
|
+
title: ((m = (S = r(d)) == null ? void 0 : S.info) == null ? void 0 : m.title) ?? "The OpenAPI Schema"
|
|
218
225
|
}, {
|
|
219
|
-
"sidebar-start":
|
|
226
|
+
"sidebar-start": s(() => {
|
|
220
227
|
var I;
|
|
221
228
|
return [
|
|
222
|
-
e.$slots["document-selector"] ? (a(),
|
|
229
|
+
e.$slots["document-selector"] ? (a(), f("div", ct, [
|
|
223
230
|
u(e.$slots, "document-selector", {}, void 0, !0)
|
|
224
|
-
])) :
|
|
225
|
-
t.value.hideSearch ?
|
|
226
|
-
|
|
231
|
+
])) : l("", !0),
|
|
232
|
+
t.value.hideSearch ? l("", !0) : (a(), f("div", mt, [
|
|
233
|
+
v(r(W), {
|
|
227
234
|
searchHotKey: (I = t.value) == null ? void 0 : I.searchHotKey,
|
|
228
235
|
spec: k.value
|
|
229
236
|
}, null, 8, ["searchHotKey", "spec"])
|
|
230
237
|
])),
|
|
231
|
-
u(e.$slots, "sidebar-start", g(h(
|
|
238
|
+
u(e.$slots, "sidebar-start", g(h(c.value)), void 0, !0)
|
|
232
239
|
];
|
|
233
240
|
}),
|
|
234
|
-
"sidebar-end":
|
|
235
|
-
u(e.$slots, "sidebar-end", g(h(
|
|
236
|
-
|
|
237
|
-
toggle:
|
|
238
|
-
t.value.hideDarkModeToggle ? (a(),
|
|
241
|
+
"sidebar-end": s(() => [
|
|
242
|
+
u(e.$slots, "sidebar-end", g(h(c.value)), () => [
|
|
243
|
+
v(r(Ie), { class: "darklight-reference" }, {
|
|
244
|
+
toggle: s(() => [
|
|
245
|
+
t.value.hideDarkModeToggle ? (a(), f("span", ft)) : (a(), y(r(Re), {
|
|
239
246
|
key: 0,
|
|
240
247
|
modelValue: e.isDark,
|
|
241
248
|
"onUpdate:modelValue": o[0] || (o[0] = (I) => e.$emit("toggleDarkMode"))
|
|
242
249
|
}, null, 8, ["modelValue"]))
|
|
243
250
|
]),
|
|
244
|
-
default:
|
|
245
|
-
t.value.hideClientButton ?
|
|
251
|
+
default: s(() => [
|
|
252
|
+
t.value.hideClientButton ? l("", !0) : (a(), y(r(Te), {
|
|
246
253
|
key: 0,
|
|
247
254
|
buttonSource: "sidebar",
|
|
248
255
|
integration: t.value._integration,
|
|
249
|
-
isDevelopment:
|
|
256
|
+
isDevelopment: ve,
|
|
250
257
|
url: t.value.url
|
|
251
258
|
}, null, 8, ["integration", "url"]))
|
|
252
259
|
]),
|
|
@@ -261,29 +268,29 @@ const st = ["innerHTML"], lt = { class: "references-header" }, ut = ["aria-label
|
|
|
261
268
|
_: 3
|
|
262
269
|
})
|
|
263
270
|
])
|
|
264
|
-
], 8, ut)) :
|
|
265
|
-
we(
|
|
266
|
-
|
|
267
|
-
u(e.$slots, "editor", g(h(
|
|
271
|
+
], 8, ut)) : l("", !0),
|
|
272
|
+
we(p("div", vt, [
|
|
273
|
+
p("div", pt, [
|
|
274
|
+
u(e.$slots, "editor", g(h(c.value)), void 0, !0)
|
|
268
275
|
])
|
|
269
276
|
], 512), [
|
|
270
277
|
[ke, t.value.isEditable]
|
|
271
278
|
]),
|
|
272
|
-
ue.value ? (a(),
|
|
273
|
-
|
|
279
|
+
ue.value ? (a(), f(G, { key: 1 }, [
|
|
280
|
+
p("main", {
|
|
274
281
|
"aria-label": `Open API Documentation for ${($ = (C = r(d)) == null ? void 0 : C.info) == null ? void 0 : $.title}`,
|
|
275
282
|
class: "references-rendered"
|
|
276
283
|
}, [
|
|
277
|
-
|
|
284
|
+
v(r(nt), {
|
|
278
285
|
layout: t.value.layout,
|
|
279
286
|
document: r(d),
|
|
280
287
|
parsedSpec: k.value
|
|
281
288
|
}, Ce({
|
|
282
|
-
start:
|
|
283
|
-
u(e.$slots, "content-start", g(h(
|
|
284
|
-
t.value.layout === "classic" ? (a(),
|
|
285
|
-
"dark-mode-toggle":
|
|
286
|
-
t.value.hideDarkModeToggle ?
|
|
289
|
+
start: s(() => [
|
|
290
|
+
u(e.$slots, "content-start", g(h(c.value)), () => [
|
|
291
|
+
t.value.layout === "classic" ? (a(), y(ze, { key: 0 }, {
|
|
292
|
+
"dark-mode-toggle": s(() => [
|
|
293
|
+
t.value.hideDarkModeToggle ? l("", !0) : (a(), y(r(Le), {
|
|
287
294
|
key: 0,
|
|
288
295
|
class: "text-c-2 hover:text-c-1",
|
|
289
296
|
mode: e.isDark ? "dark" : "light",
|
|
@@ -292,11 +299,11 @@ const st = ["innerHTML"], lt = { class: "references-header" }, ut = ["aria-label
|
|
|
292
299
|
onClick: o[1] || (o[1] = (S) => e.$emit("toggleDarkMode"))
|
|
293
300
|
}, null, 8, ["mode"]))
|
|
294
301
|
]),
|
|
295
|
-
default:
|
|
296
|
-
e.$slots["document-selector"] ? (a(),
|
|
302
|
+
default: s(() => [
|
|
303
|
+
e.$slots["document-selector"] ? (a(), f("div", ht, [
|
|
297
304
|
u(e.$slots, "document-selector", {}, void 0, !0)
|
|
298
|
-
])) :
|
|
299
|
-
t.value.hideSearch ?
|
|
305
|
+
])) : l("", !0),
|
|
306
|
+
t.value.hideSearch ? l("", !0) : (a(), y(r(W), {
|
|
300
307
|
key: 1,
|
|
301
308
|
class: "t-doc__sidebar",
|
|
302
309
|
searchHotKey: t.value.searchHotKey,
|
|
@@ -304,25 +311,25 @@ const st = ["innerHTML"], lt = { class: "references-header" }, ut = ["aria-label
|
|
|
304
311
|
}, null, 8, ["searchHotKey", "spec"]))
|
|
305
312
|
]),
|
|
306
313
|
_: 3
|
|
307
|
-
})) :
|
|
314
|
+
})) : l("", !0)
|
|
308
315
|
], !0)
|
|
309
316
|
]),
|
|
310
|
-
end:
|
|
311
|
-
u(e.$slots, "content-end", g(h(
|
|
317
|
+
end: s(() => [
|
|
318
|
+
u(e.$slots, "content-end", g(h(c.value)), void 0, !0)
|
|
312
319
|
]),
|
|
313
320
|
_: 2
|
|
314
321
|
}, [
|
|
315
|
-
(
|
|
322
|
+
(Y = t.value) != null && Y.isEditable ? {
|
|
316
323
|
name: "empty-state",
|
|
317
|
-
fn:
|
|
324
|
+
fn: s(() => {
|
|
318
325
|
var S;
|
|
319
326
|
return [
|
|
320
|
-
|
|
327
|
+
v(Ge, {
|
|
321
328
|
theme: ((S = t.value) == null ? void 0 : S.theme) || "default",
|
|
322
|
-
onChangeTheme: o[2] || (o[2] = (
|
|
323
|
-
onLinkSwaggerFile: o[3] || (o[3] = (
|
|
324
|
-
onLoadSwaggerFile: o[4] || (o[4] = (
|
|
325
|
-
onUpdateContent: o[5] || (o[5] = (
|
|
329
|
+
onChangeTheme: o[2] || (o[2] = (m) => e.$emit("changeTheme", m)),
|
|
330
|
+
onLinkSwaggerFile: o[3] || (o[3] = (m) => e.$emit("linkSwaggerFile")),
|
|
331
|
+
onLoadSwaggerFile: o[4] || (o[4] = (m) => e.$emit("loadSwaggerFile")),
|
|
332
|
+
onUpdateContent: o[5] || (o[5] = (m) => e.$emit("updateContent", m))
|
|
326
333
|
}, null, 8, ["theme"])
|
|
327
334
|
];
|
|
328
335
|
}),
|
|
@@ -330,16 +337,16 @@ const st = ["innerHTML"], lt = { class: "references-header" }, ut = ["aria-label
|
|
|
330
337
|
} : void 0
|
|
331
338
|
]), 1032, ["layout", "document", "parsedSpec"])
|
|
332
339
|
], 8, gt),
|
|
333
|
-
e.$slots.footer ? (a(),
|
|
334
|
-
u(e.$slots, "footer", g(h(
|
|
335
|
-
])) :
|
|
336
|
-
], 64)) :
|
|
337
|
-
|
|
340
|
+
e.$slots.footer ? (a(), f("div", St, [
|
|
341
|
+
u(e.$slots, "footer", g(h(c.value)), void 0, !0)
|
|
342
|
+
])) : l("", !0)
|
|
343
|
+
], 64)) : l("", !0),
|
|
344
|
+
v(r(it), {
|
|
338
345
|
configuration: t.value,
|
|
339
346
|
dereferencedDocument: r(d)
|
|
340
347
|
}, null, 8, ["configuration", "dereferencedDocument"])
|
|
341
348
|
], 6),
|
|
342
|
-
|
|
349
|
+
v(r(Ve))
|
|
343
350
|
], 64);
|
|
344
351
|
};
|
|
345
352
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";AAudA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ClientLibraries.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-681c8e27"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import { defineComponent as K, ref as w, useId as
|
|
2
|
-
import { TabGroup as
|
|
1
|
+
import { defineComponent as K, ref as w, useId as y, watch as P, onMounted as B, computed as F, createElementBlock as l, createCommentVNode as b, unref as e, openBlock as n, createVNode as i, withCtx as m, createElementVNode as V, Fragment as h, normalizeClass as H, renderList as A, createBlock as D, createTextVNode as M, toDisplayString as p } from "vue";
|
|
2
|
+
import { TabGroup as O, TabList as R, TabPanels as j, TabPanel as z } from "@headlessui/vue";
|
|
3
3
|
import { useWorkspace as G } from "@scalar/api-client/store";
|
|
4
4
|
import { ScalarMarkdown as J, ScalarCodeBlock as W } from "@scalar/components";
|
|
5
5
|
import { REFERENCE_LS_KEYS as Y } from "@scalar/helpers/object/local-storage";
|
|
6
6
|
import { useHttpClientStore as q } from "../../../stores/useHttpClientStore.js";
|
|
7
|
-
import
|
|
8
|
-
import { useFeaturedHttpClients as
|
|
9
|
-
const
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "selected-client card-footer -outline-offset-2",
|
|
12
|
-
role: "tabpanel",
|
|
13
|
-
tabindex: "0"
|
|
14
|
-
}, X = {
|
|
7
|
+
import Q from "./ClientSelector.vue.js";
|
|
8
|
+
import { useFeaturedHttpClients as U } from "./useFeaturedHttpClients.js";
|
|
9
|
+
const Z = { key: 0 }, $ = ["id"], X = {
|
|
15
10
|
key: 1,
|
|
16
|
-
class: "selected-client card-footer -
|
|
11
|
+
class: "selected-client card-footer border-t-0 p-0",
|
|
17
12
|
role: "tabpanel",
|
|
18
13
|
tabindex: "1"
|
|
19
14
|
}, ee = ["id"], de = /* @__PURE__ */ K({
|
|
@@ -25,11 +20,11 @@ const U = { key: 0 }, Z = ["id"], $ = {
|
|
|
25
20
|
httpClientTitle: x,
|
|
26
21
|
getClientTitle: E,
|
|
27
22
|
getTargetTitle: L,
|
|
28
|
-
httpClient:
|
|
29
|
-
setHttpClient:
|
|
30
|
-
} = q(), { featuredClients: d, isFeatured: S } =
|
|
23
|
+
httpClient: a,
|
|
24
|
+
setHttpClient: _
|
|
25
|
+
} = q(), { featuredClients: d, isFeatured: S } = U(), I = G(), g = w(0), v = y(), C = y();
|
|
31
26
|
P(
|
|
32
|
-
|
|
27
|
+
a,
|
|
33
28
|
(t) => {
|
|
34
29
|
t && (g.value = d.findIndex(
|
|
35
30
|
(o) => o.targetKey === t.targetKey && o.clientKey === t.clientKey
|
|
@@ -39,13 +34,13 @@ const U = { key: 0 }, Z = ["id"], $ = {
|
|
|
39
34
|
);
|
|
40
35
|
function N(t) {
|
|
41
36
|
const o = d[t];
|
|
42
|
-
o &&
|
|
37
|
+
o && _(o);
|
|
43
38
|
}
|
|
44
39
|
B(() => {
|
|
45
40
|
const t = localStorage.getItem(Y.SELECTED_CLIENT);
|
|
46
|
-
t &&
|
|
41
|
+
t && _(JSON.parse(t));
|
|
47
42
|
});
|
|
48
|
-
const
|
|
43
|
+
const r = F(() => {
|
|
49
44
|
var c;
|
|
50
45
|
const t = Object.values(I.collections)[0], o = (c = t == null ? void 0 : t.info) == null ? void 0 : c["x-scalar-sdk-installation"];
|
|
51
46
|
if (!Array.isArray(o) || !(o != null && o.length))
|
|
@@ -53,14 +48,14 @@ const U = { key: 0 }, Z = ["id"], $ = {
|
|
|
53
48
|
const s = o.find(
|
|
54
49
|
(u) => {
|
|
55
50
|
var f;
|
|
56
|
-
return u.lang.toLowerCase() === ((f =
|
|
51
|
+
return u.lang.toLowerCase() === ((f = a == null ? void 0 : a.targetKey) == null ? void 0 : f.toLowerCase());
|
|
57
52
|
}
|
|
58
53
|
);
|
|
59
54
|
if (s)
|
|
60
55
|
return s;
|
|
61
56
|
});
|
|
62
|
-
return (t, o) => e(T).length ? (
|
|
63
|
-
i(e(
|
|
57
|
+
return (t, o) => e(T).length ? (n(), l("div", Z, [
|
|
58
|
+
i(e(O), {
|
|
64
59
|
manual: "",
|
|
65
60
|
selectedIndex: g.value,
|
|
66
61
|
onChange: N
|
|
@@ -69,46 +64,51 @@ const U = { key: 0 }, Z = ["id"], $ = {
|
|
|
69
64
|
V("div", {
|
|
70
65
|
id: e(v),
|
|
71
66
|
class: "client-libraries-heading"
|
|
72
|
-
}, " Client Libraries ", 8,
|
|
73
|
-
i(e(
|
|
67
|
+
}, " Client Libraries ", 8, $),
|
|
68
|
+
i(e(R), {
|
|
74
69
|
"aria-labelledby": e(v),
|
|
75
70
|
class: "client-libraries-list"
|
|
76
71
|
}, {
|
|
77
72
|
default: m(() => [
|
|
78
|
-
i(
|
|
73
|
+
i(Q, {
|
|
79
74
|
featured: e(d),
|
|
80
75
|
morePanel: e(C)
|
|
81
76
|
}, null, 8, ["featured", "morePanel"])
|
|
82
77
|
]),
|
|
83
78
|
_: 1
|
|
84
79
|
}, 8, ["aria-labelledby"]),
|
|
85
|
-
i(e(
|
|
80
|
+
i(e(j), null, {
|
|
86
81
|
default: m(() => {
|
|
87
82
|
var s, c;
|
|
88
83
|
return [
|
|
89
|
-
(s =
|
|
90
|
-
|
|
84
|
+
(s = r.value) != null && s.source || (c = r.value) != null && c.description ? (n(), l(h, { key: 0 }, [
|
|
85
|
+
r.value.description ? (n(), l("div", {
|
|
86
|
+
key: 0,
|
|
87
|
+
class: H(["selected-client card-footer -outline-offset-2", r.value.source && "rounded-b-none"]),
|
|
88
|
+
role: "tabpanel",
|
|
89
|
+
tabindex: "0"
|
|
90
|
+
}, [
|
|
91
91
|
i(e(J), {
|
|
92
|
-
value:
|
|
92
|
+
value: r.value.description
|
|
93
93
|
}, null, 8, ["value"])
|
|
94
|
-
])) :
|
|
95
|
-
|
|
94
|
+
], 2)) : b("", !0),
|
|
95
|
+
r.value.source ? (n(), l("div", X, [
|
|
96
96
|
i(e(W), {
|
|
97
97
|
lang: "shell",
|
|
98
|
-
content:
|
|
99
|
-
copy: !
|
|
100
|
-
class: "
|
|
98
|
+
content: r.value.source,
|
|
99
|
+
copy: !0,
|
|
100
|
+
class: "rounded-t-none rounded-b-lg px-3 py-2 -outline-offset-1 has-focus:outline"
|
|
101
101
|
}, null, 8, ["content"])
|
|
102
|
-
])) :
|
|
103
|
-
], 64)) : e(
|
|
102
|
+
])) : b("", !0)
|
|
103
|
+
], 64)) : e(a) && e(S)(e(a)) ? (n(!0), l(h, { key: 1 }, A(e(d), (u, f) => (n(), D(e(z), {
|
|
104
104
|
key: f,
|
|
105
105
|
class: "selected-client card-footer -outline-offset-2"
|
|
106
106
|
}, {
|
|
107
107
|
default: m(() => [
|
|
108
|
-
|
|
108
|
+
M(p(e(E)(u)) + " " + p(e(L)(u)), 1)
|
|
109
109
|
]),
|
|
110
110
|
_: 2
|
|
111
|
-
}, 1024))), 128)) : (
|
|
111
|
+
}, 1024))), 128)) : (n(), l("div", {
|
|
112
112
|
key: 2,
|
|
113
113
|
id: e(C),
|
|
114
114
|
class: "selected-client card-footer -outline-offset-2",
|
|
@@ -122,7 +122,7 @@ const U = { key: 0 }, Z = ["id"], $ = {
|
|
|
122
122
|
]),
|
|
123
123
|
_: 1
|
|
124
124
|
}, 8, ["selectedIndex"])
|
|
125
|
-
])) :
|
|
125
|
+
])) : b("", !0);
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAG9D,eAAO,MAAM,YAAY,EAAE,kBAAkB,EAAuC,CAAA;AAEpF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAG9D,eAAO,MAAM,YAAY,EAAE,kBAAkB,EAAuC,CAAA;AAEpF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAuEzG"}
|