@scalar/api-reference 1.17.14 → 1.17.15
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 +12 -0
- package/dist/browser/standalone.js +9 -9
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Authentication/CardFormButton.vue.d.ts.map +1 -1
- package/dist/components/Content/Authentication/SecuritySchemeScopes.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/index-D-6YXdFT.js +227 -0
- package/dist/{index-DuYygTDh.js → index-WyPUQrGJ.js} +7492 -7301
- package/dist/index.js +2 -2
- package/package.json +5 -5
- package/dist/index-C9XLhF-G.js +0 -415
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardFormButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Authentication/CardFormButton.vue.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"CardFormButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Authentication/CardFormButton.vue.ts"],"names":[],"mappings":";;;;;AA2EA,wBAAwG;AACxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecuritySchemeScopes.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Authentication/SecuritySchemeScopes.vue.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"SecuritySchemeScopes.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Authentication/SecuritySchemeScopes.vue.ts"],"names":[],"mappings":";;;;cAqUY,MAAM,EAAE;;;;;;;cAAR,MAAM,EAAE;;;;AAPpB,wBAUG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;;AAwZvC,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/MobileHeader.vue.ts"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MobileHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/MobileHeader.vue.ts"],"names":[],"mappings":";;;;;;;;;;;AAoIA,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkUA,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { defineComponent as b, ref as k, watch as R, openBlock as m, createElementBlock as f, Fragment as E, createElementVNode as U, unref as a, createTextVNode as c, createCommentVNode as S, renderSlot as x, createVNode as s, withCtx as p, toDisplayString as V, computed as D, isRef as L, normalizeClass as T, createBlock as j } from "vue";
|
|
2
|
+
import { b as H, H as I, r as O, l as A, C as N, f as J, _ as $, a as z, h as Q, R as W } from "./index-WyPUQrGJ.js";
|
|
3
|
+
import { u as _e } from "./index-WyPUQrGJ.js";
|
|
4
|
+
import { useMediaQuery as Y, useFileDialog as q } from "@vueuse/core";
|
|
5
|
+
const G = (l) => {
|
|
6
|
+
if (typeof l != "string")
|
|
7
|
+
return !1;
|
|
8
|
+
try {
|
|
9
|
+
JSON.parse(l);
|
|
10
|
+
} catch {
|
|
11
|
+
return !1;
|
|
12
|
+
}
|
|
13
|
+
return !0;
|
|
14
|
+
}, K = { class: "swagger-editor-header" }, P = { class: "swagger-editor-title" }, X = { class: "swagger-editor-actions" }, Z = { key: 0 }, ee = { key: 0 }, te = { class: "swagger-editor-modal-layout" }, re = /* @__PURE__ */ b({
|
|
15
|
+
__name: "SwaggerEditorHeader",
|
|
16
|
+
props: {
|
|
17
|
+
proxyUrl: {}
|
|
18
|
+
},
|
|
19
|
+
emits: ["import"],
|
|
20
|
+
setup(l, { expose: v, emit: y }) {
|
|
21
|
+
const r = l, _ = y, o = Y("(max-width: 1000px)"), { files: t, open: n, reset: w } = q({
|
|
22
|
+
multiple: !1,
|
|
23
|
+
accept: ".json,.yaml,.yml"
|
|
24
|
+
}), e = H(), g = k(null);
|
|
25
|
+
v({
|
|
26
|
+
importUrlModal: e,
|
|
27
|
+
openFileDialog: n
|
|
28
|
+
});
|
|
29
|
+
const u = k(""), C = () => {
|
|
30
|
+
g.value = "", J(u.value, r.proxyUrl).then(async (d) => {
|
|
31
|
+
_("import", d), e.hide();
|
|
32
|
+
}).catch((d) => {
|
|
33
|
+
console.error("[importUrl]", d), g.value = d;
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
return R(t, () => {
|
|
37
|
+
var d;
|
|
38
|
+
if ((d = t.value) != null && d.length) {
|
|
39
|
+
const i = t.value[0], h = new FileReader();
|
|
40
|
+
h.onload = (B) => {
|
|
41
|
+
var F;
|
|
42
|
+
const M = (F = B.target) == null ? void 0 : F.result;
|
|
43
|
+
typeof M == "string" && (_("import", M), w());
|
|
44
|
+
}, h.readAsText(i);
|
|
45
|
+
}
|
|
46
|
+
}), (d, i) => (m(), f(E, null, [
|
|
47
|
+
U("div", K, [
|
|
48
|
+
U("div", P, [
|
|
49
|
+
a(o) ? S("", !0) : (m(), f(E, { key: 0 }, [
|
|
50
|
+
c("Swagger ")
|
|
51
|
+
], 64)),
|
|
52
|
+
c("Editor ")
|
|
53
|
+
]),
|
|
54
|
+
x(d.$slots, "tab-items", {}, void 0, !0),
|
|
55
|
+
U("div", X, [
|
|
56
|
+
s(I, {
|
|
57
|
+
onClick: i[0] || (i[0] = () => a(n)())
|
|
58
|
+
}, {
|
|
59
|
+
default: p(() => [
|
|
60
|
+
c(" Upload"),
|
|
61
|
+
a(o) ? S("", !0) : (m(), f("span", Z, " File"))
|
|
62
|
+
]),
|
|
63
|
+
_: 1
|
|
64
|
+
}),
|
|
65
|
+
s(I, {
|
|
66
|
+
onClick: i[1] || (i[1] = (h) => a(e).show())
|
|
67
|
+
}, {
|
|
68
|
+
default: p(() => [
|
|
69
|
+
a(o) ? S("", !0) : (m(), f("span", ee, "Import ")),
|
|
70
|
+
c("URL ")
|
|
71
|
+
]),
|
|
72
|
+
_: 1
|
|
73
|
+
})
|
|
74
|
+
])
|
|
75
|
+
]),
|
|
76
|
+
s(a(O), {
|
|
77
|
+
state: a(e),
|
|
78
|
+
title: "Import Swagger from URL"
|
|
79
|
+
}, {
|
|
80
|
+
default: p(() => [
|
|
81
|
+
U("div", te, [
|
|
82
|
+
s(a(A), {
|
|
83
|
+
modelValue: u.value,
|
|
84
|
+
"onUpdate:modelValue": i[2] || (i[2] = (h) => u.value = h),
|
|
85
|
+
autofocus: "",
|
|
86
|
+
class: "swagger-editor-modal-layout-input",
|
|
87
|
+
label: "URL",
|
|
88
|
+
labelShadowColor: "var(--theme-background-1, var(--default-theme-background-1))",
|
|
89
|
+
placeholder: "https://scalar.com/swagger.json"
|
|
90
|
+
}, null, 8, ["modelValue"]),
|
|
91
|
+
c(" " + V(g.value) + " ", 1),
|
|
92
|
+
s(a(N), {
|
|
93
|
+
variant: "outlined",
|
|
94
|
+
onClick: i[3] || (i[3] = (h) => a(e).hide())
|
|
95
|
+
}, {
|
|
96
|
+
default: p(() => [
|
|
97
|
+
c(" Cancel ")
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
}),
|
|
101
|
+
s(a(N), { onClick: C }, {
|
|
102
|
+
default: p(() => [
|
|
103
|
+
c("Import")
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
})
|
|
107
|
+
])
|
|
108
|
+
]),
|
|
109
|
+
_: 1
|
|
110
|
+
}, 8, ["state"])
|
|
111
|
+
], 64));
|
|
112
|
+
}
|
|
113
|
+
}), oe = /* @__PURE__ */ $(re, [["__scopeId", "data-v-17d421af"]]), ae = { class: "swagger-editor-input" }, ne = /* @__PURE__ */ b({
|
|
114
|
+
__name: "SwaggerEditorInput",
|
|
115
|
+
props: {
|
|
116
|
+
value: {}
|
|
117
|
+
},
|
|
118
|
+
emits: ["contentUpdate"],
|
|
119
|
+
setup(l, { expose: v }) {
|
|
120
|
+
const y = l;
|
|
121
|
+
v({
|
|
122
|
+
setCodeMirrorContent: (t) => {
|
|
123
|
+
var n;
|
|
124
|
+
(n = r.value) == null || n.setCodeMirrorContent(t);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const r = k(null);
|
|
128
|
+
function _(t) {
|
|
129
|
+
return G(t) ? "json" : "yaml";
|
|
130
|
+
}
|
|
131
|
+
const o = D(() => _(y.value));
|
|
132
|
+
return (t, n) => (m(), f("div", ae, [
|
|
133
|
+
s(a(z), {
|
|
134
|
+
ref_key: "codeMirrorRef",
|
|
135
|
+
ref: r,
|
|
136
|
+
content: t.value,
|
|
137
|
+
language: o.value,
|
|
138
|
+
lineNumbers: "",
|
|
139
|
+
onChange: n[0] || (n[0] = (w) => t.$emit("contentUpdate", w))
|
|
140
|
+
}, null, 8, ["content", "language"])
|
|
141
|
+
]));
|
|
142
|
+
}
|
|
143
|
+
}), se = {}, le = { class: "swagger-editor-notification swagger-editor-notification--error" };
|
|
144
|
+
function ie(l, v) {
|
|
145
|
+
return m(), f("div", le, [
|
|
146
|
+
x(l.$slots, "default")
|
|
147
|
+
]);
|
|
148
|
+
}
|
|
149
|
+
const de = /* @__PURE__ */ $(se, [["render", ie]]), ue = /* @__PURE__ */ b({
|
|
150
|
+
__name: "SwaggerEditor",
|
|
151
|
+
props: {
|
|
152
|
+
value: {},
|
|
153
|
+
theme: {},
|
|
154
|
+
proxyUrl: {},
|
|
155
|
+
error: {}
|
|
156
|
+
},
|
|
157
|
+
emits: ["contentUpdate", "import", "changeTheme"],
|
|
158
|
+
setup(l, { expose: v, emit: y }) {
|
|
159
|
+
const r = l, _ = y, o = k(null), t = (e) => {
|
|
160
|
+
_("contentUpdate", e);
|
|
161
|
+
}, n = D(() => {
|
|
162
|
+
if (r.error === void 0 || r.error === null || r.error === "")
|
|
163
|
+
return "";
|
|
164
|
+
const e = L(r.error) ? r.error.value : r.error;
|
|
165
|
+
return e.startsWith("YAMLException:") ? e.split(`
|
|
166
|
+
`)[0] : e;
|
|
167
|
+
});
|
|
168
|
+
return R(
|
|
169
|
+
() => r.value,
|
|
170
|
+
async () => {
|
|
171
|
+
r.value && t(r.value);
|
|
172
|
+
},
|
|
173
|
+
{ immediate: !0 }
|
|
174
|
+
), v({
|
|
175
|
+
handleOpenSwaggerEditor: (e) => {
|
|
176
|
+
var g, u, C;
|
|
177
|
+
e === "importUrl" ? (u = (g = o == null ? void 0 : o.value) == null ? void 0 : g.importUrlModal) == null || u.show() : e === "uploadFile" && ((C = o == null ? void 0 : o.value) == null || C.openFileDialog());
|
|
178
|
+
}
|
|
179
|
+
}), (e, g) => (m(), f(E, null, [
|
|
180
|
+
s(a(Q), { id: e.theme }, null, 8, ["id"]),
|
|
181
|
+
s(W, null, {
|
|
182
|
+
default: p(({ styles: u }) => [
|
|
183
|
+
U("div", {
|
|
184
|
+
class: T(["swagger-editor", u])
|
|
185
|
+
}, [
|
|
186
|
+
s(oe, {
|
|
187
|
+
ref_key: "swaggerEditorHeaderRef",
|
|
188
|
+
ref: o,
|
|
189
|
+
proxyUrl: e.proxyUrl,
|
|
190
|
+
onImport: t
|
|
191
|
+
}, {
|
|
192
|
+
"tab-items": p(() => [
|
|
193
|
+
x(e.$slots, "tab-items", {}, void 0, !0)
|
|
194
|
+
]),
|
|
195
|
+
_: 3
|
|
196
|
+
}, 8, ["proxyUrl"]),
|
|
197
|
+
n.value ? (m(), j(de, { key: 0 }, {
|
|
198
|
+
default: p(() => [
|
|
199
|
+
c(V(n.value), 1)
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
})) : S("", !0),
|
|
203
|
+
x(e.$slots, "editor-input", {
|
|
204
|
+
value: e.value,
|
|
205
|
+
onContentUpdate: t
|
|
206
|
+
}, () => [
|
|
207
|
+
s(ne, {
|
|
208
|
+
value: e.value,
|
|
209
|
+
onContentUpdate: t
|
|
210
|
+
}, null, 8, ["value"])
|
|
211
|
+
], !0)
|
|
212
|
+
], 2)
|
|
213
|
+
]),
|
|
214
|
+
_: 3
|
|
215
|
+
})
|
|
216
|
+
], 64));
|
|
217
|
+
}
|
|
218
|
+
}), ge = /* @__PURE__ */ $(ue, [["__scopeId", "data-v-68ed8e3f"]]);
|
|
219
|
+
export {
|
|
220
|
+
ge as CodeEditor,
|
|
221
|
+
I as HeaderTabButton,
|
|
222
|
+
W as ResetStyles,
|
|
223
|
+
ge as SwaggerEditor,
|
|
224
|
+
J as fetchSpecFromUrl,
|
|
225
|
+
G as isJsonString,
|
|
226
|
+
_e as useDarkModeState
|
|
227
|
+
};
|