@scalar/api-reference 1.25.122 → 1.25.123
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 +57 -0
- package/dist/blocks/constants.d.ts.map +1 -1
- package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
- package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -1
- package/dist/browser/standalone.js +21532 -21032
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts +0 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js +2 -2
- package/dist/components/Anchor/Anchor.vue2.js +27 -23
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +135 -128
- 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.js +1 -1
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +33 -33
- package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Description.vue.js +2 -2
- package/dist/components/Content/Introduction/Description.vue2.js +7 -7
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +44 -39
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +65 -59
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +66 -52
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelsAccordion.vue.js +1 -1
- package/dist/components/Content/Models/ModelsAccordion.vue2.js +37 -31
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Tag/Endpoints.vue.d.ts +1 -0
- package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
- package/dist/components/Content/Tag/Endpoints.vue2.js +79 -52
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +2 -2
- package/dist/components/Content/Tag/Tag.vue2.js +29 -26
- package/dist/components/Content/Tag/TagAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagAccordion.vue.js +2 -2
- package/dist/components/Content/Tag/TagAccordion.vue2.js +22 -19
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.js +2 -2
- package/dist/components/GettingStarted.vue2.js +25 -25
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ClassicLayout.vue.js +6 -6
- package/dist/components/Section/SectionContainer.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainer.vue.js +1 -1
- package/dist/components/Section/SectionHeader.vue.d.ts +1 -6
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.js +1 -1
- package/dist/components/Section/SectionHeader.vue2.js +12 -16
- package/dist/components/Section/SectionHeaderTag.vue.d.ts +21 -0
- package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -0
- package/dist/components/Section/SectionHeaderTag.vue.js +7 -0
- package/dist/components/Section/SectionHeaderTag.vue2.js +18 -0
- package/dist/components/Section/index.d.ts +1 -0
- package/dist/components/Section/index.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +14 -14
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/esm.d.ts.map +1 -1
- package/dist/esm.js +1 -3
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +414 -510
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +20 -21
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +47 -47
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +5 -5
- package/dist/features/Operation/Webhooks.vue.d.ts.map +1 -1
- package/dist/features/Operation/Webhooks.vue.js +3 -3
- package/dist/features/Operation/Webhooks.vue2.js +74 -60
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +2 -2
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.js +3 -3
- package/dist/features/Operation/components/ParameterHeaders.vue2.js +8 -8
- 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 +16 -16
- 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 +26 -47
- package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +11 -11
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +80 -69
- package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +1 -1
- package/dist/features/Search/SearchButton.vue2.js +30 -18
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +1 -1
- package/dist/features/Search/SearchModal.vue2.js +104 -95
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +11 -17
- package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
- package/dist/features/TestRequestButton/TestRequestButton.vue2.js +6 -6
- package/dist/helpers/createEmptySpecification.d.ts.map +1 -1
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/helpers/getModels.d.ts.map +1 -1
- package/dist/helpers/isMacOs.d.ts.map +1 -1
- package/dist/helpers/operation.d.ts.map +1 -1
- package/dist/helpers/parse.js +62 -62
- package/dist/helpers/specDownloads.d.ts.map +1 -1
- package/dist/helpers/specHelpers.d.ts.map +1 -1
- package/dist/helpers/waitFor.d.ts.map +1 -1
- package/dist/hooks/useConfig.d.ts.map +1 -1
- package/dist/hooks/useDeprecationWarnings.d.ts.map +1 -1
- package/dist/hooks/useDeprecationWarnings.js +1 -5
- package/dist/hooks/useNavState.d.ts +1 -2
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +3 -10
- package/dist/hooks/useReactiveSpec.d.ts +8 -8
- package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
- package/dist/hooks/useReactiveSpec.js +12 -13
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +38 -48
- package/dist/index.js +1 -1
- package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +1 -1
- package/dist/legacy/helpers/normalizeRequestMethod.js +2 -6
- package/dist/legacy/types.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.d.ts +11 -0
- package/dist/standalone/lib/html-api.d.ts.map +1 -0
- package/dist/standalone/lib/html-rendering.d.ts +51 -0
- package/dist/standalone/lib/html-rendering.d.ts.map +1 -0
- package/dist/standalone/lib/html-rendering.js +54 -0
- package/dist/stores/useHttpClientStore.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +0 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +15 -14
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
|
|
1
|
+
import { defineComponent as O, useId as h, openBlock as l, createBlock as p, unref as e, withCtx as a, createVNode as r, normalizeClass as s, createTextVNode as m, toDisplayString as d, createCommentVNode as S, createElementVNode as t } from "vue";
|
|
2
|
+
import { ScalarMarkdown as b, ScalarErrorBoundary as f } from "@scalar/components";
|
|
3
|
+
import v from "../../../components/OperationPath.vue.js";
|
|
4
|
+
import { getOperationStability as u, getOperationStabilityColor as y, isOperationDeprecated as _ } from "../../../helpers/operation.js";
|
|
5
|
+
import C from "../components/OperationParameters.vue.js";
|
|
6
|
+
import g from "../components/OperationResponses.vue.js";
|
|
7
|
+
import k from "../../../components/Section/Section.vue.js";
|
|
8
|
+
import B from "../../../components/Section/SectionContent.vue.js";
|
|
9
|
+
import E from "../../../components/Badge/Badge.vue.js";
|
|
10
|
+
import N from "../../../components/Section/SectionHeader.vue.js";
|
|
11
|
+
import V from "../../../components/Anchor/Anchor.vue.js";
|
|
12
|
+
import w from "../../../components/Section/SectionHeaderTag.vue.js";
|
|
13
|
+
import I from "../../../components/Section/SectionColumns.vue.js";
|
|
14
|
+
import c from "../../../components/Section/SectionColumn.vue.js";
|
|
15
|
+
import R from "../../ExampleRequest/ExampleRequest.vue.js";
|
|
16
|
+
import T from "../../TestRequestButton/TestRequestButton.vue.js";
|
|
17
|
+
import q from "../../ExampleResponses/ExampleResponses.vue.js";
|
|
18
|
+
const D = { class: "operation-details" }, H = { class: "examples" }, oe = /* @__PURE__ */ O({
|
|
18
19
|
__name: "ModernLayout",
|
|
19
20
|
props: {
|
|
20
21
|
id: {},
|
|
@@ -24,34 +25,44 @@ const q = { class: "operation-details" }, D = { class: "examples" }, Y = /* @__P
|
|
|
24
25
|
transformedOperation: {}
|
|
25
26
|
},
|
|
26
27
|
setup(M) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const n = h();
|
|
29
|
+
return (o, $) => (l(), p(e(k), {
|
|
30
|
+
id: o.id,
|
|
31
|
+
"aria-labelledby": e(n),
|
|
32
|
+
label: o.transformedOperation.name
|
|
30
33
|
}, {
|
|
31
|
-
default:
|
|
32
|
-
r(
|
|
33
|
-
default:
|
|
34
|
-
|
|
34
|
+
default: a(() => [
|
|
35
|
+
r(e(B), null, {
|
|
36
|
+
default: a(() => [
|
|
37
|
+
e(u)(o.transformedOperation) ? (l(), p(e(E), {
|
|
35
38
|
key: 0,
|
|
36
|
-
class:
|
|
39
|
+
class: s(e(y)(o.transformedOperation))
|
|
37
40
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
|
|
41
|
+
default: a(() => [
|
|
42
|
+
m(d(e(u)(o.transformedOperation)), 1)
|
|
40
43
|
]),
|
|
41
44
|
_: 1
|
|
42
|
-
}, 8, ["class"])) :
|
|
43
|
-
|
|
44
|
-
class:
|
|
45
|
-
|
|
45
|
+
}, 8, ["class"])) : S("", !0),
|
|
46
|
+
t("div", {
|
|
47
|
+
class: s(
|
|
48
|
+
e(_)(o.transformedOperation) ? "deprecated" : ""
|
|
46
49
|
)
|
|
47
50
|
}, [
|
|
48
|
-
r(
|
|
49
|
-
default:
|
|
50
|
-
r(
|
|
51
|
-
id:
|
|
51
|
+
r(e(N), null, {
|
|
52
|
+
default: a(() => [
|
|
53
|
+
r(e(V), {
|
|
54
|
+
id: o.id ?? ""
|
|
52
55
|
}, {
|
|
53
|
-
default:
|
|
54
|
-
|
|
56
|
+
default: a(() => [
|
|
57
|
+
r(e(w), {
|
|
58
|
+
id: e(n),
|
|
59
|
+
level: 3
|
|
60
|
+
}, {
|
|
61
|
+
default: a(() => [
|
|
62
|
+
m(d(o.transformedOperation.name), 1)
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}, 8, ["id"])
|
|
55
66
|
]),
|
|
56
67
|
_: 1
|
|
57
68
|
}, 8, ["id"])
|
|
@@ -59,55 +70,55 @@ const q = { class: "operation-details" }, D = { class: "examples" }, Y = /* @__P
|
|
|
59
70
|
_: 1
|
|
60
71
|
})
|
|
61
72
|
], 2),
|
|
62
|
-
r(
|
|
63
|
-
default:
|
|
64
|
-
r(
|
|
65
|
-
default:
|
|
66
|
-
|
|
67
|
-
r(
|
|
68
|
-
value:
|
|
73
|
+
r(e(I), null, {
|
|
74
|
+
default: a(() => [
|
|
75
|
+
r(e(c), null, {
|
|
76
|
+
default: a(() => [
|
|
77
|
+
t("div", D, [
|
|
78
|
+
r(e(b), {
|
|
79
|
+
value: o.operation.description,
|
|
69
80
|
withImages: ""
|
|
70
81
|
}, null, 8, ["value"]),
|
|
71
|
-
r(
|
|
72
|
-
r(
|
|
82
|
+
r(C, { operation: o.operation }, null, 8, ["operation"]),
|
|
83
|
+
r(g, { operation: o.transformedOperation }, null, 8, ["operation"])
|
|
73
84
|
])
|
|
74
85
|
]),
|
|
75
86
|
_: 1
|
|
76
87
|
}),
|
|
77
|
-
r(
|
|
78
|
-
default:
|
|
79
|
-
|
|
80
|
-
r(
|
|
81
|
-
default:
|
|
82
|
-
r(
|
|
83
|
-
collection:
|
|
88
|
+
r(e(c), null, {
|
|
89
|
+
default: a(() => [
|
|
90
|
+
t("div", H, [
|
|
91
|
+
r(e(f), null, {
|
|
92
|
+
default: a(() => [
|
|
93
|
+
r(e(R), {
|
|
94
|
+
collection: o.collection,
|
|
84
95
|
fallback: "",
|
|
85
|
-
operation:
|
|
86
|
-
server:
|
|
87
|
-
transformedOperation:
|
|
96
|
+
operation: o.operation,
|
|
97
|
+
server: o.server,
|
|
98
|
+
transformedOperation: o.transformedOperation
|
|
88
99
|
}, {
|
|
89
|
-
header:
|
|
90
|
-
var
|
|
100
|
+
header: a(() => {
|
|
101
|
+
var i;
|
|
91
102
|
return [
|
|
92
|
-
r(
|
|
103
|
+
r(v, {
|
|
93
104
|
class: "example-path",
|
|
94
|
-
deprecated: (
|
|
95
|
-
path:
|
|
105
|
+
deprecated: (i = o.transformedOperation.information) == null ? void 0 : i.deprecated,
|
|
106
|
+
path: o.transformedOperation.path
|
|
96
107
|
}, null, 8, ["deprecated", "path"])
|
|
97
108
|
];
|
|
98
109
|
}),
|
|
99
|
-
footer:
|
|
100
|
-
r(
|
|
110
|
+
footer: a(() => [
|
|
111
|
+
r(e(T), { operation: o.operation }, null, 8, ["operation"])
|
|
101
112
|
]),
|
|
102
113
|
_: 1
|
|
103
114
|
}, 8, ["collection", "operation", "server", "transformedOperation"])
|
|
104
115
|
]),
|
|
105
116
|
_: 1
|
|
106
117
|
}),
|
|
107
|
-
r(
|
|
108
|
-
default:
|
|
109
|
-
r(
|
|
110
|
-
responses:
|
|
118
|
+
r(e(f), null, {
|
|
119
|
+
default: a(() => [
|
|
120
|
+
r(e(q), {
|
|
121
|
+
responses: o.operation.responses,
|
|
111
122
|
style: { "margin-top": "12px" }
|
|
112
123
|
}, null, 8, ["responses"])
|
|
113
124
|
]),
|
|
@@ -125,9 +136,9 @@ const q = { class: "operation-details" }, D = { class: "examples" }, Y = /* @__P
|
|
|
125
136
|
})
|
|
126
137
|
]),
|
|
127
138
|
_: 1
|
|
128
|
-
}, 8, ["id", "label"]));
|
|
139
|
+
}, 8, ["id", "aria-labelledby", "label"]));
|
|
129
140
|
}
|
|
130
141
|
});
|
|
131
142
|
export {
|
|
132
|
-
|
|
143
|
+
oe as default
|
|
133
144
|
};
|
|
@@ -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":"AAkIA,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;;AAgIzB,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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-16490ca3"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,42 +1,54 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as S, onMounted as f, onBeforeUnmount as k, openBlock as r, createElementBlock as n, Fragment as l, createElementVNode as o, normalizeClass as b, unref as a, createVNode as d, createTextVNode as p, toDisplayString as w } from "vue";
|
|
2
|
+
import { useModal as K, ScalarIcon as v } from "@scalar/components";
|
|
3
|
+
import C from "./SearchModal.vue.js";
|
|
4
4
|
import { isMacOs as c } from "../../helpers/isMacOs.js";
|
|
5
5
|
import { useApiClient as B } from "../ApiClientModal/useApiClient.js";
|
|
6
|
-
const
|
|
6
|
+
const E = { class: "sidebar-search-input" }, H = { class: "sidebar-search-shortcut" }, M = { class: "sidebar-search-key" }, D = /* @__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(m) {
|
|
13
|
+
const u = m, t = K(), { client: h } = B(), i = (s) => {
|
|
14
14
|
var e;
|
|
15
|
-
(c() ? s.metaKey : s.ctrlKey) && s.key ===
|
|
15
|
+
(c() ? s.metaKey : s.ctrlKey) && s.key === u.searchHotKey && !((e = h.value) != null && e.modalState.open) && (s.preventDefault(), s.stopPropagation(), t.open ? t.hide() : t.show());
|
|
16
16
|
};
|
|
17
|
-
return
|
|
17
|
+
return f(() => window.addEventListener("keydown", i)), k(() => window.removeEventListener("keydown", i)), (s, e) => (r(), n(l, null, [
|
|
18
18
|
o("button", {
|
|
19
19
|
class: b(["sidebar-search", s.$attrs.class]),
|
|
20
|
+
role: "search",
|
|
20
21
|
type: "button",
|
|
21
22
|
onClick: e[0] || (e[0] = //@ts-ignore
|
|
22
|
-
(...
|
|
23
|
+
(...y) => a(t).show && a(t).show(...y))
|
|
23
24
|
}, [
|
|
24
|
-
|
|
25
|
+
d(a(v), {
|
|
25
26
|
class: "scalar-search-icon",
|
|
26
27
|
icon: "Search",
|
|
27
28
|
size: "sm",
|
|
28
29
|
thickness: "2.5"
|
|
29
30
|
}),
|
|
30
|
-
o("div",
|
|
31
|
-
e[
|
|
32
|
-
e[
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
o("div", E, [
|
|
32
|
+
e[4] || (e[4] = o("span", { class: "sr-only" }, "Open Search", -1)),
|
|
33
|
+
e[5] || (e[5] = o("span", {
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
class: "sidebar-search-placeholder"
|
|
36
|
+
}, " Search ", -1)),
|
|
37
|
+
o("span", H, [
|
|
38
|
+
e[3] || (e[3] = o("span", { class: "sr-only" }, "Keyboard Shortcut:", -1)),
|
|
39
|
+
o("kbd", M, [
|
|
40
|
+
a(c)() ? (r(), n(l, { key: 0 }, [
|
|
41
|
+
p("⌘")
|
|
42
|
+
], 64)) : (r(), n(l, { key: 1 }, [
|
|
43
|
+
e[1] || (e[1] = o("span", { class: "sr-only" }, "CTRL", -1)),
|
|
44
|
+
e[2] || (e[2] = o("span", { "aria-hidden": "true" }, "⌃", -1))
|
|
45
|
+
], 64)),
|
|
46
|
+
p(" " + w(s.searchHotKey), 1)
|
|
47
|
+
])
|
|
36
48
|
])
|
|
37
49
|
])
|
|
38
50
|
], 2),
|
|
39
|
-
|
|
51
|
+
d(C, {
|
|
40
52
|
modalState: a(t),
|
|
41
53
|
parsedSpec: s.spec
|
|
42
54
|
}, null, 8, ["modalState", "parsedSpec"])
|
|
@@ -44,5 +56,5 @@ const C = { class: "sidebar-search-input" }, E = { class: "sidebar-search-shortc
|
|
|
44
56
|
}
|
|
45
57
|
});
|
|
46
58
|
export {
|
|
47
|
-
|
|
59
|
+
D as default
|
|
48
60
|
};
|
|
@@ -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":"AAmSA,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;;AAiZF,wBAOG"}
|
|
@@ -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 p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-730097d1"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,171 +1,175 @@
|
|
|
1
|
-
import { defineComponent 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 y, computed as _, openBlock as f, createBlock as B, unref as n, withCtx as i, createElementVNode as a, createVNode as g, isRef as j, withKeys as v, withModifiers as b, createTextVNode as d, toDisplayString as u, createElementBlock as N, Fragment as x, renderList as G, createSlots as J, normalizeClass as Q, createCommentVNode as X } from "vue";
|
|
2
|
+
import { ScalarModal as Z, ScalarSearchInput as ee, ScalarSearchResultList as te, ScalarSearchResultItem as oe } from "@scalar/components";
|
|
3
|
+
import { nanoid as se } from "nanoid";
|
|
4
4
|
import { lazyBus as ae } from "../../components/Content/Lazy/lazyBus.js";
|
|
5
|
-
import
|
|
5
|
+
import ne from "../../components/Sidebar/SidebarHttpBadge.vue.js";
|
|
6
6
|
import { useSearchIndex as re } from "./useSearchIndex.js";
|
|
7
|
-
import { useSidebar as
|
|
7
|
+
import { useSidebar as le } from "../../hooks/useSidebar.js";
|
|
8
8
|
import { scrollToId as E } from "../../helpers/scrollToId.js";
|
|
9
|
-
const ie = { class: "sr-only" },
|
|
9
|
+
const ie = { class: "sr-only" }, ce = { 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
|
|
17
|
-
resetSearch:
|
|
18
|
-
fuseSearch:
|
|
19
|
-
selectedSearchResult:
|
|
20
|
-
searchResultsWithPlaceholderResults:
|
|
21
|
-
searchText:
|
|
15
|
+
setup(L) {
|
|
16
|
+
const m = L, F = A(m, "parsedSpec"), S = se(), R = `${S}-search-result`, w = `${S}-search-instructions`, I = (o) => `${S}${o}`, {
|
|
17
|
+
resetSearch: P,
|
|
18
|
+
fuseSearch: q,
|
|
19
|
+
selectedSearchResult: l,
|
|
20
|
+
searchResultsWithPlaceholderResults: c,
|
|
21
|
+
searchText: p
|
|
22
22
|
} = re({
|
|
23
23
|
specification: F
|
|
24
|
-
}),
|
|
24
|
+
}), D = {
|
|
25
25
|
heading: "DocsPage",
|
|
26
26
|
model: "Brackets",
|
|
27
27
|
req: "Terminal",
|
|
28
28
|
tag: "CodeFolder",
|
|
29
29
|
webhook: "Terminal"
|
|
30
|
-
},
|
|
30
|
+
}, $ = {
|
|
31
31
|
heading: "Document Heading",
|
|
32
|
-
model: "",
|
|
33
|
-
// The title of the entry is already :"Model"
|
|
34
32
|
req: "Request",
|
|
35
33
|
tag: "Tag",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
model: "",
|
|
35
|
+
// The title of the entry is already "Model"
|
|
36
|
+
webhook: ""
|
|
37
|
+
// The title of the entry is already "Webhook"
|
|
38
|
+
}, M = W(null);
|
|
39
|
+
y(
|
|
40
|
+
() => m.modalState.open,
|
|
40
41
|
(o) => {
|
|
41
|
-
o &&
|
|
42
|
+
o && P();
|
|
42
43
|
}
|
|
43
44
|
);
|
|
44
|
-
const { setCollapsedSidebarItem: H } =
|
|
45
|
-
function
|
|
45
|
+
const { setCollapsedSidebarItem: H } = le(), U = /#(tag\/[^/]*)/;
|
|
46
|
+
function k(o) {
|
|
46
47
|
let t = "models";
|
|
47
48
|
const e = o.item.href.match(U);
|
|
48
49
|
e != null && e.length && e.length > 1 && (t = e[1]), H(t, !0);
|
|
49
|
-
const
|
|
50
|
-
if (document.getElementById(
|
|
51
|
-
E(
|
|
50
|
+
const s = o.item.href.replace("#", "");
|
|
51
|
+
if (document.getElementById(s))
|
|
52
|
+
E(s), m.modalState.hide();
|
|
52
53
|
else {
|
|
53
|
-
const
|
|
54
|
-
|
|
54
|
+
const r = ae.on((h) => {
|
|
55
|
+
h.id === s && (E(s), r(), m.modalState.hide());
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
const t =
|
|
61
|
-
(
|
|
59
|
+
y(l, (o) => {
|
|
60
|
+
var s;
|
|
61
|
+
const t = c.value[o], e = I(t == null ? void 0 : t.item.href);
|
|
62
|
+
(s = document.getElementById(e)) == null || s.scrollIntoView({
|
|
62
63
|
behavior: "smooth",
|
|
63
64
|
block: "nearest"
|
|
64
65
|
});
|
|
65
66
|
});
|
|
66
|
-
const
|
|
67
|
-
const o =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
const K = _(() => {
|
|
68
|
+
const o = c.value;
|
|
69
|
+
if (!o.length) return "No results found";
|
|
70
|
+
const t = o[l.value].item, e = p.value.length ? `${o.length} result${o.length === 1 ? "" : "s"} found, ` : "", s = t.type === "tag" ? "" : t.type === "req" ? `, HTTP Method ${t.httpVerb}, Path ${t.path}` : `, ${t.description}`, r = `${$[t.type]} ${t.title} ${s}`;
|
|
71
|
+
return `${e}Selected: ${r}`;
|
|
72
|
+
}), T = (o) => {
|
|
73
|
+
const t = o === "up" ? -1 : 1, e = c.value.length, s = (l.value + t + e) % e;
|
|
74
|
+
l.value = s;
|
|
72
75
|
};
|
|
73
|
-
function
|
|
76
|
+
function z(o) {
|
|
74
77
|
const t = new URL(window.location.href);
|
|
75
78
|
return t.hash = o, t.toString();
|
|
76
79
|
}
|
|
77
|
-
|
|
80
|
+
function O() {
|
|
81
|
+
const o = c.value;
|
|
82
|
+
k(o[l.value]);
|
|
83
|
+
}
|
|
84
|
+
return (o, t) => (f(), B(n(Z), {
|
|
78
85
|
state: o.modalState,
|
|
79
|
-
variant: "search"
|
|
80
|
-
onKeydown: [
|
|
81
|
-
t[1] || (t[1] = R(b((e) => V("down"), ["stop", "prevent"]), ["down"])),
|
|
82
|
-
t[2] || (t[2] = R(b((e) => w(
|
|
83
|
-
s(l)[s(n)]
|
|
84
|
-
), ["stop", "prevent"]), ["enter"])),
|
|
85
|
-
t[3] || (t[3] = R(b((e) => V("up"), ["stop", "prevent"]), ["up"]))
|
|
86
|
-
]
|
|
86
|
+
variant: "search"
|
|
87
87
|
}, {
|
|
88
88
|
default: i(() => [
|
|
89
|
-
|
|
89
|
+
a("div", {
|
|
90
90
|
ref_key: "searchModalRef",
|
|
91
|
-
ref:
|
|
91
|
+
ref: M,
|
|
92
92
|
"aria-label": "Reference Search",
|
|
93
93
|
class: "ref-search-container",
|
|
94
94
|
role: "search"
|
|
95
95
|
}, [
|
|
96
|
-
|
|
97
|
-
modelValue:
|
|
98
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) => j(
|
|
99
|
-
"aria-
|
|
100
|
-
"aria-
|
|
101
|
-
|
|
102
|
-
onInput:
|
|
103
|
-
|
|
96
|
+
g(n(ee), {
|
|
97
|
+
modelValue: n(p),
|
|
98
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => j(p) ? p.value = e : null),
|
|
99
|
+
"aria-controls": R,
|
|
100
|
+
"aria-describedby": w,
|
|
101
|
+
label: K.value,
|
|
102
|
+
onInput: n(q),
|
|
103
|
+
onKeydown: [
|
|
104
|
+
t[1] || (t[1] = v(b((e) => T("down"), ["stop", "prevent"]), ["down"])),
|
|
105
|
+
v(b(O, ["stop", "prevent"]), ["enter"]),
|
|
106
|
+
t[2] || (t[2] = v(b((e) => T("up"), ["stop", "prevent"]), ["up"]))
|
|
107
|
+
]
|
|
108
|
+
}, null, 8, ["modelValue", "label", "onInput", "onKeydown"])
|
|
104
109
|
], 512),
|
|
105
|
-
|
|
106
|
-
id:
|
|
107
|
-
"aria-describedby": v,
|
|
110
|
+
g(n(te), {
|
|
111
|
+
id: R,
|
|
108
112
|
"aria-label": "Reference Search Results",
|
|
109
113
|
class: "ref-search-results custom-scroll",
|
|
110
|
-
noResults: !
|
|
114
|
+
noResults: !n(c).length
|
|
111
115
|
}, {
|
|
112
116
|
query: i(() => [
|
|
113
|
-
|
|
117
|
+
d(u(n(p)), 1)
|
|
114
118
|
]),
|
|
115
119
|
default: i(() => [
|
|
116
|
-
(
|
|
117
|
-
id:
|
|
120
|
+
(f(!0), N(x, null, G(n(c), (e, s) => (f(), B(n(oe), {
|
|
121
|
+
id: I(e.item.href),
|
|
118
122
|
key: e.refIndex,
|
|
119
|
-
active:
|
|
120
|
-
href:
|
|
121
|
-
icon:
|
|
122
|
-
onClick: (
|
|
123
|
-
onFocus: (
|
|
123
|
+
active: n(l) === s,
|
|
124
|
+
href: z(e.item.href),
|
|
125
|
+
icon: D[e.item.type],
|
|
126
|
+
onClick: (r) => k(e),
|
|
127
|
+
onFocus: (r) => l.value = s
|
|
124
128
|
}, J({
|
|
125
129
|
default: i(() => {
|
|
126
|
-
var
|
|
130
|
+
var r, h, V, C;
|
|
127
131
|
return [
|
|
128
|
-
|
|
132
|
+
a("span", {
|
|
129
133
|
class: Q({
|
|
130
|
-
deprecated: (
|
|
134
|
+
deprecated: (h = (r = e.item.operation) == null ? void 0 : r.information) == null ? void 0 : h.deprecated
|
|
131
135
|
})
|
|
132
136
|
}, [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
(
|
|
136
|
-
|
|
137
|
+
a("span", ie, [
|
|
138
|
+
d(u($[e.item.type]) + ": ", 1),
|
|
139
|
+
(C = (V = e.item.operation) == null ? void 0 : V.information) != null && C.deprecated ? (f(), N(x, { key: 0 }, [
|
|
140
|
+
d(" (Deprecated) ")
|
|
137
141
|
], 64)) : X("", !0)
|
|
138
142
|
]),
|
|
139
|
-
|
|
140
|
-
t[
|
|
143
|
+
d(" " + u(e.item.title) + " ", 1),
|
|
144
|
+
t[3] || (t[3] = a("span", { class: "sr-only" }, ",", -1))
|
|
141
145
|
], 2)
|
|
142
146
|
];
|
|
143
147
|
}),
|
|
144
148
|
_: 2
|
|
145
149
|
}, [
|
|
146
|
-
(e.item.httpVerb || e.item.path) && e.item.path !== e.item.title ? {
|
|
150
|
+
e.item.type !== "webhook" && (e.item.httpVerb || e.item.path) && e.item.path !== e.item.title ? {
|
|
147
151
|
name: "description",
|
|
148
152
|
fn: i(() => [
|
|
149
|
-
t[
|
|
150
|
-
|
|
153
|
+
t[4] || (t[4] = a("span", { class: "sr-only" }, "Path: ", -1)),
|
|
154
|
+
d(" " + u(e.item.path), 1)
|
|
151
155
|
]),
|
|
152
156
|
key: "0"
|
|
153
157
|
} : e.item.description ? {
|
|
154
158
|
name: "description",
|
|
155
159
|
fn: i(() => [
|
|
156
|
-
t[
|
|
157
|
-
|
|
160
|
+
t[5] || (t[5] = a("span", { class: "sr-only" }, "Description: ", -1)),
|
|
161
|
+
d(" " + u(e.item.description), 1)
|
|
158
162
|
]),
|
|
159
163
|
key: "1"
|
|
160
164
|
} : void 0,
|
|
161
165
|
e.item.type === "req" ? {
|
|
162
166
|
name: "addon",
|
|
163
167
|
fn: i(() => [
|
|
164
|
-
|
|
168
|
+
g(ne, {
|
|
165
169
|
"aria-hidden": "true",
|
|
166
170
|
method: e.item.httpVerb ?? "get"
|
|
167
171
|
}, null, 8, ["method"]),
|
|
168
|
-
|
|
172
|
+
a("span", ce, " HTTP Method: " + u(e.item.httpVerb ?? "get") + ", ", 1)
|
|
169
173
|
]),
|
|
170
174
|
key: "2"
|
|
171
175
|
} : void 0
|
|
@@ -173,14 +177,19 @@ const ie = { class: "sr-only" }, le = { class: "sr-only" }, ve = /* @__PURE__ */
|
|
|
173
177
|
]),
|
|
174
178
|
_: 1
|
|
175
179
|
}, 8, ["noResults"]),
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
a("div", {
|
|
181
|
+
id: w,
|
|
182
|
+
class: "ref-search-meta"
|
|
183
|
+
}, t[6] || (t[6] = [
|
|
184
|
+
a("span", {
|
|
185
|
+
"aria-hidden": "true",
|
|
186
|
+
class: "contents"
|
|
187
|
+
}, [
|
|
188
|
+
a("span", null, "↑↓ Navigate"),
|
|
189
|
+
a("span", null, "⏎ Select")
|
|
190
|
+
], -1),
|
|
191
|
+
a("span", { class: "sr-only" }, " Press up arrow / down arrow to navigate, enter to select, type to filter results ", -1)
|
|
192
|
+
]))
|
|
184
193
|
]),
|
|
185
194
|
_: 1
|
|
186
195
|
}, 8, ["state"]));
|
|
@@ -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,
|
|
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;uBA2ByB,IAAI;sBAbL,IAAI;;;;EAmK5B"}
|