UNPKG

@scalar/api-reference

Version:

Generate beautiful API references from OpenAPI documents

103 lines (102 loc) 3.87 kB
import { defineComponent as m, onMounted as u, createBlock as l, openBlock as s, unref as n, withCtx as i, createVNode as e, renderSlot as r, createElementVNode as a, createTextVNode as c, toDisplayString as p, createCommentVNode as v } from "vue"; import g from "./InfoDescription.vue.js"; import S from "./InfoLinks.vue.js"; import V from "./InfoVersion.vue.js"; import $ from "./OpenApiVersion.vue.js"; import y from "../../../../components/Section/SectionContainer.vue.js"; import C from "../../../../components/Section/Section.vue.js"; import L from "../../../../components/Section/SectionContent.vue.js"; import k from "../../../../components/Section/SectionHeader.vue.js"; import D from "../../../../components/Section/SectionHeaderTag.vue.js"; import h from "../../../../components/Section/SectionColumns.vue.js"; import d from "../../../../components/Section/SectionColumn.vue.js"; import f from "../../../../features/specification-extension/SpecificationExtension.vue2.js"; const E = { class: "flex gap-1.5" }, _ = { class: "sticky-cards" }, J = /* @__PURE__ */ m({ __name: "IntroductionLayout", props: { id: {}, oasVersion: {}, info: {}, externalDocs: {}, documentExtensions: {}, infoExtensions: {}, isLoading: { type: Boolean }, onLoaded: { type: Function } }, setup(t) { return u(() => typeof t.onLoaded == "function" ? t.onLoaded?.() : t.onLoaded), (o, N) => (s(), l(n(y), null, { default: i(() => [ e(n(C), { id: o.id, class: "introduction-section z-1 gap-12" }, { default: i(() => [ e(n(L), { loading: o.isLoading ?? (!o.info?.description && !o.info?.title) }, { default: i(() => [ a("div", E, [ e(V, { version: o.info?.version }, null, 8, ["version"]), e($, { oasVersion: o.oasVersion }, null, 8, ["oasVersion"]) ]), e(n(k), { loading: !o.info?.title, tight: "" }, { links: i(() => [ e(S, { externalDocs: o.externalDocs, info: o.info }, null, 8, ["externalDocs", "info"]) ]), default: i(() => [ e(n(D), { level: 1 }, { default: i(() => [ c(p(o.info?.title), 1) ]), _: 1 }) ]), _: 1 }, 8, ["loading"]), e(n(h), null, { default: i(() => [ e(n(d), null, { default: i(() => [ r(o.$slots, "download-link", {}, void 0, !0), e(g, { description: o.info?.description }, null, 8, ["description"]) ]), _: 3 }), o.$slots.aside ? (s(), l(n(d), { key: 0 }, { default: i(() => [ a("div", _, [ r(o.$slots, "aside", {}, void 0, !0) ]) ]), _: 3 })) : v("", !0) ]), _: 3 }), e(n(f), { value: o.documentExtensions }, null, 8, ["value"]), e(n(f), { value: o.infoExtensions }, null, 8, ["value"]) ]), _: 3 }, 8, ["loading"]), r(o.$slots, "after", {}, void 0, !0) ]), _: 3 }, 8, ["id"]) ]), _: 3 })); } }); export { J as default };