@scalar/api-reference 1.31.14 → 1.31.17
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 +35 -0
- package/README.md +4 -0
- package/dist/browser/standalone.js +6884 -6853
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +21 -21
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +32 -34
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +2 -2
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +30 -39
- package/dist/components/DocumentSelector/DocumentSelector.vue.d.ts.map +1 -1
- package/dist/components/DocumentSelector/DocumentSelector.vue.js +17 -20
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarGroup.vue.js +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +1 -1
- package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +60 -5
- package/dist/features/Search/SearchButton.vue2.js +2 -70
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +10 -10
|
@@ -1,72 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useModal as B } from "@scalar/components";
|
|
3
|
-
import { isMacOS as m } from "@scalar/helpers/general/is-mac-os";
|
|
4
|
-
import { ScalarIconMagnifyingGlass as E } from "@scalar/icons";
|
|
5
|
-
import H from "./SearchModal.vue.js";
|
|
6
|
-
import { useApiClient as L } from "../ApiClientModal/useApiClient.js";
|
|
7
|
-
const N = { class: "sidebar-search-input" }, T = { class: "sidebar-search-shortcut" }, V = { class: "sidebar-search-key" }, G = /* @__PURE__ */ S({
|
|
8
|
-
__name: "SearchButton",
|
|
9
|
-
props: {
|
|
10
|
-
spec: {},
|
|
11
|
-
searchHotKey: { default: "k" }
|
|
12
|
-
},
|
|
13
|
-
setup(f) {
|
|
14
|
-
const h = f, i = b(), s = B(), { client: y } = L(), d = (o) => {
|
|
15
|
-
var e;
|
|
16
|
-
(m() ? o.metaKey : o.ctrlKey) && o.key === h.searchHotKey && !((e = y.value) != null && e.modalState.open) && (o.preventDefault(), o.stopPropagation(), s.open ? s.hide() : s.show());
|
|
17
|
-
};
|
|
18
|
-
w(
|
|
19
|
-
() => s.open,
|
|
20
|
-
(o, e) => {
|
|
21
|
-
!o && e && v(() => {
|
|
22
|
-
var c;
|
|
23
|
-
(c = i.value) == null || c.focus();
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
), K(() => window.addEventListener("keydown", d)), g(() => window.removeEventListener("keydown", d));
|
|
27
|
-
function k() {
|
|
28
|
-
s.show();
|
|
29
|
-
}
|
|
30
|
-
return (o, e) => (n(), a(r, null, [
|
|
31
|
-
t("button", {
|
|
32
|
-
ref_key: "button",
|
|
33
|
-
ref: i,
|
|
34
|
-
class: C(["sidebar-search", o.$attrs.class]),
|
|
35
|
-
role: "search",
|
|
36
|
-
type: "button",
|
|
37
|
-
onClick: k
|
|
38
|
-
}, [
|
|
39
|
-
p(l(E), {
|
|
40
|
-
class: "scalar-search-icon",
|
|
41
|
-
weight: "bold"
|
|
42
|
-
}),
|
|
43
|
-
t("div", N, [
|
|
44
|
-
e[3] || (e[3] = t("span", { class: "sr-only" }, "Open Search", -1)),
|
|
45
|
-
e[4] || (e[4] = t("span", {
|
|
46
|
-
"aria-hidden": "true",
|
|
47
|
-
class: "sidebar-search-placeholder"
|
|
48
|
-
}, " Search ", -1)),
|
|
49
|
-
t("span", T, [
|
|
50
|
-
e[2] || (e[2] = t("span", { class: "sr-only" }, "Keyboard Shortcut:", -1)),
|
|
51
|
-
t("kbd", V, [
|
|
52
|
-
l(m)() ? (n(), a(r, { key: 0 }, [
|
|
53
|
-
u("⌘")
|
|
54
|
-
], 64)) : (n(), a(r, { key: 1 }, [
|
|
55
|
-
e[0] || (e[0] = t("span", { class: "sr-only" }, "CTRL", -1)),
|
|
56
|
-
e[1] || (e[1] = t("span", { "aria-hidden": "true" }, "⌃", -1))
|
|
57
|
-
], 64)),
|
|
58
|
-
u(" " + M(o.searchHotKey), 1)
|
|
59
|
-
])
|
|
60
|
-
])
|
|
61
|
-
])
|
|
62
|
-
], 2),
|
|
63
|
-
p(H, {
|
|
64
|
-
modalState: l(s),
|
|
65
|
-
parsedSpec: o.spec
|
|
66
|
-
}, null, 8, ["modalState", "parsedSpec"])
|
|
67
|
-
], 64));
|
|
68
|
-
}
|
|
69
|
-
});
|
|
1
|
+
import f from "./SearchButton.vue.js";
|
|
70
2
|
export {
|
|
71
|
-
|
|
3
|
+
f as default
|
|
72
4
|
};
|