{"_id":"@inquirer/expand@5.1.7","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"c698ac1e08cd129819ee9e1967dac94bef17a6dc","tarball":"http://registry-npm.ywwl.com/@inquirer/expand/download/@inquirer/expand-5.1.7.tgz","integrity":"sha512-eiJ31YFCaB6fLoJCqLIn8S6eqUyME6vwr8KcP5h8cxmA+bV9RRVPO+kywoxb7G63HduDXV6sN/SM7o2R+ahEcQ==","fileCount":5,"unpackedSize":12639,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@inquirer%2fexpand@5.1.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDMH9l0wn9leuStHoEzRelvm4bg5ebF20JwlxjiI2wz+QIgZdZw2q+W+fqx/DTn9R+9t/7Ki3/IgwMJ7yYK7j6p3jg="}],"size":4582,"noattachment":false,"key":"/@inquirer/expand/-/@inquirer/expand-5.1.7.tgz"},"main":"./dist/index.js","name":"@inquirer/expand","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":"ea3130ebc609a6a3910b5397244044de7eda3d05","license":"MIT","scripts":{"tsc":"tsc"},"version":"5.1.7","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"1c4a78b2-0e1a-4bea-993c-1525990f1c78"},"approver":{"name":"sboudrias","email":"admin@simonboudrias.com"}},"homepage":"https://github.com/SBoudrias/Inquirer.js/blob/main/packages/expand/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.2/node@v24.22.0+x64 (linux)","description":"Inquirer checkbox prompt","directories":{},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"mischah","email":"mail@michael-kuehnel.de"}],"sideEffects":false,"_nodeVersion":"24.22.0","dependencies":{"@inquirer/core":"^12.0.5","@inquirer/type":"4.2.0"},"publishConfig":{"access":"public"},"devDependencies":{"typescript":"^6.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/expand_5.1.7_1792446173110_0.5622850451875281"},"_hasShrinkwrap":false,"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<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/expand\n```\n\n</td>\n<td>\n\n```sh\npnpm add @inquirer/expand\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/expand\n```\n\n</td>\n<td>\n\n```sh\ndeno add npm:@inquirer/expand\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/expand\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 { expand } from '@inquirer/prompts';\n// Or\n// import 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  | `Choice[]`              | 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`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  key: string;\n};\n```\n\nHere's each property:\n\n- `value`: The value is what will be returned by `await expand()`.\n- `name`: The string displayed in the choice list. It'll default to the stringify `value`.\n- `key`: The input the use must provide to select the choice. Must be a lowercase single alphanumeric character string.\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    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":1792446173204,"_cnpm_publish_time":1792446173204,"dist-tags":{"latest":"5.2.0"}}