@scalar/api-reference 1.28.23 → 1.28.25

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 (27) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/browser/standalone.js +5904 -5810
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  5. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  6. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +100 -57
  7. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  8. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  9. package/dist/components/Content/Introduction/Introduction.vue2.js +43 -42
  10. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
  11. package/dist/components/SpecificationExtension/SpecificationExtension.vue.d.ts.map +1 -1
  12. package/dist/components/SpecificationExtension/SpecificationExtension.vue.js +26 -21
  13. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  14. package/dist/features/ApiClientModal/ApiClientModal.vue.js +35 -31
  15. package/dist/features/ApiClientModal/useApiClient.d.ts +122 -22
  16. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  17. package/dist/helpers/get-request.d.ts.map +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/standalone/lib/html-api.d.ts +1 -20
  22. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  23. package/dist/standalone/lib/html-api.js +11 -11
  24. package/dist/standalone/lib/register-globals.d.ts +1 -1
  25. package/dist/standalone/lib/register-globals.d.ts.map +1 -1
  26. package/dist/style.css +1 -1
  27. package/package.json +10 -9
@@ -1 +1 @@
1
- {"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";AAmTA,wBAKG"}
1
+ {"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";AAmbA,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 i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a8ebef7d"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-db261135"]]);
5
5
  export {
6
- i as default
6
+ e as default
7
7
  };
@@ -1,82 +1,125 @@
1
- import { defineComponent as v, ref as I, useId as p, watch as P, unref as e, openBlock as n, createElementBlock as d, createVNode as l, withCtx as i, createElementVNode as K, Fragment as L, renderList as N, createBlock as V, createTextVNode as B, toDisplayString as o, createCommentVNode as F } from "vue";
2
- import { TabGroup as H, TabList as S, TabPanels as w, TabPanel as E } from "@headlessui/vue";
3
- import D from "./ClientSelector.vue.js";
4
- import { useFeaturedHttpClients as G } from "./useFeaturedHttpClients.js";
5
- import { useHttpClientStore as j } from "../../../stores/useHttpClientStore.js";
6
- const q = { key: 0 }, z = ["id"], A = ["id"], W = /* @__PURE__ */ v({
1
+ import { defineComponent as B, ref as N, useId as h, watch as V, computed as F, unref as e, openBlock as n, createElementBlock as l, createVNode as i, withCtx as m, createElementVNode as H, Fragment as y, createCommentVNode as _, renderList as S, createBlock as A, createTextVNode as E, toDisplayString as p } from "vue";
2
+ import { TabGroup as j, TabList as D, TabPanels as G, TabPanel as M } from "@headlessui/vue";
3
+ import { useWorkspace as O } from "@scalar/api-client/store";
4
+ import { ScalarMarkdown as W, ScalarCodeBlock as q } from "@scalar/components";
5
+ import z from "./ClientSelector.vue.js";
6
+ import { useFeaturedHttpClients as J } from "./useFeaturedHttpClients.js";
7
+ import { useHttpClientStore as Q } from "../../../stores/useHttpClientStore.js";
8
+ const R = { key: 0 }, U = ["id"], Y = {
9
+ key: 0,
10
+ class: "selected-client card-footer -outline-offset-2",
11
+ role: "tabpanel",
12
+ tabindex: "0"
13
+ }, Z = {
14
+ key: 1,
15
+ class: "selected-client card-footer -outline-offset-2",
16
+ role: "tabpanel",
17
+ tabindex: "1"
18
+ }, $ = ["id"], ie = /* @__PURE__ */ B({
7
19
  __name: "ClientLibraries",
8
- setup(J) {
20
+ setup(X) {
9
21
  const {
10
- availableTargets: _,
11
- httpTargetTitle: b,
12
- httpClientTitle: h,
13
- getClientTitle: C,
14
- getTargetTitle: g,
15
- httpClient: s,
16
- setHttpClient: T
17
- } = j(), { featuredClients: r, isFeatured: y } = G(), c = I(0), u = p(), f = p();
18
- P(
19
- s,
20
- (t) => {
21
- t && (c.value = r.findIndex(
22
- (a) => a.targetKey === t.targetKey && a.clientKey === t.clientKey
22
+ availableTargets: C,
23
+ httpTargetTitle: k,
24
+ httpClientTitle: x,
25
+ getClientTitle: T,
26
+ getTargetTitle: L,
27
+ httpClient: r,
28
+ setHttpClient: w
29
+ } = Q(), { featuredClients: d, isFeatured: I } = J(), K = O(), b = N(0), v = h(), g = h();
30
+ V(
31
+ r,
32
+ (a) => {
33
+ a && (b.value = d.findIndex(
34
+ (t) => t.targetKey === a.targetKey && t.clientKey === a.clientKey
23
35
  ));
24
36
  },
25
37
  { immediate: !0 }
26
38
  );
27
- function x(t) {
28
- const a = r[t];
29
- a && T(a);
39
+ function P(a) {
40
+ const t = d[a];
41
+ t && w(t);
30
42
  }
31
- return (t, a) => e(_).length ? (n(), d("div", q, [
32
- l(e(H), {
43
+ const o = F(() => {
44
+ var c;
45
+ const a = Object.values(K.collections)[0], t = (c = a == null ? void 0 : a.info) == null ? void 0 : c["x-scalar-sdk-installation"];
46
+ if (!Array.isArray(t) || !(t != null && t.length))
47
+ return;
48
+ const s = t.find(
49
+ (u) => {
50
+ var f;
51
+ return u.lang.toLowerCase() === ((f = r == null ? void 0 : r.targetKey) == null ? void 0 : f.toLowerCase());
52
+ }
53
+ );
54
+ if (s)
55
+ return s;
56
+ });
57
+ return (a, t) => e(C).length ? (n(), l("div", R, [
58
+ i(e(j), {
33
59
  manual: "",
34
- selectedIndex: c.value,
35
- onChange: x
60
+ selectedIndex: b.value,
61
+ onChange: P
36
62
  }, {
37
- default: i(() => [
38
- K("div", {
39
- id: e(u),
63
+ default: m(() => [
64
+ H("div", {
65
+ id: e(v),
40
66
  class: "client-libraries-heading"
41
- }, " Client Libraries ", 8, z),
42
- l(e(S), {
43
- "aria-labelledby": e(u),
67
+ }, " Client Libraries ", 8, U),
68
+ i(e(D), {
69
+ "aria-labelledby": e(v),
44
70
  class: "client-libraries-list"
45
71
  }, {
46
- default: i(() => [
47
- l(D, {
48
- featured: e(r),
49
- morePanel: e(f)
72
+ default: m(() => [
73
+ i(z, {
74
+ featured: e(d),
75
+ morePanel: e(g)
50
76
  }, null, 8, ["featured", "morePanel"])
51
77
  ]),
52
78
  _: 1
53
79
  }, 8, ["aria-labelledby"]),
54
- l(e(w), null, {
55
- default: i(() => [
56
- e(s) && e(y)(e(s)) ? (n(!0), d(L, { key: 0 }, N(e(r), (m, k) => (n(), V(e(E), {
57
- key: k,
58
- class: "selected-client card-footer -outline-offset-2"
59
- }, {
60
- default: i(() => [
61
- B(o(e(C)(m)) + " " + o(e(g)(m)), 1)
62
- ]),
63
- _: 2
64
- }, 1024))), 128)) : (n(), d("div", {
65
- key: 1,
66
- id: e(f),
67
- class: "selected-client card-footer -outline-offset-2",
68
- role: "tabpanel",
69
- tabindex: "0"
70
- }, o(e(h)) + " " + o(e(b)), 9, A))
71
- ]),
80
+ i(e(G), null, {
81
+ default: m(() => {
82
+ var s, c;
83
+ return [
84
+ (s = o.value) != null && s.source || (c = o.value) != null && c.description ? (n(), l(y, { key: 0 }, [
85
+ o.value.description ? (n(), l("div", Y, [
86
+ i(e(W), {
87
+ value: o.value.description
88
+ }, null, 8, ["value"])
89
+ ])) : _("", !0),
90
+ o.value.source ? (n(), l("div", Z, [
91
+ i(e(q), {
92
+ lang: "shell",
93
+ content: o.value.source,
94
+ copy: !1,
95
+ class: "min-h-6 p-1"
96
+ }, null, 8, ["content"])
97
+ ])) : _("", !0)
98
+ ], 64)) : e(r) && e(I)(e(r)) ? (n(!0), l(y, { key: 1 }, S(e(d), (u, f) => (n(), A(e(M), {
99
+ key: f,
100
+ class: "selected-client card-footer -outline-offset-2"
101
+ }, {
102
+ default: m(() => [
103
+ E(p(e(T)(u)) + " " + p(e(L)(u)), 1)
104
+ ]),
105
+ _: 2
106
+ }, 1024))), 128)) : (n(), l("div", {
107
+ key: 2,
108
+ id: e(g),
109
+ class: "selected-client card-footer -outline-offset-2",
110
+ role: "tabpanel",
111
+ tabindex: "0"
112
+ }, p(e(x)) + " " + p(e(k)), 9, $))
113
+ ];
114
+ }),
72
115
  _: 1
73
116
  })
74
117
  ]),
75
118
  _: 1
76
119
  }, 8, ["selectedIndex"])
77
- ])) : F("", !0);
120
+ ])) : _("", !0);
78
121
  }
79
122
  });
80
123
  export {
81
- W as default
124
+ ie as default
82
125
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Introduction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Introduction.vue"],"names":[],"mappings":"AAqHA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAwBhD,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CACX,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,CACrE,CAAA;IACD,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;AA0CF,iBAAS,cAAc;WAoKT,OAAO,IAA6B;;uBATtB,GAAG;uBACH,GAAG;;;;EAa9B;AAyBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Introduction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Introduction/Introduction.vue"],"names":[],"mappings":"AAsHA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAwBhD,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CACX,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,CACrE,CAAA;IACD,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;AA0CF,iBAAS,cAAc;WAyKT,OAAO,IAA6B;;uBATtB,GAAG;uBACH,GAAG;;;;EAa9B;AAyBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Introduction.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1f5477ab"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fdd1ed54"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,47 +1,47 @@
1
- import { defineComponent as $, computed as s, onMounted as D, openBlock as l, createBlock as a, unref as o, withCtx as t, createVNode as r, createElementVNode as S, createTextVNode as d, toDisplayString as u, createCommentVNode as f, renderSlot as _ } from "vue";
2
- import I from "github-slugger";
3
- import { useConfig as L } from "../../../hooks/useConfig.js";
4
- import { useNavState as V } from "../../../hooks/useNavState.js";
5
- import w from "../../../features/DownloadLink/DownloadLink.vue.js";
6
- import H from "./Description.vue.js";
7
- import B from "../../Section/SectionContainer.vue.js";
8
- import O from "../../Section/Section.vue.js";
9
- import { DEFAULT_INTRODUCTION_SLUG as U } from "../../../hooks/useSidebar.js";
10
- import b from "../../Section/SectionContent.vue.js";
1
+ import { defineComponent as D, computed as s, onMounted as I, openBlock as l, createBlock as a, unref as o, withCtx as t, createVNode as i, createElementVNode as S, createTextVNode as u, toDisplayString as d, createCommentVNode as f, renderSlot as _ } from "vue";
2
+ import L from "github-slugger";
3
+ import { useConfig as V } from "../../../hooks/useConfig.js";
4
+ import { useNavState as w } from "../../../hooks/useNavState.js";
5
+ import H from "../../../features/DownloadLink/DownloadLink.vue.js";
6
+ import B from "./Description.vue.js";
7
+ import O from "../../Section/SectionContainer.vue.js";
8
+ import U from "../../Section/Section.vue.js";
9
+ import { DEFAULT_INTRODUCTION_SLUG as b } from "../../../hooks/useSidebar.js";
10
+ import A from "../../Section/SectionContent.vue.js";
11
11
  import C from "../../Badge/Badge.vue.js";
12
- import A from "../../Section/SectionHeader.vue.js";
13
- import E from "../../Section/SectionHeaderTag.vue.js";
14
- import F from "../../Section/SectionColumns.vue.js";
12
+ import E from "../../Section/SectionHeader.vue.js";
13
+ import F from "../../Section/SectionHeaderTag.vue.js";
14
+ import G from "../../Section/SectionColumns.vue.js";
15
15
  import T from "../../Section/SectionColumn.vue.js";
16
- import G from "../../SpecificationExtension/SpecificationExtension.vue.js";
17
- const M = { class: "flex gap-1" }, R = { class: "sticky-cards" }, ne = /* @__PURE__ */ $({
16
+ import h from "../../SpecificationExtension/SpecificationExtension.vue.js";
17
+ const M = { class: "flex gap-1" }, R = { class: "sticky-cards" }, ne = /* @__PURE__ */ D({
18
18
  __name: "Introduction",
19
19
  props: {
20
20
  info: {},
21
21
  parsedSpec: {}
22
22
  },
23
- setup(h) {
24
- const i = h, { getHeadingId: k } = V(), m = s(
23
+ setup(k) {
24
+ const n = k, { getHeadingId: y } = w(), m = s(
25
25
  () => {
26
- var e, n;
27
- return ((e = i.parsedSpec) == null ? void 0 : e.openapi) ?? ((n = i.parsedSpec) == null ? void 0 : n.swagger) ?? "";
26
+ var e, r;
27
+ return ((e = n.parsedSpec) == null ? void 0 : e.openapi) ?? ((r = n.parsedSpec) == null ? void 0 : r.swagger) ?? "";
28
28
  }
29
- ), y = new I(), N = s(() => {
29
+ ), N = new L(), $ = s(() => {
30
30
  var e;
31
- return y.slug(((e = i.info) == null ? void 0 : e.title) ?? "");
31
+ return N.slug(((e = n.info) == null ? void 0 : e.title) ?? "");
32
32
  }), p = s(() => {
33
- var e, n;
34
- return typeof ((e = i.info) == null ? void 0 : e.version) == "string" ? i.info.version.toString().match(/^\d/) ? `v${i.info.version}` : i.info.version : typeof ((n = i.info) == null ? void 0 : n.version) == "number" ? `v${i.info.version}` : void 0;
35
- }), c = L();
36
- return D(() => {
37
- var e, n;
38
- return (n = (e = c.value).onLoaded) == null ? void 0 : n.call(e);
39
- }), (e, n) => (l(), a(o(B), null, {
33
+ var e, r;
34
+ return typeof ((e = n.info) == null ? void 0 : e.version) == "string" ? n.info.version.toString().match(/^\d/) ? `v${n.info.version}` : n.info.version : typeof ((r = n.info) == null ? void 0 : r.version) == "number" ? `v${n.info.version}` : void 0;
35
+ }), c = V();
36
+ return I(() => {
37
+ var e, r;
38
+ return (r = (e = c.value).onLoaded) == null ? void 0 : r.call(e);
39
+ }), (e, r) => (l(), a(o(O), null, {
40
40
  default: t(() => [
41
- r(o(O), {
41
+ i(o(U), {
42
42
  class: "introduction-section gap-12",
43
- id: o(k)({
44
- slug: o(U),
43
+ id: o(y)({
44
+ slug: o(b),
45
45
  depth: 1,
46
46
  value: "Introduction"
47
47
  })
@@ -49,44 +49,44 @@ const M = { class: "flex gap-1" }, R = { class: "sticky-cards" }, ne = /* @__PUR
49
49
  default: t(() => {
50
50
  var v, g;
51
51
  return [
52
- r(o(b), {
52
+ i(o(A), {
53
53
  loading: o(c).isLoading ?? (!((v = e.info) != null && v.description) && !((g = e.info) != null && g.title))
54
54
  }, {
55
55
  default: t(() => [
56
56
  S("div", M, [
57
57
  p.value ? (l(), a(o(C), { key: 0 }, {
58
58
  default: t(() => [
59
- d(u(p.value), 1)
59
+ u(d(p.value), 1)
60
60
  ]),
61
61
  _: 1
62
62
  })) : f("", !0),
63
63
  m.value ? (l(), a(o(C), { key: 1 }, {
64
64
  default: t(() => [
65
- d("OAS " + u(m.value), 1)
65
+ u("OAS " + d(m.value), 1)
66
66
  ]),
67
67
  _: 1
68
68
  })) : f("", !0)
69
69
  ]),
70
- r(o(A), {
70
+ i(o(E), {
71
71
  loading: !e.info.title,
72
72
  tight: ""
73
73
  }, {
74
74
  default: t(() => [
75
- r(o(E), { level: 1 }, {
75
+ i(o(F), { level: 1 }, {
76
76
  default: t(() => [
77
- d(u(e.info.title), 1)
77
+ u(d(e.info.title), 1)
78
78
  ]),
79
79
  _: 1
80
80
  })
81
81
  ]),
82
82
  _: 1
83
83
  }, 8, ["loading"]),
84
- r(w, { specTitle: N.value }, null, 8, ["specTitle"]),
85
- r(o(F), null, {
84
+ i(H, { specTitle: $.value }, null, 8, ["specTitle"]),
85
+ i(o(G), null, {
86
86
  default: t(() => [
87
- r(o(T), null, {
87
+ i(o(T), null, {
88
88
  default: t(() => [
89
- r(H, {
89
+ i(B, {
90
90
  value: e.info.description
91
91
  }, null, 8, ["value"])
92
92
  ]),
@@ -103,7 +103,8 @@ const M = { class: "flex gap-1" }, R = { class: "sticky-cards" }, ne = /* @__PUR
103
103
  ]),
104
104
  _: 3
105
105
  }),
106
- r(o(G), { value: e.info }, null, 8, ["value"])
106
+ i(o(h), { value: e.parsedSpec }, null, 8, ["value"]),
107
+ i(o(h), { value: e.info }, null, 8, ["value"])
107
108
  ]),
108
109
  _: 3
109
110
  }, 8, ["loading"]),
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaDiscriminator.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0e658f97"]]);
4
+ const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-67468e64"]]);
5
5
  export {
6
6
  i as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SpecificationExtension.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SpecificationExtension/SpecificationExtension.vue"],"names":[],"mappings":"AAmEA,KAAK,WAAW,GAAG;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;CAC3C,CAAC;;AA0GF,wBAMG"}
1
+ {"version":3,"file":"SpecificationExtension.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SpecificationExtension/SpecificationExtension.vue"],"names":[],"mappings":"AAsEA,KAAK,WAAW,GAAG;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;CAC3C,CAAC;;AA2GF,wBAMG"}
@@ -1,33 +1,38 @@
1
- import { defineComponent as f, openBlock as o, createElementBlock as d, Fragment as E, renderList as _, unref as s, createBlock as a, withCtx as g, createElementVNode as x, resolveDynamicComponent as C, mergeProps as v, createCommentVNode as k } from "vue";
2
- import { ScalarErrorBoundary as y } from "@scalar/components";
3
- import { usePluginManager as h } from "../../plugins/hooks/usePluginManager.js";
4
- const B = { class: "text-base" }, j = /* @__PURE__ */ f({
1
+ import { defineComponent as d, computed as s, openBlock as n, createElementBlock as u, Fragment as v, renderList as g, createBlock as c, unref as E, withCtx as _, resolveDynamicComponent as x, mergeProps as C, createCommentVNode as h } from "vue";
2
+ import { ScalarErrorBoundary as k } from "@scalar/components";
3
+ import { usePluginManager as y } from "../../plugins/hooks/usePluginManager.js";
4
+ const B = {
5
+ key: 0,
6
+ class: "text-base"
7
+ }, j = /* @__PURE__ */ d({
5
8
  __name: "SpecificationExtension",
6
9
  props: {
7
10
  value: {}
8
11
  },
9
- setup(c) {
10
- const { getSpecificationExtensions: m } = h();
11
- function i(e) {
12
+ setup(m) {
13
+ const { getSpecificationExtensions: i } = y();
14
+ function l(e) {
12
15
  return Object.keys(e ?? {}).filter(
13
16
  (t) => t.startsWith("x-")
14
17
  );
15
18
  }
16
- function u(e) {
17
- return e.flatMap((t) => m(t)).filter((t) => t.component);
19
+ function p(e) {
20
+ return e.flatMap((t) => i(t)).filter((t) => t.component);
18
21
  }
19
- const l = i(c.value), p = u(l);
20
- return (e, t) => typeof e.value == "object" ? (o(!0), d(E, { key: 0 }, _(s(p), (n) => (o(), a(s(y), null, {
21
- default: g(() => {
22
- var r;
23
- return [
24
- x("div", B, [
25
- (o(), a(C(n.component), v({ ref_for: !0 }, { [n.name]: (r = e.value) == null ? void 0 : r[n.name] }), null, 16))
26
- ])
27
- ];
28
- }),
29
- _: 2
30
- }, 1024))), 256)) : k("", !0);
22
+ const f = s(() => l(m.value)), r = s(
23
+ () => p(f.value)
24
+ );
25
+ return (e, t) => typeof e.value == "object" && r.value.length ? (n(), u("div", B, [
26
+ (n(!0), u(v, null, g(r.value, (o) => (n(), c(E(k), null, {
27
+ default: _(() => {
28
+ var a;
29
+ return [
30
+ (n(), c(x(o.component), C({ ref_for: !0 }, { [o.name]: (a = e.value) == null ? void 0 : a[o.name] }), null, 16))
31
+ ];
32
+ }),
33
+ _: 2
34
+ }, 1024))), 256))
35
+ ])) : h("", !0);
31
36
  }
32
37
  });
33
38
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AA8EA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAWzE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;CAC/C,CAAC;;AAgHF,wBAOG"}
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAYzE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;CAC/C,CAAC;;AAqIF,wBAOG"}
@@ -1,47 +1,51 @@
1
- import { defineComponent as m, ref as p, onMounted as d, watch as v, onBeforeUnmount as g, openBlock as h, createElementBlock as x } from "vue";
2
- import { useWorkspace as E } from "@scalar/api-client/store";
3
- import { watchDebounced as _ } from "@vueuse/core";
4
- import { useApiClient as k } from "./useApiClient.js";
1
+ import { defineComponent as h, ref as v, onMounted as d, watch as E, onBeforeUnmount as C, openBlock as g, createElementBlock as x } from "vue";
2
+ import { useActiveEntities as S, useWorkspace as _ } from "@scalar/api-client/store";
3
+ import { mutateServerDiff as k, mutateSecuritySchemeDiff as b } from "@scalar/api-client/views/Request/libs";
4
+ import { watchDebounced as A } from "@vueuse/core";
5
+ import B from "microdiff";
6
+ import { useApiClient as D } from "./useApiClient.js";
5
7
  import { useNavState as y } from "../../hooks/useNavState.js";
6
- import { useExampleStore as S } from "../../legacy/stores/useExampleStore.js";
7
- const M = /* @__PURE__ */ m({
8
+ import { useExampleStore as I } from "../../legacy/stores/useExampleStore.js";
9
+ const F = /* @__PURE__ */ h({
8
10
  __name: "ApiClientModal",
9
11
  props: {
10
12
  configuration: {}
11
13
  },
12
- setup(n) {
13
- const o = p(null), { client: t, init: c } = k(), { selectedExampleKey: s, operationId: r } = S(), f = E(), { isIntersectionEnabled: a } = y();
14
+ setup(i) {
15
+ const n = v(null), { client: o, init: p } = D(), { selectedExampleKey: f, operationId: u } = I(), c = S(), a = _(), { isIntersectionEnabled: l } = y();
14
16
  return d(() => {
15
- o.value && c({
16
- el: o.value,
17
- configuration: n.configuration,
18
- store: f
17
+ n.value && p({
18
+ el: n.value,
19
+ configuration: i.configuration,
20
+ store: a
19
21
  });
20
- }), _(
21
- () => n.configuration,
22
- (e, u) => {
23
- var l;
24
- let i = !0;
25
- try {
26
- i = JSON.stringify(e) !== JSON.stringify(u);
27
- } catch {
28
- }
29
- e && i && (a.value = !1, (l = t.value) == null || l.updateConfig(e), setTimeout(() => {
30
- a.value = !0;
31
- }, 1e3));
22
+ }), A(
23
+ () => i.configuration,
24
+ (e, r) => {
25
+ var m;
26
+ if (!r)
27
+ return;
28
+ const s = B(r, e);
29
+ s.some(
30
+ (t) => t.path[0] === "url" || t.path[0] === "content" || t.path[1] === "url" || t.path[1] === "content"
31
+ ) ? (m = o.value) == null || m.updateConfig(e) : s.forEach((t) => {
32
+ t.path[0] === "servers" ? k(t, c, a) : t.path[0] === "authentication" && b(t, c, a);
33
+ }), l.value = !1, setTimeout(() => {
34
+ l.value = !0;
35
+ }, 1e3);
32
36
  },
33
37
  { deep: !0, debounce: 300 }
34
- ), v(s, (e) => {
35
- t.value && e && r.value && t.value.updateExample(e, r.value);
36
- }), g(() => {
38
+ ), E(f, (e) => {
39
+ o.value && e && u.value && o.value.updateExample(e, u.value);
40
+ }), C(() => {
37
41
  var e;
38
- return (e = t.value) == null ? void 0 : e.app.unmount();
39
- }), (e, u) => (h(), x("div", {
42
+ return (e = o.value) == null ? void 0 : e.app.unmount();
43
+ }), (e, r) => (g(), x("div", {
40
44
  ref_key: "el",
41
- ref: o
45
+ ref: n
42
46
  }, null, 512));
43
47
  }
44
48
  });
45
49
  export {
46
- M as default
50
+ F as default
47
51
  };