@scalar/api-reference 1.28.9 → 1.28.10

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 (29) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/browser/standalone.js +1191 -1149
  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/Models/Models.vue.d.ts.map +1 -1
  7. package/dist/components/Content/Models/Models.vue.js +2 -2
  8. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  9. package/dist/components/Content/Schema/Schema.vue.js +4 -4
  10. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  12. package/dist/components/Content/Schema/SchemaProperty.vue2.js +96 -114
  13. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +8 -0
  14. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -0
  15. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +7 -0
  16. package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +71 -0
  17. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +2 -0
  18. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  20. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +139 -130
  21. package/dist/features/ApiClientModal/useApiClient.d.ts +40 -14
  22. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  23. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
  24. package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
  25. package/dist/features/ExampleResponses/ExampleResponses.vue2.js +86 -85
  26. package/dist/helpers/get-request.d.ts.map +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/style.css +1 -1
  29. package/package.json +7 -7
@@ -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-afcca023"]]);
5
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-10b0cc23"]]);
6
6
  export {
7
- c as default
7
+ m as default
8
8
  };
@@ -124,7 +124,7 @@ const Ge = ["innerHTML"], We = { class: "references-header" }, je = ["aria-label
124
124
  return e && T.importSpecFile(e, "default", {
125
125
  shouldLoad: !1,
126
126
  documentUrl: (a = t.value.spec) == null ? void 0 : a.url,
127
- setCollectionSecurity: !0,
127
+ useCollectionSecurity: !0,
128
128
  ...t.value
129
129
  });
130
130
  },
@@ -1 +1 @@
1
- {"version":3,"file":"Models.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Models.vue"],"names":[],"mappings":"AAmHA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAiB9E,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;AAoMF,wBAMG"}
1
+ {"version":3,"file":"Models.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Models.vue"],"names":[],"mappings":"AAuHA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAiB9E,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;AAqMF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Models.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-066d8dc3"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f1f02ced"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AA2TA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQ9E,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EACF,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,YAAY,GACtB,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,CAAA;IACpC,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,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;WAbQ,MAAM;;AAgUlB,wBAOG"}
1
+ {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAyTA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQ9E,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EACF,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,YAAY,GACtB,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,CAAA;IACpC,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,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;WAbQ,MAAM;;AAgUlB,wBAOG"}
@@ -1,7 +1,7 @@
1
- import a from "./Schema.vue2.js";
1
+ import o from "./Schema.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ o(a, [["__scopeId", "data-v-cab606aa"]]);
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2fcc287f"]]);
5
5
  export {
6
- c as default
6
+ r as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAwhBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAe9E;;;;;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;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AAkf1B,0BAQG"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAieA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAc9E;;;;;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;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AAic1B,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-46e92dc2"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3431ec35"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,39 +1,32 @@
1
- import { defineComponent as X, computed as y, openBlock as l, createElementBlock as o, normalizeClass as U, createBlock as k, createSlots as Y, withCtx as f, createTextVNode as B, toDisplayString as i, createCommentVNode as a, createVNode as p, unref as n, createElementVNode as u, Fragment as c, renderList as h } from "vue";
2
- import { Disclosure as ee, DisclosurePanel as te, DisclosureButton as le } from "@headlessui/vue";
3
- import { ScalarMarkdown as S, ScalarIcon as se } from "@scalar/components";
4
- import { formatExample as oe } from "./helpers/formatExample.js";
5
- import { optimizeValueForDisplay as re, discriminators as Z } from "./helpers/optimizeValueForDisplay.js";
6
- import M from "./Schema.vue.js";
7
- import $ from "./SchemaDiscriminator.vue.js";
8
- import ne from "./SchemaPropertyHeading.vue.js";
9
- const ae = {
1
+ import { defineComponent as $, computed as u, openBlock as r, createElementBlock as o, normalizeClass as z, createBlock as v, createSlots as G, withCtx as y, createTextVNode as B, toDisplayString as d, createCommentVNode as l, createVNode as s, unref as a, Fragment as c, renderList as k, createElementVNode as S } from "vue";
2
+ import { Disclosure as J, DisclosurePanel as K, DisclosureButton as Q } from "@headlessui/vue";
3
+ import { ScalarMarkdown as D, ScalarIcon as W } from "@scalar/components";
4
+ import { optimizeValueForDisplay as X, discriminators as I } from "./helpers/optimizeValueForDisplay.js";
5
+ import L from "./Schema.vue.js";
6
+ import O from "./SchemaDiscriminator.vue.js";
7
+ import Y from "./SchemaPropertyHeading.vue.js";
8
+ const x = {
10
9
  key: 1,
11
10
  class: "property-description"
12
- }, ie = {
11
+ }, ee = {
13
12
  key: 2,
14
13
  class: "property-description"
15
- }, pe = {
14
+ }, te = {
16
15
  key: 3,
17
- class: "property-example custom-scroll"
18
- }, me = { class: "property-example-value" }, ce = {
19
- key: 4,
20
- class: "property-example custom-scroll"
21
- }, de = { class: "property-example-label" }, ue = {
22
- key: 5,
23
16
  class: "property-enum"
24
- }, ye = {
17
+ }, ne = {
25
18
  key: 0,
26
19
  class: "property-list"
27
- }, fe = { class: "property-heading" }, he = { class: "property-name" }, ve = { class: "property-description" }, ge = {
20
+ }, re = { class: "property-heading" }, ie = { class: "property-name" }, oe = { class: "property-description" }, le = {
28
21
  key: 1,
29
22
  class: "property-enum-values"
30
- }, be = {
31
- key: 6,
23
+ }, se = {
24
+ key: 4,
32
25
  class: "children"
33
- }, ke = {
26
+ }, ae = {
34
27
  key: 0,
35
28
  class: "children"
36
- }, Pe = /* @__PURE__ */ X({
29
+ }, he = /* @__PURE__ */ $({
37
30
  __name: "SchemaProperty",
38
31
  props: {
39
32
  value: {},
@@ -48,8 +41,8 @@ const ae = {
48
41
  schemas: {},
49
42
  hideHeading: { type: Boolean }
50
43
  },
51
- setup(G) {
52
- const J = G, j = {
44
+ setup(R) {
45
+ const T = R, H = {
53
46
  integer: {
54
47
  _default: "Integer numbers.",
55
48
  int32: "Signed 32-bit integers (commonly used integer type).",
@@ -62,162 +55,151 @@ const ae = {
62
55
  byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
63
56
  binary: "binary data, used to describe files"
64
57
  }
65
- }, E = (e, s) => s != null && s.properties || s != null && s.additionalProperties || s != null && s.patternProperties || s != null && s.allOf ? null : e || (s == null ? void 0 : s.description) || null, D = (e) => !e || !j[e.type] ? null : j[e.type][e.format || "_default"], d = (e) => {
66
- var s;
67
- return (e == null ? void 0 : e.enum) || ((s = e == null ? void 0 : e.items) == null ? void 0 : s.enum) || [];
68
- }, H = y(
69
- () => d(t.value).length > 9
70
- ), _ = y(() => H.value ? 5 : 9), K = y(
71
- () => d(t.value).slice(0, _.value)
72
- ), Q = y(
73
- () => d(t.value).slice(_.value)
74
- ), t = y(() => re(J.value)), w = Z.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), W = (e, s, v, g, b) => s || v || 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) || b;
75
- return (e, s) => {
76
- var v, g, b, P, C, q, x, A, F, N, O, V, z, I, L, T;
77
- return l(), o("li", {
78
- class: U(["property", [
79
- (E(e.description, t.value), ""),
58
+ }, b = (e, n) => n != null && n.properties || n != null && n.additionalProperties || n != null && n.patternProperties || n != null && n.allOf ? null : e || (n == null ? void 0 : n.description) || null, E = (e) => !e || !H[e.type] ? null : H[e.type][e.format || "_default"], p = (e) => {
59
+ var n;
60
+ return (e == null ? void 0 : e.enum) || ((n = e == null ? void 0 : e.items) == null ? void 0 : n.enum) || [];
61
+ }, P = u(
62
+ () => p(t.value).length > 9
63
+ ), w = u(() => P.value ? 5 : 9), U = u(
64
+ () => p(t.value).slice(0, w.value)
65
+ ), Z = u(
66
+ () => p(t.value).slice(w.value)
67
+ ), t = u(() => X(T.value));
68
+ 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);
69
+ const M = (e, n, f, h, g) => n || f || h || (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) || g;
70
+ return (e, n) => {
71
+ var f, h, g, C, j, q, A, F, N, V;
72
+ return r(), o("li", {
73
+ class: z(["property", [
74
+ (b(e.description, t.value), ""),
80
75
  `property--level-${e.level}`,
81
76
  {
82
77
  "property--compact": e.compact,
83
- "property--deprecated": (v = t.value) == null ? void 0 : v.deprecated
78
+ "property--deprecated": (f = t.value) == null ? void 0 : f.deprecated
84
79
  }
85
80
  ]])
86
81
  }, [
87
- W(
82
+ M(
88
83
  t.value,
89
84
  e.name,
90
85
  e.additional,
91
86
  e.pattern,
92
87
  e.required
93
- ) ? (l(), k(ne, {
88
+ ) ? (r(), v(Y, {
94
89
  key: 0,
95
90
  additional: e.additional,
96
- enum: d(t.value).length > 0,
91
+ enum: p(t.value).length > 0,
97
92
  pattern: e.pattern,
98
93
  required: e.required,
99
94
  value: t.value
100
- }, Y({ _: 2 }, [
95
+ }, G({ _: 2 }, [
101
96
  e.name ? {
102
97
  name: "name",
103
- fn: f(() => [
104
- B(i(e.name), 1)
98
+ fn: y(() => [
99
+ B(d(e.name), 1)
105
100
  ]),
106
101
  key: "0"
107
102
  } : void 0,
108
- (g = t.value) != null && g.example ? {
103
+ (h = t.value) != null && h.example ? {
109
104
  name: "example",
110
- fn: f(() => [
111
- B(" Example: " + i(t.value.example), 1)
105
+ fn: y(() => [
106
+ B(" Example: " + d(t.value.example), 1)
112
107
  ]),
113
108
  key: "1"
114
109
  } : void 0
115
- ]), 1032, ["additional", "enum", "pattern", "required", "value"])) : a("", !0),
116
- E(e.description, t.value) ? (l(), o("div", ae, [
117
- p(n(S), {
118
- value: E(e.description, t.value)
110
+ ]), 1032, ["additional", "enum", "pattern", "required", "value"])) : l("", !0),
111
+ b(e.description, t.value) ? (r(), o("div", x, [
112
+ s(a(D), {
113
+ value: b(e.description, t.value)
119
114
  }, null, 8, ["value"])
120
- ])) : D(t.value) ? (l(), o("div", ie, [
121
- p(n(S), {
122
- value: D(t.value) || ""
115
+ ])) : E(t.value) ? (r(), o("div", ee, [
116
+ s(a(D), {
117
+ value: E(t.value) || ""
123
118
  }, null, 8, ["value"])
124
- ])) : a("", !0),
125
- e.withExamples && ((b = t.value) != null && b.example || (C = (P = t.value) == null ? void 0 : P.items) != null && C.example) ? (l(), o("div", pe, [
126
- s[0] || (s[0] = u("span", { class: "property-example-label" }, "Example", -1)),
127
- u("code", me, i(n(oe)(
128
- ((q = t.value) == null ? void 0 : q.example) || n(w) && ((x = t.value) == null ? void 0 : x.items) && typeof t.value.items == "object" && t.value.items[n(w)]
129
- )), 1)
130
- ])) : a("", !0),
131
- (A = t.value) != null && A.examples && typeof t.value.examples == "object" && Object.keys(t.value.examples).length > 0 ? (l(), o("div", ce, [
132
- u("span", de, i(Object.keys(t.value.examples).length === 1 ? "Example" : "Examples"), 1),
133
- (l(!0), o(c, null, h(t.value.examples, (r, m) => (l(), o("code", {
134
- key: m,
135
- class: "property-example-value"
136
- }, i(r), 1))), 128))
137
- ])) : a("", !0),
138
- ((F = d(t.value)) == null ? void 0 : F.length) > 0 ? (l(), o("div", ue, [
139
- Array.isArray((N = t.value) == null ? void 0 : N["x-enumDescriptions"]) ? (l(), o("div", ye, [
140
- (l(!0), o(c, null, h(d(t.value), (r) => (l(), o("div", {
141
- key: r,
119
+ ])) : l("", !0),
120
+ ((g = p(t.value)) == null ? void 0 : g.length) > 0 ? (r(), o("div", te, [
121
+ Array.isArray((C = t.value) == null ? void 0 : C["x-enumDescriptions"]) ? (r(), o("div", ne, [
122
+ (r(!0), o(c, null, k(p(t.value), (i) => (r(), o("div", {
123
+ key: i,
142
124
  class: "property"
143
125
  }, [
144
- u("div", fe, [
145
- u("div", he, i(r), 1)
126
+ S("div", re, [
127
+ S("div", ie, d(i), 1)
146
128
  ]),
147
- u("div", ve, [
148
- p(n(S), {
149
- value: t.value["x-enumDescriptions"][r]
129
+ S("div", oe, [
130
+ s(a(D), {
131
+ value: t.value["x-enumDescriptions"][i]
150
132
  }, null, 8, ["value"])
151
133
  ])
152
134
  ]))), 128))
153
- ])) : (l(), o("ul", ge, [
154
- (l(!0), o(c, null, h(K.value, (r) => (l(), o("li", {
155
- key: r,
135
+ ])) : (r(), o("ul", le, [
136
+ (r(!0), o(c, null, k(U.value, (i) => (r(), o("li", {
137
+ key: i,
156
138
  class: "property-enum-value"
157
- }, i(r), 1))), 128)),
158
- H.value ? (l(), k(n(ee), { key: 0 }, {
159
- default: f(({ open: r }) => [
160
- p(n(te), null, {
161
- default: f(() => [
162
- (l(!0), o(c, null, h(Q.value, (m) => (l(), o("li", {
139
+ }, d(i), 1))), 128)),
140
+ P.value ? (r(), v(a(J), { key: 0 }, {
141
+ default: y(({ open: i }) => [
142
+ s(a(K), null, {
143
+ default: y(() => [
144
+ (r(!0), o(c, null, k(Z.value, (m) => (r(), o("li", {
163
145
  key: m,
164
146
  class: "property-enum-value"
165
- }, i(m), 1))), 128))
147
+ }, d(m), 1))), 128))
166
148
  ]),
167
149
  _: 1
168
150
  }),
169
- p(n(le), { class: "enum-toggle-button" }, {
170
- default: f(() => [
171
- p(n(se), {
172
- class: U(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": r }]),
151
+ s(a(Q), { class: "enum-toggle-button" }, {
152
+ default: y(() => [
153
+ s(a(W), {
154
+ class: z(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": i }]),
173
155
  icon: "Add",
174
156
  size: "sm"
175
157
  }, null, 8, ["class"]),
176
- B(" " + i(r ? "Hide values" : "Show all values"), 1)
158
+ B(" " + d(i ? "Hide values" : "Show all values"), 1)
177
159
  ]),
178
160
  _: 2
179
161
  }, 1024)
180
162
  ]),
181
163
  _: 1
182
- })) : a("", !0)
164
+ })) : l("", !0)
183
165
  ]))
184
- ])) : a("", !0),
185
- ((O = t.value) == null ? void 0 : O.type) === "object" && ((V = t.value) != null && V.properties || (z = t.value) != null && z.additionalProperties) ? (l(), o("div", be, [
186
- p(M, {
166
+ ])) : l("", !0),
167
+ ((j = t.value) == null ? void 0 : j.type) === "object" && ((q = t.value) != null && q.properties || (A = t.value) != null && A.additionalProperties) ? (r(), o("div", se, [
168
+ s(L, {
187
169
  compact: e.compact,
188
170
  level: e.level + 1,
189
171
  value: t.value
190
172
  }, null, 8, ["compact", "level", "value"])
191
- ])) : a("", !0),
192
- (I = t.value) != null && I.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (l(), o(c, { key: 7 }, [
193
- ["object"].includes((T = (L = t.value) == null ? void 0 : L.items) == null ? void 0 : T.type) ? (l(), o("div", ke, [
194
- p(M, {
173
+ ])) : l("", !0),
174
+ (F = t.value) != null && F.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (r(), o(c, { key: 5 }, [
175
+ ["object"].includes((V = (N = t.value) == null ? void 0 : N.items) == null ? void 0 : V.type) ? (r(), o("div", ae, [
176
+ s(L, {
195
177
  compact: e.compact,
196
178
  level: e.level + 1,
197
179
  value: t.value.items
198
180
  }, null, 8, ["compact", "level", "value"])
199
- ])) : a("", !0)
200
- ], 64)) : a("", !0),
201
- (l(!0), o(c, null, h(n(Z), (r) => {
202
- var m, R;
203
- return l(), o(c, { key: r }, [
204
- (m = t.value) != null && m[r] ? (l(), k($, {
181
+ ])) : l("", !0)
182
+ ], 64)) : l("", !0),
183
+ (r(!0), o(c, null, k(a(I), (i) => {
184
+ var m, _;
185
+ return r(), o(c, { key: i }, [
186
+ (m = t.value) != null && m[i] ? (r(), v(O, {
205
187
  key: 0,
206
188
  compact: e.compact,
207
- discriminator: r,
189
+ discriminator: i,
208
190
  hideHeading: e.hideHeading,
209
191
  level: e.level,
210
192
  schemas: e.schemas,
211
193
  value: t.value
212
- }, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : (R = t.value) != null && R.items && typeof r == "string" && typeof t.value.items == "object" && r in t.value.items && Array.isArray(t.value.items[r]) && e.level < 3 ? (l(), k($, {
194
+ }, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : (_ = t.value) != null && _.items && typeof i == "string" && typeof t.value.items == "object" && i in t.value.items && Array.isArray(t.value.items[i]) && e.level < 3 ? (r(), v(O, {
213
195
  key: 1,
214
196
  compact: e.compact,
215
- discriminator: r,
197
+ discriminator: i,
216
198
  hideHeading: e.hideHeading,
217
199
  level: e.level,
218
200
  schemas: e.schemas,
219
201
  value: t.value.items
220
- }, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : a("", !0)
202
+ }, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : l("", !0)
221
203
  ], 64);
222
204
  }), 128))
223
205
  ], 2);
@@ -225,5 +207,5 @@ const ae = {
225
207
  }
226
208
  });
227
209
  export {
228
- Pe as default
210
+ he as default
229
211
  };
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ examples?: Record<string, unknown>;
3
+ example?: unknown;
4
+ discriminatorType?: string;
5
+ };
6
+ 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>;
7
+ export default _default;
8
+ //# sourceMappingURL=SchemaPropertyExamples.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaPropertyExamples.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyExamples.vue"],"names":[],"mappings":"AA2JA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAC;;AA4IF,wBAMG"}
@@ -0,0 +1,7 @@
1
+ import o from "./SchemaPropertyExamples.vue2.js";
2
+ /* empty css */
3
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-d7f5eefa"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,71 @@
1
+ import { defineComponent as y, openBlock as l, createElementBlock as p, Fragment as i, createElementVNode as e, unref as o, toDisplayString as n, createVNode as u, createCommentVNode as c, renderList as b } from "vue";
2
+ import { ScalarIcon as x } from "@scalar/components";
3
+ import { useClipboard as v } from "@scalar/use-hooks/useClipboard";
4
+ import { formatExample as s } from "./helpers/formatExample.js";
5
+ const f = {
6
+ key: 0,
7
+ class: "property-example"
8
+ }, g = { class: "property-example-value-list" }, h = {
9
+ key: 1,
10
+ class: "property-example"
11
+ }, k = {
12
+ type: "button",
13
+ class: "property-example-label"
14
+ }, C = { class: "property-example-value-list" }, _ = ["onClick"], z = /* @__PURE__ */ y({
15
+ __name: "SchemaPropertyExamples",
16
+ props: {
17
+ examples: {},
18
+ example: {},
19
+ discriminatorType: {}
20
+ },
21
+ setup(E) {
22
+ const { copyToClipboard: m } = v();
23
+ return (t, r) => (l(), p(i, null, [
24
+ t.example ? (l(), p("div", f, [
25
+ r[1] || (r[1] = e("button", {
26
+ type: "button",
27
+ class: "property-example-label"
28
+ }, [
29
+ e("span", null, "Example")
30
+ ], -1)),
31
+ e("div", g, [
32
+ e("button", {
33
+ type: "button",
34
+ class: "property-example-value group",
35
+ onClick: r[0] || (r[0] = (a) => o(m)(String(o(s)(t.example))))
36
+ }, [
37
+ e("span", null, n(o(s)(t.example)), 1),
38
+ u(o(x), {
39
+ icon: "Clipboard",
40
+ size: "xs",
41
+ class: "group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3"
42
+ })
43
+ ])
44
+ ])
45
+ ])) : c("", !0),
46
+ t.examples && typeof t.examples == "object" && Object.keys(t.examples).length > 0 ? (l(), p("div", h, [
47
+ e("button", k, [
48
+ e("span", null, n(Object.keys(t.examples).length === 1 ? "Example" : "Examples"), 1)
49
+ ]),
50
+ e("div", C, [
51
+ (l(!0), p(i, null, b(t.examples, (a, d) => (l(), p("button", {
52
+ type: "button",
53
+ key: d,
54
+ class: "property-example-value group",
55
+ onClick: (S) => o(m)(String(o(s)(a)))
56
+ }, [
57
+ e("span", null, n(o(s)(a)), 1),
58
+ u(o(x), {
59
+ icon: "Clipboard",
60
+ size: "xs",
61
+ class: "text-c-3 group-hover:text-c-1 ml-auto min-h-3 min-w-3"
62
+ })
63
+ ], 8, _))), 128))
64
+ ])
65
+ ])) : c("", !0)
66
+ ], 64));
67
+ }
68
+ });
69
+ export {
70
+ z as default
71
+ };
@@ -4,6 +4,7 @@ type __VLS_Props = {
4
4
  required?: boolean;
5
5
  additional?: boolean;
6
6
  pattern?: boolean;
7
+ withExamples?: boolean;
7
8
  };
8
9
  declare function __VLS_template(): {
9
10
  attrs: Partial<{}>;
@@ -17,6 +18,7 @@ declare function __VLS_template(): {
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
19
20
  required: boolean;
21
+ withExamples: boolean;
20
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
21
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
24
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAyOA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AAwBJ,iBAAS,cAAc;WAuTT,OAAO,IAA6B;;sBATxB,GAAG;sBACH,GAAG;;;;EAa5B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cArWN,OAAO;wFA6WpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAkQA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAuCJ,iBAAS,cAAc;WA+TT,OAAO,IAA6B;;sBATxB,GAAG;sBACH,GAAG;;;;EAa5B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cA/XN,OAAO;kBAGH,OAAO;wFAoYxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaPropertyHeading.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7956666a"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-eb77468c"]]);
5
5
  export {
6
6
  m as default
7
7
  };