@scalar/api-reference 1.28.34 → 1.29.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 +55 -0
- package/dist/browser/standalone.js +12734 -13232
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/{SchemaDiscriminator.vue.d.ts → SchemaComposition.vue.d.ts} +3 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.js +187 -0
- package/dist/components/Content/Schema/SchemaComposition.vue2.js +4 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
- 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 +6 -6
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +0 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +8 -9
- 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 +165 -146
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +3 -2
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +13 -13
- package/dist/components/Content/Schema/helpers/schema-composition.d.ts +12 -0
- package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-composition.js +8 -0
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +4 -0
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -0
- package/dist/components/Layouts/Layouts.vue.d.ts +3 -0
- package/dist/components/Layouts/Layouts.vue.d.ts.map +1 -1
- package/dist/components/Layouts/Layouts.vue.js +14 -23
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.js +2 -2
- package/dist/components/Layouts/ModernLayout.vue2.js +51 -45
- package/dist/components/SingleApiReference.vue.d.ts +1 -0
- package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
- package/dist/components/SingleApiReference.vue.js +25 -22
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +144 -104
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +11 -10
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -43
- package/dist/style.css +1 -1
- package/package.json +17 -17
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -101
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -4
|
@@ -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":"AAuVA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAU9E,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,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,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;;WAfQ,MAAM;oBAMG,OAAO;;AA4X5B,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Schema.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f3594262"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
package/dist/components/Content/Schema/{SchemaDiscriminator.vue.d.ts → SchemaComposition.vue.d.ts}
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
import { type CompositionKeyword } from './helpers/schema-composition.js';
|
|
2
3
|
type __VLS_Props = {
|
|
3
|
-
|
|
4
|
+
composition: CompositionKeyword;
|
|
4
5
|
schemas?: OpenAPIV2.DefinitionsObject | Record<string, OpenAPIV3.SchemaObject> | Record<string, OpenAPIV3_1.SchemaObject> | unknown;
|
|
5
6
|
name?: string;
|
|
6
7
|
value: Record<string, any>;
|
|
@@ -10,4 +11,4 @@ type __VLS_Props = {
|
|
|
10
11
|
};
|
|
11
12
|
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, {}, HTMLDivElement>;
|
|
12
13
|
export default _default;
|
|
13
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=SchemaComposition.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"AA+QA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAM9E,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,8BAA8B,CAAA;AAKrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,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,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AA8TF,wBAOG"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { defineComponent as L, ref as U, computed as m, resolveComponent as D, createElementBlock as u, openBlock as s, createCommentVNode as p, createBlock as f, Fragment as V, renderList as E, createVNode as b, createElementVNode as d, unref as v, withCtx as F, toDisplayString as H } from "vue";
|
|
2
|
+
import { ScalarListbox as I, ScalarMarkdown as M } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as $ } from "@scalar/icons";
|
|
4
|
+
import { stringify as w } from "flatted";
|
|
5
|
+
import { mergeAllOfSchemas as Z } from "./helpers/merge-all-of-schemas.js";
|
|
6
|
+
import { hasComposition as g } from "./helpers/schema-composition.js";
|
|
7
|
+
import S from "./Schema.vue.js";
|
|
8
|
+
const G = { class: "property-rule" }, J = {
|
|
9
|
+
class: "composition-selector bg-b-1.5 hover:bg-b-2 py-1.25 flex w-full cursor-pointer items-center gap-1 rounded-t-lg border border-b-0 px-2 pr-3 text-left",
|
|
10
|
+
type: "button"
|
|
11
|
+
}, K = { class: "text-c-2" }, P = { class: "composition-selector-label text-c-1 relative" }, Q = { class: "composition-panel" }, R = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "property-description border-x border-t p-2"
|
|
14
|
+
}, ne = /* @__PURE__ */ L({
|
|
15
|
+
__name: "SchemaComposition",
|
|
16
|
+
props: {
|
|
17
|
+
composition: {},
|
|
18
|
+
schemas: {},
|
|
19
|
+
name: {},
|
|
20
|
+
value: {},
|
|
21
|
+
level: {},
|
|
22
|
+
compact: { type: Boolean },
|
|
23
|
+
hideHeading: { type: Boolean }
|
|
24
|
+
},
|
|
25
|
+
setup(l) {
|
|
26
|
+
const y = U(0), C = m(
|
|
27
|
+
() => k.value.map((e, o) => ({
|
|
28
|
+
id: String(o),
|
|
29
|
+
label: A(e) || "Schema"
|
|
30
|
+
}))
|
|
31
|
+
), O = m({
|
|
32
|
+
get: () => C.value.find(
|
|
33
|
+
(e) => e.id === String(y.value)
|
|
34
|
+
),
|
|
35
|
+
set: (e) => y.value = Number(e.id)
|
|
36
|
+
}), j = m(() => {
|
|
37
|
+
var t;
|
|
38
|
+
const e = ["oneOf", "anyOf"].includes(l.composition), o = l.composition === "allOf" && ((t = l.value[l.composition]) == null ? void 0 : t.some((n) => g(n)));
|
|
39
|
+
return e || o;
|
|
40
|
+
}), A = (e) => {
|
|
41
|
+
if (!e)
|
|
42
|
+
return null;
|
|
43
|
+
if (e.title)
|
|
44
|
+
return e.title;
|
|
45
|
+
if (e.name)
|
|
46
|
+
return e.name;
|
|
47
|
+
if (l.schemas && typeof l.schemas == "object") {
|
|
48
|
+
for (const [o, t] of Object.entries(l.schemas))
|
|
49
|
+
if (w(t) === w(e))
|
|
50
|
+
return o;
|
|
51
|
+
}
|
|
52
|
+
if (e.type === "array" && e.items)
|
|
53
|
+
return `Array of ${e.items.type || "any"}`;
|
|
54
|
+
if (e.type)
|
|
55
|
+
return e.type;
|
|
56
|
+
if (typeof e == "object") {
|
|
57
|
+
const o = Object.keys(e);
|
|
58
|
+
if (o.length > 0)
|
|
59
|
+
return o[0];
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}, B = (e) => e.find((o) => g(o)), k = m(() => {
|
|
63
|
+
const e = B(l.value[l.composition]);
|
|
64
|
+
return e ? (e.oneOf || e.anyOf).map((t) => {
|
|
65
|
+
if (t.allOf) {
|
|
66
|
+
const n = t.allOf.find((c) => c.title), i = t.allOf.find((c) => !c.title);
|
|
67
|
+
return n && i ? {
|
|
68
|
+
...n,
|
|
69
|
+
properties: {
|
|
70
|
+
...n.properties,
|
|
71
|
+
...i.properties
|
|
72
|
+
},
|
|
73
|
+
required: [
|
|
74
|
+
...n.required || [],
|
|
75
|
+
...i.required || []
|
|
76
|
+
],
|
|
77
|
+
oneOf: i.oneOf,
|
|
78
|
+
anyOf: i.anyOf
|
|
79
|
+
} : n || t;
|
|
80
|
+
}
|
|
81
|
+
return t;
|
|
82
|
+
}) : l.value[l.composition];
|
|
83
|
+
}), T = (e) => {
|
|
84
|
+
var o, t;
|
|
85
|
+
if (e === "allOf") {
|
|
86
|
+
const n = (t = (o = l.value) == null ? void 0 : o[e]) == null ? void 0 : t.find(
|
|
87
|
+
(i) => g(i)
|
|
88
|
+
);
|
|
89
|
+
if (n != null && n.oneOf)
|
|
90
|
+
return "One of";
|
|
91
|
+
if (n != null && n.anyOf)
|
|
92
|
+
return "Any of";
|
|
93
|
+
}
|
|
94
|
+
return e.replace(/([A-Z])/g, " $1").replace(/^./, (n) => n.toUpperCase()).toLowerCase().replace(/^(\w)/, (n) => n.toUpperCase());
|
|
95
|
+
}, r = m(
|
|
96
|
+
() => k.value[y.value]
|
|
97
|
+
), h = m(() => {
|
|
98
|
+
var e;
|
|
99
|
+
return (e = r.value) != null && e.oneOf ? "oneOf" : "anyOf";
|
|
100
|
+
}), q = m(() => {
|
|
101
|
+
var o;
|
|
102
|
+
const e = h.value;
|
|
103
|
+
return (o = r.value) == null ? void 0 : o[e];
|
|
104
|
+
});
|
|
105
|
+
return (e, o) => {
|
|
106
|
+
var n, i, c, N;
|
|
107
|
+
const t = D("SchemaComposition", !0);
|
|
108
|
+
return s(), u("div", G, [
|
|
109
|
+
e.composition === "allOf" && e.value[e.composition].some((a) => a.oneOf || a.anyOf) ? (s(!0), u(V, { key: 0 }, E(e.value[e.composition].filter(
|
|
110
|
+
(a) => !a.oneOf && !a.anyOf
|
|
111
|
+
), (a, z) => (s(), f(S, {
|
|
112
|
+
key: z,
|
|
113
|
+
compact: e.compact,
|
|
114
|
+
level: e.level,
|
|
115
|
+
name: e.name,
|
|
116
|
+
noncollapsible: e.level == 0,
|
|
117
|
+
schemas: e.schemas,
|
|
118
|
+
value: a
|
|
119
|
+
}, null, 8, ["compact", "level", "name", "noncollapsible", "schemas", "value"]))), 128)) : p("", !0),
|
|
120
|
+
j.value ? (s(), u(V, { key: 1 }, [
|
|
121
|
+
b(v(I), {
|
|
122
|
+
modelValue: O.value,
|
|
123
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => O.value = a),
|
|
124
|
+
options: C.value,
|
|
125
|
+
resize: ""
|
|
126
|
+
}, {
|
|
127
|
+
default: F(() => {
|
|
128
|
+
var a;
|
|
129
|
+
return [
|
|
130
|
+
d("button", J, [
|
|
131
|
+
d("span", K, H(T(e.composition)), 1),
|
|
132
|
+
d("span", P, H(((a = O.value) == null ? void 0 : a.label) || "Schema"), 1),
|
|
133
|
+
b(v($), { class: "z-1" })
|
|
134
|
+
])
|
|
135
|
+
];
|
|
136
|
+
}),
|
|
137
|
+
_: 1
|
|
138
|
+
}, 8, ["modelValue", "options"]),
|
|
139
|
+
d("div", Q, [
|
|
140
|
+
(n = r.value) != null && n.description ? (s(), u("div", R, [
|
|
141
|
+
b(v(M), {
|
|
142
|
+
value: r.value.description
|
|
143
|
+
}, null, 8, ["value"])
|
|
144
|
+
])) : p("", !0),
|
|
145
|
+
(i = r.value) != null && i.properties ? (s(), f(S, {
|
|
146
|
+
key: 1,
|
|
147
|
+
compact: e.compact,
|
|
148
|
+
level: e.level + 1,
|
|
149
|
+
hideHeading: e.hideHeading,
|
|
150
|
+
name: e.name,
|
|
151
|
+
noncollapsible: !0,
|
|
152
|
+
schemas: e.schemas,
|
|
153
|
+
value: {
|
|
154
|
+
type: "object",
|
|
155
|
+
properties: r.value.properties
|
|
156
|
+
}
|
|
157
|
+
}, null, 8, ["compact", "level", "hideHeading", "name", "schemas", "value"])) : p("", !0),
|
|
158
|
+
(c = r.value) != null && c.oneOf || (N = r.value) != null && N.anyOf ? (s(), f(t, {
|
|
159
|
+
key: 2,
|
|
160
|
+
compact: e.compact,
|
|
161
|
+
composition: h.value,
|
|
162
|
+
hideHeading: e.hideHeading,
|
|
163
|
+
level: e.level + 1,
|
|
164
|
+
name: e.name,
|
|
165
|
+
noncollapsible: !0,
|
|
166
|
+
schemas: e.schemas,
|
|
167
|
+
value: {
|
|
168
|
+
[h.value]: q.value
|
|
169
|
+
}
|
|
170
|
+
}, null, 8, ["compact", "composition", "hideHeading", "level", "name", "schemas", "value"])) : p("", !0)
|
|
171
|
+
])
|
|
172
|
+
], 64)) : (s(), f(S, {
|
|
173
|
+
key: 2,
|
|
174
|
+
compact: e.compact,
|
|
175
|
+
level: e.level,
|
|
176
|
+
name: e.name,
|
|
177
|
+
noncollapsible: e.level == 0,
|
|
178
|
+
schemas: e.schemas,
|
|
179
|
+
value: v(Z)(e.value[e.composition])
|
|
180
|
+
}, null, 8, ["compact", "level", "name", "noncollapsible", "schemas", "value"]))
|
|
181
|
+
]);
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
export {
|
|
186
|
+
ne as default
|
|
187
|
+
};
|
|
@@ -3,7 +3,7 @@ import { type Component } from 'vue';
|
|
|
3
3
|
/**
|
|
4
4
|
* Note: We’re taking in a prop called `value` which should be a JSON Schema.
|
|
5
5
|
*
|
|
6
|
-
* We’re using `optimizeValueForDisplay` to merge null types in
|
|
6
|
+
* We’re using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).
|
|
7
7
|
* So you should basically use the optimizedValue everywhere in the component.
|
|
8
8
|
*/
|
|
9
9
|
type __VLS_Props = {
|
|
@@ -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":"AA+gBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAc9C;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,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;;AAod1B,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-e6131992"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as Z, computed as y, createBlock as h, openBlock as l, resolveDynamicComponent as M, normalizeClass as A, withCtx as m, createCommentVNode as r, createElementBlock as s, createVNode as a, createSlots as G, createTextVNode as D, toDisplayString as c, unref as i, Fragment as d, renderList as k, createElementVNode as f } from "vue";
|
|
2
2
|
import { Disclosure as J, DisclosurePanel as K, DisclosureButton as Q } from "@headlessui/vue";
|
|
3
3
|
import { ScalarMarkdown as H, ScalarIcon as W } from "@scalar/components";
|
|
4
|
-
import { optimizeValueForDisplay as X,
|
|
4
|
+
import { optimizeValueForDisplay as X, compositions as Y } from "./helpers/optimizeValueForDisplay.js";
|
|
5
5
|
import I from "./Schema.vue.js";
|
|
6
|
-
import L from "./
|
|
6
|
+
import L from "./SchemaComposition.vue.js";
|
|
7
7
|
import x from "./SchemaPropertyHeading.vue.js";
|
|
8
8
|
import ee from "../../SpecificationExtension/SpecificationExtension.vue.js";
|
|
9
9
|
const ne = {
|
|
@@ -200,24 +200,24 @@ const ne = {
|
|
|
200
200
|
(u = n.value) != null && u[o] ? (l(), h(L, {
|
|
201
201
|
key: 0,
|
|
202
202
|
compact: e.compact,
|
|
203
|
-
|
|
203
|
+
composition: o,
|
|
204
204
|
hideHeading: e.hideHeading,
|
|
205
205
|
level: e.level,
|
|
206
206
|
name: e.name,
|
|
207
207
|
noncollapsible: e.noncollapsible,
|
|
208
208
|
schemas: e.schemas,
|
|
209
209
|
value: n.value
|
|
210
|
-
}, null, 8, ["compact", "
|
|
210
|
+
}, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : (_ = n.value) != null && _.items && typeof o == "string" && typeof n.value.items == "object" && !("type" in n.value.items) && o in n.value.items ? (l(), h(L, {
|
|
211
211
|
key: 1,
|
|
212
212
|
compact: e.compact,
|
|
213
|
-
|
|
213
|
+
composition: o,
|
|
214
214
|
hideHeading: e.hideHeading,
|
|
215
215
|
level: e.level,
|
|
216
216
|
name: e.name,
|
|
217
217
|
noncollapsible: e.noncollapsible,
|
|
218
218
|
schemas: e.schemas,
|
|
219
219
|
value: n.value.items
|
|
220
|
-
}, null, 8, ["compact", "
|
|
220
|
+
}, null, 8, ["compact", "composition", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : r("", !0)
|
|
221
221
|
], 64);
|
|
222
222
|
}), 128)),
|
|
223
223
|
a(i(ee), { value: n.value }, null, 8, ["value"])
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
examples?: Record<string, unknown>;
|
|
3
3
|
example?: unknown;
|
|
4
|
-
discriminatorType?: string;
|
|
5
4
|
};
|
|
6
5
|
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
6
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaPropertyExamples.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyExamples.vue"],"names":[],"mappings":"
|
|
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;CAClB,CAAC;;AA4IF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaPropertyExamples.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1b238a2e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as y, createElementBlock as l, openBlock as p, Fragment as i, createCommentVNode as u, createElementVNode as e, unref as o, createVNode as c, toDisplayString as n, renderList as b } from "vue";
|
|
2
2
|
import { ScalarIcon as x } from "@scalar/components";
|
|
3
3
|
import { useClipboard as v } from "@scalar/use-hooks/useClipboard";
|
|
4
|
-
import { formatExample as
|
|
4
|
+
import { formatExample as r } from "./helpers/formatExample.js";
|
|
5
5
|
const f = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "property-example"
|
|
@@ -15,14 +15,13 @@ const f = {
|
|
|
15
15
|
__name: "SchemaPropertyExamples",
|
|
16
16
|
props: {
|
|
17
17
|
examples: {},
|
|
18
|
-
example: {}
|
|
19
|
-
discriminatorType: {}
|
|
18
|
+
example: {}
|
|
20
19
|
},
|
|
21
20
|
setup(E) {
|
|
22
21
|
const { copyToClipboard: m } = v();
|
|
23
|
-
return (t,
|
|
22
|
+
return (t, s) => (p(), l(i, null, [
|
|
24
23
|
t.example ? (p(), l("div", f, [
|
|
25
|
-
|
|
24
|
+
s[1] || (s[1] = e("button", {
|
|
26
25
|
type: "button",
|
|
27
26
|
class: "property-example-label"
|
|
28
27
|
}, [
|
|
@@ -32,9 +31,9 @@ const f = {
|
|
|
32
31
|
e("button", {
|
|
33
32
|
type: "button",
|
|
34
33
|
class: "property-example-value group",
|
|
35
|
-
onClick:
|
|
34
|
+
onClick: s[0] || (s[0] = (a) => o(m)(String(o(r)(t.example))))
|
|
36
35
|
}, [
|
|
37
|
-
e("span", null, n(o(
|
|
36
|
+
e("span", null, n(o(r)(t.example)), 1),
|
|
38
37
|
c(o(x), {
|
|
39
38
|
icon: "Clipboard",
|
|
40
39
|
size: "xs",
|
|
@@ -52,9 +51,9 @@ const f = {
|
|
|
52
51
|
type: "button",
|
|
53
52
|
key: d,
|
|
54
53
|
class: "property-example-value group",
|
|
55
|
-
onClick: (S) => o(m)(String(o(
|
|
54
|
+
onClick: (S) => o(m)(String(o(r)(a)))
|
|
56
55
|
}, [
|
|
57
|
-
e("span", null, n(o(
|
|
56
|
+
e("span", null, n(o(r)(a)), 1),
|
|
58
57
|
c(o(x), {
|
|
59
58
|
icon: "Clipboard",
|
|
60
59
|
size: "xs",
|
|
@@ -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":"AAqVA,OAAO,KAAK,EAEV,SAAS,EACT,SAAS,EACT,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAgB9B,KAAK,WAAW,GAAG;IACjB,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;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;CACZ,CAAC;AA2GF,iBAAS,cAAc;WAwUT,OAAO,IAA6B;;sBATxB,GAAG;sBACH,GAAG;;;;EAa5B;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,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-187c71e2"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|