{"xo":{"rules":{"no-control-regex":"off","unicorn/import-style":"off","ava/no-import-test-files":"off","regexp/no-control-character":"off","import-x/no-unassigned-import":["error",{"allow":["**/tests/setup.js"]}],"regexp/prefer-named-capture-group":"off","@typescript-eslint/no-unsafe-assignment":"off"}},"_id":"boxen@9.0.0","bugs":{"url":"https://github.com/sindresorhus/boxen/issues"},"dist":{"shasum":"05185a8f87e418b543762d8c66673ca178431bcd","tarball":"http://registry-npm.ywwl.com/boxen/download/boxen-9.0.0.tgz","fileCount":5,"integrity":"sha512-PdzDS/iXrRlY3eWTL8hKcqEioYZ9RCcn0IGf8BjrLvc+YWa/hNjOrE/5Sl2Ai6mOFePuDgC2y4zF0I6GUwfVUQ==","signatures":[{"sig":"MEQCIH3CmMtr5MAkz+rZtw6HAAnBBnXrxm++pcB7PGgki0otAiAcgfZ9NS1LAcY6mXRw/zVZWr386cH/xIDpRGLdj/lnwA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHiAO1Jcw0yL90le1qvtlpnyixwM2nodonHSLw+g+dbCAiEAjyeziloWBZ5sdVb7f0oVxnsqpeNGwPC+C2vrq7I63+w="}],"unpackedSize":40094,"size":11101,"noattachment":false,"key":"/boxen/-/boxen-9.0.0.tgz"},"name":"boxen","type":"module","types":"./index.d.ts","author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"engines":{"node":">=22"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"a80972912972e74e6536a66a8dc4d5243efd4150","license":"MIT","scripts":{"test":"xo && node --test --experimental-test-snapshots --experimental-test-coverage --test-coverage-include=index.js && tsd"},"version":"9.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"homepage":"https://github.com/sindresorhus/boxen#readme","keywords":["cli","box","boxes","terminal","term","console","ascii","unicode","border","text"],"repository":{"url":"git+https://github.com/sindresorhus/boxen.git","type":"git"},"_npmVersion":"12.0.1","description":"Create boxes in the terminal","directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.9.0","dependencies":{"chalk":"^6.0.0","cli-boxes":"^4.0.1","type-fest":"^5.10.0","wrap-ansi":"^10.0.2","slice-ansi":"^9.0.1","widest-line":"^6.0.0","string-width":"^8.2.2"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^5.0.1","tsd":"^0.33.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/boxen_9.0.0_1790027859115_0.07673365062660675"},"readme":"# boxen\n\n> Create boxes in the terminal\n\n![](screenshot.png)\n\n## Install\n\n```sh\nnpm install boxen\n```\n\n## Usage\n\n```js\nimport boxen from 'boxen';\n\nconsole.log(boxen('unicorn', {padding: 1}));\n/*\n┌─────────────┐\n│             │\n│   unicorn   │\n│             │\n└─────────────┘\n*/\n\nconsole.log(boxen('unicorn', {padding: 1, margin: 1, borderStyle: 'double'}));\n/*\n\n   ╔═════════════╗\n   ║             ║\n   ║   unicorn   ║\n   ║             ║\n   ╚═════════════╝\n\n*/\n\nconsole.log(boxen('unicorns love rainbows', {title: 'magical', titleAlignment: 'center'}));\n/*\n┌────── magical ───────┐\n│unicorns love rainbows│\n└──────────────────────┘\n*/\n```\n\n## API\n\n### boxen(text, options?)\n\n#### text\n\nType: `string`\n\nText inside the box.\n\n#### options\n\nType: `object`\n\n##### borderColor\n\nType: `string`\\\nValues: `'black'` `'red'` `'green'` `'yellow'` `'blue'` `'magenta'` `'cyan'` `'white'` `'gray'` or a hex value like `'#ff0000'`\n\nColor of the box border.\n\n##### borderStyle\n\nType: `string | object`\\\nDefault: `'single'`\\\nValues:\n- `'single'`\n```text\n┌───┐\n│foo│\n└───┘\n```\n- `'double'`\n```text\n╔═══╗\n║foo║\n╚═══╝\n```\n- `'round'` (`'single'` sides with round corners)\n```text\n╭───╮\n│foo│\n╰───╯\n```\n- `'bold'`\n```text\n┏━━━┓\n┃foo┃\n┗━━━┛\n```\n- `'singleDouble'` (`'single'` on top and bottom, `'double'` on right and left)\n```text\n╓───╖\n║foo║\n╙───╜\n```\n- `'doubleSingle'` (`'double'` on top and bottom, `'single'` on right and left)\n```text\n╒═══╕\n│foo│\n╘═══╛\n```\n- `'classic'`\n```text\n+---+\n|foo|\n+---+\n```\n- `'arrow'`\n```text\n↘↓↓↓↙\n→foo←\n↗↑↑↑↖\n```\n- `'none'`\n```text\nfoo\n```\n\nStyle of the box border.\n\nCan be any of the above predefined styles or an object with the following keys:\n\n```js\n{\n\ttopLeft: '+',\n\ttopRight: '+',\n\tbottomLeft: '+',\n\tbottomRight: '+',\n\ttop: '-',\n\tbottom: '-',\n\tleft: '|',\n\tright: '|'\n}\n```\n\n##### dimBorder\n\nType: `boolean`\\\nDefault: `false`\n\nReduce opacity of the border.\n\n##### title\n\nType: `string`\n\nDisplay a title at the top of the box.\nIf needed, the box will horizontally expand to fit the title.\n\nExample:\n```js\nconsole.log(boxen('foo bar', {title: 'example'}));\n/*\n┌ example ┐\n│foo bar  │\n└─────────┘\n*/\n```\n\n##### titleColor\n\nType: `string`\\\nDefault: `borderColor` if set, otherwise the terminal's text color\\\nValues: `'black'` `'red'` `'green'` `'yellow'` `'blue'` `'magenta'` `'cyan'` `'white'` `'gray'` `'grey'` `'blackBright'` `'redBright'` `'greenBright'` `'yellowBright'` `'blueBright'` `'magentaBright'` `'cyanBright'` `'whiteBright'` or a hex value like `'#ff0000'`\n\nColor of the title.\n\nStyling already applied to the `title` takes precedence over this option.\n\nExample:\n```js\n// Blue border with a red title\nconsole.log(boxen('foo bar', {title: 'example', borderColor: 'blue', titleColor: 'red'}));\n/*\n┌ example ┐\n│foo bar  │\n└─────────┘\n*/\n```\n\n##### titleAlignment\n\nType: `string`\\\nDefault: `'left'`\n\nAlign the title in the top bar.\n\nValues:\n- `'left'`\n```js\n/*\n┌ example ──────┐\n│foo bar foo bar│\n└───────────────┘\n*/\n```\n- `'center'`\n```js\n/*\n┌─── example ───┐\n│foo bar foo bar│\n└───────────────┘\n*/\n```\n- `'right'`\n```js\n/*\n┌────── example ┐\n│foo bar foo bar│\n└───────────────┘\n*/\n```\n\n##### footer\n\nType: `string`\n\nDisplay a footer at the bottom of the box.\nIf needed, the box will horizontally expand to fit the footer.\n\nThe footer uses the border color.\n\nExample:\n```js\nconsole.log(boxen('foo bar', {footer: 'example'}));\n/*\n┌─────────┐\n│foo bar  │\n└ example ┘\n*/\n```\n\n##### footerAlignment\n\nType: `string`\\\nDefault: `'left'`\n\nAlign the footer in the bottom bar.\n\nValues:\n- `'left'`\n```js\n/*\n┌───────────────┐\n│foo bar foo bar│\n└ example ──────┘\n*/\n```\n- `'center'`\n```js\n/*\n┌───────────────┐\n│foo bar foo bar│\n└─── example ───┘\n*/\n```\n- `'right'`\n```js\n/*\n┌───────────────┐\n│foo bar foo bar│\n└────── example ┘\n*/\n```\n\n##### width\n\nType: `number` or a numeric string\n\nSet a fixed width for the box.\n\nA numeric string is also accepted.\n\n*Note:* This disables terminal overflow handling and may cause the box to look broken if the user's terminal is not wide enough.\n\n```js\nimport boxen from 'boxen';\n\nconsole.log(boxen('foo bar', {width: 15}));\n// ┌─────────────┐\n// │foo bar      │\n// └─────────────┘\n```\n\n##### maxWidth\n\nType: `number` or a numeric string\n\nSet a maximum width for the box.\n\nA numeric string is also accepted.\n\nThe box grows with the content and does not become wider than this value.\n\nA character that is wider than the space left for it can still widen the box, because a character is never split.\n\n*Note:* This option has no effect when `width` is set.\n\n```js\nimport boxen from 'boxen';\n\nconsole.log(boxen('foo bar', {maxWidth: 20}));\n// ┌───────┐\n// │foo bar│\n// └───────┘\n\nconsole.log(boxen('Lorem ipsum dolor sit amet, consectetur.', {maxWidth: 20}));\n// ┌─────────────────┐\n// │Lorem ipsum dolor│\n// │sit amet,        │\n// │consectetur.     │\n// └─────────────────┘\n```\n\n##### height\n\nType: `number` or a numeric string\n\nSet a fixed height for the box.\n\nA numeric string is also accepted.\n\n*Note:* This option will crop overflowing content.\n\n```js\nimport boxen from 'boxen';\n\nconsole.log(boxen('foo bar', {height: 5}));\n// ┌───────┐\n// │foo bar│\n// │       │\n// │       │\n// └───────┘\n```\n\n##### fullscreen\n\nType: `boolean | (width: number, height: number) => [width: number, height: number]`\n\nWhether or not to fit all available space within the terminal.\n\nPass a callback function to control box dimensions:\n\n```js\nimport boxen from 'boxen';\n\nconsole.log(boxen('foo bar', {\n\tfullscreen: (width, height) => [width, height - 1],\n}));\n```\n\n##### padding\n\nType: `number | object`\\\nDefault: `0`\n\nSpace between the text and box border.\n\nAccepts a number or an object with any of the `top`, `right`, `bottom`, `left` properties. When a number is specified, the left/right padding is 3 times the top/bottom to make it look nice.\n\n##### margin\n\nType: `number | object`\\\nDefault: `0`\n\nSpace around the box.\n\nAccepts a number or an object with any of the `top`, `right`, `bottom`, `left` properties. When a number is specified, the left/right margin is 3 times the top/bottom to make it look nice.\n\n##### float\n\nType: `string`\\\nDefault: `'left'`\\\nValues: `'right'` `'center'` `'left'`\n\nFloat the box on the available terminal screen space.\n\n##### backgroundColor\n\nType: `string`\\\nValues: `'black'` `'red'` `'green'` `'yellow'` `'blue'` `'magenta'` `'cyan'` `'white'` `'gray'` or a hex value like `'#ff0000'`\n\nColor of the background.\n\n##### borderBackgroundColor\n\nType: `string`\\\nValues: `'black'` `'red'` `'green'` `'yellow'` `'blue'` `'magenta'` `'cyan'` `'white'` `'gray'` `'inherit'` `undefined` or a hex value like `'#ff0000'`\n\nColor of the background of the border.\n\n`'inherit'` will use the same value as `options.backgroundColor` if set.\n\nDefaults to `'inherit'`. Set this to `undefined` to disable border background color.\n\n##### textAlignment\n\nType: `string`\\\nDefault: `'left'`\\\nValues: `'left'` `'center'` `'right'`\n\nAlign the text in the box based on the widest line.\n\n## Maintainer\n\n- [Sindre Sorhus](https://github.com/sindresorhus)\n- [Caesarovich](https://github.com/Caesarovich)\n\n## Related\n\n- [boxen-cli](https://github.com/sindresorhus/boxen-cli) - CLI for this module\n- [cli-boxes](https://github.com/sindresorhus/cli-boxes) - Boxes for use in the terminal\n","publish_time":1790027859213,"_cnpm_publish_time":1790027859213,"dist-tags":{"latest":"9.0.0"}}