@scalar/api-reference 1.31.12 → 1.31.15

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.
@@ -1,11 +1,11 @@
1
- import { defineComponent as F, computed as B, createElementBlock as n, openBlock as u, createCommentVNode as r, createBlock as d, normalizeClass as j, renderSlot as E, Fragment as p, createTextVNode as l, withCtx as a, createVNode as k, toDisplayString as m, unref as y } from "vue";
2
- import { isDefined as v } from "@scalar/helpers/array/is-defined";
1
+ import { defineComponent as F, computed as B, createElementBlock as n, openBlock as u, createCommentVNode as i, createBlock as d, normalizeClass as j, renderSlot as A, Fragment as k, createTextVNode as l, withCtx as a, createVNode as g, toDisplayString as m, unref as v } from "vue";
2
+ import { isDefined as p } from "@scalar/helpers/array/is-defined";
3
3
  import z from "./SchemaPropertyExamples.vue.js";
4
4
  import S from "../../ScreenReader.vue.js";
5
5
  import { getDiscriminatorSchemaName as H } from "../../../hooks/useDiscriminator.js";
6
6
  import { getModelName as J } from "./helpers/schema-name.js";
7
7
  import o from "./SchemaPropertyDetail.vue.js";
8
- import L from "../../Badge/Badge.vue.js";
8
+ import C from "../../Badge/Badge.vue.js";
9
9
  const R = { class: "property-heading" }, G = {
10
10
  key: 1,
11
11
  class: "property-discriminator"
@@ -42,69 +42,69 @@ const R = { class: "property-heading" }, G = {
42
42
  hideModelNames: { type: Boolean, default: !1 },
43
43
  schemas: {}
44
44
  },
45
- setup(i) {
46
- 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, D = B(() => {
47
- var e, t, s, f, g, N;
48
- if (v((e = i.value) == null ? void 0 : e.const))
49
- return (t = i.value) == null ? void 0 : t.const;
50
- if (((f = (s = i.value) == null ? void 0 : s.enum) == null ? void 0 : f.length) === 1)
51
- return i.value.enum[0];
52
- if ((g = i.value) != null && g.items) {
53
- if (v(i.value.items.const))
54
- return i.value.items.const;
55
- if (((N = i.value.items.enum) == null ? void 0 : N.length) === 1)
56
- return i.value.items.enum[0];
45
+ setup(r) {
46
+ const L = (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, D = B(() => {
47
+ var e, t, s, f, y, N;
48
+ if (p((e = r.value) == null ? void 0 : e.const))
49
+ return (t = r.value) == null ? void 0 : t.const;
50
+ if (((f = (s = r.value) == null ? void 0 : s.enum) == null ? void 0 : f.length) === 1)
51
+ return r.value.enum[0];
52
+ if ((y = r.value) != null && y.items) {
53
+ if (p(r.value.items.const))
54
+ return r.value.items.const;
55
+ if (((N = r.value.items.enum) == null ? void 0 : N.length) === 1)
56
+ return r.value.items.enum[0];
57
57
  }
58
58
  return null;
59
59
  }), T = B(() => {
60
- var e, t, s, f;
61
- return Array.isArray((e = i.value) == null ? void 0 : e.type) ? i.value.type.join(" | ") : (t = i.value) != null && t.title ? i.value.title : (s = i.value) != null && s.name ? i.value.name : ((f = i.value) == null ? void 0 : f.type) ?? "";
62
- }), M = B(() => i.value ? J(
63
- i.value,
64
- i.schemas,
65
- i.hideModelNames,
60
+ var e, t, s, f, y;
61
+ 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 && f.type && r.value.contentEncoding ? `${r.value.type} • ${r.value.contentEncoding}` : ((y = r.value) == null ? void 0 : y.type) ?? "";
62
+ }), M = B(() => r.value ? J(
63
+ r.value,
64
+ r.schemas,
65
+ r.hideModelNames,
66
66
  H
67
67
  ) : null);
68
68
  return (e, t) => {
69
- var s, f, g, N, q, w, P, I, O, V, b, A;
69
+ var s, f, y, N, q, w, E, P, $, I, O, V;
70
70
  return u(), n("div", R, [
71
71
  e.$slots.name ? (u(), n("div", {
72
72
  key: 0,
73
73
  class: j(["property-name", { deprecated: (s = e.value) == null ? void 0 : s.deprecated }])
74
74
  }, [
75
- e.pattern ? (u(), n(p, { key: 1 }, [
75
+ e.pattern ? (u(), n(k, { key: 1 }, [
76
76
  t[0] || (t[0] = l("/")),
77
- E(e.$slots, "name", {}, void 0, !0),
77
+ A(e.$slots, "name", {}, void 0, !0),
78
78
  t[1] || (t[1] = l("/"))
79
- ], 64)) : E(e.$slots, "name", { key: 0 }, void 0, !0)
80
- ], 2)) : r("", !0),
81
- (f = e.value) != null && f.isDiscriminator ? (u(), n("div", G, " Discriminator ")) : r("", !0),
82
- e.value ? (u(), n(p, { key: 2 }, [
83
- (g = e.value) != null && g.type ? (u(), d(o, { key: 0 }, {
79
+ ], 64)) : A(e.$slots, "name", { key: 0 }, void 0, !0)
80
+ ], 2)) : i("", !0),
81
+ (f = e.value) != null && f.isDiscriminator ? (u(), n("div", G, " Discriminator ")) : i("", !0),
82
+ e.value ? (u(), n(k, { key: 2 }, [
83
+ (y = e.value) != null && y.type ? (u(), d(o, { key: 0 }, {
84
84
  default: a(() => {
85
- var C;
85
+ var b;
86
86
  return [
87
- k(S, null, {
87
+ g(S, null, {
88
88
  default: a(() => t[2] || (t[2] = [
89
89
  l("Type:")
90
90
  ])),
91
91
  _: 1
92
92
  }),
93
- M.value ? (u(), n(p, { key: 0 }, [
93
+ M.value ? (u(), n(k, { key: 0 }, [
94
94
  l(m(M.value), 1)
95
- ], 64)) : (u(), n(p, { key: 1 }, [
96
- l(m(T.value) + " " + m((C = e.value) != null && C.nullable ? " | nullable" : ""), 1)
95
+ ], 64)) : (u(), n(k, { key: 1 }, [
96
+ l(m(T.value) + " " + m((b = e.value) != null && b.nullable ? " | nullable" : ""), 1)
97
97
  ], 64))
98
98
  ];
99
99
  }),
100
100
  _: 1
101
- })) : r("", !0),
101
+ })) : i("", !0),
102
102
  e.value.minItems || e.value.maxItems ? (u(), d(o, { key: 1 }, {
103
103
  default: a(() => [
104
104
  l(m(e.value.minItems) + "…" + m(e.value.maxItems), 1)
105
105
  ]),
106
106
  _: 1
107
- })) : r("", !0),
107
+ })) : i("", !0),
108
108
  e.value.minLength ? (u(), d(o, { key: 2 }, {
109
109
  prefix: a(() => t[3] || (t[3] = [
110
110
  l("min:")
@@ -113,7 +113,7 @@ const R = { class: "property-heading" }, G = {
113
113
  l(" " + m(e.value.minLength), 1)
114
114
  ]),
115
115
  _: 1
116
- })) : r("", !0),
116
+ })) : i("", !0),
117
117
  e.value.maxLength ? (u(), d(o, { key: 3 }, {
118
118
  prefix: a(() => t[4] || (t[4] = [
119
119
  l("max:")
@@ -122,16 +122,16 @@ const R = { class: "property-heading" }, G = {
122
122
  l(" " + m(e.value.maxLength), 1)
123
123
  ]),
124
124
  _: 1
125
- })) : r("", !0),
125
+ })) : i("", !0),
126
126
  e.value.uniqueItems ? (u(), d(o, { key: 4 }, {
127
127
  default: a(() => t[5] || (t[5] = [
128
128
  l(" unique! ")
129
129
  ])),
130
130
  _: 1
131
- })) : r("", !0),
131
+ })) : i("", !0),
132
132
  e.value.format ? (u(), d(o, { key: 5 }, {
133
133
  default: a(() => [
134
- k(S, null, {
134
+ g(S, null, {
135
135
  default: a(() => t[6] || (t[6] = [
136
136
  l("Format:")
137
137
  ])),
@@ -140,8 +140,8 @@ const R = { class: "property-heading" }, G = {
140
140
  l(" " + m(e.value.format), 1)
141
141
  ]),
142
142
  _: 1
143
- })) : r("", !0),
144
- y(v)(e.value.minimum) && e.value.exclusiveMinimum ? (u(), d(o, { key: 6 }, {
143
+ })) : i("", !0),
144
+ v(p)(e.value.minimum) && e.value.exclusiveMinimum ? (u(), d(o, { key: 6 }, {
145
145
  prefix: a(() => t[7] || (t[7] = [
146
146
  l("greater than:")
147
147
  ])),
@@ -149,8 +149,8 @@ const R = { class: "property-heading" }, G = {
149
149
  l(" " + m(e.value.minimum), 1)
150
150
  ]),
151
151
  _: 1
152
- })) : r("", !0),
153
- y(v)(e.value.minimum) && !e.value.exclusiveMinimum ? (u(), d(o, { key: 7 }, {
152
+ })) : i("", !0),
153
+ v(p)(e.value.minimum) && !e.value.exclusiveMinimum ? (u(), d(o, { key: 7 }, {
154
154
  prefix: a(() => t[8] || (t[8] = [
155
155
  l("min:")
156
156
  ])),
@@ -158,8 +158,8 @@ const R = { class: "property-heading" }, G = {
158
158
  l(" " + m(e.value.minimum), 1)
159
159
  ]),
160
160
  _: 1
161
- })) : r("", !0),
162
- y(v)(e.value.maximum) && e.value.exclusiveMaximum ? (u(), d(o, { key: 8 }, {
161
+ })) : i("", !0),
162
+ v(p)(e.value.maximum) && e.value.exclusiveMaximum ? (u(), d(o, { key: 8 }, {
163
163
  prefix: a(() => t[9] || (t[9] = [
164
164
  l("less than:")
165
165
  ])),
@@ -167,8 +167,8 @@ const R = { class: "property-heading" }, G = {
167
167
  l(" " + m(e.value.maximum), 1)
168
168
  ]),
169
169
  _: 1
170
- })) : r("", !0),
171
- y(v)(e.value.maximum) && !e.value.exclusiveMaximum ? (u(), d(o, { key: 9 }, {
170
+ })) : i("", !0),
171
+ v(p)(e.value.maximum) && !e.value.exclusiveMaximum ? (u(), d(o, { key: 9 }, {
172
172
  prefix: a(() => t[10] || (t[10] = [
173
173
  l("max:")
174
174
  ])),
@@ -176,8 +176,8 @@ const R = { class: "property-heading" }, G = {
176
176
  l(" " + m(e.value.maximum), 1)
177
177
  ]),
178
178
  _: 1
179
- })) : r("", !0),
180
- y(v)(e.value.multipleOf) ? (u(), d(o, { key: 10 }, {
179
+ })) : i("", !0),
180
+ v(p)(e.value.multipleOf) ? (u(), d(o, { key: 10 }, {
181
181
  prefix: a(() => t[11] || (t[11] = [
182
182
  l("multiple of:")
183
183
  ])),
@@ -185,14 +185,14 @@ const R = { class: "property-heading" }, G = {
185
185
  l(" " + m(e.value.multipleOf), 1)
186
186
  ]),
187
187
  _: 1
188
- })) : r("", !0),
188
+ })) : i("", !0),
189
189
  e.value.pattern ? (u(), d(o, {
190
190
  key: 11,
191
191
  code: "",
192
192
  truncate: ""
193
193
  }, {
194
194
  default: a(() => [
195
- k(S, null, {
195
+ g(S, null, {
196
196
  default: a(() => t[12] || (t[12] = [
197
197
  l("Pattern:")
198
198
  ])),
@@ -201,13 +201,13 @@ const R = { class: "property-heading" }, G = {
201
201
  l(" " + m(e.value.pattern), 1)
202
202
  ]),
203
203
  _: 1
204
- })) : r("", !0),
204
+ })) : i("", !0),
205
205
  e.$props.enum ? (u(), d(o, { key: 12 }, {
206
206
  default: a(() => t[13] || (t[13] = [
207
207
  l("enum")
208
208
  ])),
209
209
  _: 1
210
- })) : r("", !0),
210
+ })) : i("", !0),
211
211
  e.value.default !== void 0 ? (u(), d(o, {
212
212
  key: 13,
213
213
  truncate: ""
@@ -216,36 +216,36 @@ const R = { class: "property-heading" }, G = {
216
216
  l("default:")
217
217
  ])),
218
218
  default: a(() => [
219
- l(" " + m($(e.value)), 1)
219
+ l(" " + m(L(e.value)), 1)
220
220
  ]),
221
221
  _: 1
222
- })) : r("", !0)
223
- ], 64)) : r("", !0),
222
+ })) : i("", !0)
223
+ ], 64)) : i("", !0),
224
224
  e.additional ? (u(), n("div", K, [
225
- (N = e.value) != null && N["x-additionalPropertiesName"] ? (u(), n(p, { key: 0 }, [
225
+ (N = e.value) != null && N["x-additionalPropertiesName"] ? (u(), n(k, { key: 0 }, [
226
226
  l(m(e.value["x-additionalPropertiesName"]), 1)
227
- ], 64)) : (u(), n(p, { key: 1 }, [
227
+ ], 64)) : (u(), n(k, { key: 1 }, [
228
228
  l("additional properties")
229
229
  ], 64))
230
- ])) : r("", !0),
230
+ ])) : i("", !0),
231
231
  e.pattern ? (u(), n("div", Q, [
232
- k(y(L), null, {
232
+ g(v(C), null, {
233
233
  default: a(() => t[15] || (t[15] = [
234
234
  l("pattern")
235
235
  ])),
236
236
  _: 1
237
237
  })
238
- ])) : r("", !0),
238
+ ])) : i("", !0),
239
239
  (q = e.value) != null && q.deprecated ? (u(), n("div", U, [
240
- k(y(L), null, {
240
+ g(v(C), null, {
241
241
  default: a(() => t[16] || (t[16] = [
242
242
  l("deprecated")
243
243
  ])),
244
244
  _: 1
245
245
  })
246
- ])) : r("", !0),
247
- y(v)(D.value) ? (u(), n("div", W, [
248
- k(o, { truncate: "" }, {
246
+ ])) : i("", !0),
247
+ v(p)(D.value) ? (u(), n("div", W, [
248
+ g(o, { truncate: "" }, {
249
249
  prefix: a(() => t[17] || (t[17] = [
250
250
  l("const:")
251
251
  ])),
@@ -254,21 +254,21 @@ const R = { class: "property-heading" }, G = {
254
254
  ]),
255
255
  _: 1
256
256
  })
257
- ])) : (u(), n(p, { key: 7 }, [
257
+ ])) : (u(), n(k, { key: 7 }, [
258
258
  ((w = e.value) == null ? void 0 : w.nullable) === !0 ? (u(), d(o, { key: 0 }, {
259
259
  default: a(() => t[18] || (t[18] = [
260
260
  l(" nullable ")
261
261
  ])),
262
262
  _: 1
263
- })) : r("", !0)
263
+ })) : i("", !0)
264
264
  ], 64)),
265
- (P = e.value) != null && P.writeOnly ? (u(), n("div", X, " write-only ")) : (I = e.value) != null && I.readOnly ? (u(), n("div", Y, " read-only ")) : r("", !0),
266
- e.required ? (u(), n("div", Z, " required ")) : r("", !0),
265
+ (E = e.value) != null && E.writeOnly ? (u(), n("div", X, " write-only ")) : (P = e.value) != null && P.readOnly ? (u(), n("div", Y, " read-only ")) : i("", !0),
266
+ e.required ? (u(), n("div", Z, " required ")) : i("", !0),
267
267
  e.withExamples ? (u(), d(z, {
268
268
  key: 11,
269
- examples: (O = e.value) == null ? void 0 : O.examples,
270
- example: ((V = e.value) == null ? void 0 : V.example) || ((A = (b = e.value) == null ? void 0 : b.items) == null ? void 0 : A.example)
271
- }, null, 8, ["examples", "example"])) : r("", !0)
269
+ examples: ($ = e.value) == null ? void 0 : $.examples,
270
+ example: ((I = e.value) == null ? void 0 : I.example) || ((V = (O = e.value) == null ? void 0 : O.items) == null ? void 0 : V.example)
271
+ }, null, 8, ["examples", "example"])) : i("", !0)
272
272
  ]);
273
273
  };
274
274
  }
@@ -1,10 +1,10 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
1
  import type { Schemas } from '../../../../features/Operation/types/schemas';
2
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
3
3
  /**
4
4
  * Extract schema name from various schema formats
5
5
  * Handles $ref, title, name, type, and schema dictionary lookup
6
6
  */
7
- export declare function getModelNameFromSchema(schema: OpenAPIV3_1.SchemaObject, schemas?: Schemas): string | null;
7
+ export declare function getModelNameFromSchema(schema: OpenAPIV3_1.SchemaObject): string | null;
8
8
  /**
9
9
  * Find schema name by matching against component schemas
10
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"schema-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAEjE;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAuDzG;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAkC3G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,OAAO,CAAC,EAAE,OAAO,EACjB,cAAc,UAAQ,EACtB,0BAA0B,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,GAC7E,MAAM,GAAG,IAAI,CA2Df;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAgBpD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,CAAC,YAAY,EAAE,EACvC,kBAAkB,EAAE,WAAW,CAAC,YAAY,EAAE,EAC9C,OAAO,CAAC,EAAE,OAAO,GAChB,WAAW,CAAC,YAAY,EAAE,CA0B5B"}
1
+ {"version":3,"file":"schema-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/schema-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,MAAM,GAAG,IAAI,CA6CtF;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAwB3G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,OAAO,CAAC,EAAE,OAAO,EACjB,cAAc,UAAQ,EACtB,0BAA0B,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,GAC7E,MAAM,GAAG,IAAI,CA2Df;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAgBpD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,CAAC,YAAY,EAAE,EACvC,kBAAkB,EAAE,WAAW,CAAC,YAAY,EAAE,EAC9C,OAAO,CAAC,EAAE,OAAO,GAChB,WAAW,CAAC,YAAY,EAAE,CA0B5B"}
@@ -1,16 +1,11 @@
1
- import { stringify as p } from "flatted";
2
- function d(t, r) {
1
+ import { stringify as $ } from "flatted";
2
+ function s(t) {
3
3
  if (!t)
4
4
  return null;
5
5
  if ("title" in t && t.title)
6
6
  return t.title;
7
7
  if ("name" in t && t.name)
8
8
  return t.name;
9
- if (r && typeof r == "object") {
10
- for (const [i, n] of Object.entries(r))
11
- if (p(n) === p(t))
12
- return i;
13
- }
14
9
  if ("$ref" in t) {
15
10
  const n = t.$ref.match(/\/([^\/]+)$/);
16
11
  if (n)
@@ -21,58 +16,52 @@ function d(t, r) {
21
16
  if ("type" in t && t.type)
22
17
  return Array.isArray(t.type) ? t.type.join(" | ") : t.type;
23
18
  if (typeof t == "object") {
24
- const i = Object.keys(t);
25
- if (i.length > 0)
26
- return i[0];
19
+ const r = Object.keys(t);
20
+ if (r.length > 0)
21
+ return r[0];
27
22
  }
28
23
  return null;
29
24
  }
30
- function m(t, r) {
31
- var i, n;
32
- if (!t || !r || typeof r != "object")
25
+ function b(t, r) {
26
+ var n, y;
27
+ if (!t || !r || typeof r != "object" || t.type !== "array" && t.type !== "object")
33
28
  return null;
34
- for (const [e, y] of Object.entries(r))
35
- if (y.type === t.type && (t.type === "array" && ((i = y.items) == null ? void 0 : i.type) === ((n = t.items) == null ? void 0 : n.type) || t.type === "object" && y.properties && t.properties && p(y.properties) === p(t.properties) || t.type !== "array" && t.type !== "object" && (Object.keys(y).some(
36
- (o) => o !== "type" && !["title", "description"].includes(o)
37
- ) || $(e))))
29
+ for (const [e, i] of Object.entries(r))
30
+ if (i.type === t.type && (t.type === "array" && ((n = i.items) == null ? void 0 : n.type) === ((y = t.items) == null ? void 0 : y.type) || t.type === "object" && i.properties && t.properties && $(i.properties) === $(t.properties)))
38
31
  return e;
39
32
  return null;
40
33
  }
41
- function f(t, r) {
34
+ function p(t, r) {
42
35
  return t === "array" ? `${t} ${r}[]` : `${t} ${r}`;
43
36
  }
44
- function j(t, r, i = !1, n) {
45
- var s;
37
+ function u(t, r, n = !1, y) {
38
+ var o;
46
39
  if (!(t != null && t.type))
47
40
  return null;
48
- if (i)
49
- return t.type === "array" && ((s = t.items) != null && s.type) ? `array ${t.items.type}[]` : null;
50
- const e = d(t, r);
41
+ if (n)
42
+ return t.type === "array" && ((o = t.items) != null && o.type) ? `array ${t.items.type}[]` : null;
43
+ const e = s(t);
51
44
  if (e && (t.title || t.name))
52
45
  return t.type === "array" ? `array ${e}[]` : e;
53
- const y = m(t, r);
54
- if (y)
55
- return t.type === "array" ? `array ${y}[]` : y;
46
+ const i = b(t, r);
47
+ if (i)
48
+ return t.type === "array" ? `array ${i}[]` : i;
56
49
  if (t.type === "array" && t.items) {
57
- if (n) {
58
- const u = n(t.items, r);
59
- if (u)
60
- return f(t.type, u);
50
+ if (y) {
51
+ const m = y(t.items, r);
52
+ if (m)
53
+ return p(t.type, m);
61
54
  }
62
55
  if (t.items.title || t.items.name)
63
- return f(t.type, t.items.title || t.items.name);
64
- const o = d(t.items, r);
65
- return o && o !== t.items.type ? f(t.type, o) : t.items.type ? f(t.type, t.items.type) : f(t.type, "object");
56
+ return p(t.type, t.items.title || t.items.name);
57
+ const f = s(t.items);
58
+ return f && f !== t.items.type ? p(t.type, f) : t.items.type ? p(t.type, t.items.type) : p(t.type, "object");
66
59
  }
67
60
  return e && e !== t.type ? e.startsWith("Array of ") ? `array ${e.replace("Array of ", "")}[]` : e : null;
68
61
  }
69
- function $(t) {
70
- return !t || ["anyOf", "oneOf", "allOf"].includes(t) ? !1 : /[A-Z]/.test(t) || /\s/.test(t) || /\(\d+\)/.test(t);
71
- }
72
62
  export {
73
- f as formatTypeWithModel,
74
- j as getModelName,
75
- d as getModelNameFromSchema,
76
- m as getSchemaNameFromSchemas,
77
- $ as hasName
63
+ p as formatTypeWithModel,
64
+ u as getModelName,
65
+ s as getModelNameFromSchema,
66
+ b as getSchemaNameFromSchemas
78
67
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAGpD,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,sBAAsB,CAAA;AAKlE,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CACzB;uBA0ByB,IAAI;sBAbL,IAAI;;;;;EAsK5B"}
1
+ {"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACnF,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAGpD,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,sBAAsB,CAAA;AAMlE,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CACzB;uBA0ByB,IAAI;sBAbL,IAAI;;;;;EAsM5B"}