UNPKG

fumadocs-core

Version:

The React.js library for building a documentation website

48 lines (47 loc) 1.44 kB
import { i as Root, r as Node } from "./definitions-DuxDer_c.js"; import { ReactNode } from "react"; //#region src/breadcrumb.d.ts interface BreadcrumbItem { name: ReactNode; url?: string; } interface BreadcrumbOptions { /** * Include the root folders in the breadcrumb items array. * * @defaultValue false */ includeRoot?: boolean | { /** * Specify the url of root */ url: string; }; /** * Include the page itself in the breadcrumb items array * * @defaultValue false */ includePage?: boolean; /** * Count separator as an item * * @defaultValue false */ includeSeparator?: boolean; } declare function useBreadcrumb(url: string, tree: Root, options?: BreadcrumbOptions): BreadcrumbItem[]; declare function getBreadcrumbItems(url: string, tree: Root, options?: BreadcrumbOptions): BreadcrumbItem[]; declare function getBreadcrumbItemsFromPath(tree: Root, path: Node[], options: BreadcrumbOptions): BreadcrumbItem[]; /** * Search the path of a node in the tree by a specified url * * - When the page doesn't exist, return null * * @returns The path to the target node from root * @internal Don't use this on your own */ declare function searchPath(nodes: Node[], url: string): Node[] | null; //#endregion export { BreadcrumbItem, BreadcrumbOptions, getBreadcrumbItems, getBreadcrumbItemsFromPath, searchPath, useBreadcrumb }; //# sourceMappingURL=breadcrumb.d.ts.map