@scalar/api-reference 1.25.105 → 1.25.106

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 (64) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/browser/standalone.js +7065 -7056
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  6. package/dist/components/ApiReferenceLayout.vue2.js +119 -131
  7. package/dist/components/Content/Lazy/Loading.vue.js +2 -2
  8. package/dist/components/Content/Models/Models.vue.js +2 -2
  9. package/dist/components/Content/Models/Models.vue2.js +2 -2
  10. package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
  11. package/dist/components/Content/Models/ModelsAccordion.vue2.js +2 -2
  12. package/dist/components/Content/Tag/Endpoints.vue2.js +3 -3
  13. package/dist/components/Content/Tag/TagList.vue.js +3 -3
  14. package/dist/components/Section/CompactSection.vue2.js +4 -4
  15. package/dist/components/Section/Section.vue2.js +3 -3
  16. package/dist/components/Sidebar/Sidebar.vue2.js +3 -3
  17. package/dist/components/Sidebar/SidebarElement.vue2.js +6 -6
  18. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  19. package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
  20. package/dist/features/DownloadLink/DownloadLink.vue2.js +14 -21
  21. package/dist/features/Operation/Webhooks.vue.js +3 -3
  22. package/dist/features/Operation/Webhooks.vue2.js +9 -9
  23. package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -2
  24. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  25. package/dist/features/Operation/components/OperationParameters.vue.js +34 -49
  26. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
  27. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  28. package/dist/features/Operation/components/ParameterList.vue.js +3 -3
  29. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +3 -3
  30. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  31. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  32. package/dist/features/Operation/components/ParameterListItem.vue2.js +34 -31
  33. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  34. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  35. package/dist/features/Operation/components/RequestBody.vue2.js +37 -33
  36. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  37. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  38. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +34 -34
  39. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  40. package/dist/features/Operation/layouts/ModernLayout.vue2.js +12 -12
  41. package/dist/features/Search/useSearchIndex.js +11 -11
  42. package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +1 -1
  43. package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
  44. package/dist/features/TestRequestButton/TestRequestButton.vue2.js +21 -21
  45. package/dist/helpers/index.d.ts +0 -1
  46. package/dist/helpers/index.d.ts.map +1 -1
  47. package/dist/helpers/parse.d.ts.map +1 -1
  48. package/dist/helpers/parse.js +59 -60
  49. package/dist/hooks/useConfig.d.ts +6 -0
  50. package/dist/hooks/useConfig.d.ts.map +1 -0
  51. package/dist/hooks/useConfig.js +6 -0
  52. package/dist/hooks/useNavState.d.ts +8 -3
  53. package/dist/hooks/useNavState.d.ts.map +1 -1
  54. package/dist/hooks/useNavState.js +71 -59
  55. package/dist/hooks/useSidebar.d.ts.map +1 -1
  56. package/dist/hooks/useSidebar.js +149 -149
  57. package/dist/index.js +58 -63
  58. package/dist/style.css +1 -1
  59. package/package.json +9 -9
  60. package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts +0 -7
  61. package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts.map +0 -1
  62. package/dist/helpers/provideSymbols.d.ts +0 -7
  63. package/dist/helpers/provideSymbols.d.ts.map +0 -1
  64. package/dist/helpers/provideSymbols.js +0 -7
@@ -1,68 +1,80 @@
1
- import { ssrState as d } from "@scalar/oas-utils/helpers";
1
+ import { useConfig as p } from "./useConfig.js";
2
+ import { ssrState as m } from "@scalar/oas-utils/helpers";
2
3
  import { slug as c } from "github-slugger";
3
4
  import { ref as l } from "vue";
4
- import { joinWithSlash as g } from "../helpers/joinWithSlash.js";
5
- const a = l(""), r = l(d.hash ?? ""), n = l(), w = l(!1), p = (e) => e.slug ? `description/${e.slug}` : "", h = (e) => {
6
- var o;
7
- if (!n.value) return "";
8
- const t = new RegExp("^" + ((o = n.value) == null ? void 0 : o.basePath) + "/?");
9
- return decodeURIComponent(e.replace(t, ""));
10
- }, f = (e, t) => e ? `webhook/${t}/${c(e)}` : "webhooks", v = (e) => e ? `model/${c(e)}` : "models", m = (e, t) => `${u(t)}/${e.httpVerb}${e.path}`, u = ({ name: e }) => `tag/${c(e)}`, I = (e = r.value) => {
5
+ import { joinWithSlash as f } from "../helpers/joinWithSlash.js";
6
+ const s = l(""), u = l(m.hash ?? ""), a = l(), w = l(!1), d = (e) => {
7
+ var n;
8
+ if (!a.value) return "";
9
+ const r = new RegExp("^" + ((n = a.value) == null ? void 0 : n.basePath) + "/?");
10
+ return decodeURIComponent(e.replace(r, ""));
11
+ }, I = (e = u.value) => {
11
12
  var i;
12
- const t = (i = e.match(/(tag\/[^/]+)/)) == null ? void 0 : i[0], o = e.startsWith("model") ? "models" : "", s = e.startsWith("webhook") ? "webhooks" : "";
13
- return t || o || s;
14
- }, b = () => {
15
- r.value = n.value ? h(window.location.pathname) : (
13
+ const r = (i = e.match(/(tag\/[^/]+)/)) == null ? void 0 : i[0], n = e.startsWith("model") ? "models" : "", o = e.startsWith("webhook") ? "webhooks" : "";
14
+ return r || n || o;
15
+ }, v = () => {
16
+ u.value = a.value ? d(window.location.pathname) : (
16
17
  // Must remove the prefix from the hash as the internal hash value should be pure
17
18
  decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(
18
- a.value.length
19
+ s.value.length
19
20
  )
20
21
  );
21
- }, $ = (e, t = window.location.href) => {
22
- const o = new URL(t);
23
- n.value ? o.pathname = g(n.value.basePath, e) : o.hash = a.value + e, r.value = e, window.history.replaceState({}, "", o);
24
- }, R = (e, t = window.location.href, o = window.location.search) => {
25
- const s = new URL(t);
26
- return s.hash = a.value + e, s.search = o, s.toString();
27
- }, U = (e = r.value) => `${a.value}${e}`, k = () => decodeURIComponent(
28
- window.location.hash.replace(/^#/, "").slice(a.value.length)
29
- ), W = () => ({
30
- hash: r,
31
- /** Sets the prefix for the hash */
32
- setHashPrefix: (e) => {
33
- a.value = e;
34
- },
35
- /**
36
- * Gets the full hash with the prefix
37
- * @param hashTarget The hash to target with the return
38
- * @returns The full hash
39
- */
40
- getFullHash: U,
41
- /**
42
- * Gets the hashed url with the prefix
43
- * @param replacementHash The hash to replace the current hash with
44
- * @param url The url to get the hashed url from
45
- * @returns The hashed url
46
- */
47
- getHashedUrl: R,
48
- /**
49
- * Replaces the URL state with the new url and hash
50
- * Replacement is used so that hash changes don't trigger the url hash watcher and cause a scroll
51
- */
52
- replaceUrlState: $,
53
- /** Gets the portion of the hash used by the references */
54
- getReferenceHash: k,
55
- getWebhookId: f,
56
- getModelId: v,
57
- getHeadingId: p,
58
- getOperationId: m,
59
- getPathRoutingId: h,
60
- getSectionId: I,
61
- getTagId: u,
62
- isIntersectionEnabled: w,
63
- pathRouting: n,
64
- updateHash: b
65
- });
22
+ }, $ = (e, r = window.location.href) => {
23
+ const n = new URL(r);
24
+ a.value ? n.pathname = f(a.value.basePath, e) : n.hash = s.value + e, u.value = e, window.history.replaceState({}, "", n);
25
+ }, S = (e, r = window.location.href, n = window.location.search) => {
26
+ const o = new URL(r);
27
+ return o.hash = s.value + e, o.search = n, o.toString();
28
+ }, y = (e = u.value) => `${s.value}${e}`, R = () => decodeURIComponent(
29
+ window.location.hash.replace(/^#/, "").slice(s.value.length)
30
+ ), C = () => {
31
+ const e = p(), r = (t) => typeof (e == null ? void 0 : e.generateHeadingSlug) == "function" ? `${e.generateHeadingSlug(t)}` : t.slug ? `description/${t.slug}` : "", n = (t) => t != null && t.name ? typeof (e == null ? void 0 : e.generateModelSlug) == "function" ? `model/${e.generateModelSlug(t)}` : `model/${c(t.name)}` : "models", o = (t) => typeof (e == null ? void 0 : e.generateTagSlug) == "function" ? `tag/${e.generateTagSlug(t)}` : `tag/${c(t.name)}`;
32
+ return {
33
+ hash: u,
34
+ /** Sets the prefix for the hash */
35
+ setHashPrefix: (t) => {
36
+ s.value = t;
37
+ },
38
+ /**
39
+ * Gets the full hash with the prefix
40
+ * @param hashTarget The hash to target with the return
41
+ * @returns The full hash
42
+ */
43
+ getFullHash: y,
44
+ /**
45
+ * Gets the hashed url with the prefix
46
+ * @param replacementHash The hash to replace the current hash with
47
+ * @param url The url to get the hashed url from
48
+ * @returns The hashed url
49
+ */
50
+ getHashedUrl: S,
51
+ /**
52
+ * Replaces the URL state with the new url and hash
53
+ * Replacement is used so that hash changes don't trigger the url hash watcher and cause a scroll
54
+ */
55
+ replaceUrlState: $,
56
+ /** Gets the portion of the hash used by the references */
57
+ getReferenceHash: R,
58
+ getWebhookId: (t) => t != null && t.name ? typeof (e == null ? void 0 : e.generateWebhookSlug) == "function" ? `webhook/${e.generateWebhookSlug(t)}` : `webhook/${t.method}/${c(t.name)}` : "webhooks",
59
+ getModelId: n,
60
+ getHeadingId: r,
61
+ getOperationId: (t, g) => {
62
+ var h;
63
+ return typeof (e == null ? void 0 : e.generateOperationSlug) == "function" ? `${o(g)}/${e.generateOperationSlug({
64
+ path: t.path,
65
+ operationId: t.operationId,
66
+ method: t.httpVerb,
67
+ summary: (h = t.information) == null ? void 0 : h.summary
68
+ })}` : `${o(g)}/${t.httpVerb}${t.path}`;
69
+ },
70
+ getPathRoutingId: d,
71
+ getSectionId: I,
72
+ getTagId: o,
73
+ isIntersectionEnabled: w,
74
+ pathRouting: a,
75
+ updateHash: v
76
+ };
77
+ };
66
78
  export {
67
- W as useNavState
79
+ C as useNavState
68
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAc3E,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;AAkBD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QA6ChC;AAMD,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;AA+ND,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,EACb,OAAO,GACP,QAAQ,GACR,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAA;CACnE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,SAepD,CAAA;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY;;;;;;;;;;;;;qCApBrB,MAAM;EAsEpD"}
1
+ {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAc3E,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,QA6ChC;AAMD,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;AAsOD,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,EACb,OAAO,GACP,QAAQ,GACR,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAA;CACnE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,SAepD,CAAA;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY;;;;;;;;;;;;;qCApBrB,MAAM;EA2EpD"}
@@ -1,89 +1,82 @@
1
- import { ssrState as Z } from "@scalar/oas-utils/helpers";
2
- import { ref as g, reactive as q, computed as J, watch as W } from "vue";
3
- import { lazyBus as _ } from "../components/Content/Lazy/lazyBus.js";
4
- import { useNavState as $ } from "./useNavState.js";
5
- import { getLowestHeadingLevel as K } from "../helpers/getLowestHeadingLevel.js";
6
- import { hasModels as ee } from "../helpers/hasModels.js";
7
- import { getModels as A } from "../helpers/getModels.js";
8
- import { hasWebhooks as te } from "../helpers/hasWebhooks.js";
9
- import { scrollToId as D } from "../helpers/scrollToId.js";
10
- import { getHeadingsFromMarkdown as se } from "../helpers/getHeadingsFromMarkdown.js";
11
- const {
12
- getHeadingId: F,
13
- getModelId: z,
14
- getOperationId: P,
15
- getSectionId: N,
16
- getTagId: Q,
17
- getWebhookId: I,
18
- hash: y
19
- } = $(), a = g(void 0), p = q({});
1
+ import { ssrState as X } from "@scalar/oas-utils/helpers";
2
+ import { ref as b, reactive as _, computed as q, watch as F } from "vue";
3
+ import { lazyBus as Y } from "../components/Content/Lazy/lazyBus.js";
4
+ import { useNavState as Z } from "./useNavState.js";
5
+ import { getLowestHeadingLevel as J } from "../helpers/getLowestHeadingLevel.js";
6
+ import { hasModels as $ } from "../helpers/hasModels.js";
7
+ import { getModels as z } from "../helpers/getModels.js";
8
+ import { hasWebhooks as ee } from "../helpers/hasWebhooks.js";
9
+ import { scrollToId as P } from "../helpers/scrollToId.js";
10
+ import { getHeadingsFromMarkdown as te } from "../helpers/getHeadingsFromMarkdown.js";
11
+ const w = b(null), i = b(void 0), v = _({});
20
12
  function R(t) {
21
- var O, h, m;
22
- p.tagsSorter === "alpha" ? t.tags = (O = t.tags) == null ? void 0 : O.sort((n, u) => n.name.localeCompare(u.name)) : typeof p.tagsSorter == "function" && (t.tags = (h = t.tags) == null ? void 0 : h.sort(p.tagsSorter));
23
- const s = (n, u) => {
24
- const S = n.name ?? n.path, w = u.name ?? u.path;
25
- return S.localeCompare(w);
26
- }, r = (n, u) => n.httpVerb.localeCompare(u.httpVerb);
27
- let o;
28
- return p.operationsSorter === "alpha" ? o = s : p.operationsSorter === "method" ? o = r : typeof p.operationsSorter == "function" && (o = p.operationsSorter), o && ((m = t.tags) == null || m.forEach((n) => {
13
+ var f, l, a;
14
+ v.tagsSorter === "alpha" ? t.tags = (f = t.tags) == null ? void 0 : f.sort((s, u) => s.name.localeCompare(u.name)) : typeof v.tagsSorter == "function" && (t.tags = (l = t.tags) == null ? void 0 : l.sort(v.tagsSorter));
15
+ const r = (s, u) => {
16
+ const M = s.name ?? s.path, g = u.name ?? u.path;
17
+ return M.localeCompare(g);
18
+ }, n = (s, u) => s.httpVerb.localeCompare(u.httpVerb);
19
+ let d;
20
+ return v.operationsSorter === "alpha" ? d = r : v.operationsSorter === "method" ? d = n : typeof v.operationsSorter == "function" && (d = v.operationsSorter), d && ((a = t.tags) == null || a.forEach((s) => {
29
21
  var u;
30
- n.operations = (u = n.operations) == null ? void 0 : u.sort(o);
31
- })), a.value = t;
22
+ s.operations = (u = s.operations) == null ? void 0 : u.sort(d);
23
+ })), i.value = t;
32
24
  }
33
- const U = g(!1), X = g(!1), b = q(
34
- Z["useSidebarContent-collapsedSidebarItems"] ?? {}
25
+ const K = b(!1), N = b(!1), T = _(
26
+ X["useSidebarContent-collapsedSidebarItems"] ?? {}
35
27
  );
36
- function oe(t) {
37
- b[t] = !b[t];
28
+ function se(t) {
29
+ T[t] = !T[t];
38
30
  }
39
- function v(t, s) {
40
- b[t] = s;
31
+ function S(t, r) {
32
+ T[t] = r;
41
33
  }
42
- const k = g([]);
43
- function re(t) {
44
- const s = se(t), r = K(s);
45
- return s.filter((o) => (
34
+ const y = b([]);
35
+ function oe(t) {
36
+ const r = te(t), n = J(r);
37
+ return r.filter((d) => (
46
38
  // highest level, eg. # Introduction
47
- o.depth === r || // second highest level, eg. ## Authentication
48
- o.depth === r + 1
39
+ d.depth === n || // second highest level, eg. ## Authentication
40
+ d.depth === n + 1
49
41
  ));
50
42
  }
51
- const Y = J(() => {
52
- var w, M, C, H, B, E, j, x, V, G;
53
- const t = {}, s = [];
54
- let r = null;
55
- k.value.forEach((e) => {
56
- var l;
57
- e.depth === K(k.value) ? (r = {
58
- id: F(e),
43
+ const Q = q(() => {
44
+ var H, B, E, j, x, V, G, L, W, A;
45
+ if (!w.value) return { entries: [], titles: {} };
46
+ const { getHeadingId: t, getModelId: r, getOperationId: n, getTagId: d, getWebhookId: f } = w.value, l = {}, a = [];
47
+ let s = null;
48
+ y.value.forEach((e) => {
49
+ var o;
50
+ e.depth === J(y.value) ? (s = {
51
+ id: t(e),
59
52
  title: e.value,
60
53
  show: !0,
61
54
  children: []
62
- }, s.push(r)) : r && ((l = r.children) == null || l.push({
63
- id: F(e),
55
+ }, a.push(s)) : s && ((o = s.children) == null || o.push({
56
+ id: t(e),
64
57
  title: e.value,
65
58
  show: !0
66
59
  }));
67
60
  });
68
- const o = (M = (w = a.value) == null ? void 0 : w.tags) == null ? void 0 : M[0], h = o && ((e) => (e == null ? void 0 : e.length) !== 1 || e[0].name !== "default" || e[0].description !== "")((C = a.value) == null ? void 0 : C.tags) ? (B = (H = a.value) == null ? void 0 : H.tags) == null ? void 0 : B.filter((e) => {
69
- var l;
70
- return ((l = e.operations) == null ? void 0 : l.length) > 0;
61
+ const u = (B = (H = i.value) == null ? void 0 : H.tags) == null ? void 0 : B[0], g = u && ((e) => (e == null ? void 0 : e.length) !== 1 || e[0].name !== "default" || e[0].description !== "")((E = i.value) == null ? void 0 : E.tags) ? (x = (j = i.value) == null ? void 0 : j.tags) == null ? void 0 : x.filter((e) => {
62
+ var o;
63
+ return ((o = e.operations) == null ? void 0 : o.length) > 0;
71
64
  }).map((e) => {
72
- var l;
65
+ var o;
73
66
  return {
74
- id: Q(e),
67
+ id: d(e),
75
68
  title: e.name,
76
69
  displayTitle: e["x-displayName"] ?? e.name,
77
70
  show: !0,
78
- children: (l = e.operations) == null ? void 0 : l.map(
79
- (i) => {
80
- var f;
81
- const c = P(i, e), d = i.name ?? i.path;
82
- return t[c] = d, {
83
- id: c,
84
- title: d,
85
- httpVerb: i.httpVerb,
86
- deprecated: ((f = i.information) == null ? void 0 : f.deprecated) ?? !1,
71
+ children: (o = e.operations) == null ? void 0 : o.map(
72
+ (c) => {
73
+ var m;
74
+ const h = n(c, e), p = c.name ?? c.path;
75
+ return l[h] = p, {
76
+ id: h,
77
+ title: p,
78
+ httpVerb: c.httpVerb,
79
+ deprecated: ((m = c.information) == null ? void 0 : m.deprecated) ?? !1,
87
80
  show: !0,
88
81
  select: () => {
89
82
  }
@@ -91,149 +84,156 @@ const Y = J(() => {
91
84
  }
92
85
  )
93
86
  };
94
- }) : (E = o == null ? void 0 : o.operations) == null ? void 0 : E.map((e) => {
95
- var c;
96
- const l = P(e, o), i = e.name ?? e.path;
97
- return t[l] = i, {
98
- id: l,
99
- title: i,
87
+ }) : (V = u == null ? void 0 : u.operations) == null ? void 0 : V.map((e) => {
88
+ var h;
89
+ const o = n(e, u), c = e.name ?? e.path;
90
+ return l[o] = c, {
91
+ id: o,
92
+ title: c,
100
93
  httpVerb: e.httpVerb,
101
- deprecated: ((c = e.information) == null ? void 0 : c.deprecated) ?? !1,
94
+ deprecated: ((h = e.information) == null ? void 0 : h.deprecated) ?? !1,
102
95
  show: !0,
103
96
  select: () => {
104
97
  }
105
98
  };
106
99
  });
107
- let m = ee(a.value) && !U.value ? [
100
+ let I = $(i.value) && !K.value ? [
108
101
  {
109
- id: z(),
102
+ id: r(),
110
103
  title: "Models",
111
104
  show: !0,
112
- children: Object.keys(A(a.value) ?? {}).map(
105
+ children: Object.keys(z(i.value) ?? {}).map(
113
106
  (e) => {
114
- var i;
115
- const l = z(e);
116
- return t[l] = e, {
117
- id: l,
118
- title: ((i = A(a.value)) == null ? void 0 : i[e]).title ?? e,
107
+ var c;
108
+ const o = r({ name: e });
109
+ return l[o] = e, {
110
+ id: o,
111
+ title: ((c = z(i.value)) == null ? void 0 : c[e]).title ?? e,
119
112
  show: !0
120
113
  };
121
114
  }
122
115
  )
123
116
  }
124
- ] : [], n = te(a.value) ? [
117
+ ] : [], k = ee(i.value) ? [
125
118
  {
126
- id: I(),
119
+ id: f(),
127
120
  title: "Webhooks",
128
121
  show: !0,
129
- children: Object.keys(((j = a.value) == null ? void 0 : j.webhooks) ?? {}).map((e) => {
130
- var i, c;
131
- const l = I(e);
132
- return t[l] = e, Object.keys(
133
- ((c = (i = a.value) == null ? void 0 : i.webhooks) == null ? void 0 : c[e]) ?? {}
134
- ).map((d) => {
135
- var f, T, L;
122
+ children: Object.keys(((G = i.value) == null ? void 0 : G.webhooks) ?? {}).map((e) => {
123
+ var c, h;
124
+ const o = f({ name: e });
125
+ return l[o] = e, Object.keys(
126
+ ((h = (c = i.value) == null ? void 0 : c.webhooks) == null ? void 0 : h[e]) ?? {}
127
+ ).map((p) => {
128
+ var m, O, D;
136
129
  return {
137
- id: I(e, d),
138
- title: (L = (T = (f = a.value) == null ? void 0 : f.webhooks) == null ? void 0 : T[e][d]) == null ? void 0 : L.name,
139
- httpVerb: d,
130
+ id: f({ name: e, method: p }),
131
+ title: (D = (O = (m = i.value) == null ? void 0 : m.webhooks) == null ? void 0 : O[e][p]) == null ? void 0 : D.name,
132
+ httpVerb: p,
140
133
  show: !0
141
134
  };
142
135
  });
143
136
  }).flat()
144
137
  }
145
138
  ] : [];
146
- const u = (x = a.value) != null && x["x-tagGroups"] ? (G = (V = a.value) == null ? void 0 : V["x-tagGroups"]) == null ? void 0 : G.map((e) => {
147
- var c;
148
- const l = [];
149
- return (c = e.tags) == null || c.map((d) => {
150
- if (d === "models" && m.length > 0)
151
- l.push(m[0]), m = [];
152
- else if (d === "webhooks" && n.length > 0)
153
- l.push(n[0]), n = [];
139
+ const U = (L = i.value) != null && L["x-tagGroups"] ? (A = (W = i.value) == null ? void 0 : W["x-tagGroups"]) == null ? void 0 : A.map((e) => {
140
+ var h;
141
+ const o = [];
142
+ return (h = e.tags) == null || h.map((p) => {
143
+ if (p === "models" && I.length > 0)
144
+ o.push(I[0]), I = [];
145
+ else if (p === "webhooks" && k.length > 0)
146
+ o.push(k[0]), k = [];
154
147
  else {
155
- const f = h == null ? void 0 : h.find(
156
- (T) => T.title === d
148
+ const m = g == null ? void 0 : g.find(
149
+ (O) => O.title === p
157
150
  );
158
- f && l.push(f);
151
+ m && o.push(m);
159
152
  }
160
153
  }), {
161
154
  id: e.name,
162
155
  title: e.name,
163
- children: l,
156
+ children: o,
164
157
  show: !0,
165
158
  isGroup: !0
166
159
  };
167
- }) : void 0, S = [
168
- ...s,
169
- ...u ?? h ?? [],
170
- ...n,
171
- ...m
160
+ }) : void 0, C = [
161
+ ...a,
162
+ ...U ?? g ?? [],
163
+ ...k,
164
+ ...I
172
165
  ];
173
- return X.value && S.forEach((e) => {
174
- v(e.id, !0), e.show = !0;
166
+ return N.value && C.forEach((e) => {
167
+ S(e.id, !0), e.show = !0;
175
168
  }), {
176
- entries: S,
177
- titles: t
169
+ entries: C,
170
+ titles: l
178
171
  };
179
- }), le = g(!1), ae = J(() => {
180
- var t, s;
181
- return ((s = (t = Y.value) == null ? void 0 : t.titles) == null ? void 0 : s[y.value]) ?? "";
182
- }), ie = (t) => {
183
- const s = N(t);
184
- if (s !== t)
185
- if (b[s])
186
- D(t);
172
+ }), re = b(!1), le = q(
173
+ () => {
174
+ var t, r, n;
175
+ return ((n = (t = Q.value) == null ? void 0 : t.titles) == null ? void 0 : n[((r = w.value) == null ? void 0 : r.hash) ?? ""]) ?? "";
176
+ }
177
+ ), ae = (t) => {
178
+ var n;
179
+ const r = (n = w.value) == null ? void 0 : n.getSectionId(t);
180
+ if (r && r !== t)
181
+ if (T[r])
182
+ P(t);
187
183
  else {
188
- const r = _.on((o) => {
189
- o.id === t && (D(t), r());
184
+ const d = Y.on((f) => {
185
+ f.id === t && (P(t), d());
190
186
  });
191
- v(s, !0);
187
+ S(r, !0);
192
188
  }
193
189
  };
194
190
  function ge(t) {
195
- return Object.assign(p, t), t != null && t.parsedSpec && (R(t.parsedSpec), W(
191
+ Object.assign(v, t);
192
+ const r = Z();
193
+ w.value = r;
194
+ const { hash: n, getSectionId: d, getTagId: f } = r;
195
+ return t != null && t.parsedSpec && (R(t.parsedSpec), F(
196
196
  () => {
197
- var s, r;
198
- return (r = (s = a.value) == null ? void 0 : s.tags) == null ? void 0 : r.length;
197
+ var l, a;
198
+ return (a = (l = i.value) == null ? void 0 : l.tags) == null ? void 0 : a.length;
199
199
  },
200
200
  () => {
201
- var s, r;
202
- if (y.value) {
203
- const o = N(y.value);
204
- o && v(o, !0);
201
+ var l, a;
202
+ if (n.value) {
203
+ const s = d(n.value);
204
+ s && S(s, !0);
205
205
  } else {
206
- const o = (r = (s = a.value) == null ? void 0 : s.tags) == null ? void 0 : r[0];
207
- o && v(Q(o), !0);
206
+ const s = (a = (l = i.value) == null ? void 0 : l.tags) == null ? void 0 : a[0];
207
+ s && S(f(s), !0);
208
208
  }
209
209
  }
210
- ), W(
210
+ ), F(
211
211
  () => {
212
- var s, r;
213
- return (r = (s = a.value) == null ? void 0 : s.info) == null ? void 0 : r.description;
212
+ var l, a;
213
+ return (a = (l = i.value) == null ? void 0 : l.info) == null ? void 0 : a.description;
214
214
  },
215
215
  () => {
216
- var r, o;
217
- const s = (o = (r = a.value) == null ? void 0 : r.info) == null ? void 0 : o.description;
218
- return s ? k.value = re(s) : k.value = [];
216
+ var a, s;
217
+ const l = (s = (a = i.value) == null ? void 0 : a.info) == null ? void 0 : s.description;
218
+ return l ? y.value = oe(l) : y.value = [];
219
219
  },
220
220
  {
221
221
  immediate: !0
222
222
  }
223
223
  )), {
224
- breadcrumb: ae,
225
- items: Y,
226
- isSidebarOpen: le,
227
- collapsedSidebarItems: b,
228
- toggleCollapsedSidebarItem: oe,
229
- setCollapsedSidebarItem: v,
230
- hideModels: U,
224
+ breadcrumb: le,
225
+ items: Q,
226
+ isSidebarOpen: re,
227
+ collapsedSidebarItems: T,
228
+ toggleCollapsedSidebarItem: se,
229
+ setCollapsedSidebarItem: S,
230
+ hideModels: K,
231
231
  setParsedSpec: R,
232
- defaultOpenAllTags: X,
233
- scrollToOperation: ie
232
+ defaultOpenAllTags: N,
233
+ scrollToOperation: ae
234
234
  };
235
235
  }
236
236
  export {
237
- ie as scrollToOperation,
237
+ ae as scrollToOperation,
238
238
  ge as useSidebar
239
239
  };