@scalar/api-reference 1.28.14 → 1.28.16

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 (34) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/browser/standalone.js +5125 -5093
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  5. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  6. package/dist/components/Content/Introduction/Introduction.vue2.js +44 -35
  7. package/dist/components/Content/Models/Models.vue.js +2 -2
  8. package/dist/components/Content/Models/Models.vue2.js +17 -17
  9. package/dist/components/Content/Models/ModelsAccordion.vue.js +1 -1
  10. package/dist/components/Content/Models/ModelsAccordion.vue2.js +3 -3
  11. package/dist/components/Content/Schema/Schema.preview.d.ts +525 -0
  12. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  13. package/dist/components/Content/Schema/Schema.vue.d.ts +1 -0
  14. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  16. package/dist/components/Content/Schema/Schema.vue2.js +60 -62
  17. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +2 -2
  19. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +32 -50
  20. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -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 +72 -67
  24. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +12 -0
  25. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -0
  26. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +70 -0
  27. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  28. package/dist/features/Operation/components/ParameterListItem.vue2.js +12 -12
  29. package/dist/hooks/useSidebar.d.ts +1 -0
  30. package/dist/hooks/useSidebar.d.ts.map +1 -1
  31. package/dist/hooks/useSidebar.js +131 -119
  32. package/dist/index.js +1 -1
  33. package/dist/style.css +1 -1
  34. package/package.json +6 -6
@@ -1,9 +1,9 @@
1
- import { defineComponent as $, computed as y, openBlock as o, createBlock as f, resolveDynamicComponent as G, normalizeClass as z, withCtx as m, createSlots as J, createTextVNode as D, toDisplayString as d, createCommentVNode as a, createElementBlock as i, createVNode as s, unref as l, Fragment as c, renderList as k, createElementVNode as h } from "vue";
1
+ import { defineComponent as $, computed as y, openBlock as l, createBlock as f, resolveDynamicComponent as G, normalizeClass as I, withCtx as m, createSlots as J, createTextVNode as D, toDisplayString as c, createCommentVNode as a, createElementBlock as i, createVNode as s, unref as r, Fragment as d, renderList as k, createElementVNode as h } from "vue";
2
2
  import { Disclosure as K, DisclosurePanel as Q, DisclosureButton as W } from "@headlessui/vue";
3
3
  import { ScalarMarkdown as S, ScalarIcon as X } from "@scalar/components";
4
- import { optimizeValueForDisplay as Y, discriminators as I } from "./helpers/optimizeValueForDisplay.js";
5
- import L from "./Schema.vue.js";
6
- import O from "./SchemaDiscriminator.vue.js";
4
+ import { optimizeValueForDisplay as Y, discriminators as L } from "./helpers/optimizeValueForDisplay.js";
5
+ import O from "./Schema.vue.js";
6
+ import R from "./SchemaDiscriminator.vue.js";
7
7
  import x from "./SchemaPropertyHeading.vue.js";
8
8
  const ee = {
9
9
  key: 1,
@@ -14,23 +14,24 @@ const ee = {
14
14
  }, ne = {
15
15
  key: 3,
16
16
  class: "property-enum"
17
- }, oe = {
17
+ }, le = {
18
18
  key: 0,
19
19
  class: "property-list"
20
- }, re = { class: "property-heading" }, ie = { class: "property-name" }, ae = { class: "property-description" }, se = {
20
+ }, oe = { class: "property-heading" }, ie = { class: "property-name" }, ae = { class: "property-description" }, se = {
21
21
  key: 1,
22
22
  class: "property-enum-values"
23
- }, le = { class: "property-enum-value-label" }, pe = { class: "property-enum-value-label" }, me = {
23
+ }, re = { class: "property-enum-value-label" }, pe = { class: "property-enum-value-label" }, me = {
24
24
  key: 4,
25
25
  class: "children"
26
- }, de = {
26
+ }, ce = {
27
27
  key: 0,
28
28
  class: "children"
29
- }, be = /* @__PURE__ */ $({
29
+ }, ve = /* @__PURE__ */ $({
30
30
  __name: "SchemaProperty",
31
31
  props: {
32
32
  is: {},
33
33
  value: {},
34
+ noncollapsible: { type: Boolean },
34
35
  level: { default: 0 },
35
36
  name: {},
36
37
  required: { type: Boolean, default: !1 },
@@ -42,8 +43,8 @@ const ee = {
42
43
  schemas: {},
43
44
  hideHeading: { type: Boolean }
44
45
  },
45
- setup(R) {
46
- const T = R, H = {
46
+ setup(T) {
47
+ const U = T, H = {
47
48
  integer: {
48
49
  _default: "Integer numbers.",
49
50
  int32: "Signed 32-bit integers (commonly used integer type).",
@@ -61,35 +62,35 @@ const ee = {
61
62
  return (e == null ? void 0 : e.enum) || ((n = e == null ? void 0 : e.items) == null ? void 0 : n.enum) || [];
62
63
  }, C = y(
63
64
  () => p(t.value).length > 9
64
- ), P = y(() => C.value ? 5 : 9), U = y(
65
+ ), P = y(() => C.value ? 5 : 9), Z = y(
65
66
  () => p(t.value).slice(0, P.value)
66
- ), Z = y(
67
+ ), M = y(
67
68
  () => p(t.value).slice(P.value)
68
- ), t = y(() => Y(T.value));
69
- I.find((e) => !t.value || typeof t.value != "object" ? !1 : e in t.value || t.value.items && typeof t.value.items == "object" && e in t.value.items);
70
- const M = (e, n, g, v, b) => n || g || v || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || b;
69
+ ), t = y(() => Y(U.value));
70
+ L.find((e) => !t.value || typeof t.value != "object" ? !1 : e in t.value || t.value.items && typeof t.value.items == "object" && e in t.value.items);
71
+ const _ = (e, n, b, g, v) => n || b || g || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || v;
71
72
  return (e, n) => {
72
- var g;
73
- return o(), f(G(e.is ?? "li"), {
74
- class: z(["property", [
73
+ var b;
74
+ return l(), f(G(e.is ?? "li"), {
75
+ class: I(["property", [
75
76
  (B(e.description, t.value), ""),
76
77
  `property--level-${e.level}`,
77
78
  {
78
79
  "property--compact": e.compact,
79
- "property--deprecated": (g = t.value) == null ? void 0 : g.deprecated
80
+ "property--deprecated": (b = t.value) == null ? void 0 : b.deprecated
80
81
  }
81
82
  ]])
82
83
  }, {
83
84
  default: m(() => {
84
- var v, b, w, j, q, A, F, N, V;
85
+ var g, v, w, j, q, A, F, N, V;
85
86
  return [
86
- M(
87
+ _(
87
88
  t.value,
88
89
  e.name,
89
90
  e.additional,
90
91
  e.pattern,
91
92
  e.required
92
- ) ? (o(), f(x, {
93
+ ) ? (l(), f(x, {
93
94
  key: 0,
94
95
  additional: e.additional,
95
96
  enum: p(t.value).length > 0,
@@ -100,70 +101,70 @@ const ee = {
100
101
  e.name ? {
101
102
  name: "name",
102
103
  fn: m(() => [
103
- D(d(e.name), 1)
104
+ D(c(e.name), 1)
104
105
  ]),
105
106
  key: "0"
106
107
  } : void 0,
107
- (v = t.value) != null && v.example ? {
108
+ (g = t.value) != null && g.example ? {
108
109
  name: "example",
109
110
  fn: m(() => [
110
- D(" Example: " + d(t.value.example), 1)
111
+ D(" Example: " + c(t.value.example), 1)
111
112
  ]),
112
113
  key: "1"
113
114
  } : void 0
114
115
  ]), 1032, ["additional", "enum", "pattern", "required", "value"])) : a("", !0),
115
- B(e.description, t.value) ? (o(), i("div", ee, [
116
- s(l(S), {
116
+ B(e.description, t.value) ? (l(), i("div", ee, [
117
+ s(r(S), {
117
118
  value: B(e.description, t.value)
118
119
  }, null, 8, ["value"])
119
- ])) : E(t.value) ? (o(), i("div", te, [
120
- s(l(S), {
120
+ ])) : E(t.value) ? (l(), i("div", te, [
121
+ s(r(S), {
121
122
  value: E(t.value) || ""
122
123
  }, null, 8, ["value"])
123
124
  ])) : a("", !0),
124
- ((b = p(t.value)) == null ? void 0 : b.length) > 0 ? (o(), i("div", ne, [
125
- Array.isArray((w = t.value) == null ? void 0 : w["x-enumDescriptions"]) ? (o(), i("div", oe, [
126
- (o(!0), i(c, null, k(p(t.value), (r) => (o(), i("div", {
127
- key: r,
125
+ ((v = p(t.value)) == null ? void 0 : v.length) > 0 ? (l(), i("div", ne, [
126
+ Array.isArray((w = t.value) == null ? void 0 : w["x-enumDescriptions"]) ? (l(), i("div", le, [
127
+ (l(!0), i(d, null, k(p(t.value), (o) => (l(), i("div", {
128
+ key: o,
128
129
  class: "property"
129
130
  }, [
130
- h("div", re, [
131
- h("div", ie, d(r), 1)
131
+ h("div", oe, [
132
+ h("div", ie, c(o), 1)
132
133
  ]),
133
134
  h("div", ae, [
134
- s(l(S), {
135
- value: t.value["x-enumDescriptions"][r]
135
+ s(r(S), {
136
+ value: t.value["x-enumDescriptions"][o]
136
137
  }, null, 8, ["value"])
137
138
  ])
138
139
  ]))), 128))
139
- ])) : (o(), i("ul", se, [
140
- (o(!0), i(c, null, k(U.value, (r) => (o(), i("li", {
141
- key: r,
140
+ ])) : (l(), i("ul", se, [
141
+ (l(!0), i(d, null, k(Z.value, (o) => (l(), i("li", {
142
+ key: o,
142
143
  class: "property-enum-value"
143
144
  }, [
144
- h("span", le, d(r), 1)
145
+ h("span", re, c(o), 1)
145
146
  ]))), 128)),
146
- C.value ? (o(), f(l(K), { key: 0 }, {
147
- default: m(({ open: r }) => [
148
- s(l(Q), null, {
147
+ C.value ? (l(), f(r(K), { key: 0 }, {
148
+ default: m(({ open: o }) => [
149
+ s(r(Q), null, {
149
150
  default: m(() => [
150
- (o(!0), i(c, null, k(Z.value, (u) => (o(), i("li", {
151
+ (l(!0), i(d, null, k(M.value, (u) => (l(), i("li", {
151
152
  key: u,
152
153
  class: "property-enum-value"
153
154
  }, [
154
- h("span", pe, d(u), 1)
155
+ h("span", pe, c(u), 1)
155
156
  ]))), 128))
156
157
  ]),
157
158
  _: 1
158
159
  }),
159
- s(l(W), { class: "enum-toggle-button" }, {
160
+ s(r(W), { class: "enum-toggle-button" }, {
160
161
  default: m(() => [
161
- s(l(X), {
162
- class: z(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": r }]),
162
+ s(r(X), {
163
+ class: I(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": o }]),
163
164
  icon: "Add",
164
165
  size: "sm"
165
166
  }, null, 8, ["class"]),
166
- D(" " + d(r ? "Hide values" : "Show all values"), 1)
167
+ D(" " + c(o ? "Hide values" : "Show all values"), 1)
167
168
  ]),
168
169
  _: 2
169
170
  }, 1024)
@@ -172,46 +173,50 @@ const ee = {
172
173
  })) : a("", !0)
173
174
  ]))
174
175
  ])) : a("", !0),
175
- ((j = t.value) == null ? void 0 : j.type) === "object" && ((q = t.value) != null && q.properties || (A = t.value) != null && A.additionalProperties) ? (o(), i("div", me, [
176
- s(L, {
176
+ ((j = t.value) == null ? void 0 : j.type) === "object" && ((q = t.value) != null && q.properties || (A = t.value) != null && A.additionalProperties) ? (l(), i("div", me, [
177
+ s(O, {
177
178
  compact: e.compact,
178
179
  level: e.level + 1,
179
180
  name: e.name,
181
+ noncollapsible: e.noncollapsible,
180
182
  value: t.value
181
- }, null, 8, ["compact", "level", "name", "value"])
183
+ }, null, 8, ["compact", "level", "name", "noncollapsible", "value"])
182
184
  ])) : a("", !0),
183
- (F = t.value) != null && F.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (o(), i(c, { key: 5 }, [
184
- ["object"].includes((V = (N = t.value) == null ? void 0 : N.items) == null ? void 0 : V.type) ? (o(), i("div", de, [
185
- s(L, {
185
+ (F = t.value) != null && F.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (l(), i(d, { key: 5 }, [
186
+ ["object"].includes((V = (N = t.value) == null ? void 0 : N.items) == null ? void 0 : V.type) ? (l(), i("div", ce, [
187
+ s(O, {
186
188
  compact: e.compact,
187
189
  level: e.level + 1,
188
190
  name: e.name,
191
+ noncollapsible: e.noncollapsible,
189
192
  value: t.value.items
190
- }, null, 8, ["compact", "level", "name", "value"])
193
+ }, null, 8, ["compact", "level", "name", "noncollapsible", "value"])
191
194
  ])) : a("", !0)
192
195
  ], 64)) : a("", !0),
193
- (o(!0), i(c, null, k(l(I), (r) => {
194
- var u, _;
195
- return o(), i(c, { key: r }, [
196
- (u = t.value) != null && u[r] ? (o(), f(O, {
196
+ (l(!0), i(d, null, k(r(L), (o) => {
197
+ var u, z;
198
+ return l(), i(d, { key: o }, [
199
+ (u = t.value) != null && u[o] ? (l(), f(R, {
197
200
  key: 0,
198
201
  compact: e.compact,
199
- discriminator: r,
202
+ discriminator: o,
200
203
  hideHeading: e.hideHeading,
201
204
  level: e.level,
202
205
  name: e.name,
206
+ noncollapsible: e.noncollapsible,
203
207
  schemas: e.schemas,
204
208
  value: t.value
205
- }, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "schemas", "value"])) : (_ = t.value) != null && _.items && typeof r == "string" && typeof t.value.items == "object" && r in t.value.items && Array.isArray(t.value.items[r]) && e.level < 3 ? (o(), f(O, {
209
+ }, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : (z = t.value) != null && z.items && typeof o == "string" && typeof t.value.items == "object" && o in t.value.items && Array.isArray(t.value.items[o]) && e.level < 3 ? (l(), f(R, {
206
210
  key: 1,
207
211
  compact: e.compact,
208
- discriminator: r,
212
+ discriminator: o,
209
213
  hideHeading: e.hideHeading,
210
214
  level: e.level,
211
215
  name: e.name,
216
+ noncollapsible: e.noncollapsible,
212
217
  schemas: e.schemas,
213
218
  value: t.value.items
214
- }, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "schemas", "value"])) : a("", !0)
219
+ }, null, 8, ["compact", "discriminator", "hideHeading", "level", "name", "noncollapsible", "schemas", "value"])) : a("", !0)
215
220
  ], 64);
216
221
  }), 128))
217
222
  ];
@@ -222,5 +227,5 @@ const ee = {
222
227
  }
223
228
  });
224
229
  export {
225
- be as default
230
+ ve as default
226
231
  };
@@ -0,0 +1,12 @@
1
+ import type { OpenAPI } from '@scalar/openapi-types';
2
+ type SchemaObject = OpenAPI.SchemaObject;
3
+ /**
4
+ * Merges multiple OpenAPI schema objects into a single schema object.
5
+ * Handles nested allOf compositions and merges properties recursively.
6
+ *
7
+ * @param schemas - Array of OpenAPI schema objects to merge
8
+ * @returns Merged schema object
9
+ */
10
+ export declare function mergeAllOfSchemas(schemas: SchemaObject[]): SchemaObject;
11
+ export {};
12
+ //# sourceMappingURL=merge-all-of-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-all-of-schemas.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/merge-all-of-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEpD,KAAK,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;AAExC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,CAwCvE"}
@@ -0,0 +1,70 @@
1
+ function f(p) {
2
+ return !Array.isArray(p) || p.length === 0 ? {} : p.reduce((i, r) => {
3
+ if (!r || typeof r != "object")
4
+ return i;
5
+ if (r.allOf) {
6
+ const t = f(r.allOf);
7
+ return f([i, t]);
8
+ }
9
+ const e = typeof i == "object" ? { ...i } : {};
10
+ if (r.properties && (e.properties = o(e.properties || {}, r.properties)), r.items) {
11
+ if (r.type === "array")
12
+ e.items = l(e.items || {}, r.items);
13
+ else if (r.type === "object" && r.items.allOf) {
14
+ const t = f(r.items.allOf);
15
+ e.properties = o(e.properties || {}, t.properties || {});
16
+ }
17
+ }
18
+ return n(e, r);
19
+ }, {});
20
+ }
21
+ function o(p, i) {
22
+ const r = typeof p == "object" ? { ...p } : {};
23
+ return Object.entries(i).forEach(([e, t]) => {
24
+ var s;
25
+ if (!t || typeof t != "object") {
26
+ r[e] = t;
27
+ return;
28
+ }
29
+ if (!r[e]) {
30
+ t.type === "array" && ((s = t.items) != null && s.allOf) ? r[e] = {
31
+ ...t,
32
+ items: f(t.items.allOf)
33
+ } : t.allOf ? r[e] = f(t.allOf) : r[e] = t;
34
+ return;
35
+ }
36
+ if (t.allOf)
37
+ r[e] = f([r[e], ...t.allOf]);
38
+ else if (t.type === "array" && t.items)
39
+ r[e] = {
40
+ ...r[e],
41
+ type: "array",
42
+ items: l(r[e].items || {}, t.items)
43
+ };
44
+ else {
45
+ const d = r[e].properties || t.properties ? o(r[e].properties || {}, t.properties || {}) : void 0;
46
+ r[e] = {
47
+ ...r[e],
48
+ ...t
49
+ }, d && (r[e].properties = d);
50
+ }
51
+ }), r;
52
+ }
53
+ function l(p, i) {
54
+ if (p.allOf || i.allOf) {
55
+ const e = [...p.allOf || [p], ...i.allOf || [i]];
56
+ return f(e);
57
+ }
58
+ const r = {
59
+ ...p,
60
+ ...i
61
+ };
62
+ return (r.properties || i.properties) && (r.properties = o(r.properties || {}, i.properties || {})), r;
63
+ }
64
+ const n = (p, i) => {
65
+ const r = typeof p == "object" ? { ...p } : {};
66
+ return i.required && Array.isArray(i.required) && (r.required = [...p.required || [], ...i.required]), i.type && !p.type && (r.type = i.type), i.description && !p.description && (r.description = i.description), r;
67
+ };
68
+ export {
69
+ f as mergeAllOfSchemas
70
+ };
@@ -1,7 +1,7 @@
1
1
  import t from "./ParameterListItem.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-cc0511cb"]]);
3
+ import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ a(t, [["__scopeId", "data-v-b0aacc52"]]);
5
5
  export {
6
- c as default
6
+ e as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as w, computed as i, ref as C, openBlock as o, createElementBlock as g, createVNode as m, unref as t, withCtx as c, createBlock as p, normalizeClass as B, createElementVNode as u, toDisplayString as b, createCommentVNode as n } from "vue";
2
- import { Disclosure as E, DisclosureButton as S, DisclosurePanel as q } from "@headlessui/vue";
1
+ import { defineComponent as w, computed as i, ref as g, openBlock as o, createElementBlock as C, createVNode as m, unref as t, withCtx as c, createBlock as p, normalizeClass as B, createElementVNode as u, toDisplayString as E, createCommentVNode as n } from "vue";
2
+ import { Disclosure as S, DisclosureButton as b, DisclosurePanel as q } from "@headlessui/vue";
3
3
  import { ScalarIcon as D, ScalarMarkdown as P } from "@scalar/components";
4
4
  import V from "./ContentTypeSelect.vue.js";
5
5
  import I from "./ParameterHeaders.vue.js";
@@ -7,7 +7,7 @@ import j from "../../../components/Content/Schema/SchemaProperty.vue.js";
7
7
  const N = {
8
8
  key: 0,
9
9
  class: "parameter-item group/parameter-item relative"
10
- }, T = { class: "parameter-item-name" }, O = { class: "parameter-item-type" }, _ = { class: "absolute right-0 top-2.5 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, A = /* @__PURE__ */ w({
10
+ }, T = { class: "parameter-item-name" }, _ = { class: "parameter-item-type" }, O = { class: "absolute right-0 top-2.5 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, A = /* @__PURE__ */ w({
11
11
  __name: "ParameterListItem",
12
12
  props: {
13
13
  parameter: {},
@@ -17,15 +17,15 @@ const N = {
17
17
  schemas: {}
18
18
  },
19
19
  setup(y) {
20
- const a = y, v = i(() => a.parameter.content ? Object.keys(a.parameter.content) : []), s = C(
20
+ const a = y, v = i(() => a.parameter.content ? Object.keys(a.parameter.content) : []), s = g(
21
21
  v.value[0]
22
22
  );
23
23
  a.parameter.content && "application/json" in a.parameter.content && (s.value = "application/json");
24
24
  const r = i(() => !!(a.collapsableItems && a.parameter.content)), k = i(() => a.parameter.readOnly !== !0);
25
- return (e, d) => k.value ? (o(), g("li", N, [
26
- m(t(E), null, {
25
+ return (e, d) => k.value ? (o(), C("li", N, [
26
+ m(t(S), null, {
27
27
  default: c(({ open: l }) => [
28
- r.value ? (o(), p(t(S), {
28
+ r.value ? (o(), p(t(b), {
29
29
  key: 0,
30
30
  class: B(["parameter-item-trigger flex", { "parameter-item-trigger-open": l }])
31
31
  }, {
@@ -35,8 +35,8 @@ const N = {
35
35
  icon: l ? "ChevronDown" : "ChevronRight",
36
36
  thickness: "1.5"
37
37
  }, null, 8, ["icon"]),
38
- u("span", T, b(e.parameter.name), 1),
39
- u("span", O, [
38
+ u("span", T, E(e.parameter.name), 1),
39
+ u("span", _, [
40
40
  e.parameter.description ? (o(), p(t(P), {
41
41
  key: 0,
42
42
  class: "markdown",
@@ -62,7 +62,7 @@ const N = {
62
62
  compact: "",
63
63
  description: r.value ? "" : e.parameter.description,
64
64
  name: r.value ? "" : e.parameter.name,
65
- noncollapsible: e.showChildren,
65
+ noncollapsible: !0,
66
66
  required: e.parameter.required,
67
67
  schemas: e.schemas,
68
68
  value: {
@@ -70,7 +70,7 @@ const N = {
70
70
  ...e.parameter.content ? (f = (h = e.parameter.content) == null ? void 0 : h[s.value]) == null ? void 0 : f.schema : e.parameter.schema
71
71
  },
72
72
  withExamples: e.withExamples
73
- }, null, 8, ["description", "name", "noncollapsible", "required", "schemas", "value", "withExamples"])
73
+ }, null, 8, ["description", "name", "required", "schemas", "value", "withExamples"])
74
74
  ];
75
75
  }),
76
76
  _: 1
@@ -78,7 +78,7 @@ const N = {
78
78
  ]),
79
79
  _: 1
80
80
  }),
81
- u("div", _, [
81
+ u("div", O, [
82
82
  r.value && a.parameter.content ? (o(), p(V, {
83
83
  key: 0,
84
84
  class: "parameter-item-content-type",
@@ -10,6 +10,7 @@ export type SidebarEntry = {
10
10
  deprecated?: boolean;
11
11
  isGroup?: boolean;
12
12
  };
13
+ export declare const DEFAULT_INTRODUCTION_SLUG = "introduction";
13
14
  /** Helper to overwrite the current OpenAPI document */
14
15
  declare function setParsedSpec(spec: Spec): Spec;
15
16
  type CollapsedSidebarItems = Record<string, boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAa3E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAcD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QA0ChC;AAMD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAIpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAkOD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAA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