{"name":"@inquirer/select","version":"0.0.6-alpha.0","keywords":["cli","prompt","command-line","input"],"author":{"name":"Simon Boudrias"},"license":"MIT","_id":"@inquirer/select@0.0.6-alpha.0","maintainers":[{"name":"danielchatfield","email":"chatfielddaniel@gmail.com"},{"name":"mischah","email":"mail@michael-kuehnel.de"},{"name":"sboudrias","email":"admin@simonboudrias.com"}],"homepage":"https://github.com/SBoudrias/Inquirer.js#readme","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"ead541dd58ed9d0c82cf7d11404d93cc4f5a4d29","tarball":"http://registry-npm.ywwl.com/@inquirer/select/download/@inquirer/select-0.0.6-alpha.0.tgz","fileCount":4,"integrity":"sha512-YqBEvXDjcb10L1L6fakml/M4tT1bVXCmM2nE2sds1CmV9fR8NjFqikzZAi825YENmFRvsZfPJjhqn+4Z5p0Wyg==","signatures":[{"sig":"MEUCIFJilszYgfZnDPGSUuyInYuA7m0P1/lhcYPL2hI2vmbXAiEA2iuhXgFsLp7dMrx2G/zkXEqVYpXRshcsH/mJyjtDKic=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJr86CRA9TVsSAnZWagAASGIP/02JfIi0oMtyeNDg3iP+\nKZXr3yUIkwhAYqqT67krnJ1IRKtS/dkOzaibrEWzw2xdxRWNBDVtN87/v/ZC\nws9CLbp6pYk4JybwuUxIZ7qLQCq4Zj9sjN1vWD5516EpM3q7PMtadnBfVJIi\nI2STuHuR67hV4rpD/N6Led73wt1YebeL8HN/cjVWFdXJ0lNG/TpdC8o8bbyD\nUKA+YXhkhxb5XI1TsMzCTE3JW35/U2OEoVe4pLU6ddVdK6jfh4K2oaRV9eAg\nrRWtOqwBr7l6vDS80MPJ6rFCvonHPX/tidOBaz7QQDKWbYafNrxTxucG9OcJ\nPk93RRnJe7f71a5N+QlieIVH4Jq3m1FPho7pvfNOsxtk0fpTXcliKdj7NgAz\n19Ok7y/iDFsdH/VEdQCvmo19rsoiYVzi2JMPRNBS+TJHtfNrIMJMeG+ud1hy\nrE5Go2YDnvv/51Mdp3HPM9ql0jofmLSpu0a+kmG9nHkATLfEtsYR15gtDxA5\nz2N1yW05DANpSgd0AmpGX0v2OpLOzus8nARnMAlmpHeRUa/C/XOMZp1M733P\nQ5oDGgtu8HLwo0PIkH/ejOZcwEG+XOlI1S4pdHtxmeQ9vWYbS1eH0kJAZHe/\nQOoaVSstlzIEGkdew2itXplvUQ8crqvS8+673Qpb14tZwcrB78ADqE1SJokq\nJu8Y\r\n=ljUS\r\n-----END PGP SIGNATURE-----\r\n","size":2116,"noattachment":false,"key":"/@inquirer/select/-/@inquirer/select-0.0.6-alpha.0.tgz"},"main":"index.js","gitHead":"da5d0e22de84486240b12f52643fbd573f8d0d38","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"repository":{"url":"git+https://github.com/SBoudrias/Inquirer.js.git","type":"git"},"_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (darwin)","description":"Inquirer select/list prompt","directories":{},"_nodeVersion":"12.4.0","dependencies":{"chalk":"^2.4.1","figures":"^2.0.0","@inquirer/core":"^0.0.6-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/select_0.0.6-alpha.0_1562820409388_0.5792722056342019","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":1562820409537,"_cnpm_publish_time":1562820409537,"dist-tags":{"latest":"5.3.0"}}