import { LeaderBindingContribution } from "@agimon-ai/po-core/web"; //#region src/web/lib/leaderTree.d.ts export interface LeaderOption { key: string; label: string; detail: string; /** A group opens the next level; a leaf carries the binding that fires. */ binding?: LeaderBindingContribution; /** The keys one level down, for a group's preview; empty for a leaf. */ children: LeaderOption[]; } export interface LeaderGroup { /** The label of the segment that opened this level; 'leader' at the root. */ label: string; options: LeaderOption[]; } export interface LeaderConflict { /** A later binding took a bound leaf (or a whole group) over, or a group segment was worded differently. */ kind: 'leaf-override' | 'group-label'; /** The keys of the contested segment, space separated. */ path: string; /** The binding the tree keeps: the later one for a leaf, the first namer for a group label. */ winner: LeaderBindingContribution; loser: LeaderBindingContribution; } /** * Every place `insert` would silently prefer one binding over another, in * the same order insert walks them: a leaf landing on a bound leaf or over a * group displaces those bindings, a group segment crossing a bound leaf * displaces it, and a group segment worded differently from the first namer * keeps the first wording. */ export declare function leaderConflicts(bindings: readonly LeaderBindingContribution[]): LeaderConflict[]; /** * The options one level of Leader Space offers, keyed by what the reader * would press, sorted by key. Undefined when the path runs off the tree or * lands on a leaf, which is how the palette knows a path is no longer a group. */ export declare function leaderGroup(bindings: readonly LeaderBindingContribution[], path: readonly string[]): LeaderGroup | undefined; //#endregion //# sourceMappingURL=leaderTree.d.mts.map