UNPKG

@shutootaki/gwm

Version:
18 lines 753 B
interface UseEditableTextOptions { /** 初期文字列 */ initialValue?: string; /** 入力として扱わずスキップする文字(例: MultiSelectList のスペース) */ skipChars?: string[]; } /** * Ink の useInput を用いたカーソル付き文字列編集ロジックを共通化したカスタムフック。 * TextInput / SelectList / MultiSelectList で共通のショートカットに対応する。 */ export declare function useEditableText(options?: UseEditableTextOptions): { readonly value: string; readonly setValue: (newValue: string) => void; readonly cursorPosition: number; readonly setCursorPosition: (newPos: number) => void; }; export {}; //# sourceMappingURL=useEditableText.d.ts.map