| 7 | * Options for the {@link text} prompt |
| 8 | */ |
| 9 | export interface TextOptions extends CommonOptions { |
| 10 | /** |
| 11 | * The prompt message or question shown to the user above the input. |
| 12 | */ |
| 13 | message: string; |
| 14 | |
| 15 | /** |
| 16 | * A visual hint shown when the field has no content. |
| 17 | */ |
| 18 | placeholder?: string; |
| 19 | |
| 20 | /** |
| 21 | * A fallback value returned when the user provides nothing (empty input). |
| 22 | */ |
| 23 | defaultValue?: string; |
| 24 | |
| 25 | /** |
| 26 | * The starting value shown when the prompt first renders. |
| 27 | * Users can edit this value before submitting. |
| 28 | */ |
| 29 | initialValue?: string; |
| 30 | |
| 31 | /** |
| 32 | * A function or a [Standard Schema](https://github.com/standard-schema/standard-schema) |
| 33 | * that validates user input. If a custom function is given, you should return a `string` or `Error` |
| 34 | * to show as a validation error, or `undefined` to accept the result. |
| 35 | */ |
| 36 | validate?: Validate<string>; |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * The text prompt accepts a single line of text. |
nothing calls this directly
no outgoing calls
no test coverage detected