@scalar/api-reference 1.28.2 → 1.28.3
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 +20 -0
- package/dist/blocks/hooks/useBlockProps.d.ts +4 -5
- package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -1
- package/dist/blocks/hooks/useBlockProps.js +10 -14
- package/dist/browser/standalone.js +5311 -5296
- package/dist/browser/webpack-stats.json +1 -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 +103 -109
- 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 +97 -71
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +18 -18
- package/dist/components/Content/Lazy/Loading.vue.d.ts +3 -0
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +58 -56
- package/dist/components/Content/Tag/OperationsList.vue.d.ts +2 -0
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsList.vue2.js +22 -20
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -0
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +10 -8
- package/dist/components/Content/Tag/Tag.vue.d.ts +2 -0
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +38 -34
- package/dist/components/Content/Tag/TagList.vue.d.ts +3 -0
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +32 -30
- package/dist/components/Content/Tag/TagSection.vue.d.ts +2 -0
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagSection.vue.js +2 -2
- package/dist/components/Content/Tag/TagSection.vue2.js +16 -14
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/features/ApiClientModal/useApiClient.d.ts +6 -6
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts +6 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +36 -32
- package/dist/features/Operation/Operation.vue.d.ts +1 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +13 -12
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.js +49 -41
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/standalone/lib/html-api.d.ts +8 -9
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -11
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { defineComponent as V, computed as
|
|
1
|
+
import { defineComponent as V, computed as s, onMounted as $, openBlock as l, createBlock as a, unref as o, withCtx as t, createVNode as r, createElementVNode as g, createTextVNode as d, toDisplayString as f, createCommentVNode as u, renderSlot as S } from "vue";
|
|
2
2
|
import w from "github-slugger";
|
|
3
3
|
import { useConfig as N } from "../../../hooks/useConfig.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import B from "../../../features/DownloadLink/DownloadLink.vue.js";
|
|
5
|
+
import D from "./Description.vue.js";
|
|
6
|
+
import H from "../../Section/SectionContainer.vue.js";
|
|
7
|
+
import b from "../../Section/Section.vue.js";
|
|
8
8
|
import L from "../../Section/SectionContent.vue.js";
|
|
9
9
|
import _ from "../../Badge/Badge.vue.js";
|
|
10
10
|
import A from "../../Section/SectionHeader.vue.js";
|
|
11
11
|
import E from "../../Section/SectionHeaderTag.vue.js";
|
|
12
12
|
import F from "../../Section/SectionColumns.vue.js";
|
|
13
13
|
import C from "../../Section/SectionColumn.vue.js";
|
|
14
|
-
const G = { class: "
|
|
14
|
+
const G = { class: "flex gap-1" }, I = { class: "sticky-cards" }, Y = /* @__PURE__ */ V({
|
|
15
15
|
__name: "Introduction",
|
|
16
16
|
props: {
|
|
17
17
|
info: {},
|
|
18
18
|
parsedSpec: {}
|
|
19
19
|
},
|
|
20
20
|
setup(k) {
|
|
21
|
-
const i = k,
|
|
21
|
+
const i = k, p = s(
|
|
22
22
|
() => {
|
|
23
23
|
var e, n;
|
|
24
24
|
return ((e = i.parsedSpec) == null ? void 0 : e.openapi) ?? ((n = i.parsedSpec) == null ? void 0 : n.swagger) ?? "";
|
|
25
25
|
}
|
|
26
|
-
), y = new w(), h =
|
|
26
|
+
), y = new w(), h = s(() => {
|
|
27
27
|
var e;
|
|
28
28
|
return y.slug(((e = i.info) == null ? void 0 : e.title) ?? "");
|
|
29
|
-
}),
|
|
29
|
+
}), m = s(() => {
|
|
30
30
|
var e, n;
|
|
31
31
|
return typeof ((e = i.info) == null ? void 0 : e.version) == "string" ? i.info.version.toString().match(/^\d/) ? `v${i.info.version}` : i.info.version : typeof ((n = i.info) == null ? void 0 : n.version) == "number" ? `v${i.info.version}` : void 0;
|
|
32
32
|
}), T = N();
|
|
33
33
|
return $(() => {
|
|
34
34
|
var e, n;
|
|
35
35
|
return (n = (e = T.value).onLoaded) == null ? void 0 : n.call(e);
|
|
36
|
-
}), (e, n) => (l(),
|
|
36
|
+
}), (e, n) => (l(), a(o(H), null, {
|
|
37
37
|
default: t(() => [
|
|
38
|
-
r(o(
|
|
38
|
+
r(o(b), { class: "introduction-section gap-12" }, {
|
|
39
39
|
default: t(() => {
|
|
40
40
|
var c, v;
|
|
41
41
|
return [
|
|
@@ -44,15 +44,15 @@ const G = { class: "badges" }, I = { class: "sticky-cards" }, Y = /* @__PURE__ *
|
|
|
44
44
|
}, {
|
|
45
45
|
default: t(() => [
|
|
46
46
|
g("div", G, [
|
|
47
|
-
|
|
47
|
+
m.value ? (l(), a(o(_), { key: 0 }, {
|
|
48
48
|
default: t(() => [
|
|
49
|
-
d(f(
|
|
49
|
+
d(f(m.value), 1)
|
|
50
50
|
]),
|
|
51
51
|
_: 1
|
|
52
52
|
})) : u("", !0),
|
|
53
|
-
|
|
53
|
+
p.value ? (l(), a(o(_), { key: 1 }, {
|
|
54
54
|
default: t(() => [
|
|
55
|
-
d("OAS " + f(
|
|
55
|
+
d("OAS " + f(p.value), 1)
|
|
56
56
|
]),
|
|
57
57
|
_: 1
|
|
58
58
|
})) : u("", !0)
|
|
@@ -71,18 +71,18 @@ const G = { class: "badges" }, I = { class: "sticky-cards" }, Y = /* @__PURE__ *
|
|
|
71
71
|
]),
|
|
72
72
|
_: 1
|
|
73
73
|
}, 8, ["loading"]),
|
|
74
|
-
r(
|
|
74
|
+
r(B, { specTitle: h.value }, null, 8, ["specTitle"]),
|
|
75
75
|
r(o(F), null, {
|
|
76
76
|
default: t(() => [
|
|
77
77
|
r(o(C), null, {
|
|
78
78
|
default: t(() => [
|
|
79
|
-
r(
|
|
79
|
+
r(D, {
|
|
80
80
|
value: e.info.description
|
|
81
81
|
}, null, 8, ["value"])
|
|
82
82
|
]),
|
|
83
83
|
_: 1
|
|
84
84
|
}),
|
|
85
|
-
e.$slots.aside ? (l(),
|
|
85
|
+
e.$slots.aside ? (l(), a(o(C), { key: 0 }, {
|
|
86
86
|
default: t(() => [
|
|
87
87
|
g("div", I, [
|
|
88
88
|
S(e.$slots, "aside", {}, void 0, !0)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Collection, Server } from '@scalar/oas-utils/entities/spec';
|
|
1
2
|
import type { Spec } from '@scalar/types/legacy';
|
|
2
3
|
/**
|
|
3
4
|
* Loads a "fake" tag/modal/operation if the user is deep linking
|
|
@@ -13,6 +14,8 @@ import type { Spec } from '@scalar/types/legacy';
|
|
|
13
14
|
* - need to find an event for codemirror loaded, currently using timeout for models
|
|
14
15
|
*/
|
|
15
16
|
type __VLS_Props = {
|
|
17
|
+
collection: Collection;
|
|
18
|
+
server?: Server;
|
|
16
19
|
layout?: 'modern' | 'classic';
|
|
17
20
|
parsedSpec: Spec;
|
|
18
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Lazy/Loading.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Loading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Lazy/Loading.vue"],"names":[],"mappings":"AAwOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAEzE,OAAO,KAAK,EACV,IAAI,EAGL,MAAM,sBAAsB,CAAA;AAqB7B;;;;;;;;;;;;GAYG;AACH,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;;YAFS,QAAQ,GAAG,SAAS;;AA8QjC,wBAQG"}
|
|
@@ -1,50 +1,51 @@
|
|
|
1
|
-
import { defineComponent as D, ref as v, watch as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useNavState as re } from "../../../hooks/useNavState.js";
|
|
1
|
+
import { defineComponent as D, ref as v, watch as E, onMounted as H, withDirectives as K, openBlock as l, createElementBlock as f, normalizeClass as M, Fragment as g, renderList as w, createBlock as m, unref as r, withCtx as d, createCommentVNode as T, createVNode as h, createTextVNode as j, toDisplayString as A, vShow as F } from "vue";
|
|
2
|
+
import { lazyBus as P } from "./lazyBus.js";
|
|
3
|
+
import q from "../Tag/TagSection.vue.js";
|
|
4
|
+
import G from "../../../features/Operation/Operation.vue.js";
|
|
5
|
+
import J from "../../Section/SectionContainer.vue.js";
|
|
6
|
+
import Q from "../../Section/Section.vue.js";
|
|
7
|
+
import R from "../../Section/SectionContent.vue.js";
|
|
8
|
+
import U from "../../Section/SectionHeader.vue.js";
|
|
9
|
+
import X from "../../Anchor/Anchor.vue.js";
|
|
10
|
+
import Y from "../../Section/SectionHeaderTag.vue.js";
|
|
11
|
+
import Z from "../Schema/Schema.vue.js";
|
|
12
|
+
import { useNavState as ee } from "../../../hooks/useNavState.js";
|
|
14
13
|
import { getModels as S } from "../../../helpers/getModels.js";
|
|
15
|
-
import { scrollToId as
|
|
16
|
-
const
|
|
14
|
+
import { scrollToId as L } from "../../../helpers/scrollToId.js";
|
|
15
|
+
const ve = /* @__PURE__ */ D({
|
|
17
16
|
__name: "Loading",
|
|
18
17
|
props: {
|
|
18
|
+
collection: {},
|
|
19
|
+
server: {},
|
|
19
20
|
layout: { default: "modern" },
|
|
20
21
|
parsedSpec: {}
|
|
21
22
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const i =
|
|
24
|
-
|
|
23
|
+
setup(O) {
|
|
24
|
+
const i = O, C = v(!1), y = v([]), I = v([]), { getModelId: V, getSectionId: z, getTagId: B, hash: a, isIntersectionEnabled: b } = ee(), _ = v(i.layout !== "classic" && a.value);
|
|
25
|
+
E(
|
|
25
26
|
() => {
|
|
26
|
-
var
|
|
27
|
-
return (
|
|
27
|
+
var t;
|
|
28
|
+
return (t = i.parsedSpec.tags) == null ? void 0 : t.length;
|
|
28
29
|
},
|
|
29
|
-
(
|
|
30
|
+
(t) => {
|
|
30
31
|
var e, u;
|
|
31
|
-
if (!a.value || typeof
|
|
32
|
+
if (!a.value || typeof t != "number" || !i.parsedSpec.tags)
|
|
32
33
|
return;
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
34
|
+
const n = z();
|
|
35
|
+
if (n.startsWith("tag")) {
|
|
35
36
|
let o = 0;
|
|
36
37
|
const c = ((e = i.parsedSpec.tags) == null ? void 0 : e.findIndex(
|
|
37
|
-
(k) =>
|
|
38
|
+
(k) => B(k) === n
|
|
38
39
|
)) ?? 0, s = a.value.match(/tag\/([^/]+)\/([^/]+)\/(.+)/);
|
|
39
40
|
if ((s == null ? void 0 : s.length) === 4) {
|
|
40
41
|
const k = s[2], W = "/" + s[3];
|
|
41
42
|
o = (u = i.parsedSpec.tags[c]) == null ? void 0 : u.operations.findIndex(
|
|
42
|
-
({ httpVerb: $, path:
|
|
43
|
+
({ httpVerb: $, path: x }) => k === $ && W === x
|
|
43
44
|
);
|
|
44
45
|
}
|
|
45
46
|
const p = i.parsedSpec.tags[c];
|
|
46
47
|
if (!p) return;
|
|
47
|
-
p.name !== "default" && (
|
|
48
|
+
p.name !== "default" && (C.value = n !== a.value && n.startsWith("tag")), y.value.push({
|
|
48
49
|
...p,
|
|
49
50
|
lazyOperations: p.operations.slice(
|
|
50
51
|
o,
|
|
@@ -56,68 +57,69 @@ const ye = /* @__PURE__ */ D({
|
|
|
56
57
|
if (s === -1) return;
|
|
57
58
|
I.value = o.slice(s, s + 3);
|
|
58
59
|
} else
|
|
59
|
-
typeof window < "u" &&
|
|
60
|
+
typeof window < "u" && L(a.value), setTimeout(() => b.value = !0, 1e3);
|
|
60
61
|
},
|
|
61
62
|
{ immediate: !0 }
|
|
62
63
|
);
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
!
|
|
66
|
-
typeof window < "u" &&
|
|
64
|
+
const N = P.on(({ id: t }) => {
|
|
65
|
+
const n = a.value;
|
|
66
|
+
!n || t !== n || (N(), setTimeout(() => {
|
|
67
|
+
typeof window < "u" && L(n), _.value = !1, setTimeout(() => b.value = !0, 1e3);
|
|
67
68
|
}, 300));
|
|
68
69
|
});
|
|
69
|
-
return
|
|
70
|
+
return H(() => {
|
|
70
71
|
a.value || setTimeout(() => b.value = !0, 1e3);
|
|
71
|
-
}), (
|
|
72
|
-
class:
|
|
73
|
-
"references-loading-hidden-tag":
|
|
72
|
+
}), (t, n) => K((l(), f("div", {
|
|
73
|
+
class: M(["references-loading", {
|
|
74
|
+
"references-loading-hidden-tag": C.value,
|
|
74
75
|
"references-loading-top-spacer": y.value.length
|
|
75
76
|
}])
|
|
76
77
|
}, [
|
|
77
|
-
(
|
|
78
|
+
(l(!0), f(g, null, w(y.value, (e, u) => (l(), f(g, {
|
|
78
79
|
key: e.name + u
|
|
79
80
|
}, [
|
|
80
|
-
e.operations && e.operations.length > 0 ? (
|
|
81
|
+
e.operations && e.operations.length > 0 ? (l(), m(r(q), {
|
|
81
82
|
key: 0,
|
|
82
|
-
|
|
83
|
+
collection: t.collection,
|
|
84
|
+
spec: t.parsedSpec,
|
|
83
85
|
tag: e
|
|
84
86
|
}, {
|
|
85
87
|
default: d(() => [
|
|
86
|
-
(
|
|
88
|
+
(l(!0), f(g, null, w(e.lazyOperations, (o) => (l(), m(r(G), {
|
|
87
89
|
key: `${o.httpVerb}-${o.operationId}`,
|
|
88
|
-
collection: t
|
|
89
|
-
layout:
|
|
90
|
-
server: t
|
|
90
|
+
collection: t.collection,
|
|
91
|
+
layout: t.layout,
|
|
92
|
+
server: t.server,
|
|
91
93
|
transformedOperation: o
|
|
92
94
|
}, null, 8, ["collection", "layout", "server", "transformedOperation"]))), 128))
|
|
93
95
|
]),
|
|
94
96
|
_: 2
|
|
95
|
-
}, 1032, ["spec", "tag"])) : T("", !0)
|
|
97
|
+
}, 1032, ["collection", "spec", "tag"])) : T("", !0)
|
|
96
98
|
], 64))), 128)),
|
|
97
|
-
I.value.length ? (
|
|
99
|
+
I.value.length ? (l(), m(r(J), { key: 0 }, {
|
|
98
100
|
default: d(() => [
|
|
99
|
-
(
|
|
101
|
+
(l(!0), f(g, null, w(I.value, (e) => (l(), m(r(Q), {
|
|
100
102
|
key: e,
|
|
101
103
|
label: e
|
|
102
104
|
}, {
|
|
103
105
|
default: d(() => {
|
|
104
106
|
var u;
|
|
105
107
|
return [
|
|
106
|
-
(u =
|
|
108
|
+
(u = r(S)(t.parsedSpec)) != null && u[e] ? (l(), m(r(R), { key: 0 }, {
|
|
107
109
|
default: d(() => {
|
|
108
110
|
var o;
|
|
109
111
|
return [
|
|
110
|
-
h(
|
|
112
|
+
h(r(U), null, {
|
|
111
113
|
default: d(() => [
|
|
112
|
-
h(
|
|
113
|
-
id:
|
|
114
|
+
h(r(X), {
|
|
115
|
+
id: r(V)({ name: e })
|
|
114
116
|
}, {
|
|
115
117
|
default: d(() => [
|
|
116
|
-
h(
|
|
118
|
+
h(r(Y), { level: 2 }, {
|
|
117
119
|
default: d(() => {
|
|
118
120
|
var c;
|
|
119
121
|
return [
|
|
120
|
-
|
|
122
|
+
j(A(((c = r(S)(t.parsedSpec)) == null ? void 0 : c[e]).title ?? e), 1)
|
|
121
123
|
];
|
|
122
124
|
}),
|
|
123
125
|
_: 2
|
|
@@ -128,10 +130,10 @@ const ye = /* @__PURE__ */ D({
|
|
|
128
130
|
]),
|
|
129
131
|
_: 2
|
|
130
132
|
}, 1024),
|
|
131
|
-
h(
|
|
133
|
+
h(r(Z), {
|
|
132
134
|
name: e,
|
|
133
135
|
noncollapsible: "",
|
|
134
|
-
value: (o =
|
|
136
|
+
value: (o = r(S)(t.parsedSpec)) == null ? void 0 : o[e]
|
|
135
137
|
}, null, 8, ["name", "value"])
|
|
136
138
|
];
|
|
137
139
|
}),
|
|
@@ -145,10 +147,10 @@ const ye = /* @__PURE__ */ D({
|
|
|
145
147
|
_: 1
|
|
146
148
|
})) : T("", !0)
|
|
147
149
|
], 2)), [
|
|
148
|
-
[
|
|
150
|
+
[F, _.value]
|
|
149
151
|
]);
|
|
150
152
|
}
|
|
151
153
|
});
|
|
152
154
|
export {
|
|
153
|
-
|
|
155
|
+
ve as default
|
|
154
156
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { Collection } from '@scalar/oas-utils/entities/spec';
|
|
1
2
|
import type { Tag } from '@scalar/types/legacy';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
tag: Tag;
|
|
5
|
+
collection: Collection;
|
|
4
6
|
isCollapsed?: boolean;
|
|
5
7
|
};
|
|
6
8
|
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>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/OperationsList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/OperationsList.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAW/C,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,GAAG,CAAA;IACR,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AAiHF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./OperationsList.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5153ba3b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as f, computed as g, openBlock as
|
|
2
|
-
import
|
|
3
|
-
import { useNavState as
|
|
1
|
+
import { defineComponent as f, computed as g, openBlock as a, createBlock as p, unref as t, withCtx as o, createVNode as r, createTextVNode as d, toDisplayString as C, createElementVNode as N, createElementBlock as k, Fragment as y, renderList as O, createCommentVNode as B } from "vue";
|
|
2
|
+
import V from "../../ScreenReader.vue.js";
|
|
3
|
+
import { useNavState as _ } from "../../../hooks/useNavState.js";
|
|
4
4
|
import v from "./OperationsListItem.vue.js";
|
|
5
5
|
import L from "../../Card/Card.vue.js";
|
|
6
6
|
import S from "../../Card/CardHeader.vue.js";
|
|
@@ -9,51 +9,53 @@ const h = ["aria-label"], T = /* @__PURE__ */ f({
|
|
|
9
9
|
__name: "OperationsList",
|
|
10
10
|
props: {
|
|
11
11
|
tag: {},
|
|
12
|
+
collection: {},
|
|
12
13
|
isCollapsed: { type: Boolean }
|
|
13
14
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
return (e,
|
|
15
|
+
setup(c) {
|
|
16
|
+
const l = c, { getOperationId: u } = _(), n = g(() => l.tag["x-displayName"] ?? l.tag.name);
|
|
17
|
+
return (e, s) => {
|
|
17
18
|
var i;
|
|
18
|
-
return ((i = e.tag.operations) == null ? void 0 : i.length) > 0 ? (
|
|
19
|
+
return ((i = e.tag.operations) == null ? void 0 : i.length) > 0 ? (a(), p(t(L), {
|
|
19
20
|
key: 0,
|
|
20
21
|
class: "scalar-card-sticky"
|
|
21
22
|
}, {
|
|
22
|
-
default:
|
|
23
|
-
|
|
24
|
-
default:
|
|
25
|
-
|
|
26
|
-
default:
|
|
23
|
+
default: o(() => [
|
|
24
|
+
r(t(S), { muted: "" }, {
|
|
25
|
+
default: o(() => [
|
|
26
|
+
r(V, null, {
|
|
27
|
+
default: o(() => [
|
|
27
28
|
d(C(n.value), 1)
|
|
28
29
|
]),
|
|
29
30
|
_: 1
|
|
30
31
|
}),
|
|
31
|
-
|
|
32
|
+
s[0] || (s[0] = d(" Operations "))
|
|
32
33
|
]),
|
|
33
34
|
_: 1
|
|
34
35
|
}),
|
|
35
|
-
|
|
36
|
+
r(t(b), {
|
|
36
37
|
class: "custom-scroll",
|
|
37
38
|
muted: ""
|
|
38
39
|
}, {
|
|
39
|
-
default:
|
|
40
|
+
default: o(() => [
|
|
40
41
|
N("ul", {
|
|
41
42
|
"aria-label": `${n.value} endpoints`,
|
|
42
43
|
class: "endpoints"
|
|
43
44
|
}, [
|
|
44
|
-
(
|
|
45
|
-
key: t(
|
|
45
|
+
(a(!0), k(y, null, O(e.tag.operations, (m) => (a(), p(v, {
|
|
46
|
+
key: t(u)(m, e.tag),
|
|
46
47
|
isCollapsed: e.isCollapsed,
|
|
47
48
|
tag: e.tag,
|
|
48
|
-
transformedOperation: m
|
|
49
|
-
|
|
49
|
+
transformedOperation: m,
|
|
50
|
+
collection: e.collection
|
|
51
|
+
}, null, 8, ["isCollapsed", "tag", "transformedOperation", "collection"]))), 128))
|
|
50
52
|
], 8, h)
|
|
51
53
|
]),
|
|
52
54
|
_: 1
|
|
53
55
|
})
|
|
54
56
|
]),
|
|
55
57
|
_: 1
|
|
56
|
-
})) :
|
|
58
|
+
})) : B("", !0);
|
|
57
59
|
};
|
|
58
60
|
}
|
|
59
61
|
});
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { Collection } from '@scalar/oas-utils/entities/spec';
|
|
1
2
|
import type { Tag, TransformedOperation } from '@scalar/types/legacy';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
transformedOperation: TransformedOperation;
|
|
4
5
|
tag: Tag;
|
|
6
|
+
collection: Collection;
|
|
5
7
|
isCollapsed?: boolean;
|
|
6
8
|
};
|
|
7
9
|
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>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationsListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/OperationsListItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationsListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/OperationsListItem.vue"],"names":[],"mappings":"AAoIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAarE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,GAAG,EAAE,GAAG,CAAA;IACR,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AAmJF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./OperationsListItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const s = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const s = /* @__PURE__ */ o(t, [["__scopeId", "data-v-03fcdc42"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as u, computed as h, unref as t, openBlock as s, createElementBlock as O, createBlock as g, withCtx as k, createTextVNode as C, toDisplayString as i, createCommentVNode as
|
|
1
|
+
import { defineComponent as u, computed as h, unref as t, openBlock as s, createElementBlock as O, createBlock as g, withCtx as k, createTextVNode as C, toDisplayString as i, createCommentVNode as l, createElementVNode as m, withModifiers as v, createVNode as y, normalizeClass as B } from "vue";
|
|
2
2
|
import { useWorkspace as N } from "@scalar/api-client/store";
|
|
3
3
|
import { getPointer as V } from "../../../blocks/helpers/getPointer.js";
|
|
4
4
|
import { useBlockProps as S } from "../../../blocks/hooks/useBlockProps.js";
|
|
@@ -12,14 +12,16 @@ const b = ["href"], F = /* @__PURE__ */ u({
|
|
|
12
12
|
props: {
|
|
13
13
|
transformedOperation: {},
|
|
14
14
|
tag: {},
|
|
15
|
+
collection: {},
|
|
15
16
|
isCollapsed: { type: Boolean }
|
|
16
17
|
},
|
|
17
18
|
setup(a) {
|
|
18
|
-
const { getOperationId: n } = w(), { scrollToOperation:
|
|
19
|
+
const { getOperationId: n } = w(), { scrollToOperation: p } = H(), c = async (e) => {
|
|
19
20
|
const o = n(e, a.tag);
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
store:
|
|
21
|
+
p(o, !0);
|
|
22
|
+
}, d = N(), { operation: r } = S({
|
|
23
|
+
store: d,
|
|
24
|
+
collection: a.collection,
|
|
23
25
|
location: V([
|
|
24
26
|
"paths",
|
|
25
27
|
a.transformedOperation.path,
|
|
@@ -42,11 +44,11 @@ const b = ["href"], F = /* @__PURE__ */ u({
|
|
|
42
44
|
C(i(f.value) + " (Hidden) ", 1)
|
|
43
45
|
]),
|
|
44
46
|
_: 1
|
|
45
|
-
})) :
|
|
47
|
+
})) : l("", !0),
|
|
46
48
|
m("a", {
|
|
47
49
|
class: "endpoint",
|
|
48
50
|
href: `#${t(n)(e.transformedOperation, e.tag)}`,
|
|
49
|
-
onClick: o[0] || (o[0] = v((D) =>
|
|
51
|
+
onClick: o[0] || (o[0] = v((D) => c(e.transformedOperation), ["prevent"]))
|
|
50
52
|
}, [
|
|
51
53
|
y(t($), {
|
|
52
54
|
class: "endpoint-method",
|
|
@@ -58,7 +60,7 @@ const b = ["href"], F = /* @__PURE__ */ u({
|
|
|
58
60
|
}])
|
|
59
61
|
}, i(t(r).path), 3)
|
|
60
62
|
], 8, b)
|
|
61
|
-
])) :
|
|
63
|
+
])) : l("", !0);
|
|
62
64
|
}
|
|
63
65
|
});
|
|
64
66
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/Tag.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tag.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/Tag.vue"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAmB/C,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,GAAG,CAAA;IACR,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AA2JF,wBAOG"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as s, computed as c, openBlock as n, createBlock as i, unref as e, withCtx as
|
|
1
|
+
import { defineComponent as s, computed as c, openBlock as n, createBlock as i, unref as e, withCtx as t, createVNode as l, createTextVNode as d, toDisplayString as g, createCommentVNode as C } from "vue";
|
|
2
2
|
import { ScalarMarkdown as S } from "@scalar/components";
|
|
3
3
|
import v from "../../ScreenReader.vue.js";
|
|
4
4
|
import { useNavState as N } from "../../../hooks/useNavState.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
5
|
+
import h from "./OperationsList.vue.js";
|
|
6
|
+
import k from "../../Section/Section.vue.js";
|
|
7
|
+
import y from "../../Section/SectionHeader.vue.js";
|
|
8
|
+
import I from "../../Anchor/Anchor.vue.js";
|
|
9
|
+
import T from "../../Section/SectionHeaderTag.vue.js";
|
|
10
|
+
import _ from "../../Section/SectionContent.vue.js";
|
|
11
11
|
import w from "../../Section/SectionColumns.vue.js";
|
|
12
12
|
import m from "../../Section/SectionColumn.vue.js";
|
|
13
13
|
const q = /* @__PURE__ */ s({
|
|
@@ -15,31 +15,32 @@ const q = /* @__PURE__ */ s({
|
|
|
15
15
|
props: {
|
|
16
16
|
id: {},
|
|
17
17
|
tag: {},
|
|
18
|
+
collection: {},
|
|
18
19
|
headerId: {},
|
|
19
20
|
isCollapsed: { type: Boolean }
|
|
20
21
|
},
|
|
21
22
|
setup(p) {
|
|
22
|
-
const
|
|
23
|
-
return (
|
|
24
|
-
id:
|
|
25
|
-
label:
|
|
23
|
+
const a = p, { getTagId: u } = N(), f = c(() => a.tag["x-displayName"] ?? a.tag.name);
|
|
24
|
+
return (o, r) => (n(), i(e(k), {
|
|
25
|
+
id: o.id,
|
|
26
|
+
label: o.tag.name.toUpperCase(),
|
|
26
27
|
role: "none"
|
|
27
28
|
}, {
|
|
28
|
-
default:
|
|
29
|
-
|
|
30
|
-
default:
|
|
31
|
-
|
|
32
|
-
id: e(u)(
|
|
29
|
+
default: t(() => [
|
|
30
|
+
l(e(y), null, {
|
|
31
|
+
default: t(() => [
|
|
32
|
+
l(e(I), {
|
|
33
|
+
id: e(u)(o.tag)
|
|
33
34
|
}, {
|
|
34
|
-
default:
|
|
35
|
-
|
|
36
|
-
id:
|
|
35
|
+
default: t(() => [
|
|
36
|
+
l(e(T), {
|
|
37
|
+
id: o.headerId,
|
|
37
38
|
level: 2
|
|
38
39
|
}, {
|
|
39
|
-
default:
|
|
40
|
+
default: t(() => [
|
|
40
41
|
d(g(f.value) + " ", 1),
|
|
41
|
-
|
|
42
|
-
default:
|
|
42
|
+
o.isCollapsed ? (n(), i(v, { key: 0 }, {
|
|
43
|
+
default: t(() => r[0] || (r[0] = [
|
|
43
44
|
d(" (Collapsed)")
|
|
44
45
|
])),
|
|
45
46
|
_: 1
|
|
@@ -53,23 +54,26 @@ const q = /* @__PURE__ */ s({
|
|
|
53
54
|
]),
|
|
54
55
|
_: 1
|
|
55
56
|
}),
|
|
56
|
-
|
|
57
|
-
default:
|
|
58
|
-
|
|
59
|
-
default:
|
|
60
|
-
|
|
61
|
-
default:
|
|
62
|
-
|
|
63
|
-
clamp:
|
|
64
|
-
value:
|
|
57
|
+
l(e(_), null, {
|
|
58
|
+
default: t(() => [
|
|
59
|
+
l(e(w), null, {
|
|
60
|
+
default: t(() => [
|
|
61
|
+
l(e(m), null, {
|
|
62
|
+
default: t(() => [
|
|
63
|
+
l(e(S), {
|
|
64
|
+
clamp: o.isCollapsed ? "7" : !1,
|
|
65
|
+
value: o.tag.description,
|
|
65
66
|
withImages: ""
|
|
66
67
|
}, null, 8, ["clamp", "value"])
|
|
67
68
|
]),
|
|
68
69
|
_: 1
|
|
69
70
|
}),
|
|
70
|
-
|
|
71
|
-
default:
|
|
72
|
-
|
|
71
|
+
l(e(m), null, {
|
|
72
|
+
default: t(() => [
|
|
73
|
+
l(h, {
|
|
74
|
+
tag: o.tag,
|
|
75
|
+
collection: o.collection
|
|
76
|
+
}, null, 8, ["tag", "collection"])
|
|
73
77
|
]),
|
|
74
78
|
_: 1
|
|
75
79
|
})
|