@scalar/api-reference 1.25.30 → 1.25.32

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.
@@ -2,7 +2,7 @@ import o from "./ApiReferenceLayout.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../_virtual/_plugin-vue_export-helper.js";
5
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-63cf628e"]]);
5
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-080d0f80"]]);
6
6
  export {
7
7
  m as default
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";AAuHA,wBAKG"}
1
+ {"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";AAqHA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ClientLibraries.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-dbf83e74"]]);
4
+ const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7df7ca7f"]]);
5
5
  export {
6
- a as default
6
+ i as default
7
7
  };
@@ -1,22 +1,20 @@
1
- import { defineComponent as s, openBlock as r, createElementBlock as i, unref as t, Fragment as d, createElementVNode as o, createVNode as p, toDisplayString as n, createCommentVNode as m, pushScopeId as _, popScopeId as u } from "vue";
1
+ import { defineComponent as a, unref as t, openBlock as l, createElementBlock as s, createElementVNode as o, createVNode as d, toDisplayString as i, createCommentVNode as p, pushScopeId as _, popScopeId as m } from "vue";
2
2
  import f from "./ClientSelector.vue.js";
3
3
  import { useHttpClientStore as h } from "../../../stores/useHttpClientStore.js";
4
- const C = (e) => (_("data-v-dbf83e74"), e = e(), u(), e), g = /* @__PURE__ */ C(() => /* @__PURE__ */ o("div", { class: "client-libraries-heading" }, "Client Libraries", -1)), v = {
4
+ const u = (e) => (_("data-v-7df7ca7f"), e = e(), m(), e), C = { key: 0 }, v = /* @__PURE__ */ u(() => /* @__PURE__ */ o("div", { class: "client-libraries-heading" }, "Client Libraries", -1)), S = {
5
5
  class: "selected-client card-footer",
6
6
  muted: ""
7
- }, N = /* @__PURE__ */ s({
7
+ }, N = /* @__PURE__ */ a({
8
8
  __name: "ClientLibraries",
9
9
  setup(e) {
10
- const { availableTargets: l, httpTargetTitle: a, httpClientTitle: c } = h();
11
- return (S, b) => (r(), i("div", null, [
12
- t(l).length ? (r(), i(d, { key: 0 }, [
13
- g,
14
- o("div", null, [
15
- p(f)
16
- ]),
17
- o("div", v, n(t(c)) + " " + n(t(a)), 1)
18
- ], 64)) : m("", !0)
19
- ]));
10
+ const { availableTargets: r, httpTargetTitle: c, httpClientTitle: n } = h();
11
+ return (g, b) => t(r).length ? (l(), s("div", C, [
12
+ v,
13
+ o("div", null, [
14
+ d(f)
15
+ ]),
16
+ o("div", S, i(t(n)) + " " + i(t(c)), 1)
17
+ ])) : p("", !0);
20
18
  }
21
19
  });
22
20
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/Operation.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;;SAoBzD,MAAM;eACA,oBAAoB;;SAD1B,MAAM;eACA,oBAAoB;;AAiPjC,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":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/Operation.vue"],"names":[],"mappings":"AAoFA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;;SAoBzD,MAAM;eACA,oBAAoB;;SAD1B,MAAM;eACA,oBAAoB;;AAiPjC,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 "./Operation.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-307792e5"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d485e1e4"]]);
5
5
  export {
6
- e as default
6
+ a as default
7
7
  };
@@ -3,35 +3,35 @@ import h from "./EndpointDetails.vue.js";
3
3
  import _ from "./EndpointPath.vue.js";
4
4
  import C from "./TestRequestButton.vue.js";
5
5
  import S from "../../Section/Section.vue.js";
6
- import B from "../../Section/SectionContent.vue.js";
7
- import E from "../../Section/SectionColumns.vue.js";
6
+ import k from "../../Section/SectionContent.vue.js";
7
+ import B from "../../Section/SectionColumns.vue.js";
8
8
  import d from "../../Section/SectionColumn.vue.js";
9
- import N from "../../Badge/Badge.vue.js";
10
- import V from "../../Section/SectionHeader.vue.js";
11
- import g from "../../Anchor/Anchor.vue.js";
12
- import k from "../../../features/ExampleRequest/ExampleRequest.vue.js";
13
- import v from "../../../features/ExampleResponses/ExampleResponses.vue.js";
14
- const y = { class: "examples" }, I = /* @__PURE__ */ f({
9
+ import E from "../../Badge/Badge.vue.js";
10
+ import N from "../../Section/SectionHeader.vue.js";
11
+ import V from "../../Anchor/Anchor.vue.js";
12
+ import b from "../../../features/ExampleRequest/ExampleRequest.vue.js";
13
+ import g from "../../../features/ExampleResponses/ExampleResponses.vue.js";
14
+ const v = { class: "examples" }, I = /* @__PURE__ */ f({
15
15
  __name: "Operation",
16
16
  props: {
17
17
  id: {},
18
18
  operation: {}
19
19
  },
20
- setup(R) {
21
- return (e, b) => (i(), p(t(S), {
20
+ setup(y) {
21
+ return (e, R) => (i(), p(t(S), {
22
22
  id: e.id,
23
23
  label: e.operation.name
24
24
  }, {
25
25
  default: r(() => [
26
- o(t(B), null, {
26
+ o(t(k), null, {
27
27
  default: r(() => [
28
- o(t(E), null, {
28
+ o(t(B), null, {
29
29
  default: r(() => [
30
30
  o(t(d), null, {
31
31
  default: r(() => {
32
32
  var a, n;
33
33
  return [
34
- (a = e.operation.information) != null && a.deprecated ? (i(), p(t(N), { key: 0 }, {
34
+ (a = e.operation.information) != null && a.deprecated ? (i(), p(t(E), { key: 0 }, {
35
35
  default: r(() => [
36
36
  l(" Deprecated ")
37
37
  ]),
@@ -40,9 +40,9 @@ const y = { class: "examples" }, I = /* @__PURE__ */ f({
40
40
  m("div", {
41
41
  class: u((n = e.operation.information) != null && n.deprecated ? "deprecated" : "")
42
42
  }, [
43
- o(t(V), { level: 3 }, {
43
+ o(t(N), { level: 3 }, {
44
44
  default: r(() => [
45
- o(t(g), {
45
+ o(t(V), {
46
46
  id: e.id ?? ""
47
47
  }, {
48
48
  default: r(() => [
@@ -61,8 +61,11 @@ const y = { class: "examples" }, I = /* @__PURE__ */ f({
61
61
  }),
62
62
  o(t(d), null, {
63
63
  default: r(() => [
64
- m("div", y, [
65
- o(t(k), { operation: e.operation }, {
64
+ m("div", v, [
65
+ o(t(b), {
66
+ fallback: "",
67
+ operation: e.operation
68
+ }, {
66
69
  header: r(() => {
67
70
  var a;
68
71
  return [
@@ -78,7 +81,7 @@ const y = { class: "examples" }, I = /* @__PURE__ */ f({
78
81
  ]),
79
82
  _: 1
80
83
  }, 8, ["operation"]),
81
- o(t(v), {
84
+ o(t(g), {
82
85
  operation: e.operation,
83
86
  style: { "margin-top": "12px" }
84
87
  }, null, 8, ["operation"])
@@ -1 +1 @@
1
- {"version":3,"file":"OperationAccordion.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/OperationAccordion.vue"],"names":[],"mappings":"AAyNA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;;SAiBzD,MAAM;eACA,oBAAoB;;SAD1B,MAAM;eACA,oBAAoB;;AA2QjC,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":"OperationAccordion.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operation/OperationAccordion.vue"],"names":[],"mappings":"AA0NA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;;SAiBzD,MAAM;eACA,oBAAoB;;SAD1B,MAAM;eACA,oBAAoB;;AA2QjC,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 "./OperationAccordion.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9b0621a3"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-79ac1ab2"]]);
5
5
  export {
6
- c as default
6
+ p as default
7
7
  };
@@ -1,12 +1,18 @@
1
1
  import type { TransformedOperation } from '@scalar/types/legacy';
2
2
  declare function __VLS_template(): {
3
3
  header?(_: {}): any;
4
+ header?(_: {}): any;
5
+ footer?(_: {}): any;
4
6
  footer?(_: {}): any;
5
7
  };
6
8
  declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
7
9
  operation: TransformedOperation;
10
+ /** Show a simplified card if no example are available */
11
+ fallback?: boolean;
8
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
13
  operation: TransformedOperation;
14
+ /** Show a simplified card if no example are available */
15
+ fallback?: boolean;
10
16
  }>>>, {}, {}>;
11
17
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
12
18
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ExampleRequest/ExampleRequest.vue"],"names":[],"mappings":"AA4WA,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,sBAAsB,CAAA;AA8O7B,iBAAS,cAAc;oBAiNM,GAAG;oBACH,GAAG;EAmC/B;AACD,QAAA,MAAM,eAAe;eArcR,oBAAoB;;eAApB,oBAAoB;aA2c/B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,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,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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 r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7e225631"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-db770e2d"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as U, ref as q, computed as d, watch as L, inject as I, onServerPrefetch as M, useSSRContext as P, unref as r, openBlock as p, createBlock as _, withCtx as c, createVNode as u, createElementBlock as y, Fragment as V, createTextVNode as O, toDisplayString as v, createElementVNode as H, renderSlot as N, createCommentVNode as g } from "vue";
2
- import { ScalarCodeBlock as Y } from "@scalar/components";
3
- import { createHash as D, ssrState as z } from "@scalar/oas-utils/helpers";
4
- import { getRequestFromOperation as G } from "@scalar/oas-utils/spec-getters";
5
- import { asyncComputed as Q } from "@vueuse/core";
6
- import W from "./ExamplePicker.vue.js";
7
- import X from "./TextSelect.vue.js";
1
+ import { defineComponent as M, ref as O, computed as d, watch as P, inject as Y, onServerPrefetch as D, useSSRContext as z, unref as a, openBlock as m, createBlock as h, withCtx as i, createVNode as c, createElementBlock as v, Fragment as B, createTextVNode as H, toDisplayString as g, createElementVNode as K, renderSlot as f, createCommentVNode as C } from "vue";
2
+ import { ScalarCodeBlock as G } from "@scalar/components";
3
+ import { createHash as Q, ssrState as W } from "@scalar/oas-utils/helpers";
4
+ import { getRequestFromOperation as X } from "@scalar/oas-utils/spec-getters";
5
+ import { asyncComputed as Z } from "@vueuse/core";
6
+ import ee from "./ExamplePicker.vue.js";
7
+ import te from "./TextSelect.vue.js";
8
8
  /* empty css */
9
- import { GLOBAL_SECURITY_SYMBOL as Z } from "../../helpers/provideSymbols.js";
10
- import ee from "../../components/Card/Card.vue.js";
11
- import te from "../../components/Card/CardHeader.vue.js";
12
- import oe from "../../components/HttpMethod/HttpMethod.vue.js";
13
- import re from "../../components/Card/CardContent.vue.js";
14
- import { getSecretCredentialsFromAuthentication as ae, getRequestFromAuthentication as ne } from "../../legacy/helpers/getRequestFromAuthentication.js";
15
- import se from "../../components/Card/CardFooter.vue.js";
9
+ import { GLOBAL_SECURITY_SYMBOL as oe } from "../../helpers/provideSymbols.js";
10
+ import N from "../../components/Card/Card.vue.js";
11
+ import ae from "../../components/Card/CardHeader.vue.js";
12
+ import R from "../../components/HttpMethod/HttpMethod.vue.js";
13
+ import $ from "../../components/Card/CardContent.vue.js";
14
+ import { getSecretCredentialsFromAuthentication as re, getRequestFromAuthentication as se } from "../../legacy/helpers/getRequestFromAuthentication.js";
15
+ import ne from "../../components/Card/CardFooter.vue.js";
16
16
  import { getExampleCode as le } from "../../helpers/getExampleCode.js";
17
17
  import { useHttpClientStore as ie } from "../../stores/useHttpClientStore.js";
18
18
  import { useServerStore as ce } from "../../legacy/stores/useServerStore.js";
@@ -22,98 +22,99 @@ import { getUrlFromServerState as pe } from "../../legacy/helpers/getUrlFromServ
22
22
  const de = { class: "request-header" }, fe = { class: "code-snippet" }, ye = {
23
23
  key: 0,
24
24
  class: "request-card-footer-addon"
25
- }, we = /* @__PURE__ */ U({
25
+ }, he = { class: "request-header" }, Ae = /* @__PURE__ */ M({
26
26
  __name: "ExampleRequest",
27
27
  props: {
28
- operation: {}
28
+ operation: {},
29
+ fallback: { type: Boolean }
29
30
  },
30
- setup(R) {
31
- const n = R, h = `components-Content-Operation-Example-Request${D(
32
- n.operation.path + n.operation.httpVerb + n.operation.operationId
33
- )}`, K = q(), {
34
- httpClient: s,
35
- setHttpClient: B,
31
+ setup(j) {
32
+ const s = j, S = `components-Content-Operation-Example-Request${Q(
33
+ s.operation.path + s.operation.httpVerb + s.operation.operationId
34
+ )}`, k = O(), {
35
+ httpClient: n,
36
+ setHttpClient: F,
36
37
  availableTargets: x,
37
- httpTargetTitle: $,
38
- httpClientTitle: j
39
- } = ie(), { server: F } = ce(), { authentication: C } = ue(), i = d(() => {
38
+ httpTargetTitle: T,
39
+ httpClientTitle: w
40
+ } = ie(), { server: A } = ce(), { authentication: E } = ue(), u = d(() => {
40
41
  var t;
41
42
  const e = ["x-custom-examples", "x-codeSamples", "x-code-samples"];
42
43
  for (const o of e)
43
- if ((t = n.operation.information) != null && t[o])
44
- return n.operation.information[o] ?? [];
44
+ if ((t = s.operation.information) != null && t[o])
45
+ return s.operation.information[o] ?? [];
45
46
  return [];
46
- }), a = q(
47
+ }), r = O(
47
48
  // Default to first custom example
48
- i.value.length ? {
49
+ u.value.length ? {
49
50
  targetKey: "customExamples",
50
51
  clientKey: 0
51
52
  } : (
52
53
  // Otherwise use the globally selected HTTP client
53
54
  {
54
- targetKey: s.targetKey,
55
- clientKey: s.clientKey
55
+ targetKey: n.targetKey,
56
+ clientKey: n.clientKey
56
57
  }
57
58
  )
58
59
  );
59
- L(s, () => {
60
- a.value = {
61
- targetKey: s.targetKey,
62
- clientKey: s.clientKey
60
+ P(n, () => {
61
+ r.value = {
62
+ targetKey: n.targetKey,
63
+ clientKey: n.clientKey
63
64
  };
64
65
  });
65
- const S = d(
66
+ const b = d(
66
67
  () => {
67
68
  var e, t, o, l;
68
69
  return Object.keys(
69
- ((l = (o = (t = (e = n.operation.information) == null ? void 0 : e.requestBody) == null ? void 0 : t.content) == null ? void 0 : o["application/json"]) == null ? void 0 : l.examples) ?? {}
70
+ ((l = (o = (t = (e = s.operation.information) == null ? void 0 : e.requestBody) == null ? void 0 : t.content) == null ? void 0 : o["application/json"]) == null ? void 0 : l.examples) ?? {}
70
71
  ).length > 1;
71
72
  }
72
- ), f = I(Z);
73
- async function E() {
74
- var l, m;
75
- if (a.value.targetKey === "customExamples")
76
- return ((l = i.value[a.value.clientKey]) == null ? void 0 : l.source) ?? "";
73
+ ), y = Y(oe);
74
+ async function q() {
75
+ var l, p;
76
+ if (r.value.targetKey === "customExamples")
77
+ return ((l = u.value[r.value.clientKey]) == null ? void 0 : l.source) ?? "";
77
78
  const e = me(
78
79
  {
79
- url: pe(F)
80
+ url: pe(A)
80
81
  },
81
- G(
82
- n.operation,
82
+ X(
83
+ s.operation,
83
84
  {
84
85
  replaceVariables: !0
85
86
  },
86
- K.value
87
+ k.value
87
88
  ),
88
- ne(
89
- C,
90
- ((m = n.operation.information) == null ? void 0 : m.security) ?? (f == null ? void 0 : f())
89
+ se(
90
+ E,
91
+ ((p = s.operation.information) == null ? void 0 : p.security) ?? (y == null ? void 0 : y())
91
92
  )
92
- ), t = s.clientKey, o = s.targetKey;
93
+ ), t = n.clientKey, o = n.targetKey;
93
94
  return await le(e, o, t) ?? "";
94
95
  }
95
- const k = Q(async () => {
96
+ const _ = Z(async () => {
96
97
  try {
97
- return await E();
98
+ return await q();
98
99
  } catch (e) {
99
100
  return console.error("[generateSnippet]", e), "";
100
101
  }
101
- }, z[h] ?? "");
102
- M(async () => {
103
- const e = P();
104
- e.payload.data[h] = await E();
102
+ }, W[S] ?? "");
103
+ D(async () => {
104
+ const e = z();
105
+ e.payload.data[S] = await q();
105
106
  });
106
- const T = d(() => {
107
+ const J = d(() => {
107
108
  var t, o;
108
109
  const e = (
109
110
  // Specified language
110
- ((t = a.value) == null ? void 0 : t.targetKey) === "customExamples" ? ((o = i.value[a.value.clientKey]) == null ? void 0 : o.lang) ?? "plaintext" : (
111
+ ((t = r.value) == null ? void 0 : t.targetKey) === "customExamples" ? ((o = u.value[r.value.clientKey]) == null ? void 0 : o.lang) ?? "plaintext" : (
111
112
  // Or language for the globally selected HTTP client
112
- s.targetKey
113
+ n.targetKey
113
114
  )
114
115
  );
115
- return e === "shell" && k.value.includes("curl") ? "curl" : e === "Objective-C" ? "objc" : e;
116
- }), w = d(() => {
116
+ return e === "shell" && _.value.includes("curl") ? "curl" : e === "Objective-C" ? "objc" : e;
117
+ }), U = d(() => {
117
118
  const e = x.value.map((t) => ({
118
119
  value: t.key,
119
120
  label: t.title,
@@ -125,10 +126,10 @@ const de = { class: "request-header" }, fe = { class: "code-snippet" }, ye = {
125
126
  label: o.title
126
127
  }))
127
128
  }));
128
- return i.value.length && e.unshift({
129
+ return u.value.length && e.unshift({
129
130
  value: "customExamples",
130
131
  label: "Examples",
131
- options: i.value.map((t, o) => ({
132
+ options: u.value.map((t, o) => ({
132
133
  value: JSON.stringify({
133
134
  targetKey: "customExamples",
134
135
  clientKey: o
@@ -137,88 +138,109 @@ const de = { class: "request-header" }, fe = { class: "code-snippet" }, ye = {
137
138
  }))
138
139
  }), e;
139
140
  });
140
- function A(e) {
141
+ function L(e) {
141
142
  const t = JSON.parse(e);
142
- t.targetKey === "customExamples" ? a.value = t : B(t);
143
+ t.targetKey === "customExamples" ? r.value = t : F(t);
143
144
  }
144
- return (e, t) => r(x).length || i.value.length ? (p(), _(r(ee), {
145
+ return (e, t) => a(x).length || u.value.length ? (m(), h(a(N), {
145
146
  key: 0,
146
147
  class: "dark-mode"
147
148
  }, {
148
- default: c(() => [
149
- u(r(te), { muted: "" }, {
150
- actions: c(() => [
151
- u(X, {
149
+ default: i(() => [
150
+ c(a(ae), { muted: "" }, {
151
+ actions: i(() => [
152
+ c(te, {
152
153
  class: "request-client-picker",
153
- modelValue: JSON.stringify(a.value),
154
- options: w.value,
155
- "onUpdate:modelValue": A
154
+ modelValue: JSON.stringify(r.value),
155
+ options: U.value,
156
+ "onUpdate:modelValue": L
156
157
  }, {
157
- default: c(() => [
158
- a.value.targetKey === "customExamples" ? (p(), y(V, { key: 0 }, [
159
- O(v(i.value[a.value.clientKey].label ?? "Example"), 1)
160
- ], 64)) : (p(), y(V, { key: 1 }, [
161
- O(v(r($)) + " " + v(r(j)), 1)
158
+ default: i(() => [
159
+ r.value.targetKey === "customExamples" ? (m(), v(B, { key: 0 }, [
160
+ H(g(u.value[r.value.clientKey].label ?? "Example"), 1)
161
+ ], 64)) : (m(), v(B, { key: 1 }, [
162
+ H(g(a(T)) + " " + g(a(w)), 1)
162
163
  ], 64))
163
164
  ]),
164
165
  _: 1
165
166
  }, 8, ["modelValue", "options"])
166
167
  ]),
167
- default: c(() => [
168
- H("div", de, [
169
- u(r(oe), {
168
+ default: i(() => [
169
+ K("div", de, [
170
+ c(a(R), {
170
171
  as: "span",
171
172
  class: "request-method",
172
173
  method: e.operation.httpVerb
173
174
  }, null, 8, ["method"]),
174
- N(e.$slots, "header", {}, void 0, !0)
175
+ f(e.$slots, "header", {}, void 0, !0)
175
176
  ])
176
177
  ]),
177
178
  _: 3
178
179
  }),
179
- u(r(re), {
180
+ c(a($), {
180
181
  borderless: "",
181
182
  class: "request-editor-section custom-scroll",
182
183
  frameless: ""
183
184
  }, {
184
- default: c(() => [
185
- H("div", fe, [
186
- u(r(Y), {
185
+ default: i(() => [
186
+ K("div", fe, [
187
+ c(a(G), {
187
188
  class: "bg-b-2",
188
- content: r(k),
189
- hideCredentials: r(ae)(r(C)),
190
- lang: T.value,
189
+ content: a(_),
190
+ hideCredentials: a(re)(a(E)),
191
+ lang: J.value,
191
192
  lineNumbers: ""
192
193
  }, null, 8, ["content", "hideCredentials", "lang"])
193
194
  ])
194
195
  ]),
195
196
  _: 1
196
197
  }),
197
- S.value || e.$slots.footer ? (p(), _(r(se), {
198
+ b.value || e.$slots.footer ? (m(), h(a(ne), {
198
199
  key: 0,
199
200
  class: "request-card-footer",
200
201
  contrast: ""
201
202
  }, {
202
- default: c(() => {
203
- var o, l, m, b;
203
+ default: i(() => {
204
+ var o, l, p, V;
204
205
  return [
205
- S.value ? (p(), y("div", ye, [
206
- u(W, {
206
+ b.value ? (m(), v("div", ye, [
207
+ c(ee, {
207
208
  class: "request-example-selector",
208
- examples: ((b = (m = (l = (o = e.operation.information) == null ? void 0 : o.requestBody) == null ? void 0 : l.content) == null ? void 0 : m["application/json"]) == null ? void 0 : b.examples) ?? [],
209
- "onUpdate:modelValue": t[0] || (t[0] = (J) => K.value = J)
209
+ examples: ((V = (p = (l = (o = e.operation.information) == null ? void 0 : o.requestBody) == null ? void 0 : l.content) == null ? void 0 : p["application/json"]) == null ? void 0 : V.examples) ?? [],
210
+ "onUpdate:modelValue": t[0] || (t[0] = (I) => k.value = I)
210
211
  }, null, 8, ["examples"])
211
- ])) : g("", !0),
212
- N(e.$slots, "footer", {}, void 0, !0)
212
+ ])) : C("", !0),
213
+ f(e.$slots, "footer", {}, void 0, !0)
213
214
  ];
214
215
  }),
215
216
  _: 3
216
- })) : g("", !0)
217
+ })) : C("", !0)
217
218
  ]),
218
219
  _: 3
219
- })) : g("", !0);
220
+ })) : e.fallback ? (m(), h(a(N), {
221
+ key: 1,
222
+ class: "dark-mode"
223
+ }, {
224
+ default: i(() => [
225
+ c(a($), { class: "request-card-simple" }, {
226
+ default: i(() => [
227
+ K("div", he, [
228
+ c(a(R), {
229
+ as: "span",
230
+ class: "request-method",
231
+ method: e.operation.httpVerb
232
+ }, null, 8, ["method"]),
233
+ f(e.$slots, "header", {}, void 0, !0)
234
+ ]),
235
+ f(e.$slots, "footer", {}, void 0, !0)
236
+ ]),
237
+ _: 3
238
+ })
239
+ ]),
240
+ _: 3
241
+ })) : C("", !0);
220
242
  }
221
243
  });
222
244
  export {
223
- we as default
245
+ Ae as default
224
246
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,KAAK,CAAA;AAmD1E;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,KAAK,GACN,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAChD,KAAK,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;CACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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