@scalar/api-reference 1.24.21 → 1.24.24

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 (168) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/browser/standalone.js +21905 -22407
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
  5. package/dist/components/ApiClientModal.vue.js +19 -18
  6. package/dist/components/ApiReference.vue.js +14 -14
  7. package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
  8. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  10. package/dist/components/ApiReferenceLayout.vue2.js +130 -151
  11. package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Authentication/Authentication.vue.js +2 -2
  13. package/dist/components/Content/Authentication/Authentication.vue2.js +20 -18
  14. package/dist/components/Content/Content.vue.d.ts +3 -0
  15. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Content.vue.js +2 -2
  17. package/dist/components/Content/Content.vue2.js +29 -27
  18. package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
  19. package/dist/components/Content/Lazy/Loading.vue.js +1 -1
  20. package/dist/components/Content/Operation/CustomRequestExamples.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Operation/CustomRequestExamples.vue.js +1 -1
  22. package/dist/components/Content/Operation/CustomRequestExamples.vue2.js +19 -19
  23. package/dist/components/Content/Operation/ExampleRequest.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Operation/ExampleRequest.vue.js +2 -2
  25. package/dist/components/Content/Operation/ExampleRequest.vue2.js +63 -59
  26. package/dist/components/Content/Operation/OperationAccordion.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Operation/OperationAccordion.vue.js +1 -1
  28. package/dist/components/Content/Operation/OperationAccordion.vue2.js +26 -26
  29. package/dist/components/Content/Operation/TestRequestButton.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Operation/TestRequestButton.vue.js +2 -2
  31. package/dist/components/Content/Operation/TestRequestButton.vue2.js +18 -36
  32. package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
  33. package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
  34. package/dist/components/Content/Tag/Endpoints.vue2.js +23 -23
  35. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +42 -0
  36. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -0
  37. package/dist/components/HttpMethod/HttpMethod.vue.js +28 -0
  38. package/dist/components/HttpMethod/HttpMethod.vue2.js +4 -0
  39. package/dist/components/HttpMethod/constants.d.ts +9 -0
  40. package/dist/components/HttpMethod/constants.d.ts.map +1 -0
  41. package/dist/components/HttpMethod/constants.js +36 -0
  42. package/dist/components/HttpMethod/index.d.ts +2 -0
  43. package/dist/components/HttpMethod/index.d.ts.map +1 -0
  44. package/dist/components/HttpMethod/utils/isRequestMethod.d.ts +4 -0
  45. package/dist/components/HttpMethod/utils/isRequestMethod.d.ts.map +1 -0
  46. package/dist/components/HttpMethod/utils/isRequestMethod.js +7 -0
  47. package/dist/components/Sidebar/SidebarHttpBadge.vue.js +1 -1
  48. package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +6 -6
  49. package/dist/components/api-client-bus.d.ts +1 -1
  50. package/dist/features/BaseUrl/BaseUrl.vue.d.ts +9 -0
  51. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
  52. package/dist/features/BaseUrl/BaseUrl.vue.js +43 -33
  53. package/dist/helpers/getApiClientRequest.d.ts +1 -1
  54. package/dist/helpers/getApiClientRequest.d.ts.map +1 -1
  55. package/dist/helpers/getApiClientRequest.js +12 -11
  56. package/dist/helpers/index.d.ts +1 -1
  57. package/dist/helpers/index.d.ts.map +1 -1
  58. package/dist/helpers/openClientFor.js +10 -7
  59. package/dist/helpers/parse.d.ts.map +1 -1
  60. package/dist/helpers/parse.js +33 -31
  61. package/dist/hooks/useReactiveSpec.d.ts +1 -1
  62. package/dist/hooks/useSidebar.js +18 -17
  63. package/dist/index.d.ts +0 -2
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +101 -102
  66. package/dist/legacy/components/CardForm.vue.d.ts +10 -0
  67. package/dist/legacy/components/CardForm.vue.d.ts.map +1 -0
  68. package/dist/legacy/components/CardForm.vue.js +13 -0
  69. package/dist/legacy/components/CardFormButton.vue.d.ts +12 -0
  70. package/dist/legacy/components/CardFormButton.vue.d.ts.map +1 -0
  71. package/dist/legacy/components/CardFormButton.vue.js +7 -0
  72. package/dist/legacy/components/CardFormButton.vue2.js +18 -0
  73. package/dist/legacy/components/CardFormGroup.vue.d.ts +10 -0
  74. package/dist/legacy/components/CardFormGroup.vue.d.ts.map +1 -0
  75. package/dist/legacy/components/CardFormGroup.vue.js +13 -0
  76. package/dist/legacy/components/CardFormRows.vue.d.ts +10 -0
  77. package/dist/legacy/components/CardFormRows.vue.d.ts.map +1 -0
  78. package/dist/legacy/components/CardFormRows.vue.js +13 -0
  79. package/dist/legacy/components/CardFormTextInput.vue.d.ts +25 -0
  80. package/dist/legacy/components/CardFormTextInput.vue.d.ts.map +1 -0
  81. package/dist/legacy/components/CardFormTextInput.vue.js +7 -0
  82. package/dist/legacy/components/CardFormTextInput.vue2.js +37 -0
  83. package/dist/legacy/components/SecurityScheme.vue.d.ts +19 -0
  84. package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -0
  85. package/dist/legacy/components/SecurityScheme.vue.js +7 -0
  86. package/dist/legacy/components/SecurityScheme.vue2.js +364 -0
  87. package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts +26 -0
  88. package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts.map +1 -0
  89. package/dist/legacy/components/SecuritySchemeScopes.vue.js +7 -0
  90. package/dist/legacy/components/SecuritySchemeScopes.vue2.js +91 -0
  91. package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts +25 -0
  92. package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +1 -0
  93. package/dist/legacy/components/SecuritySchemeSelector.vue.js +7 -0
  94. package/dist/legacy/components/SecuritySchemeSelector.vue2.js +64 -0
  95. package/dist/legacy/fixtures/httpHeaders.d.ts +6 -0
  96. package/dist/legacy/fixtures/httpHeaders.d.ts.map +1 -0
  97. package/dist/legacy/fixtures/httpRequestMethods.d.ts +10 -0
  98. package/dist/legacy/fixtures/httpRequestMethods.d.ts.map +1 -0
  99. package/dist/legacy/fixtures/httpRequestMethods.js +18 -0
  100. package/dist/legacy/fixtures/index.d.ts +3 -0
  101. package/dist/legacy/fixtures/index.d.ts.map +1 -0
  102. package/dist/legacy/helpers/createPlaceholderRequest.d.ts +6 -0
  103. package/dist/legacy/helpers/createPlaceholderRequest.d.ts.map +1 -0
  104. package/dist/legacy/helpers/createPlaceholderRequest.js +14 -0
  105. package/dist/legacy/helpers/encodeStringAsBase64.d.ts +5 -0
  106. package/dist/legacy/helpers/encodeStringAsBase64.d.ts.map +1 -0
  107. package/dist/legacy/helpers/encodeStringAsBase64.js +6 -0
  108. package/dist/legacy/helpers/getRequestFromAuthentication.d.ts +10 -0
  109. package/dist/legacy/helpers/getRequestFromAuthentication.d.ts.map +1 -0
  110. package/dist/legacy/helpers/getRequestFromAuthentication.js +83 -0
  111. package/dist/legacy/helpers/getUrlFromServerState.d.ts +6 -0
  112. package/dist/legacy/helpers/getUrlFromServerState.d.ts.map +1 -0
  113. package/dist/legacy/helpers/getUrlFromServerState.js +9 -0
  114. package/dist/legacy/helpers/humanDiff.d.ts +5 -0
  115. package/dist/legacy/helpers/humanDiff.d.ts.map +1 -0
  116. package/dist/legacy/helpers/index.d.ts +12 -0
  117. package/dist/legacy/helpers/index.d.ts.map +1 -0
  118. package/dist/legacy/helpers/mapFromArray.d.ts +5 -0
  119. package/dist/legacy/helpers/mapFromArray.d.ts.map +1 -0
  120. package/dist/legacy/helpers/normalizeHeaders.d.ts +9 -0
  121. package/dist/legacy/helpers/normalizeHeaders.d.ts.map +1 -0
  122. package/dist/legacy/helpers/normalizePath.d.ts +5 -0
  123. package/dist/legacy/helpers/normalizePath.d.ts.map +1 -0
  124. package/dist/legacy/helpers/normalizeRequestMethod.d.ts +6 -0
  125. package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +1 -0
  126. package/dist/legacy/helpers/normalizeRequestMethod.js +14 -0
  127. package/dist/legacy/helpers/normalizeUrl.d.ts +5 -0
  128. package/dist/legacy/helpers/normalizeUrl.d.ts.map +1 -0
  129. package/dist/legacy/helpers/prepareClientRequestConfig.d.ts +24 -0
  130. package/dist/legacy/helpers/prepareClientRequestConfig.d.ts.map +1 -0
  131. package/dist/legacy/index.d.ts +5 -0
  132. package/dist/legacy/index.d.ts.map +1 -0
  133. package/dist/legacy/stores/index.d.ts +6 -0
  134. package/dist/legacy/stores/index.d.ts.map +1 -0
  135. package/dist/legacy/stores/useApiClientStore.d.ts +18 -0
  136. package/dist/legacy/stores/useApiClientStore.d.ts.map +1 -0
  137. package/dist/legacy/stores/useApiClientStore.js +32 -0
  138. package/dist/legacy/stores/useAuthenticationStore.d.ts +59 -0
  139. package/dist/legacy/stores/useAuthenticationStore.d.ts.map +1 -0
  140. package/dist/legacy/stores/useAuthenticationStore.js +36 -0
  141. package/dist/legacy/stores/useOpenApiStore.d.ts +95 -0
  142. package/dist/legacy/stores/useOpenApiStore.d.ts.map +1 -0
  143. package/dist/legacy/stores/useOpenApiStore.js +23 -0
  144. package/dist/legacy/stores/useRequestStore.d.ts +58 -0
  145. package/dist/legacy/stores/useRequestStore.d.ts.map +1 -0
  146. package/dist/legacy/stores/useRequestStore.js +33 -0
  147. package/dist/legacy/stores/useServerStore.d.ts +18 -0
  148. package/dist/legacy/stores/useServerStore.d.ts.map +1 -0
  149. package/dist/legacy/stores/useServerStore.js +18 -0
  150. package/dist/legacy/types.d.ts +117 -0
  151. package/dist/legacy/types.d.ts.map +1 -0
  152. package/dist/stores/index.d.ts +1 -0
  153. package/dist/stores/index.d.ts.map +1 -1
  154. package/dist/style.css +1 -1
  155. package/dist/types.d.ts +7 -7
  156. package/dist/types.d.ts.map +1 -1
  157. package/package.json +14 -13
  158. package/dist/components/ApiClientModalOld.vue.d.ts +0 -36
  159. package/dist/components/ApiClientModalOld.vue.d.ts.map +0 -1
  160. package/dist/components/ApiClientModalOld.vue.js +0 -7
  161. package/dist/components/ApiClientModalOld.vue2.js +0 -88
  162. package/dist/components/Content/Schema/SchemaProperty.spec.d.ts +0 -2
  163. package/dist/components/Content/Schema/SchemaProperty.spec.d.ts.map +0 -1
  164. package/dist/features.d.ts +0 -8
  165. package/dist/features.d.ts.map +0 -1
  166. package/dist/features.js +0 -5
  167. package/dist/standalone.spec.d.ts +0 -2
  168. package/dist/standalone.spec.d.ts.map +0 -1
@@ -1,54 +1,56 @@
1
- import { defineComponent as f, computed as v, watch as _, onServerPrefetch as k, useSSRContext as x, unref as s, openBlock as a, createElementBlock as S, createElementVNode as h, createVNode as w, createBlock as A, createCommentVNode as i } from "vue";
2
- import { useAuthenticationStore as B, SecuritySchemeSelector as C, SecurityScheme as N } from "@scalar/api-client";
1
+ import { defineComponent as f, computed as v, watch as _, onServerPrefetch as k, useSSRContext as x, unref as n, openBlock as a, createElementBlock as S, createElementVNode as h, createVNode as w, createBlock as A, createCommentVNode as i } from "vue";
2
+ import B from "../../../legacy/components/SecurityScheme.vue.js";
3
+ import C from "../../../legacy/components/SecuritySchemeSelector.vue.js";
4
+ import { sleep as N } from "../../../helpers/sleep.js";
3
5
  import { hasSecuritySchemes as V } from "../../../helpers/hasSecuritySchemes.js";
4
- import { sleep as E } from "../../../helpers/sleep.js";
6
+ import { useAuthenticationStore as E } from "../../../legacy/stores/useAuthenticationStore.js";
5
7
  const b = { key: 0 }, G = { class: "authentication-header" }, P = { class: "selector" }, R = {
6
8
  key: 0,
7
9
  class: "authentication-content"
8
- }, D = /* @__PURE__ */ f({
10
+ }, H = /* @__PURE__ */ f({
9
11
  __name: "Authentication",
10
12
  props: {
11
13
  parsedSpec: {},
12
14
  proxy: {}
13
15
  },
14
16
  setup(d) {
15
- const n = d, { authentication: c, setAuthentication: l } = B(), y = v(() => {
16
- var t, r, o;
17
- if (!c.preferredSecurityScheme)
17
+ const s = d, { authentication: r, setAuthentication: l } = E(), y = v(() => {
18
+ var t, c, o;
19
+ if (!r.preferredSecurityScheme)
18
20
  return !1;
19
- const e = (o = (r = (t = n.parsedSpec) == null ? void 0 : t.components) == null ? void 0 : r.securitySchemes) == null ? void 0 : o[c.preferredSecurityScheme];
21
+ const e = (o = (c = (t = s.parsedSpec) == null ? void 0 : t.components) == null ? void 0 : c.securitySchemes) == null ? void 0 : o[r.preferredSecurityScheme];
20
22
  return !!e && "type" in e && !!e.type;
21
23
  });
22
24
  return _(
23
25
  () => {
24
26
  var e, t;
25
- return (t = (e = n.parsedSpec) == null ? void 0 : e.components) == null ? void 0 : t.securitySchemes;
27
+ return (t = (e = s.parsedSpec) == null ? void 0 : e.components) == null ? void 0 : t.securitySchemes;
26
28
  },
27
29
  () => {
28
30
  var e, t;
29
31
  l({
30
- securitySchemes: (t = (e = n.parsedSpec) == null ? void 0 : e.components) == null ? void 0 : t.securitySchemes
32
+ securitySchemes: (t = (e = s.parsedSpec) == null ? void 0 : e.components) == null ? void 0 : t.securitySchemes
31
33
  });
32
34
  },
33
35
  { deep: !0, immediate: !0 }
34
36
  ), k(async () => {
35
37
  const e = x();
36
- await E(1), e.payload.data["useGlobalStore-authentication"] = c;
38
+ await N(1), e.payload.data["useGlobalStore-authentication"] = r;
37
39
  }), (e, t) => {
38
- var r, o, p, u, m;
39
- return s(V)(e.parsedSpec) ? (a(), S("div", b, [
40
+ var c, o, p, u, m;
41
+ return n(V)(e.parsedSpec) ? (a(), S("div", b, [
40
42
  h("div", G, [
41
43
  h("div", P, [
42
- w(s(C), {
43
- value: (o = (r = e.parsedSpec) == null ? void 0 : r.components) == null ? void 0 : o.securitySchemes
44
+ w(C, {
45
+ value: (o = (c = e.parsedSpec) == null ? void 0 : c.components) == null ? void 0 : o.securitySchemes
44
46
  }, null, 8, ["value"])
45
47
  ])
46
48
  ]),
47
49
  y.value ? (a(), S("div", R, [
48
- s(c).preferredSecurityScheme ? (a(), A(s(N), {
50
+ n(r).preferredSecurityScheme ? (a(), A(B, {
49
51
  key: 0,
50
52
  proxy: e.proxy,
51
- value: (m = (u = (p = e.parsedSpec) == null ? void 0 : p.components) == null ? void 0 : u.securitySchemes) == null ? void 0 : m[s(c).preferredSecurityScheme]
53
+ value: (m = (u = (p = e.parsedSpec) == null ? void 0 : p.components) == null ? void 0 : u.securitySchemes) == null ? void 0 : m[n(r).preferredSecurityScheme]
52
54
  }, null, 8, ["proxy", "value"])) : i("", !0)
53
55
  ])) : i("", !0)
54
56
  ])) : i("", !0);
@@ -56,5 +58,5 @@ const b = { key: 0 }, G = { class: "authentication-header" }, P = { class: "sele
56
58
  }
57
59
  });
58
60
  export {
59
- D as default
61
+ H as default
60
62
  };
@@ -1,13 +1,16 @@
1
1
  import type { Spec } from '@scalar/oas-utils';
2
+ import { type Server } from '../../features/BaseUrl';
2
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
4
  parsedSpec: Spec;
4
5
  layout?: "default" | "accordion" | undefined;
5
6
  baseServerURL?: string | undefined;
7
+ servers?: Server[] | undefined;
6
8
  proxy?: string | undefined;
7
9
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
8
10
  parsedSpec: Spec;
9
11
  layout?: "default" | "accordion" | undefined;
10
12
  baseServerURL?: string | undefined;
13
+ servers?: Server[] | undefined;
11
14
  proxy?: string | undefined;
12
15
  }>>>, {}, {}>, {
13
16
  start?(_: {}): any;
@@ -1 +1 @@
1
- {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AA+MA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;;;;;;;;;;;;;;;;AA+U7C,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAoNA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAG7C,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAA;;;;;;;;;;;;;;;;;;AA8U7D,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./Content.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-378846e4"]]);
5
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0b17f72e"]]);
6
6
  export {
7
- _ as default
7
+ f as default
8
8
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, computed as m, openBlock as r, createElementBlock as n, Fragment as c, createElementVNode as k, renderSlot as u, createVNode as p, unref as o, createBlock as i, withCtx as l, normalizeClass as T, renderList as L, resolveDynamicComponent as b, createCommentVNode as $, createStaticVNode as E } from "vue";
1
+ import { defineComponent as O, computed as m, openBlock as r, createElementBlock as n, Fragment as c, createElementVNode as h, renderSlot as f, createVNode as p, unref as o, createBlock as s, withCtx as l, normalizeClass as T, renderList as k, resolveDynamicComponent as L, createCommentVNode as $, createStaticVNode as E } from "vue";
2
2
  import R from "./Tag/TagAccordion.vue.js";
3
3
  import D from "./Tag/Tag.vue.js";
4
4
  import F from "./Operation/OperationAccordion.vue.js";
@@ -17,45 +17,47 @@ import { useSidebar as X } from "../../hooks/useSidebar.js";
17
17
  import { hasModels as Y } from "../../helpers/hasModels.js";
18
18
  import { getModels as w } from "../../helpers/getModels.js";
19
19
  import { useNavState as Z } from "../../hooks/useNavState.js";
20
- const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-378846e4><div class="section-flare-item" data-v-378846e4></div><div class="section-flare-item" data-v-378846e4></div><div class="section-flare-item" data-v-378846e4></div><div class="section-flare-item" data-v-378846e4></div><div class="section-flare-item" data-v-378846e4></div><div class="section-flare-item" data-v-378846e4></div><div class="section-flare-item" data-v-378846e4></div><div class="section-flare-item" data-v-378846e4></div></div>', 1), x = { class: "narrow-references-container" }, Le = /* @__PURE__ */ O({
20
+ const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-0b17f72e><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div></div>', 1), x = { class: "narrow-references-container" }, ke = /* @__PURE__ */ O({
21
21
  __name: "Content",
22
22
  props: {
23
23
  parsedSpec: {},
24
24
  layout: {},
25
25
  baseServerURL: {},
26
+ servers: {},
26
27
  proxy: {}
27
28
  },
28
29
  setup(z) {
29
- const t = z, { getOperationId: f, getTagId: d, hash: I } = Z(), { hideModels: M, collapsedSidebarItems: N } = X(), V = m(
30
- () => t.layout === "accordion" ? R : D
30
+ const i = z, { getOperationId: u, getTagId: d, hash: I } = Z(), { hideModels: M, collapsedSidebarItems: N } = X(), V = m(
31
+ () => i.layout === "accordion" ? R : D
31
32
  ), A = m(
32
- () => t.layout === "accordion" ? F : W
33
+ () => i.layout === "accordion" ? F : W
33
34
  ), U = m(
34
- () => t.layout === "accordion" ? "after" : "aside"
35
- ), g = t.layout !== "accordion" && !I.value.startsWith("model");
35
+ () => i.layout === "accordion" ? "after" : "aside"
36
+ ), g = i.layout !== "accordion" && !I.value.startsWith("model");
36
37
  return (e, ee) => {
37
- var v, y, S, h;
38
+ var v, y, S, b;
38
39
  return r(), n(c, null, [
39
40
  _,
40
- k("div", x, [
41
- u(e.$slots, "start", {}, void 0, !0),
41
+ h("div", x, [
42
+ f(e.$slots, "start", {}, void 0, !0),
42
43
  p(o(j), {
43
44
  layout: e.layout,
44
45
  parsedSpec: e.parsedSpec
45
46
  }, null, 8, ["layout", "parsedSpec"]),
46
- (y = (v = e.parsedSpec) == null ? void 0 : v.info) != null && y.title || (h = (S = e.parsedSpec) == null ? void 0 : S.info) != null && h.description ? (r(), i(o(q), {
47
+ (y = (v = e.parsedSpec) == null ? void 0 : v.info) != null && y.title || (b = (S = e.parsedSpec) == null ? void 0 : S.info) != null && b.description ? (r(), s(o(q), {
47
48
  key: 0,
48
49
  info: e.parsedSpec.info,
49
50
  parsedSpec: e.parsedSpec
50
51
  }, {
51
52
  [U.value]: l(() => [
52
- k("div", {
53
+ h("div", {
53
54
  class: T(["introduction-card", { "introduction-card-row": e.layout === "accordion" }])
54
55
  }, [
55
56
  p(o(G), {
56
57
  defaultServerUrl: e.baseServerURL,
58
+ servers: i.servers,
57
59
  specification: e.parsedSpec
58
- }, null, 8, ["defaultServerUrl", "specification"]),
60
+ }, null, 8, ["defaultServerUrl", "servers", "specification"]),
59
61
  p(o(H), {
60
62
  parsedSpec: e.parsedSpec,
61
63
  proxy: e.proxy
@@ -64,28 +66,28 @@ const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-378846e4><div cla
64
66
  ], 2)
65
67
  ]),
66
68
  _: 2
67
- }, 1032, ["info", "parsedSpec"])) : u(e.$slots, "empty-state", { key: 1 }, void 0, !0),
68
- (r(!0), n(c, null, L(e.parsedSpec.tags, (a) => (r(), i(o(C), {
69
+ }, 1032, ["info", "parsedSpec"])) : f(e.$slots, "empty-state", { key: 1 }, void 0, !0),
70
+ (r(!0), n(c, null, k(e.parsedSpec.tags, (a) => (r(), s(o(C), {
69
71
  id: o(d)(a),
70
72
  key: o(d)(a),
71
73
  isLazy: o(g) && !o(N)[o(d)(a)]
72
74
  }, {
73
75
  default: l(() => [
74
- (r(), i(b(V.value), {
76
+ (r(), s(L(V.value), {
75
77
  id: o(d)(a),
76
78
  spec: e.parsedSpec,
77
79
  tag: a
78
80
  }, {
79
81
  default: l(() => [
80
- (r(!0), n(c, null, L(a.operations, (s, B) => (r(), i(o(C), {
81
- id: o(f)(s, a),
82
- key: `${s.httpVerb}-${s.operationId}`,
82
+ (r(!0), n(c, null, k(a.operations, (t, B) => (r(), s(o(C), {
83
+ id: o(u)(t, a),
84
+ key: `${t.httpVerb}-${t.operationId}`,
83
85
  isLazy: B > 0
84
86
  }, {
85
87
  default: l(() => [
86
- (r(), i(b(A.value), {
87
- id: o(f)(s, a),
88
- operation: s,
88
+ (r(), s(L(A.value), {
89
+ id: o(u)(t, a),
90
+ operation: t,
89
91
  tag: a
90
92
  }, null, 8, ["id", "operation", "tag"]))
91
93
  ]),
@@ -97,25 +99,25 @@ const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-378846e4><div cla
97
99
  ]),
98
100
  _: 2
99
101
  }, 1032, ["id", "isLazy"]))), 128)),
100
- e.parsedSpec.webhooks ? (r(), i(o(K), {
102
+ e.parsedSpec.webhooks ? (r(), s(o(K), {
101
103
  key: 2,
102
104
  webhooks: e.parsedSpec.webhooks
103
105
  }, null, 8, ["webhooks"])) : $("", !0),
104
106
  o(Y)(e.parsedSpec) && !o(M) ? (r(), n(c, { key: 3 }, [
105
- e.layout === "accordion" ? (r(), i(o(P), {
107
+ e.layout === "accordion" ? (r(), s(o(P), {
106
108
  key: 0,
107
109
  schemas: o(w)(e.parsedSpec)
108
- }, null, 8, ["schemas"])) : (r(), i(o(Q), {
110
+ }, null, 8, ["schemas"])) : (r(), s(o(Q), {
109
111
  key: 1,
110
112
  schemas: o(w)(e.parsedSpec)
111
113
  }, null, 8, ["schemas"]))
112
114
  ], 64)) : $("", !0),
113
- u(e.$slots, "end", {}, void 0, !0)
115
+ f(e.$slots, "end", {}, void 0, !0)
114
116
  ])
115
117
  ], 64);
116
118
  };
117
119
  }
118
120
  });
119
121
  export {
120
- Le as default
122
+ ke as default
121
123
  };
@@ -1,10 +1,10 @@
1
1
  import type { Spec } from '@scalar/oas-utils';
2
2
  import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-parser';
3
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<{
4
- info: Partial<OpenAPIV3.InfoObject | OpenAPIV3_1.InfoObject | OpenAPIV2.InfoObject>;
4
+ info: Partial<OpenAPIV2.InfoObject | OpenAPIV3.InfoObject | OpenAPIV3_1.InfoObject>;
5
5
  parsedSpec: Spec;
6
6
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
7
- info: Partial<OpenAPIV3.InfoObject | OpenAPIV3_1.InfoObject | OpenAPIV2.InfoObject>;
7
+ info: Partial<OpenAPIV2.InfoObject | OpenAPIV3.InfoObject | OpenAPIV3_1.InfoObject>;
8
8
  parsedSpec: Spec;
9
9
  }>>>, {}, {}>, {
10
10
  aside?(_: {}): any;
@@ -1,5 +1,6 @@
1
1
  import { defineComponent as E, ref as v, watch as K, onMounted as M, withDirectives as $, openBlock as n, createElementBlock as f, normalizeClass as j, Fragment as g, renderList as k, createBlock as m, unref as o, withCtx as p, createCommentVNode as T, createVNode as w, createTextVNode as A, toDisplayString as F, vShow as H } from "vue";
2
2
  import { lazyBus as P } from "./lazyBus.js";
3
+ import { scrollToId as x } from "../../../helpers/scrollToId.js";
3
4
  import q from "../Tag/Tag.vue.js";
4
5
  import G from "../Operation/Operation.vue.js";
5
6
  import J from "../../Section/SectionContainer.vue.js";
@@ -9,7 +10,6 @@ import U from "../../Section/SectionHeader.vue.js";
9
10
  import X from "../../Anchor/Anchor.vue.js";
10
11
  import Y from "../Schema/Schema.vue.js";
11
12
  import { getModels as h } from "../../../helpers/getModels.js";
12
- import { scrollToId as x } from "../../../helpers/scrollToId.js";
13
13
  import { useNavState as Z } from "../../../hooks/useNavState.js";
14
14
  const fe = /* @__PURE__ */ E({
15
15
  __name: "Loading",
@@ -1 +1 @@
1
- {"version":3,"file":"CustomRequestExamples.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/CustomRequestExamples.vue"],"names":[],"mappings":"AAoMA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,mBAAmB,CAAA;;;;;;;;;;;AA8S1B,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"CustomRequestExamples.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/CustomRequestExamples.vue"],"names":[],"mappings":"AAmMA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,mBAAmB,CAAA;;;;;;;;;;;AA+S1B,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./CustomRequestExamples.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-6eb9bb56"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-24c8bc21"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as b, ref as g, computed as u, watch as y, openBlock as m, createBlock as i, unref as e, withCtx as r, createVNode as a, createTextVNode as x, toDisplayString as S, createElementVNode as c, renderSlot as d, createCommentVNode as k } from "vue";
2
- import { HttpMethod as V } from "@scalar/api-client";
3
- import { ScalarIcon as w, ScalarCodeBlock as _ } from "@scalar/components";
4
- import q from "./TextSelect.vue.js";
1
+ import { defineComponent as h, ref as g, computed as u, watch as y, openBlock as m, createBlock as i, unref as e, withCtx as r, createVNode as a, createTextVNode as x, toDisplayString as S, createElementVNode as c, renderSlot as d, createCommentVNode as k } from "vue";
2
+ import { ScalarIcon as V, ScalarCodeBlock as _ } from "@scalar/components";
3
+ import w from "./TextSelect.vue.js";
5
4
  /* empty css */
6
- import N from "../../Card/Card.vue.js";
7
- import $ from "../../Card/CardHeader.vue.js";
5
+ import $ from "../../Card/Card.vue.js";
6
+ import q from "../../Card/CardHeader.vue.js";
7
+ import N from "../../HttpMethod/HttpMethod.vue.js";
8
8
  import j from "../../Card/CardContent.vue.js";
9
9
  import E from "../../Card/CardFooter.vue.js";
10
- import { useClipboard as H } from "../../../hooks/useClipboard.js";
11
- const P = { class: "request-header" }, G = /* @__PURE__ */ b({
10
+ import { useClipboard as P } from "../../../hooks/useClipboard.js";
11
+ const T = { class: "request-header" }, K = /* @__PURE__ */ h({
12
12
  __name: "CustomRequestExamples",
13
13
  props: {
14
14
  operation: {},
@@ -49,16 +49,16 @@ const P = { class: "request-header" }, G = /* @__PURE__ */ b({
49
49
  y(l.examples, () => {
50
50
  l.examples[t.value] === "undefined" && (t.value = 0);
51
51
  });
52
- const { copyToClipboard: h } = H();
53
- return (o, s) => (m(), i(e(N), { class: "dark-mode" }, {
52
+ const { copyToClipboard: C } = P();
53
+ return (o, s) => (m(), i(e($), { class: "dark-mode" }, {
54
54
  default: r(() => [
55
- a(e($), { muted: "" }, {
55
+ a(e(q), { muted: "" }, {
56
56
  actions: r(() => [
57
- a(q, {
57
+ a(w, {
58
58
  class: "request-client-picker",
59
59
  modelValue: t.value,
60
- options: o.examples.map((n, C) => ({
61
- value: C.toString(),
60
+ options: o.examples.map((n, b) => ({
61
+ value: b.toString(),
62
62
  label: n.label
63
63
  })),
64
64
  "onUpdate:modelValue": s[0] || (s[0] = (n) => (t.value = parseInt(n), 10))
@@ -71,17 +71,17 @@ const P = { class: "request-header" }, G = /* @__PURE__ */ b({
71
71
  c("button", {
72
72
  class: "copy-button",
73
73
  type: "button",
74
- onClick: s[1] || (s[1] = (n) => e(h)(p.value.source.trim()))
74
+ onClick: s[1] || (s[1] = (n) => e(C)(p.value.source.trim()))
75
75
  }, [
76
- a(e(w), {
76
+ a(e(V), {
77
77
  icon: "Clipboard",
78
78
  width: "10px"
79
79
  })
80
80
  ])
81
81
  ]),
82
82
  default: r(() => [
83
- c("div", P, [
84
- a(e(V), {
83
+ c("div", T, [
84
+ a(e(N), {
85
85
  class: "request-method",
86
86
  method: o.operation.httpVerb
87
87
  }, null, 8, ["method"]),
@@ -120,5 +120,5 @@ const P = { class: "request-header" }, G = /* @__PURE__ */ b({
120
120
  }
121
121
  });
122
122
  export {
123
- G as default
123
+ K as default
124
124
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/ExampleRequest.vue"],"names":[],"mappings":"AA2TA,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,mBAAmB,CAAA;;;;;;;;;AA+b1B,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/ExampleRequest.vue"],"names":[],"mappings":"AA0TA,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,mBAAmB,CAAA;;;;;;;;;AAgc1B,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ExampleRequest.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-0981194a"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c40974e9"]]);
5
5
  export {
6
- p as default
6
+ r as default
7
7
  };
@@ -1,70 +1,74 @@
1
1
  import { defineComponent as j, ref as $, computed as d, inject as w, onServerPrefetch as A, useSSRContext as F, openBlock as f, createBlock as k, unref as o, withCtx as p, createVNode as i, createTextVNode as P, toDisplayString as K, createElementVNode as y, renderSlot as b, createElementBlock as U, createCommentVNode as x } from "vue";
2
- import { useServerStore as I, useAuthenticationStore as J, HttpMethod as L, getSecretCredentialsFromAuthentication as M, getRequestFromAuthentication as Y, getUrlFromServerState as z } from "@scalar/api-client";
3
- import { ScalarIcon as D, ScalarCodeBlock as Q } from "@scalar/components";
4
- import { createHash as W, ssrState as X } from "@scalar/oas-utils/helpers";
5
- import { getRequestFromOperation as Z } from "@scalar/oas-utils/spec-getters";
6
- import { snippetz as V } from "@scalar/snippetz";
7
- import { asyncComputed as G } from "@vueuse/core";
8
- import { HTTPSnippet as ee } from "httpsnippet-lite";
9
- import te from "./ExamplePicker.vue.js";
10
- import oe from "./TextSelect.vue.js";
2
+ import { ScalarIcon as I, ScalarCodeBlock as J } from "@scalar/components";
3
+ import { createHash as L, ssrState as M } from "@scalar/oas-utils/helpers";
4
+ import { getRequestFromOperation as Y } from "@scalar/oas-utils/spec-getters";
5
+ import { snippetz as _ } from "@scalar/snippetz";
6
+ import { asyncComputed as z } from "@vueuse/core";
7
+ import { HTTPSnippet as D } from "httpsnippet-lite";
8
+ import Q from "./ExamplePicker.vue.js";
9
+ import W from "./TextSelect.vue.js";
11
10
  /* empty css */
12
- import { GLOBAL_SECURITY_SYMBOL as re } from "../../../helpers/provideSymbols.js";
13
- import ne from "../../Card/Card.vue.js";
14
- import ae from "../../Card/CardHeader.vue.js";
15
- import se from "../../Card/CardContent.vue.js";
16
- import ie from "../../Card/CardFooter.vue.js";
17
- import { useClipboard as le } from "../../../hooks/useClipboard.js";
18
- import { useHttpClientStore as pe } from "../../../stores/useHttpClientStore.js";
19
- import { getApiClientRequest as ce } from "../../../helpers/getApiClientRequest.js";
20
- import { getHarRequest as ue } from "../../../helpers/getHarRequest.js";
21
- const me = { class: "request-header" }, de = { class: "code-snippet" }, fe = {
11
+ import { GLOBAL_SECURITY_SYMBOL as X } from "../../../helpers/provideSymbols.js";
12
+ import Z from "../../Card/Card.vue.js";
13
+ import G from "../../Card/CardHeader.vue.js";
14
+ import ee from "../../HttpMethod/HttpMethod.vue.js";
15
+ import te from "../../Card/CardContent.vue.js";
16
+ import { getSecretCredentialsFromAuthentication as oe, getRequestFromAuthentication as re } from "../../../legacy/helpers/getRequestFromAuthentication.js";
17
+ import ne from "../../Card/CardFooter.vue.js";
18
+ import { useClipboard as ae } from "../../../hooks/useClipboard.js";
19
+ import { useHttpClientStore as se } from "../../../stores/useHttpClientStore.js";
20
+ import { getApiClientRequest as ie } from "../../../helpers/getApiClientRequest.js";
21
+ import { useServerStore as le } from "../../../legacy/stores/useServerStore.js";
22
+ import { useAuthenticationStore as pe } from "../../../legacy/stores/useAuthenticationStore.js";
23
+ import { getHarRequest as ce } from "../../../helpers/getHarRequest.js";
24
+ import { getUrlFromServerState as me } from "../../../legacy/helpers/getUrlFromServerState.js";
25
+ const ue = { class: "request-header" }, de = { class: "code-snippet" }, fe = {
22
26
  key: 0,
23
27
  class: "request-card-footer-addon"
24
- }, $e = /* @__PURE__ */ j({
28
+ }, Pe = /* @__PURE__ */ j({
25
29
  __name: "ExampleRequest",
26
30
  props: {
27
31
  operation: {}
28
32
  },
29
- setup(_) {
30
- const s = _, h = `components-Content-Operation-Example-Request${W(
33
+ setup(V) {
34
+ const s = V, h = `components-Content-Operation-Example-Request${L(
31
35
  s.operation.path + s.operation.httpVerb + s.operation.operationId
32
- )}`, C = $(), { copyToClipboard: E } = le(), {
36
+ )}`, C = $(), { copyToClipboard: E } = ae(), {
33
37
  httpClient: a,
34
- setHttpClient: H,
35
- availableTargets: R,
36
- httpTargetTitle: T,
37
- httpClientTitle: B
38
- } = pe(), { server: S } = I(), { authentication: u } = J(), v = d(
38
+ setHttpClient: R,
39
+ availableTargets: T,
40
+ httpTargetTitle: B,
41
+ httpClientTitle: H
42
+ } = se(), { server: S } = le(), { authentication: m } = pe(), v = d(
39
43
  () => {
40
44
  var e, r, t, n;
41
45
  return Object.keys(
42
46
  ((n = (t = (r = (e = s.operation.information) == null ? void 0 : e.requestBody) == null ? void 0 : r.content) == null ? void 0 : t["application/json"]) == null ? void 0 : n.examples) ?? {}
43
47
  ).length > 1;
44
48
  }
45
- ), l = w(re);
49
+ ), l = w(X);
46
50
  async function g() {
47
51
  var n;
48
- const e = ue(
52
+ const e = ce(
49
53
  {
50
- url: z(S)
54
+ url: me(S)
51
55
  },
52
- Z(
56
+ Y(
53
57
  s.operation,
54
58
  {
55
59
  replaceVariables: !0
56
60
  },
57
61
  C.value
58
62
  ),
59
- Y(
60
- u,
63
+ re(
64
+ m,
61
65
  ((n = s.operation.information) == null ? void 0 : n.security) ?? (l == null ? void 0 : l())
62
66
  )
63
67
  ), r = a.clientKey === "undici" || a.clientKey === "fetch" || a.clientKey === "ofetch" ? a.clientKey : null, t = a.targetKey.replace("javascript", "js");
64
- if (r && V().hasPlugin(t, r) && (t === "node" || t === "js"))
65
- return V().print(t, r, e) ?? "";
68
+ if (r && _().hasPlugin(t, r) && (t === "node" || t === "js"))
69
+ return _().print(t, r, e) ?? "";
66
70
  try {
67
- return await new ee(e).convert(
71
+ return await new D(e).convert(
68
72
  a.targetKey,
69
73
  a.clientKey
70
74
  );
@@ -72,31 +76,31 @@ const me = { class: "request-header" }, de = { class: "code-snippet" }, fe = {
72
76
  return console.error("[ExampleRequest]", c), "";
73
77
  }
74
78
  }
75
- const m = G(
79
+ const u = z(
76
80
  g,
77
- X[h] ?? ""
81
+ M[h] ?? ""
78
82
  );
79
83
  A(async () => {
80
84
  const e = F();
81
85
  e.payload.data[h] = await g();
82
- }), d(() => ce({
86
+ }), d(() => ie({
83
87
  serverState: S,
84
- authenticationState: u,
88
+ authenticationState: m,
85
89
  operation: s.operation,
86
90
  globalSecurity: l == null ? void 0 : l()
87
91
  }));
88
92
  const N = d(() => {
89
93
  const e = a.targetKey;
90
- return e === "shell" && m.value.includes("curl") ? "curl" : e === "c" || e === "csharp" ? "cpp" : e;
94
+ return e === "shell" && u.value.includes("curl") ? "curl" : e === "c" || e === "csharp" ? "cpp" : e;
91
95
  });
92
- return (e, r) => (f(), k(o(ne), { class: "dark-mode" }, {
96
+ return (e, r) => (f(), k(o(Z), { class: "dark-mode" }, {
93
97
  default: p(() => [
94
- i(o(ae), { muted: "" }, {
98
+ i(o(G), { muted: "" }, {
95
99
  actions: p(() => [
96
- i(oe, {
100
+ i(W, {
97
101
  class: "request-client-picker",
98
102
  modelValue: JSON.stringify(o(a)),
99
- options: o(R).map((t) => ({
103
+ options: o(T).map((t) => ({
100
104
  value: t.key,
101
105
  label: t.title,
102
106
  options: t.clients.map((n) => ({
@@ -107,27 +111,27 @@ const me = { class: "request-header" }, de = { class: "code-snippet" }, fe = {
107
111
  label: n.title
108
112
  }))
109
113
  })),
110
- "onUpdate:modelValue": r[0] || (r[0] = (t) => o(H)(JSON.parse(t)))
114
+ "onUpdate:modelValue": r[0] || (r[0] = (t) => o(R)(JSON.parse(t)))
111
115
  }, {
112
116
  default: p(() => [
113
- P(K(o(T)) + " " + K(o(B)), 1)
117
+ P(K(o(B)) + " " + K(o(H)), 1)
114
118
  ]),
115
119
  _: 1
116
120
  }, 8, ["modelValue", "options"]),
117
121
  y("button", {
118
122
  class: "copy-button",
119
123
  type: "button",
120
- onClick: r[1] || (r[1] = (t) => o(E)(o(m)))
124
+ onClick: r[1] || (r[1] = (t) => o(E)(o(u)))
121
125
  }, [
122
- i(o(D), {
126
+ i(o(I), {
123
127
  icon: "Clipboard",
124
128
  width: "10px"
125
129
  })
126
130
  ])
127
131
  ]),
128
132
  default: p(() => [
129
- y("div", me, [
130
- i(o(L), {
133
+ y("div", ue, [
134
+ i(o(ee), {
131
135
  as: "span",
132
136
  class: "request-method",
133
137
  method: e.operation.httpVerb
@@ -137,16 +141,16 @@ const me = { class: "request-header" }, de = { class: "code-snippet" }, fe = {
137
141
  ]),
138
142
  _: 3
139
143
  }),
140
- i(o(se), {
144
+ i(o(te), {
141
145
  borderless: "",
142
146
  class: "request-editor-section custom-scroll",
143
147
  frameless: ""
144
148
  }, {
145
149
  default: p(() => [
146
150
  y("div", de, [
147
- i(o(Q), {
148
- content: o(m),
149
- hideCredentials: o(M)(o(u)),
151
+ i(o(J), {
152
+ content: o(u),
153
+ hideCredentials: o(oe)(o(m)),
150
154
  lang: N.value,
151
155
  lineNumbers: ""
152
156
  }, null, 8, ["content", "hideCredentials", "lang"])
@@ -154,7 +158,7 @@ const me = { class: "request-header" }, de = { class: "code-snippet" }, fe = {
154
158
  ]),
155
159
  _: 1
156
160
  }),
157
- v.value || e.$slots.footer ? (f(), k(o(ie), {
161
+ v.value || e.$slots.footer ? (f(), k(o(ne), {
158
162
  key: 0,
159
163
  class: "request-card-footer",
160
164
  contrast: ""
@@ -163,7 +167,7 @@ const me = { class: "request-header" }, de = { class: "code-snippet" }, fe = {
163
167
  var t, n, c, q;
164
168
  return [
165
169
  v.value ? (f(), U("div", fe, [
166
- i(te, {
170
+ i(Q, {
167
171
  class: "request-example-selector",
168
172
  examples: ((q = (c = (n = (t = e.operation.information) == null ? void 0 : t.requestBody) == null ? void 0 : n.content) == null ? void 0 : c["application/json"]) == null ? void 0 : q.examples) ?? [],
169
173
  "onUpdate:modelValue": r[2] || (r[2] = (O) => C.value = O)
@@ -180,5 +184,5 @@ const me = { class: "request-header" }, de = { class: "code-snippet" }, fe = {
180
184
  }
181
185
  });
182
186
  export {
183
- $e as default
187
+ Pe as default
184
188
  };