{"_id":"@inquirer/rawlist@5.3.8","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"8f8e20205e9e865f09435a9023bf85b9b5d264f1","tarball":"http://registry-npm.ywwl.com/@inquirer/rawlist/download/@inquirer/rawlist-5.3.8.tgz","integrity":"sha512-h+6Y4pPvYvuRbksn1kIBdD9tCYD+E468W5sIcVfLmoLP5IasnY0r33N+r+46ej/P8b2PCREjyKR+MnnfPGdTzg==","fileCount":5,"unpackedSize":14410,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@inquirer%2frawlist@5.3.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEElYAUINs0TNvHAr7v+zlIf/ppPqAZe6Vbn6HtBDqmpAiEA+UgoOAmZxhxYSXMIzG4TPRQPAuaCJGNikw7vHjBlda0="}],"size":5082,"noattachment":false,"key":"/@inquirer/rawlist/-/@inquirer/rawlist-5.3.8.tgz"},"main":"./dist/index.js","name":"@inquirer/rawlist","type":"module","types":"./dist/index.d.ts","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"engines":{"node":">=23.5.0 || ^22.13.0 || ^20.17.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"672b77f0486388d7f5c35487d89a5ff63f4c54dd","license":"MIT","scripts":{"tsc":"tsc"},"version":"5.3.8","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"1e565457-3255-4840-bc99-802eb6495506"},"approver":{"name":"sboudrias","email":"admin@simonboudrias.com"}},"homepage":"https://github.com/SBoudrias/Inquirer.js/blob/HEAD/packages/rawlist/README.md","keywords":["answer","answers","ask","base","cli","command","command-line","confirm","enquirer","generate","generator","hyper","input","inquire","inquirer","interface","iterm","javascript","menu","node","nodejs","prompt","promptly","prompts","question","readline","scaffold","scaffolder","scaffolding","stdin","stdout","terminal","tty","ui","yeoman","yo","zsh"],"repository":{"url":"git+https://github.com/SBoudrias/Inquirer.js.git","type":"git"},"_npmVersion":"lerna/5.6.4/node@v24.21.0+x64 (linux)","description":"Inquirer rawlist prompt","directories":{},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"mischah","email":"mail@michael-kuehnel.de"}],"sideEffects":false,"_nodeVersion":"24.21.0","dependencies":{"@inquirer/core":"^12.0.6","@inquirer/type":"4.2.1"},"publishConfig":{"access":"public"},"devDependencies":{"typescript":"^7.0.2","@repo/tsconfig":"0.0.0"},"peerDependencies":{"@types/node":">=18"},"peerDependenciesMeta":{"@types/node":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rawlist_5.3.8_1793062222234_0.9823419489686656"},"_hasShrinkwrap":false,"readme":"# `@inquirer/rawlist`\n\nSimple interactive command line prompt to display a raw list of choices (single value select) with minimal interaction.\n\n![rawlist prompt](https://cdn.rawgit.com/SBoudrias/Inquirer.js/28ae8337ba51d93e359ef4f7ee24e79b69898962/assets/screenshots/rawlist.svg)\n\n# Installation\n\n<table>\n<tr>\n  <th>yarn</th>\n  <th>pnpm</th>\n</tr>\n<tr>\n<td>\n\n```sh\nyarn add @inquirer/prompts\n```\n\n</td>\n<td>\n\n```sh\npnpm add @inquirer/prompts\n```\n\n</td>\n</tr>\n<tr>\n  <th>bun</th>\n  <th>deno</th>\n</tr>\n<tr>\n<td>\n\n```sh\nbun add @inquirer/prompts\n```\n\n</td>\n<td>\n\n```sh\ndeno add npm:@inquirer/prompts\n```\n\n</td>\n</tr>\n<tr>\n<th colSpan=\"2\">npm</th>\n</tr>\n<tr>\n<td colSpan=\"2\">\n\n```sh\nnpm install @inquirer/prompts\n```\n\n</td>\n</tr>\n<tr>\n<td colSpan=\"2\" align=\"center\">Or</td>\n</tr>\n<tr>\n  <th>yarn</th>\n  <th>pnpm</th>\n</tr>\n<tr>\n<td>\n\n```sh\nyarn add @inquirer/rawlist\n```\n\n</td>\n<td>\n\n```sh\npnpm add @inquirer/rawlist\n```\n\n</td>\n</tr>\n<tr>\n  <th>bun</th>\n  <th>deno</th>\n</tr>\n<tr>\n<td>\n\n```sh\nbun add @inquirer/rawlist\n```\n\n</td>\n<td>\n\n```sh\ndeno add npm:@inquirer/rawlist\n```\n\n</td>\n</tr>\n<tr>\n<th colSpan=\"2\">npm</th>\n</tr>\n<tr>\n<td colSpan=\"2\">\n\n```sh\nnpm install @inquirer/rawlist\n```\n\n</td>\n</tr>\n</table>\n\nOn Deno, prompts detect the terminal's unicode and color support from the environment, so run your script with `--allow-env`.\n\n# Usage\n\n```js\nimport { rawlist } from '@inquirer/prompts';\n// Or\n// import rawlist from '@inquirer/rawlist';\n\nconst answer = await rawlist({\n  message: 'Select a package manager',\n  choices: [\n    { name: 'npm', value: 'npm' },\n    { name: 'yarn', value: 'yarn' },\n    { name: 'pnpm', value: 'pnpm' },\n  ],\n});\n```\n\n## Options\n\n| Property | Type                    | Required | Description                                                                                                                       |\n| -------- | ----------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |\n| message  | `string`                | yes      | The question to ask                                                                                                               |\n| choices  | `Choice[]`              | yes      | List of the available choices.                                                                                                    |\n| loop     | `boolean`               | no       | Defaults to `true`. When set to `false`, the cursor will be constrained to the top and bottom of the choice list without looping. |\n| default  | `Value`                 | no       | The value of the choice to preselect. If the value is not found, no choice is preselected.                                        |\n| theme    | [See Theming](#Theming) | no       | Customize look of the prompt.                                                                                                     |\n\n`Separator` objects can be used in the `choices` array to render non-selectable lines in the choice list. By default it'll render a line, but you can provide the text as argument (`new Separator('-- Dependencies --')`). This option is often used to add labels to groups within long list of options.\n\n### `Choice` object\n\nThe `Choice` object is typed as\n\n```ts\ntype Choice<Value> = {\n  value: Value;\n  name?: string;\n  short?: string;\n  key?: string;\n  description?: string;\n};\n```\n\nHere's each property:\n\n- `value`: The value is what will be returned by `await rawlist()`.\n- `name`: This is the string displayed in the choice list.\n- `short`: Once the prompt is done (press enter), we'll use `short` if defined to render next to the question. By default we'll use `name`.\n- `key`: The key of the choice. Displayed as `key) name`.\n- `description`: Option description which appears below the list when the choice is selected.\n\n`choices` can also be an array of string, in which case the string will be used both as the `value` and the `name`.\n\n## Keybindings\n\nSet `INQUIRER_KEYBINDINGS=vim`, `INQUIRER_KEYBINDINGS=emacs`, or `INQUIRER_KEYBINDINGS=vim,emacs` to enable alternative navigation keybindings globally.\n\nYou can override the environment setting per prompt with `theme.keybindings`.\n\n## Theming\n\nYou can theme a prompt by passing a `theme` object option. The theme object only need to includes the keys you wish to modify, we'll fallback on the defaults for the rest.\n\n```ts\ntype Theme = {\n  prefix: string | { idle: string; done: string };\n  spinner: {\n    interval: number;\n    frames: string[];\n  };\n  style: {\n    answer: (text: string) => string;\n    message: (text: string, status: 'idle' | 'done' | 'loading') => string;\n    error: (text: string) => string;\n    highlight: (text: string) => string;\n    description: (text: string) => string;\n  };\n  keybindings: readonly ('emacs' | 'vim')[];\n};\n```\n\n# License\n\nCopyright (c) 2023 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))<br/>\nLicensed under the MIT license.\n","publish_time":1793062222331,"_cnpm_publish_time":1793062222331,"dist-tags":{"latest":"5.4.0"}}