Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK!0Db¨ª ª index.jsnu„[µü¤'use strict'; const stringWidth = require('string-width'); const chalk = require('chalk'); const widestLine = require('widest-line'); const cliBoxes = require('cli-boxes'); const camelCase = require('camelcase'); const ansiAlign = require('ansi-align'); const termSize = require('term-size'); const getObject = detail => { let obj; if (typeof detail === 'number') { obj = { top: detail, right: detail * 3, bottom: detail, left: detail * 3 }; } else { obj = Object.assign({ top: 0, right: 0, bottom: 0, left: 0 }, detail); } return obj; }; const getBorderChars = borderStyle => { const sides = [ 'topLeft', 'topRight', 'bottomRight', 'bottomLeft', 'vertical', 'horizontal' ]; let chars; if (typeof borderStyle === 'string') { chars = cliBoxes[borderStyle]; if (!chars) { throw new TypeError(`Invalid border style: ${borderStyle}`); } } else { sides.forEach(key => { if (!borderStyle[key] || typeof borderStyle[key] !== 'string') { throw new TypeError(`Invalid border style: ${key}`); } }); chars = borderStyle; } return chars; }; const getBackgroundColorName = x => camelCase('bg', x); module.exports = (text, opts) => { opts = Object.assign({ padding: 0, borderStyle: 'single', dimBorder: false, align: 'left', float: 'left' }, opts); if (opts.backgroundColor) { opts.backgroundColor = getBackgroundColorName(opts.backgroundColor); } if (opts.borderColor && !chalk[opts.borderColor]) { throw new Error(`${opts.borderColor} is not a valid borderColor`); } if (opts.backgroundColor && !chalk[opts.backgroundColor]) { throw new Error(`${opts.backgroundColor} is not a valid backgroundColor`); } const chars = getBorderChars(opts.borderStyle); const padding = getObject(opts.padding); const margin = getObject(opts.margin); const colorizeBorder = x => { const ret = opts.borderColor ? chalk[opts.borderColor](x) : x; return opts.dimBorder ? chalk.dim(ret) : ret; }; const colorizeContent = x => opts.backgroundColor ? chalk[opts.backgroundColor](x) : x; text = ansiAlign(text, {align: opts.align}); const NL = '\n'; const PAD = ' '; let lines = text.split(NL); if (padding.top > 0) { lines = Array(padding.top).fill('').concat(lines); } if (padding.bottom > 0) { lines = lines.concat(Array(padding.bottom).fill('')); } const contentWidth = widestLine(text) + padding.left + padding.right; const paddingLeft = PAD.repeat(padding.left); const columns = termSize().columns; let marginLeft = PAD.repeat(margin.left); if (opts.float === 'center') { const padWidth = Math.max((columns - contentWidth) / 2, 0); marginLeft = PAD.repeat(padWidth); } else if (opts.float === 'right') { const padWidth = Math.max(columns - contentWidth - margin.right - 2, 0); marginLeft = PAD.repeat(padWidth); } const horizontal = chars.horizontal.repeat(contentWidth); const top = colorizeBorder(NL.repeat(margin.top) + marginLeft + chars.topLeft + horizontal + chars.topRight); const bottom = colorizeBorder(marginLeft + chars.bottomLeft + horizontal + chars.bottomRight + NL.repeat(margin.bottom)); const side = colorizeBorder(chars.vertical); const middle = lines.map(line => { const paddingRight = PAD.repeat(contentWidth - stringWidth(line) - padding.left); return marginLeft + side + colorizeContent(paddingLeft + line + paddingRight) + side; }).join(NL); return top + NL + middle + NL + bottom; }; module.exports._borderStyles = cliBoxes; PK!êE¢}UUlicensenu„[µü¤MIT License Copyright (c) Sindre Sorhus (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. PK! Õù package.jsonnu„[µü¤{ "_from": "boxen@^1.2.1", "_id": "boxen@1.3.0", "_inBundle": false, "_integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "_location": "/boxen", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, "raw": "boxen@^1.2.1", "name": "boxen", "escapedName": "boxen", "rawSpec": "^1.2.1", "saveSpec": null, "fetchSpec": "^1.2.1" }, "_requiredBy": [ "/update-notifier" ], "_resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", "_shasum": "55c6c39a8ba58d9c61ad22cd877532deb665a20b", "_spec": "boxen@^1.2.1", "_where": "/Users/rebecca/code/npm/node_modules/update-notifier", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/boxen/issues" }, "bundleDependencies": false, "dependencies": { "ansi-align": "^2.0.0", "camelcase": "^4.0.0", "chalk": "^2.0.1", "cli-boxes": "^1.0.0", "string-width": "^2.0.0", "term-size": "^1.2.0", "widest-line": "^2.0.0" }, "deprecated": false, "description": "Create boxes in the terminal", "devDependencies": { "ava": "*", "nyc": "^11.0.3", "xo": "*" }, "engines": { "node": ">=4" }, "files": [ "index.js" ], "homepage": "https://github.com/sindresorhus/boxen#readme", "keywords": [ "cli", "box", "boxes", "terminal", "term", "console", "ascii", "unicode", "border", "text" ], "license": "MIT", "name": "boxen", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/boxen.git" }, "scripts": { "test": "xo && nyc ava" }, "version": "1.3.0" } PK!?ŠB‘/ / readme.mdnu„[µü¤# boxen > Create boxes in the terminal [![Build Status](https://travis-ci.org/sindresorhus/boxen.svg?branch=master)](https://travis-ci.org/sindresorhus/boxen) ## Install ``` $ npm install boxen ``` ## Usage ```js const boxen = require('boxen'); console.log(boxen('unicorn', {padding: 1})); /* ┌─────────────┠│ │ │ unicorn │ │ │ └─────────────┘ */ console.log(boxen('unicorn', {padding: 1, margin: 1, borderStyle: 'double'})); /* â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•— â•‘ â•‘ â•‘ unicorn â•‘ â•‘ â•‘ ╚â•â•â•â•â•â•â•â•â•â•â•â•â•â• */ ``` ## API ### boxen(input, [options]) #### input Type: `string` Text inside the box. #### options ##### borderColor Type: `string`
Values: `black` `red` `green` `yellow` `blue` `magenta` `cyan` `white` `gray` Color of the box border. ##### borderStyle Type: `string` `object`
Default: `single`
Values: - `single` ``` ┌───┠│foo│ └───┘ ``` - `double` ``` â•”â•â•â•â•— â•‘fooâ•‘ ╚â•â•â•â• ``` - `round` (`single` sides with round corners) ``` ╭───╮ │foo│ ╰───╯ ``` - `single-double` (`single` on top and bottom, `double` on right and left) ``` ╓───╖ â•‘fooâ•‘ ╙───╜ ``` - `double-single` (`double` on top and bottom, `single` on right and left) ``` â•’â•â•â•â•• │foo│ ╘â•â•â•â•› ``` - `classic` ``` +---+ |foo| +---+ ``` Style of the box border. Can be any of the above predefined styles or an object with the following keys: ```js { topLeft: '+', topRight: '+', bottomLeft: '+', bottomRight: '+', horizontal: '-', vertical: '|' } ``` ##### dimBorder Type: `boolean`
Default: `false` Reduce opacity of the border. ##### padding Type: `number` `Object`
Default: `0` Space between the text and box border. Accepts 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. ##### margin Type: `number` `Object`
Default: `0` Space around the box. Accepts 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. ##### float Type: `string`
Values: `right` `center` `left`
Default: `left` Float the box on the available terminal screen space. ##### backgroundColor Type: `string`
Values: `black` `red` `green` `yellow` `blue` `magenta` `cyan` `white` Color of the background. ##### align Type: `string`
Default: `left`
Values: `left` `center` `right` Align the text in the box based on the widest line. ## Related - [boxen-cli](https://github.com/sindresorhus/boxen-cli) - CLI for this module - [cli-boxes](https://github.com/sindresorhus/cli-boxes) - Boxes for use in the terminal ## License MIT © [Sindre Sorhus](https://sindresorhus.com) PK!0Db¨ª ª index.jsnu„[µü¤PK!êE¢}UUâ licensenu„[µü¤PK! Õù npackage.jsonnu„[µü¤PK!?ŠB‘/ / ¼readme.mdnu„[µü¤PK$$&