@scalar/api-reference 1.36.0 → 1.36.1

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 (49) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/browser/standalone.js +14762 -14744
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +2 -0
  5. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  6. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  7. package/dist/components/Content/Models/ClassicLayout.vue2.js +52 -41
  8. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  9. package/dist/components/Content/Models/Models.vue.js +9 -8
  10. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  12. package/dist/components/Content/Models/ModernLayout.vue2.js +46 -42
  13. package/dist/components/Content/Schema/Schema.vue.d.ts +3 -4
  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 +72 -75
  17. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -5
  18. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Schema/SchemaComposition.vue.js +46 -49
  20. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -7
  21. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +29 -40
  23. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -5
  24. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  26. package/dist/components/Content/Schema/SchemaProperty.vue2.js +72 -76
  27. package/dist/components/Content/Schema/types.d.ts +17 -0
  28. package/dist/components/Content/Schema/types.d.ts.map +1 -0
  29. package/dist/features/Operation/components/Header.vue.d.ts +2 -0
  30. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  31. package/dist/features/Operation/components/Header.vue.js +15 -10
  32. package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
  33. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  34. package/dist/features/Operation/components/Headers.vue.js +1 -1
  35. package/dist/features/Operation/components/Headers.vue2.js +23 -21
  36. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  37. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  38. package/dist/features/Operation/components/ParameterListItem.vue2.js +55 -48
  39. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  40. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  41. package/dist/features/Operation/components/RequestBody.vue2.js +74 -61
  42. package/dist/features/api-client-modal/useApiClient.d.ts +20 -20
  43. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  44. package/dist/helpers/convert-security-scheme.d.ts +1 -1
  45. package/dist/index.js +1 -1
  46. package/dist/style.css +1 -1
  47. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
  48. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +5 -6
  49. package/package.json +10 -10
@@ -1,5 +1,7 @@
1
+ import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
1
2
  import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
3
  type __VLS_Props = {
4
+ config: ApiReferenceConfiguration;
3
5
  schemas: {
4
6
  id: string;
5
7
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ClassicLayout.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAYhG,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AAyKF,wBAMG"}
1
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ClassicLayout.vue"],"names":[],"mappings":"AA6FA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAYhG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AAyLF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ClassicLayout.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0131e9c4"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-42f5a051"]]);
5
5
  export {
6
- c as default
6
+ f as default
7
7
  };
@@ -1,52 +1,53 @@
1
- import { defineComponent as v, createBlock as s, createCommentVNode as k, openBlock as r, unref as e, withCtx as t, createElementBlock as n, Fragment as c, renderList as f, createVNode as l, createTextVNode as S } from "vue";
2
- import { getResolvedRef as g } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
- import y from "../../Section/SectionContainerAccordion.vue.js";
4
- import C from "../../Section/SectionAccordion.vue.js";
5
- import p from "../Schema/SchemaProperty.vue.js";
6
- import b from "../../Anchor/Anchor.vue.js";
7
- import h from "../../Section/SectionHeaderTag.vue.js";
8
- import q from "../Schema/SchemaHeading.vue.js";
9
- import B from "../../Section/SectionHeader.vue.js";
10
- const H = {
1
+ import { defineComponent as h, createBlock as a, createCommentVNode as g, openBlock as r, unref as e, withCtx as o, createElementBlock as s, Fragment as p, renderList as u, createVNode as n, createTextVNode as S } from "vue";
2
+ import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
+ import P from "../../Section/SectionContainerAccordion.vue.js";
4
+ import k from "../../Section/SectionAccordion.vue.js";
5
+ import f from "../Schema/SchemaProperty.vue.js";
6
+ import q from "../../Anchor/Anchor.vue.js";
7
+ import v from "../../Section/SectionHeaderTag.vue.js";
8
+ import B from "../Schema/SchemaHeading.vue.js";
9
+ import R from "../../Section/SectionHeader.vue.js";
10
+ const C = {
11
11
  key: 0,
12
12
  class: "properties"
13
- }, N = { key: 1 }, M = /* @__PURE__ */ v({
13
+ }, F = { key: 1 }, M = /* @__PURE__ */ h({
14
14
  __name: "ClassicLayout",
15
15
  props: {
16
+ config: {},
16
17
  schemas: {}
17
18
  },
18
- setup(V) {
19
- return (m, u) => m.schemas.length ? (r(), s(e(y), {
19
+ setup(b) {
20
+ return (t, m) => t.schemas.length ? (r(), a(e(P), {
20
21
  key: 0,
21
22
  class: "reference-models"
22
23
  }, {
23
- title: t(() => [
24
- l(e(B), { level: 2 }, {
25
- default: t(() => u[0] || (u[0] = [
24
+ title: o(() => [
25
+ n(e(R), { level: 2 }, {
26
+ default: o(() => m[0] || (m[0] = [
26
27
  S("Models")
27
28
  ])),
28
29
  _: 1,
29
30
  __: [0]
30
31
  })
31
32
  ]),
32
- default: t(() => [
33
- (r(!0), n(c, null, f(m.schemas, ({ id: d, name: i, schema: o }) => (r(), s(e(C), {
34
- id: d,
35
- key: i,
36
- label: i
33
+ default: o(() => [
34
+ (r(!0), s(p, null, u(t.schemas, ({ id: c, name: l, schema: i }) => (r(), a(e(k), {
35
+ id: c,
36
+ key: l,
37
+ label: l
37
38
  }, {
38
- title: t(() => [
39
- l(e(b), {
40
- id: d,
39
+ title: o(() => [
40
+ n(e(q), {
41
+ id: c,
41
42
  class: "reference-models-anchor"
42
43
  }, {
43
- default: t(() => [
44
- l(e(h), { level: 3 }, {
45
- default: t(() => [
46
- l(e(q), {
44
+ default: o(() => [
45
+ n(e(v), { level: 3 }, {
46
+ default: o(() => [
47
+ n(e(B), {
47
48
  class: "reference-models-label",
48
- name: o.title ?? i,
49
- value: o
49
+ name: i.title ?? l,
50
+ value: i
50
51
  }, null, 8, ["name", "value"])
51
52
  ]),
52
53
  _: 2
@@ -55,23 +56,33 @@ const H = {
55
56
  _: 2
56
57
  }, 1032, ["id"])
57
58
  ]),
58
- default: t(() => [
59
- "properties" in o ? (r(), n("div", H, [
60
- (r(!0), n(c, null, f(Object.entries(o.properties ?? {}), ([a, _]) => (r(), s(e(p), {
61
- key: a,
62
- name: a,
63
- required: o.required?.includes(a),
64
- value: e(g)(_)
65
- }, null, 8, ["name", "required", "value"]))), 128))
66
- ])) : (r(), n("div", N, [
67
- l(e(p), { value: o }, null, 8, ["value"])
59
+ default: o(() => [
60
+ "properties" in i ? (r(), s("div", C, [
61
+ (r(!0), s(p, null, u(Object.entries(i.properties ?? {}), ([d, _]) => (r(), a(e(f), {
62
+ key: d,
63
+ name: d,
64
+ options: {
65
+ orderRequiredPropertiesFirst: t.config.orderRequiredPropertiesFirst,
66
+ orderSchemaPropertiesBy: t.config.orderSchemaPropertiesBy
67
+ },
68
+ required: i.required?.includes(d),
69
+ schema: e(y)(_)
70
+ }, null, 8, ["name", "options", "required", "schema"]))), 128))
71
+ ])) : (r(), s("div", F, [
72
+ n(e(f), {
73
+ options: {
74
+ orderRequiredPropertiesFirst: t.config.orderRequiredPropertiesFirst,
75
+ orderSchemaPropertiesBy: t.config.orderSchemaPropertiesBy
76
+ },
77
+ schema: i
78
+ }, null, 8, ["options", "schema"])
68
79
  ]))
69
80
  ]),
70
81
  _: 2
71
82
  }, 1032, ["id", "label"]))), 128))
72
83
  ]),
73
84
  _: 1
74
- })) : k("", !0);
85
+ })) : g("", !0);
75
86
  }
76
87
  });
77
88
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Models.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Models.vue"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,8DAA8D,CAAA;AAUrE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAA;IACpC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC;;AAgGF,wBAMG"}
1
+ {"version":3,"file":"Models.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Models.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,8DAA8D,CAAA;AAUrE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAA;IACpC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC;;AAkGF,wBAMG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as f, computed as r, createBlock as o, createCommentVNode as u, openBlock as t, unref as a, withCtx as d } from "vue";
1
+ import { defineComponent as f, computed as r, createBlock as s, createCommentVNode as u, openBlock as t, unref as a, withCtx as d } from "vue";
2
2
  import { getResolvedRef as h } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
3
  import { useNavState as p } from "../../../hooks/useNavState.js";
4
4
  import y from "./ClassicLayout.vue.js";
@@ -14,21 +14,22 @@ const z = /* @__PURE__ */ f({
14
14
  setup(c) {
15
15
  const { hash: m } = p(), { items: i } = k(), l = r(() => i.value.entries.find(
16
16
  (e) => e.type === "text" && e.id === "models"
17
- )), n = r(() => (l.value?.children ?? []).filter((s) => s.type === "model").map((s) => ({
18
- id: s.id,
19
- name: s.name,
20
- schema: h(c.schemas[s.name])
17
+ )), n = r(() => (l.value?.children ?? []).filter((o) => o.type === "model").map((o) => ({
18
+ id: o.id,
19
+ name: o.name,
20
+ schema: h(c.schemas[o.name])
21
21
  })));
22
- return (e, s) => e.schemas && Object.keys(e.schemas).length > 0 ? (t(), o(a(v), {
22
+ return (e, o) => e.schemas && Object.keys(e.schemas).length > 0 ? (t(), s(a(v), {
23
23
  key: 0,
24
24
  id: "models",
25
25
  isLazy: !!a(m) && !a(m).startsWith("model")
26
26
  }, {
27
27
  default: d(() => [
28
- e.config?.layout === "classic" ? (t(), o(y, {
28
+ e.config?.layout === "classic" ? (t(), s(y, {
29
29
  key: 0,
30
+ config: e.config,
30
31
  schemas: n.value
31
- }, null, 8, ["schemas"])) : (t(), o(g, {
32
+ }, null, 8, ["config", "schemas"])) : (t(), s(g, {
32
33
  key: 1,
33
34
  config: e.config,
34
35
  schemas: n.value
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ModernLayout.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAehG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AAmNF,wBAMG"}
1
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ModernLayout.vue"],"names":[],"mappings":"AAmHA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAehG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AA6NF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ModernLayout.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c533a862"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c4d2ae99"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,39 +1,39 @@
1
- import { defineComponent as g, useId as M, computed as c, createBlock as m, createCommentVNode as f, openBlock as a, unref as e, withCtx as l, createVNode as o, createElementVNode as _, createTextVNode as y, normalizeClass as N, createElementBlock as k, Fragment as C, renderList as I } from "vue";
2
- import { ScalarErrorBoundary as A } from "@scalar/components";
3
- import B from "../../ShowMoreButton.vue.js";
1
+ import { defineComponent as b, useId as y, computed as u, createBlock as s, createCommentVNode as f, openBlock as a, unref as e, withCtx as o, createVNode as l, createElementVNode as M, createTextVNode as B, normalizeClass as N, createElementBlock as k, Fragment as C, renderList as I } from "vue";
2
+ import { ScalarErrorBoundary as _ } from "@scalar/components";
3
+ import A from "../../ShowMoreButton.vue.js";
4
4
  import { useSidebar as H } from "../../../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
5
5
  import L from "../../Section/SectionContainer.vue.js";
6
6
  import w from "../../Section/Section.vue.js";
7
- import x from "../../Section/SectionHeader.vue.js";
7
+ import E from "../../Section/SectionHeader.vue.js";
8
8
  import p from "../../Section/SectionHeaderTag.vue.js";
9
- import E from "../../Section/CompactSection.vue.js";
10
- import O from "../Schema/Schema.vue.js";
9
+ import O from "../../Section/CompactSection.vue.js";
10
+ import P from "../Schema/Schema.vue.js";
11
11
  import V from "../Schema/SchemaHeading.vue.js";
12
- const S = 10, K = /* @__PURE__ */ g({
12
+ const S = 10, G = /* @__PURE__ */ b({
13
13
  __name: "ModernLayout",
14
14
  props: {
15
15
  config: {},
16
16
  schemas: { default: () => [] }
17
17
  },
18
- setup(t) {
19
- const i = M(), { collapsedSidebarItems: h } = H(), r = c(
20
- () => t.config.expandAllModelSections || t.schemas.length <= S || h.models
21
- ), v = c(() => r.value ? t.schemas : t.schemas.slice(0, S));
22
- return (s, u) => s.schemas ? (a(), m(e(L), {
18
+ setup(r) {
19
+ const m = y(), { collapsedSidebarItems: h } = H(), d = u(
20
+ () => r.config.expandAllModelSections || r.schemas.length <= S || h.models
21
+ ), g = u(() => d.value ? r.schemas : r.schemas.slice(0, S));
22
+ return (t, c) => t.schemas ? (a(), s(e(L), {
23
23
  key: 0,
24
24
  id: "models"
25
25
  }, {
26
- default: l(() => [
27
- o(e(w), { "aria-labelledby": e(i) }, {
28
- default: l(() => [
29
- o(e(x), null, {
30
- default: l(() => [
31
- o(e(p), {
32
- id: e(i),
26
+ default: o(() => [
27
+ l(e(w), { "aria-labelledby": e(m) }, {
28
+ default: o(() => [
29
+ l(e(E), null, {
30
+ default: o(() => [
31
+ l(e(p), {
32
+ id: e(m),
33
33
  level: 2
34
34
  }, {
35
- default: l(() => u[0] || (u[0] = [
36
- y(" Models ")
35
+ default: o(() => c[0] || (c[0] = [
36
+ B(" Models ")
37
37
  ])),
38
38
  _: 1,
39
39
  __: [0]
@@ -41,37 +41,41 @@ const S = 10, K = /* @__PURE__ */ g({
41
41
  ]),
42
42
  _: 1
43
43
  }),
44
- _("div", {
45
- class: N(["models-list", { "models-list-truncated": !r.value }])
44
+ M("div", {
45
+ class: N(["models-list", { "models-list-truncated": !d.value }])
46
46
  }, [
47
- (a(!0), k(C, null, I(v.value, ({ id: b, name: d, schema: n }) => (a(), m(e(E), {
48
- id: b,
49
- key: d,
47
+ (a(!0), k(C, null, I(g.value, ({ id: v, name: i, schema: n }) => (a(), s(e(O), {
48
+ id: v,
49
+ key: i,
50
50
  class: "models-list-item",
51
- defaultOpen: s.config.expandAllModelSections,
52
- label: d
51
+ defaultOpen: t.config.expandAllModelSections,
52
+ label: i
53
53
  }, {
54
- heading: l(() => [
55
- o(e(p), { level: 3 }, {
56
- default: l(() => [
57
- o(e(V), {
58
- name: n.title ?? d,
54
+ heading: o(() => [
55
+ l(e(p), { level: 3 }, {
56
+ default: o(() => [
57
+ l(e(V), {
58
+ name: n.title ?? i,
59
59
  value: n
60
60
  }, null, 8, ["name", "value"])
61
61
  ]),
62
62
  _: 2
63
63
  }, 1024)
64
64
  ]),
65
- default: l(() => [
66
- o(e(A), null, {
67
- default: l(() => [
68
- o(e(O), {
69
- hideHeading: !0,
70
- hideModelNames: !0,
65
+ default: o(() => [
66
+ l(e(_), null, {
67
+ default: o(() => [
68
+ l(e(P), {
69
+ hideHeading: "",
70
+ hideModelNames: "",
71
71
  level: 1,
72
72
  noncollapsible: "",
73
+ options: {
74
+ orderRequiredPropertiesFirst: t.config.orderRequiredPropertiesFirst,
75
+ orderSchemaPropertiesBy: t.config.orderSchemaPropertiesBy
76
+ },
73
77
  schema: n
74
- }, null, 8, ["schema"])
78
+ }, null, 8, ["options", "schema"])
75
79
  ]),
76
80
  _: 2
77
81
  }, 1024)
@@ -79,7 +83,7 @@ const S = 10, K = /* @__PURE__ */ g({
79
83
  _: 2
80
84
  }, 1032, ["id", "defaultOpen", "label"]))), 128))
81
85
  ], 2),
82
- r.value ? f("", !0) : (a(), m(B, {
86
+ d.value ? f("", !0) : (a(), s(A, {
83
87
  key: 0,
84
88
  id: "models",
85
89
  class: "show-more-models"
@@ -93,5 +97,5 @@ const S = 10, K = /* @__PURE__ */ g({
93
97
  }
94
98
  });
95
99
  export {
96
- K as default
100
+ G as default
97
101
  };
@@ -1,4 +1,5 @@
1
1
  import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ import type { SchemaOptions } from '../../../components/Content/Schema/types';
2
3
  type __VLS_Props = {
3
4
  schema?: SchemaObject;
4
5
  /** Track how deep we've gone */
@@ -10,10 +11,6 @@ type __VLS_Props = {
10
11
  noncollapsible?: boolean;
11
12
  /** Hide the heading */
12
13
  hideHeading?: boolean;
13
- /** Hide read-only properties */
14
- hideReadOnly?: boolean;
15
- /** Hide write-only properties */
16
- hideWriteOnly?: boolean;
17
14
  /** Show a special one way toggle for additional properties, also has a top border when open */
18
15
  additionalProperties?: boolean;
19
16
  /** Hide model names in type display */
@@ -22,6 +19,8 @@ type __VLS_Props = {
22
19
  discriminator?: DiscriminatorObject;
23
20
  /** Breadcrumb for the schema */
24
21
  breadcrumb?: string[];
22
+ /** Move the options into a single prop so they are easy to pass around */
23
+ options: SchemaOptions;
25
24
  };
26
25
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
26
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAoVA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAUrE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,uBAAuB;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gCAAgC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AA8aF,wBAMG"}
1
+ {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAgVA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAQtE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,uBAAuB;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;AAyaF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Schema.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6897f9dc"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-09c7c1bd"]]);
5
5
  export {
6
- c as default
6
+ a as default
7
7
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as N, computed as O, createBlock as d, createCommentVNode as n, openBlock as l, unref as i, withCtx as s, createElementVNode as k, normalizeClass as c, createElementBlock as r, createVNode as o, withDirectives as g, createTextVNode as m, toDisplayString as u, vShow as B, normalizeStyle as H, Fragment as h } from "vue";
2
- import { Disclosure as P, DisclosureButton as S, DisclosurePanel as R } from "@headlessui/vue";
3
- import { ScalarMarkdown as M, ScalarIcon as y } from "@scalar/components";
4
- import C from "../../ScreenReader.vue.js";
5
- import { isTypeObject as w } from "./helpers/is-type-object.js";
6
- import W from "./SchemaHeading.vue.js";
7
- import D from "./SchemaObjectProperties.vue.js";
8
- import z from "./SchemaProperty.vue.js";
9
- const A = {
1
+ import { defineComponent as H, computed as k, createBlock as o, createCommentVNode as t, openBlock as i, unref as l, withCtx as r, createElementVNode as g, normalizeClass as m, createElementBlock as c, createVNode as n, withDirectives as S, createTextVNode as d, toDisplayString as u, vShow as C, normalizeStyle as O, Fragment as h } from "vue";
2
+ import { Disclosure as P, DisclosureButton as N, DisclosurePanel as M } from "@headlessui/vue";
3
+ import { ScalarMarkdown as w, ScalarIcon as p } from "@scalar/components";
4
+ import B from "../../ScreenReader.vue.js";
5
+ import { isTypeObject as D } from "./helpers/is-type-object.js";
6
+ import z from "./SchemaHeading.vue.js";
7
+ import A from "./SchemaObjectProperties.vue.js";
8
+ import V from "./SchemaProperty.vue.js";
9
+ const j = {
10
10
  key: 0,
11
11
  class: "schema-card-description"
12
- }, V = {
12
+ }, T = {
13
13
  key: 0,
14
14
  class: "schema-properties"
15
- }, J = /* @__PURE__ */ N({
15
+ }, K = /* @__PURE__ */ H({
16
16
  __name: "Schema",
17
17
  props: {
18
18
  schema: {},
@@ -21,94 +21,93 @@ const A = {
21
21
  compact: { type: Boolean },
22
22
  noncollapsible: { type: Boolean, default: !1 },
23
23
  hideHeading: { type: Boolean },
24
- hideReadOnly: { type: Boolean },
25
- hideWriteOnly: { type: Boolean },
26
24
  additionalProperties: { type: Boolean },
27
25
  hideModelNames: { type: Boolean, default: !1 },
28
26
  discriminator: {},
29
- breadcrumb: {}
27
+ breadcrumb: {},
28
+ options: {}
30
29
  },
31
30
  setup(a) {
32
- const p = O(() => !a.noncollapsible && a.level > 0), f = O(() => a.schema?.allOf && a.schema.allOf.length > 0 && a.name === "Request Body" ? a.schema.description || a.schema.allOf[0].description : !a.schema?.description || typeof a.schema.description != "string" || a.schema.oneOf || a.schema.anyOf || a.schema.enum || !("properties" in a.schema) && !("patternProperties" in a.schema) && !("additionalProperties" in a.schema) ? null : a.schema.description), v = (e) => a.noncollapsible && e.stopPropagation();
33
- return (e, b) => typeof e.schema == "object" && Object.keys(e.schema).length ? (l(), d(i(P), {
31
+ const f = k(() => !a.noncollapsible && a.level > 0), y = k(() => a.schema?.allOf && a.schema.allOf.length > 0 && a.name === "Request Body" ? a.schema.description || a.schema.allOf[0].description : !a.schema?.description || typeof a.schema.description != "string" || a.schema.oneOf || a.schema.anyOf || a.schema.enum || !("properties" in a.schema) && !("patternProperties" in a.schema) && !("additionalProperties" in a.schema) ? null : a.schema.description), b = (e) => a.noncollapsible && e.stopPropagation();
32
+ return (e, v) => typeof e.schema == "object" && Object.keys(e.schema).length ? (i(), o(l(P), {
34
33
  key: 0,
35
34
  defaultOpen: e.noncollapsible
36
35
  }, {
37
- default: s(({ open: t }) => [
38
- k("div", {
39
- class: c(["schema-card", [
36
+ default: r(({ open: s }) => [
37
+ g("div", {
38
+ class: m(["schema-card", [
40
39
  `schema-card--level-${e.level}`,
41
- { "schema-card--compact": e.compact, "schema-card--open": t },
42
- { "border-t": e.additionalProperties && t }
40
+ { "schema-card--compact": e.compact, "schema-card--open": s },
41
+ { "border-t": e.additionalProperties && s }
43
42
  ]])
44
43
  }, [
45
- f.value ? (l(), r("div", A, [
46
- o(i(M), { value: f.value }, null, 8, ["value"])
47
- ])) : n("", !0),
48
- k("div", {
49
- class: c(["schema-properties", {
50
- "schema-properties-open": t
44
+ y.value ? (i(), c("div", j, [
45
+ n(l(w), { value: y.value }, null, 8, ["value"])
46
+ ])) : t("", !0),
47
+ g("div", {
48
+ class: m(["schema-properties", {
49
+ "schema-properties-open": s
51
50
  }])
52
51
  }, [
53
- e.additionalProperties ? g((l(), r("div", V, [
54
- o(i(S), {
52
+ e.additionalProperties ? S((i(), c("div", T, [
53
+ n(l(N), {
55
54
  as: "button",
56
55
  class: "schema-card-title schema-card-title--compact",
57
- onClickCapture: v
56
+ onClickCapture: b
58
57
  }, {
59
- default: s(() => [
60
- o(i(y), {
58
+ default: r(() => [
59
+ n(l(p), {
61
60
  class: "schema-card-title-icon",
62
61
  icon: "Add",
63
62
  size: "sm"
64
63
  }),
65
- b[0] || (b[0] = m(" Show additional properties ")),
66
- e.name ? (l(), d(C, { key: 0 }, {
67
- default: s(() => [
68
- m("for " + u(e.name), 1)
64
+ v[0] || (v[0] = d(" Show additional properties ")),
65
+ e.name ? (i(), o(B, { key: 0 }, {
66
+ default: r(() => [
67
+ d("for " + u(e.name), 1)
69
68
  ]),
70
69
  _: 1
71
- })) : n("", !0)
70
+ })) : t("", !0)
72
71
  ]),
73
72
  _: 1,
74
73
  __: [0]
75
74
  })
76
75
  ], 512)), [
77
- [B, !t]
78
- ]) : p.value ? g((l(), d(i(S), {
76
+ [C, !s]
77
+ ]) : f.value ? S((i(), o(l(N), {
79
78
  key: 1,
80
79
  as: e.noncollapsible ? "div" : "button",
81
- class: c(["schema-card-title", { "schema-card-title--compact": e.compact }]),
82
- style: H({
80
+ class: m(["schema-card-title", { "schema-card-title--compact": e.compact }]),
81
+ style: O({
83
82
  top: `calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${e.level}))`
84
83
  }),
85
- onClickCapture: v
84
+ onClickCapture: b
86
85
  }, {
87
- default: s(() => [
88
- e.compact ? (l(), r(h, { key: 0 }, [
89
- o(i(y), {
90
- class: c(["schema-card-title-icon", { "schema-card-title-icon--open": t }]),
86
+ default: r(() => [
87
+ e.compact ? (i(), c(h, { key: 0 }, [
88
+ n(l(p), {
89
+ class: m(["schema-card-title-icon", { "schema-card-title-icon--open": s }]),
91
90
  icon: "Add",
92
91
  size: "sm"
93
92
  }, null, 8, ["class"]),
94
- t ? (l(), r(h, { key: 0 }, [
95
- m(" Hide " + u(e.schema?.title ?? "Child Attributes"), 1)
96
- ], 64)) : (l(), r(h, { key: 1 }, [
97
- m(" Show " + u(e.schema?.title ?? "Child Attributes"), 1)
93
+ s ? (i(), c(h, { key: 0 }, [
94
+ d(" Hide " + u(e.schema?.title ?? "Child Attributes"), 1)
95
+ ], 64)) : (i(), c(h, { key: 1 }, [
96
+ d(" Show " + u(e.schema?.title ?? "Child Attributes"), 1)
98
97
  ], 64)),
99
- e.name ? (l(), d(C, { key: 2 }, {
100
- default: s(() => [
101
- m("for " + u(e.name), 1)
98
+ e.name ? (i(), o(B, { key: 2 }, {
99
+ default: r(() => [
100
+ d("for " + u(e.name), 1)
102
101
  ]),
103
102
  _: 1
104
- })) : n("", !0)
105
- ], 64)) : (l(), r(h, { key: 1 }, [
106
- o(i(y), {
107
- class: c(["schema-card-title-icon", { "schema-card-title-icon--open": t }]),
103
+ })) : t("", !0)
104
+ ], 64)) : (i(), c(h, { key: 1 }, [
105
+ n(l(p), {
106
+ class: m(["schema-card-title-icon", { "schema-card-title-icon--open": s }]),
108
107
  icon: "Add",
109
108
  size: "sm"
110
109
  }, null, 8, ["class"]),
111
- o(W, {
110
+ n(z, {
112
111
  name: e.schema?.title ?? e.name,
113
112
  value: e.schema
114
113
  }, null, 8, ["name", "value"])
@@ -116,48 +115,46 @@ const A = {
116
115
  ]),
117
116
  _: 2
118
117
  }, 1032, ["as", "class", "style"])), [
119
- [B, !e.hideHeading && !(e.noncollapsible && e.compact)]
120
- ]) : n("", !0),
121
- !e.additionalProperties || t ? (l(), d(i(R), {
118
+ [C, !e.hideHeading && !(e.noncollapsible && e.compact)]
119
+ ]) : t("", !0),
120
+ !e.additionalProperties || s ? (i(), o(l(M), {
122
121
  key: 2,
123
122
  as: "ul",
124
- static: !p.value
123
+ static: !f.value
125
124
  }, {
126
- default: s(() => [
127
- i(w)(e.schema) ? (l(), d(D, {
125
+ default: r(() => [
126
+ l(D)(e.schema) ? (i(), o(A, {
128
127
  key: 0,
129
128
  breadcrumb: e.breadcrumb,
130
129
  compact: e.compact,
131
130
  discriminator: e.discriminator,
132
131
  hideHeading: e.hideHeading,
133
132
  hideModelNames: e.hideModelNames,
134
- hideReadOnly: e.hideReadOnly,
135
- hideWriteOnly: e.hideWriteOnly,
136
133
  level: e.level + 1,
134
+ options: e.options,
137
135
  schema: e.schema
138
- }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "schema"])) : (l(), r(h, { key: 1 }, [
139
- e.schema ? (l(), d(z, {
136
+ }, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "level", "options", "schema"])) : (i(), c(h, { key: 1 }, [
137
+ e.schema ? (i(), o(V, {
140
138
  key: 0,
141
139
  breadcrumb: e.breadcrumb,
142
140
  compact: e.compact,
143
141
  hideHeading: e.hideHeading,
144
142
  hideModelNames: e.hideModelNames,
145
- hideReadOnly: e.hideReadOnly,
146
- hideWriteOnly: e.hideWriteOnly,
147
143
  level: e.level,
148
- value: e.schema
149
- }, null, 8, ["breadcrumb", "compact", "hideHeading", "hideModelNames", "hideReadOnly", "hideWriteOnly", "level", "value"])) : n("", !0)
144
+ options: e.options,
145
+ schema: e.schema
146
+ }, null, 8, ["breadcrumb", "compact", "hideHeading", "hideModelNames", "level", "options", "schema"])) : t("", !0)
150
147
  ], 64))
151
148
  ]),
152
149
  _: 1
153
- }, 8, ["static"])) : n("", !0)
150
+ }, 8, ["static"])) : t("", !0)
154
151
  ], 2)
155
152
  ], 2)
156
153
  ]),
157
154
  _: 1
158
- }, 8, ["defaultOpen"])) : n("", !0);
155
+ }, 8, ["defaultOpen"])) : t("", !0);
159
156
  }
160
157
  });
161
158
  export {
162
- J as default
159
+ K as default
163
160
  };