@scalar/api-reference 1.28.13 → 1.28.15

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 (52) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/browser/standalone.js +6710 -6674
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Card/Card.vue.d.ts.map +1 -1
  5. package/dist/components/Card/Card.vue.js +7 -7
  6. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  7. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
  8. package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +18 -19
  9. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  11. package/dist/components/Content/Introduction/Introduction.vue2.js +44 -35
  12. package/dist/components/Content/Lazy/Loading.vue.d.ts +8 -17
  13. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Lazy/Loading.vue.js +50 -44
  15. package/dist/components/Content/Schema/Schema.preview.d.ts +525 -0
  16. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  17. package/dist/components/Content/Schema/Schema.vue.d.ts +1 -0
  18. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  20. package/dist/components/Content/Schema/Schema.vue2.js +86 -75
  21. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +1 -0
  22. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  23. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +2 -2
  24. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +41 -56
  25. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +169 -153
  29. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +12 -0
  30. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -0
  31. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +70 -0
  32. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  33. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  34. package/dist/features/Operation/components/ParameterListItem.vue2.js +13 -12
  35. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  36. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  37. package/dist/features/Operation/components/RequestBody.vue2.js +29 -26
  38. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  39. package/dist/features/Search/SearchButton.vue.js +2 -2
  40. package/dist/features/Search/SearchButton.vue2.js +42 -29
  41. package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
  42. package/dist/features/Search/SearchModal.vue.js +3 -3
  43. package/dist/features/Search/SearchModal.vue2.js +102 -96
  44. package/dist/features/Search/useSearchIndex.d.ts +2 -1
  45. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  46. package/dist/features/Search/useSearchIndex.js +55 -52
  47. package/dist/hooks/useSidebar.d.ts +1 -0
  48. package/dist/hooks/useSidebar.d.ts.map +1 -1
  49. package/dist/hooks/useSidebar.js +131 -119
  50. package/dist/index.js +1 -1
  51. package/dist/style.css +1 -1
  52. package/package.json +8 -8
@@ -1,63 +1,65 @@
1
- import F from "fuse.js";
2
- import { ref as h, watch as E, computed as H } from "vue";
3
- import { extractRequestBody as N } from "../../helpers/specHelpers.js";
4
- import { useOperation as V } from "../../hooks/useOperation.js";
5
- import { useSidebar as A } from "../../hooks/useSidebar.js";
6
- import { useNavState as B } from "../../hooks/useNavState.js";
7
- import { getHeadingsFromMarkdown as P } from "../../helpers/getHeadingsFromMarkdown.js";
8
- import { getModels as z } from "../../helpers/getModels.js";
9
- function _({
10
- specification: x
1
+ import N from "fuse.js";
2
+ import { ref as d, watch as E, computed as O } from "vue";
3
+ import { extractRequestBody as V } from "../../helpers/specHelpers.js";
4
+ import { useOperation as A } from "../../hooks/useOperation.js";
5
+ import { useSidebar as B } from "../../hooks/useSidebar.js";
6
+ import { useNavState as P } from "../../hooks/useNavState.js";
7
+ import { getHeadingsFromMarkdown as z } from "../../helpers/getHeadingsFromMarkdown.js";
8
+ import { getModels as G } from "../../helpers/getModels.js";
9
+ function w({
10
+ specification: R
11
11
  }) {
12
- const { hideModels: O } = A(), { getHeadingId: R, getWebhookId: T, getModelId: j, getOperationId: L, getTagId: W } = B(), s = h([]), r = h([]), d = h(0), a = h(""), c = new F(s.value, {
12
+ const { hideModels: T } = B(), { getHeadingId: j, getWebhookId: L, getModelId: W, getOperationId: q, getTagId: C } = P(), s = d([]), l = d([]), a = d(), r = d(""), c = new N(s.value, {
13
13
  keys: ["title", "description", "body"]
14
14
  }), m = () => {
15
- d.value = 0, r.value = c.search(a.value);
15
+ a.value = 0, l.value = c.search(r.value);
16
16
  };
17
- E(a, (e) => {
18
- e.length ? m() : r.value = [];
17
+ E(r, (e) => {
18
+ e.length ? m() : l.value = [];
19
19
  });
20
- function q() {
21
- a.value = "", d.value = 0, r.value = [];
20
+ function F() {
21
+ r.value = "", a.value = void 0, l.value = [];
22
22
  }
23
- const C = H(() => a.value.length === 0 ? s.value.slice(0, 25).map((l) => ({
24
- item: l
25
- })) : r.value.slice(0, 25));
23
+ const v = O(() => r.value.length === 0 ? s.value.slice(0, 25).map((i) => ({
24
+ item: i
25
+ })) : l.value.slice(0, 25)), H = O(
26
+ () => typeof a.value == "number" ? v.value[a.value] : void 0
27
+ );
26
28
  return E(
27
- x,
29
+ R,
28
30
  (e) => {
29
- var g, I, p, k;
30
- if (s.value = [], !((g = e == null ? void 0 : e.tags) != null && g.length) && !((I = e == null ? void 0 : e.webhooks) != null && I.length)) {
31
+ var I, p, k, M;
32
+ if (s.value = [], !((I = e == null ? void 0 : e.tags) != null && I.length) && !((p = e == null ? void 0 : e.webhooks) != null && p.length)) {
31
33
  c.setCollection([]);
32
34
  return;
33
35
  }
34
- const l = [], v = P(((p = e == null ? void 0 : e.info) == null ? void 0 : p.description) ?? "");
35
- v.length && (v.forEach((t) => {
36
- l.push({
36
+ const i = [], b = z(((k = e == null ? void 0 : e.info) == null ? void 0 : k.description) ?? "");
37
+ b.length && (b.forEach((t) => {
38
+ i.push({
37
39
  type: "heading",
38
40
  title: `Info > ${t.value}`,
39
41
  description: "",
40
- href: `#${R(t)}`,
42
+ href: `#${j(t)}`,
41
43
  tag: t.slug,
42
44
  body: ""
43
45
  });
44
- }), s.value = s.value.concat(l)), (k = e == null ? void 0 : e.tags) == null || k.forEach((t) => {
45
- const M = {
46
+ }), s.value = s.value.concat(i)), (M = e == null ? void 0 : e.tags) == null || M.forEach((t) => {
47
+ const D = {
46
48
  title: t["x-displayName"] ?? t.name,
47
- href: `#${W(t)}`,
49
+ href: `#${C(t)}`,
48
50
  description: t.description,
49
51
  type: "tag",
50
52
  tag: t.name,
51
53
  body: ""
52
54
  };
53
- s.value.push(M), t.operations && t.operations.forEach((o) => {
54
- const { parameterMap: u } = V(o), D = N(o) || u.value;
55
+ s.value.push(D), t.operations && t.operations.forEach((o) => {
56
+ const { parameterMap: h } = A(o), $ = V(o) || h.value;
55
57
  let n = null;
56
- typeof D != "boolean" && (n = D);
57
- const $ = {
58
+ typeof $ != "boolean" && (n = $);
59
+ const x = {
58
60
  type: "req",
59
61
  title: o.name ?? o.path,
60
- href: `#${L(o, t)}`,
62
+ href: `#${q(o, t)}`,
61
63
  operationId: o.operationId,
62
64
  description: o.description ?? "",
63
65
  httpVerb: o.httpVerb,
@@ -65,45 +67,46 @@ function _({
65
67
  tag: t.name,
66
68
  operation: o
67
69
  };
68
- n && ($.body = n), s.value.push($);
70
+ n && (x.body = n), s.value.push(x);
69
71
  });
70
72
  });
71
- const i = e == null ? void 0 : e.webhooks, b = [];
72
- i && Object.keys(i).forEach((t) => {
73
- Object.keys(i[t]).forEach((o) => {
74
- var u;
75
- b.push({
73
+ const u = e == null ? void 0 : e.webhooks, y = [];
74
+ u && Object.keys(u).forEach((t) => {
75
+ Object.keys(u[t]).forEach((o) => {
76
+ var h;
77
+ y.push({
76
78
  type: "webhook",
77
79
  title: "Webhook",
78
- href: `#${T({ name: t, method: o })}`,
79
- description: `${(u = i[t][o]) == null ? void 0 : u.name}`,
80
+ href: `#${L({ name: t, method: o })}`,
81
+ description: `${(h = u[t][o]) == null ? void 0 : h.name}`,
80
82
  httpVerb: o,
81
83
  tag: t,
82
84
  body: ""
83
85
  });
84
- }), s.value = s.value.concat(b);
86
+ }), s.value = s.value.concat(y);
85
87
  });
86
- const f = O.value ? {} : z(e), y = [];
88
+ const f = T.value ? {} : G(e), g = [];
87
89
  f && (Object.keys(f).forEach((t) => {
88
- y.push({
90
+ g.push({
89
91
  type: "model",
90
92
  title: "Model",
91
- href: `#${j({ name: t })}`,
93
+ href: `#${W({ name: t })}`,
92
94
  description: f[t].title ?? t,
93
95
  tag: t,
94
96
  body: ""
95
97
  });
96
- }), s.value = s.value.concat(y)), c.setCollection(s.value);
98
+ }), s.value = s.value.concat(g)), c.setCollection(s.value);
97
99
  },
98
100
  { immediate: !0 }
99
101
  ), {
100
- resetSearch: q,
102
+ resetSearch: F,
101
103
  fuseSearch: m,
102
- selectedSearchResult: d,
103
- searchResultsWithPlaceholderResults: C,
104
- searchText: a
104
+ selectedSearchIndex: a,
105
+ selectedSearchResult: H,
106
+ searchResultsWithPlaceholderResults: v,
107
+ searchText: r
105
108
  };
106
109
  }
107
110
  export {
108
- _ as useSearchIndex
111
+ w as useSearchIndex
109
112
  };
@@ -10,6 +10,7 @@ export type SidebarEntry = {
10
10
  deprecated?: boolean;
11
11
  isGroup?: boolean;
12
12
  };
13
+ export declare const DEFAULT_INTRODUCTION_SLUG = "introduction";
13
14
  /** Helper to overwrite the current OpenAPI document */
14
15
  declare function setParsedSpec(spec: Spec): Spec;
15
16
  type CollapsedSidebarItems = Record<string, boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAa3E,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;AAcD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QA0ChC;AAMD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAIpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAkOD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC,CAAA;IACnD,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAA;CACvG,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,UAAU,OAAO,SAiBrE,CAAA;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY;;;;;;;;;;;;;qCAtBrB,MAAM,UAAU,OAAO;EAiFrE"}
1
+ {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAa3E,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,eAAO,MAAM,yBAAyB,iBAAiB,CAAA;AAcvD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QA0ChC;AAMD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAIpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAkOD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC,CAAA;IACnD,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAA;CACvG,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,UAAU,OAAO,SAiBrE,CAAA;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY;;;;;;;;;;;;;qCAtBrB,MAAM,UAAU,OAAO;EA8FrE"}
@@ -1,84 +1,84 @@
1
1
  import { isOperationDeprecated as F } from "../libs/operation.js";
2
2
  import { ssrState as Y } from "@scalar/oas-utils/helpers";
3
- import { ref as S, reactive as q, computed as J, watch as z } from "vue";
3
+ import { ref as w, reactive as z, computed as P, watch as U } from "vue";
4
4
  import { lazyBus as Z } from "../components/Content/Lazy/lazyBus.js";
5
5
  import { useNavState as $ } from "./useNavState.js";
6
- import { getLowestHeadingLevel as K } from "../helpers/getLowestHeadingLevel.js";
6
+ import { getLowestHeadingLevel as q } from "../helpers/getLowestHeadingLevel.js";
7
7
  import { hasModels as ee } from "../helpers/hasModels.js";
8
- import { getModels as P } from "../helpers/getModels.js";
8
+ import { getModels as _ } from "../helpers/getModels.js";
9
9
  import { hasWebhooks as te } from "../helpers/hasWebhooks.js";
10
10
  import { getHeadingsFromMarkdown as se } from "../helpers/getHeadingsFromMarkdown.js";
11
- import { scrollToId as R } from "../helpers/scrollToId.js";
12
- const y = S(null), u = S(void 0), v = q({});
13
- function _(t) {
14
- var p, r, i;
15
- v.tagsSorter === "alpha" ? t.tags = (p = t.tags) == null ? void 0 : p.sort((s, d) => s.name.localeCompare(d.name)) : typeof v.tagsSorter == "function" && (t.tags = (r = t.tags) == null ? void 0 : r.sort(v.tagsSorter));
16
- const a = (s, d) => {
17
- const x = s.name ?? s.path, g = d.name ?? d.path;
18
- return x.localeCompare(g);
19
- }, l = (s, d) => s.httpVerb.localeCompare(d.httpVerb);
20
- let c;
21
- return v.operationsSorter === "alpha" ? c = a : v.operationsSorter === "method" ? c = l : typeof v.operationsSorter == "function" && (c = v.operationsSorter), c && ((i = t.tags) == null || i.forEach((s) => {
22
- var d;
23
- s.operations = (d = s.operations) == null ? void 0 : d.sort(c);
24
- })), u.value = t;
11
+ import { scrollToId as N } from "../helpers/scrollToId.js";
12
+ const re = "introduction", O = w(null), c = w(void 0), g = z({});
13
+ function R(t) {
14
+ var p, s, l;
15
+ g.tagsSorter === "alpha" ? t.tags = (p = t.tags) == null ? void 0 : p.sort((r, n) => r.name.localeCompare(n.name)) : typeof g.tagsSorter == "function" && (t.tags = (s = t.tags) == null ? void 0 : s.sort(g.tagsSorter));
16
+ const a = (r, n) => {
17
+ const T = r.name ?? r.path, m = n.name ?? n.path;
18
+ return T.localeCompare(m);
19
+ }, i = (r, n) => r.httpVerb.localeCompare(n.httpVerb);
20
+ let d;
21
+ return g.operationsSorter === "alpha" ? d = a : g.operationsSorter === "method" ? d = i : typeof g.operationsSorter == "function" && (d = g.operationsSorter), d && ((l = t.tags) == null || l.forEach((r) => {
22
+ var n;
23
+ r.operations = (n = r.operations) == null ? void 0 : n.sort(d);
24
+ })), c.value = t;
25
25
  }
26
- const N = S(!1), Q = S(!1), T = q(Y["useSidebarContent-collapsedSidebarItems"] ?? {});
27
- function re(t) {
28
- T[t] = !T[t];
26
+ const J = w(!1), K = w(!1), y = z(Y["useSidebarContent-collapsedSidebarItems"] ?? {});
27
+ function oe(t) {
28
+ y[t] = !y[t];
29
29
  }
30
- function w(t, a) {
31
- T[t] = a;
30
+ function I(t, a) {
31
+ y[t] = a;
32
32
  }
33
- const k = S([]);
34
- function oe(t) {
35
- const a = se(t), l = K(a);
36
- return a.filter((c) => (
33
+ const x = w([]);
34
+ function ae(t) {
35
+ const a = se(t), i = q(a);
36
+ return a.filter((d) => (
37
37
  // highest level, eg. # Introduction
38
- c.depth === l || // second highest level, eg. ## Authentication
39
- c.depth === l + 1
38
+ d.depth === i || // second highest level, eg. ## Authentication
39
+ d.depth === i + 1
40
40
  ));
41
41
  }
42
- const U = J(() => {
43
- var C, H, B, E, j, V, D, G, L, W;
44
- if (!y.value)
42
+ const Q = P(() => {
43
+ var M, C, E, B, D, L, j, G, V, W;
44
+ if (!O.value)
45
45
  return { entries: [], titles: {} };
46
- const { getHeadingId: t, getModelId: a, getOperationId: l, getTagId: c, getWebhookId: p } = y.value, r = {}, i = [];
47
- let s = null;
48
- k.value.forEach((e) => {
46
+ const { getHeadingId: t, getModelId: a, getOperationId: i, getTagId: d, getWebhookId: p } = O.value, s = {}, l = [];
47
+ let r = null;
48
+ x.value.forEach((e) => {
49
49
  var o;
50
- e.depth === K(k.value) ? (s = {
50
+ e.depth === q(x.value) ? (r = {
51
51
  id: t(e),
52
52
  title: e.value,
53
53
  show: !0,
54
54
  children: []
55
- }, i.push(s)) : s && ((o = s.children) == null || o.push({
55
+ }, l.push(r)) : r && ((o = r.children) == null || o.push({
56
56
  id: t(e),
57
57
  title: e.value,
58
58
  show: !0
59
59
  }));
60
60
  });
61
- const d = (H = (C = u.value) == null ? void 0 : C.tags) == null ? void 0 : H[0], g = d && ((e) => (e == null ? void 0 : e.length) !== 1 || e[0].name !== "default" || e[0].description !== "")((B = u.value) == null ? void 0 : B.tags) ? (j = (E = u.value) == null ? void 0 : E.tags) == null ? void 0 : j.filter((e) => {
61
+ const n = (C = (M = c.value) == null ? void 0 : M.tags) == null ? void 0 : C[0], m = n && ((e) => (e == null ? void 0 : e.length) !== 1 || e[0].name !== "default" || e[0].description !== "")((E = c.value) == null ? void 0 : E.tags) ? (D = (B = c.value) == null ? void 0 : B.tags) == null ? void 0 : D.filter((e) => {
62
62
  var o;
63
63
  return ((o = e.operations) == null ? void 0 : o.length) > 0;
64
64
  }).map((e) => {
65
65
  var o;
66
66
  return {
67
- id: c(e),
67
+ id: d(e),
68
68
  title: e.name,
69
69
  displayTitle: e["x-displayName"] ?? e.name,
70
70
  show: !0,
71
- children: (o = e.operations) == null ? void 0 : o.map((n) => {
72
- var m, b;
73
- const h = l(n, e), f = n.name ?? n.path;
74
- return r[h] = f, {
71
+ children: (o = e.operations) == null ? void 0 : o.map((u) => {
72
+ var v, b;
73
+ const h = i(u, e), f = u.name ?? u.path;
74
+ return s[h] = f, {
75
75
  id: h,
76
76
  title: f,
77
- httpVerb: n.httpVerb,
77
+ httpVerb: u.httpVerb,
78
78
  // TODO: Workaround until we’re using the store directly
79
- deprecated: n.information ? F({
80
- deprecated: (m = n.information) == null ? void 0 : m.deprecated,
81
- "x-scalar-stability": (b = n.information) == null ? void 0 : b["x-scalar-stability"]
79
+ deprecated: u.information ? F({
80
+ deprecated: (v = u.information) == null ? void 0 : v.deprecated,
81
+ "x-scalar-stability": (b = u.information) == null ? void 0 : b["x-scalar-stability"]
82
82
  }) : !1,
83
83
  show: !0,
84
84
  select: () => {
@@ -86,12 +86,12 @@ const U = J(() => {
86
86
  };
87
87
  })
88
88
  };
89
- }) : (V = d == null ? void 0 : d.operations) == null ? void 0 : V.map((e) => {
89
+ }) : (L = n == null ? void 0 : n.operations) == null ? void 0 : L.map((e) => {
90
90
  var h, f;
91
- const o = l(e, d), n = e.name ?? e.path;
92
- return r[o] = n, {
91
+ const o = i(e, n), u = e.name ?? e.path;
92
+ return s[o] = u, {
93
93
  id: o,
94
- title: n,
94
+ title: u,
95
95
  httpVerb: e.httpVerb,
96
96
  // TODO: Workaround until we’re using the store directly
97
97
  deprecated: e.information ? F({
@@ -103,35 +103,35 @@ const U = J(() => {
103
103
  }
104
104
  };
105
105
  });
106
- let I = ee(u.value) && !N.value ? [
106
+ let S = ee(c.value) && !J.value ? [
107
107
  {
108
108
  id: a(),
109
109
  title: "Models",
110
110
  show: !0,
111
- children: Object.keys(P(u.value) ?? {}).map((e) => {
112
- var n;
111
+ children: Object.keys(_(c.value) ?? {}).map((e) => {
112
+ var u;
113
113
  const o = a({ name: e });
114
- return r[o] = e, {
114
+ return s[o] = e, {
115
115
  id: o,
116
- title: ((n = P(u.value)) == null ? void 0 : n[e]).title ?? e,
116
+ title: ((u = _(c.value)) == null ? void 0 : u[e]).title ?? e,
117
117
  show: !0
118
118
  };
119
119
  })
120
120
  }
121
- ] : [], O = te(u.value) ? [
121
+ ] : [], k = te(c.value) ? [
122
122
  {
123
123
  id: p(),
124
124
  title: "Webhooks",
125
125
  show: !0,
126
- children: Object.keys(((D = u.value) == null ? void 0 : D.webhooks) ?? {}).flatMap((e) => {
127
- var n, h;
126
+ children: Object.keys(((j = c.value) == null ? void 0 : j.webhooks) ?? {}).flatMap((e) => {
127
+ var u, h;
128
128
  const o = p({ name: e });
129
- return r[o] = e, Object.keys(((h = (n = u.value) == null ? void 0 : n.webhooks) == null ? void 0 : h[e]) ?? {}).map(
129
+ return s[o] = e, Object.keys(((h = (u = c.value) == null ? void 0 : u.webhooks) == null ? void 0 : h[e]) ?? {}).map(
130
130
  (f) => {
131
- var m, b, A;
131
+ var v, b, A;
132
132
  return {
133
133
  id: p({ name: e, method: f }),
134
- title: (A = (b = (m = u.value) == null ? void 0 : m.webhooks) == null ? void 0 : b[e][f]) == null ? void 0 : A.name,
134
+ title: (A = (b = (v = c.value) == null ? void 0 : v.webhooks) == null ? void 0 : b[e][f]) == null ? void 0 : A.name,
135
135
  httpVerb: f,
136
136
  show: !0
137
137
  };
@@ -140,17 +140,17 @@ const U = J(() => {
140
140
  })
141
141
  }
142
142
  ] : [];
143
- const X = (G = u.value) != null && G["x-tagGroups"] ? (W = (L = u.value) == null ? void 0 : L["x-tagGroups"]) == null ? void 0 : W.map((e) => {
143
+ const X = (G = c.value) != null && G["x-tagGroups"] ? (W = (V = c.value) == null ? void 0 : V["x-tagGroups"]) == null ? void 0 : W.map((e) => {
144
144
  var h;
145
145
  const o = [];
146
146
  return (h = e.tags) == null || h.map((f) => {
147
- if (f === "models" && I.length > 0)
148
- o.push(I[0]), I = [];
149
- else if (f === "webhooks" && O.length > 0)
150
- o.push(O[0]), O = [];
147
+ if (f === "models" && S.length > 0)
148
+ o.push(S[0]), S = [];
149
+ else if (f === "webhooks" && k.length > 0)
150
+ o.push(k[0]), k = [];
151
151
  else {
152
- const m = g == null ? void 0 : g.find((b) => b.title === f);
153
- m && o.push(m);
152
+ const v = m == null ? void 0 : m.find((b) => b.title === f);
153
+ v && o.push(v);
154
154
  }
155
155
  }), {
156
156
  id: e.name,
@@ -159,81 +159,93 @@ const U = J(() => {
159
159
  show: !0,
160
160
  isGroup: !0
161
161
  };
162
- }) : void 0, M = [
163
- ...i,
164
- ...X ?? g ?? [],
165
- ...O,
166
- ...I
162
+ }) : void 0, H = [
163
+ ...l,
164
+ ...X ?? m ?? [],
165
+ ...k,
166
+ ...S
167
167
  ];
168
- return Q.value && M.forEach((e) => {
169
- w(e.id, !0), e.show = !0;
168
+ return K.value && H.forEach((e) => {
169
+ I(e.id, !0), e.show = !0;
170
170
  }), {
171
- entries: M,
172
- titles: r
171
+ entries: H,
172
+ titles: s
173
173
  };
174
- }), ae = S(!1), le = J(() => {
175
- var t, a, l;
176
- return ((l = (t = U.value) == null ? void 0 : t.titles) == null ? void 0 : l[((a = y.value) == null ? void 0 : a.hash) ?? ""]) ?? "";
177
- }), ie = (t, a) => {
178
- var c;
179
- const l = (c = y.value) == null ? void 0 : c.getSectionId(t);
180
- if (l && l !== t)
181
- if (T[l])
182
- R(t, a);
174
+ }), ie = w(!1), le = P(() => {
175
+ var t, a, i;
176
+ return ((i = (t = Q.value) == null ? void 0 : t.titles) == null ? void 0 : i[((a = O.value) == null ? void 0 : a.hash) ?? ""]) ?? "";
177
+ }), ne = (t, a) => {
178
+ var d;
179
+ const i = (d = O.value) == null ? void 0 : d.getSectionId(t);
180
+ if (i && i !== t)
181
+ if (y[i])
182
+ N(t, a);
183
183
  else {
184
- const p = Z.on((r) => {
185
- r.id === t && (R(t, a), p());
184
+ const p = Z.on((s) => {
185
+ s.id === t && (N(t, a), p());
186
186
  });
187
- w(l, !0);
187
+ I(i, !0);
188
188
  }
189
189
  };
190
- function Se(t) {
191
- Object.assign(v, t);
190
+ function we(t) {
191
+ Object.assign(g, t);
192
192
  const a = $();
193
- y.value = a;
194
- const { hash: l, getSectionId: c, getTagId: p } = a;
195
- return t != null && t.parsedSpec && (_(t.parsedSpec), z(
193
+ O.value = a;
194
+ const { hash: i, getSectionId: d, getTagId: p } = a;
195
+ return t != null && t.parsedSpec && (R(t.parsedSpec), U(
196
196
  () => {
197
- var r, i;
198
- return (i = (r = u.value) == null ? void 0 : r.tags) == null ? void 0 : i.length;
197
+ var s, l;
198
+ return (l = (s = c.value) == null ? void 0 : s.tags) == null ? void 0 : l.length;
199
199
  },
200
200
  () => {
201
- var r, i;
202
- if (l.value) {
203
- const s = c(l.value);
204
- s && w(s, !0);
201
+ var s, l;
202
+ if (i.value) {
203
+ const r = d(i.value);
204
+ r && I(r, !0);
205
205
  } else {
206
- const s = (i = (r = u.value) == null ? void 0 : r.tags) == null ? void 0 : i[0];
207
- s && w(p(s), !0);
206
+ const r = (l = (s = c.value) == null ? void 0 : s.tags) == null ? void 0 : l[0];
207
+ r && I(p(r), !0);
208
208
  }
209
209
  }
210
- ), z(
210
+ ), U(
211
211
  () => {
212
- var r, i;
213
- return (i = (r = u.value) == null ? void 0 : r.info) == null ? void 0 : i.description;
212
+ var s, l;
213
+ return (l = (s = c.value) == null ? void 0 : s.info) == null ? void 0 : l.description;
214
214
  },
215
215
  () => {
216
- var i, s;
217
- const r = (s = (i = u.value) == null ? void 0 : i.info) == null ? void 0 : s.description;
218
- return r ? k.value = oe(r) : k.value = [];
216
+ var r, n, T, m;
217
+ const s = (T = (n = (r = c.value) == null ? void 0 : r.info) == null ? void 0 : n.description) == null ? void 0 : T.trim();
218
+ if (!s)
219
+ return x.value = [];
220
+ const l = ae(s);
221
+ if (s && !s.startsWith("#")) {
222
+ const S = {
223
+ depth: ((m = l[0]) == null ? void 0 : m.depth) ?? 1,
224
+ value: "Introduction",
225
+ slug: re
226
+ };
227
+ l.unshift(S);
228
+ }
229
+ return x.value = l;
219
230
  },
220
231
  {
221
232
  immediate: !0
222
233
  }
223
234
  )), {
224
235
  breadcrumb: le,
225
- items: U,
226
- isSidebarOpen: ae,
227
- collapsedSidebarItems: T,
228
- toggleCollapsedSidebarItem: re,
229
- setCollapsedSidebarItem: w,
230
- hideModels: N,
231
- setParsedSpec: _,
232
- defaultOpenAllTags: Q,
233
- scrollToOperation: ie
236
+ items: Q,
237
+ isSidebarOpen: ie,
238
+ collapsedSidebarItems: y,
239
+ toggleCollapsedSidebarItem: oe,
240
+ setCollapsedSidebarItem: I,
241
+ hideModels: J,
242
+ setParsedSpec: R,
243
+ defaultOpenAllTags: K,
244
+ scrollToOperation: ne
234
245
  };
235
246
  }
236
247
  export {
237
- ie as scrollToOperation,
238
- Se as useSidebar
248
+ re as DEFAULT_INTRODUCTION_SLUG,
249
+ ne as scrollToOperation,
250
+ we as useSidebar
239
251
  };