@scalar/api-reference 1.29.3 → 1.30.0

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +13 -114
  3. package/dist/browser/standalone.js +1864 -1773
  4. package/dist/browser/webpack-stats.json +1 -1
  5. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  6. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  7. package/dist/components/Content/Schema/Schema.vue2.js +118 -84
  8. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +13 -0
  9. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -0
  10. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +49 -0
  11. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +4 -0
  12. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
  14. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +123 -119
  15. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +9 -1
  16. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -1
  17. package/dist/components/Content/Schema/helpers/schema-discriminator.js +45 -0
  18. package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -1
  19. package/dist/components/Section/SectionHeaderTag.vue.js +2 -2
  20. package/dist/features/ApiClientModal/useApiClient.d.ts +28 -8
  21. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  22. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +14 -0
  23. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -0
  24. package/dist/features/Operation/components/callbacks/Callback.vue.js +7 -0
  25. package/dist/features/Operation/components/callbacks/Callback.vue2.js +62 -0
  26. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +10 -0
  27. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -0
  28. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +30 -0
  29. package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +4 -0
  30. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -2
  31. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  32. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  33. package/dist/features/Operation/layouts/ModernLayout.vue2.js +86 -74
  34. package/dist/features/Operation/types/schemas.d.ts +3 -0
  35. package/dist/features/Operation/types/schemas.d.ts.map +1 -0
  36. package/dist/index.js +1 -1
  37. package/dist/style.css +1 -1
  38. package/package.json +8 -8
@@ -1 +1 @@
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
+ {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AA+bA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAgB9E,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;;AA0e5B,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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f3594262"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fce8655f"]]);
5
5
  export {
6
- f as default
6
+ a as default
7
7
  };
@@ -1,16 +1,18 @@
1
- import { defineComponent as V, computed as E, createBlock as i, createCommentVNode as o, openBlock as a, unref as r, withCtx as d, createElementVNode as j, normalizeClass as v, createElementBlock as s, withDirectives as w, createVNode as u, createTextVNode as h, toDisplayString as f, vShow as z, normalizeStyle as T, Fragment as t, renderList as A } from "vue";
2
- import { Disclosure as $, DisclosureButton as D, DisclosurePanel as F } from "@headlessui/vue";
3
- import { ScalarMarkdown as I, ScalarIcon as g } from "@scalar/components";
4
- import q from "../../ScreenReader.vue.js";
5
- import L from "./SchemaHeading.vue.js";
6
- import y from "./SchemaProperty.vue.js";
7
- const M = {
1
+ import { defineComponent as F, ref as I, computed as k, watch as L, createBlock as t, createCommentVNode as o, openBlock as l, unref as n, withCtx as p, createElementVNode as V, normalizeClass as P, createElementBlock as s, withDirectives as z, createVNode as v, createTextVNode as b, toDisplayString as C, vShow as A, normalizeStyle as R, Fragment as u, renderList as M } from "vue";
2
+ import { Disclosure as U, DisclosureButton as q, DisclosurePanel as G } from "@headlessui/vue";
3
+ import { ScalarMarkdown as J, ScalarIcon as D } from "@scalar/components";
4
+ import { getDiscriminatorMapping as K, getDiscriminatorPropertyName as Q, mergeDiscriminatorSchemas as W } from "./helpers/schema-discriminator.js";
5
+ import X from "./SchemaDiscriminator.vue.js";
6
+ import T from "../../ScreenReader.vue.js";
7
+ import Y from "./SchemaHeading.vue.js";
8
+ import H from "./SchemaProperty.vue.js";
9
+ const Z = {
8
10
  key: 0,
9
11
  class: "schema-card-description"
10
- }, R = {
12
+ }, _ = {
11
13
  key: 0,
12
14
  class: "schema-properties"
13
- }, X = /* @__PURE__ */ V({
15
+ }, se = /* @__PURE__ */ F({
14
16
  __name: "Schema",
15
17
  props: {
16
18
  value: { type: [Object, Boolean] },
@@ -22,49 +24,68 @@ const M = {
22
24
  additionalProperties: { type: Boolean },
23
25
  schemas: {}
24
26
  },
25
- setup(N) {
26
- const k = N, b = E(() => !(k.noncollapsible || k.level === 0)), H = (e) => k.noncollapsible && e.stopPropagation();
27
- return (e, P) => typeof e.value == "object" && Object.keys(e.value).length ? (a(), i(r($), {
27
+ setup($) {
28
+ const r = $, c = I(""), m = k(() => {
29
+ if (r.value)
30
+ return K(r.value);
31
+ }), E = k(() => m.value && Object.keys(m.value)[0] || ""), N = k(() => {
32
+ if (r.value)
33
+ return Q(r.value);
34
+ }), a = k(() => {
35
+ if (r.value)
36
+ return !m.value || !c.value ? r.value : W(
37
+ r.value,
38
+ c.value,
39
+ r.schemas
40
+ ) || r.value;
41
+ }), O = k(() => !(r.noncollapsible || r.level === 0)), B = (e) => r.noncollapsible && e.stopPropagation();
42
+ return L(
43
+ m,
44
+ (e) => {
45
+ e && !c.value && (c.value = E.value);
46
+ },
47
+ { immediate: !0 }
48
+ ), (e, S) => typeof e.value == "object" && Object.keys(e.value).length ? (l(), t(n(U), {
28
49
  key: 0,
29
50
  defaultOpen: e.noncollapsible
30
51
  }, {
31
- default: d(({ open: n }) => {
32
- var S;
52
+ default: p(({ open: d }) => {
53
+ var j;
33
54
  return [
34
- j("div", {
35
- class: v(["schema-card", [
55
+ V("div", {
56
+ class: P(["schema-card", [
36
57
  `schema-card--level-${e.level}`,
37
- { "schema-card--compact": e.compact, "schema-card--open": n },
38
- { "border-t-1/2": e.additionalProperties && n }
58
+ { "schema-card--compact": e.compact, "schema-card--open": d },
59
+ { "border-t-1/2": e.additionalProperties && d }
39
60
  ]])
40
61
  }, [
41
- (S = e.value) != null && S.description && typeof e.value.description == "string" && !e.value.allOf && !e.value.oneOf && !e.value.anyOf && !e.compact ? (a(), s("div", M, [
42
- e.value.enum ? o("", !0) : (a(), i(r(I), {
62
+ (j = a.value) != null && j.description && typeof a.value.description == "string" && !a.value.allOf && !a.value.oneOf && !a.value.anyOf && !e.compact ? (l(), s("div", Z, [
63
+ a.value.enum ? o("", !0) : (l(), t(n(J), {
43
64
  key: 0,
44
- value: e.value.description
65
+ value: a.value.description
45
66
  }, null, 8, ["value"]))
46
67
  ])) : o("", !0),
47
- j("div", {
48
- class: v(["schema-properties", {
49
- "schema-properties-open": n
68
+ V("div", {
69
+ class: P(["schema-properties", {
70
+ "schema-properties-open": d
50
71
  }])
51
72
  }, [
52
- e.additionalProperties ? w((a(), s("div", R, [
53
- u(r(D), {
73
+ e.additionalProperties ? z((l(), s("div", _, [
74
+ v(n(q), {
54
75
  as: "button",
55
76
  class: "schema-card-title schema-card-title--compact",
56
- onClickCapture: H
77
+ onClickCapture: B
57
78
  }, {
58
- default: d(() => [
59
- u(r(g), {
79
+ default: p(() => [
80
+ v(n(D), {
60
81
  class: "schema-card-title-icon",
61
82
  icon: "Add",
62
83
  size: "sm"
63
84
  }),
64
- P[0] || (P[0] = h(" Show additional properties ")),
65
- e.name ? (a(), i(q, { key: 0 }, {
66
- default: d(() => [
67
- h("for " + f(e.name), 1)
85
+ S[1] || (S[1] = b(" Show additional properties ")),
86
+ e.name ? (l(), t(T, { key: 0 }, {
87
+ default: p(() => [
88
+ b("for " + C(e.name), 1)
68
89
  ]),
69
90
  _: 1
70
91
  })) : o("", !0)
@@ -72,44 +93,44 @@ const M = {
72
93
  _: 1
73
94
  })
74
95
  ], 512)), [
75
- [z, !n]
76
- ]) : b.value ? w((a(), i(r(D), {
96
+ [A, !d]
97
+ ]) : O.value ? z((l(), t(n(q), {
77
98
  key: 1,
78
99
  as: e.noncollapsible ? "div" : "button",
79
- class: v(["schema-card-title", { "schema-card-title--compact": e.compact }]),
80
- style: T({
100
+ class: P(["schema-card-title", { "schema-card-title--compact": e.compact }]),
101
+ style: R({
81
102
  top: `calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${e.level}))`
82
103
  }),
83
- onClickCapture: H
104
+ onClickCapture: B
84
105
  }, {
85
- default: d(() => {
86
- var m, c, l;
106
+ default: p(() => {
107
+ var h, y, f;
87
108
  return [
88
- e.compact ? (a(), s(t, { key: 0 }, [
89
- u(r(g), {
90
- class: v(["schema-card-title-icon", { "schema-card-title-icon--open": n }]),
109
+ e.compact ? (l(), s(u, { key: 0 }, [
110
+ v(n(D), {
111
+ class: P(["schema-card-title-icon", { "schema-card-title-icon--open": d }]),
91
112
  icon: "Add",
92
113
  size: "sm"
93
114
  }, null, 8, ["class"]),
94
- n ? (a(), s(t, { key: 0 }, [
95
- h(" Hide " + f(((m = e.value) == null ? void 0 : m.title) ?? "Child Attributes"), 1)
96
- ], 64)) : (a(), s(t, { key: 1 }, [
97
- h(" Show " + f(((c = e.value) == null ? void 0 : c.title) ?? "Child Attributes"), 1)
115
+ d ? (l(), s(u, { key: 0 }, [
116
+ b(" Hide " + C(((h = e.value) == null ? void 0 : h.title) ?? "Child Attributes"), 1)
117
+ ], 64)) : (l(), s(u, { key: 1 }, [
118
+ b(" Show " + C(((y = e.value) == null ? void 0 : y.title) ?? "Child Attributes"), 1)
98
119
  ], 64)),
99
- e.name ? (a(), i(q, { key: 2 }, {
100
- default: d(() => [
101
- h("for " + f(e.name), 1)
120
+ e.name ? (l(), t(T, { key: 2 }, {
121
+ default: p(() => [
122
+ b("for " + C(e.name), 1)
102
123
  ]),
103
124
  _: 1
104
125
  })) : o("", !0)
105
- ], 64)) : (a(), s(t, { key: 1 }, [
106
- u(r(g), {
107
- class: v(["schema-card-title-icon", { "schema-card-title-icon--open": n }]),
126
+ ], 64)) : (l(), s(u, { key: 1 }, [
127
+ v(n(D), {
128
+ class: P(["schema-card-title-icon", { "schema-card-title-icon--open": d }]),
108
129
  icon: "Add",
109
130
  size: "sm"
110
131
  }, null, 8, ["class"]),
111
- u(L, {
112
- name: ((l = e.value) == null ? void 0 : l.title) ?? e.name,
132
+ v(Y, {
133
+ name: ((f = e.value) == null ? void 0 : f.title) ?? e.name,
113
134
  value: e.value
114
135
  }, null, 8, ["name", "value"])
115
136
  ], 64))
@@ -117,44 +138,57 @@ const M = {
117
138
  }),
118
139
  _: 2
119
140
  }, 1032, ["as", "class", "style"])), [
120
- [z, !e.hideHeading && !(e.noncollapsible && e.compact)]
141
+ [A, !e.hideHeading && !(e.noncollapsible && e.compact)]
121
142
  ]) : o("", !0),
122
- u(r(F), {
143
+ v(n(G), {
123
144
  as: "ul",
124
- static: !b.value
145
+ static: !O.value
125
146
  }, {
126
- default: d(() => {
127
- var m, c;
147
+ default: p(() => {
148
+ var h, y, f;
128
149
  return [
129
- e.value.properties || e.value.additionalProperties || e.value.patternProperties ? (a(), s(t, { key: 0 }, [
130
- e.value.properties ? (a(!0), s(t, { key: 0 }, A(Object.keys((m = e.value) == null ? void 0 : m.properties), (l) => {
131
- var p, C, O, B;
132
- return a(), i(y, {
133
- key: l,
150
+ m.value && ((h = a.value) != null && h.properties) ? (l(), t(X, {
151
+ key: 0,
152
+ modelValue: c.value,
153
+ "onUpdate:modelValue": S[0] || (S[0] = (i) => c.value = i),
154
+ discriminatorMapping: m.value,
155
+ discriminatorPropertyName: N.value
156
+ }, null, 8, ["modelValue", "discriminatorMapping", "discriminatorPropertyName"])) : o("", !0),
157
+ a.value && ("properties" in a.value || "additionalProperties" in a.value || "patternProperties" in a.value) ? (l(), s(u, { key: 1 }, [
158
+ a.value.properties ? (l(!0), s(u, { key: 0 }, M(Object.keys(a.value.properties), (i) => {
159
+ var g, w;
160
+ return l(), t(H, {
161
+ key: i,
134
162
  compact: e.compact,
135
163
  hideHeading: e.hideHeading,
136
164
  level: e.level + 1,
137
- name: l,
138
- required: ((p = e.value.required) == null ? void 0 : p.includes(l)) || ((O = (C = e.value.properties) == null ? void 0 : C[l]) == null ? void 0 : O.required) === !0,
165
+ name: i,
166
+ required: ((g = a.value.required) == null ? void 0 : g.includes(i)) || ((w = a.value.properties[i]) == null ? void 0 : w.required) === !0,
139
167
  schemas: e.schemas,
140
- value: (B = e.value.properties) == null ? void 0 : B[l]
168
+ value: {
169
+ ...a.value.properties[i],
170
+ parent: a.value,
171
+ isDiscriminator: i === N.value
172
+ }
141
173
  }, null, 8, ["compact", "hideHeading", "level", "name", "required", "schemas", "value"]);
142
174
  }), 128)) : o("", !0),
143
- e.value.patternProperties ? (a(!0), s(t, { key: 1 }, A(Object.keys((c = e.value) == null ? void 0 : c.patternProperties), (l) => {
144
- var p;
145
- return a(), i(y, {
146
- key: l,
175
+ a.value.patternProperties ? (l(!0), s(u, { key: 1 }, M(Object.keys(
176
+ a.value.patternProperties
177
+ ), (i) => {
178
+ var g;
179
+ return l(), t(H, {
180
+ key: i,
147
181
  compact: e.compact,
148
182
  hideHeading: e.hideHeading,
149
183
  level: e.level,
150
- name: l,
184
+ name: i,
151
185
  pattern: "",
152
186
  schemas: e.schemas,
153
- value: (p = e.value.patternProperties) == null ? void 0 : p[l]
187
+ value: ((g = e.value.discriminator) == null ? void 0 : g.propertyName) === i ? e.value : a.value.patternProperties[i]
154
188
  }, null, 8, ["compact", "hideHeading", "level", "name", "schemas", "value"]);
155
189
  }), 128)) : o("", !0),
156
- e.value.additionalProperties ? (a(), s(t, { key: 2 }, [
157
- e.value.additionalProperties === !0 || Object.keys(e.value.additionalProperties).length === 0 || !e.value.additionalProperties.type ? (a(), i(y, {
190
+ a.value.additionalProperties ? (l(), s(u, { key: 2 }, [
191
+ a.value.additionalProperties === !0 || Object.keys(a.value.additionalProperties).length === 0 || !("type" in a.value.additionalProperties) ? (l(), t(H, {
158
192
  key: 0,
159
193
  additional: "",
160
194
  compact: e.compact,
@@ -164,9 +198,9 @@ const M = {
164
198
  schemas: e.schemas,
165
199
  value: {
166
200
  type: "anything",
167
- ...typeof e.value.additionalProperties == "object" ? e.value.additionalProperties : {}
201
+ ...typeof a.value.additionalProperties == "object" ? a.value.additionalProperties : {}
168
202
  }
169
- }, null, 8, ["compact", "hideHeading", "level", "schemas", "value"])) : (a(), i(y, {
203
+ }, null, 8, ["compact", "hideHeading", "level", "schemas", "value"])) : (l(), t(H, {
170
204
  key: 1,
171
205
  additional: "",
172
206
  compact: e.compact,
@@ -174,17 +208,17 @@ const M = {
174
208
  level: e.level,
175
209
  noncollapsible: "",
176
210
  schemas: e.schemas,
177
- value: e.value.additionalProperties
211
+ value: ((y = e.value.discriminator) == null ? void 0 : y.propertyName) === e.name ? e.value : a.value.additionalProperties
178
212
  }, null, 8, ["compact", "hideHeading", "level", "schemas", "value"]))
179
213
  ], 64)) : o("", !0)
180
- ], 64)) : (a(), i(y, {
181
- key: 1,
214
+ ], 64)) : (l(), t(H, {
215
+ key: 2,
182
216
  compact: e.compact,
183
217
  hideHeading: e.hideHeading,
184
218
  level: e.level,
185
- name: e.value.name,
219
+ name: a.value.name,
186
220
  schemas: e.schemas,
187
- value: e.value
221
+ value: ((f = e.value.discriminator) == null ? void 0 : f.propertyName) === e.name ? e.value : a.value
188
222
  }, null, 8, ["compact", "hideHeading", "level", "name", "schemas", "value"]))
189
223
  ];
190
224
  }),
@@ -199,5 +233,5 @@ const M = {
199
233
  }
200
234
  });
201
235
  export {
202
- X as default
236
+ se as default
203
237
  };
@@ -0,0 +1,13 @@
1
+ import type { DiscriminatorMapping, DiscriminatorPropertyName } from './helpers/schema-discriminator.js';
2
+ type __VLS_Props = {
3
+ discriminatorMapping: DiscriminatorMapping;
4
+ modelValue: string;
5
+ discriminatorPropertyName?: DiscriminatorPropertyName;
6
+ };
7
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ "update:modelValue": (value: string) => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
13
+ //# sourceMappingURL=SchemaDiscriminator.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaDiscriminator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaDiscriminator.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAA;AAIvC,KAAK,WAAW,GAAG;IACf,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB,CAAC,EAAE,yBAAyB,CAAA;CACtD,CAAC;;;;;;AAiHJ,wBAQG"}
@@ -0,0 +1,49 @@
1
+ import { defineComponent as c, computed as n, createBlock as u, openBlock as b, unref as s, withCtx as f, createElementVNode as i, createVNode as V, toDisplayString as m } from "vue";
2
+ import { ScalarListbox as x } from "@scalar/components";
3
+ import { ScalarIconCaretDown as g } from "@scalar/icons";
4
+ const v = {
5
+ class: "bg-b-1.5 hover:bg-b-2 py-1.25 flex w-full items-center gap-1 border-b px-2",
6
+ type: "button"
7
+ }, y = { class: "composition-selector-label text-c-1 relative" }, _ = /* @__PURE__ */ c({
8
+ __name: "SchemaDiscriminator",
9
+ props: {
10
+ discriminatorMapping: {},
11
+ modelValue: {},
12
+ discriminatorPropertyName: {}
13
+ },
14
+ emits: ["update:modelValue"],
15
+ setup(l, { emit: p }) {
16
+ const d = p, r = n(
17
+ () => Object.keys(l.discriminatorMapping).map((e) => ({
18
+ id: e,
19
+ label: e
20
+ }))
21
+ ), a = n({
22
+ get: () => r.value.find(
23
+ (e) => e.id === l.modelValue
24
+ ),
25
+ set: (e) => d("update:modelValue", e.id)
26
+ });
27
+ return (e, t) => (b(), u(s(x), {
28
+ modelValue: a.value,
29
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => a.value = o),
30
+ options: r.value,
31
+ resize: ""
32
+ }, {
33
+ default: f(() => {
34
+ var o;
35
+ return [
36
+ i("button", v, [
37
+ t[1] || (t[1] = i("span", { class: "text-c-2" }, "Discriminator", -1)),
38
+ i("span", y, m(e.discriminatorPropertyName) + " " + m((o = a.value) == null ? void 0 : o.label), 1),
39
+ V(s(g))
40
+ ])
41
+ ];
42
+ }),
43
+ _: 1
44
+ }, 8, ["modelValue", "options"]));
45
+ }
46
+ });
47
+ export {
48
+ _ as default
49
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./SchemaDiscriminator.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AA2XA,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;AAkJF,iBAAS,cAAc;WAuUT,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
+ {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAsYA,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;AAkJF,iBAAS,cAAc;WA4UT,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
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2e17f3f8"]]);
3
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ce6ed2af"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };