@scalar/api-reference 1.28.13 → 1.28.15
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 +28 -0
- package/dist/browser/standalone.js +6710 -6674
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Card/Card.vue.d.ts.map +1 -1
- package/dist/components/Card/Card.vue.js +7 -7
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +18 -19
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +44 -35
- package/dist/components/Content/Lazy/Loading.vue.d.ts +8 -17
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +50 -44
- package/dist/components/Content/Schema/Schema.preview.d.ts +525 -0
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +1 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue2.js +86 -75
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +1 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +41 -56
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +169 -153
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +12 -0
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +70 -0
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue2.js +13 -12
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +29 -26
- 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 +42 -29
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +3 -3
- package/dist/features/Search/SearchModal.vue2.js +102 -96
- package/dist/features/Search/useSearchIndex.d.ts +2 -1
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +55 -52
- package/dist/hooks/useSidebar.d.ts +1 -0
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +131 -119
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +8 -8
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as B, computed as
|
|
1
|
+
import { defineComponent as B, computed as f, ref as b, openBlock as l, createElementBlock as u, createElementVNode as k, renderSlot as j, createVNode as a, unref as c, createCommentVNode as p } from "vue";
|
|
2
2
|
import { ScalarMarkdown as C } from "@scalar/components";
|
|
3
3
|
import E from "./ContentTypeSelect.vue.js";
|
|
4
|
-
import
|
|
4
|
+
import y from "../../../components/Content/Schema/Schema.vue.js";
|
|
5
5
|
const P = { key: 0 }, S = { class: "request-body-title" }, V = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "request-body-description"
|
|
8
8
|
}, O = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "request-body-schema"
|
|
11
|
-
},
|
|
11
|
+
}, R = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "request-body-schema"
|
|
14
|
-
},
|
|
14
|
+
}, _ = /* @__PURE__ */ B({
|
|
15
15
|
__name: "RequestBody",
|
|
16
16
|
props: {
|
|
17
17
|
requestBody: {},
|
|
@@ -19,22 +19,22 @@ const P = { key: 0 }, S = { class: "request-body-title" }, V = {
|
|
|
19
19
|
},
|
|
20
20
|
setup(i) {
|
|
21
21
|
var h;
|
|
22
|
-
const
|
|
22
|
+
const v = f(
|
|
23
23
|
() => {
|
|
24
24
|
var e;
|
|
25
25
|
return Object.keys(((e = i.requestBody) == null ? void 0 : e.content) ?? {});
|
|
26
26
|
}
|
|
27
27
|
), t = b("application/json");
|
|
28
|
-
(h = i.requestBody) != null && h.content &&
|
|
29
|
-
const d =
|
|
30
|
-
var r,
|
|
31
|
-
const e = (
|
|
28
|
+
(h = i.requestBody) != null && h.content && v.value.length > 0 && (t.value = v.value[0]);
|
|
29
|
+
const d = f(() => {
|
|
30
|
+
var r, n, q;
|
|
31
|
+
const e = (q = (n = (r = i.requestBody) == null ? void 0 : r.content) == null ? void 0 : n[t.value]) == null ? void 0 : q.schema;
|
|
32
32
|
if ((e == null ? void 0 : e.type) !== "object" || !e.properties)
|
|
33
33
|
return null;
|
|
34
34
|
const s = Object.entries(e.properties);
|
|
35
35
|
if (s.length < 13)
|
|
36
36
|
return null;
|
|
37
|
-
const { properties:
|
|
37
|
+
const { properties: m, ...o } = e;
|
|
38
38
|
return {
|
|
39
39
|
visibleProperties: {
|
|
40
40
|
...o,
|
|
@@ -47,46 +47,49 @@ const P = { key: 0 }, S = { class: "request-body-title" }, V = {
|
|
|
47
47
|
};
|
|
48
48
|
});
|
|
49
49
|
return (e, s) => {
|
|
50
|
-
var
|
|
51
|
-
return e.requestBody ? (
|
|
50
|
+
var m, o, r;
|
|
51
|
+
return e.requestBody ? (l(), u("div", P, [
|
|
52
52
|
k("div", S, [
|
|
53
53
|
j(e.$slots, "title", {}, void 0, !0),
|
|
54
|
-
|
|
54
|
+
a(E, {
|
|
55
55
|
defaultValue: t.value,
|
|
56
56
|
requestBody: e.requestBody,
|
|
57
|
-
onSelectContentType: s[0] || (s[0] = ({ contentType:
|
|
57
|
+
onSelectContentType: s[0] || (s[0] = ({ contentType: n }) => t.value = n)
|
|
58
58
|
}, null, 8, ["defaultValue", "requestBody"]),
|
|
59
|
-
e.requestBody.description ? (
|
|
60
|
-
|
|
59
|
+
e.requestBody.description ? (l(), u("div", V, [
|
|
60
|
+
a(c(C), {
|
|
61
61
|
value: e.requestBody.description
|
|
62
62
|
}, null, 8, ["value"])
|
|
63
|
-
])) :
|
|
63
|
+
])) : p("", !0)
|
|
64
64
|
]),
|
|
65
|
-
d.value ? (
|
|
66
|
-
|
|
65
|
+
d.value ? (l(), u("div", O, [
|
|
66
|
+
a(c(y), {
|
|
67
67
|
compact: "",
|
|
68
|
+
name: "Request Body",
|
|
68
69
|
noncollapsible: "",
|
|
69
70
|
schemas: e.schemas,
|
|
70
71
|
value: d.value.visibleProperties
|
|
71
72
|
}, null, 8, ["schemas", "value"]),
|
|
72
|
-
|
|
73
|
-
compact: "",
|
|
73
|
+
a(c(y), {
|
|
74
74
|
additionalProperties: "",
|
|
75
|
+
compact: "",
|
|
76
|
+
name: "Request Body",
|
|
75
77
|
schemas: e.schemas,
|
|
76
78
|
value: d.value.collapsedProperties
|
|
77
79
|
}, null, 8, ["schemas", "value"])
|
|
78
|
-
])) : (
|
|
79
|
-
|
|
80
|
+
])) : (m = e.requestBody.content) != null && m[t.value] ? (l(), u("div", R, [
|
|
81
|
+
a(c(y), {
|
|
80
82
|
compact: "",
|
|
83
|
+
name: "Request Body",
|
|
81
84
|
noncollapsible: "",
|
|
82
85
|
schemas: e.schemas,
|
|
83
86
|
value: (r = (o = e.requestBody.content) == null ? void 0 : o[t.value]) == null ? void 0 : r.schema
|
|
84
87
|
}, null, 8, ["schemas", "value"])
|
|
85
|
-
])) :
|
|
86
|
-
])) :
|
|
88
|
+
])) : p("", !0)
|
|
89
|
+
])) : p("", !0);
|
|
87
90
|
};
|
|
88
91
|
}
|
|
89
92
|
});
|
|
90
93
|
export {
|
|
91
|
-
|
|
94
|
+
_ as default
|
|
92
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchButton.vue"],"names":[],"mappings":"AAsJA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAShD,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC;;kBADe,MAAM;;AAsJzB,wBAOG"}
|
|
@@ -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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c23332bd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,60 +1,73 @@
|
|
|
1
|
-
import { defineComponent as S, onMounted as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import
|
|
4
|
-
import { isMacOs as
|
|
5
|
-
import { useApiClient as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as S, ref as b, watch as w, nextTick as v, onMounted as K, onBeforeUnmount as C, openBlock as a, createElementBlock as n, Fragment as r, createElementVNode as o, normalizeClass as B, createVNode as p, unref as l, createTextVNode as u, toDisplayString as E } from "vue";
|
|
2
|
+
import { useModal as H, ScalarIcon as M } from "@scalar/components";
|
|
3
|
+
import g from "./SearchModal.vue.js";
|
|
4
|
+
import { isMacOs as m } from "../../helpers/isMacOs.js";
|
|
5
|
+
import { useApiClient as L } from "../ApiClientModal/useApiClient.js";
|
|
6
|
+
const N = { class: "sidebar-search-input" }, T = { class: "sidebar-search-shortcut" }, V = { class: "sidebar-search-key" }, F = /* @__PURE__ */ S({
|
|
7
7
|
__name: "SearchButton",
|
|
8
8
|
props: {
|
|
9
9
|
spec: {},
|
|
10
10
|
searchHotKey: { default: "k" }
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
12
|
+
setup(h) {
|
|
13
|
+
const f = h, i = b(), t = H(), { client: y } = L(), c = (s) => {
|
|
14
14
|
var e;
|
|
15
|
-
(
|
|
15
|
+
(m() ? s.metaKey : s.ctrlKey) && s.key === f.searchHotKey && !((e = y.value) != null && e.modalState.open) && (s.preventDefault(), s.stopPropagation(), t.open ? t.hide() : t.show());
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
w(
|
|
18
|
+
() => t.open,
|
|
19
|
+
(s, e) => {
|
|
20
|
+
!s && e && v(() => {
|
|
21
|
+
var d;
|
|
22
|
+
(d = i.value) == null || d.focus();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
), K(() => window.addEventListener("keydown", c)), C(() => window.removeEventListener("keydown", c));
|
|
26
|
+
function k() {
|
|
27
|
+
t.show();
|
|
28
|
+
}
|
|
29
|
+
return (s, e) => (a(), n(r, null, [
|
|
18
30
|
o("button", {
|
|
19
|
-
|
|
31
|
+
ref_key: "button",
|
|
32
|
+
ref: i,
|
|
33
|
+
class: B(["sidebar-search", s.$attrs.class]),
|
|
20
34
|
role: "search",
|
|
21
35
|
type: "button",
|
|
22
|
-
onClick:
|
|
23
|
-
(...y) => a(t).show && a(t).show(...y))
|
|
36
|
+
onClick: k
|
|
24
37
|
}, [
|
|
25
|
-
|
|
38
|
+
p(l(M), {
|
|
26
39
|
class: "scalar-search-icon",
|
|
27
40
|
icon: "Search",
|
|
28
41
|
size: "sm",
|
|
29
42
|
thickness: "2.5"
|
|
30
43
|
}),
|
|
31
|
-
o("div",
|
|
32
|
-
e[
|
|
33
|
-
e[
|
|
44
|
+
o("div", N, [
|
|
45
|
+
e[3] || (e[3] = o("span", { class: "sr-only" }, "Open Search", -1)),
|
|
46
|
+
e[4] || (e[4] = o("span", {
|
|
34
47
|
"aria-hidden": "true",
|
|
35
48
|
class: "sidebar-search-placeholder"
|
|
36
49
|
}, " Search ", -1)),
|
|
37
|
-
o("span",
|
|
38
|
-
e[
|
|
39
|
-
o("kbd",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
], 64)) : (
|
|
43
|
-
e[
|
|
44
|
-
e[
|
|
50
|
+
o("span", T, [
|
|
51
|
+
e[2] || (e[2] = o("span", { class: "sr-only" }, "Keyboard Shortcut:", -1)),
|
|
52
|
+
o("kbd", V, [
|
|
53
|
+
l(m)() ? (a(), n(r, { key: 0 }, [
|
|
54
|
+
u("⌘")
|
|
55
|
+
], 64)) : (a(), n(r, { key: 1 }, [
|
|
56
|
+
e[0] || (e[0] = o("span", { class: "sr-only" }, "CTRL", -1)),
|
|
57
|
+
e[1] || (e[1] = o("span", { "aria-hidden": "true" }, "⌃", -1))
|
|
45
58
|
], 64)),
|
|
46
|
-
|
|
59
|
+
u(" " + E(s.searchHotKey), 1)
|
|
47
60
|
])
|
|
48
61
|
])
|
|
49
62
|
])
|
|
50
63
|
], 2),
|
|
51
|
-
|
|
52
|
-
modalState:
|
|
64
|
+
p(g, {
|
|
65
|
+
modalState: l(t),
|
|
53
66
|
parsedSpec: s.spec
|
|
54
67
|
}, null, 8, ["modalState", "parsedSpec"])
|
|
55
68
|
], 64));
|
|
56
69
|
}
|
|
57
70
|
});
|
|
58
71
|
export {
|
|
59
|
-
|
|
72
|
+
F as default
|
|
60
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchModal.vue"],"names":[],"mappings":"AAiSA,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAahD,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC;;AA6ZF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SearchModal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-05a312ab"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import { defineComponent as Y, toRef as A, ref as W, watch as
|
|
2
|
-
import { ScalarModal as Z, ScalarSearchInput as
|
|
3
|
-
import { nanoid as
|
|
1
|
+
import { defineComponent as Y, toRef as A, ref as W, watch as x, openBlock as h, createBlock as $, unref as s, withCtx as l, createElementVNode as n, createVNode as g, isRef as j, withKeys as b, withModifiers as R, createTextVNode as d, toDisplayString as c, createElementBlock as y, Fragment as E, renderList as G, createSlots as J, normalizeClass as Q, createCommentVNode as X } from "vue";
|
|
2
|
+
import { ScalarModal as Z, ScalarSearchInput as _, ScalarSearchResultList as ee, ScalarSearchResultItem as te } from "@scalar/components";
|
|
3
|
+
import { nanoid as oe } from "nanoid";
|
|
4
4
|
import { lazyBus as ae } from "../../components/Content/Lazy/lazyBus.js";
|
|
5
|
-
import
|
|
6
|
-
import { useSearchIndex as
|
|
7
|
-
import { useSidebar as
|
|
8
|
-
import { scrollToId as
|
|
9
|
-
const
|
|
5
|
+
import se from "../../components/Sidebar/SidebarHttpBadge.vue.js";
|
|
6
|
+
import { useSearchIndex as ne } from "./useSearchIndex.js";
|
|
7
|
+
import { useSidebar as re } from "../../hooks/useSidebar.js";
|
|
8
|
+
import { scrollToId as N } from "../../helpers/scrollToId.js";
|
|
9
|
+
const le = { class: "sr-only" }, ie = { class: "sr-only" }, ve = /* @__PURE__ */ Y({
|
|
10
10
|
__name: "SearchModal",
|
|
11
11
|
props: {
|
|
12
12
|
parsedSpec: {},
|
|
13
13
|
modalState: {}
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const m =
|
|
17
|
-
resetSearch:
|
|
18
|
-
fuseSearch:
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
setup(F) {
|
|
16
|
+
const m = F, q = A(m, "parsedSpec"), S = oe(), I = `${S}-search-result`, w = `${S}-search-instructions`, v = (o) => `${S}${o}`, {
|
|
17
|
+
resetSearch: D,
|
|
18
|
+
fuseSearch: L,
|
|
19
|
+
selectedSearchIndex: r,
|
|
20
|
+
selectedSearchResult: k,
|
|
21
|
+
searchResultsWithPlaceholderResults: u,
|
|
21
22
|
searchText: p
|
|
22
|
-
} =
|
|
23
|
-
specification:
|
|
24
|
-
}),
|
|
23
|
+
} = ne({
|
|
24
|
+
specification: q
|
|
25
|
+
}), M = {
|
|
25
26
|
heading: "DocsPage",
|
|
26
27
|
model: "Brackets",
|
|
27
28
|
req: "Terminal",
|
|
28
29
|
tag: "CodeFolder",
|
|
29
30
|
webhook: "Terminal"
|
|
30
|
-
},
|
|
31
|
+
}, P = {
|
|
31
32
|
heading: "Document Heading",
|
|
32
33
|
req: "Request",
|
|
33
34
|
tag: "Tag",
|
|
@@ -35,114 +36,119 @@ const ie = { class: "sr-only" }, ce = { class: "sr-only" }, ve = /* @__PURE__ */
|
|
|
35
36
|
// The title of the entry is already "Model"
|
|
36
37
|
webhook: ""
|
|
37
38
|
// The title of the entry is already "Webhook"
|
|
38
|
-
},
|
|
39
|
-
|
|
39
|
+
}, H = W(null);
|
|
40
|
+
x(
|
|
40
41
|
() => m.modalState.open,
|
|
41
42
|
(o) => {
|
|
42
|
-
o &&
|
|
43
|
+
o && D();
|
|
43
44
|
}
|
|
44
45
|
);
|
|
45
|
-
const { setCollapsedSidebarItem:
|
|
46
|
-
function
|
|
46
|
+
const { setCollapsedSidebarItem: U } = re(), K = /#(tag\/[^/]*)/;
|
|
47
|
+
function V(o) {
|
|
47
48
|
let t = "models";
|
|
48
|
-
const e = o.item.href.match(
|
|
49
|
-
e != null && e.length && e.length > 1 && (t = e[1]),
|
|
50
|
-
const
|
|
51
|
-
if (document.getElementById(
|
|
52
|
-
|
|
49
|
+
const e = o.item.href.match(K);
|
|
50
|
+
e != null && e.length && e.length > 1 && (t = e[1]), U(t, !0);
|
|
51
|
+
const a = o.item.href.replace("#", "");
|
|
52
|
+
if (document.getElementById(a))
|
|
53
|
+
N(a), m.modalState.hide();
|
|
53
54
|
else {
|
|
54
|
-
const
|
|
55
|
-
|
|
55
|
+
const i = ae.on((f) => {
|
|
56
|
+
f.id === a && (N(a), i(), m.modalState.hide());
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
x(r, (o) => {
|
|
61
|
+
var a;
|
|
62
|
+
if (typeof o != "number")
|
|
63
|
+
return;
|
|
64
|
+
const t = u.value[o], e = v(t == null ? void 0 : t.item.href);
|
|
65
|
+
(a = document.getElementById(e)) == null || a.scrollIntoView({
|
|
63
66
|
behavior: "smooth",
|
|
64
67
|
block: "nearest"
|
|
65
68
|
});
|
|
66
69
|
});
|
|
67
|
-
const
|
|
68
|
-
const o =
|
|
69
|
-
if (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const t = o === "up" ? -1 : 1, e = c.value.length, s = (l.value + t + e) % e;
|
|
75
|
-
l.value = s;
|
|
70
|
+
const B = (o) => {
|
|
71
|
+
const t = o === "up" ? -1 : 1, e = u.value.length;
|
|
72
|
+
if (typeof r.value == "number") {
|
|
73
|
+
const a = (r.value + t + e) % e;
|
|
74
|
+
r.value = a;
|
|
75
|
+
} else
|
|
76
|
+
r.value = t === -1 ? e - 1 : 0;
|
|
76
77
|
};
|
|
77
78
|
function z(o) {
|
|
78
79
|
const t = new URL(window.location.href);
|
|
79
80
|
return t.hash = o, t.toString();
|
|
80
81
|
}
|
|
81
82
|
function O() {
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
if (!r.value)
|
|
84
|
+
return;
|
|
85
|
+
const o = u.value;
|
|
86
|
+
V(o[r.value]);
|
|
84
87
|
}
|
|
85
|
-
return (o, t) => (
|
|
88
|
+
return (o, t) => (h(), $(s(Z), {
|
|
89
|
+
"aria-label": "Reference Search",
|
|
86
90
|
state: o.modalState,
|
|
87
91
|
variant: "search"
|
|
88
92
|
}, {
|
|
89
|
-
default:
|
|
90
|
-
|
|
93
|
+
default: l(() => [
|
|
94
|
+
n("div", {
|
|
91
95
|
ref_key: "searchModalRef",
|
|
92
|
-
ref:
|
|
93
|
-
"aria-label": "Reference Search",
|
|
96
|
+
ref: H,
|
|
94
97
|
class: "ref-search-container",
|
|
95
98
|
role: "search"
|
|
96
99
|
}, [
|
|
97
|
-
g(
|
|
98
|
-
modelValue:
|
|
100
|
+
g(s(_), {
|
|
101
|
+
modelValue: s(p),
|
|
99
102
|
"onUpdate:modelValue": t[0] || (t[0] = (e) => j(p) ? p.value = e : null),
|
|
100
|
-
"aria-
|
|
103
|
+
"aria-activedescendant": s(k) ? v(s(k).item.href) : void 0,
|
|
104
|
+
"aria-autocomplete": "list",
|
|
105
|
+
"aria-controls": I,
|
|
101
106
|
"aria-describedby": w,
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
role: "combobox",
|
|
108
|
+
onBlur: t[1] || (t[1] = (e) => r.value = void 0),
|
|
109
|
+
onInput: s(L),
|
|
104
110
|
onKeydown: [
|
|
105
|
-
t[
|
|
106
|
-
|
|
107
|
-
t[
|
|
111
|
+
t[2] || (t[2] = b(R((e) => B("down"), ["stop", "prevent"]), ["down"])),
|
|
112
|
+
b(R(O, ["stop", "prevent"]), ["enter"]),
|
|
113
|
+
t[3] || (t[3] = b(R((e) => B("up"), ["stop", "prevent"]), ["up"]))
|
|
108
114
|
]
|
|
109
|
-
}, null, 8, ["modelValue", "
|
|
115
|
+
}, null, 8, ["modelValue", "aria-activedescendant", "onInput", "onKeydown"])
|
|
110
116
|
], 512),
|
|
111
|
-
g(
|
|
112
|
-
id:
|
|
117
|
+
g(s(ee), {
|
|
118
|
+
id: I,
|
|
113
119
|
"aria-label": "Reference Search Results",
|
|
114
120
|
class: "ref-search-results custom-scroll",
|
|
115
|
-
noResults: !
|
|
121
|
+
noResults: !s(u).length
|
|
116
122
|
}, {
|
|
117
|
-
query:
|
|
118
|
-
d(
|
|
123
|
+
query: l(() => [
|
|
124
|
+
d(c(s(p)), 1)
|
|
119
125
|
]),
|
|
120
|
-
default:
|
|
121
|
-
(
|
|
122
|
-
id:
|
|
126
|
+
default: l(() => [
|
|
127
|
+
(h(!0), y(E, null, G(s(u), (e, a) => (h(), $(s(te), {
|
|
128
|
+
id: v(e.item.href),
|
|
123
129
|
key: e.refIndex,
|
|
124
|
-
active: n(l) === s,
|
|
125
130
|
href: z(e.item.href),
|
|
126
|
-
icon:
|
|
127
|
-
|
|
128
|
-
|
|
131
|
+
icon: M[e.item.type],
|
|
132
|
+
selected: s(r) === a,
|
|
133
|
+
onClick: (i) => V(e),
|
|
134
|
+
onFocus: (i) => r.value = a
|
|
129
135
|
}, J({
|
|
130
|
-
default:
|
|
131
|
-
var
|
|
136
|
+
default: l(() => {
|
|
137
|
+
var i, f, C, T;
|
|
132
138
|
return [
|
|
133
|
-
|
|
139
|
+
n("span", {
|
|
134
140
|
class: Q({
|
|
135
|
-
deprecated: (
|
|
141
|
+
deprecated: (f = (i = e.item.operation) == null ? void 0 : i.information) == null ? void 0 : f.deprecated
|
|
136
142
|
})
|
|
137
143
|
}, [
|
|
138
|
-
|
|
139
|
-
d(
|
|
140
|
-
(
|
|
144
|
+
n("span", le, [
|
|
145
|
+
d(c(P[e.item.type]) + ": ", 1),
|
|
146
|
+
(T = (C = e.item.operation) == null ? void 0 : C.information) != null && T.deprecated ? (h(), y(E, { key: 0 }, [
|
|
141
147
|
d(" (Deprecated) ")
|
|
142
148
|
], 64)) : X("", !0)
|
|
143
149
|
]),
|
|
144
|
-
d(" " +
|
|
145
|
-
t[
|
|
150
|
+
d(" " + c(e.item.title) + " ", 1),
|
|
151
|
+
t[4] || (t[4] = n("span", { class: "sr-only" }, ",", -1))
|
|
146
152
|
], 2)
|
|
147
153
|
];
|
|
148
154
|
}),
|
|
@@ -150,46 +156,46 @@ const ie = { class: "sr-only" }, ce = { class: "sr-only" }, ve = /* @__PURE__ */
|
|
|
150
156
|
}, [
|
|
151
157
|
e.item.type !== "webhook" && (e.item.httpVerb || e.item.path) && e.item.path !== e.item.title ? {
|
|
152
158
|
name: "description",
|
|
153
|
-
fn:
|
|
154
|
-
t[
|
|
155
|
-
d(" " +
|
|
159
|
+
fn: l(() => [
|
|
160
|
+
t[5] || (t[5] = n("span", { class: "sr-only" }, "Path: ", -1)),
|
|
161
|
+
d(" " + c(e.item.path), 1)
|
|
156
162
|
]),
|
|
157
163
|
key: "0"
|
|
158
164
|
} : e.item.description ? {
|
|
159
165
|
name: "description",
|
|
160
|
-
fn:
|
|
161
|
-
t[
|
|
162
|
-
d(" " +
|
|
166
|
+
fn: l(() => [
|
|
167
|
+
t[6] || (t[6] = n("span", { class: "sr-only" }, "Description: ", -1)),
|
|
168
|
+
d(" " + c(e.item.description), 1)
|
|
163
169
|
]),
|
|
164
170
|
key: "1"
|
|
165
171
|
} : void 0,
|
|
166
172
|
e.item.type === "req" ? {
|
|
167
173
|
name: "addon",
|
|
168
|
-
fn:
|
|
169
|
-
g(
|
|
174
|
+
fn: l(() => [
|
|
175
|
+
g(se, {
|
|
170
176
|
"aria-hidden": "true",
|
|
171
177
|
method: e.item.httpVerb ?? "get"
|
|
172
178
|
}, null, 8, ["method"]),
|
|
173
|
-
|
|
179
|
+
n("span", ie, " HTTP Method: " + c(e.item.httpVerb ?? "get") + ", ", 1)
|
|
174
180
|
]),
|
|
175
181
|
key: "2"
|
|
176
182
|
} : void 0
|
|
177
|
-
]), 1032, ["id", "
|
|
183
|
+
]), 1032, ["id", "href", "icon", "selected", "onClick", "onFocus"]))), 128))
|
|
178
184
|
]),
|
|
179
185
|
_: 1
|
|
180
186
|
}, 8, ["noResults"]),
|
|
181
|
-
|
|
187
|
+
n("div", {
|
|
182
188
|
id: w,
|
|
183
189
|
class: "ref-search-meta"
|
|
184
|
-
}, t[
|
|
185
|
-
|
|
190
|
+
}, t[7] || (t[7] = [
|
|
191
|
+
n("span", {
|
|
186
192
|
"aria-hidden": "true",
|
|
187
193
|
class: "contents"
|
|
188
194
|
}, [
|
|
189
|
-
|
|
190
|
-
|
|
195
|
+
n("span", null, "↑↓ Navigate"),
|
|
196
|
+
n("span", null, "⏎ Select")
|
|
191
197
|
], -1),
|
|
192
|
-
|
|
198
|
+
n("span", { class: "sr-only" }, " Press up arrow / down arrow to navigate, enter to select, type to filter results ", -1)
|
|
193
199
|
]))
|
|
194
200
|
]),
|
|
195
201
|
_: 1
|
|
@@ -23,7 +23,8 @@ export declare function useSearchIndex({ specification, }: {
|
|
|
23
23
|
}): {
|
|
24
24
|
resetSearch: () => void;
|
|
25
25
|
fuseSearch: () => void;
|
|
26
|
-
|
|
26
|
+
selectedSearchIndex: Ref<number | undefined, number | undefined>;
|
|
27
|
+
selectedSearchResult: import("vue").ComputedRef<FuseResult<FuseData> | undefined>;
|
|
27
28
|
searchResultsWithPlaceholderResults: import("vue").ComputedRef<FuseResult<FuseData>[]>;
|
|
28
29
|
searchText: Ref<string, string>;
|
|
29
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAIpD,OAAO,EAAE,KAAK,QAAQ,EAAyC,MAAM,aAAa,CAAA;AAElF,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CACzB;uBA0ByB,IAAI;sBAbL,IAAI
|
|
1
|
+
{"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAIpD,OAAO,EAAE,KAAK,QAAQ,EAAyC,MAAM,aAAa,CAAA;AAElF,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CACzB;uBA0ByB,IAAI;sBAbL,IAAI;;;;;EA0K5B"}
|