@scalar/api-reference 1.24.29 → 1.24.30

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,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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5a18d101"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8f97b414"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as B, openBlock as a, createElementBlock as d, createElementVNode as h, normalizeClass as V, createVNode as p, unref as u, withModifiers as $, createTextVNode as f, createCommentVNode as s, createBlock as N, toDisplayString as A, renderSlot as g } from "vue";
1
+ import { defineComponent as B, openBlock as a, createElementBlock as d, createElementVNode as h, normalizeClass as $, createVNode as p, unref as u, withModifiers as V, createTextVNode as f, createCommentVNode as s, createBlock as N, toDisplayString as A, renderSlot as g } from "vue";
2
2
  import { ScalarIconButton as E, ScalarIcon as I } from "@scalar/components";
3
3
  import O from "./SidebarHttpBadge.vue.js";
4
4
  import { sleep as v } from "../../helpers/sleep.js";
@@ -25,32 +25,32 @@ const D = ["id"], L = {
25
25
  },
26
26
  emits: ["toggleOpen"],
27
27
  setup(b, { emit: C }) {
28
- const t = b, c = C, { hash: w, isIntersectionEnabled: r, pathRouting: l } = _(), m = async () => {
29
- var e, i;
30
- t.hasChildren && c("toggleOpen"), (i = (e = t.item) == null ? void 0 : e.select) == null || i.call(e), t.open && (r.value = !1, await v(100), r.value = !0);
28
+ const i = b, c = C, { hash: w, isIntersectionEnabled: r, pathRouting: l } = _(), m = async () => {
29
+ var e, t;
30
+ i.hasChildren && c("toggleOpen"), (t = (e = i.item) == null ? void 0 : e.select) == null || t.call(e), i.open && (r.value = !1, await v(100), r.value = !0);
31
31
  }, y = () => {
32
32
  if (l.value)
33
- return k(l.value.basePath, t.item.id);
34
- {
33
+ return k(l.value.basePath, i.item.id);
34
+ if (typeof window < "u") {
35
35
  const e = new URL(window.location.href);
36
- return e.hash = t.item.id, `${e.pathname}${e.search}${e.hash}`;
37
- }
36
+ return e.hash = i.item.id, `${e.pathname}${e.search}${e.hash}`;
37
+ } else return `#${i.item.id}`;
38
38
  }, S = async (e) => {
39
- var i, o;
39
+ var t, o;
40
40
  if (l.value) {
41
- e.preventDefault(), t.hasChildren && c("toggleOpen"), (o = (i = t.item) == null ? void 0 : i.select) == null || o.call(i), c("toggleOpen"), r.value = !1, w.value = t.item.id;
41
+ e.preventDefault(), i.hasChildren && c("toggleOpen"), (o = (t = i.item) == null ? void 0 : t.select) == null || o.call(t), c("toggleOpen"), r.value = !1, w.value = i.item.id;
42
42
  const n = new URL(window.location.href);
43
- n.pathname = k(l.value.basePath, t.item.id), window.history.pushState({}, "", n), R(t.item.id), await v(100), r.value = !0;
43
+ n.pathname = k(l.value.basePath, i.item.id), window.history.pushState({}, "", n), R(i.item.id), await v(100), r.value = !0;
44
44
  }
45
45
  };
46
- return (e, i) => {
46
+ return (e, t) => {
47
47
  var o, n;
48
48
  return a(), d("li", {
49
49
  id: e.id,
50
50
  class: "sidebar-group-item"
51
51
  }, [
52
52
  h("div", {
53
- class: V(["sidebar-heading", {
53
+ class: $(["sidebar-heading", {
54
54
  "sidebar-group-item__folder": e.hasChildren,
55
55
  active_page: e.isActive,
56
56
  deprecated: e.item.deprecated ?? !1
@@ -63,7 +63,7 @@ const D = ["id"], L = {
63
63
  icon: e.open ? "ChevronDown" : "ChevronRight",
64
64
  label: "Toggle group",
65
65
  size: "xs",
66
- onClick: $(m, ["stop"])
66
+ onClick: V(m, ["stop"])
67
67
  }, null, 8, ["icon"]),
68
68
  f("   ")
69
69
  ])) : s("", !0),