@scalar/api-reference 1.11.1 → 1.12.1
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 +21 -0
- package/dist/browser/standalone.js +7 -7
- package/dist/components/Card/CardContent.vue.d.ts.map +1 -1
- package/dist/components/Card/CardHeader.vue.d.ts.map +1 -1
- package/dist/components/Content/Authentication/Authentication.stories.d.ts +1 -1
- package/dist/components/Content/Authentication/Authentication.stories.d.ts.map +1 -1
- package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +1 -1
- package/dist/components/Content/Authentication/CardForm.vue.d.ts +10 -0
- package/dist/components/Content/Authentication/CardForm.vue.d.ts.map +1 -0
- package/dist/components/Content/Authentication/CardFormButton.vue.d.ts +12 -0
- package/dist/components/Content/Authentication/CardFormButton.vue.d.ts.map +1 -0
- package/dist/components/Content/Authentication/CardFormGroup.vue.d.ts +10 -0
- package/dist/components/Content/Authentication/CardFormGroup.vue.d.ts.map +1 -0
- package/dist/components/Content/Authentication/CardFormTextInput.vue.d.ts +25 -0
- package/dist/components/Content/Authentication/CardFormTextInput.vue.d.ts.map +1 -0
- package/dist/components/Content/Authentication/SecurityScheme.vue.d.ts +3 -2
- package/dist/components/Content/Authentication/SecurityScheme.vue.d.ts.map +1 -1
- package/dist/components/Content/Authentication/SecuritySchemeScopes.vue.d.ts +26 -0
- package/dist/components/Content/Authentication/SecuritySchemeScopes.vue.d.ts.map +1 -0
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/ReferenceEndpoint/ReferenceEndpointAccordion.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.d.ts +9 -2
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.d.ts +2 -0
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/SidebarGroup.vue.d.ts.map +1 -1
- package/dist/hooks/useParser.d.ts +1 -1
- package/dist/{index-f1bc79c0.js → index-40c04fd6.js} +8766 -8476
- package/dist/{index-265bad8d.js → index-c80cf0e6.js} +30 -29
- package/dist/index.js +49 -48
- package/dist/stores/globalStore.d.ts +5 -1
- package/dist/stores/globalStore.d.ts.map +1 -1
- package/dist/types.d.ts +7 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useMediaQuery as
|
|
1
|
+
import { defineComponent as b, ref as w, watch as I, openBlock as p, createElementBlock as g, Fragment as E, createElementVNode as U, unref as a, createTextVNode as d, createCommentVNode as S, renderSlot as k, createVNode as s, withCtx as u, toDisplayString as N, computed as D, isRef as B, normalizeClass as L, createBlock as T } from "vue";
|
|
2
|
+
import { o as j, H as R, E as H, U as O, u as F, f as A, _ as M, a as J, d as z, R as Q } from "./index-40c04fd6.js";
|
|
3
|
+
import { b as De } from "./index-40c04fd6.js";
|
|
4
|
+
import { useMediaQuery as W, useFileDialog as Y } from "@vueuse/core";
|
|
5
5
|
import "@headlessui/vue";
|
|
6
6
|
import "axios";
|
|
7
7
|
import "httpsnippet-lite";
|
|
@@ -12,6 +12,7 @@ import "remark-stringify";
|
|
|
12
12
|
import "unified";
|
|
13
13
|
import "js-yaml";
|
|
14
14
|
import "unhead";
|
|
15
|
+
import "@floating-ui/vue";
|
|
15
16
|
import "rehype-external-links";
|
|
16
17
|
import "rehype-format";
|
|
17
18
|
import "rehype-highlight";
|
|
@@ -20,7 +21,7 @@ import "rehype-stringify";
|
|
|
20
21
|
import "remark-gfm";
|
|
21
22
|
import "remark-rehype";
|
|
22
23
|
import "fuse.js";
|
|
23
|
-
const
|
|
24
|
+
const q = (i) => {
|
|
24
25
|
if (typeof i != "string")
|
|
25
26
|
return !1;
|
|
26
27
|
try {
|
|
@@ -29,14 +30,14 @@ const Y = (i) => {
|
|
|
29
30
|
return !1;
|
|
30
31
|
}
|
|
31
32
|
return !0;
|
|
32
|
-
}, 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__ */
|
|
33
|
+
}, 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({
|
|
33
34
|
__name: "SwaggerEditorHeader",
|
|
34
35
|
props: {
|
|
35
36
|
proxyUrl: {}
|
|
36
37
|
},
|
|
37
38
|
emits: ["import"],
|
|
38
39
|
setup(i, { expose: v, emit: c }) {
|
|
39
|
-
const o = i, e =
|
|
40
|
+
const o = i, e = W("(max-width: 1000px)"), { files: r, open: m, reset: C } = Y({
|
|
40
41
|
multiple: !1,
|
|
41
42
|
accept: ".json,.yaml,.yml"
|
|
42
43
|
}), _ = j(), t = w(null);
|
|
@@ -45,20 +46,20 @@ const Y = (i) => {
|
|
|
45
46
|
openFileDialog: m
|
|
46
47
|
});
|
|
47
48
|
const f = w(""), h = () => {
|
|
48
|
-
t.value = "",
|
|
49
|
+
t.value = "", A(f.value, o.proxyUrl).then(async (n) => {
|
|
49
50
|
c("import", n), _.hide();
|
|
50
51
|
}).catch((n) => {
|
|
51
52
|
console.error("[importUrl]", n), t.value = n;
|
|
52
53
|
});
|
|
53
54
|
};
|
|
54
|
-
return
|
|
55
|
+
return I(r, () => {
|
|
55
56
|
var n;
|
|
56
57
|
if ((n = r.value) != null && n.length) {
|
|
57
58
|
const l = r.value[0], y = new FileReader();
|
|
58
59
|
y.onload = (V) => {
|
|
59
60
|
var x;
|
|
60
|
-
const
|
|
61
|
-
typeof
|
|
61
|
+
const $ = (x = V.target) == null ? void 0 : x.result;
|
|
62
|
+
typeof $ == "string" && (c("import", $), C());
|
|
62
63
|
}, y.readAsText(l);
|
|
63
64
|
}
|
|
64
65
|
}), (n, l) => (p(), g(E, null, [
|
|
@@ -106,8 +107,8 @@ const Y = (i) => {
|
|
|
106
107
|
labelShadowColor: "var(--theme-background-1, var(--default-theme-background-1))",
|
|
107
108
|
placeholder: "https://scalar.com/swagger.json"
|
|
108
109
|
}, null, 8, ["modelValue"]),
|
|
109
|
-
d(" " +
|
|
110
|
-
s(a(
|
|
110
|
+
d(" " + N(t.value) + " ", 1),
|
|
111
|
+
s(a(F), {
|
|
111
112
|
variant: "outlined",
|
|
112
113
|
onClick: l[3] || (l[3] = (y) => a(_).hide())
|
|
113
114
|
}, {
|
|
@@ -116,7 +117,7 @@ const Y = (i) => {
|
|
|
116
117
|
]),
|
|
117
118
|
_: 1
|
|
118
119
|
}),
|
|
119
|
-
s(a(
|
|
120
|
+
s(a(F), { onClick: h }, {
|
|
120
121
|
default: u(() => [
|
|
121
122
|
d("Import")
|
|
122
123
|
]),
|
|
@@ -128,7 +129,7 @@ const Y = (i) => {
|
|
|
128
129
|
}, 8, ["state"])
|
|
129
130
|
], 64));
|
|
130
131
|
}
|
|
131
|
-
}), re = /* @__PURE__ */
|
|
132
|
+
}), re = /* @__PURE__ */ M(te, [["__scopeId", "data-v-17d421af"]]), oe = { class: "swagger-editor-input" }, ae = /* @__PURE__ */ b({
|
|
132
133
|
__name: "SwaggerEditorInput",
|
|
133
134
|
props: {
|
|
134
135
|
value: {}
|
|
@@ -143,10 +144,10 @@ const Y = (i) => {
|
|
|
143
144
|
});
|
|
144
145
|
const c = w(null);
|
|
145
146
|
function o(e) {
|
|
146
|
-
return
|
|
147
|
+
return q(e) ? ["json"] : ["yaml"];
|
|
147
148
|
}
|
|
148
149
|
return (e, r) => (p(), g("div", oe, [
|
|
149
|
-
s(a(
|
|
150
|
+
s(a(J), {
|
|
150
151
|
ref_key: "codeMirrorRef",
|
|
151
152
|
ref: c,
|
|
152
153
|
content: e.value,
|
|
@@ -162,7 +163,7 @@ function le(i, v) {
|
|
|
162
163
|
k(i.$slots, "default")
|
|
163
164
|
]);
|
|
164
165
|
}
|
|
165
|
-
const ie = /* @__PURE__ */
|
|
166
|
+
const ie = /* @__PURE__ */ M(ne, [["render", le]]), de = /* @__PURE__ */ b({
|
|
166
167
|
__name: "SwaggerEditor",
|
|
167
168
|
props: {
|
|
168
169
|
value: {},
|
|
@@ -181,7 +182,7 @@ const ie = /* @__PURE__ */ $(ne, [["render", le]]), de = /* @__PURE__ */ M({
|
|
|
181
182
|
return t.startsWith("YAMLException:") ? t.split(`
|
|
182
183
|
`)[0] : t;
|
|
183
184
|
});
|
|
184
|
-
return
|
|
185
|
+
return I(
|
|
185
186
|
() => o.value,
|
|
186
187
|
async () => {
|
|
187
188
|
o.value && r(o.value);
|
|
@@ -193,8 +194,8 @@ const ie = /* @__PURE__ */ $(ne, [["render", le]]), de = /* @__PURE__ */ M({
|
|
|
193
194
|
t === "importUrl" ? (h = (f = e == null ? void 0 : e.value) == null ? void 0 : f.importUrlModal) == null || h.show() : t === "uploadFile" && ((n = e == null ? void 0 : e.value) == null || n.openFileDialog());
|
|
194
195
|
}
|
|
195
196
|
}), (t, f) => (p(), g(E, null, [
|
|
196
|
-
s(a(
|
|
197
|
-
s(
|
|
197
|
+
s(a(z), { id: t.theme }, null, 8, ["id"]),
|
|
198
|
+
s(Q, null, {
|
|
198
199
|
default: u(({ styles: h }) => [
|
|
199
200
|
U("div", {
|
|
200
201
|
class: L(["swagger-editor", h])
|
|
@@ -212,7 +213,7 @@ const ie = /* @__PURE__ */ $(ne, [["render", le]]), de = /* @__PURE__ */ M({
|
|
|
212
213
|
}, 8, ["proxyUrl"]),
|
|
213
214
|
C.value ? (p(), T(ie, { key: 0 }, {
|
|
214
215
|
default: u(() => [
|
|
215
|
-
d(
|
|
216
|
+
d(N(C.value), 1)
|
|
216
217
|
]),
|
|
217
218
|
_: 1
|
|
218
219
|
})) : S("", !0),
|
|
@@ -235,13 +236,13 @@ const ie = /* @__PURE__ */ $(ne, [["render", le]]), de = /* @__PURE__ */ M({
|
|
|
235
236
|
})
|
|
236
237
|
], 64));
|
|
237
238
|
}
|
|
238
|
-
}),
|
|
239
|
+
}), Ie = /* @__PURE__ */ M(de, [["__scopeId", "data-v-fcc7bbc6"]]);
|
|
239
240
|
export {
|
|
240
|
-
|
|
241
|
+
Ie as CodeEditor,
|
|
241
242
|
R as HeaderTabButton,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
243
|
+
Q as ResetStyles,
|
|
244
|
+
Ie as SwaggerEditor,
|
|
245
|
+
A as fetchSpecFromUrl,
|
|
246
|
+
q as isJsonString,
|
|
247
|
+
De as useDarkModeState
|
|
247
248
|
};
|