@principal-ade/panel-layouts 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +98 -1
- package/dist/index.esm.js +960 -669
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -55,6 +55,14 @@ export declare interface AgentCommandInputProps {
|
|
|
55
55
|
autoFocus?: boolean;
|
|
56
56
|
/** Whether an AI agent is available */
|
|
57
57
|
agentAvailable?: boolean;
|
|
58
|
+
/** Whether autocomplete dropdown is visible */
|
|
59
|
+
showAutocomplete?: boolean;
|
|
60
|
+
/** Navigate to next autocomplete item (Down arrow when autocomplete open) */
|
|
61
|
+
onAutocompleteNext?: () => void;
|
|
62
|
+
/** Navigate to previous autocomplete item (Up arrow when autocomplete open) */
|
|
63
|
+
onAutocompletePrevious?: () => void;
|
|
64
|
+
/** Accept selected autocomplete item (Tab key) */
|
|
65
|
+
onAutocompleteAccept?: () => void;
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
/**
|
|
@@ -247,6 +255,15 @@ export declare interface FocusIndicatorProps {
|
|
|
247
255
|
*/
|
|
248
256
|
export declare const focusPanelTool: PanelTool;
|
|
249
257
|
|
|
258
|
+
/**
|
|
259
|
+
* Fuzzy match a query against a target string.
|
|
260
|
+
* Returns score and matched indices, or null if no match.
|
|
261
|
+
*/
|
|
262
|
+
export declare function fuzzyMatch(query: string, target: string): {
|
|
263
|
+
score: number;
|
|
264
|
+
matchedIndices: number[];
|
|
265
|
+
} | null;
|
|
266
|
+
|
|
250
267
|
/**
|
|
251
268
|
* Gemini function declaration format
|
|
252
269
|
*/
|
|
@@ -645,6 +662,66 @@ export declare interface PersistenceAdapter {
|
|
|
645
662
|
}): Promise<void>;
|
|
646
663
|
}
|
|
647
664
|
|
|
665
|
+
/**
|
|
666
|
+
* Definition of a quick command for autocomplete
|
|
667
|
+
*/
|
|
668
|
+
export declare interface QuickCommand {
|
|
669
|
+
/** Command name without the leading slash (e.g., "toggle") */
|
|
670
|
+
name: string;
|
|
671
|
+
/** Human-readable description */
|
|
672
|
+
description: string;
|
|
673
|
+
/** Argument definitions */
|
|
674
|
+
args?: QuickCommandArg[];
|
|
675
|
+
/** Aliases that also match this command (e.g., ["t"] for toggle) */
|
|
676
|
+
aliases?: string[];
|
|
677
|
+
/** Category for grouping in UI */
|
|
678
|
+
category?: string;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Argument definition for a quick command
|
|
683
|
+
*/
|
|
684
|
+
export declare interface QuickCommandArg {
|
|
685
|
+
/** Argument name (for display) */
|
|
686
|
+
name: string;
|
|
687
|
+
/** Description of the argument */
|
|
688
|
+
description?: string;
|
|
689
|
+
/** Whether this argument is required */
|
|
690
|
+
required?: boolean;
|
|
691
|
+
/** Allowed values (for enum-style args) */
|
|
692
|
+
options?: string[];
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* QuickCommandAutocomplete - Dropdown showing fuzzy-matched quick commands
|
|
697
|
+
*/
|
|
698
|
+
export declare const QuickCommandAutocomplete: default_2.FC<QuickCommandAutocompleteProps>;
|
|
699
|
+
|
|
700
|
+
export declare interface QuickCommandAutocompleteProps {
|
|
701
|
+
/** Matched commands to display */
|
|
702
|
+
matches: QuickCommandMatch[];
|
|
703
|
+
/** Currently selected index */
|
|
704
|
+
selectedIndex: number;
|
|
705
|
+
/** Called when a command is clicked */
|
|
706
|
+
onSelect: (index: number) => void;
|
|
707
|
+
/** Maximum number of visible items before scrolling */
|
|
708
|
+
maxVisible?: number;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* A quick command match result from fuzzy search
|
|
713
|
+
*/
|
|
714
|
+
export declare interface QuickCommandMatch {
|
|
715
|
+
/** The matched command */
|
|
716
|
+
command: QuickCommand;
|
|
717
|
+
/** Match score (higher = better match) */
|
|
718
|
+
score: number;
|
|
719
|
+
/** Which parts of the name matched (for highlighting) */
|
|
720
|
+
matchedIndices: number[];
|
|
721
|
+
/** The specific variant matched (name or alias) */
|
|
722
|
+
matchedOn: string;
|
|
723
|
+
}
|
|
724
|
+
|
|
648
725
|
/**
|
|
649
726
|
* Repository-specific workspace state
|
|
650
727
|
* Tracks which workspace is active and current panel configuration for a repository
|
|
@@ -684,6 +761,12 @@ export { ResponsiveConfigurablePanelLayout }
|
|
|
684
761
|
|
|
685
762
|
export { ResponsiveConfigurablePanelLayoutProps }
|
|
686
763
|
|
|
764
|
+
/**
|
|
765
|
+
* Search quick commands using fuzzy matching.
|
|
766
|
+
* Returns sorted matches with scores.
|
|
767
|
+
*/
|
|
768
|
+
export declare function searchQuickCommands(query: string, commands: QuickCommand[], maxResults?: number): QuickCommandMatch[];
|
|
769
|
+
|
|
687
770
|
/**
|
|
688
771
|
* State query tools only (for selective registration).
|
|
689
772
|
*/
|
|
@@ -847,7 +930,7 @@ export declare interface UpdateWorkspaceOptions {
|
|
|
847
930
|
* Hook for managing Agent Command Palette state and behavior
|
|
848
931
|
* Handles input, history navigation, tool execution tracking, and keyboard shortcuts
|
|
849
932
|
*/
|
|
850
|
-
export declare function useAgentCommandPalette({ events, keyboard, config, onExecuteTool, initialSuggestions, agentAvailable, }?: UseAgentCommandPaletteOptions): UseAgentCommandPaletteReturn;
|
|
933
|
+
export declare function useAgentCommandPalette({ events, keyboard, config, onExecuteTool, initialSuggestions, agentAvailable, quickCommands, }?: UseAgentCommandPaletteOptions): UseAgentCommandPaletteReturn;
|
|
851
934
|
|
|
852
935
|
/**
|
|
853
936
|
* Options for the useAgentCommandPalette hook
|
|
@@ -865,6 +948,8 @@ export declare interface UseAgentCommandPaletteOptions {
|
|
|
865
948
|
initialSuggestions?: string[];
|
|
866
949
|
/** Whether an AI agent is available (defaults to true). When false, only quick commands work. */
|
|
867
950
|
agentAvailable?: boolean;
|
|
951
|
+
/** Quick commands available for autocomplete */
|
|
952
|
+
quickCommands?: QuickCommand[];
|
|
868
953
|
}
|
|
869
954
|
|
|
870
955
|
/**
|
|
@@ -917,6 +1002,18 @@ export declare interface UseAgentCommandPaletteReturn {
|
|
|
917
1002
|
suggestions: string[];
|
|
918
1003
|
/** Clear the current state (query, tools, response) */
|
|
919
1004
|
clear: () => void;
|
|
1005
|
+
/** Filtered quick command matches based on current query */
|
|
1006
|
+
quickCommandMatches: QuickCommandMatch[];
|
|
1007
|
+
/** Currently selected autocomplete index (-1 = none) */
|
|
1008
|
+
selectedAutocompleteIndex: number;
|
|
1009
|
+
/** Select next autocomplete item */
|
|
1010
|
+
autocompleteNext: () => void;
|
|
1011
|
+
/** Select previous autocomplete item */
|
|
1012
|
+
autocompletePrevious: () => void;
|
|
1013
|
+
/** Accept the currently selected autocomplete item */
|
|
1014
|
+
autocompleteAccept: () => void;
|
|
1015
|
+
/** Whether autocomplete dropdown should be shown */
|
|
1016
|
+
showAutocomplete: boolean;
|
|
920
1017
|
}
|
|
921
1018
|
|
|
922
1019
|
/**
|