@deepseek-harness-tui/dsh-tui 0.5.0
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/LICENSE +21 -0
- package/README.md +235 -0
- package/bin/dsh-tui.js +95 -0
- package/cordis.patch.yml +218 -0
- package/cordis.yml +185 -0
- package/lib/invariant.js +28 -0
- package/lib/types/activityPrefs.d.ts +29 -0
- package/lib/types/activityPrefs.d.ts.map +1 -0
- package/lib/types/activityPrefs.js +60 -0
- package/lib/types/bootstrap/state.d.ts +13 -0
- package/lib/types/bootstrap/state.d.ts.map +1 -0
- package/lib/types/bootstrap/state.js +12 -0
- package/lib/types/cc/cliHighlight.d.ts +20 -0
- package/lib/types/cc/cliHighlight.d.ts.map +1 -0
- package/lib/types/cc/cliHighlight.js +53 -0
- package/lib/types/cc/figures.d.ts +59 -0
- package/lib/types/cc/figures.d.ts.map +1 -0
- package/lib/types/cc/figures.js +69 -0
- package/lib/types/cc/format.d.ts +26 -0
- package/lib/types/cc/format.d.ts.map +1 -0
- package/lib/types/cc/format.js +55 -0
- package/lib/types/cc/hash.d.ts +25 -0
- package/lib/types/cc/hash.d.ts.map +1 -0
- package/lib/types/cc/hash.js +41 -0
- package/lib/types/cc/hyperlink.d.ts +21 -0
- package/lib/types/cc/hyperlink.d.ts.map +1 -0
- package/lib/types/cc/hyperlink.js +31 -0
- package/lib/types/cc/markdown.d.ts +43 -0
- package/lib/types/cc/markdown.d.ts.map +1 -0
- package/lib/types/cc/markdown.js +345 -0
- package/lib/types/cc/spinnerVerbs.d.ts +3 -0
- package/lib/types/cc/spinnerVerbs.d.ts.map +1 -0
- package/lib/types/cc/spinnerVerbs.js +190 -0
- package/lib/types/cc/terminal.d.ts +15 -0
- package/lib/types/cc/terminal.d.ts.map +1 -0
- package/lib/types/cc/terminal.js +84 -0
- package/lib/types/channel.d.ts +672 -0
- package/lib/types/channel.d.ts.map +1 -0
- package/lib/types/channel.js +2427 -0
- package/lib/types/childStderr.d.ts +63 -0
- package/lib/types/childStderr.d.ts.map +1 -0
- package/lib/types/childStderr.js +161 -0
- package/lib/types/commands.d.ts +55 -0
- package/lib/types/commands.d.ts.map +1 -0
- package/lib/types/commands.js +101 -0
- package/lib/types/components/ActivityLine.d.ts +29 -0
- package/lib/types/components/ActivityLine.d.ts.map +1 -0
- package/lib/types/components/ActivityLine.js +47 -0
- package/lib/types/components/ActivityPicker.d.ts +13 -0
- package/lib/types/components/ActivityPicker.d.ts.map +1 -0
- package/lib/types/components/ActivityPicker.js +24 -0
- package/lib/types/components/CommandSuggestions.d.ts +14 -0
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -0
- package/lib/types/components/CommandSuggestions.js +33 -0
- package/lib/types/components/FileSuggestions.d.ts +12 -0
- package/lib/types/components/FileSuggestions.d.ts.map +1 -0
- package/lib/types/components/FileSuggestions.js +26 -0
- package/lib/types/components/GoalTodoPanel.d.ts +13 -0
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -0
- package/lib/types/components/GoalTodoPanel.js +57 -0
- package/lib/types/components/HelpMenu.d.ts +12 -0
- package/lib/types/components/HelpMenu.d.ts.map +1 -0
- package/lib/types/components/HelpMenu.js +12 -0
- package/lib/types/components/HistorySearchDialog.d.ts +16 -0
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -0
- package/lib/types/components/HistorySearchDialog.js +31 -0
- package/lib/types/components/InterruptedByUser.d.ts +7 -0
- package/lib/types/components/InterruptedByUser.d.ts.map +1 -0
- package/lib/types/components/InterruptedByUser.js +9 -0
- package/lib/types/components/LoadedContextPanel.d.ts +20 -0
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -0
- package/lib/types/components/LoadedContextPanel.js +30 -0
- package/lib/types/components/LogoV2.d.ts +23 -0
- package/lib/types/components/LogoV2.d.ts.map +1 -0
- package/lib/types/components/LogoV2.js +95 -0
- package/lib/types/components/Markdown.d.ts +24 -0
- package/lib/types/components/Markdown.d.ts.map +1 -0
- package/lib/types/components/Markdown.js +106 -0
- package/lib/types/components/MarkdownTable.d.ts +17 -0
- package/lib/types/components/MarkdownTable.d.ts.map +1 -0
- package/lib/types/components/MarkdownTable.js +272 -0
- package/lib/types/components/MessageList.d.ts +41 -0
- package/lib/types/components/MessageList.d.ts.map +1 -0
- package/lib/types/components/MessageList.js +303 -0
- package/lib/types/components/ModelPicker.d.ts +14 -0
- package/lib/types/components/ModelPicker.d.ts.map +1 -0
- package/lib/types/components/ModelPicker.js +15 -0
- package/lib/types/components/PresetPicker.d.ts +17 -0
- package/lib/types/components/PresetPicker.d.ts.map +1 -0
- package/lib/types/components/PresetPicker.js +25 -0
- package/lib/types/components/PromptInput.d.ts +67 -0
- package/lib/types/components/PromptInput.d.ts.map +1 -0
- package/lib/types/components/PromptInput.js +778 -0
- package/lib/types/components/ResumePicker.d.ts +15 -0
- package/lib/types/components/ResumePicker.d.ts.map +1 -0
- package/lib/types/components/ResumePicker.js +34 -0
- package/lib/types/components/RewindPicker.d.ts +14 -0
- package/lib/types/components/RewindPicker.d.ts.map +1 -0
- package/lib/types/components/RewindPicker.js +23 -0
- package/lib/types/components/SearchBox.d.ts +20 -0
- package/lib/types/components/SearchBox.d.ts.map +1 -0
- package/lib/types/components/SearchBox.js +33 -0
- package/lib/types/components/Select.d.ts +22 -0
- package/lib/types/components/Select.d.ts.map +1 -0
- package/lib/types/components/Select.js +19 -0
- package/lib/types/components/Spinner/GlimmerMessage.d.ts +19 -0
- package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -0
- package/lib/types/components/Spinner/GlimmerMessage.js +78 -0
- package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +31 -0
- package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts.map +1 -0
- package/lib/types/components/Spinner/SpinnerAnimationRow.js +162 -0
- package/lib/types/components/Spinner/SpinnerGlyph.d.ts +16 -0
- package/lib/types/components/Spinner/SpinnerGlyph.d.ts.map +1 -0
- package/lib/types/components/Spinner/SpinnerGlyph.js +36 -0
- package/lib/types/components/Spinner/spinnerMode.d.ts +6 -0
- package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -0
- package/lib/types/components/Spinner/spinnerMode.js +1 -0
- package/lib/types/components/Spinner/spinnerUtils.d.ts +41 -0
- package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -0
- package/lib/types/components/Spinner/spinnerUtils.js +104 -0
- package/lib/types/components/Spinner/useStalledAnimation.d.ts +16 -0
- package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -0
- package/lib/types/components/Spinner/useStalledAnimation.js +71 -0
- package/lib/types/components/StreamingMarkdown.d.ts +12 -0
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -0
- package/lib/types/components/StreamingMarkdown.js +39 -0
- package/lib/types/components/ThemePicker.d.ts +22 -0
- package/lib/types/components/ThemePicker.d.ts.map +1 -0
- package/lib/types/components/ThemePicker.js +51 -0
- package/lib/types/components/ThinkingToggle.d.ts +17 -0
- package/lib/types/components/ThinkingToggle.d.ts.map +1 -0
- package/lib/types/components/ThinkingToggle.js +30 -0
- package/lib/types/components/ToolUseLoader.d.ts +13 -0
- package/lib/types/components/ToolUseLoader.d.ts.map +1 -0
- package/lib/types/components/ToolUseLoader.js +17 -0
- package/lib/types/components/Whale.d.ts +22 -0
- package/lib/types/components/Whale.d.ts.map +1 -0
- package/lib/types/components/Whale.js +78 -0
- package/lib/types/components/WorkingSpinner.d.ts +26 -0
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -0
- package/lib/types/components/WorkingSpinner.js +68 -0
- package/lib/types/components/activityFrames.d.ts +31 -0
- package/lib/types/components/activityFrames.d.ts.map +1 -0
- package/lib/types/components/activityFrames.js +83 -0
- package/lib/types/components/bigfont.d.ts +28 -0
- package/lib/types/components/bigfont.d.ts.map +1 -0
- package/lib/types/components/bigfont.js +91 -0
- package/lib/types/components/design-system/Byline.d.ts +14 -0
- package/lib/types/components/design-system/Byline.d.ts.map +1 -0
- package/lib/types/components/design-system/Byline.js +17 -0
- package/lib/types/components/design-system/Divider.d.ts +40 -0
- package/lib/types/components/design-system/Divider.d.ts.map +1 -0
- package/lib/types/components/design-system/Divider.js +24 -0
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +19 -0
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts.map +1 -0
- package/lib/types/components/design-system/KeyboardShortcutHint.js +14 -0
- package/lib/types/components/design-system/ListItem.d.ts +36 -0
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -0
- package/lib/types/components/design-system/ListItem.js +48 -0
- package/lib/types/components/design-system/LoadingState.d.ts +19 -0
- package/lib/types/components/design-system/LoadingState.d.ts.map +1 -0
- package/lib/types/components/design-system/LoadingState.js +22 -0
- package/lib/types/components/design-system/Pane.d.ts +17 -0
- package/lib/types/components/design-system/Pane.d.ts.map +1 -0
- package/lib/types/components/design-system/Pane.js +15 -0
- package/lib/types/components/design-system/ProgressBar.d.ts +22 -0
- package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -0
- package/lib/types/components/design-system/ProgressBar.js +27 -0
- package/lib/types/components/design-system/StatusIcon.d.ts +15 -0
- package/lib/types/components/design-system/StatusIcon.d.ts.map +1 -0
- package/lib/types/components/design-system/StatusIcon.js +20 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts +11 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -0
- package/lib/types/components/design-system/ThemeProvider.js +135 -0
- package/lib/types/components/design-system/ThemedBox.d.ts +37 -0
- package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -0
- package/lib/types/components/design-system/ThemedBox.js +26 -0
- package/lib/types/components/design-system/ThemedText.d.ts +56 -0
- package/lib/types/components/design-system/ThemedText.d.ts.map +1 -0
- package/lib/types/components/design-system/ThemedText.js +45 -0
- package/lib/types/components/messages/AssistantTextMessage.d.ts +18 -0
- package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -0
- package/lib/types/components/messages/AssistantTextMessage.js +15 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +23 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -0
- package/lib/types/components/messages/AssistantThinkingMessage.js +23 -0
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +23 -0
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -0
- package/lib/types/components/messages/AssistantToolUseMessage.js +220 -0
- package/lib/types/components/messages/MessageMetadata.d.ts +15 -0
- package/lib/types/components/messages/MessageMetadata.d.ts.map +1 -0
- package/lib/types/components/messages/MessageMetadata.js +20 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts +19 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -0
- package/lib/types/components/messages/UserPromptMessage.js +15 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +39 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -0
- package/lib/types/components/questions/AskUserQuestionPanel.js +228 -0
- package/lib/types/components/shimmer.d.ts +35 -0
- package/lib/types/components/shimmer.d.ts.map +1 -0
- package/lib/types/components/shimmer.js +43 -0
- package/lib/types/components/whaleFrames.d.ts +25 -0
- package/lib/types/components/whaleFrames.d.ts.map +1 -0
- package/lib/types/components/whaleFrames.js +419 -0
- package/lib/types/customTheme.d.ts +104 -0
- package/lib/types/customTheme.d.ts.map +1 -0
- package/lib/types/customTheme.js +268 -0
- package/lib/types/effortPrefs.d.ts +22 -0
- package/lib/types/effortPrefs.d.ts.map +1 -0
- package/lib/types/effortPrefs.js +45 -0
- package/lib/types/history.d.ts +24 -0
- package/lib/types/history.d.ts.map +1 -0
- package/lib/types/history.js +75 -0
- package/lib/types/hooks/useBlink.d.ts +11 -0
- package/lib/types/hooks/useBlink.d.ts.map +1 -0
- package/lib/types/hooks/useBlink.js +20 -0
- package/lib/types/i18n.d.ts +926 -0
- package/lib/types/i18n.d.ts.map +1 -0
- package/lib/types/i18n.js +356 -0
- package/lib/types/index.d.ts +70 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +31 -0
- package/lib/types/ink/Ansi.d.ts +11 -0
- package/lib/types/ink/Ansi.d.ts.map +1 -0
- package/lib/types/ink/Ansi.js +269 -0
- package/lib/types/ink/bidi.d.ts +18 -0
- package/lib/types/ink/bidi.d.ts.map +1 -0
- package/lib/types/ink/bidi.js +119 -0
- package/lib/types/ink/clearTerminal.d.ts +22 -0
- package/lib/types/ink/clearTerminal.d.ts.map +1 -0
- package/lib/types/ink/clearTerminal.js +72 -0
- package/lib/types/ink/colorize.d.ts +33 -0
- package/lib/types/ink/colorize.d.ts.map +1 -0
- package/lib/types/ink/colorize.js +213 -0
- package/lib/types/ink/components/AlternateScreen.d.ts +22 -0
- package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -0
- package/lib/types/ink/components/AlternateScreen.js +74 -0
- package/lib/types/ink/components/App.d.ts +73 -0
- package/lib/types/ink/components/App.d.ts.map +1 -0
- package/lib/types/ink/components/App.js +597 -0
- package/lib/types/ink/components/AppContext.d.ts +15 -0
- package/lib/types/ink/components/AppContext.d.ts.map +1 -0
- package/lib/types/ink/components/AppContext.js +11 -0
- package/lib/types/ink/components/Box.d.ts +49 -0
- package/lib/types/ink/components/Box.d.ts.map +1 -0
- package/lib/types/ink/components/Box.js +153 -0
- package/lib/types/ink/components/Button.d.ts +37 -0
- package/lib/types/ink/components/Button.d.ts.map +1 -0
- package/lib/types/ink/components/Button.js +166 -0
- package/lib/types/ink/components/ClockContext.d.ts +10 -0
- package/lib/types/ink/components/ClockContext.d.ts.map +1 -0
- package/lib/types/ink/components/ClockContext.js +108 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts +30 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -0
- package/lib/types/ink/components/CursorDeclarationContext.js +6 -0
- package/lib/types/ink/components/ErrorOverview.d.ts +7 -0
- package/lib/types/ink/components/ErrorOverview.d.ts.map +1 -0
- package/lib/types/ink/components/ErrorOverview.js +49 -0
- package/lib/types/ink/components/Link.d.ts +8 -0
- package/lib/types/ink/components/Link.d.ts.map +1 -0
- package/lib/types/ink/components/Link.js +33 -0
- package/lib/types/ink/components/Newline.d.ts +13 -0
- package/lib/types/ink/components/Newline.d.ts.map +1 -0
- package/lib/types/ink/components/Newline.js +29 -0
- package/lib/types/ink/components/NoSelect.d.ts +20 -0
- package/lib/types/ink/components/NoSelect.d.ts.map +1 -0
- package/lib/types/ink/components/NoSelect.js +56 -0
- package/lib/types/ink/components/RawAnsi.d.ts +17 -0
- package/lib/types/ink/components/RawAnsi.d.ts.map +1 -0
- package/lib/types/ink/components/RawAnsi.js +45 -0
- package/lib/types/ink/components/ScrollBox.d.ts +78 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -0
- package/lib/types/ink/components/ScrollBox.js +174 -0
- package/lib/types/ink/components/Spacer.d.ts +6 -0
- package/lib/types/ink/components/Spacer.d.ts.map +1 -0
- package/lib/types/ink/components/Spacer.js +19 -0
- package/lib/types/ink/components/StdinContext.d.ts +32 -0
- package/lib/types/ink/components/StdinContext.d.ts.map +1 -0
- package/lib/types/ink/components/StdinContext.js +16 -0
- package/lib/types/ink/components/TerminalFocusContext.d.ts +11 -0
- package/lib/types/ink/components/TerminalFocusContext.d.ts.map +1 -0
- package/lib/types/ink/components/TerminalFocusContext.js +45 -0
- package/lib/types/ink/components/TerminalSizeContext.d.ts +6 -0
- package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -0
- package/lib/types/ink/components/TerminalSizeContext.js +3 -0
- package/lib/types/ink/components/Text.d.ts +56 -0
- package/lib/types/ink/components/Text.d.ts.map +1 -0
- package/lib/types/ink/components/Text.js +194 -0
- package/lib/types/ink/constants.d.ts +3 -0
- package/lib/types/ink/constants.d.ts.map +1 -0
- package/lib/types/ink/constants.js +2 -0
- package/lib/types/ink/cursor.d.ts +11 -0
- package/lib/types/ink/cursor.d.ts.map +1 -0
- package/lib/types/ink/cursor.js +1 -0
- package/lib/types/ink/devtools.d.ts +7 -0
- package/lib/types/ink/devtools.d.ts.map +1 -0
- package/lib/types/ink/devtools.js +1 -0
- package/lib/types/ink/dom.d.ts +178 -0
- package/lib/types/ink/dom.d.ts.map +1 -0
- package/lib/types/ink/dom.js +424 -0
- package/lib/types/ink/events/click-event.d.ts +32 -0
- package/lib/types/ink/events/click-event.d.ts.map +1 -0
- package/lib/types/ink/events/click-event.js +36 -0
- package/lib/types/ink/events/dispatcher.d.ts +63 -0
- package/lib/types/ink/events/dispatcher.d.ts.map +1 -0
- package/lib/types/ink/events/dispatcher.js +194 -0
- package/lib/types/ink/events/emitter.d.ts +20 -0
- package/lib/types/ink/events/emitter.d.ts.map +1 -0
- package/lib/types/ink/events/emitter.js +43 -0
- package/lib/types/ink/events/event-handlers.d.ts +47 -0
- package/lib/types/ink/events/event-handlers.d.ts.map +1 -0
- package/lib/types/ink/events/event-handlers.js +30 -0
- package/lib/types/ink/events/event.d.ts +19 -0
- package/lib/types/ink/events/event.d.ts.map +1 -0
- package/lib/types/ink/events/event.js +22 -0
- package/lib/types/ink/events/focus-event.d.ts +19 -0
- package/lib/types/ink/events/focus-event.d.ts.map +1 -0
- package/lib/types/ink/events/focus-event.js +21 -0
- package/lib/types/ink/events/input-event.d.ts +53 -0
- package/lib/types/ink/events/input-event.d.ts.map +1 -0
- package/lib/types/ink/events/input-event.js +180 -0
- package/lib/types/ink/events/keyboard-event.d.ts +40 -0
- package/lib/types/ink/events/keyboard-event.d.ts.map +1 -0
- package/lib/types/ink/events/keyboard-event.js +65 -0
- package/lib/types/ink/events/paste-event.d.ts +11 -0
- package/lib/types/ink/events/paste-event.d.ts.map +1 -0
- package/lib/types/ink/events/paste-event.js +13 -0
- package/lib/types/ink/events/resize-event.d.ts +13 -0
- package/lib/types/ink/events/resize-event.d.ts.map +1 -0
- package/lib/types/ink/events/resize-event.js +16 -0
- package/lib/types/ink/events/terminal-event.d.ts +112 -0
- package/lib/types/ink/events/terminal-event.d.ts.map +1 -0
- package/lib/types/ink/events/terminal-event.js +131 -0
- package/lib/types/ink/events/terminal-focus-event.d.ts +21 -0
- package/lib/types/ink/events/terminal-focus-event.d.ts.map +1 -0
- package/lib/types/ink/events/terminal-focus-event.js +18 -0
- package/lib/types/ink/focus.d.ts +74 -0
- package/lib/types/ink/focus.d.ts.map +1 -0
- package/lib/types/ink/focus.js +188 -0
- package/lib/types/ink/frame.d.ts +119 -0
- package/lib/types/ink/frame.d.ts.map +1 -0
- package/lib/types/ink/frame.js +43 -0
- package/lib/types/ink/get-max-width.d.ts +20 -0
- package/lib/types/ink/get-max-width.d.ts.map +1 -0
- package/lib/types/ink/get-max-width.js +25 -0
- package/lib/types/ink/hit-test.d.ts +47 -0
- package/lib/types/ink/hit-test.d.ts.map +1 -0
- package/lib/types/ink/hit-test.js +126 -0
- package/lib/types/ink/hooks/use-animation-frame.d.ts +27 -0
- package/lib/types/ink/hooks/use-animation-frame.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-animation-frame.js +48 -0
- package/lib/types/ink/hooks/use-app.d.ts +8 -0
- package/lib/types/ink/hooks/use-app.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-app.js +8 -0
- package/lib/types/ink/hooks/use-copy-on-select.d.ts +22 -0
- package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-copy-on-select.js +40 -0
- package/lib/types/ink/hooks/use-declared-cursor.d.ts +31 -0
- package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-declared-cursor.js +65 -0
- package/lib/types/ink/hooks/use-input.d.ts +41 -0
- package/lib/types/ink/hooks/use-input.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-input.js +73 -0
- package/lib/types/ink/hooks/use-interval.d.ts +23 -0
- package/lib/types/ink/hooks/use-interval.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-interval.js +58 -0
- package/lib/types/ink/hooks/use-search-highlight.d.ts +34 -0
- package/lib/types/ink/hooks/use-search-highlight.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-search-highlight.js +35 -0
- package/lib/types/ink/hooks/use-selection.d.ts +44 -0
- package/lib/types/ink/hooks/use-selection.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-selection.js +64 -0
- package/lib/types/ink/hooks/use-stdin.d.ts +8 -0
- package/lib/types/ink/hooks/use-stdin.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-stdin.js +8 -0
- package/lib/types/ink/hooks/use-tab-status.d.ts +18 -0
- package/lib/types/ink/hooks/use-tab-status.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-tab-status.js +58 -0
- package/lib/types/ink/hooks/use-terminal-focus.d.ts +11 -0
- package/lib/types/ink/hooks/use-terminal-focus.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-focus.js +15 -0
- package/lib/types/ink/hooks/use-terminal-size.d.ts +6 -0
- package/lib/types/ink/hooks/use-terminal-size.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-size.js +12 -0
- package/lib/types/ink/hooks/use-terminal-title.d.ts +14 -0
- package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-title.js +30 -0
- package/lib/types/ink/hooks/use-terminal-viewport.d.ts +32 -0
- package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-viewport.js +79 -0
- package/lib/types/ink/ink.d.ts +370 -0
- package/lib/types/ink/ink.d.ts.map +1 -0
- package/lib/types/ink/ink.js +1665 -0
- package/lib/types/ink/instances.d.ts +10 -0
- package/lib/types/ink/instances.d.ts.map +1 -0
- package/lib/types/ink/instances.js +13 -0
- package/lib/types/ink/layout/engine.d.ts +7 -0
- package/lib/types/ink/layout/engine.d.ts.map +1 -0
- package/lib/types/ink/layout/engine.js +8 -0
- package/lib/types/ink/layout/geometry.d.ts +86 -0
- package/lib/types/ink/layout/geometry.d.ts.map +1 -0
- package/lib/types/ink/layout/geometry.js +95 -0
- package/lib/types/ink/layout/node.d.ts +151 -0
- package/lib/types/ink/layout/node.d.ts.map +1 -0
- package/lib/types/ink/layout/node.js +72 -0
- package/lib/types/ink/layout/yoga.d.ts +69 -0
- package/lib/types/ink/layout/yoga.d.ts.map +1 -0
- package/lib/types/ink/layout/yoga.js +249 -0
- package/lib/types/ink/line-width-cache.d.ts +9 -0
- package/lib/types/ink/line-width-cache.d.ts.map +1 -0
- package/lib/types/ink/line-width-cache.js +45 -0
- package/lib/types/ink/log-update.d.ts +57 -0
- package/lib/types/ink/log-update.d.ts.map +1 -0
- package/lib/types/ink/log-update.js +710 -0
- package/lib/types/ink/measure-element.d.ts +19 -0
- package/lib/types/ink/measure-element.d.ts.map +1 -0
- package/lib/types/ink/measure-element.js +10 -0
- package/lib/types/ink/measure-text.d.ts +13 -0
- package/lib/types/ink/measure-text.d.ts.map +1 -0
- package/lib/types/ink/measure-text.js +38 -0
- package/lib/types/ink/node-cache.d.ts +33 -0
- package/lib/types/ink/node-cache.d.ts.map +1 -0
- package/lib/types/ink/node-cache.js +42 -0
- package/lib/types/ink/optimizer.d.ts +18 -0
- package/lib/types/ink/optimizer.d.ts.map +1 -0
- package/lib/types/ink/optimizer.js +83 -0
- package/lib/types/ink/output.d.ts +200 -0
- package/lib/types/ink/output.d.ts.map +1 -0
- package/lib/types/ink/output.js +663 -0
- package/lib/types/ink/parse-keypress.d.ts +132 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -0
- package/lib/types/ink/parse-keypress.js +707 -0
- package/lib/types/ink/reconciler.d.ts +43 -0
- package/lib/types/ink/reconciler.d.ts.map +1 -0
- package/lib/types/ink/reconciler.js +413 -0
- package/lib/types/ink/render-border.d.ts +36 -0
- package/lib/types/ink/render-border.d.ts.map +1 -0
- package/lib/types/ink/render-border.js +143 -0
- package/lib/types/ink/render-node-to-output.d.ts +93 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -0
- package/lib/types/ink/render-node-to-output.js +1290 -0
- package/lib/types/ink/render-to-screen.d.ts +65 -0
- package/lib/types/ink/render-to-screen.d.ts.map +1 -0
- package/lib/types/ink/render-to-screen.js +189 -0
- package/lib/types/ink/renderer.d.ts +24 -0
- package/lib/types/ink/renderer.d.ts.map +1 -0
- package/lib/types/ink/renderer.js +136 -0
- package/lib/types/ink/root.d.ts +91 -0
- package/lib/types/ink/root.d.ts.map +1 -0
- package/lib/types/ink/root.js +93 -0
- package/lib/types/ink/screen.d.ts +443 -0
- package/lib/types/ink/screen.d.ts.map +1 -0
- package/lib/types/ink/screen.js +1295 -0
- package/lib/types/ink/searchHighlight.d.ts +25 -0
- package/lib/types/ink/searchHighlight.d.ts.map +1 -0
- package/lib/types/ink/searchHighlight.js +82 -0
- package/lib/types/ink/selection.d.ts +323 -0
- package/lib/types/ink/selection.d.ts.map +1 -0
- package/lib/types/ink/selection.js +881 -0
- package/lib/types/ink/squash-text-nodes.d.ts +30 -0
- package/lib/types/ink/squash-text-nodes.d.ts.map +1 -0
- package/lib/types/ink/squash-text-nodes.js +63 -0
- package/lib/types/ink/stringWidth.d.ts +11 -0
- package/lib/types/ink/stringWidth.d.ts.map +1 -0
- package/lib/types/ink/stringWidth.js +209 -0
- package/lib/types/ink/styles.d.ts +324 -0
- package/lib/types/ink/styles.d.ts.map +1 -0
- package/lib/types/ink/styles.js +307 -0
- package/lib/types/ink/supports-hyperlinks.d.ts +20 -0
- package/lib/types/ink/supports-hyperlinks.d.ts.map +1 -0
- package/lib/types/ink/supports-hyperlinks.js +44 -0
- package/lib/types/ink/tabstops.d.ts +9 -0
- package/lib/types/ink/tabstops.d.ts.map +1 -0
- package/lib/types/ink/tabstops.js +46 -0
- package/lib/types/ink/terminal-focus-state.d.ts +35 -0
- package/lib/types/ink/terminal-focus-state.d.ts.map +1 -0
- package/lib/types/ink/terminal-focus-state.js +57 -0
- package/lib/types/ink/terminal-querier.d.ts +161 -0
- package/lib/types/ink/terminal-querier.d.ts.map +1 -0
- package/lib/types/ink/terminal-querier.js +204 -0
- package/lib/types/ink/terminal.d.ts +80 -0
- package/lib/types/ink/terminal.d.ts.map +1 -0
- package/lib/types/ink/terminal.js +268 -0
- package/lib/types/ink/termio/ansi.d.ts +75 -0
- package/lib/types/ink/termio/ansi.d.ts.map +1 -0
- package/lib/types/ink/termio/ansi.js +79 -0
- package/lib/types/ink/termio/csi.d.ts +253 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -0
- package/lib/types/ink/termio/csi.js +347 -0
- package/lib/types/ink/termio/dec.d.ts +61 -0
- package/lib/types/ink/termio/dec.d.ts.map +1 -0
- package/lib/types/ink/termio/dec.js +76 -0
- package/lib/types/ink/termio/esc.d.ts +15 -0
- package/lib/types/ink/termio/esc.d.ts.map +1 -0
- package/lib/types/ink/termio/esc.js +57 -0
- package/lib/types/ink/termio/osc.d.ts +208 -0
- package/lib/types/ink/termio/osc.d.ts.map +1 -0
- package/lib/types/ink/termio/osc.js +466 -0
- package/lib/types/ink/termio/parser.d.ts +46 -0
- package/lib/types/ink/termio/parser.d.ts.map +1 -0
- package/lib/types/ink/termio/parser.js +366 -0
- package/lib/types/ink/termio/sgr.d.ts +17 -0
- package/lib/types/ink/termio/sgr.d.ts.map +1 -0
- package/lib/types/ink/termio/sgr.js +300 -0
- package/lib/types/ink/termio/tokenize.d.ts +50 -0
- package/lib/types/ink/termio/tokenize.d.ts.map +1 -0
- package/lib/types/ink/termio/tokenize.js +266 -0
- package/lib/types/ink/termio/types.d.ts +211 -0
- package/lib/types/ink/termio/types.d.ts.map +1 -0
- package/lib/types/ink/termio/types.js +68 -0
- package/lib/types/ink/termio.d.ts +25 -0
- package/lib/types/ink/termio.d.ts.map +1 -0
- package/lib/types/ink/termio.js +24 -0
- package/lib/types/ink/truncateToWidth.d.ts +7 -0
- package/lib/types/ink/truncateToWidth.d.ts.map +1 -0
- package/lib/types/ink/truncateToWidth.js +18 -0
- package/lib/types/ink/useTerminalNotification.d.ts +45 -0
- package/lib/types/ink/useTerminalNotification.d.ts.map +1 -0
- package/lib/types/ink/useTerminalNotification.js +70 -0
- package/lib/types/ink/warn.d.ts +7 -0
- package/lib/types/ink/warn.d.ts.map +1 -0
- package/lib/types/ink/warn.js +15 -0
- package/lib/types/ink/widest-line.d.ts +7 -0
- package/lib/types/ink/widest-line.d.ts.map +1 -0
- package/lib/types/ink/widest-line.js +19 -0
- package/lib/types/ink/wrap-text.d.ts +10 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -0
- package/lib/types/ink/wrap-text.js +61 -0
- package/lib/types/ink/wrapAnsi.d.ts +18 -0
- package/lib/types/ink/wrapAnsi.d.ts.map +1 -0
- package/lib/types/ink/wrapAnsi.js +16 -0
- package/lib/types/invariant.d.ts +20 -0
- package/lib/types/invariant.d.ts.map +1 -0
- package/lib/types/invariant.js +26 -0
- package/lib/types/modelPrefs.d.ts +37 -0
- package/lib/types/modelPrefs.d.ts.map +1 -0
- package/lib/types/modelPrefs.js +66 -0
- package/lib/types/modelRoute.d.ts +79 -0
- package/lib/types/modelRoute.d.ts.map +1 -0
- package/lib/types/modelRoute.js +96 -0
- package/lib/types/native-ts/yoga-layout/enums.d.ts +183 -0
- package/lib/types/native-ts/yoga-layout/enums.d.ts.map +1 -0
- package/lib/types/native-ts/yoga-layout/enums.js +150 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts +788 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -0
- package/lib/types/native-ts/yoga-layout/index.js +2571 -0
- package/lib/types/packaged-skills.d.ts +10 -0
- package/lib/types/packaged-skills.d.ts.map +1 -0
- package/lib/types/packaged-skills.js +63 -0
- package/lib/types/plugin.d.ts +33 -0
- package/lib/types/plugin.d.ts.map +1 -0
- package/lib/types/plugin.js +454 -0
- package/lib/types/presetPrefs.d.ts +29 -0
- package/lib/types/presetPrefs.d.ts.map +1 -0
- package/lib/types/presetPrefs.js +61 -0
- package/lib/types/presets.d.ts +110 -0
- package/lib/types/presets.d.ts.map +1 -0
- package/lib/types/presets.js +114 -0
- package/lib/types/questions.d.ts +97 -0
- package/lib/types/questions.d.ts.map +1 -0
- package/lib/types/questions.js +201 -0
- package/lib/types/screens/Chat.d.ts +23 -0
- package/lib/types/screens/Chat.d.ts.map +1 -0
- package/lib/types/screens/Chat.js +1263 -0
- package/lib/types/screens/StatusLine.d.ts +16 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -0
- package/lib/types/screens/StatusLine.js +105 -0
- package/lib/types/screens/StatusMetrics.d.ts +87 -0
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -0
- package/lib/types/screens/StatusMetrics.js +252 -0
- package/lib/types/sessionHistory.d.ts +32 -0
- package/lib/types/sessionHistory.d.ts.map +1 -0
- package/lib/types/sessionHistory.js +87 -0
- package/lib/types/theme.d.ts +115 -0
- package/lib/types/theme.d.ts.map +1 -0
- package/lib/types/theme.js +300 -0
- package/lib/types/themePrefs.d.ts +28 -0
- package/lib/types/themePrefs.d.ts.map +1 -0
- package/lib/types/themePrefs.js +59 -0
- package/lib/types/ui.d.ts +28 -0
- package/lib/types/ui.d.ts.map +1 -0
- package/lib/types/ui.js +25 -0
- package/lib/types/update.d.ts +76 -0
- package/lib/types/update.d.ts.map +1 -0
- package/lib/types/update.js +203 -0
- package/lib/types/utils/clipboard.d.ts +43 -0
- package/lib/types/utils/clipboard.d.ts.map +1 -0
- package/lib/types/utils/clipboard.js +82 -0
- package/lib/types/utils/debug.d.ts +8 -0
- package/lib/types/utils/debug.d.ts.map +1 -0
- package/lib/types/utils/debug.js +12 -0
- package/lib/types/utils/earlyInput.d.ts +7 -0
- package/lib/types/utils/earlyInput.d.ts.map +1 -0
- package/lib/types/utils/earlyInput.js +6 -0
- package/lib/types/utils/env.d.ts +10 -0
- package/lib/types/utils/env.d.ts.map +1 -0
- package/lib/types/utils/env.js +9 -0
- package/lib/types/utils/envUtils.d.ts +8 -0
- package/lib/types/utils/envUtils.d.ts.map +1 -0
- package/lib/types/utils/envUtils.js +13 -0
- package/lib/types/utils/execFileNoThrow.d.ts +34 -0
- package/lib/types/utils/execFileNoThrow.d.ts.map +1 -0
- package/lib/types/utils/execFileNoThrow.js +31 -0
- package/lib/types/utils/fullscreen.d.ts +8 -0
- package/lib/types/utils/fullscreen.d.ts.map +1 -0
- package/lib/types/utils/fullscreen.js +10 -0
- package/lib/types/utils/intl.d.ts +7 -0
- package/lib/types/utils/intl.d.ts.map +1 -0
- package/lib/types/utils/intl.js +9 -0
- package/lib/types/utils/loaded-context.d.ts +20 -0
- package/lib/types/utils/loaded-context.d.ts.map +1 -0
- package/lib/types/utils/loaded-context.js +36 -0
- package/lib/types/utils/log.d.ts +7 -0
- package/lib/types/utils/log.d.ts.map +1 -0
- package/lib/types/utils/log.js +9 -0
- package/lib/types/utils/mentions.d.ts +30 -0
- package/lib/types/utils/mentions.d.ts.map +1 -0
- package/lib/types/utils/mentions.js +72 -0
- package/lib/types/utils/narration.d.ts +11 -0
- package/lib/types/utils/narration.d.ts.map +1 -0
- package/lib/types/utils/narration.js +16 -0
- package/lib/types/utils/semver.d.ts +9 -0
- package/lib/types/utils/semver.d.ts.map +1 -0
- package/lib/types/utils/semver.js +24 -0
- package/lib/types/utils/sliceAnsi.d.ts +12 -0
- package/lib/types/utils/sliceAnsi.d.ts.map +1 -0
- package/lib/types/utils/sliceAnsi.js +79 -0
- package/lib/types/working-activity.d.ts +19 -0
- package/lib/types/working-activity.d.ts.map +1 -0
- package/lib/types/working-activity.js +18 -0
- package/package.json +141 -0
- package/skills/audit/SKILL.md +24 -0
- package/skills/bug/SKILL.md +27 -0
- package/skills/pr-comments/SKILL.md +20 -0
- package/skills/practice/SKILL.md +22 -0
- package/skills/release-notes/SKILL.md +25 -0
- package/skills/review/SKILL.md +25 -0
- package/skills/vuln-check/SKILL.md +25 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Working-activity indicator presets, ported from the pi
|
|
3
|
+
* working-activity extension (`FRAME_PRESETS`). The TUI renders the current
|
|
4
|
+
* frame next to the live working line, tinted by the activity phase.
|
|
5
|
+
* `\uFE0E` forces text rendering so Windows never paints the glyphs as
|
|
6
|
+
* color emoji (the green-block problem).
|
|
7
|
+
*/
|
|
8
|
+
/** One working-activity preset: the frame sequence and the per-frame interval. */
|
|
9
|
+
export interface FramePreset {
|
|
10
|
+
readonly frames: readonly string[];
|
|
11
|
+
readonly intervalMs: number;
|
|
12
|
+
}
|
|
13
|
+
/** Named working-activity frame presets, keyed by preset name (`claude`, `moon`, `sand`, ...). */
|
|
14
|
+
export declare const FRAME_PRESETS: Record<string, FramePreset>;
|
|
15
|
+
/** The pi extension's default preset. */
|
|
16
|
+
export declare const DEFAULT_PRESET = "moon";
|
|
17
|
+
/** Every selectable preset name, `random` first (the pi selector order). */
|
|
18
|
+
export declare const PRESET_NAMES: readonly string[];
|
|
19
|
+
/**
|
|
20
|
+
* Whether `name` selects a known preset or `random`.
|
|
21
|
+
* @param name - Candidate preset name.
|
|
22
|
+
* @returns True when the name resolves to a preset.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isPresetName(name: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve a preset name (`random` picks one per process).
|
|
27
|
+
* @param name - Preset name, or undefined for the default.
|
|
28
|
+
* @returns The matching preset; unknown or absent names fall back to the default.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolvePreset(name: string | undefined): FramePreset;
|
|
31
|
+
//# sourceMappingURL=activityFrames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activityFrames.d.ts","sourceRoot":"","sources":["../../../src/components/activityFrames.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,kFAAkF;AAClF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,kGAAkG;AAClG,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CA6CrD,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,cAAc,SAAS,CAAA;AAEpC,4EAA4E;AAC5E,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAA8C,CAAA;AAExF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAElD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CASnE"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Working-activity indicator presets, ported from the pi
|
|
3
|
+
* working-activity extension (`FRAME_PRESETS`). The TUI renders the current
|
|
4
|
+
* frame next to the live working line, tinted by the activity phase.
|
|
5
|
+
* `\uFE0E` forces text rendering so Windows never paints the glyphs as
|
|
6
|
+
* color emoji (the green-block problem).
|
|
7
|
+
*/
|
|
8
|
+
/** Text-variant selector: keep symbols monochrome on Windows. */
|
|
9
|
+
const TE = '\uFE0E';
|
|
10
|
+
/** Named working-activity frame presets, keyed by preset name (`claude`, `moon`, `sand`, ...). */
|
|
11
|
+
export const FRAME_PRESETS = {
|
|
12
|
+
// Claude Code's real sequence: · ✢ * ✶ ✻ ✽ forward + backward.
|
|
13
|
+
claude: {
|
|
14
|
+
frames: ['·', `✢${TE}`, '*', `✶${TE}`, `✻${TE}`, `✽${TE}`, `✻${TE}`, `✶${TE}`, '*', `✢${TE}`],
|
|
15
|
+
intervalMs: 150,
|
|
16
|
+
},
|
|
17
|
+
star2: { frames: [`✶${TE}`, `✸${TE}`, `✹${TE}`, `✺${TE}`, `✹${TE}`, `✷${TE}`], intervalMs: 140 },
|
|
18
|
+
sand: {
|
|
19
|
+
frames: ['⠁', '⠂', '⠄', '⡀', '⡈', '⡐', '⡠', '⣀', '⣁', '⣂', '⣄', '⣌', '⣔', '⣤', '⣥', '⣦', '⣮', '⣶', '⣷', '⣿', '⡿', '⠿', '⢟', '⠟', '⡛', '⠛', '⠫', '⢋', '⠋', '⠍', '⡉', '⠉', '⠑', '⠡', '⢁'],
|
|
20
|
+
intervalMs: 120,
|
|
21
|
+
},
|
|
22
|
+
triangle: { frames: ['◢', '◣', '◤', '◥'], intervalMs: 180 },
|
|
23
|
+
box: { frames: ['▖', '▘', '▝', '▗'], intervalMs: 180 },
|
|
24
|
+
box2: { frames: ['▌', '▀', '▐', '▄'], intervalMs: 180 },
|
|
25
|
+
corners: { frames: ['◰', '◳', '◲', '◱'], intervalMs: 190 },
|
|
26
|
+
point: { frames: ['∙∙∙', '●∙∙', '∙●∙', '∙∙●', '∙∙∙'], intervalMs: 190 },
|
|
27
|
+
layer: { frames: ['-', '=', '≡'], intervalMs: 220 },
|
|
28
|
+
flip: { frames: ['_', '_', '_', '-', '`', '`', "'", '´', '-', '_', '_', '_'], intervalMs: 140 },
|
|
29
|
+
aesthetic: {
|
|
30
|
+
frames: ['▰▱▱▱▱▱▱', '▰▰▱▱▱▱▱', '▰▰▰▱▱▱▱', '▰▰▰▰▱▱▱', '▰▰▰▰▰▱▱', '▰▰▰▰▰▰▱', '▰▰▰▰▰▰▰', '▰▱▱▱▱▱▱'],
|
|
31
|
+
intervalMs: 140,
|
|
32
|
+
},
|
|
33
|
+
hamburger: { frames: ['☱', '☲', '☴'], intervalMs: 220 },
|
|
34
|
+
moon: { frames: ['◐', '◓', '◑', '◒'], intervalMs: 240 },
|
|
35
|
+
comet: {
|
|
36
|
+
frames: ['● ', ' ● ', ' ● ', ' ● ', ' ●', ' ● ', ' ● ', ' ● '],
|
|
37
|
+
intervalMs: 160,
|
|
38
|
+
},
|
|
39
|
+
breathe: { frames: ['▁', '▃', '▅', '▇', '▅', '▃'], intervalMs: 210 },
|
|
40
|
+
dots: { frames: ['⣾', '⣷', '⣯', '⣟', '⡿', '⢿', '⣻', '⣽'], intervalMs: 140 },
|
|
41
|
+
arrow: { frames: ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙'], intervalMs: 160 },
|
|
42
|
+
spark: { frames: ['·', '∘', '°', '✧', '°', '∘'], intervalMs: 240 },
|
|
43
|
+
bar: { frames: ['▏', '▎', '▍', '▌', '▋', '▊', '▉', '█', '▉', '▊', '▋', '▌', '▍', '▎'], intervalMs: 120 },
|
|
44
|
+
braille: { frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'], intervalMs: 120 },
|
|
45
|
+
arc: { frames: ['◜', '◠', '◝', '◞', '◡', '◟'], intervalMs: 160 },
|
|
46
|
+
circle: { frames: ['◴', '◷', '◶', '◵'], intervalMs: 190 },
|
|
47
|
+
grow: { frames: ['.', 'o', 'O', '0', 'O', 'o'], intervalMs: 210 },
|
|
48
|
+
noise: { frames: ['▓', '▒', '░', '▒'], intervalMs: 160 },
|
|
49
|
+
bounce: { frames: ['⠁', '⠂', '⠄', '⡀', '⢀', '⠠', '⠐', '⠈'], intervalMs: 140 },
|
|
50
|
+
rainbow: {
|
|
51
|
+
frames: ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█', '▇', '▆', '▅', '▄', '▃', '▂'],
|
|
52
|
+
intervalMs: 120,
|
|
53
|
+
},
|
|
54
|
+
dqpb: { frames: ['d', 'q', 'p', 'b'], intervalMs: 210 },
|
|
55
|
+
toggle: { frames: ['⊶', '⊷'], intervalMs: 300 },
|
|
56
|
+
};
|
|
57
|
+
/** The pi extension's default preset. */
|
|
58
|
+
export const DEFAULT_PRESET = 'moon';
|
|
59
|
+
/** Every selectable preset name, `random` first (the pi selector order). */
|
|
60
|
+
export const PRESET_NAMES = ['random', ...Object.keys(FRAME_PRESETS)];
|
|
61
|
+
/**
|
|
62
|
+
* Whether `name` selects a known preset or `random`.
|
|
63
|
+
* @param name - Candidate preset name.
|
|
64
|
+
* @returns True when the name resolves to a preset.
|
|
65
|
+
*/
|
|
66
|
+
export function isPresetName(name) {
|
|
67
|
+
return name === 'random' || Object.hasOwn(FRAME_PRESETS, name);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Resolve a preset name (`random` picks one per process).
|
|
71
|
+
* @param name - Preset name, or undefined for the default.
|
|
72
|
+
* @returns The matching preset; unknown or absent names fall back to the default.
|
|
73
|
+
*/
|
|
74
|
+
export function resolvePreset(name) {
|
|
75
|
+
if (name === 'random') {
|
|
76
|
+
const names = Object.keys(FRAME_PRESETS);
|
|
77
|
+
// FRAME_PRESETS is non-empty by construction, so any random index is in
|
|
78
|
+
// range and the lookup always lands on a preset.
|
|
79
|
+
const pick = names[Math.floor(Math.random() * names.length)];
|
|
80
|
+
return FRAME_PRESETS[pick];
|
|
81
|
+
}
|
|
82
|
+
return FRAME_PRESETS[name ?? ''] ?? FRAME_PRESETS[DEFAULT_PRESET];
|
|
83
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A 5-row block font for the header tagline, painted with a horizontal
|
|
3
|
+
* color gradient plus a moving highlight window (the same sweep cadence as
|
|
4
|
+
* the wordmark shimmer — see the `stepMs` parameter). Glyphs are 5 columns wide so curves
|
|
5
|
+
* and diagonals stay legible; only the letters the tagline needs are
|
|
6
|
+
* defined, and unknown characters fall back to a hollow box so a typo
|
|
7
|
+
* fails visibly instead of crashing the splash.
|
|
8
|
+
*/
|
|
9
|
+
export interface Rgb {
|
|
10
|
+
r: number;
|
|
11
|
+
g: number;
|
|
12
|
+
b: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Render `text` in the 5-row block font. The gradient runs `from` → `to`
|
|
16
|
+
* across the full line width; a SWEEP_WINDOW-wide highlight mixed toward
|
|
17
|
+
* `flash` travels left to right (one column per `stepMs`, matching the
|
|
18
|
+
* wordmark shimmer's cadence). Returns 5 ANSI rows.
|
|
19
|
+
* @param text - Text to render; only D, E, P, S, K, H, A, R, N have glyphs, unknown letters fall back to a hollow box.
|
|
20
|
+
* @param time - Elapsed time in milliseconds; drives the sweep position and the brightness pulse.
|
|
21
|
+
* @param from - Gradient start color at the left edge.
|
|
22
|
+
* @param to - Gradient end color at the right edge.
|
|
23
|
+
* @param flash - Highlight color mixed into the moving sweep window.
|
|
24
|
+
* @param stepMs - Milliseconds per column of sweep advance (default 60).
|
|
25
|
+
* @returns Five ANSI rows, one per block-font line.
|
|
26
|
+
*/
|
|
27
|
+
export declare function renderBigText(text: string, time: number, from: Rgb, to: Rgb, flash: Rgb, stepMs?: number): string[];
|
|
28
|
+
//# sourceMappingURL=bigfont.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bigfont.d.ts","sourceRoot":"","sources":["../../../src/components/bigfont.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAiCD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,GAAG,EACT,EAAE,EAAE,GAAG,EACP,KAAK,EAAE,GAAG,EACV,MAAM,SAAK,GACV,MAAM,EAAE,CA+CV"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { interpolateColor } from './Spinner/spinnerUtils.js';
|
|
2
|
+
/** Glyph rows are 5 columns wide; `·` is a transparent cell. */
|
|
3
|
+
const GLYPHS = {
|
|
4
|
+
D: ['█▀▀▀▄', '█···█', '█···█', '█···█', '█▄▄▄▀'],
|
|
5
|
+
E: ['█▀▀▀▀', '█····', '█▀▀▀·', '█····', '█▄▄▄▄'],
|
|
6
|
+
P: ['█▀▀▀▄', '█···█', '█▄▄▄▀', '█····', '█····'],
|
|
7
|
+
S: ['█▀▀▀▀', '█····', '·▀▀▀▄', '····█', '█▄▄▄▀'],
|
|
8
|
+
K: ['█···█', '█·█··', '██···', '█·█··', '█···█'],
|
|
9
|
+
H: ['█···█', '█···█', '█▀▀▀█', '█···█', '█···█'],
|
|
10
|
+
A: ['·▄▀▄·', '█···█', '█▀▀▀█', '█···█', '█···█'],
|
|
11
|
+
R: ['█▀▀▀▄', '█···█', '█▄▄▄▀', '█·█··', '█···█'],
|
|
12
|
+
N: ['█···█', '██··█', '█·█·█', '█··██', '█···█'],
|
|
13
|
+
};
|
|
14
|
+
const FALLBACK = [
|
|
15
|
+
'▄▄▄▄▄',
|
|
16
|
+
'█···█',
|
|
17
|
+
'█···█',
|
|
18
|
+
'█···█',
|
|
19
|
+
'▀▀▀▀▀',
|
|
20
|
+
];
|
|
21
|
+
/** Per-glyph advance (5 glyph columns + 1 kerning column). */
|
|
22
|
+
const ADVANCE = 6;
|
|
23
|
+
/** Space between words. */
|
|
24
|
+
const WORD_GAP = 2;
|
|
25
|
+
/** Sweep highlight window width, in terminal columns. */
|
|
26
|
+
const SWEEP_WINDOW = 8;
|
|
27
|
+
const esc = (rgb) => `\x1b[38;2;${rgb.r};${rgb.g};${rgb.b}m`;
|
|
28
|
+
const RESET = '\x1b[39m';
|
|
29
|
+
/**
|
|
30
|
+
* Render `text` in the 5-row block font. The gradient runs `from` → `to`
|
|
31
|
+
* across the full line width; a SWEEP_WINDOW-wide highlight mixed toward
|
|
32
|
+
* `flash` travels left to right (one column per `stepMs`, matching the
|
|
33
|
+
* wordmark shimmer's cadence). Returns 5 ANSI rows.
|
|
34
|
+
* @param text - Text to render; only D, E, P, S, K, H, A, R, N have glyphs, unknown letters fall back to a hollow box.
|
|
35
|
+
* @param time - Elapsed time in milliseconds; drives the sweep position and the brightness pulse.
|
|
36
|
+
* @param from - Gradient start color at the left edge.
|
|
37
|
+
* @param to - Gradient end color at the right edge.
|
|
38
|
+
* @param flash - Highlight color mixed into the moving sweep window.
|
|
39
|
+
* @param stepMs - Milliseconds per column of sweep advance (default 60).
|
|
40
|
+
* @returns Five ANSI rows, one per block-font line.
|
|
41
|
+
*/
|
|
42
|
+
export function renderBigText(text, time, from, to, flash, stepMs = 60) {
|
|
43
|
+
const width = text.length * ADVANCE + (text.includes(' ') ? WORD_GAP - 1 : 0);
|
|
44
|
+
const cycle = width + SWEEP_WINDOW * 2;
|
|
45
|
+
const sweepStart = (Math.floor(time / stepMs) % cycle) - SWEEP_WINDOW;
|
|
46
|
+
const pulse = (Math.sin(time / (stepMs * 2)) + 1) / 2;
|
|
47
|
+
const rows = [];
|
|
48
|
+
for (let row = 0; row < 5; row++) {
|
|
49
|
+
let out = '';
|
|
50
|
+
let current = '';
|
|
51
|
+
let x = 0;
|
|
52
|
+
const emit = (ch) => {
|
|
53
|
+
if (ch === ' ' || ch === '·') {
|
|
54
|
+
if (current !== '') {
|
|
55
|
+
out += RESET;
|
|
56
|
+
current = '';
|
|
57
|
+
}
|
|
58
|
+
out += ' ';
|
|
59
|
+
x += 1;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const t = width <= 1 ? 0 : x / (width - 1);
|
|
63
|
+
let color = interpolateColor(from, to, t);
|
|
64
|
+
if (x >= sweepStart && x < sweepStart + SWEEP_WINDOW) {
|
|
65
|
+
color = interpolateColor(color, flash, pulse);
|
|
66
|
+
}
|
|
67
|
+
const seq = esc(color);
|
|
68
|
+
if (seq !== current) {
|
|
69
|
+
out += seq;
|
|
70
|
+
current = seq;
|
|
71
|
+
}
|
|
72
|
+
out += ch;
|
|
73
|
+
x += 1;
|
|
74
|
+
};
|
|
75
|
+
for (const ch of text) {
|
|
76
|
+
if (ch === ' ') {
|
|
77
|
+
for (let i = 0; i < WORD_GAP; i++)
|
|
78
|
+
emit(' ');
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
const glyph = GLYPHS[ch] ?? FALLBACK;
|
|
82
|
+
for (const cell of glyph[row])
|
|
83
|
+
emit(cell);
|
|
84
|
+
emit(' ');
|
|
85
|
+
}
|
|
86
|
+
if (current !== '')
|
|
87
|
+
out += RESET;
|
|
88
|
+
rows.push(out);
|
|
89
|
+
}
|
|
90
|
+
return rows;
|
|
91
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
/** The items to join with a middot separator */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Joins children with a middot separator (" · ") for inline metadata display
|
|
8
|
+
* (ported from the leak's design-system). Automatically filters out
|
|
9
|
+
* null/undefined/false children and only renders separators between valid
|
|
10
|
+
* elements.
|
|
11
|
+
*/
|
|
12
|
+
export declare function Byline({ children }: Props): React.ReactNode;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=Byline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Byline.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/Byline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAA;AAGvD,KAAK,KAAK,GAAG;IACX,gDAAgD;IAChD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,SAAS,CAoB3D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React, { Children, isValidElement } from 'react';
|
|
3
|
+
import Text from '../../ink/components/Text.js';
|
|
4
|
+
/**
|
|
5
|
+
* Joins children with a middot separator (" · ") for inline metadata display
|
|
6
|
+
* (ported from the leak's design-system). Automatically filters out
|
|
7
|
+
* null/undefined/false children and only renders separators between valid
|
|
8
|
+
* elements.
|
|
9
|
+
*/
|
|
10
|
+
export function Byline({ children }) {
|
|
11
|
+
// Children.toArray already filters out null, undefined, and booleans
|
|
12
|
+
const validChildren = Children.toArray(children);
|
|
13
|
+
if (validChildren.length === 0) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return (_jsx(_Fragment, { children: validChildren.map((child, index) => (_jsxs(React.Fragment, { children: [index > 0 && _jsx(Text, { dimColor: true, children: " \u00B7 " }), child] }, isValidElement(child) ? (child.key ?? index) : index))) }));
|
|
17
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Theme } from '../../theme.js';
|
|
3
|
+
type DividerProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Width of the divider in characters.
|
|
6
|
+
* Defaults to terminal width.
|
|
7
|
+
*/
|
|
8
|
+
width?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Theme color for the divider.
|
|
11
|
+
* If not provided, dimColor is used.
|
|
12
|
+
*/
|
|
13
|
+
color?: keyof Theme;
|
|
14
|
+
/**
|
|
15
|
+
* Character to use for the divider line.
|
|
16
|
+
* @default '─'
|
|
17
|
+
*/
|
|
18
|
+
char?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Padding to subtract from the width (e.g., for indentation).
|
|
21
|
+
* @default 0
|
|
22
|
+
*/
|
|
23
|
+
padding?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Title shown in the middle of the divider.
|
|
26
|
+
* May contain ANSI codes (e.g., chalk-styled text).
|
|
27
|
+
*/
|
|
28
|
+
title?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* A horizontal divider line, optionally with a title in the middle
|
|
32
|
+
* (ported from the leak's design-system).
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* // ─────────── Title ───────────
|
|
36
|
+
* <Divider title="Title" />
|
|
37
|
+
*/
|
|
38
|
+
export declare function Divider({ width, color, char, padding, title, }: DividerProps): React.ReactNode;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C,KAAK,YAAY,GAAG;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,IAAU,EACV,OAAW,EACX,KAAK,GACN,EAAE,YAAY,GAAG,KAAK,CAAC,SAAS,CAwBhC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Text from '../../ink/components/Text.js';
|
|
3
|
+
import { stringWidth } from '../../ink/stringWidth.js';
|
|
4
|
+
import { useTerminalSize } from '../../ink/hooks/use-terminal-size.js';
|
|
5
|
+
/**
|
|
6
|
+
* A horizontal divider line, optionally with a title in the middle
|
|
7
|
+
* (ported from the leak's design-system).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // ─────────── Title ───────────
|
|
11
|
+
* <Divider title="Title" />
|
|
12
|
+
*/
|
|
13
|
+
export function Divider({ width, color, char = '─', padding = 0, title, }) {
|
|
14
|
+
const { columns } = useTerminalSize();
|
|
15
|
+
const lineWidth = Math.max(0, (width ?? columns) - padding);
|
|
16
|
+
const titleWidth = title ? stringWidth(title) : 0;
|
|
17
|
+
if (title && titleWidth < lineWidth) {
|
|
18
|
+
const lineLength = lineWidth - titleWidth;
|
|
19
|
+
const leftLength = Math.floor(lineLength / 2);
|
|
20
|
+
const rightLength = Math.ceil(lineLength / 2);
|
|
21
|
+
return (_jsxs(Text, { dimColor: !color, color: color, children: [char.repeat(leftLength), title, char.repeat(rightLength)] }));
|
|
22
|
+
}
|
|
23
|
+
return (_jsx(Text, { dimColor: !color, color: color, children: char.repeat(lineWidth) }));
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
/** The key or chord to display (e.g., "ctrl+o", "Enter", "↑/↓") */
|
|
4
|
+
shortcut: string;
|
|
5
|
+
/** The action the key performs (e.g., "expand", "select", "navigate") */
|
|
6
|
+
action: string;
|
|
7
|
+
/** Whether to wrap the hint in parentheses. Default: false */
|
|
8
|
+
parens?: boolean;
|
|
9
|
+
/** Whether to render the shortcut in bold. Default: false */
|
|
10
|
+
bold?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Renders a keyboard shortcut hint like "ctrl+o to expand" or "(tab to toggle)"
|
|
14
|
+
* (ported from the leak's design-system). Wrap in `<Text dimColor>` for the
|
|
15
|
+
* common dim styling.
|
|
16
|
+
*/
|
|
17
|
+
export declare function KeyboardShortcutHint({ shortcut, action, parens, bold, }: Props): React.ReactNode;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=KeyboardShortcutHint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyboardShortcutHint.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/KeyboardShortcutHint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,KAAK,KAAK,GAAG;IACX,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAA;IAChB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAA;IACd,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,MAAM,EACN,MAAc,EACd,IAAY,GACb,EAAE,KAAK,GAAG,KAAK,CAAC,SAAS,CAezB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Text from '../../ink/components/Text.js';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a keyboard shortcut hint like "ctrl+o to expand" or "(tab to toggle)"
|
|
5
|
+
* (ported from the leak's design-system). Wrap in `<Text dimColor>` for the
|
|
6
|
+
* common dim styling.
|
|
7
|
+
*/
|
|
8
|
+
export function KeyboardShortcutHint({ shortcut, action, parens = false, bold = false, }) {
|
|
9
|
+
const shortcutText = bold ? _jsx(Text, { bold: true, children: shortcut }) : shortcut;
|
|
10
|
+
if (parens) {
|
|
11
|
+
return (_jsxs(Text, { children: ["(", shortcutText, " to ", action, ")"] }));
|
|
12
|
+
}
|
|
13
|
+
return (_jsxs(Text, { children: [shortcutText, " to ", action] }));
|
|
14
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export type ListItemProps = {
|
|
3
|
+
/** Whether this item is currently focused (keyboard selection).
|
|
4
|
+
* Shows the pointer indicator (❯) when true. */
|
|
5
|
+
isFocused: boolean;
|
|
6
|
+
/** Whether this item is selected (chosen/checked).
|
|
7
|
+
* Shows the checkmark indicator (✓) when true. */
|
|
8
|
+
isSelected?: boolean;
|
|
9
|
+
/** The content to display for this item. */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** Optional description text displayed below the main content. */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Show a down arrow indicator instead of pointer (scroll hints). */
|
|
14
|
+
showScrollDown?: boolean;
|
|
15
|
+
/** Show an up arrow indicator instead of pointer (scroll hints). */
|
|
16
|
+
showScrollUp?: boolean;
|
|
17
|
+
/** Whether to apply automatic styling based on focus/selection state. */
|
|
18
|
+
styled?: boolean;
|
|
19
|
+
/** Disabled items show dimmed text and no indicators. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether this ListItem should declare the terminal cursor position.
|
|
23
|
+
* Set false when a child (e.g. BaseTextInput) declares its own cursor.
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
declareCursor?: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* A list item for selection UIs (ported from the leak's
|
|
30
|
+
* design-system/ListItem.tsx): `❯` pointer for the focused row, `✓`
|
|
31
|
+
* checkmark for the selected row, description on an indented second line,
|
|
32
|
+
* and CC's color states (focused = suggestion blue, selected = success
|
|
33
|
+
* green).
|
|
34
|
+
*/
|
|
35
|
+
export declare function ListItem({ isFocused, isSelected, children, description, showScrollDown, showScrollUp, styled, disabled, declareCursor, }: ListItemProps): React.ReactNode;
|
|
36
|
+
//# sourceMappingURL=ListItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK7C,MAAM,MAAM,aAAa,GAAG;IAC1B;qDACiD;IACjD,SAAS,EAAE,OAAO,CAAA;IAClB;uDACmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,4CAA4C;IAC5C,QAAQ,EAAE,SAAS,CAAA;IACnB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qEAAqE;IACrE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,oEAAoE;IACpE,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,yEAAyE;IACzE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EACvB,SAAS,EACT,UAAkB,EAClB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,YAAY,EACZ,MAAa,EACb,QAAgB,EAChB,aAAa,GACd,EAAE,aAAa,GAAG,KAAK,CAAC,SAAS,CAsDjC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from '../../ui.js';
|
|
3
|
+
import { useDeclaredCursor } from '../../ink/hooks/use-declared-cursor.js';
|
|
4
|
+
import { POINTER, DOWN_ARROW, UP_ARROW, TICK } from '../../cc/figures.js';
|
|
5
|
+
/**
|
|
6
|
+
* A list item for selection UIs (ported from the leak's
|
|
7
|
+
* design-system/ListItem.tsx): `❯` pointer for the focused row, `✓`
|
|
8
|
+
* checkmark for the selected row, description on an indented second line,
|
|
9
|
+
* and CC's color states (focused = suggestion blue, selected = success
|
|
10
|
+
* green).
|
|
11
|
+
*/
|
|
12
|
+
export function ListItem({ isFocused, isSelected = false, children, description, showScrollDown, showScrollUp, styled = true, disabled = false, declareCursor, }) {
|
|
13
|
+
// Park the native terminal cursor on the pointer indicator so screen
|
|
14
|
+
// readers / magnifiers track the focused item (CC behavior). (0,0) is the
|
|
15
|
+
// top-left of this Box, where the pointer renders.
|
|
16
|
+
const cursorRef = useDeclaredCursor({
|
|
17
|
+
line: 0,
|
|
18
|
+
column: 0,
|
|
19
|
+
active: isFocused && !disabled && declareCursor !== false,
|
|
20
|
+
});
|
|
21
|
+
function renderIndicator() {
|
|
22
|
+
if (disabled) {
|
|
23
|
+
return _jsx(Text, { children: " " });
|
|
24
|
+
}
|
|
25
|
+
if (isFocused) {
|
|
26
|
+
return _jsx(Text, { color: "suggestion", children: POINTER });
|
|
27
|
+
}
|
|
28
|
+
if (showScrollDown) {
|
|
29
|
+
return _jsx(Text, { dimColor: true, children: DOWN_ARROW });
|
|
30
|
+
}
|
|
31
|
+
if (showScrollUp) {
|
|
32
|
+
return _jsx(Text, { dimColor: true, children: UP_ARROW });
|
|
33
|
+
}
|
|
34
|
+
return _jsx(Text, { children: " " });
|
|
35
|
+
}
|
|
36
|
+
function getTextColor() {
|
|
37
|
+
if (disabled)
|
|
38
|
+
return 'inactive';
|
|
39
|
+
if (!styled)
|
|
40
|
+
return undefined;
|
|
41
|
+
if (isSelected)
|
|
42
|
+
return 'success';
|
|
43
|
+
if (isFocused)
|
|
44
|
+
return 'suggestion';
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
return (_jsxs(Box, { ref: cursorRef, flexDirection: "column", children: [_jsxs(Box, { flexDirection: "row", gap: 1, children: [renderIndicator(), styled ? (_jsx(Text, { color: getTextColor(), dimColor: disabled, children: children })) : (children), isSelected && !disabled && _jsx(Text, { color: "success", children: TICK })] }), description && (_jsx(Box, { paddingLeft: 2, children: _jsx(Text, { color: "inactive", children: description }) }))] }));
|
|
48
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A spinner with a loading message for async operations, ported from the
|
|
4
|
+
* leak's design-system/LoadingState.tsx (using the small animated glyph).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <LoadingState message="Loading models" bold subtitle="Querying the provider…" />
|
|
8
|
+
*/
|
|
9
|
+
export declare function LoadingState({ message, bold, dimColor, subtitle, }: {
|
|
10
|
+
/** The loading message to display next to the spinner. */
|
|
11
|
+
message: string;
|
|
12
|
+
/** Display the message in bold. @default false */
|
|
13
|
+
bold?: boolean;
|
|
14
|
+
/** Display the message in dimmed color. @default false */
|
|
15
|
+
dimColor?: boolean;
|
|
16
|
+
/** Optional subtitle displayed below the main message. */
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
}): React.ReactNode;
|
|
19
|
+
//# sourceMappingURL=LoadingState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingState.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/LoadingState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,IAAY,EACZ,QAAgB,EAChB,QAAQ,GACT,EAAE;IACD,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf,kDAAkD;IAClD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,KAAK,CAAC,SAAS,CAelB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Box from '../../ink/components/Box.js';
|
|
3
|
+
import Text from '../../ink/components/Text.js';
|
|
4
|
+
import { useAnimationFrame } from '../../ink/hooks/use-animation-frame.js';
|
|
5
|
+
import { SpinnerGlyph } from '../Spinner/SpinnerGlyph.js';
|
|
6
|
+
import { getDefaultCharacters } from '../Spinner/spinnerUtils.js';
|
|
7
|
+
const SPINNER_FRAMES = [
|
|
8
|
+
...getDefaultCharacters(),
|
|
9
|
+
...[...getDefaultCharacters()].reverse(),
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* A spinner with a loading message for async operations, ported from the
|
|
13
|
+
* leak's design-system/LoadingState.tsx (using the small animated glyph).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <LoadingState message="Loading models" bold subtitle="Querying the provider…" />
|
|
17
|
+
*/
|
|
18
|
+
export function LoadingState({ message, bold = false, dimColor = false, subtitle, }) {
|
|
19
|
+
const [ref, time] = useAnimationFrame(80);
|
|
20
|
+
const frame = Math.floor(time / 80) % SPINNER_FRAMES.length;
|
|
21
|
+
return (_jsxs(Box, { ref: ref, flexDirection: "column", children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(SpinnerGlyph, { frame: frame, messageColor: "text", time: time }), _jsxs(Text, { bold: bold, dimColor: dimColor, children: [' ', message] })] }), subtitle && _jsx(Text, { dimColor: true, children: subtitle })] }));
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Theme } from '../../theme.js';
|
|
3
|
+
/**
|
|
4
|
+
* A pane — a region below the prompt bounded by a colored top line with a
|
|
5
|
+
* one-row gap above and horizontal padding (ported from the leak's
|
|
6
|
+
* design-system/Pane.tsx). Used by the slash-command dialogs (/thinking,
|
|
7
|
+
* /model, /resume).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <Pane color="permission">...</Pane>
|
|
11
|
+
*/
|
|
12
|
+
export declare function Pane({ children, color, }: {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
/** Theme color for the top border line. */
|
|
15
|
+
color?: keyof Theme;
|
|
16
|
+
}): React.ReactNode;
|
|
17
|
+
//# sourceMappingURL=Pane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pane.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/Pane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;CACpB,GAAG,KAAK,CAAC,SAAS,CASlB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Box from '../../ink/components/Box.js';
|
|
3
|
+
import { Divider } from './Divider.js';
|
|
4
|
+
/**
|
|
5
|
+
* A pane — a region below the prompt bounded by a colored top line with a
|
|
6
|
+
* one-row gap above and horizontal padding (ported from the leak's
|
|
7
|
+
* design-system/Pane.tsx). Used by the slash-command dialogs (/thinking,
|
|
8
|
+
* /model, /resume).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <Pane color="permission">...</Pane>
|
|
12
|
+
*/
|
|
13
|
+
export function Pane({ children, color, }) {
|
|
14
|
+
return (_jsxs(Box, { flexDirection: "column", paddingTop: 1, children: [_jsx(Divider, { color: color }), _jsx(Box, { flexDirection: "column", paddingX: 2, children: children })] }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Theme } from '../../theme.js';
|
|
3
|
+
/**
|
|
4
|
+
* A proportional progress bar drawn with block glyphs, ported from the
|
|
5
|
+
* leak's design-system/ProgressBar.tsx: `█` fills whole cells, the partial
|
|
6
|
+
* cell uses the `▏▎▍▌▋▊▉` ladder for sub-cell precision, and the empty
|
|
7
|
+
* remainder is spaces with the empty color as background.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <ProgressBar ratio={0.42} width={20} fillColor="claude" emptyColor="inactive" />
|
|
11
|
+
*/
|
|
12
|
+
export declare function ProgressBar({ ratio: inputRatio, width, fillColor, emptyColor, }: {
|
|
13
|
+
/** How much progress to display, between 0 and 1 inclusive. */
|
|
14
|
+
ratio: number;
|
|
15
|
+
/** How many characters wide to draw the progress bar. */
|
|
16
|
+
width: number;
|
|
17
|
+
/** Optional color for the filled portion of the bar. */
|
|
18
|
+
fillColor?: keyof Theme;
|
|
19
|
+
/** Optional color for the empty portion of the bar. */
|
|
20
|
+
emptyColor?: keyof Theme;
|
|
21
|
+
}): React.ReactNode;
|
|
22
|
+
//# sourceMappingURL=ProgressBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EAAE,UAAU,EACjB,KAAK,EACL,SAAS,EACT,UAAU,GACX,EAAE;IACD,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAA;IACb,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,KAAK,CAAA;IACvB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,KAAK,CAAA;CACzB,GAAG,KAAK,CAAC,SAAS,CAkBlB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Text from '../../ink/components/Text.js';
|
|
3
|
+
/**
|
|
4
|
+
* A proportional progress bar drawn with block glyphs, ported from the
|
|
5
|
+
* leak's design-system/ProgressBar.tsx: `█` fills whole cells, the partial
|
|
6
|
+
* cell uses the `▏▎▍▌▋▊▉` ladder for sub-cell precision, and the empty
|
|
7
|
+
* remainder is spaces with the empty color as background.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <ProgressBar ratio={0.42} width={20} fillColor="claude" emptyColor="inactive" />
|
|
11
|
+
*/
|
|
12
|
+
export function ProgressBar({ ratio: inputRatio, width, fillColor, emptyColor, }) {
|
|
13
|
+
const ratio = Math.min(1, Math.max(0, inputRatio));
|
|
14
|
+
const whole = Math.floor(ratio * width);
|
|
15
|
+
const segments = [BLOCKS[BLOCKS.length - 1].repeat(whole)];
|
|
16
|
+
if (whole < width) {
|
|
17
|
+
const remainder = ratio * width - whole;
|
|
18
|
+
const middle = Math.floor(remainder * BLOCKS.length);
|
|
19
|
+
segments.push(BLOCKS[middle]);
|
|
20
|
+
const empty = width - whole - 1;
|
|
21
|
+
if (empty > 0) {
|
|
22
|
+
segments.push(BLOCKS[0].repeat(empty));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return (_jsx(Text, { color: fillColor, backgroundColor: emptyColor, children: segments.join('') }));
|
|
26
|
+
}
|
|
27
|
+
const BLOCKS = [' ', '▏', '▎', '▍', '▌', '▋', '▊', '▉', '█'];
|