@scalar/api-reference 1.25.105 → 1.25.108
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 +48 -0
- package/dist/browser/standalone.js +7119 -7113
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +119 -131
- package/dist/components/Content/Introduction/Description.vue.js +1 -1
- package/dist/components/Content/Introduction/Description.vue2.js +15 -13
- 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 +12 -12
- package/dist/components/Content/Lazy/Loading.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue2.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +90 -90
- package/dist/components/Content/Tag/Endpoints.vue2.js +3 -3
- package/dist/components/Content/Tag/TagList.vue.js +3 -3
- package/dist/components/Section/CompactSection.vue2.js +4 -4
- package/dist/components/Section/Section.vue2.js +3 -3
- package/dist/components/Sidebar/Sidebar.vue2.js +3 -3
- package/dist/components/Sidebar/SidebarElement.vue2.js +6 -6
- package/dist/features/ApiClientModal/useApiClient.d.ts +8 -116
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
- package/dist/features/DownloadLink/DownloadLink.vue2.js +14 -21
- package/dist/features/Operation/Webhooks.vue.js +3 -3
- package/dist/features/Operation/Webhooks.vue2.js +9 -9
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +34 -49
- package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +34 -31
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +37 -33
- 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 +34 -34
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +12 -12
- package/dist/features/Search/useSearchIndex.js +11 -11
- 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 +21 -21
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +59 -60
- package/dist/hooks/useConfig.d.ts +6 -0
- package/dist/hooks/useConfig.d.ts.map +1 -0
- package/dist/hooks/useConfig.js +6 -0
- package/dist/hooks/useNavState.d.ts +8 -3
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +71 -59
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +149 -149
- package/dist/index.js +58 -63
- package/dist/style.css +1 -1
- package/package.json +10 -10
- package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts +0 -7
- package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts.map +0 -1
- package/dist/helpers/provideSymbols.d.ts +0 -7
- package/dist/helpers/provideSymbols.d.ts.map +0 -1
- package/dist/helpers/provideSymbols.js +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaProperty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4bf22f6a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { formatExample as
|
|
3
|
-
import { optimizeValueForDisplay as
|
|
4
|
-
import { Disclosure as
|
|
5
|
-
import { ScalarMarkdown as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as Q, computed as y, openBlock as l, createElementBlock as t, normalizeClass as $, createVNode as n, createSlots as W, withCtx as f, createTextVNode as b, toDisplayString as r, unref as i, createCommentVNode as s, createElementVNode as c, Fragment as u, renderList as d, createBlock as E } from "vue";
|
|
2
|
+
import { formatExample as X } from "./helpers/formatExample.js";
|
|
3
|
+
import { optimizeValueForDisplay as Y, discriminators as _ } from "./helpers/optimizeValueForDisplay.js";
|
|
4
|
+
import { Disclosure as x, DisclosurePanel as ee, DisclosureButton as le } from "@headlessui/vue";
|
|
5
|
+
import { ScalarMarkdown as S, ScalarIcon as te } from "@scalar/components";
|
|
6
|
+
import g from "./Schema.vue.js";
|
|
7
|
+
import ae from "./SchemaPropertyHeading.vue.js";
|
|
8
|
+
const oe = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "property-description"
|
|
11
|
-
},
|
|
11
|
+
}, se = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "property-description"
|
|
14
|
-
},
|
|
14
|
+
}, ne = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "property-example custom-scroll"
|
|
17
|
-
},
|
|
17
|
+
}, re = { class: "property-example-value" }, ie = {
|
|
18
18
|
key: 3,
|
|
19
19
|
class: "property-example custom-scroll"
|
|
20
|
-
},
|
|
20
|
+
}, ue = { class: "property-example-label" }, pe = {
|
|
21
21
|
key: 4,
|
|
22
22
|
class: "property-enum"
|
|
23
23
|
}, de = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "property-list"
|
|
26
|
-
},
|
|
26
|
+
}, me = { class: "property-heading" }, ce = { class: "property-name" }, ve = { class: "property-description" }, ye = {
|
|
27
27
|
key: 1,
|
|
28
28
|
class: "property-enum-values"
|
|
29
|
-
},
|
|
29
|
+
}, fe = {
|
|
30
30
|
key: 5,
|
|
31
31
|
class: "children"
|
|
32
|
-
},
|
|
32
|
+
}, he = {
|
|
33
33
|
key: 0,
|
|
34
34
|
class: "children"
|
|
35
|
-
},
|
|
35
|
+
}, ge = {
|
|
36
36
|
key: 0,
|
|
37
37
|
class: "property-rule"
|
|
38
|
-
},
|
|
38
|
+
}, ke = {
|
|
39
39
|
key: 1,
|
|
40
40
|
class: "property-rule"
|
|
41
|
-
},
|
|
41
|
+
}, Pe = /* @__PURE__ */ Q({
|
|
42
42
|
__name: "SchemaProperty",
|
|
43
43
|
props: {
|
|
44
44
|
value: {},
|
|
@@ -50,8 +50,8 @@ const se = {
|
|
|
50
50
|
additional: { type: Boolean },
|
|
51
51
|
withExamples: { type: Boolean, default: !0 }
|
|
52
52
|
},
|
|
53
|
-
setup(
|
|
54
|
-
const
|
|
53
|
+
setup(G) {
|
|
54
|
+
const h = G, B = {
|
|
55
55
|
integer: {
|
|
56
56
|
_default: "Integer numbers.",
|
|
57
57
|
int32: "Signed 32-bit integers (commonly used integer type).",
|
|
@@ -64,109 +64,109 @@ const se = {
|
|
|
64
64
|
byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
|
|
65
65
|
binary: "binary data, used to describe files"
|
|
66
66
|
}
|
|
67
|
-
},
|
|
67
|
+
}, D = function(e, o) {
|
|
68
68
|
return o != null && o.properties || o != null && o.additionalProperties ? null : e || (o == null ? void 0 : o.description) || null;
|
|
69
|
-
},
|
|
70
|
-
return !e || !
|
|
71
|
-
},
|
|
69
|
+
}, w = function(e) {
|
|
70
|
+
return !e || !B[e.type] ? null : B[e.type][e.format || "_default"];
|
|
71
|
+
}, m = function(e) {
|
|
72
72
|
var o;
|
|
73
73
|
return (e == null ? void 0 : e.enum) || ((o = e == null ? void 0 : e.items) == null ? void 0 : o.enum) || [];
|
|
74
|
-
},
|
|
75
|
-
() =>
|
|
76
|
-
),
|
|
77
|
-
() =>
|
|
78
|
-
),
|
|
74
|
+
}, C = y(() => m(h.value).length > 9), P = y(() => C.value ? 5 : 9), J = y(
|
|
75
|
+
() => m(h.value).slice(0, P.value)
|
|
76
|
+
), K = y(
|
|
77
|
+
() => m(h.value).slice(P.value)
|
|
78
|
+
), k = y(() => Y(h.value));
|
|
79
79
|
return (e, o) => {
|
|
80
|
-
var F, N, V, q, z, I, L, H, O, R, T, U
|
|
80
|
+
var j, F, N, V, q, z, I, L, H, O, R, T, U;
|
|
81
81
|
return l(), t("div", {
|
|
82
|
-
class:
|
|
82
|
+
class: $(["property", [
|
|
83
83
|
`property--level-${e.level}`,
|
|
84
84
|
{
|
|
85
85
|
"property--compact": e.compact,
|
|
86
|
-
"property--deprecated": (
|
|
86
|
+
"property--deprecated": (j = e.value) == null ? void 0 : j.deprecated
|
|
87
87
|
}
|
|
88
88
|
]])
|
|
89
89
|
}, [
|
|
90
|
-
n(
|
|
90
|
+
n(ae, {
|
|
91
91
|
additional: e.additional,
|
|
92
|
-
enum:
|
|
92
|
+
enum: m(e.value).length > 0,
|
|
93
93
|
required: e.required,
|
|
94
|
-
value:
|
|
95
|
-
},
|
|
94
|
+
value: k.value
|
|
95
|
+
}, W({ _: 2 }, [
|
|
96
96
|
e.name ? {
|
|
97
97
|
name: "name",
|
|
98
|
-
fn:
|
|
99
|
-
|
|
98
|
+
fn: f(() => [
|
|
99
|
+
b(r(e.name), 1)
|
|
100
100
|
]),
|
|
101
101
|
key: "0"
|
|
102
102
|
} : void 0,
|
|
103
|
-
(
|
|
103
|
+
(F = e.value) != null && F.example ? {
|
|
104
104
|
name: "example",
|
|
105
|
-
fn:
|
|
106
|
-
|
|
105
|
+
fn: f(() => [
|
|
106
|
+
b(" Example: " + r(e.value.example), 1)
|
|
107
107
|
]),
|
|
108
108
|
key: "1"
|
|
109
109
|
} : void 0
|
|
110
110
|
]), 1032, ["additional", "enum", "required", "value"]),
|
|
111
|
-
|
|
112
|
-
n(i(
|
|
113
|
-
value:
|
|
111
|
+
D(e.description, e.value) ? (l(), t("div", oe, [
|
|
112
|
+
n(i(S), {
|
|
113
|
+
value: D(e.description, e.value)
|
|
114
114
|
}, null, 8, ["value"])
|
|
115
|
-
])) :
|
|
116
|
-
n(i(
|
|
117
|
-
value:
|
|
115
|
+
])) : w(e.value) ? (l(), t("div", se, [
|
|
116
|
+
n(i(S), {
|
|
117
|
+
value: w(e.value) || ""
|
|
118
118
|
}, null, 8, ["value"])
|
|
119
119
|
])) : s("", !0),
|
|
120
|
-
e.withExamples && ((
|
|
120
|
+
e.withExamples && ((N = e.value) != null && N.example || (q = (V = e.value) == null ? void 0 : V.items) != null && q.example) ? (l(), t("div", ne, [
|
|
121
121
|
o[0] || (o[0] = c("span", { class: "property-example-label" }, "Example", -1)),
|
|
122
|
-
c("code",
|
|
122
|
+
c("code", re, r(i(X)(e.value.example || ((z = e.value) == null ? void 0 : z.items.example))), 1)
|
|
123
123
|
])) : s("", !0),
|
|
124
|
-
(
|
|
125
|
-
c("span",
|
|
126
|
-
(l(!0), t(u, null,
|
|
124
|
+
(I = e.value) != null && I.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), t("div", ie, [
|
|
125
|
+
c("span", ue, r(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
|
|
126
|
+
(l(!0), t(u, null, d(e.value.examples, (a, p) => (l(), t("code", {
|
|
127
127
|
key: p,
|
|
128
128
|
class: "property-example-value"
|
|
129
129
|
}, r(a), 1))), 128))
|
|
130
130
|
])) : s("", !0),
|
|
131
|
-
((
|
|
132
|
-
(
|
|
133
|
-
(l(!0), t(u, null, m(
|
|
131
|
+
((L = m(e.value)) == null ? void 0 : L.length) > 0 ? (l(), t("div", pe, [
|
|
132
|
+
(H = e.value) != null && H["x-enumDescriptions"] ? (l(), t("div", de, [
|
|
133
|
+
(l(!0), t(u, null, d(m(e.value), (a) => (l(), t("div", {
|
|
134
134
|
key: a,
|
|
135
135
|
class: "property"
|
|
136
136
|
}, [
|
|
137
|
-
c("div",
|
|
138
|
-
c("div",
|
|
137
|
+
c("div", me, [
|
|
138
|
+
c("div", ce, r(a), 1)
|
|
139
139
|
]),
|
|
140
|
-
c("div",
|
|
141
|
-
n(i(
|
|
140
|
+
c("div", ve, [
|
|
141
|
+
n(i(S), {
|
|
142
142
|
value: e.value["x-enumDescriptions"][a]
|
|
143
143
|
}, null, 8, ["value"])
|
|
144
144
|
])
|
|
145
145
|
]))), 128))
|
|
146
|
-
])) : (l(), t("ul",
|
|
147
|
-
(l(!0), t(u, null,
|
|
146
|
+
])) : (l(), t("ul", ye, [
|
|
147
|
+
(l(!0), t(u, null, d(J.value, (a) => (l(), t("li", {
|
|
148
148
|
key: a,
|
|
149
149
|
class: "property-enum-value"
|
|
150
150
|
}, r(a), 1))), 128)),
|
|
151
|
-
|
|
152
|
-
default:
|
|
153
|
-
n(i(
|
|
154
|
-
default:
|
|
155
|
-
(l(!0), t(u, null,
|
|
151
|
+
C.value ? (l(), E(i(x), { key: 0 }, {
|
|
152
|
+
default: f(({ open: a }) => [
|
|
153
|
+
n(i(ee), null, {
|
|
154
|
+
default: f(() => [
|
|
155
|
+
(l(!0), t(u, null, d(K.value, (p) => (l(), t("li", {
|
|
156
156
|
key: p,
|
|
157
157
|
class: "property-enum-value"
|
|
158
158
|
}, r(p), 1))), 128))
|
|
159
159
|
]),
|
|
160
160
|
_: 1
|
|
161
161
|
}),
|
|
162
|
-
n(i(
|
|
163
|
-
default:
|
|
164
|
-
n(i(
|
|
165
|
-
class:
|
|
162
|
+
n(i(le), { class: "enum-toggle-button" }, {
|
|
163
|
+
default: f(() => [
|
|
164
|
+
n(i(te), {
|
|
165
|
+
class: $(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": a }]),
|
|
166
166
|
icon: "Add",
|
|
167
167
|
size: "sm"
|
|
168
168
|
}, null, 8, ["class"]),
|
|
169
|
-
|
|
169
|
+
b(" " + r(a ? "Hide values" : "Show all values"), 1)
|
|
170
170
|
]),
|
|
171
171
|
_: 2
|
|
172
172
|
}, 1024)
|
|
@@ -175,43 +175,43 @@ const se = {
|
|
|
175
175
|
})) : s("", !0)
|
|
176
176
|
]))
|
|
177
177
|
])) : s("", !0),
|
|
178
|
-
((
|
|
179
|
-
n(
|
|
178
|
+
((O = e.value) == null ? void 0 : O.type) === "object" && ((R = e.value) != null && R.properties || (T = e.value) != null && T.additionalProperties) ? (l(), t("div", fe, [
|
|
179
|
+
n(g, {
|
|
180
180
|
compact: e.compact,
|
|
181
181
|
level: e.level + 1,
|
|
182
182
|
value: e.value
|
|
183
183
|
}, null, 8, ["compact", "level", "value"])
|
|
184
184
|
])) : s("", !0),
|
|
185
|
-
(
|
|
186
|
-
["object"].includes(e.value.items.type) ? (l(), t("div",
|
|
187
|
-
n(
|
|
185
|
+
(U = e.value) != null && U.items ? (l(), t(u, { key: 6 }, [
|
|
186
|
+
["object"].includes(e.value.items.type) ? (l(), t("div", he, [
|
|
187
|
+
n(g, {
|
|
188
188
|
compact: e.compact,
|
|
189
189
|
level: e.level + 1,
|
|
190
190
|
value: e.value.items
|
|
191
191
|
}, null, 8, ["compact", "level", "value"])
|
|
192
192
|
])) : s("", !0)
|
|
193
193
|
], 64)) : s("", !0),
|
|
194
|
-
(l(!0), t(u, null,
|
|
195
|
-
var p,
|
|
194
|
+
(l(!0), t(u, null, d(i(_), (a) => {
|
|
195
|
+
var p, Z, A;
|
|
196
196
|
return l(), t(u, { key: a }, [
|
|
197
|
-
(p =
|
|
198
|
-
(l(!0), t(u, null,
|
|
199
|
-
var
|
|
200
|
-
return l(),
|
|
201
|
-
key:
|
|
197
|
+
(p = k.value) != null && p[a] ? (l(), t("div", ge, [
|
|
198
|
+
(l(!0), t(u, null, d(k.value[a], (v) => {
|
|
199
|
+
var M;
|
|
200
|
+
return l(), E(g, {
|
|
201
|
+
key: v.id,
|
|
202
202
|
compact: e.compact,
|
|
203
203
|
level: e.level + 1,
|
|
204
|
-
noncollapsible: ((
|
|
205
|
-
value:
|
|
204
|
+
noncollapsible: ((M = e.value) == null ? void 0 : M[a].length) === 1,
|
|
205
|
+
value: v
|
|
206
206
|
}, null, 8, ["compact", "level", "noncollapsible", "value"]);
|
|
207
207
|
}), 128))
|
|
208
208
|
])) : s("", !0),
|
|
209
|
-
(
|
|
210
|
-
(l(!0), t(u, null,
|
|
211
|
-
key:
|
|
209
|
+
(A = (Z = e.value) == null ? void 0 : Z.items) != null && A[a] && e.level < 3 ? (l(), t("div", ke, [
|
|
210
|
+
(l(!0), t(u, null, d(e.value.items[a], (v) => (l(), E(g, {
|
|
211
|
+
key: v.id,
|
|
212
212
|
compact: e.compact,
|
|
213
213
|
level: e.level + 1,
|
|
214
|
-
value:
|
|
214
|
+
value: v
|
|
215
215
|
}, null, 8, ["compact", "level", "value"]))), 128))
|
|
216
216
|
])) : s("", !0)
|
|
217
217
|
], 64);
|
|
@@ -221,5 +221,5 @@ const se = {
|
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
export {
|
|
224
|
-
|
|
224
|
+
Pe as default
|
|
225
225
|
};
|
|
@@ -11,8 +11,8 @@ import A from "../../Card/Card.vue.js";
|
|
|
11
11
|
import D from "../../Card/CardHeader.vue.js";
|
|
12
12
|
import F from "../../Card/CardContent.vue.js";
|
|
13
13
|
import L from "../../HttpMethod/HttpMethod.vue.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { useNavState as R } from "../../../hooks/useNavState.js";
|
|
15
|
+
import { useSidebar as U } from "../../../hooks/useSidebar.js";
|
|
16
16
|
const j = ["aria-label"], q = ["href", "onClick"], ne = /* @__PURE__ */ y({
|
|
17
17
|
__name: "Endpoints",
|
|
18
18
|
props: {
|
|
@@ -21,7 +21,7 @@ const j = ["aria-label"], q = ["href", "onClick"], ne = /* @__PURE__ */ y({
|
|
|
21
21
|
isCollapsed: { type: Boolean }
|
|
22
22
|
},
|
|
23
23
|
setup(_) {
|
|
24
|
-
const s = _, { getOperationId: i, getTagId: S } =
|
|
24
|
+
const s = _, { getOperationId: i, getTagId: S } = R(), { scrollToOperation: k } = U(), d = N(() => s.tag["x-displayName"] ?? s.tag.name), v = async (t) => {
|
|
25
25
|
const r = i(t, s.tag);
|
|
26
26
|
k(r);
|
|
27
27
|
};
|
|
@@ -5,8 +5,8 @@ import $ from "./TagAccordion.vue.js";
|
|
|
5
5
|
import b from "./Tag.vue.js";
|
|
6
6
|
import f from "../Lazy/Lazy.vue2.js";
|
|
7
7
|
import x from "../../../features/Operation/Operation.vue.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { useNavState as C } from "../../../hooks/useNavState.js";
|
|
9
|
+
import { useSidebar as N } from "../../../hooks/useSidebar.js";
|
|
10
10
|
const J = /* @__PURE__ */ g({
|
|
11
11
|
__name: "TagList",
|
|
12
12
|
props: {
|
|
@@ -15,7 +15,7 @@ const J = /* @__PURE__ */ g({
|
|
|
15
15
|
layout: {}
|
|
16
16
|
},
|
|
17
17
|
setup(y) {
|
|
18
|
-
const c = y, { getOperationId: m, getTagId: o, hash: _ } =
|
|
18
|
+
const c = y, { getOperationId: m, getTagId: o, hash: _ } = C(), { collapsedSidebarItems: h } = N(), { requests: L, requestExamples: S, securitySchemes: k } = I(), q = v(
|
|
19
19
|
() => c.layout === "classic" ? $ : b
|
|
20
20
|
), z = c.layout !== "classic" && !_.value.startsWith("model");
|
|
21
21
|
return (u, V) => (r(!0), l(n, null, p(u.tags, (t) => (r(), i(e(f), {
|
|
@@ -2,8 +2,8 @@ import { defineComponent as d, ref as m, watch as p, nextTick as u, openBlock as
|
|
|
2
2
|
import { ScalarIcon as g } from "@scalar/components";
|
|
3
3
|
import S from "../Anchor/Anchor.vue.js";
|
|
4
4
|
import _ from "./Section.vue.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useNavState as w } from "../../hooks/useNavState.js";
|
|
6
|
+
import { scrollToId as N } from "../../helpers/scrollToId.js";
|
|
7
7
|
const B = ["aria-expanded"], V = ["id"], A = /* @__PURE__ */ d({
|
|
8
8
|
__name: "CompactSection",
|
|
9
9
|
props: {
|
|
@@ -11,11 +11,11 @@ const B = ["aria-expanded"], V = ["id"], A = /* @__PURE__ */ d({
|
|
|
11
11
|
label: {}
|
|
12
12
|
},
|
|
13
13
|
setup(s) {
|
|
14
|
-
const t = s, { hash: c } =
|
|
14
|
+
const t = s, { hash: c } = w(), e = m(!1);
|
|
15
15
|
return p(
|
|
16
16
|
c,
|
|
17
17
|
async (o) => {
|
|
18
|
-
o === t.id && !e.value && (e.value = !0, await u(),
|
|
18
|
+
o === t.id && !e.value && (e.value = !0, await u(), N(t.id));
|
|
19
19
|
},
|
|
20
20
|
{ immediate: !0 }
|
|
21
21
|
), (o, l) => (a(), f("div", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, openBlock as c, createBlock as m, withCtx as p, renderSlot as f } from "vue";
|
|
2
2
|
import u from "../IntersectionObserver.vue.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useNavState as S } from "../../hooks/useNavState.js";
|
|
4
|
+
import { useSidebar as _ } from "../../hooks/useSidebar.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "Section",
|
|
7
7
|
props: {
|
|
@@ -9,7 +9,7 @@ const v = /* @__PURE__ */ d({
|
|
|
9
9
|
label: {}
|
|
10
10
|
},
|
|
11
11
|
setup(i) {
|
|
12
|
-
const e = i, { getSectionId: r, isIntersectionEnabled: n, replaceUrlState: s } =
|
|
12
|
+
const e = i, { getSectionId: r, isIntersectionEnabled: n, replaceUrlState: s } = S(), { setCollapsedSidebarItem: a } = _();
|
|
13
13
|
function l() {
|
|
14
14
|
var t, o;
|
|
15
15
|
!e.label || !n.value || (s(e.id ?? ""), ((t = e.id) != null && t.startsWith("model") || (o = e.id) != null && o.startsWith("webhook")) && a(r(e.id), !0));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as B, ref as E, watch as F, onMounted as N, openBlock as r, createElementBlock as i, renderSlot as C, createElementVNode as V, createVNode as I, withCtx as b, Fragment as d, renderList as v, unref as a, toDisplayString as L, createBlock as u, createCommentVNode as h } from "vue";
|
|
2
2
|
import y from "./SidebarElement.vue.js";
|
|
3
3
|
import g from "./SidebarGroup.vue.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useNavState as G } from "../../hooks/useNavState.js";
|
|
5
|
+
import { useSidebar as D } from "../../hooks/useSidebar.js";
|
|
5
6
|
import { sleep as w } from "../../helpers/sleep.js";
|
|
6
|
-
import { useNavState as D } from "../../hooks/useNavState.js";
|
|
7
7
|
const H = { class: "sidebar" }, M = ["aria-label"], R = { class: "sidebar-group-title" }, j = -160, Q = /* @__PURE__ */ B({
|
|
8
8
|
__name: "Sidebar",
|
|
9
9
|
props: {
|
|
@@ -12,7 +12,7 @@ const H = { class: "sidebar" }, M = ["aria-label"], R = { class: "sidebar-group-
|
|
|
12
12
|
operationsSorter: { type: [String, Function] }
|
|
13
13
|
},
|
|
14
14
|
setup(A) {
|
|
15
|
-
const S = A, { hash: c, isIntersectionEnabled: $ } =
|
|
15
|
+
const S = A, { hash: c, isIntersectionEnabled: $ } = G(), { items: O, toggleCollapsedSidebarItem: T, collapsedSidebarItems: _ } = D(
|
|
16
16
|
{
|
|
17
17
|
parsedSpec: S.parsedSpec,
|
|
18
18
|
tagsSorter: S.tagsSorter,
|
|
@@ -2,9 +2,9 @@ import { defineComponent as $, openBlock as o, createElementBlock as l, createEl
|
|
|
2
2
|
import { ScalarIconButton as A, ScalarIcon as I } from "@scalar/components";
|
|
3
3
|
import O from "./SidebarHttpBadge.vue.js";
|
|
4
4
|
import { sleep as b } from "../../helpers/sleep.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { useNavState as T } from "../../hooks/useNavState.js";
|
|
6
|
+
import { joinWithSlash as D } from "../../helpers/joinWithSlash.js";
|
|
7
|
+
import { scrollToId as H } from "../../helpers/scrollToId.js";
|
|
8
8
|
const R = ["id"], U = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "sidebar-heading-chevron"
|
|
@@ -25,19 +25,19 @@ const R = ["id"], U = {
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["toggleOpen"],
|
|
27
27
|
setup(k, { emit: C }) {
|
|
28
|
-
const t = k, d = C, { getFullHash: m, isIntersectionEnabled: s, pathRouting: p, replaceUrlState: y } =
|
|
28
|
+
const t = k, d = C, { getFullHash: m, isIntersectionEnabled: s, pathRouting: p, replaceUrlState: y } = T(), h = async () => {
|
|
29
29
|
var e, i;
|
|
30
30
|
t.hasChildren && d("toggleOpen"), (i = (e = t.item) == null ? void 0 : e.select) == null || i.call(e), t.open && (s.value = !1, await b(100), s.value = !0);
|
|
31
31
|
}, w = () => {
|
|
32
32
|
if (p.value)
|
|
33
|
-
return
|
|
33
|
+
return D(p.value.basePath, t.item.id);
|
|
34
34
|
if (typeof window < "u") {
|
|
35
35
|
const e = new URL(window.location.href);
|
|
36
36
|
return e.hash = m(t.item.id), `${e.pathname}${e.search}${e.hash}`;
|
|
37
37
|
} else return `#${m(t.item.id)}`;
|
|
38
38
|
}, S = async (e) => {
|
|
39
39
|
var i, n;
|
|
40
|
-
p.value && (e.preventDefault(), t.hasChildren && d("toggleOpen"), (n = (i = t.item) == null ? void 0 : i.select) == null || n.call(i), d("toggleOpen"), s.value = !1, y(t.item.id),
|
|
40
|
+
p.value && (e.preventDefault(), t.hasChildren && d("toggleOpen"), (n = (i = t.item) == null ? void 0 : i.select) == null || n.call(i), d("toggleOpen"), s.value = !1, y(t.item.id), H(t.item.id), await b(100), s.value = !0);
|
|
41
41
|
};
|
|
42
42
|
return (e, i) => {
|
|
43
43
|
var n, c;
|