import { PageData, PageFrontmatter, HeadConfig, SiteData } from '@vuepress/shared'; export { PageData, PageFrontmatter, PageHeader, SiteData } from '@vuepress/shared'; import * as vue from 'vue'; import { ComputedRef, InjectionKey, Ref, Component, App } from 'vue'; import { Router, RouteMeta } from 'vue-router'; export { C as CreateVueAppFunction } from './createVueAppFunction-YNGNKfE3.js'; /** * Ref wrapper of `Layouts` */ type LayoutsRef = ComputedRef; /** * Injection key for layouts */ declare const layoutsSymbol: InjectionKey; /** * Returns layouts component map */ declare const useLayouts: () => LayoutsRef; /** * Ref wrapper of `PageData` */ type PageDataRef = Record> = Ref>; /** * Injection key for page data */ declare const pageDataSymbol: InjectionKey; /** * Empty page data to be used as the fallback value */ declare const pageDataEmpty: PageData; /** * Returns the ref of the data of current page */ declare const usePageData: = Record>() => PageDataRef; /** * Ref wrapper of `PageFrontmatter` */ type PageFrontmatterRef = Record> = ComputedRef>; /** * Injection key for page frontmatter */ declare const pageFrontmatterSymbol: InjectionKey; /** * Returns the ref of the frontmatter of current page */ declare const usePageFrontmatter: = Record>() => PageFrontmatterRef; /** * Page head config, which would be used for generate html tags in `` */ type PageHead = HeadConfig[]; /** * Ref wrapper of `PageHead` */ type PageHeadRef = ComputedRef; /** * Injection key for page head */ declare const pageHeadSymbol: InjectionKey; /** * Returns the ref of the head config of current page */ declare const usePageHead: () => PageHeadRef; /** * Page head title, which would be used as the content of `head > title` tag */ type PageHeadTitle = string; /** * Ref wrapper of `PageHeadTitle` */ type PageHeadTitleRef = ComputedRef; /** * Injection key for page head title */ declare const pageHeadTitleSymbol: InjectionKey; /** * Returns the ref of the head title of current page */ declare const usePageHeadTitle: () => PageHeadTitleRef; /** * Page language */ type PageLang = string; /** * Ref wrapper of `PageLang` */ type PageLangRef = ComputedRef; /** * Injection key for page language */ declare const pageLangSymbol: InjectionKey; /** * Returns the ref of the language of current page */ declare const usePageLang: () => PageLangRef; /** * Ref wrapper of `PageLayout` */ type PageLayoutRef = ComputedRef; /** * Injection key for page layout */ declare const pageLayoutSymbol: InjectionKey; /** * Returns layout component of current page */ declare const usePageLayout: () => ComputedRef; /** * Data resolvers of all pages * * The key is page key, and the value is an async function that * returns the page data */ type PagesData = Record Promise) | undefined>; /** * Ref wrapper of `PagesData` */ type PagesDataRef = Ref; /** * Global pages data ref */ declare const pagesData: PagesDataRef; /** * Returns the ref of data resolvers of all pages */ declare const usePagesData: () => PagesDataRef; /** * Route locale path */ type RouteLocale = string; /** * Ref wrapper of `RouteLocale` */ type RouteLocaleRef = Readonly>; /** * Injection key for page route locale path */ declare const routeLocaleSymbol: InjectionKey; /** * Returns the ref of the route locale path of current page */ declare const useRouteLocale: () => RouteLocaleRef; /** * Ref wrapper of `SiteData` */ type SiteDataRef = Ref; /** * Global site data ref */ declare const siteData: SiteDataRef; /** * Returns the ref of the site data */ declare const useSiteData: () => SiteDataRef; /** * Site data of current locale */ type SiteLocaleData = SiteData; /** * Ref wrapper of `SiteLocaleData` */ type SiteLocaleDataRef = ComputedRef; /** * Injection key for site locale data */ declare const siteLocaleDataSymbol: InjectionKey; /** * Returns the ref of the site data of current locale */ declare const useSiteLocaleData: () => SiteLocaleDataRef; /** * A util function to force update `` of current page */ type UpdateHead = () => void; /** * Injection key for `updateHead` util */ declare const updateHeadSymbol: InjectionKey; /** * Returns the `updateHead` util */ declare const useUpdateHead: () => UpdateHead; type Layouts = Record; /** * Configure vuepress client */ interface ClientConfig { /** * An enhance function to be called after vue app instance and * vue-router instance has been created */ enhance?: (context: { app: App; router: Router; siteData: SiteDataRef; }) => void | Promise; /** * A function to be called inside the setup function of vue app */ setup?: () => void; /** * Layout components */ layouts?: Layouts; /** * Components to be placed directly into the root node of vue app */ rootComponents?: Component[]; } type PageRouteItem = [ name: string, path: string, meta: RouteMeta, redirects: string[] ]; declare const ClientOnly: vue.DefineComponent<{}, () => vue.VNode[] | null | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly>, {}, {}>; /** * Markdown rendered content */ declare const Content: vue.DefineComponent<{ pageKey: { type: StringConstructor; required: false; default: string; }; }, () => vue.VNode, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly>, { pageKey: string; }, {}>; /** * A helper function to help you define vuepress client config file */ declare const defineClientConfig: (clientConfig?: ClientConfig) => ClientConfig; /** * Prefix url with site base */ declare const withBase: (url: string) => string; /** * Resolver methods to get global computed * * Users can override corresponding method for advanced customization */ declare const resolvers: { resolveLayouts: (clientConfigs: ClientConfig[]) => Layouts; resolvePageData: (pageKey: string) => Promise; resolvePageFrontmatter: (pageData: PageData) => PageFrontmatter; resolvePageHead: (headTitle: PageHeadTitle, frontmatter: PageFrontmatter, siteLocale: SiteLocaleData) => PageHead; resolvePageHeadTitle: (page: PageData, siteLocale: SiteLocaleData) => PageHeadTitle; resolvePageLang: (page: PageData, siteLocale: SiteLocaleData) => PageLang; resolvePageLayout: (page: PageData, layouts: Layouts) => Component; resolveRouteLocale: (locales: SiteData['locales'], routePath: string) => RouteLocale; resolveSiteLocaleData: (site: SiteData, routeLocale: RouteLocale) => SiteLocaleData; }; export { type ClientConfig, ClientOnly, Content, type Layouts, type LayoutsRef, type PageDataRef, type PageFrontmatterRef, type PageHead, type PageHeadRef, type PageHeadTitle, type PageHeadTitleRef, type PageLang, type PageLangRef, type PageLayoutRef, type PageRouteItem, type PagesData, type PagesDataRef, type RouteLocale, type RouteLocaleRef, type SiteDataRef, type SiteLocaleData, type SiteLocaleDataRef, type UpdateHead, defineClientConfig, layoutsSymbol, pageDataEmpty, pageDataSymbol, pageFrontmatterSymbol, pageHeadSymbol, pageHeadTitleSymbol, pageLangSymbol, pageLayoutSymbol, pagesData, resolvers, routeLocaleSymbol, siteData, siteLocaleDataSymbol, updateHeadSymbol, useLayouts, usePageData, usePageFrontmatter, usePageHead, usePageHeadTitle, usePageLang, usePageLayout, usePagesData, useRouteLocale, useSiteData, useSiteLocaleData, useUpdateHead, withBase };