@scalar/api-reference 1.24.46 → 1.24.48
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 +26 -0
- package/dist/browser/standalone.js +9215 -9242
- 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 +24 -21
- package/dist/components/Content/Operation/OperationAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/OperationAccordion.vue.js +2 -2
- 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 +9 -9
- package/dist/components/SearchButton.vue.d.ts.map +1 -1
- package/dist/components/SearchButton.vue.js +2 -2
- package/dist/components/SearchButton.vue2.js +10 -9
- package/dist/components/SearchModal.vue.js +2 -2
- package/dist/components/SearchModal.vue2.js +36 -36
- package/dist/components/Sidebar/Sidebar.vue.d.ts +3 -2
- 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 +29 -27
- package/dist/helpers/getModels.d.ts.map +1 -1
- package/dist/helpers/getModels.js +13 -7
- package/dist/hooks/useSidebar.d.ts +9 -4
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +123 -122
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -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":"AAgiBA,OAAO,EAAE,KAAK,OAAO,EAAkB,MAAM,gBAAgB,CAAA;AAwB7D,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAwNjB,iBAAS,cAAc;oBA5Le,kBAAkB,KAAK,GAAG;oBAA1B,kBAAkB,KAAK,GAAG;oBAA1B,kBAAkB,KAAK,GAAG;6BAA1B,kBAAkB,KAAK,GAAG;2BAA1B,kBAAkB,KAAK,GAAG;6BAA1B,kBAAkB,KAAK,GAAG;2BAA1B,kBAAkB,KAAK,GAAG;;oBAA1B,kBAAkB,KAAK,GAAG;oBAA1B,kBAAkB,KAAK,GAAG;oBAA1B,kBAAkB,KAAK,GAAG;6BAA1B,kBAAkB,KAAK,GAAG;2BAA1B,kBAAkB,KAAK,GAAG;6BAA1B,kBAAkB,KAAK,GAAG;2BAA1B,kBAAkB,KAAK,GAAG;EA6d/D;AACD,QAAA,MAAM,eAAe;;YA9eqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;UAqf9D,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;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 a = /* @__PURE__ */
|
|
4
|
+
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4e8b0896"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as X, ref as h, onMounted as B, onBeforeMount as D, computed as b, watch as Z, onServerPrefetch as _, useSSRContext as x, getCurrentInstance as ee, provide as F, openBlock as v, createElementBlock as S, Fragment as M, createElementVNode as i, normalizeClass as oe, unref as u, normalizeStyle as te, renderSlot as l, normalizeProps as d, guardReactiveProps as c, createVNode as f, withCtx as
|
|
1
|
+
import { defineComponent as X, ref as h, onMounted as B, onBeforeMount as D, computed as b, watch as Z, onServerPrefetch as _, useSSRContext as x, getCurrentInstance as ee, provide as F, openBlock as v, createElementBlock as S, Fragment as M, createElementVNode as i, normalizeClass as oe, unref as u, normalizeStyle as te, renderSlot as l, normalizeProps as d, guardReactiveProps as c, createVNode as f, withCtx as g, createCommentVNode as w, withDirectives as re, vShow as ae, createSlots as ne } from "vue";
|
|
2
2
|
import { provideUseId as se } from "@headlessui/vue";
|
|
3
3
|
import { addScalarClassesToHeadless as ie } from "@scalar/components";
|
|
4
4
|
import { defaultStateFactory as P } from "@scalar/oas-utils/helpers";
|
|
5
5
|
import { getThemeStyles as le } from "@scalar/themes";
|
|
6
6
|
import { useToasts as de, ScalarToasts as ce } from "@scalar/use-toasts";
|
|
7
7
|
import { useMediaQuery as ue, useResizeObserver as pe, useDebounceFn as fe } from "@vueuse/core";
|
|
8
|
-
import
|
|
8
|
+
import ge from "./ApiClientModal.vue.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import
|
|
10
|
+
import me from "./GettingStarted.vue.js";
|
|
11
11
|
import { downloadSpecBus as ve, downloadSpecFile as Se } from "../helpers/specDownloads.js";
|
|
12
12
|
import { useDeprecationWarnings as he } from "../hooks/useDeprecationWarnings.js";
|
|
13
13
|
import be from "./Sidebar/Sidebar.vue.js";
|
|
14
14
|
import we from "./Content/Content.vue.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { useSidebar as ye } from "../hooks/useSidebar.js";
|
|
16
|
+
import { GLOBAL_SECURITY_SYMBOL as Te, HIDE_DOWNLOAD_BUTTON_SYMBOL as Re } from "../helpers/provideSymbols.js";
|
|
17
17
|
import { useNavState as $e } from "../hooks/useNavState.js";
|
|
18
18
|
import { scrollToId as Ce } from "../helpers/scrollToId.js";
|
|
19
19
|
import { sleep as Ie } from "../helpers/sleep.js";
|
|
@@ -50,13 +50,13 @@ const Le = ["innerHTML"], Ee = { class: "references-header" }, ke = {
|
|
|
50
50
|
});
|
|
51
51
|
const {
|
|
52
52
|
breadcrumb: Y,
|
|
53
|
-
collapsedSidebarItems:
|
|
53
|
+
collapsedSidebarItems: m,
|
|
54
54
|
isSidebarOpen: V,
|
|
55
55
|
setCollapsedSidebarItem: T,
|
|
56
56
|
hideModels: G,
|
|
57
57
|
defaultOpenAllTags: W,
|
|
58
58
|
setParsedSpec: j
|
|
59
|
-
} =
|
|
59
|
+
} = ye(), {
|
|
60
60
|
getPathRoutingId: R,
|
|
61
61
|
getSectionId: K,
|
|
62
62
|
getTagId: Q,
|
|
@@ -92,15 +92,15 @@ const Le = ["innerHTML"], Ee = { class: "references-header" }, ke = {
|
|
|
92
92
|
if (e && (e.payload || (e.payload = { data: P() }), (o = e.payload).data || (o.data = P()), t.configuration.pathRouting)) {
|
|
93
93
|
const r = R(e.url);
|
|
94
94
|
$.value = r, e.payload.data.hash = r;
|
|
95
|
-
for (const n in
|
|
96
|
-
Object.hasOwn(
|
|
95
|
+
for (const n in m)
|
|
96
|
+
Object.hasOwn(m, n) && delete m[n];
|
|
97
97
|
if (r)
|
|
98
98
|
T(K(r), !0);
|
|
99
99
|
else {
|
|
100
100
|
const n = (a = t.parsedSpec.tags) == null ? void 0 : a[0];
|
|
101
101
|
n && T(Q(n), !0);
|
|
102
102
|
}
|
|
103
|
-
e.payload.data["useSidebarContent-collapsedSidebarItems"] =
|
|
103
|
+
e.payload.data["useSidebarContent-collapsedSidebarItems"] = m;
|
|
104
104
|
}
|
|
105
105
|
}), se(() => {
|
|
106
106
|
var r;
|
|
@@ -108,8 +108,8 @@ const Le = ["innerHTML"], Ee = { class: "references-header" }, ke = {
|
|
|
108
108
|
if (!e) return o;
|
|
109
109
|
let a = e.uid;
|
|
110
110
|
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
|
-
}), F(
|
|
112
|
-
|
|
111
|
+
}), F(Te, () => t.parsedSpec.security), F(
|
|
112
|
+
Re,
|
|
113
113
|
() => t.configuration.hideDownloadButton
|
|
114
114
|
), G.value = t.configuration.hideModels ?? !1, W.value = t.configuration.defaultOpenAllTags ?? !1, he(t.configuration);
|
|
115
115
|
const J = b(
|
|
@@ -145,15 +145,18 @@ const Le = ["innerHTML"], Ee = { class: "references-header" }, ke = {
|
|
|
145
145
|
]),
|
|
146
146
|
e.configuration.showSidebar ? (v(), S("aside", ke, [
|
|
147
147
|
i("div", Oe, [
|
|
148
|
-
f(u(be), {
|
|
149
|
-
|
|
148
|
+
f(u(be), {
|
|
149
|
+
parsedSpec: e.parsedSpec,
|
|
150
|
+
tagsSorter: e.configuration.tagsSorter
|
|
151
|
+
}, {
|
|
152
|
+
"sidebar-start": g(() => [
|
|
150
153
|
l(e.$slots, "sidebar-start", d(c(s.value)), void 0, !0)
|
|
151
154
|
]),
|
|
152
|
-
"sidebar-end":
|
|
155
|
+
"sidebar-end": g(() => [
|
|
153
156
|
l(e.$slots, "sidebar-end", d(c(s.value)), void 0, !0)
|
|
154
157
|
]),
|
|
155
158
|
_: 3
|
|
156
|
-
}, 8, ["parsedSpec"])
|
|
159
|
+
}, 8, ["parsedSpec", "tagsSorter"])
|
|
157
160
|
])
|
|
158
161
|
])) : w("", !0),
|
|
159
162
|
re(i("div", Be, [
|
|
@@ -172,20 +175,20 @@ const Le = ["innerHTML"], Ee = { class: "references-header" }, ke = {
|
|
|
172
175
|
proxy: e.configuration.proxy,
|
|
173
176
|
servers: e.configuration.servers
|
|
174
177
|
}, ne({
|
|
175
|
-
start:
|
|
178
|
+
start: g(() => [
|
|
176
179
|
l(e.$slots, "content-start", d(c(s.value)), void 0, !0)
|
|
177
180
|
]),
|
|
178
|
-
end:
|
|
181
|
+
end: g(() => [
|
|
179
182
|
l(e.$slots, "content-end", d(c(s.value)), void 0, !0)
|
|
180
183
|
]),
|
|
181
184
|
_: 2
|
|
182
185
|
}, [
|
|
183
186
|
(a = e.configuration) != null && a.isEditable ? {
|
|
184
187
|
name: "empty-state",
|
|
185
|
-
fn:
|
|
188
|
+
fn: g(() => {
|
|
186
189
|
var r;
|
|
187
190
|
return [
|
|
188
|
-
f(
|
|
191
|
+
f(me, {
|
|
189
192
|
theme: ((r = e.configuration) == null ? void 0 : r.theme) || "default",
|
|
190
193
|
onChangeTheme: o[0] || (o[0] = (n) => e.$emit("changeTheme", n)),
|
|
191
194
|
onLinkSwaggerFile: o[1] || (o[1] = (n) => e.$emit("linkSwaggerFile")),
|
|
@@ -202,7 +205,7 @@ const Le = ["innerHTML"], Ee = { class: "references-header" }, ke = {
|
|
|
202
205
|
l(e.$slots, "footer", d(c(s.value)), void 0, !0)
|
|
203
206
|
])) : w("", !0)
|
|
204
207
|
], 64)) : w("", !0),
|
|
205
|
-
f(
|
|
208
|
+
f(ge, {
|
|
206
209
|
proxyUrl: e.configuration.proxy,
|
|
207
210
|
spec: e.configuration.spec
|
|
208
211
|
}, null, 8, ["proxyUrl", "spec"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationAccordion.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/OperationAccordion.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationAccordion.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/OperationAccordion.vue"],"names":[],"mappings":"AAoNA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;;SAetD,MAAM;eACA,oBAAoB;;SAD1B,MAAM;eACA,oBAAoB;;AAkQjC,wBAMG;AAOH,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
1
|
import o from "./OperationAccordion.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-bdb5d19b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/TestRequestButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/TestRequestButton.vue"],"names":[],"mappings":"AAkEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;;eAOhD,oBAAoB;;eAApB,oBAAoB;;AAyEjC,wBAMG;AAOH,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
1
|
import t from "./TestRequestButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-8620cd40"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as n, openBlock as r, createElementBlock as s, withModifiers as
|
|
1
|
+
import { defineComponent as n, openBlock as r, createElementBlock as s, withModifiers as i, unref as p, createVNode as a, pushScopeId as c, popScopeId as m, createElementVNode as d } from "vue";
|
|
2
2
|
import { ScalarIcon as u } from "@scalar/components";
|
|
3
3
|
import { apiClientBus as l } from "../../api-client-bus.js";
|
|
4
|
-
const h = (
|
|
4
|
+
const h = (t) => (c("data-v-8620cd40"), t = t(), m(), t), f = ["method"], _ = /* @__PURE__ */ h(() => /* @__PURE__ */ d("span", null, "Test Request", -1)), V = /* @__PURE__ */ n({
|
|
5
5
|
__name: "TestRequestButton",
|
|
6
6
|
props: {
|
|
7
7
|
operation: {}
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
return (
|
|
9
|
+
setup(t) {
|
|
10
|
+
return (e, o) => (r(), s("button", {
|
|
11
11
|
class: "show-api-client-button",
|
|
12
|
-
method:
|
|
12
|
+
method: e.operation.httpVerb,
|
|
13
13
|
type: "button",
|
|
14
|
-
onClick: o[0] || (o[0] =
|
|
14
|
+
onClick: o[0] || (o[0] = i((b) => p(l).emit({
|
|
15
15
|
open: {
|
|
16
|
-
path:
|
|
17
|
-
method:
|
|
16
|
+
path: e.operation.path,
|
|
17
|
+
method: e.operation.httpVerb
|
|
18
18
|
}
|
|
19
19
|
}), ["stop"]))
|
|
20
20
|
}, [
|
|
21
|
-
|
|
21
|
+
a(p(u), {
|
|
22
22
|
icon: "Play",
|
|
23
23
|
size: "sm"
|
|
24
24
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/SearchButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/SearchButton.vue"],"names":[],"mappings":"AAkIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;;UAWnC,IAAI;mBACK,MAAM;;;;UADf,IAAI;mBACK,MAAM;;;;kBAAN,MAAM;;AA+HzB,wBAMG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,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
1
|
import o from "./SearchButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-45e2b1ac"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as m, ref as u, onMounted as S, openBlock as f, createElementBlock as y, Fragment as _, createElementVNode as t, normalizeClass as
|
|
1
|
+
import { defineComponent as m, ref as u, onMounted as S, openBlock as f, createElementBlock as y, Fragment as _, createElementVNode as t, normalizeClass as b, unref as a, createVNode as p, toDisplayString as i, pushScopeId as k, popScopeId as v } from "vue";
|
|
2
2
|
import { useModal as K, ScalarIcon as M } from "@scalar/components";
|
|
3
3
|
import { isMacOS as r } from "@scalar/use-tooltip";
|
|
4
4
|
import { useMagicKeys as w, whenever as g } from "@vueuse/core";
|
|
5
5
|
import B from "./SearchModal.vue.js";
|
|
6
6
|
import { modalStateBus as C } from "./api-client-bus.js";
|
|
7
|
-
const H = (
|
|
7
|
+
const H = (o) => (k("data-v-45e2b1ac"), o = o(), v(), o), I = { class: "sidebar-search-input" }, E = /* @__PURE__ */ H(() => /* @__PURE__ */ t("span", { class: "sidebar-search-placeholder" }, "Search", -1)), $ = { class: "sidebar-search-shortcut" }, z = { class: "sidebar-search-key" }, j = /* @__PURE__ */ m({
|
|
8
8
|
__name: "SearchButton",
|
|
9
9
|
props: {
|
|
10
10
|
spec: {},
|
|
11
11
|
searchHotKey: { default: "k" }
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const c =
|
|
13
|
+
setup(o) {
|
|
14
|
+
const c = o, s = K(), n = u(null), d = w({
|
|
15
15
|
passive: !1,
|
|
16
16
|
onEventFired(e) {
|
|
17
17
|
!r() && e.ctrlKey && e.key === c.searchHotKey && (e.preventDefault(), e.stopPropagation());
|
|
@@ -25,19 +25,20 @@ const H = (s) => (b("data-v-37498e26"), s = s(), k(), s), I = { class: "sidebar-
|
|
|
25
25
|
d[`${r() ? "meta" : "control"}_${c.searchHotKey}`],
|
|
26
26
|
() => {
|
|
27
27
|
var e;
|
|
28
|
-
(e = n.value) != null && e.open || (
|
|
28
|
+
(e = n.value) != null && e.open || (s.open ? s.hide() : s.show());
|
|
29
29
|
}
|
|
30
30
|
), (e, l) => (f(), y(_, null, [
|
|
31
31
|
t("button", {
|
|
32
|
-
class:
|
|
32
|
+
class: b(["sidebar-search", e.$attrs.class]),
|
|
33
33
|
type: "button",
|
|
34
34
|
onClick: l[0] || (l[0] = //@ts-ignore
|
|
35
|
-
(...h) => a(
|
|
35
|
+
(...h) => a(s).show && a(s).show(...h))
|
|
36
36
|
}, [
|
|
37
37
|
p(a(M), {
|
|
38
38
|
class: "search-icon",
|
|
39
39
|
icon: "Search",
|
|
40
|
-
size: "sm"
|
|
40
|
+
size: "sm",
|
|
41
|
+
thickness: "2.5"
|
|
41
42
|
}),
|
|
42
43
|
t("div", I, [
|
|
43
44
|
E,
|
|
@@ -47,7 +48,7 @@ const H = (s) => (b("data-v-37498e26"), s = s(), k(), s), I = { class: "sidebar-
|
|
|
47
48
|
])
|
|
48
49
|
], 2),
|
|
49
50
|
p(B, {
|
|
50
|
-
modalState: a(
|
|
51
|
+
modalState: a(s),
|
|
51
52
|
parsedSpec: e.spec
|
|
52
53
|
}, null, 8, ["modalState", "parsedSpec"])
|
|
53
54
|
], 64));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SearchModal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-241cc7e9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as ee, toRef as te, ref as m, computed as q, watch as U, openBlock as E, createBlock as
|
|
2
|
-
import { ScalarModal as
|
|
1
|
+
import { defineComponent as ee, toRef as te, ref as m, computed as q, watch as U, openBlock as E, createBlock as H, unref as S, withCtx as n, createElementVNode as w, createVNode as V, createTextVNode as g, toDisplayString as b, createElementBlock as oe, Fragment as ae, renderList as le, createSlots as re, pushScopeId as se, popScopeId as ce } from "vue";
|
|
2
|
+
import { ScalarModal as ne, ScalarSearchInput as ie, ScalarSearchResultList as de, ScalarSearchResultItem as ue } from "@scalar/components";
|
|
3
3
|
import { useMagicKeys as pe, whenever as _ } from "@vueuse/core";
|
|
4
4
|
import he from "fuse.js";
|
|
5
5
|
import { extractRequestBody as me } from "../helpers/specHelpers.js";
|
|
@@ -9,19 +9,19 @@ import { getHeadingsFromMarkdown as Se } from "../helpers/getHeadingsFromMarkdow
|
|
|
9
9
|
import { useOperation as ge } from "../hooks/useOperation.js";
|
|
10
10
|
import { getModels as be } from "../helpers/getModels.js";
|
|
11
11
|
import { useNavState as we } from "../hooks/useNavState.js";
|
|
12
|
-
const ke = (d) => (se("data-v-
|
|
12
|
+
const ke = (d) => (se("data-v-241cc7e9"), d = d(), ce(), d), ye = /* @__PURE__ */ ke(() => /* @__PURE__ */ w("div", { class: "ref-search-meta" }, [
|
|
13
13
|
/* @__PURE__ */ w("span", null, "↑↓ Navigate"),
|
|
14
14
|
/* @__PURE__ */ w("span", null, "⏎ Select")
|
|
15
|
-
], -1)),
|
|
15
|
+
], -1)), Ne = /* @__PURE__ */ ee({
|
|
16
16
|
__name: "SearchModal",
|
|
17
17
|
props: {
|
|
18
18
|
parsedSpec: {},
|
|
19
19
|
modalState: {}
|
|
20
20
|
},
|
|
21
21
|
setup(d) {
|
|
22
|
-
const l = d,
|
|
22
|
+
const l = d, j = te(l, "parsedSpec"), A = {
|
|
23
23
|
heading: "DocsPage",
|
|
24
|
-
model: "
|
|
24
|
+
model: "Brackets",
|
|
25
25
|
req: "Terminal",
|
|
26
26
|
tag: "CodeFolder",
|
|
27
27
|
webhook: "Terminal"
|
|
@@ -31,26 +31,26 @@ const ke = (d) => (se("data-v-0250b3fc"), d = d(), ne(), d), ye = /* @__PURE__ *
|
|
|
31
31
|
s.value = 0, y.value = I.search(i.value);
|
|
32
32
|
}, f = q(
|
|
33
33
|
() => u.value[s.value]
|
|
34
|
-
), { getHeadingId: P, getWebhookId:
|
|
34
|
+
), { getHeadingId: P, getWebhookId: K, getModelId: Y, getOperationId: z, getTagId: G } = we();
|
|
35
35
|
U(
|
|
36
36
|
() => l.modalState.open,
|
|
37
37
|
(o) => {
|
|
38
38
|
o && (i.value = "", s.value = 0, y.value = []);
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
|
-
const { setCollapsedSidebarItem:
|
|
41
|
+
const { setCollapsedSidebarItem: J, hideModels: Q } = ve();
|
|
42
42
|
U(
|
|
43
|
-
|
|
43
|
+
j.value,
|
|
44
44
|
async () => {
|
|
45
|
-
var M, $, F, N
|
|
46
|
-
if (r.value = [], !(($ = (M = l.parsedSpec) == null ? void 0 : M.tags) != null && $.length) && !((
|
|
45
|
+
var M, $, B, F, N;
|
|
46
|
+
if (r.value = [], !(($ = (M = l.parsedSpec) == null ? void 0 : M.tags) != null && $.length) && !((B = l.parsedSpec) != null && B.webhooks)) {
|
|
47
47
|
I.setCollection([]);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
const o = [],
|
|
51
|
-
((
|
|
50
|
+
const o = [], c = Se(
|
|
51
|
+
((F = l.parsedSpec.info) == null ? void 0 : F.description) ?? ""
|
|
52
52
|
);
|
|
53
|
-
|
|
53
|
+
c.length && (c.forEach((t) => {
|
|
54
54
|
o.push({
|
|
55
55
|
type: "heading",
|
|
56
56
|
title: `Info > ${t.value}`,
|
|
@@ -59,23 +59,23 @@ const ke = (d) => (se("data-v-0250b3fc"), d = d(), ne(), d), ye = /* @__PURE__ *
|
|
|
59
59
|
tag: t.slug,
|
|
60
60
|
body: ""
|
|
61
61
|
});
|
|
62
|
-
}), r.value = r.value.concat(o)), (
|
|
63
|
-
const
|
|
62
|
+
}), r.value = r.value.concat(o)), (N = l.parsedSpec.tags) == null || N.forEach((t) => {
|
|
63
|
+
const x = {
|
|
64
64
|
title: t["x-displayName"] ?? t.name,
|
|
65
|
-
href: `#${
|
|
65
|
+
href: `#${G(t)}`,
|
|
66
66
|
description: t.description,
|
|
67
67
|
type: "tag",
|
|
68
68
|
tag: t.name,
|
|
69
69
|
body: ""
|
|
70
70
|
};
|
|
71
|
-
r.value.push(
|
|
71
|
+
r.value.push(x), t.operations && t.operations.forEach((a) => {
|
|
72
72
|
const { parameterMap: v } = ge({ operation: a }), O = me(a) || v.value;
|
|
73
73
|
let R = null;
|
|
74
74
|
typeof O != "boolean" && (R = O);
|
|
75
75
|
const T = {
|
|
76
76
|
type: "req",
|
|
77
77
|
title: a.name ?? a.path,
|
|
78
|
-
href: `#${
|
|
78
|
+
href: `#${z(a, t)}`,
|
|
79
79
|
operationId: a.operationId,
|
|
80
80
|
description: a.description ?? "",
|
|
81
81
|
httpVerb: a.httpVerb,
|
|
@@ -95,7 +95,7 @@ const ke = (d) => (se("data-v-0250b3fc"), d = d(), ne(), d), ye = /* @__PURE__ *
|
|
|
95
95
|
p.push({
|
|
96
96
|
type: "webhook",
|
|
97
97
|
title: `Webhook: ${(v = e[t][a]) == null ? void 0 : v.name}`,
|
|
98
|
-
href: `#${
|
|
98
|
+
href: `#${K(t, a)}`,
|
|
99
99
|
description: t,
|
|
100
100
|
httpVerb: a,
|
|
101
101
|
tag: t,
|
|
@@ -108,7 +108,7 @@ const ke = (d) => (se("data-v-0250b3fc"), d = d(), ne(), d), ye = /* @__PURE__ *
|
|
|
108
108
|
D.push({
|
|
109
109
|
type: "model",
|
|
110
110
|
title: "Model",
|
|
111
|
-
href: `#${
|
|
111
|
+
href: `#${Y(t)}`,
|
|
112
112
|
description: h[t].title ?? t,
|
|
113
113
|
tag: t,
|
|
114
114
|
body: ""
|
|
@@ -136,19 +136,19 @@ const ke = (d) => (se("data-v-0250b3fc"), d = d(), ne(), d), ye = /* @__PURE__ *
|
|
|
136
136
|
item: o
|
|
137
137
|
})) : y.value
|
|
138
138
|
), X = /#(tag\/[^/]*)/, C = (o) => {
|
|
139
|
-
let
|
|
139
|
+
let c = "models";
|
|
140
140
|
const e = o.item.href.match(X);
|
|
141
|
-
e != null && e.length && e.length > 1 && (
|
|
141
|
+
e != null && e.length && e.length > 1 && (c = e[1]), J(c, !0), l.modalState.hide();
|
|
142
142
|
};
|
|
143
143
|
function Z(o) {
|
|
144
|
-
const
|
|
145
|
-
return
|
|
144
|
+
const c = new URL(window.location.href);
|
|
145
|
+
return c.hash = o, c.toString();
|
|
146
146
|
}
|
|
147
|
-
return (o,
|
|
147
|
+
return (o, c) => (E(), H(S(ne), {
|
|
148
148
|
state: o.modalState,
|
|
149
149
|
variant: "search"
|
|
150
150
|
}, {
|
|
151
|
-
default:
|
|
151
|
+
default: n(() => [
|
|
152
152
|
w("div", {
|
|
153
153
|
ref_key: "searchModalRef",
|
|
154
154
|
ref: L,
|
|
@@ -156,7 +156,7 @@ const ke = (d) => (se("data-v-0250b3fc"), d = d(), ne(), d), ye = /* @__PURE__ *
|
|
|
156
156
|
}, [
|
|
157
157
|
V(S(ie), {
|
|
158
158
|
modelValue: i.value,
|
|
159
|
-
"onUpdate:modelValue":
|
|
159
|
+
"onUpdate:modelValue": c[0] || (c[0] = (e) => i.value = e),
|
|
160
160
|
onInput: W
|
|
161
161
|
}, null, 8, ["modelValue"])
|
|
162
162
|
], 512),
|
|
@@ -164,11 +164,11 @@ const ke = (d) => (se("data-v-0250b3fc"), d = d(), ne(), d), ye = /* @__PURE__ *
|
|
|
164
164
|
class: "ref-search-results custom-scroll",
|
|
165
165
|
noResults: !u.value.length
|
|
166
166
|
}, {
|
|
167
|
-
query:
|
|
167
|
+
query: n(() => [
|
|
168
168
|
g(b(i.value), 1)
|
|
169
169
|
]),
|
|
170
|
-
default:
|
|
171
|
-
(E(!0), oe(ae, null, le(u.value, (e, p) => (E(),
|
|
170
|
+
default: n(() => [
|
|
171
|
+
(E(!0), oe(ae, null, le(u.value, (e, p) => (E(), H(S(ue), {
|
|
172
172
|
id: e.item.href,
|
|
173
173
|
key: e.refIndex,
|
|
174
174
|
active: s.value === p,
|
|
@@ -177,27 +177,27 @@ const ke = (d) => (se("data-v-0250b3fc"), d = d(), ne(), d), ye = /* @__PURE__ *
|
|
|
177
177
|
onClick: (h) => C(e),
|
|
178
178
|
onFocus: (h) => s.value = p
|
|
179
179
|
}, re({
|
|
180
|
-
default:
|
|
180
|
+
default: n(() => [
|
|
181
181
|
g(b(e.item.title) + " ", 1)
|
|
182
182
|
]),
|
|
183
183
|
_: 2
|
|
184
184
|
}, [
|
|
185
185
|
(e.item.httpVerb || e.item.path) && e.item.path !== e.item.title ? {
|
|
186
186
|
name: "description",
|
|
187
|
-
fn:
|
|
187
|
+
fn: n(() => [
|
|
188
188
|
g(b(e.item.path), 1)
|
|
189
189
|
]),
|
|
190
190
|
key: "0"
|
|
191
191
|
} : e.item.description ? {
|
|
192
192
|
name: "description",
|
|
193
|
-
fn:
|
|
193
|
+
fn: n(() => [
|
|
194
194
|
g(b(e.item.description), 1)
|
|
195
195
|
]),
|
|
196
196
|
key: "1"
|
|
197
197
|
} : void 0,
|
|
198
198
|
e.item.type === "req" ? {
|
|
199
199
|
name: "addon",
|
|
200
|
-
fn:
|
|
200
|
+
fn: n(() => [
|
|
201
201
|
V(fe, {
|
|
202
202
|
method: e.item.httpVerb ?? "get"
|
|
203
203
|
}, null, 8, ["method"])
|
|
@@ -215,5 +215,5 @@ const ke = (d) => (se("data-v-0250b3fc"), d = d(), ne(), d), ye = /* @__PURE__ *
|
|
|
215
215
|
}
|
|
216
216
|
});
|
|
217
217
|
export {
|
|
218
|
-
|
|
218
|
+
Ne as default
|
|
219
219
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { Spec } from '@scalar/oas-utils';
|
|
2
|
+
import { type TagsSorterOption } from '../../hooks';
|
|
2
3
|
declare function __VLS_template(): {
|
|
3
4
|
"sidebar-start"?(_: {}): any;
|
|
4
5
|
"sidebar-end"?(_: {}): any;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
7
8
|
parsedSpec: Spec;
|
|
8
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
9
|
+
} & TagsSorterOption>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
9
10
|
parsedSpec: Spec;
|
|
10
|
-
}>>>, {}, {}>;
|
|
11
|
+
} & TagsSorterOption>>>, {}, {}>;
|
|
11
12
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
12
13
|
export default _default;
|
|
13
14
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AAgOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAI7C,OAAO,EAAE,KAAK,gBAAgB,EAA2B,MAAM,aAAa,CAAA;AAuE5E,iBAAS,cAAc;6BA4Oc,GAAG;2BACJ,GAAG;EAuBtC;AACD,QAAA,MAAM,eAAe;gBArUL,IAAI;;gBAAJ,IAAI;gCA2UlB,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;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
1
|
import o from "./Sidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-14598096"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|