@scalar/api-reference 1.32.7 → 1.32.8
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 +32 -0
- package/dist/browser/standalone.js +16286 -16092
- 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/ApiReferenceLayout.vue2.js +164 -176
- 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 +20 -20
- 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/Operation.vue.d.ts +6 -6
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +50 -49
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +8 -7
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +8 -6
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +21 -28
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +5 -3
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +33 -18
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -12
- 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 +168 -154
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -13
- 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 +113 -117
- 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 +5338 -5258
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/download-link/DownloadLink.vue2.js +4 -2
- 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 +89 -96
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -2
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
- package/dist/features/test-request-button/TestRequestButton.vue2.js +26 -24
- package/dist/helpers/convert-security-scheme.js +23 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -29
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +3 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +113 -86
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +4 -0
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +64 -0
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +7 -0
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +212 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +20 -3
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +35 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +29 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +10 -0
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
- package/dist/v2/events/definitions.js +7 -0
- package/dist/v2/events/index.d.ts +1 -1
- package/dist/v2/events/listeners.d.ts +1 -1
- package/dist/v2/hooks/useStore.js +14 -0
- package/package.json +26 -26
- package/dist/blocks/constants.js +0 -6
- package/dist/blocks/helpers/getPointer.js +0 -12
- package/dist/blocks/hooks/useBlockProps.d.ts +0 -31
- package/dist/blocks/hooks/useBlockProps.d.ts.map +0 -1
- package/dist/blocks/hooks/useBlockProps.js +0 -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
- package/dist/features/example-request/ExamplePicker.vue.d.ts +0 -13
- package/dist/features/example-request/ExamplePicker.vue.d.ts.map +0 -1
- package/dist/features/example-request/ExamplePicker.vue.js +0 -7
- package/dist/features/example-request/ExamplePicker.vue2.js +0 -56
- package/dist/features/example-request/ExampleRequest.vue.d.ts +0 -79
- package/dist/features/example-request/ExampleRequest.vue.d.ts.map +0 -1
- package/dist/features/example-request/ExampleRequest.vue.js +0 -7
- package/dist/features/example-request/ExampleRequest.vue2.js +0 -361
- package/dist/features/example-request/TextSelect.vue.d.ts +0 -34
- package/dist/features/example-request/TextSelect.vue.d.ts.map +0 -1
- package/dist/features/example-request/TextSelect.vue.js +0 -48
- package/dist/features/example-request/TextSelect.vue3.js +0 -5
- package/dist/features/example-request/index.d.ts +0 -3
- package/dist/features/example-request/index.d.ts.map +0 -1
|
@@ -1,162 +1,155 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { normalizeMimeTypeObject as
|
|
4
|
-
import { useClipboard as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import X from "../../components/Card/CardFooter.vue.js";
|
|
12
|
-
import Y from "../example-request/ExamplePicker.vue.js";
|
|
13
|
-
const Z = {
|
|
1
|
+
import { defineComponent as N, useId as O, ref as R, computed as v, createBlock as t, createCommentVNode as x, openBlock as o, unref as l, withCtx as u, createVNode as f, createElementBlock as k, Fragment as _, renderList as C, createTextVNode as g, toDisplayString as F, withDirectives as I, createElementVNode as w, vModelCheckbox as A } from "vue";
|
|
2
|
+
import { ScalarCard as D, ScalarIcon as K, ScalarCardSection as L, ScalarCodeBlock as U, ScalarCardFooter as J, ScalarMarkdown as P } from "@scalar/components";
|
|
3
|
+
import { normalizeMimeTypeObject as W, getObjectKeys as $ } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useClipboard as q } from "@scalar/use-hooks/useClipboard";
|
|
5
|
+
import G from "../../components/ScreenReader.vue.js";
|
|
6
|
+
import j from "./ExampleResponse.vue.js";
|
|
7
|
+
import H from "./ExampleResponseTab.vue.js";
|
|
8
|
+
import Q from "./ExampleResponseTabList.vue.js";
|
|
9
|
+
import X from "../../v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js";
|
|
10
|
+
const Y = {
|
|
14
11
|
key: 1,
|
|
15
12
|
class: "scalar-card-checkbox"
|
|
16
|
-
},
|
|
13
|
+
}, Z = ["aria-controls"], z = {
|
|
17
14
|
key: 1,
|
|
18
15
|
class: "response-description"
|
|
19
|
-
},
|
|
16
|
+
}, ne = /* @__PURE__ */ N({
|
|
20
17
|
__name: "ExampleResponses",
|
|
21
18
|
props: {
|
|
22
19
|
responses: {}
|
|
23
20
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
() => !!
|
|
27
|
-
),
|
|
21
|
+
setup(E) {
|
|
22
|
+
const p = O(), { copyToClipboard: T } = q(), c = R(""), S = v(() => Object.keys(E.responses ?? {}).sort()), y = v(
|
|
23
|
+
() => !!s.value.examples
|
|
24
|
+
), V = R(0), i = v(() => {
|
|
28
25
|
var a;
|
|
29
|
-
const e =
|
|
30
|
-
return (a =
|
|
31
|
-
}),
|
|
26
|
+
const e = S.value[V.value];
|
|
27
|
+
return (a = E.responses) == null ? void 0 : a[e];
|
|
28
|
+
}), s = v(() => {
|
|
32
29
|
var m;
|
|
33
|
-
const e =
|
|
30
|
+
const e = W(
|
|
34
31
|
(m = i.value) == null ? void 0 : m.content
|
|
35
|
-
), a =
|
|
32
|
+
), a = $(e ?? {});
|
|
36
33
|
return (
|
|
37
34
|
// OpenAPI 3.x
|
|
38
35
|
(e == null ? void 0 : e["application/json"]) ?? (e == null ? void 0 : e["application/xml"]) ?? (e == null ? void 0 : e["text/plain"]) ?? (e == null ? void 0 : e["text/html"]) ?? (e == null ? void 0 : e["*/*"]) ?? // Take the first key - in the future we may want to use the selected content type
|
|
39
36
|
(e == null ? void 0 : e[a[0]]) ?? // Swagger 2.0
|
|
40
37
|
i.value
|
|
41
38
|
);
|
|
42
|
-
}),
|
|
39
|
+
}), B = () => {
|
|
43
40
|
if (!y.value)
|
|
44
|
-
return
|
|
45
|
-
if (Array.isArray(
|
|
46
|
-
return
|
|
47
|
-
const e = Object.keys(
|
|
48
|
-
return
|
|
41
|
+
return s.value.example;
|
|
42
|
+
if (Array.isArray(s.value.examples))
|
|
43
|
+
return s.value.examples[0];
|
|
44
|
+
const e = Object.keys(s.value.examples)[0], a = s.value.examples[e];
|
|
45
|
+
return (a == null ? void 0 : a.value) ?? a;
|
|
49
46
|
}, b = v(() => ({
|
|
50
|
-
...
|
|
51
|
-
example: y.value &&
|
|
52
|
-
})),
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
return (e, a) =>
|
|
47
|
+
...s.value,
|
|
48
|
+
example: y.value && c.value ? s.value.examples[c.value].value ?? s.value.examples[c.value] : B()
|
|
49
|
+
})), M = (e) => {
|
|
50
|
+
V.value = e, c.value = "";
|
|
51
|
+
}, h = R(!1);
|
|
52
|
+
return (e, a) => S.value.length ? (o(), t(l(D), {
|
|
56
53
|
key: 0,
|
|
57
54
|
"aria-label": "Example Responses",
|
|
58
|
-
role: "region"
|
|
55
|
+
role: "region",
|
|
56
|
+
class: "response-card"
|
|
59
57
|
}, {
|
|
60
58
|
default: u(() => {
|
|
61
59
|
var m;
|
|
62
60
|
return [
|
|
63
|
-
f(
|
|
64
|
-
muted: "",
|
|
65
|
-
x: "as",
|
|
66
|
-
onChange: B
|
|
67
|
-
}, {
|
|
61
|
+
f(Q, { onChange: M }, {
|
|
68
62
|
actions: u(() => {
|
|
69
|
-
var
|
|
63
|
+
var r, d;
|
|
70
64
|
return [
|
|
71
|
-
(
|
|
65
|
+
(r = s.value) != null && r.example ? (o(), k("button", {
|
|
72
66
|
key: 0,
|
|
73
67
|
class: "code-copy",
|
|
74
68
|
type: "button",
|
|
75
69
|
onClick: a[0] || (a[0] = () => {
|
|
76
|
-
var
|
|
77
|
-
return
|
|
70
|
+
var n;
|
|
71
|
+
return l(T)((n = s.value) == null ? void 0 : n.example);
|
|
78
72
|
})
|
|
79
73
|
}, [
|
|
80
|
-
f(
|
|
74
|
+
f(l(K), {
|
|
81
75
|
icon: "Clipboard",
|
|
82
76
|
width: "12px"
|
|
83
77
|
})
|
|
84
78
|
])) : x("", !0),
|
|
85
|
-
(d =
|
|
86
|
-
a[4] || (a[4] =
|
|
87
|
-
I(
|
|
88
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
89
|
-
"aria-controls":
|
|
79
|
+
(d = s.value) != null && d.schema ? (o(), k("label", Y, [
|
|
80
|
+
a[4] || (a[4] = g(" Show Schema ")),
|
|
81
|
+
I(w("input", {
|
|
82
|
+
"onUpdate:modelValue": a[1] || (a[1] = (n) => h.value = n),
|
|
83
|
+
"aria-controls": l(p),
|
|
90
84
|
class: "scalar-card-checkbox-input",
|
|
91
85
|
type: "checkbox"
|
|
92
|
-
}, null, 8,
|
|
93
|
-
[A,
|
|
86
|
+
}, null, 8, Z), [
|
|
87
|
+
[A, h.value]
|
|
94
88
|
]),
|
|
95
|
-
a[5] || (a[5] =
|
|
89
|
+
a[5] || (a[5] = w("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
|
|
96
90
|
])) : x("", !0)
|
|
97
91
|
];
|
|
98
92
|
}),
|
|
99
93
|
default: u(() => [
|
|
100
|
-
(o(!0), k(
|
|
101
|
-
key:
|
|
102
|
-
"aria-controls":
|
|
94
|
+
(o(!0), k(_, null, C(S.value, (r) => (o(), t(H, {
|
|
95
|
+
key: r,
|
|
96
|
+
"aria-controls": l(p)
|
|
103
97
|
}, {
|
|
104
98
|
default: u(() => [
|
|
105
|
-
f(
|
|
99
|
+
f(G, null, {
|
|
106
100
|
default: u(() => a[3] || (a[3] = [
|
|
107
|
-
|
|
101
|
+
g("Status:")
|
|
108
102
|
])),
|
|
109
|
-
_: 1
|
|
103
|
+
_: 1,
|
|
104
|
+
__: [3]
|
|
110
105
|
}),
|
|
111
|
-
|
|
106
|
+
g(" " + F(r), 1)
|
|
112
107
|
]),
|
|
113
108
|
_: 2
|
|
114
109
|
}, 1032, ["aria-controls"]))), 128))
|
|
115
110
|
]),
|
|
116
111
|
_: 1
|
|
117
112
|
}),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}, null, 8, ["id", "content"])) : (o(), r(T, {
|
|
131
|
-
key: 1,
|
|
132
|
-
id: s(n),
|
|
133
|
-
response: b.value
|
|
134
|
-
}, null, 8, ["id", "response"]))
|
|
135
|
-
], 64)) : (o(), r(T, {
|
|
113
|
+
f(l(L), { class: "grid flex-1" }, {
|
|
114
|
+
default: u(() => {
|
|
115
|
+
var r;
|
|
116
|
+
return [
|
|
117
|
+
(r = s.value) != null && r.schema ? (o(), k(_, { key: 0 }, [
|
|
118
|
+
h.value && b.value ? (o(), t(l(U), {
|
|
119
|
+
key: 0,
|
|
120
|
+
id: l(p),
|
|
121
|
+
class: "-outline-offset-2",
|
|
122
|
+
content: b.value,
|
|
123
|
+
lang: "json"
|
|
124
|
+
}, null, 8, ["id", "content"])) : (o(), t(j, {
|
|
136
125
|
key: 1,
|
|
137
|
-
id:
|
|
126
|
+
id: l(p),
|
|
138
127
|
response: b.value
|
|
139
128
|
}, null, 8, ["id", "response"]))
|
|
140
|
-
]
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
129
|
+
], 64)) : (o(), t(j, {
|
|
130
|
+
key: 1,
|
|
131
|
+
id: l(p),
|
|
132
|
+
response: b.value
|
|
133
|
+
}, null, 8, ["id", "response"]))
|
|
134
|
+
];
|
|
135
|
+
}),
|
|
136
|
+
_: 1
|
|
137
|
+
}),
|
|
138
|
+
(m = i.value) != null && m.description || y.value ? (o(), t(l(J), {
|
|
146
139
|
key: 0,
|
|
147
|
-
class: "response-card-footer"
|
|
148
|
-
muted: ""
|
|
140
|
+
class: "response-card-footer"
|
|
149
141
|
}, {
|
|
150
142
|
default: u(() => {
|
|
151
|
-
var
|
|
143
|
+
var r, d;
|
|
152
144
|
return [
|
|
153
|
-
y.value ? (o(),
|
|
145
|
+
y.value ? (o(), t(l(X), {
|
|
154
146
|
key: 0,
|
|
155
147
|
class: "response-example-selector",
|
|
156
|
-
examples: (
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
148
|
+
examples: (r = s.value) == null ? void 0 : r.examples,
|
|
149
|
+
modelValue: c.value,
|
|
150
|
+
"onUpdate:modelValue": a[2] || (a[2] = (n) => c.value = n)
|
|
151
|
+
}, null, 8, ["examples", "modelValue"])) : (d = i.value) != null && d.description ? (o(), k("div", z, [
|
|
152
|
+
f(l(P), {
|
|
160
153
|
class: "markdown",
|
|
161
154
|
value: i.value.description
|
|
162
155
|
}, null, 8, ["value"])
|
|
@@ -172,5 +165,5 @@ const Z = {
|
|
|
172
165
|
}
|
|
173
166
|
});
|
|
174
167
|
export {
|
|
175
|
-
|
|
168
|
+
ne as default
|
|
176
169
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
|
|
3
|
+
method: HttpMethod;
|
|
4
|
+
path: string;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
7
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAUnE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;AAsGF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./TestRequestButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-db173467"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { useConfig as
|
|
5
|
-
import { useApiClient as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as c, computed as d, createElementBlock as n, openBlock as i, withModifiers as h, createVNode as s, createElementVNode as f, unref as k, withCtx as C, createTextVNode as l, toDisplayString as r, Fragment as g } from "vue";
|
|
2
|
+
import { ScalarIconPlay as y } from "@scalar/icons";
|
|
3
|
+
import B from "../../components/ScreenReader.vue.js";
|
|
4
|
+
import { useConfig as b } from "../../hooks/useConfig.js";
|
|
5
|
+
import { useApiClient as w } from "../api-client-modal/useApiClient.js";
|
|
6
|
+
const R = ["method"], S = /* @__PURE__ */ c({
|
|
7
7
|
__name: "TestRequestButton",
|
|
8
8
|
props: {
|
|
9
|
-
|
|
9
|
+
method: {},
|
|
10
|
+
path: {}
|
|
10
11
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const { client:
|
|
13
|
-
() =>
|
|
14
|
-
),
|
|
12
|
+
setup(t) {
|
|
13
|
+
const { client: a } = w(), m = b(), u = d(
|
|
14
|
+
() => m.value.hideTestRequestButton !== !0
|
|
15
|
+
), p = () => {
|
|
15
16
|
var e;
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
(e = a.value) == null || e.open({
|
|
18
|
+
method: t.method,
|
|
19
|
+
path: t.path
|
|
18
20
|
});
|
|
19
21
|
};
|
|
20
|
-
return (e,
|
|
22
|
+
return (e, o) => u.value ? (i(), n("button", {
|
|
21
23
|
key: 0,
|
|
22
24
|
class: "show-api-client-button",
|
|
23
|
-
method: e.
|
|
25
|
+
method: e.method,
|
|
24
26
|
type: "button",
|
|
25
|
-
onClick:
|
|
27
|
+
onClick: h(p, ["stop"])
|
|
26
28
|
}, [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
s(k(y), {
|
|
30
|
+
class: "size-3",
|
|
31
|
+
weight: "fill"
|
|
30
32
|
}),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
o[0] || (o[0] = f("span", null, "Test Request", -1)),
|
|
34
|
+
s(B, null, {
|
|
33
35
|
default: C(() => [
|
|
34
|
-
|
|
36
|
+
l("(" + r(e.method) + " " + r(e.path) + ")", 1)
|
|
35
37
|
]),
|
|
36
38
|
_: 1
|
|
37
39
|
})
|
|
38
|
-
], 8,
|
|
39
|
-
|
|
40
|
+
], 8, R)) : (i(), n(g, { key: 1 }, [
|
|
41
|
+
l(" ")
|
|
40
42
|
], 64));
|
|
41
43
|
}
|
|
42
44
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const e = (r) => r.type === "apiKey" ? {
|
|
2
|
+
...r,
|
|
3
|
+
"x-scalar-secret-token": r.value
|
|
4
|
+
} : r.type === "http" ? {
|
|
5
|
+
...r,
|
|
6
|
+
"x-scalar-secret-token": r.token,
|
|
7
|
+
"x-scalar-secret-username": r.username,
|
|
8
|
+
"x-scalar-secret-password": r.password
|
|
9
|
+
} : r.type === "oauth2" ? {
|
|
10
|
+
...r,
|
|
11
|
+
flows: Object.fromEntries(
|
|
12
|
+
Object.entries(r.flows).map(([a, t]) => [
|
|
13
|
+
a,
|
|
14
|
+
t && {
|
|
15
|
+
...t,
|
|
16
|
+
"x-scalar-secret-token": t.token
|
|
17
|
+
}
|
|
18
|
+
])
|
|
19
|
+
)
|
|
20
|
+
} : r;
|
|
21
|
+
export {
|
|
22
|
+
e as convertSecurityScheme
|
|
23
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,10 +4,8 @@ export { SearchButton, SearchModal } from './features/Search';
|
|
|
4
4
|
export { default as GettingStarted } from './components/GettingStarted.vue.js';
|
|
5
5
|
export { createApiReference } from './standalone/lib/html-api.js';
|
|
6
6
|
export { useSidebar, Sidebar } from './features/sidebar';
|
|
7
|
-
export { Card, CardHeader, CardContent, CardFooter, CardTabHeader, CardTab } from './components/Card';
|
|
8
7
|
export { parse } from './helpers/parse.js';
|
|
9
8
|
export { createEmptySpecification } from './libs/openapi.js';
|
|
10
9
|
export { useNavState } from './hooks/useNavState.js';
|
|
11
|
-
export { useHttpClientStore } from './stores/useHttpClientStore.js';
|
|
12
10
|
export type { ApiReferenceConfiguration, ReferenceProps, } from './types';
|
|
13
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AACnF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAE3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AACnF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAE3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAGxD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,YAAY,EACV,yBAAyB,EACzB,cAAc,GACf,MAAM,SAAS,CAAA"}
|