Izmjenjena struktura, dodan backand

This commit is contained in:
GotPPay
2017-10-16 11:19:46 +02:00
parent 1ec88afacb
commit 048e32c4aa
37153 changed files with 2975854 additions and 1 deletions

134
web/node_modules/boxen/index.js generated vendored Normal file
View File

@@ -0,0 +1,134 @@
'use strict';
var stringWidth = require('string-width');
var repeating = require('repeating');
var chalk = require('chalk');
var objectAssign = require('object-assign');
var widestLine = require('widest-line');
var filledArray = require('filled-array');
var cliBoxes = require('cli-boxes');
var camelCase = require('camelcase');
var ansiAlign = require('ansi-align');
var getObject = function (detail) {
var obj;
if (typeof detail === 'number') {
obj = {
top: detail,
right: detail * 3,
bottom: detail,
left: detail * 3
};
} else {
obj = objectAssign({
top: 0,
right: 0,
bottom: 0,
left: 0
}, detail);
}
return obj;
};
var getBorderChars = function (borderStyle) {
var sides = [
'topLeft',
'topRight',
'bottomRight',
'bottomLeft',
'vertical',
'horizontal'
];
var chars;
if (typeof borderStyle === 'string') {
chars = cliBoxes[borderStyle];
if (!chars) {
throw new TypeError('Invalid border style: ' + borderStyle);
}
} else {
sides.forEach(function (key) {
if (!borderStyle[key] || typeof borderStyle[key] !== 'string') {
throw new TypeError('Invalid border style: ' + key);
}
});
chars = borderStyle;
}
return chars;
};
var getBackgroundColorName = function (x) {
return camelCase('bg', x);
};
module.exports = function (text, opts) {
opts = objectAssign({
padding: 0,
borderStyle: 'single',
dimBorder: false,
align: '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');
}
var chars = getBorderChars(opts.borderStyle);
var padding = getObject(opts.padding);
var margin = getObject(opts.margin);
var colorizeBorder = function (x) {
var ret = opts.borderColor ? chalk[opts.borderColor](x) : x;
return opts.dimBorder ? chalk.dim(ret) : ret;
};
var colorizeContent = function (x) {
return opts.backgroundColor ? chalk[opts.backgroundColor](x) : x;
};
text = ansiAlign(text, {align: opts.align});
var NL = '\n';
var PAD = ' ';
var lines = text.split(NL);
if (padding.top > 0) {
lines = filledArray('', padding.top).concat(lines);
}
if (padding.bottom > 0) {
lines = lines.concat(filledArray('', padding.bottom));
}
var contentWidth = widestLine(text) + padding.left + padding.right;
var paddingLeft = repeating(PAD, padding.left);
var marginLeft = repeating(PAD, margin.left);
var horizontal = repeating(chars.horizontal, contentWidth);
var top = colorizeBorder(repeating(NL, margin.top) + marginLeft + chars.topLeft + horizontal + chars.topRight);
var bottom = colorizeBorder(marginLeft + chars.bottomLeft + horizontal + chars.bottomRight + repeating(NL, margin.bottom));
var side = colorizeBorder(chars.vertical);
var middle = lines.map(function (line) {
var paddingRight = repeating(PAD, 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;

21
web/node_modules/boxen/license generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.

56
web/node_modules/boxen/node_modules/camelcase/index.js generated vendored Normal file
View File

@@ -0,0 +1,56 @@
'use strict';
function preserveCamelCase(str) {
var isLastCharLower = false;
for (var i = 0; i < str.length; i++) {
var c = str.charAt(i);
if (isLastCharLower && (/[a-zA-Z]/).test(c) && c.toUpperCase() === c) {
str = str.substr(0, i) + '-' + str.substr(i);
isLastCharLower = false;
i++;
} else {
isLastCharLower = (c.toLowerCase() === c);
}
}
return str;
}
module.exports = function () {
var str = [].map.call(arguments, function (str) {
return str.trim();
}).filter(function (str) {
return str.length;
}).join('-');
if (!str.length) {
return '';
}
if (str.length === 1) {
return str;
}
if (!(/[_.\- ]+/).test(str)) {
if (str === str.toUpperCase()) {
return str.toLowerCase();
}
if (str[0] !== str[0].toLowerCase()) {
return str[0].toLowerCase() + str.slice(1);
}
return str;
}
str = preserveCamelCase(str);
return str
.replace(/^[_.\- ]+/, '')
.toLowerCase()
.replace(/[_.\- ]+(\w|$)/g, function (m, p1) {
return p1.toUpperCase();
});
};

21
web/node_modules/boxen/node_modules/camelcase/license generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.

View File

@@ -0,0 +1,71 @@
{
"_from": "camelcase@^2.1.0",
"_id": "camelcase@2.1.1",
"_inBundle": false,
"_integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
"_location": "/boxen/camelcase",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "camelcase@^2.1.0",
"name": "camelcase",
"escapedName": "camelcase",
"rawSpec": "^2.1.0",
"saveSpec": null,
"fetchSpec": "^2.1.0"
},
"_requiredBy": [
"/boxen"
],
"_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
"_shasum": "7c1d16d679a1bbe59ca02cacecfb011e201f5a1f",
"_spec": "camelcase@^2.1.0",
"_where": "/home/bilal/Saburly/slucajna-televizija/node_modules/boxen",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/camelcase/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/camelcase#readme",
"keywords": [
"camelcase",
"camel-case",
"camel",
"case",
"dash",
"hyphen",
"dot",
"underscore",
"separator",
"string",
"text",
"convert"
],
"license": "MIT",
"name": "camelcase",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/camelcase.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "2.1.1"
}

View File

@@ -0,0 +1,57 @@
# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase)
> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar`
## Install
```
$ npm install --save camelcase
```
## Usage
```js
const camelCase = require('camelcase');
camelCase('foo-bar');
//=> 'fooBar'
camelCase('foo_bar');
//=> 'fooBar'
camelCase('Foo-Bar');
//=> 'fooBar'
camelCase('--foo.bar');
//=> 'fooBar'
camelCase('__foo__bar__');
//=> 'fooBar'
camelCase('foo bar');
//=> 'fooBar'
console.log(process.argv[3]);
//=> '--foo-bar'
camelCase(process.argv[3]);
//=> 'fooBar'
camelCase('foo', 'bar');
//=> 'fooBar'
camelCase('__foo__', '--bar');
//=> 'fooBar'
```
## Related
- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module
- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)

80
web/node_modules/boxen/package.json generated vendored Normal file
View File

@@ -0,0 +1,80 @@
{
"_from": "boxen@^0.6.0",
"_id": "boxen@0.6.0",
"_inBundle": false,
"_integrity": "sha1-g2TUJIrDT/DvGy8r9JpsYM4NgbY=",
"_location": "/boxen",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "boxen@^0.6.0",
"name": "boxen",
"escapedName": "boxen",
"rawSpec": "^0.6.0",
"saveSpec": null,
"fetchSpec": "^0.6.0"
},
"_requiredBy": [
"/update-notifier"
],
"_resolved": "https://registry.npmjs.org/boxen/-/boxen-0.6.0.tgz",
"_shasum": "8364d4248ac34ff0ef1b2f2bf49a6c60ce0d81b6",
"_spec": "boxen@^0.6.0",
"_where": "/home/bilal/Saburly/slucajna-televizija/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": "^1.1.0",
"camelcase": "^2.1.0",
"chalk": "^1.1.1",
"cli-boxes": "^1.0.0",
"filled-array": "^1.0.0",
"object-assign": "^4.0.1",
"repeating": "^2.0.0",
"string-width": "^1.0.1",
"widest-line": "^1.0.0"
},
"deprecated": false,
"description": "Create boxes in the terminal",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"engines": {
"node": ">=0.10.0"
},
"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 && ava"
},
"version": "0.6.0"
}

167
web/node_modules/boxen/readme.md generated vendored Normal file
View File

@@ -0,0 +1,167 @@
# <img src="screenshot.png" width="400" alt="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 --save 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`<br>
Values: `black` `red` `green` `yellow` `blue` `magenta` `cyan` `white` `gray`
Color of the box border.
##### borderStyle
Type: `string` `object`<br>
Default: `single`<br>
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`<br>
Default: `false`
Reduce opacity of the border.
##### padding
Type: `number` `object`<br>
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`<br>
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.
##### backgroundColor
Type: `string`<br>
Values: `black` `red` `green` `yellow` `blue` `magenta` `cyan` `white`
Color of the background.
##### align
Type: `string`<br>
Default: `left`<br>
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](http://sindresorhus.com)