@scalar/api-reference 1.25.5 → 1.25.7
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 +4304 -4288
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Models/CollapsedModel.vue.d.ts +18 -0
- package/dist/components/Content/Models/CollapsedModel.vue.d.ts.map +1 -0
- package/dist/components/Content/Models/CollapsedModel.vue.js +7 -0
- package/dist/components/Content/Models/CollapsedModel.vue2.js +70 -0
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +1 -1
- package/dist/components/Content/Models/Models.vue2.js +51 -70
- package/dist/components/Content/Schema/Schema.vue.d.ts +2 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +3 -3
- package/dist/components/Content/Schema/Schema.vue2.js +32 -30
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +4 -4
- 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 +63 -58
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -6
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarModal as
|
|
3
|
-
import
|
|
4
|
-
import { useKeyboardNavigation as
|
|
5
|
-
import { useSearchIndex as
|
|
6
|
-
import { useSidebar as
|
|
7
|
-
const
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
], -1)),
|
|
1
|
+
import { defineComponent as B, toRef as R, ref as T, watch as U, openBlock as u, createBlock as k, unref as t, withCtx as r, createElementVNode as s, createVNode as h, isRef as q, createTextVNode as f, toDisplayString as d, createElementBlock as E, Fragment as L, renderList as M, createSlots as D, normalizeClass as H, pushScopeId as O, popScopeId as P } from "vue";
|
|
2
|
+
import { ScalarModal as $, ScalarSearchInput as z, ScalarSearchResultList as K, ScalarSearchResultItem as W } from "@scalar/components";
|
|
3
|
+
import Y from "../../components/Sidebar/SidebarHttpBadge.vue.js";
|
|
4
|
+
import { useKeyboardNavigation as j } from "./useKeyboardNavigation.js";
|
|
5
|
+
import { useSearchIndex as A } from "./useSearchIndex.js";
|
|
6
|
+
import { useSidebar as G } from "../../hooks/useSidebar.js";
|
|
7
|
+
const J = (l) => (O("data-v-fb0fd0be"), l = l(), P(), l), Q = /* @__PURE__ */ J(() => /* @__PURE__ */ s("div", { class: "ref-search-meta" }, [
|
|
8
|
+
/* @__PURE__ */ s("span", null, "↑↓ Navigate"),
|
|
9
|
+
/* @__PURE__ */ s("span", null, "⏎ Select")
|
|
10
|
+
], -1)), oe = /* @__PURE__ */ B({
|
|
11
11
|
__name: "SearchModal",
|
|
12
12
|
props: {
|
|
13
13
|
parsedSpec: {},
|
|
14
14
|
modalState: {}
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
resetSearch:
|
|
19
|
-
fuseSearch:
|
|
16
|
+
setup(l) {
|
|
17
|
+
const c = l, I = R(c, "parsedSpec"), _ = R(c.modalState.open), {
|
|
18
|
+
resetSearch: b,
|
|
19
|
+
fuseSearch: C,
|
|
20
20
|
selectedSearchResult: m,
|
|
21
21
|
searchResultsWithPlaceholderResults: p,
|
|
22
|
-
searchText:
|
|
23
|
-
} =
|
|
24
|
-
specification:
|
|
22
|
+
searchText: i
|
|
23
|
+
} = A({
|
|
24
|
+
specification: I
|
|
25
25
|
});
|
|
26
|
-
|
|
26
|
+
j({
|
|
27
27
|
selectedSearchResult: m,
|
|
28
|
-
active:
|
|
28
|
+
active: _,
|
|
29
29
|
searchResultsWithPlaceholderResults: p,
|
|
30
|
-
onSearchResultClick:
|
|
30
|
+
onSearchResultClick: S
|
|
31
31
|
});
|
|
32
32
|
const w = {
|
|
33
33
|
heading: "DocsPage",
|
|
@@ -35,78 +35,83 @@ const A = (r) => (D("data-v-6ee7fa31"), r = r(), H(), r), G = /* @__PURE__ */ A(
|
|
|
35
35
|
req: "Terminal",
|
|
36
36
|
tag: "CodeFolder",
|
|
37
37
|
webhook: "Terminal"
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
() =>
|
|
38
|
+
}, V = T(null);
|
|
39
|
+
U(
|
|
40
|
+
() => c.modalState.open,
|
|
41
41
|
(o) => {
|
|
42
|
-
o &&
|
|
42
|
+
o && b();
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
|
-
const { setCollapsedSidebarItem:
|
|
46
|
-
function
|
|
45
|
+
const { setCollapsedSidebarItem: N } = G(), x = /#(tag\/[^/]*)/;
|
|
46
|
+
function S(o) {
|
|
47
47
|
let a = "models";
|
|
48
|
-
const e = o.item.href.match(
|
|
49
|
-
e != null && e.length && e.length > 1 && (a = e[1]),
|
|
48
|
+
const e = o.item.href.match(x);
|
|
49
|
+
e != null && e.length && e.length > 1 && (a = e[1]), N(a, !0), c.modalState.hide();
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function F(o) {
|
|
52
52
|
const a = new URL(window.location.href);
|
|
53
53
|
return a.hash = o, a.toString();
|
|
54
54
|
}
|
|
55
|
-
return (o, a) => (u(),
|
|
55
|
+
return (o, a) => (u(), k(t($), {
|
|
56
56
|
state: o.modalState,
|
|
57
57
|
variant: "search"
|
|
58
58
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
|
|
59
|
+
default: r(() => [
|
|
60
|
+
s("div", {
|
|
61
61
|
ref_key: "searchModalRef",
|
|
62
|
-
ref:
|
|
62
|
+
ref: V,
|
|
63
63
|
class: "ref-search-container"
|
|
64
64
|
}, [
|
|
65
|
-
h(t(
|
|
66
|
-
modelValue: t(
|
|
67
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) =>
|
|
68
|
-
onInput: t(
|
|
65
|
+
h(t(z), {
|
|
66
|
+
modelValue: t(i),
|
|
67
|
+
"onUpdate:modelValue": a[0] || (a[0] = (e) => q(i) ? i.value = e : null),
|
|
68
|
+
onInput: t(C)
|
|
69
69
|
}, null, 8, ["modelValue", "onInput"])
|
|
70
70
|
], 512),
|
|
71
|
-
h(t(
|
|
71
|
+
h(t(K), {
|
|
72
72
|
class: "ref-search-results custom-scroll",
|
|
73
73
|
noResults: !t(p).length
|
|
74
74
|
}, {
|
|
75
|
-
query:
|
|
76
|
-
|
|
75
|
+
query: r(() => [
|
|
76
|
+
f(d(t(i)), 1)
|
|
77
77
|
]),
|
|
78
|
-
default:
|
|
79
|
-
(u(!0),
|
|
78
|
+
default: r(() => [
|
|
79
|
+
(u(!0), E(L, null, M(t(p), (e, g) => (u(), k(t(W), {
|
|
80
80
|
id: e.item.href,
|
|
81
81
|
key: e.refIndex,
|
|
82
|
-
active: t(m) ===
|
|
83
|
-
href:
|
|
82
|
+
active: t(m) === g,
|
|
83
|
+
href: F(e.item.href),
|
|
84
84
|
icon: w[e.item.type],
|
|
85
|
-
onClick: (
|
|
86
|
-
onFocus: (
|
|
87
|
-
},
|
|
88
|
-
default:
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
onClick: (n) => S(e),
|
|
86
|
+
onFocus: (n) => m.value = g
|
|
87
|
+
}, D({
|
|
88
|
+
default: r(() => {
|
|
89
|
+
var n, v;
|
|
90
|
+
return [
|
|
91
|
+
s("span", {
|
|
92
|
+
class: H({ deprecated: (v = (n = e.item.operation) == null ? void 0 : n.information) == null ? void 0 : v.deprecated })
|
|
93
|
+
}, d(e.item.title), 3)
|
|
94
|
+
];
|
|
95
|
+
}),
|
|
91
96
|
_: 2
|
|
92
97
|
}, [
|
|
93
98
|
(e.item.httpVerb || e.item.path) && e.item.path !== e.item.title ? {
|
|
94
99
|
name: "description",
|
|
95
|
-
fn:
|
|
96
|
-
|
|
100
|
+
fn: r(() => [
|
|
101
|
+
f(d(e.item.path), 1)
|
|
97
102
|
]),
|
|
98
103
|
key: "0"
|
|
99
104
|
} : e.item.description ? {
|
|
100
105
|
name: "description",
|
|
101
|
-
fn:
|
|
102
|
-
|
|
106
|
+
fn: r(() => [
|
|
107
|
+
f(d(e.item.description), 1)
|
|
103
108
|
]),
|
|
104
109
|
key: "1"
|
|
105
110
|
} : void 0,
|
|
106
111
|
e.item.type === "req" ? {
|
|
107
112
|
name: "addon",
|
|
108
|
-
fn:
|
|
109
|
-
h(
|
|
113
|
+
fn: r(() => [
|
|
114
|
+
h(Y, {
|
|
110
115
|
method: e.item.httpVerb ?? "get"
|
|
111
116
|
}, null, 8, ["method"])
|
|
112
117
|
]),
|
|
@@ -116,12 +121,12 @@ const A = (r) => (D("data-v-6ee7fa31"), r = r(), H(), r), G = /* @__PURE__ */ A(
|
|
|
116
121
|
]),
|
|
117
122
|
_: 1
|
|
118
123
|
}, 8, ["noResults"]),
|
|
119
|
-
|
|
124
|
+
Q
|
|
120
125
|
]),
|
|
121
126
|
_: 1
|
|
122
127
|
}, 8, ["state"]));
|
|
123
128
|
}
|
|
124
129
|
});
|
|
125
130
|
export {
|
|
126
|
-
|
|
131
|
+
oe as default
|
|
127
132
|
};
|