@scalar/api-reference 1.32.9 → 1.32.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 (122) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/browser/standalone.js +15115 -14878
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  6. package/dist/components/ApiReferenceLayout.vue2.js +164 -176
  7. package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
  8. package/dist/components/Badge/Badge.vue.js +3 -3
  9. package/dist/components/Content/Content.vue.js +2 -2
  10. package/dist/components/Content/Content.vue2.js +21 -21
  11. package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Introduction/Description.vue.js +2 -2
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  15. package/dist/components/Content/Introduction/Introduction.vue2.js +104 -72
  16. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  17. package/dist/components/LinkList/LinkList.vue.d.ts +18 -0
  18. package/dist/components/LinkList/LinkList.vue.d.ts.map +1 -0
  19. package/dist/components/LinkList/LinkList.vue.js +12 -0
  20. package/dist/components/LinkList/index.d.ts +2 -0
  21. package/dist/components/LinkList/index.d.ts.map +1 -0
  22. package/dist/components/Section/SectionHeader.vue.d.ts +1 -0
  23. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  24. package/dist/components/Section/SectionHeader.vue.js +2 -2
  25. package/dist/components/Section/SectionHeader.vue2.js +11 -10
  26. package/dist/features/Operation/Operation.vue.d.ts +6 -6
  27. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  28. package/dist/features/Operation/Operation.vue.js +50 -49
  29. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +8 -6
  30. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  31. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  32. package/dist/features/Operation/components/callbacks/Callback.vue2.js +21 -28
  33. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +5 -3
  34. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  35. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +33 -18
  36. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -12
  37. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  38. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  39. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +164 -163
  40. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -13
  41. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  42. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  43. package/dist/features/Operation/layouts/ModernLayout.vue2.js +111 -118
  44. package/dist/features/api-client-modal/useApiClient.d.ts +5299 -5299
  45. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  46. package/dist/features/base-url/BaseUrl.vue.d.ts.map +1 -1
  47. package/dist/features/base-url/BaseUrl.vue.js +26 -26
  48. package/dist/features/download-link/DownloadLink.vue.js +1 -1
  49. package/dist/features/example-responses/ExampleResponseTab.vue.js +2 -2
  50. package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
  51. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  52. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  53. package/dist/features/example-responses/ExampleResponses.vue2.js +60 -57
  54. package/dist/features/external-docs/ExternalDocs.vue.d.ts +7 -0
  55. package/dist/features/external-docs/ExternalDocs.vue.d.ts.map +1 -0
  56. package/dist/features/external-docs/ExternalDocs.vue.js +36 -0
  57. package/dist/features/external-docs/ExternalDocs.vue2.js +4 -0
  58. package/dist/features/external-docs/index.d.ts +2 -0
  59. package/dist/features/external-docs/index.d.ts.map +1 -0
  60. package/dist/features/info-object/Contact.vue.d.ts +7 -0
  61. package/dist/features/info-object/Contact.vue.d.ts.map +1 -0
  62. package/dist/features/info-object/Contact.vue.js +44 -0
  63. package/dist/features/info-object/Contact.vue2.js +4 -0
  64. package/dist/features/info-object/License.vue.d.ts +7 -0
  65. package/dist/features/info-object/License.vue.d.ts.map +1 -0
  66. package/dist/features/info-object/License.vue.js +34 -0
  67. package/dist/features/info-object/License.vue2.js +4 -0
  68. package/dist/features/info-object/TermsOfService.vue.d.ts +7 -0
  69. package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -0
  70. package/dist/features/info-object/TermsOfService.vue.js +30 -0
  71. package/dist/features/info-object/TermsOfService.vue2.js +4 -0
  72. package/dist/features/info-object/index.d.ts +4 -0
  73. package/dist/features/info-object/index.d.ts.map +1 -0
  74. package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -2
  75. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  76. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  77. package/dist/features/test-request-button/TestRequestButton.vue2.js +21 -19
  78. package/dist/helpers/convert-security-scheme.js +23 -0
  79. package/dist/index.d.ts +0 -1
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +13 -15
  82. package/dist/style.css +1 -1
  83. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +3 -1
  84. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  85. package/dist/v2/ApiReferenceWorkspace.vue.js +113 -86
  86. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +0 -2
  87. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -1
  88. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +4 -0
  89. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +69 -0
  90. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  91. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +7 -0
  92. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +227 -0
  93. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +20 -3
  94. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +35 -0
  95. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +29 -0
  96. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +10 -0
  97. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
  98. package/dist/v2/events/definitions.js +7 -0
  99. package/dist/v2/events/index.d.ts +1 -1
  100. package/dist/v2/events/listeners.d.ts +1 -1
  101. package/dist/v2/hooks/useStore.js +14 -0
  102. package/package.json +11 -11
  103. package/LICENSE +0 -21
  104. package/dist/blocks/constants.js +0 -6
  105. package/dist/blocks/helpers/getPointer.js +0 -12
  106. package/dist/blocks/hooks/useBlockProps.d.ts +0 -31
  107. package/dist/blocks/hooks/useBlockProps.d.ts.map +0 -1
  108. package/dist/blocks/hooks/useBlockProps.js +0 -24
  109. package/dist/features/example-request/ExamplePicker.vue.d.ts +0 -13
  110. package/dist/features/example-request/ExamplePicker.vue.d.ts.map +0 -1
  111. package/dist/features/example-request/ExamplePicker.vue.js +0 -7
  112. package/dist/features/example-request/ExamplePicker.vue2.js +0 -57
  113. package/dist/features/example-request/ExampleRequest.vue.d.ts +0 -85
  114. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +0 -1
  115. package/dist/features/example-request/ExampleRequest.vue.js +0 -7
  116. package/dist/features/example-request/ExampleRequest.vue2.js +0 -348
  117. package/dist/features/example-request/TextSelect.vue.d.ts +0 -34
  118. package/dist/features/example-request/TextSelect.vue.d.ts.map +0 -1
  119. package/dist/features/example-request/TextSelect.vue.js +0 -48
  120. package/dist/features/example-request/TextSelect.vue3.js +0 -5
  121. package/dist/features/example-request/index.d.ts +0 -3
  122. package/dist/features/example-request/index.d.ts.map +0 -1
@@ -0,0 +1,36 @@
1
+ import { defineComponent as n, createElementBlock as r, createCommentVNode as l, openBlock as o, createElementVNode as s, createVNode as a, unref as i, toDisplayString as t } from "vue";
2
+ import { ScalarIconBook as c } from "@scalar/icons";
3
+ const d = {
4
+ key: 0,
5
+ class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto"
6
+ }, m = ["href"], p = {
7
+ key: 0,
8
+ class: "ml-1 empty:hidden"
9
+ }, u = {
10
+ key: 1,
11
+ class: "ml-1 empty:hidden"
12
+ }, v = /* @__PURE__ */ n({
13
+ __name: "ExternalDocs",
14
+ props: {
15
+ value: {}
16
+ },
17
+ setup(f) {
18
+ return (e, h) => e.value ? (o(), r("div", d, [
19
+ s("a", {
20
+ href: e.value.url,
21
+ class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
22
+ target: "_blank",
23
+ rel: "noopener noreferrer"
24
+ }, [
25
+ a(i(c), {
26
+ weight: "bold",
27
+ class: "size-3 text-current"
28
+ }),
29
+ e.value.description ? (o(), r("span", p, t(e.value.description), 1)) : (o(), r("span", u, t(e.value.url), 1))
30
+ ], 8, m)
31
+ ])) : l("", !0);
32
+ }
33
+ });
34
+ export {
35
+ v as default
36
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ExternalDocs.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ExternalDocs } from './ExternalDocs.vue.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/external-docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { type OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ type __VLS_Props = {
3
+ value?: OpenAPIV3_1.ContactObject;
4
+ };
5
+ 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
+ export default _default;
7
+ //# sourceMappingURL=Contact.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Contact.vue.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/Contact.vue"],"names":[],"mappings":"AA4CA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAaxD,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC,aAAa,CAAA;CAClC,CAAC;;AAkFF,wBAMG"}
@@ -0,0 +1,44 @@
1
+ import { defineComponent as u, createElementBlock as r, createCommentVNode as i, openBlock as a, normalizeClass as m, unref as t, createVNode as p, createElementVNode as d, toDisplayString as c } from "vue";
2
+ import { cva as f } from "@scalar/components";
3
+ import { ScalarIconEnvelopeSimple as v } from "@scalar/icons";
4
+ const h = {
5
+ key: 0,
6
+ class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto"
7
+ }, b = ["href"], k = { class: "ml-1 empty:hidden" }, E = /* @__PURE__ */ u({
8
+ __name: "Contact",
9
+ props: {
10
+ value: {}
11
+ },
12
+ setup(_) {
13
+ const n = f({
14
+ base: "text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none",
15
+ variants: {
16
+ link: {
17
+ true: "no-underline hover:bg-b-2"
18
+ }
19
+ }
20
+ });
21
+ return (e, g) => {
22
+ var o, l, s;
23
+ return e.value ? (a(), r("div", h, [
24
+ (o = e.value) != null && o.email ? (a(), r("a", {
25
+ key: 0,
26
+ class: m(t(n)({ link: !0 })),
27
+ href: `mailto:${(l = e.value) == null ? void 0 : l.email}`
28
+ }, [
29
+ p(t(v), {
30
+ weight: "bold",
31
+ class: "size-3 text-current"
32
+ }),
33
+ d("span", k, c(e.value.name), 1)
34
+ ], 10, b)) : (s = e.value) != null && s.name ? (a(), r("span", {
35
+ key: 1,
36
+ class: m(t(n)({ link: !1 }))
37
+ }, c(e.value.name), 3)) : i("", !0)
38
+ ])) : i("", !0);
39
+ };
40
+ }
41
+ });
42
+ export {
43
+ E as default
44
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Contact.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import { type OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ type __VLS_Props = {
3
+ value?: OpenAPIV3_1.LicenseObject;
4
+ };
5
+ 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, {}, HTMLDivElement>;
6
+ export default _default;
7
+ //# sourceMappingURL=License.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"License.vue.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/License.vue"],"names":[],"mappings":"AAiCA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC,aAAa,CAAA;CAClC,CAAC;;AAkGF,wBAOG"}
@@ -0,0 +1,34 @@
1
+ import { defineComponent as s, createElementBlock as r, openBlock as n, createVNode as i, createElementVNode as d, unref as m, toDisplayString as a } from "vue";
2
+ import { ScalarIconGavel as u } from "@scalar/icons";
3
+ const c = { class: "group flex h-fit items-center last:border-r-0 xl:border-r xl:first:ml-auto" }, p = ["href"], f = { class: "ml-1 empty:hidden" }, h = {
4
+ key: 1,
5
+ class: "ml-1 empty:hidden"
6
+ }, y = /* @__PURE__ */ s({
7
+ __name: "License",
8
+ props: {
9
+ value: {}
10
+ },
11
+ setup(_) {
12
+ return (e, v) => {
13
+ var o, t, l;
14
+ return n(), r("div", c, [
15
+ (o = e.value) != null && o.url ? (n(), r("a", {
16
+ key: 0,
17
+ class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
18
+ href: e.value.url,
19
+ target: "_blank",
20
+ rel: "noopener noreferrer"
21
+ }, [
22
+ i(m(u), {
23
+ weight: "bold",
24
+ class: "size-3 text-current"
25
+ }),
26
+ d("span", f, a(((t = e.value) == null ? void 0 : t.name) || e.value.identifier || e.value.url), 1)
27
+ ], 8, p)) : (n(), r("span", h, a((l = e.value) == null ? void 0 : l.name), 1))
28
+ ]);
29
+ };
30
+ }
31
+ });
32
+ export {
33
+ y as default
34
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./License.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import { type OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ type __VLS_Props = {
3
+ value?: OpenAPIV3_1.InfoObject['termsOfService'];
4
+ };
5
+ 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
+ export default _default;
7
+ //# sourceMappingURL=TermsOfService.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TermsOfService.vue.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/TermsOfService.vue"],"names":[],"mappings":"AA6BA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAA;CACjD,CAAC;;AAwFF,wBAMG"}
@@ -0,0 +1,30 @@
1
+ import { defineComponent as t, createElementBlock as n, createCommentVNode as l, openBlock as s, createElementVNode as o, createVNode as a, unref as m } from "vue";
2
+ import { ScalarIconScroll as c } from "@scalar/icons";
3
+ const d = {
4
+ key: 0,
5
+ class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto"
6
+ }, i = ["href"], _ = /* @__PURE__ */ t({
7
+ __name: "TermsOfService",
8
+ props: {
9
+ value: {}
10
+ },
11
+ setup(p) {
12
+ return (e, r) => e.value ? (s(), n("div", d, [
13
+ o("a", {
14
+ class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
15
+ href: e.value,
16
+ target: "_blank",
17
+ rel: "noopener noreferrer"
18
+ }, [
19
+ a(m(c), {
20
+ weight: "bold",
21
+ class: "size-3 text-current"
22
+ }),
23
+ r[0] || (r[0] = o("span", { class: "ml-1 empty:hidden" }, "Terms of Service", -1))
24
+ ], 8, i)
25
+ ])) : l("", !0);
26
+ }
27
+ });
28
+ export {
29
+ _ as default
30
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./TermsOfService.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,4 @@
1
+ export { default as Contact } from './Contact.vue.js';
2
+ export { default as License } from './License.vue.js';
3
+ export { default as TermsOfService } from './TermsOfService.vue.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
@@ -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":"AAqFA,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;;AAuGF,wBAMG"}
1
+ {"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"AAmFA,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-321199ae"]]);
4
+ const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-976c9c1f"]]);
5
5
  export {
6
- a as default
6
+ c 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 g } from "vue";
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
2
  import { ScalarIconPlay as y } from "@scalar/icons";
3
3
  import B from "../../components/ScreenReader.vue.js";
4
4
  import { useConfig as b } from "../../hooks/useConfig.js";
5
- import { useApiClient as q } from "../api-client-modal/useApiClient.js";
6
- const v = ["method"], S = /* @__PURE__ */ d({
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(), l = b(), p = c(
13
- () => l.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 && p.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(y), {
29
+ s(k(y), {
28
30
  class: "size-3",
29
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(g, { 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
@@ -7,6 +7,5 @@ export { useSidebar, Sidebar } from './features/sidebar';
7
7
  export { parse } from './helpers/parse.js';
8
8
  export { createEmptySpecification } from './libs/openapi.js';
9
9
  export { useNavState } from './hooks/useNavState.js';
10
- export { useHttpClientStore } from './stores/useHttpClientStore.js';
11
10
  export type { ApiReferenceConfiguration, ReferenceProps, } from './types';
12
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;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,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"}