@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,249 @@
|
|
|
1
|
+
import Yoga, { Align, Direction, Display, Edge, FlexDirection, Gutter, Justify, MeasureMode, Overflow, PositionType, Wrap, } from '../../native-ts/yoga-layout/index.js';
|
|
2
|
+
import { LayoutDisplay, LayoutMeasureMode, } from './node.js';
|
|
3
|
+
// --
|
|
4
|
+
// Edge/Gutter mapping
|
|
5
|
+
const EDGE_MAP = {
|
|
6
|
+
all: Edge.All,
|
|
7
|
+
horizontal: Edge.Horizontal,
|
|
8
|
+
vertical: Edge.Vertical,
|
|
9
|
+
left: Edge.Left,
|
|
10
|
+
right: Edge.Right,
|
|
11
|
+
top: Edge.Top,
|
|
12
|
+
bottom: Edge.Bottom,
|
|
13
|
+
start: Edge.Start,
|
|
14
|
+
end: Edge.End,
|
|
15
|
+
};
|
|
16
|
+
const GUTTER_MAP = {
|
|
17
|
+
all: Gutter.All,
|
|
18
|
+
column: Gutter.Column,
|
|
19
|
+
row: Gutter.Row,
|
|
20
|
+
};
|
|
21
|
+
// --
|
|
22
|
+
// Yoga adapter
|
|
23
|
+
/**
|
|
24
|
+
* Yoga-backed implementation of `LayoutNode`.
|
|
25
|
+
*
|
|
26
|
+
* Wraps a yoga-layout node, mapping layout enums to their Yoga counterparts
|
|
27
|
+
* and translating measure-mode values across the adapter boundary. The
|
|
28
|
+
* underlying Yoga instance is synchronous and available at import time.
|
|
29
|
+
*/
|
|
30
|
+
export class YogaLayoutNode {
|
|
31
|
+
/** The underlying Yoga node this adapter wraps. */
|
|
32
|
+
yoga;
|
|
33
|
+
constructor(yoga) {
|
|
34
|
+
this.yoga = yoga;
|
|
35
|
+
}
|
|
36
|
+
// Tree
|
|
37
|
+
insertChild(child, index) {
|
|
38
|
+
this.yoga.insertChild(child.yoga, index);
|
|
39
|
+
}
|
|
40
|
+
removeChild(child) {
|
|
41
|
+
this.yoga.removeChild(child.yoga);
|
|
42
|
+
}
|
|
43
|
+
getChildCount() {
|
|
44
|
+
return this.yoga.getChildCount();
|
|
45
|
+
}
|
|
46
|
+
getParent() {
|
|
47
|
+
const p = this.yoga.getParent();
|
|
48
|
+
return p ? new YogaLayoutNode(p) : null;
|
|
49
|
+
}
|
|
50
|
+
// Layout
|
|
51
|
+
calculateLayout(width, _height) {
|
|
52
|
+
this.yoga.calculateLayout(width, undefined, Direction.LTR);
|
|
53
|
+
}
|
|
54
|
+
setMeasureFunc(fn) {
|
|
55
|
+
this.yoga.setMeasureFunc((w, wMode) => {
|
|
56
|
+
const mode = wMode === MeasureMode.Exactly
|
|
57
|
+
? LayoutMeasureMode.Exactly
|
|
58
|
+
: wMode === MeasureMode.AtMost
|
|
59
|
+
? LayoutMeasureMode.AtMost
|
|
60
|
+
: LayoutMeasureMode.Undefined;
|
|
61
|
+
return fn(w, mode);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
unsetMeasureFunc() {
|
|
65
|
+
this.yoga.unsetMeasureFunc();
|
|
66
|
+
}
|
|
67
|
+
markDirty() {
|
|
68
|
+
this.yoga.markDirty();
|
|
69
|
+
}
|
|
70
|
+
// Computed layout
|
|
71
|
+
getComputedLeft() {
|
|
72
|
+
return this.yoga.getComputedLeft();
|
|
73
|
+
}
|
|
74
|
+
getComputedTop() {
|
|
75
|
+
return this.yoga.getComputedTop();
|
|
76
|
+
}
|
|
77
|
+
getComputedWidth() {
|
|
78
|
+
return this.yoga.getComputedWidth();
|
|
79
|
+
}
|
|
80
|
+
getComputedHeight() {
|
|
81
|
+
return this.yoga.getComputedHeight();
|
|
82
|
+
}
|
|
83
|
+
getComputedBorder(edge) {
|
|
84
|
+
return this.yoga.getComputedBorder(EDGE_MAP[edge]);
|
|
85
|
+
}
|
|
86
|
+
getComputedPadding(edge) {
|
|
87
|
+
return this.yoga.getComputedPadding(EDGE_MAP[edge]);
|
|
88
|
+
}
|
|
89
|
+
// Style setters
|
|
90
|
+
setWidth(value) {
|
|
91
|
+
this.yoga.setWidth(value);
|
|
92
|
+
}
|
|
93
|
+
setWidthPercent(value) {
|
|
94
|
+
this.yoga.setWidthPercent(value);
|
|
95
|
+
}
|
|
96
|
+
setWidthAuto() {
|
|
97
|
+
this.yoga.setWidthAuto();
|
|
98
|
+
}
|
|
99
|
+
setHeight(value) {
|
|
100
|
+
this.yoga.setHeight(value);
|
|
101
|
+
}
|
|
102
|
+
setHeightPercent(value) {
|
|
103
|
+
this.yoga.setHeightPercent(value);
|
|
104
|
+
}
|
|
105
|
+
setHeightAuto() {
|
|
106
|
+
this.yoga.setHeightAuto();
|
|
107
|
+
}
|
|
108
|
+
setMinWidth(value) {
|
|
109
|
+
this.yoga.setMinWidth(value);
|
|
110
|
+
}
|
|
111
|
+
setMinWidthPercent(value) {
|
|
112
|
+
this.yoga.setMinWidthPercent(value);
|
|
113
|
+
}
|
|
114
|
+
setMinHeight(value) {
|
|
115
|
+
this.yoga.setMinHeight(value);
|
|
116
|
+
}
|
|
117
|
+
setMinHeightPercent(value) {
|
|
118
|
+
this.yoga.setMinHeightPercent(value);
|
|
119
|
+
}
|
|
120
|
+
setMaxWidth(value) {
|
|
121
|
+
this.yoga.setMaxWidth(value);
|
|
122
|
+
}
|
|
123
|
+
setMaxWidthPercent(value) {
|
|
124
|
+
this.yoga.setMaxWidthPercent(value);
|
|
125
|
+
}
|
|
126
|
+
setMaxHeight(value) {
|
|
127
|
+
this.yoga.setMaxHeight(value);
|
|
128
|
+
}
|
|
129
|
+
setMaxHeightPercent(value) {
|
|
130
|
+
this.yoga.setMaxHeightPercent(value);
|
|
131
|
+
}
|
|
132
|
+
setFlexDirection(dir) {
|
|
133
|
+
const map = {
|
|
134
|
+
row: FlexDirection.Row,
|
|
135
|
+
'row-reverse': FlexDirection.RowReverse,
|
|
136
|
+
column: FlexDirection.Column,
|
|
137
|
+
'column-reverse': FlexDirection.ColumnReverse,
|
|
138
|
+
};
|
|
139
|
+
this.yoga.setFlexDirection(map[dir]);
|
|
140
|
+
}
|
|
141
|
+
setFlexGrow(value) {
|
|
142
|
+
this.yoga.setFlexGrow(value);
|
|
143
|
+
}
|
|
144
|
+
setFlexShrink(value) {
|
|
145
|
+
this.yoga.setFlexShrink(value);
|
|
146
|
+
}
|
|
147
|
+
setFlexBasis(value) {
|
|
148
|
+
this.yoga.setFlexBasis(value);
|
|
149
|
+
}
|
|
150
|
+
setFlexBasisPercent(value) {
|
|
151
|
+
this.yoga.setFlexBasisPercent(value);
|
|
152
|
+
}
|
|
153
|
+
setFlexWrap(wrap) {
|
|
154
|
+
const map = {
|
|
155
|
+
nowrap: Wrap.NoWrap,
|
|
156
|
+
wrap: Wrap.Wrap,
|
|
157
|
+
'wrap-reverse': Wrap.WrapReverse,
|
|
158
|
+
};
|
|
159
|
+
this.yoga.setFlexWrap(map[wrap]);
|
|
160
|
+
}
|
|
161
|
+
setAlignItems(align) {
|
|
162
|
+
const map = {
|
|
163
|
+
auto: Align.Auto,
|
|
164
|
+
stretch: Align.Stretch,
|
|
165
|
+
'flex-start': Align.FlexStart,
|
|
166
|
+
center: Align.Center,
|
|
167
|
+
'flex-end': Align.FlexEnd,
|
|
168
|
+
};
|
|
169
|
+
this.yoga.setAlignItems(map[align]);
|
|
170
|
+
}
|
|
171
|
+
setAlignSelf(align) {
|
|
172
|
+
const map = {
|
|
173
|
+
auto: Align.Auto,
|
|
174
|
+
stretch: Align.Stretch,
|
|
175
|
+
'flex-start': Align.FlexStart,
|
|
176
|
+
center: Align.Center,
|
|
177
|
+
'flex-end': Align.FlexEnd,
|
|
178
|
+
};
|
|
179
|
+
this.yoga.setAlignSelf(map[align]);
|
|
180
|
+
}
|
|
181
|
+
setJustifyContent(justify) {
|
|
182
|
+
const map = {
|
|
183
|
+
'flex-start': Justify.FlexStart,
|
|
184
|
+
center: Justify.Center,
|
|
185
|
+
'flex-end': Justify.FlexEnd,
|
|
186
|
+
'space-between': Justify.SpaceBetween,
|
|
187
|
+
'space-around': Justify.SpaceAround,
|
|
188
|
+
'space-evenly': Justify.SpaceEvenly,
|
|
189
|
+
};
|
|
190
|
+
this.yoga.setJustifyContent(map[justify]);
|
|
191
|
+
}
|
|
192
|
+
setDisplay(display) {
|
|
193
|
+
this.yoga.setDisplay(display === 'flex' ? Display.Flex : Display.None);
|
|
194
|
+
}
|
|
195
|
+
getDisplay() {
|
|
196
|
+
return this.yoga.getDisplay() === Display.None
|
|
197
|
+
? LayoutDisplay.None
|
|
198
|
+
: LayoutDisplay.Flex;
|
|
199
|
+
}
|
|
200
|
+
setPositionType(type) {
|
|
201
|
+
this.yoga.setPositionType(type === 'absolute' ? PositionType.Absolute : PositionType.Relative);
|
|
202
|
+
}
|
|
203
|
+
setPosition(edge, value) {
|
|
204
|
+
this.yoga.setPosition(EDGE_MAP[edge], value);
|
|
205
|
+
}
|
|
206
|
+
setPositionPercent(edge, value) {
|
|
207
|
+
this.yoga.setPositionPercent(EDGE_MAP[edge], value);
|
|
208
|
+
}
|
|
209
|
+
setOverflow(overflow) {
|
|
210
|
+
const map = {
|
|
211
|
+
visible: Overflow.Visible,
|
|
212
|
+
hidden: Overflow.Hidden,
|
|
213
|
+
scroll: Overflow.Scroll,
|
|
214
|
+
};
|
|
215
|
+
this.yoga.setOverflow(map[overflow]);
|
|
216
|
+
}
|
|
217
|
+
setMargin(edge, value) {
|
|
218
|
+
this.yoga.setMargin(EDGE_MAP[edge], value);
|
|
219
|
+
}
|
|
220
|
+
setPadding(edge, value) {
|
|
221
|
+
this.yoga.setPadding(EDGE_MAP[edge], value);
|
|
222
|
+
}
|
|
223
|
+
setBorder(edge, value) {
|
|
224
|
+
this.yoga.setBorder(EDGE_MAP[edge], value);
|
|
225
|
+
}
|
|
226
|
+
setGap(gutter, value) {
|
|
227
|
+
this.yoga.setGap(GUTTER_MAP[gutter], value);
|
|
228
|
+
}
|
|
229
|
+
// Lifecycle
|
|
230
|
+
free() {
|
|
231
|
+
this.yoga.free();
|
|
232
|
+
}
|
|
233
|
+
freeRecursive() {
|
|
234
|
+
this.yoga.freeRecursive();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
// --
|
|
238
|
+
// Instance management
|
|
239
|
+
//
|
|
240
|
+
// The TS yoga-layout port is synchronous — no WASM loading, no linear memory
|
|
241
|
+
// growth, so no preload/swap/reset machinery is needed. The Yoga instance is
|
|
242
|
+
// just a plain JS object available at import time.
|
|
243
|
+
/**
|
|
244
|
+
* Create a new layout node backed by a fresh Yoga node.
|
|
245
|
+
* @returns a `YogaLayoutNode` with no children, styles, or measure function.
|
|
246
|
+
*/
|
|
247
|
+
export function createYogaLayoutNode() {
|
|
248
|
+
return new YogaLayoutNode(Yoga.Node.create());
|
|
249
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Measure the display width of a line, cached per line across calls.
|
|
3
|
+
* Completed lines are immutable during streaming, so caching avoids
|
|
4
|
+
* re-measuring hundreds of unchanged lines on every token.
|
|
5
|
+
* @param line - the line to measure.
|
|
6
|
+
* @returns the display width in terminal cells.
|
|
7
|
+
*/
|
|
8
|
+
export declare function lineWidth(line: string): number;
|
|
9
|
+
//# sourceMappingURL=line-width-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-width-cache.d.ts","sourceRoot":"","sources":["../../../src/ink/line-width-cache.ts"],"names":[],"mappings":"AA0BA;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkB9C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { stringWidth } from './stringWidth.js';
|
|
2
|
+
// During streaming, text grows but completed lines are immutable.
|
|
3
|
+
// Caching stringWidth per-line avoids re-measuring hundreds of
|
|
4
|
+
// unchanged lines on every token (~50x reduction in stringWidth calls).
|
|
5
|
+
const cache = new Map();
|
|
6
|
+
const MAX_CACHE_SIZE = 4096;
|
|
7
|
+
const MAX_CACHE_CHARS = 100_000;
|
|
8
|
+
// Lines longer than this are never cached: the cache key would retain the
|
|
9
|
+
// whole line, and during streaming the growing last line changes every
|
|
10
|
+
// frame (zero reuse for the cost of a full copy per frame).
|
|
11
|
+
const MAX_CACHEABLE_LINE = 500;
|
|
12
|
+
let cacheChars = 0;
|
|
13
|
+
/**
|
|
14
|
+
* Copy a string into a fresh flat string with no parent references.
|
|
15
|
+
* A line substring'd out of a large streaming buffer is a V8 SlicedString
|
|
16
|
+
* that pins the entire parent (the full message text); using it directly
|
|
17
|
+
* as a cache key retains the parent for the lifetime of the entry.
|
|
18
|
+
*/
|
|
19
|
+
function detachString(s) {
|
|
20
|
+
return Buffer.from(s, 'utf8').toString('utf8');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Measure the display width of a line, cached per line across calls.
|
|
24
|
+
* Completed lines are immutable during streaming, so caching avoids
|
|
25
|
+
* re-measuring hundreds of unchanged lines on every token.
|
|
26
|
+
* @param line - the line to measure.
|
|
27
|
+
* @returns the display width in terminal cells.
|
|
28
|
+
*/
|
|
29
|
+
export function lineWidth(line) {
|
|
30
|
+
const cached = cache.get(line);
|
|
31
|
+
if (cached !== undefined)
|
|
32
|
+
return cached;
|
|
33
|
+
const width = stringWidth(line);
|
|
34
|
+
if (line.length > MAX_CACHEABLE_LINE)
|
|
35
|
+
return width;
|
|
36
|
+
// Evict when cache grows too large (e.g. after many different responses).
|
|
37
|
+
// Simple full-clear is fine — the cache repopulates in one frame.
|
|
38
|
+
if (cache.size >= MAX_CACHE_SIZE || cacheChars + line.length > MAX_CACHE_CHARS) {
|
|
39
|
+
cache.clear();
|
|
40
|
+
cacheChars = 0;
|
|
41
|
+
}
|
|
42
|
+
cache.set(detachString(line), width);
|
|
43
|
+
cacheChars += line.length;
|
|
44
|
+
return width;
|
|
45
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Diff, Frame } from './frame.js';
|
|
2
|
+
import { type StylePool } from './screen.js';
|
|
3
|
+
type Options = {
|
|
4
|
+
isTTY: boolean;
|
|
5
|
+
stylePool: StylePool;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Converts frame diffs into terminal write patches. Holds per-instance
|
|
9
|
+
* state (previous output, style pool, TTY mode) across frames.
|
|
10
|
+
*/
|
|
11
|
+
export declare class LogUpdate {
|
|
12
|
+
private readonly options;
|
|
13
|
+
private state;
|
|
14
|
+
constructor(options: Options);
|
|
15
|
+
/**
|
|
16
|
+
* Request a one-shot viewport re-anchor on the next main-screen frame.
|
|
17
|
+
*
|
|
18
|
+
* The main-screen diff engine addresses rows purely relative to where it
|
|
19
|
+
* left the cursor — it has no absolute anchor and no way to notice when a
|
|
20
|
+
* third party moved it. A subprocess writing directly to the tty (an MCP
|
|
21
|
+
* server's stderr, a stray native log line — issue #17) advances the
|
|
22
|
+
* cursor and scrolls the terminal; every subsequent diff then lands N
|
|
23
|
+
* rows off, garbling the UI (missing labels, shifted rows — issue #16)
|
|
24
|
+
* until some full repaint happens to run. There is nothing to detect
|
|
25
|
+
* after the fact (a newline-terminated write parks the cursor back at
|
|
26
|
+
* the bottom column 0, exactly where the engine expects it), so the
|
|
27
|
+
* recovery is a blind idempotent repaint: rebuild the viewport from the
|
|
28
|
+
* physical cursor position, which re-syncs the virtual↔physical mapping
|
|
29
|
+
* no matter how far they had drifted. Wired to the stdin-gap reassert
|
|
30
|
+
* (>5s idle then a keypress) — the same trigger that re-asserts DEC
|
|
31
|
+
* modes after tmux attach / ssh reconnect.
|
|
32
|
+
*/
|
|
33
|
+
requestViewportReanchor(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Render the terminal state for a finished run, for streams that no
|
|
36
|
+
* longer support string output.
|
|
37
|
+
* @param prevFrame - the previously rendered frame.
|
|
38
|
+
* @returns the patches that restore the terminal to the previous frame's state.
|
|
39
|
+
*/
|
|
40
|
+
renderPreviousOutput_DEPRECATED(prevFrame: Frame): Diff;
|
|
41
|
+
/** Drop the previous-output state after the process resumes from suspension (SIGCONT) so terminal content is not clobbered. */
|
|
42
|
+
reset(): void;
|
|
43
|
+
private renderFullFrame;
|
|
44
|
+
private getRenderOpsForDone;
|
|
45
|
+
/**
|
|
46
|
+
* Diff the previous and next frames and produce the patches that update
|
|
47
|
+
* the terminal from one to the other.
|
|
48
|
+
* @param prev - the previously rendered frame.
|
|
49
|
+
* @param next - the frame to render.
|
|
50
|
+
* @param altScreen - whether the frame renders to the alternate screen.
|
|
51
|
+
* @param decstbmSafe - whether the DECSTBM scroll sequence can be made atomic (DEC 2026 / BSU/ESU).
|
|
52
|
+
* @returns the terminal write patches.
|
|
53
|
+
*/
|
|
54
|
+
render(prev: Frame, next: Frame, altScreen?: boolean, decstbmSafe?: boolean): Diff;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=log-update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-update.d.ts","sourceRoot":"","sources":["../../../src/ink/log-update.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAiB,KAAK,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,EASL,KAAK,SAAS,EAGf,MAAM,aAAa,CAAA;AAqBpB,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AAKD;;;GAGG;AACH,qBAAa,SAAS;IAGR,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,KAAK,CAAO;gBAES,OAAO,EAAE,OAAO;IAO7C;;;;;;;;;;;;;;;;;OAiBG;IACH,uBAAuB,IAAI,IAAI;IAI/B;;;;;OAKG;IACH,+BAA+B,CAAC,SAAS,EAAE,KAAK,GAAG,IAAI;IASvD,+HAA+H;IAC/H,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,eAAe;IAiDvB,OAAO,CAAC,mBAAmB;IAS3B;;;;;;;;OAQG;IACH,MAAM,CACJ,IAAI,EAAE,KAAK,EACX,IAAI,EAAE,KAAK,EACX,SAAS,UAAQ,EACjB,WAAW,UAAO,GACjB,IAAI;CA6XR"}
|