@scalar/api-reference 1.25.116 → 1.25.118

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 (43) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/browser/standalone.js +8700 -8579
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  5. package/dist/components/ApiReferenceLayout.vue2.js +1 -1
  6. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  7. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  8. package/dist/components/Content/Introduction/Introduction.vue2.js +39 -38
  9. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +6 -0
  10. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  12. package/dist/components/Content/Schema/SchemaProperty.vue2.js +124 -120
  13. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +1 -3
  14. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  15. package/dist/features/ApiClientModal/useApiClient.d.ts +194 -114
  16. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  17. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  18. package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
  19. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +96 -104
  20. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts +2 -2
  21. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
  22. package/dist/features/ExampleResponses/ExampleResponses.vue.js +3 -3
  23. package/dist/features/ExampleResponses/ExampleResponses.vue2.js +86 -91
  24. package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
  25. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +6 -4
  26. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  27. package/dist/features/Operation/layouts/ModernLayout.vue2.js +7 -7
  28. package/dist/helpers/get-request.d.ts.map +1 -1
  29. package/dist/hooks/useConfig.d.ts +1 -1
  30. package/dist/hooks/useConfig.d.ts.map +1 -1
  31. package/dist/hooks/useConfig.js +1 -1
  32. package/dist/index.js +1 -1
  33. package/dist/style.css +1 -1
  34. package/package.json +11 -11
  35. package/dist/features/ExampleRequest/helpers/filter-security-requirements.d.ts +0 -6
  36. package/dist/features/ExampleRequest/helpers/filter-security-requirements.d.ts.map +0 -1
  37. package/dist/features/ExampleRequest/helpers/filter-security-requirements.js +0 -17
  38. package/dist/helpers/convert-to-har-request.d.ts +0 -28
  39. package/dist/helpers/convert-to-har-request.d.ts.map +0 -1
  40. package/dist/helpers/convert-to-har-request.js +0 -64
  41. package/dist/helpers/get-example-code.d.ts +0 -9
  42. package/dist/helpers/get-example-code.d.ts.map +0 -1
  43. package/dist/helpers/get-example-code.js +0 -51
@@ -2,7 +2,7 @@ import o from "./ApiReferenceLayout.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../_virtual/_plugin-vue_export-helper.js";
5
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4351acc7"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-10065932"]]);
6
6
  export {
7
- c as default
7
+ a as default
8
8
  };
@@ -136,7 +136,7 @@ const We = ["innerHTML"], Ge = { class: "references-header" }, Ke = {
136
136
  { immediate: !0 }
137
137
  ), v(Ce, w);
138
138
  const oe = Te(w);
139
- v($e, oe), v(ye, "modal"), v(he, o.configuration);
139
+ v($e, oe), v(ye, "modal"), v(he, o.configuration ?? {});
140
140
  function L(e, t) {
141
141
  T(
142
142
  () => o.configuration[e],
@@ -1 +1 @@
1
- {"version":3,"file":"Introduction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Introduction.vue"],"names":[],"mappings":"AA8FA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAkBhD,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CACX,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,CACrE,CAAA;IACD,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;AAoCF,iBAAS,cAAc;WAyIT,OAAO,IAA6B;;uBATtB,GAAG;uBACH,GAAG;;;;EAa9B;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Introduction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Introduction.vue"],"names":[],"mappings":"AAoGA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAkBhD,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CACX,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,CACrE,CAAA;IACD,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;AAwCF,iBAAS,cAAc;WAyIT,OAAO,IAA6B;;uBATtB,GAAG;uBACH,GAAG;;;;EAa9B;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Introduction.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a435d3c2"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0336cd4f"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,73 +1,74 @@
1
- import { defineComponent as V, computed as a, openBlock as l, createBlock as s, unref as t, withCtx as i, createVNode as n, createElementVNode as g, createTextVNode as d, toDisplayString as u, createCommentVNode as f, renderSlot as S } from "vue";
2
- import $ from "github-slugger";
3
- import w from "../../../features/DownloadLink/DownloadLink.vue.js";
4
- import N from "./Description.vue.js";
5
- import T from "../../Section/SectionContainer.vue.js";
6
- import b from "../../Section/Section.vue.js";
7
- import B from "../../Section/SectionContent.vue.js";
8
- import _ from "../../Badge/Badge.vue.js";
9
- import D from "../../Section/SectionHeader.vue.js";
10
- import H from "../../Section/SectionColumns.vue.js";
1
+ import { defineComponent as $, computed as u, onMounted as w, openBlock as l, createBlock as s, unref as t, withCtx as i, createVNode as n, createElementVNode as S, createTextVNode as f, toDisplayString as d, createCommentVNode as p, renderSlot as _ } from "vue";
2
+ import { useConfig as N } from "../../../hooks/useConfig.js";
3
+ import T from "github-slugger";
4
+ import b from "../../../features/DownloadLink/DownloadLink.vue.js";
5
+ import B from "./Description.vue.js";
6
+ import D from "../../Section/SectionContainer.vue.js";
7
+ import H from "../../Section/Section.vue.js";
8
+ import A from "../../Section/SectionContent.vue.js";
9
+ import C from "../../Badge/Badge.vue.js";
10
+ import E from "../../Section/SectionHeader.vue.js";
11
+ import F from "../../Section/SectionColumns.vue.js";
11
12
  import k from "../../Section/SectionColumn.vue.js";
12
- const A = { class: "badges" }, E = { class: "sticky-cards" }, P = /* @__PURE__ */ V({
13
+ const G = { class: "badges" }, I = { class: "sticky-cards" }, W = /* @__PURE__ */ $({
13
14
  __name: "Introduction",
14
15
  props: {
15
16
  info: {},
16
17
  parsedSpec: {}
17
18
  },
18
19
  setup(y) {
19
- const o = y, p = a(
20
+ const o = y, m = u(
20
21
  () => {
21
22
  var e, r;
22
23
  return ((e = o.parsedSpec) == null ? void 0 : e.openapi) ?? ((r = o.parsedSpec) == null ? void 0 : r.swagger) ?? "";
23
24
  }
24
- ), C = new $(), h = a(() => {
25
+ ), h = new T(), V = u(() => {
25
26
  var e;
26
- return C.slug(((e = o.info) == null ? void 0 : e.title) ?? "");
27
- }), c = a(() => {
27
+ return h.slug(((e = o.info) == null ? void 0 : e.title) ?? "");
28
+ }), c = u(() => {
28
29
  var e, r;
29
30
  return typeof ((e = o.info) == null ? void 0 : e.version) == "string" ? o.info.version.toString().match(/^\d/) ? `v${o.info.version}` : o.info.version : typeof ((r = o.info) == null ? void 0 : r.version) == "number" ? `v${o.info.version}` : void 0;
30
- });
31
- return (e, r) => (l(), s(t(T), null, {
31
+ }), { onLoaded: a } = N();
32
+ return w(() => a == null ? void 0 : a()), (e, r) => (l(), s(t(D), null, {
32
33
  default: i(() => [
33
- n(t(b), { class: "introduction-section gap-12" }, {
34
+ n(t(H), { class: "introduction-section gap-12" }, {
34
35
  default: i(() => {
35
- var m, v;
36
+ var v, g;
36
37
  return [
37
- n(t(B), {
38
- loading: !((m = e.info) != null && m.description) && !((v = e.info) != null && v.title)
38
+ n(t(A), {
39
+ loading: !((v = e.info) != null && v.description) && !((g = e.info) != null && g.title)
39
40
  }, {
40
41
  default: i(() => [
41
- g("div", A, [
42
- c.value ? (l(), s(t(_), { key: 0 }, {
42
+ S("div", G, [
43
+ c.value ? (l(), s(t(C), { key: 0 }, {
43
44
  default: i(() => [
44
- d(u(c.value), 1)
45
+ f(d(c.value), 1)
45
46
  ]),
46
47
  _: 1
47
- })) : f("", !0),
48
- p.value ? (l(), s(t(_), { key: 1 }, {
48
+ })) : p("", !0),
49
+ m.value ? (l(), s(t(C), { key: 1 }, {
49
50
  default: i(() => [
50
- d("OAS " + u(p.value), 1)
51
+ f("OAS " + d(m.value), 1)
51
52
  ]),
52
53
  _: 1
53
- })) : f("", !0)
54
+ })) : p("", !0)
54
55
  ]),
55
- n(t(D), {
56
+ n(t(E), {
56
57
  level: 1,
57
58
  loading: !e.info.title,
58
59
  tight: ""
59
60
  }, {
60
61
  default: i(() => [
61
- d(u(e.info.title), 1)
62
+ f(d(e.info.title), 1)
62
63
  ]),
63
64
  _: 1
64
65
  }, 8, ["loading"]),
65
- n(w, { specTitle: h.value }, null, 8, ["specTitle"]),
66
- n(t(H), null, {
66
+ n(b, { specTitle: V.value }, null, 8, ["specTitle"]),
67
+ n(t(F), null, {
67
68
  default: i(() => [
68
69
  n(t(k), null, {
69
70
  default: i(() => [
70
- n(N, {
71
+ n(B, {
71
72
  value: e.info.description
72
73
  }, null, 8, ["value"])
73
74
  ]),
@@ -75,19 +76,19 @@ const A = { class: "badges" }, E = { class: "sticky-cards" }, P = /* @__PURE__ *
75
76
  }),
76
77
  e.$slots.aside ? (l(), s(t(k), { key: 0 }, {
77
78
  default: i(() => [
78
- g("div", E, [
79
- S(e.$slots, "aside", {}, void 0, !0)
79
+ S("div", I, [
80
+ _(e.$slots, "aside", {}, void 0, !0)
80
81
  ])
81
82
  ]),
82
83
  _: 3
83
- })) : f("", !0)
84
+ })) : p("", !0)
84
85
  ]),
85
86
  _: 3
86
87
  })
87
88
  ]),
88
89
  _: 3
89
90
  }, 8, ["loading"]),
90
- S(e.$slots, "after", {}, void 0, !0)
91
+ _(e.$slots, "after", {}, void 0, !0)
91
92
  ];
92
93
  }),
93
94
  _: 3
@@ -98,5 +99,5 @@ const A = { class: "badges" }, E = { class: "sticky-cards" }, P = /* @__PURE__ *
98
99
  }
99
100
  });
100
101
  export {
101
- P as default
102
+ W as default
102
103
  };
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Note: We’re taking in a prop called `value` which should be a JSON Schema.
3
+ *
4
+ * We’re using `optimizeValueForDisplay` to merge null types in discriminators (anyOf, allOf, oneOf, not).
5
+ * So you should basically use the optimizedValue everywhere in the component.
6
+ */
1
7
  type __VLS_Props = {
2
8
  value?: Record<string, any>;
3
9
  level?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAicA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;cANW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AA8Y1B,0BAQG"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAqfA;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;cANW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AA2b1B,0BAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaProperty.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a8cba913"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-17d98b59"]]);
5
5
  export {
6
- p as default
6
+ a as default
7
7
  };
@@ -1,44 +1,44 @@
1
- import { defineComponent as Q, computed as y, openBlock as l, createElementBlock as t, normalizeClass as $, createVNode as r, createSlots as W, withCtx as f, createTextVNode as b, toDisplayString as s, unref as i, createCommentVNode as n, createElementVNode as c, Fragment as p, renderList as d, createBlock as E } from "vue";
2
- import { formatExample as X } from "./helpers/formatExample.js";
3
- import { optimizeValueForDisplay as Y, discriminators as _ } from "./helpers/optimizeValueForDisplay.js";
4
- import { Disclosure as x, DisclosurePanel as ee, DisclosureButton as le } from "@headlessui/vue";
5
- import { ScalarMarkdown as B, ScalarIcon as te } from "@scalar/components";
6
- import g from "./Schema.vue.js";
7
- import ae from "./SchemaPropertyHeading.vue.js";
8
- const oe = {
1
+ import { defineComponent as Y, computed as h, openBlock as l, createElementBlock as a, normalizeClass as G, createVNode as i, createSlots as ee, withCtx as g, createTextVNode as k, toDisplayString as u, unref as s, createCommentVNode as n, createElementVNode as y, Fragment as p, renderList as m, createBlock as _ } from "vue";
2
+ import { formatExample as te } from "./helpers/formatExample.js";
3
+ import { optimizeValueForDisplay as le, discriminators as J } from "./helpers/optimizeValueForDisplay.js";
4
+ import { Disclosure as ae, DisclosurePanel as oe, DisclosureButton as re } from "@headlessui/vue";
5
+ import { ScalarMarkdown as x, ScalarIcon as se } from "@scalar/components";
6
+ import b from "./Schema.vue.js";
7
+ import ne from "./SchemaPropertyHeading.vue.js";
8
+ const ie = {
9
9
  key: 0,
10
10
  class: "property-description"
11
- }, ne = {
11
+ }, ue = {
12
12
  key: 1,
13
13
  class: "property-description"
14
- }, re = {
14
+ }, pe = {
15
15
  key: 2,
16
16
  class: "property-example custom-scroll"
17
- }, se = { class: "property-example-value" }, ie = {
17
+ }, ce = { class: "property-example-value" }, me = {
18
18
  key: 3,
19
19
  class: "property-example custom-scroll"
20
- }, pe = { class: "property-example-label" }, ue = {
20
+ }, de = { class: "property-example-label" }, ve = {
21
21
  key: 4,
22
22
  class: "property-enum"
23
- }, de = {
23
+ }, ye = {
24
24
  key: 0,
25
25
  class: "property-list"
26
- }, me = { class: "property-heading" }, ce = { class: "property-name" }, ve = { class: "property-description" }, ye = {
26
+ }, fe = { class: "property-heading" }, he = { class: "property-name" }, ge = { class: "property-description" }, be = {
27
27
  key: 1,
28
28
  class: "property-enum-values"
29
- }, fe = {
29
+ }, ke = {
30
30
  key: 5,
31
31
  class: "children"
32
- }, he = {
32
+ }, _e = {
33
33
  key: 0,
34
34
  class: "children"
35
- }, ge = {
35
+ }, xe = {
36
36
  key: 0,
37
37
  class: "property-rule"
38
- }, ke = {
38
+ }, Ee = {
39
39
  key: 1,
40
40
  class: "property-rule"
41
- }, Pe = /* @__PURE__ */ Q({
41
+ }, Pe = /* @__PURE__ */ Y({
42
42
  __name: "SchemaProperty",
43
43
  props: {
44
44
  value: {},
@@ -51,8 +51,8 @@ const oe = {
51
51
  pattern: { type: Boolean },
52
52
  withExamples: { type: Boolean, default: !0 }
53
53
  },
54
- setup(G) {
55
- const h = G, S = {
54
+ setup(K) {
55
+ const Q = K, E = {
56
56
  integer: {
57
57
  _default: "Integer numbers.",
58
58
  int32: "Signed 32-bit integers (commonly used integer type).",
@@ -65,110 +65,114 @@ const oe = {
65
65
  byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
66
66
  binary: "binary data, used to describe files"
67
67
  }
68
- }, D = function(e, a) {
69
- return a != null && a.properties || a != null && a.additionalProperties || a != null && a.patternProperties ? null : e || (a == null ? void 0 : a.description) || null;
70
- }, w = function(e) {
71
- return !e || !S[e.type] ? null : S[e.type][e.format || "_default"];
72
- }, m = function(e) {
73
- var a;
74
- return (e == null ? void 0 : e.enum) || ((a = e == null ? void 0 : e.items) == null ? void 0 : a.enum) || [];
75
- }, C = y(() => m(h.value).length > 9), P = y(() => C.value ? 5 : 9), J = y(
76
- () => m(h.value).slice(0, P.value)
77
- ), K = y(
78
- () => m(h.value).slice(P.value)
79
- ), k = y(() => Y(h.value));
80
- return (e, a) => {
81
- var j, F, N, V, q, z, I, L, H, O, R, T, U;
82
- return l(), t("div", {
83
- class: $(["property", [
84
- `property--level-${e.level}`,
68
+ }, j = function(t, o) {
69
+ return o != null && o.properties || o != null && o.additionalProperties || o != null && o.patternProperties ? null : t || (o == null ? void 0 : o.description) || null;
70
+ }, B = function(t) {
71
+ return !t || !E[t.type] ? null : E[t.type][t.format || "_default"];
72
+ }, d = function(t) {
73
+ var o;
74
+ return (t == null ? void 0 : t.enum) || ((o = t == null ? void 0 : t.items) == null ? void 0 : o.enum) || [];
75
+ }, S = h(
76
+ () => d(e.value).length > 9
77
+ ), D = h(() => S.value ? 5 : 9), W = h(
78
+ () => d(e.value).slice(0, D.value)
79
+ ), X = h(
80
+ () => d(e.value).slice(D.value)
81
+ ), e = h(() => le(Q.value)), v = J.find((t) => !e.value || typeof e.value != "object" ? !1 : t in e.value || e.value.items && typeof e.value.items == "object" && t in e.value.items);
82
+ return (t, o) => {
83
+ var w, A, C, P, F, N, V, q, z, I, L, T, H, O, R, U;
84
+ return l(), a("div", {
85
+ class: G(["property", [
86
+ `property--level-${t.level}`,
85
87
  {
86
- "property--compact": e.compact,
87
- "property--deprecated": (j = e.value) == null ? void 0 : j.deprecated
88
+ "property--compact": t.compact,
89
+ "property--deprecated": (w = e.value) == null ? void 0 : w.deprecated
88
90
  }
89
91
  ]])
90
92
  }, [
91
- r(ae, {
92
- additional: e.additional,
93
- pattern: e.pattern,
94
- enum: m(e.value).length > 0,
95
- required: e.required,
96
- value: k.value
97
- }, W({ _: 2 }, [
98
- e.name ? {
93
+ i(ne, {
94
+ additional: t.additional,
95
+ enum: d(e.value).length > 0,
96
+ pattern: t.pattern,
97
+ required: t.required,
98
+ value: e.value
99
+ }, ee({ _: 2 }, [
100
+ t.name ? {
99
101
  name: "name",
100
- fn: f(() => [
101
- b(s(e.name), 1)
102
+ fn: g(() => [
103
+ k(u(t.name), 1)
102
104
  ]),
103
105
  key: "0"
104
106
  } : void 0,
105
- (F = e.value) != null && F.example ? {
107
+ (A = e.value) != null && A.example ? {
106
108
  name: "example",
107
- fn: f(() => [
108
- b(" Example: " + s(e.value.example), 1)
109
+ fn: g(() => [
110
+ k(" Example: " + u(e.value.example), 1)
109
111
  ]),
110
112
  key: "1"
111
113
  } : void 0
112
- ]), 1032, ["additional", "pattern", "enum", "required", "value"]),
113
- D(e.description, e.value) ? (l(), t("div", oe, [
114
- r(i(B), {
115
- value: D(e.description, e.value)
114
+ ]), 1032, ["additional", "enum", "pattern", "required", "value"]),
115
+ j(t.description, e.value) ? (l(), a("div", ie, [
116
+ i(s(x), {
117
+ value: j(t.description, e.value)
116
118
  }, null, 8, ["value"])
117
- ])) : w(e.value) ? (l(), t("div", ne, [
118
- r(i(B), {
119
- value: w(e.value) || ""
119
+ ])) : B(e.value) ? (l(), a("div", ue, [
120
+ i(s(x), {
121
+ value: B(e.value) || ""
120
122
  }, null, 8, ["value"])
121
123
  ])) : n("", !0),
122
- e.withExamples && ((N = e.value) != null && N.example || (q = (V = e.value) == null ? void 0 : V.items) != null && q.example) ? (l(), t("div", re, [
123
- a[0] || (a[0] = c("span", { class: "property-example-label" }, "Example", -1)),
124
- c("code", se, s(i(X)(e.value.example || ((z = e.value) == null ? void 0 : z.items.example))), 1)
124
+ t.withExamples && ((C = e.value) != null && C.example || (F = (P = e.value) == null ? void 0 : P.items) != null && F.example) ? (l(), a("div", pe, [
125
+ o[0] || (o[0] = y("span", { class: "property-example-label" }, "Example", -1)),
126
+ y("code", ce, u(s(te)(
127
+ ((N = e.value) == null ? void 0 : N.example) || s(v) && ((V = e.value) == null ? void 0 : V.items) && typeof e.value.items == "object" && e.value.items[s(v)]
128
+ )), 1)
125
129
  ])) : n("", !0),
126
- (I = e.value) != null && I.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), t("div", ie, [
127
- c("span", pe, s(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
128
- (l(!0), t(p, null, d(e.value.examples, (o, u) => (l(), t("code", {
129
- key: u,
130
+ (q = e.value) != null && q.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), a("div", me, [
131
+ y("span", de, u(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
132
+ (l(!0), a(p, null, m(e.value.examples, (r, c) => (l(), a("code", {
133
+ key: c,
130
134
  class: "property-example-value"
131
- }, s(o), 1))), 128))
135
+ }, u(r), 1))), 128))
132
136
  ])) : n("", !0),
133
- ((L = m(e.value)) == null ? void 0 : L.length) > 0 ? (l(), t("div", ue, [
134
- (H = e.value) != null && H["x-enumDescriptions"] ? (l(), t("div", de, [
135
- (l(!0), t(p, null, d(m(e.value), (o) => (l(), t("div", {
136
- key: o,
137
+ ((z = d(e.value)) == null ? void 0 : z.length) > 0 ? (l(), a("div", ve, [
138
+ Array.isArray((I = e.value) == null ? void 0 : I["x-enumDescriptions"]) ? (l(), a("div", ye, [
139
+ (l(!0), a(p, null, m(d(e.value), (r) => (l(), a("div", {
140
+ key: r,
137
141
  class: "property"
138
142
  }, [
139
- c("div", me, [
140
- c("div", ce, s(o), 1)
143
+ y("div", fe, [
144
+ y("div", he, u(r), 1)
141
145
  ]),
142
- c("div", ve, [
143
- r(i(B), {
144
- value: e.value["x-enumDescriptions"][o]
146
+ y("div", ge, [
147
+ i(s(x), {
148
+ value: e.value["x-enumDescriptions"][r]
145
149
  }, null, 8, ["value"])
146
150
  ])
147
151
  ]))), 128))
148
- ])) : (l(), t("ul", ye, [
149
- (l(!0), t(p, null, d(J.value, (o) => (l(), t("li", {
150
- key: o,
152
+ ])) : (l(), a("ul", be, [
153
+ (l(!0), a(p, null, m(W.value, (r) => (l(), a("li", {
154
+ key: r,
151
155
  class: "property-enum-value"
152
- }, s(o), 1))), 128)),
153
- C.value ? (l(), E(i(x), { key: 0 }, {
154
- default: f(({ open: o }) => [
155
- r(i(ee), null, {
156
- default: f(() => [
157
- (l(!0), t(p, null, d(K.value, (u) => (l(), t("li", {
158
- key: u,
156
+ }, u(r), 1))), 128)),
157
+ S.value ? (l(), _(s(ae), { key: 0 }, {
158
+ default: g(({ open: r }) => [
159
+ i(s(oe), null, {
160
+ default: g(() => [
161
+ (l(!0), a(p, null, m(X.value, (c) => (l(), a("li", {
162
+ key: c,
159
163
  class: "property-enum-value"
160
- }, s(u), 1))), 128))
164
+ }, u(c), 1))), 128))
161
165
  ]),
162
166
  _: 1
163
167
  }),
164
- r(i(le), { class: "enum-toggle-button" }, {
165
- default: f(() => [
166
- r(i(te), {
167
- class: $(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": o }]),
168
+ i(s(re), { class: "enum-toggle-button" }, {
169
+ default: g(() => [
170
+ i(s(se), {
171
+ class: G(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": r }]),
168
172
  icon: "Add",
169
173
  size: "sm"
170
174
  }, null, 8, ["class"]),
171
- b(" " + s(o ? "Hide values" : "Show all values"), 1)
175
+ k(" " + u(r ? "Hide values" : "Show all values"), 1)
172
176
  ]),
173
177
  _: 2
174
178
  }, 1024)
@@ -177,43 +181,43 @@ const oe = {
177
181
  })) : n("", !0)
178
182
  ]))
179
183
  ])) : n("", !0),
180
- ((O = e.value) == null ? void 0 : O.type) === "object" && ((R = e.value) != null && R.properties || (T = e.value) != null && T.additionalProperties) ? (l(), t("div", fe, [
181
- r(g, {
182
- compact: e.compact,
183
- level: e.level + 1,
184
+ ((L = e.value) == null ? void 0 : L.type) === "object" && ((T = e.value) != null && T.properties || (H = e.value) != null && H.additionalProperties) ? (l(), a("div", ke, [
185
+ i(b, {
186
+ compact: t.compact,
187
+ level: t.level + 1,
184
188
  value: e.value
185
189
  }, null, 8, ["compact", "level", "value"])
186
190
  ])) : n("", !0),
187
- (U = e.value) != null && U.items ? (l(), t(p, { key: 6 }, [
188
- ["object"].includes(e.value.items.type) ? (l(), t("div", he, [
189
- r(g, {
190
- compact: e.compact,
191
- level: e.level + 1,
191
+ (O = e.value) != null && O.items && typeof e.value.items == "object" && "type" in e.value.items && typeof e.value.items.type == "string" ? (l(), a(p, { key: 6 }, [
192
+ ["object"].includes((U = (R = e.value) == null ? void 0 : R.items) == null ? void 0 : U.type) ? (l(), a("div", _e, [
193
+ i(b, {
194
+ compact: t.compact,
195
+ level: t.level + 1,
192
196
  value: e.value.items
193
197
  }, null, 8, ["compact", "level", "value"])
194
198
  ])) : n("", !0)
195
199
  ], 64)) : n("", !0),
196
- (l(!0), t(p, null, d(i(_), (o) => {
197
- var u, Z, A;
198
- return l(), t(p, { key: o }, [
199
- (u = k.value) != null && u[o] ? (l(), t("div", ge, [
200
- (l(!0), t(p, null, d(k.value[o], (v) => {
201
- var M;
202
- return l(), E(g, {
203
- key: v.id,
204
- compact: e.compact,
205
- level: e.level + 1,
206
- noncollapsible: ((M = e.value) == null ? void 0 : M[o].length) === 1,
207
- value: v
200
+ (l(!0), a(p, null, m(s(J), (r) => {
201
+ var c, Z;
202
+ return l(), a(p, { key: r }, [
203
+ (c = e.value) != null && c[r] ? (l(), a("div", xe, [
204
+ (l(!0), a(p, null, m(e.value[r], (f) => {
205
+ var M, $;
206
+ return l(), _(b, {
207
+ key: f.id,
208
+ compact: t.compact,
209
+ level: t.level + 1,
210
+ noncollapsible: Array.isArray((M = e.value) == null ? void 0 : M[r]) && (($ = e.value) == null ? void 0 : $[r].length) === 1,
211
+ value: f
208
212
  }, null, 8, ["compact", "level", "noncollapsible", "value"]);
209
213
  }), 128))
210
214
  ])) : n("", !0),
211
- (A = (Z = e.value) == null ? void 0 : Z.items) != null && A[o] && e.level < 3 ? (l(), t("div", ke, [
212
- (l(!0), t(p, null, d(e.value.items[o], (v) => (l(), E(g, {
213
- key: v.id,
214
- compact: e.compact,
215
- level: e.level + 1,
216
- value: v
215
+ (Z = e.value) != null && Z.items && typeof s(v) == "string" && typeof e.value.items == "object" && s(v) in e.value.items && Array.isArray(e.value.items[s(v)]) && t.level < 3 ? (l(), a("div", Ee, [
216
+ (l(!0), a(p, null, m(e.value.items[s(v)], (f) => (l(), _(b, {
217
+ key: f.id,
218
+ compact: t.compact,
219
+ level: t.level + 1,
220
+ value: f
217
221
  }, null, 8, ["compact", "level", "value"]))), 128))
218
222
  ])) : n("", !0)
219
223
  ], 64);
@@ -3,7 +3,5 @@ export declare const discriminators: string[];
3
3
  /**
4
4
  * Optimize the value by removing nulls from discriminators.
5
5
  */
6
- export declare function optimizeValueForDisplay(value: UnknownObject | undefined): {
7
- [x: string]: unknown;
8
- } | undefined;
6
+ export declare function optimizeValueForDisplay(value: UnknownObject | undefined): Record<string, any> | undefined;
9
7
  //# 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;;cAwDvE"}
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,CACrC,KAAK,EAAE,aAAa,GAAG,SAAS,GAC/B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAwDjC"}