{"name":"@inquirer/expand","version":"0.0.16-alpha.0","keywords":["cli","prompt","command-line","input","inquirer"],"author":{"name":"Simon Boudrias"},"license":"MIT","_id":"@inquirer/expand@0.0.16-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#readme","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"d4696671e5d4a3688c5ecef1164e426bfd1186b5","tarball":"http://registry-npm.ywwl.com/@inquirer/expand/download/@inquirer/expand-0.0.16-alpha.0.tgz","fileCount":5,"integrity":"sha512-opf/iSPFF34iBaiYXcuhIm2vB5IbODjH2gZZ08wwR6Gap419RHnXHlmTZjaif9bkemK3JG3RcurBumYYBtcA8g==","signatures":[{"sig":"MEYCIQDZoKmky72K6zMSFucJmHqpybQD6RPSLhTU0JlF+hePNAIhAJ/cH7ysgoWkwby+d9gEFmVhfvldwsNT1KDpISYkktOf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7wIPCRA9TVsSAnZWagAAp1MP/2JUfLvy4sjn595esn/n\nvtq/tYF+gTEX3HyB3iT4HZtQoErEmcgvQgZkKPhgjHANiStGZJWNpYfDBUJs\npS+BFgtHpTRTCstl8tVrDrZvZ8hncPhAep8AoEl6/O0t3fup61knxlrqckAZ\n7dIY2CIRJSrKkLsqdAr9i/GVShoA1j0DzMuroJODlVDtemQxdJ2tDKltU3ys\nIjREfHVu9qjxNigsj8WzVsG/eRCZ2UhzRS//ZqpSJ7GpSpSYsknkkRoOyyZs\nAMBtJ8ujb/foxyGH9TbppGcXTTJAfWuvQnXIccFx092q38LcxiA5PfqqmSj+\neb1WvGQBhBqk7Ov5Wr99WKbXz5+gieRLV76bXmQaBp0PezrfBqu9r3NS9x34\ng60wG9Gv4Pun0zGr4NWouqmmDhB8K3+OGKe3S48LaL8KvZiQdhn7KAr4tYeu\nItR+j30oOwbaCEPNiMsXDBJc+ECj6D1gvFD04+bSvpiCt2dQn1UQF7h99aq4\na5agJWjKBlrMedMZNAbo4Io5+D0b/OCboSgdyrHL+e+ekU9HcKMnxvOopyxA\nDIp/pRp0RRsdZ5fPV5wNxyCp//un67HQfkUhdPI6VtUCGlF6pst4+XGEgBKF\nN2Rx+KTibTSNQsDPcdk+7zfkOUGGzlTlxKfVJUp5FYVMNTI39dyc5GoX+4YW\ne97m\r\n=lZUJ\r\n-----END PGP SIGNATURE-----\r\n","size":2949,"noattachment":false,"key":"/@inquirer/expand/-/@inquirer/expand-0.0.16-alpha.0.tgz"},"main":"index.js","gitHead":"9bee59b98465656619e4ee563ddbc466dcf2b4f1","_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@v14.17.1+x64 (darwin)","description":"Inquirer checkbox prompt","directories":{},"_nodeVersion":"14.17.1","dependencies":{"chalk":"^4.1.1","figures":"^3.0.0","@inquirer/core":"^0.0.16-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/expand_0.0.16-alpha.0_1626276367578_0.909679233799402","host":"s3://npm-registry-packages"},"readme":"# `@inquirer/expand`\n\nCompact single select prompt. Every option is assigned a shortcut key, and selecting `h` will expand all the choices and their descriptions.\n\n![Expand prompt closed](https://cdn.rawgit.com/SBoudrias/Inquirer.js/28ae8337ba51d93e359ef4f7ee24e79b69898962/assets/screenshots/expand-y.svg)\n![Expand prompt expanded](https://cdn.rawgit.com/SBoudrias/Inquirer.js/28ae8337ba51d93e359ef4f7ee24e79b69898962/assets/screenshots/expand-d.svg)\n\n# Installation\n\n```sh\nnpm install @inquirer/expand\n\nyarn add @inquirer/expand\n```\n\n# Usage\n\n```js\nimport expand from '@inquirer/expand';\n\nconst answer = await expand({\n  message: 'Conflict on file.js',\n  default: 'y',\n  choices: [\n    {\n      key: 'y',\n      name: 'Overwrite',\n      value: 'overwrite',\n    },\n    {\n      key: 'a',\n      name: 'Overwrite this one and all next',\n      value: 'overwrite_all',\n    },\n    {\n      key: 'd',\n      name: 'Show diff',\n      value: 'diff',\n    },\n    {\n      key: 'x',\n      name: 'Abort',\n      value: 'abort',\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<{ key: string, name: string, value?: string }>` | yes      | Array of the different allowed choices. The `h`/help option is always provided by default |\n| default  | `string`                                               | no       | Default choices to be selected. (value must be one of the choices `key`)                  |\n| expanded | `boolean`                                              | no       | Expand the choices by default                                                             |\n| theme    | [See Theming](#Theming)                                | no       | Customize look of the prompt.                                                             |\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    defaultAnswer: (text: string) => string;\n    highlight: (text: string) => string;\n  };\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":1626276367700,"_cnpm_publish_time":1626276367700,"dist-tags":{"latest":"5.2.0"}}