import { JSX, RendererEvent } from 'typedoc'; import { IPluginComponent } from '@knodes/typedoc-pluginutils'; import { IPagesPluginThemeMethods, RenderPageLinkProps } from './types'; import type { PagesPlugin } from '../../plugin'; export declare class DefaultPagesRenderer implements IPagesPluginThemeMethods, IPluginComponent { readonly plugin: PagesPlugin; private readonly _currentPageMemo; private readonly _theme; private readonly _modulesPages; private readonly _allPages; private readonly _nodeDeclarationMappingCache; private _renderPageRestore?; constructor(plugin: PagesPlugin, event: RendererEvent); /** * Render a link to a given page. * * @param root0 - The rendering context with the target page & label. * @returns the generated link. */ renderPageLink({ page, label }: RenderPageLinkProps): JSX.Element; /** * Render a single page reflection. * * @param props - The page event for the page reflection. * @returns the rendered page. */ private _renderPage; /** * Map a node reflection to a similar declaration, mimicing Typedoc default rendering process. * * @param node - The node to map. * @param parent - The parent to set on the node (for recursive calls). * @returns the new declaration reflection. */ private _mapNode; /** * Append a new restoration hook to execute on page rendering end. * * @see _onRendererBeginPage * @see _onRendererEndPage * @param collect - A function to get the current state. * @param fn - A function executed with the state retrieved via {@link collect} that restores the previous state. */ private _addRestore; /** * Retrieve declaration reflections that are mirrors of inputted node reflections. * * @param nodeReflections - The node reflections to map. * @returns the mapped node reflections. */ private _mapNodeReflectionsToDeclarations; /** * Event callback executed on every page on {@link PageEvent.BEGIN}. * * @see _onRendererBeginPageAlterModel * @see _onRendererBeginPageAlterNavigation * @param pageEvent - The page event to alter. */ private _onRendererBeginPage; /** * Partial implementation of {@link _onRendererBeginPage} that prepares the navigation for a single page. * * @param pageEvent - The page event to alter. */ private _onRendererBeginPageAlterNavigation; /** * Partial implementation of {@link _onRendererBeginPage} responsible of modifying the page mode. Node reflections are replaced with a similar declaration, * and modules/projects are prepended with root pages sources. * * @param pageEvent - The page event to alter. */ private _onRendererBeginPageAlterModel; /** * Event callback executed on every page on {@link PageEvent.END}. * It undoes changes made by {@link _onRendererBeginPage}. * * @param _pageEvent - The page event to alter. */ private _onRendererEndPage; /** * Event callback executed once on {@link RendererEvent.END}. * Copy assets to the output directory. * * @param event - The {@link RendererEvent.END} event. */ private _onRendererEnd; /** * Event callback executed once on {@link IndexEvent.PREPARE_INDEX}. * Adds the plugin's pages to the search index. * * @param indexEvent - The original index event. */ private _onRendererPrepareIndex; } //# sourceMappingURL=default-pages-renderer.d.ts.map