gitea push
This commit is contained in:
+8
@@ -1,5 +1,13 @@
|
||||
# @clack/core
|
||||
|
||||
## 1.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 78fd3ae: Remove unused `debug` option key.
|
||||
- ea5702e: fix: add engines field expressing node >=20.12 requirement
|
||||
- 814ab9a: Add new multiline prompt for multi-line text input.
|
||||
|
||||
## 1.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
+18
-4
@@ -100,7 +100,6 @@ interface PromptOptions<TValue, Self extends Prompt<TValue>> {
|
||||
validate?: ((value: TValue | undefined) => string | Error | undefined) | undefined;
|
||||
input?: Readable;
|
||||
output?: Writable;
|
||||
debug?: boolean;
|
||||
signal?: AbortSignal;
|
||||
}
|
||||
declare class Prompt<TValue> {
|
||||
@@ -148,6 +147,7 @@ declare class Prompt<TValue> {
|
||||
emit<T extends keyof ClackEvents<TValue>>(event: T, ...data: Parameters<ClackEvents<TValue>[T]>): void;
|
||||
prompt(): Promise<symbol | TValue | undefined>;
|
||||
protected _isActionKey(char: string | undefined, _key: Key): boolean;
|
||||
protected _shouldSubmit(_char: string | undefined, _key: Key): boolean;
|
||||
protected _setValue(value: TValue | undefined): void;
|
||||
protected _setUserInput(value: string | undefined, write?: boolean): void;
|
||||
protected _clearUserInput(): void;
|
||||
@@ -258,6 +258,20 @@ declare class GroupMultiSelectPrompt<T extends {
|
||||
constructor(opts: GroupMultiSelectOptions<T>);
|
||||
}
|
||||
|
||||
interface MultiLineOptions extends PromptOptions<string, MultiLinePrompt> {
|
||||
placeholder?: string;
|
||||
defaultValue?: string;
|
||||
showSubmit?: boolean;
|
||||
}
|
||||
declare class MultiLinePrompt extends Prompt<string> {
|
||||
#private;
|
||||
focused: 'editor' | 'submit';
|
||||
get userInputWithCursor(): string;
|
||||
get cursor(): number;
|
||||
protected _shouldSubmit(_char: string | undefined, _key: Key): boolean;
|
||||
constructor(opts: MultiLineOptions);
|
||||
}
|
||||
|
||||
interface OptionLike {
|
||||
value: any;
|
||||
disabled?: boolean;
|
||||
@@ -343,7 +357,7 @@ interface BlockOptions {
|
||||
declare function block({ input, output, overwrite, hideCursor, }?: BlockOptions): () => void;
|
||||
declare const getColumns: (output: Writable) => number;
|
||||
declare const getRows: (output: Writable) => number;
|
||||
declare function wrapTextWithPrefix(output: Writable | undefined, text: string, prefix: string, startPrefix?: string): string;
|
||||
declare function wrapTextWithPrefix(output: Writable | undefined, text: string, prefix: string, startPrefix?: string, lineFormatter?: (line: string, index: number) => string): string;
|
||||
|
||||
export { AutocompletePrompt, ConfirmPrompt, DatePrompt, GroupMultiSelectPrompt, MultiSelectPrompt, PasswordPrompt, Prompt, SelectKeyPrompt, SelectPrompt, TextPrompt, block, getColumns, getRows, isCancel, settings, updateSettings, wrapTextWithPrefix };
|
||||
export type { AutocompleteOptions, ClackSettings, ConfirmOptions, DateFormat, DateOptions, DateParts, GroupMultiSelectOptions, MultiSelectOptions, PasswordOptions, PromptOptions, SelectKeyOptions, SelectOptions, ClackState as State, TextOptions };
|
||||
export { AutocompletePrompt, ConfirmPrompt, DatePrompt, GroupMultiSelectPrompt, MultiLinePrompt, MultiSelectPrompt, PasswordPrompt, Prompt, SelectKeyPrompt, SelectPrompt, TextPrompt, block, getColumns, getRows, isCancel, settings, updateSettings, wrapTextWithPrefix };
|
||||
export type { AutocompleteOptions, ClackSettings, ConfirmOptions, DateFormat, DateOptions, DateParts, GroupMultiSelectOptions, MultiLineOptions, MultiSelectOptions, PasswordOptions, PromptOptions, SelectKeyOptions, SelectOptions, ClackState as State, TextOptions };
|
||||
|
||||
+16
-10
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+5
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@clack/core",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"type": "module",
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
@@ -46,8 +46,11 @@
|
||||
"url": "https://twitter.com/n_moore"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 20.12.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"fast-wrap-ansi": "^0.1.3",
|
||||
"fast-wrap-ansi": "^0.2.0",
|
||||
"sisteransi": "^1.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user