@scalar/api-reference 1.32.7 → 1.32.8

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 (135) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/browser/standalone.js +16286 -16092
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Anchor/Anchor.vue2.js +2 -1
  5. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  6. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  7. package/dist/components/ApiReferenceLayout.vue2.js +164 -176
  8. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  9. package/dist/components/Content/Content.vue.js +2 -2
  10. package/dist/components/Content/Content.vue2.js +20 -20
  11. package/dist/components/Content/Models/Models.vue2.js +5 -4
  12. package/dist/components/Content/Models/ModelsAccordion.vue2.js +2 -1
  13. package/dist/components/Content/Schema/Schema.vue2.js +2 -1
  14. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +14 -7
  15. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
  17. package/dist/components/Content/Tag/OperationsList.vue2.js +18 -22
  18. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  20. package/dist/components/Content/Tag/OperationsListItem.vue2.js +33 -34
  21. package/dist/components/Content/Tag/Tag.vue.js +2 -1
  22. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  23. package/dist/components/GettingStarted.vue2.js +8 -6
  24. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  25. package/dist/components/Section/SectionAccordion.vue.js +1 -1
  26. package/dist/components/Section/SectionAccordion.vue2.js +28 -29
  27. package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
  28. package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
  29. package/dist/components/Section/SectionContainerAccordion.vue2.js +17 -18
  30. package/dist/features/Operation/Operation.vue.d.ts +6 -6
  31. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  32. package/dist/features/Operation/Operation.vue.js +50 -49
  33. package/dist/features/Operation/components/ContentTypeSelect.vue.js +8 -7
  34. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +8 -6
  35. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  36. package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
  37. package/dist/features/Operation/components/callbacks/Callback.vue2.js +21 -28
  38. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +5 -3
  39. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  40. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +33 -18
  41. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -12
  42. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  43. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  44. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +168 -154
  45. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -13
  46. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  47. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  48. package/dist/features/Operation/layouts/ModernLayout.vue2.js +113 -117
  49. package/dist/features/Search/SearchButton.vue.js +2 -1
  50. package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
  51. package/dist/features/Search/SearchModal.vue.js +2 -2
  52. package/dist/features/Search/SearchModal.vue2.js +16 -16
  53. package/dist/features/api-client-modal/useApiClient.d.ts +5338 -5258
  54. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  55. package/dist/features/download-link/DownloadLink.vue2.js +4 -2
  56. package/dist/{components/Card/CardTab.vue.d.ts → features/example-responses/ExampleResponseTab.vue.d.ts} +1 -1
  57. package/dist/features/example-responses/ExampleResponseTab.vue.d.ts.map +1 -0
  58. package/dist/features/example-responses/ExampleResponseTab.vue.js +7 -0
  59. package/dist/{components/Card/CardTab.vue2.js → features/example-responses/ExampleResponseTab.vue2.js} +6 -6
  60. package/dist/{components/Card/CardTabHeader.vue.d.ts → features/example-responses/ExampleResponseTabList.vue.d.ts} +3 -3
  61. package/dist/features/example-responses/ExampleResponseTabList.vue.d.ts.map +1 -0
  62. package/dist/features/example-responses/ExampleResponseTabList.vue.js +7 -0
  63. package/dist/{components/Card/CardTabHeader.vue2.js → features/example-responses/ExampleResponseTabList.vue2.js} +9 -9
  64. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  65. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  66. package/dist/features/example-responses/ExampleResponses.vue2.js +89 -96
  67. package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -2
  68. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  69. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  70. package/dist/features/test-request-button/TestRequestButton.vue2.js +26 -24
  71. package/dist/helpers/convert-security-scheme.js +23 -0
  72. package/dist/index.d.ts +0 -2
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +15 -29
  75. package/dist/style.css +1 -1
  76. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +3 -1
  77. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  78. package/dist/v2/ApiReferenceWorkspace.vue.js +113 -86
  79. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +4 -0
  80. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +64 -0
  81. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  82. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +7 -0
  83. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +212 -0
  84. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +20 -3
  85. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +35 -0
  86. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +29 -0
  87. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +10 -0
  88. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
  89. package/dist/v2/events/definitions.js +7 -0
  90. package/dist/v2/events/index.d.ts +1 -1
  91. package/dist/v2/events/listeners.d.ts +1 -1
  92. package/dist/v2/hooks/useStore.js +14 -0
  93. package/package.json +26 -26
  94. package/dist/blocks/constants.js +0 -6
  95. package/dist/blocks/helpers/getPointer.js +0 -12
  96. package/dist/blocks/hooks/useBlockProps.d.ts +0 -31
  97. package/dist/blocks/hooks/useBlockProps.d.ts.map +0 -1
  98. package/dist/blocks/hooks/useBlockProps.js +0 -24
  99. package/dist/components/Card/Card.vue.d.ts +0 -18
  100. package/dist/components/Card/Card.vue.d.ts.map +0 -1
  101. package/dist/components/Card/Card.vue.js +0 -13
  102. package/dist/components/Card/CardContent.vue.d.ts +0 -19
  103. package/dist/components/Card/CardContent.vue.d.ts.map +0 -1
  104. package/dist/components/Card/CardContent.vue.js +0 -7
  105. package/dist/components/Card/CardContent.vue2.js +0 -27
  106. package/dist/components/Card/CardFooter.vue.d.ts +0 -19
  107. package/dist/components/Card/CardFooter.vue.d.ts.map +0 -1
  108. package/dist/components/Card/CardFooter.vue.js +0 -7
  109. package/dist/components/Card/CardFooter.vue2.js +0 -24
  110. package/dist/components/Card/CardHeader.vue.d.ts +0 -20
  111. package/dist/components/Card/CardHeader.vue.d.ts.map +0 -1
  112. package/dist/components/Card/CardHeader.vue.js +0 -7
  113. package/dist/components/Card/CardHeader.vue2.js +0 -31
  114. package/dist/components/Card/CardTab.vue.d.ts.map +0 -1
  115. package/dist/components/Card/CardTab.vue.js +0 -7
  116. package/dist/components/Card/CardTabHeader.vue.d.ts.map +0 -1
  117. package/dist/components/Card/CardTabHeader.vue.js +0 -7
  118. package/dist/components/Card/index.d.ts +0 -7
  119. package/dist/components/Card/index.d.ts.map +0 -1
  120. package/dist/components/Card/types.d.ts +0 -8
  121. package/dist/components/Card/types.d.ts.map +0 -1
  122. package/dist/features/example-request/ExamplePicker.vue.d.ts +0 -13
  123. package/dist/features/example-request/ExamplePicker.vue.d.ts.map +0 -1
  124. package/dist/features/example-request/ExamplePicker.vue.js +0 -7
  125. package/dist/features/example-request/ExamplePicker.vue2.js +0 -56
  126. package/dist/features/example-request/ExampleRequest.vue.d.ts +0 -79
  127. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +0 -1
  128. package/dist/features/example-request/ExampleRequest.vue.js +0 -7
  129. package/dist/features/example-request/ExampleRequest.vue2.js +0 -361
  130. package/dist/features/example-request/TextSelect.vue.d.ts +0 -34
  131. package/dist/features/example-request/TextSelect.vue.d.ts.map +0 -1
  132. package/dist/features/example-request/TextSelect.vue.js +0 -48
  133. package/dist/features/example-request/TextSelect.vue3.js +0 -5
  134. package/dist/features/example-request/index.d.ts +0 -3
  135. package/dist/features/example-request/index.d.ts.map +0 -1
@@ -1,162 +1,155 @@
1
- import { defineComponent as M, useId as N, ref as E, computed as v, createBlock as r, createCommentVNode as x, openBlock as o, unref as s, withCtx as u, createVNode as f, createElementVNode as g, createElementBlock as k, Fragment as C, renderList as O, createTextVNode as R, toDisplayString as F, withDirectives as I, vModelCheckbox as A } from "vue";
2
- import { ScalarIcon as D, ScalarCodeBlock as K, ScalarMarkdown as P } from "@scalar/components";
3
- import { normalizeMimeTypeObject as U, getObjectKeys as H } from "@scalar/oas-utils/helpers";
4
- import { useClipboard as J } from "@scalar/use-hooks/useClipboard";
5
- import L from "../../components/ScreenReader.vue.js";
6
- import T from "./ExampleResponse.vue.js";
7
- import W from "../../components/Card/Card.vue.js";
8
- import q from "../../components/Card/CardTabHeader.vue.js";
9
- import G from "../../components/Card/CardTab.vue.js";
10
- import Q from "../../components/Card/CardContent.vue.js";
11
- import X from "../../components/Card/CardFooter.vue.js";
12
- import Y from "../example-request/ExamplePicker.vue.js";
13
- const Z = {
1
+ import { defineComponent as N, useId as O, ref as R, computed as v, createBlock as t, createCommentVNode as x, openBlock as o, unref as l, withCtx as u, createVNode as f, createElementBlock as k, Fragment as _, renderList as C, createTextVNode as g, toDisplayString as F, withDirectives as I, createElementVNode as w, vModelCheckbox as A } from "vue";
2
+ import { ScalarCard as D, ScalarIcon as K, ScalarCardSection as L, ScalarCodeBlock as U, ScalarCardFooter as J, ScalarMarkdown as P } from "@scalar/components";
3
+ import { normalizeMimeTypeObject as W, getObjectKeys as $ } from "@scalar/oas-utils/helpers";
4
+ import { useClipboard as q } from "@scalar/use-hooks/useClipboard";
5
+ import G from "../../components/ScreenReader.vue.js";
6
+ import j from "./ExampleResponse.vue.js";
7
+ import H from "./ExampleResponseTab.vue.js";
8
+ import Q from "./ExampleResponseTabList.vue.js";
9
+ import X from "../../v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js";
10
+ const Y = {
14
11
  key: 1,
15
12
  class: "scalar-card-checkbox"
16
- }, $ = ["aria-controls"], z = { class: "scalar-card-container custom-scroll" }, ee = {
13
+ }, Z = ["aria-controls"], z = {
17
14
  key: 1,
18
15
  class: "response-description"
19
- }, de = /* @__PURE__ */ M({
16
+ }, ne = /* @__PURE__ */ N({
20
17
  __name: "ExampleResponses",
21
18
  props: {
22
19
  responses: {}
23
20
  },
24
- setup(w) {
25
- const n = N(), { copyToClipboard: V } = J(), p = E(), h = v(() => Object.keys(w.responses ?? {}).sort()), y = v(
26
- () => !!l.value.examples
27
- ), j = E(0), i = v(() => {
21
+ setup(E) {
22
+ const p = O(), { copyToClipboard: T } = q(), c = R(""), S = v(() => Object.keys(E.responses ?? {}).sort()), y = v(
23
+ () => !!s.value.examples
24
+ ), V = R(0), i = v(() => {
28
25
  var a;
29
- const e = h.value[j.value];
30
- return (a = w.responses) == null ? void 0 : a[e];
31
- }), l = v(() => {
26
+ const e = S.value[V.value];
27
+ return (a = E.responses) == null ? void 0 : a[e];
28
+ }), s = v(() => {
32
29
  var m;
33
- const e = U(
30
+ const e = W(
34
31
  (m = i.value) == null ? void 0 : m.content
35
- ), a = H(e ?? {});
32
+ ), a = $(e ?? {});
36
33
  return (
37
34
  // OpenAPI 3.x
38
35
  (e == null ? void 0 : e["application/json"]) ?? (e == null ? void 0 : e["application/xml"]) ?? (e == null ? void 0 : e["text/plain"]) ?? (e == null ? void 0 : e["text/html"]) ?? (e == null ? void 0 : e["*/*"]) ?? // Take the first key - in the future we may want to use the selected content type
39
36
  (e == null ? void 0 : e[a[0]]) ?? // Swagger 2.0
40
37
  i.value
41
38
  );
42
- }), _ = () => {
39
+ }), B = () => {
43
40
  if (!y.value)
44
- return l.value.example;
45
- if (Array.isArray(l.value.examples))
46
- return l.value.examples[0];
47
- const e = Object.keys(l.value.examples)[0];
48
- return l.value.examples[e];
41
+ return s.value.example;
42
+ if (Array.isArray(s.value.examples))
43
+ return s.value.examples[0];
44
+ const e = Object.keys(s.value.examples)[0], a = s.value.examples[e];
45
+ return (a == null ? void 0 : a.value) ?? a;
49
46
  }, b = v(() => ({
50
- ...l.value,
51
- example: y.value && p.value ? l.value.examples[p.value].value ?? l.value.examples[p.value] : _()
52
- })), B = (e) => {
53
- j.value = e, p.value = void 0;
54
- }, S = E(!1);
55
- return (e, a) => h.value.length ? (o(), r(s(W), {
47
+ ...s.value,
48
+ example: y.value && c.value ? s.value.examples[c.value].value ?? s.value.examples[c.value] : B()
49
+ })), M = (e) => {
50
+ V.value = e, c.value = "";
51
+ }, h = R(!1);
52
+ return (e, a) => S.value.length ? (o(), t(l(D), {
56
53
  key: 0,
57
54
  "aria-label": "Example Responses",
58
- role: "region"
55
+ role: "region",
56
+ class: "response-card"
59
57
  }, {
60
58
  default: u(() => {
61
59
  var m;
62
60
  return [
63
- f(s(q), {
64
- muted: "",
65
- x: "as",
66
- onChange: B
67
- }, {
61
+ f(Q, { onChange: M }, {
68
62
  actions: u(() => {
69
- var t, d;
63
+ var r, d;
70
64
  return [
71
- (t = l.value) != null && t.example ? (o(), k("button", {
65
+ (r = s.value) != null && r.example ? (o(), k("button", {
72
66
  key: 0,
73
67
  class: "code-copy",
74
68
  type: "button",
75
69
  onClick: a[0] || (a[0] = () => {
76
- var c;
77
- return s(V)((c = l.value) == null ? void 0 : c.example);
70
+ var n;
71
+ return l(T)((n = s.value) == null ? void 0 : n.example);
78
72
  })
79
73
  }, [
80
- f(s(D), {
74
+ f(l(K), {
81
75
  icon: "Clipboard",
82
76
  width: "12px"
83
77
  })
84
78
  ])) : x("", !0),
85
- (d = l.value) != null && d.schema ? (o(), k("label", Z, [
86
- a[4] || (a[4] = R(" Show Schema ")),
87
- I(g("input", {
88
- "onUpdate:modelValue": a[1] || (a[1] = (c) => S.value = c),
89
- "aria-controls": s(n),
79
+ (d = s.value) != null && d.schema ? (o(), k("label", Y, [
80
+ a[4] || (a[4] = g(" Show Schema ")),
81
+ I(w("input", {
82
+ "onUpdate:modelValue": a[1] || (a[1] = (n) => h.value = n),
83
+ "aria-controls": l(p),
90
84
  class: "scalar-card-checkbox-input",
91
85
  type: "checkbox"
92
- }, null, 8, $), [
93
- [A, S.value]
86
+ }, null, 8, Z), [
87
+ [A, h.value]
94
88
  ]),
95
- a[5] || (a[5] = g("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
89
+ a[5] || (a[5] = w("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
96
90
  ])) : x("", !0)
97
91
  ];
98
92
  }),
99
93
  default: u(() => [
100
- (o(!0), k(C, null, O(h.value, (t) => (o(), r(s(G), {
101
- key: t,
102
- "aria-controls": s(n)
94
+ (o(!0), k(_, null, C(S.value, (r) => (o(), t(H, {
95
+ key: r,
96
+ "aria-controls": l(p)
103
97
  }, {
104
98
  default: u(() => [
105
- f(L, null, {
99
+ f(G, null, {
106
100
  default: u(() => a[3] || (a[3] = [
107
- R("Status:")
101
+ g("Status:")
108
102
  ])),
109
- _: 1
103
+ _: 1,
104
+ __: [3]
110
105
  }),
111
- R(" " + F(t), 1)
106
+ g(" " + F(r), 1)
112
107
  ]),
113
108
  _: 2
114
109
  }, 1032, ["aria-controls"]))), 128))
115
110
  ]),
116
111
  _: 1
117
112
  }),
118
- g("div", z, [
119
- f(s(Q), { muted: "" }, {
120
- default: u(() => {
121
- var t;
122
- return [
123
- (t = l.value) != null && t.schema ? (o(), k(C, { key: 0 }, [
124
- S.value && b.value ? (o(), r(s(K), {
125
- key: 0,
126
- id: s(n),
127
- class: "-outline-offset-2",
128
- content: b.value,
129
- lang: "json"
130
- }, null, 8, ["id", "content"])) : (o(), r(T, {
131
- key: 1,
132
- id: s(n),
133
- response: b.value
134
- }, null, 8, ["id", "response"]))
135
- ], 64)) : (o(), r(T, {
113
+ f(l(L), { class: "grid flex-1" }, {
114
+ default: u(() => {
115
+ var r;
116
+ return [
117
+ (r = s.value) != null && r.schema ? (o(), k(_, { key: 0 }, [
118
+ h.value && b.value ? (o(), t(l(U), {
119
+ key: 0,
120
+ id: l(p),
121
+ class: "-outline-offset-2",
122
+ content: b.value,
123
+ lang: "json"
124
+ }, null, 8, ["id", "content"])) : (o(), t(j, {
136
125
  key: 1,
137
- id: s(n),
126
+ id: l(p),
138
127
  response: b.value
139
128
  }, null, 8, ["id", "response"]))
140
- ];
141
- }),
142
- _: 1
143
- })
144
- ]),
145
- (m = i.value) != null && m.description || y.value ? (o(), r(s(X), {
129
+ ], 64)) : (o(), t(j, {
130
+ key: 1,
131
+ id: l(p),
132
+ response: b.value
133
+ }, null, 8, ["id", "response"]))
134
+ ];
135
+ }),
136
+ _: 1
137
+ }),
138
+ (m = i.value) != null && m.description || y.value ? (o(), t(l(J), {
146
139
  key: 0,
147
- class: "response-card-footer",
148
- muted: ""
140
+ class: "response-card-footer"
149
141
  }, {
150
142
  default: u(() => {
151
- var t, d;
143
+ var r, d;
152
144
  return [
153
- y.value ? (o(), r(s(Y), {
145
+ y.value ? (o(), t(l(X), {
154
146
  key: 0,
155
147
  class: "response-example-selector",
156
- examples: (t = l.value) == null ? void 0 : t.examples,
157
- "onUpdate:modelValue": a[2] || (a[2] = (c) => p.value = c)
158
- }, null, 8, ["examples"])) : (d = i.value) != null && d.description ? (o(), k("div", ee, [
159
- f(s(P), {
148
+ examples: (r = s.value) == null ? void 0 : r.examples,
149
+ modelValue: c.value,
150
+ "onUpdate:modelValue": a[2] || (a[2] = (n) => c.value = n)
151
+ }, null, 8, ["examples", "modelValue"])) : (d = i.value) != null && d.description ? (o(), k("div", z, [
152
+ f(l(P), {
160
153
  class: "markdown",
161
154
  value: i.value.description
162
155
  }, null, 8, ["value"])
@@ -172,5 +165,5 @@ const Z = {
172
165
  }
173
166
  });
174
167
  export {
175
- de as default
168
+ ne as default
176
169
  };
@@ -1,6 +1,7 @@
1
- import type { Request as RequestEntity } from '@scalar/oas-utils/entities/spec';
1
+ import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
2
  type __VLS_Props = {
3
- operation?: Pick<RequestEntity, 'method' | 'path' | 'uid'>;
3
+ method: HttpMethod;
4
+ path: string;
4
5
  };
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>;
6
7
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAS/E,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,CAAA;CAC3D,CAAC;;AAsGF,wBAMG"}
1
+ {"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAUnE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;AAsGF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./TestRequestButton.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-958886da"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-db173467"]]);
5
5
  export {
6
- a as default
6
+ m as default
7
7
  };
@@ -1,42 +1,44 @@
1
- import { defineComponent as d, computed as c, createElementBlock as i, openBlock as r, withModifiers as f, createVNode as a, createElementVNode as h, unref as k, withCtx as C, createTextVNode as s, toDisplayString as u, Fragment as y } from "vue";
2
- import { ScalarIcon as B } from "@scalar/components";
3
- import b from "../../components/ScreenReader.vue.js";
4
- import { useConfig as g } from "../../hooks/useConfig.js";
5
- import { useApiClient as q } from "../api-client-modal/useApiClient.js";
6
- const v = ["method"], S = /* @__PURE__ */ d({
1
+ import { defineComponent as c, computed as d, createElementBlock as n, openBlock as i, withModifiers as h, createVNode as s, createElementVNode as f, unref as k, withCtx as C, createTextVNode as l, toDisplayString as r, Fragment as g } from "vue";
2
+ import { ScalarIconPlay as y } from "@scalar/icons";
3
+ import B from "../../components/ScreenReader.vue.js";
4
+ import { useConfig as b } from "../../hooks/useConfig.js";
5
+ import { useApiClient as w } from "../api-client-modal/useApiClient.js";
6
+ const R = ["method"], S = /* @__PURE__ */ c({
7
7
  __name: "TestRequestButton",
8
8
  props: {
9
- operation: {}
9
+ method: {},
10
+ path: {}
10
11
  },
11
- setup(o) {
12
- const { client: t } = q(), p = g(), l = c(
13
- () => p.value.hideTestRequestButton !== !0
14
- ), m = () => {
12
+ setup(t) {
13
+ const { client: a } = w(), m = b(), u = d(
14
+ () => m.value.hideTestRequestButton !== !0
15
+ ), p = () => {
15
16
  var e;
16
- o.operation && ((e = t == null ? void 0 : t.value) != null && e.open) && t.value.open({
17
- requestUid: o.operation.uid
17
+ (e = a.value) == null || e.open({
18
+ method: t.method,
19
+ path: t.path
18
20
  });
19
21
  };
20
- return (e, n) => e.operation && l.value ? (r(), i("button", {
22
+ return (e, o) => u.value ? (i(), n("button", {
21
23
  key: 0,
22
24
  class: "show-api-client-button",
23
- method: e.operation.method,
25
+ method: e.method,
24
26
  type: "button",
25
- onClick: f(m, ["stop"])
27
+ onClick: h(p, ["stop"])
26
28
  }, [
27
- a(k(B), {
28
- icon: "Play",
29
- size: "sm"
29
+ s(k(y), {
30
+ class: "size-3",
31
+ weight: "fill"
30
32
  }),
31
- n[0] || (n[0] = h("span", null, "Test Request", -1)),
32
- a(b, null, {
33
+ o[0] || (o[0] = f("span", null, "Test Request", -1)),
34
+ s(B, null, {
33
35
  default: C(() => [
34
- s("(" + u(e.operation.method) + " " + u(e.operation.path) + ")", 1)
36
+ l("(" + r(e.method) + " " + r(e.path) + ")", 1)
35
37
  ]),
36
38
  _: 1
37
39
  })
38
- ], 8, v)) : (r(), i(y, { key: 1 }, [
39
- s(" ")
40
+ ], 8, R)) : (i(), n(g, { key: 1 }, [
41
+ l(" ")
40
42
  ], 64));
41
43
  }
42
44
  });
@@ -0,0 +1,23 @@
1
+ const e = (r) => r.type === "apiKey" ? {
2
+ ...r,
3
+ "x-scalar-secret-token": r.value
4
+ } : r.type === "http" ? {
5
+ ...r,
6
+ "x-scalar-secret-token": r.token,
7
+ "x-scalar-secret-username": r.username,
8
+ "x-scalar-secret-password": r.password
9
+ } : r.type === "oauth2" ? {
10
+ ...r,
11
+ flows: Object.fromEntries(
12
+ Object.entries(r.flows).map(([a, t]) => [
13
+ a,
14
+ t && {
15
+ ...t,
16
+ "x-scalar-secret-token": t.token
17
+ }
18
+ ])
19
+ )
20
+ } : r;
21
+ export {
22
+ e as convertSecurityScheme
23
+ };
package/dist/index.d.ts CHANGED
@@ -4,10 +4,8 @@ export { SearchButton, SearchModal } from './features/Search';
4
4
  export { default as GettingStarted } from './components/GettingStarted.vue.js';
5
5
  export { createApiReference } from './standalone/lib/html-api.js';
6
6
  export { useSidebar, Sidebar } from './features/sidebar';
7
- export { Card, CardHeader, CardContent, CardFooter, CardTabHeader, CardTab } from './components/Card';
8
7
  export { parse } from './helpers/parse.js';
9
8
  export { createEmptySpecification } from './libs/openapi.js';
10
9
  export { useNavState } from './hooks/useNavState.js';
11
- export { useHttpClientStore } from './stores/useHttpClientStore.js';
12
10
  export type { ApiReferenceConfiguration, ReferenceProps, } from './types';
13
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AACnF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAE3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAExD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAGrG,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,YAAY,EACV,yBAAyB,EACzB,cAAc,GACf,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AACnF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAE3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAGxD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,YAAY,EACV,yBAAyB,EACzB,cAAc,GACf,MAAM,SAAS,CAAA"}