@scalar/blocks 0.10.0 → 0.11.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 +28 -0
- package/dist/code-example/components/CodeExample.vue.d.ts.map +1 -1
- package/dist/code-example/components/CodeExample.vue.js +1 -1
- package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/code-example/components/CodeExample.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/code-example/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/code-example/helpers/operation-to-har/process-parameters.js +131 -158
- package/dist/code-example/helpers/operation-to-har/process-parameters.js.map +1 -1
- package/dist/code-example/mount.d.ts +1 -1
- package/dist/code-example/mount.d.ts.map +1 -1
- package/dist/code-example/mount.js +49 -39
- package/dist/code-example/mount.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/schema/Schema.vue.d.ts.map +1 -1
- package/dist/schema/Schema.vue.js +1 -1
- package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js +40 -39
- package/dist/schema/Schema.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js +30 -22
- package/dist/schema/SchemaObjectProperties.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/schema/SchemaProperty.vue.d.ts +5 -0
- package/dist/schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/schema/SchemaProperty.vue.js +1 -1
- package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/schema/SchemaProperty.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/schema/SchemaPropertyHeading.vue.d.ts +6 -4
- package/dist/schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js +155 -132
- package/dist/schema/SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/schema/helpers/dynamic-scope.d.ts +3 -1
- package/dist/schema/helpers/dynamic-scope.d.ts.map +1 -1
- package/dist/schema/helpers/dynamic-scope.js +19 -4
- package/dist/schema/helpers/dynamic-scope.js.map +1 -1
- package/dist/schema/helpers/get-compositions-to-render.d.ts.map +1 -1
- package/dist/schema/helpers/get-compositions-to-render.js +24 -24
- package/dist/schema/helpers/get-compositions-to-render.js.map +1 -1
- package/dist/schema/helpers/index.d.ts +1 -0
- package/dist/schema/helpers/index.d.ts.map +1 -1
- package/dist/schema/helpers/index.js +14 -13
- package/dist/schema/helpers/optimize-value-for-display.d.ts.map +1 -1
- package/dist/schema/helpers/optimize-value-for-display.js +11 -11
- package/dist/schema/helpers/optimize-value-for-display.js.map +1 -1
- package/dist/schema/helpers/partition-all-of-compositions.d.ts.map +1 -1
- package/dist/schema/helpers/partition-all-of-compositions.js +24 -14
- package/dist/schema/helpers/partition-all-of-compositions.js.map +1 -1
- package/dist/schema/helpers/should-render-array-item-composition.d.ts +2 -0
- package/dist/schema/helpers/should-render-array-item-composition.d.ts.map +1 -1
- package/dist/schema/helpers/should-render-array-item-composition.js +2 -6
- package/dist/schema/helpers/should-render-array-item-composition.js.map +1 -1
- package/dist/style.css +67 -42
- package/dist/vue-styles.css +1 -1
- package/package.json +10 -10
|
@@ -3,57 +3,58 @@ import { getSchemaType as t } from "./helpers/get-schema-type.js";
|
|
|
3
3
|
import { getDisplayTypeSignatureTokens as n } from "./helpers/get-type-signature-tokens.js";
|
|
4
4
|
import { isModelLinkable as r } from "./helpers/is-model-linkable.js";
|
|
5
5
|
import { getModelNameWithArray as ee } from "./helpers/schema-name.js";
|
|
6
|
-
import { useLocalization as
|
|
7
|
-
import { protobufFieldNumber as
|
|
8
|
-
import { schemaRecursiveTarget as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { resolve as
|
|
16
|
-
import { isArraySchema as
|
|
17
|
-
import { isDefined as
|
|
18
|
-
import { ScalarTooltip as
|
|
6
|
+
import { useLocalization as te } from "./localization/index.js";
|
|
7
|
+
import { protobufFieldNumber as ne, protobufPresence as re } from "./protobuf-metadata.js";
|
|
8
|
+
import { schemaRecursiveTarget as ie } from "./recursive-metadata.js";
|
|
9
|
+
import i from "./RenderString.vue.js";
|
|
10
|
+
import ae from "./SchemaPropertyDefault.vue.js";
|
|
11
|
+
import a from "./SchemaPropertyDetail.vue.js";
|
|
12
|
+
import oe from "./SchemaPropertyExamples.vue.js";
|
|
13
|
+
import se from "./SchemaPropertyPattern.vue.js";
|
|
14
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as ce, createTextVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, openBlock as g, renderList as _, renderSlot as v, toDisplayString as y, toRef as le, unref as b, withCtx as x } from "vue";
|
|
15
|
+
import { resolve as S } from "@scalar/workspace-store/resolve";
|
|
16
|
+
import { isArraySchema as C, isNumberSchema as w, isStringSchema as T } from "@scalar/workspace-store/schemas/v3.2/strict/type-guards";
|
|
17
|
+
import { isDefined as E } from "@scalar/helpers/array/is-defined";
|
|
18
|
+
import { ScalarTooltip as D } from "@scalar/components/tooltip";
|
|
19
19
|
// src/schema/SchemaPropertyHeading.vue?vue&type=script&setup=true&lang.ts
|
|
20
|
-
var
|
|
20
|
+
var ue = { class: "property-heading [&>.property-detail:has(+.property-detail)]:mr-0" }, de = { class: "text-c-3 font-code mr-2 text-xs" }, fe = { "aria-hidden": "true" }, pe = { class: "sr-only" }, me = {
|
|
21
21
|
key: 2,
|
|
22
22
|
class: "property-discriminator"
|
|
23
|
-
},
|
|
23
|
+
}, O = { class: "font-code text-c-accent" }, he = { class: "screenreader-only" }, k = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "property-type-signature text-c-2 text-(length:--scalar-mini)"
|
|
26
|
-
},
|
|
26
|
+
}, A = {
|
|
27
27
|
key: 1,
|
|
28
28
|
class: "property-type-signature text-c-2 text-(length:--scalar-mini)"
|
|
29
|
-
},
|
|
29
|
+
}, j = { class: "text-c-2 mr-2 text-xs" }, M = { class: "sr-only" }, N = {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "screenreader-only"
|
|
32
|
-
},
|
|
32
|
+
}, P = {
|
|
33
33
|
key: 4,
|
|
34
34
|
class: "property-additional"
|
|
35
|
-
},
|
|
35
|
+
}, F = {
|
|
36
36
|
key: 5,
|
|
37
37
|
class: "property-deprecated"
|
|
38
|
-
},
|
|
38
|
+
}, I = {
|
|
39
39
|
key: 6,
|
|
40
40
|
class: "text-c-2"
|
|
41
|
-
},
|
|
41
|
+
}, L = {
|
|
42
42
|
key: 7,
|
|
43
43
|
class: "property-const"
|
|
44
|
-
},
|
|
44
|
+
}, ge = {
|
|
45
45
|
key: 9,
|
|
46
46
|
class: "property-write-only"
|
|
47
|
-
},
|
|
47
|
+
}, _e = {
|
|
48
48
|
key: 10,
|
|
49
49
|
class: "property-read-only"
|
|
50
|
-
},
|
|
50
|
+
}, ve = {
|
|
51
51
|
key: 11,
|
|
52
52
|
class: "property-required"
|
|
53
|
-
},
|
|
53
|
+
}, R = "min-w-0 wrap-anywhere whitespace-normal", z = /*@__PURE__*/ m({
|
|
54
54
|
__name: "SchemaPropertyHeading",
|
|
55
55
|
props: {
|
|
56
56
|
value: {},
|
|
57
|
+
badges: {},
|
|
57
58
|
enum: { type: Boolean },
|
|
58
59
|
isDiscriminator: {
|
|
59
60
|
type: Boolean,
|
|
@@ -80,212 +81,234 @@ var le = { class: "property-heading [&>.property-detail:has(+.property-detail)]:
|
|
|
80
81
|
keyKind: {},
|
|
81
82
|
recursiveTo: {}
|
|
82
83
|
},
|
|
83
|
-
setup(
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
setup(m) {
|
|
85
|
+
let z = m, { translate: B } = te(), V = s(() => z.value?.[ne]), H = s(() => z.recursiveTo ?? z.value?.[ie]), U = s(() => z.value?.[re]), W = s(() => U.value === "explicit" ? "Explicit presence: Protobuf distinguishes an unset field from one set to its default value." : "Implicit presence: Protobuf does not distinguish an unset field from one set to its default value."), G = le(z, "value"), K = s(() => {
|
|
86
|
+
let e = z.badges;
|
|
87
|
+
if (e) return {
|
|
88
|
+
before: e.filter((e) => e.position === "before"),
|
|
89
|
+
after: e.filter((e) => e.position !== "before")
|
|
90
|
+
};
|
|
91
|
+
}), q = s(() => {
|
|
92
|
+
if (!G.value) return;
|
|
93
|
+
let e = G.value;
|
|
87
94
|
if (e.const !== void 0) return e.const;
|
|
88
95
|
if (e.enum?.length === 1) return e.enum[0];
|
|
89
|
-
if (
|
|
90
|
-
let t =
|
|
91
|
-
if (
|
|
96
|
+
if (C(e) && e.items) {
|
|
97
|
+
let t = S.schema(e.items);
|
|
98
|
+
if (E(t.const)) return t.const;
|
|
92
99
|
if (t.enum?.length === 1) return t.enum[0];
|
|
93
100
|
}
|
|
94
101
|
}), J = (e) => {
|
|
95
102
|
let t = [];
|
|
96
|
-
return
|
|
103
|
+
return T(e) && (E(e.minLength) && t.push({
|
|
97
104
|
key: "min-length",
|
|
98
|
-
prefix: `${
|
|
105
|
+
prefix: `${B("schema.minLength")}: `,
|
|
99
106
|
value: e.minLength
|
|
100
|
-
}),
|
|
107
|
+
}), E(e.maxLength) && t.push({
|
|
101
108
|
key: "max-length",
|
|
102
|
-
prefix: `${
|
|
109
|
+
prefix: `${B("schema.maxLength")}: `,
|
|
103
110
|
value: e.maxLength
|
|
104
|
-
})), (
|
|
111
|
+
})), (T(e) || w(e)) && e.format && t.push({
|
|
105
112
|
key: "format",
|
|
106
113
|
value: e.format,
|
|
107
114
|
truncate: !0
|
|
108
|
-
}),
|
|
115
|
+
}), w(e) && (E(e.exclusiveMinimum) && t.push({
|
|
109
116
|
key: "exclusive-minimum",
|
|
110
|
-
prefix: `${
|
|
117
|
+
prefix: `${B("schema.greaterThan")}: `,
|
|
111
118
|
value: e.exclusiveMinimum
|
|
112
|
-
}),
|
|
119
|
+
}), E(e.minimum) && t.push({
|
|
113
120
|
key: "minimum",
|
|
114
|
-
prefix: `${
|
|
121
|
+
prefix: `${B("schema.min")}: `,
|
|
115
122
|
value: e.minimum
|
|
116
|
-
}),
|
|
123
|
+
}), E(e.exclusiveMaximum) && t.push({
|
|
117
124
|
key: "exclusive-maximum",
|
|
118
|
-
prefix: `${
|
|
125
|
+
prefix: `${B("schema.lessThan")}: `,
|
|
119
126
|
value: e.exclusiveMaximum
|
|
120
|
-
}),
|
|
127
|
+
}), E(e.maximum) && t.push({
|
|
121
128
|
key: "maximum",
|
|
122
|
-
prefix: `${
|
|
129
|
+
prefix: `${B("schema.max")}: `,
|
|
123
130
|
value: e.maximum
|
|
124
|
-
}),
|
|
131
|
+
}), E(e.multipleOf) && t.push({
|
|
125
132
|
key: "multiple-of",
|
|
126
|
-
prefix: `${
|
|
133
|
+
prefix: `${B("schema.multipleOf")}: `,
|
|
127
134
|
value: e.multipleOf
|
|
128
135
|
})), t;
|
|
129
|
-
},
|
|
130
|
-
if (!
|
|
131
|
-
let e =
|
|
132
|
-
return
|
|
136
|
+
}, ye = s(() => {
|
|
137
|
+
if (!G.value) return [];
|
|
138
|
+
let e = G.value, t = [];
|
|
139
|
+
return C(e) && ((E(e.minItems) || E(e.maxItems)) && t.push({
|
|
133
140
|
key: "array-range",
|
|
134
141
|
value: `${e.minItems ?? ""}…${e.maxItems ?? ""}`
|
|
135
142
|
}), e.uniqueItems && t.push({
|
|
136
143
|
key: "unique-items",
|
|
137
|
-
value: `${
|
|
138
|
-
})), t.push(...J(e)),
|
|
139
|
-
}), Y =
|
|
140
|
-
schemaKey:
|
|
141
|
-
label:
|
|
142
|
-
} : ee(
|
|
143
|
-
hideModelNames:
|
|
144
|
+
value: `${B("schema.unique")}!`
|
|
145
|
+
})), t.push(...J(e)), C(e) && e.items && t.push(...J(S.schema(e.items))), t;
|
|
146
|
+
}), Y = s(() => !z.value || z.hideModelNames ? null : z.modelName ? {
|
|
147
|
+
schemaKey: z.modelName,
|
|
148
|
+
label: z.modelName
|
|
149
|
+
} : ee(z.value)), be = s(() => r(Y.value?.schemaKey, z.modelLinkOptions ?? {})), X = s(() => n(z.value, {
|
|
150
|
+
hideModelNames: z.hideModelNames,
|
|
144
151
|
modelName: Y.value?.label
|
|
145
|
-
})),
|
|
146
|
-
let e =
|
|
152
|
+
})), xe = s(() => !z.value || !("type" in z.value) ? !1 : z.value.type === "array" || !q.value), Z = s(() => {
|
|
153
|
+
let e = z.propertyNames;
|
|
147
154
|
if (!e) return;
|
|
148
155
|
let n = [t(e)];
|
|
149
156
|
"format" in e && typeof e.format == "string" && n.push(e.format);
|
|
150
157
|
let r = n.filter(Boolean).join(" · ");
|
|
151
158
|
return r.length > 0 ? r : void 0;
|
|
152
|
-
}), Q =
|
|
153
|
-
if (
|
|
154
|
-
if (
|
|
155
|
-
let e =
|
|
159
|
+
}), Q = s(() => {
|
|
160
|
+
if (z.value && "example" in z.value && z.value.example !== void 0) return z.value.example;
|
|
161
|
+
if (z.value && C(z.value) && !z.value.examples?.length) {
|
|
162
|
+
let e = S.schema(z.value.items);
|
|
156
163
|
if (e && "example" in e && e.example !== void 0) return e.example;
|
|
157
164
|
}
|
|
158
|
-
}),
|
|
165
|
+
}), Se = s(() => {
|
|
159
166
|
if (Q.value !== void 0) return !0;
|
|
160
|
-
let e =
|
|
167
|
+
let e = z.value?.examples;
|
|
161
168
|
return !!e && typeof e == "object" && Object.keys(e).length > 0;
|
|
162
|
-
}), $ =
|
|
163
|
-
let e =
|
|
169
|
+
}), $ = s(() => {
|
|
170
|
+
let e = G.value;
|
|
164
171
|
if (e) {
|
|
165
|
-
if (
|
|
166
|
-
if (
|
|
167
|
-
let t =
|
|
168
|
-
if (
|
|
172
|
+
if (T(e) && e.pattern) return e.pattern;
|
|
173
|
+
if (C(e) && e.items) {
|
|
174
|
+
let t = S.schema(e.items);
|
|
175
|
+
if (T(t) && t.pattern) return t.pattern;
|
|
169
176
|
}
|
|
170
177
|
}
|
|
171
178
|
});
|
|
172
|
-
return (t, n) => (
|
|
173
|
-
|
|
179
|
+
return (t, n) => (g(), u("div", ue, [
|
|
180
|
+
(g(!0), u(o, null, _(K.value?.before, (t, n) => (g(), c(e, {
|
|
181
|
+
key: n,
|
|
182
|
+
class: h(R),
|
|
183
|
+
color: t.color
|
|
184
|
+
}, {
|
|
185
|
+
default: x(() => [f(y(t.name), 1)]),
|
|
186
|
+
_: 2
|
|
187
|
+
}, 1032, ["color"]))), 128)),
|
|
188
|
+
t.$slots.name ? (g(), u("div", {
|
|
174
189
|
key: 0,
|
|
175
|
-
class:
|
|
176
|
-
}, [
|
|
177
|
-
|
|
190
|
+
class: h(["property-name", { deprecated: z.value?.deprecated }])
|
|
191
|
+
}, [v(t.$slots, "name", {}, void 0, !0)], 2)) : l("", !0),
|
|
192
|
+
V.value === void 0 ? l("", !0) : (g(), c(b(D), {
|
|
178
193
|
key: 1,
|
|
179
194
|
content: "Protobuf field number"
|
|
180
195
|
}, {
|
|
181
|
-
default:
|
|
196
|
+
default: x(() => [d("span", de, [d("span", fe, "#" + y(V.value), 1), d("span", pe, "Protobuf field number: " + y(V.value), 1)])]),
|
|
182
197
|
_: 1
|
|
183
198
|
})),
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
199
|
+
z.isDiscriminator ? (g(), u("div", me, y(b(B)("schema.discriminator")), 1)) : l("", !0),
|
|
200
|
+
z.value ? (g(), u(o, { key: 3 }, [
|
|
201
|
+
z.keyKind ? (g(), c(a, {
|
|
187
202
|
key: 0,
|
|
188
203
|
class: "property-key-kind"
|
|
189
204
|
}, {
|
|
190
|
-
default:
|
|
205
|
+
default: x(() => [d("span", O, y(z.keyKind === "pattern" ? "patternProperty" : "additionalProperty"), 1)]),
|
|
191
206
|
_: 1
|
|
192
|
-
})) :
|
|
193
|
-
|
|
207
|
+
})) : l("", !0),
|
|
208
|
+
xe.value ? (g(), c(a, {
|
|
194
209
|
key: 1,
|
|
195
210
|
truncate: ""
|
|
196
211
|
}, {
|
|
197
|
-
default:
|
|
212
|
+
default: x(() => [d("span", he, y(b(B)("schema.type")) + ": ", 1), z.eventBus && Y.value?.schemaKey && be.value ? (g(), u("button", {
|
|
198
213
|
key: 0,
|
|
199
214
|
class: "text-c-2 hover:text-c-1 underline",
|
|
200
215
|
type: "button",
|
|
201
|
-
onClick: n[0] ||= (e) =>
|
|
202
|
-
}, [X.value.length ? (
|
|
216
|
+
onClick: n[0] ||= (e) => z.eventBus.emit("scroll-to:model-by-name", { name: Y.value.schemaKey })
|
|
217
|
+
}, [X.value.length ? (g(), u("span", k, [(g(!0), u(o, null, _(X.value, (e, t) => (g(), u(o, { key: t }, [f(y(t > 0 ? " " : ""), 1), d("span", { class: h(["property-type-token", [
|
|
203
218
|
`property-type-token--${e.kind}`,
|
|
204
219
|
e.kind === "word" ? "font-sans" : "",
|
|
205
220
|
e.kind === "ident" || e.kind === "literal" ? "font-code" : "",
|
|
206
221
|
e.kind === "punctuation" ? "text-c-2" : ""
|
|
207
|
-
]]) },
|
|
222
|
+
]]) }, y(e.text), 3)], 64))), 128))])) : l("", !0)])) : X.value.length ? (g(), u("span", A, [(g(!0), u(o, null, _(X.value, (e, t) => (g(), u(o, { key: t }, [f(y(t > 0 ? " " : ""), 1), d("span", { class: h(["property-type-token", [
|
|
208
223
|
`property-type-token--${e.kind}`,
|
|
209
224
|
e.kind === "word" ? "font-sans" : "",
|
|
210
225
|
e.kind === "ident" || e.kind === "literal" ? "font-code" : "",
|
|
211
226
|
e.kind === "punctuation" ? "text-c-2" : ""
|
|
212
|
-
]]) },
|
|
227
|
+
]]) }, y(e.text), 3)], 64))), 128))])) : l("", !0)]),
|
|
213
228
|
_: 1
|
|
214
|
-
})) :
|
|
215
|
-
|
|
229
|
+
})) : l("", !0),
|
|
230
|
+
H.value ? (g(), c(a, {
|
|
216
231
|
key: 2,
|
|
217
232
|
class: "property-recursive",
|
|
218
|
-
title:
|
|
233
|
+
title: b(B)("schema.recursiveReference", { name: H.value })
|
|
219
234
|
}, {
|
|
220
|
-
default:
|
|
235
|
+
default: x(() => [f(y(b(B)("schema.recursive")), 1)]),
|
|
221
236
|
_: 1
|
|
222
|
-
}, 8, ["title"])) :
|
|
223
|
-
|
|
237
|
+
}, 8, ["title"])) : l("", !0),
|
|
238
|
+
U.value ? (g(), c(b(D), {
|
|
224
239
|
key: 3,
|
|
225
|
-
content:
|
|
240
|
+
content: W.value
|
|
226
241
|
}, {
|
|
227
|
-
default:
|
|
242
|
+
default: x(() => [d("span", j, [n[1] ||= d("span", { "aria-hidden": "true" }, "optional", -1), d("span", M, "Optional (" + y(U.value) + " presence). " + y(W.value), 1)])]),
|
|
228
243
|
_: 1
|
|
229
|
-
}, 8, ["content"])) :
|
|
230
|
-
Z.value ? (
|
|
244
|
+
}, 8, ["content"])) : l("", !0),
|
|
245
|
+
Z.value ? (g(), c(a, {
|
|
231
246
|
key: 4,
|
|
232
247
|
truncate: ""
|
|
233
248
|
}, {
|
|
234
|
-
prefix:
|
|
235
|
-
default:
|
|
249
|
+
prefix: x(() => [f(y(b(B)("schema.keys")) + ":", 1)]),
|
|
250
|
+
default: x(() => [f(" " + y(Z.value), 1)]),
|
|
236
251
|
_: 1
|
|
237
|
-
})) :
|
|
238
|
-
(
|
|
252
|
+
})) : l("", !0),
|
|
253
|
+
(g(!0), u(o, null, _(ye.value, (e) => (g(), c(a, {
|
|
239
254
|
key: e.key,
|
|
240
255
|
code: e.code,
|
|
241
256
|
truncate: e.truncate
|
|
242
|
-
},
|
|
243
|
-
default:
|
|
257
|
+
}, ce({
|
|
258
|
+
default: x(() => [e.key === "format" ? (g(), u("span", N, y(b(B)("schema.format")) + ": ", 1)) : l("", !0), f(" " + y(e.value), 1)]),
|
|
244
259
|
_: 2
|
|
245
260
|
}, [e.prefix ? {
|
|
246
261
|
name: "prefix",
|
|
247
|
-
fn:
|
|
262
|
+
fn: x(() => [f(y(e.prefix), 1)]),
|
|
248
263
|
key: "0"
|
|
249
264
|
} : void 0]), 1032, ["code", "truncate"]))), 128)),
|
|
250
|
-
|
|
251
|
-
default:
|
|
265
|
+
z.enum ? (g(), c(a, { key: 5 }, {
|
|
266
|
+
default: x(() => [f(y(b(B)("schema.enum")), 1)]),
|
|
252
267
|
_: 1
|
|
253
|
-
})) :
|
|
254
|
-
], 64)) :
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
default:
|
|
268
|
+
})) : l("", !0)
|
|
269
|
+
], 64)) : l("", !0),
|
|
270
|
+
z.additional ? (g(), u("div", P, [z.value?.["x-additionalPropertiesName"] ? (g(), u(o, { key: 0 }, [f(y(z.value["x-additionalPropertiesName"]), 1)], 64)) : (g(), u(o, { key: 1 }, [f(y(b(B)("schema.additionalProperties")), 1)], 64))])) : l("", !0),
|
|
271
|
+
z.value?.deprecated ? (g(), u("div", F, [p(e, null, {
|
|
272
|
+
default: x(() => [f(y(b(B)("schema.deprecated")), 1)]),
|
|
258
273
|
_: 1
|
|
259
|
-
})])) :
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
274
|
+
})])) : l("", !0),
|
|
275
|
+
(g(!0), u(o, null, _(K.value?.after, (t, n) => (g(), c(e, {
|
|
276
|
+
key: n,
|
|
277
|
+
class: h(R),
|
|
278
|
+
color: t.color
|
|
279
|
+
}, {
|
|
280
|
+
default: x(() => [f(y(t.name), 1)]),
|
|
281
|
+
_: 2
|
|
282
|
+
}, 1032, ["color"]))), 128)),
|
|
283
|
+
m.discriminatorValue === void 0 ? l("", !0) : (g(), u("span", I, [f(y(b(B)("schema.discriminatorValue")) + ": ", 1), p(i, { value: m.discriminatorValue }, null, 8, ["value"])])),
|
|
284
|
+
q.value === void 0 ? (g(), u(o, { key: 8 }, [z.value?.nullable === !0 ? (g(), c(a, { key: 0 }, {
|
|
285
|
+
default: x(() => [f(y(b(B)("schema.nullable")), 1)]),
|
|
263
286
|
_: 1
|
|
264
|
-
})) :
|
|
265
|
-
prefix:
|
|
266
|
-
default:
|
|
287
|
+
})) : l("", !0)], 64)) : (g(), u("div", L, [p(a, { truncate: "" }, {
|
|
288
|
+
prefix: x(() => [f(y(b(B)("schema.const")) + ": ", 1)]),
|
|
289
|
+
default: x(() => [p(i, { value: q.value }, null, 8, ["value"])]),
|
|
267
290
|
_: 1
|
|
268
291
|
})])),
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
292
|
+
z.value?.writeOnly ? (g(), u("div", ge, y(b(B)("schema.writeOnly")), 1)) : z.value?.readOnly ? (g(), u("div", _e, y(b(B)("schema.readOnly")), 1)) : l("", !0),
|
|
293
|
+
z.required ? (g(), u("div", ve, y(b(B)("schema.required")), 1)) : l("", !0),
|
|
294
|
+
z.value?.default === void 0 ? l("", !0) : (g(), c(ae, {
|
|
272
295
|
key: 12,
|
|
273
|
-
value:
|
|
296
|
+
value: z.value?.default
|
|
274
297
|
}, null, 8, ["value"])),
|
|
275
|
-
$.value ? (
|
|
298
|
+
$.value ? (g(), c(se, {
|
|
276
299
|
key: 13,
|
|
277
300
|
pattern: $.value
|
|
278
|
-
}, null, 8, ["pattern"])) :
|
|
279
|
-
|
|
301
|
+
}, null, 8, ["pattern"])) : l("", !0),
|
|
302
|
+
z.withExamples && Se.value ? (g(), c(oe, {
|
|
280
303
|
key: 14,
|
|
281
304
|
example: Q.value,
|
|
282
|
-
examples:
|
|
283
|
-
}, null, 8, ["example", "examples"])) :
|
|
284
|
-
|
|
285
|
-
|
|
305
|
+
examples: z.value?.examples
|
|
306
|
+
}, null, 8, ["example", "examples"])) : l("", !0),
|
|
307
|
+
v(t.$slots, "preview", {}, void 0, !0),
|
|
308
|
+
v(t.$slots, "trailing", {}, void 0, !0)
|
|
286
309
|
]));
|
|
287
310
|
}
|
|
288
311
|
});
|
|
289
|
-
export {
|
|
312
|
+
export { z as default };
|
|
290
313
|
|
|
291
314
|
//# sourceMappingURL=SchemaPropertyHeading.vue_vue_type_script_setup_true_lang.js.map
|