UNPKG

@scalar/api-reference

Version:

Generate beautiful API references from OpenAPI documents

113 lines (112 loc) 5.19 kB
import { defineComponent, createBlock, openBlock, unref, withCtx, createVNode, renderSlot, createElementVNode, createCommentVNode, createTextVNode, toDisplayString } from "vue"; import InfoDescription from "./InfoDescription.vue.js"; import _sfc_main$3 from "./InfoLinks.vue.js"; import _sfc_main$1 from "./InfoVersion.vue.js"; import _sfc_main$2 from "./OpenApiVersion.vue.js"; import SectionContainer from "../../../components/Section/SectionContainer.vue.js"; import Section from "../../../components/Section/Section.vue.js"; import SectionContent from "../../../components/Section/SectionContent.vue.js"; import SectionHeader from "../../../components/Section/SectionHeader.vue.js"; import SectionHeaderTag from "../../../components/Section/SectionHeaderTag.vue.js"; import SectionColumns from "../../../components/Section/SectionColumns.vue.js"; import SectionColumn from "../../../components/Section/SectionColumn.vue.js"; import _sfc_main$4 from "../../../features/specification-extension/SpecificationExtension.vue2.js"; const _hoisted_1 = { class: "flex gap-1.5" }; const _hoisted_2 = { class: "sticky-cards" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "IntroductionLayout", props: { id: {}, oasVersion: {}, info: {}, externalDocs: {}, documentExtensions: {}, infoExtensions: {}, headingSlugGenerator: { type: Function }, eventBus: {} }, setup(__props) { return (_ctx, _cache) => { return openBlock(), createBlock(unref(SectionContainer), null, { default: withCtx(() => [ createVNode(unref(Section), { id: __props.id, "aria-label": "Introduction", class: "introduction-section z-1 gap-12", onIntersecting: _cache[0] || (_cache[0] = () => __props.id && __props.eventBus?.emit("intersecting:nav-item", { id: __props.id })) }, { default: withCtx(() => [ createVNode(unref(SectionContent), { loading: !__props.info }, { default: withCtx(() => [ createElementVNode("div", _hoisted_1, [ __props.info ? (openBlock(), createBlock(_sfc_main$1, { key: 0, version: __props.info?.version }, null, 8, ["version"])) : createCommentVNode("", true), createVNode(_sfc_main$2, { oasVersion: __props.oasVersion }, null, 8, ["oasVersion"]) ]), createVNode(unref(SectionHeader), { loading: !__props.info?.title, tight: "" }, { links: withCtx(() => [ __props.info ? (openBlock(), createBlock(_sfc_main$3, { key: 0, externalDocs: __props.externalDocs, info: __props.info }, null, 8, ["externalDocs", "info"])) : createCommentVNode("", true) ]), default: withCtx(() => [ createVNode(unref(SectionHeaderTag), { level: 1 }, { default: withCtx(() => [ createTextVNode(toDisplayString(__props.info?.title), 1) ]), _: 1 }) ]), _: 1 }, 8, ["loading"]), createVNode(unref(SectionColumns), null, { default: withCtx(() => [ createVNode(unref(SectionColumn), null, { default: withCtx(() => [ renderSlot(_ctx.$slots, "download-link", {}, void 0, true), createVNode(InfoDescription, { description: __props.info?.description, eventBus: __props.eventBus, headingSlugGenerator: __props.headingSlugGenerator }, null, 8, ["description", "eventBus", "headingSlugGenerator"]) ]), _: 3 }), _ctx.$slots.aside ? (openBlock(), createBlock(unref(SectionColumn), { key: 0 }, { default: withCtx(() => [ createElementVNode("div", _hoisted_2, [ renderSlot(_ctx.$slots, "aside", {}, void 0, true) ]) ]), _: 3 })) : createCommentVNode("", true) ]), _: 3 }), createVNode(unref(_sfc_main$4), { value: __props.documentExtensions }, null, 8, ["value"]), createVNode(unref(_sfc_main$4), { value: __props.infoExtensions }, null, 8, ["value"]) ]), _: 3 }, 8, ["loading"]), renderSlot(_ctx.$slots, "after", {}, void 0, true) ]), _: 3 }, 8, ["id"]) ]), _: 3 }); }; } }); export { _sfc_main as default };