@scalar/api-reference 1.24.13 → 1.24.16

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,53 +1,43 @@
1
- import { defineComponent as D, openBlock as s, createElementBlock as t, createVNode as O, unref as o, createBlock as l, createCommentVNode as p, Fragment as c, renderList as E, createElementVNode as N, toDisplayString as J } from "vue";
1
+ import { defineComponent as L, openBlock as o, createElementBlock as t, createVNode as N, unref as s, Fragment as p, renderList as C, createElementVNode as V, toDisplayString as P, createBlock as m, createCommentVNode as F } from "vue";
2
2
  import { ScalarCodeBlock as r } from "@scalar/components";
3
- import { prettyPrintJson as C } from "@scalar/oas-utils/helpers";
4
- import { getExampleFromSchema as m } from "@scalar/oas-utils/spec-getters";
5
- const L = { key: 0 }, P = { key: 1 }, R = {
3
+ import { prettyPrintJson as b } from "@scalar/oas-utils/helpers";
4
+ import { getExampleFromSchema as a } from "@scalar/oas-utils/spec-getters";
5
+ const R = { key: 0 }, q = { key: 1 }, w = {
6
6
  key: 0,
7
7
  class: "rule"
8
- }, q = { class: "rule-title" }, w = { class: "rule-items" }, z = {
8
+ }, z = { class: "rule-title" }, G = { class: "rule-items" }, H = {
9
9
  key: 2,
10
10
  class: "empty-state"
11
- }, Q = /* @__PURE__ */ D({
11
+ }, U = /* @__PURE__ */ L({
12
12
  __name: "ExampleResponse",
13
13
  props: {
14
14
  response: {}
15
15
  },
16
- setup(G) {
17
- const V = ["oneOf", "anyOf", "not"], F = (e) => e.reduce((i, a) => ({
16
+ setup(I) {
17
+ const A = ["oneOf", "anyOf", "not"], c = (e) => e.reduce((i, l) => ({
18
18
  ...i,
19
- ...a
19
+ ...l
20
20
  }), {});
21
21
  return (e, i) => {
22
- var a, d, h, y, u, g, k;
23
- return (a = e.response) != null && a.example ? (s(), t("div", L, [
24
- O(o(r), {
25
- content: o(C)((d = e.response) == null ? void 0 : d.example),
22
+ var l, d, h, y, u, g, f, k, S;
23
+ return (l = e.response) != null && l.example ? (o(), t("div", R, [
24
+ N(s(r), {
25
+ content: s(b)((d = e.response) == null ? void 0 : d.example),
26
26
  lang: "json"
27
27
  }, null, 8, ["content"])
28
- ])) : (h = e.response) != null && h.schema ? (s(), t("div", P, [
29
- (y = e.response) != null && y.schema.type ? (s(), l(o(r), {
30
- key: 0,
31
- content: o(C)(
32
- o(m)((u = e.response) == null ? void 0 : u.schema, {
33
- emptyString: "",
34
- mode: "read"
35
- })
36
- ),
37
- lang: "json"
38
- }, null, 8, ["content"])) : p("", !0),
39
- (s(), t(c, null, E(V, (n) => {
40
- var f, S, _, j, v, B;
41
- return s(), t(c, { key: n }, [
42
- (f = e.response) != null && f.schema[n] && (((S = e.response) == null ? void 0 : S.schema[n].length) > 1 || n === "not") ? (s(), t("div", R, [
43
- N("div", q, J(n), 1),
44
- N("ol", w, [
45
- (s(!0), t(c, null, E((_ = e.response) == null ? void 0 : _.schema[n], (b, A) => (s(), t("li", {
46
- key: A,
28
+ ])) : (h = e.response) != null && h.schema ? (o(), t("div", q, [
29
+ (o(), t(p, null, C(A, (n) => {
30
+ var j, O, _, v, B, E;
31
+ return o(), t(p, { key: n }, [
32
+ (j = e.response) != null && j.schema[n] && (((O = e.response) == null ? void 0 : O.schema[n].length) > 1 || n === "not") ? (o(), t("div", w, [
33
+ V("div", z, P(n), 1),
34
+ V("ol", G, [
35
+ (o(!0), t(p, null, C((_ = e.response) == null ? void 0 : _.schema[n], (D, J) => (o(), t("li", {
36
+ key: J,
47
37
  class: "rule-item"
48
38
  }, [
49
- O(o(r), {
50
- content: o(m)(b, {
39
+ N(s(r), {
40
+ content: s(a)(D, {
51
41
  emptyString: "…",
52
42
  mode: "read"
53
43
  }),
@@ -55,32 +45,53 @@ const L = { key: 0 }, P = { key: 1 }, R = {
55
45
  }, null, 8, ["content"])
56
46
  ]))), 128))
57
47
  ])
58
- ])) : (j = e.response) != null && j.schema[n] && ((v = e.response) == null ? void 0 : v.schema[n].length) === 1 ? (s(), l(o(r), {
48
+ ])) : (v = e.response) != null && v.schema[n] && ((B = e.response) == null ? void 0 : B.schema[n].length) === 1 ? (o(), m(s(r), {
59
49
  key: 1,
60
- content: o(m)((B = e.response) == null ? void 0 : B.schema[n][0], {
50
+ content: s(a)((E = e.response) == null ? void 0 : E.schema[n][0], {
61
51
  emptyString: "…",
62
52
  mode: "read"
63
53
  }),
64
54
  lang: "json"
65
- }, null, 8, ["content"])) : p("", !0)
55
+ }, null, 8, ["content"])) : F("", !0)
66
56
  ], 64);
67
57
  }), 64)),
68
- (g = e.response) != null && g.schema.allOf ? (s(), l(o(r), {
58
+ (y = e.response) != null && y.schema.allOf ? (o(), m(s(r), {
59
+ key: 0,
60
+ content: c(
61
+ (u = e.response) == null ? void 0 : u.schema.allOf.map(
62
+ (n) => s(a)(n, {
63
+ emptyString: "…",
64
+ mode: "read"
65
+ })
66
+ )
67
+ ),
68
+ lang: "json"
69
+ }, null, 8, ["content"])) : F("", !0),
70
+ (f = (g = e.response) == null ? void 0 : g.schema.items) != null && f.allOf ? (o(), m(s(r), {
69
71
  key: 1,
70
- content: F(
71
- (k = e.response) == null ? void 0 : k.schema.allOf.map(
72
- (n) => o(m)(n, {
72
+ content: c(
73
+ (k = e.response) == null ? void 0 : k.schema.items.allOf.map(
74
+ (n) => s(a)(n, {
73
75
  emptyString: "…",
74
76
  mode: "read"
75
77
  })
76
78
  )
77
79
  ),
78
80
  lang: "json"
79
- }, null, 8, ["content"])) : p("", !0)
80
- ])) : (s(), t("div", z, " No Body "));
81
+ }, null, 8, ["content"])) : (o(), m(s(r), {
82
+ key: 2,
83
+ content: s(b)(
84
+ s(a)((S = e.response) == null ? void 0 : S.schema, {
85
+ emptyString: "…",
86
+ mode: "read"
87
+ })
88
+ ),
89
+ lang: "json"
90
+ }, null, 8, ["content"]))
91
+ ])) : (o(), t("div", H, " No Body "));
81
92
  };
82
93
  }
83
94
  });
84
95
  export {
85
- Q as default
96
+ U as default
86
97
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MobileHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/MobileHeader.vue"],"names":[],"mappings":";;;;;;;;;;;AAiLA,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":"MobileHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/MobileHeader.vue"],"names":[],"mappings":";;;;;;;;;;;AAgLA,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./MobileHeader.vue2.js";
2
2
  /* empty css */
3
- import e from "../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-0242e3de"]]);
3
+ import r from "../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b5fb4b8b"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ShowMoreButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/ShowMoreButton.vue"],"names":[],"mappings":";;;;;AAgJA,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":"ShowMoreButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/ShowMoreButton.vue"],"names":[],"mappings":";;;;;AAiJA,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 "./ShowMoreButton.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-60a9fbab"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-481def22"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AA4NA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;;;;;;;;;AAoV7C,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":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AA6NA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;;;;;;;;;AAoV7C,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Sidebar.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-31eb751b"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b727cdda"]]);
5
5
  export {
6
6
  m as default
7
7
  };
package/dist/esm.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"esm.d.ts","sourceRoot":"","sources":["../src/esm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAK1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAErD,wCAAwC;AACxC,wBAAgB,sBAAsB;AACpC,yCAAyC;AACzC,EAAE,EAAE,WAAW,GAAG,IAAI;AACtB,iDAAiD;AACjD,aAAa,EAAE,sBAAsB;AACrC;;;GAGG;AACH,iBAAiB,UAAO;IAmBtB,uDAAuD;4BAC/B,sBAAsB;qBAO7B,iBAAiB;IAGlC,8CAA8C;;IAE9C,sCAAsC;;EAGzC"}
1
+ {"version":3,"file":"esm.d.ts","sourceRoot":"","sources":["../src/esm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAM1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAErD,wCAAwC;AACxC,wBAAgB,sBAAsB;AACpC,yCAAyC;AACzC,EAAE,EAAE,WAAW,GAAG,IAAI;AACtB,iDAAiD;AACjD,aAAa,EAAE,sBAAsB;AACrC;;;GAGG;AACH,iBAAiB,UAAO;IAsBtB,uDAAuD;4BAC/B,sBAAsB;qBAO7B,iBAAiB;IAGlC,8CAA8C;;IAE9C,sCAAsC;;EAGzC"}
package/dist/esm.js CHANGED
@@ -1,10 +1,12 @@
1
- import { objectMerge as u } from "@scalar/oas-utils/helpers";
2
- import { reactive as p, createApp as m } from "vue";
3
- import f from "./components/ApiReference.vue.js";
1
+ import { objectMerge as m } from "@scalar/oas-utils/helpers";
2
+ import { createHead as p } from "@unhead/vue";
3
+ import { reactive as f, createApp as s } from "vue";
4
+ import d from "./components/ApiReference.vue.js";
4
5
  /* empty css */
5
- function S(o, c, a = !0) {
6
- const t = p(c), r = m(f, { configuration: t });
7
- function n(e = o) {
6
+ function j(n, c, a = !0) {
7
+ const t = f(c), r = s(d, { configuration: t }), i = p();
8
+ r.use(i);
9
+ function o(e = n) {
8
10
  if (!e) {
9
11
  console.warn(
10
12
  "Invalid HTML element provided. Cannot mount Scalar References"
@@ -13,20 +15,20 @@ function S(o, c, a = !0) {
13
15
  }
14
16
  r.mount(e);
15
17
  }
16
- return a && n(), {
18
+ return a && o(), {
17
19
  /** Update the configuration for a mounted reference */
18
- updateConfig(e, i = !0) {
19
- i ? Object.assign(t, e) : u(t, e);
20
+ updateConfig(e, u = !0) {
21
+ u ? Object.assign(t, e) : m(t, e);
20
22
  },
21
23
  updateSpec(e) {
22
24
  t.spec = e;
23
25
  },
24
26
  /** Mount the references to a given element */
25
- mount: n,
27
+ mount: o,
26
28
  /** Unmount the app from an element */
27
29
  unmount: () => r.unmount()
28
30
  };
29
31
  }
30
32
  export {
31
- S as createScalarReferences
33
+ j as createScalarReferences
32
34
  };
@@ -147,8 +147,8 @@ export declare function useReactiveSpec({ specConfig, proxy, }: {
147
147
  description?: string | undefined;
148
148
  } | undefined;
149
149
  servers?: {
150
- url: string;
151
150
  uid: string;
151
+ url: string;
152
152
  description?: string | undefined;
153
153
  variables?: Record<string, {
154
154
  default: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA6B,MAAM,mBAAmB,CAAA;AAexE,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAeD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QAEhC;AAKD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAMpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAuND,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE;;;;;;;;;;;;EA2CxD"}
1
+ {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA6B,MAAM,mBAAmB,CAAA;AAexE,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAeD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QAEhC;AAKD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAMpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAgOD,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE;;;;;;;;;;;;EA2CxD"}
@@ -1,8 +1,8 @@
1
1
  import { useApiClientStore as Q, useOpenApiStore as R } from "@scalar/api-client";
2
2
  import { ssrState as U } from "@scalar/oas-utils/helpers";
3
- import { ref as v, reactive as X, computed as N, watch as L } from "vue";
3
+ import { ref as g, reactive as X, computed as P, watch as L } from "vue";
4
4
  import { useNavState as Y } from "./useNavState.js";
5
- import { getLowestHeadingLevel as P } from "../helpers/getLowestHeadingLevel.js";
5
+ import { getLowestHeadingLevel as q } from "../helpers/getLowestHeadingLevel.js";
6
6
  import { openClientFor as W } from "../helpers/openClientFor.js";
7
7
  import { hasModels as Z } from "../helpers/hasModels.js";
8
8
  import { getModels as D } from "../helpers/getModels.js";
@@ -13,38 +13,38 @@ const {
13
13
  getModelId: V,
14
14
  getOperationId: B,
15
15
  getSectionId: ee,
16
- getTagId: q,
17
- getWebhookId: g,
18
- hash: C
19
- } = Y(), o = v(void 0);
16
+ getTagId: z,
17
+ getWebhookId: S,
18
+ hash: I
19
+ } = Y(), o = g(void 0);
20
20
  function te(t) {
21
21
  return o.value = t;
22
22
  }
23
- const z = v(!1), m = X(
23
+ const J = g(!1), w = X(
24
24
  U["useSidebarContent-collapsedSidebarItems"] ?? {}
25
25
  );
26
26
  function se(t) {
27
- m[t] = !m[t];
27
+ w[t] = !w[t];
28
28
  }
29
- function S(t, s) {
30
- m[t] = s;
29
+ function C(t, s) {
30
+ w[t] = s;
31
31
  }
32
- const f = v([]), ie = async (t) => {
33
- const s = await $(t), l = P(s);
32
+ const b = g([]), ie = async (t) => {
33
+ const s = await $(t), l = q(s);
34
34
  return s.filter((n) => (
35
35
  // highest level, eg. # Introduction
36
36
  n.depth === l || // second highest level, eg. ## Authentication
37
37
  n.depth === l + 1
38
38
  ));
39
- }, J = N(() => {
40
- var I, A, k, O, y, T, H, M, x, j;
39
+ }, K = P(() => {
40
+ var k, A, O, y, T, H, M, x, j, E;
41
41
  const { state: t } = Q(), s = {}, {
42
42
  openApi: { globalSecurity: l }
43
43
  } = R(), n = [];
44
44
  let p = null;
45
- f.value.forEach((e) => {
45
+ b.value.forEach((e) => {
46
46
  var i;
47
- e.depth === P(f.value) ? (p = {
47
+ e.depth === q(b.value) ? (p = {
48
48
  id: F(e),
49
49
  title: e.value,
50
50
  show: !t.showApiClient,
@@ -55,13 +55,13 @@ const f = v([]), ie = async (t) => {
55
55
  show: !t.showApiClient
56
56
  }));
57
57
  });
58
- const c = (A = (I = o.value) == null ? void 0 : I.tags) == null ? void 0 : A[0], h = c && ((e) => (e == null ? void 0 : e.length) !== 1 || e[0].name !== "default" || e[0].description !== "")((k = o.value) == null ? void 0 : k.tags) ? (y = (O = o.value) == null ? void 0 : O.tags) == null ? void 0 : y.filter((e) => {
58
+ const c = (A = (k = o.value) == null ? void 0 : k.tags) == null ? void 0 : A[0], h = c && ((e) => (e == null ? void 0 : e.length) !== 1 || e[0].name !== "default" || e[0].description !== "")((O = o.value) == null ? void 0 : O.tags) ? (T = (y = o.value) == null ? void 0 : y.tags) == null ? void 0 : T.filter((e) => {
59
59
  var i;
60
60
  return ((i = e.operations) == null ? void 0 : i.length) > 0;
61
61
  }).map((e) => {
62
62
  var i;
63
63
  return {
64
- id: q(e),
64
+ id: z(e),
65
65
  title: e.name,
66
66
  displayTitle: e["x-displayName"] ?? e.name,
67
67
  show: !0,
@@ -82,7 +82,7 @@ const f = v([]), ie = async (t) => {
82
82
  }
83
83
  )
84
84
  };
85
- }) : (T = c == null ? void 0 : c.operations) == null ? void 0 : T.map((e) => {
85
+ }) : (H = c == null ? void 0 : c.operations) == null ? void 0 : H.map((e) => {
86
86
  var a;
87
87
  const i = B(e, c), r = e.name ?? e.path;
88
88
  return s[i] = r, {
@@ -95,7 +95,8 @@ const f = v([]), ie = async (t) => {
95
95
  t.showApiClient && W(e, l);
96
96
  }
97
97
  };
98
- }), w = Z(o.value) && !z.value ? [
98
+ });
99
+ let f = Z(o.value) && !J.value ? [
99
100
  {
100
101
  id: V(),
101
102
  title: "Models",
@@ -112,39 +113,21 @@ const f = v([]), ie = async (t) => {
112
113
  }
113
114
  )
114
115
  }
115
- ] : [], b = (H = o.value) != null && H["x-tagGroups"] ? (x = (M = o.value) == null ? void 0 : M["x-tagGroups"]) == null ? void 0 : x.map((e) => {
116
- const i = [];
117
- return e.tags.map((a) => {
118
- if (a === "models" && w.length > 0)
119
- i.push(w[0]);
120
- else {
121
- const d = h == null ? void 0 : h.find(
122
- (u) => u.title === a
123
- );
124
- d && i.push(d);
125
- }
126
- }), {
127
- id: e.name,
128
- title: e.name,
129
- children: i,
130
- show: !0,
131
- isGroup: !0
132
- };
133
- }) : void 0, K = _(o.value) ? [
116
+ ] : [], m = _(o.value) ? [
134
117
  {
135
- id: g(),
118
+ id: S(),
136
119
  title: "Webhook",
137
120
  show: !t.showApiClient,
138
- children: Object.keys(((j = o.value) == null ? void 0 : j.webhooks) ?? {}).map((e) => {
121
+ children: Object.keys(((M = o.value) == null ? void 0 : M.webhooks) ?? {}).map((e) => {
139
122
  var r, a;
140
- const i = g(e);
123
+ const i = S(e);
141
124
  return s[i] = e, Object.keys(
142
125
  ((a = (r = o.value) == null ? void 0 : r.webhooks) == null ? void 0 : a[e]) ?? {}
143
126
  ).map((d) => {
144
- var u, E, G;
127
+ var u, v, G;
145
128
  return {
146
- id: g(e, d),
147
- title: (G = (E = (u = o.value) == null ? void 0 : u.webhooks) == null ? void 0 : E[e][d]) == null ? void 0 : G.name,
129
+ id: S(e, d),
130
+ title: (G = (v = (u = o.value) == null ? void 0 : u.webhooks) == null ? void 0 : v[e][d]) == null ? void 0 : G.name,
148
131
  httpVerb: d,
149
132
  show: !t.showApiClient
150
133
  };
@@ -152,18 +135,40 @@ const f = v([]), ie = async (t) => {
152
135
  }).flat()
153
136
  }
154
137
  ] : [];
138
+ const N = (x = o.value) != null && x["x-tagGroups"] ? (E = (j = o.value) == null ? void 0 : j["x-tagGroups"]) == null ? void 0 : E.map((e) => {
139
+ var a;
140
+ const i = [];
141
+ return (a = e.tags) == null || a.map((d) => {
142
+ if (d === "models" && f.length > 0)
143
+ i.push(f[0]), f = [];
144
+ else if (d === "webhooks" && m.length > 0)
145
+ i.push(m[0]), m = [];
146
+ else {
147
+ const u = h == null ? void 0 : h.find(
148
+ (v) => v.title === d
149
+ );
150
+ u && i.push(u);
151
+ }
152
+ }), {
153
+ id: e.name,
154
+ title: e.name,
155
+ children: i,
156
+ show: !0,
157
+ isGroup: !0
158
+ };
159
+ }) : void 0;
155
160
  return {
156
161
  entries: [
157
162
  ...n,
158
- ...b ?? h ?? [],
159
- ...b ? [] : K,
160
- ...b ? [] : w
163
+ ...N ?? h ?? [],
164
+ ...m,
165
+ ...f
161
166
  ],
162
167
  titles: s
163
168
  };
164
- }), oe = v(!1), le = N(() => {
169
+ }), oe = g(!1), le = P(() => {
165
170
  var t, s;
166
- return ((s = (t = J.value) == null ? void 0 : t.titles) == null ? void 0 : s[C.value]) ?? "";
171
+ return ((s = (t = K.value) == null ? void 0 : t.titles) == null ? void 0 : s[I.value]) ?? "";
167
172
  });
168
173
  function we(t) {
169
174
  return t != null && t.parsedSpec && (o.value = t.parsedSpec, L(
@@ -173,12 +178,12 @@ function we(t) {
173
178
  },
174
179
  () => {
175
180
  var s, l;
176
- if (C.value) {
177
- const n = ee(C.value);
178
- n && S(n, !0);
181
+ if (I.value) {
182
+ const n = ee(I.value);
183
+ n && C(n, !0);
179
184
  } else {
180
185
  const n = (l = (s = o.value) == null ? void 0 : s.tags) == null ? void 0 : l[0];
181
- n && S(q(n), !0);
186
+ n && C(z(n), !0);
182
187
  }
183
188
  }
184
189
  ), L(
@@ -189,16 +194,16 @@ function we(t) {
189
194
  async () => {
190
195
  var l, n;
191
196
  const s = (n = (l = o.value) == null ? void 0 : l.info) == null ? void 0 : n.description;
192
- return s ? f.value = await ie(s) : f.value = [];
197
+ return s ? b.value = await ie(s) : b.value = [];
193
198
  }
194
199
  )), {
195
200
  breadcrumb: le,
196
- items: J,
201
+ items: K,
197
202
  isSidebarOpen: oe,
198
- collapsedSidebarItems: m,
203
+ collapsedSidebarItems: w,
199
204
  toggleCollapsedSidebarItem: se,
200
- setCollapsedSidebarItem: S,
201
- hideModels: z,
205
+ setCollapsedSidebarItem: C,
206
+ hideModels: J,
202
207
  setParsedSpec: te
203
208
  };
204
209
  }