@scalar/api-reference 1.32.7 → 1.32.9
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 +38 -0
- package/dist/browser/standalone.js +15835 -15738
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue2.js +2 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +1 -1
- package/dist/components/Content/Content.vue2.js +24 -24
- package/dist/components/Content/Models/Models.vue2.js +5 -4
- package/dist/components/Content/Models/ModelsAccordion.vue2.js +2 -1
- package/dist/components/Content/Schema/Schema.vue2.js +2 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +14 -7
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsList.vue2.js +18 -22
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +33 -34
- package/dist/components/Content/Tag/Tag.vue.js +2 -1
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue2.js +8 -6
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.js +1 -1
- package/dist/components/Section/SectionAccordion.vue2.js +28 -29
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
- package/dist/components/Section/SectionContainerAccordion.vue2.js +17 -18
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +8 -7
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +15 -15
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +8 -8
- 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 +87 -75
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +20 -18
- package/dist/features/Search/SearchButton.vue.js +2 -1
- 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 +16 -16
- package/dist/features/api-client-modal/useApiClient.d.ts +84 -4
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/download-link/DownloadLink.vue2.js +4 -2
- package/dist/features/example-request/ExamplePicker.vue2.js +10 -9
- package/dist/features/example-request/ExampleRequest.vue.d.ts +10 -4
- package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/example-request/ExampleRequest.vue.js +1 -1
- package/dist/features/example-request/ExampleRequest.vue2.js +108 -121
- package/dist/{components/Card/CardTab.vue.d.ts → features/example-responses/ExampleResponseTab.vue.d.ts} +1 -1
- package/dist/features/example-responses/ExampleResponseTab.vue.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.js +7 -0
- package/dist/{components/Card/CardTab.vue2.js → features/example-responses/ExampleResponseTab.vue2.js} +6 -6
- package/dist/{components/Card/CardTabHeader.vue.d.ts → features/example-responses/ExampleResponseTabList.vue.d.ts} +3 -3
- package/dist/features/example-responses/ExampleResponseTabList.vue.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +7 -0
- package/dist/{components/Card/CardTabHeader.vue2.js → features/example-responses/ExampleResponseTabList.vue2.js} +9 -9
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue2.js +81 -89
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue2.js +12 -12
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -33
- package/dist/style.css +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/package.json +24 -24
- package/dist/components/Card/Card.vue.d.ts +0 -18
- package/dist/components/Card/Card.vue.d.ts.map +0 -1
- package/dist/components/Card/Card.vue.js +0 -13
- package/dist/components/Card/CardContent.vue.d.ts +0 -19
- package/dist/components/Card/CardContent.vue.d.ts.map +0 -1
- package/dist/components/Card/CardContent.vue.js +0 -7
- package/dist/components/Card/CardContent.vue2.js +0 -27
- package/dist/components/Card/CardFooter.vue.d.ts +0 -19
- package/dist/components/Card/CardFooter.vue.d.ts.map +0 -1
- package/dist/components/Card/CardFooter.vue.js +0 -7
- package/dist/components/Card/CardFooter.vue2.js +0 -24
- package/dist/components/Card/CardHeader.vue.d.ts +0 -20
- package/dist/components/Card/CardHeader.vue.d.ts.map +0 -1
- package/dist/components/Card/CardHeader.vue.js +0 -7
- package/dist/components/Card/CardHeader.vue2.js +0 -31
- package/dist/components/Card/CardTab.vue.d.ts.map +0 -1
- package/dist/components/Card/CardTab.vue.js +0 -7
- package/dist/components/Card/CardTabHeader.vue.d.ts.map +0 -1
- package/dist/components/Card/CardTabHeader.vue.js +0 -7
- package/dist/components/Card/index.d.ts +0 -7
- package/dist/components/Card/index.d.ts.map +0 -1
- package/dist/components/Card/types.d.ts +0 -8
- package/dist/components/Card/types.d.ts.map +0 -1
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
import { defineComponent as ye, useId as ve, ref as
|
|
1
|
+
import { defineComponent as ye, useId as ve, ref as j, inject as Q, computed as c, watch as Y, onMounted as ge, createBlock as w, createCommentVNode as J, unref as r, openBlock as g, withCtx as s, createVNode as n, renderSlot as T, createTextVNode as K, createElementBlock as U, Fragment as Z, toDisplayString as D, createElementVNode as _ } from "vue";
|
|
2
2
|
import { useWorkspace as xe } from "@scalar/api-client/store";
|
|
3
3
|
import { getHarRequest as he, getSnippet as qe } from "@scalar/api-client/views/Components/CodeSnippet";
|
|
4
4
|
import { filterSecurityRequirements as Ee } from "@scalar/api-client/views/Request/RequestSection";
|
|
5
|
-
import { ScalarCodeBlock as Ke } from "@scalar/components";
|
|
6
|
-
import { freezeElement as
|
|
7
|
-
import { requestSchema as
|
|
8
|
-
import { isDereferenced as
|
|
9
|
-
import
|
|
10
|
-
import { useConfig as
|
|
11
|
-
import { EXAMPLE_CONTEXT as
|
|
12
|
-
import { useHttpClientStore as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
5
|
+
import { ScalarCard as ee, ScalarCardHeader as Se, ScalarCardSection as te, ScalarCodeBlock as Ke, ScalarCardFooter as be } from "@scalar/components";
|
|
6
|
+
import { freezeElement as ke } from "@scalar/helpers/dom/freeze-element";
|
|
7
|
+
import { requestSchema as Ce, createExampleFromRequest as Oe } from "@scalar/oas-utils/entities/spec";
|
|
8
|
+
import { isDereferenced as Ne } from "@scalar/openapi-types/helpers";
|
|
9
|
+
import H from "../../components/ScreenReader.vue.js";
|
|
10
|
+
import { useConfig as Te } from "../../hooks/useConfig.js";
|
|
11
|
+
import { EXAMPLE_CONTEXT as Ve, DISCRIMINATOR_CONTEXT as Re } from "../../hooks/useDiscriminator.js";
|
|
12
|
+
import { useHttpClientStore as $e } from "../../stores/useHttpClientStore.js";
|
|
13
|
+
import Be from "./ExamplePicker.vue.js";
|
|
14
|
+
import je from "./TextSelect.vue.js";
|
|
15
15
|
/* empty css */
|
|
16
|
-
import
|
|
17
|
-
import Be from "../../components/Card/CardHeader.vue.js";
|
|
18
|
-
import te from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
19
|
-
import ae from "../../components/Card/CardContent.vue.js";
|
|
20
|
-
import je from "../../components/Card/CardFooter.vue.js";
|
|
16
|
+
import ae from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
21
17
|
import { useExampleStore as we } from "../../legacy/stores/useExampleStore.js";
|
|
22
|
-
const Je = ["id"], Ue =
|
|
18
|
+
const Je = ["id"], Ue = {
|
|
23
19
|
key: 0,
|
|
24
20
|
class: "request-card-footer-addon"
|
|
25
|
-
},
|
|
21
|
+
}, De = { class: "request-header" }, at = /* @__PURE__ */ ye({
|
|
26
22
|
__name: "ExampleRequest",
|
|
27
23
|
props: {
|
|
28
24
|
server: {},
|
|
@@ -34,16 +30,16 @@ const Je = ["id"], Ue = ["id"], De = {
|
|
|
34
30
|
schemas: {}
|
|
35
31
|
},
|
|
36
32
|
setup(l) {
|
|
37
|
-
const { selectedExampleKey:
|
|
33
|
+
const { selectedExampleKey: I, operationId: le } = we(), { requestExamples: b, securitySchemes: M, requestExampleMutators: V } = xe(), re = Te(), {
|
|
38
34
|
httpClient: u,
|
|
39
35
|
setHttpClient: oe,
|
|
40
|
-
availableTargets:
|
|
36
|
+
availableTargets: A,
|
|
41
37
|
httpTargetTitle: se,
|
|
42
38
|
httpClientTitle: ne
|
|
43
|
-
} =
|
|
39
|
+
} = $e(), F = ve(), x = j(!1), k = Q(Ve), f = Q(Re), R = c(() => {
|
|
44
40
|
var e;
|
|
45
41
|
return (e = f == null ? void 0 : f.value) == null ? void 0 : e.selectedType;
|
|
46
|
-
}),
|
|
42
|
+
}), P = c(
|
|
47
43
|
() => {
|
|
48
44
|
var e;
|
|
49
45
|
return ((e = f == null ? void 0 : f.value) == null ? void 0 : e.hasDiscriminator) || !1;
|
|
@@ -55,7 +51,7 @@ const Je = ["id"], Ue = ["id"], De = {
|
|
|
55
51
|
if ((t = l.operation) != null && t[a])
|
|
56
52
|
return [...l.operation[a]];
|
|
57
53
|
return [];
|
|
58
|
-
}), o =
|
|
54
|
+
}), o = j(
|
|
59
55
|
// Default to first custom example
|
|
60
56
|
d.value.length ? {
|
|
61
57
|
targetKey: "customExamples",
|
|
@@ -68,20 +64,20 @@ const Je = ["id"], Ue = ["id"], De = {
|
|
|
68
64
|
}
|
|
69
65
|
)
|
|
70
66
|
);
|
|
71
|
-
|
|
67
|
+
Y(u, () => {
|
|
72
68
|
o.value = {
|
|
73
69
|
targetKey: u.targetKey,
|
|
74
70
|
clientKey: u.clientKey
|
|
75
71
|
};
|
|
76
72
|
});
|
|
77
|
-
const
|
|
78
|
-
const e =
|
|
73
|
+
const X = c(() => {
|
|
74
|
+
const e = C.value;
|
|
79
75
|
return Object.keys(e).length > 1;
|
|
80
76
|
}), ue = () => {
|
|
81
|
-
var q, E,
|
|
77
|
+
var q, E, S;
|
|
82
78
|
if (o.value.targetKey === "customExamples")
|
|
83
79
|
return ((q = d.value[o.value.clientKey]) == null ? void 0 : q.source) ?? "";
|
|
84
|
-
const e = u.clientKey, t = u.targetKey, a = l.request ||
|
|
80
|
+
const e = u.clientKey, t = u.targetKey, a = l.request || Ce.parse({
|
|
85
81
|
uid: l.operation.operationId || "temp-request",
|
|
86
82
|
method: l.method,
|
|
87
83
|
path: l.operation.path,
|
|
@@ -94,31 +90,31 @@ const Je = ["id"], Ue = ["id"], De = {
|
|
|
94
90
|
servers: [],
|
|
95
91
|
summary: l.operation.summary || "Example Request"
|
|
96
92
|
});
|
|
97
|
-
let i =
|
|
93
|
+
let i = b[((S = (E = l.request) == null ? void 0 : E.examples) == null ? void 0 : S[0]) ?? ""];
|
|
98
94
|
if (!i) {
|
|
99
|
-
const
|
|
100
|
-
i =
|
|
95
|
+
const N = C.value, m = Object.keys(N)[0];
|
|
96
|
+
i = Oe(a, m);
|
|
101
97
|
}
|
|
102
98
|
const p = Ee(
|
|
103
99
|
l.operation.security || l.collection.security,
|
|
104
100
|
l.collection.selectedSecuritySchemeUids,
|
|
105
|
-
|
|
101
|
+
M
|
|
106
102
|
), y = he({
|
|
107
103
|
operation: a,
|
|
108
104
|
example: i,
|
|
109
105
|
server: l.server,
|
|
110
106
|
securitySchemes: p
|
|
111
|
-
}), [h,
|
|
112
|
-
return h ? h.message ?? "" :
|
|
113
|
-
},
|
|
107
|
+
}), [h, O] = qe(t, e, y);
|
|
108
|
+
return h ? h.message ?? "" : O;
|
|
109
|
+
}, z = c(() => {
|
|
114
110
|
try {
|
|
115
111
|
return ue();
|
|
116
112
|
} catch (e) {
|
|
117
113
|
return console.error("[generateSnippet]", e), "";
|
|
118
114
|
}
|
|
119
|
-
}),
|
|
115
|
+
}), C = c(() => {
|
|
120
116
|
var a;
|
|
121
|
-
if (!
|
|
117
|
+
if (!Ne(l.operation.requestBody))
|
|
122
118
|
return {};
|
|
123
119
|
const e = ((a = l.operation.requestBody) == null ? void 0 : a.content) ?? {}, t = Object.values(e)[0];
|
|
124
120
|
return (t == null ? void 0 : t.examples) ?? {};
|
|
@@ -131,15 +127,15 @@ const Je = ["id"], Ue = ["id"], De = {
|
|
|
131
127
|
u.targetKey
|
|
132
128
|
)
|
|
133
129
|
);
|
|
134
|
-
return e === "shell" &&
|
|
130
|
+
return e === "shell" && z.value.includes("curl") ? "curl" : e === "Objective-C" ? "objc" : e;
|
|
135
131
|
}), ce = c(
|
|
136
|
-
() => Object.values(
|
|
132
|
+
() => Object.values(M).flatMap((e) => e.type === "apiKey" ? e.value : (e == null ? void 0 : e.type) === "http" ? [
|
|
137
133
|
e.token,
|
|
138
134
|
e.password,
|
|
139
135
|
btoa(`${e.username}:${e.password}`)
|
|
140
136
|
] : e.type === "oauth2" ? Object.values(e.flows).map((t) => t.token) : [])
|
|
141
137
|
), me = c(() => {
|
|
142
|
-
const e =
|
|
138
|
+
const e = A.value.map((t) => ({
|
|
143
139
|
value: t.key,
|
|
144
140
|
label: t.title,
|
|
145
141
|
options: t.clients.map((a) => ({
|
|
@@ -161,11 +157,11 @@ const Je = ["id"], Ue = ["id"], De = {
|
|
|
161
157
|
label: t.label ?? t.lang ?? `Example #${a + 1}`
|
|
162
158
|
}))
|
|
163
159
|
}), e;
|
|
164
|
-
}),
|
|
160
|
+
}), $ = j(null);
|
|
165
161
|
function de(e) {
|
|
166
162
|
const t = JSON.parse(e);
|
|
167
|
-
if (
|
|
168
|
-
const a =
|
|
163
|
+
if ($.value) {
|
|
164
|
+
const a = ke($.value.$el);
|
|
169
165
|
setTimeout(() => {
|
|
170
166
|
a();
|
|
171
167
|
}, 300);
|
|
@@ -176,8 +172,8 @@ const Je = ["id"], Ue = ["id"], De = {
|
|
|
176
172
|
var i, p;
|
|
177
173
|
if (!e)
|
|
178
174
|
return;
|
|
179
|
-
|
|
180
|
-
const t =
|
|
175
|
+
I.value = e, le.value = l.operation.operationId;
|
|
176
|
+
const t = b[((p = (i = l.request) == null ? void 0 : i.examples) == null ? void 0 : p[0]) ?? ""], a = C.value[e];
|
|
181
177
|
if (t && (a != null && a.value))
|
|
182
178
|
try {
|
|
183
179
|
V.edit(
|
|
@@ -190,35 +186,35 @@ const Je = ["id"], Ue = ["id"], De = {
|
|
|
190
186
|
}
|
|
191
187
|
}
|
|
192
188
|
ge(() => {
|
|
193
|
-
|
|
189
|
+
P.value && R.value && !x.value && L(R.value);
|
|
194
190
|
});
|
|
195
|
-
const
|
|
196
|
-
var t, a, i, p, y, h,
|
|
191
|
+
const L = (e) => {
|
|
192
|
+
var t, a, i, p, y, h, O, q, E, S, N;
|
|
197
193
|
if (!x.value)
|
|
198
194
|
try {
|
|
199
195
|
x.value = !0;
|
|
200
|
-
const m =
|
|
201
|
-
if (m && (
|
|
202
|
-
const fe = (p = (i = m.body) == null ? void 0 : i.raw) != null && p.value ? JSON.parse(m.body.raw.value) : void 0,
|
|
196
|
+
const m = b[((a = (t = l.request) == null ? void 0 : t.examples) == null ? void 0 : a[0]) ?? ""];
|
|
197
|
+
if (m && (k != null && k.generateExampleValue)) {
|
|
198
|
+
const fe = (p = (i = m.body) == null ? void 0 : i.raw) != null && p.value ? JSON.parse(m.body.raw.value) : void 0, B = k.generateExampleValue(
|
|
203
199
|
Array.isArray(fe)
|
|
204
200
|
);
|
|
205
201
|
if (V.edit(
|
|
206
202
|
m.uid,
|
|
207
203
|
"body.raw.value",
|
|
208
|
-
JSON.stringify(
|
|
204
|
+
JSON.stringify(B, null, 2)
|
|
209
205
|
), (h = (y = l.request) == null ? void 0 : y.examples) != null && h[0]) {
|
|
210
|
-
const v =
|
|
206
|
+
const v = b[(q = (O = l.request) == null ? void 0 : O.examples) == null ? void 0 : q[0]];
|
|
211
207
|
v && V.edit(
|
|
212
208
|
v.uid,
|
|
213
209
|
"body.raw.value",
|
|
214
|
-
JSON.stringify(
|
|
210
|
+
JSON.stringify(B, null, 2)
|
|
215
211
|
);
|
|
216
212
|
}
|
|
217
|
-
if ((
|
|
213
|
+
if ((N = (S = (E = l.operation.requestBody) == null ? void 0 : E.content) == null ? void 0 : S["application/json"]) != null && N.examples) {
|
|
218
214
|
const v = l.operation.requestBody.content["application/json"].examples;
|
|
219
|
-
Object.keys(v).forEach((
|
|
220
|
-
var
|
|
221
|
-
(
|
|
215
|
+
Object.keys(v).forEach((W) => {
|
|
216
|
+
var G;
|
|
217
|
+
(G = v[W]) != null && G.value && (v[W].value = B);
|
|
222
218
|
});
|
|
223
219
|
}
|
|
224
220
|
}
|
|
@@ -228,119 +224,110 @@ const Je = ["id"], Ue = ["id"], De = {
|
|
|
228
224
|
x.value = !1;
|
|
229
225
|
}
|
|
230
226
|
};
|
|
231
|
-
return
|
|
232
|
-
e &&
|
|
233
|
-
}), (e, t) => r(
|
|
227
|
+
return Y(R, (e) => {
|
|
228
|
+
e && P.value && !x.value && L();
|
|
229
|
+
}), (e, t) => r(A).length || d.value.length ? (g(), w(r(ee), {
|
|
234
230
|
key: 0,
|
|
235
|
-
"
|
|
236
|
-
class: "dark-mode",
|
|
231
|
+
class: "request-card dark-mode",
|
|
237
232
|
ref_key: "elem",
|
|
238
|
-
ref:
|
|
239
|
-
role: "region"
|
|
233
|
+
ref: $
|
|
240
234
|
}, {
|
|
241
235
|
default: s(() => [
|
|
242
|
-
n(r(
|
|
236
|
+
n(r(Se), { class: "pr-0.75" }, {
|
|
243
237
|
actions: s(() => [
|
|
244
|
-
n(
|
|
238
|
+
n(je, {
|
|
245
239
|
class: "request-client-picker",
|
|
246
|
-
controls: `${r(
|
|
240
|
+
controls: `${r(F)}-example`,
|
|
247
241
|
modelValue: JSON.stringify(o.value),
|
|
248
242
|
options: me.value,
|
|
249
243
|
"onUpdate:modelValue": de
|
|
250
244
|
}, {
|
|
251
245
|
default: s(() => [
|
|
252
|
-
o.value.targetKey === "customExamples" ? (g(),
|
|
253
|
-
n(
|
|
246
|
+
o.value.targetKey === "customExamples" ? (g(), U(Z, { key: 0 }, [
|
|
247
|
+
n(H, null, {
|
|
254
248
|
default: s(() => t[1] || (t[1] = [
|
|
255
|
-
|
|
249
|
+
K("Selected Example:")
|
|
256
250
|
])),
|
|
257
|
-
_: 1
|
|
251
|
+
_: 1,
|
|
252
|
+
__: [1]
|
|
258
253
|
}),
|
|
259
|
-
|
|
260
|
-
], 64)) : (g(),
|
|
261
|
-
n(
|
|
254
|
+
K(" " + D(d.value[o.value.clientKey].label ?? "Example"), 1)
|
|
255
|
+
], 64)) : (g(), U(Z, { key: 1 }, [
|
|
256
|
+
n(H, null, {
|
|
262
257
|
default: s(() => t[2] || (t[2] = [
|
|
263
|
-
|
|
258
|
+
K("Selected HTTP client:")
|
|
264
259
|
])),
|
|
265
|
-
_: 1
|
|
260
|
+
_: 1,
|
|
261
|
+
__: [2]
|
|
266
262
|
}),
|
|
267
|
-
|
|
263
|
+
K(" " + D(r(se)) + " " + D(r(ne)), 1)
|
|
268
264
|
], 64))
|
|
269
265
|
]),
|
|
270
266
|
_: 1
|
|
271
267
|
}, 8, ["controls", "modelValue", "options"])
|
|
272
268
|
]),
|
|
273
269
|
default: s(() => [
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
method: e.method
|
|
288
|
-
}, null, 8, ["method"]),
|
|
289
|
-
T(e.$slots, "header", {}, void 0, !0)
|
|
290
|
-
], 8, Je)
|
|
270
|
+
n(H, null, {
|
|
271
|
+
default: s(() => t[0] || (t[0] = [
|
|
272
|
+
K("Request Example for")
|
|
273
|
+
])),
|
|
274
|
+
_: 1,
|
|
275
|
+
__: [0]
|
|
276
|
+
}),
|
|
277
|
+
n(r(ae), {
|
|
278
|
+
as: "span",
|
|
279
|
+
class: "request-method",
|
|
280
|
+
method: e.method
|
|
281
|
+
}, null, 8, ["method"]),
|
|
282
|
+
T(e.$slots, "header", {}, void 0, !0)
|
|
291
283
|
]),
|
|
292
284
|
_: 3
|
|
293
285
|
}),
|
|
294
|
-
n(r(
|
|
295
|
-
borderless: "",
|
|
296
|
-
class: "request-editor-section custom-scroll",
|
|
297
|
-
frameless: ""
|
|
298
|
-
}, {
|
|
286
|
+
n(r(te), { class: "request-editor-section custom-scroll border-none p-0" }, {
|
|
299
287
|
default: s(() => [
|
|
300
|
-
|
|
301
|
-
id: `${r(
|
|
288
|
+
_("div", {
|
|
289
|
+
id: `${r(F)}-example`,
|
|
302
290
|
class: "code-snippet"
|
|
303
291
|
}, [
|
|
304
292
|
n(r(Ke), {
|
|
305
|
-
class: "bg-b-2 -outline-offset-2",
|
|
306
|
-
content:
|
|
293
|
+
class: "bg-b-2 !min-h-full -outline-offset-2",
|
|
294
|
+
content: z.value,
|
|
307
295
|
hideCredentials: ce.value,
|
|
308
296
|
lang: ie.value,
|
|
309
297
|
lineNumbers: ""
|
|
310
298
|
}, null, 8, ["content", "hideCredentials", "lang"])
|
|
311
|
-
], 8,
|
|
299
|
+
], 8, Je)
|
|
312
300
|
]),
|
|
313
301
|
_: 1
|
|
314
302
|
}),
|
|
315
|
-
(
|
|
303
|
+
(X.value || !r(re).hideTestRequestButton) && e.$slots.footer ? (g(), w(r(be), {
|
|
316
304
|
key: 0,
|
|
317
|
-
class: "request-card-footer"
|
|
318
|
-
contrast: ""
|
|
305
|
+
class: "request-card-footer bg-b-3"
|
|
319
306
|
}, {
|
|
320
307
|
default: s(() => [
|
|
321
|
-
|
|
322
|
-
n(
|
|
308
|
+
X.value ? (g(), U("div", Ue, [
|
|
309
|
+
n(Be, {
|
|
323
310
|
class: "request-example-selector",
|
|
324
|
-
examples:
|
|
325
|
-
modelValue: r(
|
|
311
|
+
examples: C.value,
|
|
312
|
+
modelValue: r(I),
|
|
326
313
|
"onUpdate:modelValue": pe
|
|
327
314
|
}, null, 8, ["examples", "modelValue"])
|
|
328
|
-
])) :
|
|
315
|
+
])) : J("", !0),
|
|
329
316
|
T(e.$slots, "footer", {}, void 0, !0)
|
|
330
317
|
]),
|
|
331
318
|
_: 3
|
|
332
|
-
})) :
|
|
319
|
+
})) : J("", !0)
|
|
333
320
|
]),
|
|
334
321
|
_: 3
|
|
335
|
-
},
|
|
322
|
+
}, 512)) : e.fallback ? (g(), w(r(ee), {
|
|
336
323
|
key: 1,
|
|
337
|
-
class: "dark-mode"
|
|
324
|
+
class: "request-card dark-mode"
|
|
338
325
|
}, {
|
|
339
326
|
default: s(() => [
|
|
340
|
-
n(r(
|
|
327
|
+
n(r(te), { class: "request-card-simple" }, {
|
|
341
328
|
default: s(() => [
|
|
342
|
-
|
|
343
|
-
n(r(
|
|
329
|
+
_("div", De, [
|
|
330
|
+
n(r(ae), {
|
|
344
331
|
as: "span",
|
|
345
332
|
class: "request-method",
|
|
346
333
|
method: e.method
|
|
@@ -353,9 +340,9 @@ const Je = ["id"], Ue = ["id"], De = {
|
|
|
353
340
|
})
|
|
354
341
|
]),
|
|
355
342
|
_: 3
|
|
356
|
-
})) :
|
|
343
|
+
})) : J("", !0);
|
|
357
344
|
}
|
|
358
345
|
});
|
|
359
346
|
export {
|
|
360
|
-
|
|
347
|
+
at as default
|
|
361
348
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleResponseTab.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponseTab.vue"],"names":[],"mappings":"AAkFA,iBAAS,cAAc;WA4DT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as o, createBlock as
|
|
2
|
-
import { Tab as
|
|
1
|
+
import { defineComponent as o, createBlock as n, openBlock as r, unref as l, withCtx as s, createElementVNode as e, normalizeClass as p, renderSlot as m } from "vue";
|
|
2
|
+
import { Tab as u } from "@headlessui/vue";
|
|
3
3
|
const i = /* @__PURE__ */ o({
|
|
4
|
-
__name: "
|
|
5
|
-
setup(
|
|
6
|
-
return (t, d) => (
|
|
4
|
+
__name: "ExampleResponseTab",
|
|
5
|
+
setup(c) {
|
|
6
|
+
return (t, d) => (r(), n(l(u), { as: "template" }, {
|
|
7
7
|
default: s(({ selected: a }) => [
|
|
8
8
|
e("button", {
|
|
9
9
|
class: p(["tab", { "tab-selected": a }]),
|
|
10
10
|
type: "button"
|
|
11
11
|
}, [
|
|
12
12
|
e("span", null, [
|
|
13
|
-
|
|
13
|
+
m(t.$slots, "default", {}, void 0, !0)
|
|
14
14
|
])
|
|
15
15
|
], 2)
|
|
16
16
|
]),
|
|
@@ -5,14 +5,14 @@ declare function __VLS_template(): {
|
|
|
5
5
|
actions?(_: {}): any;
|
|
6
6
|
};
|
|
7
7
|
refs: {};
|
|
8
|
-
rootEl:
|
|
8
|
+
rootEl: any;
|
|
9
9
|
};
|
|
10
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
11
|
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
12
|
change: (index: number) => any;
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
14
14
|
onChange?: ((index: number) => any) | undefined;
|
|
15
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
16
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
17
|
export default _default;
|
|
18
18
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -20,4 +20,4 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
20
20
|
$slots: S;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=
|
|
23
|
+
//# sourceMappingURL=ExampleResponseTabList.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleResponseTabList.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponseTabList.vue"],"names":[],"mappings":"AA6DA,iBAAS,cAAc;WAuFT,OAAO,IAA6B;;yBATpB,GAAG;yBACH,GAAG;;;;EAahC;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;iFAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as l, createBlock as d, openBlock as i, unref as t, withCtx as a, createVNode as r, renderSlot as o } from "vue";
|
|
2
2
|
import { TabGroup as m, TabList as u } from "@headlessui/vue";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
__name: "
|
|
3
|
+
import { ScalarCardHeader as p } from "@scalar/components";
|
|
4
|
+
const C = /* @__PURE__ */ l({
|
|
5
|
+
__name: "ExampleResponseTabList",
|
|
6
6
|
emits: ["change"],
|
|
7
|
-
setup(
|
|
7
|
+
setup(f, { emit: s }) {
|
|
8
8
|
const c = s, n = (e) => {
|
|
9
9
|
c("change", e);
|
|
10
10
|
};
|
|
11
|
-
return (e, _) => (i(),
|
|
11
|
+
return (e, _) => (i(), d(t(p), { class: "scalar-card-header scalar-card-header-tabs" }, {
|
|
12
12
|
actions: a(() => [
|
|
13
13
|
o(e.$slots, "actions", {}, void 0, !0)
|
|
14
14
|
]),
|
|
15
15
|
default: a(() => [
|
|
16
|
-
t(
|
|
16
|
+
r(t(m), { onChange: n }, {
|
|
17
17
|
default: a(() => [
|
|
18
|
-
t(
|
|
18
|
+
r(t(u), { class: "tab-list custom-scroll" }, {
|
|
19
19
|
default: a(() => [
|
|
20
20
|
o(e.$slots, "default", {}, void 0, !0)
|
|
21
21
|
]),
|
|
@@ -30,5 +30,5 @@ const g = /* @__PURE__ */ d({
|
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
C as default
|
|
34
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponses.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponses.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleResponses.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponses.vue"],"names":[],"mappings":"AAmVA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAiBhE;;GAEG;AAEH,KAAK,WAAW,GAAG;IAAE,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,CAAA;CAAE,CAAC;;AAuVzD,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ExampleResponses.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import p from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ p(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ p(o, [["__scopeId", "data-v-65bd9cd0"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|