@scalar/api-reference 1.24.38 → 1.24.39
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 +7 -0
- package/dist/browser/standalone.js +17 -19
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +3 -3
- package/dist/components/ApiReferenceLayout.vue2.js +108 -109
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +4 -4
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/dist/components/Util/Style.vue.d.ts +0 -3
- package/dist/components/Util/Style.vue.d.ts.map +0 -1
- package/dist/components/Util/Style.vue.js +0 -12
- package/dist/components/Util/index.d.ts +0 -2
- package/dist/components/Util/index.d.ts.map +0 -1
|
@@ -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":"AAojBA,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAggBjB,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./ApiReferenceLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-be93deac"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as default
|
|
8
8
|
};
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideUseId as
|
|
3
|
-
import { addScalarClassesToHeadless as
|
|
4
|
-
import { defaultStateFactory as
|
|
5
|
-
import { getThemeStyles as
|
|
6
|
-
import { useToasts as
|
|
7
|
-
import { useMediaQuery as
|
|
8
|
-
import
|
|
1
|
+
import { defineComponent as J, ref as h, onMounted as D, onBeforeMount as F, computed as b, watch as X, onServerPrefetch as Z, useSSRContext as _, getCurrentInstance as x, provide as M, openBlock as v, createElementBlock as S, Fragment as O, createElementVNode as i, normalizeClass as ee, unref as u, normalizeStyle as oe, renderSlot as l, normalizeProps as d, guardReactiveProps as c, createVNode as f, withCtx as m, createCommentVNode as w, withDirectives as te, vShow as re, createSlots as ae } from "vue";
|
|
2
|
+
import { provideUseId as ne } from "@headlessui/vue";
|
|
3
|
+
import { addScalarClassesToHeadless as se } from "@scalar/components";
|
|
4
|
+
import { defaultStateFactory as P } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import { getThemeStyles as ie } from "@scalar/themes";
|
|
6
|
+
import { useToasts as le, ScalarToasts as de } from "@scalar/use-toasts";
|
|
7
|
+
import { useMediaQuery as ce, useResizeObserver as ue, useDebounceFn as pe } from "@vueuse/core";
|
|
8
|
+
import fe from "./ApiClientModal.vue.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import
|
|
11
|
-
import { downloadSpecBus as
|
|
12
|
-
import { useDeprecationWarnings as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
const Ee = { class: "references-header" }, Be = {
|
|
10
|
+
import me from "./GettingStarted.vue.js";
|
|
11
|
+
import { downloadSpecBus as ge, downloadSpecFile as ve } from "../helpers/specDownloads.js";
|
|
12
|
+
import { useDeprecationWarnings as Se } from "../hooks/useDeprecationWarnings.js";
|
|
13
|
+
import he from "./Sidebar/Sidebar.vue.js";
|
|
14
|
+
import be from "./Content/Content.vue.js";
|
|
15
|
+
import { GLOBAL_SECURITY_SYMBOL as we, HIDE_DOWNLOAD_BUTTON_SYMBOL as ye } from "../helpers/provideSymbols.js";
|
|
16
|
+
import { useSidebar as Te } from "../hooks/useSidebar.js";
|
|
17
|
+
import { useNavState as Re } from "../hooks/useNavState.js";
|
|
18
|
+
import { scrollToId as $e } from "../helpers/scrollToId.js";
|
|
19
|
+
import { sleep as Ce } from "../helpers/sleep.js";
|
|
20
|
+
const Ie = ["innerHTML"], Le = { class: "references-header" }, Ee = {
|
|
22
21
|
key: 0,
|
|
23
22
|
class: "references-navigation t-doc__sidebar"
|
|
24
|
-
},
|
|
23
|
+
}, ke = { class: "references-navigation-list" }, Be = { class: "references-editor" }, De = { class: "references-editor-textarea" }, Fe = { class: "references-rendered" }, Me = {
|
|
25
24
|
key: 0,
|
|
26
25
|
class: "references-footer"
|
|
27
|
-
},
|
|
26
|
+
}, xe = /* @__PURE__ */ J({
|
|
28
27
|
inheritAttrs: !1,
|
|
29
28
|
__name: "ApiReferenceLayout",
|
|
30
29
|
props: {
|
|
@@ -33,159 +32,159 @@ const Ee = { class: "references-header" }, Be = {
|
|
|
33
32
|
rawSpec: {}
|
|
34
33
|
},
|
|
35
34
|
emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
|
|
36
|
-
setup(
|
|
37
|
-
const t =
|
|
38
|
-
A((e) =>
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
setup(U) {
|
|
36
|
+
const t = U, { initializeToasts: A, toast: H } = le();
|
|
37
|
+
A((e) => H(e));
|
|
38
|
+
const N = ce("(min-width: 1150px)"), z = h("100dvh"), p = h(null);
|
|
39
|
+
ue(p, (e) => {
|
|
40
|
+
z.value = e[0].contentRect.height + "px";
|
|
42
41
|
});
|
|
43
|
-
const
|
|
44
|
-
|
|
42
|
+
const y = h(0);
|
|
43
|
+
D(() => {
|
|
45
44
|
var a, r, n;
|
|
46
|
-
const e = (r = (a =
|
|
45
|
+
const e = (r = (a = p.value) == null ? void 0 : a.parentElement) == null ? void 0 : r.getBoundingClientRect(), o = (n = p.value) == null ? void 0 : n.getBoundingClientRect();
|
|
47
46
|
if (e && o) {
|
|
48
|
-
const
|
|
49
|
-
|
|
47
|
+
const B = o.top - e.top;
|
|
48
|
+
y.value = B < 2 ? 0 : B;
|
|
50
49
|
}
|
|
51
50
|
});
|
|
52
51
|
const {
|
|
53
|
-
breadcrumb:
|
|
54
|
-
collapsedSidebarItems:
|
|
55
|
-
isSidebarOpen:
|
|
56
|
-
setCollapsedSidebarItem:
|
|
52
|
+
breadcrumb: Y,
|
|
53
|
+
collapsedSidebarItems: g,
|
|
54
|
+
isSidebarOpen: V,
|
|
55
|
+
setCollapsedSidebarItem: T,
|
|
57
56
|
hideModels: G,
|
|
58
57
|
setParsedSpec: W
|
|
59
|
-
} =
|
|
58
|
+
} = Te(), {
|
|
60
59
|
getPathRoutingId: R,
|
|
61
60
|
getSectionId: j,
|
|
62
61
|
getTagId: K,
|
|
63
|
-
hash:
|
|
62
|
+
hash: $,
|
|
64
63
|
isIntersectionEnabled: C,
|
|
65
|
-
pathRouting:
|
|
66
|
-
updateHash:
|
|
67
|
-
} =
|
|
68
|
-
|
|
69
|
-
const
|
|
64
|
+
pathRouting: I,
|
|
65
|
+
updateHash: L
|
|
66
|
+
} = Re();
|
|
67
|
+
I.value = t.configuration.pathRouting, F(() => L());
|
|
68
|
+
const E = async (e) => {
|
|
70
69
|
var o;
|
|
71
|
-
C.value = !1,
|
|
70
|
+
C.value = !1, L(), e ? $e(e) : (o = p.value) == null || o.scrollTo(0, 0), await Ce(100), C.value = !0;
|
|
72
71
|
};
|
|
73
|
-
F(() =>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}), window.onhashchange = () =>
|
|
72
|
+
F(() => se()), D(() => {
|
|
73
|
+
ge.on(({ specTitle: e }) => {
|
|
74
|
+
ve(t.rawSpec, e);
|
|
75
|
+
}), window.onhashchange = () => E(decodeURIComponent(window.location.hash.replace(/^#/, ""))), window.onpopstate = () => I.value && E(R(window.location.pathname));
|
|
77
76
|
});
|
|
78
|
-
const Q =
|
|
79
|
-
() =>
|
|
80
|
-
),
|
|
77
|
+
const Q = b(
|
|
78
|
+
() => N.value || !t.configuration.isEditable
|
|
79
|
+
), k = pe((e) => {
|
|
81
80
|
if ((e.target.scrollTop ?? 0) < 50) {
|
|
82
81
|
const a = t.configuration.pathRouting ? t.configuration.pathRouting.basePath : window.location.pathname;
|
|
83
|
-
window.history.replaceState({}, "", a + window.location.search),
|
|
82
|
+
window.history.replaceState({}, "", a + window.location.search), $.value = "";
|
|
84
83
|
}
|
|
85
|
-
}), s =
|
|
86
|
-
breadcrumb:
|
|
84
|
+
}), s = b(() => ({
|
|
85
|
+
breadcrumb: Y.value,
|
|
87
86
|
spec: t.parsedSpec
|
|
88
87
|
}));
|
|
89
|
-
|
|
88
|
+
X(() => t.parsedSpec, W, { deep: !0 }), Z(() => {
|
|
90
89
|
var o, a;
|
|
91
|
-
const e =
|
|
92
|
-
if (e && (e.payload || (e.payload = { data:
|
|
90
|
+
const e = _();
|
|
91
|
+
if (e && (e.payload || (e.payload = { data: P() }), (o = e.payload).data || (o.data = P()), t.configuration.pathRouting)) {
|
|
93
92
|
const r = R(e.url);
|
|
94
|
-
|
|
95
|
-
for (const n in
|
|
96
|
-
Object.hasOwn(
|
|
93
|
+
$.value = r, e.payload.data.hash = r;
|
|
94
|
+
for (const n in g)
|
|
95
|
+
Object.hasOwn(g, n) && delete g[n];
|
|
97
96
|
if (r)
|
|
98
|
-
|
|
97
|
+
T(j(r), !0);
|
|
99
98
|
else {
|
|
100
99
|
const n = (a = t.parsedSpec.tags) == null ? void 0 : a[0];
|
|
101
|
-
n &&
|
|
100
|
+
n && T(K(n), !0);
|
|
102
101
|
}
|
|
103
|
-
e.payload.data["useSidebarContent-collapsedSidebarItems"] =
|
|
102
|
+
e.payload.data["useSidebarContent-collapsedSidebarItems"] = g;
|
|
104
103
|
}
|
|
105
|
-
}),
|
|
104
|
+
}), ne(() => {
|
|
106
105
|
var r;
|
|
107
|
-
const e =
|
|
106
|
+
const e = x(), o = "scalar-instance-id";
|
|
108
107
|
if (!e) return o;
|
|
109
108
|
let a = e.uid;
|
|
110
109
|
return typeof window > "u" ? (e.attrs || (e.attrs = {}), e.attrs[o] = a) : (r = e.vnode.el) != null && r.getAttribute && (a = e.vnode.el.getAttribute(o)), `${o}-${a}`;
|
|
111
|
-
}),
|
|
112
|
-
|
|
110
|
+
}), M(we, () => t.parsedSpec.security), M(
|
|
111
|
+
ye,
|
|
113
112
|
() => t.configuration.hideDownloadButton
|
|
114
|
-
), G.value = t.configuration.hideModels ?? !1,
|
|
113
|
+
), G.value = t.configuration.hideModels ?? !1, Se(t.configuration);
|
|
114
|
+
const q = b(
|
|
115
|
+
() => `<style>
|
|
116
|
+
${ie(t.configuration.theme, {
|
|
117
|
+
fonts: t.configuration.withDefaultFonts
|
|
118
|
+
})}</style>`
|
|
119
|
+
);
|
|
120
|
+
return (e, o) => {
|
|
115
121
|
var a;
|
|
116
|
-
return
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
ee(oe(i(de)(e.configuration.theme, {
|
|
120
|
-
fonts: e.configuration.withDefaultFonts
|
|
121
|
-
})), 1)
|
|
122
|
-
]),
|
|
123
|
-
_: 1
|
|
124
|
-
})) : h("", !0),
|
|
125
|
-
p("div", {
|
|
122
|
+
return v(), S(O, null, [
|
|
123
|
+
i("div", { innerHTML: q.value }, null, 8, Ie),
|
|
124
|
+
i("div", {
|
|
126
125
|
ref_key: "documentEl",
|
|
127
|
-
ref:
|
|
128
|
-
class:
|
|
126
|
+
ref: p,
|
|
127
|
+
class: ee(["scalar-app scalar-api-reference references-layout", [
|
|
129
128
|
{
|
|
130
129
|
"references-editable": e.configuration.isEditable,
|
|
131
130
|
"references-sidebar": e.configuration.showSidebar,
|
|
132
|
-
"references-sidebar-mobile-open":
|
|
131
|
+
"references-sidebar-mobile-open": u(V),
|
|
133
132
|
"references-classic": e.configuration.layout === "classic"
|
|
134
133
|
},
|
|
135
134
|
e.$attrs.class
|
|
136
135
|
]]),
|
|
137
|
-
style:
|
|
138
|
-
"--scalar-y-offset": `var(--scalar-custom-header-height, ${
|
|
136
|
+
style: oe({
|
|
137
|
+
"--scalar-y-offset": `var(--scalar-custom-header-height, ${y.value}px)`
|
|
139
138
|
}),
|
|
140
139
|
onScrollPassive: o[4] || (o[4] = //@ts-ignore
|
|
141
|
-
(...r) =>
|
|
140
|
+
(...r) => u(k) && u(k)(...r))
|
|
142
141
|
}, [
|
|
143
|
-
|
|
142
|
+
i("div", Le, [
|
|
144
143
|
l(e.$slots, "header", d(c(s.value)), void 0, !0)
|
|
145
144
|
]),
|
|
146
|
-
e.configuration.showSidebar ? (
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"sidebar-start":
|
|
145
|
+
e.configuration.showSidebar ? (v(), S("aside", Ee, [
|
|
146
|
+
i("div", ke, [
|
|
147
|
+
f(u(he), { parsedSpec: e.parsedSpec }, {
|
|
148
|
+
"sidebar-start": m(() => [
|
|
150
149
|
l(e.$slots, "sidebar-start", d(c(s.value)), void 0, !0)
|
|
151
150
|
]),
|
|
152
|
-
"sidebar-end":
|
|
151
|
+
"sidebar-end": m(() => [
|
|
153
152
|
l(e.$slots, "sidebar-end", d(c(s.value)), void 0, !0)
|
|
154
153
|
]),
|
|
155
154
|
_: 3
|
|
156
155
|
}, 8, ["parsedSpec"])
|
|
157
156
|
])
|
|
158
|
-
])) :
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
])) : w("", !0),
|
|
158
|
+
te(i("div", Be, [
|
|
159
|
+
i("div", De, [
|
|
161
160
|
l(e.$slots, "editor", d(c(s.value)), void 0, !0)
|
|
162
161
|
])
|
|
163
162
|
], 512), [
|
|
164
|
-
[
|
|
163
|
+
[re, e.configuration.isEditable]
|
|
165
164
|
]),
|
|
166
|
-
Q.value ? (
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
Q.value ? (v(), S(O, { key: 1 }, [
|
|
166
|
+
i("div", Fe, [
|
|
167
|
+
f(u(be), {
|
|
169
168
|
baseServerURL: e.configuration.baseServerURL,
|
|
170
169
|
layout: e.configuration.layout === "classic" ? "accordion" : "default",
|
|
171
170
|
parsedSpec: e.parsedSpec,
|
|
172
171
|
proxy: e.configuration.proxy,
|
|
173
172
|
servers: e.configuration.servers
|
|
174
|
-
},
|
|
175
|
-
start:
|
|
173
|
+
}, ae({
|
|
174
|
+
start: m(() => [
|
|
176
175
|
l(e.$slots, "content-start", d(c(s.value)), void 0, !0)
|
|
177
176
|
]),
|
|
178
|
-
end:
|
|
177
|
+
end: m(() => [
|
|
179
178
|
l(e.$slots, "content-end", d(c(s.value)), void 0, !0)
|
|
180
179
|
]),
|
|
181
180
|
_: 2
|
|
182
181
|
}, [
|
|
183
182
|
(a = e.configuration) != null && a.isEditable ? {
|
|
184
183
|
name: "empty-state",
|
|
185
|
-
fn:
|
|
184
|
+
fn: m(() => {
|
|
186
185
|
var r;
|
|
187
186
|
return [
|
|
188
|
-
|
|
187
|
+
f(me, {
|
|
189
188
|
theme: ((r = e.configuration) == null ? void 0 : r.theme) || "default",
|
|
190
189
|
onChangeTheme: o[0] || (o[0] = (n) => e.$emit("changeTheme", n)),
|
|
191
190
|
onLinkSwaggerFile: o[1] || (o[1] = (n) => e.$emit("linkSwaggerFile")),
|
|
@@ -198,20 +197,20 @@ const Ee = { class: "references-header" }, Be = {
|
|
|
198
197
|
} : void 0
|
|
199
198
|
]), 1032, ["baseServerURL", "layout", "parsedSpec", "proxy", "servers"])
|
|
200
199
|
]),
|
|
201
|
-
e.$slots.footer ? (
|
|
200
|
+
e.$slots.footer ? (v(), S("div", Me, [
|
|
202
201
|
l(e.$slots, "footer", d(c(s.value)), void 0, !0)
|
|
203
|
-
])) :
|
|
204
|
-
], 64)) :
|
|
205
|
-
|
|
202
|
+
])) : w("", !0)
|
|
203
|
+
], 64)) : w("", !0),
|
|
204
|
+
f(fe, {
|
|
206
205
|
proxyUrl: e.configuration.proxy,
|
|
207
206
|
spec: e.configuration.spec
|
|
208
207
|
}, null, 8, ["proxyUrl", "spec"])
|
|
209
208
|
], 38),
|
|
210
|
-
|
|
209
|
+
f(u(de))
|
|
211
210
|
], 64);
|
|
212
211
|
};
|
|
213
212
|
}
|
|
214
213
|
});
|
|
215
214
|
export {
|
|
216
|
-
|
|
215
|
+
xe as default
|
|
217
216
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerUrlSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerUrlSelect.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServerUrlSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/features/BaseUrl/ServerUrlSelect.vue"],"names":[],"mappings":"AAwFA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;;;;;;;;;;;;;;AAoIrC,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./ServerUrlSelect.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ r(e, [["__scopeId", "data-v-2e6e9857"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|