import { DoomExtensionContext } from "./config.mjs"; import { Static, Type } from "typebox"; //#region src/schemas/leader.d.ts /** * How the key badge is painted. `exit` marks the row that leaves an active minor * mode, which the panel colours differently so the reader can tell which way the * key flips without checking the mode line first. */ export declare const LeaderToneSchema: Type.TUnion<[Type.TLiteral<"default">, Type.TLiteral<"exit">]>; export type LeaderTone = Static; export declare const LeaderSegmentSchema: Type.TObject<{ key: Type.TString; label: Type.TString; detail: Type.TOptional; order: Type.TOptional; tone: Type.TOptional, Type.TLiteral<"exit">]>>; }>; export type LeaderSegment = Static; export declare const LeaderCommandSchema: Type.TObject<{ name: Type.TString; args: Type.TOptional; }>; export type LeaderCommand = Static; export declare const LeaderActionSchema: Type.TObject<{ name: Type.TString; }>; export type LeaderAction = Static; export declare const LeaderBindingSchema: Type.TUnion<[Type.TObject<{ id: Type.TString; path: Type.TArray; order: Type.TOptional; tone: Type.TOptional, Type.TLiteral<"exit">]>>; }>>; command: Type.TObject<{ name: Type.TString; args: Type.TOptional; }>; }>, Type.TObject<{ id: Type.TString; path: Type.TArray; order: Type.TOptional; tone: Type.TOptional, Type.TLiteral<"exit">]>>; }>>; action: Type.TObject<{ name: Type.TString; }>; }>]>; export type LeaderBinding = { id: string; path: readonly [LeaderSegment, ...LeaderSegment[]]; command: LeaderCommand; } | { id: string; path: readonly [LeaderSegment, ...LeaderSegment[]]; action: LeaderAction; }; export declare const LeaderSourceSchema: Type.TString; export declare const LeaderContributionSchema: Type.TObject<{ source: Type.TString; bindings: Type.TArray; order: Type.TOptional; tone: Type.TOptional, Type.TLiteral<"exit">]>>; }>>; command: Type.TObject<{ name: Type.TString; args: Type.TOptional; }>; }>, Type.TObject<{ id: Type.TString; path: Type.TArray; order: Type.TOptional; tone: Type.TOptional, Type.TLiteral<"exit">]>>; }>>; action: Type.TObject<{ name: Type.TString; }>; }>]>>; }>; export interface LeaderContribution { source: string; bindings: readonly LeaderBinding[]; } export interface DoomLeaderContributionHandle { update(bindings: readonly LeaderBinding[]): void; dispose(): void; } export interface DoomLeaderActionHandlerOptions { source: string; handlers: Readonly void | Promise>>; onError: (error: unknown, actionName: string, context: ExtensionContext) => void; } //#endregion //# sourceMappingURL=leader.d.mts.map