@scalar/api-reference 1.25.27 → 1.25.29

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 +1 @@
1
- {"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AAmjBA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,gBAAgB,CAAA;AA0BvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAmOjB,iBAAS,cAAc;oBAvMe,kBAAkB,KAAK,GAAG;oBAA1B,kBAAkB,KAAK,GAAG;oBAA1B,kBAAkB,KAAK,GAAG;6BAA1B,kBAAkB,KAAK,GAAG;2BAA1B,kBAAkB,KAAK,GAAG;6BAA1B,kBAAkB,KAAK,GAAG;2BAA1B,kBAAkB,KAAK,GAAG;;oBAA1B,kBAAkB,KAAK,GAAG;oBAA1B,kBAAkB,KAAK,GAAG;oBAA1B,kBAAkB,KAAK,GAAG;6BAA1B,kBAAkB,KAAK,GAAG;2BAA1B,kBAAkB,KAAK,GAAG;6BAA1B,kBAAkB,KAAK,GAAG;2BAA1B,kBAAkB,KAAK,GAAG;EAqf/D;AACD,QAAA,MAAM,eAAe;;YAtgBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;UA6gB9D,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,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AK,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"}
@@ -2,7 +2,7 @@ import o from "./ApiReferenceLayout.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dc418317"]]);
5
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-63cf628e"]]);
6
6
  export {
7
- a as default
7
+ m as default
8
8
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as Z, ref as w, onMounted as D, computed as v, onBeforeMount as M, watch as x, onServerPrefetch as ee, useSSRContext as oe, getCurrentInstance as te, provide as h, openBlock as b, createElementBlock as y, Fragment as k, createElementVNode as l, normalizeClass as re, unref as p, normalizeStyle as ae, renderSlot as d, normalizeProps as c, guardReactiveProps as u, createVNode as g, withCtx as m, createCommentVNode as T, withDirectives as ne, vShow as se, createSlots as ie } from "vue";
1
+ import { defineComponent as _, ref as w, onMounted as D, computed as v, onBeforeMount as M, watch as x, onServerPrefetch as ee, useSSRContext as oe, getCurrentInstance as te, provide as h, openBlock as b, createElementBlock as y, Fragment as k, createElementVNode as l, normalizeClass as re, unref as p, normalizeStyle as ae, renderSlot as d, normalizeProps as c, guardReactiveProps as u, createVNode as g, withCtx as m, createCommentVNode as T, withDirectives as ne, vShow as se, createSlots as ie } from "vue";
2
2
  import { provideUseId as le } from "@headlessui/vue";
3
3
  import { addScalarClassesToHeadless as de } from "@scalar/components";
4
4
  import { defaultStateFactory as P } from "@scalar/oas-utils/helpers";
@@ -22,7 +22,7 @@ const Ue = ["innerHTML"], De = { class: "references-header" }, Me = {
22
22
  }, ke = { class: "references-navigation-list" }, Pe = { class: "references-editor" }, Fe = { class: "references-editor-textarea" }, Ae = { class: "references-rendered" }, Ne = {
23
23
  key: 0,
24
24
  class: "references-footer"
25
- }, ro = /* @__PURE__ */ Z({
25
+ }, ro = /* @__PURE__ */ _({
26
26
  inheritAttrs: !1,
27
27
  __name: "ApiReferenceLayout",
28
28
  props: {
@@ -59,7 +59,7 @@ const Ue = ["innerHTML"], De = { class: "references-header" }, Me = {
59
59
  } = Ce(), {
60
60
  getPathRoutingId: $,
61
61
  getSectionId: K,
62
- getTagId: _,
62
+ getTagId: J,
63
63
  hash: E,
64
64
  isIntersectionEnabled: O,
65
65
  pathRouting: L,
@@ -75,7 +75,7 @@ const Ue = ["innerHTML"], De = { class: "references-header" }, Me = {
75
75
  ye(t.rawSpec, e);
76
76
  }), window.onhashchange = () => I(decodeURIComponent(window.location.hash.replace(/^#/, ""))), window.onpopstate = () => L.value && I($(window.location.pathname));
77
77
  });
78
- const J = v(
78
+ const X = v(
79
79
  () => H.value || !t.configuration.isEditable
80
80
  ), U = Se((e) => {
81
81
  if ((e.target.scrollTop ?? 0) < 50) {
@@ -98,7 +98,7 @@ const Ue = ["innerHTML"], De = { class: "references-header" }, Me = {
98
98
  C(K(a), !0);
99
99
  else {
100
100
  const n = (r = t.parsedSpec.tags) == null ? void 0 : r[0];
101
- n && C(_(n), !0);
101
+ n && C(J(n), !0);
102
102
  }
103
103
  e.payload.data["useSidebarContent-collapsedSidebarItems"] = S;
104
104
  }
@@ -118,7 +118,7 @@ const Ue = ["innerHTML"], De = { class: "references-header" }, Me = {
118
118
  var e;
119
119
  return (e = t.configuration.spec) == null ? void 0 : e.url;
120
120
  }), Q.value = t.configuration.hideModels ?? !1, W.value = t.configuration.defaultOpenAllTags ?? !1, we(t.configuration);
121
- const X = v(
121
+ const Z = v(
122
122
  () => `<style>
123
123
  ${ue(t.configuration.theme, {
124
124
  fonts: t.configuration.withDefaultFonts
@@ -127,7 +127,7 @@ const Ue = ["innerHTML"], De = { class: "references-header" }, Me = {
127
127
  return (e, o) => {
128
128
  var r, a;
129
129
  return b(), y(k, null, [
130
- l("div", { innerHTML: X.value }, null, 8, Ue),
130
+ l("div", { innerHTML: Z.value }, null, 8, Ue),
131
131
  l("div", {
132
132
  ref_key: "documentEl",
133
133
  ref: f,
@@ -153,6 +153,7 @@ const Ue = ["innerHTML"], De = { class: "references-header" }, Me = {
153
153
  e.configuration.showSidebar ? (b(), y("aside", Me, [
154
154
  l("div", ke, [
155
155
  g(p(Te), {
156
+ operationsSorter: e.configuration.operationsSorter,
156
157
  parsedSpec: e.parsedSpec,
157
158
  tagsSorter: e.configuration.tagsSorter
158
159
  }, {
@@ -163,7 +164,7 @@ const Ue = ["innerHTML"], De = { class: "references-header" }, Me = {
163
164
  d(e.$slots, "sidebar-end", c(u(i.value)), void 0, !0)
164
165
  ]),
165
166
  _: 3
166
- }, 8, ["parsedSpec", "tagsSorter"])
167
+ }, 8, ["operationsSorter", "parsedSpec", "tagsSorter"])
167
168
  ])
168
169
  ])) : T("", !0),
169
170
  ne(l("div", Pe, [
@@ -173,7 +174,7 @@ const Ue = ["innerHTML"], De = { class: "references-header" }, Me = {
173
174
  ], 512), [
174
175
  [se, e.configuration.isEditable]
175
176
  ]),
176
- J.value ? (b(), y(k, { key: 1 }, [
177
+ X.value ? (b(), y(k, { key: 1 }, [
177
178
  l("div", Ae, [
178
179
  g(p(Re), {
179
180
  baseServerURL: e.configuration.baseServerURL,
@@ -1,14 +1,14 @@
1
1
  import type { Spec } from '@scalar/types/legacy';
2
- import { type TagsSorterOption } from '../../hooks';
2
+ import { type SorterOption } from '../../hooks';
3
3
  declare function __VLS_template(): {
4
4
  "sidebar-start"?(_: {}): any;
5
5
  "sidebar-end"?(_: {}): any;
6
6
  };
7
7
  declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
8
8
  parsedSpec: Spec;
9
- } & TagsSorterOption>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
+ } & SorterOption>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
10
10
  parsedSpec: Spec;
11
- } & TagsSorterOption>>>, {}, {}>;
11
+ } & SorterOption>>>, {}, {}>;
12
12
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
13
13
  export default _default;
14
14
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AAiOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAIhD,OAAO,EAAE,KAAK,gBAAgB,EAA2B,MAAM,aAAa,CAAA;AAwE5E,iBAAS,cAAc;6BA8Oc,GAAG;2BACJ,GAAG;EAuBtC;AACD,QAAA,MAAM,eAAe;gBAxUL,IAAI;;gBAAJ,IAAI;gCA8UlB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC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AK,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-66b58ff3"]]);
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-42bebafe"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as B, ref as E, watch as N, onMounted as F, openBlock as l, createElementBlock as a, renderSlot as V, createElementVNode as w, createVNode as I, withCtx as f, Fragment as d, renderList as h, unref as i, toDisplayString as L, createBlock as u, createCommentVNode as b } from "vue";
1
+ import { defineComponent as B, ref as E, watch as F, onMounted as N, openBlock as r, createElementBlock as a, renderSlot as V, createElementVNode as w, createVNode as I, withCtx as f, Fragment as d, renderList as h, unref as i, toDisplayString as L, createBlock as u, createCommentVNode as b } from "vue";
2
2
  import v from "./SidebarElement.vue.js";
3
3
  import m from "./SidebarGroup.vue.js";
4
4
  import { useSidebar as G } from "../../hooks/useSidebar.js";
@@ -8,42 +8,44 @@ const D = { class: "sidebar" }, H = { class: "sidebar-group-title" }, M = -160,
8
8
  __name: "Sidebar",
9
9
  props: {
10
10
  parsedSpec: {},
11
- tagsSorter: { type: [String, Function] }
11
+ tagsSorter: { type: [String, Function] },
12
+ operationsSorter: { type: [String, Function] }
12
13
  },
13
14
  setup(A) {
14
- const S = A, { hash: o, isIntersectionEnabled: $ } = x(), { items: O, toggleCollapsedSidebarItem: T, collapsedSidebarItems: g } = G(
15
+ const y = A, { hash: o, isIntersectionEnabled: $ } = x(), { items: O, toggleCollapsedSidebarItem: g, collapsedSidebarItems: T } = G(
15
16
  {
16
- parsedSpec: S.parsedSpec,
17
- tagsSorter: S.tagsSorter
17
+ parsedSpec: y.parsedSpec,
18
+ tagsSorter: y.tagsSorter,
19
+ operationsSorter: y.operationsSorter
18
20
  }
19
- ), y = E(null), c = E(!0);
20
- N(o, (p) => {
21
+ ), S = E(null), c = E(!0);
22
+ F(o, (p) => {
21
23
  !$.value || c.value || typeof window > "u" || k(p);
22
24
  });
23
25
  const k = (p) => {
24
- var t, r, s, _;
26
+ var t, l, s, _;
25
27
  const n = document.getElementById(`sidebar-${p}`);
26
- if (!n || !y.value) return;
28
+ if (!n || !S.value) return;
27
29
  let e = M;
28
- n.getAttribute("data-sidebar-type") === "heading" ? e += n.offsetTop + ((t = n.getElementsByClassName("sidebar-heading")) == null ? void 0 : t[0]).offsetHeight : e += n.offsetTop + (((r = n.parentElement) == null ? void 0 : r.offsetTop) ?? 0) + (((_ = (s = n.parentElement) == null ? void 0 : s.parentElement) == null ? void 0 : _.offsetTop) ?? 0), y.value.scrollTo({ top: e, behavior: "smooth" });
30
+ n.getAttribute("data-sidebar-type") === "heading" ? e += n.offsetTop + ((t = n.getElementsByClassName("sidebar-heading")) == null ? void 0 : t[0]).offsetHeight : e += n.offsetTop + (((l = n.parentElement) == null ? void 0 : l.offsetTop) ?? 0) + (((_ = (s = n.parentElement) == null ? void 0 : s.parentElement) == null ? void 0 : _.offsetTop) ?? 0), S.value.scrollTo({ top: e, behavior: "smooth" });
29
31
  };
30
- return F(() => {
32
+ return N(() => {
31
33
  setTimeout(() => k(o.value), 500), c.value = !1;
32
- }), (p, n) => (l(), a("div", D, [
34
+ }), (p, n) => (r(), a("div", D, [
33
35
  V(p.$slots, "sidebar-start", {}, void 0, !0),
34
36
  w("div", {
35
37
  ref_key: "scrollerEl",
36
- ref: y,
38
+ ref: S,
37
39
  class: "sidebar-pages custom-scroll custom-scroll-self-contain-overflow"
38
40
  }, [
39
41
  I(m, { level: 0 }, {
40
42
  default: f(() => [
41
- (l(!0), a(d, null, h(i(O).entries, (e) => (l(), a(d, {
43
+ (r(!0), a(d, null, h(i(O).entries, (e) => (r(), a(d, {
42
44
  key: e.id
43
45
  }, [
44
- e.isGroup ? (l(), a(d, { key: 0 }, [
46
+ e.isGroup ? (r(), a(d, { key: 0 }, [
45
47
  w("li", H, L(e.displayTitle ?? e.title), 1),
46
- (l(!0), a(d, null, h(e.children, (t) => (l(), u(v, {
48
+ (r(!0), a(d, null, h(e.children, (t) => (r(), u(v, {
47
49
  key: t.id,
48
50
  id: `sidebar-${t.id}`,
49
51
  "data-sidebar-type": "heading",
@@ -56,23 +58,23 @@ const D = { class: "sidebar" }, H = { class: "sidebar-group-title" }, M = -160,
56
58
  httpVerb: t.httpVerb,
57
59
  deprecated: t.deprecated ?? !1
58
60
  },
59
- open: i(g)[t.id] ?? !1,
61
+ open: i(T)[t.id] ?? !1,
60
62
  onToggleOpen: async () => {
61
- c.value = !0, i(T)(t.id), await i(C)(100), c.value = !1;
63
+ c.value = !0, i(g)(t.id), await i(C)(100), c.value = !1;
62
64
  }
63
65
  }, {
64
66
  default: f(() => {
65
- var r;
67
+ var l;
66
68
  return [
67
- t.children && ((r = t.children) == null ? void 0 : r.length) > 0 ? (l(), u(m, {
69
+ t.children && ((l = t.children) == null ? void 0 : l.length) > 0 ? (r(), u(m, {
68
70
  key: 0,
69
71
  level: 1
70
72
  }, {
71
73
  default: f(() => [
72
- (l(!0), a(d, null, h(t.children, (s) => (l(), a(d, {
74
+ (r(!0), a(d, null, h(t.children, (s) => (r(), a(d, {
73
75
  key: s.id
74
76
  }, [
75
- e.show ? (l(), u(v, {
77
+ e.show ? (r(), u(v, {
76
78
  key: 0,
77
79
  id: `sidebar-${s.id}`,
78
80
  isActive: i(o) === s.id,
@@ -92,8 +94,8 @@ const D = { class: "sidebar" }, H = { class: "sidebar-group-title" }, M = -160,
92
94
  }),
93
95
  _: 2
94
96
  }, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"]))), 128))
95
- ], 64)) : (l(), a(d, { key: 1 }, [
96
- e.show ? (l(), u(v, {
97
+ ], 64)) : (r(), a(d, { key: 1 }, [
98
+ e.show ? (r(), u(v, {
97
99
  key: 0,
98
100
  id: `sidebar-${e.id}`,
99
101
  "data-sidebar-type": "heading",
@@ -106,32 +108,32 @@ const D = { class: "sidebar" }, H = { class: "sidebar-group-title" }, M = -160,
106
108
  httpVerb: e.httpVerb,
107
109
  deprecated: e.deprecated ?? !1
108
110
  },
109
- open: i(g)[e.id] ?? !1,
111
+ open: i(T)[e.id] ?? !1,
110
112
  onToggleOpen: async () => {
111
- c.value = !0, i(T)(e.id), await i(C)(100), c.value = !1;
113
+ c.value = !0, i(g)(e.id), await i(C)(100), c.value = !1;
112
114
  }
113
115
  }, {
114
116
  default: f(() => {
115
117
  var t;
116
118
  return [
117
- e.children && ((t = e.children) == null ? void 0 : t.length) > 0 ? (l(), u(m, {
119
+ e.children && ((t = e.children) == null ? void 0 : t.length) > 0 ? (r(), u(m, {
118
120
  key: 0,
119
121
  level: 1
120
122
  }, {
121
123
  default: f(() => [
122
- (l(!0), a(d, null, h(e.children, (r) => (l(), a(d, {
123
- key: r.id
124
+ (r(!0), a(d, null, h(e.children, (l) => (r(), a(d, {
125
+ key: l.id
124
126
  }, [
125
- e.show ? (l(), u(v, {
127
+ e.show ? (r(), u(v, {
126
128
  key: 0,
127
- id: `sidebar-${r.id}`,
128
- isActive: i(o) === r.id,
129
+ id: `sidebar-${l.id}`,
130
+ isActive: i(o) === l.id,
129
131
  item: {
130
- id: r.id,
131
- title: r.displayTitle ?? r.title,
132
- select: r.select,
133
- httpVerb: r.httpVerb,
134
- deprecated: r.deprecated ?? !1
132
+ id: l.id,
133
+ title: l.displayTitle ?? l.title,
134
+ select: l.select,
135
+ httpVerb: l.httpVerb,
136
+ deprecated: l.deprecated ?? !1
135
137
  }
136
138
  }, null, 8, ["id", "isActive", "item"])) : b("", !0)
137
139
  ], 64))), 128))
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiDocument.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/OpenApiDocument/OpenApiDocument.vue"],"names":[],"mappings":"AAgIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAUpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAS3D,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAwC,CAAA;AAC1D,QAAA,MAAM,OAAO,uCAA8B,CAAA;AAC3C,QAAA,MAAM,MAAM;;;IAAyB,CAAA;AAIrC,QAAA,MAAoB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAiFgB,QAAS,YAChD;;;2CA5CF,QAAS,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA2C2B,YAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA/EL,CAAA;AAkFF,iBAAS,cAAc;mBAtDN;QACb,8BAA8B;QAC9B,aAAa,CAAC,EAAE,4BAA4B,C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QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Spec, Tag } from '@scalar/types/legacy';
1
+ import type { Spec, Tag, TransformedOperation } from '@scalar/types/legacy';
2
2
  export type SidebarEntry = {
3
3
  id: string;
4
4
  title: string;
@@ -18,8 +18,9 @@ declare function setCollapsedSidebarItem(key: string, value: boolean): void;
18
18
  export type ParsedSpecOption = {
19
19
  parsedSpec: Spec;
20
20
  };
21
- export type TagsSorterOption = {
21
+ export type SorterOption = {
22
22
  tagsSorter?: 'alpha' | ((a: Tag, b: Tag) => number);
23
+ operationsSorter?: 'alpha' | 'method' | ((a: TransformedOperation, b: TransformedOperation) => number);
23
24
  };
24
25
  /**
25
26
  * Scroll to operation
@@ -32,7 +33,7 @@ export declare const scrollToOperation: (operationId: string) => void;
32
33
  /**
33
34
  * Provides the sidebar state and methods to control it.
34
35
  */
35
- export declare function useSidebar(options?: ParsedSpecOption & TagsSorterOption): {
36
+ export declare function useSidebar(options?: ParsedSpecOption & SorterOption): {
36
37
  breadcrumb: import("vue").ComputedRef<string>;
37
38
  items: import("vue").ComputedRef<{
38
39
  entries: SidebarEntry[];
@@ -1 +1 @@
1
- {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAwB,MAAM,sBAAsB,CAAA;AAe3E,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,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