@scalar/api-reference 1.25.102 → 1.25.104

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 (99) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/blocks/constants.d.ts +9 -0
  3. package/dist/blocks/constants.d.ts.map +1 -0
  4. package/dist/blocks/constants.js +8 -0
  5. package/dist/blocks/helpers/getPointer.d.ts +22 -0
  6. package/dist/blocks/helpers/getPointer.d.ts.map +1 -0
  7. package/dist/blocks/helpers/getPointer.js +12 -0
  8. package/dist/blocks/hooks/useBlockProps.d.ts +32 -0
  9. package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -0
  10. package/dist/blocks/hooks/useBlockProps.js +28 -0
  11. package/dist/browser/standalone.js +12846 -12739
  12. package/dist/browser/webpack-stats.json +1 -1
  13. package/dist/components/ApiReference.vue.js +31 -31
  14. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  15. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  16. package/dist/components/ApiReferenceLayout.vue2.js +2 -1
  17. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  19. package/dist/components/Content/Introduction/Introduction.vue2.js +84 -70
  20. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -0
  21. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  23. package/dist/components/Content/Schema/SchemaProperty.vue2.js +118 -111
  24. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
  26. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +91 -77
  27. package/dist/components/Content/Schema/helpers/formatExample.d.ts +5 -0
  28. package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +1 -0
  29. package/dist/components/Content/Schema/helpers/formatExample.js +6 -0
  30. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +9 -0
  31. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -0
  32. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +20 -0
  33. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -1
  34. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  35. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
  36. package/dist/components/Layouts/ClassicLayout.vue.js +30 -27
  37. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
  38. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  39. package/dist/components/Layouts/ModernLayout.vue2.js +55 -50
  40. package/dist/features/ApiClientModal/useApiClient.d.ts +336 -254
  41. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  42. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  43. package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
  44. package/dist/features/DownloadLink/DownloadLink.vue2.js +10 -3
  45. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  46. package/dist/features/Operation/Operation.vue.js +37 -26
  47. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  48. package/dist/features/Operation/components/OperationResponses.vue.js +8 -7
  49. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -0
  50. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  51. package/dist/features/Operation/components/ParameterList.vue.js +2 -2
  52. package/dist/features/Operation/components/ParameterList.vue2.js +18 -16
  53. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -0
  54. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  55. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  56. package/dist/features/Operation/components/ParameterListItem.vue2.js +27 -25
  57. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +3 -0
  58. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  59. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  60. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +108 -101
  61. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -0
  62. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  63. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  64. package/dist/features/Operation/layouts/ModernLayout.vue2.js +54 -50
  65. package/dist/helpers/get-request.d.ts +2 -0
  66. package/dist/helpers/get-request.d.ts.map +1 -1
  67. package/dist/helpers/parse.d.ts.map +1 -1
  68. package/dist/helpers/parse.js +88 -68
  69. package/dist/index.d.ts +0 -1
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +79 -83
  72. package/dist/style.css +1 -1
  73. package/package.json +11 -12
  74. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts +0 -10
  75. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
  76. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -7
  77. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -30
  78. package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts +0 -11
  79. package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts.map +0 -1
  80. package/dist/components/DarkModeToggle/DarkModeToggle.vue.js +0 -7
  81. package/dist/components/DarkModeToggle/DarkModeToggle.vue2.js +0 -31
  82. package/dist/components/DarkModeToggle/index.d.ts +0 -3
  83. package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
  84. package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts +0 -10
  85. package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts.map +0 -1
  86. package/dist/embeds/ExampleRequest/index.d.ts +0 -2
  87. package/dist/embeds/ExampleRequest/index.d.ts.map +0 -1
  88. package/dist/embeds/ExampleResponses/ExampleResponses.vue.d.ts +0 -7
  89. package/dist/embeds/ExampleResponses/ExampleResponses.vue.d.ts.map +0 -1
  90. package/dist/embeds/ExampleResponses/index.d.ts +0 -2
  91. package/dist/embeds/ExampleResponses/index.d.ts.map +0 -1
  92. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +0 -782
  93. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +0 -1
  94. package/dist/embeds/OpenApiDocument/index.d.ts +0 -3
  95. package/dist/embeds/OpenApiDocument/index.d.ts.map +0 -1
  96. package/dist/embeds/OpenApiDocument/types.d.ts +0 -3
  97. package/dist/embeds/OpenApiDocument/types.d.ts.map +0 -1
  98. package/dist/embeds/index.d.ts +0 -4
  99. package/dist/embeds/index.d.ts.map +0 -1
@@ -1,42 +1,44 @@
1
- import { defineComponent as W, computed as y, openBlock as l, createElementBlock as t, normalizeClass as Z, createVNode as r, createSlots as X, withCtx as v, createTextVNode as b, toDisplayString as s, unref as p, createCommentVNode as n, createElementVNode as c, Fragment as i, renderList as d, createBlock as E } from "vue";
2
- import { Disclosure as Y, DisclosurePanel as _, DisclosureButton as x } from "@headlessui/vue";
3
- import { ScalarMarkdown as S, ScalarIcon as ee } from "@scalar/components";
4
- import f from "./Schema.vue.js";
5
- import le from "./SchemaPropertyHeading.vue.js";
6
- const te = {
1
+ import { defineComponent as W, computed as v, openBlock as l, createElementBlock as t, normalizeClass as G, createVNode as n, createSlots as X, withCtx as y, createTextVNode as E, toDisplayString as r, unref as i, createCommentVNode as s, createElementVNode as c, Fragment as u, renderList as m, createBlock as S } from "vue";
2
+ import { formatExample as Y } from "./helpers/formatExample.js";
3
+ import { optimizeValueForDisplay as _, discriminators as x } from "./helpers/optimizeValueForDisplay.js";
4
+ import { Disclosure as ee, DisclosurePanel as le, DisclosureButton as te } from "@headlessui/vue";
5
+ import { ScalarMarkdown as B, ScalarIcon as ae } from "@scalar/components";
6
+ import h from "./Schema.vue.js";
7
+ import oe from "./SchemaPropertyHeading.vue.js";
8
+ const se = {
7
9
  key: 0,
8
10
  class: "property-description"
9
- }, ae = {
11
+ }, ne = {
10
12
  key: 1,
11
13
  class: "property-description"
12
- }, oe = {
14
+ }, re = {
13
15
  key: 2,
14
16
  class: "property-example custom-scroll"
15
- }, ne = { class: "property-example-value" }, re = {
17
+ }, ie = { class: "property-example-value" }, ue = {
16
18
  key: 3,
17
19
  class: "property-example custom-scroll"
18
- }, se = { class: "property-example-label" }, ie = {
20
+ }, pe = { class: "property-example-label" }, me = {
19
21
  key: 4,
20
22
  class: "property-enum"
21
- }, ue = {
23
+ }, de = {
22
24
  key: 0,
23
25
  class: "property-list"
24
- }, pe = { class: "property-heading" }, de = { class: "property-name" }, me = { class: "property-description" }, ce = {
26
+ }, ce = { class: "property-heading" }, ve = { class: "property-name" }, ye = { class: "property-description" }, fe = {
25
27
  key: 1,
26
28
  class: "property-enum-values"
27
- }, ve = {
29
+ }, he = {
28
30
  key: 5,
29
31
  class: "children"
30
- }, ye = {
32
+ }, ge = {
31
33
  key: 0,
32
34
  class: "children"
33
- }, fe = {
35
+ }, ke = {
34
36
  key: 0,
35
37
  class: "property-rule"
36
- }, he = {
38
+ }, be = {
37
39
  key: 1,
38
40
  class: "property-rule"
39
- }, Be = /* @__PURE__ */ W({
41
+ }, je = /* @__PURE__ */ W({
40
42
  __name: "SchemaProperty",
41
43
  props: {
42
44
  value: {},
@@ -45,10 +47,11 @@ const te = {
45
47
  required: { type: Boolean, default: !1 },
46
48
  compact: { type: Boolean, default: !1 },
47
49
  description: {},
48
- additional: { type: Boolean }
50
+ additional: { type: Boolean },
51
+ withExamples: { type: Boolean, default: !0 }
49
52
  },
50
- setup(M) {
51
- const h = M, B = {
53
+ setup(J) {
54
+ const f = J, D = {
52
55
  integer: {
53
56
  _default: "Integer numbers.",
54
57
  int32: "Signed 32-bit integers (commonly used integer type).",
@@ -61,158 +64,162 @@ const te = {
61
64
  byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
62
65
  binary: "binary data, used to describe files"
63
66
  }
64
- }, D = function(e, a) {
65
- return a != null && a.properties || a != null && a.additionalProperties ? null : e || (a == null ? void 0 : a.description) || null;
67
+ }, w = function(e, o) {
68
+ return o != null && o.properties || o != null && o.additionalProperties ? null : e || (o == null ? void 0 : o.description) || null;
66
69
  }, C = function(e) {
67
- return !e || !B[e.type] ? null : B[e.type][e.format || "_default"];
68
- }, m = function(e) {
69
- var a;
70
- return (e == null ? void 0 : e.enum) || ((a = e == null ? void 0 : e.items) == null ? void 0 : a.enum) || [];
71
- }, G = ["oneOf", "anyOf", "allOf", "not"], j = y(() => m(h.value).length > 9), P = y(() => j.value ? 5 : 9), J = y(
72
- () => m(h.value).slice(0, P.value)
73
- ), K = y(
74
- () => m(h.value).slice(P.value)
75
- ), Q = (e) => Array.isArray(e) ? `[${e.map((a) => `"${a.trim()}"`).join(", ")}]` : e;
76
- return (e, a) => {
77
- var w, N, O, q, F, A, I, L, V, $, z, H, R;
70
+ return !e || !D[e.type] ? null : D[e.type][e.format || "_default"];
71
+ }, d = function(e) {
72
+ var o;
73
+ return (e == null ? void 0 : e.enum) || ((o = e == null ? void 0 : e.items) == null ? void 0 : o.enum) || [];
74
+ }, P = v(() => d(f.value).length > 9), j = v(() => P.value ? 5 : 9), K = v(
75
+ () => d(f.value).slice(0, j.value)
76
+ ), Q = v(
77
+ () => d(f.value).slice(j.value)
78
+ ), g = v(() => _(f.value));
79
+ return (e, o) => {
80
+ var F, N, V, q, z, I, L, H, O, R, T, U, Z;
78
81
  return l(), t("div", {
79
- class: Z(["property", [
82
+ class: G(["property", [
80
83
  `property--level-${e.level}`,
81
84
  {
82
85
  "property--compact": e.compact,
83
- "property--deprecated": (w = e.value) == null ? void 0 : w.deprecated
86
+ "property--deprecated": (F = e.value) == null ? void 0 : F.deprecated
84
87
  }
85
88
  ]])
86
89
  }, [
87
- r(le, {
90
+ n(oe, {
88
91
  additional: e.additional,
89
- enum: m(e.value).length > 0,
92
+ enum: d(e.value).length > 0,
90
93
  required: e.required,
91
- value: e.value
94
+ value: g.value
92
95
  }, X({ _: 2 }, [
93
96
  e.name ? {
94
97
  name: "name",
95
- fn: v(() => [
96
- b(s(e.name), 1)
98
+ fn: y(() => [
99
+ E(r(e.name), 1)
97
100
  ]),
98
101
  key: "0"
99
102
  } : void 0,
100
103
  (N = e.value) != null && N.example ? {
101
104
  name: "example",
102
- fn: v(() => [
103
- b(" Example: " + s(e.value.example), 1)
105
+ fn: y(() => [
106
+ E(" Example: " + r(e.value.example), 1)
104
107
  ]),
105
108
  key: "1"
106
109
  } : void 0
107
110
  ]), 1032, ["additional", "enum", "required", "value"]),
108
- D(e.description, e.value) ? (l(), t("div", te, [
109
- r(p(S), {
110
- value: D(e.description, e.value)
111
+ w(e.description, e.value) ? (l(), t("div", se, [
112
+ n(i(B), {
113
+ value: w(e.description, e.value)
111
114
  }, null, 8, ["value"])
112
- ])) : C(e.value) ? (l(), t("div", ae, [
113
- r(p(S), {
115
+ ])) : C(e.value) ? (l(), t("div", ne, [
116
+ n(i(B), {
114
117
  value: C(e.value) || ""
115
118
  }, null, 8, ["value"])
116
- ])) : n("", !0),
117
- (O = e.value) != null && O.example || (F = (q = e.value) == null ? void 0 : q.items) != null && F.example ? (l(), t("div", oe, [
118
- a[0] || (a[0] = c("span", { class: "property-example-label" }, "Example", -1)),
119
- c("code", ne, s(Q(e.value.example || ((A = e.value) == null ? void 0 : A.items.example))), 1)
120
- ])) : n("", !0),
121
- (I = e.value) != null && I.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), t("div", re, [
122
- c("span", se, s(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
123
- (l(!0), t(i, null, d(e.value.examples, (o, u) => (l(), t("code", {
124
- key: u,
119
+ ])) : s("", !0),
120
+ e.withExamples && ((V = e.value) != null && V.example || (z = (q = e.value) == null ? void 0 : q.items) != null && z.example) ? (l(), t("div", re, [
121
+ o[0] || (o[0] = c("span", { class: "property-example-label" }, "Example", -1)),
122
+ c("code", ie, r(i(Y)(e.value.example || ((I = e.value) == null ? void 0 : I.items.example))), 1)
123
+ ])) : s("", !0),
124
+ (L = e.value) != null && L.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), t("div", ue, [
125
+ c("span", pe, r(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
126
+ (l(!0), t(u, null, m(e.value.examples, (a, p) => (l(), t("code", {
127
+ key: p,
125
128
  class: "property-example-value"
126
- }, s(o), 1))), 128))
127
- ])) : n("", !0),
128
- ((L = m(e.value)) == null ? void 0 : L.length) > 0 ? (l(), t("div", ie, [
129
- (V = e.value) != null && V["x-enumDescriptions"] ? (l(), t("div", ue, [
130
- (l(!0), t(i, null, d(m(e.value), (o) => (l(), t("div", {
131
- key: o,
129
+ }, r(a), 1))), 128))
130
+ ])) : s("", !0),
131
+ ((H = d(e.value)) == null ? void 0 : H.length) > 0 ? (l(), t("div", me, [
132
+ (O = e.value) != null && O["x-enumDescriptions"] ? (l(), t("div", de, [
133
+ (l(!0), t(u, null, m(d(e.value), (a) => (l(), t("div", {
134
+ key: a,
132
135
  class: "property"
133
136
  }, [
134
- c("div", pe, [
135
- c("div", de, s(o), 1)
137
+ c("div", ce, [
138
+ c("div", ve, r(a), 1)
136
139
  ]),
137
- c("div", me, [
138
- r(p(S), {
139
- value: e.value["x-enumDescriptions"][o]
140
+ c("div", ye, [
141
+ n(i(B), {
142
+ value: e.value["x-enumDescriptions"][a]
140
143
  }, null, 8, ["value"])
141
144
  ])
142
145
  ]))), 128))
143
- ])) : (l(), t("ul", ce, [
144
- (l(!0), t(i, null, d(J.value, (o) => (l(), t("li", {
145
- key: o,
146
+ ])) : (l(), t("ul", fe, [
147
+ (l(!0), t(u, null, m(K.value, (a) => (l(), t("li", {
148
+ key: a,
146
149
  class: "property-enum-value"
147
- }, s(o), 1))), 128)),
148
- j.value ? (l(), E(p(Y), { key: 0 }, {
149
- default: v(({ open: o }) => [
150
- r(p(_), null, {
151
- default: v(() => [
152
- (l(!0), t(i, null, d(K.value, (u) => (l(), t("li", {
153
- key: u,
150
+ }, r(a), 1))), 128)),
151
+ P.value ? (l(), S(i(ee), { key: 0 }, {
152
+ default: y(({ open: a }) => [
153
+ n(i(le), null, {
154
+ default: y(() => [
155
+ (l(!0), t(u, null, m(Q.value, (p) => (l(), t("li", {
156
+ key: p,
154
157
  class: "property-enum-value"
155
- }, s(u), 1))), 128))
158
+ }, r(p), 1))), 128))
156
159
  ]),
157
160
  _: 1
158
161
  }),
159
- r(p(x), { class: "enum-toggle-button" }, {
160
- default: v(() => [
161
- r(p(ee), {
162
- class: Z(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": o }]),
162
+ n(i(te), { class: "enum-toggle-button" }, {
163
+ default: y(() => [
164
+ n(i(ae), {
165
+ class: G(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": a }]),
163
166
  icon: "Add",
164
167
  size: "sm"
165
168
  }, null, 8, ["class"]),
166
- b(" " + s(o ? "Hide values" : "Show all values"), 1)
169
+ E(" " + r(a ? "Hide values" : "Show all values"), 1)
167
170
  ]),
168
171
  _: 2
169
172
  }, 1024)
170
173
  ]),
171
174
  _: 1
172
- })) : n("", !0)
175
+ })) : s("", !0)
173
176
  ]))
174
- ])) : n("", !0),
175
- (($ = e.value) == null ? void 0 : $.type) === "object" && ((z = e.value) != null && z.properties || (H = e.value) != null && H.additionalProperties) ? (l(), t("div", ve, [
176
- r(f, {
177
+ ])) : s("", !0),
178
+ ((R = e.value) == null ? void 0 : R.type) === "object" && ((T = e.value) != null && T.properties || (U = e.value) != null && U.additionalProperties) ? (l(), t("div", he, [
179
+ n(h, {
177
180
  compact: e.compact,
178
181
  level: e.level + 1,
179
182
  value: e.value
180
183
  }, null, 8, ["compact", "level", "value"])
181
- ])) : n("", !0),
182
- (R = e.value) != null && R.items ? (l(), t(i, { key: 6 }, [
183
- ["object"].includes(e.value.items.type) ? (l(), t("div", ye, [
184
- r(f, {
184
+ ])) : s("", !0),
185
+ (Z = e.value) != null && Z.items ? (l(), t(u, { key: 6 }, [
186
+ ["object"].includes(e.value.items.type) ? (l(), t("div", ge, [
187
+ n(h, {
185
188
  compact: e.compact,
186
189
  level: e.level + 1,
187
190
  value: e.value.items
188
191
  }, null, 8, ["compact", "level", "value"])
189
- ])) : n("", !0)
190
- ], 64)) : n("", !0),
191
- (l(), t(i, null, d(G, (o) => {
192
- var u, T, U;
193
- return l(), t(i, { key: o }, [
194
- (u = e.value) != null && u[o] ? (l(), t("div", fe, [
195
- (l(!0), t(i, null, d(e.value[o], (g, k) => (l(), E(f, {
196
- key: k,
197
- compact: e.compact,
198
- level: e.level + 1,
199
- value: g
200
- }, null, 8, ["compact", "level", "value"]))), 128))
201
- ])) : n("", !0),
202
- (U = (T = e.value) == null ? void 0 : T.items) != null && U[o] && e.level < 3 ? (l(), t("div", he, [
203
- (l(!0), t(i, null, d(e.value.items[o], (g, k) => (l(), E(f, {
204
- key: k,
192
+ ])) : s("", !0)
193
+ ], 64)) : s("", !0),
194
+ (l(!0), t(u, null, m(i(x), (a) => {
195
+ var p, A, M;
196
+ return l(), t(u, { key: a }, [
197
+ (p = g.value) != null && p[a] ? (l(), t("div", ke, [
198
+ (l(!0), t(u, null, m(g.value[a], (k, b) => {
199
+ var $;
200
+ return l(), S(h, {
201
+ key: b,
202
+ compact: e.compact,
203
+ level: e.level + 1,
204
+ noncollapsible: (($ = e.value) == null ? void 0 : $[a].length) === 1,
205
+ value: k
206
+ }, null, 8, ["compact", "level", "noncollapsible", "value"]);
207
+ }), 128))
208
+ ])) : s("", !0),
209
+ (M = (A = e.value) == null ? void 0 : A.items) != null && M[a] && e.level < 3 ? (l(), t("div", be, [
210
+ (l(!0), t(u, null, m(e.value.items[a], (k, b) => (l(), S(h, {
211
+ key: b,
205
212
  compact: e.compact,
206
213
  level: e.level + 1,
207
- value: g
214
+ value: k
208
215
  }, null, 8, ["compact", "level", "value"]))), 128))
209
- ])) : n("", !0)
216
+ ])) : s("", !0)
210
217
  ], 64);
211
- }), 64))
218
+ }), 128))
212
219
  ], 2);
213
220
  };
214
221
  }
215
222
  });
216
223
  export {
217
- Be as default
224
+ je as default
218
225
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAiNA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;AA0BJ,iBAAS,cAAc;WA0QT,OAAO,IAA6B;;sBARxB,GAAG;;;;EAa5B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cAzTN,OAAO;wFAiUpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AA2NA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;AA0BJ,iBAAS,cAAc;WA0RT,OAAO,IAA6B;;sBARxB,GAAG;;;;EAa5B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cAzUN,OAAO;wFAiVpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaPropertyHeading.vue2.js";
2
2
  /* empty css */
3
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3cb6c79a"]]);
3
+ import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-e3aa4b0d"]]);
5
5
  export {
6
- e as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as P, openBlock as u, createElementBlock as n, renderSlot as S, createCommentVNode as t, Fragment as s, createTextVNode as a, toDisplayString as i, createVNode as v, unref as O, withCtx as l, createBlock as d, renderList as V } from "vue";
1
+ import { defineComponent as P, openBlock as u, createElementBlock as n, renderSlot as S, createCommentVNode as t, Fragment as s, createTextVNode as l, toDisplayString as i, createVNode as v, unref as b, withCtx as r, createBlock as d, renderList as V } from "vue";
2
2
  import o from "./SchemaPropertyDetail.vue.js";
3
3
  import w from "../../Badge/Badge.vue.js";
4
4
  const C = { class: "property-heading" }, D = {
@@ -7,22 +7,22 @@ const C = { class: "property-heading" }, D = {
7
7
  }, $ = {
8
8
  key: 1,
9
9
  class: "property-additional"
10
- }, b = {
10
+ }, j = {
11
11
  key: 2,
12
12
  class: "property-deprecated"
13
- }, j = {
13
+ }, E = {
14
14
  key: 3,
15
15
  class: "property-const"
16
- }, E = {
17
- key: 5,
18
- class: "property-write-only"
19
16
  }, F = {
20
17
  key: 6,
21
- class: "property-read-only"
18
+ class: "property-write-only"
22
19
  }, H = {
23
20
  key: 7,
21
+ class: "property-read-only"
22
+ }, T = {
23
+ key: 8,
24
24
  class: "property-required"
25
- }, K = /* @__PURE__ */ P({
25
+ }, Q = /* @__PURE__ */ P({
26
26
  __name: "SchemaPropertyHeading",
27
27
  props: {
28
28
  value: {},
@@ -30,119 +30,119 @@ const C = { class: "property-heading" }, D = {
30
30
  required: { type: Boolean, default: !1 },
31
31
  additional: { type: Boolean }
32
32
  },
33
- setup(T) {
33
+ setup(z) {
34
34
  const A = ["oneOf", "anyOf", "allOf", "not"], M = (e) => Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : e == null ? void 0 : e.default;
35
- return (e, r) => {
36
- var f, k, g, B, q, I, L;
35
+ return (e, a) => {
36
+ var f, k, g, B, q, I, L, N;
37
37
  return u(), n("div", C, [
38
38
  e.$slots.name ? (u(), n("div", D, [
39
39
  S(e.$slots, "name", {}, void 0, !0)
40
40
  ])) : t("", !0),
41
41
  e.additional ? (u(), n("div", $, [
42
42
  (f = e.value) != null && f["x-additionalPropertiesName"] ? (u(), n(s, { key: 0 }, [
43
- a(i(e.value["x-additionalPropertiesName"]), 1)
43
+ l(i(e.value["x-additionalPropertiesName"]), 1)
44
44
  ], 64)) : (u(), n(s, { key: 1 }, [
45
- a("additional properties")
45
+ l("additional properties")
46
46
  ], 64))
47
47
  ])) : t("", !0),
48
- (k = e.value) != null && k.deprecated ? (u(), n("div", b, [
49
- v(O(w), null, {
50
- default: l(() => r[0] || (r[0] = [
51
- a("deprecated")
48
+ (k = e.value) != null && k.deprecated ? (u(), n("div", j, [
49
+ v(b(w), null, {
50
+ default: r(() => a[0] || (a[0] = [
51
+ l("deprecated")
52
52
  ])),
53
53
  _: 1
54
54
  })
55
55
  ])) : t("", !0),
56
- (g = e.value) != null && g.const || (B = e.value) != null && B.enum && e.value.enum.length === 1 ? (u(), n("div", j, [
56
+ (g = e.value) != null && g.const || (B = e.value) != null && B.enum && e.value.enum.length === 1 ? (u(), n("div", E, [
57
57
  v(o, { truncate: "" }, {
58
- prefix: l(() => r[1] || (r[1] = [
59
- a("const:")
58
+ prefix: r(() => a[1] || (a[1] = [
59
+ l("const:")
60
60
  ])),
61
- default: l(() => [
62
- a(" " + i(e.value.const ?? e.value.enum[0]), 1)
61
+ default: r(() => [
62
+ l(" " + i(e.value.const ?? e.value.enum[0]), 1)
63
63
  ]),
64
64
  _: 1
65
65
  })
66
66
  ])) : (q = e.value) != null && q.type ? (u(), n(s, { key: 4 }, [
67
67
  v(o, null, {
68
- default: l(() => {
69
- var m, p, y;
68
+ default: r(() => {
69
+ var m, y, p;
70
70
  return [
71
- (p = (m = e.value) == null ? void 0 : m.items) != null && p.type ? (u(), n(s, { key: 0 }, [
72
- a(i(e.value.type) + " " + i(e.value.items.type) + "[] ", 1)
71
+ (y = (m = e.value) == null ? void 0 : m.items) != null && y.type ? (u(), n(s, { key: 0 }, [
72
+ l(i(e.value.type) + " " + i(e.value.items.type) + "[] ", 1)
73
73
  ], 64)) : (u(), n(s, { key: 1 }, [
74
- a(i(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + i((y = e.value) != null && y.nullable ? " | nullable" : ""), 1)
74
+ l(i(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + i((p = e.value) != null && p.nullable ? " | nullable" : ""), 1)
75
75
  ], 64)),
76
76
  e.value.minItems || e.value.maxItems ? (u(), n(s, { key: 2 }, [
77
- a(i(e.value.minItems) + "…" + i(e.value.maxItems), 1)
77
+ l(i(e.value.minItems) + "…" + i(e.value.maxItems), 1)
78
78
  ], 64)) : t("", !0)
79
79
  ];
80
80
  }),
81
81
  _: 1
82
82
  }),
83
83
  e.value.minLength ? (u(), d(o, { key: 0 }, {
84
- prefix: l(() => r[2] || (r[2] = [
85
- a("min:")
84
+ prefix: r(() => a[2] || (a[2] = [
85
+ l("min:")
86
86
  ])),
87
- default: l(() => [
88
- a(" " + i(e.value.minLength), 1)
87
+ default: r(() => [
88
+ l(" " + i(e.value.minLength), 1)
89
89
  ]),
90
90
  _: 1
91
91
  })) : t("", !0),
92
92
  e.value.maxLength ? (u(), d(o, { key: 1 }, {
93
- prefix: l(() => r[3] || (r[3] = [
94
- a("max:")
93
+ prefix: r(() => a[3] || (a[3] = [
94
+ l("max:")
95
95
  ])),
96
- default: l(() => [
97
- a(" " + i(e.value.maxLength), 1)
96
+ default: r(() => [
97
+ l(" " + i(e.value.maxLength), 1)
98
98
  ]),
99
99
  _: 1
100
100
  })) : t("", !0),
101
101
  e.value.uniqueItems ? (u(), d(o, { key: 2 }, {
102
- default: l(() => r[4] || (r[4] = [
103
- a(" unique! ")
102
+ default: r(() => a[4] || (a[4] = [
103
+ l(" unique! ")
104
104
  ])),
105
105
  _: 1
106
106
  })) : t("", !0),
107
107
  e.value.format ? (u(), d(o, { key: 3 }, {
108
- default: l(() => [
109
- a(i(e.value.format), 1)
108
+ default: r(() => [
109
+ l(i(e.value.format), 1)
110
110
  ]),
111
111
  _: 1
112
112
  })) : t("", !0),
113
113
  e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (u(), d(o, { key: 4 }, {
114
- prefix: l(() => r[5] || (r[5] = [
115
- a("greater than:")
114
+ prefix: r(() => a[5] || (a[5] = [
115
+ l("greater than:")
116
116
  ])),
117
- default: l(() => [
118
- a(" " + i(e.value.minimum), 1)
117
+ default: r(() => [
118
+ l(" " + i(e.value.minimum), 1)
119
119
  ]),
120
120
  _: 1
121
121
  })) : t("", !0),
122
122
  e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (u(), d(o, { key: 5 }, {
123
- prefix: l(() => r[6] || (r[6] = [
124
- a("min:")
123
+ prefix: r(() => a[6] || (a[6] = [
124
+ l("min:")
125
125
  ])),
126
- default: l(() => [
127
- a(" " + i(e.value.minimum), 1)
126
+ default: r(() => [
127
+ l(" " + i(e.value.minimum), 1)
128
128
  ]),
129
129
  _: 1
130
130
  })) : t("", !0),
131
131
  e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (u(), d(o, { key: 6 }, {
132
- prefix: l(() => r[7] || (r[7] = [
133
- a("less than:")
132
+ prefix: r(() => a[7] || (a[7] = [
133
+ l("less than:")
134
134
  ])),
135
- default: l(() => [
136
- a(" " + i(e.value.maximum), 1)
135
+ default: r(() => [
136
+ l(" " + i(e.value.maximum), 1)
137
137
  ]),
138
138
  _: 1
139
139
  })) : t("", !0),
140
140
  e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (u(), d(o, { key: 7 }, {
141
- prefix: l(() => r[8] || (r[8] = [
142
- a("max:")
141
+ prefix: r(() => a[8] || (a[8] = [
142
+ l("max:")
143
143
  ])),
144
- default: l(() => [
145
- a(" " + i(e.value.maximum), 1)
144
+ default: r(() => [
145
+ l(" " + i(e.value.maximum), 1)
146
146
  ]),
147
147
  _: 1
148
148
  })) : t("", !0),
@@ -151,14 +151,14 @@ const C = { class: "property-heading" }, D = {
151
151
  code: "",
152
152
  truncate: ""
153
153
  }, {
154
- default: l(() => [
155
- a(i(e.value.pattern), 1)
154
+ default: r(() => [
155
+ l(i(e.value.pattern), 1)
156
156
  ]),
157
157
  _: 1
158
158
  })) : t("", !0),
159
159
  e.$props.enum ? (u(), d(o, { key: 9 }, {
160
- default: l(() => r[9] || (r[9] = [
161
- a("enum")
160
+ default: r(() => a[9] || (a[9] = [
161
+ l("enum")
162
162
  ])),
163
163
  _: 1
164
164
  })) : t("", !0),
@@ -166,30 +166,44 @@ const C = { class: "property-heading" }, D = {
166
166
  key: 10,
167
167
  truncate: ""
168
168
  }, {
169
- prefix: l(() => r[10] || (r[10] = [
170
- a("default:")
169
+ prefix: r(() => a[10] || (a[10] = [
170
+ l("default:")
171
171
  ])),
172
- default: l(() => [
173
- a(" " + i(M(e.value)), 1)
172
+ default: r(() => [
173
+ l(" " + i(M(e.value)), 1)
174
174
  ]),
175
175
  _: 1
176
176
  })) : t("", !0)
177
- ], 64)) : t("", !0),
178
- (I = e.value) != null && I.writeOnly ? (u(), n("div", E, " write-only ")) : (L = e.value) != null && L.readOnly ? (u(), n("div", F, " read-only ")) : t("", !0),
179
- (u(!0), n(s, null, V(A.filter((m) => {
180
- var p, y, N;
181
- return ((p = e.value) == null ? void 0 : p[m]) || ((N = (y = e.value) == null ? void 0 : y.items) == null ? void 0 : N[m]);
182
- }), (m) => (u(), d(O(w), { key: m }, {
183
- default: l(() => [
184
- a(i(m), 1)
185
- ]),
186
- _: 2
187
- }, 1024))), 128)),
188
- e.required ? (u(), n("div", H, " required ")) : t("", !0)
177
+ ], 64)) : (u(), n(s, { key: 5 }, [
178
+ ((I = e.value) == null ? void 0 : I.nullable) === !0 ? (u(), d(o, { key: 0 }, {
179
+ default: r(() => a[11] || (a[11] = [
180
+ l(" nullable ")
181
+ ])),
182
+ _: 1
183
+ })) : t("", !0)
184
+ ], 64)),
185
+ (L = e.value) != null && L.writeOnly ? (u(), n("div", F, " write-only ")) : (N = e.value) != null && N.readOnly ? (u(), n("div", H, " read-only ")) : t("", !0),
186
+ (u(!0), n(s, null, V(A.filter(
187
+ (m) => {
188
+ var y, p, O;
189
+ return ((y = e.value) == null ? void 0 : y[m]) || ((O = (p = e.value) == null ? void 0 : p.items) == null ? void 0 : O[m]);
190
+ }
191
+ ), (m) => {
192
+ var y, p;
193
+ return u(), n(s, { key: m }, [
194
+ ((p = (y = e.value) == null ? void 0 : y[m]) == null ? void 0 : p.length) > 1 ? (u(), d(b(w), { key: 0 }, {
195
+ default: r(() => [
196
+ l(i(m), 1)
197
+ ]),
198
+ _: 2
199
+ }, 1024)) : t("", !0)
200
+ ], 64);
201
+ }), 128)),
202
+ e.required ? (u(), n("div", T, " required ")) : t("", !0)
189
203
  ]);
190
204
  };
191
205
  }
192
206
  });
193
207
  export {
194
- K as default
208
+ Q as default
195
209
  };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Converts an example value to a string that can be displayed in the UI.
3
+ */
4
+ export declare function formatExample(example: unknown): string | number;
5
+ //# sourceMappingURL=formatExample.d.ts.map