@scalar/api-reference 1.24.21 → 1.24.23

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 +25 -0
  2. package/dist/browser/standalone.js +21883 -22389
  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 +1 -1
  17. package/dist/components/Content/Content.vue2.js +26 -24
  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
@@ -0,0 +1,91 @@
1
+ import { defineComponent as y, ref as h, computed as x, openBlock as d, createBlock as a, unref as t, withCtx as n, createElementVNode as e, normalizeClass as C, createVNode as p, createTextVNode as _, toDisplayString as r, Teleport as V, normalizeStyle as B, createElementBlock as L, Fragment as O, renderList as I, createCommentVNode as N, pushScopeId as j, popScopeId as z } from "vue";
2
+ import { useFloating as E, autoUpdate as F, offset as U, flip as D, shift as T } from "@floating-ui/vue";
3
+ import { Listbox as M, ListboxButton as q, ListboxOptions as A, ListboxOption as G } from "@headlessui/vue";
4
+ import { ScalarIcon as H } from "@scalar/components";
5
+ import J from "./CardFormButton.vue.js";
6
+ const K = (o) => (j("data-v-0957134f"), o = o(), z(), o), P = { class: "scopes-label" }, Q = /* @__PURE__ */ K(() => /* @__PURE__ */ e("em", null, "/", -1)), R = ["checked"], W = { class: "dropdown-item-title" }, X = { class: "dropdown-item-description" }, oe = /* @__PURE__ */ y({
7
+ __name: "SecuritySchemeScopes",
8
+ props: {
9
+ scopes: {},
10
+ selected: {}
11
+ },
12
+ emits: ["update:selected"],
13
+ setup(o, { emit: w }) {
14
+ const g = o, b = w, m = h(), u = h(), { floatingStyles: v } = E(m, u, {
15
+ placement: "bottom-end",
16
+ whileElementsMounted: F,
17
+ middleware: [U(5), D(), T()]
18
+ }), c = x({
19
+ get: () => g.selected,
20
+ set: (s) => b("update:selected", s)
21
+ });
22
+ return (s, f) => Object.keys(s.scopes ?? {}).length ? (d(), a(t(M), {
23
+ key: 0,
24
+ modelValue: c.value,
25
+ "onUpdate:modelValue": f[0] || (f[0] = (l) => c.value = l),
26
+ multiple: ""
27
+ }, {
28
+ default: n(({ open: l }) => [
29
+ e("div", {
30
+ ref_key: "trigger",
31
+ ref: m,
32
+ class: C(["wrapper", { "wrapper-open": l }])
33
+ }, [
34
+ p(t(q), { as: J }, {
35
+ default: n(() => [
36
+ e("div", P, [
37
+ _(" Scopes " + r(c.value.length), 1),
38
+ Q,
39
+ _(r(Object.entries(s.scopes ?? {}).length) + " ", 1),
40
+ p(t(H), {
41
+ icon: l ? "ChevronUp" : "ChevronDown",
42
+ size: "sm"
43
+ }, null, 8, ["icon"])
44
+ ])
45
+ ]),
46
+ _: 2
47
+ }, 1024)
48
+ ], 2),
49
+ (d(), a(V, { to: "body" }, [
50
+ e("div", {
51
+ ref_key: "dropdown",
52
+ ref: u,
53
+ class: "floating",
54
+ style: B(t(v))
55
+ }, [
56
+ p(t(A), {
57
+ as: "dl",
58
+ class: "dropdown"
59
+ }, {
60
+ default: n(() => [
61
+ (d(!0), L(O, null, I(Object.entries(s.scopes ?? {}), ([i, S]) => (d(), a(t(G), {
62
+ key: i,
63
+ as: "div",
64
+ class: "dropdown-item",
65
+ value: i
66
+ }, {
67
+ default: n(({ selected: k }) => [
68
+ e("input", {
69
+ checked: k,
70
+ class: "dropdown-item-check",
71
+ tabindex: "-1",
72
+ type: "checkbox"
73
+ }, null, 8, R),
74
+ e("dt", W, r(i), 1),
75
+ e("dd", X, r(S), 1)
76
+ ]),
77
+ _: 2
78
+ }, 1032, ["value"]))), 128))
79
+ ]),
80
+ _: 1
81
+ })
82
+ ], 4)
83
+ ]))
84
+ ]),
85
+ _: 1
86
+ }, 8, ["modelValue"])) : N("", !0);
87
+ }
88
+ });
89
+ export {
90
+ oe as default
91
+ };
@@ -0,0 +1,25 @@
1
+ import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-parser';
2
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
+ value?: OpenAPIV2.SecurityDefinitionsObject | {
4
+ [key: string]: OpenAPIV3.ReferenceObject | OpenAPIV3.SecuritySchemeObject;
5
+ } | Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3.SecuritySchemeObject> | undefined;
6
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ input: (key: string) => void;
8
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
+ value?: OpenAPIV2.SecurityDefinitionsObject | {
10
+ [key: string]: OpenAPIV3.ReferenceObject | OpenAPIV3.SecuritySchemeObject;
11
+ } | Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3.SecuritySchemeObject> | undefined;
12
+ }>>> & {
13
+ onInput?: ((key: string) => any) | undefined;
14
+ }, {}, {}>;
15
+ export default _default;
16
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
17
+ type __VLS_TypePropsToOption<T> = {
18
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
19
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
20
+ } : {
21
+ type: import('vue').PropType<T[K]>;
22
+ required: true;
23
+ };
24
+ };
25
+ //# sourceMappingURL=SecuritySchemeSelector.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecuritySchemeSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/legacy/components/SecuritySchemeSelector.vue"],"names":[],"mappings":"AAmLA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;;;;;;;;;;;;;;AA8L/E,wBAOG;AAOH,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"}
@@ -0,0 +1,7 @@
1
+ import o from "./SecuritySchemeSelector.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d4d9bca1"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,64 @@
1
+ import { defineComponent as N, onMounted as O, onServerPrefetch as k, computed as B, openBlock as a, createElementBlock as i, toDisplayString as d, createElementVNode as y, unref as c, createVNode as j, withModifiers as K, Fragment as P, renderList as V, createCommentVNode as $, pushScopeId as D, popScopeId as E } from "vue";
2
+ import { ScalarIcon as F } from "@scalar/components";
3
+ import { useAuthenticationStore as H } from "../stores/useAuthenticationStore.js";
4
+ const M = (r) => (D("data-v-d4d9bca1"), r = r(), E(), r), T = {
5
+ key: 0,
6
+ class: "security-scheme-label"
7
+ }, z = {
8
+ key: 1,
9
+ class: "security-scheme-selector"
10
+ }, q = { class: "security-scheme-label" }, G = ["value"], J = /* @__PURE__ */ M(() => /* @__PURE__ */ y("option", { value: "" }, "None", -1)), Q = ["value"], X = /* @__PURE__ */ N({
11
+ __name: "SecuritySchemeSelector",
12
+ props: {
13
+ value: {}
14
+ },
15
+ emits: ["input"],
16
+ setup(r, { emit: v }) {
17
+ const l = r, m = v, { authentication: o, setAuthentication: _ } = H(), A = (e) => {
18
+ p(e.target.value);
19
+ };
20
+ O(() => {
21
+ o.preferredSecurityScheme || p(Object.keys(l.value ?? {})[0] ?? null);
22
+ });
23
+ const p = (e) => {
24
+ _({
25
+ preferredSecurityScheme: e
26
+ }), m("input", e);
27
+ };
28
+ k(
29
+ () => p(Object.keys(l.value ?? {})[0] ?? null)
30
+ );
31
+ const w = (e) => !(e != null && e.type), b = (e) => e.type.toLowerCase() === "apikey", C = (e) => e.type === "http" && e.scheme.toLowerCase() === "basic" || e.type.toLowerCase() === "basic", I = (e) => e.type === "http" && e.scheme.toLowerCase() === "bearer", L = (e) => e.type.toLowerCase() === "oauth2", h = (e, t) => `${g(e)} (${t})`, g = (e) => {
32
+ var t, s;
33
+ return w(e) ? "No Authentication" : b(e) ? "API Key" : C(e) ? "Basic Authentication" : I(e) ? "Bearer Authentication" : L(e) ? (t = e.flows) != null && t.implicit ? "OAuth 2.0 Implicit" : (s = e.flows) != null && s.password ? "OAuth 2.0 Password" : "OAuth 2.0" : `${e.type} (not yet supported)`;
34
+ }, n = B(() => Object.keys(l.value ?? {}));
35
+ return (e, t) => {
36
+ var s, f;
37
+ return n.value.length === 1 ? (a(), i("div", T, d(h((s = e.value) == null ? void 0 : s[n.value[0]], n.value[0])), 1)) : n.value.length > 1 ? (a(), i("div", z, [
38
+ y("span", q, d(c(o).preferredSecurityScheme ? h(
39
+ (f = e.value) == null ? void 0 : f[c(o).preferredSecurityScheme],
40
+ c(o).preferredSecurityScheme
41
+ ) : "None"), 1),
42
+ j(c(F), { icon: "ChevronDown" }),
43
+ y("select", {
44
+ value: c(o).preferredSecurityScheme,
45
+ onClick: t[0] || (t[0] = K(() => {
46
+ }, ["prevent"])),
47
+ onInput: A
48
+ }, [
49
+ J,
50
+ (a(!0), i(P, null, V(n.value, (u) => {
51
+ var S;
52
+ return a(), i("option", {
53
+ key: u,
54
+ value: u ?? null
55
+ }, d(h((S = e.value) == null ? void 0 : S[u], u)), 9, Q);
56
+ }), 128))
57
+ ], 40, G)
58
+ ])) : $("", !0);
59
+ };
60
+ }
61
+ });
62
+ export {
63
+ X as default
64
+ };
@@ -0,0 +1,6 @@
1
+ export type HttpHeader = {
2
+ name: string;
3
+ url: string;
4
+ };
5
+ export declare const httpHeaders: HttpHeader[];
6
+ //# sourceMappingURL=httpHeaders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpHeaders.d.ts","sourceRoot":"","sources":["../../../src/legacy/fixtures/httpHeaders.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD,eAAO,MAAM,WAAW,EAAE,UAAU,EA6gBnC,CAAA"}
@@ -0,0 +1,10 @@
1
+ export declare const validRequestMethods: readonly ["GET", "POST", "PUT", "HEAD", "DELETE", "PATCH", "OPTIONS", "CONNECT", "TRACE"];
2
+ export type RequestMethod = typeof validRequestMethods[number];
3
+ export declare function isRequestMethod(s: string): s is RequestMethod;
4
+ export declare const requestMethodColors: {
5
+ [x in RequestMethod]: string;
6
+ };
7
+ export declare const requestMethodAbbreviations: {
8
+ [x in RequestMethod]: string;
9
+ };
10
+ //# sourceMappingURL=httpRequestMethods.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpRequestMethods.d.ts","sourceRoot":"","sources":["../../../src/legacy/fixtures/httpRequestMethods.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2FAUtB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAE/D,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,aAAa,CAE7D;AAED,eAAO,MAAM,mBAAmB,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAU/D,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAUtE,CAAA"}
@@ -0,0 +1,18 @@
1
+ const t = [
2
+ "GET",
3
+ "POST",
4
+ "PUT",
5
+ "HEAD",
6
+ "DELETE",
7
+ "PATCH",
8
+ "OPTIONS",
9
+ "CONNECT",
10
+ "TRACE"
11
+ ];
12
+ function T(e) {
13
+ return t.includes(e);
14
+ }
15
+ export {
16
+ T as isRequestMethod,
17
+ t as validRequestMethods
18
+ };
@@ -0,0 +1,3 @@
1
+ export * from './httpHeaders';
2
+ export * from './httpRequestMethods.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/fixtures/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { ClientRequestConfig } from '../types';
2
+ /**
3
+ * Generate a new placeholder request
4
+ */
5
+ export declare const createPlaceholderRequest: () => ClientRequestConfig;
6
+ //# sourceMappingURL=createPlaceholderRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createPlaceholderRequest.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/createPlaceholderRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAAO,mBAU1C,CAAA"}
@@ -0,0 +1,14 @@
1
+ const e = () => ({
2
+ name: "",
3
+ url: "",
4
+ type: "GET",
5
+ path: "",
6
+ variables: [],
7
+ headers: [],
8
+ query: [],
9
+ body: "",
10
+ formData: []
11
+ });
12
+ export {
13
+ e as createPlaceholderRequest
14
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Encodes a given string as Base64. In Node.js (Buffer) and Browser environments (btoa).
3
+ */
4
+ export declare function encodeStringAsBase64(value: string): string;
5
+ //# sourceMappingURL=encodeStringAsBase64.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodeStringAsBase64.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/encodeStringAsBase64.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,UAQjD"}
@@ -0,0 +1,6 @@
1
+ function n(e) {
2
+ return typeof window > "u" ? Buffer.from(e).toString("base64") : btoa(e);
3
+ }
4
+ export {
5
+ n as encodeStringAsBase64
6
+ };
@@ -0,0 +1,10 @@
1
+ import type { AuthenticationState } from '@scalar/oas-utils';
2
+ import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-parser';
3
+ import type { HarRequest } from 'httpsnippet-lite';
4
+ /**
5
+ * Get the request object from the authentication state.
6
+ */
7
+ export declare function getRequestFromAuthentication(authentication: AuthenticationState, operationSecurity?: (OpenAPIV2.SecurityDefinitionsObject | OpenAPIV3.SecurityRequirementObject | OpenAPIV3_1.SecurityRequirementObject)[]): Partial<HarRequest>;
8
+ export declare function getBase64Token(username: string, password: string): string;
9
+ export declare function getSecretCredentialsFromAuthentication(authentication: AuthenticationState): string[];
10
+ //# sourceMappingURL=getRequestFromAuthentication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRequestFromAuthentication.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/getRequestFromAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAoClD;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,mBAAmB,EACnC,iBAAiB,CAAC,EAAE,CAChB,SAAS,CAAC,yBAAyB,GACnC,SAAS,CAAC,yBAAyB,GACnC,WAAW,CAAC,yBAAyB,CACxC,EAAE,GACF,OAAO,CAAC,UAAU,CAAC,CAuIrB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAIhE;AAED,wBAAgB,sCAAsC,CACpD,cAAc,EAAE,mBAAmB,YAcpC"}
@@ -0,0 +1,83 @@
1
+ import { encodeStringAsBase64 as k } from "./encodeStringAsBase64.js";
2
+ function i(e) {
3
+ return !(!e || Array.isArray(e) && !e.length || (e ?? []).some(
4
+ (r) => !Object.keys(r).length
5
+ ));
6
+ }
7
+ function K(e, r) {
8
+ var o, c;
9
+ const n = [], p = [], l = [];
10
+ if (!e.customSecurity && (!e.preferredSecurityScheme || !i(r)))
11
+ return { headers: n, queryString: p, cookies: l };
12
+ const m = (r == null ? void 0 : r.some(
13
+ (t) => e.preferredSecurityScheme && Object.keys(t).includes(
14
+ e.preferredSecurityScheme
15
+ )
16
+ )) || e.customSecurity ? e.preferredSecurityScheme : Object.keys((r == null ? void 0 : r[0]) ?? {}).pop(), s = (o = e.securitySchemes) == null ? void 0 : o[m ?? ""];
17
+ if (s) {
18
+ if ("type" in s && s.type === "apiKey") {
19
+ if ("in" in s && s.in === "header") {
20
+ const t = (c = e.apiKey.token) != null && c.length ? e.apiKey.token : "YOUR_TOKEN";
21
+ n.push({
22
+ name: "name" in s ? s.name : "",
23
+ value: t
24
+ });
25
+ } else if ("in" in s && s.in === "cookie") {
26
+ const t = e.apiKey.token.length ? e.apiKey.token : "YOUR_TOKEN";
27
+ l.push({
28
+ name: s.name,
29
+ value: t
30
+ });
31
+ } else if ("in" in s && s.in === "query") {
32
+ const t = e.apiKey.token.length ? e.apiKey.token : "YOUR_TOKEN";
33
+ p.push({
34
+ name: s.name,
35
+ value: t
36
+ });
37
+ }
38
+ } else if ("type" in s && (s.type === "http" || s.type === "basic")) {
39
+ if ("type" in s && (s.type === "basic" || s.type === "http" && s.scheme === "basic")) {
40
+ const { username: t, password: y } = e.http.basic, h = f(t, y);
41
+ n.push({
42
+ name: "Authorization",
43
+ value: `Basic ${h}`.trim()
44
+ });
45
+ } else if ("type" in s && s.type === "http" && s.scheme === "bearer") {
46
+ const t = e.http.bearer.token.length ? e.http.bearer.token : "YOUR_SECRET_TOKEN";
47
+ n.push({
48
+ name: "Authorization",
49
+ value: `Bearer ${t}`
50
+ });
51
+ }
52
+ } else if ("type" in s && s.type.toLowerCase() === "oauth2") {
53
+ const t = e.oAuth2.accessToken || "YOUR_SECRET_TOKEN";
54
+ n.push({
55
+ name: "Authorization",
56
+ value: `Bearer ${t}`
57
+ });
58
+ }
59
+ }
60
+ return { headers: n, queryString: p, cookies: l };
61
+ }
62
+ function f(e, r) {
63
+ return e != null && e.length || r != null && r.length ? k(`${e}:${r}`) : "";
64
+ }
65
+ function S(e) {
66
+ return [
67
+ e.apiKey.token,
68
+ e.http.bearer.token,
69
+ e.oAuth2.accessToken,
70
+ // The basic auth token is the base64 encoded username and password
71
+ f(
72
+ e.http.basic.username,
73
+ e.http.basic.password
74
+ ),
75
+ // The plain text password shouldn’t appear anyway, but just in case
76
+ e.http.basic.password
77
+ ].filter(Boolean);
78
+ }
79
+ export {
80
+ f as getBase64Token,
81
+ K as getRequestFromAuthentication,
82
+ S as getSecretCredentialsFromAuthentication
83
+ };
@@ -0,0 +1,6 @@
1
+ import type { ServerState } from '../types';
2
+ /**
3
+ * Get the URL from the server state.
4
+ */
5
+ export declare function getUrlFromServerState(state: ServerState): string | undefined;
6
+ //# sourceMappingURL=getUrlFromServerState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getUrlFromServerState.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/getUrlFromServerState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,sBAWvD"}
@@ -0,0 +1,9 @@
1
+ import { replaceVariables as u } from "@scalar/oas-utils/helpers";
2
+ function i(l) {
3
+ var o;
4
+ const r = (o = l == null ? void 0 : l.servers) == null ? void 0 : o[l.selectedServer ?? 0];
5
+ return typeof (r == null ? void 0 : r.url) == "string" ? u(r == null ? void 0 : r.url, l.variables) : r == null ? void 0 : r.url;
6
+ }
7
+ export {
8
+ i as getUrlFromServerState
9
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Get a human-readable string representing the time elapsed since the given Unix timestamp.
3
+ */
4
+ export declare function humanDiff(unixTimestamp: number): string;
5
+ //# sourceMappingURL=humanDiff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"humanDiff.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/humanDiff.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,SAAS,CAAC,aAAa,EAAE,MAAM,UAqC9C"}
@@ -0,0 +1,12 @@
1
+ export * from './createPlaceholderRequest.js';
2
+ export * from './encodeStringAsBase64.js';
3
+ export * from './getRequestFromAuthentication.js';
4
+ export * from './getUrlFromServerState.js';
5
+ export * from './humanDiff';
6
+ export * from './mapFromArray';
7
+ export * from './normalizeHeaders';
8
+ export * from './normalizePath';
9
+ export * from './normalizeRequestMethod.js';
10
+ export * from './normalizeUrl';
11
+ export * from './prepareClientRequestConfig';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,yBAAyB,CAAA;AACvC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,8BAA8B,CAAA"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A utility function to convert an array of objects to an object of objects.
3
+ */
4
+ export declare function mapFromArray<T extends Record<string, unknown>, K extends keyof T & string, V extends keyof T & string>(arr: T[], key: K, valueKey: V): Record<string, T[V]>;
5
+ //# sourceMappingURL=mapFromArray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapFromArray.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/mapFromArray.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAC1B,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAC1B,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,wBAQ9B"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Transforms all header keys to lowercase
3
+ *
4
+ * { 'Content-Type': 'application/json' } -> { 'content-type': 'application/json' }
5
+ */
6
+ export declare const normalizeHeaders: (headers?: Record<string, any>) => {
7
+ [k: string]: any;
8
+ };
9
+ //# sourceMappingURL=normalizeHeaders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeHeaders.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeHeaders.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,aAAc,OAAO,MAAM,EAAE,GAAG,CAAC;;CAK3D,CAAA"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Normalizes a path by removing leading slashes.
3
+ */
4
+ export declare const normalizePath: (path?: string) => string;
5
+ //# sourceMappingURL=normalizePath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizePath.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizePath.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa,UAAW,MAAM,WAY1C,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { RequestMethod } from '@scalar/oas-utils/helpers';
2
+ /**
3
+ * Get a normalized request method (e.g. GET, POST, etc.)
4
+ */
5
+ export declare const normalizeRequestMethod: (method?: string) => RequestMethod;
6
+ //# sourceMappingURL=normalizeRequestMethod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAM9D;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,aAsBxD,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { isRequestMethod as s } from "../fixtures/httpRequestMethods.js";
2
+ const e = "GET", r = (t) => {
3
+ if (typeof t != "string")
4
+ return console.warn(
5
+ `Request method is not a string. Using ${e} as the default.`
6
+ ), e;
7
+ const o = t.trim().toUpperCase();
8
+ return s(o) ? o : (console.warn(
9
+ `${t} is not a valid request method. Using ${e} as the default.`
10
+ ), e);
11
+ };
12
+ export {
13
+ r as normalizeRequestMethod
14
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Normalizes a URL by trimming it and adding http:// as the default prefix.
3
+ */
4
+ export declare const normalizeUrl: (url?: string) => string;
5
+ //# sourceMappingURL=normalizeUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeUrl.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeUrl.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,MAAM,WAuBxC,CAAA"}
@@ -0,0 +1,24 @@
1
+ import type { ClientRequestConfig } from '../types';
2
+ /**
3
+ * Before a request is sent to the server, we’ll do some final preparation.
4
+ *
5
+ * - Add Content-Type header if request.body is JSON
6
+ * - Parse request.body if it’s JSON
7
+ * - Remove duplicate headers
8
+ */
9
+ export declare const prepareClientRequestConfig: (configuration: {
10
+ request: ClientRequestConfig;
11
+ }) => {
12
+ id?: string | undefined;
13
+ name?: string | undefined;
14
+ url: string;
15
+ type: string;
16
+ path: string;
17
+ variables?: import("@scalar/oas-utils").BaseParameter[] | undefined;
18
+ query?: import("@scalar/oas-utils").BaseParameter[] | undefined;
19
+ cookies?: import("@scalar/oas-utils").BaseParameter[] | undefined;
20
+ headers?: import("@scalar/oas-utils").BaseParameter[] | undefined;
21
+ body?: string | undefined;
22
+ formData?: import("@scalar/oas-utils").BaseParameter[] | undefined;
23
+ };
24
+ //# sourceMappingURL=prepareClientRequestConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareClientRequestConfig.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/prepareClientRequestConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAUnD;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,kBAAmB;IACxD,OAAO,EAAE,mBAAmB,CAAA;CAC7B;;;;;;;;;;;;CAuDA,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './fixtures';
2
+ export * from './helpers';
3
+ export * from './stores';
4
+ export * from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './useApiClientStore.js';
2
+ export * from './useAuthenticationStore.js';
3
+ export * from './useOpenApiStore.js';
4
+ export * from './useRequestStore.js';
5
+ export * from './useServerStore.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/stores/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,18 @@
1
+ declare function toggleApiClient(item?: any, forceShow?: boolean): void;
2
+ declare function hideApiClient(): void;
3
+ declare function setActiveApiClientEndpointId(id: string): void;
4
+ declare function setSnippetType(type: string): void;
5
+ export declare const useApiClientStore: () => {
6
+ state: {
7
+ readonly showApiClient: boolean;
8
+ readonly activeApiClientEndpointId: string;
9
+ readonly activeItem: any;
10
+ readonly snippetType: string;
11
+ };
12
+ toggleApiClient: typeof toggleApiClient;
13
+ setActiveApiClientEndpointId: typeof setActiveApiClientEndpointId;
14
+ setSnippetType: typeof setSnippetType;
15
+ hideApiClient: typeof hideApiClient;
16
+ };
17
+ export {};
18
+ //# sourceMappingURL=useApiClientStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useApiClientStore.d.ts","sourceRoot":"","sources":["../../../src/legacy/stores/useApiClientStore.ts"],"names":[],"mappings":"AAoBA,iBAAS,eAAe,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,SAAS,UAAQ,QASrD;AAED,iBAAS,aAAa,SAErB;AAED,iBAAS,4BAA4B,CAAC,EAAE,EAAE,MAAM,QAE/C;AAED,iBAAS,cAAc,CAAC,IAAI,EAAE,MAAM,QAEnC;AAED,eAAO,MAAM,iBAAiB;;gCAxCb,OAAO;4CACK,MAAM;6BACrB,GAAG;8BACF,MAAM;;;;;;CA2CnB,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { reactive as n, readonly as p } from "vue";
2
+ function o() {
3
+ return {
4
+ showApiClient: !1,
5
+ activeApiClientEndpointId: "",
6
+ activeItem: {},
7
+ snippetType: "javascript"
8
+ };
9
+ }
10
+ const t = n(o());
11
+ function s(e, i = !1) {
12
+ i ? t.showApiClient = !0 : t.showApiClient = !t.showApiClient, e && (t.activeItem = e);
13
+ }
14
+ function l() {
15
+ t.showApiClient = !1;
16
+ }
17
+ function a(e) {
18
+ t.activeApiClientEndpointId = e;
19
+ }
20
+ function c(e) {
21
+ t.snippetType = e;
22
+ }
23
+ const A = () => ({
24
+ state: p(t),
25
+ toggleApiClient: s,
26
+ setActiveApiClientEndpointId: a,
27
+ setSnippetType: c,
28
+ hideApiClient: l
29
+ });
30
+ export {
31
+ A as useApiClientStore
32
+ };