@scalar/api-reference 1.24.36 → 1.24.38

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.
@@ -1,7 +1,7 @@
1
1
  import o from "./CardHeader.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-bbd0c20a"]]);
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ef7873bc"]]);
5
5
  export {
6
- e as default
6
+ f as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Description.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Description.vue"],"names":[],"mappings":";;;;;AAwSA,wBAMG;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"}
1
+ {"version":3,"file":"Description.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Description.vue"],"names":[],"mappings":";;;;;AA6SA,wBAMG;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"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Description.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-764b63f7"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-61b651b9"]]);
5
5
  export {
6
- i as default
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./PathResponses.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-ee2bb75a"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-93ecf383"]]);
5
5
  export {
6
- p as default
6
+ r as default
7
7
  };
@@ -9,7 +9,7 @@ import q from "../../../Card/CardContent.vue.js";
9
9
  import G from "../../../Card/CardFooter.vue.js";
10
10
  import Q from "../../../../features/ExampleRequest/ExamplePicker.vue.js";
11
11
  import { useClipboard as X } from "../../../../hooks/useClipboard.js";
12
- const Y = (u) => (P("data-v-ee2bb75a"), u = u(), A(), u), Z = {
12
+ const Y = (u) => (P("data-v-93ecf383"), u = u(), A(), u), Z = {
13
13
  key: 1,
14
14
  class: "scalar-card-checkbox"
15
15
  }, $ = /* @__PURE__ */ Y(() => /* @__PURE__ */ w("span", { class: "scalar-card-checkbox-checkmark" }, null, -1)), z = { class: "scalar-card-container custom-scroll" }, ee = {
@@ -80,7 +80,7 @@ const Y = (u) => (P("data-v-ee2bb75a"), u = u(), A(), u), Z = {
80
80
  }, [
81
81
  b(s(D), {
82
82
  icon: "Clipboard",
83
- width: "10px",
83
+ width: "12px",
84
84
  x: "asd"
85
85
  })
86
86
  ])) : f("", !0),
@@ -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 s = /* @__PURE__ */ o(t, [["__scopeId", "data-v-fa4467a0"]]);
4
+ const s = /* @__PURE__ */ o(t, [["__scopeId", "data-v-be8a64ac"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,24 +1,27 @@
1
- import { defineComponent as n, openBlock as r, createElementBlock as a, withModifiers as i, unref as p, createVNode as s, pushScopeId as c, popScopeId as m, createElementVNode as d } from "vue";
1
+ import { defineComponent as n, openBlock as r, createElementBlock as s, withModifiers as a, unref as p, createVNode as i, pushScopeId as c, popScopeId as m, createElementVNode as d } from "vue";
2
2
  import { ScalarIcon as u } from "@scalar/components";
3
3
  import { apiClientBus as l } from "../../api-client-bus.js";
4
- const h = (e) => (c("data-v-fa4467a0"), e = e(), m(), e), f = ["method"], _ = /* @__PURE__ */ h(() => /* @__PURE__ */ d("span", null, "Test Request", -1)), V = /* @__PURE__ */ n({
4
+ const h = (e) => (c("data-v-be8a64ac"), e = e(), m(), e), f = ["method"], _ = /* @__PURE__ */ h(() => /* @__PURE__ */ d("span", null, "Test Request", -1)), V = /* @__PURE__ */ n({
5
5
  __name: "TestRequestButton",
6
6
  props: {
7
7
  operation: {}
8
8
  },
9
9
  setup(e) {
10
- return (t, o) => (r(), a("button", {
10
+ return (t, o) => (r(), s("button", {
11
11
  class: "show-api-client-button",
12
12
  method: t.operation.httpVerb,
13
13
  type: "button",
14
- onClick: o[0] || (o[0] = i((b) => p(l).emit({
14
+ onClick: o[0] || (o[0] = a((b) => p(l).emit({
15
15
  open: {
16
16
  path: t.operation.path,
17
17
  method: t.operation.httpVerb
18
18
  }
19
19
  }), ["stop"]))
20
20
  }, [
21
- s(p(u), { icon: "PaperAirplane" }),
21
+ i(p(u), {
22
+ icon: "Play",
23
+ size: "sm"
24
+ }),
22
25
  _
23
26
  ], 8, f));
24
27
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent as j, computed as O, openBlock as l, createBlock as i, unref as p, withCtx as y, createElementVNode as k, normalizeClass as d, createElementBlock as a, createVNode as v, createCommentVNode as r, withDirectives as D, normalizeStyle as q, Fragment as t, createTextVNode as C, toDisplayString as P, vShow as z, renderList as I, pushScopeId as N, popScopeId as V } from "vue";
1
+ import { defineComponent as j, computed as D, openBlock as l, createBlock as i, unref as p, withCtx as y, createElementVNode as k, normalizeClass as d, createElementBlock as a, createVNode as v, createCommentVNode as r, withDirectives as O, normalizeStyle as q, Fragment as t, createTextVNode as C, toDisplayString as P, vShow as z, renderList as I, pushScopeId as N, popScopeId as V } from "vue";
2
2
  import { Disclosure as A, DisclosureButton as E, DisclosurePanel as H } from "@headlessui/vue";
3
3
  import { ScalarMarkdown as T, ScalarIcon as $ } from "@scalar/components";
4
4
  import F from "./SchemaHeading.vue.js";
@@ -14,14 +14,14 @@ const L = (s) => (N("data-v-25443e6c"), s = s(), V(), s), M = {
14
14
  ], Y = /* @__PURE__ */ j({
15
15
  __name: "Schema",
16
16
  props: {
17
- value: { type: [Object, Boolean] },
17
+ value: {},
18
18
  level: { default: 0 },
19
19
  name: {},
20
20
  compact: { type: Boolean },
21
21
  noncollapsible: { type: Boolean }
22
22
  },
23
23
  setup(s) {
24
- const h = s, f = O(() => !(h.noncollapsible || h.level === 0)), B = (e) => h.noncollapsible && e.stopPropagation();
24
+ const h = s, f = D(() => !(h.noncollapsible || h.level === 0)), B = (e) => h.noncollapsible && e.stopPropagation();
25
25
  return (e, J) => typeof e.value == "object" && Object.keys(e.value).length ? (l(), i(p(A), {
26
26
  key: 0,
27
27
  defaultOpen: e.noncollapsible
@@ -43,7 +43,7 @@ const L = (s) => (N("data-v-25443e6c"), s = s(), V(), s), M = {
43
43
  k("div", {
44
44
  class: d(["schema-properties", { "schema-properties-open": n }])
45
45
  }, [
46
- D(v(p(E), {
46
+ O(v(p(E), {
47
47
  as: e.noncollapsible ? "div" : "button",
48
48
  class: d(["schema-card-title", { "schema-card-title--compact": e.compact }]),
49
49
  style: q({
@@ -1,39 +1,39 @@
1
- import { defineComponent as v, openBlock as a, createElementBlock as t, createElementVNode as k, Fragment as n, createTextVNode as o, createCommentVNode as l, toDisplayString as r } from "vue";
1
+ import { defineComponent as v, openBlock as a, createElementBlock as t, createElementVNode as k, Fragment as n, createTextVNode as l, createCommentVNode as o, toDisplayString as r } from "vue";
2
2
  const d = {
3
3
  key: 0,
4
4
  class: "schema-type"
5
5
  }, c = ["title"], j = /* @__PURE__ */ v({
6
6
  __name: "SchemaHeading",
7
7
  props: {
8
- value: { type: [Object, Boolean] },
8
+ value: {},
9
9
  name: {}
10
10
  },
11
11
  setup(f) {
12
12
  return (e, h) => {
13
- var p, u, m, y, s, i;
13
+ var u, m, p, y, s, i;
14
14
  return typeof e.value == "object" ? (a(), t("span", d, [
15
15
  k("span", {
16
16
  class: "schema-type-icon",
17
17
  title: typeof e.value.type == "string" ? e.value.type : Array.isArray(e.value.type) ? e.value.type.join(" | ") : "unkown type"
18
18
  }, [
19
19
  e.value.type === "object" ? (a(), t(n, { key: 0 }, [
20
- o(" {} ")
21
- ], 64)) : l("", !0),
20
+ l(" {} ")
21
+ ], 64)) : o("", !0),
22
22
  e.value.type === "array" ? (a(), t(n, { key: 1 }, [
23
- o(" [] ")
24
- ], 64)) : l("", !0),
23
+ l(" [] ")
24
+ ], 64)) : o("", !0),
25
25
  e.value.enum ? (a(), t(n, { key: 2 }, [
26
- o(" enum ")
27
- ], 64)) : l("", !0)
26
+ l(" enum ")
27
+ ], 64)) : o("", !0)
28
28
  ], 8, c),
29
- (u = (p = e.value) == null ? void 0 : p.xml) != null && u.name && ((y = (m = e.value) == null ? void 0 : m.xml) == null ? void 0 : y.name) !== "##default" ? (a(), t(n, { key: 0 }, [
30
- o(" <" + r((i = (s = e.value) == null ? void 0 : s.xml) == null ? void 0 : i.name) + " /> ", 1)
29
+ (m = (u = e.value) == null ? void 0 : u.xml) != null && m.name && ((y = (p = e.value) == null ? void 0 : p.xml) == null ? void 0 : y.name) !== "##default" ? (a(), t(n, { key: 0 }, [
30
+ l(" <" + r((i = (s = e.value) == null ? void 0 : s.xml) == null ? void 0 : i.name) + " /> ", 1)
31
31
  ], 64)) : e.name ? (a(), t(n, { key: 1 }, [
32
- o(r(e.name), 1)
32
+ l(r(e.name), 1)
33
33
  ], 64)) : (a(), t(n, { key: 2 }, [
34
- o(r(e.value.type), 1)
34
+ l(r(e.value.type), 1)
35
35
  ], 64))
36
- ])) : l("", !0);
36
+ ])) : o("", !0);
37
37
  };
38
38
  }
39
39
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ExampleRequest/ExampleRequest.vue"],"names":[],"mappings":"AAmaA,OAAO,KAAK,EACV,oBAAoB,EAGpB,oBAAoB,EACrB,MAAM,mBAAmB,CAAA;;;;;;;;;;;AA0gB1B,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/features/ExampleRequest/ExampleRequest.vue"],"names":[],"mappings":"AAmXA,OAAO,KAAK,EACV,oBAAoB,EAGpB,oBAAoB,EACrB,MAAM,mBAAmB,CAAA;;;;;;;;;;;AAgf1B,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
- import o from "./ExampleRequest.vue2.js";
1
+ import e from "./ExampleRequest.vue2.js";
2
2
  /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ad03e328"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ o(e, [["__scopeId", "data-v-eedd3e3e"]]);
5
5
  export {
6
- p as default
6
+ r as default
7
7
  };
@@ -1,237 +1,226 @@
1
- import { defineComponent as I, ref as _, watch as L, computed as y, inject as M, onServerPrefetch as Y, useSSRContext as z, openBlock as d, createBlock as V, unref as a, withCtx as p, createVNode as i, createElementBlock as v, Fragment as H, createTextVNode as O, toDisplayString as K, createElementVNode as x, renderSlot as j, createCommentVNode as N } from "vue";
2
- import { ScalarIcon as D, ScalarCodeBlock as Q } from "@scalar/components";
3
- import { createHash as W, ssrState as X } from "@scalar/oas-utils/helpers";
4
- import { getRequestFromOperation as Z } from "@scalar/oas-utils/spec-getters";
1
+ import { defineComponent as U, ref as _, watch as L, computed as y, inject as I, onServerPrefetch as M, useSSRContext as Y, openBlock as d, createBlock as b, unref as s, withCtx as c, createVNode as p, createElementBlock as g, Fragment as V, createTextVNode as H, toDisplayString as v, createElementVNode as O, renderSlot as j, createCommentVNode as N } from "vue";
2
+ import { ScalarCodeBlock as z } from "@scalar/components";
3
+ import { createHash as D, ssrState as Q } from "@scalar/oas-utils/helpers";
4
+ import { getRequestFromOperation as W } from "@scalar/oas-utils/spec-getters";
5
5
  import { snippetz as R } from "@scalar/snippetz";
6
- import { asyncComputed as G } from "@vueuse/core";
7
- import { HTTPSnippet as ee } from "httpsnippet-lite";
8
- import te from "./ExamplePicker.vue.js";
9
- import oe from "./TextSelect.vue.js";
6
+ import { asyncComputed as X } from "@vueuse/core";
7
+ import { HTTPSnippet as Z } from "httpsnippet-lite";
8
+ import G from "./ExamplePicker.vue.js";
9
+ import ee from "./TextSelect.vue.js";
10
10
  /* empty css */
11
- import { GLOBAL_SECURITY_SYMBOL as re } from "../../helpers/provideSymbols.js";
12
- import ae from "../../components/Card/Card.vue.js";
13
- import ne from "../../components/Card/CardHeader.vue.js";
14
- import se from "../../components/HttpMethod/HttpMethod.vue.js";
15
- import le from "../../components/Card/CardContent.vue.js";
16
- import { getSecretCredentialsFromAuthentication as ie, getRequestFromAuthentication as ce } from "../../legacy/helpers/getRequestFromAuthentication.js";
17
- import pe from "../../components/Card/CardFooter.vue.js";
18
- import { useClipboard as me } from "../../hooks/useClipboard.js";
19
- import { useHttpClientStore as ue } from "../../stores/useHttpClientStore.js";
20
- import { getApiClientRequest as de } from "../../helpers/getApiClientRequest.js";
21
- import { useServerStore as fe } from "../../legacy/stores/useServerStore.js";
22
- import { useAuthenticationStore as ye } from "../../legacy/stores/useAuthenticationStore.js";
23
- import { getHarRequest as ge } from "../../helpers/getHarRequest.js";
24
- import { getUrlFromServerState as he } from "../../legacy/helpers/getUrlFromServerState.js";
25
- const ve = { class: "request-header" }, Ke = { class: "code-snippet" }, xe = {
11
+ import { GLOBAL_SECURITY_SYMBOL as te } from "../../helpers/provideSymbols.js";
12
+ import oe from "../../components/Card/Card.vue.js";
13
+ import re from "../../components/Card/CardHeader.vue.js";
14
+ import ae from "../../components/HttpMethod/HttpMethod.vue.js";
15
+ import ne from "../../components/Card/CardContent.vue.js";
16
+ import { getSecretCredentialsFromAuthentication as se, getRequestFromAuthentication as le } from "../../legacy/helpers/getRequestFromAuthentication.js";
17
+ import ie from "../../components/Card/CardFooter.vue.js";
18
+ import { useHttpClientStore as ce } from "../../stores/useHttpClientStore.js";
19
+ import { getApiClientRequest as pe } from "../../helpers/getApiClientRequest.js";
20
+ import { useServerStore as me } from "../../legacy/stores/useServerStore.js";
21
+ import { useAuthenticationStore as ue } from "../../legacy/stores/useAuthenticationStore.js";
22
+ import { getHarRequest as de } from "../../helpers/getHarRequest.js";
23
+ import { getUrlFromServerState as fe } from "../../legacy/helpers/getUrlFromServerState.js";
24
+ const ye = { class: "request-header" }, he = { class: "code-snippet" }, ge = {
26
25
  key: 0,
27
26
  class: "request-card-footer-addon"
28
- }, Ye = /* @__PURE__ */ I({
27
+ }, Ue = /* @__PURE__ */ U({
29
28
  __name: "ExampleRequest",
30
29
  props: {
31
30
  customExamples: {},
32
31
  operation: {}
33
32
  },
34
- setup(T) {
35
- var q;
36
- const n = T, C = `components-Content-Operation-Example-Request${W(
37
- n.operation.path + n.operation.httpVerb + n.operation.operationId
38
- )}`, E = _(), { copyToClipboard: B } = me(), {
39
- httpClient: s,
40
- setHttpClient: $,
41
- availableTargets: w,
42
- httpTargetTitle: F,
43
- httpClientTitle: A
44
- } = ue(), { server: S } = fe(), { authentication: g } = ye(), l = _(
33
+ setup(B) {
34
+ var k;
35
+ const a = B, K = `components-Content-Operation-Example-Request${D(
36
+ a.operation.path + a.operation.httpVerb + a.operation.operationId
37
+ )}`, x = _(), {
38
+ httpClient: n,
39
+ setHttpClient: T,
40
+ availableTargets: $,
41
+ httpTargetTitle: w,
42
+ httpClientTitle: F
43
+ } = ce(), { server: E } = me(), { authentication: h } = ue(), l = _(
45
44
  // Default to first custom example
46
- (q = n.customExamples) != null && q.length ? {
45
+ (k = a.customExamples) != null && k.length ? {
47
46
  targetKey: "customExamples",
48
47
  clientKey: 0
49
48
  } : (
50
49
  // Otherwise use the globally selected HTTP client
51
50
  {
52
- targetKey: s.targetKey,
53
- clientKey: s.clientKey
51
+ targetKey: n.targetKey,
52
+ clientKey: n.clientKey
54
53
  }
55
54
  )
56
55
  );
57
- L(s, () => {
56
+ L(n, () => {
58
57
  l.value = {
59
- targetKey: s.targetKey,
60
- clientKey: s.clientKey
58
+ targetKey: n.targetKey,
59
+ clientKey: n.clientKey
61
60
  };
62
61
  });
63
- const b = y(
62
+ const C = y(
64
63
  () => {
65
- var t, o, e, r;
64
+ var e, o, t, r;
66
65
  return Object.keys(
67
- ((r = (e = (o = (t = n.operation.information) == null ? void 0 : t.requestBody) == null ? void 0 : o.content) == null ? void 0 : e["application/json"]) == null ? void 0 : r.examples) ?? {}
66
+ ((r = (t = (o = (e = a.operation.information) == null ? void 0 : e.requestBody) == null ? void 0 : o.content) == null ? void 0 : t["application/json"]) == null ? void 0 : r.examples) ?? {}
68
67
  ).length > 1;
69
68
  }
70
- ), c = M(re);
71
- async function k() {
69
+ ), i = I(te);
70
+ async function S() {
72
71
  var r, m, u;
73
72
  if (l.value.targetKey === "customExamples")
74
- return ((m = (r = n.customExamples) == null ? void 0 : r[l.value.clientKey]) == null ? void 0 : m.source) ?? "";
75
- const t = ge(
73
+ return ((m = (r = a.customExamples) == null ? void 0 : r[l.value.clientKey]) == null ? void 0 : m.source) ?? "";
74
+ const e = de(
76
75
  {
77
- url: he(S)
76
+ url: fe(E)
78
77
  },
79
- Z(
80
- n.operation,
78
+ W(
79
+ a.operation,
81
80
  {
82
81
  replaceVariables: !0
83
82
  },
84
- E.value
83
+ x.value
85
84
  ),
86
- ce(
87
- g,
88
- ((u = n.operation.information) == null ? void 0 : u.security) ?? (c == null ? void 0 : c())
85
+ le(
86
+ h,
87
+ ((u = a.operation.information) == null ? void 0 : u.security) ?? (i == null ? void 0 : i())
89
88
  )
90
- ), o = s.clientKey === "undici" || s.clientKey === "fetch" || s.clientKey === "ofetch" ? s.clientKey : null, e = s.targetKey.replace("javascript", "js");
91
- if (o && R().hasPlugin(e, o) && (e === "node" || e === "js"))
92
- return R().print(e, o, t) ?? "";
89
+ ), o = n.clientKey === "undici" || n.clientKey === "fetch" || n.clientKey === "ofetch" ? n.clientKey : null, t = n.targetKey.replace("javascript", "js");
90
+ if (o && R().hasPlugin(t, o) && (t === "node" || t === "js"))
91
+ return R().print(t, o, e) ?? "";
93
92
  try {
94
- return await new ee(t).convert(
95
- s.targetKey,
96
- s.clientKey
93
+ return await new Z(e).convert(
94
+ n.targetKey,
95
+ n.clientKey
97
96
  );
98
97
  } catch (f) {
99
98
  return console.error("[ExampleRequest]", f), "";
100
99
  }
101
100
  }
102
- const h = G(async () => {
101
+ const q = X(async () => {
103
102
  try {
104
- return await k();
105
- } catch (t) {
106
- return console.error("[generateSnippet]", t), "";
103
+ return await S();
104
+ } catch (e) {
105
+ return console.error("[generateSnippet]", e), "";
107
106
  }
108
- }, X[C] ?? "");
109
- Y(async () => {
110
- const t = z();
111
- t.payload.data[C] = await k();
112
- }), y(() => de({
113
- serverState: S,
114
- authenticationState: g,
115
- operation: n.operation,
116
- globalSecurity: c == null ? void 0 : c()
107
+ }, Q[K] ?? "");
108
+ M(async () => {
109
+ const e = Y();
110
+ e.payload.data[K] = await S();
111
+ }), y(() => pe({
112
+ serverState: E,
113
+ authenticationState: h,
114
+ operation: a.operation,
115
+ globalSecurity: i == null ? void 0 : i()
117
116
  }));
118
- const J = y(() => {
119
- var o, e, r;
120
- const t = (
117
+ const A = y(() => {
118
+ var o, t, r;
119
+ const e = (
121
120
  // Specified language
122
- ((o = l.value) == null ? void 0 : o.targetKey) === "customExamples" ? ((r = (e = n.customExamples) == null ? void 0 : e[l.value.clientKey]) == null ? void 0 : r.lang) ?? "plaintext" : (
121
+ ((o = l.value) == null ? void 0 : o.targetKey) === "customExamples" ? ((r = (t = a.customExamples) == null ? void 0 : t[l.value.clientKey]) == null ? void 0 : r.lang) ?? "plaintext" : (
123
122
  // Or language for the globally selected HTTP client
124
- s.targetKey
123
+ n.targetKey
125
124
  )
126
125
  );
127
- return t === "shell" && h.value.includes("curl") ? "curl" : t === "Objective-C" ? "objc" : t;
128
- }), P = y(() => {
126
+ return e === "shell" && q.value.includes("curl") ? "curl" : e === "Objective-C" ? "objc" : e;
127
+ }), J = y(() => {
129
128
  var o;
130
- const t = w.value.map((e) => ({
131
- value: e.key,
132
- label: e.title,
133
- options: e.clients.map((r) => ({
129
+ const e = $.value.map((t) => ({
130
+ value: t.key,
131
+ label: t.title,
132
+ options: t.clients.map((r) => ({
134
133
  value: JSON.stringify({
135
- targetKey: e.key,
134
+ targetKey: t.key,
136
135
  clientKey: r.key
137
136
  }),
138
137
  label: r.title
139
138
  }))
140
139
  }));
141
- return (o = n.customExamples) != null && o.length && t.unshift({
140
+ return (o = a.customExamples) != null && o.length && e.unshift({
142
141
  value: "customExamples",
143
142
  label: "Examples",
144
- options: n.customExamples.map((e, r) => ({
143
+ options: a.customExamples.map((t, r) => ({
145
144
  value: JSON.stringify({
146
145
  targetKey: "customExamples",
147
146
  clientKey: r
148
147
  }),
149
- label: e.label ?? e.lang ?? `Example #${r + 1}`
148
+ label: t.label ?? t.lang ?? `Example #${r + 1}`
150
149
  }))
151
- }), t;
150
+ }), e;
152
151
  });
153
- function U(t) {
154
- const o = JSON.parse(t);
155
- o.targetKey === "customExamples" ? l.value = o : $(o);
152
+ function P(e) {
153
+ const o = JSON.parse(e);
154
+ o.targetKey === "customExamples" ? l.value = o : T(o);
156
155
  }
157
- return (t, o) => (d(), V(a(ae), { class: "dark-mode" }, {
158
- default: p(() => [
159
- i(a(ne), { muted: "" }, {
160
- actions: p(() => [
161
- i(oe, {
156
+ return (e, o) => (d(), b(s(oe), { class: "dark-mode" }, {
157
+ default: c(() => [
158
+ p(s(re), { muted: "" }, {
159
+ actions: c(() => [
160
+ p(ee, {
162
161
  class: "request-client-picker",
163
162
  modelValue: JSON.stringify(l.value),
164
- options: P.value,
165
- "onUpdate:modelValue": U
163
+ options: J.value,
164
+ "onUpdate:modelValue": P
166
165
  }, {
167
- default: p(() => {
168
- var e;
166
+ default: c(() => {
167
+ var t;
169
168
  return [
170
- l.value.targetKey === "customExamples" ? (d(), v(H, { key: 0 }, [
171
- O(K(((e = n.customExamples) == null ? void 0 : e[l.value.clientKey].label) ?? "Example"), 1)
172
- ], 64)) : (d(), v(H, { key: 1 }, [
173
- O(K(a(F)) + " " + K(a(A)), 1)
169
+ l.value.targetKey === "customExamples" ? (d(), g(V, { key: 0 }, [
170
+ H(v(((t = a.customExamples) == null ? void 0 : t[l.value.clientKey].label) ?? "Example"), 1)
171
+ ], 64)) : (d(), g(V, { key: 1 }, [
172
+ H(v(s(w)) + " " + v(s(F)), 1)
174
173
  ], 64))
175
174
  ];
176
175
  }),
177
176
  _: 1
178
- }, 8, ["modelValue", "options"]),
179
- x("button", {
180
- class: "copy-button",
181
- type: "button",
182
- onClick: o[0] || (o[0] = (e) => a(B)(a(h)))
183
- }, [
184
- i(a(D), {
185
- icon: "Clipboard",
186
- width: "10px"
187
- })
188
- ])
177
+ }, 8, ["modelValue", "options"])
189
178
  ]),
190
- default: p(() => [
191
- x("div", ve, [
192
- i(a(se), {
179
+ default: c(() => [
180
+ O("div", ye, [
181
+ p(s(ae), {
193
182
  as: "span",
194
183
  class: "request-method",
195
- method: t.operation.httpVerb
184
+ method: e.operation.httpVerb
196
185
  }, null, 8, ["method"]),
197
- j(t.$slots, "header", {}, void 0, !0)
186
+ j(e.$slots, "header", {}, void 0, !0)
198
187
  ])
199
188
  ]),
200
189
  _: 3
201
190
  }),
202
- i(a(le), {
191
+ p(s(ne), {
203
192
  borderless: "",
204
193
  class: "request-editor-section custom-scroll",
205
194
  frameless: ""
206
195
  }, {
207
- default: p(() => [
208
- x("div", Ke, [
209
- i(a(Q), {
210
- content: a(h),
211
- hideCredentials: a(ie)(a(g)),
212
- lang: J.value,
196
+ default: c(() => [
197
+ O("div", he, [
198
+ p(s(z), {
199
+ content: s(q),
200
+ hideCredentials: s(se)(s(h)),
201
+ lang: A.value,
213
202
  lineNumbers: ""
214
203
  }, null, 8, ["content", "hideCredentials", "lang"])
215
204
  ])
216
205
  ]),
217
206
  _: 1
218
207
  }),
219
- b.value || t.$slots.footer ? (d(), V(a(pe), {
208
+ C.value || e.$slots.footer ? (d(), b(s(ie), {
220
209
  key: 0,
221
210
  class: "request-card-footer",
222
211
  contrast: ""
223
212
  }, {
224
- default: p(() => {
225
- var e, r, m, u;
213
+ default: c(() => {
214
+ var t, r, m, u;
226
215
  return [
227
- b.value ? (d(), v("div", xe, [
228
- i(te, {
216
+ C.value ? (d(), g("div", ge, [
217
+ p(G, {
229
218
  class: "request-example-selector",
230
- examples: ((u = (m = (r = (e = t.operation.information) == null ? void 0 : e.requestBody) == null ? void 0 : r.content) == null ? void 0 : m["application/json"]) == null ? void 0 : u.examples) ?? [],
231
- "onUpdate:modelValue": o[1] || (o[1] = (f) => E.value = f)
219
+ examples: ((u = (m = (r = (t = e.operation.information) == null ? void 0 : t.requestBody) == null ? void 0 : r.content) == null ? void 0 : m["application/json"]) == null ? void 0 : u.examples) ?? [],
220
+ "onUpdate:modelValue": o[0] || (o[0] = (f) => x.value = f)
232
221
  }, null, 8, ["examples"])
233
222
  ])) : N("", !0),
234
- j(t.$slots, "footer", {}, void 0, !0)
223
+ j(e.$slots, "footer", {}, void 0, !0)
235
224
  ];
236
225
  }),
237
226
  _: 3
@@ -242,5 +231,5 @@ const ve = { class: "request-header" }, Ke = { class: "code-snippet" }, xe = {
242
231
  }
243
232
  });
244
233
  export {
245
- Ye as default
234
+ Ue as default
246
235
  };