pax_global_header00006660000000000000000000000064140006415100014501gustar00rootroot0000000000000052 comment=9c261d38bce7c47558ad7925ca5e28778b7245f7 cli-boxes-3.0.0/000077500000000000000000000000001400064151000133665ustar00rootroot00000000000000cli-boxes-3.0.0/.editorconfig000066400000000000000000000002571400064151000160470ustar00rootroot00000000000000root = true [*] indent_style = tab end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.yml] indent_style = space indent_size = 2 cli-boxes-3.0.0/.gitattributes000066400000000000000000000000231400064151000162540ustar00rootroot00000000000000* text=auto eol=lf cli-boxes-3.0.0/.github/000077500000000000000000000000001400064151000147265ustar00rootroot00000000000000cli-boxes-3.0.0/.github/funding.yml000066400000000000000000000001631400064151000171030ustar00rootroot00000000000000github: sindresorhus open_collective: sindresorhus custom: https://sindresorhus.com/donate tidelift: npm/cli-boxes cli-boxes-3.0.0/.github/security.md000066400000000000000000000002631400064151000171200ustar00rootroot00000000000000# Security Policy To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. cli-boxes-3.0.0/.github/workflows/000077500000000000000000000000001400064151000167635ustar00rootroot00000000000000cli-boxes-3.0.0/.github/workflows/main.yml000066400000000000000000000006641400064151000204400ustar00rootroot00000000000000name: CI on: - push - pull_request jobs: test: name: Node.js ${{ matrix.node-version }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: node-version: - 14 - 12 - 10 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - run: npm install - run: npm test cli-boxes-3.0.0/.gitignore000066400000000000000000000000271400064151000153550ustar00rootroot00000000000000node_modules yarn.lock cli-boxes-3.0.0/.npmrc000066400000000000000000000000231400064151000145010ustar00rootroot00000000000000package-lock=false cli-boxes-3.0.0/boxes.json000066400000000000000000000025541400064151000154070ustar00rootroot00000000000000{ "single": { "topLeft": "┌", "top": "─", "topRight": "┐", "right": "│", "bottomRight": "┘", "bottom": "─", "bottomLeft": "└", "left": "│" }, "double": { "topLeft": "╔", "top": "═", "topRight": "╗", "right": "║", "bottomRight": "╝", "bottom": "═", "bottomLeft": "╚", "left": "║" }, "round": { "topLeft": "╭", "top": "─", "topRight": "╮", "right": "│", "bottomRight": "╯", "bottom": "─", "bottomLeft": "╰", "left": "│" }, "bold": { "topLeft": "┏", "top": "━", "topRight": "┓", "right": "┃", "bottomRight": "┛", "bottom": "━", "bottomLeft": "┗", "left": "┃" }, "singleDouble": { "topLeft": "╓", "top": "─", "topRight": "╖", "right": "║", "bottomRight": "╜", "bottom": "─", "bottomLeft": "╙", "left": "║" }, "doubleSingle": { "topLeft": "╒", "top": "═", "topRight": "╕", "right": "│", "bottomRight": "╛", "bottom": "═", "bottomLeft": "╘", "left": "│" }, "classic": { "topLeft": "+", "top": "-", "topRight": "+", "right": "|", "bottomRight": "+", "bottom": "-", "bottomLeft": "+", "left": "|" }, "arrow": { "topLeft": "↘", "top": "↓", "topRight": "↙", "right": "←", "bottomRight": "↖", "bottom": "↑", "bottomLeft": "↗", "left": "→" } } cli-boxes-3.0.0/index.d.ts000066400000000000000000000033031400064151000152660ustar00rootroot00000000000000declare namespace cliBoxes { /** Style of the box border. */ interface BoxStyle { readonly topLeft: string; readonly top: string; readonly topRight: string; readonly right: string; readonly bottomRight: string; readonly bottom: string; readonly bottomLeft: string; readonly left: string; } /** All box styles. */ interface Boxes { /** @example ``` ┌────┐ │ │ └────┘ ``` */ readonly single: BoxStyle; /** @example ``` ╔════╗ ║ ║ ╚════╝ ``` */ readonly double: BoxStyle; /** @example ``` ╭────╮ │ │ ╰────╯ ``` */ readonly round: BoxStyle; /** @example ``` ┏━━━━┓ ┃ ┃ ┗━━━━┛ ``` */ readonly bold: BoxStyle; /** @example ``` ╓────╖ ║ ║ ╙────╜ ``` */ readonly singleDouble: BoxStyle; /** @example ``` ╒════╕ │ │ ╘════╛ ``` */ readonly doubleSingle: BoxStyle; /** @example ``` +----+ | | +----+ ``` */ readonly classic: BoxStyle; /** @example ``` ↘↓↓↓↓↙ → ← ↗↑↑↑↑↖ ``` */ readonly arrow: BoxStyle; } } /** Boxes for use in the terminal. @example ``` import cliBoxes = require('cli-boxes'); console.log(cliBoxes.single); // { // topLeft: '┌', // top: '─', // topRight: '┐', // right: '│', // bottomRight: '┘', // bottom: '─', // bottomLeft: '└', // left: '│' // } ``` */ declare const cliBoxes: cliBoxes.Boxes & { // TODO: Remove this for the next major release default: typeof cliBoxes; }; export = cliBoxes; cli-boxes-3.0.0/index.js000066400000000000000000000002471400064151000150360ustar00rootroot00000000000000'use strict'; const cliBoxes = require('./boxes.json'); module.exports = cliBoxes; // TODO: Remove this for the next major release module.exports.default = cliBoxes; cli-boxes-3.0.0/index.test-d.ts000066400000000000000000000007741400064151000162540ustar00rootroot00000000000000import {expectType} from 'tsd'; import cliBoxes = require('./index.js'); import {BoxStyle, Boxes} from './index.js'; // TODO: Enable when targeting ESM. // expectType(cliBoxes); expectType(cliBoxes.classic); expectType(cliBoxes.double); expectType(cliBoxes.doubleSingle); expectType(cliBoxes.round); expectType(cliBoxes.bold); expectType(cliBoxes.single); expectType(cliBoxes.singleDouble); expectType(cliBoxes.arrow); cli-boxes-3.0.0/license000066400000000000000000000021351400064151000147340ustar00rootroot00000000000000MIT License Copyright (c) Sindre Sorhus (https://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. cli-boxes-3.0.0/package.json000066400000000000000000000012661400064151000156610ustar00rootroot00000000000000{ "name": "cli-boxes", "version": "3.0.0", "description": "Boxes for use in the terminal", "license": "MIT", "repository": "sindresorhus/cli-boxes", "funding": "https://github.com/sponsors/sindresorhus", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, "engines": { "node": ">=10" }, "scripts": { "test": "xo && ava && tsd" }, "files": [ "index.js", "index.d.ts", "boxes.json" ], "keywords": [ "cli", "box", "boxes", "terminal", "term", "console", "ascii", "unicode", "border", "text", "json" ], "devDependencies": { "ava": "^2.4.0", "tsd": "^0.14.0", "xo": "^0.37.1" } } cli-boxes-3.0.0/readme.md000066400000000000000000000027571400064151000151600ustar00rootroot00000000000000# cli-boxes > Boxes for use in the terminal The list of boxes is just a [JSON file](boxes.json) and can be used anywhere. ## Install ``` $ npm install cli-boxes ``` ## Usage ```js const cliBoxes = require('cli-boxes'); console.log(cliBoxes.single); /* { topLeft: '┌', top: '─', topRight: '┐', right: '│', bottomRight: '┘', bottom: '─', bottomLeft: '└', left: '│' } */ ``` ## API ### cliBoxes #### `single` ``` ┌────┐ │ │ └────┘ ``` #### `double` ``` ╔════╗ ║ ║ ╚════╝ ``` #### `round` ``` ╭────╮ │ │ ╰────╯ ``` #### `bold` ``` ┏━━━━┓ ┃ ┃ ┗━━━━┛ ``` #### `singleDouble` ``` ╓────╖ ║ ║ ╙────╜ ``` #### `doubleSingle` ``` ╒════╕ │ │ ╘════╛ ``` #### `classic` ``` +----+ | | +----+ ``` #### `arrow` ``` ↘↓↓↓↓↙ → ← ↗↑↑↑↑↖ ``` ## Related - [boxen](https://github.com/sindresorhus/boxen) - Create boxes in the terminal ---
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
cli-boxes-3.0.0/test.js000066400000000000000000000003001400064151000146740ustar00rootroot00000000000000import test from 'ava'; import cliBoxes from './index.js'; test('main', t => { t.is(typeof cliBoxes, 'object'); t.is(cliBoxes.single.topLeft, '┌'); t.is(cliBoxes.arrow.left, '→'); });