@hyperfrontend/questions 0.2.1 → 0.3.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/CHANGELOG.md +6 -0
- package/README.md +14 -5
- package/SECURITY.md +50 -15
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/math/index.cjs.js +4 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/math/index.esm.js +3 -1
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/promise/index.cjs.js +2 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/promise/index.esm.js +2 -1
- package/index.cjs.js +894 -278
- package/index.d.ts +16 -10
- package/index.esm.js +891 -275
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -110,17 +110,13 @@ interface MultiselectConfig<T = string> extends PromptConfig {
|
|
|
110
110
|
readonly searchable?: boolean;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
/**
|
|
114
|
-
* Confirmation prompt.
|
|
115
|
-
*
|
|
116
|
-
* @module @hyperfrontend/questions/prompts/confirm
|
|
117
|
-
*/
|
|
118
|
-
|
|
119
113
|
/**
|
|
120
114
|
* Prompts for yes/no confirmation.
|
|
121
115
|
*
|
|
122
116
|
* Pure functional prompt that asks a yes/no question and returns a boolean.
|
|
123
|
-
* Supports default values and responds to y/Y/n/N keys.
|
|
117
|
+
* Supports default values and responds to y/Y/n/N keys. A pasted
|
|
118
|
+
* `y`/`yes`/`n`/`no` (trimmed, case-insensitive) is accepted; any other
|
|
119
|
+
* paste is ignored. The prompt repaints on terminal resize.
|
|
124
120
|
*
|
|
125
121
|
* @param config - Confirm prompt configuration
|
|
126
122
|
* @returns Promise resolving to boolean value or cancellation
|
|
@@ -147,7 +143,10 @@ declare function confirm(config: ConfirmConfig): Promise<PromptOutcome<boolean>>
|
|
|
147
143
|
* Prompts for multiple selections from a list of choices.
|
|
148
144
|
*
|
|
149
145
|
* Pure functional prompt with arrow key navigation, space to toggle,
|
|
150
|
-
* scrolling support, min/max constraints, and optional type-to-filter
|
|
146
|
+
* scrolling support, min/max constraints, and optional type-to-filter
|
|
147
|
+
* search. In searchable mode, pasted text appends its first line to the
|
|
148
|
+
* filter query; pasting never toggles or submits. The prompt repaints on
|
|
149
|
+
* terminal resize, preserving cursor, selection, and scroll state.
|
|
151
150
|
*
|
|
152
151
|
* @param config - Multiselect prompt configuration
|
|
153
152
|
* @returns Promise resolving to array of selected values or cancellation
|
|
@@ -193,7 +192,10 @@ declare function multiselect<T = string>(config: MultiselectConfig<T>): Promise<
|
|
|
193
192
|
* Prompts for single selection from a list of choices.
|
|
194
193
|
*
|
|
195
194
|
* Pure functional prompt with arrow key navigation, scrolling support,
|
|
196
|
-
* optional disabled choices, and optional type-to-filter search.
|
|
195
|
+
* optional disabled choices, and optional type-to-filter search. In
|
|
196
|
+
* searchable mode, pasted text appends its first line to the filter query.
|
|
197
|
+
* The prompt repaints on terminal resize, preserving cursor and scroll
|
|
198
|
+
* state.
|
|
197
199
|
*
|
|
198
200
|
* @param config - Select prompt configuration
|
|
199
201
|
* @returns Promise resolving to selected value or cancellation
|
|
@@ -241,7 +243,11 @@ declare function select<T = string>(config: SelectConfig<T>): Promise<PromptOutc
|
|
|
241
243
|
* Prompts for text input with optional validation.
|
|
242
244
|
*
|
|
243
245
|
* Pure functional prompt that reads text from the user with support for
|
|
244
|
-
* default values, input validation, and display formatting.
|
|
246
|
+
* default values, input validation, and display formatting. Pasted text is
|
|
247
|
+
* sanitized (newlines collapse to spaces, control characters are removed)
|
|
248
|
+
* and inserted at the cursor without ever auto-submitting. The prompt
|
|
249
|
+
* repaints on terminal resize, preserving value, cursor, and any
|
|
250
|
+
* validation error.
|
|
245
251
|
*
|
|
246
252
|
* @param config - Text prompt configuration
|
|
247
253
|
* @returns Promise resolving to submitted value or cancellation
|