@scalar/api-reference 1.25.52 → 1.25.53

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 (60) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +3 -2
  3. package/dist/browser/standalone.js +12953 -12838
  4. package/dist/browser/webpack-stats.json +1 -1
  5. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  6. package/dist/components/Anchor/Anchor.vue.js +1 -1
  7. package/dist/components/Anchor/Anchor.vue2.js +9 -9
  8. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  10. package/dist/components/ApiReferenceLayout.vue2.js +26 -31
  11. package/dist/components/Card/CardTab.vue.d.ts.map +1 -1
  12. package/dist/components/Card/CardTab.vue.js +2 -2
  13. package/dist/components/Card/CardTab.vue2.js +3 -3
  14. package/dist/components/Content/Operation/ParameterItem.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Operation/ParameterItem.vue.js +4 -4
  16. package/dist/components/Content/Operation/ParameterItem.vue2.js +72 -54
  17. package/dist/components/Content/Operation/TestRequestButton.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Operation/TestRequestButton.vue.js +2 -2
  19. package/dist/components/Content/Operation/TestRequestButton.vue2.js +22 -15
  20. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Schema/Schema.vue.js +3 -3
  22. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  23. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  24. package/dist/components/Content/Schema/SchemaProperty.vue2.js +114 -88
  25. package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
  27. package/dist/components/Content/Tag/Endpoints.vue2.js +79 -64
  28. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Tag/Tag.vue.js +3 -3
  30. package/dist/components/Content/Tag/Tag.vue2.js +34 -21
  31. package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
  32. package/dist/components/Section/CompactSection.vue.js +1 -1
  33. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
  34. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +3 -9
  35. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  36. package/dist/features/ApiClientModal/ApiClientModal.vue.js +27 -33
  37. package/dist/features/ApiClientModal/useApiClient.d.ts +140 -12
  38. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  39. package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
  40. package/dist/features/BaseUrl/ServerUrlSelect.vue.js +4 -4
  41. package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +11 -9
  42. package/dist/features/ExampleRequest/ExamplePicker.vue.d.ts.map +1 -1
  43. package/dist/features/ExampleRequest/ExamplePicker.vue.js +3 -3
  44. package/dist/features/ExampleRequest/ExamplePicker.vue2.js +28 -21
  45. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  46. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  47. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +139 -119
  48. package/dist/features/ExampleRequest/TextSelect.vue.d.ts +2 -0
  49. package/dist/features/ExampleRequest/TextSelect.vue.d.ts.map +1 -1
  50. package/dist/features/ExampleRequest/TextSelect.vue.js +22 -19
  51. package/dist/features/ExampleResponses/ExampleResponse.vue.js +3 -3
  52. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
  53. package/dist/features/ExampleResponses/ExampleResponses.vue.js +1 -1
  54. package/dist/features/ExampleResponses/ExampleResponses.vue2.js +88 -81
  55. package/dist/index.js +1 -1
  56. package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +1 -1
  57. package/dist/legacy/components/SecuritySchemeSelector.vue.js +3 -3
  58. package/dist/legacy/components/SecuritySchemeSelector.vue2.js +30 -25
  59. package/dist/style.css +1 -1
  60. package/package.json +10 -9
@@ -1,164 +1,171 @@
1
- import { defineComponent as M, ref as E, computed as d, openBlock as l, createBlock as r, unref as s, withCtx as u, createVNode as b, createElementBlock as v, createCommentVNode as x, createTextVNode as w, withDirectives as N, createElementVNode as S, vModelCheckbox as F, Fragment as R, renderList as O, toDisplayString as A } from "vue";
2
- import { ScalarIcon as D, ScalarCodeBlock as I, ScalarMarkdown as P } from "@scalar/components";
3
- import { normalizeMimeTypeObject as U } from "@scalar/oas-utils/helpers";
4
- import _ from "./ExampleResponse.vue.js";
5
- import H from "../../components/Card/Card.vue.js";
6
- import J from "../../components/Card/CardTabHeader.vue.js";
7
- import K from "../../components/Card/CardTab.vue.js";
8
- import L from "../../components/Card/CardContent.vue.js";
9
- import W from "../../components/Card/CardFooter.vue.js";
10
- import q from "../ExampleRequest/ExamplePicker.vue.js";
11
- import { useClipboard as G } from "../../hooks/useClipboard.js";
12
- const Q = {
1
+ import { defineComponent as N, useId as F, ref as S, computed as v, openBlock as t, createBlock as r, unref as o, withCtx as u, createVNode as h, createElementBlock as x, createCommentVNode as f, createTextVNode as w, withDirectives as I, createElementVNode as _, vModelCheckbox as O, Fragment as R, renderList as A, toDisplayString as D } from "vue";
2
+ import { ScalarIcon as P, ScalarCodeBlock as U, ScalarMarkdown as H } from "@scalar/components";
3
+ import { normalizeMimeTypeObject as J } from "@scalar/oas-utils/helpers";
4
+ import T from "./ExampleResponse.vue.js";
5
+ import K from "../../components/Card/Card.vue.js";
6
+ import L from "../../components/Card/CardTabHeader.vue.js";
7
+ import W from "../../components/Card/CardTab.vue.js";
8
+ import q from "../../components/Card/CardContent.vue.js";
9
+ import G from "../../components/Card/CardFooter.vue.js";
10
+ import Q from "../ExampleRequest/ExamplePicker.vue.js";
11
+ import { useClipboard as X } from "../../hooks/useClipboard.js";
12
+ const Y = {
13
13
  key: 1,
14
14
  class: "scalar-card-checkbox"
15
- }, X = { class: "scalar-card-container custom-scroll" }, Y = {
15
+ }, Z = ["aria-controls"], $ = { class: "scalar-card-container custom-scroll" }, z = {
16
16
  key: 1,
17
17
  class: "response-description"
18
- }, ue = /* @__PURE__ */ M({
18
+ }, ie = /* @__PURE__ */ N({
19
19
  __name: "ExampleResponses",
20
20
  props: {
21
21
  operation: {}
22
22
  },
23
- setup(T) {
24
- const f = T, { copyToClipboard: V } = G(), c = E(), h = d(
23
+ setup(V) {
24
+ const k = V, c = F(), { copyToClipboard: j } = X(), p = S(), C = v(
25
25
  () => {
26
26
  var a, e;
27
- return Object.keys(((e = (a = f == null ? void 0 : f.operation) == null ? void 0 : a.information) == null ? void 0 : e.responses) ?? {}).sort();
27
+ return Object.keys(((e = (a = k == null ? void 0 : k.operation) == null ? void 0 : a.information) == null ? void 0 : e.responses) ?? {}).sort();
28
28
  }
29
- ), k = d(
30
- () => !!o.value.examples
31
- ), g = E(0), p = d(() => {
29
+ ), y = v(
30
+ () => !!l.value.examples
31
+ ), g = S(0), i = v(() => {
32
32
  var e, m;
33
- const a = h.value[g.value];
34
- return (m = (e = f.operation.information) == null ? void 0 : e.responses) == null ? void 0 : m[a];
35
- }), o = d(() => {
33
+ const a = C.value[g.value];
34
+ return (m = (e = k.operation.information) == null ? void 0 : e.responses) == null ? void 0 : m[a];
35
+ }), l = v(() => {
36
36
  var e;
37
- const a = U(
38
- (e = p.value) == null ? void 0 : e.content
37
+ const a = J(
38
+ (e = i.value) == null ? void 0 : e.content
39
39
  );
40
40
  return (
41
41
  // OpenAPI 3.x
42
42
  (a == null ? void 0 : a["application/json"]) ?? (a == null ? void 0 : a["text/plain"]) ?? // Swagger 2.0
43
- p.value
43
+ i.value
44
44
  );
45
- }), j = () => {
46
- if (k.value) {
47
- if (Array.isArray(o.value.examples))
48
- return o.value.examples[0];
45
+ }), B = () => {
46
+ if (y.value) {
47
+ if (Array.isArray(l.value.examples))
48
+ return l.value.examples[0];
49
49
  {
50
- const a = Object.keys(o.value.examples)[0];
51
- return o.value.examples[a];
50
+ const a = Object.keys(l.value.examples)[0];
51
+ return l.value.examples[a];
52
52
  }
53
- } else return o.value.example;
54
- }, y = d(() => ({
55
- ...o.value,
56
- example: k.value && c.value ? o.value.examples[c.value].value ?? o.value.examples[c.value] : j()
57
- })), B = (a) => {
58
- g.value = a, c.value = void 0;
59
- }, C = E(!1);
60
- return (a, e) => h.value.length ? (l(), r(s(H), { key: 0 }, {
53
+ } else return l.value.example;
54
+ }, b = v(() => ({
55
+ ...l.value,
56
+ example: y.value && p.value ? l.value.examples[p.value].value ?? l.value.examples[p.value] : B()
57
+ })), M = (a) => {
58
+ g.value = a, p.value = void 0;
59
+ }, E = S(!1);
60
+ return (a, e) => C.value.length ? (t(), r(o(K), { key: 0 }, {
61
61
  default: u(() => {
62
62
  var m;
63
63
  return [
64
- b(s(J), {
64
+ h(o(L), {
65
65
  muted: "",
66
66
  x: "as",
67
- onChange: B
67
+ onChange: M
68
68
  }, {
69
69
  actions: u(() => {
70
- var t, i;
70
+ var s, d;
71
71
  return [
72
- (t = o.value) != null && t.example ? (l(), v("button", {
72
+ (s = l.value) != null && s.example ? (t(), x("button", {
73
73
  key: 0,
74
74
  class: "code-copy",
75
75
  type: "button",
76
76
  onClick: e[0] || (e[0] = () => {
77
77
  var n;
78
- return s(V)((n = o.value) == null ? void 0 : n.example);
78
+ return o(j)((n = l.value) == null ? void 0 : n.example);
79
79
  })
80
80
  }, [
81
- b(s(D), {
81
+ h(o(P), {
82
82
  icon: "Clipboard",
83
83
  width: "12px",
84
84
  x: "asd"
85
85
  })
86
- ])) : x("", !0),
87
- (i = o.value) != null && i.schema ? (l(), v("label", Q, [
86
+ ])) : f("", !0),
87
+ (d = l.value) != null && d.schema ? (t(), x("label", Y, [
88
88
  e[3] || (e[3] = w(" Show Schema ")),
89
- N(S("input", {
90
- "onUpdate:modelValue": e[1] || (e[1] = (n) => C.value = n),
89
+ I(_("input", {
90
+ "onUpdate:modelValue": e[1] || (e[1] = (n) => E.value = n),
91
+ "aria-controls": o(c),
91
92
  class: "scalar-card-checkbox-input",
92
93
  type: "checkbox"
93
- }, null, 512), [
94
- [F, C.value]
94
+ }, null, 8, Z), [
95
+ [O, E.value]
95
96
  ]),
96
- e[4] || (e[4] = S("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
97
- ])) : x("", !0)
97
+ e[4] || (e[4] = _("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
98
+ ])) : f("", !0)
98
99
  ];
99
100
  }),
100
101
  default: u(() => [
101
- (l(!0), v(R, null, O(h.value, (t) => (l(), r(s(K), { key: t }, {
102
+ (t(!0), x(R, null, A(C.value, (s) => (t(), r(o(W), {
103
+ key: s,
104
+ "aria-controls": o(c)
105
+ }, {
102
106
  default: u(() => [
103
- w(A(t), 1)
107
+ w(D(s), 1)
104
108
  ]),
105
109
  _: 2
106
- }, 1024))), 128))
110
+ }, 1032, ["aria-controls"]))), 128))
107
111
  ]),
108
112
  _: 1
109
113
  }),
110
- S("div", X, [
111
- b(s(L), { muted: "" }, {
114
+ _("div", $, [
115
+ h(o(q), { muted: "" }, {
112
116
  default: u(() => {
113
- var t;
117
+ var s;
114
118
  return [
115
- (t = o.value) != null && t.schema ? (l(), v(R, { key: 0 }, [
116
- C.value && y.value ? (l(), r(s(I), {
119
+ (s = l.value) != null && s.schema ? (t(), x(R, { key: 0 }, [
120
+ E.value && b.value ? (t(), r(o(U), {
117
121
  key: 0,
118
- content: y.value,
122
+ id: o(c),
123
+ content: b.value,
119
124
  lang: "json"
120
- }, null, 8, ["content"])) : (l(), r(_, {
125
+ }, null, 8, ["id", "content"])) : (t(), r(T, {
121
126
  key: 1,
122
- response: y.value
123
- }, null, 8, ["response"]))
124
- ], 64)) : (l(), r(_, {
127
+ id: o(c),
128
+ response: b.value
129
+ }, null, 8, ["id", "response"]))
130
+ ], 64)) : (t(), r(T, {
125
131
  key: 1,
126
- response: y.value
127
- }, null, 8, ["response"]))
132
+ id: o(c),
133
+ response: b.value
134
+ }, null, 8, ["id", "response"]))
128
135
  ];
129
136
  }),
130
137
  _: 1
131
138
  })
132
139
  ]),
133
- (m = p.value) != null && m.description || k.value ? (l(), r(s(W), {
140
+ (m = i.value) != null && m.description || y.value ? (t(), r(o(G), {
134
141
  key: 0,
135
142
  class: "response-card-footer",
136
143
  muted: ""
137
144
  }, {
138
145
  default: u(() => {
139
- var t, i;
146
+ var s, d;
140
147
  return [
141
- k.value ? (l(), r(s(q), {
148
+ y.value ? (t(), r(o(Q), {
142
149
  key: 0,
143
150
  class: "response-example-selector",
144
- examples: (t = o.value) == null ? void 0 : t.examples,
145
- "onUpdate:modelValue": e[2] || (e[2] = (n) => c.value = n)
146
- }, null, 8, ["examples"])) : (i = p.value) != null && i.description ? (l(), v("div", Y, [
147
- b(s(P), {
151
+ examples: (s = l.value) == null ? void 0 : s.examples,
152
+ "onUpdate:modelValue": e[2] || (e[2] = (n) => p.value = n)
153
+ }, null, 8, ["examples"])) : (d = i.value) != null && d.description ? (t(), x("div", z, [
154
+ h(o(H), {
148
155
  class: "markdown",
149
- value: p.value.description
156
+ value: i.value.description
150
157
  }, null, 8, ["value"])
151
- ])) : x("", !0)
158
+ ])) : f("", !0)
152
159
  ];
153
160
  }),
154
161
  _: 1
155
- })) : x("", !0)
162
+ })) : f("", !0)
156
163
  ];
157
164
  }),
158
165
  _: 1
159
- })) : x("", !0);
166
+ })) : f("", !0);
160
167
  }
161
168
  });
162
169
  export {
163
- ue as default
170
+ ie as default
164
171
  };