UNPKG

@vuecs/navigation

Version:

A package for multi level navigations.

12 lines 673 B
import type { NavigationItemNormalized } from '../types'; /** * Walk a normalized tree along `trace` (an ordered list of item names, * root → leaf) and collect the item at each depth. Returns the ordered * active trail: `[0]` is the top-level section, `.at(-1)` is the leaf. */ export declare function collectTrail(items: NavigationItemNormalized[], trace: string[]): NavigationItemNormalized[]; /** * Depth-first collect of every item in the tree matching `predicate`. */ export declare function flattenWhere(items: NavigationItemNormalized[], predicate: (item: NavigationItemNormalized) => boolean): NavigationItemNormalized[]; //# sourceMappingURL=trail.d.ts.map