@scalar/api-reference 1.25.21 → 1.25.23
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 +30 -0
- package/dist/browser/standalone.js +16523 -15986
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiClientModal.vue.d.ts +2 -0
- package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/components/ApiClientModal.vue.js +13 -11
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +92 -91
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +91 -81
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/features/Search/SearchButton.vue2.js +14 -14
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +87 -74
- package/dist/features/Search/index.d.ts +0 -1
- package/dist/features/Search/index.d.ts.map +1 -1
- package/dist/index.js +98 -100
- package/dist/legacy/stores/useOpenApiStore.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +9 -9
- package/dist/features/Search/Search.vue.d.ts +0 -20
- package/dist/features/Search/Search.vue.d.ts.map +0 -1
- package/dist/features/Search/Search.vue.js +0 -18
- package/dist/features/Search/Search.vue2.js +0 -4
- package/dist/features/Search/useKeyboardNavigation.d.ts +0 -13
- package/dist/features/Search/useKeyboardNavigation.d.ts.map +0 -1
- package/dist/features/Search/useKeyboardNavigation.js +0 -30
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as Z, openBlock as l, createElementBlock as t, normalizeClass as z, createVNode as n, createSlots as H, withCtx as L, createTextVNode as M, toDisplayString as i, unref as h, createCommentVNode as r, createElementVNode as u, Fragment as s, renderList as p, createBlock as U, pushScopeId as $, popScopeId as A } from "vue";
|
|
2
|
+
import { ScalarMarkdown as k } from "@scalar/components";
|
|
3
|
+
import v from "./Schema.vue.js";
|
|
4
|
+
import G from "./SchemaPropertyHeading.vue.js";
|
|
5
|
+
const J = (d) => ($("data-v-bfe8efb1"), d = d(), A(), d), K = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "property-description"
|
|
8
|
-
},
|
|
8
|
+
}, Q = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "property-description"
|
|
11
|
-
},
|
|
11
|
+
}, W = {
|
|
12
12
|
key: 2,
|
|
13
13
|
class: "property-example custom-scroll"
|
|
14
|
-
},
|
|
14
|
+
}, X = /* @__PURE__ */ J(() => /* @__PURE__ */ u("span", { class: "property-example-label" }, "Example", -1)), Y = { class: "property-example-value" }, _ = {
|
|
15
15
|
key: 3,
|
|
16
|
+
class: "property-example custom-scroll"
|
|
17
|
+
}, x = { class: "property-example-label" }, ee = {
|
|
18
|
+
key: 4,
|
|
16
19
|
class: "property-enum"
|
|
17
|
-
},
|
|
20
|
+
}, le = {
|
|
18
21
|
key: 0,
|
|
19
22
|
class: "property-list"
|
|
20
|
-
},
|
|
23
|
+
}, te = { class: "property-heading" }, oe = { class: "property-name" }, ae = { class: "property-description" }, re = {
|
|
21
24
|
key: 1,
|
|
22
25
|
class: "property-enum-values"
|
|
23
|
-
},
|
|
24
|
-
key:
|
|
26
|
+
}, se = {
|
|
27
|
+
key: 5,
|
|
25
28
|
class: "children"
|
|
26
|
-
},
|
|
29
|
+
}, ne = {
|
|
27
30
|
key: 0,
|
|
28
31
|
class: "children"
|
|
29
|
-
},
|
|
32
|
+
}, ie = {
|
|
30
33
|
key: 0,
|
|
31
34
|
class: "property-rule"
|
|
32
|
-
},
|
|
35
|
+
}, pe = {
|
|
33
36
|
key: 1,
|
|
34
37
|
class: "property-rule"
|
|
35
|
-
},
|
|
38
|
+
}, ve = /* @__PURE__ */ Z({
|
|
36
39
|
__name: "SchemaProperty",
|
|
37
40
|
props: {
|
|
38
41
|
value: {},
|
|
@@ -44,7 +47,7 @@ const G = (d) => (M("data-v-d1d8e2ad"), d = d(), $(), d), J = {
|
|
|
44
47
|
additional: { type: Boolean }
|
|
45
48
|
},
|
|
46
49
|
setup(d) {
|
|
47
|
-
const
|
|
50
|
+
const b = {
|
|
48
51
|
integer: {
|
|
49
52
|
_default: "Integer numbers.",
|
|
50
53
|
int32: "Signed 32-bit integers (commonly used integer type).",
|
|
@@ -57,109 +60,116 @@ const G = (d) => (M("data-v-d1d8e2ad"), d = d(), $(), d), J = {
|
|
|
57
60
|
byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
|
|
58
61
|
binary: "binary data, used to describe files"
|
|
59
62
|
}
|
|
60
|
-
}, g = function(e,
|
|
61
|
-
return
|
|
62
|
-
},
|
|
63
|
-
return !e || !
|
|
64
|
-
},
|
|
65
|
-
var
|
|
66
|
-
return (e == null ? void 0 : e.enum) || ((
|
|
67
|
-
},
|
|
68
|
-
return (e,
|
|
69
|
-
var
|
|
70
|
-
return
|
|
71
|
-
class:
|
|
63
|
+
}, g = function(e, a) {
|
|
64
|
+
return a != null && a.properties || a != null && a.additionalProperties ? null : e || (a == null ? void 0 : a.description) || null;
|
|
65
|
+
}, S = function(e) {
|
|
66
|
+
return !e || !b[e.type] ? null : b[e.type][e.format || "_default"];
|
|
67
|
+
}, c = function(e) {
|
|
68
|
+
var a;
|
|
69
|
+
return (e == null ? void 0 : e.enum) || ((a = e == null ? void 0 : e.items) == null ? void 0 : a.enum) || [];
|
|
70
|
+
}, V = ["oneOf", "anyOf", "allOf", "not"];
|
|
71
|
+
return (e, a) => {
|
|
72
|
+
var B, C, E, j, w, D, I, N, O, P, q, F;
|
|
73
|
+
return l(), t("div", {
|
|
74
|
+
class: z(["property", [
|
|
72
75
|
`property--level-${e.level}`,
|
|
73
76
|
{
|
|
74
77
|
"property--compact": e.compact,
|
|
75
|
-
"property--deprecated": (
|
|
78
|
+
"property--deprecated": (B = e.value) == null ? void 0 : B.deprecated
|
|
76
79
|
}
|
|
77
80
|
]])
|
|
78
81
|
}, [
|
|
79
|
-
|
|
82
|
+
n(G, {
|
|
80
83
|
additional: e.additional,
|
|
81
|
-
enum:
|
|
84
|
+
enum: c(e.value).length > 1,
|
|
82
85
|
required: e.required,
|
|
83
86
|
value: e.value
|
|
84
|
-
},
|
|
87
|
+
}, H({ _: 2 }, [
|
|
85
88
|
e.name ? {
|
|
86
89
|
name: "name",
|
|
87
|
-
fn:
|
|
88
|
-
|
|
90
|
+
fn: L(() => [
|
|
91
|
+
M(i(e.name), 1)
|
|
89
92
|
]),
|
|
90
93
|
key: "0"
|
|
91
94
|
} : void 0
|
|
92
95
|
]), 1032, ["additional", "enum", "required", "value"]),
|
|
93
|
-
g(e.description, e.value) ? (
|
|
94
|
-
|
|
96
|
+
g(e.description, e.value) ? (l(), t("div", K, [
|
|
97
|
+
n(h(k), {
|
|
95
98
|
value: g(e.description, e.value)
|
|
96
99
|
}, null, 8, ["value"])
|
|
97
|
-
])) :
|
|
98
|
-
|
|
99
|
-
value:
|
|
100
|
+
])) : S(e.value) ? (l(), t("div", Q, [
|
|
101
|
+
n(h(k), {
|
|
102
|
+
value: S(e.value) || ""
|
|
100
103
|
}, null, 8, ["value"])
|
|
101
|
-
])) :
|
|
102
|
-
(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
])) :
|
|
106
|
-
(
|
|
107
|
-
(
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
])) : r("", !0),
|
|
105
|
+
(C = e.value) != null && C.example || (j = (E = e.value) == null ? void 0 : E.items) != null && j.example ? (l(), t("div", W, [
|
|
106
|
+
X,
|
|
107
|
+
u("code", Y, i(e.value.example || ((w = e.value) == null ? void 0 : w.items.example)), 1)
|
|
108
|
+
])) : r("", !0),
|
|
109
|
+
(D = e.value) != null && D.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), t("div", _, [
|
|
110
|
+
u("span", x, i(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
|
|
111
|
+
(l(!0), t(s, null, p(e.value.examples, (o, m) => (l(), t("code", {
|
|
112
|
+
key: m,
|
|
113
|
+
class: "property-example-value"
|
|
114
|
+
}, i(o), 1))), 128))
|
|
115
|
+
])) : r("", !0),
|
|
116
|
+
((I = c(e.value)) == null ? void 0 : I.length) > 1 ? (l(), t("div", ee, [
|
|
117
|
+
(N = e.value) != null && N["x-enumDescriptions"] ? (l(), t("div", le, [
|
|
118
|
+
(l(!0), t(s, null, p(c(e.value), (o) => (l(), t("div", {
|
|
119
|
+
key: o,
|
|
110
120
|
class: "property"
|
|
111
121
|
}, [
|
|
112
|
-
|
|
113
|
-
|
|
122
|
+
u("div", te, [
|
|
123
|
+
u("div", oe, i(o), 1)
|
|
114
124
|
]),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
value: e.value["x-enumDescriptions"][
|
|
125
|
+
u("div", ae, [
|
|
126
|
+
n(h(k), {
|
|
127
|
+
value: e.value["x-enumDescriptions"][o]
|
|
118
128
|
}, null, 8, ["value"])
|
|
119
129
|
])
|
|
120
130
|
]))), 128))
|
|
121
|
-
])) : (
|
|
122
|
-
(
|
|
123
|
-
key:
|
|
131
|
+
])) : (l(), t("ul", re, [
|
|
132
|
+
(l(!0), t(s, null, p(c(e.value), (o) => (l(), t("li", {
|
|
133
|
+
key: o,
|
|
124
134
|
class: "property-enum-value"
|
|
125
|
-
},
|
|
135
|
+
}, i(o), 1))), 128))
|
|
126
136
|
]))
|
|
127
|
-
])) :
|
|
128
|
-
((
|
|
129
|
-
|
|
137
|
+
])) : r("", !0),
|
|
138
|
+
((O = e.value) == null ? void 0 : O.type) === "object" && ((P = e.value) != null && P.properties || (q = e.value) != null && q.additionalProperties) ? (l(), t("div", se, [
|
|
139
|
+
n(v, {
|
|
130
140
|
compact: e.compact,
|
|
131
141
|
level: e.level + 1,
|
|
132
142
|
value: e.value
|
|
133
143
|
}, null, 8, ["compact", "level", "value"])
|
|
134
|
-
])) :
|
|
135
|
-
(F = e.value) != null && F.items ? (
|
|
136
|
-
["object"].includes(e.value.items.type) ? (
|
|
137
|
-
|
|
144
|
+
])) : r("", !0),
|
|
145
|
+
(F = e.value) != null && F.items ? (l(), t(s, { key: 6 }, [
|
|
146
|
+
["object"].includes(e.value.items.type) ? (l(), t("div", ne, [
|
|
147
|
+
n(v, {
|
|
138
148
|
compact: e.compact,
|
|
139
149
|
level: e.level + 1,
|
|
140
150
|
value: e.value.items
|
|
141
151
|
}, null, 8, ["compact", "level", "value"])
|
|
142
|
-
])) :
|
|
143
|
-
], 64)) :
|
|
144
|
-
(
|
|
145
|
-
var
|
|
146
|
-
return
|
|
147
|
-
(
|
|
148
|
-
(
|
|
149
|
-
key:
|
|
152
|
+
])) : r("", !0)
|
|
153
|
+
], 64)) : r("", !0),
|
|
154
|
+
(l(), t(s, null, p(V, (o) => {
|
|
155
|
+
var m, R, T;
|
|
156
|
+
return l(), t(s, { key: o }, [
|
|
157
|
+
(m = e.value) != null && m[o] ? (l(), t("div", ie, [
|
|
158
|
+
(l(!0), t(s, null, p(e.value[o], (y, f) => (l(), U(v, {
|
|
159
|
+
key: f,
|
|
150
160
|
compact: e.compact,
|
|
151
161
|
level: e.level + 1,
|
|
152
|
-
value:
|
|
162
|
+
value: y
|
|
153
163
|
}, null, 8, ["compact", "level", "value"]))), 128))
|
|
154
|
-
])) :
|
|
155
|
-
(
|
|
156
|
-
(
|
|
157
|
-
key:
|
|
164
|
+
])) : r("", !0),
|
|
165
|
+
(T = (R = e.value) == null ? void 0 : R.items) != null && T[o] && e.level < 3 ? (l(), t("div", pe, [
|
|
166
|
+
(l(!0), t(s, null, p(e.value.items[o], (y, f) => (l(), U(v, {
|
|
167
|
+
key: f,
|
|
158
168
|
compact: e.compact,
|
|
159
169
|
level: e.level + 1,
|
|
160
|
-
value:
|
|
170
|
+
value: y
|
|
161
171
|
}, null, 8, ["compact", "level", "value"]))), 128))
|
|
162
|
-
])) :
|
|
172
|
+
])) : r("", !0)
|
|
163
173
|
], 64);
|
|
164
174
|
}), 64))
|
|
165
175
|
], 2);
|
|
@@ -167,5 +177,5 @@ const G = (d) => (M("data-v-d1d8e2ad"), d = d(), $(), d), J = {
|
|
|
167
177
|
}
|
|
168
178
|
});
|
|
169
179
|
export {
|
|
170
|
-
|
|
180
|
+
ve as default
|
|
171
181
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiDocument.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/OpenApiDocument/OpenApiDocument.vue"],"names":[],"mappings":"AAgIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAUpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAS3D,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAwC,CAAA;AAC1D,QAAA,MAAM,OAAO,uCAA8B,CAAA;AAC3C,QAAA,MAAM,MAAM;;;IAAyB,CAAA;AAIrC,QAAA,MAAoB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OpenApiDocument.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/OpenApiD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vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bc475de3"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as m, ref as u, onMounted as
|
|
2
|
-
import { useModal as K, ScalarIcon as
|
|
1
|
+
import { defineComponent as m, ref as u, onMounted as S, openBlock as f, createElementBlock as y, Fragment as _, createElementVNode as a, normalizeClass as b, unref as t, createVNode as p, toDisplayString as i, pushScopeId as k, popScopeId as v } from "vue";
|
|
2
|
+
import { useModal as K, ScalarIcon as M } from "@scalar/components";
|
|
3
3
|
import { isMacOS as r } from "@scalar/use-tooltip";
|
|
4
|
-
import { useMagicKeys as
|
|
4
|
+
import { useMagicKeys as w, whenever as g } from "@vueuse/core";
|
|
5
5
|
import { modalStateBus as B } from "../../components/api-client-bus.js";
|
|
6
|
-
import C from "./
|
|
7
|
-
const H = (o) => (k("data-v-
|
|
6
|
+
import C from "./SearchModal.vue.js";
|
|
7
|
+
const H = (o) => (k("data-v-bc475de3"), o = o(), v(), o), I = { class: "sidebar-search-input" }, E = /* @__PURE__ */ H(() => /* @__PURE__ */ a("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
13
|
setup(o) {
|
|
14
|
-
const c = o, s = K(), n = u(null), d =
|
|
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());
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
return
|
|
20
|
+
return S(() => {
|
|
21
21
|
B.on((e) => {
|
|
22
22
|
n.value = e;
|
|
23
23
|
});
|
|
@@ -27,27 +27,27 @@ const H = (o) => (k("data-v-f812b614"), o = o(), v(), o), I = { class: "sidebar-
|
|
|
27
27
|
var e;
|
|
28
28
|
(e = n.value) != null && e.open || (s.open ? s.hide() : s.show());
|
|
29
29
|
}
|
|
30
|
-
), (e,
|
|
30
|
+
), (e, l) => (f(), y(_, null, [
|
|
31
31
|
a("button", {
|
|
32
32
|
class: b(["sidebar-search", e.$attrs.class]),
|
|
33
33
|
type: "button",
|
|
34
|
-
onClick:
|
|
34
|
+
onClick: l[0] || (l[0] = //@ts-ignore
|
|
35
35
|
(...h) => t(s).show && t(s).show(...h))
|
|
36
36
|
}, [
|
|
37
|
-
|
|
37
|
+
p(t(M), {
|
|
38
38
|
class: "search-icon",
|
|
39
39
|
icon: "Search",
|
|
40
40
|
size: "sm",
|
|
41
41
|
thickness: "2.5"
|
|
42
42
|
}),
|
|
43
43
|
a("div", I, [
|
|
44
|
-
|
|
45
|
-
a("span",
|
|
46
|
-
a("span", z,
|
|
44
|
+
E,
|
|
45
|
+
a("span", $, [
|
|
46
|
+
a("span", z, i(t(r)() ? "⌘" : "⌃") + i(e.searchHotKey), 1)
|
|
47
47
|
])
|
|
48
48
|
])
|
|
49
49
|
], 2),
|
|
50
|
-
|
|
50
|
+
p(C, {
|
|
51
51
|
modalState: t(s),
|
|
52
52
|
parsedSpec: e.spec
|
|
53
53
|
}, null, 8, ["modalState", "parsedSpec"])
|
|
@@ -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":"AAiNA,OAAO,EAEL,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;;gBAalC,IAAI;gBACJ,UAAU;;gBADV,IAAI;gBACJ,UAAU;;AAyWxB,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 "./SearchModal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-fc89d20d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -1,106 +1,119 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarModal as
|
|
3
|
-
import { lazyBus as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
|
|
12
|
-
], -1)), ie = /* @__PURE__ */ T({
|
|
1
|
+
import { defineComponent as $, toRef as M, ref as U, watch as k, openBlock as h, createBlock as b, unref as a, withKeys as S, withModifiers as v, withCtx as l, createElementVNode as d, createVNode as g, isRef as q, createTextVNode as I, toDisplayString as f, createElementBlock as L, Fragment as z, renderList as D, createSlots as H, normalizeClass as K, pushScopeId as P, popScopeId as O } from "vue";
|
|
2
|
+
import { ScalarModal as W, ScalarSearchInput as Y, ScalarSearchResultList as j, ScalarSearchResultItem as A } from "@scalar/components";
|
|
3
|
+
import { lazyBus as G } from "../../components/Content/Lazy/lazyBus.js";
|
|
4
|
+
import J from "../../components/Sidebar/SidebarHttpBadge.vue.js";
|
|
5
|
+
import { useSearchIndex as Q } from "./useSearchIndex.js";
|
|
6
|
+
import { useSidebar as X } from "../../hooks/useSidebar.js";
|
|
7
|
+
import { scrollToId as C } from "../../helpers/scrollToId.js";
|
|
8
|
+
const Z = (i) => (P("data-v-fc89d20d"), i = i(), O(), i), y = /* @__PURE__ */ Z(() => /* @__PURE__ */ d("div", { class: "ref-search-meta" }, [
|
|
9
|
+
/* @__PURE__ */ d("span", null, "↑↓ Navigate"),
|
|
10
|
+
/* @__PURE__ */ d("span", null, "⏎ Select")
|
|
11
|
+
], -1)), re = /* @__PURE__ */ $({
|
|
13
12
|
__name: "SearchModal",
|
|
14
13
|
props: {
|
|
15
14
|
parsedSpec: {},
|
|
16
15
|
modalState: {}
|
|
17
16
|
},
|
|
18
17
|
setup(i) {
|
|
19
|
-
const
|
|
20
|
-
resetSearch:
|
|
21
|
-
fuseSearch:
|
|
22
|
-
selectedSearchResult:
|
|
23
|
-
searchResultsWithPlaceholderResults:
|
|
24
|
-
searchText:
|
|
25
|
-
} =
|
|
26
|
-
specification:
|
|
27
|
-
})
|
|
28
|
-
G({
|
|
29
|
-
selectedSearchResult: u,
|
|
30
|
-
active: b,
|
|
31
|
-
searchResultsWithPlaceholderResults: h,
|
|
32
|
-
onSearchResultClick: I
|
|
33
|
-
});
|
|
34
|
-
const V = {
|
|
18
|
+
const m = i, V = M(m, "parsedSpec"), {
|
|
19
|
+
resetSearch: B,
|
|
20
|
+
fuseSearch: x,
|
|
21
|
+
selectedSearchResult: n,
|
|
22
|
+
searchResultsWithPlaceholderResults: c,
|
|
23
|
+
searchText: p
|
|
24
|
+
} = Q({
|
|
25
|
+
specification: V
|
|
26
|
+
}), F = {
|
|
35
27
|
heading: "DocsPage",
|
|
36
28
|
model: "Brackets",
|
|
37
29
|
req: "Terminal",
|
|
38
30
|
tag: "CodeFolder",
|
|
39
31
|
webhook: "Terminal"
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
() =>
|
|
43
|
-
(
|
|
44
|
-
|
|
32
|
+
}, N = U(null);
|
|
33
|
+
k(
|
|
34
|
+
() => m.modalState.open,
|
|
35
|
+
(o) => {
|
|
36
|
+
o && B();
|
|
45
37
|
}
|
|
46
38
|
);
|
|
47
|
-
const { setCollapsedSidebarItem:
|
|
48
|
-
function
|
|
49
|
-
let
|
|
50
|
-
const e =
|
|
51
|
-
e != null && e.length && e.length > 1 && (
|
|
52
|
-
const
|
|
53
|
-
if (document.getElementById(
|
|
54
|
-
|
|
39
|
+
const { setCollapsedSidebarItem: T } = X(), E = /#(tag\/[^/]*)/;
|
|
40
|
+
function R(o) {
|
|
41
|
+
let t = "models";
|
|
42
|
+
const e = o.item.href.match(E);
|
|
43
|
+
e != null && e.length && e.length > 1 && (t = e[1]), T(t, !0);
|
|
44
|
+
const s = o.item.href.replace("#", "");
|
|
45
|
+
if (document.getElementById(s))
|
|
46
|
+
C(s), m.modalState.hide();
|
|
55
47
|
else {
|
|
56
|
-
const
|
|
57
|
-
|
|
48
|
+
const r = G.on((u) => {
|
|
49
|
+
u.id === s && (C(s), r(), m.modalState.hide());
|
|
58
50
|
});
|
|
59
51
|
}
|
|
60
52
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
k(n, (o) => {
|
|
54
|
+
var e;
|
|
55
|
+
const t = c.value[o];
|
|
56
|
+
(e = document.getElementById(t.item.href)) == null || e.scrollIntoView({
|
|
57
|
+
behavior: "smooth",
|
|
58
|
+
block: "nearest"
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
const w = (o) => {
|
|
62
|
+
const t = o === "up" ? -1 : 1, e = c.value.length, s = (n.value + t + e) % e;
|
|
63
|
+
n.value = s;
|
|
64
|
+
};
|
|
65
|
+
function _(o) {
|
|
66
|
+
const t = new URL(window.location.href);
|
|
67
|
+
return t.hash = o, t.toString();
|
|
64
68
|
}
|
|
65
|
-
return (
|
|
66
|
-
state:
|
|
67
|
-
variant: "search"
|
|
69
|
+
return (o, t) => (h(), b(a(W), {
|
|
70
|
+
state: o.modalState,
|
|
71
|
+
variant: "search",
|
|
72
|
+
onKeydown: [
|
|
73
|
+
t[1] || (t[1] = S(v((e) => w("down"), ["stop", "prevent"]), ["down"])),
|
|
74
|
+
t[2] || (t[2] = S(v((e) => R(
|
|
75
|
+
a(c)[a(n)]
|
|
76
|
+
), ["stop", "prevent"]), ["enter"])),
|
|
77
|
+
t[3] || (t[3] = S(v((e) => w("up"), ["stop", "prevent"]), ["up"]))
|
|
78
|
+
]
|
|
68
79
|
}, {
|
|
69
80
|
default: l(() => [
|
|
70
|
-
|
|
81
|
+
d("div", {
|
|
71
82
|
ref_key: "searchModalRef",
|
|
72
|
-
ref:
|
|
83
|
+
ref: N,
|
|
73
84
|
class: "ref-search-container"
|
|
74
85
|
}, [
|
|
75
|
-
|
|
76
|
-
modelValue:
|
|
77
|
-
"onUpdate:modelValue":
|
|
78
|
-
onInput:
|
|
86
|
+
g(a(Y), {
|
|
87
|
+
modelValue: a(p),
|
|
88
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => q(p) ? p.value = e : null),
|
|
89
|
+
onInput: a(x)
|
|
79
90
|
}, null, 8, ["modelValue", "onInput"])
|
|
80
91
|
], 512),
|
|
81
|
-
|
|
92
|
+
g(a(j), {
|
|
82
93
|
class: "ref-search-results custom-scroll",
|
|
83
|
-
noResults: !
|
|
94
|
+
noResults: !a(c).length
|
|
84
95
|
}, {
|
|
85
96
|
query: l(() => [
|
|
86
|
-
|
|
97
|
+
I(f(a(p)), 1)
|
|
87
98
|
]),
|
|
88
99
|
default: l(() => [
|
|
89
|
-
(
|
|
100
|
+
(h(!0), L(z, null, D(a(c), (e, s) => (h(), b(a(A), {
|
|
90
101
|
id: e.item.href,
|
|
91
102
|
key: e.refIndex,
|
|
92
|
-
active:
|
|
93
|
-
href:
|
|
94
|
-
icon:
|
|
95
|
-
onClick: (
|
|
96
|
-
onFocus: (
|
|
97
|
-
},
|
|
103
|
+
active: a(n) === s,
|
|
104
|
+
href: _(e.item.href),
|
|
105
|
+
icon: F[e.item.type],
|
|
106
|
+
onClick: (r) => R(e),
|
|
107
|
+
onFocus: (r) => n.value = s
|
|
108
|
+
}, H({
|
|
98
109
|
default: l(() => {
|
|
99
|
-
var
|
|
110
|
+
var r, u;
|
|
100
111
|
return [
|
|
101
|
-
|
|
102
|
-
class:
|
|
103
|
-
|
|
112
|
+
d("span", {
|
|
113
|
+
class: K({
|
|
114
|
+
deprecated: (u = (r = e.item.operation) == null ? void 0 : r.information) == null ? void 0 : u.deprecated
|
|
115
|
+
})
|
|
116
|
+
}, f(e.item.title), 3)
|
|
104
117
|
];
|
|
105
118
|
}),
|
|
106
119
|
_: 2
|
|
@@ -108,20 +121,20 @@ const X = (i) => (O("data-v-06438305"), i = i(), P(), i), Z = /* @__PURE__ */ X(
|
|
|
108
121
|
(e.item.httpVerb || e.item.path) && e.item.path !== e.item.title ? {
|
|
109
122
|
name: "description",
|
|
110
123
|
fn: l(() => [
|
|
111
|
-
|
|
124
|
+
I(f(e.item.path), 1)
|
|
112
125
|
]),
|
|
113
126
|
key: "0"
|
|
114
127
|
} : e.item.description ? {
|
|
115
128
|
name: "description",
|
|
116
129
|
fn: l(() => [
|
|
117
|
-
|
|
130
|
+
I(f(e.item.description), 1)
|
|
118
131
|
]),
|
|
119
132
|
key: "1"
|
|
120
133
|
} : void 0,
|
|
121
134
|
e.item.type === "req" ? {
|
|
122
135
|
name: "addon",
|
|
123
136
|
fn: l(() => [
|
|
124
|
-
|
|
137
|
+
g(J, {
|
|
125
138
|
method: e.item.httpVerb ?? "get"
|
|
126
139
|
}, null, 8, ["method"])
|
|
127
140
|
]),
|
|
@@ -131,12 +144,12 @@ const X = (i) => (O("data-v-06438305"), i = i(), P(), i), Z = /* @__PURE__ */ X(
|
|
|
131
144
|
]),
|
|
132
145
|
_: 1
|
|
133
146
|
}, 8, ["noResults"]),
|
|
134
|
-
|
|
147
|
+
y
|
|
135
148
|
]),
|
|
136
149
|
_: 1
|
|
137
150
|
}, 8, ["state"]));
|
|
138
151
|
}
|
|
139
152
|
});
|
|
140
153
|
export {
|
|
141
|
-
|
|
154
|
+
re as default
|
|
142
155
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/Search/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/Search/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA"}
|