@scalar/api-reference 1.25.3 → 1.25.4

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":"AAiiBA,OAAO,EAAE,KAAK,OAAO,EAAkB,MAAM,gBAAgB,CAAA;AAwB7D,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,UAAU,CAAA;AA2NjB,iBAAS,cAAc;oBA/Le,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;EAoe/D;AACD,QAAA,MAAM,eAAe;;YArfqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;UA4f9D,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,I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K,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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f0ddfb95"]]);
5
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bc7f6cf0"]]);
6
6
  export {
7
- m as default
7
+ c as default
8
8
  };
@@ -1,28 +1,28 @@
1
- import { defineComponent as Z, ref as h, onMounted as B, onBeforeMount as D, computed as b, watch as _, onServerPrefetch as x, useSSRContext as ee, getCurrentInstance as oe, provide as F, openBlock as v, createElementBlock as S, Fragment as M, createElementVNode as i, normalizeClass as te, unref as u, normalizeStyle as re, renderSlot as l, normalizeProps as d, guardReactiveProps as c, createVNode as f, withCtx as g, createCommentVNode as w, withDirectives as ae, vShow as ne, createSlots as se } from "vue";
2
- import { provideUseId as ie } from "@headlessui/vue";
3
- import { addScalarClassesToHeadless as le } from "@scalar/components";
1
+ import { defineComponent as _, ref as b, onMounted as B, computed as v, onBeforeMount as D, watch as x, onServerPrefetch as ee, useSSRContext as oe, getCurrentInstance as te, provide as F, openBlock as S, createElementBlock as h, Fragment as M, createElementVNode as i, normalizeClass as re, unref as u, normalizeStyle as ae, renderSlot as l, normalizeProps as d, guardReactiveProps as c, createVNode as f, withCtx as g, createCommentVNode as w, withDirectives as se, vShow as ne, createSlots as ie } from "vue";
2
+ import { provideUseId as le } from "@headlessui/vue";
3
+ import { addScalarClassesToHeadless as de } from "@scalar/components";
4
4
  import { defaultStateFactory as P } from "@scalar/oas-utils/helpers";
5
- import { getThemeStyles as de } from "@scalar/themes";
6
- import { useToasts as ce, ScalarToasts as ue } from "@scalar/use-toasts";
7
- import { useMediaQuery as pe, useResizeObserver as fe, useDebounceFn as ge } from "@vueuse/core";
8
- import me from "./ApiClientModal.vue.js";
5
+ import { hasObtrusiveScrollbars as ce, getThemeStyles as ue } from "@scalar/themes";
6
+ import { useToasts as pe, ScalarToasts as fe } from "@scalar/use-toasts";
7
+ import { useMediaQuery as ge, useResizeObserver as me, useDebounceFn as ve } from "@vueuse/core";
8
+ import Se from "./ApiClientModal.vue.js";
9
9
  /* empty css */
10
- import ve from "./GettingStarted.vue.js";
11
- import { downloadSpecBus as Se, downloadSpecFile as he } from "../helpers/specDownloads.js";
12
- import { useDeprecationWarnings as be } from "../hooks/useDeprecationWarnings.js";
13
- import we from "./Sidebar/Sidebar.vue.js";
14
- import ye from "./Content/Content.vue.js";
15
- import { useSidebar as Te } from "../hooks/useSidebar.js";
16
- import { GLOBAL_SECURITY_SYMBOL as Re, HIDE_DOWNLOAD_BUTTON_SYMBOL as $e } from "../helpers/provideSymbols.js";
17
- import { useNavState as Ce } from "../hooks/useNavState.js";
18
- import { sleep as Le } from "../helpers/sleep.js";
19
- const Ee = ["innerHTML"], Ie = { class: "references-header" }, Oe = {
10
+ import he from "./GettingStarted.vue.js";
11
+ import { downloadSpecBus as be, downloadSpecFile as we } from "../helpers/specDownloads.js";
12
+ import { useDeprecationWarnings as ye } from "../hooks/useDeprecationWarnings.js";
13
+ import Te from "./Sidebar/Sidebar.vue.js";
14
+ import Re from "./Content/Content.vue.js";
15
+ import { useSidebar as $e } from "../hooks/useSidebar.js";
16
+ import { GLOBAL_SECURITY_SYMBOL as Ce, HIDE_DOWNLOAD_BUTTON_SYMBOL as Le } from "../helpers/provideSymbols.js";
17
+ import { useNavState as Oe } from "../hooks/useNavState.js";
18
+ import { sleep as Ee } from "../helpers/sleep.js";
19
+ const Ie = ["innerHTML"], ke = { class: "references-header" }, Be = {
20
20
  key: 0,
21
21
  class: "references-navigation t-doc__sidebar"
22
- }, ke = { class: "references-navigation-list" }, Be = { class: "references-editor" }, De = { class: "references-editor-textarea" }, Fe = { class: "references-rendered" }, Me = {
22
+ }, De = { class: "references-navigation-list" }, Fe = { class: "references-editor" }, Me = { class: "references-editor-textarea" }, Pe = { class: "references-rendered" }, Ue = {
23
23
  key: 0,
24
24
  class: "references-footer"
25
- }, xe = /* @__PURE__ */ Z({
25
+ }, oo = /* @__PURE__ */ _({
26
26
  inheritAttrs: !1,
27
27
  __name: "ApiReferenceLayout",
28
28
  props: {
@@ -32,154 +32,155 @@ const Ee = ["innerHTML"], Ie = { class: "references-header" }, Oe = {
32
32
  },
33
33
  emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
34
34
  setup(U) {
35
- const t = U, { initializeToasts: A, toast: H } = ce();
35
+ const t = U, { initializeToasts: A, toast: H } = pe();
36
36
  A((e) => H(e));
37
- const N = pe("(min-width: 1150px)"), z = h("100dvh"), p = h(null);
38
- fe(p, (e) => {
37
+ const N = ge("(min-width: 1150px)"), z = b("100dvh"), p = b(null);
38
+ me(p, (e) => {
39
39
  z.value = e[0].contentRect.height + "px";
40
40
  });
41
- const y = h(0);
41
+ const y = b(0);
42
42
  B(() => {
43
- var a, r, n;
44
- const e = (r = (a = p.value) == null ? void 0 : a.parentElement) == null ? void 0 : r.getBoundingClientRect(), o = (n = p.value) == null ? void 0 : n.getBoundingClientRect();
43
+ var a, r, s;
44
+ const e = (r = (a = p.value) == null ? void 0 : a.parentElement) == null ? void 0 : r.getBoundingClientRect(), o = (s = p.value) == null ? void 0 : s.getBoundingClientRect();
45
45
  if (e && o) {
46
46
  const k = o.top - e.top;
47
47
  y.value = k < 2 ? 0 : k;
48
48
  }
49
49
  });
50
- const {
51
- breadcrumb: Y,
50
+ const Y = v(ce), {
51
+ breadcrumb: V,
52
52
  collapsedSidebarItems: m,
53
- isSidebarOpen: V,
53
+ isSidebarOpen: G,
54
54
  setCollapsedSidebarItem: T,
55
- hideModels: G,
56
- defaultOpenAllTags: W,
57
- setParsedSpec: j,
58
- scrollToOperation: K
59
- } = Te(), {
55
+ hideModels: W,
56
+ defaultOpenAllTags: j,
57
+ setParsedSpec: K,
58
+ scrollToOperation: Q
59
+ } = $e(), {
60
60
  getPathRoutingId: R,
61
- getSectionId: Q,
62
- getTagId: q,
61
+ getSectionId: q,
62
+ getTagId: J,
63
63
  hash: $,
64
64
  isIntersectionEnabled: C,
65
65
  pathRouting: L,
66
- updateHash: E
67
- } = Ce();
68
- L.value = t.configuration.pathRouting, D(() => E());
69
- const I = async (e) => {
66
+ updateHash: O
67
+ } = Oe();
68
+ L.value = t.configuration.pathRouting, D(() => O());
69
+ const E = async (e) => {
70
70
  var o;
71
- C.value = !1, E(), e ? K(e) : (o = p.value) == null || o.scrollTo(0, 0), await Le(100), C.value = !0;
71
+ C.value = !1, O(), e ? Q(e) : (o = p.value) == null || o.scrollTo(0, 0), await Ee(100), C.value = !0;
72
72
  };
73
- D(() => le()), B(() => {
74
- Se.on(({ specTitle: e }) => {
75
- he(t.rawSpec, e);
76
- }), window.onhashchange = () => I(decodeURIComponent(window.location.hash.replace(/^#/, ""))), window.onpopstate = () => L.value && I(R(window.location.pathname));
73
+ D(() => de()), B(() => {
74
+ be.on(({ specTitle: e }) => {
75
+ we(t.rawSpec, e);
76
+ }), window.onhashchange = () => E(decodeURIComponent(window.location.hash.replace(/^#/, ""))), window.onpopstate = () => L.value && E(R(window.location.pathname));
77
77
  });
78
- const J = b(
78
+ const X = v(
79
79
  () => N.value || !t.configuration.isEditable
80
- ), O = ge((e) => {
80
+ ), I = ve((e) => {
81
81
  if ((e.target.scrollTop ?? 0) < 50) {
82
82
  const a = t.configuration.pathRouting ? t.configuration.pathRouting.basePath : window.location.pathname;
83
83
  window.history.replaceState({}, "", a + window.location.search), $.value = "";
84
84
  }
85
- }), s = b(() => ({
86
- breadcrumb: Y.value,
85
+ }), n = v(() => ({
86
+ breadcrumb: V.value,
87
87
  spec: t.parsedSpec
88
88
  }));
89
- _(() => t.parsedSpec, j, { deep: !0 }), x(() => {
89
+ x(() => t.parsedSpec, K, { deep: !0 }), ee(() => {
90
90
  var o, a;
91
- const e = ee();
91
+ const e = oe();
92
92
  if (e && (e.payload || (e.payload = { data: P() }), (o = e.payload).data || (o.data = P()), t.configuration.pathRouting)) {
93
93
  const r = R(e.url);
94
94
  $.value = r, e.payload.data.hash = r;
95
- for (const n in m)
96
- Object.hasOwn(m, n) && delete m[n];
95
+ for (const s in m)
96
+ Object.hasOwn(m, s) && delete m[s];
97
97
  if (r)
98
- T(Q(r), !0);
98
+ T(q(r), !0);
99
99
  else {
100
- const n = (a = t.parsedSpec.tags) == null ? void 0 : a[0];
101
- n && T(q(n), !0);
100
+ const s = (a = t.parsedSpec.tags) == null ? void 0 : a[0];
101
+ s && T(J(s), !0);
102
102
  }
103
103
  e.payload.data["useSidebarContent-collapsedSidebarItems"] = m;
104
104
  }
105
- }), ie(() => {
105
+ }), le(() => {
106
106
  var r;
107
- const e = oe(), o = "scalar-instance-id";
107
+ const e = te(), o = "scalar-instance-id";
108
108
  if (!e) return o;
109
109
  let a = e.uid;
110
110
  return typeof window > "u" ? (e.attrs || (e.attrs = {}), e.attrs[o] = a) : (r = e.vnode.el) != null && r.getAttribute && (a = e.vnode.el.getAttribute(o)), `${o}-${a}`;
111
- }), F(Re, () => t.parsedSpec.security), F(
112
- $e,
111
+ }), F(Ce, () => t.parsedSpec.security), F(
112
+ Le,
113
113
  () => t.configuration.hideDownloadButton
114
- ), G.value = t.configuration.hideModels ?? !1, W.value = t.configuration.defaultOpenAllTags ?? !1, be(t.configuration);
115
- const X = b(
114
+ ), W.value = t.configuration.hideModels ?? !1, j.value = t.configuration.defaultOpenAllTags ?? !1, ye(t.configuration);
115
+ const Z = v(
116
116
  () => `<style>
117
- ${de(t.configuration.theme, {
117
+ ${ue(t.configuration.theme, {
118
118
  fonts: t.configuration.withDefaultFonts
119
119
  })}</style>`
120
120
  );
121
121
  return (e, o) => {
122
122
  var a;
123
- return v(), S(M, null, [
124
- i("div", { innerHTML: X.value }, null, 8, Ee),
123
+ return S(), h(M, null, [
124
+ i("div", { innerHTML: Z.value }, null, 8, Ie),
125
125
  i("div", {
126
126
  ref_key: "documentEl",
127
127
  ref: p,
128
- class: te(["scalar-app scalar-api-reference references-layout", [
128
+ class: re(["scalar-app scalar-api-reference references-layout", [
129
129
  {
130
+ "scalar-scrollbars-obtrusive": Y.value,
130
131
  "references-editable": e.configuration.isEditable,
131
132
  "references-sidebar": e.configuration.showSidebar,
132
- "references-sidebar-mobile-open": u(V),
133
+ "references-sidebar-mobile-open": u(G),
133
134
  "references-classic": e.configuration.layout === "classic"
134
135
  },
135
136
  e.$attrs.class
136
137
  ]]),
137
- style: re({
138
+ style: ae({
138
139
  "--scalar-y-offset": `var(--scalar-custom-header-height, ${y.value}px)`
139
140
  }),
140
141
  onScrollPassive: o[4] || (o[4] = //@ts-ignore
141
- (...r) => u(O) && u(O)(...r))
142
+ (...r) => u(I) && u(I)(...r))
142
143
  }, [
143
- i("div", Ie, [
144
- l(e.$slots, "header", d(c(s.value)), void 0, !0)
144
+ i("div", ke, [
145
+ l(e.$slots, "header", d(c(n.value)), void 0, !0)
145
146
  ]),
146
- e.configuration.showSidebar ? (v(), S("aside", Oe, [
147
- i("div", ke, [
148
- f(u(we), {
147
+ e.configuration.showSidebar ? (S(), h("aside", Be, [
148
+ i("div", De, [
149
+ f(u(Te), {
149
150
  parsedSpec: e.parsedSpec,
150
151
  tagsSorter: e.configuration.tagsSorter
151
152
  }, {
152
153
  "sidebar-start": g(() => [
153
- l(e.$slots, "sidebar-start", d(c(s.value)), void 0, !0)
154
+ l(e.$slots, "sidebar-start", d(c(n.value)), void 0, !0)
154
155
  ]),
155
156
  "sidebar-end": g(() => [
156
- l(e.$slots, "sidebar-end", d(c(s.value)), void 0, !0)
157
+ l(e.$slots, "sidebar-end", d(c(n.value)), void 0, !0)
157
158
  ]),
158
159
  _: 3
159
160
  }, 8, ["parsedSpec", "tagsSorter"])
160
161
  ])
161
162
  ])) : w("", !0),
162
- ae(i("div", Be, [
163
- i("div", De, [
164
- l(e.$slots, "editor", d(c(s.value)), void 0, !0)
163
+ se(i("div", Fe, [
164
+ i("div", Me, [
165
+ l(e.$slots, "editor", d(c(n.value)), void 0, !0)
165
166
  ])
166
167
  ], 512), [
167
168
  [ne, e.configuration.isEditable]
168
169
  ]),
169
- J.value ? (v(), S(M, { key: 1 }, [
170
- i("div", Fe, [
171
- f(u(ye), {
170
+ X.value ? (S(), h(M, { key: 1 }, [
171
+ i("div", Pe, [
172
+ f(u(Re), {
172
173
  baseServerURL: e.configuration.baseServerURL,
173
174
  layout: e.configuration.layout === "classic" ? "accordion" : "default",
174
175
  parsedSpec: e.parsedSpec,
175
176
  proxy: e.configuration.proxy,
176
177
  servers: e.configuration.servers
177
- }, se({
178
+ }, ie({
178
179
  start: g(() => [
179
- l(e.$slots, "content-start", d(c(s.value)), void 0, !0)
180
+ l(e.$slots, "content-start", d(c(n.value)), void 0, !0)
180
181
  ]),
181
182
  end: g(() => [
182
- l(e.$slots, "content-end", d(c(s.value)), void 0, !0)
183
+ l(e.$slots, "content-end", d(c(n.value)), void 0, !0)
183
184
  ]),
184
185
  _: 2
185
186
  }, [
@@ -188,12 +189,12 @@ const Ee = ["innerHTML"], Ie = { class: "references-header" }, Oe = {
188
189
  fn: g(() => {
189
190
  var r;
190
191
  return [
191
- f(ve, {
192
+ f(he, {
192
193
  theme: ((r = e.configuration) == null ? void 0 : r.theme) || "default",
193
- onChangeTheme: o[0] || (o[0] = (n) => e.$emit("changeTheme", n)),
194
- onLinkSwaggerFile: o[1] || (o[1] = (n) => e.$emit("linkSwaggerFile")),
195
- onLoadSwaggerFile: o[2] || (o[2] = (n) => e.$emit("loadSwaggerFile")),
196
- onUpdateContent: o[3] || (o[3] = (n) => e.$emit("updateContent", n))
194
+ onChangeTheme: o[0] || (o[0] = (s) => e.$emit("changeTheme", s)),
195
+ onLinkSwaggerFile: o[1] || (o[1] = (s) => e.$emit("linkSwaggerFile")),
196
+ onLoadSwaggerFile: o[2] || (o[2] = (s) => e.$emit("loadSwaggerFile")),
197
+ onUpdateContent: o[3] || (o[3] = (s) => e.$emit("updateContent", s))
197
198
  }, null, 8, ["theme"])
198
199
  ];
199
200
  }),
@@ -201,21 +202,21 @@ const Ee = ["innerHTML"], Ie = { class: "references-header" }, Oe = {
201
202
  } : void 0
202
203
  ]), 1032, ["baseServerURL", "layout", "parsedSpec", "proxy", "servers"])
203
204
  ]),
204
- e.$slots.footer ? (v(), S("div", Me, [
205
- l(e.$slots, "footer", d(c(s.value)), void 0, !0)
205
+ e.$slots.footer ? (S(), h("div", Ue, [
206
+ l(e.$slots, "footer", d(c(n.value)), void 0, !0)
206
207
  ])) : w("", !0)
207
208
  ], 64)) : w("", !0),
208
- f(me, {
209
+ f(Se, {
209
210
  proxyUrl: e.configuration.proxy,
210
211
  servers: e.configuration.servers,
211
212
  spec: e.configuration.spec
212
213
  }, null, 8, ["proxyUrl", "servers", "spec"])
213
214
  ], 38),
214
- f(u(ue))
215
+ f(u(fe))
215
216
  ], 64);
216
217
  };
217
218
  }
218
219
  });
219
220
  export {
220
- xe as default
221
+ oo as default
221
222
  };