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.
Files changed (68) hide show
  1. package/README.md +17 -19
  2. package/dist/App.d.ts +2 -0
  3. package/dist/citadel.css +1 -1
  4. package/dist/citadel.es.js +825 -812
  5. package/dist/citadel.umd.js +30 -15
  6. package/dist/{src/components → components}/Citadel/Citadel.d.ts +1 -1
  7. package/dist/{src/components → components}/Citadel/config/CitadelConfigContext.d.ts +9 -5
  8. package/dist/components/Citadel/config/hooks.d.ts +4 -0
  9. package/dist/{src/components → components}/Citadel/hooks/useCommandParser.d.ts +1 -1
  10. package/dist/{src/components → components}/Citadel/types/command-registry.d.ts +5 -1
  11. package/dist/{src/components → components}/Citadel/types/command-results.d.ts +2 -2
  12. package/dist/{src/components → components}/Citadel/types/help-command.d.ts +1 -1
  13. package/dist/{src/components → components}/Citadel/utils/logger.d.ts +5 -5
  14. package/dist/index.d.ts +4 -2
  15. package/package.json +10 -3
  16. package/dist/command_examples/basic-commands.d.ts +0 -2
  17. package/dist/dist/styles.css +0 -789
  18. package/dist/src/App.d.ts +0 -4
  19. package/dist/src/components/Citadel/commands/history-commands.d.ts +0 -2
  20. package/dist/src/components/Citadel/hooks/__tests__/useCommandTrie.test.d.ts +0 -1
  21. package/dist/src/components/Citadel/hooks/useCommandTrie.d.ts +0 -2
  22. package/dist/src/components/Citadel/types/__tests__/command-trie.test.d.ts +0 -1
  23. package/dist/src/components/Citadel/types/command-context.d.ts +0 -4
  24. package/dist/src/components/Citadel/types/command-trie.d.ts +0 -84
  25. package/dist/src/components/Citadel/utils/keySimulation.d.ts +0 -2
  26. package/dist/src/index.d.ts +0 -3
  27. /package/dist/{src/__test-utils__ → __test-utils__}/factories.d.ts +0 -0
  28. /package/dist/{src/components → components}/Citadel/Cursor.d.ts +0 -0
  29. /package/dist/{src/components → components}/Citadel/__tests__/Citadel.test.d.ts +0 -0
  30. /package/dist/{src/components → components}/Citadel/components/AvailableCommands.d.ts +0 -0
  31. /package/dist/{src/components → components}/Citadel/components/CommandInput.d.ts +0 -0
  32. /package/dist/{src/components → components}/Citadel/components/CommandOutput.d.ts +0 -0
  33. /package/dist/{src/components → components}/Citadel/components/CommandOutputLine.d.ts +0 -0
  34. /package/dist/{src/components → components}/Citadel/components/Spinner.d.ts +0 -0
  35. /package/dist/{src/components → components}/Citadel/components/__tests__/AvailableCommands.test.d.ts +0 -0
  36. /package/dist/{src/components → components}/Citadel/components/__tests__/CommandInput.test.d.ts +0 -0
  37. /package/dist/{src/components → components}/Citadel/components/__tests__/CommandOutput.test.d.ts +0 -0
  38. /package/dist/{src/components → components}/Citadel/components/__tests__/CommandOutputLine.test.d.ts +0 -0
  39. /package/dist/{src/components → components}/Citadel/components/__tests__/Spinner.test.d.ts +0 -0
  40. /package/dist/{src/components → components}/Citadel/config/__tests__/CitadelConfigContext.test.d.ts +0 -0
  41. /package/dist/{src/components → components}/Citadel/config/defaults.d.ts +0 -0
  42. /package/dist/{src/components → components}/Citadel/config/types.d.ts +0 -0
  43. /package/dist/{src/components → components}/Citadel/hooks/__tests__/useCitadelState.test.d.ts +0 -0
  44. /package/dist/{src/components → components}/Citadel/hooks/__tests__/useCommandHistory.test.d.ts +0 -0
  45. /package/dist/{src/components → components}/Citadel/hooks/__tests__/useCommandParser.test.d.ts +0 -0
  46. /package/dist/{src/components → components}/Citadel/hooks/useCitadelState.d.ts +0 -0
  47. /package/dist/{src/components → components}/Citadel/hooks/useCommandHistory.d.ts +0 -0
  48. /package/dist/{src/components → components}/Citadel/hooks/useGlobalShortcut.d.ts +0 -0
  49. /package/dist/{src/components → components}/Citadel/hooks/useSegmentStack.d.ts +0 -0
  50. /package/dist/{src/components → components}/Citadel/hooks/useSegmentStackVersion.d.ts +0 -0
  51. /package/dist/{src/components → components}/Citadel/hooks/useSlideAnimation.d.ts +0 -0
  52. /package/dist/{src/components → components}/Citadel/index.d.ts +0 -0
  53. /package/dist/{src/components → components}/Citadel/services/HistoryService.d.ts +0 -0
  54. /package/dist/{src/components → components}/Citadel/storage/BaseStorage.d.ts +0 -0
  55. /package/dist/{src/components → components}/Citadel/storage/LocalStorage.d.ts +0 -0
  56. /package/dist/{src/components → components}/Citadel/storage/MemoryStorage.d.ts +0 -0
  57. /package/dist/{src/components → components}/Citadel/storage/StorageFactory.d.ts +0 -0
  58. /package/dist/{src/components → components}/Citadel/storage/__tests__/LocalStorage.test.d.ts +0 -0
  59. /package/dist/{src/components → components}/Citadel/storage/__tests__/MemoryStorage.test.d.ts +0 -0
  60. /package/dist/{src/components → components}/Citadel/types/__tests__/command-registry.test.d.ts +0 -0
  61. /package/dist/{src/components → components}/Citadel/types/__tests__/segment-stack.test.d.ts +0 -0
  62. /package/dist/{src/components → components}/Citadel/types/cursor.d.ts +0 -0
  63. /package/dist/{src/components → components}/Citadel/types/index.d.ts +0 -0
  64. /package/dist/{src/components → components}/Citadel/types/segment-stack.d.ts +0 -0
  65. /package/dist/{src/components → components}/Citadel/types/state.d.ts +0 -0
  66. /package/dist/{src/components → components}/Citadel/types/storage.d.ts +0 -0
  67. /package/dist/{src/main.d.ts → main.d.ts} +0 -0
  68. /package/dist/{src/test → test}/setup.d.ts +0 -0
package/dist/src/App.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { CitadelConfig } from './components/Citadel/config/types';
2
- export declare const config: CitadelConfig;
3
- declare function App(): import("react/jsx-runtime").JSX.Element;
4
- export default App;
@@ -1,2 +0,0 @@
1
- import { CommandNode } from '../types/command-trie';
2
- export declare function createHistoryCommands(): [string, CommandNode];
@@ -1,2 +0,0 @@
1
- import { CommandTrie } from '../types/command-trie';
2
- export declare const useCommandTrie: () => CommandTrie;
@@ -1,4 +0,0 @@
1
- import { HistoryService } from '../services/HistoryService';
2
- export interface CommandContext {
3
- history?: HistoryService;
4
- }
@@ -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
- }
@@ -1,2 +0,0 @@
1
- import { CitadelState, CitadelActions } from '../types/state';
2
- export declare const simulateKeyPress: (key: string, state: CitadelState, actions: CitadelActions) => void;
@@ -1,3 +0,0 @@
1
- export { Citadel } from './components/Citadel/Citadel';
2
- export type { CitadelConfig } from './components/Citadel/config/types';
3
- export * from './components/Citadel/types';
File without changes
File without changes