{"name":"@inquirer/expand","version":"0.0.5-alpha.0","keywords":["cli","prompt","command-line","input","inquirer"],"author":{"name":"Simon Boudrias"},"license":"MIT","_id":"@inquirer/expand@0.0.5-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":"fa1f4f1cabe9401127af4fe73eb1912f69c1e2d7","tarball":"http://registry-npm.ywwl.com/@inquirer/expand/download/@inquirer/expand-0.0.5-alpha.0.tgz","fileCount":4,"integrity":"sha512-t9uxm9EW0NxXD48MLg3u2Sn4oSLkD6gdgGAOwe5GWWps5GgwV4XWlxO8p6ARgkHGQGLn1eFqtHz+Qk2zYZyEYg==","signatures":[{"sig":"MEQCIE1P94o75WRtuI8ikOhb5c7cWz38T65byHpOfm2Rc37XAiB1sc9br+qxE0jb/qKii8r7e25PmRFp9Gi6cjbFUzmL9w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCxEqCRA9TVsSAnZWagAAdL4P/13d01DWR9mz7apRguUU\n3jIZkYoMKKdFQrABesv+EmVPISoCvvdBJTBjrxvlhXxTtvA9gxH0ANthjxNU\nFBYw+2Z9I8IbGMs4qt6pC92qpVot05SGM5OlHW0jkUcbQsA3DHWv41iMM7ox\nSmJpcw4jjoRTNPQSHQ+qqOd5c0fsI4Md6Vp6l+lczhAa20hYiN9zM2hqqb+o\nlomedtkKCHtlFwS8F2EsHKtkXS9IzC7wlbCxaoyTmJd//0wWLAxiZfS7c1c1\naOsH/dpMyVg020aCf0ZY9v3rRAJ3xEyT5ixyCpN5Y0vPk5r9LOM/h1q8NC0I\nNOkFBjQtLdvg+39M/13vdxoNgjXXjMfFeb82PTnPKVygt7x25P31Ts49hc2K\nfvfZLbQsyOIJcodElXcWtw8QvRcJcdJ7CRoAfLRRGN+yHJFHhAQQyO4t9BRx\nGkPlkcM9BZSOdPf33trQcDgfWfM96oqZLqxjMnmG2DRu82JMcLARmiixOqMM\n/Y2uQZEXO4tGGq3VHeEXqjAXX4Y3ro66jSaNA99+PnuFao0wRLP+taOsPdVm\nLeSSVygRPuk5LTWi/AL5WREnEmUAfjDY6L5x/3ADv/weUm1VYLl9x+n2Ivrv\nSxen9iBU/Jgx5fUlJ6jmnhcpJMc/aghMmecY4v12S33h+SrXOmxWGA1IcjUU\n2WWa\r\n=wrdz\r\n-----END PGP SIGNATURE-----\r\n","size":2279,"noattachment":false,"key":"/@inquirer/expand/-/@inquirer/expand-0.0.5-alpha.0.tgz"},"main":"index.js","gitHead":"5f0b513627f5576c54ae25a0ca03b2da010f9730","_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@v10.15.0+x64 (darwin)","description":"Inquirer checkbox prompt","directories":{},"_nodeVersion":"10.15.0","dependencies":{"chalk":"^2.4.1","figures":"^2.0.0","@inquirer/core":"^0.0.5-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/expand_0.0.5-alpha.0_1561006378028_0.8981455600507156","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":1561006378154,"_cnpm_publish_time":1561006378154,"dist-tags":{"latest":"5.2.0"}}