UNPKG

@scalar/api-reference

Version:

Generate beautiful API references from OpenAPI documents

31 lines (30 loc) 745 B
import { defineComponent as s, createBlock as a, openBlock as l, withCtx as c, renderSlot as d } from "vue"; import p from "../IntersectionObserver.vue.js"; import { useNavState as f } from "../../hooks/useNavState.js"; const b = /* @__PURE__ */ s({ __name: "Section", props: { id: {}, label: {} }, setup(o) { const e = o, { isIntersectionEnabled: n, replaceUrlState: r } = f(); function i() { !e.label || !n.value || r(e.id ?? ""); } return (t, u) => (l(), a(p, { is: "section", id: t.id, class: "section", onIntersecting: i }, { default: c(() => [ d(t.$slots, "default", {}, void 0, !0) ]), _: 3 }, 8, ["id"])); } }); export { b as default };