import { defineComponent } from 'vue'; import { useRoute } from 'vue-router'; import { ComponentDoc } from 'vue-docgen-api'; import { DeclarationReflection } from 'typedoc'; import { getByName } from '../docs'; import ComponentDocs from '../ComponentDocs'; import TsDocs from '../TsDocs'; import './Package.scss'; export default defineComponent({ name: 'Package', setup() { const route = useRoute(); const packageName = route.params.package; const docs = getByName(Array.isArray(packageName) ? packageName[0] : packageName); if (!docs) { return () =>
Unknown package name {packageName}
; } const { lib, components } = docs; return () =>

{lib.name}

{lib.comment}

{lib.flags}

{...(lib.children || []).map((child:DeclarationReflection) => { const componentDocs = components.find((c: ComponentDoc) => c.exportName === child.name); if (componentDocs) { return } return })}
; }, });