@scalar/api-reference 1.17.8 → 1.17.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 +10 -0
- package/dist/browser/standalone.js +7 -17
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Operation/CustomRequestExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/PathResponses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/PathResponses/PathResponses.vue.d.ts.map +1 -1
- package/dist/{index-BrWhegGZ.js → index-B7LNK1Jz.js} +11014 -9856
- package/dist/{index-5H2KXeFR.js → index-C_DflIwr.js} +35 -35
- package/dist/index.js +21 -21
- package/package.json +6 -8
- package/dist/components/CodeBlock/CodeBlock.vue.d.ts +0 -42
- package/dist/components/CodeBlock/CodeBlock.vue.d.ts.map +0 -1
- package/dist/components/CodeBlock/index.d.ts +0 -2
- package/dist/components/CodeBlock/index.d.ts.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as b, ref as C, watch as N, openBlock as c, createElementBlock as v, Fragment as k, createElementVNode as y, unref as a, createTextVNode as u, createCommentVNode as w, renderSlot as S, createVNode as n, withCtx as p, toDisplayString as R, computed as D, isRef as B, normalizeClass as L, createBlock as T } from "vue";
|
|
2
|
+
import { b as j, H as F, r as H, l as O, C as I, f as A, _ as E, a as J, c as z, R as Q } from "./index-B7LNK1Jz.js";
|
|
3
|
+
import { u as ve } from "./index-B7LNK1Jz.js";
|
|
4
4
|
import { useMediaQuery as W, useFileDialog as Y } from "@vueuse/core";
|
|
5
|
-
const q = (
|
|
6
|
-
if (typeof
|
|
5
|
+
const q = (s) => {
|
|
6
|
+
if (typeof s != "string")
|
|
7
7
|
return !1;
|
|
8
8
|
try {
|
|
9
|
-
JSON.parse(
|
|
9
|
+
JSON.parse(s);
|
|
10
10
|
} catch {
|
|
11
11
|
return !1;
|
|
12
12
|
}
|
|
13
13
|
return !0;
|
|
14
|
-
}, G = { class: "swagger-editor-header" }, K = { class: "swagger-editor-title" }, P = { class: "swagger-editor-actions" }, X = { key: 0 }, Z = { key: 0 }, ee = { class: "swagger-editor-modal-layout" }, te = /* @__PURE__ */
|
|
14
|
+
}, G = { class: "swagger-editor-header" }, K = { class: "swagger-editor-title" }, P = { class: "swagger-editor-actions" }, X = { key: 0 }, Z = { key: 0 }, ee = { class: "swagger-editor-modal-layout" }, te = /* @__PURE__ */ b({
|
|
15
15
|
__name: "SwaggerEditorHeader",
|
|
16
16
|
props: {
|
|
17
17
|
proxyUrl: {}
|
|
18
18
|
},
|
|
19
19
|
emits: ["import"],
|
|
20
|
-
setup(
|
|
21
|
-
const o =
|
|
20
|
+
setup(s, { expose: _, emit: m }) {
|
|
21
|
+
const o = s, t = W("(max-width: 1000px)"), { files: r, open: g, reset: x } = Y({
|
|
22
22
|
multiple: !1,
|
|
23
23
|
accept: ".json,.yaml,.yml"
|
|
24
24
|
}), e = j(), f = C(null);
|
|
@@ -26,7 +26,7 @@ const q = (l) => {
|
|
|
26
26
|
importUrlModal: e,
|
|
27
27
|
openFileDialog: g
|
|
28
28
|
});
|
|
29
|
-
const d = C(""),
|
|
29
|
+
const d = C(""), U = () => {
|
|
30
30
|
f.value = "", A(d.value, o.proxyUrl).then(async (i) => {
|
|
31
31
|
m("import", i), e.hide();
|
|
32
32
|
}).catch((i) => {
|
|
@@ -36,25 +36,25 @@ const q = (l) => {
|
|
|
36
36
|
return N(r, () => {
|
|
37
37
|
var i;
|
|
38
38
|
if ((i = r.value) != null && i.length) {
|
|
39
|
-
const
|
|
39
|
+
const l = r.value[0], h = new FileReader();
|
|
40
40
|
h.onload = (V) => {
|
|
41
41
|
var M;
|
|
42
42
|
const $ = (M = V.target) == null ? void 0 : M.result;
|
|
43
43
|
typeof $ == "string" && (m("import", $), x());
|
|
44
|
-
}, h.readAsText(
|
|
44
|
+
}, h.readAsText(l);
|
|
45
45
|
}
|
|
46
|
-
}), (i,
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
}), (i, l) => (c(), v(k, null, [
|
|
47
|
+
y("div", G, [
|
|
48
|
+
y("div", K, [
|
|
49
49
|
a(t) ? w("", !0) : (c(), v(k, { key: 0 }, [
|
|
50
50
|
u("Swagger ")
|
|
51
51
|
], 64)),
|
|
52
52
|
u("Editor ")
|
|
53
53
|
]),
|
|
54
54
|
S(i.$slots, "tab-items", {}, void 0, !0),
|
|
55
|
-
|
|
55
|
+
y("div", P, [
|
|
56
56
|
n(F, {
|
|
57
|
-
onClick:
|
|
57
|
+
onClick: l[0] || (l[0] = () => a(g)())
|
|
58
58
|
}, {
|
|
59
59
|
default: p(() => [
|
|
60
60
|
u(" Upload"),
|
|
@@ -63,7 +63,7 @@ const q = (l) => {
|
|
|
63
63
|
_: 1
|
|
64
64
|
}),
|
|
65
65
|
n(F, {
|
|
66
|
-
onClick:
|
|
66
|
+
onClick: l[1] || (l[1] = (h) => a(e).show())
|
|
67
67
|
}, {
|
|
68
68
|
default: p(() => [
|
|
69
69
|
a(t) ? w("", !0) : (c(), v("span", Z, "Import ")),
|
|
@@ -78,10 +78,10 @@ const q = (l) => {
|
|
|
78
78
|
title: "Import Swagger from URL"
|
|
79
79
|
}, {
|
|
80
80
|
default: p(() => [
|
|
81
|
-
|
|
81
|
+
y("div", ee, [
|
|
82
82
|
n(a(O), {
|
|
83
83
|
modelValue: d.value,
|
|
84
|
-
"onUpdate:modelValue":
|
|
84
|
+
"onUpdate:modelValue": l[2] || (l[2] = (h) => d.value = h),
|
|
85
85
|
autofocus: "",
|
|
86
86
|
class: "swagger-editor-modal-layout-input",
|
|
87
87
|
label: "URL",
|
|
@@ -91,14 +91,14 @@ const q = (l) => {
|
|
|
91
91
|
u(" " + R(f.value) + " ", 1),
|
|
92
92
|
n(a(I), {
|
|
93
93
|
variant: "outlined",
|
|
94
|
-
onClick:
|
|
94
|
+
onClick: l[3] || (l[3] = (h) => a(e).hide())
|
|
95
95
|
}, {
|
|
96
96
|
default: p(() => [
|
|
97
97
|
u(" Cancel ")
|
|
98
98
|
]),
|
|
99
99
|
_: 1
|
|
100
100
|
}),
|
|
101
|
-
n(a(I), { onClick:
|
|
101
|
+
n(a(I), { onClick: U }, {
|
|
102
102
|
default: p(() => [
|
|
103
103
|
u("Import")
|
|
104
104
|
]),
|
|
@@ -110,13 +110,13 @@ const q = (l) => {
|
|
|
110
110
|
}, 8, ["state"])
|
|
111
111
|
], 64));
|
|
112
112
|
}
|
|
113
|
-
}), re = /* @__PURE__ */
|
|
113
|
+
}), re = /* @__PURE__ */ E(te, [["__scopeId", "data-v-17d421af"]]), oe = { class: "swagger-editor-input" }, ae = /* @__PURE__ */ b({
|
|
114
114
|
__name: "SwaggerEditorInput",
|
|
115
115
|
props: {
|
|
116
116
|
value: {}
|
|
117
117
|
},
|
|
118
118
|
emits: ["contentUpdate"],
|
|
119
|
-
setup(
|
|
119
|
+
setup(s, { expose: _ }) {
|
|
120
120
|
_({
|
|
121
121
|
setCodeMirrorContent: (t) => {
|
|
122
122
|
var r;
|
|
@@ -138,13 +138,13 @@ const q = (l) => {
|
|
|
138
138
|
}, null, 8, ["content", "language"])
|
|
139
139
|
]));
|
|
140
140
|
}
|
|
141
|
-
}), ne = {},
|
|
142
|
-
function
|
|
143
|
-
return c(), v("div",
|
|
144
|
-
S(
|
|
141
|
+
}), ne = {}, le = { class: "swagger-editor-notification swagger-editor-notification--error" };
|
|
142
|
+
function se(s, _) {
|
|
143
|
+
return c(), v("div", le, [
|
|
144
|
+
S(s.$slots, "default")
|
|
145
145
|
]);
|
|
146
146
|
}
|
|
147
|
-
const ie = /* @__PURE__ */
|
|
147
|
+
const ie = /* @__PURE__ */ E(ne, [["render", se]]), de = /* @__PURE__ */ b({
|
|
148
148
|
__name: "SwaggerEditor",
|
|
149
149
|
props: {
|
|
150
150
|
value: {},
|
|
@@ -153,8 +153,8 @@ const ie = /* @__PURE__ */ b(ne, [["render", le]]), de = /* @__PURE__ */ E({
|
|
|
153
153
|
error: {}
|
|
154
154
|
},
|
|
155
155
|
emits: ["contentUpdate", "import", "changeTheme"],
|
|
156
|
-
setup(
|
|
157
|
-
const o =
|
|
156
|
+
setup(s, { expose: _, emit: m }) {
|
|
157
|
+
const o = s, t = C(null), r = (e) => {
|
|
158
158
|
m("contentUpdate", e);
|
|
159
159
|
}, g = D(() => {
|
|
160
160
|
if (o.error === void 0 || o.error === null || o.error === "")
|
|
@@ -171,14 +171,14 @@ const ie = /* @__PURE__ */ b(ne, [["render", le]]), de = /* @__PURE__ */ E({
|
|
|
171
171
|
{ immediate: !0 }
|
|
172
172
|
), _({
|
|
173
173
|
handleOpenSwaggerEditor: (e) => {
|
|
174
|
-
var f, d,
|
|
175
|
-
e === "importUrl" ? (d = (f = t == null ? void 0 : t.value) == null ? void 0 : f.importUrlModal) == null || d.show() : e === "uploadFile" && ((
|
|
174
|
+
var f, d, U;
|
|
175
|
+
e === "importUrl" ? (d = (f = t == null ? void 0 : t.value) == null ? void 0 : f.importUrlModal) == null || d.show() : e === "uploadFile" && ((U = t == null ? void 0 : t.value) == null || U.openFileDialog());
|
|
176
176
|
}
|
|
177
177
|
}), (e, f) => (c(), v(k, null, [
|
|
178
178
|
n(a(z), { id: e.theme }, null, 8, ["id"]),
|
|
179
179
|
n(Q, null, {
|
|
180
180
|
default: p(({ styles: d }) => [
|
|
181
|
-
|
|
181
|
+
y("div", {
|
|
182
182
|
class: L(["swagger-editor", d])
|
|
183
183
|
}, [
|
|
184
184
|
n(re, {
|
|
@@ -213,7 +213,7 @@ const ie = /* @__PURE__ */ b(ne, [["render", le]]), de = /* @__PURE__ */ E({
|
|
|
213
213
|
})
|
|
214
214
|
], 64));
|
|
215
215
|
}
|
|
216
|
-
}), me = /* @__PURE__ */
|
|
216
|
+
}), me = /* @__PURE__ */ E(de, [["__scopeId", "data-v-68ed8e3f"]]);
|
|
217
217
|
export {
|
|
218
218
|
me as CodeEditor,
|
|
219
219
|
F as HeaderTabButton,
|