@scalar/api-reference 1.28.34 → 1.29.2

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 (55) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/browser/standalone.js +12508 -13008
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  5. package/dist/components/Content/Content.vue.js +2 -2
  6. package/dist/components/Content/Content.vue2.js +3 -3
  7. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  8. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  9. package/dist/components/Content/Schema/{SchemaDiscriminator.vue.d.ts → SchemaComposition.vue.d.ts} +3 -2
  10. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -0
  11. package/dist/components/Content/Schema/SchemaComposition.vue.js +187 -0
  12. package/dist/components/Content/Schema/SchemaComposition.vue2.js +4 -0
  13. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
  14. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  16. package/dist/components/Content/Schema/SchemaProperty.vue2.js +6 -6
  17. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +0 -1
  18. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +3 -3
  20. package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +8 -9
  21. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  23. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +165 -146
  24. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +3 -2
  25. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  26. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +13 -13
  27. package/dist/components/Content/Schema/helpers/schema-composition.d.ts +12 -0
  28. package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -0
  29. package/dist/components/Content/Schema/helpers/schema-composition.js +8 -0
  30. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +4 -0
  31. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -0
  32. package/dist/components/Layouts/Layouts.vue.d.ts +3 -0
  33. package/dist/components/Layouts/Layouts.vue.d.ts.map +1 -1
  34. package/dist/components/Layouts/Layouts.vue.js +14 -23
  35. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
  36. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  37. package/dist/components/Layouts/ModernLayout.vue2.js +51 -45
  38. package/dist/components/SingleApiReference.vue.d.ts +1 -0
  39. package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
  40. package/dist/components/SingleApiReference.vue.js +25 -22
  41. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +1 -1
  42. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  43. package/dist/features/ApiClientModal/useApiClient.d.ts +144 -104
  44. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  45. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
  46. package/dist/features/BaseUrl/BaseUrl.vue.js +11 -10
  47. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  48. package/dist/index.d.ts +1 -0
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +46 -43
  51. package/dist/style.css +1 -1
  52. package/package.json +17 -17
  53. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
  54. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -101
  55. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -4
@@ -1,22 +1,22 @@
1
- import { defineComponent as T, createElementBlock as i, openBlock as l, createCommentVNode as u, createBlock as o, normalizeClass as z, renderSlot as D, Fragment as s, createTextVNode as r, toDisplayString as n, createVNode as p, unref as g, withCtx as a } from "vue";
2
- import { isDefined as H } from "@scalar/oas-utils/helpers";
3
- import { stringify as E } from "flatted";
4
- import { discriminators as J } from "./helpers/optimizeValueForDisplay.js";
1
+ import { defineComponent as z, computed as D, createElementBlock as m, openBlock as l, createCommentVNode as i, createBlock as d, normalizeClass as H, renderSlot as E, Fragment as y, createTextVNode as u, withCtx as a, createVNode as v, toDisplayString as n, unref as g } from "vue";
2
+ import { isDefined as B } from "@scalar/oas-utils/helpers";
3
+ import { stringify as L } from "flatted";
4
+ import { compositions as J } from "./helpers/schema-composition.js";
5
5
  import R from "./SchemaPropertyExamples.vue.js";
6
- import B from "../../ScreenReader.vue.js";
7
- import m from "./SchemaPropertyDetail.vue.js";
8
- import L from "../../Badge/Badge.vue.js";
6
+ import b from "../../ScreenReader.vue.js";
7
+ import o from "./SchemaPropertyDetail.vue.js";
8
+ import O from "../../Badge/Badge.vue.js";
9
9
  const G = { class: "property-heading" }, K = {
10
- key: 1,
10
+ key: 2,
11
11
  class: "property-additional"
12
12
  }, Q = {
13
- key: 2,
13
+ key: 3,
14
14
  class: "property-pattern"
15
15
  }, U = {
16
- key: 3,
16
+ key: 4,
17
17
  class: "property-deprecated"
18
18
  }, W = {
19
- key: 4,
19
+ key: 5,
20
20
  class: "property-const"
21
21
  }, X = {
22
22
  key: 7,
@@ -27,7 +27,7 @@ const G = { class: "property-heading" }, K = {
27
27
  }, Z = {
28
28
  key: 9,
29
29
  class: "property-required"
30
- }, ae = /* @__PURE__ */ T({
30
+ }, ae = /* @__PURE__ */ z({
31
31
  __name: "SchemaPropertyHeading",
32
32
  props: {
33
33
  value: {},
@@ -38,213 +38,232 @@ const G = { class: "property-heading" }, K = {
38
38
  withExamples: { type: Boolean, default: !0 },
39
39
  schemas: {}
40
40
  },
41
- setup(d) {
42
- const O = J.find((e) => !d.value || typeof d.value != "object" ? !1 : e in d.value || d.value.items && typeof d.value.items == "object" && e in d.value.items), $ = (e) => (e == null ? void 0 : e.default) === null ? "null" : Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : typeof (e == null ? void 0 : e.default) == "string" ? JSON.stringify(e.default) : e == null ? void 0 : e.default, F = (e) => {
41
+ setup(r) {
42
+ J.find((e) => !r.value || typeof r.value != "object" ? !1 : e in r.value || r.value.items && typeof r.value.items == "object" && e in r.value.items);
43
+ const $ = (e) => (e == null ? void 0 : e.default) === null ? "null" : Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : typeof (e == null ? void 0 : e.default) == "string" ? JSON.stringify(e.default) : e == null ? void 0 : e.default, F = (e) => {
43
44
  if (!e)
44
45
  return null;
46
+ if (e.title)
47
+ return e.title;
45
48
  if (e.name)
46
49
  return e.name;
47
- if (d.schemas && typeof d.schemas == "object") {
48
- for (const [t, k] of Object.entries(d.schemas))
49
- if (E(k) === E(e))
50
+ if (r.schemas && typeof r.schemas == "object") {
51
+ for (const [t, s] of Object.entries(r.schemas))
52
+ if (L(s) === L(e))
50
53
  return t;
51
54
  }
52
55
  return null;
53
- };
56
+ }, N = D(() => {
57
+ var e, t, s, f, p, k;
58
+ if (B((e = r.value) == null ? void 0 : e.const))
59
+ return (t = r.value) == null ? void 0 : t.const;
60
+ if (((f = (s = r.value) == null ? void 0 : s.enum) == null ? void 0 : f.length) === 1)
61
+ return r.value.enum[0];
62
+ if ((p = r.value) != null && p.items) {
63
+ if (B(r.value.items.const))
64
+ return r.value.items.const;
65
+ if (((k = r.value.items.enum) == null ? void 0 : k.length) === 1)
66
+ return r.value.items.enum[0];
67
+ }
68
+ return null;
69
+ }), T = D(() => {
70
+ var e, t, s, f;
71
+ return Array.isArray((e = r.value) == null ? void 0 : e.type) ? r.value.type.join(" | ") : (t = r.value) != null && t.title ? r.value.title : (s = r.value) != null && s.name ? r.value.name : ((f = r.value) == null ? void 0 : f.type) ?? "";
72
+ });
54
73
  return (e, t) => {
55
- var k, b, N, S, q, w, P, j, I, M, V, A, C;
56
- return l(), i("div", G, [
57
- e.$slots.name ? (l(), i("div", {
74
+ var s, f, p, k, S, q, w, P, V, j, I;
75
+ return l(), m("div", G, [
76
+ e.$slots.name ? (l(), m("div", {
58
77
  key: 0,
59
- class: z(["property-name", { deprecated: (k = e.value) == null ? void 0 : k.deprecated }])
78
+ class: H(["property-name", { deprecated: (s = e.value) == null ? void 0 : s.deprecated }])
60
79
  }, [
61
- e.pattern ? (l(), i(s, { key: 1 }, [
62
- t[0] || (t[0] = r("/")),
63
- D(e.$slots, "name", {}, void 0, !0),
64
- t[1] || (t[1] = r("/"))
65
- ], 64)) : D(e.$slots, "name", { key: 0 }, void 0, !0)
66
- ], 2)) : u("", !0),
67
- e.additional ? (l(), i("div", K, [
68
- (b = e.value) != null && b["x-additionalPropertiesName"] ? (l(), i(s, { key: 0 }, [
69
- r(n(e.value["x-additionalPropertiesName"]), 1)
70
- ], 64)) : (l(), i(s, { key: 1 }, [
71
- r("additional properties")
72
- ], 64))
73
- ])) : u("", !0),
74
- e.pattern ? (l(), i("div", Q, [
75
- p(g(L), null, {
76
- default: a(() => t[2] || (t[2] = [
77
- r("pattern")
78
- ])),
79
- _: 1
80
- })
81
- ])) : u("", !0),
82
- (N = e.value) != null && N.deprecated ? (l(), i("div", U, [
83
- p(g(L), null, {
84
- default: a(() => t[3] || (t[3] = [
85
- r("deprecated")
86
- ])),
87
- _: 1
88
- })
89
- ])) : u("", !0),
90
- g(H)((S = e.value) == null ? void 0 : S.const) || (q = e.value) != null && q.enum && e.value.enum.length === 1 ? (l(), i("div", W, [
91
- p(m, { truncate: "" }, {
92
- prefix: a(() => t[4] || (t[4] = [
93
- r("const:")
94
- ])),
95
- default: a(() => {
96
- var y, f, v;
97
- return [
98
- r(" " + n(((y = e.value) == null ? void 0 : y.const) ?? ((v = (f = e.value) == null ? void 0 : f.enum) == null ? void 0 : v[0])), 1)
99
- ];
100
- }),
101
- _: 1
102
- })
103
- ])) : (w = e.value) != null && w.type ? (l(), i(s, { key: 5 }, [
104
- p(m, null, {
80
+ e.pattern ? (l(), m(y, { key: 1 }, [
81
+ t[0] || (t[0] = u("/")),
82
+ E(e.$slots, "name", {}, void 0, !0),
83
+ t[1] || (t[1] = u("/"))
84
+ ], 64)) : E(e.$slots, "name", { key: 0 }, void 0, !0)
85
+ ], 2)) : i("", !0),
86
+ e.value ? (l(), m(y, { key: 1 }, [
87
+ (f = e.value) != null && f.type ? (l(), d(o, { key: 0 }, {
105
88
  default: a(() => {
106
- var y, f, v;
89
+ var M, A, C;
107
90
  return [
108
- p(B, null, {
109
- default: a(() => t[5] || (t[5] = [
110
- r("Type:")
91
+ v(b, null, {
92
+ default: a(() => t[2] || (t[2] = [
93
+ u("Type:")
111
94
  ])),
112
95
  _: 1
113
96
  }),
114
- (f = (y = e.value) == null ? void 0 : y.items) != null && f.type ? (l(), i(s, { key: 0 }, [
115
- r(n(e.value.type) + " " + n(F(e.value.items) || e.value.items.type) + "[] ", 1)
116
- ], 64)) : (l(), i(s, { key: 1 }, [
117
- r(n(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + n((v = e.value) != null && v.nullable ? " | nullable" : ""), 1)
118
- ], 64)),
119
- e.value.minItems || e.value.maxItems ? (l(), i(s, { key: 2 }, [
120
- r(n(e.value.minItems) + "…" + n(e.value.maxItems), 1)
121
- ], 64)) : u("", !0)
97
+ (A = (M = e.value) == null ? void 0 : M.items) != null && A.type ? (l(), m(y, { key: 0 }, [
98
+ u(n(e.value.type) + " " + n(F(e.value.items) || e.value.items.type) + "[] ", 1)
99
+ ], 64)) : (l(), m(y, { key: 1 }, [
100
+ u(n(T.value) + " " + n((C = e.value) != null && C.nullable ? " | nullable" : ""), 1)
101
+ ], 64))
122
102
  ];
123
103
  }),
124
104
  _: 1
125
- }),
126
- e.value.minLength ? (l(), o(m, { key: 0 }, {
127
- prefix: a(() => t[6] || (t[6] = [
128
- r("min:")
105
+ })) : i("", !0),
106
+ e.value.minItems || e.value.maxItems ? (l(), d(o, { key: 1 }, {
107
+ default: a(() => [
108
+ u(n(e.value.minItems) + "" + n(e.value.maxItems), 1)
109
+ ]),
110
+ _: 1
111
+ })) : i("", !0),
112
+ e.value.minLength ? (l(), d(o, { key: 2 }, {
113
+ prefix: a(() => t[3] || (t[3] = [
114
+ u("min:")
129
115
  ])),
130
116
  default: a(() => [
131
- r(" " + n(e.value.minLength), 1)
117
+ u(" " + n(e.value.minLength), 1)
132
118
  ]),
133
119
  _: 1
134
- })) : u("", !0),
135
- e.value.maxLength ? (l(), o(m, { key: 1 }, {
136
- prefix: a(() => t[7] || (t[7] = [
137
- r("max:")
120
+ })) : i("", !0),
121
+ e.value.maxLength ? (l(), d(o, { key: 3 }, {
122
+ prefix: a(() => t[4] || (t[4] = [
123
+ u("max:")
138
124
  ])),
139
125
  default: a(() => [
140
- r(" " + n(e.value.maxLength), 1)
126
+ u(" " + n(e.value.maxLength), 1)
141
127
  ]),
142
128
  _: 1
143
- })) : u("", !0),
144
- e.value.uniqueItems ? (l(), o(m, { key: 2 }, {
145
- default: a(() => t[8] || (t[8] = [
146
- r(" unique! ")
129
+ })) : i("", !0),
130
+ e.value.uniqueItems ? (l(), d(o, { key: 4 }, {
131
+ default: a(() => t[5] || (t[5] = [
132
+ u(" unique! ")
147
133
  ])),
148
134
  _: 1
149
- })) : u("", !0),
150
- e.value.format ? (l(), o(m, { key: 3 }, {
135
+ })) : i("", !0),
136
+ e.value.format ? (l(), d(o, { key: 5 }, {
151
137
  default: a(() => [
152
- p(B, null, {
153
- default: a(() => t[9] || (t[9] = [
154
- r("Format:")
138
+ v(b, null, {
139
+ default: a(() => t[6] || (t[6] = [
140
+ u("Format:")
155
141
  ])),
156
142
  _: 1
157
143
  }),
158
- r(" " + n(e.value.format), 1)
144
+ u(" " + n(e.value.format), 1)
159
145
  ]),
160
146
  _: 1
161
- })) : u("", !0),
162
- e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (l(), o(m, { key: 4 }, {
163
- prefix: a(() => t[10] || (t[10] = [
164
- r("greater than:")
147
+ })) : i("", !0),
148
+ e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (l(), d(o, { key: 6 }, {
149
+ prefix: a(() => t[7] || (t[7] = [
150
+ u("greater than:")
165
151
  ])),
166
152
  default: a(() => [
167
- r(" " + n(e.value.minimum), 1)
153
+ u(" " + n(e.value.minimum), 1)
168
154
  ]),
169
155
  _: 1
170
- })) : u("", !0),
171
- e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (l(), o(m, { key: 5 }, {
172
- prefix: a(() => t[11] || (t[11] = [
173
- r("min:")
156
+ })) : i("", !0),
157
+ e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (l(), d(o, { key: 7 }, {
158
+ prefix: a(() => t[8] || (t[8] = [
159
+ u("min:")
174
160
  ])),
175
161
  default: a(() => [
176
- r(" " + n(e.value.minimum), 1)
162
+ u(" " + n(e.value.minimum), 1)
177
163
  ]),
178
164
  _: 1
179
- })) : u("", !0),
180
- e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (l(), o(m, { key: 6 }, {
181
- prefix: a(() => t[12] || (t[12] = [
182
- r("less than:")
165
+ })) : i("", !0),
166
+ e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (l(), d(o, { key: 8 }, {
167
+ prefix: a(() => t[9] || (t[9] = [
168
+ u("less than:")
183
169
  ])),
184
170
  default: a(() => [
185
- r(" " + n(e.value.maximum), 1)
171
+ u(" " + n(e.value.maximum), 1)
186
172
  ]),
187
173
  _: 1
188
- })) : u("", !0),
189
- e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (l(), o(m, { key: 7 }, {
190
- prefix: a(() => t[13] || (t[13] = [
191
- r("max:")
174
+ })) : i("", !0),
175
+ e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (l(), d(o, { key: 9 }, {
176
+ prefix: a(() => t[10] || (t[10] = [
177
+ u("max:")
192
178
  ])),
193
179
  default: a(() => [
194
- r(" " + n(e.value.maximum), 1)
180
+ u(" " + n(e.value.maximum), 1)
195
181
  ]),
196
182
  _: 1
197
- })) : u("", !0),
198
- e.value.pattern ? (l(), o(m, {
199
- key: 8,
183
+ })) : i("", !0),
184
+ e.value.pattern ? (l(), d(o, {
185
+ key: 10,
200
186
  code: "",
201
187
  truncate: ""
202
188
  }, {
203
189
  default: a(() => [
204
- p(B, null, {
205
- default: a(() => t[14] || (t[14] = [
206
- r("Pattern:")
190
+ v(b, null, {
191
+ default: a(() => t[11] || (t[11] = [
192
+ u("Pattern:")
207
193
  ])),
208
194
  _: 1
209
195
  }),
210
- r(" " + n(e.value.pattern), 1)
196
+ u(" " + n(e.value.pattern), 1)
211
197
  ]),
212
198
  _: 1
213
- })) : u("", !0),
214
- e.$props.enum ? (l(), o(m, { key: 9 }, {
215
- default: a(() => t[15] || (t[15] = [
216
- r("enum")
199
+ })) : i("", !0),
200
+ e.$props.enum ? (l(), d(o, { key: 11 }, {
201
+ default: a(() => t[12] || (t[12] = [
202
+ u("enum")
217
203
  ])),
218
204
  _: 1
219
- })) : u("", !0),
220
- e.value.default !== void 0 ? (l(), o(m, {
221
- key: 10,
205
+ })) : i("", !0),
206
+ e.value.default !== void 0 ? (l(), d(o, {
207
+ key: 12,
222
208
  truncate: ""
223
209
  }, {
210
+ prefix: a(() => t[13] || (t[13] = [
211
+ u("default:")
212
+ ])),
213
+ default: a(() => [
214
+ u(" " + n($(e.value)), 1)
215
+ ]),
216
+ _: 1
217
+ })) : i("", !0)
218
+ ], 64)) : i("", !0),
219
+ e.additional ? (l(), m("div", K, [
220
+ (p = e.value) != null && p["x-additionalPropertiesName"] ? (l(), m(y, { key: 0 }, [
221
+ u(n(e.value["x-additionalPropertiesName"]), 1)
222
+ ], 64)) : (l(), m(y, { key: 1 }, [
223
+ u("additional properties")
224
+ ], 64))
225
+ ])) : i("", !0),
226
+ e.pattern ? (l(), m("div", Q, [
227
+ v(g(O), null, {
228
+ default: a(() => t[14] || (t[14] = [
229
+ u("pattern")
230
+ ])),
231
+ _: 1
232
+ })
233
+ ])) : i("", !0),
234
+ (k = e.value) != null && k.deprecated ? (l(), m("div", U, [
235
+ v(g(O), null, {
236
+ default: a(() => t[15] || (t[15] = [
237
+ u("deprecated")
238
+ ])),
239
+ _: 1
240
+ })
241
+ ])) : i("", !0),
242
+ g(B)(N.value) ? (l(), m("div", W, [
243
+ v(o, { truncate: "" }, {
224
244
  prefix: a(() => t[16] || (t[16] = [
225
- r("default:")
245
+ u("const:")
226
246
  ])),
227
247
  default: a(() => [
228
- r(" " + n($(e.value)), 1)
248
+ u(" " + n(N.value), 1)
229
249
  ]),
230
250
  _: 1
231
- })) : u("", !0)
232
- ], 64)) : (l(), i(s, { key: 6 }, [
233
- ((P = e.value) == null ? void 0 : P.nullable) === !0 ? (l(), o(m, { key: 0 }, {
251
+ })
252
+ ])) : (l(), m(y, { key: 6 }, [
253
+ ((S = e.value) == null ? void 0 : S.nullable) === !0 ? (l(), d(o, { key: 0 }, {
234
254
  default: a(() => t[17] || (t[17] = [
235
- r(" nullable ")
255
+ u(" nullable ")
236
256
  ])),
237
257
  _: 1
238
- })) : u("", !0)
258
+ })) : i("", !0)
239
259
  ], 64)),
240
- (j = e.value) != null && j.writeOnly ? (l(), i("div", X, " write-only ")) : (I = e.value) != null && I.readOnly ? (l(), i("div", Y, " read-only ")) : u("", !0),
241
- e.required ? (l(), i("div", Z, " required ")) : u("", !0),
242
- e.withExamples ? (l(), o(R, {
260
+ (q = e.value) != null && q.writeOnly ? (l(), m("div", X, " write-only ")) : (w = e.value) != null && w.readOnly ? (l(), m("div", Y, " read-only ")) : i("", !0),
261
+ e.required ? (l(), m("div", Z, " required ")) : i("", !0),
262
+ e.withExamples ? (l(), d(R, {
243
263
  key: 10,
244
- examples: (M = e.value) == null ? void 0 : M.examples,
245
- example: ((V = e.value) == null ? void 0 : V.example) || ((C = (A = e.value) == null ? void 0 : A.items) == null ? void 0 : C.example),
246
- "discriminator-type": g(O)
247
- }, null, 8, ["examples", "example", "discriminator-type"])) : u("", !0)
264
+ examples: (P = e.value) == null ? void 0 : P.examples,
265
+ example: ((V = e.value) == null ? void 0 : V.example) || ((I = (j = e.value) == null ? void 0 : j.items) == null ? void 0 : I.example)
266
+ }, null, 8, ["examples", "example"])) : i("", !0)
248
267
  ]);
249
268
  };
250
269
  }
@@ -1,7 +1,8 @@
1
1
  import type { UnknownObject } from '@scalar/types/utils';
2
- export declare const discriminators: string[];
2
+ import type { CompositionKeyword } from './schema-composition.js';
3
+ export declare const compositions: CompositionKeyword[];
3
4
  /**
4
- * Optimize the value by removing nulls from discriminators.
5
+ * Optimize the value by removing nulls from compositions.
5
6
  */
6
7
  export declare function optimizeValueForDisplay(value: UnknownObject | undefined): Record<string, any> | undefined;
7
8
  //# sourceMappingURL=optimizeValueForDisplay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,eAAO,MAAM,cAAc,UAAqC,CAAA;AAEhE;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAqDzG"}
1
+ {"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,eAAO,MAAM,YAAY,EAAE,kBAAkB,EAAuC,CAAA;AAEpF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAqDzG"}
@@ -1,20 +1,20 @@
1
1
  const c = ["oneOf", "anyOf", "allOf", "not"];
2
- function y(o) {
2
+ function y(i) {
3
3
  var s;
4
- if (!o || typeof o != "object")
5
- return o;
6
- let r = { ...o };
7
- const t = c.find((i) => r == null ? void 0 : r[i]);
8
- if (!t || t === "not")
9
- return r;
10
- const f = r == null ? void 0 : r[t];
4
+ if (!i || typeof i != "object")
5
+ return i;
6
+ let t = { ...i };
7
+ const r = c.find((o) => t == null ? void 0 : t[o]);
8
+ if (!r || r === "not")
9
+ return t;
10
+ const f = t == null ? void 0 : t[r];
11
11
  if (!Array.isArray(f))
12
- return r;
13
- f.some((i) => i.type === "null") && (r.nullable = !0);
14
- const n = f.filter((i) => i.type !== "null");
15
- return n.length === 1 && (r != null && r[t]) ? (r = { ...r, ...n[0] }, r == null || delete r[t], r) : (Array.isArray(r == null ? void 0 : r[t]) && ((s = r == null ? void 0 : r[t]) == null ? void 0 : s.length) > 1 && (r[t] = n), r);
12
+ return t;
13
+ f.some((o) => o.type === "null") && (t.nullable = !0);
14
+ const n = f.filter((o) => o.type !== "null");
15
+ return n.length === 1 && (t != null && t[r]) ? (t = { ...t, ...n[0] }, t == null || delete t[r], t) : (Array.isArray(t == null ? void 0 : t[r]) && ((s = t == null ? void 0 : t[r]) == null ? void 0 : s.length) > 1 && (t[r] = n), t);
16
16
  }
17
17
  export {
18
- c as discriminators,
18
+ c as compositions,
19
19
  y as optimizeValueForDisplay
20
20
  };
@@ -0,0 +1,12 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export type CompositionMapping = {
3
+ [key: string]: string;
4
+ };
5
+ /** Composition */
6
+ export type CompositionKeyword = 'oneOf' | 'anyOf' | 'allOf' | 'not';
7
+ export declare const compositions: CompositionKeyword[];
8
+ /** Get composition mapping from schema - used in testing */
9
+ export declare function getCompositionSchemaMapping(schema: OpenAPIV3_1.SchemaObject, composition: CompositionKeyword): CompositionMapping | undefined;
10
+ /** Check if schema has a composition keyword */
11
+ export declare function hasComposition(schema: OpenAPIV3_1.SchemaObject): boolean;
12
+ //# sourceMappingURL=schema-composition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-composition.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-composition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB,CAAA;AAED,kBAAkB;AAClB,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAA;AAEpE,eAAO,MAAM,YAAY,EAAE,kBAAkB,EAAuC,CAAA;AAEpF,4DAA4D;AAC5D,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,WAAW,CAAC,YAAY,EAChC,WAAW,EAAE,kBAAkB,GAC9B,kBAAkB,GAAG,SAAS,CAuBhC;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,OAAO,CAExE"}
@@ -0,0 +1,8 @@
1
+ const t = ["oneOf", "anyOf", "allOf", "not"];
2
+ function i(o) {
3
+ return t.some((n) => o[n] !== void 0);
4
+ }
5
+ export {
6
+ t as compositions,
7
+ i as hasComposition
8
+ };
@@ -0,0 +1,4 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ /** Get discriminator property name from schema */
3
+ export declare function getDiscriminatorPropertyName(schema: OpenAPIV3_1.SchemaObject): string | undefined;
4
+ //# sourceMappingURL=schema-discriminator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-discriminator.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-discriminator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,kDAAkD;AAClD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,MAAM,GAAG,SAAS,CAEjG"}
@@ -1,3 +1,6 @@
1
+ /**
2
+ * This component allows dynamic selection of various layout configurations
3
+ */
1
4
  import type { DocumentSelectorSlot, ReferenceLayoutProps, ReferenceLayoutSlots } from '../../types';
2
5
  declare function __VLS_template(): {
3
6
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"Layouts.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/Layouts.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,aAAa,CAAA;AAkCpB,iBAAS,cAAc;WA6ET,OAAO,IAA6B;;;;EAKjD;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAOnB,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":"Layouts.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/Layouts.vue"],"names":[],"mappings":"AA4CA;;GAEG;AACH,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,aAAa,CAAA;AA2BpB,iBAAS,cAAc;WAuET,OAAO,IAA6B;;;;EAKjD;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAOnB,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
- import { defineComponent as c, useSlots as f, computed as g, createBlock as y, openBlock as k, resolveDynamicComponent as C, mergeProps as S, createSlots as $, withCtx as n, renderSlot as s, renderList as D, normalizeProps as v, guardReactiveProps as L } from "vue";
1
+ import { defineComponent as l, useSlots as d, createBlock as u, openBlock as f, resolveDynamicComponent as g, mergeProps as c, createSlots as k, renderList as y, withCtx as C, renderSlot as D, normalizeProps as S, guardReactiveProps as $ } from "vue";
2
2
  import M from "./ClassicLayout.vue.js";
3
- import a from "./ModernLayout.vue.js";
4
- const b = /* @__PURE__ */ c({
3
+ import n from "./ModernLayout.vue.js";
4
+ const P = /* @__PURE__ */ l({
5
5
  __name: "Layouts",
6
6
  props: {
7
7
  configuration: {},
@@ -10,33 +10,24 @@ const b = /* @__PURE__ */ c({
10
10
  isDark: { type: Boolean }
11
11
  },
12
12
  emits: ["toggleDarkMode", "updateContent"],
13
- setup(l) {
14
- const p = l, m = f(), i = g(
15
- () => Object.keys(m).filter(
16
- (e) => e !== "document-selector"
17
- )
18
- ), u = {
19
- modern: a,
13
+ setup(s) {
14
+ const a = s, p = d(), i = {
15
+ modern: n,
20
16
  classic: M
21
17
  };
22
- return (e, o) => (k(), y(C(u[e.configuration.layout ?? "modern"] ?? a), S(p, {
23
- onToggleDarkMode: o[0] || (o[0] = (t) => e.$emit("toggleDarkMode")),
24
- onUpdateContent: o[1] || (o[1] = (t) => e.$emit("updateContent", t))
25
- }), $({
26
- "document-selector": n(() => [
27
- s(e.$slots, "document-selector")
28
- ]),
29
- _: 2
30
- }, [
31
- D(i.value, (t, r) => ({
18
+ return (o, e) => (f(), u(g(i[o.configuration.layout ?? "modern"] ?? n), c(a, {
19
+ onToggleDarkMode: e[0] || (e[0] = (t) => o.$emit("toggleDarkMode")),
20
+ onUpdateContent: e[1] || (e[1] = (t) => o.$emit("updateContent", t))
21
+ }), k({ _: 2 }, [
22
+ y(p, (t, r) => ({
32
23
  name: r,
33
- fn: n((d) => [
34
- s(e.$slots, r, v(L(d || {})))
24
+ fn: C((m) => [
25
+ D(o.$slots, r, S($(m || {})))
35
26
  ])
36
27
  }))
37
28
  ]), 1040));
38
29
  }
39
30
  });
40
31
  export {
41
- b as default
32
+ P as default
42
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ModernLayout.vue"],"names":[],"mappings":"AAsIA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAsChB,iBAAS,cAAc;WA6JT,OAAO,IAA6B;;;;EAKjD;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAQnB,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":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ModernLayout.vue"],"names":[],"mappings":"AAuJA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AA2ChB,iBAAS,cAAc;WA+JT,OAAO,IAA6B;;;;EAKjD;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAQnB,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"}
@@ -2,7 +2,7 @@ import o from "./ModernLayout.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-34d51ca9"]]);
5
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9a1acea3"]]);
6
6
  export {
7
- _ as default
7
+ e as default
8
8
  };