citadel_cli 1.1.0 → 1.1.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/README.md +17 -19
- package/dist/App.d.ts +2 -0
- package/dist/citadel.css +1 -1
- package/dist/citadel.es.js +825 -812
- package/dist/citadel.umd.js +30 -15
- package/dist/{src/components → components}/Citadel/Citadel.d.ts +1 -1
- package/dist/{src/components → components}/Citadel/config/CitadelConfigContext.d.ts +9 -5
- package/dist/components/Citadel/config/hooks.d.ts +4 -0
- package/dist/{src/components → components}/Citadel/hooks/useCommandParser.d.ts +1 -1
- package/dist/{src/components → components}/Citadel/types/command-registry.d.ts +5 -1
- package/dist/{src/components → components}/Citadel/types/command-results.d.ts +2 -2
- package/dist/{src/components → components}/Citadel/types/help-command.d.ts +1 -1
- package/dist/{src/components → components}/Citadel/utils/logger.d.ts +5 -5
- package/dist/index.d.ts +4 -2
- package/package.json +10 -3
- package/dist/command_examples/basic-commands.d.ts +0 -2
- package/dist/dist/styles.css +0 -789
- package/dist/src/App.d.ts +0 -4
- package/dist/src/components/Citadel/commands/history-commands.d.ts +0 -2
- package/dist/src/components/Citadel/hooks/__tests__/useCommandTrie.test.d.ts +0 -1
- package/dist/src/components/Citadel/hooks/useCommandTrie.d.ts +0 -2
- package/dist/src/components/Citadel/types/__tests__/command-trie.test.d.ts +0 -1
- package/dist/src/components/Citadel/types/command-context.d.ts +0 -4
- package/dist/src/components/Citadel/types/command-trie.d.ts +0 -84
- package/dist/src/components/Citadel/utils/keySimulation.d.ts +0 -2
- package/dist/src/index.d.ts +0 -3
- /package/dist/{src/__test-utils__ → __test-utils__}/factories.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/Cursor.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/__tests__/Citadel.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/components/AvailableCommands.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/components/CommandInput.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/components/CommandOutput.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/components/CommandOutputLine.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/components/Spinner.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/components/__tests__/AvailableCommands.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/components/__tests__/CommandInput.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/components/__tests__/CommandOutput.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/components/__tests__/CommandOutputLine.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/components/__tests__/Spinner.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/config/__tests__/CitadelConfigContext.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/config/defaults.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/config/types.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/hooks/__tests__/useCitadelState.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/hooks/__tests__/useCommandHistory.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/hooks/__tests__/useCommandParser.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/hooks/useCitadelState.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/hooks/useCommandHistory.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/hooks/useGlobalShortcut.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/hooks/useSegmentStack.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/hooks/useSegmentStackVersion.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/hooks/useSlideAnimation.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/index.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/services/HistoryService.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/storage/BaseStorage.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/storage/LocalStorage.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/storage/MemoryStorage.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/storage/StorageFactory.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/storage/__tests__/LocalStorage.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/storage/__tests__/MemoryStorage.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/types/__tests__/command-registry.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/types/__tests__/segment-stack.test.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/types/cursor.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/types/index.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/types/segment-stack.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/types/state.d.ts +0 -0
- /package/dist/{src/components → components}/Citadel/types/storage.d.ts +0 -0
- /package/dist/{src/main.d.ts → main.d.ts} +0 -0
- /package/dist/{src/test → test}/setup.d.ts +0 -0
package/dist/src/App.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { CommandResult } from './command-results';
|
|
2
|
-
/** Function type for handling command execution */
|
|
3
|
-
export type CommandHandler = (args: string[]) => Promise<CommandResult>;
|
|
4
|
-
/**
|
|
5
|
-
* A no-op handler that returns an empty string. Used as the default handler
|
|
6
|
-
* for CommandNodes that don't specify a handler.
|
|
7
|
-
*/
|
|
8
|
-
export declare const NoopHandler: CommandHandler;
|
|
9
|
-
/** Base interface for command segments */
|
|
10
|
-
export declare abstract class BaseSegment {
|
|
11
|
-
readonly type: 'word' | 'argument' | 'null';
|
|
12
|
-
readonly name: string;
|
|
13
|
-
readonly description?: string | undefined;
|
|
14
|
-
constructor(type: 'word' | 'argument' | 'null', name: string, description?: string | undefined);
|
|
15
|
-
toString(): string;
|
|
16
|
-
}
|
|
17
|
-
/** Represents a null segment for empty stack operations */
|
|
18
|
-
export declare class NullSegment extends BaseSegment {
|
|
19
|
-
constructor();
|
|
20
|
-
}
|
|
21
|
-
/** Represents a segment in a command path - either a word or argument */
|
|
22
|
-
export type CommandSegment = WordSegment | ArgumentSegment | NullSegment;
|
|
23
|
-
/** Represents a literal word in a command path */
|
|
24
|
-
export declare class WordSegment extends BaseSegment {
|
|
25
|
-
constructor(name: string, description?: string);
|
|
26
|
-
}
|
|
27
|
-
/** Represents an argument that can be passed to a command, and its value*/
|
|
28
|
-
export declare class ArgumentSegment extends BaseSegment {
|
|
29
|
-
value?: string | undefined;
|
|
30
|
-
readonly valid?: (() => boolean) | undefined;
|
|
31
|
-
constructor(name: string, description?: string, value?: string | undefined, valid?: (() => boolean) | undefined);
|
|
32
|
-
}
|
|
33
|
-
/** Defines a complete command with its path and behavior */
|
|
34
|
-
export declare class CommandNode {
|
|
35
|
-
private readonly _segments;
|
|
36
|
-
private readonly _description?;
|
|
37
|
-
private readonly _handler;
|
|
38
|
-
constructor(segments: CommandSegment[], description?: string, handler?: CommandHandler);
|
|
39
|
-
get segments(): CommandSegment[];
|
|
40
|
-
get description(): string | undefined;
|
|
41
|
-
get handler(): CommandHandler;
|
|
42
|
-
get hasArguments(): boolean;
|
|
43
|
-
get fullPath(): string[];
|
|
44
|
-
get fullPath_s(): string;
|
|
45
|
-
equals(other: CommandNode): boolean;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Used to store user-defined commands.
|
|
49
|
-
*/
|
|
50
|
-
export declare class CommandRegistry {
|
|
51
|
-
private _commands;
|
|
52
|
-
get commands(): CommandNode[];
|
|
53
|
-
/**
|
|
54
|
-
* Adds a new command to the trie.
|
|
55
|
-
*
|
|
56
|
-
* @param newCommandNode The new command to add
|
|
57
|
-
* @throws {Error} If attempting to add a duplicate leaf command or a subcommand to a leaf
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
addCommand(segments: CommandSegment[], description: string, handler?: CommandHandler): void;
|
|
61
|
-
/**
|
|
62
|
-
* Retrieves a command from the trie.
|
|
63
|
-
*
|
|
64
|
-
* @param path The path of the command.
|
|
65
|
-
* @returns The command node or undefined if not found.
|
|
66
|
-
*/
|
|
67
|
-
getCommand(path: string[]): CommandNode | undefined;
|
|
68
|
-
commandExistsForPath(path: string[]): boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Gets possible matches for a given path.
|
|
71
|
-
*
|
|
72
|
-
* @param path The path to get completions for.
|
|
73
|
-
* @returns An array of completion strings.
|
|
74
|
-
*/
|
|
75
|
-
getCompletions_s(path: string[]): string[];
|
|
76
|
-
/**
|
|
77
|
-
* Gets an array of segments reachable from a given path
|
|
78
|
-
*
|
|
79
|
-
* @param path The path to get completions for.
|
|
80
|
-
* @returns An array of completion strings.
|
|
81
|
-
*/
|
|
82
|
-
getCompletions(path: string[]): CommandSegment[];
|
|
83
|
-
hasNextSegment(path: string[]): boolean;
|
|
84
|
-
}
|
package/dist/src/index.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{src/components → components}/Citadel/components/__tests__/AvailableCommands.test.d.ts
RENAMED
|
File without changes
|
/package/dist/{src/components → components}/Citadel/components/__tests__/CommandInput.test.d.ts
RENAMED
|
File without changes
|
/package/dist/{src/components → components}/Citadel/components/__tests__/CommandOutput.test.d.ts
RENAMED
|
File without changes
|
/package/dist/{src/components → components}/Citadel/components/__tests__/CommandOutputLine.test.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/{src/components → components}/Citadel/config/__tests__/CitadelConfigContext.test.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{src/components → components}/Citadel/hooks/__tests__/useCitadelState.test.d.ts
RENAMED
|
File without changes
|
/package/dist/{src/components → components}/Citadel/hooks/__tests__/useCommandHistory.test.d.ts
RENAMED
|
File without changes
|
/package/dist/{src/components → components}/Citadel/hooks/__tests__/useCommandParser.test.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{src/components → components}/Citadel/storage/__tests__/LocalStorage.test.d.ts
RENAMED
|
File without changes
|
/package/dist/{src/components → components}/Citadel/storage/__tests__/MemoryStorage.test.d.ts
RENAMED
|
File without changes
|
/package/dist/{src/components → components}/Citadel/types/__tests__/command-registry.test.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|