@scalar/api-reference 1.28.8 → 1.28.10
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 +33 -0
- package/dist/browser/standalone.js +6124 -6035
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +1 -1
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +4 -4
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +96 -114
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +8 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +71 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +2 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +139 -130
- package/dist/components/GettingStarted.vue.js +1 -1
- package/dist/components/GettingStarted.vue2.js +25 -25
- package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue2.js +1 -1
- package/dist/components/SingleApiReference.vue.d.ts +1 -1
- package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +1374 -1004
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +86 -85
- package/dist/helpers/get-request.d.ts +4 -4
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.d.ts +24 -22
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.js +53 -51
- package/dist/hooks/useReactiveSpec.d.ts +220 -3
- package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
- package/dist/hooks/useReactiveSpec.js +30 -28
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +9 -9
|
@@ -2,7 +2,7 @@ import o from "./ApiReferenceLayout.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-10b0cc23"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as default
|
|
8
8
|
};
|
|
@@ -124,7 +124,7 @@ const Ge = ["innerHTML"], We = { class: "references-header" }, je = ["aria-label
|
|
|
124
124
|
return e && T.importSpecFile(e, "default", {
|
|
125
125
|
shouldLoad: !1,
|
|
126
126
|
documentUrl: (a = t.value.spec) == null ? void 0 : a.url,
|
|
127
|
-
|
|
127
|
+
useCollectionSecurity: !0,
|
|
128
128
|
...t.value
|
|
129
129
|
});
|
|
130
130
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Models.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Models.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Models.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Models.vue"],"names":[],"mappings":"AAuHA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAiB9E,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;AAqMF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Models.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f1f02ced"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAyTA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQ9E,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EACF,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,YAAY,GACtB,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,CAAA;IACpC,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;WAbQ,MAAM;;AAgUlB,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./Schema.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2fcc287f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAieA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAc9E;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AAic1B,0BAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaProperty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3431ec35"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,39 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
const ae = {
|
|
1
|
+
import { defineComponent as $, computed as u, openBlock as r, createElementBlock as o, normalizeClass as z, createBlock as v, createSlots as G, withCtx as y, createTextVNode as B, toDisplayString as d, createCommentVNode as l, createVNode as s, unref as a, Fragment as c, renderList as k, createElementVNode as S } from "vue";
|
|
2
|
+
import { Disclosure as J, DisclosurePanel as K, DisclosureButton as Q } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as D, ScalarIcon as W } from "@scalar/components";
|
|
4
|
+
import { optimizeValueForDisplay as X, discriminators as I } from "./helpers/optimizeValueForDisplay.js";
|
|
5
|
+
import L from "./Schema.vue.js";
|
|
6
|
+
import O from "./SchemaDiscriminator.vue.js";
|
|
7
|
+
import Y from "./SchemaPropertyHeading.vue.js";
|
|
8
|
+
const x = {
|
|
10
9
|
key: 1,
|
|
11
10
|
class: "property-description"
|
|
12
|
-
},
|
|
11
|
+
}, ee = {
|
|
13
12
|
key: 2,
|
|
14
13
|
class: "property-description"
|
|
15
|
-
},
|
|
14
|
+
}, te = {
|
|
16
15
|
key: 3,
|
|
17
|
-
class: "property-example custom-scroll"
|
|
18
|
-
}, me = { class: "property-example-value" }, ce = {
|
|
19
|
-
key: 4,
|
|
20
|
-
class: "property-example custom-scroll"
|
|
21
|
-
}, de = { class: "property-example-label" }, ue = {
|
|
22
|
-
key: 5,
|
|
23
16
|
class: "property-enum"
|
|
24
|
-
},
|
|
17
|
+
}, ne = {
|
|
25
18
|
key: 0,
|
|
26
19
|
class: "property-list"
|
|
27
|
-
},
|
|
20
|
+
}, re = { class: "property-heading" }, ie = { class: "property-name" }, oe = { class: "property-description" }, le = {
|
|
28
21
|
key: 1,
|
|
29
22
|
class: "property-enum-values"
|
|
30
|
-
},
|
|
31
|
-
key:
|
|
23
|
+
}, se = {
|
|
24
|
+
key: 4,
|
|
32
25
|
class: "children"
|
|
33
|
-
},
|
|
26
|
+
}, ae = {
|
|
34
27
|
key: 0,
|
|
35
28
|
class: "children"
|
|
36
|
-
},
|
|
29
|
+
}, he = /* @__PURE__ */ $({
|
|
37
30
|
__name: "SchemaProperty",
|
|
38
31
|
props: {
|
|
39
32
|
value: {},
|
|
@@ -48,8 +41,8 @@ const ae = {
|
|
|
48
41
|
schemas: {},
|
|
49
42
|
hideHeading: { type: Boolean }
|
|
50
43
|
},
|
|
51
|
-
setup(
|
|
52
|
-
const
|
|
44
|
+
setup(R) {
|
|
45
|
+
const T = R, H = {
|
|
53
46
|
integer: {
|
|
54
47
|
_default: "Integer numbers.",
|
|
55
48
|
int32: "Signed 32-bit integers (commonly used integer type).",
|
|
@@ -62,162 +55,151 @@ const ae = {
|
|
|
62
55
|
byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
|
|
63
56
|
binary: "binary data, used to describe files"
|
|
64
57
|
}
|
|
65
|
-
},
|
|
66
|
-
var
|
|
67
|
-
return (e == null ? void 0 : e.enum) || ((
|
|
68
|
-
},
|
|
69
|
-
() =>
|
|
70
|
-
),
|
|
71
|
-
() =>
|
|
72
|
-
),
|
|
73
|
-
() =>
|
|
74
|
-
), t =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
}, b = (e, n) => n != null && n.properties || n != null && n.additionalProperties || n != null && n.patternProperties || n != null && n.allOf ? null : e || (n == null ? void 0 : n.description) || null, E = (e) => !e || !H[e.type] ? null : H[e.type][e.format || "_default"], p = (e) => {
|
|
59
|
+
var n;
|
|
60
|
+
return (e == null ? void 0 : e.enum) || ((n = e == null ? void 0 : e.items) == null ? void 0 : n.enum) || [];
|
|
61
|
+
}, P = u(
|
|
62
|
+
() => p(t.value).length > 9
|
|
63
|
+
), w = u(() => P.value ? 5 : 9), U = u(
|
|
64
|
+
() => p(t.value).slice(0, w.value)
|
|
65
|
+
), Z = u(
|
|
66
|
+
() => p(t.value).slice(w.value)
|
|
67
|
+
), t = u(() => X(T.value));
|
|
68
|
+
I.find((e) => !t.value || typeof t.value != "object" ? !1 : e in t.value || t.value.items && typeof t.value.items == "object" && e in t.value.items);
|
|
69
|
+
const M = (e, n, f, h, g) => n || f || h || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || g;
|
|
70
|
+
return (e, n) => {
|
|
71
|
+
var f, h, g, C, j, q, A, F, N, V;
|
|
72
|
+
return r(), o("li", {
|
|
73
|
+
class: z(["property", [
|
|
74
|
+
(b(e.description, t.value), ""),
|
|
80
75
|
`property--level-${e.level}`,
|
|
81
76
|
{
|
|
82
77
|
"property--compact": e.compact,
|
|
83
|
-
"property--deprecated": (
|
|
78
|
+
"property--deprecated": (f = t.value) == null ? void 0 : f.deprecated
|
|
84
79
|
}
|
|
85
80
|
]])
|
|
86
81
|
}, [
|
|
87
|
-
|
|
82
|
+
M(
|
|
88
83
|
t.value,
|
|
89
84
|
e.name,
|
|
90
85
|
e.additional,
|
|
91
86
|
e.pattern,
|
|
92
87
|
e.required
|
|
93
|
-
) ? (
|
|
88
|
+
) ? (r(), v(Y, {
|
|
94
89
|
key: 0,
|
|
95
90
|
additional: e.additional,
|
|
96
|
-
enum:
|
|
91
|
+
enum: p(t.value).length > 0,
|
|
97
92
|
pattern: e.pattern,
|
|
98
93
|
required: e.required,
|
|
99
94
|
value: t.value
|
|
100
|
-
},
|
|
95
|
+
}, G({ _: 2 }, [
|
|
101
96
|
e.name ? {
|
|
102
97
|
name: "name",
|
|
103
|
-
fn:
|
|
104
|
-
B(
|
|
98
|
+
fn: y(() => [
|
|
99
|
+
B(d(e.name), 1)
|
|
105
100
|
]),
|
|
106
101
|
key: "0"
|
|
107
102
|
} : void 0,
|
|
108
|
-
(
|
|
103
|
+
(h = t.value) != null && h.example ? {
|
|
109
104
|
name: "example",
|
|
110
|
-
fn:
|
|
111
|
-
B(" Example: " +
|
|
105
|
+
fn: y(() => [
|
|
106
|
+
B(" Example: " + d(t.value.example), 1)
|
|
112
107
|
]),
|
|
113
108
|
key: "1"
|
|
114
109
|
} : void 0
|
|
115
|
-
]), 1032, ["additional", "enum", "pattern", "required", "value"])) :
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
value:
|
|
110
|
+
]), 1032, ["additional", "enum", "pattern", "required", "value"])) : l("", !0),
|
|
111
|
+
b(e.description, t.value) ? (r(), o("div", x, [
|
|
112
|
+
s(a(D), {
|
|
113
|
+
value: b(e.description, t.value)
|
|
119
114
|
}, null, 8, ["value"])
|
|
120
|
-
])) :
|
|
121
|
-
|
|
122
|
-
value:
|
|
115
|
+
])) : E(t.value) ? (r(), o("div", ee, [
|
|
116
|
+
s(a(D), {
|
|
117
|
+
value: E(t.value) || ""
|
|
123
118
|
}, null, 8, ["value"])
|
|
124
|
-
])) :
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
)), 1)
|
|
130
|
-
])) : a("", !0),
|
|
131
|
-
(A = t.value) != null && A.examples && typeof t.value.examples == "object" && Object.keys(t.value.examples).length > 0 ? (l(), o("div", ce, [
|
|
132
|
-
u("span", de, i(Object.keys(t.value.examples).length === 1 ? "Example" : "Examples"), 1),
|
|
133
|
-
(l(!0), o(c, null, h(t.value.examples, (r, m) => (l(), o("code", {
|
|
134
|
-
key: m,
|
|
135
|
-
class: "property-example-value"
|
|
136
|
-
}, i(r), 1))), 128))
|
|
137
|
-
])) : a("", !0),
|
|
138
|
-
((F = d(t.value)) == null ? void 0 : F.length) > 0 ? (l(), o("div", ue, [
|
|
139
|
-
Array.isArray((N = t.value) == null ? void 0 : N["x-enumDescriptions"]) ? (l(), o("div", ye, [
|
|
140
|
-
(l(!0), o(c, null, h(d(t.value), (r) => (l(), o("div", {
|
|
141
|
-
key: r,
|
|
119
|
+
])) : l("", !0),
|
|
120
|
+
((g = p(t.value)) == null ? void 0 : g.length) > 0 ? (r(), o("div", te, [
|
|
121
|
+
Array.isArray((C = t.value) == null ? void 0 : C["x-enumDescriptions"]) ? (r(), o("div", ne, [
|
|
122
|
+
(r(!0), o(c, null, k(p(t.value), (i) => (r(), o("div", {
|
|
123
|
+
key: i,
|
|
142
124
|
class: "property"
|
|
143
125
|
}, [
|
|
144
|
-
|
|
145
|
-
|
|
126
|
+
S("div", re, [
|
|
127
|
+
S("div", ie, d(i), 1)
|
|
146
128
|
]),
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
value: t.value["x-enumDescriptions"][
|
|
129
|
+
S("div", oe, [
|
|
130
|
+
s(a(D), {
|
|
131
|
+
value: t.value["x-enumDescriptions"][i]
|
|
150
132
|
}, null, 8, ["value"])
|
|
151
133
|
])
|
|
152
134
|
]))), 128))
|
|
153
|
-
])) : (
|
|
154
|
-
(
|
|
155
|
-
key:
|
|
135
|
+
])) : (r(), o("ul", le, [
|
|
136
|
+
(r(!0), o(c, null, k(U.value, (i) => (r(), o("li", {
|
|
137
|
+
key: i,
|
|
156
138
|
class: "property-enum-value"
|
|
157
|
-
}, i
|
|
158
|
-
|
|
159
|
-
default:
|
|
160
|
-
|
|
161
|
-
default:
|
|
162
|
-
(
|
|
139
|
+
}, d(i), 1))), 128)),
|
|
140
|
+
P.value ? (r(), v(a(J), { key: 0 }, {
|
|
141
|
+
default: y(({ open: i }) => [
|
|
142
|
+
s(a(K), null, {
|
|
143
|
+
default: y(() => [
|
|
144
|
+
(r(!0), o(c, null, k(Z.value, (m) => (r(), o("li", {
|
|
163
145
|
key: m,
|
|
164
146
|
class: "property-enum-value"
|
|
165
|
-
},
|
|
147
|
+
}, d(m), 1))), 128))
|
|
166
148
|
]),
|
|
167
149
|
_: 1
|
|
168
150
|
}),
|
|
169
|
-
|
|
170
|
-
default:
|
|
171
|
-
|
|
172
|
-
class:
|
|
151
|
+
s(a(Q), { class: "enum-toggle-button" }, {
|
|
152
|
+
default: y(() => [
|
|
153
|
+
s(a(W), {
|
|
154
|
+
class: z(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": i }]),
|
|
173
155
|
icon: "Add",
|
|
174
156
|
size: "sm"
|
|
175
157
|
}, null, 8, ["class"]),
|
|
176
|
-
B(" " + i
|
|
158
|
+
B(" " + d(i ? "Hide values" : "Show all values"), 1)
|
|
177
159
|
]),
|
|
178
160
|
_: 2
|
|
179
161
|
}, 1024)
|
|
180
162
|
]),
|
|
181
163
|
_: 1
|
|
182
|
-
})) :
|
|
164
|
+
})) : l("", !0)
|
|
183
165
|
]))
|
|
184
|
-
])) :
|
|
185
|
-
((
|
|
186
|
-
|
|
166
|
+
])) : l("", !0),
|
|
167
|
+
((j = t.value) == null ? void 0 : j.type) === "object" && ((q = t.value) != null && q.properties || (A = t.value) != null && A.additionalProperties) ? (r(), o("div", se, [
|
|
168
|
+
s(L, {
|
|
187
169
|
compact: e.compact,
|
|
188
170
|
level: e.level + 1,
|
|
189
171
|
value: t.value
|
|
190
172
|
}, null, 8, ["compact", "level", "value"])
|
|
191
|
-
])) :
|
|
192
|
-
(
|
|
193
|
-
["object"].includes((
|
|
194
|
-
|
|
173
|
+
])) : l("", !0),
|
|
174
|
+
(F = t.value) != null && F.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (r(), o(c, { key: 5 }, [
|
|
175
|
+
["object"].includes((V = (N = t.value) == null ? void 0 : N.items) == null ? void 0 : V.type) ? (r(), o("div", ae, [
|
|
176
|
+
s(L, {
|
|
195
177
|
compact: e.compact,
|
|
196
178
|
level: e.level + 1,
|
|
197
179
|
value: t.value.items
|
|
198
180
|
}, null, 8, ["compact", "level", "value"])
|
|
199
|
-
])) :
|
|
200
|
-
], 64)) :
|
|
201
|
-
(
|
|
202
|
-
var m,
|
|
203
|
-
return
|
|
204
|
-
(m = t.value) != null && m[
|
|
181
|
+
])) : l("", !0)
|
|
182
|
+
], 64)) : l("", !0),
|
|
183
|
+
(r(!0), o(c, null, k(a(I), (i) => {
|
|
184
|
+
var m, _;
|
|
185
|
+
return r(), o(c, { key: i }, [
|
|
186
|
+
(m = t.value) != null && m[i] ? (r(), v(O, {
|
|
205
187
|
key: 0,
|
|
206
188
|
compact: e.compact,
|
|
207
|
-
discriminator:
|
|
189
|
+
discriminator: i,
|
|
208
190
|
hideHeading: e.hideHeading,
|
|
209
191
|
level: e.level,
|
|
210
192
|
schemas: e.schemas,
|
|
211
193
|
value: t.value
|
|
212
|
-
}, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : (
|
|
194
|
+
}, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : (_ = t.value) != null && _.items && typeof i == "string" && typeof t.value.items == "object" && i in t.value.items && Array.isArray(t.value.items[i]) && e.level < 3 ? (r(), v(O, {
|
|
213
195
|
key: 1,
|
|
214
196
|
compact: e.compact,
|
|
215
|
-
discriminator:
|
|
197
|
+
discriminator: i,
|
|
216
198
|
hideHeading: e.hideHeading,
|
|
217
199
|
level: e.level,
|
|
218
200
|
schemas: e.schemas,
|
|
219
201
|
value: t.value.items
|
|
220
|
-
}, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) :
|
|
202
|
+
}, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : l("", !0)
|
|
221
203
|
], 64);
|
|
222
204
|
}), 128))
|
|
223
205
|
], 2);
|
|
@@ -225,5 +207,5 @@ const ae = {
|
|
|
225
207
|
}
|
|
226
208
|
});
|
|
227
209
|
export {
|
|
228
|
-
|
|
210
|
+
he as default
|
|
229
211
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
examples?: Record<string, unknown>;
|
|
3
|
+
example?: unknown;
|
|
4
|
+
discriminatorType?: string;
|
|
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>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=SchemaPropertyExamples.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaPropertyExamples.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyExamples.vue"],"names":[],"mappings":"AA2JA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAC;;AA4IF,wBAMG"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { defineComponent as y, openBlock as l, createElementBlock as p, Fragment as i, createElementVNode as e, unref as o, toDisplayString as n, createVNode as u, createCommentVNode as c, renderList as b } from "vue";
|
|
2
|
+
import { ScalarIcon as x } from "@scalar/components";
|
|
3
|
+
import { useClipboard as v } from "@scalar/use-hooks/useClipboard";
|
|
4
|
+
import { formatExample as s } from "./helpers/formatExample.js";
|
|
5
|
+
const f = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "property-example"
|
|
8
|
+
}, g = { class: "property-example-value-list" }, h = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "property-example"
|
|
11
|
+
}, k = {
|
|
12
|
+
type: "button",
|
|
13
|
+
class: "property-example-label"
|
|
14
|
+
}, C = { class: "property-example-value-list" }, _ = ["onClick"], z = /* @__PURE__ */ y({
|
|
15
|
+
__name: "SchemaPropertyExamples",
|
|
16
|
+
props: {
|
|
17
|
+
examples: {},
|
|
18
|
+
example: {},
|
|
19
|
+
discriminatorType: {}
|
|
20
|
+
},
|
|
21
|
+
setup(E) {
|
|
22
|
+
const { copyToClipboard: m } = v();
|
|
23
|
+
return (t, r) => (l(), p(i, null, [
|
|
24
|
+
t.example ? (l(), p("div", f, [
|
|
25
|
+
r[1] || (r[1] = e("button", {
|
|
26
|
+
type: "button",
|
|
27
|
+
class: "property-example-label"
|
|
28
|
+
}, [
|
|
29
|
+
e("span", null, "Example")
|
|
30
|
+
], -1)),
|
|
31
|
+
e("div", g, [
|
|
32
|
+
e("button", {
|
|
33
|
+
type: "button",
|
|
34
|
+
class: "property-example-value group",
|
|
35
|
+
onClick: r[0] || (r[0] = (a) => o(m)(String(o(s)(t.example))))
|
|
36
|
+
}, [
|
|
37
|
+
e("span", null, n(o(s)(t.example)), 1),
|
|
38
|
+
u(o(x), {
|
|
39
|
+
icon: "Clipboard",
|
|
40
|
+
size: "xs",
|
|
41
|
+
class: "group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3"
|
|
42
|
+
})
|
|
43
|
+
])
|
|
44
|
+
])
|
|
45
|
+
])) : c("", !0),
|
|
46
|
+
t.examples && typeof t.examples == "object" && Object.keys(t.examples).length > 0 ? (l(), p("div", h, [
|
|
47
|
+
e("button", k, [
|
|
48
|
+
e("span", null, n(Object.keys(t.examples).length === 1 ? "Example" : "Examples"), 1)
|
|
49
|
+
]),
|
|
50
|
+
e("div", C, [
|
|
51
|
+
(l(!0), p(i, null, b(t.examples, (a, d) => (l(), p("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
key: d,
|
|
54
|
+
class: "property-example-value group",
|
|
55
|
+
onClick: (S) => o(m)(String(o(s)(a)))
|
|
56
|
+
}, [
|
|
57
|
+
e("span", null, n(o(s)(a)), 1),
|
|
58
|
+
u(o(x), {
|
|
59
|
+
icon: "Clipboard",
|
|
60
|
+
size: "xs",
|
|
61
|
+
class: "text-c-3 group-hover:text-c-1 ml-auto min-h-3 min-w-3"
|
|
62
|
+
})
|
|
63
|
+
], 8, _))), 128))
|
|
64
|
+
])
|
|
65
|
+
])) : c("", !0)
|
|
66
|
+
], 64));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
export {
|
|
70
|
+
z as default
|
|
71
|
+
};
|
|
@@ -4,6 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
required?: boolean;
|
|
5
5
|
additional?: boolean;
|
|
6
6
|
pattern?: boolean;
|
|
7
|
+
withExamples?: boolean;
|
|
7
8
|
};
|
|
8
9
|
declare function __VLS_template(): {
|
|
9
10
|
attrs: Partial<{}>;
|
|
@@ -17,6 +18,7 @@ declare function __VLS_template(): {
|
|
|
17
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
19
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
19
20
|
required: boolean;
|
|
21
|
+
withExamples: boolean;
|
|
20
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
23
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
24
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAkQA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAuCJ,iBAAS,cAAc;WA+TT,OAAO,IAA6B;;sBATxB,GAAG;sBACH,GAAG;;;;EAa5B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cA/XN,OAAO;kBAGH,OAAO;wFAoYxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaPropertyHeading.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-eb77468c"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|