@scalar/api-reference 1.25.101 → 1.25.103

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 (38) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/browser/standalone.js +7267 -7225
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -0
  5. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  6. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  7. package/dist/components/Content/Schema/SchemaProperty.vue2.js +63 -61
  8. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +2 -3
  9. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
  11. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +162 -170
  12. package/dist/components/Content/Schema/helpers/formatExample.d.ts +5 -0
  13. package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +1 -0
  14. package/dist/components/Content/Schema/helpers/formatExample.js +6 -0
  15. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Tag/Tag.vue.js +1 -1
  17. package/dist/components/Content/Tag/Tag.vue2.js +39 -37
  18. package/dist/features/ApiClientModal/useApiClient.d.ts +20 -20
  19. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  20. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  21. package/dist/features/Operation/components/OperationParameters.vue.js +26 -18
  22. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  23. package/dist/features/Operation/components/OperationResponses.vue.js +8 -7
  24. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -0
  25. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  26. package/dist/features/Operation/components/ParameterList.vue.js +2 -2
  27. package/dist/features/Operation/components/ParameterList.vue2.js +18 -16
  28. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -0
  29. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  30. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  31. package/dist/features/Operation/components/ParameterListItem.vue2.js +27 -25
  32. package/dist/helpers/get-request.d.ts.map +1 -1
  33. package/dist/hooks/useOperation.d.ts +1 -0
  34. package/dist/hooks/useOperation.d.ts.map +1 -1
  35. package/dist/hooks/useOperation.js +12 -11
  36. package/dist/index.js +1 -1
  37. package/dist/style.css +1 -1
  38. package/package.json +10 -10
@@ -6,11 +6,13 @@ type __VLS_Props = {
6
6
  compact?: boolean;
7
7
  description?: string;
8
8
  additional?: boolean;
9
+ withExamples?: boolean;
9
10
  };
10
11
  declare const _default_1: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
12
  required: boolean;
12
13
  level: number;
13
14
  compact: boolean;
15
+ withExamples: boolean;
14
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
15
17
  export default _default_1;
16
18
  //# sourceMappingURL=SchemaProperty.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AA+aA,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;CACrB,CAAC;;cAJW,OAAO;WAFV,MAAM;aAGJ,OAAO;;AAuYrB,0BAQG"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAibA,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,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;cALW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAGF,OAAO;;AAwY1B,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-c75bd9a9"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-32801e8b"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,42 +1,43 @@
1
- import { defineComponent as Q, computed as y, openBlock as l, createElementBlock as t, normalizeClass as M, createVNode as n, createSlots as W, withCtx as v, createTextVNode as b, toDisplayString as r, unref as p, createCommentVNode as s, createElementVNode as c, Fragment as i, renderList as d, createBlock as E } from "vue";
2
- import { Disclosure as X, DisclosurePanel as Y, DisclosureButton as _ } from "@headlessui/vue";
3
- import { ScalarMarkdown as S, ScalarIcon as x } from "@scalar/components";
1
+ import { defineComponent as Q, computed as y, openBlock as l, createElementBlock as t, normalizeClass as M, createVNode as n, createSlots as W, withCtx as v, createTextVNode as b, toDisplayString as r, unref as u, createCommentVNode as s, createElementVNode as c, Fragment as i, renderList as m, createBlock as E } from "vue";
2
+ import { formatExample as X } from "./helpers/formatExample.js";
3
+ import { Disclosure as Y, DisclosurePanel as _, DisclosureButton as x } from "@headlessui/vue";
4
+ import { ScalarMarkdown as S, ScalarIcon as ee } from "@scalar/components";
4
5
  import f from "./Schema.vue.js";
5
- import ee from "./SchemaPropertyHeading.vue.js";
6
- const le = {
6
+ import le from "./SchemaPropertyHeading.vue.js";
7
+ const te = {
7
8
  key: 0,
8
9
  class: "property-description"
9
- }, te = {
10
+ }, ae = {
10
11
  key: 1,
11
12
  class: "property-description"
12
- }, ae = {
13
+ }, oe = {
13
14
  key: 2,
14
15
  class: "property-example custom-scroll"
15
- }, oe = { class: "property-example-value" }, se = {
16
+ }, se = { class: "property-example-value" }, ne = {
16
17
  key: 3,
17
18
  class: "property-example custom-scroll"
18
- }, ne = { class: "property-example-label" }, re = {
19
+ }, re = { class: "property-example-label" }, ie = {
19
20
  key: 4,
20
21
  class: "property-enum"
21
- }, ie = {
22
+ }, ue = {
22
23
  key: 0,
23
24
  class: "property-list"
24
- }, ue = { class: "property-heading" }, pe = { class: "property-name" }, de = { class: "property-description" }, me = {
25
+ }, pe = { class: "property-heading" }, me = { class: "property-name" }, de = { class: "property-description" }, ce = {
25
26
  key: 1,
26
27
  class: "property-enum-values"
27
- }, ce = {
28
+ }, ve = {
28
29
  key: 5,
29
30
  class: "children"
30
- }, ve = {
31
+ }, ye = {
31
32
  key: 0,
32
33
  class: "children"
33
- }, ye = {
34
+ }, fe = {
34
35
  key: 0,
35
36
  class: "property-rule"
36
- }, fe = {
37
+ }, he = {
37
38
  key: 1,
38
39
  class: "property-rule"
39
- }, Se = /* @__PURE__ */ Q({
40
+ }, De = /* @__PURE__ */ Q({
40
41
  __name: "SchemaProperty",
41
42
  props: {
42
43
  value: {},
@@ -45,7 +46,8 @@ const le = {
45
46
  required: { type: Boolean, default: !1 },
46
47
  compact: { type: Boolean, default: !1 },
47
48
  description: {},
48
- additional: { type: Boolean }
49
+ additional: { type: Boolean },
50
+ withExamples: { type: Boolean, default: !0 }
49
51
  },
50
52
  setup($) {
51
53
  const h = $, B = {
@@ -63,30 +65,30 @@ const le = {
63
65
  }
64
66
  }, D = function(e, o) {
65
67
  return o != null && o.properties || o != null && o.additionalProperties ? null : e || (o == null ? void 0 : o.description) || null;
66
- }, C = function(e) {
68
+ }, w = function(e) {
67
69
  return !e || !B[e.type] ? null : B[e.type][e.format || "_default"];
68
- }, m = function(e) {
70
+ }, d = function(e) {
69
71
  var o;
70
72
  return (e == null ? void 0 : e.enum) || ((o = e == null ? void 0 : e.items) == null ? void 0 : o.enum) || [];
71
- }, G = ["oneOf", "anyOf", "allOf", "not"], P = y(() => m(h.value).length > 9), j = y(() => P.value ? 5 : 9), J = y(
72
- () => m(h.value).slice(0, j.value)
73
+ }, G = ["oneOf", "anyOf", "allOf", "not"], C = y(() => d(h.value).length > 9), P = y(() => C.value ? 5 : 9), J = y(
74
+ () => d(h.value).slice(0, P.value)
73
75
  ), K = y(
74
- () => m(h.value).slice(j.value)
76
+ () => d(h.value).slice(P.value)
75
77
  );
76
78
  return (e, o) => {
77
- var w, N, O, q, F, I, L, V, z, H, R, T, U;
79
+ var j, N, O, q, F, I, L, V, z, H, R, T, U;
78
80
  return l(), t("div", {
79
81
  class: M(["property", [
80
82
  `property--level-${e.level}`,
81
83
  {
82
84
  "property--compact": e.compact,
83
- "property--deprecated": (w = e.value) == null ? void 0 : w.deprecated
85
+ "property--deprecated": (j = e.value) == null ? void 0 : j.deprecated
84
86
  }
85
87
  ]])
86
88
  }, [
87
- n(ee, {
89
+ n(le, {
88
90
  additional: e.additional,
89
- enum: m(e.value).length > 1,
91
+ enum: d(e.value).length > 0,
90
92
  required: e.required,
91
93
  value: e.value
92
94
  }, W({ _: 2 }, [
@@ -105,60 +107,60 @@ const le = {
105
107
  key: "1"
106
108
  } : void 0
107
109
  ]), 1032, ["additional", "enum", "required", "value"]),
108
- D(e.description, e.value) ? (l(), t("div", le, [
109
- n(p(S), {
110
+ D(e.description, e.value) ? (l(), t("div", te, [
111
+ n(u(S), {
110
112
  value: D(e.description, e.value)
111
113
  }, null, 8, ["value"])
112
- ])) : C(e.value) ? (l(), t("div", te, [
113
- n(p(S), {
114
- value: C(e.value) || ""
114
+ ])) : w(e.value) ? (l(), t("div", ae, [
115
+ n(u(S), {
116
+ value: w(e.value) || ""
115
117
  }, null, 8, ["value"])
116
118
  ])) : s("", !0),
117
- (O = e.value) != null && O.example || (F = (q = e.value) == null ? void 0 : q.items) != null && F.example ? (l(), t("div", ae, [
119
+ e.withExamples && ((O = e.value) != null && O.example || (F = (q = e.value) == null ? void 0 : q.items) != null && F.example) ? (l(), t("div", oe, [
118
120
  o[0] || (o[0] = c("span", { class: "property-example-label" }, "Example", -1)),
119
- c("code", oe, r(e.value.example || ((I = e.value) == null ? void 0 : I.items.example)), 1)
121
+ c("code", se, r(u(X)(e.value.example || ((I = e.value) == null ? void 0 : I.items.example))), 1)
120
122
  ])) : s("", !0),
121
- (L = e.value) != null && L.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), t("div", se, [
122
- c("span", ne, r(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
123
- (l(!0), t(i, null, d(e.value.examples, (a, u) => (l(), t("code", {
124
- key: u,
123
+ (L = e.value) != null && L.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), t("div", ne, [
124
+ c("span", re, r(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
125
+ (l(!0), t(i, null, m(e.value.examples, (a, p) => (l(), t("code", {
126
+ key: p,
125
127
  class: "property-example-value"
126
128
  }, r(a), 1))), 128))
127
129
  ])) : s("", !0),
128
- ((V = m(e.value)) == null ? void 0 : V.length) > 1 ? (l(), t("div", re, [
129
- (z = e.value) != null && z["x-enumDescriptions"] ? (l(), t("div", ie, [
130
- (l(!0), t(i, null, d(m(e.value), (a) => (l(), t("div", {
130
+ ((V = d(e.value)) == null ? void 0 : V.length) > 0 ? (l(), t("div", ie, [
131
+ (z = e.value) != null && z["x-enumDescriptions"] ? (l(), t("div", ue, [
132
+ (l(!0), t(i, null, m(d(e.value), (a) => (l(), t("div", {
131
133
  key: a,
132
134
  class: "property"
133
135
  }, [
134
- c("div", ue, [
135
- c("div", pe, r(a), 1)
136
+ c("div", pe, [
137
+ c("div", me, r(a), 1)
136
138
  ]),
137
139
  c("div", de, [
138
- n(p(S), {
140
+ n(u(S), {
139
141
  value: e.value["x-enumDescriptions"][a]
140
142
  }, null, 8, ["value"])
141
143
  ])
142
144
  ]))), 128))
143
- ])) : (l(), t("ul", me, [
144
- (l(!0), t(i, null, d(J.value, (a) => (l(), t("li", {
145
+ ])) : (l(), t("ul", ce, [
146
+ (l(!0), t(i, null, m(J.value, (a) => (l(), t("li", {
145
147
  key: a,
146
148
  class: "property-enum-value"
147
149
  }, r(a), 1))), 128)),
148
- P.value ? (l(), E(p(X), { key: 0 }, {
150
+ C.value ? (l(), E(u(Y), { key: 0 }, {
149
151
  default: v(({ open: a }) => [
150
- n(p(Y), null, {
152
+ n(u(_), null, {
151
153
  default: v(() => [
152
- (l(!0), t(i, null, d(K.value, (u) => (l(), t("li", {
153
- key: u,
154
+ (l(!0), t(i, null, m(K.value, (p) => (l(), t("li", {
155
+ key: p,
154
156
  class: "property-enum-value"
155
- }, r(u), 1))), 128))
157
+ }, r(p), 1))), 128))
156
158
  ]),
157
159
  _: 1
158
160
  }),
159
- n(p(_), { class: "enum-toggle-button" }, {
161
+ n(u(x), { class: "enum-toggle-button" }, {
160
162
  default: v(() => [
161
- n(p(x), {
163
+ n(u(ee), {
162
164
  class: M(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": a }]),
163
165
  icon: "Add",
164
166
  size: "sm"
@@ -172,7 +174,7 @@ const le = {
172
174
  })) : s("", !0)
173
175
  ]))
174
176
  ])) : s("", !0),
175
- ((H = e.value) == null ? void 0 : H.type) === "object" && ((R = e.value) != null && R.properties || (T = e.value) != null && T.additionalProperties) ? (l(), t("div", ce, [
177
+ ((H = e.value) == null ? void 0 : H.type) === "object" && ((R = e.value) != null && R.properties || (T = e.value) != null && T.additionalProperties) ? (l(), t("div", ve, [
176
178
  n(f, {
177
179
  compact: e.compact,
178
180
  level: e.level + 1,
@@ -180,7 +182,7 @@ const le = {
180
182
  }, null, 8, ["compact", "level", "value"])
181
183
  ])) : s("", !0),
182
184
  (U = e.value) != null && U.items ? (l(), t(i, { key: 6 }, [
183
- ["object"].includes(e.value.items.type) ? (l(), t("div", ve, [
185
+ ["object"].includes(e.value.items.type) ? (l(), t("div", ye, [
184
186
  n(f, {
185
187
  compact: e.compact,
186
188
  level: e.level + 1,
@@ -188,19 +190,19 @@ const le = {
188
190
  }, null, 8, ["compact", "level", "value"])
189
191
  ])) : s("", !0)
190
192
  ], 64)) : s("", !0),
191
- (l(), t(i, null, d(G, (a) => {
192
- var u, Z, A;
193
+ (l(), t(i, null, m(G, (a) => {
194
+ var p, Z, A;
193
195
  return l(), t(i, { key: a }, [
194
- (u = e.value) != null && u[a] ? (l(), t("div", ye, [
195
- (l(!0), t(i, null, d(e.value[a], (g, k) => (l(), E(f, {
196
+ (p = e.value) != null && p[a] ? (l(), t("div", fe, [
197
+ (l(!0), t(i, null, m(e.value[a], (g, k) => (l(), E(f, {
196
198
  key: k,
197
199
  compact: e.compact,
198
200
  level: e.level + 1,
199
201
  value: g
200
202
  }, null, 8, ["compact", "level", "value"]))), 128))
201
203
  ])) : s("", !0),
202
- (A = (Z = e.value) == null ? void 0 : Z.items) != null && A[a] && e.level < 3 ? (l(), t("div", fe, [
203
- (l(!0), t(i, null, d(e.value.items[a], (g, k) => (l(), E(f, {
204
+ (A = (Z = e.value) == null ? void 0 : Z.items) != null && A[a] && e.level < 3 ? (l(), t("div", he, [
205
+ (l(!0), t(i, null, m(e.value.items[a], (g, k) => (l(), E(f, {
204
206
  key: k,
205
207
  compact: e.compact,
206
208
  level: e.level + 1,
@@ -214,5 +216,5 @@ const le = {
214
216
  }
215
217
  });
216
218
  export {
217
- Se as default
219
+ De as default
218
220
  };
@@ -8,15 +8,14 @@ declare function __VLS_template(): {
8
8
  attrs: Partial<{}>;
9
9
  slots: {
10
10
  name?(_: {}): any;
11
- example?(_: {}): any;
12
11
  };
13
12
  refs: {};
14
- rootEl: any;
13
+ rootEl: HTMLDivElement;
15
14
  };
16
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
16
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
17
  required: boolean;
19
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
20
19
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
20
  export default _default;
22
21
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AA2NA,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;CACrB,CAAC;AA0BJ,iBAAS,cAAc;WAkRT,OAAO,IAA6B;;sBATxB,GAAG;yBACC,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cAjUN,OAAO;6EAwUpB,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":"AAiNA,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;CACrB,CAAC;AA0BJ,iBAAS,cAAc;WA0QT,OAAO,IAA6B;;sBARxB,GAAG;;;;EAa5B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cAzTN,OAAO;wFAiUpB,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
- import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-8f6978ee"]]);
3
+ import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3cb6c79a"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };