{"name":"@inquirer/select","version":"0.0.19-alpha.0","keywords":["cli","prompt","command-line","input"],"author":{"name":"Simon Boudrias"},"license":"MIT","_id":"@inquirer/select@0.0.19-alpha.0","maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"danielchatfield","email":"chatfielddaniel@gmail.com"},{"name":"mischah","email":"mail@michael-kuehnel.de"}],"homepage":"https://github.com/SBoudrias/Inquirer.js/blob/master/packages/select/README.md","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"33bc02da204b0e6d1222b6189d087821b1fd9903","tarball":"http://registry-npm.ywwl.com/@inquirer/select/download/@inquirer/select-0.0.19-alpha.0.tgz","fileCount":5,"integrity":"sha512-PXn5puj6ff9wa7886p4PCM1/onNAoyRUk6LHDJQ9VE/G9/nmIfyA4JpXQ4nCGnwp623PmRP9J7r3M7pqZX/1+A==","signatures":[{"sig":"MEUCIC2ahVr1syapb/xvR6p2UFx9dPCkJ2uwoI2/2p1ICBcgAiEAoGv2TARv1xIUSMpp4poSQKLNWTvECQbHLnRkworP7dU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaEfoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrn0w//R83wUP1TqeiHLKgVgyZZlxBGGm3rHO3R/27oBsPljG6I4Kch\r\n8NLD+ETsfQ8VcBETbYID4tHNqJvobBwqproBQADKD3Qmfag3fNpO3xF2u7IU\r\n3dZctRVe8p2A0DQBI7nhEEuwIl5CFX2eIzJK33GQwCfmRCTTrE4ip90BNWW0\r\nf9c3Zl5oJ94E9cvlz1f/wnvD4ZNl5Q5CQgOSqpI3Z4+6z2HLH4f1gvYhWfFX\r\noWzlZ2UFRiQnkOVmxV2XDr2kPumwMak4zDbRYxZH4TUtDb61LPpjT/CKQRAc\r\nLL7o4jL2UrEQ6T5q1lX7C6Hwry+MdGz1BRAE/Kg7HI0WYTHutQ0QRH7q45Gq\r\nZZWapU+5+W/rXp4IxNkvUtj6zRo9dg6CTkRLEmovTgGAIPs7cy5OJr6yT6O+\r\nsC1UHAPAmiMnJyDQUFea1QWDtBbhWWe+nPpxDPmenchqUymwGcK/y6yI50B3\r\nEhvOUYTUw8/civySM8imn+M/wX8W0YecFYjAW/lha+jFOzsOjDZ1muUvR+JO\r\nk0QoY6WGA3bIHLqWP+nzPxQ0122HvHqoM6y4GQyF2j6Tufn1qqQaNmPmyqP1\r\nb1ZD3sRUa/94AaLCPRZoRthamolbpyqkVeY8w0+Eesh+N86uH/AxMjahB9+7\r\nMHhriC33d3NCGkQZw3PQM4owmuhUfCu6vvE=\r\n=zzYd\r\n-----END PGP SIGNATURE-----\r\n","size":2939,"noattachment":false,"key":"/@inquirer/select/-/@inquirer/select-0.0.19-alpha.0.tgz"},"main":"index.js","gitHead":"9baee326b04b4e8565e815b1fa577c36e0b93727","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"repository":{"url":"git+https://github.com/SBoudrias/Inquirer.js.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (darwin)","description":"Inquirer select/list prompt","directories":{},"_nodeVersion":"16.14.2","dependencies":{"chalk":"^4.1.1","figures":"^3.0.0","@inquirer/core":"^0.0.19-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/select_0.0.19-alpha.0_1651001319810_0.7542817387865088","host":"s3://npm-registry-packages"},"readme":"# `@inquirer/select`\n\nSimple interactive command line prompt to display a list of choices (single select.)\n\n![select prompt](https://cdn.rawgit.com/SBoudrias/Inquirer.js/28ae8337ba51d93e359ef4f7ee24e79b69898962/assets/screenshots/list.svg)\n\n# Installation\n\n```sh\nnpm install @inquirer/select\n\nyarn add @inquirer/select\n```\n\n# Usage\n\n```js\nimport select, { Separator } from '@inquirer/select';\n\nconst answer = await select({\n  message: 'Select a package manager',\n  choices: [\n    {\n      name: 'npm',\n      value: 'npm',\n      description: 'npm is the most popular package manager',\n    },\n    {\n      name: 'yarn',\n      value: 'yarn',\n      description: 'yarn is an awesome package manager',\n    },\n    new Separator(),\n    {\n      name: 'jspm',\n      value: 'jspm',\n      disabled: true,\n    },\n    {\n      name: 'pnpm',\n      value: 'pnpm',\n      disabled: '(pnpm is not available)',\n    },\n  ],\n});\n```\n\n## Options\n\n| Property | Type                                                                                                       | Required | Description                                                                                                                                                                                                                                                                         |\n| -------- | ---------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| message  | `string`                                                                                                   | yes      | The question to ask                                                                                                                                                                                                                                                                 |\n| choices  | `Array<{ value: string, name?: string, description?: string, disabled?: boolean \\| string } \\| Separator>` | yes      | List of the available choices. The `value` will be returned as the answer, and used as display if no `name` is defined. Choices who're `disabled` will be displayed, but not selectable. The `description` will be displayed under the prompt when the cursor land over the choice. |\n| default  | `string`                                                                                                   | no       | Defines in front of which item the cursor will initially appear. When omitted, the cursor will appear on the first selectable item.                                                                                                                                                 |\n| pageSize | `number`                                                                                                   | no       | By default, lists of choice longer than 7 will be paginated. Use this option to control how many choices will appear on the screen at once.                                                                                                                                         |\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| theme    | [See Theming](#Theming)                                                                                    | no       | Customize look of the prompt.                                                                                                                                                                                                                                                       |\n\nThe `Separator` object can be used 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## 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;\n  spinner: {\n    interval: number;\n    frames: string[];\n  };\n  style: {\n    answer: (text: string) => string;\n    message: (text: string) => string;\n    error: (text: string) => string;\n    help: (text: string) => string;\n    highlight: (text: string) => string;\n    disabled: (text: string) => string;\n  };\n  icon: {\n    cursor: string;\n  };\n  helpMode: 'always' | 'never' | 'auto';\n};\n```\n\n### `theme.helpMode`\n\n- `auto` (default): Hide the help tips after an interaction occurs.\n- `always`: The help tips will always show and never hide.\n- `never`: The help tips will never show.\n\n# License\n\nCopyright (c) 2023 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))<br/>\nLicensed under the MIT license.\n","publish_time":1651001319979,"_cnpm_publish_time":1651001319979,"dist-tags":{"latest":"5.3.0"}}