@clack/core
Advanced tools
Comparing version 0.1.6 to 0.1.7
# @clack/core | ||
## 0.1.7 | ||
### Patch Changes | ||
- 6d9e675: Add support for neovim cursor motion (`hjkl`) | ||
Thanks [@esau-morais](https://github.com/esau-morais) for the assist! | ||
## 0.1.6 | ||
@@ -4,0 +12,0 @@ |
@@ -39,12 +39,32 @@ import { Readable, Writable } from 'node:stream'; | ||
interface TextOptions extends PromptOptions<TextPrompt> { | ||
placeholder?: string; | ||
defaultValue?: string; | ||
interface ConfirmOptions extends PromptOptions<ConfirmPrompt> { | ||
active: string; | ||
inactive: string; | ||
initialValue?: boolean; | ||
} | ||
declare class TextPrompt extends Prompt { | ||
valueWithCursor: string; | ||
get cursor(): number; | ||
constructor(opts: TextOptions); | ||
declare class ConfirmPrompt extends Prompt { | ||
get cursor(): 0 | 1; | ||
private get _value(); | ||
constructor(opts: ConfirmOptions); | ||
} | ||
interface MultiSelectOptions<T extends { | ||
value: any; | ||
}> extends PromptOptions<MultiSelectPrompt<T>> { | ||
options: T[]; | ||
initialValue?: T['value'][]; | ||
required?: boolean; | ||
cursorAt?: T['value']; | ||
} | ||
declare class MultiSelectPrompt<T extends { | ||
value: any; | ||
}> extends Prompt { | ||
options: T[]; | ||
cursor: number; | ||
selectedValues: T[]; | ||
private get _value(); | ||
private changeValue; | ||
constructor(opts: MultiSelectOptions<T>); | ||
} | ||
interface PasswordOptions extends PromptOptions<PasswordPrompt> { | ||
@@ -77,33 +97,13 @@ mask?: string; | ||
interface ConfirmOptions extends PromptOptions<ConfirmPrompt> { | ||
active: string; | ||
inactive: string; | ||
initialValue?: boolean; | ||
interface TextOptions extends PromptOptions<TextPrompt> { | ||
placeholder?: string; | ||
defaultValue?: string; | ||
} | ||
declare class ConfirmPrompt extends Prompt { | ||
get cursor(): 0 | 1; | ||
private get _value(); | ||
constructor(opts: ConfirmOptions); | ||
declare class TextPrompt extends Prompt { | ||
valueWithCursor: string; | ||
get cursor(): number; | ||
constructor(opts: TextOptions); | ||
} | ||
interface MultiSelectOptions<T extends { | ||
value: any; | ||
}> extends PromptOptions<MultiSelectPrompt<T>> { | ||
options: T[]; | ||
initialValue?: T['value'][]; | ||
required?: boolean; | ||
cursorAt?: T['value']; | ||
} | ||
declare class MultiSelectPrompt<T extends { | ||
value: any; | ||
}> extends Prompt { | ||
options: T[]; | ||
cursor: number; | ||
selectedValues: T[]; | ||
private get _value(); | ||
private changeValue; | ||
constructor(opts: MultiSelectOptions<T>); | ||
} | ||
declare function block({ input, output, overwrite, hideCursor }?: { | ||
declare function block({ input, output, overwrite, hideCursor, }?: { | ||
input?: (NodeJS.ReadStream & { | ||
@@ -110,0 +110,0 @@ fd: 0; |
{ | ||
"name": "@clack/core", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.cjs", |
@@ -10,3 +10,3 @@ # `@clack/core` | ||
```js | ||
import { TextPrompt, isCancel } from "@clack/core"; | ||
import { TextPrompt, isCancel } from '@clack/core'; | ||
@@ -13,0 +13,0 @@ const p = new TextPrompt({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
22229
177