File tree Expand file tree Collapse file tree 7 files changed +23
-6
lines changed
Expand file tree Collapse file tree 7 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 11export type { ClackState as State } from './types' ;
22export type { ClackSettings } from './utils/settings' ;
33
4+ export type { ConfirmOptions } from './prompts/confirm' ;
5+ export type { GroupMultiSelectOptions } from './prompts/group-multiselect' ;
6+ export type { MultiSelectOptions } from './prompts/multi-select' ;
7+ export type { PasswordOptions } from './prompts/password' ;
8+ export type { PromptOptions } from './prompts/prompt' ;
9+ export type { SelectOptions } from './prompts/select' ;
10+ export type { SelectKeyOptions } from './prompts/select-key' ;
11+ export type { TextOptions } from './prompts/text' ;
12+
413export { default as ConfirmPrompt } from './prompts/confirm' ;
514export { default as GroupMultiSelectPrompt } from './prompts/group-multiselect' ;
615export { default as MultiSelectPrompt } from './prompts/multi-select' ;
Original file line number Diff line number Diff line change 11import { cursor } from 'sisteransi' ;
22import Prompt , { type PromptOptions } from './prompt' ;
33
4- interface ConfirmOptions extends PromptOptions < ConfirmPrompt > {
4+ export interface ConfirmOptions extends PromptOptions < ConfirmPrompt > {
55 active : string ;
66 inactive : string ;
77 initialValue ?: boolean ;
88}
9+
910export default class ConfirmPrompt extends Prompt {
1011 get cursor ( ) {
1112 return this . value ? 0 : 1 ;
Original file line number Diff line number Diff line change 11import Prompt , { type PromptOptions } from './prompt' ;
22
3- interface GroupMultiSelectOptions < T extends { value : any } >
3+ export interface GroupMultiSelectOptions < T extends { value : any } >
44 extends PromptOptions < GroupMultiSelectPrompt < T > > {
55 options : Record < string , T [ ] > ;
66 initialValues ?: T [ 'value' ] [ ] ;
77 required ?: boolean ;
88 cursorAt ?: T [ 'value' ] ;
99}
10+
1011export default class GroupMultiSelectPrompt < T extends { value : any } > extends Prompt {
1112 options : ( T & { group : string | boolean } ) [ ] ;
1213 cursor = 0 ;
Original file line number Diff line number Diff line change 11import Prompt , { type PromptOptions } from './prompt' ;
22
3- interface MultiSelectOptions < T extends { value : any } > extends PromptOptions < MultiSelectPrompt < T > > {
3+ export interface MultiSelectOptions < T extends { value : any } >
4+ extends PromptOptions < MultiSelectPrompt < T > > {
45 options : T [ ] ;
56 initialValues ?: T [ 'value' ] [ ] ;
67 required ?: boolean ;
78 cursorAt ?: T [ 'value' ] ;
89}
10+
911export default class MultiSelectPrompt < T extends { value : any } > extends Prompt {
1012 options : T [ ] ;
1113 cursor = 0 ;
Original file line number Diff line number Diff line change 11import color from 'picocolors' ;
22import Prompt , { type PromptOptions } from './prompt' ;
33
4- interface PasswordOptions extends PromptOptions < PasswordPrompt > {
4+ export interface PasswordOptions extends PromptOptions < PasswordPrompt > {
55 mask ?: string ;
66}
7+
78export default class PasswordPrompt extends Prompt {
89 valueWithCursor = '' ;
910 private _mask = '•' ;
Original file line number Diff line number Diff line change 11import Prompt , { type PromptOptions } from './prompt' ;
22
3- interface SelectKeyOptions < T extends { value : any } > extends PromptOptions < SelectKeyPrompt < T > > {
3+ export interface SelectKeyOptions < T extends { value : any } >
4+ extends PromptOptions < SelectKeyPrompt < T > > {
45 options : T [ ] ;
56}
7+
68export default class SelectKeyPrompt < T extends { value : any } > extends Prompt {
79 options : T [ ] ;
810 cursor = 0 ;
Original file line number Diff line number Diff line change 11import Prompt , { type PromptOptions } from './prompt' ;
22
3- interface SelectOptions < T extends { value : any } > extends PromptOptions < SelectPrompt < T > > {
3+ export interface SelectOptions < T extends { value : any } > extends PromptOptions < SelectPrompt < T > > {
44 options : T [ ] ;
55 initialValue ?: T [ 'value' ] ;
66}
7+
78export default class SelectPrompt < T extends { value : any } > extends Prompt {
89 options : T [ ] ;
910 cursor = 0 ;
You can’t perform that action at this time.
0 commit comments