@scalar/api-reference 1.28.6 → 1.28.7

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":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EACV,yBAAyB,EACzB,oCAAoC,EACrC,MAAM,6BAA6B,CAAA;AASpC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EACV,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,yBAAyB,CAAC,EAAE,GACpC,OAAO,CAAC,oCAAoC,CAAC,CAAA;CAClD,CAAC;;AAgFF,wBAOG"}
1
+ {"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EACV,yBAAyB,EACzB,oCAAoC,EACrC,MAAM,6BAA6B,CAAA;AAUpC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EACV,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,yBAAyB,CAAC,EAAE,GACpC,OAAO,CAAC,oCAAoC,CAAC,CAAA;CAClD,CAAC;;AA4FF,wBAOG"}
@@ -1,23 +1,34 @@
1
- import { defineComponent as a, toRef as l, openBlock as m, createBlock as f, unref as o, withCtx as s, createVNode as p, isRef as d } from "vue";
2
- import _ from "./SingleApiReference.vue.js";
1
+ import { defineComponent as u, toRef as p, ref as n, provide as d, openBlock as _, createBlock as h, unref as e, withCtx as g, createVNode as x, isRef as V } from "vue";
2
+ import b from "./SingleApiReference.vue.js";
3
3
  /* empty css */
4
- import { useMultipleDocuments as g } from "../hooks/useMultipleDocuments.js";
5
- import x from "./DocumentSelector/DocumentSelector.vue.js";
6
- const B = /* @__PURE__ */ a({
4
+ import { useMultipleDocuments as v } from "../hooks/useMultipleDocuments.js";
5
+ import { NAV_STATE_SYMBOL as A } from "../hooks/useNavState.js";
6
+ import B from "./DocumentSelector/DocumentSelector.vue.js";
7
+ const N = /* @__PURE__ */ u({
7
8
  __name: "ApiReference",
8
9
  props: {
9
10
  configuration: {}
10
11
  },
11
- setup(t) {
12
- const i = t, { selectedConfiguration: r, availableDocuments: u, selectedDocumentIndex: e } = g({
13
- configuration: l(i, "configuration")
12
+ setup(i) {
13
+ const r = i, {
14
+ availableDocuments: a,
15
+ selectedConfiguration: s,
16
+ selectedDocumentIndex: o,
17
+ isIntersectionEnabled: c,
18
+ hash: f,
19
+ hashPrefix: l
20
+ } = v({
21
+ configuration: p(r, "configuration"),
22
+ isIntersectionEnabled: n(!1),
23
+ hash: n(""),
24
+ hashPrefix: n("")
14
25
  });
15
- return (V, n) => (m(), f(_, { configuration: o(r) }, {
16
- "document-selector": s(() => [
17
- p(o(x), {
18
- modelValue: o(e),
19
- "onUpdate:modelValue": n[0] || (n[0] = (c) => d(e) ? e.value = c : null),
20
- options: o(u)
26
+ return d(A, { isIntersectionEnabled: c, hash: f, hashPrefix: l }), (C, t) => (_(), h(b, { configuration: e(s) }, {
27
+ "document-selector": g(() => [
28
+ x(e(B), {
29
+ modelValue: e(o),
30
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => V(o) ? o.value = m : null),
31
+ options: e(a)
21
32
  }, null, 8, ["modelValue", "options"])
22
33
  ]),
23
34
  _: 1
@@ -25,5 +36,5 @@ const B = /* @__PURE__ */ a({
25
36
  }
26
37
  });
27
38
  export {
28
- B as default
39
+ N as default
29
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AA0nBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AA6BvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAIhB,KAAK,WAAW,G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AO,IAA6B;;wBA1eZ,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;;;;;EA+e/D;AAwBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YA7hBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFAoiB9D,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -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-09b1dd2e"]]);
5
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-afcca023"]]);
6
6
  export {
7
- a as default
7
+ c as default
8
8
  };
@@ -1,27 +1,27 @@
1
- import { defineComponent as le, computed as g, ref as $, onBeforeMount as H, onMounted as de, onUnmounted as ue, watch as E, onServerPrefetch as ce, useSSRContext as pe, useId as fe, provide as w, openBlock as y, createElementBlock as C, Fragment as D, createElementVNode as u, normalizeClass as me, unref as l, normalizeStyle as ve, renderSlot as c, normalizeProps as p, guardReactiveProps as f, createVNode as m, withCtx as v, createCommentVNode as O, withDirectives as Se, vShow as he, createSlots as ge } from "vue";
2
- import { provideUseId as be } from "@headlessui/vue";
3
- import { LAYOUT_SYMBOL as we } from "@scalar/api-client/hooks";
4
- import { createWorkspaceStore as ye, WORKSPACE_SYMBOL as Ce, createActiveEntitiesStore as Te, ACTIVE_ENTITIES_SYMBOL as Re } from "@scalar/api-client/store";
5
- import { addScalarClassesToHeadless as $e, ScalarErrorBoundary as Ee } from "@scalar/components";
6
- import { defaultStateFactory as _ } from "@scalar/oas-utils/helpers";
7
- import { hasObtrusiveScrollbars as Oe, getThemeStyles as Ie } from "@scalar/themes";
8
- import { apiReferenceConfigurationSchema as ke } from "@scalar/types/api-reference";
9
- import { useToasts as Fe, ScalarToasts as Le } from "@scalar/use-toasts";
10
- import { useMediaQuery as Pe, useResizeObserver as Me, useDebounceFn as Be } from "@vueuse/core";
11
- import Ae from "./GettingStarted.vue.js";
12
- import { CONFIGURATION_SYMBOL as He } from "../hooks/useConfig.js";
13
- import { useHttpClientStore as De } from "../stores/useHttpClientStore.js";
14
- import { downloadSpecBus as N, downloadSpecFile as _e } from "../helpers/specDownloads.js";
15
- import Ne from "./Sidebar/Sidebar.vue.js";
16
- import Ue from "./Content/Content.vue.js";
17
- import ze from "../features/ApiClientModal/ApiClientModal.vue.js";
18
- import { useSidebar as Ye } from "../hooks/useSidebar.js";
19
- import { useNavState as Ve } from "../hooks/useNavState.js";
20
- import { sleep as Ge } from "../helpers/sleep.js";
21
- const We = ["innerHTML"], je = { class: "references-header" }, Ke = ["aria-label"], Qe = { class: "references-navigation-list" }, qe = { class: "references-editor" }, Je = { class: "references-editor-textarea" }, Xe = ["aria-label"], Ze = {
1
+ import { defineComponent as ie, computed as g, ref as $, onBeforeMount as A, onMounted as le, onUnmounted as de, watch as R, onServerPrefetch as ue, useSSRContext as ce, useId as pe, provide as w, openBlock as y, createElementBlock as C, Fragment as H, createElementVNode as d, normalizeClass as fe, unref as i, normalizeStyle as me, renderSlot as u, normalizeProps as c, guardReactiveProps as p, createVNode as m, withCtx as v, createCommentVNode as E, withDirectives as ve, vShow as Se, createSlots as he } from "vue";
2
+ import { provideUseId as ge } from "@headlessui/vue";
3
+ import { LAYOUT_SYMBOL as be } from "@scalar/api-client/hooks";
4
+ import { createWorkspaceStore as we, WORKSPACE_SYMBOL as ye, createActiveEntitiesStore as Ce, ACTIVE_ENTITIES_SYMBOL as Te } from "@scalar/api-client/store";
5
+ import { addScalarClassesToHeadless as $e, ScalarErrorBoundary as Re } from "@scalar/components";
6
+ import { defaultStateFactory as D } from "@scalar/oas-utils/helpers";
7
+ import { hasObtrusiveScrollbars as Ee, getThemeStyles as Oe } from "@scalar/themes";
8
+ import { apiReferenceConfigurationSchema as Ie } from "@scalar/types/api-reference";
9
+ import { useToasts as ke, ScalarToasts as Fe } from "@scalar/use-toasts";
10
+ import { useMediaQuery as Le, useResizeObserver as Pe, useDebounceFn as Me } from "@vueuse/core";
11
+ import Be from "./GettingStarted.vue.js";
12
+ import { CONFIGURATION_SYMBOL as Ae } from "../hooks/useConfig.js";
13
+ import { useHttpClientStore as He } from "../stores/useHttpClientStore.js";
14
+ import { downloadSpecBus as _, downloadSpecFile as De } from "../helpers/specDownloads.js";
15
+ import _e from "./Sidebar/Sidebar.vue.js";
16
+ import Ne from "./Content/Content.vue.js";
17
+ import Ue from "../features/ApiClientModal/ApiClientModal.vue.js";
18
+ import { useSidebar as ze } from "../hooks/useSidebar.js";
19
+ import { useNavState as Ye } from "../hooks/useNavState.js";
20
+ import { sleep as Ve } from "../helpers/sleep.js";
21
+ const Ge = ["innerHTML"], We = { class: "references-header" }, je = ["aria-label"], Ke = { class: "references-navigation-list" }, Qe = { class: "references-editor" }, qe = { class: "references-editor-textarea" }, Je = ["aria-label"], Xe = {
22
22
  key: 0,
23
23
  class: "references-footer"
24
- }, bt = /* @__PURE__ */ le({
24
+ }, gt = /* @__PURE__ */ ie({
25
25
  inheritAttrs: !1,
26
26
  __name: "ApiReferenceLayout",
27
27
  props: {
@@ -30,99 +30,98 @@ const We = ["innerHTML"], je = { class: "references-header" }, Ke = ["aria-label
30
30
  rawSpec: {}
31
31
  },
32
32
  emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
33
- setup(U) {
34
- const i = U, t = g(
35
- () => ke.parse(i.configuration)
36
- ), { initializeToasts: z, toast: Y } = Fe();
37
- z((e) => Y(e));
38
- const V = Pe("(min-width: 1150px)"), G = $("100dvh"), S = $(null);
39
- Me(S, (e) => {
40
- G.value = e[0].contentRect.height + "px";
33
+ setup(N) {
34
+ const f = N, t = g(
35
+ () => Ie.parse(f.configuration)
36
+ ), { initializeToasts: U, toast: z } = ke();
37
+ U((e) => z(e));
38
+ const Y = Le("(min-width: 1150px)"), V = $("100dvh"), S = $(null);
39
+ Pe(S, (e) => {
40
+ V.value = e[0].contentRect.height + "px";
41
41
  });
42
- const W = g(Oe), {
43
- breadcrumb: j,
42
+ const G = g(Ee), {
43
+ breadcrumb: W,
44
44
  collapsedSidebarItems: b,
45
- isSidebarOpen: K,
46
- setCollapsedSidebarItem: I,
47
- hideModels: Q,
48
- defaultOpenAllTags: q,
49
- setParsedSpec: J,
50
- scrollToOperation: X
51
- } = Ye(), {
52
- getReferenceHash: Z,
53
- getPathRoutingId: k,
54
- getSectionId: x,
55
- getTagId: ee,
56
- hash: te,
57
- isIntersectionEnabled: F,
58
- pathRouting: T,
59
- updateHash: L,
60
- replaceUrlState: ae
61
- } = Ve();
62
- if (t.value.pathRouting && (T.value = t.value.pathRouting), i.configuration.redirect && typeof window < "u") {
63
- const e = i.configuration.redirect(
64
- (T.value ? window.location.pathname : "") + window.location.hash
45
+ isSidebarOpen: j,
46
+ setCollapsedSidebarItem: O,
47
+ hideModels: K,
48
+ defaultOpenAllTags: Q,
49
+ setParsedSpec: q,
50
+ scrollToOperation: J
51
+ } = ze(), {
52
+ getReferenceHash: X,
53
+ getPathRoutingId: I,
54
+ getSectionId: Z,
55
+ getTagId: x,
56
+ hash: ee,
57
+ isIntersectionEnabled: k,
58
+ updateHash: F,
59
+ replaceUrlState: te
60
+ } = Ye();
61
+ if (t.value.redirect && typeof window < "u") {
62
+ const e = t.value.redirect(
63
+ (t.value.pathRouting ? window.location.pathname : "") + window.location.hash
65
64
  );
66
65
  e && history.replaceState({}, "", e);
67
66
  }
68
- H(() => L());
69
- const P = async (e) => {
67
+ A(() => F());
68
+ const L = async (e) => {
70
69
  var a;
71
- F.value = !1, L(), e ? X(e) : (a = S.value) == null || a.scrollTo(0, 0), await Ge(100), F.value = !0;
72
- }, M = $(0);
73
- H(() => $e()), de(() => {
70
+ k.value = !1, F(), e ? J(e) : (a = S.value) == null || a.scrollTo(0, 0), await Ve(100), k.value = !0;
71
+ }, P = $(0);
72
+ A(() => $e()), le(() => {
74
73
  var o, s, r;
75
- history.scrollRestoration = "manual", N.on(({ specTitle: n }) => {
76
- _e(i.rawSpec, n);
74
+ history.scrollRestoration = "manual", _.on(({ specTitle: n }) => {
75
+ De(f.rawSpec, n);
77
76
  });
78
77
  const e = (s = (o = S.value) == null ? void 0 : o.parentElement) == null ? void 0 : s.getBoundingClientRect(), a = (r = S.value) == null ? void 0 : r.getBoundingClientRect();
79
78
  if (e && a) {
80
79
  const n = a.top - e.top;
81
- M.value = n < 2 ? 0 : n;
80
+ P.value = n < 2 ? 0 : n;
82
81
  }
83
82
  window.onhashchange = () => {
84
- P(Z());
85
- }, window.onpopstate = () => T.value && P(k(window.location.pathname));
83
+ L(X());
84
+ }, window.onpopstate = () => t.value.pathRouting && L(I(window.location.pathname));
86
85
  });
87
- const oe = g(
88
- () => V.value || !t.value.isEditable
89
- ), B = Be((e) => {
86
+ const ae = g(
87
+ () => Y.value || !t.value.isEditable
88
+ ), M = Me((e) => {
90
89
  if ((e.target.scrollTop ?? 0) < 50) {
91
90
  const o = t.value.pathRouting ? t.value.pathRouting.basePath : window.location.pathname;
92
- ae("", o + window.location.search);
91
+ te("", o + window.location.search);
93
92
  }
94
- }), d = g(() => ({
95
- breadcrumb: j.value,
96
- spec: i.parsedSpec
93
+ }), l = g(() => ({
94
+ breadcrumb: W.value,
95
+ spec: f.parsedSpec
97
96
  }));
98
- ue(() => {
99
- N.reset();
100
- }), E(() => i.parsedSpec, J, { deep: !0 }), ce(() => {
97
+ de(() => {
98
+ _.reset();
99
+ }), R(() => f.parsedSpec, q, { deep: !0 }), ue(() => {
101
100
  var a, o;
102
- const e = pe();
103
- if (e && (e.payload || (e.payload = { data: _() }), (a = e.payload).data || (a.data = _()), t.value.pathRouting)) {
104
- const s = k(e.url);
105
- te.value = s, e.payload.data.hash = s;
101
+ const e = ce();
102
+ if (e && (e.payload || (e.payload = { data: D() }), (a = e.payload).data || (a.data = D()), t.value.pathRouting)) {
103
+ const s = I(e.url);
104
+ ee.value = s, e.payload.data.hash = s;
106
105
  for (const r in b)
107
106
  Object.hasOwn(b, r) && delete b[r];
108
107
  if (s)
109
- I(x(s), !0);
108
+ O(Z(s), !0);
110
109
  else {
111
- const r = (o = i.parsedSpec.tags) == null ? void 0 : o[0];
112
- r && I(ee(r), !0);
110
+ const r = (o = f.parsedSpec.tags) == null ? void 0 : o[0];
111
+ r && O(x(r), !0);
113
112
  }
114
113
  e.payload.data["useSidebarContent-collapsedSidebarItems"] = b;
115
114
  }
116
- }), be(() => fe());
117
- const R = ye({
115
+ }), ge(() => pe());
116
+ const T = we({
118
117
  useLocalStorage: !1,
119
118
  ...t.value
120
119
  });
121
- E(
122
- () => i.rawSpec,
120
+ R(
121
+ () => f.rawSpec,
123
122
  (e) => {
124
123
  var a;
125
- return e && R.importSpecFile(e, "default", {
124
+ return e && T.importSpecFile(e, "default", {
126
125
  shouldLoad: !1,
127
126
  documentUrl: (a = t.value.spec) == null ? void 0 : a.url,
128
127
  setCollectionSecurity: !0,
@@ -130,11 +129,11 @@ const We = ["innerHTML"], je = { class: "references-header" }, Ke = ["aria-label
130
129
  });
131
130
  },
132
131
  { immediate: !0 }
133
- ), w(Ce, R);
134
- const re = Te(R);
135
- w(Re, re), w(we, "modal"), w(He, t);
136
- function A(e, a) {
137
- E(
132
+ ), w(ye, T);
133
+ const oe = Ce(T);
134
+ w(Te, oe), w(be, "modal"), w(Ae, t);
135
+ function B(e, a) {
136
+ R(
138
137
  () => t.value[e],
139
138
  (o) => {
140
139
  typeof o < "u" && a(o);
@@ -142,58 +141,58 @@ const We = ["innerHTML"], je = { class: "references-header" }, Ke = ["aria-label
142
141
  { immediate: !0 }
143
142
  );
144
143
  }
145
- const { setExcludedClients: se, setDefaultHttpClient: ne } = De();
146
- A("defaultHttpClient", ne), A("hiddenClients", se), Q.value = t.value.hideModels ?? !1, q.value = t.value.defaultOpenAllTags ?? !1;
147
- const ie = g(
144
+ const { setExcludedClients: re, setDefaultHttpClient: se } = He();
145
+ B("defaultHttpClient", se), B("hiddenClients", re), K.value = t.value.hideModels ?? !1, Q.value = t.value.defaultOpenAllTags ?? !1;
146
+ const ne = g(
148
147
  () => `<style>
149
- ${Ie(t.value.theme, {
148
+ ${Oe(t.value.theme, {
150
149
  fonts: t.value.withDefaultFonts
151
150
  })}</style>`
152
151
  );
153
152
  return (e, a) => {
154
153
  var o, s, r;
155
- return y(), C(D, null, [
156
- u("div", { innerHTML: ie.value }, null, 8, We),
157
- u("div", {
154
+ return y(), C(H, null, [
155
+ d("div", { innerHTML: ne.value }, null, 8, Ge),
156
+ d("div", {
158
157
  ref_key: "documentEl",
159
158
  ref: S,
160
- class: me(["scalar-app scalar-api-reference references-layout", [
159
+ class: fe(["scalar-app scalar-api-reference references-layout", [
161
160
  {
162
- "scalar-scrollbars-obtrusive": W.value,
161
+ "scalar-scrollbars-obtrusive": G.value,
163
162
  "references-editable": t.value.isEditable,
164
163
  "references-sidebar": t.value.showSidebar,
165
- "references-sidebar-mobile-open": l(K),
164
+ "references-sidebar-mobile-open": i(j),
166
165
  "references-classic": t.value.layout === "classic"
167
166
  },
168
167
  e.$attrs.class
169
168
  ]]),
170
- style: ve({
171
- "--scalar-y-offset": `var(--scalar-custom-header-height, ${M.value}px)`
169
+ style: me({
170
+ "--scalar-y-offset": `var(--scalar-custom-header-height, ${P.value}px)`
172
171
  }),
173
172
  onScrollPassive: a[4] || (a[4] = //@ts-ignore
174
- (...n) => l(B) && l(B)(...n))
173
+ (...n) => i(M) && i(M)(...n))
175
174
  }, [
176
- u("div", je, [
177
- c(e.$slots, "header", p(f(d.value)), void 0, !0)
175
+ d("div", We, [
176
+ u(e.$slots, "header", c(p(l.value)), void 0, !0)
178
177
  ]),
179
178
  t.value.showSidebar ? (y(), C("aside", {
180
179
  key: 0,
181
180
  "aria-label": `Sidebar for ${(o = e.parsedSpec.info) == null ? void 0 : o.title}`,
182
181
  class: "references-navigation t-doc__sidebar"
183
182
  }, [
184
- u("div", Qe, [
185
- m(l(Ee), null, {
183
+ d("div", Ke, [
184
+ m(i(Re), null, {
186
185
  default: v(() => [
187
- m(l(Ne), {
186
+ m(i(_e), {
188
187
  operationsSorter: t.value.operationsSorter,
189
188
  parsedSpec: e.parsedSpec,
190
189
  tagsSorter: t.value.tagsSorter
191
190
  }, {
192
191
  "sidebar-start": v(() => [
193
- c(e.$slots, "sidebar-start", p(f(d.value)), void 0, !0)
192
+ u(e.$slots, "sidebar-start", c(p(l.value)), void 0, !0)
194
193
  ]),
195
194
  "sidebar-end": v(() => [
196
- c(e.$slots, "sidebar-end", p(f(d.value)), void 0, !0)
195
+ u(e.$slots, "sidebar-end", c(p(l.value)), void 0, !0)
197
196
  ]),
198
197
  _: 3
199
198
  }, 8, ["operationsSorter", "parsedSpec", "tagsSorter"])
@@ -201,28 +200,28 @@ const We = ["innerHTML"], je = { class: "references-header" }, Ke = ["aria-label
201
200
  _: 3
202
201
  })
203
202
  ])
204
- ], 8, Ke)) : O("", !0),
205
- Se(u("div", qe, [
206
- u("div", Je, [
207
- c(e.$slots, "editor", p(f(d.value)), void 0, !0)
203
+ ], 8, je)) : E("", !0),
204
+ ve(d("div", Qe, [
205
+ d("div", qe, [
206
+ u(e.$slots, "editor", c(p(l.value)), void 0, !0)
208
207
  ])
209
208
  ], 512), [
210
- [he, t.value.isEditable]
209
+ [Se, t.value.isEditable]
211
210
  ]),
212
- oe.value ? (y(), C(D, { key: 1 }, [
213
- u("main", {
211
+ ae.value ? (y(), C(H, { key: 1 }, [
212
+ d("main", {
214
213
  "aria-label": `Open API Documentation for ${(s = e.parsedSpec.info) == null ? void 0 : s.title}`,
215
214
  class: "references-rendered"
216
215
  }, [
217
- m(l(Ue), {
216
+ m(i(Ne), {
218
217
  layout: t.value.layout,
219
218
  parsedSpec: e.parsedSpec
220
- }, ge({
219
+ }, he({
221
220
  start: v(() => [
222
- c(e.$slots, "content-start", p(f(d.value)), void 0, !0)
221
+ u(e.$slots, "content-start", c(p(l.value)), void 0, !0)
223
222
  ]),
224
223
  end: v(() => [
225
- c(e.$slots, "content-end", p(f(d.value)), void 0, !0)
224
+ u(e.$slots, "content-end", c(p(l.value)), void 0, !0)
226
225
  ]),
227
226
  _: 2
228
227
  }, [
@@ -231,7 +230,7 @@ const We = ["innerHTML"], je = { class: "references-header" }, Ke = ["aria-label
231
230
  fn: v(() => {
232
231
  var n;
233
232
  return [
234
- m(Ae, {
233
+ m(Be, {
235
234
  theme: ((n = t.value) == null ? void 0 : n.theme) || "default",
236
235
  onChangeTheme: a[0] || (a[0] = (h) => e.$emit("changeTheme", h)),
237
236
  onLinkSwaggerFile: a[1] || (a[1] = (h) => e.$emit("linkSwaggerFile")),
@@ -243,18 +242,18 @@ const We = ["innerHTML"], je = { class: "references-header" }, Ke = ["aria-label
243
242
  key: "0"
244
243
  } : void 0
245
244
  ]), 1032, ["layout", "parsedSpec"])
246
- ], 8, Xe),
247
- e.$slots.footer ? (y(), C("div", Ze, [
248
- c(e.$slots, "footer", p(f(d.value)), void 0, !0)
249
- ])) : O("", !0)
250
- ], 64)) : O("", !0),
251
- m(l(ze), { configuration: t.value }, null, 8, ["configuration"])
245
+ ], 8, Je),
246
+ e.$slots.footer ? (y(), C("div", Xe, [
247
+ u(e.$slots, "footer", c(p(l.value)), void 0, !0)
248
+ ])) : E("", !0)
249
+ ], 64)) : E("", !0),
250
+ m(i(Ue), { configuration: t.value }, null, 8, ["configuration"])
252
251
  ], 38),
253
- m(l(Le))
252
+ m(i(Fe))
254
253
  ], 64);
255
254
  };
256
255
  }
257
256
  });
258
257
  export {
259
- bt as default
258
+ gt as default
260
259
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue"],"names":[],"mappings":"AAyWA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB,CAAA;IACD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AAwEF,iBAAS,cAAc;WAoKT,OAAO,IAA6B;;yBATpB,GAAG;+BACG,GAAG;;;;EAatC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;4FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue"],"names":[],"mappings":"AAwWA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB,CAAA;IACD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AAuEF,iBAAS,cAAc;WAoKT,OAAO,IAA6B;;yBATpB,GAAG;+BACG,GAAG;;;;EAatC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;4FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SidebarElement.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3b154299"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-eb72afb2"]]);
5
5
  export {
6
- a as default
6
+ m as default
7
7
  };
@@ -1,21 +1,21 @@
1
- import { defineComponent as A, openBlock as n, createElementBlock as l, createElementVNode as a, normalizeClass as T, unref as m, withModifiers as V, createVNode as b, withCtx as E, createTextVNode as c, toDisplayString as h, createCommentVNode as s, createBlock as N, renderSlot as v } from "vue";
2
- import { ScalarSidebarGroupToggle as O, ScalarIcon as U } from "@scalar/components";
3
- import { combineUrlAndPath as H } from "@scalar/oas-utils/helpers";
4
- import { useConfig as I } from "../../hooks/useConfig.js";
5
- import P from "./SidebarHttpBadge.vue.js";
1
+ import { defineComponent as $, openBlock as n, createElementBlock as d, createElementVNode as a, normalizeClass as A, unref as m, withModifiers as T, createVNode as b, withCtx as V, createTextVNode as h, toDisplayString as c, createCommentVNode as s, createBlock as E, renderSlot as v } from "vue";
2
+ import { ScalarSidebarGroupToggle as N, ScalarIcon as O } from "@scalar/components";
3
+ import { combineUrlAndPath as R } from "@scalar/oas-utils/helpers";
4
+ import { useConfig as U } from "../../hooks/useConfig.js";
5
+ import H from "./SidebarHttpBadge.vue.js";
6
6
  import { sleep as C } from "../../helpers/sleep.js";
7
- import { useNavState as D } from "../../hooks/useNavState.js";
8
- import { scrollToId as L } from "../../helpers/scrollToId.js";
9
- const M = ["id"], R = {
7
+ import { useNavState as I } from "../../hooks/useNavState.js";
8
+ import { scrollToId as P } from "../../helpers/scrollToId.js";
9
+ const D = ["id"], L = {
10
10
  key: 0,
11
11
  class: "sidebar-heading-chevron"
12
- }, z = ["aria-expanded"], F = ["href", "tabindex"], G = { class: "sidebar-heading-link-title" }, j = {
12
+ }, M = ["aria-expanded"], z = ["href", "tabindex"], F = { class: "sidebar-heading-link-title" }, G = {
13
13
  key: 1,
14
14
  class: "sidebar-heading-link-method"
15
- }, q = {
15
+ }, j = {
16
16
  key: 1,
17
17
  class: "action-menu"
18
- }, x = /* @__PURE__ */ A({
18
+ }, _ = /* @__PURE__ */ $({
19
19
  __name: "SidebarElement",
20
20
  props: {
21
21
  id: {},
@@ -26,81 +26,81 @@ const M = ["id"], R = {
26
26
  },
27
27
  emits: ["toggleOpen"],
28
28
  setup(k, { emit: y }) {
29
- const i = k, d = y, { getFullHash: u, isIntersectionEnabled: r, pathRouting: p, replaceUrlState: w } = D(), S = I(), f = async () => {
29
+ const i = k, p = y, { getFullHash: u, isIntersectionEnabled: r, replaceUrlState: w } = I(), l = U(), f = async () => {
30
30
  var e, t;
31
- i.hasChildren && d("toggleOpen"), (t = (e = i.item) == null ? void 0 : e.select) == null || t.call(e), i.open && (r.value = !1, await C(100), r.value = !0);
32
- }, B = () => {
33
- if (p.value)
34
- return H(p.value.basePath, i.item.id);
31
+ i.hasChildren && p("toggleOpen"), (t = (e = i.item) == null ? void 0 : e.select) == null || t.call(e), i.open && (r.value = !1, await C(100), r.value = !0);
32
+ }, S = () => {
33
+ if (l.value.pathRouting)
34
+ return R(l.value.pathRouting.basePath, i.item.id);
35
35
  if (typeof window < "u") {
36
36
  const e = new URL(window.location.href);
37
37
  return e.hash = u(i.item.id), `${e.pathname}${e.search}${e.hash}`;
38
38
  }
39
39
  return `#${u(i.item.id)}`;
40
- }, $ = async (e) => {
40
+ }, B = async (e) => {
41
41
  var t, o;
42
- p.value && (e.preventDefault(), i.hasChildren && d("toggleOpen"), (o = (t = i.item) == null ? void 0 : t.select) == null || o.call(t), d("toggleOpen"), r.value = !1, w(i.item.id), L(i.item.id), await C(100), r.value = !0);
42
+ l.value.pathRouting && (e.preventDefault(), i.hasChildren && p("toggleOpen"), (o = (t = i.item) == null ? void 0 : t.select) == null || o.call(t), p("toggleOpen"), r.value = !1, w(i.item.id), P(i.item.id), await C(100), r.value = !0);
43
43
  };
44
44
  return (e, t) => {
45
45
  var o, g;
46
- return n(), l("li", {
46
+ return n(), d("li", {
47
47
  id: e.id,
48
48
  class: "sidebar-group-item"
49
49
  }, [
50
50
  a("div", {
51
- class: T(["sidebar-heading", {
51
+ class: A(["sidebar-heading", {
52
52
  "sidebar-group-item__folder": e.hasChildren,
53
53
  active_page: e.isActive,
54
54
  deprecated: e.item.deprecated ?? !1
55
55
  }]),
56
56
  onClick: f
57
57
  }, [
58
- e.hasChildren && !m(S).defaultOpenAllTags ? (n(), l("p", R, [
58
+ e.hasChildren && !m(l).defaultOpenAllTags ? (n(), d("p", L, [
59
59
  a("button", {
60
60
  "aria-expanded": e.open,
61
61
  class: "toggle-nested-icon",
62
62
  type: "button",
63
- onClick: V(f, ["stop"])
63
+ onClick: T(f, ["stop"])
64
64
  }, [
65
- b(m(O), { open: e.open }, {
66
- label: E(() => [
67
- c(h(e.open ? "Collapse" : "Expand") + " " + h(e.item.title), 1)
65
+ b(m(N), { open: e.open }, {
66
+ label: V(() => [
67
+ h(c(e.open ? "Collapse" : "Expand") + " " + c(e.item.title), 1)
68
68
  ]),
69
69
  _: 1
70
70
  }, 8, ["open"])
71
- ], 8, z),
72
- t[0] || (t[0] = c("   "))
71
+ ], 8, M),
72
+ t[0] || (t[0] = h("   "))
73
73
  ])) : s("", !0),
74
74
  a("a", {
75
75
  class: "sidebar-heading-link",
76
- href: B(),
76
+ href: S(),
77
77
  tabindex: e.hasChildren ? -1 : 0,
78
- onClick: $
78
+ onClick: B
79
79
  }, [
80
- (g = (o = e.item) == null ? void 0 : o.icon) != null && g.src ? (n(), N(m(U), {
80
+ (g = (o = e.item) == null ? void 0 : o.icon) != null && g.src ? (n(), E(m(O), {
81
81
  key: 0,
82
82
  class: "sidebar-icon",
83
83
  icon: e.item.icon.src
84
84
  }, null, 8, ["icon"])) : s("", !0),
85
- a("p", G, h(e.item.title), 1),
86
- e.item.httpVerb && !e.hasChildren ? (n(), l("p", j, [
87
- t[1] || (t[1] = c("   ")),
85
+ a("p", F, c(e.item.title), 1),
86
+ e.item.httpVerb && !e.hasChildren ? (n(), d("p", G, [
87
+ t[1] || (t[1] = h("   ")),
88
88
  t[2] || (t[2] = a("span", { class: "sr-only" }, "HTTP Method: ", -1)),
89
- b(P, {
89
+ b(H, {
90
90
  active: e.isActive,
91
91
  method: e.item.httpVerb
92
92
  }, null, 8, ["active", "method"])
93
93
  ])) : s("", !0)
94
- ], 8, F)
94
+ ], 8, z)
95
95
  ], 2),
96
96
  e.open ? v(e.$slots, "default", { key: 0 }, void 0, !0) : s("", !0),
97
- e.$slots["action-menu"] ? (n(), l("div", q, [
97
+ e.$slots["action-menu"] ? (n(), d("div", j, [
98
98
  v(e.$slots, "action-menu", {}, void 0, !0)
99
99
  ])) : s("", !0)
100
- ], 8, M);
100
+ ], 8, D);
101
101
  };
102
102
  }
103
103
  });
104
104
  export {
105
- x as default
105
+ _ as default
106
106
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAIpD,OAAO,EAAE,KAAK,QAAQ,EAAyC,MAAM,aAAa,CAAA;AAElF,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,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