@inquirer/select
Advanced tools
+1
-2
@@ -1,2 +0,2 @@ | ||
| import { Separator, type Theme, type Keybinding } from '@inquirer/core'; | ||
| import { Separator, type Theme } from '@inquirer/core'; | ||
| import type { PartialDeep } from '@inquirer/type'; | ||
@@ -16,3 +16,2 @@ type SelectTheme = { | ||
| indexMode: 'hidden' | 'number'; | ||
| keybindings: ReadonlyArray<Keybinding>; | ||
| }; | ||
@@ -19,0 +18,0 @@ type Choice<Value> = { |
+1
-3
@@ -16,3 +16,2 @@ import { createPrompt, useState, useKeypress, usePrefix, usePagination, useRef, useMemo, useEffect, isBackspaceKey, isEnterKey, isUpKey, isDownKey, isNumberKey, Separator, ValidationError, makeTheme, } from '@inquirer/core'; | ||
| indexMode: 'hidden', | ||
| keybindings: [], | ||
| }; | ||
@@ -59,4 +58,3 @@ function isSelectable(item) { | ||
| const searchTimeoutRef = useRef(); | ||
| // Vim keybindings (j/k) conflict with typing those letters in search, | ||
| // so search must be disabled when vim bindings are enabled | ||
| // Vim keybindings (j/k) conflict with typing those letters in search. | ||
| const searchEnabled = !keybindings.includes('vim'); | ||
@@ -63,0 +61,0 @@ const items = useMemo(() => normalizeChoices(config.choices), [config.choices]); |
+6
-6
| { | ||
| "name": "@inquirer/select", | ||
| "version": "5.1.5", | ||
| "version": "5.2.0", | ||
| "description": "Inquirer select/list prompt", | ||
@@ -70,6 +70,6 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@inquirer/ansi": "^2.0.5", | ||
| "@inquirer/core": "^11.1.10", | ||
| "@inquirer/figures": "^2.0.5", | ||
| "@inquirer/type": "^4.0.5" | ||
| "@inquirer/ansi": "^2.0.6", | ||
| "@inquirer/core": "^11.2.0", | ||
| "@inquirer/figures": "^2.0.6", | ||
| "@inquirer/type": "^4.0.6" | ||
| }, | ||
@@ -92,3 +92,3 @@ "devDependencies": { | ||
| "types": "./dist/index.d.ts", | ||
| "gitHead": "113558c67f0d781d774cf3cf4db48fbcd8738b13" | ||
| "gitHead": "5ca6d1101d5d3f8fb066cd5b389bccfdafbbe0c0" | ||
| } |
+7
-0
@@ -123,2 +123,8 @@ # `@inquirer/select` | ||
| ## Keybindings | ||
| Set `INQUIRER_KEYBINDINGS=vim`, `INQUIRER_KEYBINDINGS=emacs`, or `INQUIRER_KEYBINDINGS=vim,emacs` to enable alternative navigation keybindings globally. | ||
| When Vim keybindings are enabled, the prompt disables type-to-search so navigation keys are not interpreted as search input. You can override the environment setting per prompt with `theme.keybindings`. | ||
| ## Theming | ||
@@ -149,2 +155,3 @@ | ||
| indexMode: 'hidden' | 'number'; | ||
| keybindings: readonly ('emacs' | 'vim')[]; | ||
| }; | ||
@@ -151,0 +158,0 @@ ``` |
17560
1.57%189
3.85%225
-1.32%Updated
Updated
Updated
Updated