@wrongstack/tui 1.1.5 → 1.1.7

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.
@@ -122,6 +122,7 @@ export type AppActionSettings = {
122
122
  breakerAutoKillResetMs: number;
123
123
  showModelReasoning: boolean;
124
124
  toolResultViewMode: ToolResultViewMode;
125
+ selectionMode?: 'block' | 'text' | undefined;
125
126
  showAgentSwarmPanel: import('./app-settings-type.js').AgentSwarmPanelMode;
126
127
  showSidebar?: boolean | undefined;
127
128
  panelPositions: import('./ui-contracts.js').PanelPositionMap;
@@ -254,6 +254,7 @@ export type PanelState = {
254
254
  showModelReasoning: boolean;
255
255
  /** Global default for all committed tool-result cards. */
256
256
  toolResultViewMode: ToolResultViewMode;
257
+ selectionMode: 'block' | 'text';
257
258
  /** Agent swarm panel placement: 'bottom' (lower region), 'sidebar' (right sidebar), or 'off'. Default: 'bottom'. */
258
259
  showAgentSwarmPanel: import('./app-settings-type.js').AgentSwarmPanelMode;
259
260
  /** Right sidebar visibility (mirrors Settings.showSidebar). Default: true. */
@@ -77,6 +77,7 @@ export type Settings = {
77
77
  showModelReasoning: boolean;
78
78
  /** Default presentation density for committed TUI tool results. */
79
79
  toolResultViewMode?: ToolResultViewMode | undefined;
80
+ selectionMode?: 'block' | 'text' | undefined;
80
81
  /** Agent swarm panel placement: 'bottom' (lower region), 'sidebar' (right
81
82
  * sidebar, vertical), or 'off' (hidden). Default: 'bottom'.
82
83
  * Backward-compat: old boolean configs are coerced — true→'bottom', false→'off'. */
@@ -0,0 +1,25 @@
1
+ import type { DOMElement } from 'ink';
2
+ export interface CellPoint {
3
+ row: number;
4
+ col: number;
5
+ }
6
+ export interface CellRange {
7
+ anchor: CellPoint;
8
+ head: CellPoint;
9
+ }
10
+ export interface TextRun {
11
+ row: number;
12
+ col: number;
13
+ text: string;
14
+ }
15
+ export declare function orderedRange(range: CellRange): [CellPoint, CellPoint];
16
+ /** Display cells, never UTF-16 offsets; touching either half selects a whole grapheme. */
17
+ export declare function selectedRuns(runs: readonly TextRun[], range: CellRange): TextRun[];
18
+ export declare function selectionText(runs: readonly TextRun[], range: CellRange): string;
19
+ /** Read mounted text using Ink's Yoga geometry. Box borders are deliberately not text. */
20
+ export declare function mountedTextRuns(root: DOMElement): TextRun[];
21
+ export declare function screenOrigin(node: DOMElement): {
22
+ x: number;
23
+ y: number;
24
+ };
25
+ //# sourceMappingURL=cell-selection.d.ts.map
@@ -135,6 +135,7 @@ export interface HistoryScrollController {
135
135
  commitSelection(): Promise<boolean>;
136
136
  }
137
137
  export interface ScrollableHistoryProps extends HistoryProps {
138
+ selectionMode?: 'block' | 'text' | undefined;
138
139
  /** Intro timestamp, retained across viewport remounts until replayed or cleared. */
139
140
  bannerAnimationStartedAt?: number | undefined;
140
141
  onBannerReplay?: (() => void) | undefined;
@@ -1,3 +1,4 @@
1
+ import { type CellRange, type TextRun } from '../../cell-selection.js';
1
2
  import { type ScrollAnchor, type ScrollGeometry } from '../../scroll-anchor.js';
2
3
  import type { ToolResultViewMode } from '../../tool-result-view-mode.js';
3
4
  import type { CopyHit } from './copy-geometry.js';
@@ -6,6 +7,9 @@ import type { MountedCardSpan } from './scrollbar-geometry.js';
6
7
  import { type SelectionBandStore } from './selection-band-store.js';
7
8
  import type { HistoryEntry } from './types.js';
8
9
  interface UseHistoryControllerOptions {
10
+ selectionMode?: 'block' | 'text' | undefined;
11
+ readTextRuns?: (() => TextRun[]) | undefined;
12
+ onTextSelection?: ((range: CellRange | null, runs: readonly TextRun[]) => void) | undefined;
9
13
  geometry: ScrollGeometry;
10
14
  effectiveAnchor: ScrollAnchor | null;
11
15
  groupIds: readonly number[];
@@ -6,6 +6,9 @@ export declare const DEFAULT_INPUT_PROMPT: string;
6
6
  /** Columns available to input tokens inside the two-sided composer rail. */
7
7
  export declare function inputContentWidth(termColumns: number): number;
8
8
  export interface InputProps {
9
+ selectionMode?: 'block' | 'text' | undefined;
10
+ onSelectionModeToggle?: (() => void) | undefined;
11
+ onSelectionBegin?: (() => void) | undefined;
9
12
  prompt?: string | undefined;
10
13
  value: string;
11
14
  cursor: number;
@@ -91,5 +94,5 @@ export interface KeyEvent {
91
94
  fn?: number | undefined;
92
95
  }
93
96
  export declare const EMPTY_KEY: KeyEvent;
94
- export declare const Input: React.MemoExoticComponent<({ prompt, value, cursor, disabled, hint, title, railIcon, accent, status, animationStyle, workingTime, footerHint, hidden, placeholderHeight, onKey, maxWidth, }: InputProps) => React.ReactElement | null>;
97
+ export declare const Input: React.MemoExoticComponent<({ prompt, value, cursor, disabled, hint, title, railIcon, accent, status, animationStyle, workingTime, footerHint, hidden, placeholderHeight, onKey, maxWidth, selectionMode, onSelectionModeToggle, onSelectionBegin, }: InputProps) => React.ReactElement | null>;
95
98
  //# sourceMappingURL=input.d.ts.map
@@ -7,5 +7,5 @@ import type { ScrollableHistoryProps } from './history/scroll-controller-types.j
7
7
  /**
8
8
  * Bounded history viewport with stable-anchor virtual scrolling.
9
9
  */
10
- export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, streamingText, viewportRows, bannerAnimationStartedAt, onBannerReplay, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, nextStepsAutoSubmitLabel, nextStepsAutoSubmitDeadlineMs, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, layoutStore, copiedEntryId, markedEntryId, onRequestOlderEntries, toolResultViewMode, toolResultViewOverrides, onToolResultViewChange, }: ScrollableHistoryProps) => React.ReactElement>;
10
+ export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, streamingText, viewportRows, bannerAnimationStartedAt, onBannerReplay, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, nextStepsAutoSubmitLabel, nextStepsAutoSubmitDeadlineMs, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, layoutStore, copiedEntryId, markedEntryId, onRequestOlderEntries, selectionMode, toolResultViewMode, toolResultViewOverrides, onToolResultViewChange, }: ScrollableHistoryProps) => React.ReactElement>;
11
11
  //# sourceMappingURL=scrollable-history.d.ts.map
@@ -65,6 +65,7 @@ export interface SettingsPickerProps {
65
65
  /** Show the "Model Reasoning" blocks in chat history. Default: true. */
66
66
  showModelReasoning: boolean;
67
67
  toolResultViewMode: ToolResultViewMode;
68
+ selectionMode?: 'block' | 'text' | undefined;
68
69
  /** Agent swarm placement. */
69
70
  showAgentSwarmPanel: import('../app-settings-type.js').AgentSwarmPanelMode;
70
71
  /** Right sidebar master toggle. */
@@ -5,5 +5,5 @@ import type { SettingsPickerRowData } from './settings-picker-row-list.js';
5
5
  * each with its current value and a one-line description. Field order here
6
6
  * IS the field index the reducer and jump chords use.
7
7
  */
8
- export declare function buildSettingsPickerRows({ mode, delayMs, titleAnimation, yolo, fleetChat, chime, confirmExit, nextPrediction, featureMcp, featurePlugins, featureMemory, featureSkills, featureModelsRegistry, featureToolCoach, tokenSavingTier, allowOutsideProjectRoot, maxIterations, autoProceedMaxIterations, enhanceDelayMs, enhanceEnabled, enhanceLanguage, preRefineSeconds, indexOnStart, multiDiffSummaryThreshold, thinkingWord, thinkingWordEditing, thinkingWordDraft, wrongProxyUrlEditing, wrongProxyUrlDraft, reasoningMode, reasoningEffort, reasoningEffortLevels, reasoningPreserve, cacheTtl, contextAutoCompact, contextStrategy, contextMode, maxConcurrent, logLevel, auditLevel, debugStream, statuslineMode, configScope, animationStyle, breakerEnabled, breakerAutoKillResetMs, showModelReasoning, toolResultViewMode, showAgentSwarmPanel, showSidebar, showSageMemoryInject, sageMemoryInjectThreshold, nextStepsTool, nextStepsRequired, rememberStartupChoices, nextSystemPromptVariant, readSymbols, panelPositions, wrongProxyEnabled, wrongProxyUrl, }: SettingsPickerProps): SettingsPickerRowData[];
8
+ export declare function buildSettingsPickerRows({ mode, delayMs, titleAnimation, yolo, fleetChat, chime, confirmExit, nextPrediction, featureMcp, featurePlugins, featureMemory, featureSkills, featureModelsRegistry, featureToolCoach, tokenSavingTier, allowOutsideProjectRoot, maxIterations, autoProceedMaxIterations, enhanceDelayMs, enhanceEnabled, enhanceLanguage, preRefineSeconds, indexOnStart, multiDiffSummaryThreshold, thinkingWord, thinkingWordEditing, thinkingWordDraft, wrongProxyUrlEditing, wrongProxyUrlDraft, reasoningMode, reasoningEffort, reasoningEffortLevels, reasoningPreserve, cacheTtl, contextAutoCompact, contextStrategy, contextMode, maxConcurrent, logLevel, auditLevel, debugStream, statuslineMode, configScope, animationStyle, breakerEnabled, breakerAutoKillResetMs, showModelReasoning, toolResultViewMode, selectionMode, showAgentSwarmPanel, showSidebar, showSageMemoryInject, sageMemoryInjectThreshold, nextStepsTool, nextStepsRequired, rememberStartupChoices, nextSystemPromptVariant, readSymbols, panelPositions, wrongProxyEnabled, wrongProxyUrl, }: SettingsPickerProps): SettingsPickerRowData[];
9
9
  //# sourceMappingURL=settings-picker-rows.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { type CellRange, type TextRun } from '../cell-selection.js';
2
+ /** Absolute text-only feedback: never contributes rows to the managed viewport. */
3
+ export declare function TextSelectionOverlay({ runs, range, }: {
4
+ runs: readonly TextRun[];
5
+ range: CellRange | null;
6
+ }): import("react").JSX.Element[] | null;
7
+ //# sourceMappingURL=text-selection-overlay.d.ts.map
@@ -0,0 +1,26 @@
1
+ import { type CellRange, type TextRun } from '../cell-selection.js';
2
+ import type { DOMElement } from '../ink.js';
3
+ import type { MouseEventInfo } from '../mouse.js';
4
+ export interface ComposerPointerModel {
5
+ node: DOMElement | null;
6
+ runs: TextRun[];
7
+ width: number;
8
+ rows: number;
9
+ hidden: boolean;
10
+ disabled: boolean;
11
+ value: string;
12
+ scroll: number;
13
+ mode: 'block' | 'text';
14
+ toggle?: (() => void) | undefined;
15
+ begin?: (() => void) | undefined;
16
+ }
17
+ export declare function useComposerPointer(): {
18
+ model: import("react").RefObject<ComposerPointerModel | null>;
19
+ handle: (mouse: MouseEventInfo) => boolean;
20
+ selection: {
21
+ range: CellRange | null;
22
+ runs: TextRun[];
23
+ };
24
+ notice: string;
25
+ };
26
+ //# sourceMappingURL=use-composer-pointer.d.ts.map