{"name":"@inquirer/checkbox","version":"0.1.0","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"],"author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","_id":"@inquirer/checkbox@0.1.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/checkbox/README.md","bugs":{"url":"https://github.com/SBoudrias/Inquirer.js/issues"},"dist":{"shasum":"bedd42d9b4fbd7261a4c496a90bf0e01b244d27e","tarball":"http://registry-npm.ywwl.com/@inquirer/checkbox/download/@inquirer/checkbox-0.1.0.tgz","fileCount":7,"integrity":"sha512-48FqbRlJXH9dheFJISOQbRw8DfmjkaqZXNJNJvs2yDbbNDrVh2GgH58bWPYw62vpK/mR5iKid7i3jKEGi7Gp6Q==","signatures":[{"sig":"MEUCIFL56vBnq9YIBP45lMXbHJzzdPysg3XGs3yzR3mK2sU9AiEArS1W5Ux0AKDB5Ekd47A2wciaGO2ZKqbKngw3jFtvgBU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFe5JACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpVtw//aojSXI0P31Ps+LlDnute5QUvR+IfcggsNzJzSM1vPGjKZGh+\r\nb7oQIeqjEAzivb5OI6CywATqPdxqPdIEd27yBKPs//6p0Y2jQsQ4m4aFuy66\r\nNi/IzdJh1g0PCTNFAzirRBOdaYAAm6PCza4V+ukxnjW6rIsQ7VbV3hG3t3IT\r\nIWLaklYlw/GfyXLRczXfpqj61Sl1Nm0JbPb7mbBE9aBOJ1cqAJYdQEKBTGWK\r\nloGYZGQ7dE2myKCL0rViWJb/8s5z3FEudOyf5x0F5GRVfqQayl4n6dVhd7U/\r\np0xhlbjaoxdbOftktxp01kft3SHhNJ6LKTOlA9F1RsXykofPvpiPs7RzjAvT\r\nd+ttHhZs1f1qk/m7ITv7TrFKMRwAQZVFkslxx56gCw1+EbmzKN61gXk+vaBW\r\nk+22YdYMHrz5TGqg85jljXz2FZr9ts1byDGbVZEi8u0j8mn09UqGWewBQ3aG\r\nMhANmu7Wcms4bYesNBUiLfKNMvPRUiQDEOPij8XxMuYj+9FobWE1MU2XOfiq\r\nA4tvIZ/tEVg9izG/LxMnMEJFdcD7ulNoeYBj7zr0BK+1RcQU5hnyBqVVwceD\r\npc0I63e+v4XNXPjqBRiB56UcxKq98rV5ArnH7PImBplQBvcT8ri6asU7dXF8\r\n+vyM0NZz1FSlh4dboetPdF63lNWnLaJGmNo=\r\n=zoy2\r\n-----END PGP SIGNATURE-----\r\n","size":3986,"noattachment":false,"key":"/@inquirer/checkbox/-/@inquirer/checkbox-0.1.0.tgz"},"main":"./dist/cjs/index.js","engines":{"node":">=14.18.0"},"exports":{".":{"import":{"types":"./dist/esm/types/index.d.mts","default":"./dist/esm/index.mjs"},"require":{"types":"./dist/cjs/types/index.d.mts","default":"./dist/cjs/index.js"}}},"gitHead":"bd58130dd8204945a31b062070b829003b8385fc","scripts":{"tsc":"yarn run clean && yarn run tsc:esm && yarn run tsc:cjs","clean":"rm -rf dist","fix-ext":"ts-node ../../tools/rename-ext.ts","tsc:cjs":"tsc -p ./tsconfig.cjs.json && yarn run fix-ext","tsc:esm":"tsc -p ./tsconfig.esm.json"},"typings":"./dist/cjs/types/index.d.mts","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"repository":{"url":"git+https://github.com/SBoudrias/Inquirer.js.git","type":"git"},"_npmVersion":"lerna/6.5.1/node@v16.17.1+arm64 (darwin)","description":"Inquirer checkbox prompt","directories":{},"_nodeVersion":"16.17.1","dependencies":{"chalk":"^5.2.0","figures":"^5.0.0","ansi-escapes":"^6.0.0","@inquirer/core":"^1.0.0","@inquirer/type":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/checkbox_0.1.0_1679158857324_0.33598164837841193","host":"s3://npm-registry-packages"},"readme":"# `@inquirer/checkbox`\n\nSimple interactive command line prompt to display a list of checkboxes (multi select).\n\n![Checkbox prompt](https://cdn.rawgit.com/SBoudrias/Inquirer.js/28ae8337ba51d93e359ef4f7ee24e79b69898962/assets/screenshots/checkbox.svg)\n\n# Installation\n\n```sh\nnpm install @inquirer/checkbox\n\nyarn add @inquirer/checkbox\n```\n\n# Usage\n\n```js\nimport checkbox, { Separator } from '@inquirer/checkbox';\n\nconst answer = await checkbox({\n  message: 'Select a package manager',\n  choices: [\n    { name: 'npm', value: 'npm' },\n    { name: 'yarn', value: 'yarn' },\n    new Separator(),\n    { name: 'pnpm', value: 'pnpm', disabled: true },\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, disabled?: boolean \\| string, checked?: boolean } \\| 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.              |\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| required | `boolean`                                                                                               | no       | When set to `true`, ensures at least one choice must be selected.                                                                                                                                     |\n| validate | `string\\[\\] => boolean \\| string \\| Promise<string \\| boolean>`                                         | no       | On submit, validate the choices. When returning a string, it'll be used as the error message displayed to the user. Note: returning a rejected promise, we'll assume a code error happened and crash. |\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    defaultAnswer: (text: string) => string;\n    help: (text: string) => string;\n    highlight: (text: string) => string;\n    key: (text: string) => string;\n    disabledChoice: (text: string) => string;\n    renderSelectedChoices: <T>(\n      selectedChoices: ReadonlyArray<Choice<T>>,\n      allChoices: ReadonlyArray<Choice<T> | Separator>,\n    ) => string;\n  };\n  icon: {\n    checked: string;\n    unchecked: string;\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. The scroll tip will hide after any interactions, the selection tip will hide as soon as a first selection is done.\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":1679158857485,"_cnpm_publish_time":1679158857485,"dist-tags":{"latest":"5.3.0"}}