From a0579f91bbdf0de62b59df381d97a008bb98df57 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 30 Oct 2023 16:45:38 +0800 Subject: update/upgrade --- node_modules/postcss-calc/CHANGELOG.md | 13 - node_modules/postcss-calc/README.md | 4 +- node_modules/postcss-calc/dist/index.js | 34 - node_modules/postcss-calc/dist/lib/transform.js | 67 - node_modules/postcss-calc/index.js | 62 + .../postcss-calc/node_modules/ansi-styles/index.js | 65 + .../postcss-calc/node_modules/ansi-styles/license | 21 + .../node_modules/ansi-styles/package.json | 50 + .../node_modules/ansi-styles/readme.md | 86 + .../postcss-calc/node_modules/chalk/index.js | 116 + .../postcss-calc/node_modules/chalk/license | 21 + .../chalk/node_modules/supports-color/index.js | 50 + .../chalk/node_modules/supports-color/license | 21 + .../chalk/node_modules/supports-color/package.json | 49 + .../chalk/node_modules/supports-color/readme.md | 36 + .../postcss-calc/node_modules/chalk/package.json | 70 + .../postcss-calc/node_modules/chalk/readme.md | 213 ++ .../postcss-calc/node_modules/has-flag/index.js | 10 + .../postcss-calc/node_modules/has-flag/license | 21 + .../node_modules/has-flag/package.json | 48 + .../postcss-calc/node_modules/has-flag/readme.md | 64 + .../postcss-calc/node_modules/picocolors/LICENSE | 15 - .../postcss-calc/node_modules/picocolors/README.md | 23 - .../node_modules/picocolors/package.json | 25 - .../node_modules/picocolors/picocolors.browser.js | 4 - .../node_modules/picocolors/picocolors.d.ts | 5 - .../node_modules/picocolors/picocolors.js | 60 - .../postcss-calc/node_modules/picocolors/types.ts | 30 - .../node_modules/postcss-selector-parser/API.md | 624 ---- .../postcss-selector-parser/CHANGELOG.md | 157 - .../postcss-selector-parser/LICENSE-MIT | 22 - .../node_modules/postcss-selector-parser/README.md | 46 - .../postcss-selector-parser/dist/index.js | 114 - .../postcss-selector-parser/dist/parser.js | 643 ---- .../postcss-selector-parser/dist/processor.js | 49 - .../dist/selectors/attribute.js | 54 - .../dist/selectors/className.js | 39 - .../dist/selectors/combinator.js | 35 - .../dist/selectors/comment.js | 35 - .../dist/selectors/container.js | 338 -- .../postcss-selector-parser/dist/selectors/id.js | 39 - .../dist/selectors/namespace.js | 45 - .../dist/selectors/nesting.js | 36 - .../postcss-selector-parser/dist/selectors/node.js | 102 - .../dist/selectors/pseudo.js | 40 - .../postcss-selector-parser/dist/selectors/root.js | 43 - .../dist/selectors/selector.js | 35 - .../dist/selectors/string.js | 35 - .../postcss-selector-parser/dist/selectors/tag.js | 35 - .../dist/selectors/types.js | 15 - .../dist/selectors/universal.js | 36 - .../postcss-selector-parser/dist/sortAscending.js | 10 - .../postcss-selector-parser/dist/tokenize.js | 231 -- .../postcss-selector-parser/package.json | 64 - .../node_modules/postcss-value-parser/LICENSE | 22 - .../node_modules/postcss-value-parser/README.md | 253 -- .../node_modules/postcss-value-parser/lib/index.js | 28 - .../node_modules/postcss-value-parser/lib/parse.js | 251 -- .../postcss-value-parser/lib/stringify.js | 48 - .../node_modules/postcss-value-parser/lib/unit.js | 49 - .../node_modules/postcss-value-parser/lib/walk.js | 22 - .../node_modules/postcss-value-parser/package.json | 58 - .../postcss-calc/node_modules/postcss/CHANGELOG.md | 460 +++ .../postcss-calc/node_modules/postcss/README.md | 376 +- .../node_modules/postcss/docs/guidelines/plugin.md | 195 + .../node_modules/postcss/docs/guidelines/runner.md | 143 + .../node_modules/postcss/docs/source-maps.md | 72 + .../node_modules/postcss/docs/syntax.md | 231 ++ .../node_modules/postcss/lib/at-rule.js | 232 +- .../node_modules/postcss/lib/comment.js | 114 +- .../node_modules/postcss/lib/container.js | 1531 ++++---- .../node_modules/postcss/lib/css-syntax-error.js | 456 ++- .../node_modules/postcss/lib/declaration.js | 194 +- .../postcss-calc/node_modules/postcss/lib/input.js | 324 +- .../node_modules/postcss/lib/lazy-result.js | 735 ++-- .../postcss-calc/node_modules/postcss/lib/list.js | 150 +- .../node_modules/postcss/lib/map-generator.js | 565 ++- .../postcss-calc/node_modules/postcss/lib/node.js | 1176 +++--- .../postcss-calc/node_modules/postcss/lib/parse.js | 59 +- .../node_modules/postcss/lib/parser.js | 949 +++-- .../node_modules/postcss/lib/postcss.d.ts | 2508 ++++++------- .../node_modules/postcss/lib/postcss.js | 217 +- .../node_modules/postcss/lib/previous-map.js | 266 +- .../node_modules/postcss/lib/processor.js | 242 +- .../node_modules/postcss/lib/result.js | 195 +- .../postcss-calc/node_modules/postcss/lib/root.js | 211 +- .../postcss-calc/node_modules/postcss/lib/rule.js | 194 +- .../node_modules/postcss/lib/stringifier.js | 597 ++- .../node_modules/postcss/lib/stringify.js | 19 +- .../node_modules/postcss/lib/terminal-highlight.js | 120 +- .../node_modules/postcss/lib/tokenize.js | 518 ++- .../node_modules/postcss/lib/vendor.js | 63 +- .../node_modules/postcss/lib/warn-once.js | 15 +- .../node_modules/postcss/lib/warning.js | 93 +- .../postcss-calc/node_modules/postcss/package.json | 59 +- .../node_modules/reduce-css-calc/CHANGELOG.md | 167 - .../node_modules/reduce-css-calc/LICENSE | 20 - .../node_modules/reduce-css-calc/README.md | 76 - .../node_modules/reduce-css-calc/dist/index.js | 51 - .../reduce-css-calc/dist/lib/convert.js | 38 - .../reduce-css-calc/dist/lib/reducer.js | 258 -- .../reduce-css-calc/dist/lib/stringifier.js | 78 - .../node_modules/reduce-css-calc/dist/parser.js | 3858 -------------------- .../node_modules/reduce-css-calc/package.json | 49 - .../node_modules/source-map/CHANGELOG.md | 301 -- .../postcss-calc/node_modules/source-map/LICENSE | 28 - .../postcss-calc/node_modules/source-map/README.md | 742 ---- .../source-map/dist/source-map.debug.js | 3234 ---------------- .../node_modules/source-map/dist/source-map.js | 3233 ---------------- .../node_modules/source-map/dist/source-map.min.js | 2 - .../source-map/dist/source-map.min.js.map | 1 - .../node_modules/source-map/lib/array-set.js | 121 - .../node_modules/source-map/lib/base64-vlq.js | 140 - .../node_modules/source-map/lib/base64.js | 67 - .../node_modules/source-map/lib/binary-search.js | 111 - .../node_modules/source-map/lib/mapping-list.js | 79 - .../node_modules/source-map/lib/quick-sort.js | 114 - .../source-map/lib/source-map-consumer.js | 1145 ------ .../source-map/lib/source-map-generator.js | 425 --- .../node_modules/source-map/lib/source-node.js | 413 --- .../node_modules/source-map/lib/util.js | 488 --- .../node_modules/source-map/package.json | 73 - .../node_modules/source-map/source-map.d.ts | 98 - .../node_modules/source-map/source-map.js | 8 - .../postcss-calc/node_modules/strip-ansi/index.js | 6 + .../postcss-calc/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 57 + .../postcss-calc/node_modules/strip-ansi/readme.md | 33 + .../node_modules/supports-color/browser.js | 2 + .../node_modules/supports-color/index.js | 84 + .../node_modules/supports-color/license | 21 + .../node_modules/supports-color/package.json | 66 + .../node_modules/supports-color/readme.md | 60 + node_modules/postcss-calc/package.json | 51 +- 134 files changed, 8805 insertions(+), 25229 deletions(-) delete mode 100644 node_modules/postcss-calc/dist/index.js delete mode 100644 node_modules/postcss-calc/dist/lib/transform.js create mode 100755 node_modules/postcss-calc/index.js create mode 100644 node_modules/postcss-calc/node_modules/ansi-styles/index.js create mode 100644 node_modules/postcss-calc/node_modules/ansi-styles/license create mode 100644 node_modules/postcss-calc/node_modules/ansi-styles/package.json create mode 100644 node_modules/postcss-calc/node_modules/ansi-styles/readme.md create mode 100644 node_modules/postcss-calc/node_modules/chalk/index.js create mode 100644 node_modules/postcss-calc/node_modules/chalk/license create mode 100644 node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/license create mode 100644 node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-calc/node_modules/chalk/package.json create mode 100644 node_modules/postcss-calc/node_modules/chalk/readme.md create mode 100644 node_modules/postcss-calc/node_modules/has-flag/index.js create mode 100644 node_modules/postcss-calc/node_modules/has-flag/license create mode 100644 node_modules/postcss-calc/node_modules/has-flag/package.json create mode 100644 node_modules/postcss-calc/node_modules/has-flag/readme.md delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/LICENSE delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/README.md delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/package.json delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/picocolors.browser.js delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/picocolors.d.ts delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/picocolors.js delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/types.ts delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/API.md delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/CHANGELOG.md delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/LICENSE-MIT delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/README.md delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/index.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/parser.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/processor.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/attribute.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/className.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/combinator.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/comment.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/container.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/id.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/namespace.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/nesting.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/node.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/pseudo.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/root.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/selector.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/string.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/tag.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/types.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/universal.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/sortAscending.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/tokenize.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/package.json delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/LICENSE delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/README.md delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/lib/index.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/lib/parse.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/lib/stringify.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/lib/unit.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/lib/walk.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/package.json create mode 100644 node_modules/postcss-calc/node_modules/postcss/CHANGELOG.md create mode 100644 node_modules/postcss-calc/node_modules/postcss/docs/guidelines/plugin.md create mode 100644 node_modules/postcss-calc/node_modules/postcss/docs/guidelines/runner.md create mode 100644 node_modules/postcss-calc/node_modules/postcss/docs/source-maps.md create mode 100644 node_modules/postcss-calc/node_modules/postcss/docs/syntax.md delete mode 100755 node_modules/postcss-calc/node_modules/reduce-css-calc/CHANGELOG.md delete mode 100755 node_modules/postcss-calc/node_modules/reduce-css-calc/LICENSE delete mode 100755 node_modules/postcss-calc/node_modules/reduce-css-calc/README.md delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/dist/index.js delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/dist/lib/convert.js delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/dist/lib/reducer.js delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/dist/lib/stringifier.js delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/dist/parser.js delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/package.json delete mode 100644 node_modules/postcss-calc/node_modules/source-map/CHANGELOG.md delete mode 100644 node_modules/postcss-calc/node_modules/source-map/LICENSE delete mode 100644 node_modules/postcss-calc/node_modules/source-map/README.md delete mode 100644 node_modules/postcss-calc/node_modules/source-map/dist/source-map.debug.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/dist/source-map.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/dist/source-map.min.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/dist/source-map.min.js.map delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/array-set.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/base64-vlq.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/base64.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/binary-search.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/mapping-list.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/quick-sort.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/source-map-consumer.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/source-map-generator.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/source-node.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/util.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/package.json delete mode 100644 node_modules/postcss-calc/node_modules/source-map/source-map.d.ts delete mode 100644 node_modules/postcss-calc/node_modules/source-map/source-map.js create mode 100644 node_modules/postcss-calc/node_modules/strip-ansi/index.js create mode 100644 node_modules/postcss-calc/node_modules/strip-ansi/license create mode 100644 node_modules/postcss-calc/node_modules/strip-ansi/package.json create mode 100644 node_modules/postcss-calc/node_modules/strip-ansi/readme.md create mode 100644 node_modules/postcss-calc/node_modules/supports-color/browser.js create mode 100644 node_modules/postcss-calc/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-calc/node_modules/supports-color/license create mode 100644 node_modules/postcss-calc/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-calc/node_modules/supports-color/readme.md (limited to 'node_modules/postcss-calc') diff --git a/node_modules/postcss-calc/CHANGELOG.md b/node_modules/postcss-calc/CHANGELOG.md index ccc723bd..f71a0d08 100755 --- a/node_modules/postcss-calc/CHANGELOG.md +++ b/node_modules/postcss-calc/CHANGELOG.md @@ -1,16 +1,3 @@ -# 6.0.2 - 2018-09-25 - -- Fixed: use PostCSS 7 (thanks to @douglasduteil) - -# 6.0.1 - 2017-10-10 - -- Fixed: throwing error for attribute selectors without a value - -# 6.0.0 - 2017-05-08 - -- Breaking: Updated PostCSS from v5.x to v6.x, and reduce-css-calc from v1.x - to v2.x (thanks to @andyjansson). - # 5.3.1 - 2016-08-22 - Fixed: avoid security issue related to ``reduce-css-calc@< 1.2.4``. diff --git a/node_modules/postcss-calc/README.md b/node_modules/postcss-calc/README.md index 4cabf731..a2caa03e 100755 --- a/node_modules/postcss-calc/README.md +++ b/node_modules/postcss-calc/README.md @@ -86,13 +86,13 @@ h1 { } ``` -Checkout [tests](src/__tests__/index.js) for more examples. +Checkout [tests](test) for more examples. ### Options #### `precision` (default: `5`) -Allow you to define the precision for decimal numbers. +Allow you to definine the precision for decimal numbers. ```js var out = postcss() diff --git a/node_modules/postcss-calc/dist/index.js b/node_modules/postcss-calc/dist/index.js deleted file mode 100644 index eb366d7b..00000000 --- a/node_modules/postcss-calc/dist/index.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _postcss = require('postcss'); - -var _transform = require('./lib/transform'); - -var _transform2 = _interopRequireDefault(_transform); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = (0, _postcss.plugin)('postcss-calc', function (opts) { - var options = Object.assign({ - precision: 5, - preserve: false, - warnWhenCannotResolve: false, - mediaQueries: false, - selectors: false - }, opts); - - return function (css, result) { - css.walk(function (node) { - var type = node.type; - - if (type === 'decl') (0, _transform2.default)(node, "value", options, result); - if (type === 'atrule' && options.mediaQueries) (0, _transform2.default)(node, "params", options, result); - if (type === 'rule' && options.selectors) (0, _transform2.default)(node, "selector", options, result); - }); - }; -}); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/postcss-calc/dist/lib/transform.js b/node_modules/postcss-calc/dist/lib/transform.js deleted file mode 100644 index 1a4505f9..00000000 --- a/node_modules/postcss-calc/dist/lib/transform.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _postcssSelectorParser = require('postcss-selector-parser'); - -var _postcssSelectorParser2 = _interopRequireDefault(_postcssSelectorParser); - -var _reduceCssCalc = require('reduce-css-calc'); - -var _reduceCssCalc2 = _interopRequireDefault(_reduceCssCalc); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var MATCH_CALC = /((?:\-[a-z]+\-)?calc)/; - -function transformValue(value, options, result, item) { - if (!value) { - return value; - } - - var reduced = (0, _reduceCssCalc2.default)(value, options.precision); - // if the warnWhenCannotResolve option is on, inform the user that the calc - // expression could not be resolved to a single value - if (options.warnWhenCannotResolve && MATCH_CALC.test(reduced)) { - result.warn("Could not reduce expression: " + value, { plugin: 'postcss-calc', node: item }); - } - - return reduced; -} - -function transformSelector(value, options, result, item) { - return (0, _postcssSelectorParser2.default)(function (selectors) { - selectors.walk(function (node) { - // attribute value - // e.g. the "calc(3*3)" part of "div[data-size="calc(3*3)"]" - if (node.type === 'attribute') { - var val = transformValue(node.raws.unquoted, options, result, item); - node.value = node.quoted ? '"' + val + '"' : val; - } - - // tag value - // e.g. the "calc(3*3)" part of "div:nth-child(2n + calc(3*3))" - if (node.type === 'tag') node.value = transformValue(node.value, options, result, item); - - return; - }); - }).process(value).result.toString(); -} - -exports.default = function (node, property, options, result) { - var value = property === "selector" ? transformSelector(node[property], options, result, node) : transformValue(node[property], options, result, node); - - // if the preserve option is enabled and the value has changed, write the - // transformed value into a cloned node which is inserted before the current - // node, preserving the original value. Otherwise, overwrite the original - // value. - if (options.preserve && node[property] !== value) { - var clone = node.clone(); - clone[property] = value; - node.parent.insertBefore(node, clone); - } else node[property] = value; -}; - -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/postcss-calc/index.js b/node_modules/postcss-calc/index.js new file mode 100755 index 00000000..f0791b15 --- /dev/null +++ b/node_modules/postcss-calc/index.js @@ -0,0 +1,62 @@ +/** + * Module dependencies. + */ +var reduceCSSCalc = require("reduce-css-calc") +var helpers = require("postcss-message-helpers") +var postcss = require("postcss") + +var CONTAINS_CALC = /\bcalc\([\s\S]*?\)/ + +/** + * PostCSS plugin to reduce calc() function calls. + */ +module.exports = postcss.plugin("postcss-calc", function(options) { + options = options || {} + var precision = options.precision + var preserve = options.preserve + var warnWhenCannotResolve = options.warnWhenCannotResolve + var mediaQueries = options.mediaQueries + var selectors = options.selectors + + return function(style, result) { + function transformValue(node, property) { + var value = node[property] + + if (!value || !CONTAINS_CALC.test(value)) { + return + } + + helpers.try(function transformCSSCalc() { + var reducedValue = reduceCSSCalc(value, precision) + + if (warnWhenCannotResolve && CONTAINS_CALC.test(reducedValue)) { + result.warn("Could not reduce expression: " + value, + {plugin: "postcss-calc", node: node}) + } + + if (!preserve) { + node[property] = reducedValue + return + } + + if (reducedValue != value) { + var clone = node.clone() + clone[property] = reducedValue + node.parent.insertBefore(node, clone) + } + }, node.source) + } + + style.walk(function(rule) { + if (mediaQueries && rule.type === "atrule") { + return transformValue(rule, "params") + } + else if (rule.type === "decl") { + return transformValue(rule, "value") + } + else if (selectors && rule.type === "rule") { + return transformValue(rule, "selector") + } + }) + } +}) diff --git a/node_modules/postcss-calc/node_modules/ansi-styles/index.js b/node_modules/postcss-calc/node_modules/ansi-styles/index.js new file mode 100644 index 00000000..78945278 --- /dev/null +++ b/node_modules/postcss-calc/node_modules/ansi-styles/index.js @@ -0,0 +1,65 @@ +'use strict'; + +function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/node_modules/postcss-calc/node_modules/ansi-styles/license b/node_modules/postcss-calc/node_modules/ansi-styles/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/postcss-calc/node_modules/ansi-styles/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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. diff --git a/node_modules/postcss-calc/node_modules/ansi-styles/package.json b/node_modules/postcss-calc/node_modules/ansi-styles/package.json new file mode 100644 index 00000000..78c535f7 --- /dev/null +++ b/node_modules/postcss-calc/node_modules/ansi-styles/package.json @@ -0,0 +1,50 @@ +{ + "name": "ansi-styles", + "version": "2.2.1", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": "chalk/ansi-styles", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "devDependencies": { + "mocha": "*" + } +} diff --git a/node_modules/postcss-calc/node_modules/ansi-styles/readme.md b/node_modules/postcss-calc/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000..3f933f61 --- /dev/null +++ b/node_modules/postcss-calc/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install --save ansi-styles +``` + + +## Usage + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## Advanced usage + +By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/postcss-calc/node_modules/chalk/index.js b/node_modules/postcss-calc/node_modules/chalk/index.js new file mode 100644 index 00000000..2d85a917 --- /dev/null +++ b/node_modules/postcss-calc/node_modules/chalk/index.js @@ -0,0 +1,116 @@ +'use strict'; +var escapeStringRegexp = require('escape-string-regexp'); +var ansiStyles = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasAnsi = require('has-ansi'); +var supportsColor = require('supports-color'); +var defineProps = Object.defineProperties; +var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} + +// use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001b[94m'; +} + +var styles = (function () { + var ret = {}; + + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + ret[key] = { + get: function () { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +})(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + /* eslint-disable no-proto */ + builder.__proto__ = proto; + + return builder; +} + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + var i = nestedStyles.length; + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + var originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } + + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + ansiStyles.dim.open = originalDim; + + return str; +} + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build.call(this, [name]); + } + }; + }); + + return ret; +} + +defineProps(Chalk.prototype, init()); + +module.exports = new Chalk(); +module.exports.styles = ansiStyles; +module.exports.hasColor = hasAnsi; +module.exports.stripColor = stripAnsi; +module.exports.supportsColor = supportsColor; diff --git a/node_modules/postcss-calc/node_modules/chalk/license b/node_modules/postcss-calc/node_modules/chalk/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/postcss-calc/node_modules/chalk/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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. diff --git a/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/index.js b/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/index.js new file mode 100644 index 00000000..4346e272 --- /dev/null +++ b/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/index.js @@ -0,0 +1,50 @@ +'use strict'; +var argv = process.argv; + +var terminator = argv.indexOf('--'); +var hasFlag = function (flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); +}; + +module.exports = (function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return false; + } + + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); diff --git a/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/license b/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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. diff --git a/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/package.json b/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/package.json new file mode 100644 index 00000000..3bb77ac1 --- /dev/null +++ b/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/package.json @@ -0,0 +1,49 @@ +{ + "name": "supports-color", + "version": "2.0.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect" + ], + "devDependencies": { + "mocha": "*", + "require-uncached": "^1.0.2" + } +} diff --git a/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/readme.md b/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/readme.md new file mode 100644 index 00000000..b4761f1e --- /dev/null +++ b/node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/readme.md @@ -0,0 +1,36 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install --save supports-color +``` + + +## Usage + +```js +var supportsColor = require('supports-color'); + +if (supportsColor) { + console.log('Terminal supports color'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/postcss-calc/node_modules/chalk/package.json b/node_modules/postcss-calc/node_modules/chalk/package.json new file mode 100644 index 00000000..2b5881e9 --- /dev/null +++ b/node_modules/postcss-calc/node_modules/chalk/package.json @@ -0,0 +1,70 @@ +{ + "name": "chalk", + "version": "1.1.3", + "description": "Terminal string styling done right. Much color.", + "license": "MIT", + "repository": "chalk/chalk", + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)", + "JD Ballard (github.com/qix-)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && mocha", + "bench": "matcha benchmark.js", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "devDependencies": { + "coveralls": "^2.11.2", + "matcha": "^0.6.0", + "mocha": "*", + "nyc": "^3.0.0", + "require-uncached": "^1.0.2", + "resolve-from": "^1.0.0", + "semver": "^4.3.3", + "xo": "*" + }, + "xo": { + "envs": [ + "node", + "mocha" + ] + } +} diff --git a/node_modules/postcss-calc/node_modules/chalk/readme.md b/node_modules/postcss-calc/node_modules/chalk/readme.md new file mode 100644 index 00000000..5cf111e3 --- /dev/null +++ b/node_modules/postcss-calc/node_modules/chalk/readme.md @@ -0,0 +1,213 @@ +

+
+
+ chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) +[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master) +[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) + + +[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. + +**Chalk is a clean and focused alternative.** + +![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png) + + +## Why + +- Highly performant +- Doesn't extend `String.prototype` +- Expressive API +- Ability to nest styles +- Clean and focused +- Auto-detects color support +- Actively maintained +- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015 + + +## Install + +``` +$ npm install --save chalk +``` + + +## Usage + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +var chalk = require('chalk'); + +// style a string +chalk.blue('Hello world!'); + +// combine styled and normal strings +chalk.blue('Hello') + 'World' + chalk.red('!'); + +// compose multiple styles using the chainable API +chalk.blue.bgRed.bold('Hello world!'); + +// pass in multiple arguments +chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); + +// nest styles +chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); + +// nest styles of the same type even (color, underline, background) +chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +); +``` + +Easily define your own themes. + +```js +var chalk = require('chalk'); +var error = chalk.bold.red; +console.log(error('Error!')); +``` + +Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). + +```js +var name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> Hello Sindre +``` + + +## API + +### chalk.`